Hybrid Control and Switched Systems Lecture #1 Hybrid systems are everywhere: Examples João P. Hespanha University of California at Santa Barbara Summary Examples of hybrid systems 1. Bouncing ball 2. Thermostat 3. Transmission 4. Inverted pendulum swing-up 5. Multiple-tank 6. Server 7. Supervisory control 1
Example #1: Bouncing ball y g Free fall Collision c [0,1] energy reflected at impact Notation: given x : [0, ) R n piecewise continuous signal x at points t where x is continuous x(t) = x - (t) = x + (t) By convention we will generally assume right continuity, i.e., x(t) = x + (t) t 0 x x + Example #1: Bouncing ball x 1 ú y Free fall Collision for any c < 1, there are infinitely many transitions in finite time (Zeno phenomena) t x 1 = 0 & x 2 <0? guard or jump condition transition state reset x 2 ú c x 2 2
Example #2: Thermostat room goal regulate temperature around 75 o x mean temperature heater when heater is off: ( x 50 o ) when heater is on: ( x 100 o ) event-based control turn heater on turn heater off 73 o 77 o x Example #2: Thermostat 77 73 x q = on off off off on on on turn heater off turn heater on guard condition x 73? discrete state or mode off mode t no reset on mode x(t) R continuous state q(t) { off, on } discrete state x 77? guard condition 3
η 1 η 2 η 3 η 4 Example #3: Transmission throttle u [-1,1] position θ g {1,2,3,4} gear ω velocity η k efficiency of the k th gear ω velocity [Hedlund, Rantzer 1999] Example #3: Automatic transmission ω ω 2? ω ω 3? ω ω 4? g = 1 g = 2 g = 3 g = 4 ω ϖ 1? ω ϖ 2? ω ϖ 3? g = 1 ω 2 ω 3 g = 2 ϖ 1 ϖ 2 g = 3 ω 4 g = 4 ϖ 3 4
Example #3: Semi-automatic transmission v(t) { up, down, keep } drivers input (discrete) v = up or ω ω 2? v = up or ω ω 3? v = up or ω ω 4? g = 1 g = 2 g = 3 g = 4 v = down or ω ϖ 1? v = down or ω ϖ 2? v = down or ω ϖ 3? ω 2 g = 1 ω 3 g = 2 ϖ 1 g = 3 ϖ 2 ω 4 g = 4 ϖ 3 Example #4: Inverted pendulum swing-up u [-1,1] θ goal drive θ to 0 (upright position) u [-1,1] force applied to the cart Total system energy Feedback linearization controller: try to make kinetic potential normalized to be zero at stationary upright position only in [-1,1] close to upright position (θ = ω = 0) [Astrom, Furuta 1999] 5
Example #4: Inverted pendulum swing-up u [-1,1] θ Hybrid controller: 1 st pump/remove energy into/from the system by applying maximum force, until E 0 (energy control) 2 nd wait until pendulum is close to the upright position 3 th next to upright position use feedback linearization controller remove energy E [ ε,ε]? E < ε? wait stabilize E>ε? pump energy E [ ε,ε]? ω + θ δ? Question: can you figure out a way to solve the problem ω(0) = 0, θ(0) = π? pump Example #5: Tank system goal prevent the tank from emptying or filling up * pump-on inflow λ constant outflow μ y δ delay between command is sent to pump and the time it is executed guard condition pump off τ δ? wait to off y y min? τ ú 0 state reset τ ú 0 wait to on τ δ? pump on y y max? How to choose y min and y max for given μ, λ, δ? 6
Example #5: Multiple-tank system y 1 y 1,min & y 2 y 2,max? τ ú 0 τ δ k? Initialized rectangular hybrid automata all differential equations have constant r.h.s. all jump cond. are of the form: state var. 1 fixed interval 1 & state var. 2 fixed interval 2 & etc. all resets have constant r.h.s. Most general class of hybrid systems for which there exist completely automated procedures to compute the set of reachable states Example #6: Switched server r 0 r 1 r 2 rates of incoming parts buffers server r > r 0 + r 1 + r 2 rate of service δ ij setup time needed to move from buffer i to j Scheduling algorithm (cyclic scheduling): 1. start in buffer 0 2. work on a buffer until empty 3. when buffer j is empty move to buffer j + 1 (mod 3) Often also an initialized rectangular hybrid automata 7
Example #7: Server system with congestion control incoming rate r q max q Additive increase/multiplicative decrease congestion control (AIMD): while q < q max increase r linearly when q reaches q max instantaneously multiply r by γ (0,1) guard condition q q max? server B rate of service (bandwidth) q(t) r ú γ r state reset no longer an initialized rectangular hybrid automata t Example #8: Supervisory control supervisor logic that selects which controller to use bank of controllers σ controller 1 controller 2 u process y σ switching signal taking values in the set {1,2} 2 1 σ 8
E.g. #8 a): Vision-based control of a flexible manipulator flexible manipulator m tip u b base I base θ base θ tip goal drive θ tip to zero, using feedback from θ base θ tip encoder at the base machine vision (needed to increase the damping of the flexible modes in the presence of noise) To achieve high accuracy in the measurement of θ tip the camera must have a small field of view output feedback output: E.g. #8 a): Vision-based control of a flexible manipulator controller 1 controller 2 u manipulator y controller 1 optimized for feedback from θ base and θ tip and controller 2 optimized for feedback only from θ base E.g., LQG controllers that minimize 9
E.g. #8 a): Vision-based control of a flexible manipulator feedback connection with controller 1 (θ base and θ tip available) feedback connection with controller 2 (only θ base available) E.g. #8 a): Vision-based control of a flexible manipulator 5 no switching (feedback only from θ base ) 0 θ tip (t) -5 0 10 20 30 40 50 60 5 with switching (close to 0 feedback also from θ tip ) 0 θ tip (t) θ max = 1-5 0 10 20 30 40 50 60 10
Example #8 b): Adaptive supervisory control supervisor bank of controllers σ process can either be: controller 1 controller 2 u process y Goal: stabilize process, regardless of which is the actual process model Supervisor must try to determine which is the correct process model by observing u and y select the appropriate controller Next class 1. Formal models for hybrid systems: Finite automata Differential equations Hybrid automata Open hybrid automaton 2. Nondeterministic vs. stochastic systems Non-deterministic automata and differential inclusions Markov chains and stochastic processes 11