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 paolo.pazzaglia@santannapisa.it Barcelona, ECRTS, July 6th, 2018
Introduction • Embedded systems with control tasks may face overload conditions (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 2 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Weakly hard model limitations • (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) 3 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Weakly hard model limitations Changing the pattern of H/M deadlines may lead to different performance values! Assumption: When a deadline is missed, the control output is not updated 𝑈 = 50 𝑛𝑡; 𝐸 = 0.7 ∗ 𝑈 4 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
A new model for performance analysis • 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 Control H/M pattern Performance updates 5 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
System model • Linear Time Invariant plant, MIMO • Periodic control of period 𝑈 𝑗 and deadline 𝐸 𝑗 ≤ 𝑈 𝑗 • State-feedback control: 𝑣 𝑙 = 𝐿 𝑠 𝑙 − 𝑦 𝑙 Read sensor (k+1)T kT+D kT Control task Active control 𝒗 𝒍 − 𝟐 𝒗[𝒍] command Actuator actuation actuation State update function: x k + 1 = A d x k + B d1 𝑣 𝑙 − 1 + 𝐶 𝑒2 𝑣[𝑙] • Similar to LET model: trading jitter for latency 6 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Missing a deadline (k+1)T kT+D kT Control task X 𝒗 𝒍 − 𝟐 𝒗 𝒍 • 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 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Update freshness: definition kT+D (k+1)T kT Control task 𝒗 𝒍 − 𝟐 𝒗[𝒍] • 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 = A d x k + 𝐶 𝑒1 𝑣 𝑙 − 1 + 𝐶 𝑒2 𝑣[𝑙] 𝑣 𝑙 − 1 = −𝐿 𝑒 𝑦[𝑙 − 1 − ∆ 𝑞 ] 𝑣 𝑙 = −𝐿 𝑒 𝑦[𝑙 − ∆ 𝑑 ] • Freshness is independent of control law and controlled system! • Different effects changing deadline miss handling 8 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Update freshness: Continue strategy (k+1)T kT+D kT ∗ 𝐶𝐷𝑆𝑈 ≤ 𝐸 𝑗 Δ 𝑞 , Δ 𝑑 ∗ 𝑋𝐷𝑆𝑈 < 𝑈 𝑗 + 𝐸 𝑗 −𝑳 𝒆 x 𝒍 − 𝟐 − 𝜠 𝒒 −𝑳 𝒆 x 𝒍 − 𝜠 𝒅 M H 0,0 0,1 H M H M 1,1 1,0 M H See Algorithm 1 in the paper for more details 9 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Update freshness: Kill strategy (k+1)T kT+D kT X ∗ 𝐶𝐷𝑆𝑈 ≤ 𝐸 𝑗 Δ 𝑞 , Δ 𝑑 −𝑳 𝒆 x 𝒍 − 𝟐 − 𝜠 𝒒 −𝑳 𝒆 x 𝒍 − 𝜠 𝒅 H M M M 2,3 0,0 0,1 1,2 M M H M H H 3,0 1,0 2,0 H H In this example, maximum number of consecutive deadline misses is equal to 3 10 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
State update matrix • 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 𝑜 ⋯ ⋯ ⋮ ⋮ ⋮ ⋱ ⋯ ⋯ 11 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
State update matrix: an example Example: M H 0,0 0,1 H M H M 1,1 1,0 M H • Every combination of ( 𝛦 𝑞 , 𝛦 𝑑 ) is mapped to a specific dynamic of the system through the matrix Ф ( 𝛦 𝑞 , 𝛦 𝑑 ) 12 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Missing deadlines: effects on control ξ 𝑙 + 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, g lobal stability can be still ensured with state of the art analysis Hypothesis: - Every combination of mode switches leads to a stable behavior - Exponential stability : bounded by an exponential function 13 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses 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 14 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Performance analysis • 𝑸 𝒕 = ξ[𝟏] 𝑼 Ψ(𝒕)ξ[𝟏] • Scalar performance index independent from initial state ∏ 𝑡 = | Ψ(𝑡) | 2 • It is possible to extract one single value representing the worst value for each (m,k) constraint: Worst Case Normalized Performance: 𝑋𝐷𝑄𝑜 = 𝑛𝑏𝑦 𝑡 ∏ 𝑡 • ∏ 𝑏𝑚𝑚 ℎ𝑗𝑢𝑡 15 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Performance state machine WH constraint (1,2) N = 4 steps Desired performance region Transitions marked with X should never happen for (m,k) constraints 16 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses 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 17 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Case study: Furuta pendulum The lower the better 18 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Case study: Furuta pendulum Continue job strategy Kill job strategy 19 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses
Possible applications • This new model can be used as a time contract between software designers and control engineers • Possibility of inserting run-time monitors (m,k) = (1,2) 20 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Summary • New model for studying performance evolution under overload conditions 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 values realted to patterns of H/M deadlines – Worst case performance guarantees – Runtime monitors for performance evolution • Case study : Furuta pendulum 21 Beyond the Weakly Hard Model: Measuring the Performance Cost of Deadline Misses P. Pazzaglia
Recommend
More recommend