Presentation is loading. Please wait.

Presentation is loading. Please wait.

Delay-Aware Period Assignment in Control Systems Anton CervinLund University Sweden Enrico BiniScuola Superiore Sant’Anna, Pisa, Italy Real-Time Systems.

Similar presentations


Presentation on theme: "Delay-Aware Period Assignment in Control Systems Anton CervinLund University Sweden Enrico BiniScuola Superiore Sant’Anna, Pisa, Italy Real-Time Systems."— Presentation transcript:

1 Delay-Aware Period Assignment in Control Systems Anton CervinLund University Sweden Enrico BiniScuola Superiore Sant’Anna, Pisa, Italy Real-Time Systems Symposium, 2008 Matlab routine available at: http://retis.sssup.it/~bini/

2 Overview We find an analytical solution!!! n independent plants to be controlled by n controllers one CPU to schedule them Problem: assign the periods {T i } such that overall control cost is minimized 11 22 nn T1T1 T2T2 TnTn CPU

3 The execution of a controller a set of n control tasks {  1,...,  n } scheduled by FP A task  i is modeled by (C i, T i ), where: C i is the worst-case computation time; T i is the period; U i =C i /T i is the utilization; R ij is the job response time; no deadline is enforced.

4 The cost of a controller The cost is standard Linear Quadratic Gaussian (LQG) that is We make a linearization It applies to any other domain where period, delay minimization is required

5 The linear cost “The cost J i is ” Let J i (T,  ) be any smooth cost function, T i 0 and  i 0 be nominal values of period and delay of  i (for example T i 0 =  i 0 =C i ) 1.make a linear approx of J i at (T i k,  i k ) and we set  i k and  i k as the partial derivative of J i ; 2.Solve (very efficiently) the linear problem and set T i k+1 as the solution and  i k+1 accordingly 3.Go back to 1. The convergence is not demonstrated, but always obtained.

6 Modeling the delay In control,  i is the separation between sampling and actuation How do we model  i as function of T 1,...,T n ? separation from activation to completion varies job by job  i =R i ? Overestimate, no expression func of T i  i =R i ub ? Exists expression of T i, larger overestimate  i =avg j {R ij } ? good estimate, no expression Average response time seems the good one

7 The delay approximation seems a good approximation of avg j {R ij } it’s the resp time if hp tasks were fluid if, a posteriori, we see good performance then it’s a good delay approximation We claim that average R ij is “something like” (2,4) (3,6) 7566

8 Formalization of the problem Seto et al [RTSS96] solved with  i =0 Notice we don’t care of classic FP schedulability! We aggregate the overall cost by sum J i

9 Solution of the problem Analytical solution of the problem Lagrange multipliers + Partial differentiation + Luck = At pag. 296, Equations (34)--(37), you can see the expression of the solution

10 The priority assignment RM is not guaranteed to be optimal. What is the control-optimal assignment? Intuition: since the cost is Since we found the analytical (fast) solution, then we can try to enumerate all possible ( n! ) priority orderings large  i  high priority to  i two “orthogonal” problems: priority assignment (based on  i ) and period assignment (based on  i )

11 Introducing experiments Tested methods: FirstVertex, by Bini, Di Natale [RTSS05] RiApprox, this method Seto96(1), by Seto et al [RTSS96], U=1 Seto96(Ulub), Seto96, U=U lub

12 One experiment CiCi 2510115 U JiJi ii 44444 ii 206342 Seto96(Ulub) 22.22735.14549.70215.71760.8720.7435913.4 Seto96(1) 16.52626.13036.95311.68645.2581764.1 FirstVertex 1836 18361770.2 RiApprox 18.90529.09739.36412.26338.7811754.8 Matlab code available on my homepage priority assigned by brute force ( n! )

13 One experiment CiCi 2510115 U JiJi ii 44444 ii 206342 Seto96(Ulub) 22.22735.14549.70215.71760.8720.7435913.4 Seto96(1) 16.52626.13036.95311.68645.2581764.1 FirstVertex 1836 18361770.2 RiApprox 18.90529.09739.36412.26338.7811754.8 Matlab code available on my homepage priority assigned by brute force ( n! )

14 Quality of delay approx task priority random C i,  i,  i, n  {3,7,19} We compute periods according RiApprox For all tasks we evaluate R i approx /R i avg R i avg is computed by simulating the schedule on x axis, tasks by decreasing pri highestlowest R i approx /R i avg

15 Quality of delay approx task priority highestlowest R i approx /R i avg

16 Comparing the costs n=2n=5n=10n=20 Seto96( U lub ) 20  839  349  767  3 FirstVertex 16  935  350  1259  5 RiApprox 16  733  342  655  4 n=2n=5n=10n=20 Seto96( U lub ) 24  651  960  11  14 FirstVertex 22  642  957  676  10 RiApprox 19  540  648  866  4 n=2n=5n=10n=20 Seto96( U lub ) 27  381  24121  13155  9 FirstVertex 27  861  14  11146  9 RiApprox 24  4102  79100  12128  7 2 stable poles 2 stable, 1 unstable poles 3 stable, unstable poles cost is LQG (not synthetic) 3 kinds of plant generated randomly 2 stable poles 2 stable pole, 1 unstable 3 stable/ustable poles reference is T i =D i =C i costs are normalized with reference

17 Comparing the costs n=2n=5n=10n=20 Seto96( U lub ) 20  839  349  767  3 FirstVertex 16  935  350  1259  5 RiApprox 16  733  342  655  4 n=2n=5n=10n=20 Seto96( U lub ) 24  651  960  11  14 FirstVertex 22  642  957  676  10 RiApprox 19  540  648  866  4 n=2n=5n=10n=20 Seto96( U lub ) 27  381  24121  13155  9 FirstVertex 27  861  14  11146  9 RiApprox 24  4102  79100  12128  7 2 stable poles 2 stable, 1 unstable poles 3 stable, unstable poles

18 Future works Extension in presence of a virtual processor. More efficient priority assignment. A delay sequence of 2, 4, 2, 4, 2, 4,... may not perform the same as a constant delay of 3. Account for it.

19 ? ?

20 Quality of delay approx 2  i magnutude (sensitivity to delay) cost/Seto96(1) 5 tasks random C i,  i we increased the average  i cost is synthetic reference is Seto(1)


Download ppt "Delay-Aware Period Assignment in Control Systems Anton CervinLund University Sweden Enrico BiniScuola Superiore Sant’Anna, Pisa, Italy Real-Time Systems."

Similar presentations


Ads by Google