CDS : Lecture 4. Linear Systems Richard M. Murray 8 October 4 Goals: Describe linear system models: properties, eamples, and tools Characterize stability and performance of linear systems in terms of eigenvalues Compute linearization of a nonlinear systems around an equilibrium point Reading: Åström and Murray, Analysis and Design of Feedback Systems, Ch 4 Packard, Poola and Horowitz, Dynamic Systems and Feedback, Sections 9,, (available via course web page)
Lecture Review 3.: Stability from Last and Week Performance - -π π Key topics for this lecture Stability of equilibrium points Local versus global behavior Performance specification via step and frequency response.5 u y.5 5 5 5 5 5 8 Oct 4 R. M. Murray, Caltech CDS
What is a Linear System? Linearity of functions: f : Zero at the origin: f () = n Addition: f ( + y) = f( ) + f( y) Scaling: f ( α ) = α f ( ) m f( α + β y) = Canonical eample: α f ( ) + β f( y) f ( ) = A Linearity of systems: sums of solutions Dynamical system = A Control system = A+ Bu y = C + Du () = t () = () t () = α + β () = t () = () t t () = α() t + β() t () =, u( t) = u ( t) y() t = y () t () =, u( t) = u ( t) y() t = y () t () =, u( t) = αu ( t) + βu ( t) y() t = αy () t + βy () t 8 Oct 4 R. M. Murray, Caltech CDS 3
Linear Systems u u = A+ Bu y = C + Du () = y y Input/output linearity at () = Linear systems are linear in initial condition and input need to use () = to add outputs together For different initial conditions, you need to be more careful (sounds like a good midterm question) - - + 5 + 5.5 u u + u - 5-5 y y + y -.5 5-5 Linear system step response and frequency response scale with input amplitude X input X output Allows us to use ratios and percen-tages in step/freq response. These are independent of input amplitude Limitation: input saturation only holds up to certain input amplitude 8 Oct 4 R. M. Murray, Caltech CDS 4
Why are Linear Systems Important? Many important eamples Electronic circuits Many important tools Frequency response, step response, etc Traditional tools of control theory Developed in 93 s at Bell Labs; intercontinental telecom Especially true after feedback Frequency response is key performance specification (think telephones) Many mechanical systems q k m q Quantum mechanics, Markov chains, u (t ) k m k 3 b Classical control design toolbo Nyquist plots, gain/phase margin Loop shaping Optimal control and estimators Linear quadratic regulators Kalman estimators Robust control design H control design μ analysis for structured uncertainty 8 Oct 4 R. M. Murray, Caltech CDS 5 CDS / a CDS b CDS b/
Solutions of Linear Systems: The Matri Eponential = A+ Bu y = C+ Du Scalar linear system, with no input yt ( ) =??? y = a = c () = t () at at = e yt () = ce Matri version, with no input = A () = y = C t () e At yt () = Ce At = initial(a,b,c,d,); Matri eponential Analog to the scalar case; defined by series epansion: e M I M M M! 3! 3 = + + + +L P = epm(m) 8 Oct 4 R. M. Murray, Caltech CDS 6
= A+ Bu y = C+ Du Stability of Linear Systems () t = e At Q: when is the system asymptotically stable? lim t ( ) = t Stability is determined by the eigenvalues of the matri A Simple case: diagonal system λ = O λn λt e t () = O λnt e More generally: transform to Jordan form & = T JT J J = O J k λi = O λi Form of eigenvalues determines system behavior Linear systems are automatically globally stable or unstable J i Stable if λ i Asy stable if λ i < Unstable if λ i > Asy stable if Re(λ i ) < Unstable if Re( λ i )> Indeterminate if Re( λ i )= 8 Oct 4 R. M. Murray, Caltech CDS 7
Eigenstructure of Linear Systems Real e-values Re(λ i ) <.8.6.4. -. Real e-values Re(λ i ) < Re(λ j ) >.8.6.4. -. -.4 -.4 -.6 -.6 -.8 -.8 Comple e-values Re(λ i ) = - - -.5.5.8.6.4. -. -.4 -.6 -.8 - - -.5.5 Comple e-values Re(λ i ) < - - -.5.5.8.6.4. -. -.4 -.6 -.8 - - -.5.5 8 Oct 4 R. M. Murray, Caltech CDS 8
Step and Frequency Response = A+ Bu y = C+ Du ut () = () t ut () = Asin( ωt) Effect of eigenstructure on step response Comple eigenvalues with small real part lead to oscillatory response Frequency of oscillations ω i Effects of eigenstructure on frequency response Eigenvalues determine break points for frequency response Comple eigenvalues lead to peaks in response function near ω i Imag Ais Phase (deg); Magnitude (db) - Pole-zero map - -5 - -5 5-5 - - - ω p Real Ais Amplitude..5..5 Bode Diagrams ω p - Frequency (rad/sec) Step Response T π/ω p 5 5 5 3 Time (sec.) 8 Oct 4 R. M. Murray, Caltech CDS 9
Computing Frequency Responses Technique #: plot input and output, measure relative amplitude and phase Use MATLAB or SIMULINK to generate response of system to sinusoidal output.5.5 A u A y u y Gain = A y /A u Phase = π ΔT/T Note: In general, gain and phase will depend on the input amplitude -.5 - ΔT T -.5 5 5 Technique # (linear systems): use MATLAB bode command Assumes linear dynamics in state space form: = A+ Bu y = C+ Du Gain plotted on log-log scale db = log (gain) Phase plotted on linear-log scale Frequency (rad/sec) 8 Oct 4 R. M. Murray, Caltech CDS Phase (deg) Magnitude (db) - - -3-4 -5-6 -9-8 -7-36 bode(a,b,c,d).
Eample: Electrical Circuit C 3 v i ~ R R C v o Derivation based on Kirchoff s laws for electrical circuits (Ph ) Sum of currents at nodes = : dv v v v v3 dv ( 3 v) v3 v C = C = dt R R dt R Rewrite in terms of new states: v c =v, v c =v 3 v Bridged Tee Circuit d dt v + c C R v R CR c + C R R v v = c v + c V c CR CR i v o [ ] v v c = + c v i 8 Oct 4 R. M. Murray, Caltech CDS
Linear Control Systems and Convolution = A+ Bu y = C+ Du Impulse response, h(t) = Ce At B Response to input impulse Equivalent to Green s function yt () = Ce At () +??? homogeneous Linearity compose response to arbitrary u(t) using convolution Decompose input into sum of shifted impulse functions Compute impulse response for each Sum impulse response to find y(t) Complete solution: use integral instead of sum t () = At A( t τ ) () + ( τ) τ + () τ = yt Ce Ce Bu d Dut linear with respect to initial condition and input X input X output when () = 8 Oct 4 R. M. Murray, Caltech CDS
Matlab Tools for Linear Systems t At A( t τ ) () = () + ( τ) τ + () yt Ce Ce Bu d Dut τ = A = [- ; -]; B = [; ]; C = [ ]; D = []; = [;.5]; sys = ss(a,b,c,d); initial(sys, ); impulse(sys); Amplitude To: Y().8.6.4. Initial Condition Results 3 4 5 6 7 Linear Simulation Results t = :.:; u =.*sin(5*t) + cos(*t); lsim(sys, u, t, ); Other MATLAB commands gensig, square, sawtooth produce signals of diff. types step, impulse, initial, lsim time domain analysis bode, freqresp, evalfr frequency domain analysis Amplitude To: Y().5 -.5 3 4 5 6 7 8 9 Time (sec.) ltiview linear time invariant system plots 8 Oct 4 R. M. Murray, Caltech CDS 3
Linearization Around an Equilibrium Point = f(, u) z& = Az+ Bv y = h(, u) w= Cz+ Dv Linearize around = e f( e, ue) = ye = h( e, ue) z = v = u u w= y y e e e f A= B = f u (, u ) (, u ) e e e e h C = D = h u (, u ) (, u ) e e e e Remarks In eamples, this is often equivalent to small angle approimations, etc Only works near to equilibrium point - -π π.4.3.. -. -. -.3 -.4 -.3 -. -....3 Full nonlinear model.4.3.. -. -. -.3 -.4 -.3 -. -....3 Linear model (honest!) 8 Oct 4 R. M. Murray, Caltech CDS 4
Local Stability of Nonlinear Systems Asymptotic stability of the linearization implies local asymptotic stability of equilibrium point Linearization around equilibrium point captures tangent dynamics = f( ) = A ( + o ( ) e ) e higher order terms If linearization is unstable, can conclude that nonlinear system is locally unstable If linearization is stable but not asymptotically stable, can t conclude anything about nonlinear system: 3 & = =± linearize & linearization is stable (but not asy stable) nonlinear system can be asy stable or unstable Local approimation particularly appropriate for control systems design Control often used to ensure system stays near desired equilibrium point If dynamics are well-approimated by linearization near equilibrium point, can use this to design the controller that keeps you there (!) 8 Oct 4 R. M. Murray, Caltech CDS 5
Eample: Inverted Pendulum on a Cart m θ f M State:, θ,, & θ Input: u = F Output: y = Linearize according to previous formula around θ = π 8 Oct 4 R. M. Murray, Caltech CDS 6
Summary: Linear Systems u = A+ Bu y = C+ Du () = y + - 5 + - 5.5-5 - 5 -.5 5-5 t () = At A( t τ ) () + ( τ) τ + () τ = yt Ce Ce Bu d Dut Properties of linear systems Linearity with respect to initial condition and inputs Stability characterized by eigenvalues Many applications and tools available Provide local description for nonlinear systems 8 Oct 4 R. M. Murray, Caltech CDS 7