Dynamic Optimization Application of calculus of variation Lecture 33,34,35

advertisement
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)
Download