Deadlines misses and their Implication on Feedback Control Loops Dip Goswami Eindhoven University of Technology (TU/e) The Netherlands
Periodic tasks dd ii 2
Periodic tasks dd ii Hard deadlines 3
Periodic tasks dd ii Some jobs miss deadlines -- no restriction on order of misses: soft deadline 4
Firm deadlines (m,k)-firm deadline: A periodic task is said to have an (m,k)- firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. 5
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=1 dd ii Window of size k=3 6
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=1 dd ii Window of size k=3 7
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=1 dd ii Window of size k=3 8
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=1 dd ii Window of size k=3 9
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=1 dd ii Window of size k=3 10
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=0 dd ii Window of size k=3 11
(m,k)-firm deadline A periodic task is said to have an (m,k)-firm guarantee if it is adequate to meet the deadlines of m out of k consecutive instances of the task (jobs), where m k. miss=1 dd ii Window of size k=3 m=1 (1,3)-firm deadline 12
Outline Task model and deadlines in feedback control Typical application scenario Implication of an firm-deadline Analytical outlook Some results 13
...control task model and deadlines... 14
Feedback loop T m : measure Loop start u = K*[x1(i);x2(i)] + r*f; xkp1 = A*[x1(i);x2(i)]+ B*u; T c : compute T a : actuate x1(i+1) = xkp1(1); x2(i+1) = xkp1(2); Loop repeats T m sensor task T c controller task T a actuator task 15
Control loop Feedback loop Sensor reading τ = sensor-to-actuator delay T m : measure T m T c : compute T c T a : actuate T a h= sampling period Actuation Ideal design assumes: or 16
Control task triggering In general, T m and T a tasks consume negligible computational time and are time-triggered T c needs finite computation time and can be preemptive When multiple tasks are running on a processor, T c can be preempted T m T c T a τ τ τ τ Sensor-to-actuator delay: τ 17
Deadline for control tasks T c preemption wait T m Deadline D c T a T m Sampling period = h 18
T m T c T a T m D c T m T m T a T a pp ii =h dd ii =D c 19
Constant delay: sampled-data model x(t k ) x(t k+1 ) D c xx kk + 1 = xx kk + BB 1 (DD cc )uu kk 1 + BB 0 (DD cc )uu kk yy kk = CCCC[kk]...will be illustrated in Part 4 20
...automotive application scenario... Based on the article: Dip Goswami, Samarjit Chakraborty, Reinhard Schneider Relaxing Signal Delay Constraints in Distributed Embedded Controllers IEEE Trans. On Control Systems Technology, 2014 21
Distributed automotive control loops actuator Physical System sensor actuate() Plant ECU measure() T p Kx[k- ] m c FlexRay/CAN x[k] m x Other ECUs Kx[.] x[.] T c compute() Controller ECU 22
Task partitioning Feedback loop T p : measure T c : compute Loop start xkp1 = A*[x1(i);x2(i)]+ B*u; x1(i+1) = xkp1(1); x2(i+1) = xkp1(2); u = K*[x1(i+1);x2(i+1)] + r*f; Loop repeats T p plant task T c controller task 23
Timing diagram and deadline h Plant ECU T p T p FlexRay Controller ECU m x T c m c T c τ = sensor-to-actuator delay Deadline sampling period 24
FlexRay: typical delay profile 70 60 50 τ (ms) 40 30 20 10 0 0 20 40 60 80 100 Sampling instants k 25
Delay based classification 70 60 Non-ideal τ (ms) 50 40 30 Ideal 20 h 10 0 0 20 40 60 80 100 Sampling instants k 26
measure: x[k] x[0] x[1] x[2] x[3] x[4] x[5] τ h =1 τ h =1 τ h =1 τ h = 2 τ h =1 τ h =1 actuate: u[k] -- f(x[0]) f(x[1]) f(x[2]) f(x[2]) f(x[4]) sampling instant: k 0 ideal ideal ideal non-ideal ideal 1 2 3 4 5 time
Control scheme u[ k] = = Kx[ k F r 2 1] + F r 1 non -ideal ideal samples samples xx kk + 1 = AAAA kk + BBBB[kk] Ideal: x[ k Non -ideal : x[ k + 1] = Ax[ k] + BKx[ k + 1] = Ax[ k] + BF r 1] + BF r 2 1 z[ k z[ k + 1] = + 1] = A o z[ k] A cl z[ k] 28
Back to firm-deadline setting k k+1 k+2 k+3 k+4 k+5... zz kk + 1 = AA cccc zz kk zz kk + 2 = AA oo zz kk + 1 = AA oo AA cccc zz kk zz kk + 3 = AA cccc zz kk + 2 = AA cccc AA oo AA cccc zz kk zz kk + 4 = AA cccc zz kk + 3 = AA cccc AA cccc AA oo AA cccc zz kk zz kk + 5 = AA oo zz kk + 4 = AA oo AA cccc AA cccc AA oo AA cccc zz kk... 29
Performance: fast disturbance rejection SS zz[kk + αα] zz[kk] zz[kk] A cl α k kk + αα Hard deadlines 30
Performance and deadline miss zz[kk + αα]= AA oo AA cccc AA cccc AA oo AA cccc...z[k] zz[kk] SS zz[kk + αα] zz[kk] AA oo AA cccc AA cccc AA oo AA cccc... k kk + αα Firm deadlines 31
Simplified special case SS AA oo AA cccc AA cccc AA oo AA cccc... For any matrix A, the following property holds AA kk ccγγ kk where c and γγ are constants AA cccc kk cc 1 γγ 1 kk AA oo kk cc 2 γγ 2 kk Special case of (m,k)-firmness: m=1 1 deadline miss is allowed by within αα samples SS (cc 1 ) 2 γγ 1 αα 1 cc 2 γγ 2 Compute minimum αα 32
Some results Cruise control systems: Sampling period = 40ms Performance requirement: Change in reference speed should be adapted asap 95% of the disturbance must be rejected in 5 sec Implies αα=125 Allowed deadline miss: 7 out of 125 33
Simulation based results Number of samples 500 400 300 200 100 0 0 10 20 30 τ(ms) 40 50 60 v 1 [k] 100 80 60 40 20 0 0 20 40 60 80 100 Time (sec) 500 150 Number of samples 400 300 200 100 v 1 [k] 100 50 0 0 20 40 60 80 100 τ (ms) 0 0 20 40 60 80 100 Time (sec) 34
Summary Task model and deadlines in feedback control Typical application scenario Implication of an firm-deadline Analytical outlook Some results 35