Documentation

This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

h2syn

H2 control synthesis for LTI plant

Syntax

[K,CL,GAM,INFO] = H2SYN(P,NMEAS,NCON)

Description

[K,CL,GAM,INFO] = H2SYN(P,NMEAS,NCON) computes a stabilizing H2 optimal controller K for a partitioned LTI plant P:

The LTI system P is partitioned where inputs to B1 are the disturbances, inputs to B2 are the control inputs, output of C1 are the errors to be kept small, and outputs of C2 are the output measurements provided to the controller. B2 has column size (NCON) and C2 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 H2 cost γ in GAM. INFO is a struct array that returns additional information about the design.

H2 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)

H2 optimal cost γ = $\begin{array}{l}‖{T}_{{y}_{1}{u}_{1}}‖2\\ \end{array}$

INFO

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}\left(t\right)={K}_{FI}x\left(t\right)$ INFO.GFI Full-information closed-loop system GFI=ss(A-B2*KFI,B1,C1-D12*KFI,D11) INFO.HAMX X Hamiltonian matrix (state-feedback) INFO.HAMY Y Hamiltonian matrix (Kalman filter)

Examples

collapse all

Stabilize a 4-by-5 unstable plant with three states, two measurement signals, and one control signal.

In practice, P is an augmented plant that you have constructed by combining a model of the system to control with appropriate H2 weighting functions. For this example, use a randomly-generated model.

rng(0,'twister'); P = rss(3,4,5)'; 

This command creates a 4-output, 5-input stable model and then takes its Hermitian conjugate. This operation yields a 5-output, 4-input unstable model. For this example, assume that one of the inputs is a control signal and two of the outputs are measurements.

Confirm that P is unstable. All the poles are in the right half-plane.

pole(P) 
ans = 0.2593 15.9497 20.7994 

Design the stabilizing controller, assuming NMEAS = 2 and NCON = 1.

[K,CL,GAM] = h2syn(P,2,1); 

Examine the closed-loop system to confirm that the plant is stabilized.

pole(CL) 
ans = -26.8951 -22.4817 -20.6965 -17.6041 -0.8694 -2.6697 

Shape the singular value plots of the sensitivity and complementary sensitivity .

To do so, find a stabilizing controller K that minimizes the norm of:

 

Assume the following plant and weights:

 

Using those values, construct the augmented plant P, as illustrated in the mixsyn reference page.

s = zpk('s'); G = 10*(s-1)/(s+1)^2; G.u = 'u2'; G.y = 'y'; W1 = 0.1*(s+1000)/(100*s+1); W1.u = 'y2'; W1.y = 'y11'; W2 = tf(0.1); W2.u = 'u2'; W2.y = 'y12'; S = sumblk('y2 = u1 - y'); P = connect(G,S,W1,W2,{'u1','u2'},{'y11','y12','y2'}); 

Use h2syn to generate the controller. Note that this system has NMEAS = 1 and NCON = 1.

[K,CL,GAM] = h2syn(P,1,1); 

Examine the resulting loop shape.

L = G*K; S = inv(1+L); T = 1-S; sigmaplot(L,'k-.',S,'r',T,'g') legend('open-loop','sensitivity','closed-loop') 

Limitations

• (A, B2, C2) must be stabilizable and detectable.

• D12 must have full column rank and D21 must have full row rank

Algorithms

The H2 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 H2 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 JLQG satisfies

$\begin{array}{c}{J}_{LQG}=\underset{T\to \infty }{\mathrm{lim}}E\left\{\frac{1}{T}{\int }_{0}^{T}{y}_{1}^{T}{y}_{1}dt\right\}\\ =\underset{T\to \infty }{\mathrm{lim}}E\left\{\frac{1}{T}{\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}{\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 u1 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 \left(t\right)\\ \theta \left(t\right)\end{array}\right]{\left[\begin{array}{cc}\xi \left(\tau \right)& \theta \left(\tau \right)\end{array}\right]}^{T}\right\}=\left[\begin{array}{cc}\Xi & {N}_{f}\\ {N}_{f}^{T}& \Theta \end{array}\right]\delta \left(t-\tau \right)\\ =\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 \left(t-\tau \right)\end{array}$

The H2 optimal controller K(s) is thus realizable in the usual LQG manner as a full-state feedback KFI and a Kalman filter with residual gain matrix KFC.

1. Kalman Filter

$\begin{array}{l}\stackrel{˙}{\stackrel{^}{x}}=A\stackrel{^}{x}+{B}_{2}{u}_{2}+{K}_{FC}\left({y}_{2}-{C}_{2\stackrel{^}{x}}-{D}_{22}{u}_{2}\right)\\ {K}_{FC}=\left(Y{C}_{2}^{T}+{N}_{f}\right){\Theta }^{-1}=\left(Y{C}_{2}^{T}+{B}_{1}{D}_{21}^{T}\right){\left(}^{{D}_{21}}\end{array}$

where Y = YT≥0 solves the Kalman filter Riccati equation

$Y{A}^{T}+AY-\left(Y{C}_{2}^{T}+{N}_{f}\right){\Theta }^{-1}\left({C}_{2}Y+{N}_{f}^{T}\right)+\Xi =0$
2. Full-State Feedback

$\begin{array}{l}{u}_{2}={K}_{FI}\stackrel{^}{x}\\ {K}_{FI}={R}^{-1}\left({B}_{2}^{T}X+{N}_{c}^{T}\right)={D}_{12}^{T}{D}_{12}{\right)}^{-1}\left({B}_{2}^{T}X+{D}_{12}^{T}{C}_{1}\right)\end{array}$

where X = XT≥0 solves the state-feedback Riccati equation

${A}^{T}X+XA-\left(X{B}_{2}+{N}_{c}\right){R}^{-1}\left({B}_{2}^{T}X+{N}_{c}^{T}\right)+Q=0$

The final positive-feedback H2 optimal controller ${u}_{2}=K\left(s\right){y}_{2}$ has a familiar closed-form

$K\left(s\right):=\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 H2 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 H2-norm is infinite when the plant D11 matrix associated with the input disturbances and output errors is non-zero; in this case, the optimal H2 controller returned by h2syn is computed by first setting D11 to zero.

3. Optimal Cost GAM

The full information (FI) cost is given by the equation . The output estimation cost (OEF) is given by , where . The disturbance feedforward cost (DFL) is , where L2 is defined by $-\left({Y}_{2}{{C}^{\prime }}_{2}+{B}_{1}{{D}^{\prime }}_{21}\right)$ and the full control cost (FC) is given by . X2 and Y2 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 H2 cost γ = is

GAM =sqrt(FI^2 + OEF^2+ trace(D11*D11')); 

otherwise, GAM = Inf.

References

[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.

[2] Doyle, J.C., K. Glover, P. Khargonekar, and B. Francis, "State-space solutions to standard H2 and H control problems," IEEE Transactions on Automatic Control, vol. 34, no. 8, pp. 831–847, August 1989.

[3] Glover, K., and J.C. Doyle, "State-space formulae for all stabilizing controllers that satisfy an H norm bound and relations to risk sensitivity," Systems and Control Letters, 1988. vol. 11, pp. 167–172, August 1989.