Robust Matlab
Robust Matlab
Robust Matlab
R2013b
Gary Balas
Richard Chiang
Andy Packard
Michael Safonov
How to Contact MathWorks
www.mathworks.com Web
comp.soft-sys.matlab Newsgroup
www.mathworks.com/contact_TS.html Technical Support
508-647-7000 (Phone)
508-647-7001 (Fax)
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
September 2005 First printing New for Version 3.0.2 (Release 14SP3)
March 2006 Online only Revised for Version 3.1 (Release 2006a)
September 2006 Online only Revised for Version 3.1.1 (Release 2006b)
March 2007 Online only Revised for Version 3.2 (Release 2007a)
September 2007 Online only Revised for Version 3.3 (Release 2007b)
March 2008 Online only Revised for Version 3.3.1 (Release 2008a)
October 2008 Online only Revised for Version 3.3.2 (Release 2008b)
March 2009 Online only Revised for Version 3.3.3 (Release 2009a)
September 2009 Online only Revised for Version 3.4 (Release 2009b)
March 2010 Online only Revised for Version 3.4.1 (Release 2010a)
September 2010 Online only Revised for Version 3.5 (Release 2010b)
April 2011 Online only Revised for Version 3.6 (Release 2011a)
September 2011 Online only Revised for Version 4.0 (Release 2011b)
March 2012 Online only Revised for Version 4.1 (Release 2012a)
September 2012 Online only Revised for Version 4.2 (Release 2012b)
March 2013 Online only Revised for Version 4.3 (Release 2013a)
September 2013 Online only Revised for Version 5.0 (Release 2013b)
Contents
Introduction
1
Robust Control Toolbox Product Description . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
v
Multivariable Loop Shaping
2
Tradeoff Between Performance and Robustness . . . . . . 2-2
vi Contents
Approximate Plant Model by Additive Error
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Robustness Analysis
4
Create Models of Uncertain Systems . . . . . . . . . . . . . . . . 4-2
Creating Uncertain Models of Dynamic Systems . . . . . . . . 4-2
Creating Uncertain Parameters . . . . . . . . . . . . . . . . . . . . . . 4-3
Quantifying Unmodeled Dynamics . . . . . . . . . . . . . . . . . . . 4-6
vii
H-Infinity and Mu Synthesis
5
Interpretation of H-Infinity Norm . . . . . . . . . . . . . . . . . . . 5-2
Norms of Signals and Systems . . . . . . . . . . . . . . . . . . . . . . . 5-2
Using Weighted Norms to Characterize Performance . . . . 5-3
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-38
viii Contents
Performance and Robustness Specifications for
looptune . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
ix
Supported Blocks for Tuning in Simulink . . . . . . . . . . . . 6-40
Tuning Other Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-40
x Contents
Multi-Loop Control of a Helicopter . . . . . . . . . . . . . . . . . . 6-238
Gain-Scheduled Controllers
7
Gain-Scheduled Control Systems . . . . . . . . . . . . . . . . . . . . 7-2
xi
Gain-Scheduled PID Controller . . . . . . . . . . . . . . . . . . . . . 7-22
Index
xii Contents
1
Introduction
The toolbox automatically tunes both SISO and MIMO controllers. These can
include decentralized, fixed-structure controllers with multiple tunable blocks
spanning multiple feedback loops. The toolbox lets you tune one controller
against a set of plant models. You can also tune gain-scheduled controllers.
You can specify multiple tuning objectives, such as reference tracking,
disturbance rejection, stability margins, and closed-loop pole locations.
Key Features
• Modeling of systems with uncertain parameters or neglected dynamics
• Worst-case analysis of stability margins and sensitivity to disturbances
• Automatic tuning of centralized, decentralized, and multiloop controllers
• Automatic tuning of gain-scheduled controllers
• Robustness analysis and controller tuning in Simulink®
• H-infinity and mu-synthesis algorithms
• General-purpose LMI solvers
1-2
Product Requirements
Product Requirements
Robust Control Toolbox software requires that you have installed Control
System Toolbox™ software.
1-3
1 Introduction
Modeling Uncertainty
At the heart of robust control is the concept of an uncertain LTI system.
Model uncertainty arises when system gains or other parameters are not
precisely known, or can vary over a given range. Examples of real parameter
uncertainties include uncertain pole and zero locations and uncertain gains.
You can also have unstructured uncertainties, by which is meant complex
parameter variations satisfying given magnitude bounds.
With Robust Control Toolbox software you can create uncertain LTI models
as MATLAB® objects specifically designed for robust control applications. You
can build models of complex systems by combining models of subsystems
using addition, multiplication, and division, as well as with Control System
Toolbox commands like feedback and lft.
For information about LTI model types, see “Linear System Representation”.
1-4
System with Uncertain Parameters
The system has the block diagram model shown below, where the individual
carts have the respective transfer functions.
1
G1 ( s ) =
m1 s2
1
G2 ( s ) = .
m2 s2
The parameters m1, m2, and k are uncertain, equal to one plus or minus 20%:
m1 = 1 – 0.2
m2 = 1 – 0.2
k = 1 – 0.2
1-5
1 Introduction
⎡ 0 ⎤ ⎡1⎤
F ( s) = ⎢ ⎥ [1 −1] + ⎢ ⎥ ⎡⎣0 G2 ( s ) ⎤⎦ .
⎣G1 ( s ) ⎦ ⎣ −1⎦
1-6
System with Uncertain Parameters
The variable P is a SISO uncertain state-space (USS) object with four states
and three uncertain parameters, m1, m2, and k. You can recover the nominal
plant with the command
zpk(P.nominal)
which returns
Zero/pole/gain:
1
--------------
s^2 (s^2 + 2)
100 ( s + 1)
3
C ( s) =
( 0.001s + 1)3
then you can form the controller and the closed-loop system y1 = T(s) u1 and
view the closed-loop system’s step response on the time interval from t=0 to
t=0.1 for a Monte Carlo random sample of five combinations of the three
uncertain parameters k, m1, and m2 using this code:
1-7
1 Introduction
1-8
Worst-Case Performance
Worst-Case Performance
To be robust, your control system should meet your stability and performance
requirements for all possible values of uncertain parameters. Monte Carlo
parameter sampling via usample can be used for this purpose as shown in
Monte Carlo Sampling of Uncertain System’s Step Response on page 1-8, but
Monte Carlo methods are inherently hit or miss. With Monte Carlo methods,
you might need to take an impossibly large number of samples before you hit
upon or near a worst-case parameter combination.
1-9
1 Introduction
[StabilityMargin,Udestab,REPORT] = robuststab(T);
REPORT
The report tells you that the control system is robust for all parameter
variations in the ±20% range, and that the smallest destabilizing combination
of real variations in the values k, m1, and m2 has sizes somewhere between
311% and 500% greater than ±20%, i.e., between ±62.2% and ±100%. The
value Udestab returns an estimate of the 500% destabilizing parameter
variation combination:
Udestab =
k: 1.2174e-005
m1: 1.2174e-005
m2: 2.0000.
1-10
Worst-Case Performance of Uncertain System
[PeakGain,Uwc] = wcgain(T);
Twc=usubs(T,Uwc);
% Worst case closed-loop system T
Trand=usample(T,4);
% 4 random samples of uncertain system T
bodemag(Twc,'r',Trand,'b-.',{.5,50}); % Do bode plot
legend('T_{wc} - worst-case',...
'T_{rand} - random samples',3);
1-11
1 Introduction
For example, consider the 2-by-2 NASA HiMAT aircraft model (Safonov,
Laub, and Hartmann [8]) depicted in the following figure. The control
variables are elevon and canard actuators (δe and δc). The output variables
are angle of attack (α) and attitude angle (θ). The model has six states:
⎡ x1 ⎤ ⎡ ⎤
⎢x ⎥ ⎢ ⎥
⎢ 2⎥ ⎢ ⎥
⎢ x3 ⎥ ⎢ ⎥
x=⎢ ⎥=⎢ ⎥
⎢ x4 ⎥ ⎢ ⎥
⎢ x5 ⎥ ⎢ xe ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣ x6 ⎥⎦ ⎢⎣ x ⎦⎥
1-12
Loop-Shaping Controller Design
You can enter the state-space matrices for this model with the following code:
1-13
1 Introduction
0 0 0 1 0 0];
dg = [ 0 0;
0 0];
G=ss(ag,bg,cg,dg);
To design a controller to shape the frequency response (sigma) plot so that the
system has approximately a bandwidth of 10 rad/s, you can set as your target
desired loop shape Gd(s)=10/s, then use loopsyn(G,Gd) to find a loop-shaping
controller for G that optimally matches the desired loop shape Gd by typing:
1-14
Loop-Shaping Controller Design
The achieved loop shape matches the desired target Gd to within about γ dB.
1-15
1 Introduction
Among the most important types of model reduction methods are minimize
bounds methods on additive, multiplicative, and normalized coprime factor
(NCF) model error. You can access all three of these methods using the
command reduce.
1-16
Reduce Order of Synthesized Controller
For the NASA HiMAT design in the last section, you can type
hankelsv(K,'ncf','log');
which displays a logarithmic plot of the NCF Hankel singular values — see
the following figure.
1-17
1 Introduction
Theory says that, without danger of inducing instability, you can confidently
discard at least those controller states that have NCF Hankel singular values
that are much smaller than ncfmargin(G,K).
hankelsv(K,'ncf','log');v=axis;
hold on; plot(v(1:2), ncfmargin(G,K)*[1 1],'--'); hold off
1-18
Reduce Order of Synthesized Controller
Five of the 16 NCF Hankel Singular Values of HiMAT Controller K Are Small
Compared to ncfmargin(G,K)
In this case, you can safely discard 5 of the 16 states of K and compute an
11-state reduced controller by typing:
K1=reduce(K,11,'errortype','ncf');
sigma(G*K1,'b',G*K,'r--',{.1,30});
1-19
1 Introduction
The picture above shows that low-frequency gain is decreased considerably for
inputs in one vector direction. Although this does not affect stability, it affects
performance. If you wanted to better preserve low-frequency performance,
you would discard fewer than five of the 16 states of K.
1-20
LMI Solvers
LMI Solvers
At the core of many emergent robust control analysis and synthesis routines
are powerful general-purpose functions for solving a class of convex nonlinear
programming problems known as linear matrix inequalities. The LMI
capabilities are invoked by Robust Control Toolbox software functions
that evaluate worst-case performance, as well as functions like hinfsyn
and h2hinfsyn. Some of the main functions that help you access the LMI
capabilities of the toolbox are shown in the following table.
Specification of LMIs
lmiedit GUI for LMI specification
setlmis Initialize the LMI description
lmivar Define a new matrix variable
lmiterm Specify the term content of an LMI
newlmi Attach an identifying tag to new LMIs
getlmis Get the internal description of the LMI system
LMI Solvers
feasp Test feasibility of a system of LMIs
gevp Minimize generalized eigenvalue with LMI constraints
mincx Minimize a linear objective with LMI constraints
dec2mat Convert output of the solvers to values of matrix
variables
1-21
1 Introduction
G=tf(1,[1 2 3])
G=ss([-1 0; 0 -1], [1;1],[1 1],3)
1-22
Acknowledgments
Acknowledgments
Professor Andy Packard is with the Faculty of Mechanical Engineering
at the University of California, Berkeley. His research interests include
robustness issues in control analysis and design, linear algebra and numerical
algorithms in control problems, applications of system theory to aerospace
problems, flight control, and control of fluid flow.
The linear matrix inequality (LMI) portion of Robust Control Toolbox software
was developed by these two authors:
1-23
1 Introduction
1-24
Bibliography
Bibliography
[1] Boyd, S.P., El Ghaoui, L., Feron, E., and Balakrishnan, V., Linear Matrix
Inequalities in Systems and Control Theory, Philadelphia, PA, SIAM, 1994.
[2] Dorato, P. (editor), Robust Control, New York, IEEE Press, 1987.
[3] Dorato, P., and Yedavalli, R.K. (editors), Recent Advances in Robust
Control, New York, IEEE Press, 1990.
[4] Doyle, J.C., and Stein, G., “Multivariable Feedback Design: Concepts
for a Classical/Modern Synthesis,” IEEE Trans. on Automat. Contr., 1981,
AC-26(1), pp. 4-16.
[5] El Ghaoui, L., and Niculescu, S., Recent Advances in LMI Theory for
Control, Philadelphia, PA, SIAM, 2000.
[6] Lehtomaki, N.A., Sandell, Jr., N.R., and Athans, M., “Robustness Results
in Linear-Quadratic Gaussian Based Multivariable Control Designs,” IEEE
Trans. on Automat. Contr., Vol. AC-26, No. 1, Feb. 1981, pp. 75-92.
[8] Safonov, M.G., Laub, A.J., and Hartmann, G., “Feedback Properties of
Multivariable Systems: The Role and Use of Return Difference Matrix,” IEEE
Trans. of Automat. Contr., 1981, AC-26(1), pp. 47-65.
[9] Safonov, M.G., Chiang, R.Y., and Flashner, H., “H∞ Control Synthesis
for a Large Space Structure,” Proc. of American Contr. Conf., Atlanta, GA,
June 15-17, 1988.
[10] Safonov, M.G., and Chiang, R.Y., “CACSD Using the State-Space L∞
Theory — A Design Example,” IEEE Trans. on Automatic Control, 1988,
AC-33(5), pp. 477-479.
[11] Sanchez-Pena, R.S., and Sznaier, M., Robust Systems Theory and
Applications, New York, Wiley, 1998.
1-25
1 Introduction
[13] Wie, B., and Bernstein, D.S., “A Benchmark Problem for Robust
Controller Design,” Proc. American Control Conf., San Diego, CA, May 23-25,
1990; also Boston, MA, June 26-28, 1991.
[14] Zhou, K., Doyle, J.C., and Glover, K., Robust and Optimal Control,
Englewood Cliffs, NJ, Prentice Hall, 1996.
1-26
2
as Δ M = G0−1 ( G − G0 )
or, equivalently,
G = ( I + Δ M ) G0 .
2-2
Tradeoff Between Performance and Robustness
2-3
2 Multivariable Loop Shaping
If r < p then there are p – r zero singular values, i.e., σr+1 = σr+2 = ... =σp = 0.
( A ) = 1.
When A is a square n-by-n matrix, then the nth singular value (i.e., the least
singular value) is denoted
( A) n.
2-4
Norms and Singular Values
Ax
( A ) = max x∈C h
x
Ax
( A ) = min x∈C h
x
These properties are especially important because they establish that the
greatest and least singular values of a matrix A are the maximal and minimal
"gains" of the matrix as the input vector x varies over all possible directions.
For stable continuous-time LTI systems G(s), the H2-norm and the H∞-norms
are defined terms of the frequency-dependent singular values of G(jω):
H2-norm:
p
⎡ 1 ⎤ ∞
( )
2
G 2 ⎢⎣ 2 ⎥⎦ ∫−∞ ∑ i ( G ( j ) ) d
i=1
H∞-norm:
G 2
sup ( G ( j ) )
2-5
2 Multivariable Loop Shaping
def −1
S ( s) = ( I + L ( s))
def −1
R ( s) = K ( s) ( I + L ( s))
def −1
T ( s) = L ( s) ( I + L ( s)) = I − S ( s)
L ( s) = G ( s) K ( s). (2-1)
The two matrices S(s) and T(s) are known as the sensitivity function and
complementary sensitivity function, respectively. The matrix R(s) has no
common name. The singular value Bode plots of each of the three transfer
function matrices S(s), R(s), and T(s) play an important role in robust
multivariable control system design. The singular values of the loop transfer
function matrix L(s) are important because L(s) determines the matrices
S(s) and T(s).
2-6
Typical Loop Shapes, S and T Design
( S ( j ) ) ≤ W1−1 ( j ) (2-2)
The singular value Bode plots of R(s) and of T(s) are used to measure
the stability margins of multivariable feedback designs in the face of
additive plant perturbations ΔA and multiplicative plant perturbations ΔM,
respectively. See the following figure.
Consider how the singular value Bode plot of complementary sensitivity T(s)
determines the stability margin for multiplicative perturbations ΔM. The
multiplicative stability margin is, by definition, the "size" of the smallest
stable ΔM(s) that destabilizes the system in the figure below when ΔA = 0.
2-7
2 Multivariable Loop Shaping
Additive/Multiplicative Uncertainty
1
( Δ M ( j ) ) = .
( T ( j ) )
A similar result is available for relating the stability margin in the face of
2-8
Typical Loop Shapes, S and T Design
1
( Δ A ( j ) ) = .
( R ( j ) )
where |W2(jω)| and |W3(jω)| are the respective sizes of the largest
anticipated additive and multiplicative plant perturbations.
1
≥ W1 ( j ) ; i ( T [ j ]) ≤ W3−1 ( j )
i ( S ( j ) )
It is interesting to note that in the upper half of the figure (above the 0 dB
line),
1
( L ( j ) ) ≈
( S ( j ) )
2-9
2 Multivariable Loop Shaping
( L ( j ) ) ≈ ( T ( j ) ) .
def −1 −1
S ( s) = ( I + L ( s)) ≈ L ( s)
if ( L ( s ) ) 1 , and
def −1
T ( s) = L ( s) ( I + L ( s)) ≈ L ( s)
if ( L ( s ) ) 1.
2-10
Typical Loop Shapes, S and T Design
2-11
2 Multivariable Loop Shaping
2-12
Typical Loop Shapes, S and T Design
L ( j )
( T ( j ) ) =
1 + L ( j )
which is precisely the quantity you obtain from Nichols chart M-circles. Thus,
1
GM ≥ 1 +
T∞
1
GM ≥ 1 +
1
1−
S∞
⎛ 1 ⎞
M ≥ 2 sin −1 ⎜ ⎟
⎜2 T ⎟
⎝ ∞ ⎠
⎛ 1 ⎞
M ≥ 2 sin −1 ⎜ ⎟.
⎜2 T ⎟
⎝ ∞ ⎠
(See [6].) These formulas are valid provided S ∞ and T ∞ are larger than 1,
as is normally the case. The margins apply even when the gain perturbations
or phase perturbations occur simultaneously in several feedback channels.
The infinity norms of S and T also yield gain reduction tolerances. The gain
reduction tolerance gm is defined to be the minimal amount by which the gains
in each loop would have to be decreased in order to destabilize the system.
Upper bounds on gm are as follows:
2-13
2 Multivariable Loop Shaping
1
gM ≤ 1 −
T∞
1
gM ≤ .
1
1+
S∞
2-14
Using LOOPSYN to Do H-Infinity Loop Shaping
K = loopsyn(G,Gd)
2-15
2 Multivariable Loop Shaping
ag =[
-2.2567e-02 -3.6617e+01 -1.8897e+01 -3.2090e+01 3.2509e+00 -7.6257e-01;
9.2572e-05 -1.8997e+00 9.8312e-01 -7.2562e-04 -1.7080e-01 -4.9652e-03;
1.2338e-02 1.1720e+01 -2.6316e+00 8.7582e-04 -3.1604e+01 2.2396e+01;
0 0 1.0000e+00 0 0 0;
0 0 0 0 -3.0000e+01 0;
0 0 0 0 0 -3.0000e+01];
bg = [0 0;
0 0;
0 0;
0 0;
30 0;
0 30];
cg = [0 1 0 0 0 0;
0 0 0 1 0 0];
dg = [0 0;
0 0];
G=ss(ag,bg,cg,dg);
The control variables are elevon and canard actuators (δe and δc). The output
variables are angle of attack (α) and attitude angle (θ).
2-16
Loop-Shaping Control Design of Aircraft Model
This model is good at frequencies below 100 rad/s with less than 30%
variation between the true aircraft and the model in this frequency range.
However as noted in [8], it does not reliably capture very high-frequency
behaviors, because it was derived by treating the aircraft as a rigid body and
neglecting lightly damped fuselage bending modes that occur at somewhere
between 100 and 300 rad/s. These unmodeled bending modes might cause as
much as 20 dB deviation (i.e., 1000%) between the frequency response of
the model and the actual aircraft for frequency ω > 100 rad/s. Other effects
like control actuator time delays and fuel sloshing also contribute to model
inaccuracy at even higher frequencies, but the dominant unmodeled effects
are the fuselage bending modes. You can think of these unmodeled bending
modes as multiplicative uncertainty of size 20 dB, and design your controller
using loopsyn, by making sure that the loop has gain less than –20 dB at, and
beyond, the frequency ω > 100 rad/s.
2-17
2 Multivariable Loop Shaping
Design Specifications
The singular value design specifications are
• Robustness Spec.: –20 dB/decade roll-off slope and –20 dB loop gain
at 100 rad/s
• Performance Spec.: Minimize the sensitivity function as much as
possible.
Gd(s)=8/s
2-18
Loop-Shaping Control Design of Aircraft Model
The plots of the resulting step and frequency response for the NASA HiMAT
loopsyn loop-shaping controller design are shown in the following figure. The
number ±GAM, dB (i.e., 20log10(GAM)) tells you the accuracy with which
your loopsyn control design matches the target desired loop:
( GK ) , db ≥ G d , db − GAM, db ( < c )
( GK ) , db ≥ G d , db + GAM, db ( > c ).
2-19
2 Multivariable Loop Shaping
2-20
Fine-Tuning the LOOPSYN Target Loop Shape Gd to Meet Design Goals
• Stability Robustness. Your target loop Gd should have low gain (as small
as possible) at high frequencies where typically your plant model is so poor
that its phase angle is completely inaccurate, with errors approaching
±180° or more.
• Performance. Your Gd loop should have high gain (as great as possible)
at frequencies where your model is good, in order to ensure good control
accuracy and good disturbance attenuation.
• Crossover and Roll-Off. Your desired loop shape Gd should have its 0 dB
crossover frequency (denoted ωc) between the above two frequency ranges,
and below the crossover frequency ωc it should roll off with a negative slope
of between –20 and –40 dB/decade, which helps to keep phase lag to less
than –180° inside the control loop bandwidth (0 < ω < ωc).
If you do not take care to choose a target loop shape Gd that conforms to
these fundamental constraints, then loopsyn will still compute the optimal
loop-shaping controller K for your Gd, but you should expect that the optimal
loop L=G*K will have a poor fit to the target loop shape Gd, and consequently it
might be impossible to meet your performance goals.
2-21
2 Multivariable Loop Shaping
K=mixsyn(G,W1,[],W3)
Ty1u1 ≤1
∞
def ⎡ W S⎤
1
Ty1u1 = ⎢ .
⎣W3 T ⎥⎦
2-22
Mixed-Sensitivity Loop Shaping
2-23
2 Multivariable Loop Shaping
The resulting mixsyn singular value plots for the NASA HiMAT model are
shown below.
2-24
Mixed-Sensitivity Loop-Shaping Controller Design
2-25
2 Multivariable Loop Shaping
Loop-Shaping Commands
Robust Control Toolbox software gives you several choices for shaping the
frequency response properties of multiinput/multioutput (MIMO) feedback
control loops. Some of the main commands that you are likely to use for
loop-shaping design, and associated utility functions, are listed below:
2-26
3
1 To simplify the best available model in light of the purpose for which the
model is to be used—namely, to design a control system to meet certain
specifications.
Model reduction routines in this toolbox can be put into two categories:
The error is measured in terms of peak gain across frequency (H∞ norm), and
the error bounds are a function of the neglected Hankel singular values.
3-2
Hankel Singular Values
H = i ( PQ )
AP + PAT = − BBT
AT Q + QA = −C T C.
For example,
rng(1234,'twister');
G = rss(30,4,3);
hankelsv(G)
3-3
3 Model Reduction for Robust Control
which shows that system G has most of its “energy” stored in states 1 through
15 or so. Later, you will see how to use model reduction routines to keep a
15-state reduced model that preserves most of its dynamic response.
3-4
Model Reduction Techniques
of the original model G with a bound on the error G − Gred ∞ , the peak gain
across frequency. Others produce a reduced-order model with a bound on
These theoretical bounds are based on the “tails” of the Hankel singular
values of the model, i.e.,
( 1+ )
n
G −1 ( G − Gred ) ≤ ∏ ⎛⎜ 1 + 2 i 2
i + i ⎞⎟ − 1
k+1 ⎝ ⎠
∞ (3-2)
where σi are denoted the ith Hankel singular value of the phase matrix of the
model G (see the bstmr reference page).
3-5
3 Model Reduction for Robust Control
Method Description
reduce Main interface to model approximation algorithms
Method Description
ncfmr Normalized coprime balanced truncation
Method Description
balancmr Square-root balanced model truncation
schurmr Schur balanced model truncation
hankelmr Hankel minimum degree approximation
Method Description
bstmr Balanced stochastic truncation
Method Description
modreal Modal realization and truncation
slowfast Slow and fast state decomposition
stabsep Stable and antistable state projection
3-6
Approximate Plant Model by Additive Error Methods
rng(1234,'twister');
G = rss(30,4,3);
% balanced truncation to models with sizes 12:16
[g1,info1] = balancmr(G,12:16); % or use reduce
% Schur balanced truncation by specifying `MaxError'
[g2,info2] = schurmr(G,'MaxError',[1,0.8,0.5,0.2]);
sigma(G,'b-',g1,'r--',g2,'g-.')
shows a comparison plot of the original model G and reduced models g1 and g2.
3-7
3 Model Reduction for Robust Control
norm(G-g1(:,:,1),'inf') % 1.2556
info1.ErrorBound(1) % 6.2433
or plot the model error vs. error bound via the following commands:
[sv,w] = sigma(G-g1(:,:,1));
loglog(w,sv,w,info1.ErrorBound(1)*ones(size(w)))
xlabel('rad/sec');ylabel('SV');
title('Error Bound and Model Error')
3-8
Approximate Plant Model by Multiplicative Error Method
rng(1234,'twister');
G = rss(30,1,1);
[gr,infor] = reduce(G,'algo','balance','order',7);
[gs,infos] = reduce(G,'algo','bst','order',7);
figure(1);bode(G,'b-',gr,'r--');
title('Additive Error Method')
figure(2);bode(G,'b-',gs,'r--');
title('Relative Error Method')
3-9
3 Model Reduction for Robust Control
3-10
Approximate Plant Model by Multiplicative Error Method
Therefore, for some systems with low damped poles/zeros, the balanced
stochastic method (bstmr) produces a better reduced-order model fit in those
frequency ranges to make multiplicative error small. Whereas additive error
methods such as balancmr, schurmr, or hankelmr only care about minimizing
the overall “absolute” peak error, they can produce a reduced-order model
missing those low damped poles/zeros frequency regions.
3-11
3 Model Reduction for Robust Control
modreal puts a system into its modal form, with eigenvalues appearing on
the diagonal of its A-matrix. Real eigenvalues appear in 1-by-1 blocks, and
complex eigenvalues appear in 2-by-2 real blocks. All the blocks are ordered
in ascending order, based on their eigenvalue magnitudes, by default, or
descending order, based on their real parts. Therefore, specifying the number
of jω-axis poles splits the model into two systems with one containing only
jω-axis dynamics, the other containing the non-jω axis dynamics.
rng(1234,'twister');
G = rss(30,1,1);
[Gjw,G2] = modreal(G,1); % only one rigid body dynamics
G2.d = Gjw.d; Gjw.d = 0; % put DC gain of G into G2
subplot(211);sigma(Gjw);ylabel('Rigid Body')
subplot(212);sigma(G2);ylabel('Nonrigid Body')
3-12
Using Modal Algorithms
This process of splitting jω-axis poles has been built in and automated in
all the model reduction routines (balancmr, schurmr, hankelmr, bstmr,
hankelsv) so that users need not worry about splitting the model.
rng(5678,'twister');
G = rss(30,1,1);
[gr,info] = reduce(G); % choose a size of 8 at prompt
bode(G,'b-',gr,'r--')
3-13
3 Model Reduction for Robust Control
3-14
Using Modal Algorithms
3-15
3 Model Reduction for Robust Control
modreal puts the large size dynamics into the modal form, then truncates the
dynamic model to an intermediate stage model with a comfortable size of 50
or so states. From this point on, those more sophisticated Hankel singular
value based routines can further reduce this intermediate stage model, in a
much more accurate fashion, to a smaller size for final controller design.
3-16
Normalized Coprime Factor Reduction
rng(89,'twister');
K= rss(30,4,3);
[Kred,info2] = ncfmr(K);
Again, without specifying the size of the reduced-order model, any model
reduction routine presented here will plot a Hankel singular value bar chart
and prompt you for a reduced model size. In this case, enter 15.
Then, plot the singular values of the original and reduced-order models.
sigma(K,Kred)
legend('Original (30-state)','Kred (15-state)')
3-17
3 Model Reduction for Robust Control
3-18
Bibliography
Bibliography
[1] Glover, K., “All Optimal Hankel Norm Approximation of Linear
Multivariable Systems, and Their L∝ - Error Bounds,” Int. J. Control, Vol. 39,
No. 6, 1984, pp. 1145-1193.
[2] Zhou, K., Doyle, J.C., and Glover, K., Robust and Optimal Control,
Englewood Cliffs, NJ, Prentice Hall, 1996.
[3] Safonov, M.G., and Chiang, R.Y., “A Schur Method for Balanced Model
Reduction,” IEEE Trans. on Automat. Contr., Vol. 34, No. 7, July 1989,
pp. 729-733.
[4] Safonov, M.G., Chiang, R.Y., and Limebeer, D.J.N., “Optimal Hankel
Model Reduction for Nonminimal Systems,” IEEE Trans. on Automat. Contr.,
Vol. 35, No. 4, April 1990, pp. 496-502.
[5] Safonov, M.G., and Chiang, R.Y., “Model Reduction for Robust Control:
A Schur Relative Error Method,” International J. of Adaptive Control and
Signal Processing, Vol. 2, 1988, pp. 259-272.
[6] Obinata, G., and Anderson, B.D.O., Model Reduction for Control System
Design, London, Springer-Verlag, 2001.
3-19
3 Model Reduction for Robust Control
3-20
4
Robustness Analysis
Closed-loop stability is the way to deal with the (always present) uncertainty
in initial conditions or arbitrarily small disturbances.
Finally, notions such as gain and phase margins (and their generalizations)
help quantify the sensitivity of stability and performance in the face of model
uncertainty, which is the imprecise knowledge of how the control input
directly affects the feedback variables.
Robust Control Toolbox software has built-in features allowing you to specify
model uncertainty simply and naturally. The primary building blocks, called
uncertain elements (or uncertain Control Design Blocks) are uncertain real
parameters and uncertain linear, time-invariant objects. These can be used to
create coarse and simple or detailed and complex descriptions of the model
uncertainty present within your process models.
Once formulated, high-level system robustness tools can help you analyze the
potential degradation of stability and performance of the closed-loop system
brought on by the system model uncertainty.
4-2
Create Models of Uncertain Systems
Using these two basic building blocks, along with conventional system
creation commands (such as ss and tf), you can easily create uncertain
system models.
Create a real parameter, with name ’bw’, nominal value 5, and a percentage
uncertainty of 10%.
bw = ureal('bw',5,'Percentage',10)
This creates a ureal object. View its properties using the get command.
Note that the range of variation (Range property) and the additive deviation
from nominal (the PlusMinus property) are consistent with the Percentage
property value.
4-3
4 Robustness Analysis
You can create state-space and transfer function models with uncertain
real coefficients using ureal objects. The result is an uncertain state-space
object, or uss. As an example, use the uncertain real parameter bw to model a
first-order system whose bandwidth is between 4.5 and 5.5 rad/s.
H = tf(1,[1/bw 1])
USS: 1 State, 1 Output, 1 Input, Continuous System
bw: real, nominal = 5, variability = [-10 10]%, 1 occurrence
Note that the result H is an uncertain system, called a uss object. The nominal
value of H is a state-space object. Verify that the pole is at –5.
pole(H.NominalValue)
ans =
-5
bode(H,{1e-1 1e2});
4-4
Create Models of Uncertain Systems
step(H)
4-5
4 Robustness Analysis
While there are variations in the bandwidth and time constant of H, the
high-frequency rolls off at 20 dB/decade regardless of the value of bw. You can
capture the more complicated uncertain behavior that typically occurs at high
frequencies using the ultidyn uncertain element, which is described next.
4-6
Create Models of Uncertain Systems
1 Create the nominal system Gnom, using tf, ss, or zpk. Gnom itself might
already have parameter uncertainty. In this case Gnom is H, the first-order
system with an uncertain time constant.
Gnom = H;
W = makeweight(.05,9,10);
Delta = ultidyn('Delta',[1 1]);
G = Gnom*(1+W*Delta)
USS: 2 States, 1 Output, 1 Input, Continuous System
Delta: 1x1 LTI, max. gain = 1, 1 occurrence
bw: real, nominal = 5, variability = [-10 10]%, 1 occurrence
Note that the result G is also an uncertain system, with dependence on both
Delta and bw. You can use bode to make a Bode plot of 20 random samples of
G's behavior over the frequency range [0.1 100] rad/s.
bode(G,{1e-1 1e2},25)
4-7
4 Robustness Analysis
In the next section, you design and compare two feedback controllers for G.
4-8
Robust Controller Design
n2 2n
KI = , KP = − 1.
5 5
xi = 0.707;
wn = 3;
K1 = tf([(2*xi*wn/5-1) wn*wn/5],[1 0]);
wn = 7.5;
K2 = tf([(2*xi*wn/5-1) wn*wn/5],[1 0]);
T1 = feedback(G*K1,1);
T2 = feedback(G*K2,1);
tfinal = 3;
stepplot(T1,'b',T2,'r',tfinal)
4-9
4 Robustness Analysis
The step responses for T2 exhibit a faster rise time because K2 sets a higher
closed loop bandwidth. However, the model variations have a greater effect.
You can use robuststab to check the robustness of stability to the model
variations.
[stabmarg1,destabu1,report1] = robuststab(T1);
stabmarg1
stabmarg1 =
ubound: 4.0241
lbound: 4.0241
destabfreq: 3.4959
[stabmarg2,destabu2,report2] = robuststab(T2);
stabmarg2
stabmarg2 =
4-10
Robust Controller Design
ubound: 1.2545
lbound: 1.2544
destabfreq: 10.5249
The stabmarg variable gives lower and upper bounds on the stability margin.
A stability margin greater than 1 means the system is stable for all values
of the modeled uncertainty. A stability margin less than 1 means there are
allowable values of the uncertain elements that make the system unstable.
The report variable briefly summarizes the analysis.
report1
report1 =
Uncertain System is robustly stable to modeled uncertainty.
-- It can tolerate up to 402% of modeled uncertainty.
-- A destabilizing combination of 402% the modeled uncertainty exists, causing an instability at
3.5 rad/s.
report2
report2 =
Uncertain System is robustly stable to modeled uncertainty.
-- It can tolerate up to 125% of modeled uncertainty.
-- A destabilizing combination of 125% the modeled uncertainty exists, causing an instability at
10.5 rad/s.
While both systems are stable for all variations, their performance is clearly
affected to different degrees. To determine how the uncertainty affects
closed-loop performance, you can use wcgain to compute the worst-case
effect of the uncertainty on the peak magnitude of the closed-loop sensitivity
(S=1/(1+GK)) function. This peak gain is typically correlated with the amount
of overshoot in a step response.
S1 = feedback(1,G*K1);
S2 = feedback(1,G*K2);
[maxgain1,wcu1] = wcgain(S1);
maxgain1
maxgain1 =
lbound: 1.8684
ubound: 1.9025
critfreq: 3.5152
4-11
4 Robustness Analysis
[maxgain2,wcu2] = wcgain(S2);
maxgain2
maxgain2 =
lbound: 4.6031
ubound: 4.6671
critfreq: 11.0231
The maxgain variable gives lower and upper bounds on the worst-case peak
gain of the sensitivity transfer function, as well as the specific frequency
where the maximum gain occurs. The wcu variable contains specific values of
the uncertain elements that achieve this worst-case behavior.
You can use usubs to substitute these worst-case values for uncertain
elements, and compare the nominal and worst-case behavior. Use bodemag
and step to make the comparison.
bodemag(S1.NominalValue,'b',usubs(S1,wcu1),'b');
hold on
bodemag(S2.NominalValue,'r',usubs(S2,wcu2),'r');
hold off
4-12
Robust Controller Design
Clearly, while K2 achieves better nominal sensitivity than K1, the nominal
closed-loop bandwidth extends too far into the frequency range where the
process uncertainty is very large. Hence the worst-case performance of K2 is
inferior to K1 for this particular uncertain model.
4-13
4 Robustness Analysis
p = ureal('p',10,'Percentage',10);
A = [0 p;-p 0];
B = eye(2);
C = [1 p;-p 1];
H = ss(A,B,C,[0 0;0 0]);
You can view the properties of the uncertain system H using the get command.
get(H)
a: [2x2 umat]
b: [2x2 double]
c: [2x2 umat]
d: [2x2 double]
e: []
StateName: {2x1 cell}
StateUnit: {2x1 cell}
NominalValue: [2x2 ss]
Uncertainty: [1x1 struct]
InternalDelay: [0x1 double]
InputDelay: [2x1 double]
OutputDelay: [2x1 double]
Ts: 0
TimeUnit: 'seconds'
InputName: {2x1 cell}
4-14
MIMO Robustness Analysis
Use ultidyn objects Delta1 and Delta2 along with shaping filters W1 and W2
to add this form of frequency domain uncertainty to the model.
W1 = makeweight(.1,20,50);
W2 = makeweight(.2,45,50);
Delta1 = ultidyn('Delta1',[1 1]);
Delta2 = ultidyn('Delta2',[1 1]);
G = H*blkdiag(1+W1*Delta1,1+W2*Delta2)
G =
4-15
4 Robustness Analysis
Type "G.NominalValue" to see the nominal value, "get(G)" to see all propert
You can plot a 2-second step response of several samples of G. The 10%
uncertainty in the natural frequency is obvious.
stepplot(G,2)
4-16
MIMO Robustness Analysis
bodeplot(G,{13 100})
4-17
4 Robustness Analysis
4-18
MIMO Robustness Analysis
load mimoKexample
size(K)
You can use the command loopsens to form all the standard plant/controller
feedback configurations, including sensitivity and complementary sensitivity
at both the input and output. Because G is uncertain, all the closed-loop
systems are uncertain as well.
F = loopsens(G,K)
F =
F is a structure with many fields. The poles of the nominal closed-loop system
are in F.Poles, and F.Stable is 1 if the nominal closed-loop system is stable.
In the remaining 10 fields, S stands for sensitivity, T for complementary
sensitivity, and L for open-loop gain. The suffixes i and o refer to the input and
output of the plant (G). Finally, P and C refer to the “plant” and “controller.”
K(I + GK)–1G
4-19
4 Robustness Analysis
K(I + GK)–1
You can examine the transmission of disturbances at the plant input to the
plant output using bodemag on F.PSi. Graph some samples along with the
nominal.
bodemag(F.PSi.NominalValue,'r+',F.PSi,'b-',{1e-1 100})
4-20
MIMO Robustness Analysis
[I,DI,SimI,O,DO,SimO,Sim] = loopmargin(G,K);
The third output argument is the simultaneous gain and phase variations
allowed in all input channels to the plant.
SimI
SimI =
This information implies that the gain at the plant input can vary in both
channels independently by factors between (approximately) 1/8 and 8, as well
as phase variations up to 76 degrees.
The sixth output argument is the simultaneous gain and phase variations
allowed in all output channels to the plant.
SimO
SimO =
Note that the simultaneous margins at the plant output are similar to those
at the input. This is not always the case in multiloop feedback systems.
4-21
4 Robustness Analysis
The last output argument is the simultaneous gain and phase variations
allowed in all input and output channels to the plant. As expected, when
you consider all such variations simultaneously, the margins are somewhat
smaller than those at the input or output alone.
Sim
Sim =
[stabmarg,desgtabu,report] = robuststab(F.So);
stabmarg
stabmarg =
4-22
MIMO Robustness Analysis
ubound: 2.2175
lbound: 2.2175
destabfreq: 13.7576
report
report =
The next section studies the effects of these variations on the closed-loop
output sensitivity function.
bodemag(F.So.NominalValue,{1e-1 100})
4-23
4 Robustness Analysis
You can compute the peak value of the maximum singular value of the
frequency response matrix using norm.
[PeakNom,freq] = norm(F.So.NominalValue,'inf')
PeakNom =
1.1317
freq =
7.0483
4-24
MIMO Robustness Analysis
What is the maximum output sensitivity gain that is achieved when the
uncertain elements Delta1, Delta2, and p vary over their ranges? You can
use wcgain to answer this.
[maxgain,wcu] = wcgain(F.So);
maxgain
maxgain =
lbound: 2.1017
ubound: 2.1835
critfreq: 8.5546
The analysis indicates that the worst-case gain is somewhere between 2.1 and
2.2. The frequency where the peak is achieved is about 8.5.
You can replace the values for Delta1, Delta2, and p that achieve the gain
of 2.1, using usubs. Make the substitution in the output complementary
sensitivity, and do a step response.
step(F.To.NominalValue,usubs(F.To,wcu),5)
4-25
4 Robustness Analysis
4-26
Summary of Robustness Analysis Tools
4-27
4 Robustness Analysis
4-28
5
H-Infinity and Mu
Synthesis
1
⎛ ∞ ⎞2
:= ⎜ ∫ e ( t ) dt ⎟ .
2
e2
⎝ −∞ ⎠
⎡ e1 ( t ) ⎤
⎢ ⎥
e (t)
e (t) = ⎢ 2 ⎥ ,
⎢ ⎥
⎢ ⎥
⎢⎣ en ( t ) ⎥⎦
1
⎛ ∞ 2 ⎞2
e2 := ⎜ ∫ e ( t ) dt ⎟
⎝ −∞ 2 ⎠
1
⎛ ∞ ⎞2
= ⎜ ∫ eT ( t ) e ( t ) dt ⎟ .
⎝ −∞ ⎠
In µ-tools the dynamic systems we deal with are exclusively linear, with
state-space model
⎡ x ⎤ ⎡ A B⎤ ⎡ x ⎤
⎢ e ⎥ = ⎢C D ⎥⎦ ⎢⎣ d ⎥⎦
,
⎣ ⎦ ⎣
5-2
Interpretation of H-Infinity Norm
1
⎡ 1 ∞ 2 ⎤2
T ( j ) d ⎥
⎣ 2 ∫−∞
T 2 := ⎢
F ⎦
T ∞ := max ⎡⎣T ( j ) ⎤⎦ ,
∈R
where the Frobenius norm (see the MATLAB norm command) of a complex
matrix M is
M F
:= Trace M * M .( )
Both of these transfer function norms have input/output time-domain
interpretations. If, starting from initial condition x(0) = 0, two signals d and
e are related by
⎡ x ⎤ ⎡ A B⎤ ⎡ x ⎤
⎢ e ⎥ = ⎢C D ⎥⎦ ⎢⎣ d ⎥⎦
,
⎣ ⎦ ⎣
then
e2
max
d ≠0 d 2
5-3
5 H-Infinity and Mu Synthesis
WLTWR
Suppose T is a MIMO stable linear system, with transfer function matrix T(s).
The two diagrams shown above represent the exact same system. We prefer to
write these block diagrams with the arrows going right to left to be consistent
with matrix and operator composition.
5-4
Interpretation of H-Infinity Norm
:= T ∞
:= max ⎡⎣T ( j ) ⎤⎦ .
∈R
1
⎡ ∞ T ⎤2
⎢⎣ ∫0 e ( t ) e ( t ) dt ⎥⎦
e 2
= ≤ .
d 1
⎡ ∞ T ⎤2
⎢⎣ ∫0 d ( t ) d ( t ) dt ⎥⎦
2
⎡ a sin t + ⎤
⎢ 1 ( 1) ⎥
d (t) = ⎢
⎥.
⎢ ⎥
⎣ (
⎢ and sin t + nd ) ⎥
⎦
⎡ b sin t + ⎤
⎢ 1 ( 1) ⎥
ess ( t ) = ⎢ ⎥.
⎢ ⎥
⎣ (
⎢bne sin t + ne ) ⎥
⎦
5-5
5 H-Infinity and Mu Synthesis
Consider the diagram of Weighted MIMO System on page 5-6, along with
Unweighted MIMO System: Vectors from Left to Right on page 5-4.
Assume that WL and WR are diagonal, stable transfer function matrices, with
diagonal entries denoted Li and Ri.
⎡ L1 0 0 ⎤ ⎡ R1 0 0 ⎤
⎢0 L2 0 ⎥⎥ ⎢0 R2 0 ⎥⎥
WL = ⎢ , WR = ⎢ .
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣ 0 0 Lne ⎦⎥ ⎢⎣ 0 0 Rnd ⎦⎥
Bounds on the quantity WLTWR ∞ will imply bounds about the sinusoidal
( )
steady-state behavior of the signals d and e = Td in the diagram of
Unweighted MIMO System: Vectors from Left to Right on page 5-4.
Specifically, for sinusoidal signal d , the steady-state relationship between
5-6
Interpretation of H-Infinity Norm
( )
e = Td , d and WLTWR ∞ is as follows. The steady-state solution ess ,
denoted as
⎡ e sin t + ⎤
⎢ 1 ( 1) ⎥
ess ( t ) = ⎢ ⎥
⎢ ⎥
⎣ (
⎢ ene sin t + nd ) ⎥
⎦ (5-1)
satisfies
ne
2
∑ WL ( j ) ei
i
≤1
i=1
⎡ d sin t + ⎤
⎢ 1 ( 1) ⎥
d (t) = ⎢
⎥
⎢ ⎥
⎣ (
⎢ dne sin t + nd ) ⎥
⎦ (5-2)
satisfying
2
nd di
∑ 2
≤1
i=1 WRi ( j )
di ≤ WRi ( j )
5-7
5 H-Infinity and Mu Synthesis
1
ei ≤ .
WLi ( j )
This shows how one could pick performance weights to reflect the desired
frequency-dependent performance objective. Use WR to represent the relative
magnitude of sinusoids disturbances that might be present, and use 1/WL to
represent the desired upper bound on the subsequent errors that are produced.
5-8
H-Infinity Performance
H-Infinity Performance
5-9
5 H-Infinity and Mu Synthesis
You can assess performance by measuring the gain from outside influences
to regulated variables. In other words, good performance is associated with
T being small. Because the closed-loop system is a multiinput, multioutput
(MIMO) dynamic system, there are two different aspects to the gain of T:
WLTWR
5-10
H-Infinity Performance
Wmodel
e1
d2
Wact ~ ~
d2 - e2
~ Wdist Wperf1 e2
d1 d1 ~ ~
Wcmd e1 e3
K G Wperf2 e3
Hsens
~
d3 d3
Wsnois
The blocks in this figure might be scalar (SISO) and/or multivariable (MIMO),
depending on the specific example. The mathematical objective of H∞ control
is to make the closed-loop MIMO transfer function Ted satisfy Ted ∞ < 1. The
weighting functions are used to scale the input/output transfer functions such
that when T < 1, the relationship between d and e is suitable.
ed ∞
5-11
5 H-Infinity and Mu Synthesis
Signal Meaning
d1 Normalized reference command
Typical reference command in physical units
d1
d2 Normalized exogenous disturbances
Typical exogenous disturbances in physical units
d2
d3 Normalized sensor noise
Typical sensor noise in physical units
d3
e1 Weighted control signals
Wcmd
3
Wcmd = .
1
s+1
2 ⋅ 2
5-12
H-Infinity Performance
Wmodel
Wmodel represents a desired ideal model for the closed-looped system and is
often included in problem formulations with tracking requirements. Inclusion
of an ideal model for tracking is often called a model matching problem, i.e.,
the objective of the closed-loop system is to match the defined model. For
good command tracking response, you might want the closed-loop system to
respond like a well-damped second-order system. The ideal model would
then be
2
Wmodel =
s2 + 2 + 2
for specific desired natural frequency ω and desired damping ratio ζ. Unit
conversions might be necessary to ensure exact correlation between the ideal
model and the closed-loop system. In the fighter pilot example, suppose that
roll-rate is being commanded and 10º/second response is desired for each inch
of stick motion. Then, in these units, the appropriate model is:
2
Wmodel = 10 .
s2 + 2 + 2
Wdist
Wperf1
Wperf1 weights the difference between the response of the closed-loop system
and the ideal model W model. Often you might want accurate matching of the
ideal model at low frequency and require less accurate matching at higher
frequency, in which case Wperf1 is flat at low frequency, rolls off at first or
5-13
5 H-Infinity and Mu Synthesis
second order, and flattens out at a small, nonzero value at high frequency.
The inverse of the weight is related to the allowable size of tracking errors,
when dealing with the reference commands and disturbances described by
Wcmd and Wdist.
Wperf2
Wact
Wact is used to shape the penalty on control signal use. Wact is a frequency
varying weighting function used to penalize limits on the deflection/position,
deflection rate/velocity, etc., response of the control signals, when dealing
with the tracking and disturbance rejection objectives defined above. Each
control signal is usually penalized independently.
Wsnois
Hsens
5-14
H-Infinity Performance
This generic block diagram has tremendous flexibility and many control
performance objectives can be formulated in the H∞ framework using this
block diagram description.
−1
TF ( s ) z →w = TI ( s ) = KG ( I + GK )
1 1
−1
TF ( s ) z = KSO ( s ) = K ( I + GK )
2 →w2
where TI(s) denotes the input complementary sensitivity function and SO(s)
denotes the output sensitivity function. Bounds on the size of the transfer
function matrices from z1 to w1 and z2 to w2 ensure that the closed-loop
system is robust to multiplicative uncertainty, ΔM(s), at the plant input, and
additive uncertainty, ΔA(s), around the plant G(s). In the H∞ control problem
formulation, the robustness objectives enter the synthesis procedure as
additional input/output signals to be kept small. The interconnection with the
uncertainty blocks removed follows.
5-15
5 H-Infinity and Mu Synthesis
Weighting or scaling matrices are often introduced to shape the frequency and
magnitude content of the sensitivity and complementary sensitivity transfer
function matrices. Let WM correspond to the multiplicative uncertainty and
WA correspond to the additive uncertainty model. ΔM(s) and ΔA(s) are assumed
to be a norm bounded by 1, i.e., |ΔM(s)|<1 and |ΔA(s)|<1. Hence as a function
of frequency, |WM(jω)| and |WA(jω)| are the respective sizes of the largest
anticipated additive and multiplicative plant perturbations.
1
s+1
WM = 0.10 5 .
1
s+1
200
5-16
Active Suspension Control Design
This example uses the quarter-car model of the following illustration to design
active suspension control laws.
mb xb
bs
ks fs
xw
mw
kt
r
The mass, mb, represents the car chassis (body) and the mass, mw, represents
the wheel assembly. The spring, ks, and damper, bs, represent the passive
5-17
5 H-Infinity and Mu Synthesis
spring and shock absorber placed between the car body and the wheel
assembly. The spring, kt, models the compressibility of the pneumatic tire.
The variables xb, xw, and r are the car body travel, the wheel travel, and the
road disturbance, respectively. The force, fs, which is applied between the
body and wheel assembly, is controlled by feedback. This force represents the
active component of the suspension system.
x1 x2 ,
1
x 2 ks x1 x3 bs x2 x4 fs ,
mb
x 3 x4 ,
1
x 4 ks x1 x3 bs x2 x4 kt x3 r fs .
mw
mb = 300; % kg
mw = 60; % kg
bs = 1000; % N/m/s
ks = 16000 ; % N/m
kt = 190000; % N/m
qcar = ss(A,B,C,D);
qcar.StateName = {'body travel xb (m)';'body vel (m/s)';...
5-18
Active Suspension Control Design
The model inputs are the road disturbance, r, and actuator force, fs. The
model outputs are the car body travel, xb , suspension deflection sd xb xw ,
and car body acceleration ab
xs .
The transfer function from actuator to body travel and acceleration has an
imaginary-axis zero. Examine the zero of this transfer function.
tzero(qcar({'xb','ab'},'fs'))
ans =
-0.0000 +56.2731i
-0.0000 -56.2731i
The natural frequency of this zero, 56.27 rad/s, is called the tire-hop frequency.
The transfer function from the actuator to suspension deflection also has an
imaginary-axis zero. Examine this zero.
zero(qcar('sd','fs'))
ans =
0.0000 +22.9734i
0.0000 -22.9734i
The natural frequency of this zero, 22.97 rad/s, is called the rattlespace
frequency.
Plot the frequency response of the quarter-car model from inputs, (r,fs), to
outputs, (ab,sd). Both zeros are visible on the Bode plot.
bodemag(qcar({'ab','sd'},'r'),'b',qcar({'ab','sd'},'fs'),'r',{1 100});
legend('Road disturbance (r)','Actuator force (fs)','location','SouthWest')
title(['Gain from road dist (r) and actuator force (fs) '...
'to body accel (ab) and suspension travel (sd)'])
5-19
5 H-Infinity and Mu Synthesis
Because of the imaginary axis zeros, feedback control cannot improve the
response from road disturbance (r) to body acceleration (ab) at the tire-hop
frequency. Similarly, feedback control cannot improve the response from r to
suspension deflection (sd) at the rattlespace frequency. Moreover, there is an
inherent trade-off between passenger comfort and suspension deflection. Any
reduction of body travel at low frequency results in an increase of suspension
deflection. This trade-off arises because of the relationship xw = xb – sd and the
fact that xw roughly follows r at low frequency (less than 5 rad/s).
5-20
Active Suspension Control Design
1
ActNom s .
1
s1
60
At low frequency, below 3 rad/s, the model can vary up to 40% from its nominal
value. Around 3 rad/s, the percentage variation starts to increase. The
uncertainty crosses 100% at 15 rad/s, and reaches 2000% at approximately
1000 rad/sec. The weighting function, Wunc, reflects this profile and is used to
modulate the amount of uncertainty as a function of frequency. The result
Act is an uncertain state-space model of the actuator.
bode(Act,'b',Act.NominalValue,'r+',logspace(-1,3,120))
title('Nominal and 20 random actuator models')
5-21
5 H-Infinity and Mu Synthesis
The plus (+) marker denotes the nominal actuator model. The blue solid lines
represent the randomly sampled models.
5-22
Active Suspension Control Design
xb
r xb
d1 Wroad
1/4 Car sd
Model W sd e2
fs (qcar)
u Act ab
W ab e3
fs
Wact e1 y1 W d2 d2
y2 W d3 d3
Wroad = ss(0.07);
Wroad.u = 'd1';
Wroad.y = 'r';
5-23
5 H-Infinity and Mu Synthesis
Wd2 = ss(0.01);
Wd2.u = 'd2';
Wd2.y = 'Wd2';
Wd3 = ss(0.5);
Wd3.u = 'd3';
Wd3.y = 'Wd3';
Specify target functions for the closed-loop response of the system from the
road disturbance, r, to the suspension deflection, sd, and body acceleration, ab.
bodemag(qcar({'sd','ab'},'r')*Wroad,'b',Targets,'r--',{1,1000})
grid, title('Response to road disturbance')
legend('Open-loop','Closed-loop target')
5-24
Active Suspension Control Design
The corresponding performance weights Wsd and Wab are the reciprocals of the
comfort and handling targets. To investigate the trade-off between passenger
comfort and road handling, construct three sets of weights, (βWsd,(1 – β)Wab).
These weights use a blending parameter, β, to modulate the trade-off.
Wsd = beta/HandlingTarget;
Wsd.u = 'sd';
Wsd.y = 'e3';
Wab = (1-beta)/ComfortTarget;
Wab.u = 'ab';
Wab.y = 'e2';
Wsd and Wab are arrays of weighting functions that correspond to three
different trade-offs: emphasizing comfort (β = 0.01), balancing comfort and
handling (β = 0.5), and emphasizing handling (β = 0.99).
5-25
5 H-Infinity and Mu Synthesis
Connect the quarter-car plant model, actuator model, and weighting functions
to construct the block diagram of the plant model weighted by the objectives.
qcaric is an array of three models, one for each value of the blending
parameter, β. Also, the models in qcaric are uncertain, because they contain
the uncertain actuator model Act.
ncont = 1;
nmeas = 2;
K = ss(zeros(ncont,nmeas,3));
gamma = zeros(3,1);
for i=1:3
[K(:,:,i),~,gamma(i)] = hinfsyn(qcaric(:,:,i),nmeas,ncont);
end
The weighted plant model has one control input (ncont), the hydraulic
actuator force. The model also has two measurement outputs (nmeas), which
give the suspension deflection and body acceleration.
gamma
gamma =
0.9410
0.6724
0.8877
5-26
Active Suspension Control Design
clf
bodemag(qcar(:,'r'),'b', CL(:,:,1),'r-.', ...
CL(:,:,2),'m-.', CL(:,:,3),'k:',{1,140})
grid
legend('Open-loop','Comfort','Balanced','Handling','location','SouthEast')
title('Body travel, suspension deflection, and body acceleration due to road')
5-27
5 H-Infinity and Mu Synthesis
The solid blue line corresponds to the open-loop response. The other lines
are the closed-loop frequency responses for the different comfort and
handling blends. All three controllers reduce suspension deflection and body
acceleration below the rattlespace frequency (23 rad/s).
Time-Domain Evaluation
a 1 cos 8 t , 0 t 0.25
r t
0, otherwise.
5-28
Active Suspension Control Design
t = 0:0.005:1;
roaddist = zeros(size(t));
roaddist(1:51) = 0.025*(1-cos(8*pi*t(1:51)));
SIMK = connect(qcar,Act.Nominal,K,'r',{'xb';'sd';'ab';'fs'});
SIMK is a model array containing three closed-loop models, one for each of
the three blending parameter values. Each model in the array represents a
closed loop that is built from the original quarter-car plant model, the nominal
actuator model, and the corresponding synthesized controller.
Simulate and plot the time-domain response of the closed-loop models to the
road disturbance signal.
p1 = lsim(qcar(:,1),roaddist,t);
y1 = lsim(SIMK(1:4,1,1),roaddist,t);
y2 = lsim(SIMK(1:4,1,2),roaddist,t);
y3 = lsim(SIMK(1:4,1,3),roaddist,t);
clf
subplot(221)
plot(t,p1(:,1),'b',t,y1(:,1),'r.',t,y2(:,1),'m.',t,y3(:,1),'k.',t,roaddist,'g')
title('Body travel')
ylabel('x_b (m)')
subplot(222)
plot(t,p1(:,3),'b',t,y1(:,3),'r.',t,y2(:,3),'m.',t,y3(:,3),'k.',t,roaddist,'g')
title('Body acceleration')
ylabel('a_b (m/s^2)')
subplot(223)
plot(t,p1(:,2),'b',t,y1(:,2),'r.',t,y2(:,2),'m.',t,y3(:,2),'k.',t,roaddist,'g')
title('Suspension deflection')
xlabel('Time (s)')
ylabel('s_d (m)')
subplot(224)
plot(t,zeros(size(t)),'b',t,y1(:,4),'r.',t,y2(:,4),'m.',t,y3(:,4),'k.',t,roaddist,'g')
title('Control force')
5-29
5 H-Infinity and Mu Synthesis
xlabel('Time (s)')
ylabel('f_s (N)')
legend('Open-loop','Comfort','Balanced','Suspension','Road Disturbance','location','SouthEast')
5-30
Active Suspension Control Design
The simulations show that the body acceleration is smallest for the controller
emphasizing passenger comfort. Body acceleration is largest for the controller
emphasizing suspension deflection. The balanced design achieves a good
tradeoff between body acceleration and suspension deflection.
Robust µ Design
So far you designed H∞ controllers that meet the performance objectives for
the nominal actuator model. However, this model is only an approximation of
the true actuator. To make sure that controller performance is maintained
even with model error and uncertainty, you must design the model to have
robust performance. In this part of the example, you use μ-synthesis to design
a controller that achieves robust performance for the entire family of actuator
models that takes uncertainty into account.
Use D-K iteration to synthesize a controller for the quarter-car model with
actuator uncertainty.
[Krob,~,RPmuval] = dksyn(qcaric(:,:,2),nmeas,ncont);
The model qcaric(:,:,2) is the weighted quarter-car model for the uncertain
model that corresponds to the blending variable β = 0.5.
size(Krob)
Krob.u = {'sd','ab'};
Krob.y = 'u';
SIMKrob = connect(qcar,Act.Nominal,Krob,'r',{'xb';'sd';'ab';'fs'});
Simulate and plot the nominal time-domain response to a road bump with
the robust controller.
p1 = lsim(qcar(:,1),roaddist,t);
y1 = lsim(SIMKrob(1:4,1),roaddist,t);
clf
5-31
5 H-Infinity and Mu Synthesis
subplot(221)
plot(t,p1(:,1),'b',t,y1(:,1),'r',t,roaddist,'g')
title('Body travel'), ylabel('x_b (m)')
subplot(222)
plot(t,p1(:,3),'b',t,y1(:,3),'r')
title('Body acceleration'), ylabel('a_b (m/s^2)')
subplot(223)
plot(t,p1(:,2),'b',t,y1(:,2),'r')
title('Suspension deflection'), xlabel('Time (s)'), ylabel('s_d (m)')
subplot(224)
plot(t,zeros(size(t)),'b',t,y1(:,4),'r')
title('Control force'), xlabel('Time (s)'), ylabel('f_s (N)')
legend('Open-loop','Robust design','location','SouthEast')
5-32
Active Suspension Control Design
These responses are similar to those obtained with the balanced H∞ controller.
5-33
5 H-Infinity and Mu Synthesis
CLU = connect(qcar,Act,K(:,:,2),'r',{'xb','sd','ab'});
nsamp = 120;
rng('default');
figure(1)
clf
lsim(usample(CLU,nsamp),'b',CLU.Nominal,'r+',roaddist,t)
title('Nominal "balanced" design')
CLU = connect(qcar,Act,Krob,'r',{'xb','sd','ab'});
figure(2)
clf
lsim(usample(CLU,nsamp),'b',CLU.Nominal,'r+',roaddist,t)
title('Robust "balanced" design')
5-34
Active Suspension Control Design
Controller Simplification
The robust controller Krob has eleven states. It is often the case that
controllers synthesized with dksyn have high order. You can use the model
reduction functions to find a lower-order controller that achieves the same
level of robust performance. Use reduce to generate approximations of
various orders. Then, use robustperf to compute the robust performance
margin for each reduced-order approximation.
5-35
5 H-Infinity and Mu Synthesis
NS = order(Krob);
StateOrders = 1:NS;
Kred = reduce(Krob,StateOrders);
CLP = lft(qcaric(:,:,2),Kred);
ropt = robustperfOptions('Sensitivity','off','Display','off','Mussv','a');
PM = robustperf(CLP,ropt);
plot(StateOrders,[PM.LowerBound],'b-o',...
StateOrders,repmat(1/RPmuval,[1 NS]),'r');
title('Robust performance as a function of controller order')
legend('Reduced order','Full order')
5-36
Active Suspension Control Design
Krob8 = Kred(:,:,8);
You now have a simplified controller, Krob8, that provides robust control with
a balance between passenger comfort and handling.
5-37
5 H-Infinity and Mu Synthesis
Bibliography
[1] Balas, G.J., and A.K. Packard, “The structured singular value
µ-framework,” CRC Controls Handbook, Section 2.3.6, January, 1996, pp.
671-688.
[3] Bamieh, B.A., and Pearson, J.B., “A general framework for linear periodic
systems with applications to H∞ sampled-data control,” IEEE Transactions on
Automatic Control, Vol. AC-37, 1992, pp. 418-435.
[4] Doyle, J.C., Glover, K., Khargonekar, P., and Francis, B., “State-space
solutions to standard H2 and H∞ control problems,” IEEE Transactions on
Automatic Control, Vol. AC-34, No. 8, August 1989, pp. 831-847.
[5] Fialho, I., and Balas, G.J., “Design of nonlinear controllers for active
vehicle suspensions using parameter-varying control synthesis,” Vehicle
Systems Dynamics, Vol. 33, No. 5, May 2000, pp. 351-370.
[6] Francis, B.A., A course in H∞ control theory, Lecture Notes in Control and
Information Sciences, Vol. 88, Springer-Verlag, Berlin, 1987.
[7] Glover, K., and Doyle, J.C., “State-space formulae for all stabilizing
controllers that satisfy an H∞ norm bound and relations to risk sensitivity,”
Systems and Control Letters, Vol. 11, pp. 167-172, August 1989. International
Journal of Control, Vol. 39, 1984, pp. 1115-1193.
[9] Lin, J., and Kanellakopoulos, I., “Road Adaptive Nonlinear Design of
Active Suspensions,” Proceedings of the American Control Conference, (1997),
pp. 714-718.
5-38
Bibliography
[10] Packard, A.K., Doyle, J.C., and Balas, G.J., “Linear, multivariable robust
control with a µ perspective,” ASME Journal of Dynamics, Measurements and
Control: Special Edition on Control, Vol. 115, No. 2b, June, 1993, pp. 426-438.
[12] Stein, G., and Doyle, J., “Beyond singular values and loopshapes,” AIAA
Journal of Guidance and Control, Vol. 14, Num. 1, January, 1991, pp. 5-16.
5-39