LINEAR QUADRATIC GAUSSIAN

Similar documents
Control Systems Design

5. Observer-based Controller Design

Linear State Feedback Controller Design

EL2520 Control Theory and Practice

Subject: Optimal Control Assignment-1 (Related to Lecture notes 1-10)

MODERN CONTROL DESIGN

Lecture 9. Introduction to Kalman Filtering. Linear Quadratic Gaussian Control (LQG) G. Hovland 2004

Topic # Feedback Control Systems

Chapter 9 Observers, Model-based Controllers 9. Introduction In here we deal with the general case where only a subset of the states, or linear combin

6 OUTPUT FEEDBACK DESIGN

Chapter 3. LQ, LQG and Control System Design. Dutch Institute of Systems and Control

Course Outline. Higher Order Poles: Example. Higher Order Poles. Amme 3500 : System Dynamics & Control. State Space Design. 1 G(s) = s(s + 2)(s +10)

Here represents the impulse (or delta) function. is an diagonal matrix of intensities, and is an diagonal matrix of intensities.

Integral action in state feedback control

Lecture 4 Continuous time linear quadratic regulator

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

Fall 線性系統 Linear Systems. Chapter 08 State Feedback & State Estimators (SISO) Feng-Li Lian. NTU-EE Sep07 Jan08

OUTPUT-FEEDBACK CONTROL

Topic # Feedback Control. State-Space Systems Closed-loop control using estimators and regulators. Dynamics output feedback

Steady State Kalman Filter

Time-Invariant Linear Quadratic Regulators Robert Stengel Optimal Control and Estimation MAE 546 Princeton University, 2015

LQR, Kalman Filter, and LQG. Postgraduate Course, M.Sc. Electrical Engineering Department College of Engineering University of Salahaddin

Automatic Control II Computer exercise 3. LQG Design

CONTROL DESIGN FOR SET POINT TRACKING


CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems. CDS 110b

Time-Invariant Linear Quadratic Regulators!

6.241 Dynamic Systems and Control

1 Steady State Error (30 pts)

D(s) G(s) A control system design definition

Pole placement control: state space and polynomial approaches Lecture 2

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

H 2 Optimal State Feedback Control Synthesis. Raktim Bhattacharya Aerospace Engineering, Texas A&M University

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

State Regulator. Advanced Control. design of controllers using pole placement and LQ design rules

Control Design. Lecture 9: State Feedback and Observers. Two Classes of Control Problems. State Feedback: Problem Formulation

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli

Time Response Analysis (Part II)

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

Topic # Feedback Control Systems

VECTOR RANDOM PROCESSES

EEE582 Homework Problems

Optimal Control. Quadratic Functions. Single variable quadratic function: Multi-variable quadratic function:

Stochastic Optimal Control!

MATH4406 (Control Theory) Unit 1: Introduction Prepared by Yoni Nazarathy, July 21, 2012

Optimal control and estimation

Introduction & Laplace Transforms Lectures 1 & 2

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems. CDS 110b

Lecture 5 Linear Quadratic Stochastic Control

LQ Control of a Two Wheeled Inverted Pendulum Process

INVERSE MODEL APPROACH TO DISTURBANCE REJECTION AND DECOUPLING CONTROLLER DESIGN. Leonid Lyubchyk

Optimization-Based Control

Optimal Polynomial Control for Discrete-Time Systems

Last week: analysis of pinion-rack w velocity feedback

Predictive Control of Gyroscopic-Force Actuators for Mechanical Vibration Damping

CDS 101/110a: Lecture 8-1 Frequency Domain Design

Suppose that we have a specific single stage dynamic system governed by the following equation:

Exam. 135 minutes, 15 minutes reading time

OPTIMAL CONTROL AND ESTIMATION

Dr Ian R. Manchester

06 Feedback Control System Characteristics The role of error signals to characterize feedback control system performance.

EECS C128/ ME C134 Final Wed. Dec. 14, am. Closed book. One page, 2 sides of formula sheets. No calculators.

First-Order Low-Pass Filter!

Return Difference Function and Closed-Loop Roots Single-Input/Single-Output Control Systems

OPTIMAL CONTROL. Sadegh Bolouki. Lecture slides for ECE 515. University of Illinois, Urbana-Champaign. Fall S. Bolouki (UIUC) 1 / 28

MS-E2133 Systems Analysis Laboratory II Assignment 2 Control of thermal power plant

State Observers and the Kalman filter

Linear Quadratic Gausssian Control Design with Loop Transfer Recovery

(Refer Slide Time: 00:01:30 min)

Exam. 135 minutes + 15 minutes reading time

Topic # Feedback Control

Contents lecture 5. Automatic Control III. Summary of lecture 4 (II/II) Summary of lecture 4 (I/II) u y F r. Lecture 5 H 2 and H loop shaping

(Continued on next page)

Raktim Bhattacharya. . AERO 632: Design of Advance Flight Control System. Preliminaries

Lecture 7 : Generalized Plant and LFT form Dr.-Ing. Sudchai Boonto Assistant Professor

Raktim Bhattacharya. . AERO 422: Active Controls for Aerospace Vehicles. Basic Feedback Analysis & Design

Observability and state estimation

Modern Optimal Control

EE5102/6102 Multivariable Control Systems

Solution of Linear State-space Systems

First-Order Low-Pass Filter

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL

Video 5.1 Vijay Kumar and Ani Hsieh

Introduction to Controls

FEEDBACK CONTROL SYSTEMS

Topic # /31 Feedback Control Systems. State-Space Systems Closed-loop control using estimators and regulators. Dynamics output feedback

Topic # /31 Feedback Control Systems

Overview of the Seminar Topic

CBE507 LECTURE III Controller Design Using State-space Methods. Professor Dae Ryook Yang

Lecture 19 Observability and state estimation

A FEEDBACK STRUCTURE WITH HIGHER ORDER DERIVATIVES IN REGULATOR. Ryszard Gessing

EE221A Linear System Theory Final Exam

An Introduction to Control Systems

Feedback Control of Linear SISO systems. Process Dynamics and Control

Stochastic Models, Estimation and Control Peter S. Maybeck Volumes 1, 2 & 3 Tables of Contents

Theory in Model Predictive Control :" Constraint Satisfaction and Stability!

Control Systems! Copyright 2017 by Robert Stengel. All rights reserved. For educational use only.

Solution to HW State-feedback control of the motor with load (from text problem 1.3) (t) I a (t) V a (t) J L.

Control System Design

Stochastic and Adaptive Optimal Control

Transcription:

ECE553: Multivariable Control Systems II. LINEAR QUADRATIC GAUSSIAN.: Deriving LQG via separation principle We will now start to look at the design of controllers for systems Px.t/ D A.t/x.t/ C B u.t/u.t/ C B w.t/w.t/ y.t/ D C y.t/x.t/ C v.t/: where w.t/, v.t/ are white, Gaussian, zero-mean, independent. v.t/ N.; S v /; w.t/ N.; S w /; x./ N.x ; x; /: Time-varying plant dynamics can be handled quite easily, but wewill concentrate on time-invariant case. OBJECTIVE: Design a compensator U D G c.s/y so that the closed-loop system is stable, and system achieves good performance. Our goal will be to minimize the cost function J D E xt.t f /H x.t f / C Z tf x T.t/Qx.t/ C u T.t/Ru.t/ dt ; where H; Q; R > and we measure only the system output. We have seen two versions of this problem already:. Noise-free: u.t/ D K.t/x.t/.. Noisy, but with complete state observations: u.t/ D K.t/x.t/. Same K.t/ but cost is increased. 3. Now, noisy output observations. We will show that u.t/ D K.t/ Ox.t/ where Ox.t/ is the output of a Kalman filter. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN This is called the separation principle using estimate Ox.t/ as if it were the true state. KEY POINT: This is exactly the same separation operation that we performed before when we designed state-space controllers via pole-placement techniques. Validation of that procedure was based only on the stability of the closed-loop system. We are now saying that the separation into two independent optimal sub-problems is actually what optimizes the original objective. On one hand, the separation is intuitively appealing: Ox.t/ is our best guess of what is going on inside the system. So, in some sense, it is clear we should use it in the regulator. But to extend this intuition further and postulate that it is actually the optimal procedure to follow is not obvious. (e.g., Noise) Uncertainty ) Reduced control gains??) Separation Principle for Optimal Performance Our approach to solving the optimal control problem with finite and noisy measurements will be. Rewrite cost and system in terms of the estimator states and dynamics Can access these.. Design a stochastic LQR w.t/ u.t/ Plant v.t/ y.t/ controller for this revised system Full state feedback of Ox.t/. K.t/ Ox.t/ Kalman filter 3. Connection u.t/ D K.t/ Ox.t/. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 3 Start with the cost EŒx T Qx D EŒfx Ox COxg T Qfx Ox COxg D EŒfx Oxg T Qfx Oxg C EŒfx Oxg T Q Ox C EŒ Ox T Q Ox D EŒ Qx T Q Qx C EŒ Qx T Q Ox C EŒ Ox T Q Ox : Each term is a scalar, and unchanged by the trace operator, EŒx T Qx D trace.eœ Qx T Q Qx / C trace.eœ Qx T Q Ox / C EŒ Ox T Q Ox D trace.eœ Qx Qx T Q / C trace.eœ Ox Qx T Q / C EŒ Ox T Q Ox D trace. x Q/ C EŒ Ox T Q Ox because Ox and Qx are orthogonal if a Kalman filter is used to estimate x (Proved in text). We can now write the LQG cost as J D E OxT.t f /H Ox.t f / C C trace x.t f /H C Z tf Z tf Ox T.t/Q Ox.t/ C u T.t/Ru.t/ dt x.t/q dt The terms within the tracefg operator are independent of the control input u.t/ so J is minimized whenever J D E OxT.t f /H Ox.t f / C Z tf Ox T.t/Q Ox.t/ C u T.t/Ru.t/ dt is minimized. This looks like a stochastic LQR problem in the (measurable) state Ox. But, note that the dynamics of Ox are different from the dynamics of x. Need to show that the assumptions of LQR are met. : Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 4 Estimator dynamics: P Ox.t/ D A Ox.t/ C Bu u.t/ C L.t/ y.t/ C y Ox.t/ : KEY FACT: The innovations process r.t/ D y.t/ C y Ox.t/ is white, Gaussian N.; S v /.(ShowninsectionAofbookappendix). So, LQG problem is to minimize J D E OxT.t f /H Ox.t f / C Z tf subject to the dynamics Ox T.t/Q Ox.t/ C u T.t/Ru.t/ dt C const P Ox.t/ D A Ox.t/ C Bu u.t/ C L.t/r.t/ L.t/ known; r.t/ N.; S v /: This is a (strange looking) stochastic LQR problem. Solution independent of the white driving noise. Optimal solution a linear feedback law u.t/ D K.t/ Ox.t/. K.t/ is from solution of LQR with data (A, B, Q, R)... same. Therefore, LQG D combination of LQR/LQE is PERFORMANCE OPTIMAL. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 5.: Satellite-tracking example EXAMPLE: Asatellitetrackingantenna,subjecttorandomwindtorques, can be modeled as " # " #" # " # " # P.t/.t/ D C u.t/ C w.t/ R.t/ : P.t/ : : h i " #.t/ y.t/ D C v.t/; P.t/ where.t/ is the pointing error of the antenna in degrees, u.t/ is the control torque in Nm,and w.t/ is the wind torque (disturbance input) in Nm. The wind torque is assumed to be white noise with a spectral density of S w D 5 N m Hz. The measurement noise is white with a spectral density S v D deg Hz. The cost function to be minimized is Z J D E q.t/ C ru.t/ dt : The simulation is initialized with " # " # Ox./ D ; x./ D : The MATLAB code is from Burl. Results follow. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN First, the baseline example with: q D 8; r D ; Sw D 5; S v D..4 Feedback gains 8 4 Kalman gains.3.. 4 8 4 3 Actual Estimated 4 8 5 Angle error (deg) Control (N-m) 5 4 8 Time (sec) 4 8 Increased regulation requirement: q D 8; r D ; Sw D 5; S v D. Statefeedbackgainsarelargerandapproachsteadystate more rapidly, but Kalman gains remain the same. Larger control inputs and better control performance..4 Feedback gains 8 4 Kalman gains.3.. Angle error (deg) 4 8.5.5.5 Actual Estimated Control (N-m) 4 8 4 4 8 Time (sec) 4 4 8 Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 7 Increased control-effort penalty: q D 8; r D ; Sw D 5; S v D. State feedback gains smaller, converge more slowly. Kalman gains remain the same. Smaller control inputs, increased angle errors. Feedback gains 8 4 Kalman gains.4.3.. Angle error (deg) 4 8 5 5 Actual Estimated 5 4 8 Time (sec) Control (N-m) 4 8 8 4 4 8 High disturbance: q D 8; r D ; Sw D 5; S v D. Kalmangains larger, converge much more rapidly. State feedback gains remain the same. Large gains make estimator faster but larger plant noise means that estimate is less accurate. Control input also increased due to larger gains and increased plant noise. Angle error increased by roughly, which is square-root of increase in spectral density. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 8.5 8 Feedback gains 4 Kalman gains.5 Angle error (deg) 4 8 Actual Estimated Control (N-m) 4 8 4 4 8 Time (sec) 4 4 8 Large sensor noise: q D 8; r D ; Sw D 5; S v D. Kalman gains smaller, converge more slowly. State feedback gains remain same. Smaller Kalman gains make estimator slower and larger measurement noise makes estimates less accurate. Control is poorer due to increased measurement noise.. Feedback gains 8 4 Kalman gains.5.4.3.. Angle error (deg) 4 8 4 Actual Estimated Control (N-m) 4 8 4 4 4 8 Time (sec) 4 4 8 Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 9.3: Steady-state LQG control and the compensator Assume time-invariant plant dynamics. Use steady-state cost. Analysis (Stengel) shows (where.t/ D C x.t/) J LQG D lim EΠT.t/Q.t/ C u T.t/Ru.t/ t! D trace x;ss L ss S v L T ss C x;ss C T Q C D trace n o x;ss B w S w Bw T C x;ss Kss T RK ss where terms are labeled regulator or estimator and A T x;ss C x;ss A C C T Q C x;ss B u R B T u x;ss D A x;ss C x;ss A T C B w S w B T w x;ssc T y S v C y x;ss D and L ss D x;ss Cy T S v ; K ss D R Bu T x;ss. Can evaluate steady-state cost from the solution of two Riccati equations. More complicated than the stochastic LQR result J LQR D trace.q C K T ss RK ss/ x;ss : Reason: JLQG must also account for cost increase because of estimation error. In LQG, Ox x in general. Concepts of () Regulation error (x ) and () Estimation error ( Ox x). Both contribute to the cost. Further interpretations FAST REGULATOR: To see that both errors contribute, consider the result of a very fast regulator Control effort cheap, R!. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN Precise analysis requires we find impact of R! on x;ss but n o J LQG D trace x;ss L ss S v L T ss C x;ssc T Q C ƒ not fn of R trace x;ss C T Q C for all R In particular lim J LQG trace x;ss C T Q C. R! Even in the limit of no control penalty, the cost is lower-bounded by a term associated with the estimation error in the state x;ss. FAST ESTIMATOR: Low sensor noise and fast estimation, S v!. Use second identity to show lim J LQG trace x;ss B w S w Bw T. S v! Regulation error remains: lower bound on performance with fast estimator. Both cases illustrate that it is futile to make either the estimator or the regulator much faster than the other. Ultimate performance limited and quickly reach point of diminishing returns. RULE OF THUMB: Select R, S v so that estimator and regulator poles are roughly the same (order of magnitude) distance to origin Similar levels of authority. Since S v is generally physical, this places a design constraint on R. The compensator Classical control system design techniques create a compensator D.s/ to control a plant G.s/. State-space methods use state feedback and estimation. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN Can combine the state-feedback law and estimation law to derive a compensator. Usually called K.s/. REGULATOR: u.t/ D K.t/ Ox.t/ where K.t/ D R B T u P.t/ P P.t/D A T P.t/C P.t/AC C T Q C P.t/B u R B T u P.t/I P.t f / D H: ESTIMATOR: Dynamics P Ox.t/ D A Ox.t/ C Bu u.t/ C L.t/ y.t/ C y Ox.t/ ; Ox./ D EŒx L.t/ D x.t/c T y S v P x.t/ D A x.t/ C x.t/a T C B w S w B T w x.t/c T y S v C y x.t/i x./ D x; : COMPENSATOR: Combine the above to get (where x c DOx) Px c.t/ D.A B u K.t/ L.t/C y /x c.t/ C L.t/y.t/ u.t/ D K.t/x c.t/: In steady-state, L.t/ D Lss and K.t/ D K ss and we get Px c.t/ D.A B u K ss L ss C y /x c.t/ C L ss y.t/ u.t/ D K ss x c.t/: We can then generate a transfer function for the compensator (what are N A, NB, and NC?) K.s/ D NC.sI N A/ NB: u.t/ G.s/ y.t/ r.t/ G.s/ y.t/ K.s/ ::: or ::: K.s/ Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN Closed-loop poles (steady-state) The regulator has poles at det.si A C Bu K ss / D ; The estimator has poles at det.si A C Lss C y / D ; The closed-loop poles are the combination of regulator and estimator poles (via the separation principle). The compensator poles are at det.si A C Bu K ss C L ss C y / D which are neither the estimator nor the regulator poles. In particular, the compensator might be unstable! Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 3.4: Reference tracking So far, we have discussed only regulator design forcing the system state to zero as quickly as possible and keeping it there. This is the same as tracking the reference input. What if we want to track a more complicated reference signal? Tracking constant reference inputs TRACKING VIA COORDINATE TRANSLATION: Aconstantplantoutputcan be generated if the plant state is constant. Generate the desired constant plant output with a specific state xd and regulate around that state. u.t/ D KŒx.t/ x d.t/ : The desired state is chosen so that Cy x d D r. Often, many different xd will work in this equation. There is usually steady-state error when using this reference-tracking method. Form Nx.t/ D x.t/ x d.t/. Then, PNx.t/ DPx.t/ D AŒ Nx.t/ C x d C B u Œ K Nx.t/ D.A B u K/Nx.t/ C Ax d : Notice that this differential equation is not homogeneous it has input Ax d.so,ingeneral,nx.t/!. We have an additional constraint Axd D. Thiscanbemetonlyifx d is in the null-space of A. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 4 In order for A to have a null-space, it must be singular have an eigenvalue of. Anintegrator!(MoreonthislaterifA does not have an integrator). In general, A must have as many eigenvalues as there are reference inputs. If Cy x d D r and Ax d D then the plant model becomes PNx.t/ D A Nx.t/ C B u u.t/ and standard LQR theory can be applied to generate u.t/. FEEDFORWARD CONTROL: An alternate approach, which works even when A does not contain integrators, is u.t/ D Kx.t/ C K r r where K r r is feedforward control (like the NN approach in ECE55). The closed-loop system is Px.t/ D.A B u K/x.t/ C B u K r r y.t/ D C y x.t/: Assuming stability, using the final value theorem, y./ D C y.a B u K/ B u K r r: The inverse exists because the closed-loop A cl matrix is stable, so has no eigenvalues at. Set r D y./ and solve for Kr.Forasquaresystem, K r D ŒC y.a B u K/ B u : Kr is the inverse of the dc-gain of the system. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 5 Not a robust method. Feed-forward control is more sensitive to plant modeling errors than feedback control. EXAMPLE: Consider the state equation " # " # Px.t/ D x.t/ C u.t/ h i y.t/ D x.t/ and the LQR cost function J D Z y.t/ C :u.t/ dt: Using feedforward control, h i u.t/ D 3 5:9 x.t/ C 33r: y(t).4..8..4..5.5 Time (sec) Control torque 35 3 5 5 5.5.5 Time (sec) Zero steady-state error has been achieved since our model is perfect. INTEGRAL CONTROL: We saw in the first method that constant reference tracking could be achieved if the plant contained integrator(s). If the plant does not contain integrators, we can add them: r.t/ u.t/ Plant y.t/ e.t/ s x I.t/ Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN The integrator error equation is Px I.t/ D e.t/ D r.t/ y.t/ D r.t/ C y x.t/: Note that there are as many integrators as there are reference inputs. We can include the integral state into our normal state-space formby augmenting the system dynamics " Px.t/ Px I.t/ # D " A C y #" # x.t/ C x I.t/ " Bu # " u.t/ C I # r.t/: Note that the new A matrixhasanopen-loopeigenvalueatthe origin. This corresponds to increasing the system type, and integrates out steady-state error. LQR may be used to generate a state feedback for the augmented plant. Use a cost function that penalizes the integral of the error J D D Z tf Z tf x T I.t/x I.t/ C u T.t/Ru.t/ dt h x T.t/ x T I.t/ i " I #" x.t/ x I.t/ # C u T.t/Ru.t/ dt: The control weighting matrix R is generated by trial-and-error since the physical meaning of the cost function is nebulous. The control law is, " # x.t/ u.t/ D K.t/ x I.t/ i D hk " # x.t/ x K I : x I.t/ Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 7 Generally, integral control is more robust and precise than the other two methods. EXAMPLE: For the same system considered in the example for feedforward control, use integral control instead. The augmented system becomes " Px.t/ Px I.t/ # D 4 3 " 7 x.t/ 5 x I.t/ # C 4 3 7 5 u.t/ C 4 3 7 5 r.t/: Ignoring the reference input and applying LQR gives h i Z t u.t/ D 3 7 x.t/ C fr y.t/g dt: The control weighting R D : was chosen by trial and error to yield desirable pole locations. y(t).4..8..4..5.5.5 3 Time (sec) Control torque 8 4.5.5.5 3 Time (sec) Tracking time-varying reference inputs The integration method of eliminating steady-state error may be generalized in order to track more complicated reference-inputs. Integration works with dc signals since it puts an open-loop pole at dc. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 8 Generally, increasing the open-loop gain in a certain band of frequencies will improve closed-loop tracking of those frequencies. The system dynamics are augmented by a filter: r.t/ u.t/ Plant y.t/ e.t/ Filter x f.t/ Zero steady-state tracking error is obtained when the poles in the Laplace transform of the reference input are also poles of the loop transfer function. This is called the internal (signal) model principle. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 9.5: Designing for disturbance rejection LQG is designed to reject white-noise disturbances, but may be suboptimal when applied to nonwhite disturbances. Can modify LQG to reject nonwhite disturbance. Feedforward disturbance cancellation with full information Assume that the state and disturbance are measured exactly. Px.t/ D Ax.t/ C B u u.t/ C B wo w o y.t/ D C y x.t/ where w o is a constant disturbance input. Use LQR to generate a state-feedback K matrix, ignoring disturbance input. Use u.t/ D Kx.t/ C K w w : The closed-loop state equation is Px.t/ D.A B u K/x.t/ C B u K w w C B w w : The steady-state output due to disturbance input is y w./ D C y.a B u K/ B w w and the steady-state output due to the feedforward control is y u./ D C y.a B u K/ B u K w w : These two terms should cancel to eliminate steady-state error due to disturbance Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN C y.a B u K/ B w w C y.a B u K/ B u K w w D which gives K w D fc y.a B u K/ B u g C y.a B u K/ B w : As with reference tracking, feedforward disturbance canceling is not very robust. EXAMPLE: The angular velocity of a field-controlled dc motor is required to equal a set point regardless of the load torque. The state equation of the " motor# is " #" P!.t/ D P M.t/ : h i y.t/ D x.t/; # " # " #!.t/ C u.t/ C L.t/ M.t/ : where! is the angular velocity; M is the motor torque and L is the load torque. The LQR cost function is J D Z!.t/ C :u.t/ dt: We get h i u.t/ D 4: : x.t/ 7: L.t/: Simulation of step load torque with set-point of zero: Angular velocity (rad/s).3.5..5..5 Field voltage (V) 5 5.5 5 5 5 5 Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN Simulation output perfect due to exact model used. Feedforward disturbance cancellation with partial information Usually we have only noisy partial state measurements. Estimate both the plant state and disturbance using a Kalman filter. To estimate disturbance, the plant model must be augmented with a filter that generates a nearly-constant disturbance. w.t/ s w o.t/ u.t/ Plant The integral has an artificial noise input that allows the disturbance input to change slowly. v.t/ y.t/ The plant state model for designing the Kalman filter is then " # " #" # Px.t/ A Bw x.t/ D C Pw.t/ w.t/ h i " # x.t/ y.t/ D C y C v.t/ w.t/ " Bu # u.t/ C The disturbance-canceling controller that uses the noisy partial measurements is then u.t/ D K Ox.t/ K w Ow.t/; where K is calculated via LQR and K w is calculated as before. Integral control for disturbance canceling " I # w.t/ Integral control may also be used to eliminate steady-state errors due to step-like disturbances. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN The Kalman filter must estimate both the plant state and the disturbance input; if it estimates only the plant state it will be biased by the disturbance (the assumptions made when deriving the Kalman filter are violated by non white-noise disturbance). K w w.t/ u.t/ K x =s Oe O L.t/ r.t/ L.t/ Plant Ox.t/ C y Kalman filter EXAMPLE: The disturbance canceling example from before. " # " #" # " # P!.t/!.t/ D C u.t/ P M.t/ : M.t/ : " # " # C L.t/ C w.t/ h i y.t/ D x.t/ C v.t/; The augmented state for the purpose of designing a Kalman filter is 3 3 3 3 P!.t/!.t/ 7 7 7 7 4 P M.t/ 5 D 4 : 5 4 M.t/ 5 C 4 : 5 u.t/ P L.t/ L.t/ 3 " # 7 w.t/ C 4 5 w T.t/ h i y.t/ D x.t/ C v.t/; v.t/ y.t/ Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 3 where w T.t/ is the white noise that drives changes in the load torque. The noise spectral densities are " # : 3 D I S v D :; w : S 4 w T 7 5 where the spectral density for w T was selected by trial and error. The resulting steady-state Kalman gain matrix is h i T L D :8 : 3: : Incorporating this information, we have so far the dynamics of the estimator: 4 P O!.t/ P O M.t/ P O L.t/ P Ox.t/ D A Ox.t/ C Bu.t/ C L.y.t/ Oy.t// D.A LC / Ox.t/ C Bu.t/ C Ly.t / 3 3 3 :8 O!.t/ 7 7 7 5 D 4 : : 5 4 O M.t/ 5 C 4 3: O L.t/ : 3 7 5 u.t/ C 4 :8 : 3: 3 7 5 y.t/: For LQR integral state feedback, the augmented state equation is 3 3 3 3 3 P!.t/!.t/ 7 7 7 7 7 4 P M.t/ 5 D 4 : 5 4 M.t/ 5 C 4 : 5 u.t/ C 4 5 r.t/; Px I.t/ x I.t/ and the cost function is J D Z x I.t/ C :u.t/ dt: For this cost function, we find that h i K D 34 : Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 4 Note that the integrator state implements P OxI.t/ D r.t/ O!.t/ so we can augment the estimator dynamics: 3 3 3 3 3 P O!.t/ :8 O!.t/ :8 P O M.t/ P 4 O L.t/ 7 5 D : : O M.t/ 4 3: 7 5 4 O L.t/ 7 5 C : 4 3: 7 5 y.t/ C 4 7 5 r.t/ P OxI.t/ Ox I.t/ 3 3 O!.t/ C : h i 4 7 34 O M.t/ 5 4 O L.t/ 7 5 Ox I.t/ 3 3 3 3 3 P O!.t/ :8 O!.t/ :8 P O M.t/ 4 P O L.t/ 7 5 D : 3:5 O M.t/ 4 3: 7 5 4 O L.t/ 7 5 C : 4 3: 7 5 y.t/ C 4 7 5 r.t/ P OxI.t/ Ox I.t/ 3 O!.t/ h i u.t/ D 34 O M.t/ 4 O L.t/ 7 5 : Ox I.t/ Response to step load torque. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN 5 Angular velocity (rad/s)..5.4.3.. Field voltage (V) 4 8. 5 5 5 5 Frequency-shaped LQG One final trick we look at is used to shape the frequency response of the LQG system. For example, a system may have a resonance frequency we do not wish to excite. Standard control design would place a notch filter at this frequency. To perform frequency-shaped LQG design, we place a bandpass filter in parallel with the plant dynamics. Augmented plant u.t/ Plant Bandpass filter y.t/ x f.t/ This adds states that we wish to penalize. When designing a Kalman filter, we need only to estimate the true plant states as we have access to the filter states. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett

ECE553, LINEAR QUADRATIC GAUSSIAN Appendix: Steady-state LQG cost We earlier stated (where.t/ D C x.t/) J D lim EŒ T.t/Q.t/ C u T.t/Ru.t/ t! D trace x;ss L ss S v L T ss C x;ss C T Q C D trace n o x;ss B w S w Bw T C x;ss Kss T RK ss : Here, we show that the second and third lines are the same (not yet sure how to show that the first and second are the same). Start with the second line: But, so T Q C trace x;ss L ss S v L T ss C x;ssc 8 ˆ< D trace ˆ: B x @ x Cy T S v C y x ƒ A x C x A T CB w S w Bw T trace x;ss L ss S v L T ss C x;ssc C A C x C T Q C C T Q C D x B u R Bu T x A ƒ T x x A K T RK T Q C D trace x B w S w B T w C x.a x C x A T / C x K T RK A T x x A D trace x B w S w B T w C xk T RK C trace x.a x C x A T / trace x.a T x C x A/ ƒ equal D trace x B w S w B T w C xk T RK Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett 9 >= >;

ECE553, LINEAR QUADRATIC GAUSSIAN 7 where we used the knowledge that A T x;ss C x;ss A C C T Q C x;ss B u R B T u x;ss D A x;ss C x;ss A T C B w S w B T w x;ssc T y S v C y x;ss D and L ss D x;ss Cy T S v ; K ss D R Bu T x;ss. Lecture notes prepared by Dr. Gregory L. Plett. Copyright,, 8,, 4,,, 999, Gregory L. Plett