Control of Dynamical System

Similar documents
Hamilton-Jacobi-Bellman Equation Feb 25, 2008

Optimal Control. McGill COMP 765 Oct 3 rd, 2017

Controlled Diffusions and Hamilton-Jacobi Bellman Equations

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

Optimal Control Theory

Interactions. Yuan Gao. Spring Applied Mathematics University of Washington

Robust control and applications in economic theory

Motion Along a Straight Line

KINEMATICS & DYNAMICS

A path integral approach to the Langevin equation

Robotics. Control Theory. Marc Toussaint U Stuttgart

Vibrational Motion. Chapter 5. P. J. Grandinetti. Sep. 13, Chem P. J. Grandinetti (Chem. 4300) Vibrational Motion Sep.

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

HJB equations. Seminar in Stochastic Modelling in Economics and Finance January 10, 2011

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

Reinforcement Learning. Donglin Zeng, Department of Biostatistics, University of North Carolina

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

Introduction to Reachability Somil Bansal Hybrid Systems Lab, UC Berkeley

ECE7850 Lecture 7. Discrete Time Optimal Control and Dynamic Programming

Existence and uniqueness: Picard s theorem

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

Game Theory Extra Lecture 1 (BoB)

MATH 4B Differential Equations, Fall 2016 Final Exam Study Guide

Time Evolution of Speed

MIT Manufacturing Systems Analysis Lectures 19 21

MATH 2250 Final Exam Solutions

Solutions to Homework 1, Introduction to Differential Equations, 3450: , Dr. Montero, Spring y(x) = ce 2x + e x

Thermodynamic limit and phase transitions in non-cooperative games: some mean-field examples

UCLA Chemical Engineering. Process & Control Systems Engineering Laboratory

Deterministic Dynamic Programming

EXAM. Exam #1. Math 3350 Summer II, July 21, 2000 ANSWERS

DYNAMIC LECTURE 5: DISCRETE TIME INTERTEMPORAL OPTIMIZATION

An Application to Growth Theory

CHAPTER 2 THE MAXIMUM PRINCIPLE: CONTINUOUS TIME. Chapter2 p. 1/67

ME Thermodynamics I

Numerical Optimal Control Overview. Moritz Diehl

Introduction to optimal control theory in continuos time (with economic applications) Salvatore Federico

Predicting the future with Newton s Second Law

Introduction to First Order Equations Sections

Chapter 5. Pontryagin s Minimum Principle (Constrained OCP)

Linear conic optimization for nonlinear optimal control

Christopher Watkins and Peter Dayan. Noga Zaslavsky. The Hebrew University of Jerusalem Advanced Seminar in Deep Learning (67679) November 1, 2015

EE C128 / ME C134 Feedback Control Systems

ECON 582: An Introduction to the Theory of Optimal Control (Chapter 7, Acemoglu) Instructor: Dmytro Hryshko

MA 102 Mathematics II Lecture Feb, 2015

MATH 18.01, FALL PROBLEM SET #5 SOLUTIONS (PART II)

1 Simple Harmonic Oscillator

Bayesian Decision Theory in Sensorimotor Control

Modeling Mechanical Systems

Integration by Parts. MAT 126, Week 2, Thursday class. Xuntao Hu

The Method Of Direction Fields With Illustrative Examples

Section Taylor and Maclaurin Series

ECON 582: Dynamic Programming (Chapter 6, Acemoglu) Instructor: Dmytro Hryshko

Lecture 6.1 Work and Energy During previous lectures we have considered many examples, which can be solved using Newtonian approach, in particular,

Maximum Process Problems in Optimal Control Theory

ES 111 Mathematical Methods in the Earth Sciences Lecture Outline 15 - Tues 20th Nov 2018 First and Higher Order Differential Equations

Uncertainty quantification and systemic risk

PHYSICS 110A : CLASSICAL MECHANICS HW 1 SOLUTIONS. r = R vt

Strauss PDEs 2e: Section Exercise 4 Page 1 of 6

2t t dt.. So the distance is (t2 +6) 3/2


Math 2214 Solution Test 1D Spring 2015

MAS153/MAS159. MAS153/MAS159 1 Turn Over SCHOOL OF MATHEMATICS AND STATISTICS hours. Mathematics (Materials) Mathematics For Chemists

XXIX Applications of Differential Equations

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

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

Module 05 Introduction to Optimal Control

MATH : Calculus II (42809) SYLLABUS, Spring 2010 MW 4-5:50PM, JB- 138

Work and kinetic energy. LA info session today at 5pm in UMC235 CAPA homework due tomorrow night.

Math 211. Lecture #6. Linear Equations. September 9, 2002

Physics 9 Spring 2012 Midterm 1 Solutions

Lecture 3: Hamilton-Jacobi-Bellman Equations. Distributional Macroeconomics. Benjamin Moll. Part II of ECON Harvard University, Spring

ODEs. September 7, Consider the following system of two coupled first-order ordinary differential equations (ODEs): A =

An efficient approach to stochastic optimal control. Bert Kappen SNN Radboud University Nijmegen the Netherlands

C. Show your answer in part B agrees with your answer in part A in the limit that the constant c 0.

Week 9 Generators, duality, change of measure

MATH 1242 FINAL EXAM Spring,

Physics 2101 S c e t c i cti n o 3 n 3 March 31st Announcements: Quiz today about Ch. 14 Class Website:

VELOCITY. If you have a graph of position and you take the derivative, what would the derivative represent? Position. Time

Motion in One Dimension

Risk-Sensitive and Robust Mean Field Games

Simple Harmonic Motion

APPLICATIONS OF INTEGRATION

Slides II - Dynamic Programming

Dispersion relations, linearization and linearized dynamics in PDE models

DEPARTMENT OF MATHEMATICS AND STATISTICS UNIVERSITY OF MASSACHUSETTS. MATH 233 SOME SOLUTIONS TO EXAM 2 Fall 2018

Overview of the Seminar Topic

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

Introduction to Continuous-Time Dynamic Optimization: Optimal Control Theory

These will be no tutorials for Math on Tuesday April 26.

Lecture 9: Kinetic Energy and Work 1

Toulouse School of Economics, M2 Macroeconomics 1 Professor Franck Portier. Exam Solution

Surface x(u, v) and curve α(t) on it given by u(t) & v(t). Math 4140/5530: Differential Geometry

Part A: From (14.19) in your text (see notes Stability1 ), we have

Multiple Choice Review Problems

Solution of Stochastic Optimal Control Problems and Financial Applications

ODE Math 3331 (Summer 2014) June 16, 2014

[A + 1 ] + (1 ) v: : (b) Show: the derivative of T at v = v 0 < 0 is: = (v 0 ) (1 ) ; [A + 1 ]

Math 162: Calculus IIA

A Tour of Reinforcement Learning The View from Continuous Control. Benjamin Recht University of California, Berkeley

Transcription:

Control of Dynamical System Yuan Gao Applied Mathematics University of Washington yuangao@uw.edu Spring 2015 1 / 21

Simplified Model for a Car To start, let s consider the simple example of controlling a car. A extremely simplified model follows directly from Newton s law of motion F = ma. We take F (t) = cu(t), where u(t) is the control (pressing the paddle/break). The dynamics of a car is then Possible goals: d 2 x dt 2 = c m u. Drive the car to a specific speed. Drive the car to a desired location. 2 / 21

Controlling the Speed The differential equation concerning speed is dv dt = c m u. Define e(t) = v d v(t) as the error at time t, where v d is the desired speed. The goal is to let e(t) 0. If v(0) = v d, what should u(0) be? If v(0) > v d, what sign should u(0) take? If v(0) < v d, what sign should u(0) take? 3 / 21

Bang-Bang Control u max if e(t) > 0, u(t) := u max if e(t) < 0, 0 if e(t) = 0. 4 / 21

Bang-Bang Control 2500 2000 1500 1000 500 0 0 5 10 15 20 25 30 35 40 45 50 5 / 21

Difference Equation dv dt = c m u. In many situations, control happens at discrete time. or v(t + t) v(t) t = c m u(t), v(t + t) = v(t) + c m u(t) t. Drawbacks off Bang-Bang control: suffers from overshooting overacts to small errors bad for actuators 6 / 21

PE Control PE control, or proportional to error control, is we choose control that is proportional to the error: u(t) = ke(t). 2500 2000 1500 1000 500 0 0 5 10 15 20 25 30 35 40 45 50 7 / 21

Analysis of PE Control In terms of PE control, Suppose v(0) = 0, the solution is dv dt = c m u(t) = c m k(v d v). v(t) = v d (1 e c m kt ). Does PE control suffer from overshooting? v(t + t) = v(t) + c m k(v d v(t)) t. The required condition for stability is c k t < 2. m 8 / 21

Adding Air Resistance A more realistic model... dv(t) = c u(t) γv(t). dt m 2500 2000 1500 1000 500 0 0 5 10 15 20 25 30 35 40 45 50 9 / 21

Failure of PE Control Plug in u(t) = ke(t), dv(t) dt = c m k(v d v(t)) γv(t). The equilibrium velocity is ck ck+mγ v d. Thinking in this way, we have another way of controlling the system by setting its equilibrium the point we want! dv(t) dt = c m u(t) γv(t) = 0. = u(t) = m c γv d. Drawback: it requires a lot more information the mass m, coefficient c, and frictional constant γ not robust parameters changing across different situations 10 / 21

PID Control P: Proportional, I: Integral, D: Derivative. u(t) = k p e(t) + k i t 0 e(τ)dτ + k d d dt e(t) 3500 3000 2500 2000 1500 1000 500 0 0 5 10 15 20 25 30 35 40 45 50 11 / 21

Controlling Position Goal: x x d, v 0. The system of equations is In matrix form: d dt dx dt = v. dv dt = c m u γv. [ ] [ x 0 1 = v 0 γ ] [ ] [ ] x 0 + c u. v m 12 / 21

Comparison of Two Controllers 12000 k(x x d ) k(x x d + v v d ) 10000 8000 6000 4000 2000 0 0 10 20 30 40 50 60 70 80 90 100 13 / 21

Optimal Control Theory x: state u(x): the control at state x l(x, u): cost of applying control u at state x The goal is to minimize the total cost: J(x, u) = where x k+1 = next(x k, u k ). n l(x k, u k ), k=0 14 / 21

Bellman s Principle of Optimality An optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision. Introduce the optimal value function (optimal cost-to-go): v(x) = minimal total cost for completing the task starting from state x Consider all possible choices of u at current state x, add l(x, u) to v(next(x, u)), and choose the u for which the sum l(x, u) + v(next(x, u)) is minimal. 15 / 21

Bellman Equation Dynamic Programming Finite horizon formulation: v(x ) = 0. The Bellman Equation: v(x) = min{l(x, u) + v(next(x, u))}. u Infinite horizon discounted cost formulation: minimize The Bellman Equation: J(x, u) = lim n k=0 n α k l(x k, u k ). v(x) = min{l(x, u) + αv(next(x, u))}. u 16 / 21

Continuous Optimal Control Assume the dynamics The goal is to minimize dx dt = f (x, u). J(x, u) = T 0 l(x(t), u(t), t)dt. Choosing a time step of t, we have n J(x, u) = l(x k, u k, k t) t, k=0 and next(x k, u k ) = x k + f (x k, u k ) t. 17 / 21

Continuous Optimal Control Apply the bellman equation, v(x, k t) = min u {l(x, u, k t) t + v (x + f (x, u) t, (k + 1) t)}. Taylor expansion for v in the first variable x gives v (x + f (x, u) t, (k + 1) t) v(x, (k + 1) t) + v x (x, (k + 1) t)f (x, u) t. This gives us (v(x, k t) v(x, (k + 1) t)) / t = min u {l(x, u, k t) + f (x, u)v x (x, (k + 1) t)}. Now take the limit as t 0, v t (x, t) = min u {l(x, u, t) + f (x, u)v x (x, t)}. The Hamiltion-Jacobi-Bellman (HJB) equation! 18 / 21

Infinite Horizon Formulation The total cost becomes J(x, u) = 0 e αt l(x(t), u(t))dt. Choosing a time step of t, we have J(x, u) = e αk t l(x k, u k ) t. k=0 Apply the infinite horizon discounted cost Bellman Equation, } v(x) = min u {l(x, u) t + e α t v (x + f (x, u) t). Using similar techniques we get the infinite horizon HJB equation: { αv(x) = min u l(x, u) + f (x, u)v (x) }. 19 / 21

A Simple Example Back to the simplest example of controlling the speed of a car dx dt = c m u, here x represents the velocity, to be consistent with previous notations. We define the cost function as l(x, u) = 1 2 (x x d) 2 + 1 2 u2. Assume the value function has the form v(x) = 1 2 V (x x d) 2. Plug into the infinite horizon HJB equation and solve for V, we get ( ) V = m2 c 2 α + α 2 + 2 c2 m 2 and u = c m V (x x d). 20 / 21

Varying α 6000 5000 α = 0.1 control velocity 6000 5000 α = 1 control velocity 4000 4000 3000 3000 2000 2000 1000 1000 0 0 1000 1000 2000 0 2 4 6 8 10 2000 0 2 4 6 8 10 21 / 21