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

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

EN Applied Optimal Control Lecture 8: Dynamic Programming October 10, 2018

Advanced Mechatronics Engineering

Quadratic Stability of Dynamical Systems. Raktim Bhattacharya Aerospace Engineering, Texas A&M University

Hamilton-Jacobi-Bellman Equation Feb 25, 2008

Problem 1 Cost of an Infinite Horizon LQR

POLE PLACEMENT. Sadegh Bolouki. Lecture slides for ECE 515. University of Illinois, Urbana-Champaign. Fall S. Bolouki (UIUC) 1 / 19

Lecture 4 Continuous time linear quadratic regulator

Linear Quadratic Optimal Control Topics

ECE7850 Lecture 7. Discrete Time Optimal Control and Dynamic Programming

Steady State Kalman Filter

Homework Solution # 3

TRACKING AND DISTURBANCE REJECTION

6. Linear Quadratic Regulator Control

Optimal Control. Lecture 18. Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen. March 29, Ref: Bryson & Ho Chapter 4.

Robotics. Control Theory. Marc Toussaint U Stuttgart

1. Find the solution of the following uncontrolled linear system. 2 α 1 1

EE C128 / ME C134 Final Exam Fall 2014

The Linear Quadratic Regulator

MODERN CONTROL DESIGN

Linear-Quadratic-Gaussian (LQG) Controllers and Kalman Filters

Module 05 Introduction to Optimal Control

Linear Quadratic Regulator (LQR) Design I

MATH4406 (Control Theory) Unit 6: The Linear Quadratic Regulator (LQR) and Model Predictive Control (MPC) Prepared by Yoni Nazarathy, Artem

2 The Linear Quadratic Regulator (LQR)

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)

EE363 homework 2 solutions

EE221A Linear System Theory Final Exam

Lecture 6. Foundations of LMIs in System and Control Theory

Linear Quadratic Regulator (LQR) Design II

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

Computational Issues in Nonlinear Dynamics and Control

Optimal Control Theory

Linear Quadratic Regulator (LQR) I

6.241 Dynamic Systems and Control

Pontryagin s maximum principle

Lecture 5 Linear Quadratic Stochastic Control

The Inverted Pendulum

Deterministic Dynamic Programming

Chapter 5. Pontryagin s Minimum Principle (Constrained OCP)

Lecture 9. Systems of Two First Order Linear ODEs

Lecture 2 and 3: Controllability of DT-LTI systems

Extensions and applications of LQ

4F3 - Predictive Control

Stochastic and Adaptive Optimal Control

LINEAR-CONVEX CONTROL AND DUALITY

Theorem 1. ẋ = Ax is globally exponentially stable (GES) iff A is Hurwitz (i.e., max(re(σ(a))) < 0).

Time-Invariant Linear Quadratic Regulators!

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

CDS 110b: Lecture 2-1 Linear Quadratic Regulators

Formula Sheet for Optimal Control

Robust Control 5 Nominal Controller Design Continued

Topic # Feedback Control Systems

Australian Journal of Basic and Applied Sciences, 3(4): , 2009 ISSN Modern Control Design of Power System

Lecture 2: Discrete-time Linear Quadratic Optimal Control

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

Game Theory Extra Lecture 1 (BoB)

PH.D. PRELIMINARY EXAMINATION MATHEMATICS

Numerical Optimal Control Overview. Moritz Diehl

Linear Quadratic Optimal Control

Robotics: Science & Systems [Topic 6: Control] Prof. Sethu Vijayakumar Course webpage:

Topic # /31 Feedback Control Systems. Analysis of Nonlinear Systems Lyapunov Stability Analysis

Semidefinite Programming Duality and Linear Time-invariant Systems

Lecture 10 Linear Quadratic Stochastic Control with Partial State Observation

Duality and dynamics in Hamilton-Jacobi theory for fully convex problems of control

ME 234, Lyapunov and Riccati Problems. 1. This problem is to recall some facts and formulae you already know. e Aτ BB e A τ dτ

Z i Q ij Z j. J(x, φ; U) = X T φ(t ) 2 h + where h k k, H(t) k k and R(t) r r are nonnegative definite matrices (R(t) is uniformly in t nonsingular).

LECTURE NOTES IN CALCULUS OF VARIATIONS AND OPTIMAL CONTROL MSc in Systems and Control. Dr George Halikias

Lecture 9: Discrete-Time Linear Quadratic Regulator Finite-Horizon Case

Iterative methods to compute center and center-stable manifolds with application to the optimal output regulation problem

Math Ordinary Differential Equations

1. The Transition Matrix (Hint: Recall that the solution to the linear equation ẋ = Ax + Bu is

Module 07 Controllability and Controller Design of Dynamical LTI Systems

5. Observer-based Controller Design

ECEEN 5448 Fall 2011 Homework #4 Solutions

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

Chapter III. Stability of Linear Systems

Feedback Optimal Control of Low-thrust Orbit Transfer in Central Gravity Field

UCLA Chemical Engineering. Process & Control Systems Engineering Laboratory

6 OUTPUT FEEDBACK DESIGN

EE C128 / ME C134 Feedback Control Systems

ESC794: Special Topics: Model Predictive Control

Module 02 CPS Background: Linear Systems Preliminaries

= 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 +

Review: control, feedback, etc. Today s topic: state-space models of systems; linearization

Linear Systems. Manfred Morari Melanie Zeilinger. Institut für Automatik, ETH Zürich Institute for Dynamic Systems and Control, ETH Zürich

Nonlinear Control Systems

ECE 680 Fall Test #2 Solutions. 1. Use Dynamic Programming to find u(0) and u(1) that minimize. J = (x(2) 1) u 2 (k) x(k + 1) = bu(k),

ESC794: Special Topics: Model Predictive Control

ACM/CMS 107 Linear Analysis & Applications Fall 2016 Assignment 4: Linear ODEs and Control Theory Due: 5th December 2016

IEOR 265 Lecture 14 (Robust) Linear Tube MPC

Appendix A Solving Linear Matrix Inequality (LMI) Problems

6.241 Dynamic Systems and Control

ECSE.6440 MIDTERM EXAM Solution Optimal Control. Assigned: February 26, 2004 Due: 12:00 pm, March 4, 2004

Continuous Time Finance

Introduction to Nonlinear Control Lecture # 3 Time-Varying and Perturbed Systems

Linear System Theory

Infinite Horizon LQ. Given continuous-time state equation. Find the control function u(t) to minimize

EE363 homework 7 solutions

Solution of Linear State-space Systems

Transcription:

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

(Example from Optimal Control Theory, Kirk) Objective: To get from 0 to e in the shortest time possible. Physical constraints: No backing up. Start and end at rest. Bounded acceleration and bounded deceleration. Limited fuel; no gas station on the road.

(Example from Optimal Control Theory, Kirk) x 1 : position x 2 : velocity u 1 : acceleration u 2 : deceleration ] [ẋ1 ẋ 2 = [ ] [ ] 0 1 x1 + 0 0 x 2 [ 0 0 1 1 ] [ ] u1 u 2 min u t f t 0 s.t. x(t 0 ) = [ [ 0 e, x(t 0] f ) = 0] 0 x 1 e, 0 x 2 0 u 1 M 1, M 2 u 2 0 tf t 0 (k 1 u 1 + k 2 x 2 ) dt G

(Example from Optimal Control Theory, Kirk)

Optimal Control Problem Optimal Control Problem S. Bolouki (UIUC) 5 / 28

Optimal Control Problem Optimal Control Problem Assume that t 0 and x 0 are given. Cost : V(u) = where - the final time t 1 is given. Dynamics : ẋ(t) = f (x, u, t), x(t 0 ) = x 0 t1 - V, l, and m are real-valued functions. - x(t 1 ) is free. t 0 l(x, u, τ)dτ + m(x(t 1 )) Objective: Find a control input u defined over [t 0, t 1 ] that minimizes V. An important special case is the LQR problem: ẋ = A(t)x(t) + B(t)u(t), x(t 0 ) = x 0 t1 V(u) = (x T Q(t)x + u T R(t)u)dt + x T (t 1 )Mx(t 1 ) t 0 where Q(t), R(t), and M are positive semi-definite for any t. S. Bolouki (UIUC) 6 / 28

Hamilton-Jacobi-Bellman Equation Hamilton-Jacobi-Bellman Equation S. Bolouki (UIUC) 7 / 28

Hamilton-Jacobi-Bellman Equation HJB Equation Let V (x, t) denote the value function [ t1 V (x, t) := min l(x(τ), u(τ), τ)dτ + m ( x(t 1 ) )] u [t,t1 ] t where x = x(t) and u [t,t1] indicates that u is defined over [t, t 1 ]. For any t m, t < t m < t 1 we now have [ tm t1 V (x, t) = min l(x(τ), u(τ), τ)dτ + l(x(τ), u(τ), τ)dτ + m ( x(t 1 ) ) ] u [t,t1 ] t t m = min u [t,tm] tm t [ t1 l(x(τ), u(τ), τ)dτ + min l(x(τ), u(τ), τ)dτ + m ( x(t 1 ) ) ] u [t,t1 ] t } m {{} V (x(t m),t m) S. Bolouki (UIUC) 8 / 28

Hamilton-Jacobi-Bellman Equation HJB Equation [ tm ] V (x, t) = min u [t,tm] t l(x(τ), u(τ), τ)dτ + V (x(t m ), t m ) If u [t,t 1] is an optimal control input given t, x, and t 1 as the starting time, starting point, and final time; and the resulting optimal trajectory passes x m at time t m ; then u [t m,t] is an optimal control input given t m, x m, t 1. S. Bolouki (UIUC) 9 / 28

Hamilton-Jacobi-Bellman Equation HJB Equation If we now let t m t, we arrive at the HJB equation. Let { t m = t + t x m = x(t m ) = x(t + t) = x(t) + x If V is sufficiently smooth around (x, t), we can write its Taylor series and conclude [ ] V (x, t) = min l(x(t), u(t), t) t + V (x(t m ), t m ) u [t,tm] = min u [t,tm] [l(x(t), u(t), t) t + V (x, t) + V x ( ) V ] ( ) x(t), t x + x(t), t t +... t Thus 0 = min u [t,tm] [l(x, u(t), t) + V ( ) x x, t x t + V ( ) ] x, t t S. Bolouki (UIUC) 10 / 28

Hamilton-Jacobi-Bellman Equation HJB Equation Letting t 0, we have 0 = min u [l(x, u, t) + V x ( )ẋ V ( ) ] x, t + x, t where V x = [ x V ] T. HJB equation : V ( ) [ x, t = min l(x, u, t) + V ( ) ] x, t f (x, u, t) t u } x {{} Hamiltonian Boundary condition : V ( ) ( x(t 1 ), t 1 = m x(t1 ) ) t Hamiltonian : H(x, p, u, t) := l(x, u, t) + p T f (x, u, t) S. Bolouki (UIUC) 11 / 28

Hamilton-Jacobi-Bellman Equation HJB Equation Theorem If the value function V has continuous partial derivatives, then it satisfies the HJB equation V ( ) x, t = min H ( x, x V (x, t), u, t ). t u Furthermore, the optimal control u and the corresponding optimal trajectory x satisfy min H ( x, x V (x (t), t), u, t ) = H ( x, x V (x (t), t), u, t ). (1) u Conversely, if some function V satisfies the HJB equation and its boundary condition, and u satisfies (1), then u is the optimal control and V is the desired value function. S. Bolouki (UIUC) 12 / 28

Linear Quadratic Regulators Linear Quadratic Regulators S. Bolouki (UIUC) 13 / 28

Linear Quadratic Regulators LQR Problem In the LQR problem we have ẋ = A(t)x(t) + B(t)u(t), x(t 0 ) = x 0 V(u) = t1 We can compute the Hamiltonian as t 0 (x T Q(t)x + u T R(t)u)dt + x T (t 1 )Mx(t 1 ) H(x, p, u, t) = x T Qx + u T Ru + p T (Ax + Bu) Remember that u minimizes the Hamiltonian. Thus u = 1 2 R 1 B T p p = x V Therefore, the system dynamics is ẋ = Ax 1 2 BR 1 B T x V. S. Bolouki (UIUC) 14 / 28

Linear Quadratic Regulators LQR Problem The HJB equation now is that can be rephrased as V t = H(x, x V, u, t) = x T Qx + 1 4 ( xv ) T BR 1 RR 1 B T ( x V ) + ( x V ) T Ax 1 2 ( xv ) T BR 1 B T ( x V ) V t = x T Qx + ( x V ) T Ax 1 4 ( xv ) T BR 1 B T ( x V ) We know that at the final time t 1 : V (x, t 1 ) = x T Mx. Thus we guess that for some time-varying positive-definite matrix P V = x T Px We now have V t = x T Ṗ(t)x and x V = 2Px. S. Bolouki (UIUC) 15 / 28

Linear Quadratic Regulators LQR Problem Thus we obtain the Riccati Differential Equation (RDE) Ṗ = Q + PA + A T P PBR 1 B T P with the boundary condition P(t 1 ) = M The RDE with its boundary condition has a unique solution if A, B, Q, R are all piecewise continuous in time. This unique solution is symmetric. u = R 1 BPx := Kx, that is a state feedback. V (x 0, t 0 ) = x T 0 P(t 0)x 0. S. Bolouki (UIUC) 16 / 28

Hamiltonian Matrix Hamiltonian Matrix S. Bolouki (UIUC) 17 / 28

Hamiltonian Matrix Hamiltonian Matrix Recall that the RDE is nonlinear. Our goal here is to compute its solution by solving a linear ODE. Theorem The solution P(t) of the RDE equation with its boundary condition is Y(t)X 1 (t) where X(t) and Y(t) are the unique solutions of [Ẋ(t) ] [ ] [ ] A BR = 1 B T X(t) Ẏ(t) Q A T, Y(t) [ ] [ ] X(t1 ) I = Y(t 1 ) M [ ] A BR The matrix 1 B T Q A T is called the Hamiltonian matrix, denoted by H. For the LTI case, the RDE can be solved explicitly. S. Bolouki (UIUC) 18 / 28

Hamiltonian Matrix Hamiltonian Matrix How do we solve the RDE for the LTI case? Assume that The eigenvalues of H are pairwise distinct. if λ is an eigenvalue of H, so is λ. Diagonalize H: [ ] U 1 Λs 0 HU = 0 Λ s [ ] U11 U where Λ s contains the stable eigenvalues and U = 12 is the matrix U 21 U 22 composed of the eigenvectors of H. Then [ ] [ ] [ ] X(t) e Λ s(t t 1) 0 = U Y(t) 0 e Λs(t t1) U 1 I M S. Bolouki (UIUC) 19 / 28

Hamiltonian Matrix Hamiltonian Matrix Finally P(t) = Y(t)X 1 (t) = [ U 21 + U 22 e Λs(t t1) Ge Λs(t t1)] [ U 11 + U 12 e Λs(t t1) Ge Λs(t t1)] 1 where G = [U 22 MU 12 ] 1 [U 21 MU 11 ] Keep in mind that if t 1, then P(t) = U 21 U 1 11. We will get back to it in the infinite horizon case. S. Bolouki (UIUC) 20 / 28

Infinite Horizon Regulators Infinite Horizon Regulators S. Bolouki (UIUC) 21 / 28

Infinite Horizon Regulators Infinite Horizon Regulators We consider the LTI Case: ẋ = Ax + Bu, x(0) = x 0 V(u) = Objective: Find u [0, ] that minimizes V. 0 [ x T (t)qx(t) + u T (t)ru(t) ] dt General idea: Do the finite-horizon with t 1 as the final time. Then, let t 1. Let P(t, t 1 ) -defined over [0, t 1 ]- be the solution of the Riccati equation Ṗ = Q + PA + A T P PBR 1 B T P If P = lim t1 P(t, t 1 ) exists, then u(t) = R 1 B T Px(t) is the optimal control law for the infinite-horizon problem. S. Bolouki (UIUC) 22 / 28

ẋ = x + u V(u) = t1 0 (x 2 + u 2 )dt + 5x 1 (t) 2

Infinite Horizon Regulators Infinite Horizon Regulators Recall that for the LTI case, if the eigenvalues of H are distinct, we have Notice that P does not depend on t. Now lim P(t, t 1) = U 21 U 1 t 11 := P 1 u = R } 1 {{ B T P } K Let us now characterize the eigenvalues of A BK. Remember that HU = UΛ. Therefore that results in H [ U11 U 21 ] = [ U11 U 21 ] x Λ s U 11 Λ s = AU 11 BR 1 B T U 21 = (A BK)U 11 S. Bolouki (UIUC) 25 / 28

Infinite Horizon Regulators Infinite Horizon Regulators Theorem Given A BK is Hurwitz The stable eigenvalues of H coincide with the eigenvalues of A BK. Columns of U 11 are the eigenvectors of A BK. S. Bolouki (UIUC) 26 / 28

Infinite Horizon Regulators Infinite Horizon Regulators Another way to compute P: Remembering HU = UΛ, we have AU 11 BR 1 B T U 21 = U 11 Λ s QU 11 A T U 21 = U 21 Λ s Multiply the first eq by P on the left and U 1 11 Multiply the second eq by U 1 11 on the right to get PA PBR 1 B T P = U 21 ΛU 1 11 on the right to get Q A T P = U 21 ΛU 1 11 Hence, we arrive at the algebraic Riccati equation (ARE) A T P + PA + Q PBR 1 B T P = 0 S. Bolouki (UIUC) 27 / 28

Infinite Horizon Regulators Infinite Horizon Regulators Theorem V = ẋ = Ax + Bu 0 (x T Qx + u T Ru)dt If Q = C T C for some matrix C, where (A, B) is stabilizable and (A, C) is detectable, The ARE has a unique solution among positive semi-definite matrices; The closed loop system A BR 1 B T P is hurwitz; The optimal control is u = R 1 B T Px and the optimal cost is x T 0 Px 0 ; The solution of the finite horizon problem converges to the solution of the infinite horizon problem as t 1. If, additionally, (A, C) is observable, P is positive definite. S. Bolouki (UIUC) 28 / 28