courseware system-level modeling for wireless sensor networks jan madsen informatics and...
TRANSCRIPT
![Page 1: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/1.jpg)
courseware
System-level Modeling for Wireless Sensor Networks
Jan Madsen
Informatics and Mathematical ModellingTechnical University of Denmark
Richard Petersens Plads, Building 321DK2800 Lyngby, Denmark
![Page 2: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/2.jpg)
Jan Madsen 2SoC-MOBINET courseware
Sensor networks?
The Hogthrob project Developing a sensor network
infrastructure for sow monitoring Functionalities
Tracking Detecting heat period …
Low Cost (~1 €) Low Energy (2 years lifetime) Consortium:
DTU, DIKU, KVL National Committee for Pig Production IO Technologies
www.hogthrob.dk
The real HOGTHROB
![Page 3: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/3.jpg)
Jan Madsen 3SoC-MOBINET courseware
sending
receiving
idle
Sensor networks
CS P
CS P
CS P
CS P
CS P
CS P
![Page 4: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/4.jpg)
Jan Madsen 4SoC-MOBINET courseware
receiving
sending
idle
Sensor networks
CS P
CS P
CS P
CS P
CS P
CS P
![Page 5: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/5.jpg)
Jan Madsen 5SoC-MOBINET courseware
Sensor node
rtos
battery
cpu radiosensor
sensingprocessing
communicating
CS P
![Page 6: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/6.jpg)
Jan Madsen 6SoC-MOBINET courseware
Sensor node
Ultra low energy Low flexibility Ultra low cost (1$) Small size (1..10 Mtr) Low clock frequency DSP and RF dominated Limited memory Hardware/software codesign
rtos
battery
cpu radiosensor
![Page 7: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/7.jpg)
Jan Madsen 7SoC-MOBINET courseware
Sensor node design
rtos
cpu radiosensor
battery
sensing processing communicating
rtos
cpuasic
sensor
sensor
radio
![Page 8: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/8.jpg)
Jan Madsen 8SoC-MOBINET courseware
Sensor network model
![Page 9: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/9.jpg)
Jan Madsen 9SoC-MOBINET courseware
Sensor node: Uni-processor ...
rtos
a
Framework to experiment with different RTOS strategies
Focus on analysis of timing, energy and resource sharing
Abstract software model, i.e. no behavior/functionality
Easy to create tasks and implement RTOS models
Based on SystemC
![Page 10: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/10.jpg)
Jan Madsen 10SoC-MOBINET courseware
System model
rtos
a
![Page 11: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/11.jpg)
Jan Madsen 11SoC-MOBINET courseware
System model
rtos
![Page 12: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/12.jpg)
Jan Madsen 12SoC-MOBINET courseware
System model
rtos
![Page 13: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/13.jpg)
Jan Madsen 13SoC-MOBINET courseware
System model
Task messages: ready finished
RTOS commands: run preemept Resume
rtos
![Page 14: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/14.jpg)
Jan Madsen 14SoC-MOBINET courseware
System model - SystemC
pa = new task("task_a",1,50,3,12,0,ready);
registerTask(pa); pb = new
task("task_b",2,40,2,10,0,ready); registerTask(pb);
pc = new task("task_c",3,30,1,10,0,ready);
registerTask(pc);
rtosidentifier
period
priority
offsetWCET
![Page 15: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/15.jpg)
Jan Madsen 15SoC-MOBINET courseware
Link model
Aim: Adding tasks without having to create seperate communication links
Uses the SystemC master-slave library
If two tasks send a message at the same time – they are executed in sequence, but in undefined order
Global ”clock” is used to keep track of time
rtos
clock
![Page 16: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/16.jpg)
Jan Madsen 16SoC-MOBINET courseware
Task model
r1
r1 = time at which task becomes released (or active)
e1
e1 = worst case execution time (WCET)
d1 = deadline, task should complete before this!
d1s1
s1 = time at which task starts its execution
T1
T1 = period, minimum time between task releases
1
o1 = offset (or phase) for first released
o1
![Page 17: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/17.jpg)
Jan Madsen 17SoC-MOBINET courseware
Task model
![Page 18: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/18.jpg)
Jan Madsen 18SoC-MOBINET courseware
Sensor node model
![Page 19: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/19.jpg)
Jan Madsen 19SoC-MOBINET courseware
Energy modeling
![Page 20: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/20.jpg)
Jan Madsen 20SoC-MOBINET courseware
Communication example
s
r
Send node
Receive node
synch.
allocator
scheduler
synch.
allocator
scheduler
WirelessNetwork
![Page 21: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/21.jpg)
Jan Madsen 21SoC-MOBINET courseware
Modeling radio communication
cs bo bo cs cs Txp TxpTxp Txd TxdTxdTxdTxd
send idle
Modeling the CSMA protocol
idle
carrier sense preamble data
CPU
Transiver
Protocol
Sender:
![Page 22: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/22.jpg)
Jan Madsen 22SoC-MOBINET courseware
CSMA Protocol for sending
idlebackoff
carriersense
Tx pre-amble
Txdata
send
!send
bo_counter>0
bo_counter==0
!channel clear
channel clear &cs_counter==0
cs_counter>0
pr_counter>0
pr_counter==0
data_counter>0
data_counter==0
![Page 23: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/23.jpg)
Jan Madsen 23SoC-MOBINET courseware
Modeling radio communication
cs bo bo cs cs Txp TxpTxp Txd TxdTxdTxdTxd
carrier sense preamble data
CPU
Transiver
Protocol
Sender:
poll idle poll idle poll syn syn RxdRxdRxdRxdRxd
poll channel synchronize data
CPU
Transiver
Protocol
Receiver:
![Page 24: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/24.jpg)
Jan Madsen 24SoC-MOBINET courseware
Sensor network example
![Page 25: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/25.jpg)
Jan Madsen 25SoC-MOBINET courseware
Example 1: Simple broadcast
Application task0 = idle1 = ready2 = running3 = preempted4 = self-preempted
Sending task0 = idle1 = back-Off2 = carrier sensing3 = transmit preamble4 = transmit data
Receiving task0 = idle1 = polling2 = synchronize3 = receive data
![Page 26: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/26.jpg)
Jan Madsen 26SoC-MOBINET courseware
Example 2: Radio interference
Application task0 = idle1 = ready2 = running3 = preempted4 = self-preempted
Sending task0 = idle1 = back-Off2 = carrier sensing3 = transmit preamble4 = transmit data
Receiving task0 = idle1 = polling2 = synchronize3 = receive data
![Page 27: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/27.jpg)
Jan Madsen 27SoC-MOBINET courseware
Example 3: Network routing
![Page 28: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/28.jpg)
Jan Madsen 28SoC-MOBINET courseware
Example 3: Routing
Application task0 = idle1 = ready2 = running3 = preempted4 = self-preempted
Sending task0 = idle1 = back-Off2 = carrier sensing3 = transmit preamble4 = transmit data
Receiving task0 = idle1 = polling2 = synchronize3 = receive data
![Page 29: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/29.jpg)
Jan Madsen 29SoC-MOBINET courseware
Example 3: Battery shortage
Application task0 = idle1 = ready2 = running3 = preempted4 = self-preempted
Sending task0 = idle1 = back-Off2 = carrier sensing3 = transmit preamble4 = transmit data
Receiving task0 = idle1 = polling2 = synchronize3 = receive data
Node 2 runs out of battery
![Page 30: Courseware System-level Modeling for Wireless Sensor Networks Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard](https://reader035.vdocuments.net/reader035/viewer/2022062409/56649c785503460f9492d4ee/html5/thumbnails/30.jpg)
Jan Madsen 30SoC-MOBINET courseware
Summary
SystemC based framework to study the dynamic behavior of a sensor network
Exploring global effects of sensor node design Example sensor network based on Mica-nodes
and TinyOS from UC Berkeley Work in progress
Power/energy models for power management Mobile sensor nodes Detailed component models
To be used in the Hogthrob project