System-level Modeling for Wireless Sensor Networks Jan Madsen - - PowerPoint PPT Presentation

system level modeling for wireless sensor networks
SMART_READER_LITE
LIVE PREVIEW

System-level Modeling for Wireless Sensor Networks Jan Madsen - - PowerPoint PPT Presentation

System-level Modeling for Wireless Sensor Networks Jan Madsen Kashif Virk, Knud Hansen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 321 DK2800 Lyngby, Denmark jan@imm.dtu.dk


slide-1
SLIDE 1

jan@imm.dtu.dk

Jan Madsen Kashif Virk, Knud Hansen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 321 DK2800 Lyngby, Denmark

System-level Modeling for Wireless Sensor Networks

Funded by Hogthrob (STVF 2059-03-0027 )

slide-2
SLIDE 2

MPSoC 2004 2

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

slide-3
SLIDE 3

MPSoC 2004 3

sending receiving idle

Sensor networks

C S P C S P C S P C S P C S P C S P

slide-4
SLIDE 4

MPSoC 2004 4

receiving sending idle

Sensor networks

C S P C S P C S P C S P C S P C S P

slide-5
SLIDE 5

MPSoC 2004 5

Sensor node

rtos

battery

cpu

radio sensor

sensing processing communicating

C S P

slide-6
SLIDE 6

MPSoC 2004 6

Sensor node

Ultra low energy Low flexibility Ultra low cost (1€) Small size (1..10 Mtr) Low clock frequency CPU/DSP and RF dominated Limited memory Hardware/software codesign rtos

battery

cpu

radio sensor

slide-7
SLIDE 7

MPSoC 2004 7

Sensor node design

rtos cpu

radio sensor battery

sensing processing communicating

rtos cpu asic

sensor sensor radio

slide-8
SLIDE 8

MPSoC 2004 8

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

slide-9
SLIDE 9

MPSoC 2004 9

System model

rtos a

slide-10
SLIDE 10

MPSoC 2004 10

System model

rtos

slide-11
SLIDE 11

MPSoC 2004 11

System model

rtos

slide-12
SLIDE 12

MPSoC 2004 12

System model

Task messages:

ready finished

RTOS commands:

run preemept Resume

rtos

slide-13
SLIDE 13

MPSoC 2004 13

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);

rtos

identifier period priority

  • ffset

WCET

slide-14
SLIDE 14

MPSoC 2004 14

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

slide-15
SLIDE 15

MPSoC 2004 15

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! d1 s1 s1 = time at which task starts its execution T1 T1 = period, minimum time between task releases 1

  • 1 = offset (or phase) for first release
  • 1
slide-16
SLIDE 16

MPSoC 2004 16

Task model

slide-17
SLIDE 17

MPSoC 2004 17

Sensor network model

slide-18
SLIDE 18

MPSoC 2004 18

Sensor node model

slide-19
SLIDE 19

MPSoC 2004 19

Energy modeling

slide-20
SLIDE 20

MPSoC 2004 20

Communication example

τ1 sτ2 τ4 rτ3 Send node Receive node synch. allocator scheduler synch. allocator scheduler

Wireless Network

τ5

slide-21
SLIDE 21

MPSoC 2004 21

Modeling radio communication

bo bo cs cs

Modeling the CSMA protocol

send idle idle

cs

carrier sense

Txp Txp Txp

preamble

Txd Txd Txd Txd Txd

data

CPU Transeiver Protocol

Sender:

radio request reading radio data ready transmission preparation tramitting bit

slide-22
SLIDE 22

MPSoC 2004 22

CSMA Protocol for sending

idle back

  • ff

carrier sense Tx pre- amble Tx data

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

slide-23
SLIDE 23

MPSoC 2004 23

Modeling radio communication

cs bo bo cs cs Txp Txp Txp Txd Txd Txd Txd Txd

carrier sense preamble data

CPU Transiver Protocol

Sender:

poll idle poll idle poll syn syn Rxd Rxd Rxd Rxd Rxd

poll channel synchronize data

CPU Transiver Protocol

Receiver:

slide-24
SLIDE 24

MPSoC 2004 24

Sensor network example

slide-25
SLIDE 25

MPSoC 2004 25 0us 100us 200us 300us 400us 500us 600us 700us 800us 900us Node1_Processing_Task Node1_Receive_Protocol Node1_Receive_Task Node1_Send_Protocol Node1_Send_Task Node2_Receive_Protocol Node2_Receive_Task Node3_Receive_Protocol Node3_Receive_Task 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 0 2 1 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 1 1 1 1 2 3 1 1 1 1 1 1 4 4 4 4 4 1 1 1 1 1 2 3 1 1 1 1 1 1 4 4 4 4 4

Example 1: Simple broadcast

Application task

0 = idle 1 = ready 2 = running 3 = preempted 4 = self-preempted

Sending task

0 = idle 1 = carrier sensing 2 = back-off 3 = transmit preamble 4 = transmit data

Receiving task

0 = idle 1 = polling 2 = synchronize 3 = receive data

slide-26
SLIDE 26

MPSoC 2004 26

Example 2: Radio interference

0us 100us 200us 300us 400us 500us 600us 700us 800us 900us Node1_Receive_Protocol Node1_Receive_Task Node1_Send_Protocol Node1_Send_Task Node2_Receive_Protocol Node2_Receive_Task Node2_Send_Protocol Node2_Send_Task Node3_Receive_Protocol Node3_Receive_Task Node4_Receive_Protocol Node4_Receive_Task Node5_Receive_Protocol Node5_Receive_Task 1 1 1 1 1 2 3 4 4 4 4 4 4 4 4 0 2 1 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 2 1 2 1 2 1 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 1 1 1 1 1 2 3 1 1 1 1 1 2 3 4 4 4 4 4 4 4 4 4 4 0 1 1 1 1 1 2 3 1 1 1 1 1 2 3 4 4 4 4 4 4 4 4 4 4 0 1 1 1 1 1 1 1 1 1 1 1 2 3 4 4 4 4 4 4 0

Application task

0 = idle 1 = ready 2 = running 3 = preempted 4 = self-preempted

Receiving task

0 = idle 1 = polling 2 = synchronize 3 = receive data

Sending task

0 = idle 1 = carrier sensing 2 = back-off 3 = transmit preamble 4 = transmit data

slide-27
SLIDE 27

MPSoC 2004 27

Example 3: Network routing

slide-28
SLIDE 28

MPSoC 2004 28

Sending task

0 = idle 1 = carrier sensing 2 = back-off 3 = transmit preamble 4 = transmit data

Example 3: Routing

Application task

0 = idle 1 = ready 2 = running 3 = preempted 4 = self-preempted

Receiving task

0 = idle 1 = polling 2 = synchronize 3 = receive data

slide-29
SLIDE 29

MPSoC 2004 29

Sending task

0 = idle 1 = carrier sensing 2 = back-off 3 = transmit preamble 4 = transmit data

Example 3: Battery shortage

Application task

0 = idle 1 = ready 2 = running 3 = preempted 4 = self-preempted

Receiving task

0 = idle 1 = polling 2 = synchronize 3 = receive data Node 2 runs out of battery

slide-30
SLIDE 30

MPSoC 2004 30

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

slide-31
SLIDE 31

MPSoC 2004 31

Hogthrob