beyond the weakly hard model: measuring the performance ...beyond the weakly hard model: measuring...

23
Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia , Luigi Pannocchi, Alessandro Biondi, Marco Di Natale Scuola Superiore Santโ€™Anna, Pisa [email protected] Barcelona, ECRTS, July 6th, 2018

Upload: others

Post on 24-Mar-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

Beyond the Weakly Hard Model: Measuring the Performance Cost

of Deadline Misses

Authors: Paolo Pazzaglia, Luigi Pannocchi, Alessandro Biondi, Marco Di Natale

Scuola Superiore Santโ€™Anna, Pisa

[email protected]

Barcelona, ECRTS, July 6th, 2018

Page 2: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

Introduction

2

P. Pazzaglia

โ€ข Embedded systems with control tasks may face overloadconditions (e.g. automotive)

โ€ข Common (practical) approach: running at a high rate and allowing some deadline miss is an acceptable compromise

How to study performance evolution under overload conditions?

โ€ข Weakly Hard real-time systems: allowing a limited number of deadline misses

โ€“ (m,k): at most m deadlines are missed every k activations

โ€ข (m,k) constraints can be extracted with TWCA

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 3: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

3

โ€ข (m,k) constraint is not enough descriptiveโ€ฆ

โ€ข (m,k) constraint leads to a binary model (either pass or fail)

โ€“ Easy to define stability guarantees

โ€“ No information about performance of different patterns

โ€“ Difficult to extract an ordering between constraints

โ€ข No relation with the system state:

โ€“ Deadline misses may have different effects (transients vs steady state)

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Weakly hard model limitations

Page 4: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

Weakly hard model limitations

4

P. Pazzaglia

Assumption: When a deadline is missed, the control output is not updated

๐‘‡ = 50 ๐‘š๐‘ ; ๐ท = 0.7 โˆ— ๐‘‡

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Changing the pattern of H/M deadlines may lead to differentperformance values!

Page 5: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

5

โ€ข Goal: Developing a new model for studying:

โ€“ How the performance change with different patterns of missed deadlines that satisfy a given (m,k) constraint

โ€“ Worst guaranteed performance

โ€“ Different policy at deadline miss (continue or kill?)

โ€ข Merging real-time analysis with control system dynamics and performance analysis

P. Pazzaglia

A new model for performance analysis

H/M pattern Control updates

Performance

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 6: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

6

โ€ข Linear Time Invariant plant, MIMO

โ€ข Periodic control of period ๐‘‡๐‘– and deadline ๐ท๐‘– โ‰ค ๐‘‡๐‘–โ€ข State-feedback control: ๐‘ข ๐‘˜ = ๐พ ๐‘Ÿ ๐‘˜ โˆ’ ๐‘ฅ ๐‘˜

State update function: x k + 1 = Adx k + Bd1๐‘ข ๐‘˜ โˆ’ 1 + ๐ต๐‘‘2๐‘ข[๐‘˜]

โ€ข Similar to LET model: trading jitter for latency

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

System model

kT(k+1)TkT+D

๐’– ๐’Œ โˆ’ ๐Ÿ ๐’–[๐’Œ] Active control command

actuationactuation

Control task

Actuator

Read sensor

Page 7: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

โ€ข Missing a deadline means missing an actuator command update

โ€ข Chosen strategy: keep the previous actuation value

โ€ข Problem: The actuator uses a control output that is not related with the current state

โ€“ Control output is no more ยซfreshยป

โ€ข The system dynamics changes!7

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Missing a deadline

kT (k+1)TkT+D

XControl task

๐’– ๐’Œ โˆ’ ๐Ÿ ๐’– ๐’Œ

Page 8: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

โ€ข Update freshness ๐›ฅ of the control output

โ€“ โˆ† = 0 if job completes before the deadline

โ€“ Otherwise, โˆ† equals to the ยซageing stepsยป of the control output

x k + 1 = Adx k + ๐ต๐‘‘1๐‘ข ๐‘˜ โˆ’ 1 + ๐ต๐‘‘2๐‘ข[๐‘˜]

๐‘ข ๐‘˜ โˆ’ 1 = โˆ’๐พ๐‘‘๐‘ฅ[๐‘˜ โˆ’ 1 โˆ’ โˆ†๐‘]

๐‘ข ๐‘˜ = โˆ’๐พ๐‘‘๐‘ฅ[๐‘˜ โˆ’ โˆ†๐‘]

โ€ข Freshness is independent of control law and controlled system!

โ€ข Different effects changing deadline miss handling8

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Update freshness: definition

kT(k+1)TkT+D

๐’– ๐’Œ โˆ’ ๐Ÿ ๐’–[๐’Œ]

Control task

Page 9: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

9

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Update freshness: Continue strategy

0,0 0,1

1,11,0

H

H

H

H

M

M

M

M

โˆ— ๐ต๐ถ๐‘…๐‘‡ โ‰ค ๐ท๐‘–

โˆ— ๐‘Š๐ถ๐‘…๐‘‡ < ๐‘‡๐‘– + ๐ท๐‘–

kT (k+1)TkT+D

ฮ”๐‘, ฮ”๐‘

See Algorithm 1 in the paper for more details

โˆ’๐‘ฒ๐’…x ๐’Œ โˆ’ ๐Ÿ โˆ’ ๐œŸ๐’‘ โˆ’๐‘ฒ๐’…x ๐’Œ โˆ’ ๐œŸ๐’„

Page 10: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

10

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Update freshness: Kill strategy

ฮ”๐‘, ฮ”๐‘

kT (k+1)TkT+D

โˆ’๐‘ฒ๐’…x ๐’Œ โˆ’ ๐Ÿ โˆ’ ๐œŸ๐’‘ โˆ’๐‘ฒ๐’…x ๐’Œ โˆ’ ๐œŸ๐’„

X

0,0 0,1 1,2

1,0

M M M

M HHH

H

2,0

M

H

2,3

3,0

M

H

In this example, maximum number of consecutive deadline misses is equal to 3

โˆ— ๐ต๐ถ๐‘…๐‘‡ โ‰ค ๐ท๐‘–

Page 11: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

11

โ€ข System dynamics as a function of freshness pairs

๐‘ฅ ๐‘˜ + 1 = ๐ด๐‘‘๐‘ฅ ๐‘˜ โˆ’ ๐ต๐‘‘1๐พ๐‘‘๐‘ฅ ๐‘˜ โˆ’ 1 โˆ’ ๐›ฅ๐‘ โˆ’ ๐ต๐‘‘2๐พ๐‘‘๐‘ฅ ๐‘˜ โˆ’ ๐›ฅ๐‘

โ€ข Augmented state vector ฮพ[๐‘˜]

ฮพ[๐‘˜] = [๐‘ฅ ๐‘˜ ; ๐‘ฅ ๐‘˜ โˆ’ 1 ;โ€ฆ . ๐‘ฅ ๐‘˜ โˆ’ โˆ†๐‘š๐‘Ž๐‘ฅ โˆ’ 1 ]

โ€ข We can write the system dynamics as: ฮพ ๐‘˜ + 1 = ะค(๐›ฅ๐‘, ๐›ฅ๐‘ ) ฮพ[๐‘˜]

โ€ข State update matrix ะค(๐›ฅ๐‘, ๐›ฅ๐‘ )

ะค(๐›ฅ๐‘, ๐›ฅ๐‘ ) =

๐ด๐‘‘ โ‹ฏ โˆ’๐ต๐‘‘2๐พ๐‘‘ โ‹ฏ โˆ’ ๐ต๐‘‘1๐พ๐‘‘ โ‹ฏ๐ผ๐‘› 0๐‘› โ‹ฏ โ‹ฏ โ‹ฏ0๐‘› ๐ผ๐‘› 0๐‘› โ‹ฏ โ‹ฏโ‹ฎ โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฏ โ‹ฏ

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

State update matrix

Page 12: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

Example:

โ€ข Every combination of (๐›ฅ๐‘, ๐›ฅ๐‘) is mapped to a specific dynamic of

the system through the matrix ะค(๐›ฅ๐‘, ๐›ฅ๐‘)

12

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

State update matrix: an example

0,0 0,1

1,11,0

H

H

H

H

M

M

M

M

Page 13: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

13

ฮพ ๐‘˜ + 1 = ะค(๐›ฅ๐‘, ๐›ฅ๐‘ ) ฮพ[๐‘˜]

โ€ข Every ะค(๐›ฅ๐‘, ๐›ฅ๐‘ ) represents an operating mode of the system

โ€“ Different dynamics

โ€“ Constraints on transitions due to (m,k)

โ€ข Constrained switched linear system

โ€ข Even if some operating modes can be unstable, global stability can be still ensured with state of the art analysis

P. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Missing deadlines: effects on control

Hypothesis:

- Every combination of mode switches leads to a stable behavior

- Exponential stability: bounded by an exponential function

Page 14: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

14

P. Pazzaglia

Performance analysis

โ€ข Assign a performance value for each sequence of N jobs

โ€ข Value of N is determined by the exponential bound on the dynamics

โ€ข Sum of quadratic error

โ€ข Matrix elements of ฮจ ๐‘  depends on the ordered sequence of H/M

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 15: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

15

P. Pazzaglia

Performance analysis

โ€ข ๐‘ท ๐’” = ฮพ[๐ŸŽ]๐‘ปฮจ(๐’”)ฮพ[๐ŸŽ]

โ€ข Scalar performance index independent from initial state

โˆ ๐‘  = | ฮจ(๐‘ ) |2

โ€ข It is possible to extract one single value representing the worstvalue for each (m,k) constraint:

โ€ข Worst Case Normalized Performance: ๐‘Š๐ถ๐‘ƒ๐‘› =๐‘š๐‘Ž๐‘ฅ๐‘  โˆ ๐‘ 

โˆ ๐‘Ž๐‘™๐‘™ โ„Ž๐‘–๐‘ก๐‘ 

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 16: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

16

P. Pazzaglia

Performance state machine WH constraint (1,2)N = 4 steps

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Desired performance region

Transitions marked with Xshould never happen for (m,k) constraints

Page 17: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

17

P. Pazzaglia

Case study: Furuta pendulum

โ€ข Furuta pendulum: rotary inverted pendulum

โ€ข Linearized model in the neighbourhood of the upward position

โ€ข Feedback control with ๐‘‡๐‘– = 0.1๐‘ ๐‘’๐‘ and ๐ท๐‘– = 0.2 โˆ— ๐‘‡๐‘–

โ€ข Testing different (m,K) values and studying how Worst Case performance changes

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 18: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

18

Case study: Furuta pendulum

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline MissesP. PazzagliaBeyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

The lower the better

Page 19: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

19

Case study: Furuta pendulum

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Continue job strategy

Kill job strategy

Page 20: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

20

โ€ข This new model can be used as a time contract betweensoftware designers and control engineers

โ€ข Possibility of inserting run-time monitors

P. Pazzaglia

Possible applications

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

(m,k) = (1,2)

Page 21: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

21

P. Pazzaglia

Summary

โ€ข New model for studying performance evolution under overloadconditions

1. Creating a state machine for computing freshness of outputs, applicable to different patterns and handling of deadline misses

2. Intergrating freshness information with state evolution of the controlled system: different operating modes

3. Creating a state machine for computing performance valuesrealted to patterns of H/M deadlines

โ€“ Worst case performance guarantees

โ€“ Runtime monitors for performance evolution

โ€ข Case study: Furuta pendulum

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 22: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

22

P. Pazzaglia

Future work

โ€ข Extensions:

โ€“ Including additional performance metrics

โ€“ Extending the case study to WCRT>T+D, allowing multiple pending jobs at deadline

โ€ข Finding optimal controller for a system under (m,K) constraints, for achieveing a given performance

โ€ข More complex case studies:

Testing non linear systems performance by simulation

More complex deadline miss handlings

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses

Page 23: Beyond the Weakly Hard Model: Measuring the Performance ...Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Authors: Paolo Pazzaglia, Luigi Pannocchi,

23

P. Pazzaglia

Thank you!

[email protected]

Any questions?

Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses