Chapter2 2
Chapter2 2
quadratic function:
𝑁𝑁−1
1 1
𝐽𝐽𝑖𝑖 = 𝑥𝑥𝑁𝑁𝑇𝑇 𝑆𝑆𝑁𝑁 𝑥𝑥𝑁𝑁 + � (𝑥𝑥𝑘𝑘𝑇𝑇 𝑄𝑄𝑘𝑘 𝑥𝑥𝑘𝑘 + 𝑢𝑢𝑘𝑘𝑇𝑇 𝑅𝑅𝑘𝑘 𝑢𝑢𝑘𝑘 )
2 2
𝑘𝑘=𝑖𝑖
defined over the time interval of interest [𝑖𝑖, 𝑁𝑁]. The initial plant state is
given as 𝑥𝑥𝑖𝑖 . We assume the 𝑄𝑄𝑘𝑘 , 𝑅𝑅𝑘𝑘 and 𝑆𝑆𝑁𝑁 are symmetric positive semi
definite matrices and that |𝑅𝑅𝑘𝑘 | ≠ 0 for all 𝑘𝑘.
The objective is to find the control sequences 𝑢𝑢𝑖𝑖 , 𝑢𝑢𝑖𝑖+1 , … , 𝑢𝑢𝑁𝑁−1 that
minimizes 𝐽𝐽𝑖𝑖 .
From (2) and (5), we find that the state and costate are coupled. We
can form a single unforced system
𝑥𝑥𝑘𝑘+1 𝐴𝐴 −𝐵𝐵𝑅𝑅 −1 𝐵𝐵𝑇𝑇 𝑥𝑥𝑘𝑘
� 𝜆𝜆 � = � � �𝜆𝜆 �
𝑘𝑘 𝑄𝑄 𝐴𝐴𝑇𝑇 𝑘𝑘+1
Where 𝐴𝐴𝑘𝑘 = 𝐴𝐴, 𝐵𝐵𝑘𝑘 = 𝐵𝐵, 𝑅𝑅𝑘𝑘 = 𝑅𝑅, 𝑄𝑄𝑘𝑘 = 𝑄𝑄 for time invariant system.
When 𝑖𝑖 = 𝑁𝑁
1
𝐽𝐽𝑁𝑁 = 𝑥𝑥𝑁𝑁𝑇𝑇 𝑆𝑆𝑁𝑁 𝑥𝑥𝑁𝑁
2
When 𝑖𝑖 = 𝑁𝑁 − 1 and 𝑢𝑢𝑘𝑘 = 0
𝑁𝑁−1
1 1
𝐽𝐽𝑁𝑁−1 = 𝑥𝑥𝑁𝑁𝑇𝑇 𝑆𝑆𝑁𝑁 𝑥𝑥𝑁𝑁 + � 𝑥𝑥𝑘𝑘𝑇𝑇 𝑄𝑄𝑥𝑥𝑘𝑘
2 2
𝑘𝑘=𝑖𝑖
1 𝑇𝑇 1 𝑇𝑇
= 𝑥𝑥𝑁𝑁 𝑆𝑆𝑁𝑁 𝑥𝑥𝑁𝑁 + 𝑥𝑥𝑁𝑁−1 𝑄𝑄𝑥𝑥𝑁𝑁−1
2 2
Using the plant dynamics 𝑥𝑥𝑁𝑁 = 𝐴𝐴𝑥𝑥𝑁𝑁−1
1 𝑇𝑇
𝐽𝐽𝑁𝑁−1 = 𝑥𝑥𝑁𝑁−1 (𝐴𝐴𝑇𝑇 𝑆𝑆𝑁𝑁 𝐴𝐴 + 𝑄𝑄 )𝑥𝑥𝑁𝑁−1
2
We define anew intermediate variable 𝑐𝑐 an 𝑛𝑛 × 𝑛𝑛 matrix.
𝑆𝑆𝑁𝑁−1 = 𝐴𝐴𝑇𝑇 𝑆𝑆𝑁𝑁 𝐴𝐴 + 𝑄𝑄
Then
1 𝑇𝑇
𝐽𝐽𝑁𝑁−1 = 𝑥𝑥𝑁𝑁−1 𝑆𝑆𝑁𝑁−1 𝑥𝑥𝑁𝑁−1
2
If we repeat this procedure, for time-invarying system.
𝑆𝑆𝑘𝑘 = 𝐴𝐴𝑇𝑇 𝑆𝑆𝑘𝑘+1 𝐴𝐴 + 𝑄𝑄, 𝑘𝑘 < 𝑁𝑁, (1)
For time-varying system:
𝑆𝑆𝑘𝑘 = 𝐴𝐴𝑇𝑇𝑘𝑘 𝑆𝑆𝑘𝑘+1 𝐴𝐴𝑘𝑘 + 𝑄𝑄𝑘𝑘 , 𝑘𝑘 < 𝑁𝑁 , (2)
With boundary condition 𝑆𝑆𝑁𝑁 given as the final state weighting matrix.
This is a discrete Lyapunov equation for 𝑆𝑆𝑘𝑘 , also known as the
observability Lyapunov equation. The zero input performance index over
interval [𝑘𝑘, 𝑁𝑁] is
1
𝐽𝐽𝑘𝑘 = 𝑥𝑥𝑘𝑘𝑇𝑇 𝑆𝑆𝑘𝑘 𝑥𝑥𝑘𝑘
2
We call 𝑆𝑆𝑘𝑘 the performance index kernel sequence. 𝑆𝑆𝑘𝑘 can be calculated
offline without knowing the trajectory 𝑥𝑥𝑘𝑘 . If we know the initial
MECE6388 Optimal Control Theory, 2021 Fall
Dr. Zheng Chen
condition 𝑥𝑥𝑘𝑘 , then the performance index with zero-input over the
interval [𝑘𝑘, 𝑁𝑁] can be computed.
If the plant is stable, the cost over the interval [−∞, 𝑁𝑁] or equivalently
[0, 𝑁𝑁] is given by the steady-state cost.
1
𝐽𝐽∞ = 𝑥𝑥0𝑇𝑇 𝑆𝑆∞ 𝑥𝑥0
2
If 𝐴𝐴 is not stable, the zero input steady state cost can be infinite
(depending on 𝑄𝑄) since ||𝑥𝑥𝑘𝑘 || is unbounded.
In the steady state case, 𝑆𝑆 ≜ 𝑆𝑆𝑘𝑘 = 𝑆𝑆𝑘𝑘+1 when 𝑘𝑘 → ∞
becomes
𝑆𝑆 = 𝐴𝐴𝑇𝑇 𝑆𝑆𝑆𝑆 + 𝑄𝑄
which is called algebraic Lyapunov equation.
MECE6388 Optimal Control Theory, 2021 Fall
Dr. Zheng Chen
𝑃𝑃𝑘𝑘 = 𝐴𝐴𝑘𝑘 𝑃𝑃0 (𝐴𝐴𝑘𝑘 )𝑇𝑇 + � 𝐴𝐴𝑘𝑘−𝑖𝑖−1 𝐵𝐵𝑅𝑅−1 𝐵𝐵𝑇𝑇 (𝐴𝐴𝑇𝑇 )𝑘𝑘−𝑖𝑖−1
𝑖𝑖=0
with 𝑃𝑃0 = 0, we get 𝐺𝐺0,𝑘𝑘 = 𝑃𝑃𝑘𝑘 for any 𝑘𝑘 > 0 .
When 𝑘𝑘 = 𝑁𝑁, 𝐺𝐺0,𝑁𝑁 = 𝑃𝑃𝑁𝑁
In the free final state linear quadratic (LQ) regulator, the optimal control
is given by a close loop control law.
A more efficient way to compute 𝐾𝐾𝑘𝑘 and 𝑆𝑆𝑘𝑘 by using the recursion
𝐾𝐾𝑘𝑘 = (𝐵𝐵𝑘𝑘𝑇𝑇 𝑆𝑆𝑘𝑘+1 𝐵𝐵𝑘𝑘 + 𝑅𝑅𝑘𝑘 )−1 𝐵𝐵𝑘𝑘 𝑆𝑆𝑘𝑘+1 𝐴𝐴𝑘𝑘
𝑆𝑆𝑘𝑘 = 𝐴𝐴𝑇𝑇𝑘𝑘 𝑆𝑆𝑘𝑘+1 (𝐴𝐴𝑘𝑘 − 𝐵𝐵𝑘𝑘 𝐾𝐾𝑘𝑘 ) + 𝑄𝑄𝑘𝑘
𝑎𝑎2 𝑟𝑟𝑆𝑆𝑘𝑘+1
𝑆𝑆𝑘𝑘 = 2 + 𝑞𝑞 = 𝑞𝑞
𝑏𝑏 𝑆𝑆𝑘𝑘+1 + 𝑟𝑟
And
𝑎𝑎
𝑏𝑏 𝑎𝑎 𝑎𝑎
𝐾𝐾𝑘𝑘 = 𝑟𝑟 = − , 𝑢𝑢𝑘𝑘 = − 𝑥𝑥𝑘𝑘
1 + 2 𝑆𝑆𝑘𝑘+1 𝑏𝑏 𝑏𝑏
𝑏𝑏
Under the influence of this control
1
𝐽𝐽𝑘𝑘 = 𝑞𝑞𝑥𝑥𝑘𝑘2
2
And closed loop system becomes
𝑥𝑥𝑘𝑘+1 = 𝑎𝑎𝑥𝑥𝑘𝑘 + 𝑏𝑏𝑢𝑢𝑘𝑘 = 0
If we have a given value of 𝑥𝑥𝑘𝑘 for the state at time 𝐾𝐾, then to minimize
the magnitude of the state vector, we solve the state equation for 𝑢𝑢𝑘𝑘 so
that 𝑥𝑥𝑘𝑘+1 = 0
2(𝑁𝑁−𝑘𝑘)
1 − 𝑎𝑎2(𝑁𝑁−𝑘𝑘)
= 𝑆𝑆𝑁𝑁 𝑎𝑎 +( )𝑞𝑞
1 − 𝑎𝑎2
The Kalman gain
𝑎𝑎
𝑏𝑏 𝑟𝑟→∞
𝐾𝐾𝑘𝑘 = 𝑟𝑟 �⎯� 0
1 + 2 𝑆𝑆𝑘𝑘+1
𝑏𝑏
and 𝑢𝑢𝑘𝑘 = 0
MECE6388 Optimal Control Theory, 2021 Fall
Dr. Zheng Chen