Quality-Driven Synthesis of Embedded Multi-Mode Control Systems Soheil Samii1, Petru Eles1, Zebo Peng1, Anton Cervin2 1 Dept. of Computer and Information Science Linköping University Sweden 2 Dept. of Automatic Control Lund University Sweden Motivation Plant Plant Number of modes = 2Number of control loops Plant Cannot afford the synthesis time Plant Cannot store all controllers and schedules 2 Outline System model and control performance Example and problem formulation Synthesis approach Experimental results 3 System model Plant disturbance v(t) Internal-state vector x(t) Output y(t) Input u(t) Plant What is a good sampling period? A/D Measurement noise e(t) D/A What is a good control law u? Controller Linear plant model: • dx(t)/dt = Ax(t) + Bu(t) + v(t) • y(t) = Cx(t) + e(t) Application model: • Periodic tasks • Data dependencies 4 Control performance Quadratic cost: J = E{ xTQ1x + uTQ2u } Depends on the sampling period, the control law, and the schedule (delays between sampling and actuation) 5 Synthesis of a mode (DATE’09) Scheduling and synthesis tool Minimize J i Periods Control laws 6 Example Plant 1 Plant 3 Plant 2 S S C S A A C 10 S 20 C C 30 J1 = 3.0 J2 = 1.2 J3 = 2.2 A A 40 7 Example Plant 1 Plant 3 Plant 2 S S C S A A C 10 S 20 C C 30 A J1 = 3.0 J2 = 1.2 A 40 8 Example Plant 1 Plant 3 Plant 2 Previous case: J1 = 3.0 J2 = 1.2 S C S C 10 A J1 = 1.6 J2 = 1.4 A 20 22 9 Example J1 = 3.0 J2 = 1.2 J3 = 2.2 1 J1 = 1.6 J2 = 1.4 1 Cumulative cost of all modes: 19.6 2 1 J1 = 1.6 2 1 3 3 2 3 J1 = 3.0 2 J3 = 2.2 3 J2 = 1.2 J3 = 2.2 10 Problem formulation Inputs: Multi-mode control system (architecture, tasks, plants) Available memory on each computation node Outputs: Schedules and controllers for some modes Cost to minimize: Cumulative cost of each functional mode 11 Some modes are functionally excluded Synthesis approach J1 = 2.5 1 2 J2 = 1.5 J4 = 2.0 3 4 J1 = 2.3J1 = 2.0 J1 = 2.0 J2 = 1.8 4 3 4 2 3 1 2 1 2 1 3 J2 = 1.2J3 = 2.2 J4 = 1.2 J4 = 1.3 =Synthesis versus Impr. =Impr. 12.5% 16.0% time Impr. = quality 20.0% Impr. = 11.4% 1 1 2 1 Parameter λ (20% in our example) 3 2 2 3 1 4 3 2 4 3 4 4 4 J1 = 1.2 J4 = 1.2 Require at least λ = 20% improvement Impr. = 40% Impr. = 0% 12 Synthesis approach Cost = 23 Mem = 18 1 1 2 1 3 1 2 1 3 Cost = 23 2 4 3 Mem = 20 2 4 2 3 1 1 Cost = 19 Mem = 20 3 4 4 2 2 3 4 3 4 4 ILP formulation 1 2 3 4 13 Synthesis approach 1 1 1 2 1 2 1 1 3 3 2 2 4 2 3 2 4 3 1 1 3 4 3 4 2 2 3 4 3 4 4 4 14 Cost improvement [%] Experiments – Synthesis Quality λ = 0% λ = 10% λ = 30% λ = 50% Number of control loops 15 Runtime [seconds] Experiments – Synthesis Time λ = 0% λ = 10% λ = 30% λ = 50% Number of control loops 16 Summary and Contribution Two important problems in synthesis of multimode control systems Time complexity (offline) Memory complexity (online) Contribution: Synthesis tool with performance/time/memory trade-off 17