modeling control and modeling control and reachability
play

Modeling, Control, and Modeling, Control, and Reachability Analysis - PDF document

Modeling, Control, and Modeling, Control, and Reachability Analysis of Analysis of Reachability Discrete- -Time Hybrid Systems Time Hybrid Systems Discrete Alberto Bemporad Alberto Bempora Alberto Bempora Alberto Bemporad DISC Course on


  1. Modeling, Control, and Modeling, Control, and Reachability Analysis of Analysis of Reachability Discrete- -Time Hybrid Systems Time Hybrid Systems Discrete Alberto Bemporad Alberto Bempora Alberto Bempora Alberto Bemporad DISC Course on DISC Course on Modeling and Control of Hybrid Systems Modeling and Control of Hybrid Systems March 31, 2003 March 31, 2003 U niversità à degli degli Studi Studi di Siena di Siena U niversit (founded in 1240) (founded in 1240) COHES Group http://www.dii.unisi.it/~bemporad http:// www.dii.unisi.it/~bemporad Control and Optimization of Hybrid and Embedded SystemS Outline Outline • What is a “ hybrid system ” ? • Models for hybrid systems • Control of hybrid systems • Safety analysis of hybrid systems • Examples (automotive)

  2. Motivating Problem Motivating Problem GO GOAL: command gear ratio, gas pedal, and brakes to trac track k a desired speed and minimize consumptions CHALLEN CHALLENGES: ES: • continuous and and discrete inputs • dynamics depends on gear • nonlinear torque/speed maps Hybrid Systems Hybrid Systems (Witsenhausen, 1966) Computer Control Theory Science x ∈ R n , u ∈ R m X = { 1 , 2 , 3 , 4 , 5 } y ∈ R p U = { A, B, C } Continuous Finite dynamical state systems machines B Hybrid systems A B C y(t) u(t) system B ú C d x ( t ) = f ( x ( t ) , u ( t )) d t y ( t ) = g ( x ( t ) , u ( t )) C A

  3. Motivation: Embedded Systems Motivation: Embedded Systems discrete inputs symbols symbols • Consumer electronics • Home appliances automaton / logic • Office automation interface • Automobiles continuous dynamical • Industrial plants system • ... continuous states continuous inputs Motivation: “ Intrisically Hybrid ” Motivation: “ Intrisically Hybrid ” • Transmission Continuous Discrete command + dynamical variables (R,N,1,2,3,4,5) (velocities, torques) • Four-stroke engines Automaton, dependent on power train motion

  4. Key Requirements for Hybrid Models Key Requirements for Hybrid Models • Descriptiv Descriptive enough to capture the behavior of the system – continuous dynamics (physical laws) – logic components (switches, automata, software code) – interconnection between logic and dynamics • Simple Simple enough for solving analysis and synthesis problems x 0 = f ( t, x, u ) x 0 = Ax + Bu y = Cx + Du y = g ( t, x, u ) linear systems nonlinear systems ? linear hybrid systems Piecewise Affine Systems Piecewise Affine Systems (Sontag 1981) state+input space • Approximates nonlinear dynamics arbitrarily well • Suitable for stability analysis, reachability analysis (verification), controller synthesis, ...

  5. Discrete Hybrid Automata Discrete Hybrid Automata (Torrisi, Bemporad, 2003) Switched Affine Systems Switched Affine Systems Linear affine dynamics depends upon the mode i ( k )

  6. Event Generator Event Generator Generates a logic signal according to the satisfaction of a linear affine constraint Finite State Machine Finite State Machine Discrete dynamics evolving according to a Boolean state update function

  7. Mode Selector Mode Selector a Boolean function selects the active mode i ( k ) of the SAS Logic and Inequalities Logic and Inequalities Glover 1975, Williams 1977

  8. Transformation of Logic into Transformation of Logic into Linear Integer Inequalities Linear Integer Inequalities 0. Given a Boolean statement F ( X 1 , X 2 , . . . , X n ) 1. Convert to Conjunctive Normal Form (CNF): ð ñ V W W m ö i i ∈ P j X i i ∈ N j X j =1 2. Transform into inequalities: X X 1 ô î i + (1 à î i ) i ∈ P 1 i ∈ N 1 . . . . . . Aî ô B, î ∈ { 0 , 1 } . . . X X 1 ô î i + (1 à î i ) i ∈ P m i ∈ N m Every logic proposition can be translated into linear integer inequalities General Transformation into General Transformation into Linear Integer Inequalities Linear Integer Inequalities P , { î : Aî ô B } Geometric approach: The polytope is the T convex hull of the rows of the truth table Aî ô B, î ∈ { 0 , 1 } n Every logic proposition can be translated into linear integer inequalities

  9. Truth Tables Linear Integer Truth Tables Linear Integer Inequalities Inequalities Example: logic “ AND ” 3 2 Key idea: 1 White points cannot be in the hull of black points   " # " # " # " # !  à î 1 + î 3 ô 0 0 0 1 1  conv , , , = î : à î 2 + î 3 ô 0 0 1 0 1   î 1 + î 2 à î 3 ô 1 0 0 0 1 Convex hull algorithms : cdd, lrs, qhull, chD, Hull, Porto Mixed Logical Dynamical Systems Mixed Logical Dynamical Systems DHA Mixed Logical Dynamical (MLD) Systems (Bemporad, Morari 1999) Continuous and binary variables • Computationally oriented (Mixed Integer Programming) • Suitable for optimal controller synthesis, verification, ...

  10. A Simple Example A Simple Example ú 0 . 8 x ( t ) + u ( t ) if x ( t ) õ 0 • System: x ( t + 1) = à 0 . 8 x ( t ) + u ( t ) if x ( t ) < 0 à 10 ô x ( t ) ô 10 , à 1 ô u ( t ) ô 1 • Associate [ î ( t ) = 1] ↔ [ x ( t ) õ 0] and transform à mî ( t ) ô x ( t ) à m M = à m = 10 ï > 0 small à ( M + ï ) î ( t ) ô à x ( t ) à ï • Then x ( t + 1) = 1 . 6 î ( t ) x ( t ) à 0 . 8 x ( t ) + u ( t ) z ( t ) ô Mî ( t ) z ( t ) = î ( t ) x ( t ) z ( t ) õ mî ( t ) z ( t ) ô x ( t ) à m (1 à î ( t )) z ( t ) õ x ( t ) à M (1 à î ( t )) • Rewrite as linear equation x ( t + 1) = 1 . 6 z ( t ) à 0 . 8 x ( t ) + u ( t ) HYSDEL HYSDEL (HYbrid HYbrid Systems Systems DEscription DEscription Language) Language) ( • Describe hybrid systems: – Automata – Logic – Lin. Dynamics – Interfaces – Constraints (Torrisi, Bemporad, 2003) • Automatically generate MLD models in Matlab • MLD model is not unique in terms of the number of auxiliary variables optimize model (minimize # binary variables !) ht http:/ tp://contro /control.et l.ethz.ch/~ hz.ch/~hybr hybrid/hysd id/hysdel el

  11. Example 1: AD section Example 1: AD section [ ] [ ] = ↔ ≥ s T h h max SYSTEM tank { INTERFACE { STATE { REAL h [-0.3,0.3]; } INPUT { REAL Q [-10,10]; } PARAMETER { REAL k = 1; REAL e = 1e-6; } } /* end interface */ IMPLEMENTATION { AUX { BOOL s; } AD { s = hmax - h <= 0; } CONTINUOUS { h = h + k * Q; } } /* end implementation */ } /* end system */ Example 2: DA section Example 2: DA section Nonlinear amplification unit <  u ( u u ) =  t u comp − ≥ 2.3 u 1.3 u ( u u )  t t IMPLEMENTATION { SYSTEM motor { AUX { INTERFACE { REAL unl; STATE { BOOL th; } REAL ucomp; } AD { INPUT { th = ut - u <= 0; } REAL u [0,10]; } PARAMETER { DA { REAL ut = 1; unl = { IF th THEN 2.3*u - 1.3*ut REAL e = 1e-6;} ELSE u }; } } /* end interface */ CONTINUOUS { ucomp = unl; } } /* end implementation */ } /* end system */

  12. Example 3: LOGIC section Example 3: LOGIC section SYSTEM train { INTERFACE { STATE { BOOL brake; } INPUT { BOOL alarm, tunnel, fire; } } /* end interface */ IMPLEMENTATION { AUX { BOOL decision; } LOGIC { decision = alarm & (~tunnel | ~fire); } = ∧ ¬ ∨ ¬ u u ( s s ) AUTOMATA { brake alarm tunnel fire brake = decision; } MUST { → s u fire -> alarm; } fire alarm } /* end implementation */ } /* end system */ Example 4: CONTINUOUS section Example 4: CONTINUOUS section SYSTEM capacitorD { INTERFACE { STATE { REAL u; } PARAMETER { REAL R = 1e4; REAL C = 1e-4; d REAL T = 1e-1; } = } /* end interface */ i C u t ( ) dt IMPLEMENTATION { CONTINUOUS { Apply forward difference rule: u = u - T/C/R*i; } T } /* end implementation */ + = + u k ( 1) u k ( ) i k ( ) } /* end system */ C

  13. Example 5: AUTOMATA section Example 5: AUTOMATA section SYSTEM outflow { INTERFACE { STATE { BOOL closing, stop, opening; } INPUT { BOOL uclose, uopen, ustop; } } /* end of interface */ IMPLEMENTATION { AUTOMATA { closing = (uclose & closing) | (uclose & stop); stop = ustop | (uopen & closing) | (uclose & opening); opening = (uopen & stop) | (uopen & opening); } MUST { ~(uclose & uopen); ~(uclose & ustop); ~(uopen & ustop); } } /* end implementation */ } /* end system */ Example 6: MUST section Example 6: MUST section SYSTEM watertank { INTERFACE { STATE { REAL h; } INPUT { REAL Q; } PARAMETER { REAL hmax = 0.3; REAL k = 1; } } /* end interface */ IMPLEMENTATION { CONTINUOUS { h = h + k*Q; } MUST { h - hmax <= 0; -h <= 0; } ≤ ≤ 0 h h } /* end implementation */ } /* end system */ max

  14. Modeling Flow Modeling Flow g 12 x ( t ) + h 12 u ( t ) < k 12 g 23 x ( t ) + h 23 u ( t ) < k 23 x ( t + 1) = x ( t + 1) = x ( t + 1) = A 1 x ( t ) + B 1 u ( t ) + f 1 A 3 x ( t ) + B 3 u ( t ) + f 3 A 2 x ( t ) + B 2 u ( t ) + f 2 g 13 x ( t ) + h 13 u ( t ) < k 13 g 32 x ( t ) + h 32 u ( t ) < k 32 Designer HYSDEL Source Hysdel logic MLD PWA A/D D/A Mixed Piecewise Logical Affine form continuous Dynamical form Example: Bouncing Ball Example: Bouncing Ball x ¨ = à g x ç ( t + ) = à (1 à ë ) x ç ( t à ) x ô 0 ⇒ x ë ∈ [0 , 1] N F= m g How to model this system in MLD form?

Recommend


More recommend