[K,CL,GAM,INFO] = H2SYN(P,NMEAS,NCON)
[K,CL,GAM,INFO] = H2SYN(P,NMEAS,NCON)
computes
a stabilizing H_{2} optimal
controller K
for a partitioned LTI plant P
:
The LTI system P
is partitioned where inputs
to B_{1} are the disturbances,
inputs to B_{2} are the control
inputs, output of C_{1} are
the errors to be kept small, and outputs of C_{2} are
the output measurements provided to the controller. B_{2} has
column size (NCON
) and C_{2} has
row size (NMEAS
). The controller, K
,
is a state-space (ss
) model and has the same
number of states as P
.
If P
is constructed with mktito
, you can omit NMEAS
and NCON
from
the arguments.
The closed-loop system is returned in CL
and
the achieved H_{2} cost γ in GAM
. INFO
is
a struct
array that returns additional information
about the design.
H_{2} control
system CL= lft(P,K)
=.
Output Arguments | Description |
---|---|
K | LTI controller |
CL= lft(P,K) | LTI closed-loop system $$T{y}_{1}{u}_{1}$$ |
GAM = norm(CL) | H_{2} optimal cost γ = $$\begin{array}{l}\Vert {T}_{{y}_{1}{u}_{1}}\Vert 2\\ \end{array}$$ |
INFO | Additional output information |
Additional output — structure array INFO
containing
possible additional information depending on METHOD
)
INFO.NORMS | Norms of four different quantities, full information control cost (FI), output estimation cost (OEF), direct feedback cost (DFL) and full control cost (FC). NORMS = [FI OEF DFL FC]; |
INFO.KFI | Full-information gain matrix (constant feedback) $${u}_{2}(t)={K}_{FI}x(t)$$ |
INFO.GFI | Full-information closed-loop system |
INFO.HAMX | X Hamiltonian matrix (state-feedback) |
INFO.HAMY | Y Hamiltonian matrix (Kalman filter) |
(A, B_{2}, C_{2}) must be stabilizable and detectable.
D_{12} must have full column rank and D_{21} must have full row rank
The H_{2} optimal control theory has its roots in the frequency domain interpretation the cost function associated with time-domain state-space LQG control theory [1]. The equations and corresponding nomenclature used here are taken from the Doyle et al., 1989 [2]-[3].
h2syn
solves the H_{2} optimal
control problem by observing that it is equivalent to a conventional
Linear-Quadratic Gaussian (LQG) optimal control problem. For simplicity, we shall
describe the details of algorithm only for the continuous-time case,
in which case the cost function J_{LQG} satisfies
$$\begin{array}{c}{J}_{LQG}=\underset{T\to \infty}{\mathrm{lim}}E\left\{\frac{1}{T}{\displaystyle {\int}_{0}^{T}{y}_{1}^{T}{y}_{1}dt}\right\}\\ =\underset{T\to \infty}{\mathrm{lim}}E\left\{\frac{1}{T}{\displaystyle {\int}_{0}^{T}\left[{x}^{T}{u}_{2}^{T}\right]\left[\begin{array}{cc}Q& {N}_{c}\\ {N}_{c}^{T}& R\end{array}\right]\left[\begin{array}{c}x\\ {u}_{2}\end{array}\right]dt}\right\}\\ =\underset{T\to \infty}{\mathrm{lim}}E\left\{\frac{1}{T}{\displaystyle {\int}_{0}^{T}\left[{x}^{T}{u}_{2}^{T}\right]\left[\begin{array}{c}{C}_{1}^{T}\\ {D}_{12}^{T}\end{array}\right]\left[\begin{array}{cc}{C}_{1}& {D}_{12}\end{array}\right]\left[\begin{array}{c}x\\ {u}_{2}\end{array}\right]dt}\right\}\end{array}$$
with plant noise u_{1} channel of intensity I, passing through the matrix [B1;0;D12] to produce equivalent white correlated with plant ξ and white measurement noise θ having joint correlation function
$$\begin{array}{c}E\left\{\left[\begin{array}{c}\xi (t)\\ \theta (t)\end{array}\right]{\left[\begin{array}{cc}\xi (\tau )& \theta (\tau )\end{array}\right]}^{T}\right\}=\left[\begin{array}{cc}\Xi & {N}_{f}\\ {N}_{f}^{T}& \Theta \end{array}\right]\delta (t-\tau )\\ =\left[\begin{array}{c}{B}_{1}\\ {D}_{21}\end{array}\right]\left[\begin{array}{cc}{B}_{1}^{T}& {D}_{21}^{T}\end{array}\right]\delta (t-\tau )\end{array}$$
The H_{2} optimal controller K(s) is thus realizable in the usual LQG manner as a full-state feedback K_{FI} and a Kalman filter with residual gain matrix K_{FC}.
Kalman Filter
$$\begin{array}{l}\dot{\widehat{x}}=A\widehat{x}+{B}_{2}{u}_{2}+{K}_{FC}({y}_{2}-{C}_{2\widehat{x}}-{D}_{22}{u}_{2})\\ {K}_{FC}=(Y{C}_{2}^{T}+{N}_{f}){\Theta}^{-1}=(Y{C}_{2}^{T}+{B}_{1}{D}_{21}^{T}){(}^{{D}_{21}}\end{array}$$
where Y = Y^{T}≥0 solves the Kalman filter Riccati equation
$$Y{A}^{T}+AY-(Y{C}_{2}^{T}+{N}_{f}){\Theta}^{-1}({C}_{2}Y+{N}_{f}^{T})+\Xi =0$$
Full-State Feedback
$$\begin{array}{l}{u}_{2}={K}_{FI}\widehat{x}\\ {K}_{FI}={R}^{-1}({B}_{2}^{T}X+{N}_{c}^{T})={D}_{12}^{T}{D}_{12}{)}^{-1}({B}_{2}^{T}X+{D}_{12}^{T}{C}_{1})\end{array}$$
where X = X^{T}≥0 solves the state-feedback Riccati equation
$${A}^{T}X+XA-(X{B}_{2}+{N}_{c}){R}^{-1}({B}_{2}^{T}X+{N}_{c}^{T})+Q=0$$
The final positive-feedback H_{2}^{ }optimal controller $${u}_{2}=K(s){y}_{2}$$ has a familiar closed-form
$$K(s):=\left[\begin{array}{cc}A-{K}_{FC}{C}_{2}-{B}_{2}{K}_{FI}+{K}_{FC}{D}_{22}{K}_{FI}& {K}_{f}\\ -{K}_{FI}& 0\end{array}\right]$$
h2syn
implements the continuous optimal H_{2} control
design computations using the formulae described in the Doyle, et
al. [2]; for discrete-time plants, h2syn
uses
the same controller formula, except that the corresponding discrete
time Riccati solutions (dare) are substituted for X and Y.
A Hamiltonian is formed and solved via a Riccati equation. In the
continuous-time case, the optimal H_{2}-norm
is infinite when the plant D_{11} matrix
associated with the input disturbances and output errors is non-zero;
in this case, the optimal H_{2} controller
returned by h2syn
is computed by first setting D11 to
zero.
Optimal Cost GAM
The full information (FI) cost is given by the equation $${\left(\text{trace}({{B}^{\prime}}_{1}{X}_{2}{B}_{1})\right)}^{{}^{\frac{1}{2}}}$$. The output estimation cost
(OEF) is given by $${\left(\text{trace}({F}_{2}{Y}_{2}{{F}^{\prime}}_{2})\right)}^{{}^{\frac{1}{2}}}$$, where
. The disturbance feedforward cost
(DFL) is $${\left(\text{trace}({{L}^{\prime}}_{2}{X}_{2}{L}_{2})\right)}^{{}^{\frac{1}{2}}}$$, where L_{2} is
defined by $$-({Y}_{2}{{C}^{\prime}}_{2}+{B}_{1}{{D}^{\prime}}_{21})$$ and the full control cost (FC)
is given by $${\left(\text{trace}({C}_{1}{Y}_{2}{{C}^{\prime}}_{1})\right)}^{{}^{\frac{1}{2}}}$$. X_{2} and Y_{2} are
the solutions to the X and Y Riccati
equations, respectively. For for continuous-time plants with zero
feedthrough term (D11
= 0), and for all discrete-time
plants, the optimal H_{2} cost γ =
is
GAM =sqrt(FI^2 + OEF^2+ trace(D11*D11'));
otherwise, GAM
= Inf
.
[1] Safonov, M.G., A.J. Laub, and G. Hartmann, "Feedback Properties of Multivariable Systems: The Role and Use of Return Difference Matrix," IEEE Trans. of Automat. Contr., AC-26, pp. 47-65, 1981.