46.1.2. Linear system without exogenous inputs#
46.1.2.1. Variational approach#
Let the dynamical equation of a system be
with measurment output \(\mathbf{y}\) and performance output \(\mathbf{z}\), and with running and final cost
The equations (46.9) become
The weights onf the control are definite positive, \(\widetilde{\mathbf{R}} > 0\), and thus invertible. The control can be written as a function of the state and the co-state as
The expression (46.5) shows that the optimal control law is a control proportional to the state \(\mathbf{x}\) and the co-state \(\boldsymbol\lambda\). As it’s shown below, there’s a proportionality relation between the state and the co-state \(\boldsymbol\lambda = \mathbf{P} \mathbf{x}\) as well, with \(\mathbf{P}\) a symmetric, semi-positive definite matrix, satisfying some matrix equations. See:
the relation \(\boldsymbol\lambda_t = \mathbf{P}_t \mathbf{x}_t\) arising by the relation (46.3) with \(\mathbf{M} = \mathbf{I}\), \(\boldsymbol \lambda_t = \nabla_{\mathbf{x}_t} V\) in the dynamic programming approach
the relation \(\boldsymbol\lambda_t = \mathbf{P}_t \mathbf{x}_t\) arising in the Hamiltonian form of the closed-loop system (46.6)
46.1.2.2. Hamiltonian form of the closed-loop system#
Now the closed loop system reads
with initial condition \(\mathbf{x}(0) = \mathbf{x}_0\) and final condition \(\boldsymbol\lambda(T) = \mathbf{Q}_T \mathbf{x}(T)\). The solution of this linear system can be formally written using the propagator \(\boldsymbol\Psi(t,t_0)\) as
As the initial condition for \(\boldsymbol\lambda\) is not known, it’s not possible so far to integrate this equation forward in time.
Initial condition \(\ \boldsymbol\lambda(0)\). It’s possible to find the initial condition for the co-state, using the propagator between \(0\) and \(T\), and the final condition \(\lambda(T) = \mathbf{Q}_T \mathbf{x}_T\). The state of the Hamiltonian system in \(T\) reads
so that (using the second block of the equations first, and then replacing \(\mathbf{x}_T\) from the first block),
and thus
or
Relation between \(\mathbf{x}(t)\) and \(\boldsymbol\lambda(t)\).
or
todo
Does this inverse matrix exist? …
46.1.2.3. Dynamic programming approach#
Value function and relation \(\ \boldsymbol\lambda = \mathbf{P} \mathbf{x}\)
Let the value function be
subject to the equations of motion as constraints \(\dot{\mathbf{x}}_\tau = \mathbf{A}_\tau \mathbf{x}_\tau + \mathbf{B}_\tau \mathbf{u}_\tau\), and the initial condition \(\mathbf{x}(t) = \mathbf{x}_t\). This constraint can be introduced either 1) expressing the state \(\mathbf{x}_\tau\) as a function of the initial state and the input
or 2) with the methods of Lagrange multipliers. A co-state \(\boldsymbol\lambda_t\) - corresponding to the Lagrange multiplier - can be evaluated as
Method 1. Using the expression (28.2) of the general solution of a linear system of ODEs for \(\tau > t\) with initial conditions \(\mathbf{x}(t) = \mathbf{x}_t\) and input \(\mathbf{u}(\tau)\),
the relation \(\boldsymbol\lambda_t = \nabla_{\mathbf{x}_t} V\) gives
From optimization, \(\mathbf{u}_\tau = - \widetilde{\mathbf{R}}^{-1}_\tau \left( \mathbf{B}_\tau^T \boldsymbol\lambda_\tau + \mathbf{S}^T_\tau \mathbf{x}_\tau \right)\),
Method 2.
Optimal control
HJB optimality equation
and thus, from the arbitrariety of \(\delta \mathbf{u}_\tau\), and since \(\widetilde{\mathbf{R}}\) is required to be invertible
…
If (todo why?) \(\boldsymbol\lambda = \mathbf{P} \mathbf{x}\),
Using HJB equation.
Proportional control. This should not be an assumption, but a result of the problem !!!
If \(\mathbf{u} = - \mathbf{G} \mathbf{x}\), the solution of the closed-loop system
reads \(\mathbf{x}(\tau) = \boldsymbol\Psi_c(\tau,t) \mathbf{x}(t)\). The value function becomes
Thus, the costate reads \(\boldsymbol\lambda = \nabla_{\mathbf{x}_t} V = \mathbf{P} \mathbf{x}\).
Matrix \(\mathbf{P}\) satisfies a Lyapunov equation,
with final conditions
as it can be easily found by direct computation of the time derivative of \(\mathbf{P}\).
Decoupled weights
Let \(\mathbf{S} = \mathbf{0}\), then \(\mathbf{u} = - \widetilde{\mathbf{R}}^{-1} \mathbf{B}^T \boldsymbol\lambda\), and thus the control is a linear combination of the co-state.
The transformation \(\mathbf{v} := \mathbf{u} + \widetilde{\mathbf{R}}^{-1} \mathbf{S}^T \mathbf{x}\), make a coupled objective function for the original system a decoupeld objective function for a modified system.
todo
Are \(\Psi\) matrices invertible?
Properties of the Hamilton matrix…
What’s a conjugate point?
…
Coupled state-input weights
Decoupled state-input weights
The problem can be decoupled with a transformation
so that
Extra-diagonal terms are identically zero if \(\mathbf{T} = - \mathbf{R}^{-1} \mathbf{S}^T\). The coordinate transformation becomes
and the running cost reads
The linear system
becomes
Decoupled system
Optimization gives
The modified optimal control reads
and thus
Lyapunov and Riccati equations
Control law in the uncoupled coordinates,
and
so that \(\mathbf{R}^{-1} \mathbf{B}^T \mathbf{P} = \mathbf{K} - \mathbf{R}^{-1} \mathbf{S}^T\).
Relation between the co-state an the state
State and co-state dynamical equations
Riccati equation for \(\boldsymbol\lambda\).
For arbitrary \(\mathbf{x}\), Riccati equation follows
Lyapunov equation for \(\boldsymbol\lambda\). Replacing \(\mathbf{K} = \mathbf{R}^{-1} \mathbf{B}^T \mathbf{P}\),