32.1. Optimal control#
Optimal control can be recast as a constrained optimization problem, \(J\), where an extreme - optimum - of an objective function must be found, subject to constraints that include the equations of motion. Some constraints may be included into an augmented objective function \(\widetilde{J}\) with the methods of Lagrange multipliers.
Finite time vs. Infinite time horizon.
32.1.1. Generic ODE#
The objective function combines (weights) the error on a desired performance and the control input, in order to get the desired behavior with feasible control (that can be provided by actuators, without saturation, avoiding unnecessary high power input and too sharp behavior,…)
As an example, if the goal of the control \(\mathbf{u}\) is to keep the system around \(\mathbf{x} = \mathbf{0}\), the cost function to be minimized can be designed as
32.1.2. LTI#
32.1.2.1. Infinite-horizon full-state feedback#
No need for an observer. The system is assumed to be stable. The augmented cost function reads
with given initial conditions \(\mathbf{x}(0) = \mathbf{x}_0\), so that \(\delta \mathbf{x}_0 = \mathbf{0}\).
Using calculus of variations, the variations of the cost function w.r.t. \(\mathbf{x}\), \(\mathbf{u}\), \(\boldsymbol{\lambda}\) read
From the variation w.r.t. \(\mathbf{u}\), since \(\mathbf{R} > 0\) and thus innvertible,
Now, assuming the relation \(\boldsymbol{\lambda} = \mathbf{P} \mathbf{x}\), it follows
and comparing the two different expressions of \(\dot{\boldsymbol{\lambda}}\), if the equality holds for any \(\mathbf{x}\), the dynamical Riccati equation for \(\mathbf{P}\) is derived as
where \(\widetilde{\mathbf{A}} = \mathbf{A} - \mathbf{B} \mathbf{R}^{-1} \mathbf{S}^T \) and \(\widetilde{\mathbf{Q}} = \mathbf{Q} - \mathbf{S} \mathbf{R}^{-1} \mathbf{S}^T\). Riccati equation is a non-linear dynamical matrix equation in \(\mathbf{P}\). Algorithms for computing the solution of dynamical and algebraic equation exists, see Example 32.1.
Once \(\mathbf{P}\) is evaluated, the control law reads
For infinite-horizone, the algebraic equation (ARE) for the steady state is solved after setting \(\dot{\mathbf{P}} = \mathbf{0}\), the solution for a LTI system is a constant matrix \(\mathbf{P}\), and thus the control law is a proportional feedback on the full-state of the system,
with \(\mathbf{G} = \mathbf{R}^{-1} \left( \mathbf{S}^T + \mathbf{B}^T \mathbf{P} \right)\).
Example 32.1 (Solution of Riccati equation)
…
Properties. todo
\(\mathbf{P}\) symmetric? definite positive? …
…