https://www.nsnam.org/mediawiki/api.php?action=feedcontributions&user=Vrege&feedformat=atomNsnam - User contributions [en]2024-03-29T06:44:47ZUser contributionsMediaWiki 1.24.1https://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9878GSOC2015LrWpanMac2016-02-13T04:32:14Z<p>Vrege: /* Schedule */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Test the basic implementation of ContikiMAC, along with the energy model. <br />
* Validation of the model.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
LrWpanMac/LrWpanNullMac:<br />
* Refactored 802.15.4 Mac<br />
<br />
Tests/examples:<br />
* lr-wpan-energy-model-test.cc<br />
* lr-wpan-contikimac-test.cc<br />
* lr-wpan-data.cc (Modified to include energy model)<br />
* lr-wpan-contikimac-example.cc<br />
<br />
Code review: https://codereview.appspot.com/260510043/<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9877GSOC2015LrWpanMac2016-02-12T17:35:56Z<p>Vrege: /* Schedule */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
LrWpanMac/LrWpanNullMac:<br />
* Refactored 802.15.4 Mac<br />
<br />
Tests/examples:<br />
* lr-wpan-energy-model-test.cc<br />
* lr-wpan-contikimac-test.cc<br />
* lr-wpan-data.cc (Modified to include energy model)<br />
* lr-wpan-contikimac-example.cc<br />
<br />
Code review: https://codereview.appspot.com/260510043/<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9745GSOC2015LrWpanMac2015-09-01T08:48:53Z<p>Vrege: /* Final Review */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
LrWpanMac/LrWpanNullMac:<br />
* Refactored 802.15.4 Mac<br />
<br />
Tests/examples:<br />
* lr-wpan-energy-model-test.cc<br />
* lr-wpan-contikimac-test.cc<br />
* lr-wpan-data.cc (Modified to include energy model)<br />
* lr-wpan-contikimac-example.cc<br />
<br />
Code review: https://codereview.appspot.com/260510043/<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9744GSOC2015LrWpanMac2015-09-01T08:47:35Z<p>Vrege: /* Final Review */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
LrWpanMac/LrWpanNullMac:<br />
* Refactored 802.15.4 Mac<br />
<br />
Tests/examples:<br />
* lr-wpan-energy-model-test.cc<br />
* lr-wpan-contikimac-test.cc<br />
* lr-wpan-data.cc<br />
* lr-wpan-contikimac-example.cc<br />
<br />
Code review: https://codereview.appspot.com/260510043/<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9740GSOC2015LrWpanMac2015-08-24T13:15:59Z<p>Vrege: /* Final Review */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
NullMac:<br />
* Refactored LrWpanMac<br />
<br />
Tests:<br />
* lr-wpan-energy-model-test.cc<br />
* lr-wpan-contikimac-test.cc<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9739GSOC2015LrWpanMac2015-08-24T13:15:32Z<p>Vrege: /* Final Review */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
NullMac:<br />
* Refactored LrWpanMac<br />
<br />
Tests:<br />
- lr-wpan-energy-model-test.cc<br />
- lr-wpan-contikimac-test.cc<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9738GSOC2015LrWpanMac2015-08-24T13:14:34Z<p>Vrege: /* Final Review */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
LrWpan Energy Model:<br />
* Three States Model (recv/idle, transmit, sleep) with state transitions<br />
* States corresponds to RX_ON/BUSY_RX, TX_ON/BUSY_TX and TRX_OFF states of radio transceivers<br />
* LrWpanPhyEnumeration values used to represent states with IEEE_802_15_4_PHY_UNSPECIFIED being used for the TRANSITION state<br />
* ON/OFF and TX/RX switching time taken into account<br />
<br />
ContikiMAC radio duty cycling protocol, including:<br />
* Periodic sleep/wake<br />
* Periodic and stable wake-up interval<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
* Transmission Phase-Lock<br />
<br />
NullMac:<br />
* Refactored LrWpanMac<br />
<br />
Tests:<br />
- lr-wpan-energy-model-test.cc<br />
- lr-wpan-contikimac-test.cc<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9737GSOC2015LrWpanMac2015-08-24T12:35:40Z<p>Vrege: </p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Code refactoring<br />
<br />
==Final Review==<br />
<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9720GSOC2015LrWpanMac2015-08-04T11:21:33Z<p>Vrege: /* Week 8 (July 13, 2015 - July 19, 2015) */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Performed code refactoring: Moved duplicate code in derived Mac classes to base class<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9719GSOC2015LrWpanMac2015-08-04T11:18:06Z<p>Vrege: /* Post-midterm */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* ContikiMAC phase-lock optimization<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
===Week 10 (July 27, 2015 - Aug 2, 2015)===<br />
* Completed and tested ContikiMAC phase-lock optimization<br />
* Performed code refactoring: Moved duplicate code in derived Mac classes to base class<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9711GSOC2015LrWpanMac2015-07-28T05:11:14Z<p>Vrege: /* Post-midterm */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* ContikiMAC phase-lock optimization<br />
* Max MAC queue size<br />
<br />
===Week 9 (July 20, 2015 - July 26, 2015)===<br />
* Resolved issues in ContikiMAC code<br />
* ContikiMAC feature additions<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9693GSOC2015LrWpanMac2015-07-20T14:02:13Z<p>Vrege: /* Post-midterm */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (July 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
===Week 8 (July 13, 2015 - July 19, 2015)===<br />
* Test for Energy model<br />
* ContikiMAC phase-lock optimization<br />
* Max MAC queue size<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9690GSOC2015LrWpanMac2015-07-14T17:51:39Z<p>Vrege: /* Post-midterm */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
===Week 7 (June 6, 2015 - July 12, 2015)===<br />
* Resolved issues in LR WPAN Energy Model code<br />
* ContikiMAC code cleanup and documentation<br />
* Prepared a code review for LR WPAN ContikiMAC: https://codereview.appspot.com/254120043<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9683GSOC2015LrWpanMac2015-07-07T05:08:18Z<p>Vrege: </p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
==Post-midterm==<br />
<br />
===Week 6 (June 29, 2015 - July 5, 2015)===<br />
* Development of code for the ContikiMAC phase-lock module<br />
* Code cleanup and documentation<br />
* Prepared a code review for LR WPAN Energy Model: https://codereview.appspot.com/249560043<br />
<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9670GSOC2015LrWpanMac2015-06-29T12:48:06Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>{{TOC}}<br />
<br />
Return to [[GSOC2015AcceptedProjects | GSoC 2015 Accepted Projects]] page.<br />
<br />
= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
===Week 5 (June 22, 2015 - June 28, 2015)===<br />
<br />
Implemented and tested ContikiMAC basic protocol, includes:<br />
* Periodic sleep/wake<br />
* Consecutive CCAs after wake-up to detect packet: Sleep if channel idle, Wait and receive packet if busy<br />
* Broadcast (Continuous transmission for length of sleep period)<br />
* Unicast (with and without ACK option)<br />
<br />
==Midterm Report==<br />
Work done until GSoC midterm review:<br />
<br />
* The LR-WPAN Energy model<br />
This model tracks state changes in the LR-WPAN PHY and updates the energy source accordingly. <br /> Note that the LrWpanRadioEnergyModel and the LrWpanPhy need to be linked using the AttachPhy() method provided in the LrWpanRadioEnergyModel class.<br />
: ''Energy model''<br />
- lr-wpan-radio-energy-model.h<br />
- lr-wpan-radio-energy-model.cc<br />
: Modified ''LrWpanPhy''; Implemented ''LrWpanPhyListener Class''<br />
- lr-wpan-phy.h<br />
- lr-wpan-phy.cc<br />
<br />
* Split the LrWpanMac class, defining two new classes: the base class and another extending the base class<br />
: ''LR-WPAN MAC base class''<br />
- lr-wpan-mac.h<br />
: ''802.15.4 MAC class''<br />
- lr-wpan-nullmac.h<br />
- lr-wpan-nullmac.cc<br />
<br />
* ''ContikiMAC model'', extending the LrWpanMac base class<br />
- lr-wpan-contikimac.h<br />
- lr-wpan-contikimac.cc<br />
<br />
* Modified ''LrWpanNetDevice'' to use the ContikiMAC model<br />
- lr-wpan-net-device.h<br />
- lr-wpan-net-device.cc<br />
<br />
* Tests<br />
The lr-wpan-phy-test (modified) and lr-wpan-data (modified) example scripts were used to test the working of the energy model. <br /> The lr-wpan-data (modified) example script is being used for testing the ContikiMAC implementation. <br /><br />
<br />
Code repository : http://code.nsnam.org/vrege/ns-3-gsoc/<br />
<br />
* Post-midterm plans:<br />
** ContikiMAC fast sleep and phase-lock optimizations<br />
** Realistic Mac queue size (currently the Mac allows infinite packets to be queued)<br />
** Test the energy model along with ContikiMAC<br />
** Modify LrWpanNetDevice to set desired MAC<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9633GSOC2015LrWpanMac2015-06-20T18:20:46Z<p>Vrege: /* Week 4 (June 15, 2015 - June 21, 2015) */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the standard 802.15.4 MAC implementation (beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9632GSOC2015LrWpanMac2015-06-20T18:19:41Z<p>Vrege: /* Week 4 (June 15, 2015 - June 21, 2015) */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes (extending the LrWpanMac base class): <br />
# LrWpanNullMac, for the 802.15.4 MAC implementation (incl. the beacon-enabled/nonbeacon-enabled modes of operation)<br />
# LrWpanContikiMac, for the ContikiMAC implementation<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9631GSOC2015LrWpanMac2015-06-20T18:14:59Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
===Week 4 (June 15, 2015 - June 21, 2015)===<br />
<br />
* Split the LrWpanMac class in two: separating the parts common to any 802.15.4 MAC and the parts specific to beacon-enabled/nonbeacon-enabled modes of operation.<br />
* Defined two new classes: LrWpanNullMac and LrWpanContikiMac, extending the LrWpanMac base class.<br />
* Implemented the ContikiMAC sleep schedule and wakeup procedure (successive CCAs followed by packet reception or sleep).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9619GSOC2015LrWpanMac2015-06-16T16:46:05Z<p>Vrege: /* References */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]<br />
* Impact of Switching Latency Times in Energy Consumption of IEEE 802.15.4 Radio Transceivers [http://www.anacom.pt/streaming/Impact_Switching_7congressURSI.pdf?contentId=1182494&field=ATTACHED_FILE]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9613GSOC2015LrWpanMac2015-06-15T09:30:13Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
===Week 3 (June 8, 2015 - June 14, 2015)===<br />
<br />
* Completed and tested Energy model.<br />
* Definition of base class for the common MAC functions (partially done).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9583GSOC2015LrWpanMac2015-06-08T14:55:47Z<p>Vrege: /* Week 1 (May 25, 2015 - May 31, 2015) */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
===Week 2 (June 1, 2015 - June 7, 2015)===<br />
<br />
* Modified the Energy model- added the "Transition" state.<br />
* Implemented precise state transition timings and energy depletion handler.<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9579GSOC2015LrWpanMac2015-06-04T18:47:36Z<p>Vrege: /* LrWpanRadioEnergyModel */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
<br />
Radio state machine:<br />
<br />
[[File:States.jpg|750px]]<br />
<br />
The node's energy consumption is modeled as a function of the three main states of the radio transceiver:<br />
* Transceiver disabled (TRX_OFF)<br />
* Transmitter enabled (TX_ON)<br />
* Receiver enabled (RX_ON)<br />
For most radios, there is no difference between *_ON and BUSY_* states with respect to the radio transceiver circuitry. Hence, the energy consumed in these states is approximately the same.<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the time spent in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* TRX_OFF (sleep): 426 uA<br />
* TX_ON (transmit): 17.4 mA @ 0 dBm<br />
* RX_ON (recv/idle): 18.8 mA<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. Hence, it is important to precisely characterize the transition time between transceiver states. In the Three States Model described, six different transitions are possible:<br />
* TRX_OFF -> TX_ON and TX_ON -> TRX_OFF<br />
* TRX_OFF -> RX_ON and RX_ON -> TRX_OFF<br />
* TX_ON -> RX_ON and RX_ON -> TX_ON<br />
The state transition energy is evaluated by multiplying the transition time by the power in the arrival state.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:States.jpg&diff=9578File:States.jpg2015-06-04T18:15:32Z<p>Vrege: Vrege uploaded a new version of File:States.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:States.jpg&diff=9577File:States.jpg2015-06-04T18:13:47Z<p>Vrege: Vrege uploaded a new version of File:States.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:States.jpg&diff=9576File:States.jpg2015-06-04T18:13:16Z<p>Vrege: Vrege uploaded a new version of File:States.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:States.jpg&diff=9575File:States.jpg2015-06-04T18:04:37Z<p>Vrege: </p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9558GSOC2015LrWpanMac2015-05-31T18:09:32Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
The LrWpan radio transceiver exists in one of the following four states: Rx, Tx, Idle, Sleep<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the amount of time the radio exists in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* Power Down mode (Sleep): 20 uA<br />
* Idle mode: 426 uA<br />
* Receive mode: 18.8 mA<br />
* Transmit mode: 17.4 mA @ 0 dBm<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. To characterize the transition energy and time between the transceiver states, the "Transition" state needs to be included. Also, the energy consumption during CCA needs to be accounted for separately.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9555GSOC2015LrWpanMac2015-05-31T06:43:23Z<p>Vrege: /* Week 1 */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
The LrWpan radio transceiver exists in one of the following four states: Rx, Tx, Idle, Sleep<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the amount of time the radio exists in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* Power Down mode (Sleep): 20 uA<br />
* Idle mode: 426 uA<br />
* Receive mode: 18.8 mA<br />
* Transmit mode: 17.4 mA @ 0 dBm<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. To characterize the transition energy and time between the transceiver states, the "Transition" state needs to be included. Also, the energy consumption during CCA needs to be accounted for separately.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1 (May 25, 2015 - May 31, 2015)===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
'''Plan for Week 2'''<br />
* Finalize the state machine and make necessary changes to the Phy and EnergyModel, including the energy depletion handler<br />
* Test and document<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9553GSOC2015LrWpanMac2015-05-30T17:31:26Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
The LrWpan radio transceiver exists in one of the following four states: Rx, Tx, Idle, Sleep<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the amount of time the radio exists in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* Power Down mode (Sleep): 20 uA<br />
* Idle mode: 426 uA<br />
* Receive mode: 18.8 mA<br />
* Transmit mode: 17.4 mA @ 0 dBm<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. To characterize the transition energy and time between the transceiver states, the "Transition" state needs to be included. Also, the energy consumption during CCA needs to be accounted for separately.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel (extends DeviceEnergyModel and LrWpanPhyListener)<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
'''Plan for Week 2'''<br />
* Finalize the state machine and make necessary changes to the Phy and EnergyModel, including the energy depletion handler<br />
* Test and document<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9552GSOC2015LrWpanMac2015-05-30T17:29:28Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
The LrWpan radio transceiver exists in one of the following four states: Rx, Tx, Idle, Sleep<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the amount of time the radio exists in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* Power Down mode (Sleep): 20 uA<br />
* Idle mode: 426 uA<br />
* Receive mode: 18.8 mA<br />
* Transmit mode: 17.4 mA @ 0 dBm<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. To characterize the transition energy and time between the transceiver states, the "Transition" state needs to be included. Also, the energy consumption during CCA needs to be accounted for separately.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
'''Plan for Week 2'''<br />
* Finalize the state machine and make necessary changes to the Phy and EnergyModel, including the energy depletion handler<br />
* Test and document<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9551GSOC2015LrWpanMac2015-05-30T17:28:43Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
The LrWpan radio transceiver exists in one of the following four states: Rx, Tx, Idle, Sleep<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the amount of time the radio exists in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* Power Down mode (Sleep): 20 uA<br />
* Idle mode: 426 uA<br />
* Receive mode: 18.8 mA<br />
* Transmit mode: 17.4 mA @ 0 dBm<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. To characterize the transition energy and time between the transceiver states, the "Transition" state needs to be included. Also, the energy consumption during CCA needs to be accounted for separately.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
Plan for Week 2<br />
* Finalize the state machine and make necessary changes to the Phy and EnergyModel, including the energy depletion handler<br />
* Test and document<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9550GSOC2015LrWpanMac2015-05-30T17:25:42Z<p>Vrege: </p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Energy Model ==<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel class (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
<br />
[[File:LrWpanMac.jpg]]<br />
<br />
<br />
== LrWpanRadioEnergyModel ==<br />
The LrWpan radio transceiver exists in one of the following four states: Rx, Tx, Idle, Sleep<br />
<br />
The amount of energy consumed by the radio depends on the current draw of the state and the amount of time the radio exists in that state. The current draw for various states can be found in the datasheets of radio transceivers. For example, for CC2420:<br />
* Power Down mode (Sleep): 20 uA<br />
* Idle mode: 426 uA<br />
* Receive mode: 18.8 mA<br />
* Transmit mode: 17.4 mA @ 0 dBm<br />
<br />
The EnergySource is updated periodically or after each transition, using the formula ''stateDuration'' * ''stateCurrent'' * ''supplyVoltage''<br />
<br />
'''Note:''' The transient energy when switching from one mode to another also impacts the total power consumption. To characterize the transition energy and time between the transceiver states, the "Transition" state needs to be included. Also, the energy consumption during CCA needs to be accounted for separately.<br />
<br />
== Weekly Progress ==<br />
<br />
===Week 1===<br />
<br />
* Implemented and tested LrWpanRadioEnergyModel with the four basic states.<br />
* Linked the LrWpanPhy with the LrWpanRadioEnergyModel and tested energy source update after each PHY transition.<br />
Classes added/modified:<br />
# LrWpanRadioEnergyModel<br />
# LrWpanPhyListener<br />
# LrWpanPhy<br />
<br />
Plan for Week 2<br />
* Finalize the state machine and make necessary changes to the Phy and EnergyModel<br />
* Test and document<br />
<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]<br />
* Energy efficiency of the IEEE 802.15.4 standard in dense wireless microsensor networks: modeling and improvement perspectives [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1395555]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpanMac.jpg&diff=9549File:LrWpanMac.jpg2015-05-30T17:21:32Z<p>Vrege: </p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9548File:LrWpan Energy Model.jpg2015-05-30T17:19:58Z<p>Vrege: Vrege uploaded a new version of File:LrWpan Energy Model.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9547File:LrWpan Energy Model.jpg2015-05-30T17:19:09Z<p>Vrege: Vrege uploaded a new version of File:LrWpan Energy Model.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9546File:LrWpan Energy Model.jpg2015-05-30T17:18:50Z<p>Vrege: Vrege uploaded a new version of File:LrWpan Energy Model.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9545File:LrWpan Energy Model.jpg2015-05-30T17:18:30Z<p>Vrege: Vrege uploaded a new version of File:LrWpan Energy Model.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9544File:LrWpan Energy Model.jpg2015-05-30T17:17:59Z<p>Vrege: Vrege uploaded a new version of File:LrWpan Energy Model.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9543File:LrWpan Energy Model.jpg2015-05-30T17:16:16Z<p>Vrege: Vrege uploaded a new version of File:LrWpan Energy Model.jpg</p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9542GSOC2015LrWpanMac2015-05-30T14:02:08Z<p>Vrege: /* Weekly Progress */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Weekly Progress ==<br />
===Week 1===<br />
[[File:LrWpan_Energy_Model.jpg]]<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object.<br />
* '''ChangeState''' function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, the LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using EnergyDepletionCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=File:LrWpan_Energy_Model.jpg&diff=9541File:LrWpan Energy Model.jpg2015-05-30T14:00:18Z<p>Vrege: </p>
<hr />
<div></div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9536GSOC2015LrWpanMac2015-05-29T11:05:37Z<p>Vrege: /* References */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Weekly Progress ==<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object.<br />
* '''ChangeState''' function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, the LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using EnergyDepletionCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [http://www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9535GSOC2015LrWpanMac2015-05-29T11:05:14Z<p>Vrege: /* References */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Weekly Progress ==<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object.<br />
* '''ChangeState''' function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, the LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using EnergyDepletionCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]<br />
* An Energy Framework for the Network Simulator 3 (ns-3) [www.ee.washington.edu/research/nsl/papers/SIMUTools-11.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9533GSOC2015LrWpanMac2015-05-28T04:49:12Z<p>Vrege: </p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
== Weekly Progress ==<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object.<br />
* '''ChangeState''' function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, the LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using EnergyDepletionCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9532GSOC2015LrWpanMac2015-05-28T04:47:33Z<p>Vrege: </p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object.<br />
* '''ChangeState''' function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, the LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using EnergyDepletionCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= Weekly Progress =<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015AcceptedProjects&diff=9503GSOC2015AcceptedProjects2015-05-12T06:38:08Z<p>Vrege: /* 802.15.4 realistic MAC and Energy Model */</p>
<hr />
<div>{{TOC}}<br />
<br />
== Accepted Projects ==<br />
<br />
This page links to more information on the projects accepted for ns-3's 2014 Google Summer of Code effort.<br />
<br />
=== MPTCP implementation ===<br />
* Student: Matthieu Coudron<br />
* Project page: [[GSOC2015MpTcpImplementation]]<br />
<br />
=== Carrier Aggregation support for the LTE module ===<br />
* Student: Danilo Abrignani<br />
* Project page: [[GSOC2015LTECA]]<br />
<br />
=== TCP layer refactoring with automated test on RFC-compliance and validation ===<br />
* Student: Natale Patriciello<br />
* Project page: [[GSOC2015TCPTest]]<br />
<br />
=== 802.15.4 realistic MAC and Energy Model ===<br />
* Student: Vishwesh Rege<br />
* Project page: [[GSOC2015LrWpanMac]]<br />
[[Category:GSoC]]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9497GSOC2015LrWpanMac2015-05-09T18:56:32Z<p>Vrege: /* LrWpan Radio Energy Model */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object.<br />
* '''ChangeState''' function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, the LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using EnergyDepletionCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9496GSOC2015LrWpanMac2015-05-09T18:49:48Z<p>Vrege: /* LrWpan Radio Energy Model */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main functions to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object<br />
* Function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using energyRechargedCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9495GSOC2015LrWpanMac2015-05-09T18:49:21Z<p>Vrege: /* LrWpan Radio Energy Model */</p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main interfaces to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object<br />
* Function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transition, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using energyRechargedCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]</div>Vregehttps://www.nsnam.org/mediawiki/index.php?title=GSOC2015LrWpanMac&diff=9494GSOC2015LrWpanMac2015-05-09T18:44:21Z<p>Vrege: </p>
<hr />
<div>= 802.15.4 realistic MAC and Energy Model =<br />
<br />
* '''Student:''' [mailto:vrege2012@gmail.com Vishwesh Rege]<br />
<br />
* '''Mentors:''' [mailto:tpecorella@mac.com Tommaso Pecorella] [mailto:tomh@tomh.org Tom Henderson]<br />
<br />
* '''Abstract:''' The IEEE 802.15.4 standard defines the physical and media access control layers for LR-WPANs (Low-Rate Wireless Personal Area Networks), and is one of the enabling technologies for Wireless Sensor Networks as well as the emerging Internet of Things applications. The ns-3 network simulator currently offers support for simulating LR-WPANs as specified by the IEEE standard 802.15.4 (2006). The current MAC implementation however, lacks sleep features. The radio is assumed to be always active, which is not true for nodes deployed in the field which usually employ some sort of sleep/wake mechanism in order to conserve energy. The goal of this project is therefore to develop a realistic MAC model and link it with the energy model in order to simulate realistic scenarios where a node’s energy can get depleted resulting in changes in the network topology. Most of WSN research is focused on developing energy efficient protocols at each level of the protocol stack and hence this project, along with allowing for more realistic simulations would also help researchers to test the energy efficiency of their protocols running on top of 802.15.4 nodes.<br />
* '''About me:''' I’m currently in the final year of B.E. (Electrical and Electronics) at BITS Pilani, India. My main research interest is in networked embedded systems, specifically WSNs and IoT.<br />
<br />
= Approach =<br />
<br />
== Deliverables ==<br />
<br />
* '''802.15.4 Energy Model:'''<br />
Development of LrWpan Radio Energy model that models the energy consumption of 802.15.4 nodes.<br />
<br />
* '''802.15.4 Phy layer support for duty cycling MAC protocols:'''<br />
Modifications to the LrWpanPhy model in order to support linking with the LrWpan Radio Energy model.<br />
<br />
* '''RDC layer for the 802.15.4 MAC:'''<br />
RDC layer for testing the newly developed Energy model - development of the ContikiMAC Radio Duty Cycling Protocol is planned.<br />
<br />
* '''Linking the RDC layer with the 802.15.4 Energy Model'''<br />
Integration of the 802.15.4 Energy Model and the new 802.15.4 MAC Model.<br />
<br />
Researchers can test their own protocols by developing their own models and linking with the developed 802.15.4 Energy Model.<br />
<br />
== Schedule ==<br />
* Week1<br />
* Define the various classes. Implement the energy model.<br />
<br />
* Week2-3<br />
* Modify the Phy model. Define and implement the PhyListener for the energy model. <br />
* Define the energy model test class for testing the energy model. Test and document.<br />
<br />
* Week4-5<br />
* New Mac layer implementation.<br />
<br />
* Week6-7<br />
* Thoroughly test the working of the newly developed MAC model and check the flow of outgoing and incoming packets. <br />
* Debug any issues that may arise. Document.<br />
<br />
* Week8-9<br />
* Start development of the ContikiMAC model. <br />
* Test the working of ContikiMAC. Document.<br />
<br />
* Week10-11<br />
* Integration of the energy module and the Mac module. Thoroughly test the basic implementation of ContikiMAC, along with the energy model. <br />
* Simulate, analyze, debug, document.<br />
<br />
* Week12 <br />
* Define scope for future work. Optimizations. Buffer period.<br />
<br />
= Energy Model =<br />
The energy model consists of 2 major components:<br />
* Energy source.<br />
* Device energy model.<br />
The Device energy model is used to represent the energy consumed by a specific device on a node (eg. a LrWpan radio device).<br />
The LrWpanRadioEnergyModel (derived from DeviceEnergyModel class) will model the energy consumption due to the LrWpan radio device.<br />
<br />
== LrWpan Radio Energy Model ==<br />
This class represents energy model for LrWpan radio devices with states:<br />
* Idle<br />
* TX<br />
* RX<br />
* Sleep<br />
<br />
These states correspond to the PHY Emumerations defined in the LrWpanPhy class of ns-3 as follows:<br />
* PHY_BUSY_RX : RX<br />
* PHY_BUSY_TX : TX<br />
* PHY_IDLE / PHY_RX_ON / PHY_TX_ON : Idle<br />
* PHY_TRX_OFF : Sleep<br />
<br />
The following are the main interfaces to be implemented:<br />
* '''SetEnergySource''' (This will be called by the LrWpanRadioEnergyModel helper class)<br />
* '''GetCurrent/SetCurrent''' functions to set current draw for different states (Sleep, Tx, Rx, etc.) and to represent the energy consumption behavior of a specific device. '''GetCurrent''' will be called by the EnergySource object<br />
* Function to change current state - Sleep, Tx, Rx, Idle - and update remaining energy stored in the EnergySource object installed on the node (based on last state update time) - this function will be called by the LrWpanRadioEnergyModelPhyListener.<br />
<br />
After each transaction, the LrWpanRadioEnergyModel notifies the EnergySource object. The EnergySource object will query this model for the total current. Then the EnergySource object uses the total current to calculate energy.<br />
The energy source will be updated using the formula ''duration'' * ''prevStateCurrent'' * ''supplyVoltage'', where ''duration'' is the amount of time the radio was in the previous state and ''supplyVoltage'' is the EnergySource's supply voltage. (EnergySource's UpdateEnergySource function will be called by LrWpanRadioEnergyModel)<br />
<br />
When energy is depleted, LrWpanRadioEnergyModel object installed on the node will be informed by the EnergySource, using energyRechargedCallback (defined in LrWpanRadioEnergyModel).<br />
<br />
= References =<br />
* Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (WPANs) [http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1700009]<br />
* The ContikiMAC Radio Duty Cycling Protocol [http://dunkels.com/adam/dunkels11contikimac.pdf]</div>Vrege