Top Banner
Quantitative Evaluation of Embedded Systems Dataflow and Max-Plus Algebra
23

Q uantitative E valuation of E mbedded S ystems

Feb 14, 2016

Download

Documents

Saman

Q uantitative E valuation of E mbedded S ystems. Dataflow and Max-Plus Algebra. Exercise: Model a car manufacturing line. Consider a car manufacturing line consisting of. Four assembly robots: A,B,C and D A production unit that needs 20 minutes to produce a chassis - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Q uantitative  E valuation of  E mbedded  S ystems

Quantitative Evaluation of Embedded Systems

Dataflow and Max-Plus Algebra

Page 2: Q uantitative  E valuation of  E mbedded  S ystems

Consider a car manufacturing line consisting of...

Exercise:Model a car manufacturing line

• Four assembly robots: A,B,C and D• A production unit that needs 20 minutes to produce a chassis• A production unit that needs 10 minutes to produce a steering installation• A production unit that needs 10 minutes to produce a breaking system• A production unit that needs 20 minutes to produce a body• Three painting units that each need 30 minutes to paint a body• A production unit that needs 15 minutes to produce a radio• Robot A compiles the chassis and the steering installation in 4 min. and sends it to B• Robot B adds the breaking system in 3 min. and sends it to C• Robot C adds a painted body in 5 min. and sends it to D• Robot D adds a radio in 1 min. and sends the car out of the factory• For safety reasons, there can be at most 3 ‘cars’ between A and C, and only 2 between B and D• Every robot can only deal with one of each of the assembled components at a time

Page 3: Q uantitative  E valuation of  E mbedded  S ystems

Exercise: calculate the first 3 firings of each actor

A B C D

10min

20min 10min 20min

30min20min

5min3min4min

15min

1min

Disclaimer: no actual car assembly line was studied in order to make this model.

Answer: Model a car manufacturing line

Page 4: Q uantitative  E valuation of  E mbedded  S ystems

The algebraic approach:Measuring traffic

10min

20min 10min 20min

30min20min

5min3min4min

15min

1min

Page 5: Q uantitative  E valuation of  E mbedded  S ystems

Counters v.s. Loggers

Time (s)

Toke

nsTi

me

(s)

Tokens

Tim

e (s

)

Tokens

Counting tokensLogging events

Page 6: Q uantitative  E valuation of  E mbedded  S ystems

Logging traffic

A B

C10ms 15ms

25ms

u x1

x2

y

x5

x3

x4

Page 7: Q uantitative  E valuation of  E mbedded  S ystems

Logging traffic

A B

C10ms 15ms

25ms

u x1

x2

y

x5

x3

x4

0 0ny

0 0nx0 2nx0 0nx0 1nx0 0nx

5

4

3

2

1

15 nx ,nxmax ny

15 nx ,nxmax nx 25 nx ,nxmax 2nx

10 nx ,numax nx 15 nx ,nxmax 1nx

10 nx ,numax nx

21

215

534

43

212

41

Page 8: Q uantitative  E valuation of  E mbedded  S ystems

Logging traffic

A B

C10ms 15ms

25ms

u

x2

y

x4x’4

0 nx

0 nx0 1nx

4

2

11

4

25u(n)15,nx 25,nxmax ny

50u(n)40,nx 50,nxmax nx nx 1nx

25u(n)15,nx 25,nxmax 1nx

24

244

44

242

Page 9: Q uantitative  E valuation of  E mbedded  S ystems

Detour: Linear Algebra

)x(a)x(a)x(a)x(ax)x(a)x(a)x(a)x(ax)x(a)x(a)x(a)x(ax)x(a)x(a)x(a)x(ax

44,434,324,214,14

43,433,323,213,13

42,432,322,212,12

41,431,321,211,11

Page 10: Q uantitative  E valuation of  E mbedded  S ystems

Detour: Linear algebra

4

3

2

1

4,44,34,24,1

3,43,33,23,1

2,42,32,22,1

1,41,31,21,1

4

3

2

1

xxxx

aaaaaaaaaaaaaaaa

xxxx

Page 11: Q uantitative  E valuation of  E mbedded  S ystems

Detour: Linear systems theory

(n))x(a(n))x(a(n))x(a(n))x(a1)(nx(n))x(a(n))x(a(n))x(a(n))x(a1)(nx(n))x(a(n))x(a(n))x(a(n))x(a1)(nx(n))x(a(n))x(a(n))x(a(n))x(a1)(nx

44,434,324,214,14

43,433,323,213,13

42,432,322,212,12

41,431,321,211,11

Page 12: Q uantitative  E valuation of  E mbedded  S ystems

Detour: Linear systems theory

(n)

xxxx

aaaaaaaaaaaaaaaa

1)(n

xxxx

4

3

2

1

4,44,34,24,1

3,43,33,23,1

2,42,32,22,1

1,41,31,21,1

4

3

2

1

Page 13: Q uantitative  E valuation of  E mbedded  S ystems

Detour: (max,+) algebra

(n))x(n))max(ax(n))max(ax(n))max(ax(a1)(nx(n))x(n))max(ax(n))max(ax(n))max(ax(a1)(nx(n))x(n))max(ax(n))max(ax(n))max(ax(a1)(nx(n))x(n))max(ax(n))max(ax(n))max(ax(a1)(nx

44,434,324,214,14

43,433,323,213,13

42,432,322,212,12

41,431,321,211,11

Page 14: Q uantitative  E valuation of  E mbedded  S ystems

Detour: (max,+) systems theory

(n)

xxxx

aaaaaaaaaaaaaaaa

1)(n

xxxx

4

3

2

1

4,44,34,24,1

3,43,33,23,1

2,42,32,22,1

1,41,31,21,1

4

3

2

1

Page 15: Q uantitative  E valuation of  E mbedded  S ystems

Question: calculate this product!

4105

5226243625351201

?x

Page 16: Q uantitative  E valuation of  E mbedded  S ystems

Question: what is now a unit matrix?

xx?

Page 17: Q uantitative  E valuation of  E mbedded  S ystems

Detour: Linear Systems Theory

u(n)dmax(n)xccccy(n)

u(n)

bbbb

maxnx

aaaaaaaaaaaaaaaa

1nx

4321

4

3

2

1

4,44,34,24,1

3,43,33,23,1

2,42,32,22,1

1,41,31,21,1

Page 18: Q uantitative  E valuation of  E mbedded  S ystems

Detour: (max,+) systems theory

u(n)Dmax(n)xCy(n)u(n)Bmax(n)xA1)(nx

Page 19: Q uantitative  E valuation of  E mbedded  S ystems

Matrix equations

A B

C10ms 15ms

25ms

u

x2

y

x4x’4

25u(n)15,nx 25,nxmax ny

50u(n)40,nx 50,nxmax nx nx 1nx

25u(n)15,nx 25,nxmax 1nx

24

244

44

242

Page 20: Q uantitative  E valuation of  E mbedded  S ystems

Matrix equations

A B

C10ms 15ms

25ms

u

x2

y

x4x’4

u(n)25max(n)x'xx

2515y(n)

u(n)50

25max(n)

x'xx

50400

25151)(n

x'xx

4

4

2

4

4

2

4

4

2

Page 21: Q uantitative  E valuation of  E mbedded  S ystems

Matrix equations

A B

C10ms 15ms

25ms

u

x2

y

x4x’4

u(n)25max(n)x'xx

2515y(n)

u(n)50

25max(n)

x'xx

50400

25151)(n

x'xx

4

4

2

4

4

2

4

4

2

The entries in a (max,+) algebra matrixrepresent the longest* token-free pathsfrom one initial token to another.

* Where ‘longest’ is means ‘greatest total execution time’.

Page 22: Q uantitative  E valuation of  E mbedded  S ystems

E

DC

BA

F

Exercise: Determine the matrix equations

u

y

5 ms

15 ms

7 ms

0 ms 1 ms

2 ms

Page 23: Q uantitative  E valuation of  E mbedded  S ystems

E

DC

BA

F

2

3

u

y

5 ms

0 ms

7 ms

15 ms 2 ms

1 ms