WSN
WSN
1. Physical Layer Protocols • CODA (Congestion Detection and Avoidance): A congestion control protocol for
The physical layer is responsible for the modulation, frequency selection, WSNs that detects congestion in the network and adjusts the data transmission
transmission, and reception of data. In WSNs, low power consumption is rate accordingly to avoid packet loss.
essential at this layer to ensure the longevity of sensor nodes. • ESRT (Event-to-Sink Reliable Transport): A reliable transport protocol designed
• IEEE 802.15.4: A popular standard for low-rate wireless personal area networks for event-driven WSNs, ensuring that the base station receives sufficient data
(LR-WPANs), providing low power consumption and low cost, used in many WSN from the sensors for accurate event detection.
applications. It defines how data is modulated and transmitted wirelessly.
5. Application Layer Protocols
2. Data Link Layer Protocols The application layer defines the specific data formats and protocols used by WSN
The data link layer ensures reliable communication between sensor nodes by applications to collect and process data.
providing error detection, error correction, and medium access control (MAC). • TinyOS: An open-source operating system designed for low-power sensor
• SMAC (Sensor-MAC): Designed specifically for WSNs, SMAC focuses on reducing networks. It provides a set of libraries and protocols for communication and data
energy consumption by coordinating nodes to operate in a duty-cycled manner. handling in WSNs.
Nodes periodically sleep and wake up to reduce power usage. • COAP (Constrained Application Protocol): A lightweight application protocol
• TDMA (Time Division Multiple Access): In TDMA, nodes transmit at pre- designed for constrained devices like those in WSNs. It supports RESTful
scheduled times to avoid collisions and save energy. communication and can be used for monitoring and control applications in WSNs.
A wireless sensor device is generally composed of four basic components: a sensing A wireless sensor node can only be equipped with a limited power source (<0.5Ah,
unit, a processing unit, a transceiver unit and a power unit. Moreover, additional 1.2V) due to the several hardware constraints described in Section 3.1. Moreover,
components can also be integrated into the sensor node depending on the for most applications, replenishment
application. These components as shown by the dashed boxes in Figure 3.1 include: of power resources is impossible. WSN lifetime, therefore, shows a strong dependence
a location finding system, a power generator ,and a mobilizer. on battery lifetime.
Sensing unit: The sensing unit may generally include several sensor units, which In a multi-hop ad hoc sensor network, each node plays two separate and
provide information gathering capabilities from the physical world. Each sensor unit complementary roles:
is responsible for gathering information of a certain type, such as temperature, • Data originator: Each sensor node’s primary role is to gather data from the
humidity, or light, and is usually composed of two subunits: a sensor and an analog environment through the various sensors. The data generated from sensing the
to-digital converter (ADC). The analog signals produced by the sensor based on the environment need to be processed and transmitted to nearby sensor nodes for
observed phenomenon are converted to digital signals by the ADC, and then fed multi-hop delivery to the sink.
into the processing unit. • Data router: In addition to originating data, each sensor node is responsible for
Processing unit: controller of the wireless sensor node, consist of an on-board memory relaying the information transmitted by its neighbors. The low-power
or may be associated with a small storage unit integrated into the embedded board. communication techniques in WSNs limit the communication range of a node. In a
The processing unit manages the procedures that enable the sensor node to large network, multi-hop communication is required so that nodes relay the
perform sensing operations, run associated algorithms, and collaborate with the information sent by their neighbors to the data collector, i.e., the sink. Accordingly,
other nodes through wireless communication. the sensor node is responsible for receiving the data sent by its neighbors and
Transceiver unit : Communication between any two wireless sensor nodes is performed forwarding these data to one of its neighbors according to the routing decisions.
by the transceiver units. A transceiver unit implements the necessary procedures to failure of a few nodes can cause significant topological changes and might require
convert bits to be transmitted into radio frequency (RF) waves and recover them at rerouting of packets and reorganization of the network. Hence, power conservation
the other end. Essentially, the WSNis connected to the network through this unit and power management are integral parts of any communication protocol in WSNs.
Power unit: , battery power is used, but other energy sources are also possible. Each main task of a sensor node in a sensor field is to detect events, perform local data
component in the wireless sensor node is powered through the power unit and the processing, and then transmit the data. Power consumption can hence be divided
limited capacity of this unit requires energy-efficient operation for the tasks into three domains, sensing, communication, anddata processing, which are
performed by each component. performed by the sensors, the CPU, and the radio
Definition of Cyclic Code
A Cyclic Code is a type of linear block code used in error detection and correction, 2. Transmission of Data and CRC
where any cyclic shift of a valid codeword (a sequence of bits) results in another The original data, along with the computed CRC code (checksum), is transmitted as a
valid codeword. In simpler terms, if a sequence of bits is a valid codeword in a single block. This combined block is called the codeword. During transmission,
cyclic code, then rotating the bits (shifting them left or right) will still result in the data might get corrupted due to noise or interference in the channel.
another valid codeword. This property makes cyclic codes particularly useful in
communication systems for detecting errors in transmitted data. 3. CRC Check (At the Receiver)
Cyclic codes are widely used because of their ease of implementation using shift At the receiver, the following steps are performed to check if the received data is
registers, especially for error detection techniques like Cyclic Redundancy Check error-free:
(CRC).
• Step 1: The receiver divides the received codeword (data + CRC)
by the same generator polynomial used by the sender.
Cyclic Redundancy Check (CRC) Mechanism
Cyclic Redundancy Check (CRC) is a widely used error-detection method in digital • Step 2: If the remainder from this division is zero, it indicates that
networks and storage devices. It is based on cyclic codes and helps in detecting the received data is correct and uncorrupted.
•
any alterations in data during transmission or storage. CRC adds a check value
(called the CRC code or CRC checksum) to the data before transmission. When Step 3: If the remainder is non-zero, it signals an error in the
the data reaches the destination, the checksum is recomputed to verify data received data.
integrity. By comparing the received data's CRC code with the locally computed one, the
The CRC mechanism involves three main steps: receiver can detect whether any bits were altered during transmission.
1. Generation of CRC Example of CRC Calculation
2. Transmission of Data and CRC Let’s go through a simple CRC example where:
3. CRC Check at Receiver • Data to transmit: 1101
• Step 2: Append a number of zeros to the end of the data equal to • Cyclic Redundancy Check (CRC) is an error-detection technique
the degree of the generator polynomial. used in data transmission.
• Step 3: Perform binary division (mod 2 division) of the modified • CRC involves dividing the data by a generator polynomial to obtain
data by the generator polynomial. a remainder (CRC checksum).
• Step 4: The remainder from this division is the CRC code. This • The remainder is appended to the data before transmission.
remainder is then appended to the original data to form the • At the receiver, the same division is performed to check if the
transmitted codeword. remainder is zero, indicating error-free transmission.
Example: If the data to be transmitted is 1101 and the generator polynomial is 1011, CRC is simple, efficient, and can detect a wide range of errors, making it popular in
the steps involve appending zeros to the data, performing binary division, and network communications (like Ethernet, USB) and storage systems.
appending the remainder to the data.