WSN CDT11 6CSN

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS

6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

CDT11 1.Introduction, background and fundamentals of MAC protocols for WSNs.


Topics Covered

Motivation
It gives the overview of the data link layer which deals with the transfer of
(Why you information from nodes.
(students) should
learn these topics?)

Lecture Learning Outcomes (LLOs): After completion of this lecture, you should be able to…
LLO1
On topic 1
Identify the performance requirements for MAC protocols.

CDT11 – Lecture Summary – Key Takeaways


MEDIUM ACCESS CONTROL
Introduction
 Medium Access Control (MAC) protocol is the first protocol layer above the
Physical Layer (PHY) and consequently MAC protocols are heavily influenced
by its properties. The fundamental task of any MAC protocol is to regulate the
access of a number of nodes to a shared medium in such a way that certain
application dependent performance requirements are satisfied.
 Some of the traditional performance criteria are delay, throughput, and
fairness, whereas in WSNs, the issue of energy conservation becomes
important.
 Within the OSI reference model, the MAC is considered as a part of the Data
Link Layer (DLL), but there is a clear division of work between the MAC
and the remaining parts of the DLL.
 The MAC protocol determines for a node the points in time when it accesses

Page 1 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

the medium to try to transmit a data, control, or management packet to


another node (unicast) or to a set of nodes (multicast, broadcast).
 Two important responsibilities of the remaining parts of the DLL are error
control and flow control. Error control is used to ensure correctness of
transmission and to take appropriate actions in case of transmission errors
and flow control regulates the rate of transmission to protect a slow receiver
from being overwhelmed with data.

Fundamentals of (wireless) MAC protocols


In this section, we discuss some fundamental aspects and important examples of
wireless MAC protocols, since the protocols used in wireless sensor networks
inherit many of the problems and approaches already existing for this more
general field.

Requirements for wireless MAC protocols

The performance requirements of MAC protocols are to minimize Delay and


maximize Throughput, Robustness, Scalability, Stability, Fairness and Energy
efficiency.
 Delay:
 Delay refers to the amount of time spent by a packet in the MAC layer
before it is transmitted successfully.
 Delay depends not only on the network traffic but also on the design
choices of the MAC protocol.
 Throughput:
 Throughput is defined as the rate at which messages are serviced by
Page 2 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

the communication system.


 In wireless environments, it represents the fraction of the channel
capacity used for data transmission.
 The objective of the MAC protocol is to maximize the Throughput
while minimizing the message Delay.
 Robustness:
 Robustness is a combination of reliability, availability and
dependability requirements and it reflects the degree of the
protocol insensitivity to errors.
 Achieving robustness in a time varying network like wireless sensor
network, depends strongly on the failure models of the links and the
communicating nodes.
 Scalability:
 Scalability refers to the ability of the communication system to
meet its performance characteristics regardless of the size of
the network and the number of competing nodes.
 Stability:
 Stability refers to the ability of a communication system to
handle the fluctuations of the traffic load over sustained
periods of time.
 Fairness:
 Fairness is achieved if the MAC protocol can allocate the channel
capacity evenly among the competing nodes without reducing the
network Throughput.
 Energy efficiency:
 Energy efficiency is the major issue in the design of MAC protocols
for wireless sensor nodes.
Page 3 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

Design constraints for wireless MAC protocols

1. Scalability, Adaptability and Decentralization are three important


criteria in designing a MAC protocol. The sensor network should adapt to
the changes in the network size, node density and topology.
2. A MAC protocol should have minimum Latency and high Throughput
when the sensor networks are deployed in critical delay sensitive
applications.
3. Since the nodes are deployed randomly, nodes from a highly dense area may
face
high contention among themselves while reporting events, resulting in a
high packet loss. So there should be uniformity in reporting the events,
using a MAC protocol.
4. Bandwidth Efficiency –The shortage of data transfer capacity assets in
these networks requires its proficient use. To evaluate this, we could
state that bandwidth capacity is the proportion of the bandwidth used for
data transmission to the complete accessible bandwidth capacity.
5. A MAC protocol should avoid collisions from interfering nodes, over-
emitting, overhearing, control packet overhead and idle listening.
 When a receiver node receives more than one packet at the same
time, called “collided packets”, these need to be sent again thereby
increasing the energy consumption. ƒ
 When a destination node is not ready to receive messages then it
is called an over-emitting node.
 Overhearing occurs if a node picks up packets that were destined

Page 4 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

for some other node. ƒ


 Sending and receiving of less useful packets result in control overhead. ƒ
 Idle listening is an important factor as the nodes often listen to the
channel for the possible reception of data which may not have
been sent.
6. Another Major design issue is hidden-terminal/exposed-terminal
problems. (which should be removed.) If two nodes are out of reach, they
cannot hear each other. This gives rise to the well-known hidden-
terminal/exposed-terminal problems.

Hidden-Terminal Problem

 The hidden-terminal problem occurs specifically for the class of Carrier


Sense Multiple Access (CSMA) protocols, where a node senses the
medium before starting to transmit a packet. If the medium is found to be
busy, the node defers its packet to avoid a collision and a subsequent
retransmission.
 Other senders’ information are hidden from the current sender, so that
transmissions at the same receiver cause collisions.
 Senders A and C are able to reach B, but cannot overhear each other’s signals
 It is possible for A and C to transmit data to B at the same time, causing a
collision at B, without being able to directly detect collision.
 Example for hidden terminal:

 C transmits to B.
 If A “senses” the
Page 5 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

channel, it will not


hear C’s transmission
and falsely conclude
that A can begin a
transmission to B.

Exposed-Terminal Scenario

 In the exposed-terminal scenario, the sender mistakenly thinks the


medium is in use, so that it unnecessarily defers the transmission.
 C wants to transmit data B, but decides to wait because it overhears an
ongoing transmission from B to A!
 B’s transmission could not interfere with data reception at C
 Example for exposed terminal

 B wants to send to C and


listens to the channel.
 When B hears A’s
transmission, B falsely
assumes that it cannot send
to C.

Solutions to the hidden-terminal and exposed-terminal problems


Page 6 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 Two solutions to the hidden-terminal and exposed-terminal problems are:


 busy-tone solutions
 RTS/CTS handshake used in the IEEE 802.11 WLAN standard protocols
Important classes of MAC protocols
A huge number of (wireless) MAC protocols have been devised during the
last thirty years. They can be roughly classified into the following classes:
 Fixed assignment protocols,
 Demand assignment protocols,
 Random access protocols.

Page 7 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

Fixed assignment protocols


 In this class of protocols, the available resources are divided between the
nodes such that the resource assignment is long term and each node can use
its resources exclusively without the risk of collisions.
 Long term means that the assignment is for durations of minutes, hours, or
even longer, as opposed to the short-term case where assignments have a
scope of a data burst, corresponding to a time horizon of perhaps (tens of)
milliseconds.
 Due to nodes dying or new nodes being deployed, mobility, or changes in
the load patterns – signaling mechanisms are needed in fixed assignment
protocols to renegotiate the assignment of resources to nodes.
 Typical protocols of this class are TDMA, FDMA, CDMA, and SDMA.
Time Division Multiple Access (TDMA)

 This scheme Subdivides the time axis into fixed-length superframes and
each superframe is again subdivided into a fixed number of time slots as
shown in figure below. Each slot is separated by small time slot called
Guard times-to avoid interference between time slots.

Page 8 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 These time slots are assigned to nodes exclusively and hence the node can
transmit ion this time slot periodically in every superframe.
 TDMA requires tight time synchronization between nodes to avoid
overlapping of signals in adjacent time slots.
Advantages:
 Data rate is faster
 Bandwidth is efficient
 Cheaper than FDMA
 Full power efficiency is possible i.e., Mobile device can save their
battery power by turning off transmitting and receiving data.
Frequency Division Multiple Access (FDMA)

 Here, the available frequency band is subdivided into a number of sub


channels and these are assigned to nodes, which can transmit exclusively on
their channel.
 Each frequency is separated by small frequency bands called Guard
bands-to avoid interference between different frequency bands. This is as
shown in the figure below.

Page 9 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 This scheme requires frequency synchronization, relatively narrowband


filters, and the ability of a receiver to tune to the channel used by a
transmitter.
 Accordingly, an FDMA transceiver tends to be more complex than a TDMA
transceiver.
Advantages:
 A Little Synchronization required.
 Low ISI (inter symbol interference)effect
 Availability of resources for all time.
Disadvantages:
 Requires expensive filters.
 Causes signal spreading.
 Causes radiation leakage.

Page 10 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

Code Division Multiple Access (CDMA)


 In this scheme, the nodes spread their signals over a much larger
bandwidth than needed, using different codes to separate their
transmissions.

 The receiver has to know the code used by the transmitter; all parallel
transmissions using other codes appear as noise. Crucial to CDMA is the
code management.

Demand assignment protocols

 In demand assignment protocols, Channel is allocated according to node demand.

Page 11 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 These protocols are best suited for variable-rate traffic.


 In demand assignment protocols, the exclusive allocation of resources to
nodes is made on a short-term basis, typically the duration of a data burst.
 This class of protocols can be broadly subdivided into centralized and
distributed protocols.

Central Control Protocols/ Centralized protocol

 Here, the nodes send out requests for bandwidth allocation to a central node
that either accepts or rejects the requests.
 In case of successful allocation, a confirmation is transmitted back to the
requesting node along with a description of the allocated resource, for
example, the numbers and positions of assigned time slots in a TDMA system
and the duration of allocation.
 The submission of requests from nodes to the central station is often done
contention based; that is, using a random access protocol on a dedicated
(logical) signaling channel.
 Another option is to let the central station poll its associated nodes.
 In addition, the nodes often piggyback (The technique of temporarily delaying
outgoing acknowledgement so that they can be hooked onto the next outgoing data
frame is known as piggybacking). requests onto data packets transmitted in
their exclusive data slots, thus avoiding transmission of separate request
packets.
 The central node needs to be switched on all the time and is responsible for
resource allocation.
 Resource deallocation is often done implicitly: when a node does not use its

Page 12 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

time slots any more, the central node can allocate these to other nodes.
 This way, nodes do not need to send extra deallocation packets.
 Thus, the central node performs a lot of activities, it must be constantly
awake, and thus needs lots of energy. An example is the IEEE 802.15.4
protocol, LEACH protocol.
Distributed Demand Assignment Protocols
 These protocols are token-passing protocols like IEEE 802.4 Token Bus.
 The right to initiate transmissions is tied to reception of a small special token frame.
 The token frame is rotated among nodes organized in a logical ring on top of
a broadcast medium.
 Special ring management procedures are needed to include and exclude
nodes from the ring or to correct failures like lost tokens.
 Token-passing protocols have also been considered for wireless or error-
prone media, but they tend to have problems with the maintenance of the
logical ring in the presence of significant channel errors.
 In addition, since token circulation times are variable, a node must always be
able to receive the token to avoid breaking the logical ring. Hence, a nodes
transceiver must be switched on most of the time.

Random access protocols

 The nodes are uncoordinated, and the protocols operate in a fully distributed manner.
 Random access protocols often incorporate a random element, for
example, by exploiting random packet arrival times, setting timers to random
values, and so on.
 One of the first and still very important random access protocols is the

Page 13 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

ALOHA or slotted ALOHA protocol.

ALOHA
 Aloha is a random access protocol.
 It was actually designed for WLAN but it is also applicable for shared medium.
 In this, multiple stations can transmit data at the same time and can hence
lead to collision and data being garbled.
 There are two types: Pure ALOHA and Slotted ALOHA

PURE ALOHA
 Pure ALOHA allows stations to transmit whenever they have data to be sent.
 There is no coordination with other nodes and the protocol thus accepts
the risk of collisions at the receiver.
 When a station sends data it waits for an acknowledgement.
 To detect this, the receiver is required to send an immediate
acknowledgment for a properly received packet.
 If the acknowledgement doesn't come within the allotted time then the
station waits for a random amount of time called back-off time (Tb) and re-
sends the data.
 Since different stations wait for different amount of time, the probability
of further collision decreases.

Page 14 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 ALOHA provides
◦ short access and transmission delays under light loads
◦ under heavier loads, the number of collisions increases, which in turn
decreases the throughput efficiency and increases the transmission
delays

SLOTTED ALOHA
 It was developed just to improve the efficiency of pure aloha as the chances
for collision in pure aloha are high.

Page 15 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 The time of the shared channel is divided into discrete time intervals called slots.

 Sending of data is allowed only at the beginning of these slots.


 A slot is large enough to accommodate a maximum-length packet.
 Accordingly, only contenders starting their packet transmission in the
same slot can destroy a node’s packet.
 If any node wants to start later, it has to wait for the beginning of the next
time slot and has thus no chance to destroy the node’s packet.
 In short, the synchronization reduces the probability of collisions and slotted
ALOHA has a higher throughput than pure ALOHA.

CSMA protocols

 A transmitting node tries to be respectful to ongoing transmissions.


 First, the node is required to listen to the medium; this is called carrier sensing.

Page 16 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 If the medium is found to be idle, the node starts transmission.


 If the medium is found busy, the node defers its transmission for an amount of time.
 While CSMA protocols are still susceptible to collisions, they have a higher
throughput efficiency than ALOHA protocols
 Carrier-sense protocols are susceptible to the hidden-terminal problem since
interference at the receiver cannot be detected by the transmitter.
 This problem may cause packet collisions. The energy spent on collided
packets is wasted and the packets have to be retransmitted.
 To solve or at least to reduce the hidden-terminal problem; The busy-tone
solution
and The RTS/CTS handshake.

The busy-tone solution


In the original busy-tone solution,
 Two different frequency channels are used, one for the data packets and the
other one as a control channel.
=
 As s oon as a node starts to receive a packet destined to it, it emits an un
modulated wave on the control channel and ends this when packet
reception is finished.
 A node that wishes to transmit a packet first senses the control
channel for the presence of a busy tone.
 If it hears something, the node backs off according to some algorithm, for
example similar to non persistent CSMA.
 If it hears nothing, the node starts packet transmission on the data channel.
 If the busy tone is too weak, a node within radio range of the receiver
might start data transmission and destroy the receiver’s signal.

Page 17 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 If the busy tone is too strong, more nodes than necessary suppress their
transmissions.
 The control channel does not need much bandwidth but a narrow
bandwidth channel requires good frequency synchronization.
 A solution with two busy tones, one sent by the receiver and the other by
the transmitter node
 Another variant of the busy-tone approach is used by PAMAS (Power
Aware Multi Access Signaling).

RTS/CTS handshake

 The RTS/CTS handshake is


illustrated in Figure 5.2.
 It uses only a single channel and
two special control packets.
 Suppose that node B wants to
transmit a data packet to node C.
After B has obtained channel
access (for example after sensing
the channel as idle), it sends a
Request To Send (RTS) packet to
C, which includes a duration field
indicating the remaining length of
the overall transaction (i.e., until
the point where B would receive
the acknowledgment for its data

Page 18 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

packet).
 If C has properly received the
RTS packet, it sends a
ClearToSend (CTS) packet,
which again contains a duration
field. When B receives the CTS
packet, it starts transmission of
the data packet and finally C
answers with an
acknowledgment packet.
 The acknowledgment is used to tell B
about the success of the transmission; lack of acknowledgment is interpreted
as collision. Any other station A or D hearing either the RTS, CTS, data or
acknowledgment packet sets an internal timer called Network Allocation
Vector (NAV) to the remaining duration indicated in the respective frame and
avoids sending any packet as long as this timer is not expired.
 Specifically, nodes A and D send no CTS answer packets even when they have
received a RTS packet correctly. This way, the ongoing transmission is not
distorted.
 Two further problems are illustrated in Figure 5.3: In the left part of
the figure, nodes A and B run the RTS-CTS-Data-Ack sequence, and B’s
CTS packet also reaches node C. However, at almost the same time, node D
sends an RTS packet to C, which collides at node C with B’s CTS packet.
This way, C has no chance to decode the duration field of the CTS packet
and to set its NAV variable accordingly. After its failed RTS packet, D sends
the RTS packet again to C and C answers with a CTS packet. Node C is
doing so because it cannot hear A’s ongoing transmission and has no
proper NAV entry. C’s CTS packet and A’s data packet collide at B.

Page 19 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

 In the figure’s right part, the problem is created by C starting its RTS
packet to D immediately before it can sense B’s CTS packet, which C
consequently cannot decode properly. One solution approach is to
ensure that CTS packets are longer than RTS packets. For an
explanation, consider the right part of Figure 5.3. Here, even if B’s CTS
arrives at C immediately after C starts its RTS, it lasts long enough that C

Page 20 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

has a chance to turn its transceiver into receive mode and to sense B’s
signal. It is not hard to convince oneself that the problem in the left half
of Figure5.3 is eliminated too.
 A further problem of the RTS/CTS handshake is its significant overhead
of two control packets per data packet, not counting the acknowledgment
packet. If the data packet is small, this overhead might not pay off and it
may be simpler to use some plain CSMA variant. For long packets, the
overhead of the RTS/CTS handshake can be neglected, but long packets
are more likely to be hit by channel errors and must be retransmitted
entirely, wasting precious energy (channel errors often hit only a few bits).
A good compromise is to fragment a large packet.

CDT11 - LECTURE LEVEL PRACTICE PROBLEMS (LLPs) to test the LLOs


To test whether you achieved the learning outcomes of this lecture, you should be
able to solve the following LLPs, in the class itself, after completion of the lecture. Minimum
one question / problem (LLP) is designed to test each expected LLO.
1. LLP1 (on LLO1):
Evaluate the protocols used for Wireless Sensor Network.
2.LLP2 (on LLO2):

Identify the charactertics of LEACH protocol.

Additional LLPs: Practice problems for homework


3.LLP1.1 (on LLO1):

Define operation involved in the Bluetooth.


Page 21 of 22
Prepared by: Dept of CSE(N), KITSW
Department of CSE(N), KITSW U18CN603B WIRELESS SENSOR NETWORKS
6CSN AY:2022-23

CDT11 - LECTURE SUMMARY

Page 22 of 22
Prepared by: Dept of CSE(N), KITSW

You might also like