Contents lecture 5 Automatic Control III Lecture 5 H 2 and H loop shaping Thomas Schön Division of Systems and Control Department of Information Technology Uppsala University. Email: thomas.schon@it.uu.se, www: user.it.uu.se/~thosc112 1. Summary of lecture 4 2. Specifications closed loop system 3. An extended system 4. H 2 control 5. H control 6. Design example 1 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 2 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Summary of lecture 4 (I/II) Summary of lecture 4 (II/II) The key difficulty in controlling multivariable systems is that there are cross couplings between the input and the output signals. The relative gain array (RGA) is a way of measuring the amount of cross couplings in a system RGA(G) G. (G ) T. Decentralized control means that we let every input be determined by feedback from one single output. The pairing problem is to select which input-output pairs that should be used for the feedback. Decoupled control makes use of a change of variables such that suitable pairings of measurements and control signals becomes easier to see. If there were no model errors and no disturbances we can make y follow r perfectly by choosing Q = G 1 in y = GQr. r + u y F r Q G 0 The idea in Internal Model Control (IMC) is to choose Q G 1 and feedback only using the new information y Gu. G + 3 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 4 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
Linear quadratic synthesis pros and cons Problem formulation (+) All reasonable (stabilizable and detectable, Q 1 0, Q 2 > 0, R 1 0, R 2 > 0) choices of Q 1, Q 2, R 1, R 2 results in a closed loop system with poles strictly in the left half plane. (+) Handles the trade-offs between the sizes of the different components in x and u well. (+) It is easy to adjust Q 1, Q 2 such that we obtain nice results in the time domain. (+) Some possibilities of handling robustness. (-) Hard to see how Q 1, Q 2, R 1, R 2 affects S, T, G wu, etc. For the system find the feedback control law y = G(p)u + w, u = F y (p)y, such that the closed loop system has good properties in terms of the sensitivity functions S and T, and the transfer function from disturbance to input response G wu. 5 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 6 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Direct synthesis of S, T and G wu Example of requirements: S We typically want the sensitivity S to be small for low frequencies where we are likely to have process disturbances (e.g. not to be sensitive to the slope of a hill). Classical methods (lead-lag) scalar systems. Intuitive design using Bode diagrams. Finding a compromize using optimization: H 2 design Fulfilling bounds on S, T and G wu : H design log S Today: H 2 design and H design. log ω Typically encoded using a function W S (iω) S(iω) W 1 S (iω), ω W SS 1. 7 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 8 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
Example of requirements: T We typically want the complementary sensitivity T to be small for high frequencies where we are likely to have e.g. measurement noise. log T Example of requirements: G wu Recall that G wu (or sometimes G ru ) is the gain from a disturbance (or reference) to the control signal. This gain is important in order to make sure that the control signals does not become too big. Analogously to what we did before, we obtain Typically encoded using a function W T (iω) log ω G wu (iω) W 1 u ω W u G wu 1 It is important to note that the requirements on S, T and G wu can collide, implying that a compromize must be made. T (iω) < 1 G (iω) ω W T T 1. 9 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 10 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Design spec. in the frequency domain Recall the H -norm Weightings of S, T and G wu : W S (iω)s(iω) W T (iω)t (iω) W u (iω)g wu (iω) Design criterion H 2 -design: Choose the controller such that V = W S S 2 2 + W T T 2 2 + W u G wu 2 2 is minimized. Design criterion H -design: Choose the controller such that Definition: The H -norm of the system y = G(p)u is given by G = sup u y 2 = sup σ(g(iω)) u 2 ω For scalar systems G = sup ω G(iω). The input u that maximizes the size of the outputs is a sinusoid with the frequency ω for which G(iω) attains its maximum. Interpretation: Highest peak/ worst case. W S S 1, W T T 1, W u G wu 1. 11 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 12 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
Recall the H 2 -norm An extended imaginary system G W (I/II) Definition: The H 2 -norm of the system y = G(p)u is given by G 2 2 = 1 2π G(iω) 2 2dω W u z 1 where G(iω) 2 2 = tr(g (iω)g(iω)). For a square matrix A = [a ij ] the trace is tr(a) = n a kk = k=1 n λ k (A). k=1 Interpretations due to Parseval s theorem: Deterministic: G 2 = g(t) 2, i.e. the 2-norm of the impulse response g(t). Stochastic: If u is a stochastic process with Φ u (ω) = I, then G 2 2 = 1 2π Φy (ω) 2 2 dω = tr(r y) = y 2 2. 13 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping An extended imaginary system G W (II/II) G W 0 G w u F y y W T z 2 W S z 3 When we close the system using u = F y y we have: z 1 = W u G wu w, z 2 = W T T w, z 3 = W S Sw 14 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Compact representation Introduce the performance variables z 1 W u G wu z = z 2 = W T T w G ec w z 3 W S S as (artificial) outputs of an extended closed loop system G ec with w as input. This way z 1, z 2 and z 3 represent the requirements for the closed loop system. w u G W F y y z State space realization of G W (i.e. state space model of the open loop system (u, w) (z, y)): ẋ = Ax + Bu + Nw z = Mx + Du y = Cx + w A technical assumption: Assume D T ( M D ) = ( 0 I ) Closed loop system: z = G ec w where z = z 2 z 3 z 1 15 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 16 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
Digital Signal Processing, TSRT78! T. Schön! Digital Signal Processing, TSRT78! T. Schön! Structural property MSc thesis example 1 General Wiener Filter Algorithm (Alg. 7.1)! 7 8 MSc Thesis Example 1! Vision and GPS Based Autonomous Landing of an Unmanned Aerial by Joel Hermansson, performed at Vision and GPS BasedVehicle, Autonomous Landing of an Unmanned Aerial Vehicle, Cybaero. by Joel Hermansson, performed at Cybaero.! Themsystem Select > 0 for prediction, m < 0 for smoothing and m = 0 for filtering.! 1. Spectral factorization!x = Ax + Bu + N w z = M x + Du y = Cx + w 2. Compute the filter (let the direct term be part of the causal term)! C x ),, where! if A N C has all its eigenvalues strictly in the LHP. Lots of signal processing (modelling, filtering, Modelling, filtering, Kalman filter, computer Kalman filter, computer vision, ) and some control(pid).! (several PIDs). control Lecture 8! 3. The Wiener filterx is= now by + N (y Ax given + Bu Digital Signal Processing, TSRT78! T. Schön! 17 / 33 T. Schön, 2014 18 / 33 Recall the H2 norm and the design criterion V (Fy ) = kgec k22 = kws Sk22 + kwt T k22 + kwu Gwu k22 is equivalent to minimizing kzk22 = km xk22 + kuk22. V = kws Sk22 + kwt T k22 + kwu Gwu k22 This is the LQG problem! (with z 0 = M x, Q1 = I and Q2 = I) is minimized. Automatic Control III, Lecture 5 H2 and H loop shaping Automatic Control III, Lecture 5 H2 and H loop shaping Minimizing the criterion Design criterion H2 -design: Choose the controller such that T. Schön, 2014 T. Schön, 2014 Optimal H2 control the problem Definition: The H2 -norm of the system y = G(p)u is given by Z Z 1 1 kgk22 = G(iω) 22 dω = tr (G (iω)g(iω)) dω. 2π 2π 19 / 33 Show movie!!! Show movie! Digital Signal Processing, TSRT78! T. Schön! Automatic Control III, Lecture 5 H2 and H loop shaping vision and of course Lecture 8! is on innovation form since v1 = v2 = w, which implies that the system is its own observer and the Kalman filter (K = N ) is simply 20 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H2 and H loop shaping
Optimal H 2 control the solution Solution provided by Theorem 9.1 (page 270). The optimal H 2 controller is given by (recall that the system is given on innovations form K = N in the Kalman filter) Recall the H norm and the design objective Definition: The H -norm of the system y = G(p)u is given by with Hence, ˆx = Aˆx + Bu + N(y C ˆx), u = Lˆx, L = B T S, 0 = A T S + SA + M T M SBB T S. F y (s) = L(SI A + BB T S + NC) 1 N G = sup u y 2 = sup σ(g(iω)) u 2 ω Design objective H -design: Find the controller that minimize G ec = max σ(g ec(iω)). ω This is a hard (non-convex) problem, instead we search for controllers that satisfies G ec < γ (If A NC not stable, compute and use the Kalman filter.) 21 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Optimal H control the solution 22 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping H control design steps Assume A T S + SA + M T M + S(γ 2 NN T BB T )S = 0 has a positive semidefinite solution S = S γ, and that A BB T S γ is stable. Consider the controller with L = B T S γ. Then ˆx = Aˆx + Bu + N(y C ˆx), u = L ˆx, 1. G is given. 2. Choose weights W u, W S, W T. 3. Form the extended system. 4. Choose a constant γ. 5. Solve the Riccati equation and compute L. 5.1 If no solution exists, increase γ and go to step 4. 5.2 If a solution exists, accept it, or decrease γ and go to step 4. 6. Check the properties of the closed loop system. If not acceptable, go to step 2. F y (s) = L (si A + BB T S γ + NC) 1 N 23 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 24 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
H 2, H synthesis pros and cons Linear multivariable controller synthesis (+) Directly handles the specifications on S, T and G wu (+) Let us know when certain specifications are impossible to achieve (via γ). (+) Easy to handle several different specifications (in the frequency domain) (-) Can be hard to control the behaviour in the time domain in detail. (-) Often results in complex controllers (number of states in the controller = number of states in G, W u, W S, W T ). Summary: 1. Perform an RGA analysis 2. Employ simple PID controllers if the RGA indicates that it is possible. 3. Otherwise make use of LQ, MPC or H 2 /H -synthesis. 25 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 26 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Design example (I/V) ³ DESIGN EXAMPLE Control the system G(s) = 0.2s+1. Bode plots s 2 +0.1s+1 Control the system ( ) = 0 2 +1 2 +0 1 +1, with Bode plot below: G(iω) 10 1 10 1 arg G(iω) 0 90 180 Design example (II/V) Specifications: 1. G wu (iω) < 4, ω G wu < 4. 2. T (iω) < 1.25, ω T < 1.25. 3. Integral action S(0) = 0. 4. Bandwidth ω G 2 rad/s Rule of thumb: ω B < z/2 for RHP zero z ω B < 2.5 rad/s here! 10 2 10 3 270 10 2 10 2 10 2 10 2 Difficulties: Difficulties: Higly Highly resonant resonant system, system, non-minimum non-minimum phase phase zero zero in in +5. +5. Try with the following weighting functions W u = 1 4 = 0.25, W T = 1 1.25 = 0.8, W S(s) = (0.5s) 1 = 2 s 27 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping ± ² Fall 2012 Automatic Control III:3 part 2 Page 8 28 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
Design example (III/V) Design example (IV/V) DESIGN EXAMPLE, cont d Four control strategies were employed: 1. PID control/lead-lag compensation: F (s) = K τ Ds + 1 τ I s + 1 βτ d s + 1 τ I s 2. IMC, with ( ) 1 0.2s + 1 1 Q(s) = 0.5s + 1 s 2 + 0.1s + 1 0.2s + 1 T (s) = (0.2s + 1)(0.5s + 1) 3. H 2 control 4. H control with γ = 2.9. Results: the sensitivity ³ Results: functions The sensitivity functions. S(iω) 10 1 10 2 29 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping ² PID IMC H 2 H 10 2 10 2 T(iω) 10 1 10 2 10 3 PID IMC H 2 H Fall 2012 Automatic Control III:3 part 2 Page 17 30 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping Design example (V/V) DESIGN EXAMPLE, cont d Outline entire course ± Results: Results: G w u and comparisons with the ³ ÛÙ and comparisons with the specifications. specifications. G wu (iω) 10 1 10 1 PID IMC H 2 Ì ½ ÛÙ ½ H À ½ À PID 1 294 T G1 64 wu 0 030 ω B IMC PID 1 00 1.29 10 0 1.64 2 00 0.030 IMC 1.00 10.0 2.00 1 00 3 23 1 28 H 2 1.00 3.23 1.28 H 1 00 1.00 3 83 3.83 2 45 2.45 10 2 10 2 All controllers have integral action. All controllers have integral action. 1. Lecture 1: Introduction and linear multivariable systems 2. Lecture 2 5: Multivariable linear control theory a) systems theory, closed loop system b) Basic limitations c) Controller structures and control design d) H 2 and H loop shaping 1. Lecture 6 8: Nonlinear control theory a) Linearization and phase portraits b) Lyapunov theory and the circle criterion c) Describing functions 2. Lecture 9: Optimal control 3. Lecture 10: Summary and repetition ± Fall 2012 Automatic Control III:3 part 2 Page 18 ² 31 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping 32 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping
A few concepts to summarize lecture 5 Extended system: Allows us to systematically incorporate design specifications in the frequency domain by extending the system G. This is done by introducing three performance variables z 1, z 2 and z 3 which are viewed as artificial outputs of the system. H -norm: The H -norm of the system y = G(p)u is given by y G = sup 2 u u 2 = sup ω σ(g(iω)). Interpretation: highest peak/ worst case. H 2 -norm: The H 2 -norm of the system y = G(p)u is given by G 2 2 = 1 2π G(iω) 2 2dω. Interpretation: total energy. 33 / 33 T. Schön, 2014 Automatic Control III, Lecture 5 H 2 and H loop shaping