HinfSynDemo Command
HinfSynDemo Command
[k,g,gfin] = hinfsyn(p,nmeas,ncon,gmin,gmax,tol)
e¾ ¾ d
P
y ¾ u e¾ G = FL (P, K) ¾ d
- K
hinfsyn calculates a controller which stabilizes the system, and renders the H ∞ norm of the
transfer function from d to e “small.” The returned variables include the closed-loop system g,
controller k. The variable gfin is a scalar, containing the the H∞ norm of the transfer function
from d to e using the controller k.
The program hinfsyn automatically iterates on the γ value, tightly converging to two values of γ
for which a “pass” and “fail” occur. This determines γopt to within as tight a tolerance as desired.
The iteration starts from a upper and lower bound, gmax and gmin, and iterates (using bisection)
until a stopping criterion is met. The stopping criterion requires the absolute difference between
passing and failing values of γ to be less than tol. If the routine is called with gmax = gmin, then
no iteration is performed, and only that particular value of γ is tested.
The theorems derived in [DGKF] give necessary and sufficient conditions on the existence of a
controller which renders the closed-loop d → e norm less than γ. Two Hamiltonian matrices (ie.,
associated algebraic Riccati equations) must have positive-semi-definite stabilizing solutions, and
moreover, the two solutions must satisfy a joint condition.
• X and Y Hamiltionian matrices must have no imaginary axis eigenvalues and the invertibility
property of the stable invariant subspace must hold. The imaginary-axis eigenvalues are
tested specifically min(abs(real(eig(ham)))) > epr.
• The conditions above imply stabilizing solutions to the Riccati equations exist. Denote these
as X∞ and Y∞ . These must be positive-semidefinite, and they often will have eigenvalues
at 0, which numerically show up as very small negatives. Hence eigenvalues of X∞ and Y∞
must be greater than -(epp).
• Finally, the coupling condition must hold, which is that the spectral radius of (X∞ Y∞ ) must
222
be less than or equal to γ 2 .
The selection of epr and epp to avoid false “passes” or “fails” is delicate, and at first you should
just use the default values.
The following assumptions are made in the implementation of the hinfsyn algorithm and must be
satisfied:
If the system does not satisfy these conditions, various failures occur. This is the most common
problem that first-time users have. There are a few extra input and output parameters to hinfsyn,
which determine some of the numerical properties and decisions that are made during calculations.
[k,g,gfin,ax,ay,hamx,hamy] = hinfsyn(p,nmeas,ncon,gmin,gmax,tol,ricmethd,epr,epp)
Input arguments
Output arguments
223
The hinfsyn program displays several variables which can be checked to ensure that the above
conditions are being satisfied. For each γ value being tested, the minimum magnitude, real part
of the eigenvalues of the X and Y Hamiltonian matrices are displayed along with the minimum
eigenvalue of X∞ and Y∞ which are the solutions to the X and Y Riccati equations, respectively.
The maximum eigenvalue of X∞ Y∞ , scaled by γ −2 , is also displayed. With enough knowledge
about the theory, this additional information can aid you in the control design process. Specifically,
at any given γ,
• If the X conditions are failing, then regardless of the measurements (even if they were noise-
free state measurements) the disturbance-error map cannot be made less than γ because
there is not the appropriate control authority.
• If the Y conditions are failing, then regardless of the control (even if B2 = I – you could
directly affect all of the state derivatives, referred to as “full control”) the disturbance-
error map cannot be made less than γ because there is too much noise/disturbances in the
measurements, and the estimator cannot adequately determine approximate values of the
states.
• If the X and Y conditions are passing, but the spectral radius condition on XY is failing,
then the two individual points above are not at issue – the appropriate estimation can be
done if full control was available, and the appropriate control u could be calculated from the
exact state measurement. In this case, the problem is the coupling between the two. There
is not enough information in the measurements to correctly estimate the enough about the
plant state to apply the appropriate control, given the dynamics of how the control enters
(basically B2 ). In most problems, this is the condition that is failing when γ approaches its
minimum possible passing value.
In addition to covering the mechanics of the command hinfsyn, this exercise will also explore
some of the properties of the controller that [DGKF] returns. Recall that the theory goes like this:
“There exists a controller K that stabilizes the closed-loop and makes kF L (P, K)k∞ < γ if and
only if 3 conditions (which depend on γ and the plant data) hold.” Note that if the conditions hold,
then since kFL (P, K)k∞ < γ is an “open” condition, there is a whole family of controllers which
work. What is special about the controller that [DGKF] constructs? Considering all controllers
which achieve the norm constraint, [DGKF] returns the controller which also minimizes
Z ∞ h i
log det γ 2 I − G∗ (jω)G(jω) dω
−∞
Here, G is the closed-loop transfer function from d → e. In the literature, this is called the
“central” controller, and for a given γ, we will let Kγ denote the central controller. It is useful to
look at several things regarding Kγ :
• We know the quantity kFL (P, Kγ )k∞ will be less than γ. But how much less?
• Similar to above - what do the details of the closed-loop d → e response look like across
frequency.
224
• Bandwidth of Kγ as γ → γopt from above.
A control law will be synthesized for the HIMAT interconnection structure shown below. The
controller is designed to make the H∞ norm from d → e small.
" #
e1
e2 6
" # " #
d1 d3
wdel d2 d4
" #
6 e3
- Σf
?- himat - Σf
? - wp -
e4
−
" # " ?#
u1 y1
u2 y2
e¾ ¾ d
himat ic
y¾ ¾ u
Control Design
Design a H∞ (sub)optimal control law for the open-loop generalized plant himat ic, with 2 sensor
measurements, 4 error signals, 2 actuator inputs, 4 exogenous disturbances. Use default values for
epr, epp and ricmethd.
Initially, we will not make use of the iteration portion of the hinfsyn program. Set gmax and gmin
equal, and the software simply checks the solvability conditions at that one value of γ (regardless
of the tolerance, tol).
225
A H∞ central control law will be designed and analyzed at different γ levels to help us gain an
understanding of what the central controller is minimizing.
À mkhimat;
À minfo(himat);
À himatic;
À minfo(himat ic);
À nmeas = 2; % number of sensor measurements
À ncont = 2; % number of control inputs
À gmin = 10; % gamma value to be tested
À gmax = 10; % gamma value to be tested
À tol = .1; % tolerance on the gamma stopping value
Try a single design at γ = 10. It should pass. Look at some of the properties.
• What does the closed-loop “disturbance-to-error” singular value plot look like across fre-
quency?
• Note the bandwidth of controller, and open-loop gain singular value plots σ i [P (jω)K(jω)].
Let’s rerun the above commands for gmin = gmax = 5, 3, 2 and 1.8. Name the closed-loop systems
g5, g3, g2 and g18 respectively. Ask the same questions:
226
• What closed-loop “disturbance-to-error” norm is guaranteed to be achieved by each of these
controllers?
Now design an H∞ controller using the γ iteration part of the program. The range of γ is selected
to be between 1.0 and 10.0 with a stopping tolerance, tol, on the absolute difference betwen a
“pass” and “fail” value of γ. Here, we set tol to 0.1.
À gmin = 1;
À gmax = 10;
À tol = 0.1;
À
À [k,g] = hinfsyn(himatic,nmeas,ncon,gmin,gmax,tol);
The program outputs at each iteration the current γ value being tested, and eigenvalue information
about the X and Y Hamiltionian matrices and X∞ and Y∞ Riccati solutions. At the end of each
iteration a (p) denoting the tested γ value passed or a (f) denoting a failure is displayed. Upon
finishing, hinfsyn prints out the γ value achieved.
8.2 References
[DGKF] J. Doyle, K. Glover, P. Khargonekar, and B. Francis, “State Space Solutions to H 2 and
H∞ Control Problems,” IEEE Trans. Auto. Control, vol. 34, no. 8, pp. 831-847, August, 1989.
227