Controlo 00 5 th Portuguese Conference on Automatic Control University of Aveiro,, September 5-7, 5 00 Switched Systems: Mixing Logic with Differential Equations João P. Hespanha University of California at Santa Barbara slides will be made available at http://www.ece.ucsb.edu/~hespanha Outline Logic-based switched systems framework application areas Congestion control in data networks Vision-based control Adaptive control Impact maps Lyapunov tools Interconnection of systems analytical tools 1
Logic-based switched systems discrete modes hybrid automaton representation transitions Logic-based switched systems hybrid automaton representation 1
Logic-based switched systems hybrid automaton representation switching times 1 σ( t ) switching signal dynamical system representation differential equation discrete transition Outline Logic-based switched systems framework application areas Congestion control in data networks Vision-based control Adaptive control Impact maps Lyapunov tools Interconnection of systems analytical tools 3
Congestion control in data networks sources B destinations Congestion control problem: How to adjust the sending rates of the data sources to make sure that the bandwidth B of the bottleneck link is not exceeded? B is unknown to the data sources and possibly time-varying Congestion control in data networks r 1 bps queue (temporary storage for data) r bps rate B bps r 3 bps q( t ) queue size When i r i exceeds B the queue fills and data is lost (drops) drop (discrete event) Event-based control: The sources adjust their rates based on the detection of drops 4
Window-based rate adjustment w i (window size) number of packets that can remain unacknowledged for by the destination e.g., w i = 3 source i destination i 1 st packet sent t 0 round-trip time (RTT) nd packet sent t 1 3 rd packet sent t t 0 1 st packet received & ack. sent t 1 nd packet received & ack. sent 1 st ack. received t 3 t 3 rd packet received & ack. sent 4 th packet can be sent t t w i effectively determines the sending rate r i : round-trip time Window-based rate adjustment w i (window size) number of packets that can remain unacknowledged for by the destination sending rate per-packet transmission time total round-trip time propagation delay time in queue until transmission queue gets full longer RTT rate decreases queue gets empty negative feedback This mechanism is still not sufficient to prevent a catastrophic collapse of the network if the sources set the w i too large 5
TCP Reno congestion control 1. While there are no drops, increase w i by 1 on each RTT. When a drop occurs, divide w i by (congestion controller constantly probe the network for more bandwidth) Network/queue dynamics Reno controllers drop occurs drop detected (one RTT after occurred) disclaimer: this is a simplified version of Reno that ignores several interesting phenomena Switched system model for TCP queue-not-full transition enabling condition (drop occurs) (drop detected) queue-full state reset 6
Switched system model for TCP σ = 1 queue-not-full (drop occurs) (drop detected) σ = queue-full alternatively σ {1, } continuous dynamics discrete dynamics Impact maps x 1 T x t 0 t 1 t t 3 t 4 t 5 t 6 queue-not-full queue full queue-not-full queue full queue-not-full queue full k th time the system enters the queue-not-full mode x 1 queue-not-full x queue-full impact map state space 7
Impact maps x 1 T x t 0 t 1 t t 3 t 4 t 5 t 6 queue-not-full queue full queue-not-full queue full queue-not-full queue full k th time the system enters the queue-not-full mode Theorem [1]: The function T is a contraction. In particular, Therefore x k x as k x( t ) x ( t ) as t x constant x ( t ) periodic limit cycle NS- simulation results Flow 1 N 1 S 1 Flow TCP Sources N Router R1 Bottleneck link Router R 0Mbps/0ms S TCP Sinks 500 Flow 7 N 7 S 7 Window and Queue Size (packets) 400 300 00 Flow 8 N 8 S 8 window size w 1 window size w window size w 3 window size w 4 window size w 5 window size w 6 window size w 7 window size w 8 queue size q 100 0 0 10 0 30 40 50 time (seconds) 8
Random early detection (RED) Performance could be improved if the congestion controllers were notified of congestion before a drop occured queue-not-full (notification of congestion) N i notification counter (incremented whenever a notification of congestion arrives) In RED, N is a random variable with function to be adjusted Stochastic switched system Impact maps x k queue-not-full x k+1 queue-full impact map state space Impact maps are difficult to compute because their computation requires: Solving the differential equations on each mode (in general only possible for linear dynamics) Intersecting the continuous trajectories with a surface (often transcendental equations) It is often possible to prove that T is a contraction without an explicit formula for T 9
Outline Logic-based switched systems framework application areas Congestion control in data networks Vision-based control Adaptive control Impact maps Lyapunov tools Interconnection of systems analytical tools Vision-based control of a flexible manipulator flexible manipulator m tip l b flex k flex m tip very lightly damped u b base I base θ base θ tip u b base I base θ base θ tip 4 th dimensional small-bending approximation Control objective: drive θ tip to zero, using feedback from θ base encoder at the base θ tip machine vision (essential to increase the damping of the flexible modes in the presence of noise) 10
Vision-based control of a flexible manipulator m tip u b base I base θ base θ tip To achieve high accuracy in the measurement of q tip the camera must have a small field of view feedback output: Control objective: drive θ tip to zero, using feedback from θ base encoder at the base θ tip machine vision (essential to increase the damping of the flexible modes in the presence of noise) Switched process u manipulator y 11
Switched process controller 1 controller u manipulator y controller 1 optimized for feedback from θ base and θ tip and controller optimized for feedback only from θ base E.g., LQG controllers that minimize Switched system feedback connection with controller 1 (θ base and θ tip available) feedback connection with controller (only θ base available) How does one check if the overall system is stable and that eventually converges to zero? controller s state 1
Common Lyapunov functions V( x ) V( x ) common Lyapunov function Suppose that there exists a cont. diff. function V( x ) such that V( x ) provides a measure of the size of x: positive definite radially unbounded V( x ) decreases along trajectories of both systems: switched system is stable and x 0 as t independently of how switching takes place Common Lyapunov functions V( x ) How to find a common Lyapunov function V( x )? Algebraic conditions for the existence of a common Lyapunov function The matrices commute, i.e., A 1 A = A A 1 [S1,S] The Lie Algebra generated by {A 1, A } is solvable For all λ [0,1] the matrices λ A 1 +(1 λ) A and λ A 1 +(1 λ) A -1 are asymptotically stable (only for matrices) But, all these conditions fail for the problem at hand 13
Multiple Lyapunov functions Common Lyapunov function V( x ) same Lyapunov function must decrease for every controller Multiple Lyapunov functions V 1 ( x ) V V ( x ) 1 ( x ) one Lyapunov function for each controller (more flexibility) V ( x ) [,3, etc.] Multiple Lyapunov functions Common Lyapunov function V( x ) same Lyapunov function must decrease for every controller Multiple Lyapunov functions one Lyapunov function for each controller V ( x ) (more flexibility) V 1 ( x ) V 1 ( x ) V ( x ) [,3, etc.] 14
Multiple Lyapunov functions Common Lyapunov function V( x ) same Lyapunov function must decrease for every controller Multiple Lyapunov functions V 1 ( x ) V V ( x ) 1 ( x ) one Lyapunov function for each controller (more flexibility) V ( x ) [,3, etc.] Multiple Lyapunov functions V 1 ( x ) V ( x ) V 1 ( x ) V ( x ) Suppose that exist positive definite, radially unbounded cont. diff. functions V 1 ( x ), V ( x ) such that V i ( x ) decreases along trajectories of A i : V i ( x ) does not increase during transitions: at points z where a switching from i to j can occur switched system is stable and x 0 as t 15
Multiple Lyapunov functions V 1 ( x ) V ( x ) V 1 ( x Multiple ) Lyapunov functions can V be ( x found ) for the problem at hand!!! Suppose that exist positive definite, radially unbounded cont. diff. functions V 1 ( x ), V ( x ) such that V i ( x ) decreases along trajectories of A i : V i ( x ) does not increase during transitions: at points z where a switching from i to j can occur switched system is stable and x 0 as t [S] 5 Closed-loop response no switching (feedback only from θ base ) 0 θ tip (t) -5 0 10 0 30 40 50 60 5 with switching (close to 0 feedback also from θ tip ) 0 θ tip (t) θ max = 1-5 0 10 0 30 40 50 60 [S] 16
Robustness When will a small perturbation in the dynamics result in a small perturbation in the switched system s trajectory? For purely continuous systems (difference or differential equations) Lyapunov stability automatically provides some degree of robustness This is not necessarily true for switched systems: When is this a problem? Is there a notion of stability that automatically provides robustness? Important for 1. numerical simulation of switched systems. digital implementation of switched controllers 3. analysis and design based on numerical methods Outline Logic-based switched systems framework application areas Congestion control in data networks Vision-based control Adaptive control Impact maps Lyapunov tools Interconnection of systems analytical tools 17
Prototype adaptive control problem process can either be: P1 : x& = A1 x + b1u, or P : x& = A x + b u, y = c x 1 y = c x u process y Control objective: Stabilize process (keep state of the process bounded) Prototype adaptive control problem process can either be: P1 : x& = A1 x + b1u, or P : x& = A x + b u, y = c x 1 y = c x controller 1 controller u process y controller 1 stabilizes P 1 and controller stabilizes P 18
Prototype adaptive control problem How to choose online which controller to use? controller 1 σ controller u process y σ switching switching signal taking values on the set {1,} σ 1 Estimator-based architecture output estimation errors logic-based supervisor σ controller 1 e 1 e σ P 1 observer P observer controller u process y e 1 small likelihood of should use process being controller 1 P 1 is high Certainty equivalence inspired 19
Estimator-based architecture output estimation errors logic-based supervisor σ controller 1 e 1 e σ P 1 observer P observer controller u process y switched system Scale-independent hysteresis switching switching signal σ estimation errors performance signals (measure the size of the estimation errors) hysteresis constant (positive) e 1 e switched system 0
Scale-independent hysteresis switching How does one verify if x remains bounded along solutions to the hybrid system? switching signal σ switched system e 1 e Analyzing the system as a whole is too difficult. We need to: 1. abstract the complex behavior of each subsystem (supervisor & switched) to a small set of properties. infer properties of the overall system from the properties of the interconnected subsystems One-diagram analysis outline H1 hysteresis switching logic switching signal (discrete) H σ switched system estimation errors (continuous signals) One can show [S3] that H1 has the property that H has the property that (with δ = 0 when there is no unmodeled dynamics) finite L -induced gain from smallest error to the switched error vice-versa ( detectability through e σ ) 1
One-diagram analysis outline H1 hysteresis switching logic switching signal (discrete) H σ switched system One can show [S3] that H1 has the property that H has the property that (with δ = 0 when there is no unmodeled dynamics) estimation errors (continuous The signals) system is stable provided that γ. δ < 1 finite L -induced gain from smallest error to the switched error vice-versa ( detectability through e s ) Interconnections of switched system H1 H1 H H1 H H For interconnections through continuous signals, existing tools can be extended to hybrid systems (small gain, passivity, integral quadratic constrains, ISS, etc.) [6,7] H1 H1 H H1 H H For mixed interconnections new tools need to be developed continuous signal discrete signal
Conclusion application areas Congestion control in data networks Vision-based control Adaptive control Impact maps Lyapunov tools Interconnection of systems analytical tools Switched systems are ubiquitous and of significant practical application A unified theory of switched systems is barely starting to become available References Background surveys & tutorials: [S1] D. Liberzon, A. S. Morse, Basic problems in stability and design of switched systems, In IEEE Control Systems Magazine, vol. 19, no. 5, pp. 59-70, Oct. 1999. [S] J. Hespanha. Chapter Stabilization Through Hybrid Control. In Encyclopedia of Life Support Systems, 00. To appear. [S3] J. Hespanha. Tutorial on Supervisory Control. Lecture Notes for the workshop Control using Logic and Switching for the 40th Conf. on Decision and Contr., Orlando, Florida, Dec. 001. Papers referenced specifically in this talk: [1] S. Bohacek, J. Hespanha, J. Lee, K. Obraczka. Analysis of a TCP hybrid model. In Proc. of the 39th Annual Allerton Conference on Communication, Control, and Computing, Oct. 001. [] P. Peleties P., R. A. DeCarlo. Asymptotic stability of m-switched systems using Lyapunovlike functions. In Proc. of the 1991 Amer. Contr. Conf., pp. 1679 1684, 1991. [3] M. S. Branicky. Studies in Hybrid Systems: Modeling, Analysis, and Control. Ph.D. thesis, MIT, Cambridge, MA, 1995. [4] J. Hespanha. Extending LaSalle's Invariance Principle to Linear Switched Systems. In Proc. of the 40th Conf. on Decision and Contr., Dec. 001. [5] J. Hespanha, A. S. Morse. Certainty Equivalence Implies Detectability. Syst. & Contr. Lett., 36(1):1-13, Jan. 1999. [6] M. Zefran, F. Bullo, M. Stein, A notion of passivity for hybrid systems. In Proc. of the 40th Conf. on Decision and Contr., Dec. 001. [7] J. Hespanha. Root-Mean-Square Gains of Switched Linear Systems. To appear in Trans. of Autom. Contr. See also http://www.ece.ucsb.edu/~hespanha/published.html 3