Dynamic Optimization Application of calculus of variation Lecture 33,34,35 Bolza problem • Let the system (Plant) is described by • π π‘ = π(π π‘ , π π‘ , π‘) nx1 nx1 nx1 ---(1) mx1 • And performance index or objective function is • π½ . = π π π‘ ,π‘ Terminal Cost π‘=π‘π + π‘π π(π π‘0 π‘ , π π‘ , π‘) ππ‘ Integral Cost function ---(2) “Bolza” problem… • Objective: Find U(t) (control Law) that minimize performance index given by equ (2) subjected to the dynamics (constraint) given by equ (1). Such an optimal control problem is known as “Bolza” problem. Solution using Lagrangian function Solution is Similar to two point boundary value problem Necessary conditions: • Using Lemma, necessary conditions are • • ππΏ . ππ π‘ ππΏ . ππ π‘ − ∗ π ππΏ . ππ‘ ππ π‘ = 0π×1 ---(3) ∗ = 0π×1 ---(4) • Boundary condition • πΏ . − ππΏ . ππ π‘ π π(π‘) ∗ 0, when πΏπ‘π is free πΏπ‘π + π‘=π‘π ππΏ . ππ π‘ π ∗ π‘=π‘π 0, when πΏππ is free πΏππ = 0 ---(5) • Where ππ . ππ π‘ π ππ . ππ‘ • πΏ π π‘ ,π π‘ ,π π‘ ,π‘ = π» π π‘ ,π π‘ ,π‘ + π π‘ + − ππ π(π‘) • π» π π‘ , π π‘ , π‘ = π π π‘ , π π‘ , π‘ + ππ π‘ π π π‘ , π π‘ , π‘ known as Hamiltonian function • Equ (5) is the general boundary equation in terms of Lagrangian function • So equ (3), (4) & (5) need to be solved to obtain the optimal input π ∗ (π‘) and hence π ∗ (π‘) Lecture 35 Hamiltonian Formulation for solution of optimal control problem • Above Bolza problem can be solved by using Hamiltonian formulation, which gives simple results as compared to Lagrangian formulation. Steps to solve Bolza problem using Hamiltonian Formulation • Write Hamiltonian function using • π» π π‘ , π π‘ , π‘ = π π π‘ , π π‘ , π‘ + ππ π‘ π π π‘ , π π‘ , π‘ • Find • • • ππ»(.) = ππ π‘ ∗ ππ»(.) = ππ π‘ ∗ ππ»(.) = ππ(π‘) ∗ − π(π‘) 0π×1 π(π‘) ∗ ---(6) ---(7) ∗ ---(8) Steps to solve Bolza problem using Hamiltonian Formulation • Use boundary conditions given by following equation • π» . + ππ . π(π‘) ππ‘ ∗ π‘=π‘π + ππ (.) ππ(π‘) − π(π‘) π ∗ π‘=π‘π πΏππ = 0 ---(9) • Equ (9) is the general boundary equation in terms of Hamiltonian function • So equ (6), (7), (8) & (9) need to be solved to obtain the optimal input π ∗ (π‘) and hence π ∗ (π‘) Solving boundary conditions • For solving equ (5) & (9) we can have following situations • Case 1: Fixed final time and fixed final state (πΏπ‘π = 0 & πΏππ = 0) • => no boundary conditions, don’t consider equ (5) or equ (9) • Case 2: Free final time and fixed final state (πΏπ‘π ≠ 0 & πΏππ = 0) • Case 3: Fixed final time and free final state (πΏπ‘π = 0 & πΏππ ≠ 0) • Case 4: Free final time and free final state (πΏπ‘π ≠ 0 & πΏππ ≠ 0) Sufficient condition: • In order to determine the nature of optimization (obtained value is minimum or maximum) we need to check sufficient condition. • 2nd variation of the functional • π»2π½ = π‘π π‘0 πΏπ(π‘) πΏπ(π‘) π2 π» . ππ 2 π‘ ππ» . ππ π‘ ππ π‘ ππ» . ππ π‘ ππ π‘ π2 π» . ππ 2 π‘ Say P which is a (n+m)x(n+m) matrix πΏπ(π‘) ππ‘ πΏπ(π‘) ∗ Sufficient condition… • If π» 2 π½ > 0 ⇒ π > 0 (+ππππππππ‘π) • => functional value will be minimum • =>J*(.) will be the minimum value along with the optimum trajectory x*(t) • If π» 2 π½ < 0 ⇒ π < 0 (−ππππππππ‘π) • => functional value will be maximum • =>J*(.) will be the maximum value along with the optimum trajectory x*(t)