Q uantitative E valuation of E mbedded S ystems.

Post on 15-Jan-2016

216 views 1 download

Tags:

transcript

Quantitative Evaluation of Embedded Systems

Quantitative Evaluation of Embedded Systems

TDMA in a cyber physical system:preparation for the SDF3 assignment

Sharing Resources

No sharing – dedicated resources

Alternating access, round robin

Fixed priority

First-come first serve

?

Time Division Multiplexing (1)

Perio

d =

P Slice = S

Task = T

P-S TP/S

Time Division Multiplexing (2)

Perio

d =

P Slice = S

Task = T

P-S

q

qT = rS

S/q rr

P-(S/q)

0 NEW!!Publication under submission...

RTAS 2014

Comp.Inner control

Physical World

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyzComp.

Emergency detection

Comp.Image processing

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

A cyber physical system

Comp.1Inner control

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyzComp.2

Emergency detection

Comp.3Image processing

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

Dataflow of the control cycle

Comp.1Inner control

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyzComp.2

Emergency detection

Comp.3Image processing

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

Packet-flow of the control cycle

p2

p1

p3

p4

p5

p6

p7

p8

p9

p10 p11

p12

p13

p14

p15

p16

p17

p18

Comp.Inner control

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyz

Comp.Emergency detection

Comp.Image processing

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

Network topology

Comp.Inner control

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyz

Comp.Emergency detection

Comp.Image processing

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

Network topology

Comp.1Inner control

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyzComp.2

Emergency detection

Comp.3Image processing

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

Packet flow + Network hops

Sensor 1Temperature

Actor 1Valve

Actor 2Motor xyz

Sensor 2Pressure

Sensor 4Microphone

Actor 3Motor rot.

Sensor 3Camera

Packet flow + Network hops + Processor sharing

Actor 1Valve

Actor 2Motor xyz

Actor 3Motor rot.

Packet flow + Network hops + Processor sharing + Sampling times

Packets + Network + Processor + Sampling + Feedback

Latency 1

L2

L3

Time Division Multiplexing (2)

Perio

d =

P Slice = S

Task = T

P-S

q

qT = rS

S/q rr

P-(S/q)

0

Filling in the details: Network sharing

Perio

d =

P Slice = S

Task = T qT = rS

• One packet per slice in the network, therefore T = S = 0.01 ms • One slice per node in the network• But... each node schedules its routing

in a TDMA fashion as well...So for each hop P = (C+1)*N*S where C is the number of connections and N is the total number of nodes in the network.

Filling in the details: Proc. sharing

Perio

d =

P Slice = S

Task = T qT = rS

• Three computations = three slices, so P = S1 + S2 + S3• Task times may be bigger than slice times!• T1 = 0.5 ms• T2 = 3 ms• T3 = 7 ms• It is part of the assignment to figure

out how P should be chosen anddivided over S1,S2 and S3.

Filling in the details: The rates

• Sensor 1 and 2 produce 1 packet every 2 ms• Sensor 3 produces 50 packets every 100 ms• Sensor 4 produces 10 packets every 20 ms• Computation 1 needs 1 packet from sensor 1 and 2,

and produces 1 packet for computation 2 and one for actor 1• Computation 2 takes 50 packets from computation 1 and 1 packet from

computation 3 and produces 1 for actors 2 and 3 and for computation 3.• Computation 3 takes 50 packets from sensor 3, 50 from sensor 4 and

1 packet from compation 2 and produces 1 for computation 2.

The dataflow graph I prepared for you:

Sensor1

Sensor2

Sensor3

Sensor4

Actuator1

Actuator2

Actuator3

hop1 hop2

hop3hop4

hop5

hop6

hop7 hop8

hop9 hop10 hop11 hop12

hop13

hop14hop15

Comp1

Comp2

Comp3

1

1

50

10

50

50

50

2 ms

2 ms

100 ms

20 ms

2 2

22

2