Unformatted text preview:

Dynamic Optimal Control !Robert Stengel! Robotics and Intelligent Systems MAE 345, Princeton University, 2013"• Cost functions"• Necessary conditions for optimality"• Optimal trajectories"• Optimal feedback control laws"Copyright 2013 by Robert Stengel. All rights reserved. For educational use only.!http://www.princeton.edu/~stengel/MAE345.html!Integrated Effect can be a Scalar Cost"Minimum time"J = fuel use( )dR0final range∫J = 1( )dt0final time∫J = cost per hour( )dt0final time∫Minimum fuel"Minimum financial cost"Cost Accumulates from Start to Finish"J = fuel flow rate( )0final time∫dtOptimal System Regulation"J = limT →∞1TΔx2( )dt0T∫< ∞J = limT →∞1TΔxTΔx( )dt0T∫< ∞J = limT →∞1TΔxTQΔx( )dt0T∫< ∞Cost functions that penalize state deviations over a time interval:"Quadratic scalar variation"Vector variation"Weighted vector variation"• No penalty for control use!• Why not use infinite control?!Cement Kiln"Pulp & Paper Machines"• Machine size: about 2 football fields"• Paper speed ≤ 2,200 m/min = 80 mph"• Maintain 3-D paper quality"• Avoid paper breaks at all cost!"http://www.youtube.com/watch?v=iGlN5PTfvZ8"Pulp & Paper Machine Control"Wet End"Dryer Section"Not a lot to do when things are running smoothly!Hazardous Waste Generated by Large Industrial Plants"• Cement dust"• Coal fly ash"• Metal emissions ""• Dioxin"• Electroscrap and other hazardous waste"• Waste chemicals"• Ground water contamination"• Ancillary mining and logging issues"• Greenhouse gasses"• Need to optimize total cost-benefit of production processes (including environmental cost)"Refrigerator Recycling Robot"• Dismantles one refrigerator every 60 sec"• Captures refrigerant (greenhouse gas) trapped in insulation"Tradeoffs Between Performance and Control in Integrated Cost Function"• Trade performance against control usage"• Minimize a cost function that contains state and control"• Weight the relative importance of components"J = limT →∞1TΔx2+ rΔu2( )dt0T∫< ∞J = limT →∞1TΔxTΔx + rΔuTΔu( )dt0T∫< ∞J = limT →∞1TΔxTQΔx + ΔuTRΔu( )dt0T∫< ∞• Control weighting affects speed and damping of response!• State weighting apportions state perturbations!dim Δu( )= 1 × 1dim Δu( )= m × 1dim R( )= m × mDynamic Optimization: !The Optimal Control Problem"minu(t )J = minu(t )φx (tf)⎡⎣⎤⎦+ L x (t), u(t)[ ]dttotf∫⎧⎨⎪⎩⎪⎫⎬⎪⎭⎪ x(t) = f[x(t),u(t)] , x(to) givenMinimize a scalar function, J, of terminal and integral costs"with respect to the control, u(t), in (to,tf),"subject to a dynamic constraint"dim(x) = n x 1"dim(f) = n x 1"dim(u) = m x 1"Components of the Cost Function"φx(tf)⎡⎣⎤⎦positive scalar function of a vectorTerminal cost is a function of the state at the final time"L x(t),u(t)[ ]dttotf∫positive scalar function of two vectorsIntegral cost is a function of the state and control from start to finish"L x(t ),u(t )[ ]Lagrangian of the cost functionExample: Dynamic Model of Infection and Immune Response"• x1 = Concentration of a pathogen, which displays antigen"• x2 = Concentration of plasma cells, which are carriers and producers of antibodies"• x3 = Concentration of antibodies, which recognize antigen and kill pathogen"• x4 = Relative characteristic of a damaged organ [0 = healthy, 1 = dead]"Cost Function Considers Infection, Organ Health, and Drug Usage "minuJ = minu12s11x1f2+ s44x4f2( )+12q11x12+ q44x42+ ru2( )dttotf∫⎡⎣⎢⎢⎤⎦⎥⎥• Tradeoffs between final values, integral values over a fixed time interval, state, and control"• Cost function includes weighted square values of"– Final concentration of the pathogen"– Final health of the damaged organ (0 is good, 1 is bad)"– Integral of pathogen concentration"– Integral health of the damaged organ (0 is good, 1 is bad)"– Integral of drug usage"• Drug cost may reflect physiological cost (side effects) or financial cost"Necessary Conditions for Optimal ControlAugment the Cost Function" J =φx (tf)⎡⎣⎤⎦+ L x (t),u(t)[ ]+ λT(t) f[x(t),u(t)] −x (t)[ ]{ }dttotf∫ H (x,u,λ)  L(x,u) + λTf x,u( )• Define Hamiltonian, H[.]"• Adjoin dynamic constraint to integrand using Lagrange multiplier, λ(t)"– Same dimension as the dynamic constraint, [n x 1]"– Constraint = 0 if the dynamic equation is satisfied"Substitute the Hamiltonian !in the Cost Function" J =φx(tf)⎡⎣⎤⎦+ H x(t),u(t),λ(t)[ ]− λT(t)x(t){ }totf∫dtThe optimal cost, J*, is produced by the optimal histories of state, control, and Lagrange multiplier"Substitute the Hamiltonian in the cost function" minu(t )J = J* =φx * (tf)⎡⎣⎤⎦+ H x * (t),u * (t),λ * (t)[ ]− λ *T(t)x * (t){ }totf∫dtThe Optimal Control Solution"• Along the optimal trajectory, the cost, J*, should be insensitive to small variations in control policy"• To first order," ΔJ* =∂φ∂x− λT⎡⎣⎢⎤⎦⎥⎧⎨⎩⎫⎬⎭Δx(Δu)t=tf+ λTΔx(Δu)⎡⎣⎤⎦t=to+∂H∂uΔu +∂H∂x+λT⎡⎣⎢⎤⎦⎥Δx(Δu)⎧⎨⎩⎫⎬⎭dttotf∫= 0Setting leads to "three necessary conditions for optimality"ΔJ* = 0Three Conditions for Optimality"1)∂φ∂x− λT⎡⎣⎢⎤⎦⎥t =tf= 0Individual terms should remain zero for arbitrary variations in "3)∂H∂u= 0 in t0,tf( ) 2)∂H∂x+λT⎡⎣⎢⎤⎦⎥= 0 in t0,tf( )Solution for Lagrange Multiplier!Insensitivity to Control Variation!⎫⎬⎪⎪⎭⎪⎪⇒λ* t( ) in to,tf( )⎫⎬⎭⇒ u * t( ) in to,tf( )Δx t( ) and Δu t( )Iterative Numerical Optimization Using Steepest-Descent"• Forward solution to find the state, x(t)"• Backward solution to find the Lagrange multiplier,"• Steepest-descent adjustment of control history, u(t)"• Iterate to find the optimal solution" xk(t) = f[xk(t),uk −1(t)] ,withx(to) givenuk −1(t) prescribed in to,tf( )k = Iteration indexUse educated guess for u(t) on first iteration!λ t( )Numerical Optimization Using Steepest-Descent"• Forward solution to find the state, x(t)"• Backward solution to find the Lagrange multiplier, "• Steepest-descent adjustment of control history, u(t)"• Iterate to optimal solution" λk(t) = −∂H xk,uk, λk( )∂x⎡⎣⎢⎤⎦⎥kT=


View Full Document

Princeton MAE 345 - Lecture 12

Download Lecture 12
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 12 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 12 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?