Stochastic Optimal Control!

Similar documents
Linear-Quadratic-Gaussian Controllers!

Uncertain Systems. Robust vs. Adaptive Control. Generic Dynamic System ( Plant )

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

Stochastic and Adaptive Optimal Control

Optimal Control and Estimation MAE 546, Princeton University Robert Stengel, Preliminaries!

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

First-Order Low-Pass Filter!

Time-Invariant Linear Quadratic Regulators!

OPTIMAL CONTROL AND ESTIMATION

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

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

Introduction to Optimization!

Every real system has uncertainties, which include system parametric uncertainties, unmodeled dynamics

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

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

Dynamic Optimal Control!

Optimal Control and Estimation MAE 546, Princeton University Robert Stengel, Preliminaries!

Nonlinear State Estimation! Extended Kalman Filters!

Lecture 7 LQG Design. Linear Quadratic Gaussian regulator Control-estimation duality SRL for optimal estimator Example of LQG design for MIMO plant

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

EL2520 Control Theory and Practice

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

First-Order Low-Pass Filter

Overview of the Seminar Topic

Design Methods for Control Systems

Nonlinear State Estimation! Particle, Sigma-Points Filters!

Sequential State Estimation (Crassidas and Junkins, Chapter 5)

Adaptive State Estimation Robert Stengel Optimal Control and Estimation MAE 546 Princeton University, 2018

5. Observer-based Controller Design

Time Response of Dynamic Systems! Multi-Dimensional Trajectories Position, velocity, and acceleration are vectors

Probabilistic Control of Nonlinear Uncertain Systems

6 OUTPUT FEEDBACK DESIGN

Aircraft Stability & Control

Linearized Equations of Motion!

Steady State Kalman Filter

ELEC4631 s Lecture 2: Dynamic Control Systems 7 March Overview of dynamic control systems

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL

Pole placement control: state space and polynomial approaches Lecture 2

Exam. 135 minutes, 15 minutes reading time

= m(0) + 4e 2 ( 3e 2 ) 2e 2, 1 (2k + k 2 ) dt. m(0) = u + R 1 B T P x 2 R dt. u + R 1 B T P y 2 R dt +

Topic # Feedback Control Systems

Topic # Feedback Control Systems

EL 625 Lecture 10. Pole Placement and Observer Design. ẋ = Ax (1)

Automatic Control II Computer exercise 3. LQG Design

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

LINEAR QUADRATIC GAUSSIAN

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

Numerical Solutions of ODEs by Gaussian (Kalman) Filtering

Alternative Expressions for the Velocity Vector Velocity restricted to the vertical plane. Longitudinal Equations of Motion

CHAPTER INTRODUCTION

Linear State Feedback Controller Design

L 1 Adaptive Controller for a Missile Longitudinal Autopilot Design

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

Organization. I MCMC discussion. I project talks. I Lecture.

Contents. PART I METHODS AND CONCEPTS 2. Transfer Function Approach Frequency Domain Representations... 42

Optimal control and estimation

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

Homework Solution # 3

Introduction to System Identification and Adaptive Control

Contents. 1 State-Space Linear Systems 5. 2 Linearization Causality, Time Invariance, and Linearity 31

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

Linear-Optimal State Estimation

Digital Control: Part 2. ENGI 7825: Control Systems II Andrew Vardy

Modeling and Control Overview

A Comparative Study on Automatic Flight Control for small UAV

Topic # Feedback Control Systems

Control Systems Lab - SC4070 Control techniques

Aircraft Flight Dynamics Robert Stengel MAE 331, Princeton University, 2018

LQG/LTR CONTROLLER DESIGN FOR AN AIRCRAFT MODEL

Robust Control 5 Nominal Controller Design Continued

Translational and Rotational Dynamics!

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

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

State Observers and the Kalman filter

Variable-gain output feedback control

Autonomous Mobile Robot Design

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

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

Output Adaptive Model Reference Control of Linear Continuous State-Delay Plant

4 Arithmetic of Feedback Loops

Aircraft Flight Dynamics!

Modeling and state estimation Examples State estimation Probabilities Bayes filter Particle filter. Modeling. CSC752 Autonomous Robotic Systems

Control System Design

Dr Ian R. Manchester

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

Optimization-Based Control

Introduction. 1.1 Historical Overview. Chapter 1

Kalman Filter. Predict: Update: x k k 1 = F k x k 1 k 1 + B k u k P k k 1 = F k P k 1 k 1 F T k + Q

Separation Principle & Full-Order Observer Design

Iterative Learning Control Analysis and Design I

Nonlinear System Analysis

DISCRETE-TIME ADAPTIVE LQG/LTR CONTROL

Lecture: Gaussian Process Regression. STAT 6474 Instructor: Hongxiao Zhu

Chap 8. State Feedback and State Estimators

CS545 Contents XVI. l Adaptive Control. l Reading Assignment for Next Class

Control Systems. State Estimation.

Closed-loop system 2/1/2016. Generally MIMO case. Two-degrees-of-freedom (2 DOF) control structure. (2 DOF structure) The closed loop equations become

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

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

STABILITY OF CLOSED-LOOP CONTOL SYSTEMS

Transcription:

Stochastic Control! Robert Stengel! Robotics and Intelligent Systems, MAE 345, Princeton University, 2015 Learning Objectives Overview of the Linear-Quadratic-Gaussian (LQG) Regulator Introduction to Stochastic Robust Control Laws Copyright 2015 by Robert Stengel. All rights reserved. For educational use only. http://www.princeton.edu/~stengel/mae345.html 1 Stochastic Optimal Control! 2

Deterministic vs. Stochastic Optimal Control Deterministic control! Known dynamic process precise input precise initial condition precise measurement! Optimal control minimizes J* = J(x*, u*) Stochastic control! Known dynamic process unknown input imprecise initial condition imprecise or incomplete measurement! Optimal control minimizes E{J[x*, u*]} 3 Linear-Quadratic-Gaussian (LQG) Control of a Dynamic Process! z(t) = Hx(t) + n(t) [ ] ˆ!x(t) = F(t)ˆx(t) + G(t)u(t) + K(t) z(t)! Hˆx(t) u(t) =!C(t) ˆx(t) + u command 4

Linear-Quadratic (LQ) Control Equations (Continuous-Time Model) Open-Loop System State Dynamics u t = Fx(t) + Gu( t)!x t Control Law =!Cx(t) + u command Closed-Loop System State Dynamics!x ( t) = ( F! GC)x(t) + GCu command Characteristic Equation si! ( F! GC) = 0 How many eigenvalues? n Stable or unstable? Stable, with correct design criteria, F, and G 5 Linear-Quadratic-Gaussian (LQG) Control Equations (Continuous-Time Model) Open-Loop System State Dynamics and Measurement ˆ!x t = Fx(t) + Gu(t) + Lw(t) z( t) = Hx( t) + n( t)!x t State Estimate = Fˆx(t) + Gu(t) + K z( t)! Hˆx ( t) " Control Law u( t) =!Cˆx(t) + u command 6

Linear-Quadratic-Gaussian (LQG) Control Equations (Continuous-Time Model) Closed-Loop System State and Estimate Dynamics (neglect command) = Fx(t) + G!Cˆx(t)!x t ˆ!x ( t) = Fˆx(t) + G!Cˆx(t) [ ]+ Lw(t) [ ]+ K " z( t)! Hˆx ( t) How many eigenvalues? 2n Stable or unstable? TBD 7 LQG Separation Property Optimal estimation algorithm does not depend on the optimal control algorithm = P(t)H T N!1 ( t) L T ( t)! P(t)H T N!1 t K t!p(t) = F(t)P(t) + P(t)F T (t) + L( t)w t HP(t) Optimal control algorithm does not depend on the optimal estimation algorithm C t = R!1 t!s ( t) =!Q(t)! F(t) T S( t)! S t G T ( t)s( t) F(t) + S( t)g(t)r!1 (t)g T (t)s t 8

LQG Certainty Equivalence Stochastic feedback control is computed from optimal estimate of the state u*(t) =!R!1 G T (t)s(t)ˆx(t) =!C(t) ˆx(t) Stochastic feedback control law is the same as the deterministic control law u*(t) =!R!1 G T (t)s(t)x(t) =!C(t) x(t) 9 Asymptotic Stability of the LQG Regulator! (with no parameter uncertainty)! 10

System Equations with LQG Control With perfect knowledge of the system!x ( t) = Fx(t) + G [!Cˆx(t) ]+ Lw(t) ˆ!x ( t) = Fˆx(t) + G!Cˆx(t) [ ]+ K " z( t)! Hˆx ( t) State estimate error!( t)! x( t) " ˆx ( t) State estimate error dynamics!( t) = ( F " KH)! ( t) + Lw t " Kn( t) 11 Control-Loop and Estimator Eigenvalues are Uncoupled "!x t! t ' ' = " ( F ( GC) GC 0 F ( KH " ' ' x t! t ' ' + " L 0 L (K " ' w t n t ' ' Upper-block-triangular stability matrix LQG system is stable because (F GC) is stable (F KH) is stable Estimate error affects state response = F! GC!x t x t + GC" ( t) + Lw( t) Actual state does not affect error response Disturbance affects both equally 12

Discrete-Time LQG Controller Kalman filter produces state estimate = "ˆx k!1 ( + )! C k!1ˆx k!1 ( + ) ˆx k! ˆx k ( + ) = ˆx k (!) + K k z k! Hˆx k (!) u k =!C k ˆx k ( + ) " Closed-loop system uses state estimate for feedback control (u command = 0) x k+1 (!) = "x k (!)! C k ˆx k ( + ) 13 Response of Discrete-Time 1 st -Order System to Disturbance, and Kalman Filter Estimate from Noisy Measurement Propagation of Uncertainty Kalman Filter, Uncontrolled System 14

Comparison of 1 st -Order Discrete-Time LQ and LQG Control Response Linear-Quadratic Control with Noise-free Measurement Linear-Quadratic-Gaussian Control with Noisy Measurement 15 MATLAB Demo: LQG Rolling Mill Control System Design Example Open- and Closed-Loop Response Maintain desired thickness of shaped beam Account for random! variations in thickness/ hardness of incoming beam! eccentricity in rolling cylinders! measurement errors http://www.mathworks.com/help/control/ug/lqg-regulation-rolling-mill-example.html 16

Robust Stochastic Control! 17 Stochastic, Robust, and Adaptive Control Stochastic controller minimize response to random initial conditions, disturbances, and measurement errors perfect knowledge of the plant Robust controller fixed gains and structure minimize likelihood of instability or unsatisfactory performance due to parameter uncertainty in the plant Adaptive controller variable gains and/or structure minimize likelihood of instability or unsatisfactory performance due to plant parameter uncertainty, disturbances, and measurement errors Practical controller may have elements of all three 18

Robust Control System Design Make closed-loop response insensitive to plant parameter variations Robust controller! Fixed gains and structure! Minimize likelihood of instability! Minimize likelihood of unsatisfactory performance 19 Probabilistic Robust Control Design Design a fixed-parameter controller for stochastic robustness Monte Carlo Evaluation of competing designs Genetic Algorithm or Simulated Annealing search for best design 20

Representations of Uncertainty Characteristic equation of the uncontrolled system si! F = det( si! F)! "(s) = s n + a n!1 s n!1 +... + a 1 s + a 0 ( s! 2 )(...)( s! n ) = 0 = s! 1 Uncertainty can be expressed in! Elements of F! Coefficients of "(s)! Eigenvalues of F 21 Root Locations for an Uncertain 2 nd -Order System Variation may be represented by! Worst-case, e.g., Upper/lower bounds of uniform distribution! Probability, e.g., Gaussian distribution Uniform Distribution Gaussian Distribution s Plane s Plane 22

3-D Stochastic Root Loci for 2 nd -Order Example Root distributions are nonlinear functions of parameter distributions Unbounded parameter distributions always lead to non-zero probability of instability Bounded distributions may be guaranteed to be stable 23 Probability of Satisfying a Design Metric Pr(d,v)! 1 N N i=1 e" C( d), H ( v) Probability of satisfying a design metric! d: Control design parameter vector [e.g., SA, GA, ]! v: Uncertain plant parameter vector [e.g., RNG]! e: Binary indicator, e.g.,! 0: satisfactory 1: unsatisfactory! H(v): Plant! C(d): Controller (Compensator) 24

Design Control System to Minimize Probability of Instability Characteristic equation of the closed-loop system! closed"loop (s) = si " F( v) " G( v)c( d) ( s " ' 2 )(...)( s " ' n ) = s " ' 1 closed"loop = 0 Monte Carlo evaluation of probability of instability with uncertain plant parameters Minimize probability of instability using numerical search of control parameters { } min Pr Re! i, i = 1,n d " > 0 25 Control Design Example* u k w y m 1 m 2 Challenge: Design a feedback compensator for a 4 th -order spring-mass system ( the plant ) whose parameters are bounded but unknown! Minimize the likelihood of instability! Satisfy a settling time requirement! Don t use too much control * 1990 American Control Conference Robust Control Benchmark Problem 26

Design Cost Function Probability of Instability, Pr i! e i = 1 (unstable) or 0 (stable) Probability of Settling Time Exceedance, Pr ts! e ts = 1 (exceeded) or 0 (not exceeded) Probability of Control Limit Exceedance, Pr u! e u = 1 (exceeded) or 0 (not exceeded) Each metric has a binomial distribution pr( x) = n! k! ( n! k)! p x ( n!k )k " 1! p( x)! ' ( n k ) * + p( x n!k )k " 1! p( x) = probability of exactly k successes in n trials, in 0,1 ~ normal distribution for large n Design Cost Function! High probabilities weighted more than low probabilities! J = apr 2 i + bpr 2 ts + c Pr 2 u! a = 1! b = c = 0.01 27 Monte Carlo Evaluation of Probability of Satisfying a Design Metric 1e+09 N Pr k (d,v)! 1 e k C( d), H ( v) N ", k = 1,3 i=1 J = apr i 2 (d,v) + bpr ts 2 (d,v) + cpr u 2 (d,v) Number of Evaluations 1e+07 1e+05 1e+03 Interval Width 2 5 10 20 100 1e+01 1e-06 1e-05 1e-04 0.001 0.01 0.1 1 0.5 Probability or (1 - Probability Binomial Distribution Compute v using random number generators over N trials! Required number of trials depends on outcome probability and desired confidence interval Search for best d using a genetic algorithm to minimize J 28

Uncertain Plant* w k u y m 1 m 2 y = x 2 + n Plant dynamic equation! "!x 1!x 2!x 3!x 4! = " 0 0 1 0 0 0 0 1 ' k m 1 k m 1 0 0 k m 2 ' k m 2 0 0! " x 1 x 2 x 3 x 4! + " 0 0 1 m 1 0! u + " 0 0 0 1 m 2 w 4 th -Order Plant characteristic equation "!(s) = s 2 s 2 + k m + m 1 2 m 1 m 2 ' = s 2 s 2 2 " n * 1990 American Control Conference Robust Control Benchmark Problem 29 Parameter Uncertainties, Root Locus, and Control Law Parameters of massspring system! Uniform probability density functions for 0.5 < m 1, m 2 < 1.5 0.5 < k < 2 Effects of parameters on root locations (right) x xx x "!(s) = s 2 s 2 + k m 1 + m 2 ' = s 2 s 2 2 m 1 m " n 2 Single-input/single-output feedback control law u( s) =!C ( s)y( s) 30

Mass-Spring-Mass Stabilization Requires Compensation Proportional feedback alone cannot stabilize the system Feedback of either sign drives at least one root into the right half plane u( s) =!cy( s) 31 Search-and-Sweep Design of Family of Robust Feedback Compensators Begin with lowest-order feedback compensator C 12 (s) = a 0 + a 1 s b 0 + b 1 s + b 2 s 2! C d Arrange parameters as binary design vector { } d = a 0,a 1,b 0,b 1,b 2 d* = { a 0 *,a 1 *,b 0 *,b 1 *,b 2 *} Search for design vector, d, that minimizes J m 1 = rand 1 m 2 = rand 1 + 0.5 + 0.5 + 0.5 k =!1.5 *rand 1 Monte Carlo evaluation with uncertain parameters, v 32

Search-and-Sweep Design of Family of Robust Feedback Compensators 1) Define next higher-order compensator C 22 (s) = a 0 + a 1 s + a 2 s 2 b 0 + b 1 s + b 2 s 2 2) Optimize over all parameters, including optimal coefficients in starting population d = { a 0 *,a 1 *,a 2,b 0 *,b 1 *,b 2 *}! d ** = { a 0 **,a 1 **,a 2 **,b 0 **,b 1 **,b 2 **} 3) Sweep to satisfactory design or no further improvement C 23 (s) = a 0 + a 1 s + a 2 s 2 b 0 + b 1 s + b 2 s 2 + b 3 s 3 C 33 (s) = a 0 + a 1 s + a 2 s 2 + a 3 s 3 b 0 + b 1 s + b 2 s 2 + b 3 s 3 C 34 (s) = a 0 + a 1 s + a 2 s 2 + a 3 s 3 b 0 + b 1 s + b 2 s 2 + b 3 s 3 + b 4 s 4... 33 Design Cost and Probabilities for Optimal 2 nd - to 5 th -Order Compensators Number of Zeros = Number of Poles 0.009 0.008 0.007 0.006 2nd Order 3rd Order 4th Order 5th Order 0.005 0.004 0.003 0.002 0.001 0 Cost Prob Instab Prob Ts Viol x 0.01 Prob Cont Viol x 0.1 34

Next Time:! Parameter Estimation and Adaptive Control! 35 Supplemental Material 36

Linear-Quadratic Gaussian Optimal Control Law Minimize expected value of cost, subject to uncertainty* min E(J)! E(J*) u Stochastic optimal feedback control law combines the linear-optimal control law with a linear-optimal state estimate u*(t) =!R!1 G T (t)s(t)ˆx(t) =!C(t) ˆx(t)! where ˆx(t) is an optimal estimate of the state perturbation * See reading for details 37 Example: Probability of Stable Control of an Unstable Plant X-29 Aircraft Longitudinal dynamics for a Forward-Swept-Wing Demonstrator F =!2gf 11 / V "V 2 f 12 / 2 "Vf 13!g!45 / V 2 "Vf 22 / 2 1 0 0 "V 2 f 32 / 2 "Vf 33 0 0 0 1 0 ( ( (; G = ( ( ' g 11 g 12 0 0 g 31 g 32 0 0 V ( ( ; x = ( ( q ( ( '( * ( ' Nominal eigenvalues (one unstable)! 1" 4 = "0.1 ± 0.057 j, " 5.15, 3.35 Air density and airspeed,! and V, have uniform distributions(±30) 10 coefficients have Gaussian distributions (! = 30) p = "! V f 11 f 12 f 13 f 22 f 32 f 33 g 11 g 12 g 31 g 32 T Environment Uncontrolled Dynamics Control Effect 38

LQ Regulators for the Example Three stabilizing feedback control laws Case a) LQR with low control weighting Case b) LQR with high control weighting Q = diag( 1,1,1,0 ); R = ( 1,1);! 1" 4nominal = 35, 5.1, 3.3,.02 C = 0.17 130 33 0.36 0.98 "11 "3 "1.1 Q = diag( 1,1,1,0 ); R = ( 1000,1000);! 1" 4nominal = "5.2,"3.4,"1.1,".02 C = 0.03 83 21 "0.06 0.01 "63 "16 "1.9 ( ' ( ' Case c) Case b with gains multiplied by 5 for bandwidth (loop-transfer) recovery! 1" 4nominal = "32, 5.2, 3.4, 0.01 C = 0.13 413 105 "0.32 0.05 "313 "81 "1.1" 9.5 ( ' 39 Stochastic Robustness! (Ray, Stengel, 1991) "! Distribution of closed-loop roots with "! Gaussian uncertainty in 10 parameters "! Uniform uncertainty in velocity and air density "! 25,000 Monte Carlo evaluations "! Probability of instability "! a) Pr = 0.072 "! b) Pr = 0.021 "! c) Pr = 0.0076 Stochastic Root Locus 40

Probabilities of Instability for the Three Cases 41 Case a: Low LQ Control Weights Stochastic Root Loci for the Three Cases with Gaussian Aerodynamic Uncertainty! Case b: High LQ Control Weights Probabilities of instability with 30 uniform aerodynamic uncertainty!! Case a: 3.4 x 10-4!! Case b: 0!! Case c: 0! Case c: Bandwidth Recovery 42