wireless sensor network
TRANSCRIPT
IEEE 802.15.4 LR-WPAN
Wireless Sensor Networks(WSN)
NetSim v9.1NetSim v9.1Network Simulation/Emulation Platform
Introduction
• IEEE 802.15.4 LR-WPAN(Low data Rate - Wireless Personal Area Networks) standard is widely used because of its position independent sensing capabilities even in toxic and inaccessible regions to humans.
• Sensors are low cost and can be randomly placed as long as they are in some sensors coverage area.
Applications
• Area Monitoring– WSN is deployed over a region where some
phenomenon is to be monitored like detecting enemy intrusion etc.,
• Forest Fire Detection– A network of Sensor Nodes can be installed in a
forest to detect when a fire has started.• Battlefield surveillance• Reference: Wikipedia
Devices in WSN
• WSN has mainly two types for devices;FFD,RFD• FFD or Full Functional Device – Senses the agent– Routes packets and– Initialize the Network(act as PAN Coordinator)– Can communicate with another RFD or FFD
• RFD or Reduced Functional Device– Can only sense the agent– Can communicate with FFD only
Sink node
• Sink node is the principal controller in WPAN and there is only one PAN Coordinator in a WSN.
• If Sink node uses Beacon enabled mode then nodes use Slotted CSMA/CA algorithm for transmitting packets else nodes use Unslotted CSMA/CA.
Agent
• Sensors sense the Agent and generate a packet containing its position if the agent is in its sensitivity range.
• In NetSim, Agent mobility is modeled by RandomWalk and RandomWayPoint which are followed internationally to test WSN.
• For each of the models we can set its velocity and pause time(only random way point) and also we can capture the agents path for the whole simulation.
Sensor
• WSN consists of spatially distributed sensors to monitor physical or environmental conditions, such as temperature, sound, pressure, etc. and to cooperatively pass their data through the network to a main location(Sink node).
Scenarios in WSN
IEEE 802.15.4 operational modes
Beacon Frame
• Beacons occupy the first slot in SuperFrame.• Beacons are used to synchronize the attached
devices, to identify the PAN, and to describe the structure of the super frames.
• Beacon frames are transmitted periodically to announce the presence of a network.
SuperFrame Structure
The superframe is contained in a Beacon Interval bounded by two beacon frames, and has an active period and an inactive period
SuperFrame Contd..
Active Period
• Active period consists of two periods– Contention Access Period (CAP)– Contention Free Period (CFP)
• Length of active period is determined by the SuperFrame Order
• Active Period Length = aBaseSuperframeDuration * symbols
2SO
Contention Access Period (CAP)
• In CAP all the nodes having a packet to transmit compete for the channel and follows Slotted CSMA/CA algorithm.
• A sufficient portion of the CAP remains for contention-based access of other networked devices or new devices wishing to join the network.
Contention Free Period (CFP)
• CFP is used to allocate slots for the nodes which require low latency i.e., PAN coordinator allocates guaranteed time slots (GTS) for such nodes.
• A node issues GTS allocation request to the PAN coordinator, which can allocate available GTS to nodes.
• In the CFP, the node requested for GTS can transmit during its GTS if it is allocated, without any contention with other devices.
• CFP can be disabled by disabling GTS.
Inactive period
• In the inactive period, the coordinator may enter a low-power mode and doesn’t interact with its PAN which helps in reduced energy consumption and so extends the network lifetime
• Inactive period can be remove by setting SuperFrame Order same as Beacon Order
SOBO
Packet• Packet is generated by the sensor whenever agent comes
with in its sensor range and for every sensing interval.• Each packet is characterized by 3 variables NB,CW,BE
– NB, Number of backoffs the node has underwent while attempting the current transmission, initialized to 0 before every new transmission
– CW, Contention Window Length, which defines the number of backoff periods that need to be clear of channel activity before starting transmission. CW is only used with the slotted CSMA/CA version. This value is initialized to 2 before each transmission attempt and reset to 2 each time the channel is assessed to be busy.
– BE, Backoff exponent is related to backoff periods (0 to 2BE -1) a device has to wait before attempting to assess the channel.
Clear Channel Assessment (CCA)• CCA is responsible for sensing channel as busy or idle. • The CCA is performed in three operational modes:
– Energy Detection mode: If the Channel energy is less than ED threshold then the channel is reported as Idle else channel is reported as busy.
– Carrier Sense mode: CCA reports a busy medium only if it detects a signal with the modulation and the spreading characteristics of IEEE 802.15.4 and which may be higher or lower than the ED threshold.
– Carrier Sense with Energy Detection mode: This is a combination of the fore mentioned techniques. CCA reports the medium is busy only if it detects a signal with the modulation and the spreading characteristics of IEEE 802.15.4 and with energy above the ED threshold.
CSMA/CA Algorithm
Description Unslotted CSMA/CA Slotted CSMA/CA Step1 NB(=0),CW(=1),BE are initialized. NB(=0),CW(=2),BE are initialized. Locate the backoff boundary and
attempt for transmission or channel assess at the start of the slot.
Step2 MAC layer shall delay for a random number of backoff periods in the range (0 to )
Same
Step3 MAC will request PHY to perform CCA. If the frame transmission and acknowledgment can be completed before the end of the current
CAP then MAC sub layer shall proceed else it shall wait until the start of the CAP in the next SuperFrame and repeat the evaluation.
Same
Step4 (Channel is busy)
MAC sub layer shall increment both NB and BE by one, ensuring that BE shall be no more than
aMaxBE and if NB is greater than maxMaxCSMABackoffs then the packet is
discarded else return to step 2.
Same and CW is reset to 2.
Step5 (Channel is Idle)
MAC sub layer starts transmission. If CW is zero then start transmission else return to step 3
Data Link Layer ParametersParameter Standard Name Standard Value
Beacon Order BO [0 to 15]
SuperFrame Order SO [0 to 15]
Base SuperFrame Duration aBaseSuperframeDuration 15.36 milliseconds
Min Backoff Exponent macMinBE 3
Max Backoff Exponent aMaxBE 5
Max Frame Retries aMaxframeRetries 3
Max CSMA Backoffs macMaxCSMABackoffs 4
PHY ParametersParameter Standard Value
Frequency Band 2.4 GHz
Chip Rate 2000 McPS
Symbol Rate 62.5 kSymbolsPS
Modulation Technique O-QPSK
Unit Backoff Time 20 Symbols
Turn Around Time 12 Symbols
Transmitter Power 100 mW
Sensor Range 100 m
Receiver Sensitivity -85 dbm
ED Threshold -95 dbm
References1. Specification-based Intrusion Detection for
Home Area Networks in Smart Grids Paria Jokar, Hasen Nicanfar, Victor C.M. Leung Department of
Electrical and Computer Engineering The University of British Columbia
2. ZigBee for Building Control Wireless Sensor Networks
Fabio L. Zucatto1,2, Clecio A. Biscassi2 Ferdinando Monsignore2, Francis Fidélix2, Samuel Coutinho2, and Mônica L. Rocha1
3. ZigBee Based Wireless Sensor Networks and Its Applications in Industrial
Shizhuang Lin1, Jingyu Liu2 and Yanjun Fang3 Department of Automation, Wuhan University