Download presentation
Presentation is loading. Please wait.
Published byΞΟ ΞΊΞΏΟΟΞ³ΞΏΟ ΞΟ Ξ³Ξ΅ΟΞΉΞ½ΟΟ Modified over 6 years ago
1
Optimal control T. F. Edgar Spring 2012
2
Optimal Control Static optimization (finite dimensions)
Calculus of variations (infinite dimensions) Maximum principle (Pontryagin) / minimum principle Based on state space models Min π π,π S.t. π =π π, π, π‘ π π‘ 0 is given π π,π’ =Ξ¦ π π‘ π + π‘ 0 π‘ π πΏ π,π,π‘ ππ‘ General nonlinear control problem
3
Special Case of π½ Minimum fuel: π‘ π π ππ‘ Minimum time: π‘ π 1ππ‘ Max range : π₯ π‘ π Quadratic loss: 0 π‘ π π π πΈπ+ π π πΉπ ππ‘ Analytical solution if state equation is linear, i.e., π =π¨π+π©π
4
βLinear Quadraticβ problem - LQP
Note πΌππΈ= 0 π‘ π π₯ 2 ππ‘ is not solvable in a realistic sense (π’ is unbounded), thus need control weighting in π E.g., π= 0 π‘ π π₯ 2 +π π’ 2 ππ‘ π is a tuning parameter (affects overshoot)
5
π=ππππππ‘ ? Ex. Maximize conversion in exit of tubular reactor max π₯ 3 π‘ π π₯ 3 : Concentration π‘: Residence time parameter In other cases, when π₯ and π’ are deviation variables, π₯ 2 +π π’ π₯ 2 +π π’ 2 ππ‘ Objective function does not directly relate to profit (See T. F. Edgar paper in Comp. Chem. Eng., Vol 29, 41 (2004))
6
Initial conditions (a) π₯ 0 β 0, π₯ π‘ π β π₯ π =0 or π= 0 π‘ π π₯β π₯ π 2 ππ‘ Set point change, π₯ π is the desired π₯ (b) π₯ 0 β 0, impulse disturbance, π₯ π =0 (c) π₯ 0 =0, model includes disturbance term
7
Other considerations: βopen loopβ vs. βclosed loopβ
βopen loopβ: optimal control is an explicit function of time, depends on π₯ 0 -- βprogrammed controlβ βclosed loopβ: feedback control, π’ π‘ depends on π₯ π‘ , but not on π₯ 0 . e.g., π’ π‘ =βπΎ π‘ π₯ π‘ Feedback control is advantageous in presence of noise, model errors. Optimal feedback control arises from a specific optimal control problems, the LQP.
8
Derivation of Minimum Principle
min π π,π =Ξ¦ π π‘ π + 0 π‘ π πΏ π π‘ ,π π‘ ,π‘ ππ‘ π =π π,π,π‘ π πΓ1 , π πΓ1 Ξ¦, πΏ, π have continuous 1st partial w.r.t. π,π,π‘ Form Lagrangian π π’ =Ξ¦+ π‘ 0 π‘ π πΏ+ π π πβ π ππ‘ Multipliers: adjoint variables, costates
9
( π π π ππ‘ = π π π π‘ π β π π π π‘ π + π π π ππ‘ )
Define π»=πΏ+ π π π (Hamiltonian) π π’ =Ξ¦+ π‘ 0 π‘ π π»β π π π ππ‘ = Ξ¦ π₯ β π π π π‘ π + π‘ 0 π‘ π π»+ π π π ππ‘ ( π π π ππ‘ = π π π π‘ π β π π π π‘ π π π π ππ‘ ) Since π is Lagrangian, we treat as unconstrained problem with variables: π π‘ , π π‘ , π π‘ Use variations: πΏπ π‘ , πΏπ π‘ , πΏ π (for πΏπ π‘ => original constraint, the state equation.) πΏ π =0= πΞ¦ ππ₯ β π π π‘ π π π πΏπ₯ π‘ π‘ 0 π‘ π π» π’ πΏπ’+ π» π₯ πΏπ₯+ π π πΏπ₯ ππ‘
10
Since πΏπ₯ π‘ , πΏπ’ π‘ are arbitrary (β 0), then
ππ» ππ₯ + π =0 ο¨ π =β ππ» ππ₯ (n equations. βadjoint equationβ) ππ» ππ’ =0, βoptimality equationβ for weak minimum π‘= π‘ π , πΞ¦ ππ₯ βπ=0 ο¨ π π‘ π =β πΞ¦ ππ₯ π‘ π (n boundary conditions) If π₯ π‘ 0 is specified, then πΏπ₯ π‘ 0 =0 Two point boundary value problem (βTPBVPβ)
11
Example: π π₯ 1 ππ‘ =π’β π₯ (1st order transfer function) min π= π‘ π π₯ π’ 2 ππ‘ LQP π»= π₯ π’ 2 + π 1 π’β π₯ 1 π 1 =β π₯ 1 + π 1 , π 1 π‘ π =0 π» π’ =π’+ π 1 =0 π’ πππ‘ =β π 1 (but donβt know π 1 π‘ yet)
12
Free canonical equations (eliminate π’)
(1) π₯ 1 =π’β π₯ 1 =β π 1 β π₯ ( π₯ is known) (2) π 1 =β π₯ 1 + π 1 , π 1 π‘ π =0 Combine (1) and (2), π 1 =2 π 1 ο¨ π 1 = π 1 π 2 π‘ + π 2 π β 2 π‘ 0= π 1 π 2 π‘ π + π 2 π β 2 π‘ π π₯ 1 = π 1 β π 1 = π 1 1β 2 π 2 π‘ + π π β 2 π‘ π₯ 1 0 = π 1 1β π π’ πππ‘ π‘ = π₯ β π π‘ π π 2 π‘ β π π‘ π β 2 π‘ = π 1 π 2 π‘ β π 2 π β 2 π‘ π’<0 βπ‘ for π₯ 0 >0, initially correct to reduce π₯ π‘
13
Another example: π₯ 1 = π₯ 2 π₯ 2 =π’ (double integrator) π= β π₯ π₯ π’ 2 ππ‘ π»= 1 2 π₯ π₯ π’ 2 + π 1 π₯ 2 + π 2 π’ π 1 =β ππ» π π₯ 1 =β π₯ 1 π 2 =β ππ» π π₯ 2 =β π₯ 2 β π 1 π» π’ =0=π’+ π 2 ο¨ π’ πππ‘ =β π 2
14
Free canonical equations
π₯ 1 = π₯ 2 π₯ 2 =β π 2 π 1 =β π₯ 1 π 2 =β π₯ 2 β π 1 (π, π coupled) ο¨ π 2 β π 2 + π 2 =0 Char. Equation: π 4 β π 2 +1=0 ο πβ² 2 β π β² +1=0 π β² =0.5Β±0.707π π=Β±0.85Β±0.4π (4 roots, apply boundary condition)
15
Can motivate feedback control via discrete time, one step ahead
π₯ π+1 =π π₯ π +π π’ π Set π=0, π₯ 1 =π π₯ 0 +π π₯ 0 ( π₯ 0 fixed) min π= π₯ 1 2 +π π’ 0 2 π= π π₯ 0 +π π’ π π’ 0 2 ππ π π’ 0 =2π π π₯ 0 +π π’ 0 +2π π’ 0 =0 0=π π₯ 0 +π π’ 0 + π π π’ 0 ο¨ π’ 0 = βπ π₯ 0 π+ π π Feedback control
16
Continuous Time LQP π =π¨π+π©π
π= 1 2 π π π‘ π πΊπ π‘ π π‘ π π π πΈπ+ π π πΉπ ππ‘ πΊ, πΈβ₯πΆ, πΉβ₯πΆ π»= π π π¨π+π©π π π πΈπ π π πΉπ π =βπΈπβ π¨ π π, π π‘ π =πΊπ π‘ π π― π =πΆ= π© π π+πΉπ π πππ‘ =β πΉ β1 π© π π (πΉ>πΆ) π― ππ =πΉ>πΆ
17
Free canonical equations
π =π¨πβπ© πΉ β1 π© π π (π 0 given) π =βπΈπβ π¨ π π (π π‘ π given) Let π=π·π (Riccati transformation) π πππ‘ =β πΉ β1 π© π π·π, let π²= πΉ β1 π© π π· (feedback control) Then we have ODE in π· π =π¨πβπ© πΉ β1 π© π π·π (1) π =βπΈπβ π¨ π π ο¨ π· π+π· π =βπΈπβ π¨ π π·π (2)
18
Substitute Eq. (1) into Eq. (2):
π· +π·π¨+ π¨ π π·βπ·π© πΉ β1 π© π π·+πΈ=πΆ (Riccati ODE) π· π‘ π =πΊ ( backward time integration) At steady state, π·β π· π for π‘ π β β, solve steady state equation. π· is symmetric, π·= π· π
19
Example πΈ= , π‘ π ββ π¨= β , π©= , π
=0.1 Plug into Riccati Equation (Steady state) 5 π π 11 β π 12 =0 10 π 12 2 β1= π 11 π 12 β π 22 =0 ο¨ π 11 = π 22 = π 12 = π 21 =0.3162 Feedback Matrix: π²= πΉ β1 π© π π·= β1.706 β3.162
20
Generally 3 ways to solve steady state Riccati Equation:
(1) integration of odeβs ο steady state; (2) Newton-Raphson (non linear equation solver); (3) transition matrix (analytical solution).
21
Transition matrix approach
π π = πΈ = π¨ βπ© πΉ β1 π© π βπΈ β π¨ π πΈ Reverse time integration (Boundary Condition: at π‘= π‘ π ): Let π= π‘ π βπ‘ When π‘= π‘ π , π=0 ππΈ ππ = πΈ = βπ¨ π© πΉ β1 π© π πΈ π¨ π πΈ πΈ= π π π πΈ π=0 Partition exponential π π =πΈ= π 11 π 12 π 21 π πΈ π=0
22
π π = π 11 π π‘ π + π 12 π π‘ π = π 11 π π‘ π + π 12 π· π‘ π π π‘ π (1) π π = π 21 π π‘ π + π 22 π π‘ π π· π π π = π 21 π π‘ π + π 22 π· π‘ π π π‘ π (2) Combine (1) and (2), factor out π π‘ π π· π π 11 + π 12 π· π‘ π = π 21 + π 22 π· π‘ π Fix integration βπ‘, π ππ Ξπ‘ is fixed π· π‘ββπ‘ π 11 + π 12 π· π‘ = π 21 + π 22 π· π‘ Boundary condition: π· π‘ π =πΊ Backward time integration of π, then forward time integration π =π¨π+π©π π=β πΉ β1 π© π π·π
23
Integral Action (eliminate offset)
Add terms π π πΉ π or π 1 π πΈ π 1 to objective function Example: π₯ 1 =π π₯ 1 +ππ’ π= π π₯ 1 2 +π π’ 2 + π ππ’ ππ‘ 2 ππ‘ Augment state equation π₯ 1 =π π₯ 1 +ππ’ (new state variable) ππ’ ππ‘ =π€ (new control variable) Calculate feedback control π€ πππ‘ =β π 1 π₯ 1 β π 2 π’ ππ’ ππ‘ =β π 1 π₯ 1 β π 2 π₯ 1 βπ π₯ π Integrate: π’= πβ² π₯ 1 ππ‘ + πβ² 2 π₯ 1
24
Second method: π₯ 0 = π₯ 1 ππ‘ ; π₯ 0 = π₯ 1 π= π π₯ 1 2 +π π’ 2 + π π₯ ππ‘ π₯ 0 = π₯ 1 π₯ 1 =π π₯ 1 +ππ’ Optimal control: π’=β π 1 π₯ 1 β π 0 π₯ 0 =β π 1 π₯ 1 β π π₯ 1 ππ‘ With more state variables, ο¨ PID controller
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.