Robust Toolbox
Robust Toolbox
Gary Balas
Richard Chiang
Andy Packard
Michael Safonov
Users Guide
Version 3
Web
Newsgroup
www.mathworks.com/contact_TS.html Technical support
www.mathworks.com
comp.soft-sys.matlab
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
508-647-7000 (Phone)
508-647-7001 (Fax)
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site.
Trademarks
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, and xPC TargetBox are
registered trademarks of The MathWorks, Inc. Other product or brand names are trademarks
or registered trademarks of their respective holders.
Patents
The MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
September 2005
March 2006
September 2006
Online only
Online only
Online only
Contents
Introduction
1
What Is the Robust Control Toolbox? . . . . . . . . . . . . . . . . . . . 1-2
Required Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Modeling Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Example: ACC Benchmark Problem . . . . . . . . . . . . . . . . . . . . . 1-3
Worst-Case Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Example: ACC Two-Cart Benchmark Problem . . . . . . . . . . . . . 1-7
Synthesis of Robust MIMO Controllers . . . . . . . . . . . . . . . . 1-10
Example: Designing a Controller with LOOPSYN . . . . . . . . . 1-10
Model Reduction and Approximation . . . . . . . . . . . . . . . . . . 1-14
Example: NASA HIMAT Controller Order Reduction . . . . . . 1-14
LMI Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Extends Control System Toolbox . . . . . . . . . . . . . . . . . . . . . . 1-19
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
2
Tradeoff Between Performance and Robustness . . . . . . . . . 2-2
Norms and Singular Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Typical Loop Shapes, S and T Design . . . . . . . . . . . . . . . . . . . 2-5
Singular Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
2-11
2-11
2-13
2-13
3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Hankel Singular Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Overview of Model Reduction Techniques . . . . . . . . . . . . . . . 3-4
Approximating Plant Models
Additive Error Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Approximating Plant Models
Multiplicative Error Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Using Modal Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Rigid Body Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Reducing Large-Scale Models . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Using Normalized Coprime Factor Methods . . . . . . . . . . . . 3-14
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
ii
Contents
Robustness Analysis
4
Uncertainty Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Uncertain Models of Dynamic Systems . . . . . . . . . . .
Creating Uncertain Parameters . . . . . . . . . . . . . . . . . . . . . . . . .
Quantifying Unmodeled Dynamics . . . . . . . . . . . . . . . . . . . . . . .
4-2
4-2
4-3
4-5
4-12
4-13
4-15
4-17
4-18
5
H-Infinity Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Performance As Generalized Disturbance Rejection . . . . . . . . . 5-2
Robustness in the H Framework . . . . . . . . . . . . . . . . . . . . . . . 5-8
Application of H and mu to Active Suspension Control .
Quarter Car Suspension Model . . . . . . . . . . . . . . . . . . . . . . . . .
Linear H Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . .
H Control Design 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
H Control Design 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Control Design via m-Synthesis . . . . . . . . . . . . . . . . . . . . . . . .
5-10
5-10
5-12
5-13
5-14
5-20
iii
6
Introduction to Uncertain Atoms . . . . . . . . . . . . . . . . . . . . . . . 6-2
Uncertain Real Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Uncertain LTI Dynamics Atoms . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Complex Parameter Atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
Complex Matrix Atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Unstructured Uncertain Dynamic Systems . . . . . . . . . . . . . . . 6-17
iv
Contents
Uncertain Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Uncertain Matrices from Uncertain Atoms . . . . . . .
Accessing Properties of a umat . . . . . . . . . . . . . . . . . . . . . . . . .
Row and Column Referencing . . . . . . . . . . . . . . . . . . . . . . . . . .
Matrix Operation on umat Objects . . . . . . . . . . . . . . . . . . . . . .
Substituting for Uncertain Atoms . . . . . . . . . . . . . . . . . . . . . . .
6-19
6-19
6-20
6-21
6-22
6-23
6-25
6-25
6-26
6-27
6-28
6-30
6-31
6-31
Uncertain frd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Uncertain Frequency Response Objects . . . . . . . . . .
Properties of ufrd objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interpreting Uncertainty in Discrete Time . . . . . . . . . . . . . . .
Lifting an frd to a ufrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Handling Delays in ufrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-33
6-33
6-33
6-36
6-36
6-36
6-42
6-42
6-42
6-43
6-49
6-49
6-50
6-52
6-53
6-53
6-55
6-56
6-57
6-58
6-58
6-60
6-60
6-61
6-62
6-64
7
Introduction to Generalized Robustness Analysis . . . . . . . . 7-2
Robust Stability Margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Robust Performance Margin . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Worst-Case Gain Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
8
Linear Matrix Inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
LMI Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
LMIs and LMI Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
The Three Generic LMI Problems . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Further Mathematical Background . . . . . . . . . . . . . . . . . . . . . 8-9
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
9
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Some Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Overview of the LMI Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Specifying a System of LMIs . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7
A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Initializing the LMI System . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10
vi
Contents
9-10
9-13
9-15
9-19
9-29
9-29
9-29
9-30
Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Structured Matrix Variables . . . . . . . . . . . . . . . . . . . . . . . . . . .
Complex-Valued LMIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying cTx Objectives for mincx . . . . . . . . . . . . . . . . . . . . .
Feasibility Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Well-Posedness Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Semi-Definite B(x) in gevp Problems . . . . . . . . . . . . . . . . . . . .
Efficiency and Complexity Issues . . . . . . . . . . . . . . . . . . . . . . .
Solving M + PTXQ + QTXTP < 0 . . . . . . . . . . . . . . . . . . . . . . . .
9-32
9-32
9-34
9-37
9-38
9-39
9-40
9-41
9-41
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-43
Function Reference
10
Functions By Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Uncertain Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
vii
Index
viii Contents
1
Introduction
Introduction
Required Software
The Robust Control Toolbox requires that you have installed the Control
System Toolbox.
1-2
Modeling Uncertainty
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 the Robust Control Toolbox 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.
Position
Measurement
- x2 = y1
Position
Control
Force
u1
- x1
m1
e
%e
e%
e
e
Spring k
m2
m
The system has the block diagram model shown below, where the individual
carts have the respective transfer functions
1
G1(s) = -------------- ;
2
m1s
1
G2(s) = -------------- .
2
m2 s
The parameters m1, m2, and k are uncertain, equal to one plus or minus 20%:
1-3
Introduction
m1 = 10.2
m2 = 10.2
k = 10.2
P(s)
+
u1
f1
G1(s)
x1
f2
Cart 1
G2(s)
F(s)
x2
Cart 2
+
u2
Spring
k
0
1
0 G2 ( s )
1 1 +
G1 ( s )
1
1-4
y1
y2
Modeling Uncertainty
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)
u1
C
y1
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:
C=100*ss((s+1)/(.001*s+1)^3); % LTI controller
T=feedback(P*C,1); % closed-loop uncertain system
step(usample(T,5),.1);
1-5
Introduction
1.4
1.2
Amplitude
1
0.8
0.6
0.4
0.2
0
0
0.02
0.04
0.06
Time (sec)
0.08
0.1
1-6
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 Systems Step Response on page 1-6, 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.
The Robust Control Toolbox gives you a powerful assortment of robustness
analysis commands that let you directly calculate upper and lower bounds on
worst-case performance without random sampling:
Worst-Case Robustness Analysis Commands
loopmargin
loopsens
ncfmargin
robustperf
robuststab
wcgain
wcmargin
wcsens
This uncertain state-space model T has three uncertain parameters, k, m1, and
m2, each equal to 120% uncertain variation. To analyze whether the
closed-loop system T is robustly stable for all combinations of values for these
three parameters, you can execute the commands
1-7
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:
m1:
m2:
=
1.2174e-005
1.2174e-005
2.0000.
Bode Diagram
0.5
Magnitude (dB)
0.5
1.5
Twc worstcase
Trand random samples
10
10
Frequency (rad/sec)
1-8
Worst-Case Performance
You have a comfortable safety margin of between 311% to 500% larger than the
anticipated 20% parameter variations before the closed loop goes unstable.
But how much can closed-loop performance deteriorate for parameter
variations constrained to lie strictly within the anticipated 20% range? The
following code computes worst-case peak gain of T, and estimates the frequency
and parameter values at which the peak gain occurs.
[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-9
Introduction
h2syn
H2 controller synthesis
hinfsyn
H controller synthesis
loopsyn
ltrsyn
mixsyn
ncfsyn
sdhinfsyn
1-10
x =
x1
x2
x3
x4
x5
xe
x6
Aileron
Canard
Flap
Rudder
Elevator
Elevon
x-axis
0
Velocity
Horizontal
1-11
Introduction
You can enter the state-space matrices for this model with the following code:
% NASA HiMAT model G(s)
ag =[ -2.2567e-02 -3.6617e+01 -1.8897e+01 -3.2090e+01
9.2572e-05 -1.8997e+00
1.2338e-02
1.1720e+01 -2.6316e+00
1.0000e+00
bg = [ 0
0;
0;
0;
0;
30
0
2.2396e+01;
0;
0 -3.0000e+01
0;
0 -3.0000e+01];
0;
30];
1
0;
0];
8.7582e-04 -3.1604e+01
0
cg = [ 0
dg = [ 0
3.2509e+00 -7.6257e-01;
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
s=zpk('s'); w0=10; Gd=w0/(s+.001);
[K,CL,GAM]=loopsyn(G,Gd); % Design a loop-shaping controller K
% Plot the results
sigma(G*K,'r',Gd,'k-.',Gd/GAM,'k:',Gd*GAM,'k:',{.1,30})
figure ;T=feedback(G*K,eye(2));
sigma(T,ss(GAM),'k:',{.1,30});grid
1-12
sigma plot
40
magnitude, db
30
20
10
Gd /, db
, db
10
20 1
10
10
10
frequency rad/s
MIMO Robust Loop Shaping with loopsyn(G,Gd)
The achieved loop shape matches the desired target Gd to within about dB.
1-13
Introduction
balancmr
bstmr
hankelmr
modreal
ncfmr
schurmr
slowfast
stabproj
imp2ss
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-14
reduction, the NCF model reduction is particularly useful, and it works equally
well with controllers that have poles anywhere in the complex plane.
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
figure below.
Hankel SV of Coprime Factors [Nl Ml]
10
10
10
log
10
10
10
10
12
10
14
10
8
Order
10
12
14
16
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).
Compute ncfmargin(G,K) and add it to your Hankel singular values plot.
hankelsv(K,'ncf','log');v=axis;
1-15
Introduction
10
10
10
log
10
10
10
10
12
10
14
10
8
Order
10
12
14
16
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 five of the 16 states of K and compute an
11-state reduced controller by typing
K1=reduce(K,11,'errortype','ncf');
1-16
50
40
30
20
10
10
20 1
10
10
Frequency (rad/sec)
10
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-17
Introduction
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 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
Robust Control Toolbox are shown in the table below.
Specification of LMIs
lmiedit
setlmis
lmivar
lmiterm
newlmi
getlmis
LMI Solvers
feasp
gevp
mincx
dec2mat
showlmi
1-18
The uncertain system (USS) objects in the Robust Control Toolbox generalize
the Control System Toolbox LTI SS objects and help ease the task of analyzing
and plotting uncertain systems. You can do many of the same algebraic
operations on uncertain systems that are possible for LTI objects (multiply,
add, invert), and the Robust Control Toolbox provides USS uncertain system
extensions of Control System Toolbox interconnection and plotting functions
like feedback, lft, and bode.
1-19
Introduction
1-20
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.
[7] Safonov, M.G., Stability and Robustness of Multivariable Feedback
Systems, Cambridge, MA, MIT Press, 1980.
[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.
[12] Skogestad, S., and Postlethwaite, I., Multivariable Feedback Control, New
York, Wiley, 1996.
[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.
1-21
Introduction
[14] Zhou, K., Doyle, J.C., and Glover, K., Robust and Optimal Control,
Englewood Cliffs, NJ, Prentice Hall, 1996.
1-22
2
Multivariable Loop
Shaping
2-2
2-3
H2-norm:
G 2=
1
-----2
( i ( G ( j ) ) )
i=1
H-norm
2-4
G = sup ( G ( j ) )
S( s ) = ( I + L ( s ) )
def
def
R( s ) = K ( s ) ( I + L ( s ) )
T( s ) = L ( s ) ( I + L ( s ) )
= I S(s)
command
r
error
e
-
(2-1)
K(s)
control
u
d
plant
disturbance
effects
+
+
G(s)
output
y
"controller"
"plant"
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).
Singular Values
The singular values of S(j) determine the disturbance attenuation, because
S(s) is in fact the closed-loop transfer function from disturbance d to plant
output y see Block Diagram of the Multivariable Feedback Control System
2-5
( S ( j ) ) W 1 ( j )
(2-2)
Perturbed Plant
A(s)
K(s)
G(s)
Additive/Multiplicative Uncertainty
2-6
+ A(s)
( R { j } ) W 2 ( j )
1
( T { j } ) W 3 ( j )
(2-3)
(2-4)
2-7
1
-------------------------- W 1 ( j ) ;
i ( S ( j ) )
i ( T [ j ] ) W 3 ( j )
S( s ) = ( I + L ( s ) )
def
T( s ) = L ( s ) ( I + L ( s ) )
2-8
L(s) ,
1
L ( s ),
if ( L ( s ) ) 1
if ( L ( s ) ) 1
o(L)
|Gd| DESIRED LOOPSHAPE
|W |
1
0 db
PERFORMANCE
BOUND
o(T)
1
o(S)
ROBUSTNESS
BOUND
-1
|W |
3
o(L)
DESIRED CROSSOVER c
Singular Value Specifications on L, S, and T
2-9
damping ratio of the dominant closed-loop poles. Also, it turns out that you can
relate T , S to the classical gain margin GM and phase margin M in each
feedback loop of the multivariable feedback system of Block Diagram of the
Multivariable Feedback Control System on page 2-5 via the formulas [6]
1
G M 1 + -----------T
1
G M 1 + ---------------------------11 S
1
1
M 2 sin ----------------
2 T
1
1
M 2 sin ----------------
2 S
2-10
Here G is the LTI transfer function matrix of a MIMO plant model, Gd is the
target desired loop shape for the loop transfer function L=G*K, and K is the
optimal loop-shaping controller. The LTI controller K has the property that it
shapes the loop L=G*K so that it matches the frequency response of Gd as closely
as possible, subject to the constraint that the compensator must stabilize the
plant model G.
2-11
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 ().
.
Aileron
Canard
Flap
Rudder
Elevator
Elevon
x-axis
0
Velocity
Horizontal
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-12
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.: Maximize the sensitivity function as much as possible.
Both specs can be accommodated by taking as the desired loop shape
Gd(s)=8/s
2-13
The plots of the resulting step and frequency response for the NASA HiMAT
loopsyn loop-shaping controller design are shown in the figure below. 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
for < c
( GK ), db G d , db + GAM, db
for > c .
From: In(1)
From: In(2)
To: Out(1)
1.5
1
0.5
To: Out(2)
0
1.5
1
0.5
0
0
10
2-14
10
Singular Values
50
(L) loopshape
(Gd) desired loop
(Gd) GAM, db
40
30
20
10
0
10
20
30
40 1
10
10
Singular Values
40
(T) robustness
1/(S) performance
30
Singular Values (dB)
10
10
Frequency (rad/sec)
20
10
0
10
20
30
40 1
10
10
10
Frequency (rad/sec)
10
2-15
max
Re(p i) > 0
pi < c <
min
Re(z i) > 0
zi
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-16
Ty1 u1 =
W1 S
W3 T
2-17
WWW111
y
1a
y1
+
u
1
u
e
-
GG G
WW 33 W3
1b
2
y
2
CONTROLLER
K K
F(s)
2-18
The resulting mixsyn singular value plots for the NASA HiMAT model are
shown below.
Singular Values
40
1/(S) performance
(T) robustness
(L) loopshape
(W1) performance bound
(1/W3) robustnes bound
30
20
10
0
10
20
30 1
10
10
10
Frequency (rad/sec)
10
2-19
Loop-Shaping Commands
The Robust Control Toolbox 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:
MIMO Loop-Shaping Commands
loopsyn
ltrsyn
mixsyn
ncfsyn
2-20
augw
makeweight
sigma
3
Model Reduction for
Robust Control
Reducing Large-Scale Models (p. 3-13) Strategies for reducing very large plant models
Using Normalized Coprime Factor
Methods (p. 3-14)
Introduction
In the design of robust controllers for complicated systems, model reduction fits
several goals:
1 To simplify the best available model in light of the purpose for which the
smaller size model with most of the important system dynamics preserved.
3 Finally, if a modern control method such as LQG or H is used for which the
complexity of the control law is not explicitly constrained, the order of the
resultant controller is likely to be considerably greater than is truly needed.
A good model reduction algorithm applied to the control law can sometimes
significantly reduce control law complexity with little change in control
system performance.
Model reduction routines in this toolbox can be put into two categories:
Additive error method The reduced-order model has an additive error
bounded by an error criterion.
Multiplicative error method The reduced-order model has a
multiplicative or relative error bounded by an error criterion.
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
Introduction
H =
i ( PQ )
= BB
A Q + QA = C C
For example,
rand('state',1234); randn('state',5678);
G = rss(30,4,3);
hankelsv(G)
abs
10
15
20
25
30
35
Order
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-3
G Gred 2
i
k+1
where i are denoted the ith Hankel singular value of the original system G.
G ( G Gred )
( 1 + 2i (
1 + i2 + i ) ) 1
k+1
where i are denoted the ith Hankel singular value of the phase matrix of the
model G (see the bstmr reference page).
Top-Level Model Reduction Command
3-4
Method
Description
reduce
Description
ncfmr
Description
balancmr
schurmr
hankelmr
Description
bstmr
Description
modreal
slowfast
stabproj
3-5
shows a comparison plot of the original model G and reduced models g1 and g2.
Singular Values
30
G
gr
g2
25
20
15
10
10
4
10
10
10
10
10
Frequency (rad/sec)
10
10
10
or plot the model error vs. error bound via the following commands:
3-6
[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')
10
10
SV
10
10
10
10
10
10
10
10
rad/sec
10
10
10
3-7
10
5
0
Magnitude (dB)
5
10
15
20
25
30
35
40
135
90
Phase (deg)
45
0
45
90
135
2
10
3-8
10
10
Frequency (rad/sec)
10
10
20
Magnitude (dB)
10
10
20
30
40
180
135
Phase (deg)
90
45
0
45
90
135
2
10
10
10
Frequency (rad/sec)
10
10
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-9
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.
rand('state',5678); randn('state',1234); 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-10
3-11
abs
2.5
2
1.5
1
0.5
0
10
15
20
25
30
35
Order
Bode Diagram
30
25
Original G (30state)
20
Gred (8state)
Magnitude (dB)
15
10
5
0
5
10
15
20
720
630
Phase (deg)
540
450
360
270
180
2
10
10
10
10
10
10
Frequency (rad/sec)
3-12
3-13
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.
Singular Values
120
Original K (30state)
Kred (15state)
100
80
60
40
20
20
10
10
10
10
Frequency (rad/sec)
10
10
10
10
3-14
References
References
[15] 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.
[16] Zhou, K., Doyle, J.C., and Glover, K., Robust and Optimal Control,
Englewood Cliffs, NJ, Prentice Hall, 1996.
[17] 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.
[18] 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.
[19] 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.
[20] Obinata, G., and Anderson, B.D.O., Model Reduction for Control System
Design, London, Springer-Verlag, 2001.
3-15
3-16
4
Robustness Analysis
Summary of Robustness Analysis Tools Tables of functions available for robust control
(p. 4-23)
Robustness Analysis
Uncertainty Modeling
Dealing with and understanding the effects of uncertainty are important tasks
for the control engineer. Reducing the effects of some forms of uncertainty
(initial conditions, low-frequency disturbances) without catastrophically
increasing the effects of other dominant forms (sensor noise, model
uncertainty) is the primary job of the feedback control system.
Closed-loop stability is the way to deal with the (always present) uncertainty
in initial conditions or arbitrarily small disturbances.
High-gain feedback in low-frequency ranges is a way to deal with the effects of
unknown biases and disturbances acting on the process output. In this case,
you are forced to use roll-off filters in high-frequency ranges to deal with
high-frequency sensor noise in a feedback system.
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.
The Robust Control Toolbox has built-in features allowing you to specify model
uncertainty simply and naturally. The primary building blocks, called
uncertain elements or atoms, 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
Uncertainty Modeling
This creates a ureal object. View its properties using the get command.
Uncertain Real Parameter: Name bw, NominalValue 5, variability =
[-10 10]%
get(bw)
Name: 'bw'
NominalValue: 5
Mode: 'Percentage'
Range: [4.5000 5.5000]
PlusMinus: [-0.5000 0.5000]
Percentage: [-10 10]
AutoSimplify: 'basic'
Note that the range of variation (Range property) and the additive deviation
from nominal (the PlusMinus property) are consistent with the Percentage
property value.
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.
4-3
Robustness Analysis
pole(H.NominalValue)
ans =
-5
Bode Diagram
Magnitude (dB)
10
15
20
25
Phase (deg)
30
0
45
90
1
10
10
10
Frequency (rad/sec)
4-4
10
Uncertainty Modeling
step(H)
Step Response
0.9
0.8
0.7
Amplitude
0.6
0.5
0.4
0.3
0.2
0.1
0.5
1.5
Time (sec)
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-5
Robustness Analysis
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.
4-6
Uncertainty Modeling
bode(G,{1e-1 1e2},25)
Bode Diagram
10
5
Magnitude (dB)
0
5
10
15
20
25
30
360
Phase (deg)
180
180
1
10
10
10
10
Frequency (rad/sec)
In the next section, you design and compare two feedback controllers for G.
4-7
Robustness Analysis
Robustness Analysis
Next, design a feedback controller for G. The goals of this design are the usual
ones: good steady-state tracking and disturbance rejection properties. Because
the plant model is nominally a first-order lag, choose a PI control architecture.
Given the desired closed-loop damping ratio and natural frequency n, the
design equations for KI and KP (based on the nominal open-loop time constant
of 0.2) are
2
n
2
K I = -------, K P = -------------2- 1
5
5
Follow these steps to design the controller:
1 In order to study how the uncertain behavior of G affects the achievable
=
=
=
=
=
0.707;
3;
tf([(2*xi*wn/5-1) wn*wn/5],[1 0]);
7.5;
tf([(2*xi*wn/5-1) wn*wn/5],[1 0]);
T1 = feedback(G*K1,1);
T2 = feedback(G*K2,1);
3 Plot the step responses of 20 samples of each closed-loop system.
tfinal = 3;
step(T1,'b',T2,'r',tfinal,20)
4-8
Robustness Analysis
Step Response
2
1.5
Amplitude
0.5
0.5
0.5
1.5
2.5
Time (sec)
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 =
ubound: 1.2545
lbound: 1.2544
destabfreq: 10.5249
4-9
Robustness Analysis
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.
To do this, form the closed-loop sensitivity functions and call wcgain.
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
[maxgain2,wcu2] = wcgain(S2);
maxgain2
maxgain2 =
lbound: 4.6031
ubound: 4.6671
critfreq: 11.0231
4-10
Robustness Analysis
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
Bode Diagram
20
10
Magnitude (dB)
10
20
30
40
50
1
10
10
10
10
10
Frequency (rad/sec)
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.
The next section explores these robustness analysis tools further on a
multiinput, multioutput system.
4-11
Robustness Analysis
=
=
=
=
=
ureal('p',10,'Percentage',10);
[0 p;-p 0];
eye(2);
[1 p;-p 1];
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:
b:
c:
d:
StateName:
Ts:
InputName:
OutputName:
InputGroup:
OutputGroup:
NominalValue:
Uncertainty:
Notes:
UserData:
[2x2
[2x2
[2x2
[2x2
{2x1
0
{2x1
{2x1
[1x1
[1x1
[2x2
[1x1
{}
[]
umat]
double]
umat]
double]
cell}
cell}
cell}
struct]
struct]
ss]
atomlist]
4-12
4-13
Robustness Analysis
step(G,2)
Step Response
From: In(1)
From: In(2)
1.5
1
To: Out(1)
0.5
0
0.5
1
1.5
Amplitude
2
2.5
1.5
1
To: Out(2)
0.5
0
0.5
1
1.5
2
2.5
0.5
1.5
20
Time (sec)
0.5
1.5
4-14
bode(G,{13 100},50)
From: In(1)
Bode Diagram
From: In(2)
To: Out(1)
20
20
To: Out(2)
40
360
360
20
20
To: Out(2)
40
360
360
2
10
Frequency (rad/sec)
10
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.
4-15
Robustness Analysis
F = loopsens(G,K)
F =
Poles: [13x1 double]
Stable: 1
Si: [2x2 uss]
Ti: [2x2 uss]
Li: [2x2 uss]
So: [2x2 uss]
To: [2x2 uss]
Lo: [2x2 uss]
PSi: [2x2 uss]
CSo: [2x2 uss]
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 ) G
while Lo is G*K, and CSo is mathematically the same as
K ( I + GK )
You can examine the transmission of disturbances at the plant input to the
plant output using bodemag on F.PSi. Graph 50 samples along with the
nominal.
4-16
bodemag(F.PSi,':/-',{1e-1 100},50)
Bode Diagram
From: In(1)
From: In(2)
20
10
To: Out(1)
0
10
20
30
Magnitude (dB)
40
50
60
20
10
To: Out(2)
0
10
20
30
40
50
60
1
10
10
10
1
2
10
Frequency (rad/sec)
10
10
10
The third output argument is the simultaneous gain and phase variations
allowed in all input channels to the plant.
SimI
4-17
Robustness Analysis
SimI =
GainMargin: [0.1180 8.4769]
PhaseMargin: [-76.5441 76.5441]
Frequency: 6.2287
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 =
GainMargin: [0.1193 8.3836]
PhaseMargin: [-76.3957 76.3957]
Frequency: 18.3522
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.
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 =
GainMargin: [0.5671 1.7635]
PhaseMargin: [-30.8882 30.8882]
Frequency: 18.3522
4-18
4-19
Robustness Analysis
Bode Diagram
From: In(1)
From: In(2)
10
0
To: Out(1)
10
20
30
40
Magnitude (dB)
50
60
10
0
10
20
To: Out(2)
30
40
50
60
70
80
90
100
1
10
10
10
1
2
10
Frequency (rad/sec)
10
10
10
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-20
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]
maxgain
maxgain =
lbound:
ubound:
critfreq:
= wcgain(F.So);
2.1017
2.1835
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)
Step Response
From: In(1)
From: In(2)
1.5
To: Out(1)
0.5
Amplitude
1.4
1.2
To: Out(2)
1
0.8
0.6
0.4
0.2
0
0.2
50
Time (sec)
4-21
Robustness Analysis
4-22
Description
ureal
ultidyn
uss
ufrd
loopsens
loopmargin
robustperf
robuststab
wcgain
wcmargin
wcsens
4-23
Robustness Analysis
4-24
5
H-Infinity and Mu Synthesis
H-Infinity Performance
Performance As Generalized Disturbance Rejection
The modern approach to characterizing closed-loop performance objectives is to
measure the size of certain closed-loop transfer function matrices using various
matrix norms. Matrix norms provide a measure of how large output signals can
get for certain classes of input signals. Optimizing these types of performance
objectives over the set of stabilizing controllers is the main thrust of recent
optimal control theory, such as L1, H2, H, and optimal control. Hence, it is
important to understand how many types of control objectives can be posed as
a minimization of closed-loop transfer functions.
Consider a tracking problem, with disturbance rejection, measurement noise,
and control input signal limitations, as shown in Generalized and Weighted
Performance Block Diagram on page 5-4. K is some controller to be designed
and G is the system you want to control.
reference
control
input
external force
disturbance
- e?; - tracking
error
?
noise
5-2
H-Infinity Performance
reference
tracking error = T
external force
control input
noise
regulated variables
outside influences
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:
Spatial (vector disturbances and vector errors)
Temporal (dynamic relationship between input/output signals)
Hence the performance criterion must account for
Relative magnitude of outside influences
Frequency dependence of signals
Relative importance of the magnitudes of regulated variables
So if the performance objective is in the form of a matrix norm, it should
actually be a weighted norm
||WLTWR||
where the weighting function matrices WL and WR are frequency dependent, to
account for bandwidth constraints and spectral content of exogenous signals. A
natural (mathematical) manner to characterize acceptable performance is in
terms of the MIMO |||| (H) norm. See Interpretation of H-Infinity Norm on
page 5-28 for an interpretation of the H norm and signals.
5-3
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 ||Ted|| < 1, the relationship between d and e is suitable.
Performance requirements on the closed-loop system are transformed into the
H framework with the help of weighting or scaling functions. Weights are
selected to account for the relative magnitude of signals, their frequency
dependence, and their relative importance. This is captured in the figure
above, where the weights or scalings [Wcmd, Wdist,Wsnois] are used to transform
and scale the normalized input signals [d1,d2,d3] into physical units defined as
[d1, d2, d3]. Similarly weights or scalings [Wact, Wperf1,Wperf2] transform and
5-4
H-Infinity Performance
scale physical units into normalized output signals [e1, e2, e3]. An
interpretation of the signals, weighting functions, and models follows.
Signal
Meaning
d1
d 1
d2
d 2
d3
d 3
e1
e 1
e2
e 2
e3
e 3
Wcmd
Wcmd is included in H control problems that require tracking of a reference
command. Wcmd shapes the normalized reference command signals
(magnitude and frequency) into the actual (or typical) reference signals that
you expect to occur. It describes the magnitude and the frequency dependence
of the reference commands generated by the normalized reference signal.
Normally Wcmd is flat at low frequency and rolls off at high frequency. For
example, in a flight control problem, fighter pilots generate stick input
reference commands up to a bandwidth of about 2 Hz. Suppose that the stick
has a maximum travel of three inches. Pilot commands could be modeled as
normalized signals passed through a first-order filter
5-5
3
W act = --------------------------1
-------------- s + 1
2 2
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
W model =
------------------------------------2
2
s + 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
W model =
------------------------------------10
2
2
s + 2 +
Wdist
Wdist shapes the frequency content and magnitude of the exogenous
disturbances affecting the plant. For example, consider an electron microscope
as the plant. The dominant performance objective is to mechanically isolate the
microscope from outside mechanical disturbances, such as ground excitations,
sound (pressure) waves, and air currents. You can capture the spectrum and
relative magnitudes of these disturbances with the transfer function weighting
matrix Wdist.
Wperf1
Wperf1 weights the difference between the response of the closed-loop system
and the ideal model Wmodel. 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
second order, and flattens out at a small, nonzero value at high frequency. The
5-6
H-Infinity Performance
inverse of the weight is related to the allowable size of tracking errors, when
dealing with the reference commands and disturbances described by Wref and
Wdist.
Wperf2
Wperf2 penalizes variables internal to the process G, such as actuator states
that are internal to G or other variables that are not part of the tracking
objective.
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
Wsnois represents frequency domain models of sensor noise. Each sensor
measurement feedback to the controller has some noise, which is often higher
in one frequency range than another. The Wsnois weight tries to capture this
information, derived from laboratory experiments or based on manufacturer
measurements, in the control problem. For example, medium grade
accelerometers have substantial noise at low frequency and high frequency.
Therefore the corresponding Wsnois weight would be larger at low and high
frequency and have a smaller magnitude in the mid-frequency range.
Displacement or rotation measurement is often quite accurate at low frequency
and in steady state, but responds poorly as frequency increases. The weighting
function for this sensor would be small at low frequency, gradually increase in
magnitude as a first- or second-order system, and level out at high frequency.
Hsens
Hsens represents a model of the sensor dynamics or an external antialiasing
filter. The transfer functions used to describe Hsens are based on physical
characteristics of the individual components. These models might also be
lumped into the plant model G.
This generic block diagram has tremendous flexibility and many control
performance objectives can be formulated in the H framework using this
block diagram description.
5-7
TF(s) z 1 w 1
TI ( s )
KG ( I + GK ) ,
TF(s) z 2 w 2
KS O ( s )
K ( I + GK )
where TI(s) denotes the input complementary sensitivity function and SO(s)
denotes the output sensitivity function. Theorems 1 and 2 in Chapter 2 give
bounds on the size of the transfer function matrices from z1 to w1 and z2 to w2
to 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-8
H-Infinity Performance
1
--- s + 1
5
= 0.10 ----------------------M
1
---------- s + 1
200
5-9
The sprung mass ms represents the car chassis, while the unsprung mass mus
represents the wheel assembly. The spring, ks, and damper, bs, represent a
passive spring and shock absorber that are placed between the car body and
the wheel assembly, while the spring kt serves to model the compressibility of
the pneumatic tire. The variables xs, xus, and r are the car body travel, the
wheel travel, and the road disturbance, respectively. The force fs, kN, applied
between the sprung and unsprung masses, is controlled by feedback and
represents the active component of the suspension system. The dynamics of the
5-10
actuator are ignored in this example, and assume that the control signal is the
x 1 = x 2,
1
x 2 = ------- [ k s ( x 1 x 3 ) + b s ( x 2 x 4 ) f s ],
ms
x 3 = x 4,
1
x 4 = ---------- [ k s ( x 1 x 3 ) + b s ( x 2 x 4 ) k t ( x 3 r ) f s ].
m us
The following component values are taken from reference [Lin97].
ms = 290;
mus = 59;
bs = 1000;
ks = 16182 ;
kt = 190000;
%
%
%
%
%
kg
kg
N/m/s
N/m
N/m
5-11
5-12
The magnitude and frequency content of the control force fs are limited by the
100 s + 50
weighting function Wact. Choose W act = ---------- ------------------- . The magnitude of the
13 s + 500
weight increases above 50 rad/s in order to limit the closed-loop bandwidth.
Wact = (100/13)*tf([1 50],[1 500]);
H Control Design 1
The purpose of the weighting functions W x 1 and W x 1 x 3 is to keep the car
deflection and the suspension deflection small over the desired frequency
ranges. In the first design, you are designing the controller for passenger
comfort, and hence the car body deflection x1 is penalized.
Wx1 = 8*tf(2*pi*5,[1 2*pi*5]);
You can construct the weighted H plant model for control design, denoted
qcaric1, using the sysic command. The control signal corresponds to the last
input to qcaric1, fs. The car body acceleration, which is noisy, is the measured
signal and corresponds to the last output of qcaric1.
systemnames = 'qcar Wn Wref Wact Wx1';
inputvar = '[ d1; d2; fs ]';
outputvar = '[ Wact; Wx1; qcar(3)+Wn ]';
input_to_qcar = '[ Wref; fs]';
input_to_Wn = '[ d2 ]';
input_to_Wref = '[ d1 ]';
input_to_Wact = '[ fs ]';
input_to_Wx1 = '[ qcar(1) ]';
qcaric1 = sysic;
5-13
H Control Design 2
In the second design, you are designing the controller to keep the suspension
deflection transfer function small. Hence the road disturbance to suspension
deflection x1x3 is penalized via the weighting function Wx1x3. The Wx1x3
weight magnitude rolls off above 10 rad/s to roll off before an open-loop zero
(23.3 rad/s) in the design.
Wx1x3 = 25*tf(1,[1/10 1]);
5-14
5-15
logspace(0,2.3,140))
The dotted and solid lines in the figure are the closed-loop frequency responses
that result from the different performance weighting functions selected.
Observe the reduction in suspension deflection in the vicinity of the tirehop
frequency, 1= 56.7 rad/s, and the corresponding increase in the acceleration
frequency response in this vicinity. Also, compared to design 1, a reduction in
suspension deflection has been achieved for frequencies below the rattlespace
frequency, 2= 23.3 rad/s.
The second H control design attenuates both resonance modes, whereas the
first controller focused its efforts on the first mode, the rattlespace frequency
at 23.3 rad/s.
bodemag(qcar(2,1),'k-.',CL1(2,1),'r-',CL2(2,1),'b.',...
5-16
logspace(0,2.3,140))
All the analysis till now has been in the frequency domain. Time-domain
performance characteristics are critical to the success of the active suspension
system on the car. Time response plots of the two H controllers are shown in
following figures. The dashed, solid, and dotted lines correspond to the passive
suspension, H controller 1, and controller 2 respectively. All responses
correspond to the road disturbance r(t)
r(t)
sec
= a ( 1 cos 8t ), 0 t 0.25
=
0 otherwise
5-17
time = 0:0.005:1;
roaddist = 0*time;
roaddist(1:51) = 0.025*(1-cos(8*pi*time(1:51)));
[p1,t] = lsim(qcar(1:4,1),roaddist,time);
[y1,t] = lsim(CL1(1:4,1),roaddist,time);
[y2,t] = lsim(CL2(1:4,1),roaddist,time);
subplot(221)
plot(t,y1(:,1),'b-',t,y2(:,1),'r.',t,p1(:,1),'k--',t,...
roaddist,'g-.')
title('Body Travel')
ylabel('x_1 (m)')
subplot(222)
plot(t,y1(:,2),'b-',t,y2(:,2),'r.',t,p1(:,2),'k--')
title('Body Acceleration')
ylabel('Accel (m/s/s)')
subplot(223)
plot(t,y1(:,3),'b-',t,y2(:,3),'r.',t,p1(:,3),'k--')
title('Suspension Deflection')
xlabel('Time (sec)')
ylabel('x_1 - x_3 (m)')
subplot(224)
plot(t,y1(:,4),'b-',t,y2(:,4),'r.',t,p1(:,4),'k--')
title('Control Force')
xlabel('Time (sec)')
5-18
ylabel('fs (10kN)')
5-19
The actuator model itself is uncertain. You can describe the actuator model
error as a set of possible models using a weighting function. At low frequency,
below 4 rad/s, it can vary up to 10% from its nominal value. Around 4 rad/s the
percentage variation starts to increase and reaches 400% at approximately 800
rad/s. The model uncertainty is represented by the weight Wunc, which
corresponds to the frequency variation of the model uncertainty and the
uncertain LTI dynamic object unc defined as unc.
Wunc = 0.10*tf([1/4 1],[1/800 1]);
unc = ultidyn('unc',[1 1]);
actmod = actnom*(1+ Wunc*unc)
USS: 2 States, 1 Output, 1 Input, Continuous System
unc: 1x1 LTI, max. gain = 1, 1 occurrence
5-20
bode(actnom,'r+',actmod,'b',logspace(-1,3,120))
Magnitude (dB)
30
20
10
0
Phase (deg)
10
90
45
0
45
90
135
180
1
10
10
10
10
10
Frequency (rad/sec)
The uncertain actuator model actmod represents the model of the hydraulic
actuator used for control. The revised control design interconnection diagram
is
5-21
You are designing the controller for passenger comfort, as in the first H
control design, hence the car body deflection x1 is penalized with Wx1. The
uncertain weighted H plant model for control design, denoted qcaricunc, is
using the sysic command. As previously described, the control signal
corresponds to the last input to qcaric1, fs. The car body acceleration, which
is noisy, is the measured signal and corresponds to the last output of
qcaricunc.
systemnames = 'qcar Wn Wref Wact Wx1 actmod';
inputvar = '[ d1; d2; fs ]';
outputvar = '[ Wact; Wx1; qcar(2)+Wn ]';
input_to_actmod = '[ fs ]';
input_to_qcar = '[ Wref; fs]';
input_to_Wn = '[ d2 ]';
input_to_Wref = '[ d1 ]';
input_to_Wact = '[ fs ]';
input_to_Wx1 = '[ qcar(1) ]';
qcaricunc = sysic;
5-22
logspace(0,2.3,140))
)
Bode Diagram
From: Road Disturbance To: Suspension Deflection
15
10
5
Magnitude (dB)
0
5
10
15
20
25
Passive
Active (K1)
Active (Kmu)
30
35
0
10
10
10
Frequency (rad/sec)
5-23
[ymusamp,t] = lsim(CLmuunc.Nominal(1:4,1),roaddist,time);
plot(t,ymusamp(:,1),'r+',t,roaddist,'m--')
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
0.01
0.02
0.03
0.2
0.4
0.6
Time (seconds)
0.8
for i=1:nsamp
[y1samp,t] = lsim(CL1unc40(1:4,1,i),roaddist,time);
plot(t,y1samp(:,1),'b')
hold on
end
[y1samp,t] = lsim(CL1unc.Nominal(1:4,1),roaddist,time);
5-24
plot(t,y1samp(:,1),'r+',t,roaddist,'m--')
Random sample of 40 plant models: H Design 1
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
0.01
0.02
0.03
0.2
0.4
0.6
Time (seconds)
0.8
5-25
5-26
Function
Description
augw
h2hinfsyn
h2syn
H2 controller synthesis
hinfsyn
H controller synthesis
loopsyn
ltrsyn
mixsyn
ncfsyn
sdhinfsyn
Description
dksyn
dkitopt
drawmag
fitfrd
fitmagfrd
5-27
2
e 2 :=
e ( t ) dt
1
--2
e( t) =
en ( t )
the 2-norm is defined as
e 2 := (
= (
e(t)
1
--2
2
dt
)
2
1
--2
T
e ( t )e ( t )dt )
In -tools the dynamic systems we deal with are exclusively linear, with
state-space model
x = A B x
C D d
e
or, in the transfer function form,
e(s) = T(s)d(s),T(s):= C(sI A)1B + D
Two mathematically convenient measures of the transfer matrix T(s) in the
frequency domain are the matrix H2 and H norms,
5-28
1
--2
1
-----T 2 :=
T ( j ) F d 2
2
T := max [ T ( j ) ]
wR
where the Frobenius norm (see the MATLAB norm command) of a complex
matrix M is
M F :=
trace ( M*M )
5-29
e~
d~
Suppose T is a MIMO stable linear system, with transfer function matrix T(s).
For a given driving signal d ( t ) , define e as the output, as shown below.
Note that it is more traditional to write the diagram in Unweighted MIMO
System: Vectors from Left to Right on page 5-30 with the arrows going from
left to right as in Weighted MIMO System on page 5-32.
d~
-e~
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.
Assume that the dimensions of T are ne nd. Let > 0 be defined as
:= T := max [ T ( j ) ]
wR
(11-1)
Now consider a response, starting from initial condition equal to 0. In that case,
Parsevals theorem gives that
12
T
[ e ( t )e ( t ) dt ]
e 2
0
----------- = -----------------------------------------------------
12
T
d 2
d ( t )d ( t ) dt
5-30
e 2
Moreover, there are specific disturbances d that result in the ratio ----------d 2
arbitrarily close to . Because of this, ||T|| is referred to as the L2 (or RMS) gain
of the system.
As you would expect, a sinusoidal, steady-state interpretation of ||T|| is also
possible: For any frequency R , any vector of amplitudes a R n , and any
d
d ( t ) =
a n sin ( t + n )
d
e ss ( t ) =
b ne sin ( t + ne )
The vector b R n e will satisfy ||b||2 . Moreover, , as defined in Weighted
MIMO System on page 5-32, is the smallest number such that this is true for
every ||a||2 1, , and .
Note that in this interpretation, the vectors of the sinusoidal magnitude
responses are unweighted, and measured in Euclidean norm. If realistic
multivariable performance objectives are to be represented by a single MIMO
|||| objective on a closed-loop transfer function, additional scalings are
necessary. Because many different objectives are being lumped into one matrix
and the associated cost is the norm of the matrix, it is important to use
frequency-dependent weighting functions, so that different requirements can
be meaningfully combined into a single cost function. Diagonal weights are
most easily interpreted.
5-31
Consider the diagram of Weighted MIMO System on page 5-32, along with
Unweighted MIMO System: Vectors from Left to Right on page 5-30.
Assume that WL and WR are diagonal, stable transfer function matrices, with
diagonal entries denoted Li and Ri.
L1 0 0
e~
WL
WL e~
d~
WL T d~
WR
0 R2 0
..
.
0 0 Rn
WR =
0 L2 0
..
.
0 0 Ln
WL =
R1 0 0
WL T WR d
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-30.
Specifically, for sinusoidal signal d , the steady-state relationship between
e (= Td ) , d and ||WLTWR|| is as follows. The steady-state solution e ss , denoted
as
e ss ( t ) =
e 1 sin ( t + 1 )
e n e sin ( t + n )
d
satisfies
5-32
ne
i=1
(5-1)
d ( t ) =
d 1 sin ( t + i )
d n d sin ( t + n )
d
(5-2)
satisfying
nd
2
d i
--------------------------1
2
W
(
j
)
Ri
i=1
1-------W
L
to
represent the desired upper bound on the subsequent errors that are produced.
Remember, however, that the weighted H norm does not actually give
element-by-element bounds on the components of e based on
element-by-element bounds on the components of d . The precise bound it gives
is in terms of Euclidean norms of the components of e and d (weighted
appropriately by WL(j ) and WR(j )).
5-33
References
[BalPac:] Balas, G.J., and A.K. Packard, The structured singular value
-framework, CRC Controls Handbook, Section 2.3.6, January, 1996,
pp. 671-688.
[BallC:] Ball, J.A., and N. Cohen, Sensitivity minimization in an H norm:
Parametrization of all suboptimal solutions, International Journal of Control,
Vol. 46, 1987, pp. 785-816.
[BamP:] 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.
[DGKF:] 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.
[FialBal:] 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.
[Fran1:] Francis, B.A., A course in H control theory, Lecture Notes in Control
and Information Sciences, Vol. 88, Springer-Verlag, Berlin, 1987.
[GloD:] 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.
[Hedrick90:] Hedrick, J.K., and Batsuen, T., Invariant Properties of
Automotive Suspensions, Proceedings of The Institution of Mechanical
Engineers, 204 (1990), pp. 21-27.
[Lin971:] Lin, J., and Kanellakopoulos, I., Road Adaptive Nonlinear Design of
Active Suspensions, Proceedings of the American Control Conference, (1997),
pp. 714-718.
[PacDB:] 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.
[SkoP:] Skogestad, S., and Postlethwaite, I., Multivariable Feedback Control:
Analysis & Design, John Wiley & Sons, 1996.
5-34
References
[SteD:] 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.
[Zame:] Zames, G., Feedback and optimal sensitivity: model reference
transformations, multiplicative seminorms, and approximate inverses, IEEE
Transactions on Automatic Control, Vol. AC-26, 1981, pp. 301-320.
5-35
5-36
6
Building Uncertain
Models
Simplifying Representation of
Uncertain Objects (p. 6-38)
Description
ureal
ultidyn
ucomplex
ucomplexm
udyn
All of the atoms have properties, which are accessed through get and set
methods. This get and set interface mimics the Control System Toolbox and
MATLAB Handle Graphics behavior. For instance,
get(a,'PropertyName') is the same as a.PropertyName, and
set(b,'PropertyName',Value) is the same as b.PropertyName = value.
Functionality also includes tab-completion and case-insensitive, partial name
property matching.
For ureal, ucomplex and ucomplexm atoms, the syntax is
p1 = ureal(name, NominalValue, Prop1, val1, Prop2, val2,...);
p2 = ucomplex(name, NominalValue, Prop1, val1, Prop2, val2,...);
p3 = ucomplexm(name, NominalValue, Prop1, val1, Prop2,
val2,...);
For ureal, ultidyn, ucomplex and ucomplexm atoms, the command usample
will generate a random instance (i.e., not uncertain) of the atom, within its
modeled range. For example,
6-2
usample(p1)
generates an array of 100 instances of the ultidyn object p4. See Sampling
Uncertain Objects on page 6-42 to learn more about usample.
Meaning
Class
Name
Internal Name
char
NominalValue
double
Mode
char
'PlusMinus','Range','Percentage') of
Additive variation
scalar or
1x2 double
Range
Numerical range
1x2 double
Percentage
scalar or
1x2 double
AutoSimplify
char
6-3
examples are shown below. In many cases, the full property name is not
specified, taking advantage of the case-insensitive, partial name property
matching.
Create an uncertain real parameter, nominal value 3, with default values for
all unspecified properties (including plus/minus variability of 1). View the
properties and their values, and note that the Range and Percentage
descriptions of variability are automatically maintained.
a = ureal('a',3)
Uncertain Real Parameter: Name a, NominalValue 3, variability =
[-1 1]
get(a)
Name: 'a'
NominalValue: 3
Mode: 'PlusMinus'
Range: [2 4]
PlusMinus: [-1 1]
Percentage: [-33.3333 33.3333]
AutoSimplify: 'basic'
6-4
b = ureal('b',2,'percentage',20)
Uncertain Real Parameter: Name b, NominalValue 2, variability =
[-20 20]%
get(b)
Name: 'b'
NominalValue: 2
Mode: 'Percentage'
Range: [1.6000 2.4000]
PlusMinus: [-0.4000 0.4000]
Percentage: [-20.0000 20.0000]
AutoSimplify: 'basic'
6-5
6-6
6-7
60
50
40
30
20
10
2.2
2.4
2.6
2.8
3.2
3.4
3.6
3.8
Make the range unsymmetric about the nominal value, and repeat the
sampling, and histogram plot (with 40 bins over the range of 2-to-6)
h.Range = [2 6];
hsample = usample(h,1000);
hist(reshape(hsample,[1000 1]),40);
6-8
80
70
60
50
40
30
20
10
2.5
3.5
4.5
5.5
Note that the distribution is skewed. However, the number of samples less
than the nominal value and the number of samples greater than the nominal
value is equal (on average). Verify this.
length(find(hsample(:)<h.NominalValue))
ans =
509
length(find(hsample(:)>h.NominalValue))
ans =
491
6-9
Range:
PlusMinus:
Percentage:
AutoSimplify:
set(ureal)
Name:
NominalValue:
Mode:
Range:
PlusMinus:
Percentage:
AutoSimplify:
[-1 1]
[-1 1]
[-Inf Inf]
'basic'
'String'
'1x1 real DOUBLE'
'Range | PlusMinus'
'1x2 DOUBLE'
'1x2 or scalar DOUBLE'
'Not settable since Nominal==0'
'['off' | 'basic' | 'full']'
6-10
All properties of a ultidyn are can be accessed with get and set (although
the NominalValue is determined from Type and Bound, and not accessible
with set). The properties are
Properties
Meaning
Class
Name
Internal Name
char
NominalValue
See above
Type
'GainBounded' |'PositiveReal'
char
Bound
scalar double
SampleStateDim
scalar double
AutoSimplify
char
You can create a 1-by-1 (scalar) positive-real uncertain linear dynamics atom,
whose frequency response always has real part greater than -0.5. Set the
6-11
Nyquist Diagram
Imaginary Axis
6
2
10
Real Axis
6-12
frequency response. To see this, create a ultidyn, and view the sample time
of several random samples of the atom.
h = ultidyn('h',[1 1]);
get(usample(h),'Ts')
ans =
0
get(usample(h),'Ts')
ans =
0
get(usample(h),'Ts')
ans =
0
Meaning
Class
Name
Internal Name
char
NominalValue
double
Mode
'Range' | 'Percentage'
char
Radius
Radius of disk
double
6-13
Properties
Meaning
Percentage
AutoSimplify
Class
double
char
The simplest construction requires only a name and nominal value. The
default Mode is Radius, and the default radius is 1.
a = ucomplex('a',2-j)
Uncertain Complex Parameter: Name a, NominalValue 2-1i, Radius 1
get(a)
Name: 'a'
NominalValue: 2.0000- 1.0000i
Mode: 'Radius'
Radius: 1
Percentage: 44.7214
AutoSimplify: 'basic'
set(a)
Name: 'String'
NominalValue: '1x1 DOUBLE'
Mode: 'Radius | Percentage'
Radius: 'scalar DOUBLE'
Percentage: 'scalar DOUBLE'
AutoSimplify: '['off' | 'basic' | 'full']'
Sample the uncertain complex parameter at 400 values, and plot in the
complex plane. Clearly, the samples appear to be from a disc of radius 1,
centered in the complex plane at the value 2j.
asample = usample(a,400);
plot(asample(:),'o'); xlim([0 4]); ylim([-3 1]);
6-14
0.5
0.5
1.5
2.5
3
0
0.5
1.5
2.5
3.5
Meaning
Class
Name
Internal Name
char
NominalValue
double
WL
Left weight
double
6-15
Properties
Meaning
WR
Right weight
AutoSimplify
Class
double
char
The simplest construction requires only a name and nominal value. The
default left and right weight matrices are identity.
You can create a 4-by-3 ucomplexm element, and view its properties.
m = ucomplexm('m',[1 2 3;4 5 6;7 8 9;10 11 12])
Uncertain Complex Matrix: Name m, 4x3
get(m)
Name: 'm'
NominalValue: [4x3 double]
WL: [4x4 double]
WR: [3x3 double]
AutoSimplify: 'basic'
m.NominalValue
ans =
1
2
3
4
5
6
7
8
9
10
11
12
m.WL
ans =
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
Sample the uncertain matrix, and compare to the nominal value. Note the
element-by-element sizes of the difference are generally equal, indicative of
the default (identity) weighting matrices that are in place.
abs(usample(m)-m.NominalValue)
ans =
0.2948
0.1001
0.2867
0.3028
0.2384
0.2508
0.3376
0.1260
0.2506
6-16
0.2200
0.3472
0.1657
Change the left and right weighting matrices, making the uncertainty larger
as you move down the rows, and across the columns.
m.WL = diag([0.2 0.4 0.8 1.6]);
m.WR = diag([0.1 1 4]);
Sample the uncertain matrix, and compare to the nominal value. Note the
element-by-element sizes of the difference, and the general trend that the
smallest differences are near the (1,1) element, and the largest differences
are near the (4,3) element, which is completely expected by choice of the
diagonal weighting matrices.
abs(usample(m)-m.NominalValue)
ans =
0.0091
0.0860
0.2753
0.0057
0.1717
0.6413
0.0304
0.2756
1.4012
0.0527
0.4099
1.8335
6-17
6-18
Uncertain Matrices
Uncertain Matrices
Uncertain matrices (class umat) are built from doubles, and uncertain atoms,
using traditional MATLAB matrix building syntax. Uncertain matrices can
be added, subtracted, multiplied, inverted, transposed, etc., resulting in
uncertain matrices. The rows and columns of an uncertain matrix are
referenced in the same manner that MATLAB references rows and columns
of an array, using parenthesis, and integer indices. The NominalValue of a
uncertain matrix is the result obtained when all uncertain atoms are replaced
with their own NominalValue. The uncertain atoms making up a umat are
accessible through the Uncertainty gateway, and the properties of each atom
within a umat can be changed directly.
Using usubs, specific values may be substituted for any of the uncertain
atoms within a umat. The command usample generates a random sample of
the uncertain matrix, substituting random samples (within their ranges) for
each of the uncertain atoms.
The command wcnorm computes tight bounds on the worst-case (maximum
over the uncertain elements' ranges) norm of the uncertain matrix.
Standard MATLAB numerical matrices (i.e., double) naturally can be viewed
as uncertain matrices without any uncertainty.
6-19
umat
6-20
Uncertain Matrices
The change to the uncertain real parameter a only took place within M. Verify
that the variable a in the workspace is no longer the same as the variable a
within M.
isequal(M.Uncertainty.a,a)
ans =
0
Note that combining atoms which have a common internal name, but
different properties leads to an error. For instance, subtracting the two atoms
gives an error, not 0.
M.Uncertainty.a - a
??? Error using ==> ndlft.lftmask
6-21
h(3)
UMAT: 1 Rows, 1 Columns
a: real, nominal = 3, variability = [-0.5 2], 1 occurrence
b: real, nominal = 10, variability = [-20 20]%, 1 occurrence
Verify that the 1st entry of M1 is -2*a + 3*b + 1. Direct subtraction yields a
umat without any dependence on uncertain elements. Simplifying the class
shows that the result is zero as expected.
d = M1(1) - (-2*M.Uncertainty.a + 3*M.Uncertainty.b + 1)
UMAT: 1 Rows, 1 Columns
simplify(d,'class')
ans =
0
6-22
Uncertain Matrices
ans(:,:,1) =
1.0000
-0.0000
-0.0000
1.0000
ans(:,:,2) =
1.0000
-0.0000
-0.0000
1.0000
ans(:,:,3) =
1.0000
-0.0000
-0.0000
1.0000
If one value is being substituted for many different atoms, the atom names
can be listed in a cell array, and then the value given. For example, substitute
a and b with the number 4, and c with the number 5.
M5 = usubs(M,{'a' 'b'},4,'c',5)
6-23
M5 =
-4.0000
4.0000
1.0000
0.2500
4.2500
5.0000
High dimensional double matrices can also be lifted. Note from the display
that once the matrix is interpreted as a umat, the 3rd dimension and beyond
are interpreted as array dimensions. See Array Management for Uncertain
Objects on page 6-49 for more information about how multidimensional
arrays of uncertain objects are handled.
Md = randn(4,5,6);
M = umat(Md)
UMAT: 4 Rows, 5 Columns [array, 6 x 1]
Md = randn(4,5,6,7);
M = umat(Md)
UMAT: 4 Rows, 5 Columns [array, 6 x 7]
Md = randn(4,5,6,7,8);
M = umat(Md)
UMAT: 4 Rows, 5 Columns [array, 6 x 7 x 8]
6-24
6-25
1], 2 occurrences
[2x2
[2x1
[2x2
[2x1
{2x1
0
{''}
{2x1
[1x1
[1x1
[2x1
[1x1
{}
[]
umat]
umat]
umat]
double]
cell}
cell}
struct]
struct]
ss]
atomlist]
6-26
Step Response
To: Out(1)
0.05
0.1
0.15
Amplitude
0.2
0.25
0.1
0.09
0.08
To: Out(2)
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Time (sec)
Just as with the umat class, the Uncertainty property is a atomlist object,
acting as a gateway to the uncertain atoms. Direct access to the atoms is
facilitated through Uncertainty. Check the Range of the uncertain element
named 'p2' within sys, then change its left endpoint.
sys.Uncertainty.p2.range
ans =
2.5000
4.2000
sys.Uncertainty.p2.range(1) = 2;
6-27
Step Response
0
0.05
To: Out(1)
0.1
0.15
0.2
0.25
0.3
Amplitude
0.35
0.4
0.8
0.7
0.6
To: Out(2)
0.5
0.4
0.3
0.2
0.1
0
0.1
0.2
0.5
1.5
2.5
Time (sec)
The command step can be called directly on a uss object. The default
behavior samples the uss object at 20 instances, and plots the step responses
of these 20 models, as well as the nominal value.
The same features are available for bode, bodemag, impulse, nyquist and
step.
Next, create an unmodeled dynamics atom, delta, and a 1st order weighting
function, whose DC value is 0.2, high-frequency gain is 10, and whose
crossover frequency is 8 rad/sec.
delta = ultidyn('delta',[1 1],'SampleStateDim',5);
W = makeweight(0.2,6,6);
6-28
Using usample and step, plot samples of the open-loop and closed-loop step
responses. As expected the integral controller reduces the variability in the
low frequency response.
subplot(2,1,1); step(P,5,20)
subplot(2,1,2); step(CLP,5,20)
Step Response
6
5
Amplitude
4
3
2
1
0
1
2
0.5
1.5
2.5
Time (sec)
3.5
4.5
3.5
4.5
Step Response
1.5
Amplitude
0.5
0.5
0.5
1.5
2.5
Time (sec)
6-29
Next, get a random sample of each system. When obtaining random samples
using usample, the values of the atoms used in the sample are returned in the
2nd argument from usample as a structure.
[sys1s,d1v] = usample(sys1);
[sys2s,d2v] = usample(sys2);
Finally, in the case of a discrete-time uss object, it is not the case that
ultidyn objects are interpreted as continuous-time uncertainty in feedback
with sampled-data systems. This very interesting hybrid theory has been
studied by many authors, see [DullerudGlover], but it is beyond the scope of
the toolbox.
6-30
Lifting a ss to a uss
A not-uncertain state space object may be interpreted as an uncertain state
space object that has no dependence on uncertain atoms. Use the uss
command to lift a ss to the uss class.
sys = rss(3,2,1);
usys = uss(sys)
USS: 3 States, 2 Outputs, 1 Input, Continuous System
Arrays of ss objects can also be lifted. See Array Management for Uncertain
Objects on page 6-49 for more information about how arrays of uncertain
objects are handled.
6-31
Step Response
Amplitude
6-32
0.5
1.5
2
Time (sec)
2.5
3.5
Uncertain frd
Uncertain frd
Uncertain frequency responses (ufrd) arise naturally when computing the
frequency response of an uncertain state-space (uss). They also arise when
frequency response data (in an frd object) is combined (added, multiplied,
concatenated, etc.) to an uncertain matrix (umat).
Compute the uncertain frequency response of the uncertain system. Use the
frd command, along with a frequency grid containing 100 points. The result
is an uncertain frequency response data object, referred to as a ufrd.
sysg = frd(sys,logspace(-2,2,100))
UFRD: 2 Outputs, 1 Input, Continuous System, 100 Frequency
points
p1: real, nominal = 10, variability = [-50 50]%, 2 occurrences
p2: real, nominal = 3, variability = [-0.5 1.2], 2 occurrences
p3: real, nominal = 0, variability = [-1 1], 2 occurrences
6-33
get(sysg)
Frequency:
ResponseData:
Units:
Ts:
InputName:
OutputName:
InputGroup:
OutputGroup:
NominalValue:
Uncertainty:
Notes:
UserData:
Version:
[100x1 double]
[2x1x100 umat]
'rad/s'
0
{''}
{2x1 cell}
[1x1 struct]
[1x1 struct]
[2x1 frd]
[1x1 atomlist]
{}
[]
4
6-34
Uncertain frd
Bode Diagram
To: Out(1)
10
20
30
40
180
90
0
20
40
60
80
To: Out(2)
100
0
90
180
3
10
10
10
10
10
10
Frequency (Hz)
Just as with the umat and uss classes, the Uncertainty property is an
atomlist object, acting as a gateway to the uncertain atoms. Direct access to
the atoms is facilitated through Uncertainty. Change the nominal value of
the uncertain element named 'p1' within sysg to 14, and replot the Bode
plot of the (new) nominal system.
sysg.unc.p1.nom = 14
UFRD: 2 Outputs, 1 Input, Continuous System, 100 Frequency
points
p1: real, nominal = 14, variability = [-50 50]%, 2 occurrences
p2: real, nominal = 3, variability = [-0.5 1.2], 2 occurrences
p3: real, nominal = 0, variability = [-1 1], 2 occurrences
6-35
Arrays of frd objects can also be lifted. See Array Management for Uncertain
Objects on page 6-49 for more information about how arrays of uncertain
objects are handled.
6-36
6-37
4
---------s+1
6
-----------s+1
6-38
= ss(tf(2,[1 1]));
= ss(tf(4,[1 1]));
= ss(tf(3,[1 1]));
= ss(tf(6,[1 1]));
[sys11 sys12;sys21 sys22]
x1
-1
0
0
0
x2
0
-1
0
0
u1
2
0
2
0
u2
0
2
0
2
x1
1
0
x2
2
0
x3
0
0
-1
0
x4
0
0
0
-1
x3
0
1.5
x4
0
3
u1 u2
y1
0
0
y2
0
0
Continuous-time model
1], 1 occurrence
6-39
Note that although the uncertain real parameter a appears in both (two)
entries of the matrix, the resulting uncertain matrix m1 only depends on 1
occurrence of a.
Set the AutoSimplify property of a to 'off' (from 'basic'). Recreate the
1-by-2 umat. Now note that the resulting uncertain matrix m2 depends on 2
occurrences of a.
a.AutoSimplify = 'off';
m2 = [a+4 6*a]
UMAT: 1 Rows, 2 Columns
a: real, nominal = 4, variability = [-1
1], 2 occurrences
1], 4 occurrences
1], 2 occurrences
6-40
0
0
usubs(m4,'a',0)
ans =
1.0e-015 *
-0.4441
Small numerical differences are also noted at other evaluation points. The
example below shows the differences encountered evaluating at a equal to 1.
usubs(m3,'a',1)
ans =
5
6
usubs(m4,'a',1)
ans =
5.0000
6.0000
1], 4 occurrences
1], 2 occurrences
6-41
35.7428
See Creating Arrays with usample on page 6-53 for more information on
sampling uncertain objects.
6-42
Sample the uncertain atom at 30 points. Verify that this creates a 30-by-1 ss
array of 1-input, 1-output, 1-state systems.
delS = usample(del,30);
size(delS)
30x1 array of state-space models
Each model has 1 output, 1 input, and 1 state.
Plot the Nyquist plot of these samples and add a disk of radius 3. Note that
the gain bound is satisfied and that the Nyquist plots are all circles,
indicative of 1st order systems.
nyquist(delS)
hold on;
theta = linspace(-pi,pi);
plot(del.Bound*exp(sqrt(-1)*theta),'r');
hold off;
6-43
Nyquist Diagram
1.5
Imaginary Axis
0.5
0.5
1.5
2
3
0
Real Axis
6-44
Nyquist Diagram
Imaginary Axis
3
3
0
Real Axis
6-45
Substitution by usubs
If an uncertain object (umat, uss, ufrd) has many uncertain parameters, it
is often necessary to freeze some, but not all, of the uncertain parameters to
specific values. The usubs command accomplishes this, and also allows more
complicated substitutions for an atom.
usubs accepts a list of atom names, and respective values to substitute for
them. You can create 3 uncertain real parameters and use them to create a
2-by-2 uncertain matrix A.
delta = ureal('delta',2);
eta = ureal('eta',6);
rho = ureal('rho',-1);
A = [3+delta+eta delta/eta;7+rho rho+delta*eta]
UMAT: 2 Rows, 2 Columns
delta: real, nominal = 2, variability = [-1 1], 2 occurrences
eta: real, nominal = 6, variability = [-1 1], 3 occurrences
rho: real, nominal = -1, variability = [-1 1], 1 occurrence
Use usubs to substitute the uncertain element named delta in A with the
value 2.3, leaving all other uncertain atoms intact. Note that the result, B, is
an uncertain matrix with dependence only on eta and rho.
B = usubs(A,'delta',2.3)
UMAT: 2 Rows, 2 Columns
eta: real, nominal = 6, variability = [-1 1], 3 occurrences
rho: real, nominal = -1, variability = [-1 1], 1 occurrence
To set multiple atoms, list individually, or in cells. The following are the same
B1 = usubs(A,'delta',2.3,'eta',A.Uncertainty.rho);
B2 = usubs(A,{'delta';'eta'},{2.3;A.Uncertainty.rho});
replaces both the atoms delta and eta with the real number 2.3. Any
superfluous substitution requests are ignored. Hence
6-46
Substitution by usubs
B4 = usubs(A,'fred',5);
Here, B6 is the same as B1 and B2 above. Again, any superfluous fields are
ignored. Therefore, adding an additional field gamma to NV, and substituting
does not alter the result.
NV.gamma = 0;
B7 = usubs(A,NV);
6-47
6.0000
11.0000
B9 = A.NominalValue
B9 =
11.0000
0.3333
6.0000
11.0000
are the same. It is possible to only set some of the atoms to NominalValues,
and would be the typical use of usubs with the 'nominal' argument.
Within A, set eta to its nominal value, delta to a random value (within its
range) and rho to a specific value, say 6.5
B10 = usubs(A,'eta','nom','delta','rand','rho',6.5)
B10 =
10.5183
0.2531
13.5000
15.6100
6-48
Referencing Arrays
Suppose M is a umat, uss or ufrd, and that Yidx and Uidx are vectors of
integers. Then
M(Yidx,Uidx)
selects the outputs (rows) referred to by Yidx and the inputs (columns)
referred to by Uidx, preserving all of the array dimensions. For example, if
size(M) equals [4 5 3 6 7], then (for example) the size of M([4 2],[1 2
4]) is [2 3 3 6 7].
If size(M,1)==1 or size(M,2)==1, then single indexing on the inputs or
outputs (rows or columns) is allowed. If Sidx is a vector of integers, then
M(Sidx) selects the corresponding elements. All array dimensions are
preserved.
If there are K array dimensions, and idx1, idx2, ..., idxK are vectors of
integers, then
G = M(Yidx,Uidx,idx1,idx2,...,idxK)
selects the outputs and inputs referred to by Yidx and Uidx, respectively, and
selects from each array dimension the slices referred to by the idx1,
6-49
If M has K array dimensions, and less than K index vectors are used in doing
the array referencing, then the MATLAB convention for single indexing is
followed. For instance, suppose size(M) equals [3 4 6 5 7 4]. The
expression
G = M([1 3],[1 4],[2 3 4],[5 3 1],[8 10 12 2 4 20 18])
is valid. The result has size(G) equals [2 2 3 3 7]. The last index vector
[8 10 12 2 4 20 18] is used to reference into the 7-by-4 array, preserving
the order dictated by MATLAB single indexing (e.g., the 10th element of a
7-by-4 array is the element in the (3,2) position in the array).
Note that if M has either one output (row) or one input (column), and M has
array dimensions, then it is not allowable to combine single indexing in the
output/input dimensions along with indexing in the array dimensions. This
will result in an ambiguity in how to interpret the second index vector in the
expression (i.e., does it correspond to the input/output reference, or does it
correspond to the first array dimension?).
6-50
ans =
4
Check that result is valid. Use referencing to access parts of the [4-by-1] umat
array and compare to the expected values. The first 4 examples should all be
arrays full of 0 (zeros). The last two should be the value 5, and the uncertain
real parameter a, respectively.
simplify(M(:,:,1) - [a b 1])
ans =
0
0
0
simplify(M(:,:,2) - [-a -b 4+a])
ans =
0
0
0
simplify(M(:,:,3) - [4 5 6])
ans =
0
0
0
simplify(M(:,:,4) - [a 0 0])
ans =
0
0
0
simplify(M(1,2,3)) % should be 5
ans =
5
simplify(M(1,3,2)-4)
Uncertain Real Parameter: Name a, NominalValue 4, variability =
[-1 1]
You can create a random 1-by-3-by-4 double matrix and stack this with M
along the second array dimension, creating a 1-by-3-by-4-by-2 umat.
N = randn(1,3,4);
M2 = stack(2,M,N);
size(M2)
ans =
1
3
4
arraysize(M2)
ans =
4
2
6-51
d2 = simplify(M2(:,:,:,2)-N);
[max(abs(d1(:))) max(abs(d2(:)))]
ans =
0
0
It is also possible to stack M and N along the 1st array dimension, creating a
1-by-3-by-8-by-1 umat.
M3 = stack(1,M,N);
size(M3)
ans =
1
3
8
arraysize(M3)
ans =
8
1
6-52
The easiest manner for you to verify that the results are the same is to
subtract and simplify,
d5 = simplify(M-Mequiv);
max(abs(d5(:)))
ans =
0
The result C has the same array dimensions as A and B. The user is required
to manage the extra dimensions (i.e., keep track of what they mean).
Methods such as permute, squeeze and reshape are included to facilitate
this management.
In general, any binary operation requires that the extra-dimensions are
compatible. The umat, uss and ufrd objects allow for slightly more flexible
interpretation of this. For illustrative purposes, consider a binary operation
involving variables A and B. Suppose the array dimensions of A are
n1 nl
6-53
1], 3 occurrences
1], 6 occurrences
Sample (at 20 random points within its range) the uncertain real parameter
b in the matrix M. This results in a 3-by-2-by-20 umat, with only one uncertain
element, a. The uncertain element b of M has been sampled out, leaving a
new array dimension in its place.
[Ms,bvalues] = usample(M,'b',20);
Ms
UMAT: 3 Rows, 2 Columns [array, 20 x 1]
a: real, nominal = 4, variability = [-1
size(Ms)
ans =
3
2
20
1], 2 occurrences
Continue sampling (at 15 random points within its range) the uncertain real
parameter a in the matrix Ms. This results in a 3-by-2-by-20-by-15 double.
[Mss,avalues] = usample(Ms,'a',15);
size(Mss)
ans =
3
2
20
15
class(Mss)
ans =
double
In this case, values is a 20-by-15 struct array, with 2 fields b and a, whose
values are the values used in the random sampling. It follows that
usubs(M,values) is the same as Mss.
6-54
Create a 5-by-1 struct array with fieldname a. Make its values random
scalars. Create a 1-by-4 struct array with fieldname b.
Avalue = struct('a',num2cell(rand(5,1)));
Bvalue = struct('b',num2cell(rand(1,4)));
1], 6 occurrences
6-55
1], 2 occurrences
Grid the uncertain real parameter b in M with 100 points. The result is a umat
array, with dependence on uncertain real parameters a and c.
Mgrid1 = gridureal(M,'b',100)
UMAT: 2 Rows, 2 Columns [array, 100 x 1]
a: real, nominal = 3, range = [2.5 4], 1 occurrence
c: real, nominal = -2, variability = [-1 0.3], 1 occurrence
6-56
1], 1 occurrence
Create (as in section a [4-by-1] umat array by stacking four 1-by-3 umat
objects with the stack command. Use repmat to tile this 1-by-3-by-4-by-1
umat, into a 2-by-3-by-8-by-5 umat.
a = ureal('a',4);
b = ureal('b',2);
M = stack(1,[a b 1],[-a -b 4+a],[4 5 6],[a 0 0]);
size(M)
ans =
1
3
4
6-57
All of the uncertain objects are essentially 2-dimensional (output and input)
operators with array dependence. This means that the first 2 dimensions are
treated differently from dimensions 3 and beyond. It is not permissible to
permute across these groups.
6-58
For uss and ufrd, the restriction is built into the syntax. The elements of the
ORDER vector only refer to array dimensions. Therefore, there is no possibility
of permute across these dimensions. In you need to permute the first two
dimensions, use the command transpose instead.
For umat, the restriction is enforced in the software. The elements of the
ORDER vector refer to all dimensions. However, the first two elements of ORDER
must be a rearrangement of the numbers 1 and 2. The remaining elements of
ORDER must be a rearrangement of the numbers 3 through N. If either of those
conditions fail, an error is generated. Hence, for umat arrays, either permute
or transpose can be used to effect the transpose operation.
6-59
6-60
1
F ( E ) = --- E
F ( E ) = I E --- I
1
I + E --- I
where =2||+1.
The normalizing function for an uncertain complex parameter , with
nominal value C and radius is
1
F ( ) = --- ( C )
F ( H ) = W L ( H N )W R
In each case, as the uncertain atom varies over its range, the absolute value
of the normalizing function (or norm, in the matrix case) varies from 0 and 1.
6-61
A ( , ) = M 22 + M 21 ( , , H, E, P ) [ I M 11 ( , , H, E, P ) ] M 12
The order of the normalized atoms making up A is not the simple order shown
above. It is actually the same order as given by the command
fieldnames(M.Uncertainty). See Advanced Syntax of lftdata on page 6-64
for more information.
Syntax of lftdata
The decomposition is carried out by the command lftdata.
You can create a 2-by-2 umat named A using three uncertain real parameters.
delta = ureal('delta',2);
eta = ureal('eta',6);
rho = ureal('rho',-1);
A = [3+delta+eta delta/eta;7+rho rho+delta*eta]
UMAT: 2 Rows, 2 Columns
delta: real, nominal = 2, variability = [-1 1], 2 occurrences
eta: real, nominal = 6, variability = [-1 1], 3 occurrences
rho: real, nominal = -1, variability = [-1 1], 1 occurrence
6-62
ans =
double
Delta
UMAT: 6 Rows, 6 Columns
delta: real, nominal = 2, variability = [-1 1], 2 occurrences
eta: real, nominal = 6, variability = [-1 1], 3 occurrences
rho: real, nominal = -1, variability = [-1 1], 1 occurrence
Sample Delta at 5 points. Things to note are: it is diagonal; the values range
between -1 and 1; there are 3 independent values, and duplication of the
entries is consistent with the dependence of Delta and A on the 3 uncertain
real parameters.
usample(Delta,5)
ans(:,:,1) =
-0.7106
0
0
-0.7106
0
0
0
0
0
0
0
0
ans(:,:,2) =
-0.5850
0
0
-0.5850
0
0
0
0
0
0
0
0
ans(:,:,3) =
0.7013
0
0
0.7013
0
0
0
0
0
0
0
0
ans(:,:,4) =
0.4262
0
0
0.4262
0
0
0
0
0
0
0
0
0.6374
0
0
0
0
0
0
0.6374
0
0
0
0
0
0
0.6374
0
0
0
0
0
0
-0.1258
0
0
-0.3021
0
0
0
0
0
0
-0.3021
0
0
0
0
0
0
-0.3021
0
0
0
0
0
0
0.0803
0
0
-0.6749
0
0
0
0
0
0
-0.6749
0
0
0
0
0
0
-0.6749
0
0
0
0
0
0
0.3967
0
0
0.0795
0
0
0
0
0
0.0795
0
0
0
0
0
0.0795
0
0
0
0
0
6-63
0
0
ans(:,:,5) =
-0.8392
0
0
-0.8392
0
0
0
0
0
0
0
0
-0.9959
0
0
0.8467
0
0
0
0
0
0
0.8467
0
0
0
0
0
0
0.8467
0
0
0
0
0
0
0.6732
Finally, verify that lft(Delta,M) is the same as A. Subtract (and use the
'full' option in simplify)
simplify(lft(Delta,M)-A,'full')
ans =
0
0
0
0
6-64
Name:
Size:
Type:
Occurrences:
BlkStruct(2)
ans =
Name:
Size:
Type:
Occurrences:
BlkStruct(3)
ans =
Name:
Size:
Type:
Occurrences:
'delta'
[1 1]
'ureal'
2
'eta'
[1 1]
'ureal'
3
'rho'
[1 1]
'ureal'
1
6-65
ans =
1
NormUnc{3}
Uncertain Real Parameter: Name etaNormalized, NominalValue 0,
variability = [-1 1]
isequal(NormUnc{4},NormUnc{3})
ans =
1
isequal(NormUnc{5},NormUnc{3})
ans =
1
NormUnc{6}
Uncertain Real Parameter: Name rhoNormalized, NominalValue 0,
variability = [-1 1]
6-66
7
Generalized Robustness
Analysis
Introduction to Generalized
Robustness Analysis (p. 7-2)
The graph below shows the typical tradeoff curve between allowable deviation
of uncertain elements from their nominal values and the worst-case
degradation in system performance. Here, system performance is
characterized by system gain (e.g., peak magnitude on Bode plot). Interpreting
the system as the relationship mapping disturbances/commands to errors,
small system gains are desirable, and large gains are undesirable.
3
2.5
System performance
degradation curve
1.72
1.5
Nominal System
Gain = 0.8
1
0.5
0
0
0.5
1
1.5
2
2.5
Bound on Normalized Uncertainty
When all uncertain elements are set to their nominal values (i.e., zero
deviation from their nominal values) the input/output gain of the system is its
nominal value. In the figure, the nominal system gain is about 0.8. As the
uncertainties are allowed to deviate from nominal, the maximum (over the
7-2
uncertain elements) system gain increases. The heavy blue line represents the
maximum system gain due to uncertainty of various sizes (the horizontal axis).
and is called the system performance degradation curve. It is monotonically
increasing.
Determining specific attributes of the system performance degradation curve
are referred to as robustness computations.
Generally, robustness computations refer to determining specific attributes
of the system performance degradation curve. The commands robuststab,
robustperf and wcgain all compute single scalar attributes of the system
performance degradation curve.
Redraw the system performance degradation curve with 3 additional curves: a
hyperbola defined by xy=1; a vertical line drawn at the uncertainty bound = 1;
and a vertical line tangent to the asymptotic behavior of the performance
degradation curve at large uncertainty bounds. These are used to define three
robustness measures, explained next.
2.5
Uncertainty level
at which system can
become unstable
1.5
WCGain=1.22
y=1/x curve in
uncertainty size
.vs. performance
tradeoff space
1
PerfMarg=0.88
0.5
StabMarg=1.9
0
0
0.5
1
1.5
2
2.5
Bound on Normalized Uncertainty
7-3
System performance
degradation curve
Uncertainty level
at which system can
become unstable
1.5
0.5
StabMarg=1.9
0
0
0.5
1
1.5
2
2.5
Bound on Normalized Uncertainty
7-4
2
System performance
degradation curve
1.5
1
PerfMarg=0.88
y=1/x curve in
uncertainty size
.vs. performance
tradeoff space
0.5
0
0
0.5
1
1.5
2
2.5
Bound on Normalized Uncertainty
The point where the system performance degradation curve crosses the green
line is used as a scalar measure of the robustness of a system to uncertainty.
The horizontal coordinate of the crossing point is the robust performance
margin, PerfMarg.
7-5
2.5
2
System performance
degradation curve
1.5
WCGain=1.22
0.5
0
0
1
1.5
2
2.5
Bound on Normalized Uncertainty
7-6
8
Introduction to Linear
Matrix Inequalities
LMI Features
The Robust Control Toolbox LMI functionality serves two purposes:
Provide state-of-the-art tools for the LMI-based analysis and design of robust
control systems
Offer a flexible and user-friendly environment to specify and solve general
LMI problems (the LMI Lab)
Examples of LMI-based analysis and design tools include
Functions to analyze the robust stability and performance of uncertain
systems with varying parameters (popov, quadstab, quadperf ...)
8-2
Functions to design robust control with a mix of H2, H, and pole placement
objectives (h2hinfsyn)
Functions for synthesizing robust gain-scheduled H controllers (hinfgs)
For users interested in developing their own applications, the LMI Lab
provides a general-purpose and fully programmable environment to specify
and solve virtually any LMI problem. Note that the scope of this facility is by
no means restricted to control-oriented applications.
8-3
A1 ( x ) < 0
..
AK ( x ) < 0
8-4
In most control applications, LMIs do not naturally arise in the canonical form
(1-1), but rather in the form
L(X1, . . . , Xn) < R(X1, . . . , Xn)
where L(.) and R(.) are affine functions of some structured matrix variables X1,
. . . , Xn. A simple example is the Lyapunov inequality
T
A X + XA < 0
(8-1)
(8-2)
(8-3)
C(x) < 0
(8-4)
is quasi-convex and can be solved by similar techniques. It owes its name to the
fact that is related to the largest generalized eigenvalue of the pencil
(A(x),B(x)).
Many control problems and design specifications have LMI formulations [9].
This is especially true for Lyapunov-based analysis and design, but also for
optimal LQG control, H control, covariance control, etc. Further applications
of LMIs arise in estimation, identification, optimal design, structural
8-5
design[6], [7], matrix scaling problems, and so on. The main strength of LMI
formulations is the ability to combine various design constraints or objectives
in a numerically tractable manner.
A nonexhaustive list of problems addressed by LMI techniques includes the
following:
Robust stability of systems with LTI uncertainty (-analysis) ([24], [21], [27])
Robust stability in the face of sector-bounded nonlinearities (Popov criterion)
([22], [28], [13], [16])
Quadratic stability of differential inclusions ([15], [8])
Lyapunov stability of parameter-dependent systems ([12])
Input/state/output properties of LTI systems (invariant ellipsoids, decay
rate, etc.) ([9])
Multi-model/multi-objective state feedback design ([4], [17], [3], [9], [10])
Robust pole placement
Optimal LQG control ([9])
Robust H control ([11], [14])
Multi-objective H synthesis ([18], [23], [10], [18])
Design of robust gain-scheduled controllers ([5], [2])
Control of stochastic systems ([9])
Weighted interpolation problems ([9])
To hint at the principles underlying LMI design, lets review the LMI
formulations of a few typical design objectives.
Stability
The stability of the dynamic system
x = Ax
is equivalent to the feasibility of
Find P = PT such that AT P + P A < 0, P > I.
This can be generalized to linear differential inclusions (LDI)
x = A ( t )x
8-6
A ( t ) Co { A 1 ,,A n } =
a i A i : a i 0,
ai = 1
i=1
i = 1
A sufficient condition for the asymptotic stability of this LDI is the feasibility of
T
RMS gain
The random-mean-squares (RMS) gain of a stable LTI system
x = Ax + Bu
y = Cx + Du
is the largest input/output gain over all bounded inputs u(t). This gain is the
global minimum of the following linear objective minimization problem [1],
[25], [26].
Minimize over X = XT and such that
T
T
A X + XA XB C
T
T
B X
I D < 0
C
D I
X > 0
LQG Performance
For a stable LTI system
x = Ax + Bw
G
y = Cx
where w is a white noise disturbance with unit covariance, the LQG or H2
performance ||G||2 is defined by
8-7
1 T T
2
G 2 : = lim E ---- y ( t )y ( t )dt
T
T
0
1 H
= -----G ( j )G ( j )d
2
AP + PA + BB < 0
Q CP
>0
PC T P
Again this is a linear objective minimization problem since the objective Trace
(Q) is linear in the decision variables (free entries of P,Q).
8-8
T
Minimize c x subject to x x 0
x x
(8-5)
8-9
References
[1] Anderson, B.D.O., and S. Vongpanitlerd, Network Analysis, Prentice-Hall,
Englewood Cliffs, 1973.
[2] Apkarian, P., P. Gahinet, and G. Becker, Self-Scheduled H Control of
Linear Parameter-Varying Systems, Proc. Amer. Contr. Conf., 1994, pp.
856-860.
[3] Bambang, R., E. Shimemura, and K. Uchida, Mixed H2 /H Control with
Pole Placement, State-Feedback Case, Proc. Amer. Contr. Conf., 1993, pp.
2777-2779.
[4] Barmish, B.R., Stabilization of Uncertain Systems via Linear Control,
IEEE Trans. Aut. Contr., AC28 (1983), pp. 848-850.
[5] Becker, G., and Packard, P., Robust Performance of Linear-Parametrically
Varying Systems Using Parametrically-Dependent Linear Feedback, Systems
and Control Letters, 23 (1994), pp. 205-215.
[6] Bendsoe, M.P., A. Ben-Tal, and J. Zowe, Optimization Methods for Truss
Geometry and Topology Design, to appear in Structural Optimization.
[7] Ben-Tal, A., and A. Nemirovski, Potential Reduction Polynomial-Time
Method for Truss Topology Design, to appear in SIAM J. Contr. Opt.
[8] Boyd, S., and Q. Yang, Structured and Simultaneous Lyapunov Functions
for System Stability Problems, Int. J. Contr., 49 (1989), pp. 2215-2240.
[9] Boyd, S., L. El Ghaoui, E. Feron, and V. Balakrishnan, Linear Matrix
Inequalities in Systems and Control Theory, SIAM books, Philadelphia, 1994.
[10] Chilali, M., and P. Gahinet, H Design with Pole Placement Constraints:
an LMI Approach, to appear in IEEE Trans. Aut. Contr. Also in Proc. Conf.
Dec. Contr., 1994, pp. 553-558.
[11] Gahinet, P., and P. Apkarian, A Linear Matrix Inequality Approach to H
Control, Int. J. Robust and Nonlinear Contr., 4 (1994), pp. 421-448.
[12] Gahinet, P., P. Apkarian, and M. Chilali, Affine Parameter-Dependent
Lyapunov Functions for Real Parametric Uncertainty, Proc. Conf. Dec. Contr.,
1994, pp. 2026-2031.
[13] Haddad, W.M., and D.S. Berstein,Parameter-Dependent Lyapunov
Functions, Constant Real Parameter Uncertainty, and the Popov Criterion in
8-10
References
Robust Analysis and Synthesis: Part 1 and 2, Proc. Conf. Dec. Contr., 1991, pp.
2274-2279 and 2632-2633.
[14] Iwasaki, T., and R.E. Skelton, All Controllers for the General H Control
Problem: LMI Existence Conditions and State-Space Formulas, Automatica,
30 (1994), pp. 1307-1317.
[15] Horisberger, H.P., and P.R. Belanger, Regulators for Linear
Time-Varying Plants with Uncertain Parameters, IEEE Trans. Aut. Contr.,
AC21 (1976), pp. 705-708.
[16] How, J.P., and S.R. Hall, Connection between the Popov Stability
Criterion and Bounds for Real Parameter Uncertainty, Proc. Amer. Contr.
Conf., 1993, pp. 1084-1089.
[17] Khargonekar, P.P., and M.A. Rotea,Mixed H2 /H Control: a Convex
Optimization Approach, IEEE Trans. Aut. Contr., 39 (1991), pp. 824-837.
[18] Masubuchi, I., A. Ohara, and N. Suda, LMI-Based Controller Synthesis:
A Unified Formulation and Solution, submitted to Int. J. Robust and
Nonlinear Contr., 1994.
[19] Nemirovski, A., and P. Gahinet, The Projective Method for Solving Linear
Matrix Inequalities, Proc. Amer. Contr. Conf., 1994, pp. 840-844.
[20] Nesterov, Yu, and A. Nemirovski, Interior Point Polynomial Methods in
Convex Programming: Theory and Applications, SIAM Books, Philadelphia,
1994.
[21] Packard, A., and J.C. Doyle, The Complex Structured Singular Value,
Automatica, 29 (1994), pp. 71-109.
[22] Popov, V.M., Absolute Stability of Nonlinear Systems of Automatic
Control, Automation and Remote Control, 22 (1962), pp. 857-875.
[23] Scherer, C., Mixed H2 H Control, to appear in Trends in Control: A
European Perspective, volume of the special contributions to the ECC 1995.
[24] Stein, G., and J.C. Doyle, Beyond Singular Values and Loop Shapes, J.
Guidance, 14 (1991), pp. 5-16.
[25] Vidyasagar, M., Nonlinear System Analysis, Prentice-Hall, Englewood
Cliffs, 1992.
8-11
8-12
9
The LMI Lab
From Decision to Matrix Variables and The relationships between decision variables and matrix
Vice Versa (p. 9-27)
variables
Validating Results (p. 9-28)
Introduction
The LMI Lab is a high-performance package for solving general LMI problems.
It blends simple tools for the specification and manipulation of LMIs with
powerful LMI solvers for three generic LMI problems. Thanks to a
structure-oriented representation of LMIs, the various LMI constraints can be
described in their natural block-matrix form. Similarly, the optimization
variables are specified directly as matrix variables with some given structure.
Once an LMI problem is specified, it can be solved numerically by calling the
appropriate LMI solver. The three solvers feasp, mincx, and gevp constitute
the computational engine of the LMI Control Toolbox. Their high performance
is achieved through C-MEX implementation and by taking advantage of the
particular structure of each LMI.
The LMI Lab offers tools to
Specify LMI systems either symbolically with the LMI Editor or
incrementally with the lmivar and lmiterm commands
Retrieve information about existing systems of LMIs
Modify existing systems of LMIs
Solve the three generic LMI problems (feasibility problem, linear objective
minimization, and generalized eigenvalue minimization)
Validate results
This chapter gives a tutorial introduction to the LMI Lab as well as more
advanced tips for making the most out of its potential. The tutorial material is
also covered by the demo lmidem.
Some Terminology
Any linear matrix inequality can be expressed in the canonical form
L(x) = L0 + x1L1 + . . . + xNLN < 0
where
L0, L1, . . . , LN are given symmetric matrices
x = (x1, . . . , xN)T RN is the vector of scalar variables to be determined. We
refer to x1, . . . , xN as the decision variables. The names design variables
and optimization variables are also found in the literature.
9-2
Introduction
Even though this canonical expression is generic, LMIs rarely arise in this form
in control applications. Consider for instance the Lyapunov inequality
T
A X + XA < 0
(9-1)
x x
Here the decision variables are the free entries x1, x2, x3 of X and the canonical
form of this LMI reads
x1 2 2 + x2 0 3 + x3 0 0 < 0
2 0
3 4
0 4
(9-2)
Clearly this expression is less intuitive and transparent than (8-1). Moreover,
the number of matrices involved in (8-2) grows roughly as n2 /2 if n is the size
of the A matrix. Hence, the canonical form is very inefficient from a storage
viewpoint since it requires storing o(n2 /2) matrices of size n when the single
n-by-n matrix A would be sufficient. Finally, working with the canonical form
is also detrimental to the efficiency of the LMI solvers. For these various
reasons, the LMI Lab uses a structured representation of LMIs. For instance,
the expression ATX + XA in the Lyapunov inequality (8-1) is explicitly
described as a function of the matrix variable X, and only the A matrix is
stored.
In general, LMIs assume a block matrix form where each block is an affine
combination of the matrix variables. As a fairly typical illustration, consider
the following LMI drawn from H theory
T
T
A X + XA XC B
T
N
CX
I D
T
T
B
D I
N < 0
(9-3)
9-3
T
T
B
D I
is called the inner factor. The outer factor needs not be square and is often
absent.
X and are the matrix variables of the problem. Note that scalars are
considered as 1-by-1 matrices.
The inner factor L(X, ) is a symmetric block matrix, its block structure being
characterized by the sizes of its diagonal blocks. By symmetry, L(X, ) is
entirely specified by the blocks on or above the diagonal.
Each block of L(X, ) is an affine expression in the matrix variables X and .
This expression can be broken down into a sum of elementary terms. For
instance, the block (1,1) contains two elementary terms: ATX and XA.
Terms are either constant or variable. Constant terms are fixed matrices like
B and D above. Variable terms involve one of the matrix variables, like XA,
XCT, and I above.
The LMI (Equation (9-3)) is specified by the list of terms in each block, as is any
LMI regardless of its complexity.
As for the matrix variables X and , they are characterized by their dimensions
and structure. Common structures include rectangular unstructured,
symmetric, skew-symmetric, and scalar. More sophisticated structures are
sometimes encountered in control problems. For instance, the matrix variable
X could be constrained to the block-diagonal structure
x 0 0
1
X = 0 x2 x3
0 x x
3 4
9-4
Introduction
x x x
3 2 1
Summing up, structured LMI problems are specified by declaring the matrix
variables and describing the term content of each LMI. This term-oriented
description is systematic and accurately reflects the specific structure of the
LMI constraints. There is no built-in limitation on the number of LMIs that you
can specify or on the number of blocks and terms in any given LMI. LMI
systems of arbitrary complexity can therefore, be defined in the LMI Lab.
9-5
Information Retrieval
The interactive function lmiinfo answers qualitative queries about LMI
systems created with lmiedit or lmivar and lmiterm. You can also use
lmiedit to visualize the LMI system produced by a particular sequence of
lmivar/lmiterm commands.
Result Validation
The solution x* produced by the LMI solvers is easily validated with the
functions evallmi and showlmi. This allows a fast check and/or analysis of the
results. With evallmi, all variable terms in the LMI system are evaluated for
the value x* of the decision variables. The left- and right-hand sides of each
LMI then become constant matrices that can be displayed with showlmi.
9-6
This process creates the so-called internal representation of the LMI system.
This computer description of the problem is used by the LMI solvers and in all
subsequent manipulations of the LMI system. It is stored as a single vector
called LMISYS.
There are two ways of generating the internal description of a given LMI
system: (1) by a sequence of lmivar/lmiterm commands that build it
incrementally, or (2) via the LMI Editor lmiedit where LMIs can be specified
directly as symbolic matrix expressions. Though somewhat less flexible and
powerful than the command-based description, the LMI Editor is more
straightforward to use, hence particularly well-suited for beginners. Thanks to
9-7
A Simple Example
The following tutorial example is used to illustrate the specification of LMI
systems with the LMI Lab tools. Run the demo lmidem to see a complete
treatment of this example.
Example 8.1
Consider a stable transfer function
1
G ( s ) = C ( sI A ) B
(9-4)
with four inputs, four outputs, and six states, and consider the set of
input/output scaling matrices D with block-diagonal structure
D =
d 1 0 0 0
0 d 1 0 0
0 0 d 2 d 3
0 0 d 4 d 5
(9-5)
The following problem arises in the robust stability analysis of systems with
time-varying uncertainty [4]:
Find, if any, a scaling D of structure (Equation (9-5)) such that the largest
gain across frequency of D G(s) D1 is less than one.
This problem has a simple LMI formulation: there exists an adequate scaling
D if the following feasibility problem has solutions:
Find two symmetric matrices X R66 and S = DT D R44 such that
A T X + XA + C T SC XB
<0
T
B X
S
9-8
(9-6)
X>0
(9-7)
S>1
(9-8)
The LMI system (Equation (9-6), Equation (9-7), and Equation (9-8)) can be
described with the LMI Editor as outlined below. Alternatively, its internal
description can be generated with lmivar and lmiterm commands as follows:
setlmis([])
X=lmivar(1,[6 1])
S=lmivar(1,[2 0;2 1])
% 1st LMI
lmiterm([1
lmiterm([1
lmiterm([1
lmiterm([1
1
1
1
2
1
1
2
2
X],1,A,'s')
S],C',C)
X],1,B)
S], 1,1)
% 2nd LMI
lmiterm([ 2 1 1 X],1,1)
% 3rd LMI
lmiterm([ 3 1 1 S],1,1)
lmiterm([3 1 1 0],1)
LMISYS = getlmis
Here the lmivar commands define the two matrix variables X and S while the
lmiterm commands describe the various terms in each LMI. Upon completion,
getlmis returns the internal representation LMISYS of this LMI system. The
following subsections give more details on the syntax and usage of these
various commands:
Initializing the LMI System on page 9-10
Specifying the LMI Variables on page 9-10
Specifying Individual LMIs on page 9-13
More information on how the internal representation is updated by
lmivar/lmiterm can also be found in How It All Works on page 9-19.
9-9
9-10
the LMI Lab offers two predefined structure types along with the means to
describe more general structures:
Type 1
...
... ...
D 0 0
1
0 D
2
X =
0 0 Dr
where each diagonal block Dj is square and is either zero, a full
symmetric matrix, or a scalar matrix
Dj = d I, d R
This type encompasses ordinary symmetric matrices (single block)
and scalar variables (one block of size one).
Type 2
Type 3
In Example 8.1 on page 9-8, the matrix variables X and S are of Type 1.
Indeed, both are symmetric and S inherits the block-diagonal structure (8-5) of
D. Specifically, S is of the form
9-11
S =
s 1 0 0 0
0 s 1 0 0
0 0 s 2 s 3
0 0 s 3 s 4
After initializing the description with the command setlmis([]), these two
matrix variables are declared by
lmivar(1,[6 1]) % X
lmivar(1,[2 0;2 1]) % S
In both commands, the first input specifies the structure type and the second
input contains additional information about the structure of the variable:
For a matrix variable X of Type 1, this second input is a matrix with two
columns and as many rows as diagonal blocks in X. The first column lists the
sizes of the diagonal blocks and the second column specifies their nature with
the following convention:
1 full symmetric block
0 scalar block
1 zero block
In the second command, for instance, [2 0;2 1] means that S has two
diagonal blocks, the first one being a 2-by-2 scalar block and the second one
a 22 full block.
For matrix variables of Type 2, the second input of lmivar is a two-entry
vector listing the row and column dimensions of the variable. For instance, a
3-by-5 rectangular matrix variable would be defined by
lmivar(2,[3 5])
For convenience, lmivar also returns a tag that identifies the matrix variable
for subsequent reference. For instance, X and S in Example 8.1 could be
defined by
X = lmivar(1,[6 1])
S = lmivar(1,[2 0;2 1])
9-12
Important: Specify only the terms in the blocks on or above the diagonal. The
inner factors being symmetric, this is sufficient to specify the entire LMI.
Specifying all blocks results in the duplication of off-diagonal terms, hence in
the creation of a different LMI. Alternatively, you can describe the blocks on or
below the diagonal.
LMI terms are specified one at a time with lmiterm. For instance, the LMI
A T X + XA + C T SC XB
<0
T
B X
S
is described by
lmiterm([1 1 1 1],1,A,'s')
9-13
lmiterm([1 1 1 2],C',C)
lmiterm([1 1 2 1],1,B)
lmiterm([1 2 2 2], 1,1)
These commands successively declare the terms ATX + XA, CTSC, XB, and S.
In each command, the first argument is a four-entry vector listing the term
characteristics as follows:
The first entry indicates to which LMI the term belongs. The value m means
left-hand side of the m-th LMI, and m means right-hand side of the m-th
LMI.
The second and third entries identify the block to which the term belongs.
For instance, the vector [1 1 2 1] indicates that the term is attached to the
(1, 2) block.
The last entry indicates which matrix variable is involved in the term. This
entry is 0 for constant terms, k for terms involving the k-th matrix variable
T
Xk, and k for terms involving X k (here X and S are first and second
variables in the order of declaration).
Finally, the second and third arguments of lmiterm contain the numerical data
(values of the constant term, outer factor, or matrix coefficients P and Q for
variable terms PXQ or PXTQ). These arguments must refer to existing
MATLAB variables and be real-valued. See Complex-Valued LMIs on
page 9-34 for the specification of LMIs with complex-valued coefficients.
Some shorthand is provided to simplify term specification. First, blocks are
zero by default. Second, in diagonal blocks the extra argument 's' allows you
to specify the conjugated expression AXB + BTXTAT with a single lmiterm
command. For instance, the first command specifies ATX + XA as the
symmetrization of XA. Finally, scalar values are allowed as shorthand for
scalar matrices, i.e., matrices of the form I with scalar. Thus, a constant
term of the form I can be specified as the scalar . This also applies to the
coefficients P and Q of variable terms. The dimensions of scalar matrices are
inferred from the context and set to 1 by default. For instance, the third LMI S
> I in Example 8.3 on page 9-32 is described by
lmiterm([ 3 1 1 2],1,1)
lmiterm([3 1 1 0],1)
% 1*S*1 = S
% 1*I = I
9-14
1
1
1
2
1
1
2
2
X],1,A,'s')
S],C',C)
X],1,B)
S], 1,1)
Xpos = newlmi
lmiterm([-Xpos 1 1 X],1,1)
Slmi = newlmi
lmiterm([-Slmi 1 1 S],1,1)
lmiterm([Slmi 1 1 0],1)
This returns the internal representation LMISYS of this LMI system. This
MATLAB description of the problem can be forwarded to other LMI-Lab
functions for subsequent processing. The command getlmis must be used only
once and after declaring all matrix variables and LMI terms.
Here the identifiers X and S point to the variables X and S while the tags BRL,
Xpos, and Slmi point to the first, second, and third LMI, respectively. Note that
Xpos refers to the right-hand side of the second LMI. Similarly, X would
indicate transposition of the variable X.
9-15
calls up a window with several editable text areas and various buttons.
Read a sequence of
lmivar/lmiterm
9-16
A X + XA XB < 0
I
B X
is entered by typing
[a'*x+x*a x*b; b'*x
1] < 0
if x is the name given to the matrix variable X in the upper half of the
worksheet. The left- and right-hand sides of the LMIs should be valid
MATLAB expressions.
Once the LMI system is fully specified, the following tasks can be performed by
clicking the corresponding button:
Visualize the sequence of lmivar/lmiterm commands needed to describe this
LMI system (view commands button). Conversely, the LMI system defined by
a particular sequence of lmivar/lmiterm commands can be displayed as a
MATLAB expression by clicking on the describe... buttons.
Beginners can use this facility as a tutorial introduction to the lmivar and
lmiterm commands.
Save the symbolic description of the LMI system as a MATLAB string (save
button). This description can be reloaded later on by clicking the load button.
Read a sequence of lmivar/lmiterm commands from a file (read button). You
can then click on describe the matrix variables or describe the LMIs to
visualize the symbolic expression of the LMI system specified by these
commands. The file should describe a single LMI system but may otherwise
contain any sequence of MATLAB commands.
This feature is useful for code validation and debugging.
Write in a file the sequence of lmivar/lmiterm commands needed to describe
a particular LMI system (write button).
This is helpful to develop code and prototype MATLAB functions based on
the LMI Lab.
9-17
Keyboard Shortcuts
As with lmiterm, you can use various shortcuts when entering LMI expressions
at the keyboard. For instance, zero blocks can be entered simply as 0 and need
not be dimensioned. Similarly, the identity matrix can be entered as 1 without
dimensioning. Finally, upper diagonal LMI blocks need not be fully specified.
Rather, you can just type (*) in place of each such block.
Limitations
Though fairly general, lmiedit is not as flexible as lmiterm and the following
limitations should be kept in mind:
Parentheses cannot be used around matrix variables. For instance, the
expression
(a*x+b)'*c + c'*(a*x+b)
9-18
9-19
lmiinfo
lmiinfo is an interactive facility to retrieve qualitative information about LMI
systems. This includes the number of LMIs, the number of matrix variables
and their structure, the term content of each LMI block, etc. To invoke lmiinfo,
enter
lmiinfo(LMISYS)
9-20
LMI Solvers
LMI Solvers
LMI solvers are provided for the following three generic optimization problems
(here x denotes the vector of decision variables, i.e., of the free entries of the
matrix variables X1, . . . , XK):
Feasibility problem
Find x RN (or equivalently matrices X1, . . . , XK with prescribed structure)
that satisfies the LMI system
A(x) < B(x)
The corresponding solver is called feasp.
Minimization of a linear objective under LMI constraints
Minimize cTx over x RN subject to A(x) < B(x)
The corresponding solver is called mincx.
Generalized eigenvalue minimization problem
Minimize over x RN subject to
C(x) < D(x)
0 < B(x)
A(x) < B(x).
The corresponding solver is called gevp.
Note that A(x) < B(x) above is a shorthand notation for general structured LMI
systems with decision variables x = (x1, . . . , xN).
The three LMI solvers feasp, mincx, and gevp take as input the internal
representation LMISYS of an LMI system and return a feasible or optimizing
value x* of the decision variables. The corresponding values of the matrix
variables X1, . . . , XK are derived from x* with the function dec2mat. These
solvers are C-MEX implementations of the polynomial-time Projective
Algorithm Projective Algorithm of Nesterov and Nemirovski [3], [2].
For generalized eigenvalue minimization problems, it is necessary to
distinguish between the standard LMI constraints C(x) < D(x) and the
linear-fractional LMIs
A(x) < B(x)
9-21
Example 8.2
Consider the optimization problem
Minimize Trace(X) subject to
T
A X + XA + XBB X + Q < 0
(9-9)
with data
1 2 1
1
1 1 0
A = 3 2 1 ; B = 0 ; Q = 1 3 12
1 2 1
1
0 12 36
It can be shown that the minimizer X* is simply the stabilizing solution of the
algebraic Riccati equation
ATX + XA + XBBTX + Q = 0
This solution can be computed directly with the Riccati solver care and
compared to the minimizer returned by mincx.
From an LMI optimization standpoint, problem [9-9] is equivalent to the
following linear objective minimization problem:
9-22
LMI Solvers
B X
I
(9-10)
Since Trace(X) is a linear function of the entries of X, this problem falls within
the scope of the mincx solver and can be numerically solved as follows:
1 Define the LMI constraint [9-9] by the sequence of commands
setlmis([])
X = lmivar(1,[3 1]) % variable X, full symmetric
lmiterm([1
lmiterm([1
lmiterm([1
lmiterm([1
1
1
2
2
1
1
2
1
X],1,a,'s')
0],q)
0],-1)
X],b',1)
LMIs = getlmis
2 Write the objective Trace(X) as cTx where x is the vector of free entries of X.
Note that the function defcx provides a more systematic way of specifying
such objectives (see Specifying cTx Objectives for mincx on page 9-37 for
details).
3 Call mincx to compute the minimizer xopt and the global minimum
9-23
8.511476
13.063640
***
4
***
5
***
6
***
7
***
8
***
9
***
10
***
11
***
12
***
13
***
14
***
15
9-24
34.023978
15.768450
new lower bound:
25.005604
17.123012
new lower bound:
21.306781
17.882558
new lower bound:
19.819471
18-339853
new lower bound:
19.189417
18.552558
new lower bound:
18.919668
18.646811
new lower bound:
18.803708
18.687324
new lower bound:
18.753903
18.705715
new lower bound:
18.732574
18.712175
new lower bound:
18.723491
18.714880
new lower bound:
18.719624
18.716094
new lower bound:
18.716509
18.717986
LMI Solvers
***
16
18.717297
18.716695
***
18.716873
The iteration number and the best value of cTx at the current iteration
appear in the left and right columns, respectively. Note that no value is
displayed at the first iteration, which means that a feasible x satisfying the
constraint [9-10] was found only at the second iteration. Lower bounds on
the global minimum of cTx are sometimes detected as the optimization
progresses. These lower bounds are reported by the message
*** new lower bound: xxx
Upon termination, mincx reports that the global minimum for the objective
Trace(X) is 18.716695 with relative accuracy of at least 9.5-by-106. This is
the value copt returned by mincx.
4 mincx also returns the optimizing vector of decision variables xopt. The
which returns
6.3542 5.8895 2.2046
9-25
ans =
6.5390e 05
9-26
An error is issued if the number of arguments following LMISYS differs from the
number of matrix variables in the problem (see matnbr).
Conversely, given a value xdec of the vector of decision variables, the
corresponding value of the k-th matrix is given by dec2mat. For instance, the
value X2 of the second matrix variable is extracted from xdec by
X2 = dec2mat(LMISYS,xdec,2)
The last argument indicates that the second matrix variable is requested. It
could be set to the matrix variable identifier returned by lmivar.
The total numbers of matrix variables and decision variables are returned by
matnbr and decnbr, respectively. In addition, the function decinfo provides
precise information about the mapping between decision variables and matrix
variable entries (see the function reference pages).
9-27
Validating Results
The LMI Lab offers two functions to analyze and validate the results of an LMI
optimization. The function evallmi evaluates all variable terms in an LMI
system for a given value of the vector of decision variables, for instance, the
feasible or optimal vector returned by the LMI solvers. Once this evaluation is
performed, the left- and right-hand sides of a particular LMI are returned by
showlmi.
In the LMI problem considered in Example 8.2 on page 9-22, you can verify
that the minimizer xopt returned by mincx satisfies the LMI constraint [9-10]
as follows:
evlmi = evallmi(LMIs,xopt)
[lhs,rhs] = showlmi(evlmi,1)
The first command evaluates the system for the value xopt of the decision
variables, and the second command returns the left- and right-hand sides of
the first (and only) LMI. The negative definiteness of this LMI is checked by
eig(lhs-rhs)
ans =
2.0387e 04
3.9333e 05
1.8917e 07
4.6680e+01
9-28
Deleting an LMI
The first possibility is to remove an entire LMI from the system with dellmi.
For instance, suppose that the LMI system of Example 8.1 on page 9-8 is
described in LMISYS and that we want to remove the positivity constraint on X.
This is done by
NEWSYS = dellmi(LMISYS,2)
where the second argument specifies deletion of the second LMI. The resulting
system of two LMIs is returned in NEWSYS.
The LMI identifiers (initial ranking of the LMI in the LMI system) are not
altered by deletions. As a result, the last LMI
S>I
remains known as the third LMI even though it now ranks second in the
modified system. To avoid confusion, it is safer to refer to LMIs via the
identifiers returned by newlmi. If BRL, Xpos, and Slmi are the identifiers
attached to the three LMIs [9-6][9-8], Slmi keeps pointing to S > I even after
deleting the second LMI by
NEWSYS = dellmi(LMISYS,Xpos)
9-29
lmiterm([1 1 1 X],1,A,'s')
lmiterm([1 1 1 W],B,1,'s')
lmiterm([1 1 1 0],1)
LMISYS = getlmis
The second argument is the variable identifier S, and the third argument is the
value to which S should be set. Here the value 2 is shorthand for 2byI. The
resulting system NEWSYS reads
9-30
A T X + XA + 2C T C XB
<0
T
2I
B X
X>0
2I > I
Note that the last LMI is now free of variable and trivially satisfied. It could,
therefore, be deleted by
NEWSYS = dellmi(NEWSYS,3)
or
NEWSYS = dellmi(NEWSYS,Slmi)
9-31
Advanced Topics
This last section gives a few hints for making the most out of the LMI Lab. It
is directed toward users who are comfortable with the basics described above.
Example 8.3
Suppose that the problem variables include a 3-by-3 symmetric matrix X and
a 3-by-3 symmetric Toeplitz matrix
y y y
1 2 3
Y = y2 y1 y2
y y y
3 2 1
The variable Y has three independent entries, hence involves three decision
variables. Since Y is independent of X, these decision variables should be
labeled n + 1, n + 2, n + 3 where n is the number of decision variables involved
in X. To retrieve this number, define the variable X (Type 1) by
setlmis([])
[X,n] = lmivar(1,[3 1])
The second output argument n gives the total number of decision variables
used so far (here n = 6). Given this number, Y can be defined by
Y = lmivar(3,n+[1 2 3;2 1 2;3 2 1])
9-32
Advanced Topics
or equivalently by
Y = lmivar(3,toeplitz(n+[1 2 3]))
2
3
5
4
5
6
decinfo(lmis,Y)
ans =
7
8
9
8
7
8
9
8
7
Example 8.4
Consider three matrix variables X, Y, Z with structure
X = x 0 ,
0 y
Y = z 0 ,
0 t
Z = 0 x
t 0
The third output of lmivar gives the entry-wise dependence of X and Y on the
decision variables (x1, x2, x3, x4) := (x, y, z, t):
sX =
1
0
0
2
9-33
sY =
3
0
0
4
Using Type 3 of lmivar, you can now specify the structure of Z in terms of the
decision variables x1 = x and x4 = t:
[Z,n,sZ] = lmivar(3,[0
sX(1,1);sY(2,2) 0])
Since sX(1,1) refers to x1 while sY(2,2) refers to x4, this defines the variable
0 x
1
Z =
= 0 x
x 0
t 0
4
1
4
Complex-Valued LMIs
The LMI solvers are written for real-valued matrices and cannot directly
handle LMI problems involving complex-valued matrices. However,
complex-valued LMIs can be turned into real-valued LMIs by observing that a
complex Hermitian matrix L(x) satisfies
L(x) < 0
if and only if
Re ( L ( x ) ) Im ( L ( x ) )
<0
Im ( L ( x ) ) Re ( L ( x ) )
This suggests the following systematic procedure for turning complex LMIs
into real ones:
Decompose every complex matrix variable X as
9-34
Advanced Topics
X = X1 + jX2
where X1 and X2 are real
Decompose every complex matrix coefficient A as
A = A1 + jA2
where A1 and A2 are real
Carry out all complex matrix products. This yields affine expressions in X1,
X2 for the real and imaginary parts of each LMI, and an equivalent
real-valued LMI is readily derived from the above observation.
For LMIs without outer factor, a streamlined version of this procedure consists
of replacing any occurrence of the matrix variable X = X1 + jX2 by
X
1
X 2
X 1
A A
2 1
M XM < X,
X = X >I
(9-11)
reads (given the decompositions M = M1 + jM2 and X = X1 + jX2 with Mj, Xj real):
T
M M X X M M X X
1
2
1
2
1
2
1
2
<
M M X X M M X X
2
1
2 1
2
1
2 1
X X
1
2
X X < I
2 1
9-35
Assuming, for instance, that M C55, the LMI system [9-11] would be
specified as follows:
M1=real(M), M2=imag(M)
bigM=[M1 M2;-M2 M1]
setlmis([])
% declare bigX=[X1 X2;-X2 X1] with X1=X1' and X2+X2'=0:
[X1,n1,sX1] = lmivar(1,[5 1])
[X2,n2,sX2] = lmivar(3,skewdec(5,n1))
bigX = lmivar(3,[sX1 sX2;-sX2 sX1])
% describe the real counterpart of (1.12):
lmiterm([1 1 1 0],1)
lmiterm([ 1 1 1 bigX],1,1)
lmiterm([2 1 1 bigX],bigM',bigM)
lmiterm([ 2 1 1 bigX],1,1)
lmis = getlmis
X
X
2 1
X2 .
9-36
Advanced Topics
See Structured Matrix Variables on page 9-32 for more details on such
structure manipulations.
Trace(X) + x 0 Px0
where X and P are two symmetric variables and x0 is a given vector. If lmisys
is the internal representation of the LMI system and if x0, X, P have been
declared by
x0 = [1;1]
setlmis([])
X = lmivar(1,[3 0])
P = lmivar(1,[2 1])
:
:
lmisys = getlmis
T
the c vector such that cTx = Trace(X) + x 0 Px0 can be computed as follows:
n = decnbr(lmisys)
c = zeros(n,1)
for j=1:n,
[Xj,Pj] = defcx(lmisys,j,X,P)
c(j) = trace(Xj) + x0'*Pj*x0
end
The first command returns the number of decision variables in the problem and
the second command dimensions c accordingly. Then the for loop performs the
following operations:
9-37
1 Evaluate the matrix variables X and P when all entries of the decision vector
x are set to zero except xj:= 1. This operation is performed by the function
defcx. Apart from lmisys and j, the inputs of defcx are the identifiers X and
P of the variables involved in the objective, and the outputs Xj and Pj are the
corresponding values.
2 Evaluate the objective expression for X:= Xj and P:= Pj. This yields the j-th
entry of c by definition.
In our example the result is
c =
3
1
2
1
Feasibility Radius
When solving LMI problems with feasp, mincx, or gevp, it is possible to
constrain the solution x to lie in the ball
xTx < R2
where R > 0 is called the feasibility radius. This specifies a maximum
(Euclidean norm) magnitude for x and avoids getting solutions of very large
norm. This may also speed up computations and improve numerical stability.
Finally, the feasibility radius bound regularizes problems with redundant
variable sets. In rough terms, the set of scalar variables is redundant when an
equivalent problem could be formulated with a smaller number of variables.
9-38
Advanced Topics
The feasibility radius R is set by the third entry of the options vector of the LMI
solvers. Its default value is R = 109. Setting R to a negative value means no
rigid bound, in which case the feasibility radius is increased during the
optimization if necessary. This flexible bound mode may yield solutions of
large norms.
Well-Posedness Issues
The LMI solvers used in the LMI Lab are based on interior-point optimization
techniques. To compute feasible solutions, such techniques require that the
system of LMI constraints be strictly feasible, that is, the feasible set has a
nonempty interior. As a result, these solvers may encounter difficulty when the
LMI constraints are feasible but not strictly feasible, that is, when the LMI
L(x) 0
has solutions while
L(x) < 0
has no solution.
For feasibility problems, this difficulty is automatically circumvented by
feasp, which reformulates the problem
(9-12)
(9-13)
as
9-39
P>0
(9-14)
0 0
cannot be directly solved with gevp. A simple remedy consists of replacing the
constraints
A(x) < B(x),
B(x) > 0
by
A(x) < Y 0 ,
0 0
Y < B 1 ( x ),
B1 ( x ) > 0
9-40
Advanced Topics
(9-15)
This is no longer true, however, when the number of variable terms is nearly
equal to or greater than the number N of decision variables in the problem. If
your LMI problem has few free scalar variables but many terms in each LMI,
it is therefore preferable to rewrite it as (9-15) and to specify it in this form.
Each scalar variable xj is then declared independently and the LMI terms are
of the form xjAj.
If M denotes the total row size of the LMI system and N the total number of
scalar decision variables, the flop count per iteration for the feasp and mincx
solvers is proportional to
N3 when the least-squares problem is solved via. Cholesly factorization of the
Hessian matrix (default) [2]
M-by-N2 when numerical instabilities warrant the use of QR factorization
instead
While the theory guarantees a worst-case iteration count proportional to M, the
number of iterations actually performed grows slowly with M in most
problems. Finally, while feasp and mincx are comparable in complexity, gevp
typically demands more computational effort. Make sure that your LMI
problem cannot be solved with mincx before using gevp.
9-41
M + P XQ + Q X P < 0
where M, P, Q are given matrices and X is an unstructured m-by-n matrix
variable.
It turns out that a particular solution Xc of (9-16) can be computed via simple
linear algebra manipulations [1]. Typically, Xc corresponds to the center of the
ellipsoid of matrices defined by Equation ().
The function basiclmi returns the explicit solution Xc:
Xc = basiclmi(M,P,Q)
Since this central solution sometimes has large norm, basiclmi also offers the
option of computing an approximate least-norm solution of Equation (). This is
done by
X = basiclmi(M,P,Q,'Xmin')
9-42
References
References
[1] Gahinet, P., and P. Apkarian, A Linear Matrix Inequality Approach to H
Control, Int. J. Robust and Nonlinear Contr., 4 (1994), pp. 421-448.
[2] Nemirovski, A., and P. Gahinet, The Projective Method for Solving Linear
Matrix Inequalities, Proc. Amer. Contr. Conf., 1994, pp. 840-844.
[3] Nesterov, Yu, and A. Nemirovski, Interior Point Polynomial Methods in
Convex Programming: Theory and Applications, SIAM Books, Philadelphia,
1994.
[4] Shamma, J.S., Robustness Analysis for Time-Varying Systems, Proc.
Conf. Dec. Contr., 1992, pp. 3163-3168.
9-43
9-44
10
Function Reference
10
Function Reference
Functions By Category
Uncertain Elements on
page 10-4
Manipulation of Uncertain
Models on page 10-4
Interconnection of Uncertain
Models on page 10-6
10-2
Controller Synthesis on
page 10-8
Sampled-Data Systems on
page 10-10
Gain Scheduling on
page 10-10
Frequency-Response Data
(FRD) Models on page 10-10
Functions By Category
Supporting Utilities on
page 10-12
10-3
10
Function Reference
Uncertain Elements
ucomplex
ucomplexm
udyn
ultidyn
ureal
randatom
randumat
randuss
ufrd
umat
uss
10-4
actual2normalized
gridureal
isuncertain
lftdata
Functions By Category
normalized2actual
repmat
simplify
squeeze
usample
usubs
uss/ssbal
10-5
10
Function Reference
icsignal
imp2exp
stack
sysic
10-6
balancmr
bstmr
hankelmr
hankelsv
imp2ss
modreal
ncfmr
reduce
schurmr
slowfast
stabproj
Functions By Category
gapmetric
loopmargin
loopsens
mussv
mussvextract
ncfmargin
popov
robopt
robustperf
robuststab
wcgain
wcgopt
wcmargin
wcnorm
wcsens
10-7
10
Function Reference
decay
ispsys
pdlstab
pdsimul
polydec
psinfo
psys
pvec
pvinfo
quadperf
quadstab
Controller Synthesis
10-8
augw
h2hinfsyn
Functions By Category
h2syn
hinfsyn
loopsyn
ltrsyn
mkfilter
mixsyn
ncfsyn
10-9
10
Function Reference
-Synthesis
cmsclsyn
dksyn
dkitopt
drawmag
fitfrd
fitmagfrd
genphase
Sampled-Data Systems
sdhinfnorm
sdhinfsyn
sdlsim
Gain Scheduling
hinfgs
10-10
frd/loglog
frd/semilogx
frd/semilogy
frd/rcond
Functions By Category
frd/schur
frd/svd
10-11
10
Function Reference
Supporting Utilities
bilin
dmplot
mktito
sectf
skewdec
symdec
LMIs
LMI Systems on page 10-12
LMI Characteristics on
page 10-14
Validation of Results on
page 10-14
Modification of Systems of
LMIs on page 10-14
LMI Systems
10-12
getlmis
lmiedit
lmiterm
lmivar
Functions By Category
newlmi
setlmis
10-13
10
Function Reference
LMI Characteristics
dec2mat
decinfo
decnbr
lmiinfo
lminbr
mat2dec
matnbr
LMI Solvers
defcx
feasp
gevp
mincx
Validation of Results
evallmi
showlmi
10-14
dellmi
delmvar
setmvar
10
The following pages comprise the function reference pages. The functions are
listed alphabetically.
10-15
actual2normalized
Purpose
10actual2normalized
Calculate normalized distance between nominal value and given value for
uncertain atom
Syntax
ndist = actual2normalized(A,V)
Description
Examples
For uncertain real parameters whose range is symmetric about their nominal
value, the normalized distance is intuitive.
Create uncertain real parameters with a range that is symmetric about the
nominal value, where each end point is 1 unit from the nominal. Points that lie
inside the range are less than 1 unit from the nominal, while points that lie
outside the range are greater than 1 unit from the nominal.
a = ureal('a',3,'range',[1 5]);
actual2normalized(a,[1 3 5])
ans =
-1.0000
-0.0000
1.0000
actual2normalized(a,[2 4])
ans =
-0.5000
0.5000
actual2normalized(a,[0 6])
ans =
-1.5000
1.5000
Plot the normalized distance for several values. Note that the relationship
between a normalized distance and a numerical difference is linear.
values = linspace(-3,9,250);
ndist = actual2normalized(a,values);
plot(values,ndist)
10-16
actual2normalized
3
4
2
Values
Next, create an asymmetric parameter, where each endpoint is 1 unit from the
nominal. Points that lie inside the range are less than 1 unit from the nominal,
while points that lie outside the range are greater than 1 unit from the
nominal.
au = ureal('a',4,'range',[1 5]);
actual2normalized(a,[1 4 5])
ans =
-1.0000
0.5000
1.0000
actual2normalized(a,[2 4.5])
ans =
-0.5000
0.7500
actual2normalized(a,[0 6])
ans =
-1.5000
1.5000
Plot the normalized distance for several values. Note that the relationship
between normalized distance and numerical difference is nonlinear.
ndistu = actual2normalized(au,values);
10-17
actual2normalized
plot(values,ndistu)
xlim([-4 10])
ylim([0 4])
2
3
4
4
2
Values
See Also
10-18
robuststab
robustperf
aff2pol
Purpose
10aff2pol
Syntax
polsys = aff2pol(affsys)
Description
parameter-dependent system
E ( p )x = A ( p )x + B ( p )u
(10-1)
y = C ( p )x + D ( p )u
(10-2)
D ( p ex )
C ( p ex )
for all corners pex of the parameter box or all vertices pex of the polytope of
parameter values.
See Also
psys
pvec
uss
10-19
augw
Purpose
10augw
Syntax
P = AUGW(G,W1,W2,W3)
Description
plant P(s) with weighting functions W1(s), W2(s), and W3(s) penalizing the error
signal, control signal and output signal respectively (see block diagram) so that
the closed-loop transfer function matrix is the weighted mixed sensitivity
W 1S
Ty u = W2 R
1 1
W3 T
where S, R and T are given by
S = ( I + GK )
R = K ( I + GK )
T = GK ( I + GK )
The LTI systems S and T are called the sensitivity and complementary
sensitivity, respectively.
10-20
augw
W1
W2
+
u
1
u
W3
2
y
2
CONTROLLER
F(s)
K(s)
For dimensional compatibility, each of the three weights W1, W2 and W3 must
be either empty, a scalar (SISO) or have respective input dimensions NY, NU,
and NY where G is NY-by-NU. If one of the weights is not needed, you may
simply assign an empty matrix [ ]; e.g., P = AUGW(G,W1,[],W3) is P(s) as in
Algorithm, but without the second row (without the row containing W2).
Algorithm
P(s) =
W1
W1G
W2
W3G
Examples
s=zpk('s'); G=(s-1)/(s+1);
W1=0.1*(s+100)/(100*s+1); W2=0.1; W3=[];
10-21
augw
P=augw(G,W1,W2,W3);
[K,CL,GAM]=hinfsyn(P); [K2,CL2,GAM2]=h2syn(P);
L=G*K; S=inv(1+L); T=1-S;
sigma(S,'k',GAM/W1,'k-.',T,'r',GAM*G/W2,'r-.')
legend('S = 1/(1+L)','GAM/W1', 'T=L/(1+L)','GAM*G/W2',2)
Singular Values
60
40
S = 1/(1+L)
GAM/W1
T=L/(1+L)
GAM*G/W2
20
20
40
60
80
4
10
10
10
10
Frequency (rad/sec)
10
10
Limitations
See Also
h2syn
hinfsyn
mixsyn
mktito
10-22
H2 controller synthesis
H controller synthesis
H mixed-sensitivity controller synthesis
Partition LTI system via Input and Output Groups
balancmr
Purpose
10balancmr
Syntax
GRED = balancmr(G)
GRED = balancmr(G,order)
[GRED,redinfo] = balancmr(G,key1,value1,...)
[GRED,redinfo] = balancmr(G,order,key1,value1,...)
Description
balancmr returns a reduced order model GRED of G and a struct array redinfo
containing the error bound of the reduced model and Hankel singular values of
the original system.
The error bound is computed based onHankel singular values of G. For a stable
system these values indicate the respective state energy of the system. Hence,
reduced order can be directly determined by examining the system Hankel
SVs, .
With only one input argument G, the function will show a Hankel singular
value plot of the original model and prompt for model order number to reduce.
This method guarantees an error bound on the infinity norm of the additive
error || G-GRED || for well-conditioned model reduced problems [1]:
n
G Gred 2
i
k+1
Description
ORDER
10-23
balancmr
anti-stable part of a system is kept, because from control stability point of view,
getting rid of unstable state(s) is dangerous to model a system.
'MaxError' can be specified in the same fashion as an alternative for 'Order'.
In this case, reduced order will be determined when the sum of the tails of the
Hankel SV's reaches the 'MaxError'.
This table lists the input arguments 'key' and its 'value'.
Argument
Value
Description
'MaxError'
Real number or
vector of
different errors
'Weights'
{Wout,Win} cell
array
'Display'
'on' or 'off'
'Order'
Integer, vector
or cell array
Weights on the original model input and/or output can make the model
reduction algorithm focus on some frequency range of interests. But weights
have to be stable, minimum phase and invertible.
10-24
balancmr
Description
GRED
REDINFO
Algorithm
Given a state-space (A,B,C,D) of a system and k, the desired reduced order, the
following steps will produce a similarity transformation to truncate the
original state-space system to the kth order reduced model.
1 Find the SVD of the controllability and observability grammians
P = Up p VpT
Q = U q q V qT
2 Find the square root of the grammians (left/right eigenvectors)
Lp = Up p1/2
Lo = Uq q1/2
3 Find the SVD of (LoTLp)
Lo T Lp = U V T
4 Then the left and right transformation for the final kth order reduced model
is
SL,BIG = Lo U(:,1:k) (1;k,1:k))-1/2
SR,BIG = Lp V(:,1:k) (1;k,1:k))-1/2
5 Finally,
10-25
balancmr
The proof of the square root balance truncation algorithm can be found in [2].
Examples
References
See Also
reduce
schurmr
hankelmr
bstmr
ncfmr
hankelsv
10-26
bilin
Purpose
10bilin
Syntax
GT = bilin(G,VERS,METHOD,AUG)
Description
z +
s = ---------------z +
The variable VERS denotes the transformation direction:
VERS= 1, forward transform ( s z ) or ( s s ) .
VERS=-1, reverse transform ( z s ) or ( s s ) .
This transformation maps lines and circles to circles and lines in the complex
plane. People often use this transformation to do sampled-data control system
design [1] or, in general, to do shifting of j modes [2], [3], [4].
Bilin computes several state-space bilinear transformations such as backward
rectangular, etc., based on the METHOD you select.
Bilinear transform types
Method
'BwdRec'
Backward rectangular:
z1
s = -----------Tz
AUG = T, the sampling period.
'FwdRec'
Forward rectangular:
z1
s = -----------T
AUG = T, the sampling period.
10-27
bilin
'S_Tust'
Shifted Tustin:
2 z1
s = ---- -------------
T --z- + 1
h
AUG = [T h], is the shift coefficient.
'S_ftjw'
'G_Bilin'
to continuous-time:
s +
s = ---------------s +
AUG = [ ]
Examples
10-28
% ANALOG
bilin
[syst] = c2d(sys,Ts,'tustin');
% Tustin
[sysp] = c2d(sys,Ts,'prewarp',40);
% Pre-warped Tustin
[sysb] = bilin(sys,1,'BwdRec',Ts);
% Backward Rectangular
[sysf] = bilin(sys,1,'FwdRec',Ts);
% Forward Rectangular
w = logspace(-2,3,50); % frequencies to plot
sigma(sys,syst,sysp,sysb,sysf,w);
10-29
bilin
As shown in Figure 10-3, 'S_ftjw' final closed-loop poles are inside the left
[p1,p2] circle, on page 10-30, closed-loop poles are placed in the left circle [p1
p2]. The shifted plant, which has its non-stable poles shifted to the inside the
right circle, is
4
5
( s 12 )
G t ( s ) = 4.765 10 ---------------------------------------------------------------------------2 2
( s 2 ) ( s 4.274s + 5.918 )
10
8
6
4
2
0
p2
p1
p1
p2
2
4
6
8
10
15
10
5
0
5
(p1 = 2, p2 = 12)
10
15
Figure 10-3: 'S_ftjw' final closed-loop poles are inside the left [p1,p2] circle
Algorithm
10-30
( ) ( I A ) B
----------------------------------------------------------1
D + C ( I A ) B
bilin
References
[1] Franklin, G.F., and J.D. Powell, Digital Control of Dynamics System,
Addison-Wesley, 1980.
[2] Safonov, M.G., R.Y. Chiang, and H. Flashner, H Control Synthesis for a
Large Space Structure, AIAA J. Guidance, Control and Dynamics, 14, 3, p.
513-520, May/June 1991.
[3] Safonov, M.G., Imaginary-Axis Zeros in Multivariable H Optimal
Control, in R.F. Curtain (editor), Modelling, Robustness and Sensitivity
Reduction in Control Systems, p. 71-81, Springer-Varlet, Berlin, 1987.
[4] Chiang, R.Y., and M.G. Safonov, H Synthesis using a Bilinear Pole
Shifting Transform, AIAA, J. Guidance, Control and Dynamics, vol. 15, no. 5,
p. 1111-1117, September-October 1992.
See Also
c2d
d2c
sectf
10-31
bstmr
Purpose
10bstmr
Syntax
GRED = bstmr(G)
GRED = bstmr(G,order)
[GRED,redinfo] = bstmr(G,key1,value1,...)
[GRED,redinfo] = bstmr(G,order,key1,value1,...)
Description
bstmr returns a reduced order model GRED of G and a struct array redinfo
containing the error bound of the reduced model and Hankel singular values of
the phase matrix of the original system [2].
The error bound is computed based on Hankel singular values of the phase
matrix of G. For a stable system these values indicate the respective state
energy of the system. Hence, reduced order can be directly determined by
examining these values.
With only one input argument G, the function will show a Hankel singular
value plot of the phase matrix of G and prompt for model order number to
reduce.
This method guarantees an error bound on the infinity norm of the
multiplicative || GRED-1(G-GRED) || or relative error || G-1(G-GRED) || for
well-conditioned model reduction problems [1]:
n
1
G ( G Gred )
( 1 + 2i (
1 + i2 + i ) ) 1
k+1
Description
ORDER
10-32
bstmr
part of a system is kept, because from control stability point of view, getting rid
of unstable state(s) is dangerous to model a system.
'MaxError' can be specified in the same fashion as an alternative for 'ORDER'.
In this case, reduced order will be determined when the accumulated product
of Hankel SVs shown in the above equation reaches the 'MaxError'.
Argument
Value
Description
'MaxError'
Real number or
vector of
different errors
'Display'
'on' or 'off'
'Order'
Integer, vector
or cell array
Description
GRED
REDINFO
Algorithm
Given a state-space (A,B,C,D) of a system and k, the desired reduced order, the
following steps will produce a similarity transformation to truncate the
original state-space system to the kth order reduced model:
10-33
bstmr
order, respectively,
T
V A PQV A
T
V D PQV D
1
=
0
0 0 n
n
0
0 0 1
3 Find the left/right orthonormal eigen-bases of PQ associated with the kth big
k
V A = [V R, SMALL, V L, BIG ]
k
V D = [ V R, BIG ,V L, SMALL]
4 Find the SVD of (VTL,BIG VR,BIG) = U
5 Form the left/right transformation for the final kth order reduced model
10-34
bstmr
Note The BST model reduction theory requires that the original model D
matrix be full rank, for otherwise the Riccati solver fails. For any problem
with strictly proper model, you can shift the j-axis via bilin such that
BST/REM approximation can be achieved up to a particular frequency range
of interests. Alternatively, you can attach a small but full rank D matrix to the
original problem but remove the D matrix of the reduced order model
afterwards. As long as the size of D matrix is insignificant inside the control
bandwidth, the reduced order model should be fairly close to the true model.
By default, the bstmr program will assign a full rank D matrix scaled by 0.001
of the minimum eigenvalue of the original model, if its D matrix is not full
rank to begin with. This serves the purpose for most problems if the user does
not want to go through the trouble of model pretransformation.
Examples
References
[1] Zhou, K., Frequency weighted L error bounds, Syst. Contr. Lett., Vol. 21,
115-125, 1993.
10-35
bstmr
[2] Safonov, M.G., and R.Y. Chiang, Model Reduction for Robust Control: A
Schur Relative Error Method, International J. of Adaptive Control and Signal
Processing, Vol. 2, p. 259-272, 1988.
See Also
10-36
reduce
balancmr
hankelmr
schurmr
ncfmr
hankelsv
cmsclsyn
Purpose
Syntax
[qopt,bnd]
[qopt,bnd]
[qopt,bnd]
[qopt,bnd]
Description
min
=
=
=
=
QC
cmsclsyn(R,U,V,BlockStructure);
cmsclsyn(R,U,V,BlockStructure,opt);
cmsclsyn(R,U,V,BlockStructure,opt,qinit);
cmsclsyn(R,U,V,BlockStructure,opt,'random',N)
rt
( R + UQV )
for given matrices R Cnm, U Cnr, V Ctm, and a set Cmn. This
applies to constant matrix data in R, U, and V.
[QOPT,BND] = cmsclsyn(R,U,V,BlockStructure) minimizes, by choice of Q.
QOPT is the optimum value of Q, the upper bound of mussv(R+U*Q*V,BLK), BND.
The matrices R,U and V are constant matrices of the appropriate dimension.
BlockStructure is a matrix specifying the perturbation blockstructure as
defined for mussv.
[QOPT,BND] = cmsclsyn(R,U,V,BlockStructure,OPT) uses the options
specified by OPT in the calls to mussv. See mussv for more information. The
default value for OPT is 'cUsw'.
[QOPT,BND] = cmsclsyn(R,U,V,BlockStructure,OPT,QINIT) initializes the
iterative computation from Q = QINIT. Because of the nonconvexity of the
overall problem, different starting points often yield different final answers. If
QINIT is an N-D array, then the iterative computation is performed multiple
times - the ith optimization is initialized at Q = QINIT(:,:,i). The output
arguments are associated with the best solution obtained in this brute force
approach.
[QOPT,BND] = cmsclsyn(R,U,V,BlockStructure,OPT,'random',N) initializes
the iterative computation from N random instances of QINIT. If NCU is the
number of columns of U, and NRV is the number of rows of V, then the
approximation to solving the constant matrix synthesis problem is two-fold:
only the upper bound for is minimized, and the minimization is not convex,
hence the optimum is generally not found. If U is full column rank, or V is full
row rank, then the problem can (and is) cast as a convex problem, [Packard,
10-37
cmsclsyn
Zhou, Pandey and Becker], and the global optimizer (for the upper bound for )
is calculated.
Algorithm
References
See Also
dksyn
hinfsyn
mussv
robuststab
robustperf
10-38
cpmargin
Purpose
10cpmargin
Syntax
[MARG,FREQ] = cpmargin(P,C)
[MARG,FREQ] = cpmargin(P,C,TOL)
Description
See Also
loopmargin
gapmetric
wcmargin
10-39
dec2mat
Purpose
10dec2mat
Syntax
valX = dec2mat(lmisys,decvars,X)
Description
Given a value decvars of the vector of decision variables, dec2mat computes the
corresponding value valX of the matrix variable with identifier X. This
identifier is returned by lmivar when declaring the matrix variable.
Recall that the decision variables are all free scalar variables in the LMI
problem and correspond to the free entries of the matrix variables X1, . . ., XK.
Since LMI solvers return a feasible or optimal value of the vector of decision
variables, dec2mat is useful to derive the corresponding feasible or optimal
values of the matrix variables.
Example
See Also
mat2dec
decnbr
decinfo
10-40
decay
Purpose
10decay
Syntax
[drate,P] = decay(ps,options)
Description
decay returns the quadratic decay rate drate, i.e., the smallest R such that
See Also
quadstab
pdlstab
psys
10-41
decinfo
Purpose
10decinfo
Syntax
decinfo(lmisys)
decX = decinfo(lmisys,X)
Description
returns an integer matrix decX of the same dimensions as X whose (i, j) entry is
0 if X(i, j) is a hard zero
n if X(i, j) = xn (the n-th decision variable)
n if X(i, j) = xn
decX clarifies the structure of X as well as its entry-wise dependence on
x1, . . ., xN. This is useful to specify matrix variables with atypical structures
(see lmivar).
decinfo can also be used in interactive mode by invoking it with a single
argument. It then prompts the user for a matrix variable and displays in return
the decision variable content of this variable.
Example 1
10-42
decinfo
lmis = getlmis
0
1
0
0
0
1
dY = decinfo(lmis,Y)
dY =
2
3
This indicates a total of three decision variables x1, x2, x3 that are related to the
entries of X and Y by
x 0 0
1
X = 0 x1 0
0 0 x
1
x
Y= 2
x
3
Note that the number of decision variables corresponds to the number of free
entries in X and Y when taking structure into account.
Example 2
Suppose that the matrix variable X is symmetric block diagonal with one 2-by-2
full block and one 2-by-2 scalar block, and is declared by
setlmis([])
X = lmivar(1,[2 1;2 0])
:
lmis = getlmis
10-43
decinfo
2
3
0
0
0
0
4
0
0
0
0
4
*********
Matrix variable Xk of interest (enter k between 1 and 1, or 0 to
quit):
?> 0
See Also
lmivar
mat2dec
dec2mat
10-44
decnbr
Purpose
10decnbr
Syntax
ndec = decnbr(lmisys)
Description
The function decnbr returns the number ndec of decision variables (free
scalar variables) in the LMI problem described in lmisys. In other words, ndec
is the length of the vector of decision variables.
Example
For an LMI system lmis with two matrix variables X and Y such that
X is symmetric block diagonal with one 2-by-2 full block, and one 2-by-2
scalar block
Y is 2-by-3 rectangular,
the number of decision variables is
ndec = decnbr(LMIs)
ndec =
10
This is exactly the number of free entries in X and Y when taking structure into
account (see decinfo for more details).
See Also
dec2mat
decinfo
mat2dec
10-45
defcx
Purpose
Syntax
[V1,...,Vk] = defcx(lmisys,n,X1,...,Xk)
Description
defcx is useful to derive the c vector needed by mincx when the objective is
See Also
10-46
mincx
decinfo
dellmi
Purpose
10dellmi
Syntax
newsys = dellmi(lmisys,n)
Description
dellmi deletes the n-th LMI from the system of LMIs described in lmisys. The
updated system is returned in newsys.
The ranking n is relative to the order in which the LMIs were declared and
corresponds to the identifier returned by newlmi. Since this ranking is not
modified by deletions, it is safer to refer to the remaining LMIs by their
identifiers. Finally, matrix variables that only appeared in the deleted LMI are
removed from the problem.
Example
A 1 X1 + X1A1 + Q1 < 0
T
A 2 X2 + X2A2 + Q2 < 0
T
A 3 X3 + X3A3 + Q3 < 0
have been declared in this order, labeled LMI1, LMI2, LMI3 with newlmi, and
stored in lmisys. To delete the second LMI, type
lmis = dellmi(lmisys,LMI2)
lmis now describes the system of LMIs
T
A1 X1 + X1 A1 + Q1 < 0
T
A3 X3 + X3 A3 + Q3 < 0
(10-3)
(10-4)
and the second variable X2 has been removed from the problem since it no
longer appears in the system (10-3)(10-4).
To further delete (10-4), type
lmis = dellmi(lmis,LMI3)
or equivalently
10-47
dellmi
lmis = dellmi(lmis,3)
Note that (10-4) has retained its original ranking after the first deletion.
See Also
newlmi
lmiedit
lmiinfo
10-48
delmvar
Purpose
10delmvar
Syntax
newsys = delmvar(lmisys,X)
Description
delmvar removes the matrix variable X with identifier X from the list of
variables defined in lmisys. The identifier X should be the second argument
returned by lmivar when declaring X. All terms involving X are automatically
removed from the list of LMI terms. The description of the resulting system of
LMIs is returned in newsys.
Example
T T
T
T
( X + X )
X C +D
involving two variables X and Y with identifiers X and Y. To delete the variable
X, type
lmisys = delmvar(lmisys,X)
T
0 < A YB + B YA + Q D
D
0
with only one variable Y. Note that Y is still identified by the label Y.
See Also
lmivar
setmvar
lmiinfo
10-49
diag
Purpose
10diag
Syntax
v = diag(x)
Description
Example
See Also
10-50
append
dkitopt
Purpose
10dkitopt
Syntax
dkitopt
options = dkitopt
options = dkitopt('name1',value1,'name2',value2,...)
Description
default values.
options = dkitopt('name1',value1,'name2',value2,...) creates a
dkitopt object called options with specific values assigned to certain
properties. Any unspecified property is set to its default value. When entering
property names, it is sufficient to only type the leading characters that identify
the name uniquely. Property names are not case sensitive.
If the AutoIter property is set to 'off', the D-K iteration procedure is
interactive. You are prompted to fit the D-Scale data and provide input on the
control design process.
This table lists the dkitopt object properties.
Object Property
Description
FrequencyVector
InitialController
AutoIter
DisplayWhileAutoIter
StartingIterationNumber
10-51
dkitopt
Example
Object Property
Description
NumberOfAutoIterations
AutoScalingOrder
AutoIterSmartTerminate
AutoIterSmartTerminateTol
Default
Meaning
This statement creates a dkitopt options object called opt with all default
values.
opt = dkitopt
Property Object Values:
FrequencyVector:
InitialController:
AutoIter:
DisplayWhileAutoIter:
StartingIterationNumber:
NumberOfAutoIterations:
AutoScalingOrder:
AutoIterSmartTerminate:
AutoIterSmartTerminateTol:
Default:
Meaning:
[]
[0x0 ss]
'on'
'off'
1
10
5
'on'
0.0050
[1x1 struct]
[1x1 struct]
The dksyn options object opt is updated with the following statements. The
frequency vector is set to logspace(-2,3,80), the number of D-K iterations to
16, and the maximum state order of the fitted D-scale data to 9.
10-52
dkitopt
opt.FrequencyVector = logspace(-2,3,80);
opt.NumberOfAutoIterations = 16;
opt.AutoScalingOrder = 16;
opt
Property Object Values:
FrequencyVector: [1x80 double]
InitialController: [0x0 ss]
AutoIter: 'on'
DisplayWhileAutoIter: 'off'
StartingIterationNumber: 1
NumberOfAutoIterations: 16
AutoScalingOrder: 16
AutoIterSmartTerminate: 'on'
AutoIterSmartTerminateTol: 0.0050
Default: [1x1 struct]
Meaning: [1x1 struct]
In this statement, the same properties are set with a single call to robopt.
opt = dkitopt('FrequencyVector',logspace(-2,3,80),...
'NumberOfAutoIterations',16,'AutoScalingOrder',9)
Property Object Values:
FrequencyVector: [1x80 double]
InitialController: [0x0 ss]
AutoIter: 'on'
DisplayWhileAutoIter: 'off'
StartingIterationNumber: 1
NumberOfAutoIterations: 16
AutoScalingOrder: 9
AutoIterSmartTerminate: 'on'
AutoIterSmartTerminateTol: 0.0050
Default: [1x1 struct]
Meaning: [1x1 struct]
Algorithm
The dksyn command stops iterating before the total number of automated
iterations ('NumberOfAutoIterations') if 'AutoIterSmartTerminate' is set
to 'on' and a stopping criterion is satisfied. The stopping criterion involves the
m(i) value of the current ith iteration, m(i-1) and m(i-2), the previous two
iterations and the options property 'AutoIterSmartTerminateTol'. The DK
iteration procedure automatically terminates if the difference between each of
10-53
dkitopt
the three values is less than the relative tolerance of
AutoIterSmartTerminateTol (i) or the current value (i) has increased
relative to the value of the previous iteration (i1) by
20AutoIterSmartTerminateTol.
See Also
10-54
dksyn
h2syn
hinfsyn
mussv
robopt
robuststab
robustperf
wcgopt
dksyn
Purpose
Syntax
k = dksyn(p,nmeas,ncont)
[k,clp,bnd] = dksyn(p,nmeas,ncont)
[k,clp,bnd] = dksyn(p,nmeas,ncont,opt)
[k,clp,bnd,dkinfo] = dksyn(p,nmeas,ncont,prevdkinfo,opt)
[k,clp,bnd,dkinfo] = dksyn(p)
Description
dksyn synthesizes a robust controller via D-K iteration. The D-K iteration
10-55
dksyn
details.
[k,clp,bnd,dkinfo] = dksyn(p,nmeas,ncont,prevdkinfo,opt) allows you
to use information from a previous dksyn iteration. prevdkinfo is a structure
from a previous attempt at designing a robust controller using dksyn.
prevdkinfo is used when the dksyn starting iteration is not 1
(opt.StartingIterationNumber = 1) to determine the correct D-scalings to
initiate the iteration procedure.
dkinfo is an N-by-1 cell array where N is the total number of iterations
performed. The ith cell contains a structure with the following fields:
Field
Description
Bnds
DL
DR
MussvBnds
MussvInfo
Examples
The model itself is uncertain. At low frequency, below 2 rad/s, it can vary up to
25% from its nominal value. Around 2 rad/s the percentage variation starts to
10-56
dksyn
The uncertain plant model Gpert represents the model of the physical system
to be controlled.
Wu
u
K
Wp
Gpert = G*(1+InputUnc*Wu);
The robust stability objective is to synthesize a stabilizing LTI controller for all
the plant models parameterized by the uncertain plant model, Gpert. The
control interconnection structure is shown in the following figure.
The goal is to synthesize a controller that stabilizes and achieves the
closed-loop performance objectives for all possible plant models in Gpert. The
performance objective is defined as a weighted sensitivity minimization
problem. See the preceding figure.
1
The sensitivity function, S, is defined as S = ------------------ where P is the plant
1 + PK
model and K is the controller. A weighted sensitivity minimization problem
selects a weight Wp, which corresponds to the inverse of the desired sensitivity
function of the closed-loop system as a function of frequency. Hence the product
of the sensitivity weight Wp and actual closed-loop sensitivity function is less
than 1 across all frequencies. The sensitivity weight Wp has a gain of 100 at low
10-57
dksyn
The defined sensitivity weight Wp implies that the desired disturbance rejection
should be at least 100:1 disturbance rejection at DC, rise slowly between 0.006
and 2.4 rad/s, and allow the disturbance rejection to increase above the
open-loop level, 0.25, at high frequency.
When the plant model is uncertain, the closed-loop performance objective is to
achieve the desired sensitivity function for all plant models defined by the
uncertain plant model, Gpert. The performance objective for an uncertain
system is a robust performance objective. A block diagram of this uncertain
closed-loop system illustrating the performance objective (closed-loop transfer
function from de) is shown.
e
d
P
y
u
K
From the definition of the robust performance control objective, the weighted,
uncertain control design interconnection model, which includes the robustness
and performance objectives, can be constructed and is denoted by P. The
robustness and performance weights are selected such that if the robust
performance structure singular value, bnd, of the closed-loop uncertain system,
clp, is less than 1 then the performance objectives have been achieved for all
the plant models in the model set.
You can form the uncertain transfer matrix P from [d; u] to [e; y] using the
following commands.
P = [Wp; 1 ]*[1 Gpert];
[K,clp,bnd] = dksyn(P,1,1);
bnd
bnd =
10-58
dksyn
0.6860
P = [Wp; 1 ]*[1 Gpert];
[K,clp,bnd] = dksyn(P,1,1);
bnd
bnd =
0.6860
Algorithm
The following is a list of what occurs during a single, complete step of the D-K
iteration.
1 (In the first iteration, this step is skipped.) The calculation (from the
10-59
dksyn
( D f ( j )F L ( P, K ) ( j )D f ( j ) )
and
( j )F ( P, K ) ( j )D
1 ( j ) )
(D
f
f
L
are shown for comparison.
is absorbed into
(In the first iteration, this step is skipped.) The rational D
the open-loop interconnection for the next controller synthesis. Using either
, an estimate
the previous frequency-dependent Ds or the just-fit rational D
of an appropriate value for the H norm is made. This is simply a
conservative value of the scaled closed-loop H norm, using the most recent
controller and either a frequency sweep (using the frequency-dependent Ds)
or a state-space calculation (with the rational Ds).
2 (The first iteration begins at this point.) A controller is designed using
You are given the option to change the frequency range. If you change it,
all relevant frequency responses are automatically recomputed.
d You are given the option to rerun the H synthesis with a set of modified
plotted.
4 An iteration summary is displayed, showing all the controller order, as well
Subsequent iterations proceed along the same lines without the need to reenter
the iteration number. A summary at the end of each iteration is updated to
reflect data from all previous iterations. This often provides valuable
information about the progress of the robust controller synthesis procedure.
10-60
dksyn
nd and nb allow you to move from one D-scale data to another. nd moves to
the next scaling, whereas nb moves to the next scaling block. For scalar
D-scalings, these are identical operations, but for problems with full
D-scalings, (perturbations of the form I) they are different. In the (1,2)
subplot window, the title displays the D-scaling block number, the
row/column of the scaling that is currently being fitted, and the order of the
current fit (with d for data when no fit exists).
You can increment or decrement the order of the current fit (by 1) using i and
d.
apf automatically fits each D-scaling data. The default maximum state order
of individual D-scaling is 5. The mx variable allows you to change the
maximum D-scaling state order used in the automatic prefitting routine. mx
must be a positive, nonzero integer. at allows you to define how close the
rational, scaled upper bound is to approximate the actual upper bound in
a norm sense. Setting at to 1 would require an exact fit of the D-scale data,
and is not allowed. Allowable values for at are greater than 1. This setting
10-61
dksyn
Limitations
There are two shortcomings of the D-K iteration control design procedure:
Calculation of the structured singular value () is approximated by its
upper bound. This is not a serious problem because the value of and its
upper bound are often close.
The D-K iteration is not guaranteed to converge to a global, or even local
minimum [SteD]. This is a serious problem, and represents the biggest
limitation of the design procedure.
In spite of these drawbacks, the D-K iteration control design technique appears
to work well on many engineering problems. It has been applied to a number
of real-world applications with success. These applications include vibration
suppression for flexible structures, flight control, chemical process control
problems, and acoustic reverberation suppression in enclosures.
References
[1] Balas, G.J., and J.C. Doyle, Robust control of flexible modes in the
controller crossover region, AIAA Journal of Guidance, Dynamics and
Control, Vol. 17, no. 2, March-April, 1994, p. 370-377.
[2] Balas, G.J., A.K. Packard, and J.T. Harduvel, Application of -synthesis
techniques to momentum management and attitude control of the space
station, AIAA Guidance, Navigation and Control Conference, New Orleans,
August 1991.
[3] Doyle, J.C., K. Lenz, and A. Packard, Design examples using -synthesis:
Space shuttle lateral axis FCS during reentry, NATO ASI Series, Modelling,
Robustness, and Sensitivity Reduction in Control Systems, vol. 34,
Springer-Verlag, Berlin 1987.
[4] Packard, A., J. Doyle, and G. Balas, Linear, multivariable robust control
with a perspective, ASME Journal of Dynamic Systems, Measurement and
Control, 50th Anniversary Issue, Vol. 115, no. 2b, June 1993, p. 310-319.
10-62
dksyn
[5] [SteD:] Stein, G., and J. Doyle, Beyond singular values and loopshapes,
AIAA Journal of Guidance and Control, Vol. 14, No. 1, January, 1991, p. 5-16.
See Also
dkitopt
h2syn
hinfsyn
loopmargin
mktito
mussv
robuststab
robustperf
wcgain
wcsens
wcmargin
10-63
dmplot
Purpose
10dmplot
Syntax
dmplot
dmplot(diskgm)
[dgm,dpm] = dmplot
Description
dmplot plots disk gain margin (dgm) and disk phase margin (dpm). Both
margins are derived from the largest disk that
stable for all combined gain/phase variations inside the plotted ellipse.
[dgm,dpm] = dmplot returns the data used to plot the gain/phase variation
ellipse.
Examples
When you call dmplot (without an argument), the resulting plot shows a
comparison of a disk margin analysis with the classical notations of gain and
phase margins. The Nyquist plot is of the loop transfer function L(s)
s
------ + 1
30
L ( s ) = ----------------------------------------------------------( s + 1 ) ( s 2 + 1.6s + 16 )
The Nyquist plot of L corresponds to the blue line.
The unit disk corresponds to the dotted red line.
GM and PM indicate the location of the classical gain and phase margins for
the system L.
DGM and DPM correspond to the disk gain and phase margins, respectively.
The disk margins provide a lower bound on classical gain and phase margins.
10-64
dmplot
The disk margin circle, represented by the dashed black line, corresponds to
the largest disk centered at (GMD + 1/GMD)/2 that just touches the loop
transfer function L. This location is indicated by the red dot.
Disk gain margin (DGM) and disk phase margin (DPM) in the Nyquist plot
Unit Disk
Disk Margin
Critical point
1
0.8
0.6
Disk Margin
Imaginary Axis
0.4
0.2
DGM
GM
0.2
0.4
DPM
0.6
0.8
PM
1
1.5
0.5
0.5
Real Axis
The x-axis corresponds to the gain variation, in dB, and the y-axis corresponds
to the phase variation allowable, in degrees. For a disk gain margin
corresponding to 3 dB (1.414), the closed-loop system is stable for all phase and
gain variations inside the blue ellipse. For example, the closed-loop system can
simultaneously tolerate +/- 2 dB gain variation and +/- 14 deg phase variations.
dmplot(1.414)
10-65
dmplot
18
16
14
12
10
0
4
References
0
1
Gain Variation (dB)
[1] Barrett, M.F., Conservatism with robustness tests for linear feedback
control systems, Ph.D. Thesis, Control Science and Dynamical Systems,
University of Minnesota, 1980.
[2] Blight, J.D., R.L. Dailey, and Gangsass, D., Practical control law design for
aircraft using multivariable techniques, International Journal of Control, Vol.
59, No. 1, 1994, 93-137.
[3] Bates, D., and I. Postlethwaite, Robust Multivariable Control of Aerospace
Systems, Delft University Press, Delft, The Netherlands, ISBN: 90-407-2317-6,
2002.
See Also
10-66
loopmargin
wcmargin
drawmag
Purpose
10drawmag
Syntax
[sysout,pts] = drawmag(data)
[sysout,pts] = drawmag(data,init_pts)
Description
drawmag interactively uses the mouse in the plot window to create pts (the frd
object) and sysout (a stable minimum-phase ss object), which approximately
fits the frequency response (magnitude) in pts.
Input arguments:
data
init_pts
Output arguments:
sysout
pts
While drawmag is running, all interaction with the program is through the
mouse and/or the keyboard. The mouse, if there is one, must be in the plot
window. The program recognizes several commands:
Clicking the mouse button adds a point at the crosshairs. If the crosshairs
are outside the plotting window, the points are plotted when the fitting,
windowing, or replotting mode is invoked. Typing a is the same as clicking
the mouse button.
Typing r removes the point with frequency nearest that of the crosshairs.
Typing any integer between 0 and 9 fits the existing points with a transfer
function of that order. The fitting routine approximately minimizes the
maximum error in a log sense. The new fit is displayed along with the points,
and the most recent previous fit, if it exists.
Typing w uses the crosshair location as the initial point in creating a window.
Moving the crosshairs and clicking the mouse or pressing any key then gives
10-67
drawmag
a second point at the new crosshair location. These two points define a new
window on the data, which is immediately replotted. This is useful in fine
tuning parts of the data. You can call windowing repeatedly.
Typing p simply replots the data using a window that covers all the current
data points as well as whatever was specified in in. Typically used after
windowing to view all the data.
Typing k invokes the keyboard using the keyboard command. You should
exercise caution when using this option, as it can wreak havoc on the
program if variables are changed.
See Also
10-68
ginput
loglog
equate
Purpose
10equate
Syntax
c=equate(a,b)
Description
See Also
iconnect, icsignal
10-69
evallmi
Purpose
10evallmi
Syntax
evalsys = evallmi(lmisys,decvars)
Description
evallmi evaluates all LMI constraints for a particular instance decvars of the
vector of decision variables. Recall that decvars fully determines the values of
the matrix variables X1, . . ., XK. The evaluation consists of replacing all terms
involving X1, . . ., XK by their matrix value. The output evalsys is an LMI
system containing only constant terms.
The function evallmi is useful for validation of the LMI solvers output. The
vector returned by these solvers can be fed directly to evallmi to evaluate all
variable terms. The matrix values of the left- and right-hand sides of each LMI
are then returned by showlmi.
Observation
evallmi is meant to operate on the output of the LMI solvers. To evaluate all
LMIs for particular instances of the matrix variables X1, . . ., XK, first form the
corresponding decision vector x with mat2dec and then call evallmi with x as
input.
Examples
10-70
evallmi
The result is
tmin =
-4.7117e+00
xfeas' =
1.1029e+02
-1.1519e+01
1.1942e+02
The LMI constraints are therefore feasible since tmin < 0. The solution X
corresponding to the feasible decision vector xfeas would be given by
X = dec2mat(lmis,xfeas,X).
To check that xfeas is indeed feasible, evaluate all LMI constraints by typing
evals = evallmi(lmis,xfeas)
The left- and right-hand sides of the first and second LMIs are then given by
[lhs1,rhs1] = showlmi(evals,1)
[lhs2,rhs2] = showlmi(evals,2)
See Also
showlmi
setmvar
dec2mat
mat2dec
10-71
feasp
Purpose
10feasp
Syntax
[tmin,xfeas] = feasp(lmisys,options,target)
Description
The function feasp computes a solution xfeas (if any) of the system of LMIs
described by lmisys. The vector xfeas is a particular value of the decision
variables for which all LMIs are satisfied.
Given the LMI system
T
T
N LxN M R ( x )M
(10-5)
Minimize t subject to N L ( x )N M R ( x ) M tI
The global minimum of this program is the scalar value tmin returned as first
output argument by feasp. The LMI constraints are feasible if tmin 0 and
strictly feasible if tmin < 0. If the problem is feasible but not strictly feasible,
tmin is positive and very small. Some post-analysis may then be required to
decide whether xfeas is close enough to feasible.
The optional argument target sets a target value for tmin. The optimization
code terminates as soon as a value of t below this target is reached. The default
value is target = 0.
Note that xfeas is a solution in terms of the decision variables and not in terms
of the matrix variables of the problem. Use dec2mat to derive feasible values of
the matrix variables from xfeas.
Control
Parameters
The optional argument options gives access to certain control parameters for
the optimization algorithm. This five-entry vector is organized as follows:
options(1) is not used
options(2) sets the maximum number of iterations allowed to be performed
by the optimization procedure (100 by default)
options(3) resets the feasibility radius. Setting options(3) to a value R >
0 further constrains the decision vector x = (x1, . . ., xN) to lie within the ball
10-72
feasp
xi < R
2
i=1
In other words, the Euclidean norm of xfeas should not exceed R. The
feasibility radius is a simple means of controlling the magnitude of solutions.
Upon termination, feasp displays the f-radius saturation, that is, the norm
of the solution as a percentage of the feasibility radius R.
The default value is R = 109. Setting options(3) to a negative value
activates the flexible bound mode. In this mode, the feasibility radius is
initially set to 108, and increased if necessary during the course of
optimization
options(4) helps speed up termination. When set to an integer value J > 0,
the code terminates if t did not decrease by more than one percent in relative
terms during the last J iterations. The default value is 10. This parameter
trades off speed vs. accuracy. If set to a small value (< 10), the code
terminates quickly but without guarantee of accuracy. On the contrary, a
large value results in natural convergence at the expense of a possibly large
number of iterations.
options(5) = 1 turns off the trace of execution of the optimization
procedure. Resetting options(5) to zero (default value) turns it back on.
Setting option(i) to zero is equivalent to setting the corresponding control
parameter to its default value. Consequently, there is no need to redefine the
entire vector when changing just one control parameter. To set the maximum
number of iterations to 10, for instance, it suffices to type
options=zeros(1,5)
options(2)=10
Memory
Problems
10-73
feasp
You should then ask your system manager to increase your swap space or, if no
additional swap space is available, set options(4) = 1. This will prevent
switching to QR and feasp will terminate when Cholesky fails due to
numerical instabilities.
Examples
A 1 P + PA 1 < 0
(10-6)
A 2 P + PA 2 < 0
(10-7)
A 3 P + PA 3 < 0
(10-8)
with data
#1
#2
#3
P
This returns tmin = -3.1363. Hence (9-8)(9-10) is feasible and the dynamical
system x = A(t)x is quadratically stable for A(t) Co{A1, A2, A3}.
To obtain a Lyapunov matrix P proving the quadratic stability, type
10-74
feasp
P = dec2mat(lmis,xfeas,p)
This returns
P = 270.8 126.4
126.4 155.1
It is possible to add further constraints on this feasibility problem. For
instance, you can bound the Frobenius norm of P by 10 while asking tmin to be
less than or equal to 1. This is done by
[tmin,xfeas] = feasp(lmis,[0,0,10,0,0],-1)
The third entry 10 of options sets the feasibility radius to 10 while the third
argument -1 sets the target value for tmin. This yields tmin = -1.1745 and a
matrix P with largest eigenvalue max(P) = 9.6912.
References
See Also
mincx
gevp
dec2mat
10-75
fitfrd
Purpose
10fitfrd
Syntax
B = fitfrd(A,N)
B = fitfrd(A,N,RD)
B = fitfrd(A,N,RD,WT)
Description
Examples
You can use the fitfrd command to fit D-scale data. For example, create
D-scale frequency response data from a fifth-order system.
sys = tf([1 2 2],[1 2.5 1.5])*tf(1,[1 0.1]);
sys = sys*tf([1 3.75 3.5],[1 2.5 13]);
omeg = logspace(-1,1);
sysg = frd(sys,omeg);
bode(sysg,'r-');
10-76
fitfrd
10
Magnitude (dB)
10
15
20
0
Phase (deg)
30
60
90
120
1
10
10
Frequency (rad/sec)
10
You can try to fit the frequency response D-scale data sysg with a first-order
system, b1. Similarly, you can fit the D-scale data with a third-order system,
b3.
b1 = fitfrd(sysg,1);
b3 = fitfrd(sysg,3);
Compare the original D-scale data sysg with the frequency responses of the
first and third-order models calculated by fitfrd:
b1g = frd(b1,omeg);
b3g = frd(b3,omeg);
bode(sysg,'r-',b1g,'k:',b3g,'b-.')
10-77
fitfrd
10
Magnitude (dB)
10
15
20
0
Phase (deg)
45
90
135
1
10
10
Frequency (rad/sec)
10
Limitations
Numerical conditioning problems arise if the state order of the fit N is selected
to be higher than required by the dynamics of A.
See Also
fitmagfrd
10-78
fitmagfrd
Purpose
10fitmagfrd
Syntax
B
B
B
B
Description
=
=
=
=
fitmagfrd(A,N)
fitmagfrd(A,N,RD)
fitmagfrd(A,N,RD,WT)
fitmagfrd(A,N,RD,WT,C)
Examples
You can use the fitmagfrd command to fit frequency response magnitude data.
Create frequency response data from a fifth-order system.
sys = tf([1 2 2],[1 2.5 1.5])*tf(1,[1 0.1]);
sys = sys*tf([1 3.75 3.5],[1 2.5 13]);
omeg = logspace(-1,1);
10-79
fitmagfrd
sysg = abs(frd(sys,omeg));
bodemag(sysg,'r');
10
Magnitude (dB)
10
15
20
1
10
10
Frequency (rad/sec)
10
10-80
fitmagfrd
bodemag(sysg,'r',b1g,'k:');
Third order fit to 5th order system
10
Magnitude (dB)
10
15
10
Frequency (rad/sec)
10
Fit the magnitude data with a third order system constrained to lie below and
above the given data.
b2 = fitmagfrd(sysg,ord,[],[],-1);
b2g = frd(b2,omeg);
b3 = fitmagfrd(sysg,ord,[],[],1);
b3g = frd(b3,omeg);
10-81
fitmagfrd
bodemag(sysg,'r',b1g,'k:',b2g,'b-.',b3g,'m--')
Third order fits to 5th order system
10
Magnitude (dB)
10
15
Algorithm
10
Frequency (rad/sec)
10
Limitations
This input frd object must be either a scalar 1-by-1 object or, a row, or column
vector.
References
Oppenheim, A.V., and R.W. Schaffer, Digital Signal Processing, Prentice Hall,
New Jersey, 1975, p. 513.
10-82
fitmagfrd
See Also
fitfrd
10-83
frd/loglog
Purpose
10frd/loglog
Syntax
loglog(sys)
loglog(sys,linetype)
Description
loglog is the same as plot, except a logarithmic (base 10) scale is used for
both the X- and Y-axis.
The argument list consists of (many) x-data, y-data and line type triples. The
x-data and y-data can be specified individually, as doubles, or jointly as an frd.
Examples
Generate three frequency response objects, sys1g, sys2g and sys3g. Plot the
magnitude of these transfer functions versus frequency on a log-log plot.
omega = logspace(-2,2,40);
sys1 = tf(0.9,[.1 1]);
sys1g = frd(sys1,omega);
sys2 = tf(0.9,[1 1]);
sys2g = frd(sys2,omega);
sys3 = tf(0.9,[10 1]);
sys3g = frd(sys3,omega);
loglog(abs(sys1g),abs(sys2g),'r+',sys3g.Freq,...
abs(sys3g.Resp(:)),'--');
10-84
frd/loglog
10
10
10
10
10
10
See Also
10
plot
semilogx, semilogy
10
10
10
10-85
frd/rcond
Purpose
10frd/rcond
Syntax
r = rcond(x)
Description
rcond(x) is an estimate for the reciprocal of the condition of the frd object x in
the 1-norm obtained by the LAPACK condition estimator. rcond operates on
x.ReponseData of the x frd at each frequency to construct r. If x is well
conditioned, rcond(x) is near 1.0. If x is badly conditioned, rcond(x) is near
EPS.
r=rcond(x) returns r as an frd object.
See Also
10-86
cond
norm
condest
normest
frd/schur
Purpose
10frd/schur
Syntax
[u,t]
t
[u,t]
t
[u,t]
t
Description
See Also
qz
schur
=
=
=
=
=
=
schur(x)
schur(x)
schur(x,0)
schur(x,0)
schur(x,'econ')
schur(x,'econ')
10-87
frd/semilogx
Purpose
10frd/semilogx
Syntax
Description
See Also
10-88
loglog
plot
frd/semilog
frd/semilog
Purpose
10frd/semilog
Syntax
Description
See Also
loglog
plot
frd/semilogx
10-89
frd/svd
Purpose
10frd/svd
Syntax
S = svd(X)
[U,S,V] = svd(X)
Description
See Also
10-90
schur
svd
gapmetric
Purpose
10gapmetric
Compute upper bounds on gap and nugap distances between two systems
Syntax
[gap,nugap] = gapmetric(p0,p1)
[gap,nugap] = gapmetric(p0,p1,tol)
Description
lie between 0 and 1. A small value (relative to 1) implies that any controller
that stabilizes p0 will likely stabilize p1, and, moreover, that the closed-loop
gains of the two closed-loop systems will be similar. A gap or nugap of 0 implies
that p0 equals p1, and a value of 1 implies that the plants are far apart. The
input and output dimensions of p0 and p1 must be the same.
[gap,nugap] = gapmetric(p0,p1,tol) specifies a relative accuracy for
calculating the gap metric and nugap metric. The default value for tol is 0.001.
The computed answers are guaranteed to satisfy
gap-tol < gapexact(p0,p1) <=
Examples
gap
Consider two plant models. One plant is an unstable, first-order, with transfer
function 1/(s-0.001) and the other plant is stable first-order with transfer
function 1/(s+0.001).
p1 = tf(1,[1 -0.001]);
p2 = tf(1,[1 0.001]);
Despite the fact that one plant is unstable and the other is stable, these plants
are close in the gap and nugap metrics. Intuitively, this is obvious, because, for
instance, the feedback controller K=1 stabilizes both plants and renders the
closed-loop systems nearly identical.
[g,ng] = gapmetric(p1,p2)
g =
0.0029
ng =
0.0020
K = 1;
H1 = loopsens(p1,K);
H2 = loopsens(p2,K);
subplot(2,2,1); bode(H1.Si,'-',H2.Si,'--');
subplot(2,2,2); bode(H1.Ti,'-',H2.Ti,'--');
10-91
gapmetric
subplot(2,2,3); bode(H1.PSi,'-',H2.PSi,'--');
subplot(2,2,4); bode(H1.CSo,'-',H2.CSo,'--');
Bode Diagram
50
90
0
4
10
45
90
2
10
10
Bode Diagram
10
10
50
100
180
Phase (deg)
50
0
10
10
Frequency (rad/sec)
Bode Diagram
0
Magnitude (dB)
Magnitude (dB)
10
10
Frequency (rad/sec)
50
Phase (deg)
50
0
Phase (deg)
Phase (deg)
100
180
45
90
2
10
Bode Diagram
50
Magnitude (dB)
Magnitude (dB)
90
0
1
10
10
10
Frequency (rad/sec)
10
10
10
10
Frequency (rad/sec)
10
Next, consider two stable plant models that differ by a first-order system. One
plant is the transfer function 50/(s+50) and the other plant is the transfer
function 50/(s+50) * 8/(s+8).
p3 = tf([50],[1 50]);
p4 = tf([8],[1 8])*p3;
Although the two systems have similar high-frequency dynamics and the same
unity gain at low frequency, the plants are modestly far apart in the gap and
nugap metrics.
[g,ng] = gapmetric(p3,p4)
g =
0.6156
ng =
0.6147
10-92
gapmetric
Algorithm
gap and nugap compute the gap and gap metrics between two LTI objects.
Both quantities give a numerical value (p0,p1) between 0 and 1 for the
distance between a nominal system p0 (G0) and a perturbed system p1 (G1).
The gap metric was introduced into the control literature by Zames and
El-Sakkary 1980, and exploited by Georgiou and Smith 1990. The gap metric
was derived by Vinnicombe 1993. For both of these metrics the following robust
performance result holds from Qui and Davidson 1992, and Vinnicombe 1993
arcsin b(G1,K1) arcsin b(G0,K0) arcsin (G0,G1) arcsin (K0,K1)
where
1
b ( G, K ) =
I ( I GK ) 1
G I
K
References
10-93
gapmetric
See Also
10-94
loopmargin
loopsyn
ncfsyn
robuststab
wcsens
wcmargin
genphase
Purpose
10genphase
Syntax
resp = genphase(d)
Description
References
Oppenheim, A.V., and R.W. Schaffer, Digital Signal Processing, Prentice Hall,
New Jersey, 1975, p. 513.
See Also
fitmagfrd
10-95
getlmis
Purpose
10getlmis
Syntax
lmisys = getlmis
Description
After completing the description of a given LMI system with lmivar and
lmiterm, its internal representation lmisys is obtained with the command
lmisys = getlmis
This MATLAB representation of the LMI system can be forwarded to the LMI
solvers or any other LMI-Lab function for subsequent processing.
See Also
10-96
setlmis
lmivar
lmiterm
newlmi
gevp
Purpose
10gevp
Syntax
[lopt,xopt] = gevp(lmisys,nlfc,options,linit,xinit,target)
Description
C(x)
<
D(x)
(10-9)
0 <
B(x)
(10-10)
A(x)
< B(x)
(10-11)
where C(x) < D(x) and A(x) < B(x) denote systems of LMIs. Provided that
(9-11)(9-12) are jointly feasible, gevp returns the global minimum lopt and
the minimizing value xopt of the vector of decision variables x. The
corresponding optimal values of the matrix variables are obtained with
dec2mat.
The argument lmisys describes the system of LMIs (9-11)(9-13) for = 1. The
LMIs involving are called the linear-fractional constraints while (9-11)(9-12)
are regular LMI constraints. The number of linear-fractional constraints (9-13)
is specified by nlfc. All other input arguments are optional. If an initial
feasible pair (0, x0) is available, it can be passed to gevp by setting linit to 0
and xinit to x0. Note that xinit should be of length decnbr(lmisys) (the
number of decision variables). The initial point is ignored when infeasible.
Finally, the last argument target sets some target value for . The code
terminates as soon as it has found a feasible pair (, x) with target.
Caution
10-97
gevp
Control
Parameters
Examples
Given
A 1 P + PA 1 < P
T
A 2 P + PA 2 < P
10-98
(10-12)
(10-13)
(10-14)
gevp
A 3 P + PA 3 < P
(10-15)
To set up this problem for gevp, first specify the LMIs (9-15)(9-17) with = 1:
setlmis([]);
p = lmivar(1,[2 1])
lemiterm([1 1 1 0],1) % P > I : I
lemiterm([ 1 1 1 p],1,1) % P > I :
lemiterm([2 1 1 p],1,a1,'s') % LFC
lemiterm([ 2 1 1 p],1,1) % LFC # 1
lemiterm([3 1 1 p],1,a2,'s') % LFC
lemiterm([ 3 1 1 p],1,1) % LFC # 2
lemiterm([4 1 1 p],1,a3,'s') % LFC
lemiterm([ 4 1 1 p],1,1) % LFC # 3
lmis = getlmis
P
# 1 (lhs)
(rhs)
# 2 (lhs)
(rhs)
# 3 (lhs)
(rhs)
Note that the linear fractional constraints are defined last as required. To
minimize subject to (9-15)(9-17), call gevp by
[alpha,popt]=gevp(lmis,3)
This returns alpha = -0.122 as optimal value (the largest decay rate is
therefore 0.122). This value is achieved for
P = 5.58 8.35
8.35 18.64
Remark
10-99
gevp
References
See Also
dec2mat
decnbr
feasp
mincx
10-100
gridureal
Purpose
10gridureal
Syntax
B = gridreal(A,N)
[B,SampleValues] = gridreal(A,N)
[B,SampleValues] = gridreal(A,Names,N)
[B,SampleValues] = gridreal(A,Names1,N1,Names2,N2,...)
Description
Examples
Create two uncertain real parameters gamma and tau. The nominal value of
gamma is 4 and its range is 3 to 5. The nominal value of tau is 0.5 and its value
can change by +/- 30 percent.
gamma = ureal('gamma',4);
tau = ureal('tau',.5,'Percentage',30);
10-101
gridureal
p = tf(gamma,[tau 1]);
KI = 1/(2*tau.Nominal*gamma.Nominal);
c = tf(KI,[1 0]);
clp = feedback(p*c,1);
The figure below shows the open-loop unit step response (top plot) and
closed-loop response (bottom plot) for a grid of 20 values of gamma and tau.
subplot(2,1,1); step(gridureal(p,20),6)
title('Open-loop plant step responses')
subplot(2,1,2); step(gridureal(clp,20),6)
6
5
Amplitude
4
3
2
1
0
3
Time (sec)
1.5
Amplitude
0.5
3
Time (sec)
Multi-Parameter Example
The next example illustrates the different options in gridding
high-dimensional (e.g., n greater than 2) parameter spaces. An uncertain
10-102
gridureal
In the first case, the (a,b) space is gridded at five places, and the (c,d) space at
3 places. The uncertain matrix m is evaluated at these 15 grid-points resulting
in the matrix m1.
m1 = gridureal(m,{'a';'b'},5,{'c';'d'},3);
In the second case, the (a,b,c,d) space is gridded at 15 places, and the
uncertain matrix m is sampled at these 15 points. The resulting matrix is m2.
m2 = gridureal(m,{'a';'b';'c';'d'},15);
The (2,1) entry of m is just the uncertain real parameter c. Below, you see the
histogram plots of the (2,1) entry of both m1 and m2. The (2,1) entry of m1 only
takes on 3 distinct values, while the (2,1) entry of m2 (which is also c) takes on
15 distinct values uniformly through its range.
subplot(2,1,1)
hist(m1(2,1,:))
title('2,1 entry of m1')
subplot(2,1,2)
hist(m2(2,1,:))
10-103
gridureal
2.2
2.4
2.6
2.8
3.2
3.4
3.6
3.8
3.2
3.4
3.6
3.8
2,1 entry of m2
2
1.5
0.5
See Also
10-104
usample
usubs
2.2
2.4
2.6
2.8
h2hinfsyn
Purpose
10h2hinfsyn
Syntax
[gopt,h2opt,K,R,S] = h2hinfsyn(P,r,obj,region,dkbnd,tol)
Description
z2
P(s)
y
u
K(s)
If T(s) and T2(s) denote the closed-loop transfer functions from w to z and z2,
respectively, h2hinfsyn computes a suboptimal solution of the following
synthesis problem:
Design an LTI controller K(s) that minimizes the mixed H2/H criterion
2
T + T2 2
subject to
||T|| < 0
||T2||2 < 0
The closed-loop poles lie in some prescribed LMI region D.
Recall that ||.|| and ||.||2 denote the H norm (RMS gain) and H2 norm of transfer
functions.
P is any SS, TF, or ZPK LTI representation of the plant P(s), and r is a
three-entry vector listing the lengths of z2, y, and u. Note that z and/or z2 can
be empty. The four-entry vector obj = [0, 0, , ] specifies the H2/H
10-105
h2hinfsyn
constraints and trade-off criterion, and the remaining input arguments are
optional:
region specifies the LMI region for pole placement (the default region = []
is the open left-half plane). Use lmireg to interactively build the LMI region
description region
dkbnd is a user-specified bound on the norm of the controller feedthrough
matrix DK. The default value is 100. To make the controller K(s) strictly
proper, set dkbnd = 0.
tol is the required relative accuracy on the optimal value of the trade-off
criterion (the default is 102).
The function h2hinfsyn returns guaranteed H and H2 performances gopt and
h2opt as well as the SYSTEM matrix K of the LMI-optimal controller. You can
also access the optimal values of the LMI variables R, S via the extra output
arguments R and S.
A variety of mixed and unmixed problems can be solved with h2hinfsyn. In
particular, you can use h2hinfsyn to perform pure pole placement by setting
obj = [0 0 0 0]. Note that both z and z2 can be empty in such case.
References
See Also
10-106
lmireg
msfsyn
h2syn
Purpose
10h2syn
Syntax
[K,CL,GAM,INFO]=H2SYN(P,NMEAS,NCON)
Description
A B1 B2
P = C 1 D 11 D 12
C 2 D 21 D 22
of states as 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).
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. See
Figure 10-5, H2 control system CL= lft(P,K)=, on page 10-107. INFO is a
STRUCT array that returns additional information about the design.
A B1 B2
u2
P =
C 1P(s)
D 11 D 12
C 2 D 21 D 22
y1
y2
K
F(s)
Figure 10-5:
lft(P,K)= T y u
1 1
10-107
h2syn
Output arguments
Description
LTI controller
CL= lft(P,K)
GAM = norm(CL)
INFO
INFO.KFI
INFO.GFI
Examples
INFO.HAMX
INFO.HAMY
Example 1
Stabilize 4-by-5 unstable plant with 3-states, NMEAS=2, NCON=2.
rand('seed',0);randn('seed',0);
P=rss(3,4,5)';
[K,CL,GAM]=h2syn(P,2,1);
open_loop_poles=pole(P)
closed_loop_poles=pole(CL)
10-108
h2syn
Example 2
Mixed-Sensitivity H2 loop-shaping. Here the goal is to shape the sigma plots of
sensitivity S:=(I+GK)-1 and complementary sensitivity T:=GK(I+GK)-1, by
choosing a stabilizing K the minimizes the H2 norm of
Ty1 u1 =
W 1S
( W 2 G )T
W3 T
where
0.1 ( s + 1000 )
s1
G ( s ) = ------------ , W 1 = ----------------------------------- , W 2 = 0.1
100s + 1
s2
and there is no W3.
s=zpk('s');
G=10*(s-1)/(s+1)^2;
W1=0.1*(s+100)/(100*s+1); W2=0.1; W3=[];
P=augw(G,W1,W2,W3);
[K,CL,GAM]=h2syn(P);
L=G*K; S=inv(1+L); T=1-S;
sigma(L,'k-.',S,'r',T,'g')
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
10-109
h2syn
1 T T
1 T T T Q Nc x
= lim E ---- [ x u 2 ]
dt
T
u
T T 0
2
Nc R
T
1 T T T C1
x
--= lim E
[ x u2 ]
[ C 1 D 12 ]
dt
T
u2
T T 0
D 12
T
(t )
E ( t ) [ ( ) ( ) ] =
T
( t)
Nf
=
B1
D 21
T (t )
B 1T D 21
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
x = A x + B 2 u 2 + K FC ( y 2 C 2 x D 22 u 2 )
T
K FC = ( YC 2 + N f )
T 1
= ( YC 2 + B 1 D 21 ) ( D 21 D 21 )
YA + A Y ( YC 2 + N f ) ( C 2 Y + N f ) + = 0
2 Full-State Feedback
10-110
h2syn
u 2 = K FI x
1
K FI = R ( B 2 X + N c ) = ( D 12 D 12 ) ( B 2 X + D 12 C 1 )
where X = XT0 solves the state-feedback Riccati equation
T
A X + X A ( XB 2 + N c ) R ( B 2 X + N c ) + Q = 0
The final positive-feedback H2 optimal controller u 2 = K ( s )y 2 has a familiar
closed-form
K( s ) :=
A K FC C 2 B 2 K FI + K FC D 22 K FI
Kf
K FI
1
---
The full information (FI) cost is given by the equation ( trace ( B 1 X 2 B 1 ) ) 2 . The
1
---
1
---
1
---
cost (FC) is given by ( trace ( C 1 Y 2 C 1 ) ) 2 . 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
= T y 1 u 1 2 is
10-111
h2syn
Limitations
References
See Also
10-112
augw
hinfsyn
hankelmr
Purpose
10hankelmr
Syntax
GRED = hankelmr(G)
GRED = hankelmr(G,order)
[GRED,redinfo] = hankelmr(G,key1,value1,...)
[GRED,redinfo] = hankelmr(G,order,key1,value1,...)
Description
hankelmr returns a reduced order model GRED of G and a struct array redinfo
containing the error bound of the reduced model and Hankel singular values of
the original system.
The error bound is computed based on Hankel singular values of G. For a stable
system Hankel singular values indicate the respective state energy of the
system. Hence, reduced order can be directly determined by examining the
system Hankel SVs, .
With only one input argument G, the function will show a Hankel singular
value plot of the original model and prompt for model order number to reduce.
This method guarantees an error bound on the infinity norm of the additive
error || G-GRED || for well-conditioned model reduced problems [1]:
G Gred 2
i
k+1
Note It seems this method is similar to the additive model reduction routines
balancmr and schurmr, but actually it can produce more reliable reduced
order model when the desired reduced model has nearly controllable and/or
observable states (has Hankel singular values close to machine accuracy).
hankelmr will then select an optimal reduced system to satisfy the error bound
criterion regardless the order one might naively select at the beginning.
10-113
hankelmr
Description
ORDER
In this case, reduced order will be determined when the sum of the tails of the
Hankel sv's reaches the 'MaxError'.
Argument
Value
Description
'MaxError'
Real number or
vector of
different errors
'Weights'
{Wout,Win} cell
array
'Display'
'on' or 'off'
'Order'
Integer, vector
or cell array
Weights on the original model input and/or output can make the model
reduction algorithm focus on some frequency range of interests. But weights
have to be stable, minimum phase and invertible.
10-114
hankelmr
Description
GRED
REDINFO
Note If size(GRED) is not equal to the order you specified. The optimal
Hankel MDA algorithm has selected the best Minimum Degree Approximate
it can find within the allowable machine accuracy.
Algorithm
Given a state-space (A,B,C,D) of a system and k, the desired reduced order, the
following steps will produce a similarity transformation to truncate the
original state-space system to the kth order reduced model:
1 Find the controllability and observability grammians P and Q.
2 Form the descriptor
2
E = QP I
where k > k + 1 , and descriptor state-space
Take SVD of descriptor E and partition the result into kth order truncation
form
Es A
= A + QAP QB
CP
D
10-115
hankelmr
T
E 0 V E1
E = [U E1,U E2]
T
0 0 V E2
have
T
A 11 A 12
U E1
2 T
=
( A + QAP ) V E1 V E2
T
A 21 A 22
U E2
B1
B2
T
U E1
T
U E2
C1 C2 =
QB C
CP
B
V E1 V E2
D1 = D
4 Form the equivalent state-space model.
1 ( A A A A ) 1 ( B A A B )
E
B
11
12 22
21
E
1
12 22
2
=
C 1 C 2 A 22 A 21
D 1 C 2 A 22 B 2
D
The final kth order Hankel MDA is the stable part of the above state-space
realization. Its anticausal part is stored in redinfo.Ganticausal.
The proof of the Hankel MDA algorithm can be found in [2]. The error system
between the original system G and the Zeroth Order Hankel MDA G0 is an
all-pass function [1].
Examples
10-116
hankelmr
10-117
hankelmr
Figure 10-7: All-Pass Error System Between G and Zeroth Order G Anticausal
10-118
hankelmr
References
See Also
reduce
balancmr
schurmr
bstmr
ncfmr
hankelsv
10-119
hankelsv
Purpose
10hankelsv
Syntax
hankelsv(G)
hankelsv(G,ErrorType,style)
[sv_stab,sv_unstab]=hankelsv(G,ErrorType,style)
Description
10-120
hankelsv
Algorithm
Argument
Value
Description
ERRORTYPE
'add'
'mult'
'ncf'
STYLE
'abs'
'log'
Absolute value
logarithm scale
This method not only takes the advantages of robust SVD algorithm, but also
ensures the computations stay well within the square root of the machine
accuracy.
For ErrorType = 'mult', hankelsv computes the Hankel singular value of the
phase matrix of G [2].
For ErrorType = 'ncf', hankelsv computes the Hankel singular value of the
normalized coprime factor pair of the model [3].
10-121
hankelsv
References
[1] Safonov, M.G., and R.Y. Chiang, A Schur Method for Balanced Model
Reduction, IEEE Trans. on Automat. Contr., vol. AC-2, no. 7, July 1989, pp.
729-733.
[2] Safonov, M.G., and R.Y. Chiang, Model Reduction for Robust Control: A
Schur Relative Error Method, International J. of Adaptive Control and Signal
Processing, Vol. 2, pp. 259-272, 1988.
[3] Vidyasagar, M., Control System Synthesis - A Factorization Approach.
London: The MIT Press, 1985.
See Also
10-122
reduce
balancmr
schurmr
bstmr
ncfmr
hankelmr
hinfgs
Purpose
10hinfgs
Syntax
[gopt,pdK,R,S] = hinfgs(pdP,r,gmin,tol,tolred)
Description
P z = C 1 ( p )x + D 11 ( p )w + D 12 u
y = C x + D w + D u
2
21
22
where the time-varying parameter vector p(t) ranges in a box and is measured
in real time, hinfgs seeks an affine parameter-dependent controller
= A K ( p ) + B K ( p )y
K
u = C K ( p ) + D K ( p )y
scheduled by the measurements of p(t) and such that
K stabilizes the closed-loop system
z
w
P
u
K
10-123
hinfgs
Controller
Implementation
CK ( p ) DK ( p )
command
Kj = psinfo(pdK,'sys',j)
gives the corresponding corner j of the parameter box (pv is the parameter
vector description).
The controller scheduling should be performed as follows. Given the
measurements p(t) of the parameters at time t,
1 Express p(t) as a convex combination of the j:
N
p(t) = 11 + . . .+ NN,
j 0,
= 1
i=1
C
(
t
)
D
K
K( t )
10-124
=
j K .
i=1
hinfgs
3 Use AK(t), BK(t), CK(t), DK(t) to update the controller state-space equations.
References
See Also
psys
pvec
pdsimul
polydec
10-125
hinfsyn
Purpose
10hinfsyn
Syntax
[K,CL,GAM,INFO] = hinfsyn(P)
[K,CL,GAM,INFO] = hinfsyn(P,NMEAS,NCON)
[K,CL,GAM,INFO] = hinfsyn(P,NMEAS,NCON,KEY1,VALUE1,KEY2,VALUE2,...)
Description
A B1 B2
P = C 1 D 11 D 12
C 2 D 21 D 22
The controller, K, stabilizes the P and has the same number of states as P. The
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 optional KEY and VALUE inputs
determine tolerance, solution method and so forthsee Figure 10-8, H control
system CL= lft(P,K)=, on page 10-126 for details.
The closed-loop system is returned in CL and the achieved H cost in GAM.
INFO is a STRUCT array that returns additional information about the
designsee Figure 10-9, Optional input arguments (KEY, VALUE) pairs, on
page 10-127.
u2
A B1 B2
D 11 D 12
P= C 1 P(s)
C 2 D 21 D 22
y1
y2
K
F(s)
Figure 10-8:
10-126
lft(P,K)= T y u
1 1
hinfsyn
Key
Value
Meaning
'GMAX'
real
'GMIN'
real
'TOLGAM'
real
'S0'
real
'METHOD'
'ric'
'lmi'
LMI solution
'maxe'
'off'
'on'
'DISPLAY'
Description
LTI controller
CL= lft(P,K)
10-127
hinfsyn
GAM = norm(CL,Inf)
The H cost = T y 1 u 1
INFO
INFO.KFI
Algorithm
INFO.KFC
INFO.GAMFI
INFO.GAMFC
The default 'ric' method uses the two-riccati formulae ([4],[5]) with
loopshifting [6]. In the case of the 'lmi' method, hinfsyn employs the LMI
technique ([7],[8],[9]). With 'METHOD' 'maxe', K returns the max entropy H
controller that minimize an entropy integral relating to the point s0; i.e.,
2
s 02
2
Entropy = -----ln detI T y 1 u1 ( j ) T y 1 u 1 ( j ) --------------------- d
2
s 2 + 2
0
where T y 1 u 1 is the closed-loop transfer function CL. With all methods, hinfsyn
uses a standard -iteration technique to determine the optimal value of .
Starting with high and low estimates of . The -iteration is a bisection
algorithm that iterates on the value of in an effort to approach the optimal H
control design. The stopping criterion for the bisection algorithm requires the
relative difference between the last value that failed and the last value that
passed be less than TOLGAM (default=.01)
10-128
hinfsyn
10-129
hinfsyn
K=lft(INFO.AS,U)
u2
y1
P(s)
K(s)
y2
KAS(s)
U(s)
F(s)
K(s)
10-130
hinfsyn
Examples
Example 1
A random 4-by-5 plant with 3-states, NMEAS=2, NCON=2
rand('seed',0);randn('seed',0);
P=rss(3,4,5);
[K,CL,GAM]=hinfsyn(P,2,2);
sigma(CL,ss(GAM));
Example 2
Mixed-Sensitivity,
0.1 ( s + 1000 )
1- W = ----------------------------------G ( s ) = s----------, W 2 = 0.1
, 1
100s + 1
s2
and there is no W3.
s=zpk('s');
G=(s-1)/(s+1);
W1=0.1*(s+100)/(100*s+1); W2=0.1; W3=[];
P=(G,W1,W2,W3);
[K,CL,GAM]=hinfsyn(P);
sigma(CL,ss(GAM));
Example 3
Mixed sensitivity with W1 removed.
s=zpk('s');
G=(s-1)/(s+1);
W1=[]; W2=0.1; W3=[];
P=(G,W1,W2,W3)
[K,CL,GAM]=hinfsyn(P)
10-131
hinfsyn
Limitation
The plant must be stabilizable from the control inputs u2 and detectable from
the measurement output y2:
(A,B2) must be stabilizable and (C2,A) must be detectable.
Otherwise, hinfsyn returns an error.
References
[1] Glover, K., and J.C. Doyle, State-space formulae for all stabilizing
controllers that satisfy an Hnorm bound and relations to risk sensitivity,
Systems and Control Letters, vol. 11, pp. 167172, 1988.
[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. 831847, August 1989
[3] Safonov, M.G., D.J.N. Limebeer, and R.Y. Chiang, Simplifying the H
Theory via Loop Shifting, Matrix Pencil and Descriptor Concepts, Int. J.
Contr., vol. 50, no. 6, pp. 2467-2488, 1989.
[4] Packard, A., K. Zhou, P. Pandey, J. Leonhardson, and G. Balas, Optimal,
constant I/O similarity scaling for full-information and state-feedback
problems, Systems and Control Letters, 19:271280, 1992.
[5] Gahinet, P., and P. Apkarian, A linear matrix inequality approach to
H1-control, Int J. Robust and Nonlinear Control, 4(4):421448, JulyAugust
1994.
[6] Iwasaki, T., and R.E. Skelton, All controllers for the general H -control
problem: LMI existence conditions and state space formulas, Automatica,
30(8):13071317, August 1994.
See Also
10-132
augw
h2syn
loopsyn
mktito
ncfsyn
iconnect
Purpose
10iconnect
Syntax
H = iconnect
Description
Examples
following figure.
10-133
iconnect
s
----s + 2
#2:
2
----s + 2
By not explicitly introducing e, this can be done more concisely with only one
equality constraint.
r = icsignal(1);
y = icsignal(1);
N = iconnect;
N.Input = r;
N.Output = [r-y;y];
N.Equation{1} = equate(y,tf(2,[1 0])*(r-y));
tf(N.System)
You have created the same transfer functions from input to outputs.
#1:
s
----s + 2
#2:
2
----s + 2
10-134
=
=
=
=
=
=
ureal('R',1,'Percentage',[-10 40]);
ureal('K',2e-3,'Percentage',[-30 30]);
icsignal(1);
icsignal(1);
icsignal(1);
icsignal(1);
iconnect
M = iconnect;
M.Input = [W;I];
M.Output = [V;T];
M.Equation{1} = equate(V-R*I-K*W,iczero(1));
M.Equation{2} = equate(T,K*I);
B = M.System
UMAT: 2 Rows, 2 Columns
K: real, nominal = 0.002, variability = [-30 30]%, 2 occurrences
R: real, nominal = 1, variability = [-10 40]%, 1 occurrence
B.NominalValue
ans =
0.0020
1.0000
0
0.0020
y2
y1
g; g
6+ 6++
noise
57.3
setpoint
wt
deltemp
act
10-135
iconnect
P = rss(3,2,2);
K = rss(1,1,2);
A = rss(1,1,1);
W = rss(1,1,1);
M = iconnect;
noise = icsignal(1);
deltemp = icsignal(1);
setpoint = icsignal(1);
yp = icsignal(2);
rad2deg = 57.3
rad2deg =
57.3000
M.Equation{1} =
equate(yp,P*[W*deltemp;A*K*[noise+yp(2);setpoint]]);
M.Input = [noise;deltemp;setpoint];
M.Output = [rad2deg*yp(1);setpoint-yp(2)];
T = M.System;
size(T)
State-space model with 2 outputs, 3 inputs, and 6 states.
Algorithm
Limitations
The syntax for iconnect objects and icsignals is very flexible. Without care,
you can build inefficient (i.e., nonminimal) representations where the state
dimension of the interconnection is greater than the sum of the state
dimensions of the components. This is in contrast to sysic. In sysic, the
syntax used to specify inputs to systems (the input_to_ListedSubSystemName
variable) forces you to include each subsystem of the interconnection only once
in the equations. Hence, interconnections formed with sysic are
componentwise minimal. That is, the state dimension of the interconnection
equals the sum of the state dimensions of the components.
See Also
equate
icsignal
sysic
10-136
icsignal
Purpose
10icsignal
Syntax
v = icsignal(n);
v = icsignal(n,'name');
Description
See Also
iconnect
sysic
10-137
imp2exp
Purpose
10imp2exp
Syntax
B = imp2exp(A,yidx,uidx)
Description
The constraint matrix A can be a double, ss, tf, zpk and frd object as well
as an uncertain object, including umat, uss and ufrd. The result B will be of the
same class.
Examples
and then
B = imp2exp(A,Yidx,Uidx)
B =
-1.7500
10-138
imp2exp
P = tf([1],[1 0]);
C = tf([2*.707*1 1^2],[1 0]);
A = [1 -1 0 0 0 -1;0 -C 1 0 0 0;0 0 -1 -1 1 0;0 0 0 0 -P 1];
OutputIndex = [6;3;2;5]; % [y;u;e;f]
InputIndex = [1;4];
% [r;d]
Sys = imp2exp(A,OutputIndex,InputIndex);
10-139
imp2exp
Sys.InputName = {'r';'d'};
Sys.OutputName = {'y';'u';'e';'f'};
pole(Sys)
ans =
-0.7070 + 0.7072i
-0.7070 - 0.7072i
step(Sys)
Step Response
From: r
From: d
2
1.5
To: y
1
0.5
0
0.5
2
To: u
1
0
Amplitude
1
2
1
To: e
0.5
0
0.5
1
2
To: f
1
0
1
2
80
1
Time (sec)
Algorithm
See Also
iconnect
inv
10-140
imp2ss
Purpose
10imp2ss
Syntax
[a,b,c,d,totbnd,hsv] = imp2ss(y)
[a,b,c,d,totbnd,hsv] = imp2ss(y,ts,nu,ny,tol)
[ss,totbnd,hsv] = imp2ss(imp)
[ss,totbnd,hsv] = imp2ss(imp,tol)
Description
H1 H2 H3 HN
H2 H3 H4 0
H3 H4 H5 0
...
...
...
...
...
H N 0 0s
Denoting by GN a high-order exact realization of y, the low-order approximate
model G enjoys the H norm bound
10-141
imp2ss
G G N totbnd
where
N
totbnd = 2
i = n+1
Algorithm
= UV = [ U 1 U 2 ]
1 0
V 1
0 2 V 2
= U 1 1 V 1
where 1 has dimension n n and the entries of 2 are nearly zero. U1 and
V1 have ny and nu columns, respectively.
3 Partition the matrices U1 and V1 into three matrix blocks:
U 11
V 11
U 1 = U 12 ; V 12
U 13 V 13
ny n
nu n
where U 11 , U 13 C
and V 11 , V 13 C
4 A discrete state-space realization is computed as
10-142
imp2ss
1 2
A = 1
1 2
B = 1
12
U 1
V 11
1 2
C = U 11 1
D = H0
where
U=
U 11
U 12
U 12
U 13
5 If the sampling time t is greater than zero, then the realization is converted
References
[1] Al-Saggaf, U.M., and G.F. Franklin, An Error Bound for a Discrete
Reduced Order Model of a Linear Multivariable System, IEEE Trans. on
Autom. Contr., AC-32, 1987, p. 815-819.
[2] Kung, S.Y., A New Identification and Model Reduction Algorithm via
Singular Value Decompositions, Proc.Twelth Asilomar Conf. on Circuits,
Systems and Computers, November 6-8, 1978, p. 705-714.
[3] Silverman, L.M., and M. Bettayeb, Optimal Approximation of Linear
Systems, Proc. American Control Conf., San Francisco, CA, 1980.
10-143
ispsys
Purpose
10ispsys
Syntax
bool = ispsys(sys)
Description
system.
See Also
10-144
psys
psinfo
isuncertain
Purpose
10isuncertain
Syntax
B = isuncertain(A)
Description
Examples
Limitations
isuncertain only checks the class of the input argument, and does not actually
verify that the input argument is truly uncertain. Create a umat by lifting a
constant (i.e., not-uncertain) matrix to the umat class.
A = umat([2 3;4 5;6 7]);
10-145
isuncertain
10-146
lftdata
Purpose
10lftdata
Decompose uncertain object into fixed normalized and fixed uncertain parts
Syntax
[M,Delta] = lftdata(A);
[M,Delta] = lftdata(A,List);
[M,Delta,Blkstruct] = lftdata(A);
[M,Delta,Blkstruct,Normunc] = lftdata(A);
Description
If A is a umat, then M will be double; if A is a uss, then M will be ss; if A is a ufrd,
then M will be frd. In all cases, Delta is a umat.
[M,Delta] = lftdata(A,List) separates the uncertain object A into an
uncertain object M, in feedback with a normalized uncertain matrix Delta. List
is a cell (or char) array of names of uncertain elements of A that make up Delta.
All other uncertainty in A remains in M.
lftdata(A,fieldnames(A.Uncertainty)) is the same as lftdata(A).
[M,DELTA,BLKSTRUCT] = LFTDATA(A) returns an N-by-1 structure array
BLKSTRUCT, where BLKSTRUCT(i) describes the i-th normalized uncertain
10-147
lftdata
Examples
Create an uncertain matrix A with 3 uncertain parameters p1, p2 and p3. You
can decompose A into it certain, M, and normalized uncertain parts, Delta.
p1 = ureal('p1',-3,'perc',40);
p2 = ucomplex('p2',2);
A = [p1 p1+p2;1 p2];
[M,Delta] = lftdata(A);
You can inspect the difference between the original uncertain matrix, A, and
the result formed by combining the two results from the decomposition.
simplify(A-lft(Delta,M))
ans =
0
0
0
0
M
M =
0
0
1.0954
0
0
0
1.0954
1.0000
-3.0000
0
1.0000
1.0000
1.0954
1.0000
-1.0000
2.0000
You can check the worst-case norm of the uncertain part using wcnorm.
Compare samples of the uncertain part A with the uncertain matrix A.
wcn = wcnorm(Delta)
wcn =
lbound: 1.0000
ubound: 1.0001
usample(Delta,5)
ans(:,:,1) =
0.8012
0
ans(:,:,2) =
0.4919
0
10-148
0
0.2499 + 0.6946i
0
0.2863 + 0.6033i
lftdata
ans(:,:,3) =
-0.1040
0
ans(:,:,4) =
0.8296
0
ans(:,:,5) =
0.6886
0
0
0.7322 - 0.3752i
0
0.6831 + 0.1124i
0
0.0838 + 0.3562i
Uncertain Systems
Create an uncertain matrix A with 2 uncertain real parameters v1 and v2 and
create an uncertain system G using A as the dynamic matrix and simple
matrices for the input and output.
A = [ureal('p1',-3,'perc',40) 1;1 ureal('p2',-2)];
sys = ss(A,[1;0],[0 1],0);
sys.InputGroup.ActualIn = 1;
sys.OutputGroup.ActualOut = 1;
You can decompose G into a certain system, Msys, and a normalized uncertain
matrix, Delta. You can see from Msys that it is certain and that the input and
output groups have been adjusted.
[Msys,Delta] = lftdata(sys);
Msys
a =
x1
x2
x1
-3
1
x2
1
-2
b =
x1
x2
u1
1.095
0
u2
0
1
x1
x2
u3
1
0
c =
10-149
lftdata
y1
y2
y3
1.095
0
0
0
1
1
d =
y1
y2
y3
u1
0
0
0
u2
0
0
0
Input groups:
Name
ActualIn
p1_NC
p2_NC
Output groups:
Name
ActualOut
p1_NC
p2_NC
u3
0
0
0
Channels
3
1
2
Channels
3
1
2
Continuous-time model.
You can compute the norm on samples of the difference between the original
uncertain matrix and the result formed by combining Msys and Delta.
norm(usample(sys-lft(Delta,Msys),'p1',4,'p2',3),'inf')
ans =
0
0
0
0
0
0
0
0
0
0
0
0
Partial Decomposition
Create an uncertain matrix A and derive an uncertain matrix B using an
implicit-to-explicit conversion, imp2exp. Note that B has 2 uncertain
parameters R and K. You can decompose B into certain, M, and normalized
uncertain parts, Delta.
10-150
lftdata
R = ureal('R',1,'Percentage',[-10 40]);
K = ureal('K',2e-3,'Percentage',[-30 30]);
A = [1 -R 0 -K;0 -K 1 0];
Yidx = [1 3];
Uidx = [4 2];
B = imp2exp(A,Yidx,Uidx);
[M,Delta] = lftdata(B);
Sample and inspect the uncertain part as well as the difference between the
original uncertain matrix and the sampled matrix. You can see the result
formed by combining the two results from the decomposition.
[Mall,Deltaall] = lftdata(B,{'K';'R'});
simplify(Mall)-M
ans =
0
0
0
0
0
10-151
lftdata
0
0
0
0
See Also
10-152
lft
ssdata
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
lmiedit
Purpose
10lmiedit
Syntax
lmiedit
Description
An LMI can stretch over several lines. However, do not specify more than
one LMI per line.
Once the LMI system is fully specified, you can perform the following
operations by pressing the corresponding button:
Visualize the sequence of lmivar/lmiterm commands needed to describe this
LMI system (view commands buttons)
Conversely, display the symbolic expression of the LMI system produced by
a particular sequence of lmivar/lmiterm commands (click the describe...
buttons)
Save the symbolic description of the LMI system as a MATLAB string (save
button). This description can be reloaded later on by pressing the load
button
Read a sequence of lmivar/lmiterm commands from a file (read button). The
matrix expression of the LMI system specified by these commands is then
displayed by clicking describe the LMIs...
Write in a file the sequence of lmivar/lmiterm commands needed to specify
a particular LMI system (write button)
Generate the internal representation of the LMI system by pressing create.
The result is written in a MATLAB variable with the same name as the LMI
system
10-153
lmiedit
Remark
Editable text areas have built-in scrolling capabilities. To activate the scroll
mode, click in the text area, maintain the mouse button down, and move the
mouse up or down. The scroll mode is only active when all visible lines have
been used.
See Also
lmivar
lmiterm
newlmi
lmiinfo
10-154
lmiinfo
Purpose
10lmiinfo
Syntax
lmiinfo(lmisys)
Description
This includes the type and structure of the matrix variables, the number of
diagonal blocks in the inner factors, and the term content of each block.
lmiinfo is an interactive facility where the user seeks specific pieces of
where N,M denote the outer factors and L,R the left and right inner factors. If
the outer factors are missing, the LMI is simply written as
L(x) < R(x)
Information on the block structure and term content of L(x) and R(x) is also
available. The term content of a block is symbolically displayed as
C1 + A1*X2*B1 + B1'*X2*A1' + a2*X1 + x3*Q1
10-155
lmiinfo
Examples
T
T T
0 2X + A YB + B Y A + I XC
C X
zI
where the matrix variables are X of Type 1, Y of Type 2, and z scalar. If this
LMI is described in lmis, information about X and the LMI block structure can
be obtained as follows:
lmiinfo(lmis)
LMI ORACLE
-----This is a system of 1 LMI with 3 variable matrices
Do you want information on
(v) matrix variables (l) LMIs (q) quit
?> v
Which variable matrix (enter its index k between 1 and 3) ? 1
X1 is a 2x2 symmetric block diagonal matrix
its (1,1)-block is a full block of size 2
------This is a system of 1 LMI with 3 variable matrices
Do you want information on
(v) matrix variables (l) LMIs (q) quit
?> l
Which LMI (enter its number k between 1 and 1) ? 1
This LMI is of the form
0 < R(x)
where the inner factor(s) has 2 diagonal block(s)
10-156
lmiinfo
Note that the prompt symbol is ?> and that answers are either indices or
letters. All blocks can be displayed at once with option (w), or you can prompt
for specific blocks with option (b).
Remark
lmiinfo does not provide access to the numerical value of LMI coefficients.
See Also
decinfo
lminbr
10-157
lmiinfo
matnbr
decnbr
10-158
lminbr
Purpose
10lminbr
Syntax
k = lminbr(lmisys)
Description
lminbr returns the number k of linear matrix inequalities in the LMI problem
described in lmisys.
See Also
lmiinfo
matnbr
10-159
lmireg
Purpose
10lmireg
Syntax
region = lmireg
region = lmireg(reg1,reg2,...)
Description
Recall that an LMI region is any convex subset D of the complex plane that can
be characterized by an LMI in z and z , i.e.,
D = {z C : L + Mz + MT z < 0}
for some fixed real matrices M and L = LT. This class of regions encompasses
half planes, strips, conic sectors, disks, ellipses, and any intersection of the
above.
Calling lmireg without argument starts an interactive query/answer session
where you can specify the region of your choice. The matrix region = [L, M] is
returned upon termination. This matrix description of the LMI region can be
passed directly to msfsyn for synthesis purposes.
The function lmireg can also be used to intersect previously defined LMI
regions reg1, reg2,.... The output region is then the [L, M] description of
the intersection of these regions.
See Also
10-160
msfsyn
lmiterm
Purpose
10lmiterm
Syntax
lmiterm(termID,A,B,flag)
Description
lmiterm specifies the term content of an LMI one term at a time. Recall that
LMI term refers to the elementary additive terms involved in the block-matrix
expression of the LMI. Before using lmiterm, the LMI description must be
initialized with setlmis and the matrix variables must be declared with
lmivar. Each lmiterm command adds one extra term to the LMI system
currently described.
termID (1) =
-p
where positive p is for terms on the left-hand side of the p-th LMI and negative
p i s for terms on the right-hand side of the p-th LMI.
Recall that, by convention, the left-hand side always refers to the smaller side
of the LMI. The index p is relative to the order of declaration and corresponds
to the identifier returned by newlmi.
[ 0, 0 ] for outer factors
10-161
lmiterm
T
x for variable terms AX B
where x is the identifier of the matrix variable X as returned by lmivar.
The arguments A and B contain the numerical data and are set according to:
Type of Term
outer factor N
matrix value of N
omit
constant term C
matrix value of C
omit
variable term
AXB or AXTB
matrix value of A
(1 if A is absent)
matrix value of B
(1 if B is absent)
Note that identity outer factors and zero constant terms need not be specified.
The extra argument flag is optional and concerns only conjugated expressions
of the form
(AXB) + (AXB)T = AXB + BTX(T)AT
in diagonal blocks. Setting flag = 's' allows you to specify such expressions
with a single lmiterm command. For instance,
lmiterm([1 1 1 X],A,1,'s')
adds the symmetrized expression AX + XTAT to the (1,1) block of the first LMI
and summarizes the two commands
lmiterm([1 1 1 X],A,1)
lmiterm([1 1 1 X],1,A')
Aside from being convenient, this shortcut also results in a more efficient
representation of the LMI.
10-162
lmiterm
Examples
T
T T
2AX 2 A x 3 E + DD B X 1
X1 B
I
T T
T
T CX 1 C + CX 1 C
0
< M
0
f X2
1
1
1
2
2
1
1
1
1
2
X2],2*A,A') % 2*A*X2*A'
x3],-1,E) % -x3*E
0],D*D') % D*D'
-X1],1,B) % X1'*B
0],-1) % -I
Note that CX1CT + CX1TCT is specified by a single lmiterm command with the
flag 's' to ensure proper symmetrization.
See Also
setlmis
lmivar
getlmis
lmiedit
newlmi
10-163
lmivar
Purpose
10lmivar
Syntax
X = lmivar(type,struct)
[X,n,sX] = lmivar(type,struct)
Description
lmivar defines a new matrix variable X in the LMI system currently described.
The optional output X is an identifier that can be used for subsequent reference
to this new variable.
The first argument type selects among available types of variables and the
second argument struct gives further information on the structure of X
depending on its type. Available variable types include:
type=1: Symmetric matrices with a block-diagonal structure. Each diagonal
block is either full (arbitrary symmetric matrix), scalar (a multiple of the
identity matrix), or identically zero.
If X has R diagonal blocks, struct is an R-by-2 matrix where
struct(r,1) is the size of the r-th block.
struct(r,2) is the type of the r-th block (1 for full, 0 for scalar, 1 for zero
block).
type=2: Full m-by-n rectangular matrix. Set struct = [m,n] in this case.
type=3: Other structures. With Type 3, each entry of X is specified as zero or
xn where xn is the n-th decision variable.
Accordingly, struct is a matrix of the same dimensions as X such that
struct(i,j)=0 if X(i, j) is a hard zero
struct(i,j)=n if X(i, j) = xn
struct(i,j)= n if X(i, j) = xn
Sophisticated matrix variable structures can be defined with Type 3. To specify
a variable X of Type 3, first identify how many free independent entries are
involved in X. These constitute the set of decision variables associated with X.
If the problem already involves n decision variables, label the new free
variables as xn+1, . . ., xn+p. The structure of X is then defined in terms of
xn+1, . . ., xn+p as indicated above. To help specify matrix variables of Type 3,
lmivar optionally returns two extra outputs: (1) the total number n of scalar
10-164
lmivar
decision variables used so far and (2) a matrix sX showing the entry-wise
dependence of X on the decision variables x1, . . ., xn.
Example 1
Consider an LMI system with three matrix variables X1, X2, X3 such that
X1 is a 3 3 symmetric matrix (unstructured).
X2 is a 2 4 rectangular matrix (unstructured).
X3 =
0 0
0 1 0
0 0 2 I2
The last command defines X3 as a variable of Type 1 with one full block of size
5 and two scalar blocks of sizes 1 and 2, respectively.
Example 2
Combined with the extra outputs n and sX of lmivar, Type 3 allows you to
specify fairly complex matrix variable structures. For instance, consider a
matrix variable X with structure
X 0
X = 1
0 X
2
where X1 and X2 are 2-by-3 and 3-by-2 rectangular matrices, respectively. You
can specify this structure as follows:
1 Define the rectangular variables X1 and X2 by
setlmis([])
10-165
lmivar
The outputs sX1 and sX2 give the decision variable content of X1 and X2:
sX1
sX1 =
1
4
2
5
3
6
sX2
sX2 =
7
9
11
8
10
12
For instance, sX2(1,1)=7 means that the (1,1) entry of X2 is the seventh
decision variable.
2 Use Type 3 to specify the matrix variable X and define its structure in terms
See Also
setlmis
lmiterm
getlmis
lmiedit
skewdec
10-166
2
5
0
0
0
3
6
0
0
0
0
0
0
0
7
8
9
10
11 12
lmivar
delmvar
setmvar
10-167
loopmargin
Purpose
10loopmargin
Syntax
[sm,dm,mm] = loopmargin(L)
[cmi,dmi,mmi,cmo,dmo,mmo,mmio] = loopmargin(P,C)
Description
calculates the largest region such that for all gain and phase variations,
occurring independently in each channel, lie inside the region, that the
closed-loop system is stable. Note that mm is a single structure, independent of
because the number of channels, variations in all channels are handled
simultaneously. As in the case for disk margin, the guaranteed bounds are
calculated based on a balanced sensitivity function.
The wcmargin command is used to analyze single-loop margins in the presence
of the worst-case uncertainty. The disk margin and multiloop disk margin
calculations are performed in the frequency domain. Unless L is an frd object,
the frequency range and number of points used to calculate the dm and mm
margins are chosen automatically (see bode command).
The output arguments can be limited to only those requested using an optional
character string argument. [M1,M2] = loopmargin(L,'m,c') returns the
multiloop disk margin ('m') in M1, and the classical margins ('c') in M2.
Use'd' to specify the disk margin. This optional second argument may be any
combination, in any order, of the 3 characters 'c', 'd', and 'm'.
10-168
loopmargin
cmi,dmi and mmi structures correspond to the loop-at-a-time gain and phase
margins, disk margins and multiloop channel margins at the plant input
respectively. The structures cmo, dmo and mmo have the same fields as described
for cmi, dmi and mmi though they correspond to the plant outputs. mmio, or
multiinput/multioutput margins, is a structure corresponding to simultaneous,
independent, variations in all the individual input and output channels of the
feedback loops. mmio has the same fields as mmi and mmo.
If the closed-loop system is an ss/tf/zpk, the frequency range and number of
points used to calculate cm, dm and mm margins are chosen automatically.
The output arguments can be limited to only those requested using an optional
character string argument. [M1,M2,M3] = loopmargin(P,C,'mo,ci,mm')
returns the multiloop disk margin at the plant output ('mo') in M1, the
classical margins at the plant input ('ci') in M2, and the disk margins for
simultaneous, independent variations in all input and output channels ('mm')
in M3. Use'd' to specify the disk margin. This optional third argument may be
any combination, in any order, of the 7 character pairs 'ci', 'di', mi', 'co',
do', 'mo', and 'mm'.
10-169
loopmargin
Basic Syntax
[sm,dm,mm] = loopmargin(L) sm is calculated using the allmargin command
and has the same fields as allmargin. The sm is a structure with the following
fields:
Field
Description
GMFrequency
GainMargin
PhaseMargin
PMFrequency
DelayMargin
Stable
10-170
Field
Description
GainMargin
PhaseMargin
Frequency
loopmargin
Description
GainMargin
PhaseMargin
Frequency
10-171
loopmargin
Examples
; 6 d- K
;6
Note You can compute a limited set of margins using the syntax
[dmo,mmo,mmio]=loopmargin(G,K,'di,do,mm')
First consider the margins at the input to the plant. The first input channel has
infinite gain margin and 90 degrees of phase margin based on the results from
10-172
loopmargin
the allmargin command, cmi(1). The disk margin analysis, dmi, of the first
channel provides similar results.
cmi(1)
ans =
GMFrequency:
GainMargin:
PMFrequency:
PhaseMargin:
DMFrequency:
DelayMargin:
Stable:
dmi(1)
ans =
GainMargin:
PhaseMargin:
Frequency:
[1x0 double]
[1x0 double]
21
90
21
0.0748
1
[0 Inf]
[-90 90]
1.1168
The second input channel has a gain margin of 2.105 and infinite phase margin
based on the single-loop analysis, cmi(2). The disk margin analysis, dmi(2),
which allows for simultaneous gain and phase variations a loop-at-a-time
results in maximum gain margin variations of 0.475 and 2.105 and phase
margin variations of +/- 39.18 degs.
cmi(2)
ans =
GMFrequency:
GainMargin:
PMFrequency:
PhaseMargin:
DMFrequency:
DelayMargin:
Stable:
dmi(2)
ans =
GainMargin:
PhaseMargin:
Frequency:
0
2.1053
[1x0 double]
[1x0 double]
[1x0 double]
[1x0 double]
1
[0.4749 2.1056]
[-39.1912 39.1912]
0.0200
10-173
loopmargin
The guaranteed region of phase and gain variations for the closed-loop system
can be illustrated graphically. The disk margin analysis, dmi(2), indicates the
closed-loop system will remain stable for simultaneous gain variations of 0.475
and 2.105 ( 6.465 dB) and phase margin variations of 39.18 deg in the second
input channel. This is denoted by the region associated with the large ellipse
in the following figure. The multivariable margin analysis at the input to the
plant, mmi, indicates that the closed-loop system will be stable for independent,
simultaneous, gain margin variation up to 0.728 and 1.373 (2.753 dB) and
phase margin variations up to 17.87 deg (the dark ellipse region) in both
input channels.
10-174
loopmargin
10
10
40
30
20
10
0
10
Phase Variation (degrees)
20
30
40
The output channels have single-loop margins of infinite gain and 90 deg phase
variation. The output multivariable margin analysis, mmo, leads to a maximum
allowable gain margin variation of 0.607 and 1.649 and phase margin
variations of +/- 27.53 degs. Hence even though both output channels had
infinite gain margin and 90 degrees of phase margin, simultaneous variations
in both channels significantly reduce the margins at the plant outputs.
mmo
mmo =
GainMargin: [0.6065 1.6489]
PhaseMargin: [-27.5293 27.5293]
Frequency: 0.2287
If all the input and output channels are allow to vary independently, mmio, the
gain margin variation allow are 0.827 and 1.210 and phase margin variations
allowed are +/- 10.84 deg.
mmio
mmio =
GainMargin: [0.8267 1.2097]
PhaseMargin: [-10.8402 10.8402]
10-175
loopmargin
Frequency: 0.2287
Algorithm
10-176
loopmargin
This figure shows a comparison of a disk margin analysis with the classical
notations of gain and phase margins.
Disk gain margin (DGM) and disk phase margin (DPM) in the Nyquist plot
Unit Disk
Disk Margin
Critical point
1
0.8
0.6
Disk Margin
Imaginary Axis
0.4
0.2
DGM
GM
0.2
0.4
DPM
0.6
0.8
PM
1
1.5
0.5
0.5
Real Axis
10-177
loopmargin
References
Barrett, M.F., Conservatism with robustness tests for linear feedback control
systems, Ph.D. Thesis, Control Science and Dynamical Systems, University of
Minnesota, 1980.
Blight, J.D., R.L. Dailey, and D. Gangsass, Practical control law design for
aircraft using multivariable techniques, International Journal of Control, Vol.
59, No. 1, 1994, pp. 93-137.
10-178
loopmargin
See Also
allmargin
bode
loopsens
mussv
robuststab
wcgain
wcsens
wcmargin
10-179
loopsens
Purpose
10loopsens
Syntax
loops = loopsens(P,C)
Description
10-180
Field
Description
Poles
Stable
Si
Ti
Li
So
To
Lo
loopsens
Field
Description
PSi
CSo
Examples
Description
Equation
Input sensitivity ( TF e1 d1 )
(I+CP)1
CP(I+CP)1
Output sensitivity ( TF e3 d2 )
(I+PC)1
PC(I+PC)1
CP
PC
Consider a three input and four output plant with three integrators. One of the
integrators, uncint, is uncertain. A four input, three output constant gain
controller c is used to stabilize the closed-loop system. The gain of the
controller (1,4) entry is uncertain, ranging between 0.02 and 1.5. You can use
the loopsens command to construct the closed-loop system sensitivity,
complementary sensitivity, and loop transfer functions.
10-181
loopsens
Note that the input sensitivity, complementary sensitivity and loop transfer
functions have three inputs and three outputs, whereas the output sensitivity,
complementary sensitivity and loop transfer functions have four inputs and
four outputs. For the nominal plant model, i.e., the additive uncertainty addunc
set to zero, the closed-loop system is stable only for positive values of the gain
parameter.
gainval = reshape([-0.22 -0.215 -0.20 1.5],[1 1 4]);
nomSi = usubs(loops.Si,'gain',gainval);
pole(nomSi.NominalValue)
ans(:,:,1) =
-0.8537
0.0018 + 0.2164i
0.0018 - 0.2164i
ans(:,:,2) =
-0.8541
-0.0004 + 0.2176i
-0.0004 - 0.2176i
ans(:,:,3) =
-0.8556
10-182
loopsens
-0.0072 + 0.2207i
-0.0072 - 0.2207i
ans(:,:,4) =
-0.1663
-0.6505
-1.7533
See Also
loopmargin
robuststab
wcsens
wcmargin
10-183
loopsyn
Purpose
10loopsyn
Syntax
[K,CL,GAM,INFO]=loopsyn(G,Gd)
[K,CL,GAM,INFO]=loopsyn(G,Gd,RANGE)
Description
1
( G ( j )K ( j ) ) --- ( G d ( j ) )
(10-16)
1
( G ( j )K ( j ) ) --- ( G d ( j ) )
(10-17)
10-184
Input arguments
Description
LTI Plant
Gd
RANGE
Output arguments
Description
LTI controller
CL= G*K/(I+GK)
loopsyn
Algorithm
GAM
INFO
INFO.W
INFO.Gs
INFO.Ks
INFO.range
Using the GCD formula of Le and Safonov [1], loopsyn first computes a
stable-minimum-phase loop-shaping, squaring-down prefilter W such that the
shaped plant Gs = GW is square, and the desired shape Gd is achieved with
good accuracy in the frequency range {min,max} by the shaped plant; i.e.,
(Gd) (Gs) for all {min,max}.
Then, loopsyn uses the Glover-McFarlane [2] normalized-coprime-factor
control synthesis theory to compute an optimal loop-shaping controller for
the shaped plant via Ks=ncfsyn(Gs), and returns K=W*Ks.
If the plant G is a continuous time LTI and
1 G has a full-rank D-matrix, and
2 no finite zeros on the j-axis, and
3
{min,max}=[0,],
then GW theoretically achieves a perfect accuracy fit (Gd) = (GW) for all
frequency . Otherwise, loopsyn uses a bilinear pole-shifting bilinear
transform [3] of the form
Gshifted=bilin(G,-1,'S_Tust',[min,max]),
10-185
loopsyn
which results in a perfect fit for transformed Gshifted and an approximate fit
over the smaller frequency range [min,max] for the original unshifted G
provided that max >> min. For best results, you should choose max to be at
least 100 times greater than min. In some cases, the computation of the
optimal W for Gshifted may be singular or ill-conditioned for the range
[min,max], as when Gshifted has undamped zeros or, in the continuous-time
case only, Gshifted has a D-matrix that is rank-deficient); in such cases,
loopsyn automatically reduces the frequency range further, and returns the
reduced range [min,max] as a cell array in the output
INFO.range={min,max}.
Examples
The following code generates the optimal loopsyn loop shaping control for the
case of a 5-state, 4-output, 5-input plant with a full-rank non-minimum phase
zero at s=+10. The result in shown in Figure 10-11, LOOPSYN controller, on
page 10-187.
rand('seed',0);randn('seed',0);
s=tf('s'); w0=5; Gd=5/s;
% desired bandwith w0=5
G=((s-10)/(s+100))*rss(3,4,5);
% 4-by-5 non-min-phase plant
[K,CL,GAM,INFO]=loopsyn(G,Gd);
sigma(G*K,'r',Gd*GAM,'k-.',Gd/GAM,'k-.',{.1,100}) % plot result
dB
10-186
loopsyn
Limitations
The plant G must be stabilizable and detectable, must have at least as many
inputs as outputs, and must be full rank; i.e,
size(G,2) size(G,1)
rank(freqresp(G,w)) = size(G,1) for some frequency w.
The order of the controller K can be large. Generically, when Gd is given as a
SISO LTI, then the order NK of the controller K satisfies
NK = NGs + NW
= NyNGd + NRHP + NW
= NyNGd + NRHP + NG
where
10-187
loopsyn
References
[1] Le, V.X., and M.G. Safonov. Rational matrix GCDs and the design of
squaring-down compensatorsa state space theory. IEEE Trans.
Autom.Control, AC-36(3):384392, March 1992.
[2] Glover, K., and D. McFarlane. Robust stabilization of normalized coprime
factor plant descriptions with H-bounded uncertainty. IEEE Trans. Autom.
Control, AC-34(8):821830, August 1992.
[3] Chiang, R.Y., and M.G. Safonov. H synthesis using a bilinear pole-shifting
transform. AIAA J. Guidance, Control and Dynamics, 15(5):11111115,
SeptemberOctober 1992.
See Also
10-188
loopsyn_demo
mixsyn
ncfsyn
ltiarray2uss
Purpose
10ltiarray2uss
Syntax
usys = ltiarray2uss(P,Parray,ord)
[usys,wt] = ltiarray2uss(P,Parray,ord)
[usys,wt,diffdata] = ltiarray2uss(P,Parray,ord)
[usys,wt,diffdata] = ltiarray2uss(P,Parray,ord,'InputMult')
[usys,wt,diffdata] = ltiarray2uss(P,Parray,ord,'OutputMult')
[usys,wt,diffdata] = ltiarray2uss(P,Parray,ord,'Additive')
Description
The state order of the weighting function used to bound the multiplicative
difference between P and Parray is ord. Both P and Parray must be in the
classes ss/tf/zpk/frd. If P is an frd then usys will be a ufrd object, otherwise
usys will be a uss object. The ultidyn atom is named based on the variable
name of Parray in the calling workspace.
[usys,wt] = ltiarray2uss(P,Parray,ord) returns the weight wt used to
bound the infinity norm of ((P - Parray)/P).
[usys,wt] = ltiarray2uss(P,Parray,ord,'OutputMult') uses
= (I + wt*ultidyn('Name',[size(P,1) size(P,1)])*P).
uncertainty.
usys = P + wt*ultidyn('Name',[size(P,1) size(P,2)]).
10-189
ltiarray2uss
Example
Note See the Robust Control Toolbox demo entitled First-cut Robust
Design for a more detailed example of how to use ltiarray2uss.
Consider a third order transfer function with an uncertain gain, filter time
constant and a lightly damped flexible mode. This model is used to represent a
physical system from frequency response data is acquired.
gain = ureal('gain',10,'Perc',20);
tau = ureal('tau',.6,'Range',[.42 .9]);
wn = 40;
zeta = 0.1;
usys = tf(gain,[tau 1])*tf(wn^2,[1 2*zeta*wn wn^2]);
sysnom = usys.NominalValue;
parray = usample(usys,30);
om = logspace(-1,2,80);
parrayg = frd(parray,om);
10-190
ltiarray2uss
bode(parrayg)
Bode Diagram
2
Magnitude (abs)
10
10
10
Phase (deg)
90
180
270
1
10
10
10
Frequency (rad/sec)
10
10-191
ltiarray2uss
bodemag(wtIn1,'b-',wtIn2,'g+',diffdataIn,'r.',om)
Input Multiplicative Uncertainty Model using LTIARRAY2USS
0.3
Magnitude (abs)
10
0.4
10
0.5
10
0.6
10
1st order
2nd order
difference
0.7
10
10
10
10
Frequency (rad/sec)
10
10-192
ltiarray2uss
10
Magnitude (abs)
10
10
10
1st order
2nd order
difference
10
10
See Also
lft
ssdata
10
10
Frequency (rad/sec)
10
10-193
ltrsyn
Purpose
10ltrsyn
Syntax
[K,SVL,W1]
[K,SVL,W1]
[K,SVL,W1]
[K,SVL,W1]
Description
=
=
=
=
ltrsyn(G,F,XI,THETA,RHO)
ltrsyn(G,F,XI,THETA,RHO,W)
ltrsyn(G,F,XI,THETA,RHO,OPT)
ltrsyn(G,F,XI,THETA,RHO,W,OPT)
Only the LTI controller K for the final value RHO(end)is returned.
Inputs
10-194
LTI plant
XI
THETA
RHO
ltrsyn
Outputs
K
SVL
W1
Algorithm
K ( s ) = [ K c ( Is A + B K c + K f C K f DK c ) K f ]
where Kc=F and Kf=lqr(A',C',XI+RHO(i)*B*B',THETA). The fictitious noise
term RHO(i)*B*B' results in loop-transfer recovery as RHO(i) . The
T
10-195
ltrsyn
SV (DB)
-50
-100
-150
-200
-250
-300
10 -4
10 -3
10 -2
10 -1
10 0
10 1
10 2
10 3
10 4
Rad/Sec
Examples
s=tf('s');G=ss(1e4/((s+1)*(s+10)*(s+100)));[A,B,C,D]=ssdata(G);
F=lqr(A,B,C'*C,eye(size(B,2)));
L=ss(A,B,F,0*F*B);
XI=100*C'*C; THETA=eye(size(C,1));
RHO=[1e3,1e6,1e9,1e12];W=logspace(-2,2);
nyquist(L,'k-.');hold;
[K,SVL,W1]=ltrsyn(G,F,XI,THETA,RHO,W);
Limitations
The ltrsyn procedure may fail for non-minimum phase plants. For full-state
LTR (default OPT='INPUT'), the plant should not have fewer outputs than
inputs. Conversely for filter LTR (when OPT='OUTPUT'), the plant should not
have fewer inputs than outputs. The plant must be strictly proper, i.e., the
D-matrix of the plant should be all zeros. ltrsyn is only for continuous time
plants (Ts==0).
References
[1] Doyle, J., and G. Stein, Multivariable Feedback Design: Concepts for a
Classical/Modern Synthesis, IEEE Trans. on Automat. Contr., AC-26, pp.
4-16, 1981.
See Also
h2syn
hinfsyn
10-196
H2 controller synthesis
H controller synthesis
ltrsyn
lqg
loopsyn
ltrdemo
ncfsyn
10-197
matnbr
Purpose
10matnbr
Syntax
K = matnbr(lmisys)
Description
See Also
decnbr
lmiinfo
decinfo
10-198
mat2dec
Purpose
10mat2dec
Syntax
decvec = mat2dec(lmisys,X1,X2,X3,...)
Description
Given an LMI system lmisys with matrix variables X1, . . ., XK and given
values X1,...,Xk of X1, . . ., XK, mat2dec returns the corresponding value
decvec of the vector of decision variables. Recall that the decision variables are
the independent entries of the matrices X1, . . ., XK and constitute the free
scalar variables in the LMI problem.
This function is useful, for example, to initialize the LMI solvers mincx or gevp.
Given an initial guess for X1, . . ., XK, mat2dec forms the corresponding vector
of decision variables xinit.
An error occurs if the dimensions and structure of X1,...,Xk are inconsistent
with the description of X1, . . ., XK in lmisys.
Examples
Consider an LMI system with two matrix variables X and Y such that
X is A symmetric block diagonal with one 2-by-2 full block and one 2-by-2
scalar block
Y is a 2-by-3 rectangular matrix
Particular instances of X and Y are
X0 =
1
3
0
0
3
1
0
0
0
0
5
0
0
0
0
5
Y0 = 1 2 3
4 5 6
-1
3 4 5 6
10-199
mat2dec
Note that decv is of length 10 since Y has 6 free entries while X has 4
independent entries due to its structure. Use decinfo to obtain more
information about the decision variable distribution in X and Y.
See Also
dec2mat
decinfo
decnbr
10-200
mincx
Purpose
10mincx
Syntax
[copt,xopt] = mincx(lmisys,c,options,xinit,target)
Description
minimize c x subject to
N L(x)N M R( x)M
(10-18)
Control
Parameters
10-201
mincx
Tip for
Speed-Up
where x is the vector of decision variables. Two methods are used to solve this
problem: Cholesky factorization of ATA (default), and QR factorization of A
when the normal equation becomes ill conditioned (when close to the solution
typically). The message
* switching to QR
Memory
Problems
You should then ask your system manager to increase your swap space or, if no
additional swap space is available, set options(4) = 1. This will prevent
switching to QR and mincx will terminate when Cholesky fails due to
numerical instabilities.
10-202
mincx
References
See Also
defcx
dec2mat
decnbr
feasp
gevp
10-203
mixsyn
Purpose
10mixsyn
Syntax
[K,CL,GAM,INFO]=mixsyn(G,W1,W2,W3)
[K,CL,GAM,INFO]=mixsyn(G,W1,W2,W3,KEY1,VALUE1,KEY2,VALUE2,...)
Description
W 1S
T y1 u1 = W 2 R
W3 T
where S and T are called the sensitivity and complementary sensitivity,
respectively and S, R and T are given by
S = ( I + GK )
R = K ( I + GK )
T = GK ( I + GK )
W1
W2
+
u
1
u
e
-
W3
2
y
2
CONTROLLER
F(s)
K(s)
10-204
mixsyn
( S ( j ) ) ( W 1 ( j ) )
1
( R ( j ) ) ( W 2 ( j ) )
1
( T ( j ) ) ( W 3 ( j ) )
where =GAM. Thus, W1, W3 determine the shapes of sensitivity S and
complementary sensitivity T. Typically, you would choose W1 to be small inside
the desired control bandwidth to achieve good disturbance attenuation (i.e.,
performance), and choose W3 to be small outside the control bandwidth, which
helps to ensure good stability margin (i.e., robustness).
For dimensional compatibility, each of the three weights W1, W2 and W3 must
be either empty, scalar (SISO) or have respective input dimensions NY, NU,
and NY where G is NY-by-NU. If one of the weights is not needed, you may
simply assign an empty matrix []; e.g., P = AUGW(G,W1,[],W3) is SYS but
without the second row (without the row containing W2).
Algorithm
[K,CL,GAM,INFO]=mixsyn(G,W1,W2,W3,KEY1,VALUE1,KEY2,VALUE2,...)
is equivalent to
[K,CL,GAM,INFO]=...
hinfsyn((G,W1,W2,W3),KEY1,VALUE1,KEY2,VALUE2,...).
mixsyn accepts all the same key value pairs as hinfsyn.
Example
The following code illustrates the use of mixsyn for sensitivity and
complementary sensitivity loop-shaping.
s=zpk('s');
G=(s-1)/(s+1)^2;
W1=0.1*(s+100)/(100*s+1); W2=0.1;
[K,CL,GAM]=mixsyn(G,W1,W2,[]);
L=G*K; S=inv(1+L); T=1-S;
sigma(S,'g',T,'r',GAM/W1,'g-.',GAM*G/ss(W2),'r-.')
10-205
mixsyn
Limitations
See Also
augw
hinfsyn
10-206
mkfilter
Purpose
10mkfilter
Syntax
sys = mkfilter(fc,ord,type)
sys = mkfilter(fc,ord,type,psbndr)
Description
Description
'butterw'
Butterworth filter
'cheby'
Chebyshev filter
'bessel'
Bessel filter
'rc'
Examples
butw = mkfilter(2,4,'butterw');
cheb = mkfilter(4,4,'cheby',0.5);
rc = mkfilter(1,4,'rc');
bode(butw_g,'-',cheb_g,'--',rc_g,'-.')
megend('Butterworth','Chebyshev','RC filter')
10-207
mkfilter
Log Magnitude
10
10
10
10
10
10
Frequency (radians/sec)
Phase (degrees)
0
100
200
300
1
10
10
10
10
Frequency (radians/sec)
Limitations
The Bessel filters are calculated using the recursive polynomial formula. This
is poorly conditioned for high order filters (order > 8).
See Also
augw
10-208
mktito
Purpose
10mktito
Syntax
SYS=mktito(SYS,NMEAS,NCONT)
Description
y1
u1
P
y2
u2
SYS
Algorithm
Examples
[r,c]=size(SYS);
set(SYS,'InputGroup', struct('U1',1:c-NCONT,'U2',c-NCONT+1:c));
set(SYS,'OutputGroup',struct('Y1',1:r-NMEAS,'Y2',r-NMEAS+1:r));
[1
[4
[1
[3
2 3]
5]
2]
4]
10-209
mktito
See also
10-210
augw
hinfsyn
h2syn
ltiprops
sdhinfsyn
modreal
Purpose
10modreal
Syntax
[G1,G2] = modreal(G,cut)
Description
The modal form realization has its A matrix in block diagonal form with either
1x1 or 2x2 blocks. The real eigenvalues will be put in 1x1 blocks and complex
eigenvalues will be put in 2x2 blocks. These diagonal blocks are ordered in
ascending order based on eigenvalue magnitudes.
The complex eigenvalue a+bj is appearing as 2x2 block
a b
b a
This table describes input arguments for modreal.
Argument
Description
cut
Description
G1,G2
Algorithm
Using a real eigen structure decomposition reig and ordering the eigenvectors
in ascending order according to their eigenvalue magnitudes, we can form a
10-211
modreal
Note This routine is extremely useful when model has j-axis singularities,
e.g., rigid body dynamics. It has been incorporated inside Hankel based model
reduction routines - hankelmr, balancmr, bstmr, and schurmr to isolate those
j-axis poles from the actual model reduction process.
Examples
See Also
10-212
reduce
balancmr
schurmr
bstmr
ncfmr
hankelmr
hankelsv
msfsyn
Purpose
10msfsyn
Syntax
[gopt,h2opt,K,Pcl,X] = msfsyn(P,r,obj,region,tol)
Description
Ax + B 1 w + B 2 u
z =
C 1 x + D 11 w + D 12 u
z2 =
C 2 x + D 22 u
T + T2 2
Places the closed-loop poles inside the LMI region specified by region (see
lmireg for the specification of such regions). The default is the open left-half
plane.
Set r = size(d22) and obj = [0, 0, , ] to specify the problem dimensions
and the design parameters 0, 0, , and . You can perform pure pole
placement by setting obj = [0 0 0 0]. Note also that z or z2 can be empty.
On output, gopt and h2opt are the guaranteed H and H2 performances, K is
the optimal state-feedback gain, Pcl the closed-loop transfer function from w
z
10-213
msfsyn
A ( t )x + B 1 ( t )w + B 2 ( t )u
z =
C 1 ( t )x + D 11 ( t )w + D 12 ( t )u
z2 =
C 2 ( t )x + D 22 ( t )u
C ( t ) D ( t ) D ( t ) Co C D
1k 11k D 12k
11
12
1
C (t)
0
D 22 ( t )
C 2k 0 D 22k
2
: k = 1, , K
In this context, msfsyn seeks a state-feedback gain that robustly enforces the
specifications over the entire polytope of plants. Note that polytopic plants
should be defined with psys and that the closed-loop system Pcl is itself
polytopic in such problems. Affine parameter-dependent plants are also
accepted and automatically converted to polytopic models.
See Also
10-214
lmireg
psys
mussv
Purpose
10mussv
Syntax
bounds = mussv(M,BlockStructure)
[bounds,muinfo] = mussv(M,BlockStructure)
[bounds,muinfo] = mussv(M,BlockStructure,Options)
[ubound,q] = mussv(M,F,BlockStructure)
[ubound,q] = mussv(M,F,BlockStructure,'s')
Description
object, the computations are performed pointwise in frequency (as well as any
array dimensions).
BlockStructure is a matrix specifying the perturbation block structure.
BlockStructure has 2 columns, and as many rows as uncertainty blocks in the
perturbation structure. The i-th row of BlockStructure defines the dimensions
10-215
mussv
characters:
10-216
Option
Meaning
'a'
'an'
'd'
Display warnings
'f'
'i'
'm7'
'U'
's'
'x'
mussv
Examples
10-217
mussv
bounds = mussv(M,BlockStructure);
optbounds = mussv(M+Q*F,BlockStructure,'C5');
Algorithm
The lower bound is computed using a power method, Young and Doyle, 1990,
and Packard et al. 1988, and the upper bound is computed using the
balanced/AMI technique, Young et al., 1992, for computing the upper bound
from Fan et al., 1991.
Peter Young and Matt Newlin wrote the original M-files.
The lower-bound power algorithm is from Young and Doyle, 1990, and Packard
et al. 1988.
The upper-bound is an implementation of the bound from Fan et al., 1991, and
is described in detail in Young et al., 1992. In the upper bound computation, the
matrix is first balanced using either a variation of Osbornes method (Osborne,
1960) generalized to handle repeated scalar and full blocks, or a Perron
approach. This generates the standard upper bound for the associated complex
problem. The Perron eigenvector method is based on an idea of Safonov,
(Safonov, 1982). It gives the exact computation of for positive matrices with
scalar blocks, but is comparable to Osborne on general matrices. Both the
Perron and Osborne methods have been modified to handle repeated scalar and
full blocks. Perron is faster for small matrices but has a growth rate of n3,
compared with less than n2 for Osborne. This is partly due to the MATLAB
implementation, which greatly favors Perron. The default is to use Perron for
simple block structures and Osborne for more complicated block structures. A
sequence of improvements to the upper bound is then made based on various
equivalent forms of the upper bound. A number of descent techniques are used
that exploit the structure of the problem, concluding with general purpose LMI
optimization (Boyd et al.), 1993, to obtain the final answer.
10-218
mussv
The optimal choice of Q (to minimize the upper bound) in the generalized mu
problem is solved by reformulating the optimization into a semidefinite
program (Packard et al., 1991).
References
See Also
loopmargin
mussvextract
robuststab
robustperf
wcgain
wcsens
wcmargin
10-219
mussvextract
Purpose
10mussvextract
Syntax
[VDelta,VSigma,VLmi] = mussvextract(muinfo)
Description
-- --
2 4 Dr
2 4
- jG m (I + G r ) 1
(I + G l ) --------
Because some uncertainty blocks and M need not be square, the matrices D and
G have a few different manifestations. In fact, in the formula above, there are
a left and right D and G, as well as a middle G. Any such is an upper bound
of mussv(M,BlockStructure).
It is true that if BlockStructure consists only of complex blocks, then all G
matrices will be zero, and the expression above simplifies to
1
( D r ) .
The LMI method consists of finding a scalar and matrices D and G, consistent
with BlockStructure, such that
10-220
mussvextract
M'D rM D c + j* ( G cr M M'G rc )
is negative semidefinite. Again, D and G have a few different manifestations to
match the row and column dimensions of M. Any such is an upper bound of
mussv(M,BlockStructure). If BlockStructure consists only of complex blocks,
then all G matrices will be zero, and negative semidefiniteness of MDrM2Dc
is sufficient to derive an upper bound.
Examples
Suppose M is a 4-by-4 complex matrix. Take the block structure to be two 1-by-1
complex blocks and one 2-by-2 complex block.
M = randn(4,4) + sqrt(-1)*randn(4,4);
BlockStructure = [1 1;1 1;2 2];
You can calculate bounds on the structured singular value using the mussv
command and extract the scaling matrices using mussvextract.
[bounds,muinfo] = mussv(M,BlockStructure);
[VDelta,VSigma,VLmi] = mussvextract(muinfo);
You can first verify the Newlin/Young upper bound with the information
extracted from muinfo. The corresponding scalings are Dl and Dr.
Dl = VSigma.DLeft
Dl =
1.0000
0
0
0.8393
0
0
0
0
Dr = VSigma.DRight
Dr =
1.0000
0
0
0.8393
0
0
0
0
0.8917
0
0
0
0
0.8917
0
0
0.8917
0
0
0
10-221
mussvextract
0
0
[norm(Dl*M/Dr) bounds(1)]
ans =
4.2013
4.2013
0.8917
You can first verify the LMI upper bound with the information extracted from
muinfo. The corresponding scalings are Dr and Dc.
Dr = VLmi.Dr;
Dc = VLmi.Dc;
eig(M'*Dr*M - bounds(1)^2*Dc)
ans =
-15.2960 - 0.0000i
-0.0000 - 0.0000i
-10.1037 + 0.0000i
-5.9719 + 0.0000i
Note that VDelta matches the structure defined by BlockStructure, and the
norm of VDelta agrees with the lower bound,
VDelta
VDelta =
0.2009 - 0.1277i
0
0
0.1648 - 0.1718i
0
0
- 0.1012i
0
0
+ 0.1460i
[norm(VDelta) 1/bounds(2)]
ans =
0.2380
0.2380
0
0
0
0
-0.0408 + 0.0773i -0.0291
0.0635 - 0.1070i
10-222
0.0341
mussvextract
Keep the matrix the same, but change BlockStructure to be a 2-by-2 repeated,
real scalar block and two complex 1-by-1 blocks. Run mussv with the 'C' option
to tighten the upper bound.
BlockStructure2 = [-2 0; 1 0; 1 0];
[bounds2,muinfo2] = mussv(M,BlockStructure2,'C');
You can compare the computed bounds. Note that bounds2 should be smaller
than bounds, because the uncertainty set defined by BlockStructure2 is a
proper subset of that defined by BlockStructure.
[bounds; bounds2]
ans =
4.2013
4.2009
4.0005
4.0005
You can extract the D, G and Delta from muinfo2 using mussvextract.
[VDelta2,VSigma2,VLmi2] = mussvextract(muinfo2);
As before, you can first verify the Newlin/Young upper bound with the
information extracted from muinfo. The corresponding scalings are Dl, Dr,
Gl, Gm and Gr.
Dl = VSigma2.DLeft;
Dr = VSigma2.DRight;
Gl = VSigma2.GLeft;
Gm = VSigma2.GMiddle;
Gr = VSigma2.GRight;
dmd = Dl*M/Dr/bounds2(1) - sqrt(-1)*Gm;
SL = (eye(4)+Gl*Gl)^-0.25;
SR = (eye(4)+Gr*Gr)^-0.25;
norm(SL*dmd*SR)
ans =
1.0000
You can first verify the LMI upper bound with the information extracted from
muinfo. The corresponding scalings are Dr, Dc, Grc and Gcr.
Dr = VLmi2.Dr;
Dc = VLmi2.Dc;
Grc = VLmi2.Grc;
Gcr = VLmi2.Gcr;
10-223
mussvextract
eig(M'*Dr*M
ans =
-0.0075 -0.0009 -0.0001 -0.0004 -
Note that VDelta2 matches the structure defined by BlockStructure, and the
norm of VDelta2 agrees with the lower bound,
VDelta2
VDelta2 =
0.2500
0
0
0.2500
0
0
0
0
[norm(VDelta2) 1/bounds2(2)]
ans =
0.2500
0.2500
0
0
-0.0130 + 0.2496i
0
0.1402
0
0
0
+ 0.2069i
See Also
10-224
mussv
ncfmargin
Purpose
10ncfmargin
Syntax
[marg,freq] = ncfmargin(P,C)
[marg,freq] = ncfmargin(P,C,tol)
Description
C) is defined as
1
b ( P, C ) =
I ( I PC ) 1
PI
C
C should only be the compensator in the feedback path, such as the 1-dof
architecture shown below (on the right). If the compensator has 2-dof
architecture shown below (on the left), you must eliminate the reference
channels before calling ncfmargin. freq is the frequency associated with the
upper bound on marg.
The normalized coprime factor robust stability margin lies between 0 and 1 and
is used as an indication of robustness to unstructured perturbations. Values of
marg greater than 0.3 generally indicate good robustness margins.
[marg,freq] = ncfmargin(P,C,tol) calculates the normalized coprime
Examples
Consider the plant model 4/(s-0.001) an unstable first order, and two
constant gain controllers, k1 = 1 and k2 = 10. Both controllers stabilize the
closed-loop system
10-225
ncfmargin
x = tf(4,[1 0.001]);
clp1 = feedback(x,1)
The closed-loop system with controller k1, clp1, has a normalized coprime
factor robust stability margin of 0.71 that is achieved at infinite frequency.
This indicates that the closed-loop system is very robust to unstructured
perturbations. The closed-loop system with controller k2, clp2, has a
normalized coprime factor robust stability margin of 0.10. This indicates that
the closed-loop system is not robust to unstructured perturbations.
[marg1,freq1] = ncfmargin(x,1)
marg1 =
0.7071
freq1 =
Inf
[marg2,freq2] = ncfmargin(x,10)
marg2 =
0.0995
freq2 =
Inf
10-226
ncfmargin
The closed-loop system with K=1 is robustly stable in the presence of the
unmodeled dynamics based on the robust stability analysis. In fact, the
closed-loop system with K=1 can tolerate 909% (or 9.09*11%) of the unmodeled
LTI dynamics, whereas the closed-loop system is not robustly stable with a
constant gain of 10 controller. The closed-loop system with K=10 implemented
can only tolerate 90.9% (or.909*11%) of the unmodeled LTI dynamics.
Algorithm
References
See Also
loopmargin
gapmetric
norm
wcmargin
10-227
ncfmr
Purpose
10ncfmr
Syntax
GRED = ncfmr(G)
GRED = ncfmr(G,order)
[GRED,redinfo] = ncfmr(G,key1,value1,...)
[GRED,redinfo] = ncfmr(G,order,key1,value1,...)
Description
Hankel singular values of coprime factors of such a stable system indicate the
respective state energy of the system. Hence, reduced order can be directly
determined by examining the system Hankel SVs.
With only one input argument G, the function will show a Hankel singular
value plot of the original model and prompt for model order number to reduce.
The left and right normalized coprime factors are defined as [1]
Left Coprime Factorization: G = M l 1 ( s )N l ( s )
Right Coprime Factorization: G = N r ( s )M r1 ( s )
where there exist stable U r ( s ) , V r ( s ) , U l ( s ) , and V l ( s ) such that
Ur Nr + Vr Mr = I
Nl Ul + Ml Vl = I
The left/right coprime factors are stable, hence implies Mr(s) should contain as
RHP-zeros all the RHP-poles of G(s). The comprimeness also implies that there
should be no common RHP-zeros in Nr(s) and Mr(s), i.e., when forming
G = N r ( s )M r 1 ( s ) , there should be no pole-zero cancellations.
10-228
ncfmr
Description
ORDER
Value
Description
'MaxError'
A real number or
a vector of
different errors
'Display'
'on' or 'off'
'Order'
integer, vector or
cell array
Weights on the original model input and/or output can make the model
reduction algorithm focus on some frequency range of interests. But weights
have to be stable, minimum phase and invertible.
10-229
ncfmr
Description
GRED
REDINFO
Algorithm
Given a state space (A,B,C,D) of a system and k, the desired reduced order, the
following steps will produce a similarity transformation to truncate the
original state-space system to the kth order reduced model.
1 Find the normalized coprime factors of G by solving Hamiltonian described
in [1].
Gl = Nl Ml
Nr
Gr =
Mr
2 Perform kth order square root balanced model truncation on Gl (or Gr) [2].
3 The reduced model GRED is [2]:
Ac Bm Cl Bn Bm Dl
Cl
where
Nl:= (Ac, Bn, Cc, Dn)
10-230
Dl
ncfmr
Examples
Reference
See Also
reduce
balancmr
schurmr
bstmr
hankelmr
hankelsv
10-231
ncfsyn
Purpose
10ncfsyn
Syntax
[K,CL,GAM,INFO]=ncfsyn(G)
[K,CL,GAM,INFO]=ncfsyn(G,W1)
[K,CL,GAM,INFO]=ncfsyn(G,W1,W2)
Description
Algorithm
I ( I G K ) 1 [ G , I ]
s
s
K
:= min
K
I
1
( I KG s ) [ K, I ]
Gs
10-232
ncfsyn
so you can use the weights W1 and W2 for loop shaping. For a more precise
bounds on loop shaping accuracy, see Theorem 16.12 of Zhou and Glover [1].
Theory ensures that if Gs=NM1is a normalized coprime factorization (NCF) of
the weighted plant model Gs satisfying
Gs=N(jw)*N(jw) + M(jw)*M(jw) = I,
then the control system will remain robustly stable for any perturbation G s to
the weighted plant model Gs that can be written
1
G s = ( N + 1 ) ( M + 2 )
< MARG:=1/GAM
The closed-loop H-norm objective has the standard signal gain interpretation.
Finally it can be shown that the controller, K, does not substantially affect the
loop shape in frequencies where the gain of W2GW1 is either high or low, and
will guarantee satisfactory stability margins in the frequency region of gain
cross-over. In the regulator set-up, the final controller to be implemented is
K=W1KW2.
Input arguments:
G
W1,W2
Output arguments:
K
CL
10-233
ncfsyn
GAM
1
H optimal cost = ----------------------------------------= hinfnorm(CL) 1
b ( W 2 GW 1, K )
INFO
nugap robustness
emax=1/GAM=ncfmargin(Gs,-Ks)= b ( W 2 GW 1, K )
INFO.Gs
INFO.Ks
Ks = K
= NCFSYN(Gs) = NCFSYN(W2*G*W1)
I ( I + GK ) 1 [ G , I ]
K
where G and K are LTI plant and controller, and TOL (default=.001) is the
tolerance used to compute the H norm. FREQ is the peak frequency i.e., the
frequency at which the infinity norm is reached to within TOL.
Algorithm
Examples
The following code shows how ncfsyn can be used for loop-shaping. The
achieved loop G*K has a sigma plot is equal to that of the target loop G*W1 to
within plus or minus 20*log10(GAM) decibels.
s=zpk('s');
G=(s-1)/(s+1)^2;
W1=0.5/s;
[K,CL,GAM]=ncfsyn(G,W1);
sigma(G*K,'r',G*W1,'r-.',G*W1*GAM,'k-.',G*W1/GAM,'k-.')
10-234
ncfsyn
Figure 10-15: Achieved loop G*K and shaped loop Gs, 20log(GAM) dB
References
See Also
gapmetric
hinfsyn
loopsyn
ncfmargin
10-235
newlmi
Purpose
10newlmi
Syntax
tag = newlmi
Description
newlmi adds a new LMI to the LMI system currently described and returns an
identifier tag for this LMI. This identifier can be used in lmiterm, showlmi, or
dellmi commands to refer to the newly declared LMI. Tagging LMIs is optional
and only meant to facilitate code development and readability.
Identifiers can be given mnemonic names to help keep track of the various
LMIs. Their value is simply the ranking of each LMI in the system (in the order
of declaration). They prove useful when some LMIs are deleted from the LMI
system. In such cases, the identifiers are the safest means of referring to the
remaining LMIs.
See Also
setlmis
lmivar
lmiterm
getlmis
lmiedit
dellmi
10-236
normalized2actual
Purpose
10normalized2actual
Syntax
avalue = normalizedactual2(A,NV)
Description
Examples
Create uncertain real parameters with a range that is symmetric about the
nominal value, where each endpoint is 1 unit from the nominal. Points that lie
inside the range are less than 1 unit from the nominal, while points that lie
outside the range are greater than 1 unit from the nominal.
a = ureal('a',3,'range',[1 5]);
actual2normalized(a,[1 3 5])
ans =
-1.0000
-0.0000
1.0000
normalized2actual(a,[-1 1])
ans =
1.0000
5.0000
normalized2actual(a,[-1.5 1.5])
ans =
0.0000
6.0000
See Also
actual2normalized
robuststab
robustperf
10-237
pdlstab
Purpose
10pdlstab
Syntax
[tau,Q0,Q1,...] = pdlstab(pds,options)
Description
C D
A + jE B
i i
,
i
C
D i
i
i=1
i 0 ,
i = 1 ,
i=1
10-238
(10-19)
pdlstab
Several options and control parameters are accessible through the optional
argument options:
Setting options(1)=0 tests robust stability (default).
When options(2)=0, pdlstab uses simplified sufficient conditions for faster
running times. Set options(2)=1 to use the least conservative conditions.
Remark
(10-20)
(10-21)
See Also
quadstab
10-239
pdsimul
Purpose
10pdsimul
Syntax
pdsimul(pds,'traj',tf,'ut',xi,options)
[t,x,y] = pdsimul(pds,pv,'traj',tf,'ut',xi,options)
Description
See Also
10-240
psys
pvec
polydec
Purpose
10polydec
Syntax
vertx = polydec(PV)
[C,vertx] = polydec(PV,P)
Description
See Also
pvec
pvinfo
aff2pol
hinfgs
10-241
popov
Purpose
10popov
Syntax
[t,P,S,N] = popov(sys,delta,flag)
Description
popov uses the Popov criterion to test the robust stability of dynamical systems
with possibly nonlinear and/or time-varying uncertainty. The uncertain
system must be described as the interconnection of a nominal LTI system sys
and some uncertainty delta.
The command
[t,P,S,N] = popov(sys,delta)
See Also
quadstab
pdlstab
10-242
psinfo
Purpose
10psinfo
Syntax
psinfo(ps)
[type,k,ns,ni,no] = psinfo(ps)
pv = psinfo(ps,'par')
sk = psinfo(ps,'sys',k)
sys = psinfo(ps,'eval',p)
Description
See Also
psys
10-243
psys
Purpose
10psys
Syntax
pols = psys(syslist)
affs = psys(pv,syslist)
Description
A ( t ) + jE ( t ) B ( t ) Co A 1 + jE 1 B 1 , . . ., A k + jE k B k
C(t)
D(t)
C1
D1
Ck
Dk
S(t)
S1
Sk
Co{S1, . . ., Sk} =
i Si : i 0 ,
i = 1
10-244
psys
A ( p ) + jE ( p ) B ( p ) =
C(p)
D(p)
S(p)
A 0 + jE 0 B 0
A + jE 1 B 1
A + jE n B n
+ p1 1
+ . . . + pn n
C0
D0
C1
D1
Cn
Dn
S0
S1
Sn
where S0, S1, . . ., Sn are given SYSTEM matrices. The parameters pi can be
time-varying or constant but uncertain.
Both types of models are specified with the function psys. The argument
syslist lists the SYSTEM matrices Si characterizing the polytopic value set or
parameter dependence. In addition, the description pv of the parameter vector
(range of values and rate of variation) is required for affine parameterdependent models (see pvec for details). Thus, a polytopic model with vertex
systems S1, . . ., S4 is created by
pols = psys([s1,s2,s3,s4])
See Also
psinfo
pvec
aff2pol
10-245
pvec
Purpose
10pvec
Syntax
pv = pvec('box',range,rates)
pv = pvec('pol',vertices)
Description
Examples
10-246
pvec
v1 = 1 , v2 = 1 ,
20
50
v3 = 2 ,
20
v4 = 2
50
p2
50
20
-1
p1
See Also
pvinfo
psys
10-247
pvinfo
Purpose
10pvinfo
Syntax
[typ,k,nv] = pvinfo(pv)
[pmin,pmax,dpmin,dpmax] = pvinfo(pv,'par',j)
vj = pvinfo(pv,'par',j)
p = pvinfo(pv,'eval',c)
Description
range.
For the type 'box':
[pmin,pmax,dpmin,dpmax] = pvinfo(pv,'par',j)
returns the bounds on the value and rate of variations of the j-th real
parameter pj. Specifically,
dp j
dt
returns the value of the parameter vector p given its barycentric coordinates c
with respect to the polytope vertices (V1, . . .,Vk). The vector c must be of length
k and have nonnegative entries. The corresponding value of p is then given by
cV
i=1 i i
---------------------------k
i = 1 c i
k
p =
See Also
10-248
pvec
psys
quadperf
Purpose
Syntax
[perf,P] = quadperf(ps,g,options)
Description
10quadperf
E ( t )x = A ( t )x + B ( t )u,
y = C ( t )x + D ( t )u
(10-22)
(10-23)
for all input u(t) with bounded energy. A sufficient condition for (10-23) is the
existence of a quadratic Lyapunov function
V(x) = xTPx,
P>0
such that
T
2 T
u L 2 , dV
-------- + y y u u < 0
dt
10-249
quadperf
See Also
quadstab
psys
10-250
quadstab
Purpose
10quadstab
Syntax
[tau,P] = quadstab(ps,options)
Description
or polytopic systems
E(t) x = A(t)x,
quadstab seeks a fixed Lyapunov function V(x) = xTPx with P > 0 that
10-251
quadstab
See Also
pdlstab
decay
quadperf
psys
10-252
randatom
Purpose
10randatom
Syntax
A = randatom(Type)
A = randatom(Type,sz)
A = randatom
Description
In general, both rand and randn are used internally. You can control the result
of randatom by setting seeds for both random number generators before calling
the function.
Examples
The following statement creates the ureal uncertain object xr. Note that your
display can differ because a random seed is used.
xr = randatom('ureal')
Uncertain Real Parameter: Name BMSJA, NominalValue -6.75,
Range [-7.70893 -1.89278]
The following statement creates the variable ultidyn uncertain object xlti
with three inputs and four outputs. You will get the results shown below if both
the random variable seeds are set to 29.
rand(`seed',29);
randn(`seed',29);
xlti = randatom('ultidyn',[4 3])
Uncertain GainBounded LTI Dynamics: Name OOJGS, 4x3,
Gain Bound = 0.646
See Also
rand
randn
randumat
10-253
randatom
randuss
ucomplex
ucomplexm
ultidyn
10-254
randumat
Purpose
10randumat
Syntax
um = randumat(ny,nu)
um = randumat
Description
Example
The following statement creates the umat uncertain object x1 of size 2-by-3.
Note that your result can differ because a random seed is used.
x1 = randumat(2,3)
UMAT: 2 Rows, 3 Columns
ROQAW: complex, nominal = 9.92+4.84i, radius = 0.568, 1
occurrence
UEPDY: real, nominal = -5.81, variability = [-1.98681
0.133993], 3 occurrences
VVNHL: complex, nominal = 5.64-6.13i, radius = 1.99, 2
occurrences
The following statement creates the umat uncertain object x2 of size 4-by-2 with
the seed 91.
rand(`seed',91); randn(`seed',91);
x2 = randumat(4,2)
UMAT: 4 Rows, 2 Columns
SSAFF: complex, nominal = -0.366+2.81i, radius = 1.76, 3
occurrences
VDTIH: complex, nominal = -3.03-3i, +/- 27.5%, 2 occurrences
XOLLJ: real, nominal = 0.0628, range = [-3.73202 4.28174], 1
occurrence
See Also
rand
randn
randatom
randuss
ucomplex
10-255
randumat
ultidyn
10-256
randuss
Purpose
10randuss
Syntax
usys
usys
usys
usys
usys
Description
=
=
=
=
=
randuss(n)
randuss(n,p)
randuss(n,p,m)
randuss(n,p,m,Ts)
randuss
In general, both rand and randn are used internally. You can control the result
of randuss by setting seeds for both random number generators before calling
the function.
Examples
10-257
randuss
See Also
10-258
rand
randn
randatom
randumat
ucomplex
ultidyn
reduce
Purpose
10reduce
Syntax
GRED = reduce(G)
GRED = reduce(G,order)
[GRED,redinfo] = reduce(G,'key1','value1',...)
[GRED,redinfo] = reduce(G,order,'key1','value1',...)
Description
reduce returns a reduced order model GRED of G and a struct array redinfo
containing the error bound of the reduced model, Hankel singular values of the
original system and some other relevant model reduction information.
An error bound is a measure of how close GRED is to G and is computed based
on either additive error, || G-GRED ||, multiplicative error, || G-1(G-GRED) ||, or
nugap error (ncfmr) [1],[4],[5].
Hankel singular values of a stable system indicate the respective state energy
of the system. Hence, reduced order can be directly determined by examining
the system Hankel SV's. Model reduction routines, which based on Hankel SV's
are grouped by their error bound types. In many cases, the additive error
method GRED=reduce(G,ORDER) is adequate to provide a good reduced order
model. But for systems with lightly damped poles and/or zeros, a multiplicative
error method (namely, GRED=reduce(G,ORDER,'ErrorType','mult')) that
minimizes the relative error between G and GRED tends to produce a better fit.
This table describes input arguments for reduce.
Argument
Description
ORDER
10-259
reduce
Value
Description
'Algorithm'
'balance'
'schur'
'hankel'
'bst'
'ncf'
'ErrorType'
'add'
'mult'
'ncf'
'MaxError'
A real number
or a vector of
different
errors
'Weights'
{Wout,Win}
cell array
invertible.
'Display'
'on' or 'off'
'Order'
Integer, vector
or cell array
Weights on the original model input and/or output can make the model
reduction algorithm focus on some frequency range of interests. But weights
have to be stable, minimum phase and invertible.
10-260
reduce
Description
GRED
REDINFO
Examples
10-261
reduce
References
See Also
10-262
balancmr
schurmr
bstmr
ncfmr
hankelmr
hankelsv
repmat
Purpose
Syntax
Description
10repmat
copies of A.
B = repmat(A,[M N]) accomplishes the same result as repmat(A,M,N).
B = repmat(A,[M N P ...]) tiles the array A to produce an M-by-N-by-P-by-...
Examples
10-263
robopt
Purpose
10robopt
Syntax
opts = robopt
opts = robopt('name1',value1,'name2',value2,...)
Description
opts = robopt (with no input arguments) creates an options object with all
object in which specified properties have the given values. Any unspecified
property is set to its default value. It is sufficient to type only enough leading
characters to define the property name uniquely. Case is ignored for property
names.
robopt with no input or output arguments displays a complete list of option
Fields
The following are the robopt object properties:
Object Property
Description
Display
10-264
Sensitivity
VaryUncertainty
Mussv
robopt
Examples
Object Property
Description
Default
Meaning
You can create a robopt options object called opt with all default values.
opt = robopt
Property Object Values:
Display: 'off'
Sensitivity: 'on'
VaryUncertainty: 25
Mussv: 'sm9'
Default: [1x1 struct]
Meaning: [1x1 struct]
See Also
dkitopt
10-265
robopt
robuststab
robustperf
wcgopt
wcsens
wcmargin
10-266
robustperf
Purpose
10robustperf
Syntax
perfmarg = robustperf(sys)
[perfmarg,wcu,report,info] = robustperf(sys)
[perfmarg,wcu,report,info] = robustperf(sys,opt)
Description
Basic Syntax
Suppose sys is a ufrd or uss with M uncertain elements. The results of
[perfmarg,perfmargunc,Report] = robustperf(sys)
Description
LowerBound
10-267
robustperf
Field
Description
UpperBound
CriticalFrequency
intersection of the performance degradation curve and the y=1/x curve. See
Chapter 7, Generalized Robustness Analysis. There are M field names, which
are the names of uncertain elements of sys.
Report is a text description of the robust performance analysis results.
Examples
10-268
robustperf
You can verify that the upper bound of the performance margin corresponds to
a point on or above the y=1/x curve. First, compute the normalized size of the
value of the uncertain element, and check that this agrees with the upper
bound.
nsize = actual2normalized(S.Uncertainty.delta, punc.delta)
nsize =
perfmargin.UpperBound
ans =
7.4305e-001
Compute the system gain with that value substituted, and verify that the
product of the normalized size and the system gain is greater than or equal to 1.
gain = norm(usubs(S,punc),inf,.00001);
nsize*gain
ans =
1.0000e+000
Finally, as a sanity check, verify that the robust performance margin is less
than the robust stability margin (it should always be, as described in Chapter
4, Robustness Analysis).
[stabmargin] = robuststab(S);
stabmargin
stabmargin =
UpperBound: 3.1251e+000
LowerBound: 3.1251e+000
DestabilizingFrequency: 4.0862e+000
While the robust stability margin is easy to describe (poles migrating from
stable region into unstable region), describing the robust performance margin
is less elementary. See the diagrams and figures in Chapter 7, Generalized
Robustness Analysis. Rather than finding values for uncertain elements that
lead to instability, the analysis finds values of uncertain elements
corresponding to the intersection point of the performance degradation curve
with a y=1/x hyperbola. This characterization, mentioned above in the
description of perfmarg.CriticalFrequency and perfmargunc, is used often in
the descriptions below.
10-269
robustperf
Basic Syntax with Fourth Output Argument
A fourth output argument yields more specialized information, including
sensitivities and frequency-by-frequency information.
[perfmarg,perfmargunc,Report,Info] = robustperf(sys)
Description
Sensitivity
Frequency
BadUncertainValues
MussvBnds
MussvInfo
10-270
robustperf
computation, and controlling the option argument used in the underlying call
to mussv) is specified using the robustness analysis options robopt object. For
instance, you can turn the display on and turn off the sensitivity by executing
opt = robopt('Sensitivity','off','Display','on');
[PerfMarg,Destabunc,Report,Info] = robustperf(sys,opt)
Description
LowerBound
UpperBound
CriticalFrequency
10-271
robustperf
perfmargunc is a d1dF structure array of values of uncertain elements,
associated with the intersection of the performance degradation curve and the
y=1/x curve. See Generalized Robustness Analysis in the online
documentation. Using single indexing, for each i, the struct of values of
uncertain elements for uncertain system sys(:,:,i) is perfmargunc(i).
Report is a character array, dimensions 3, 4, ..., F+2 are d1dF, containing
text description of the robustness analysis results at each grid in the array
dimensions.
10-272
Field
Description
Sensitivity
Frequency
BadUncertainValues
MussvBnds
MussvInfo
robustperf
Algorithm
The algorithm in robustperf follows this in spirit, but might require user
attention.
If sys is a uss object, then the first requirement of stability of nominal value is
explicitly checked within robustperf. However, if sys is an ufrd, then the
verification of nominal stability from the nominal frequency response data is
not performed, and is instead assumed.
The exact performance margin is guaranteed to be no larger than UpperBound
(some uncertain elements associated with this magnitude cause instability
one instance is returned in the structure perfmargunc). The instability created
by perfmargunc occurs at the frequency value in CriticalFrequency.
Similarly, the exact performance margin is guaranteed to be no smaller than
LowerBound.
Limitations
10-273
robustperf
See Also
10-274
loopmargin
mussv
norm
robopt
robuststab
actual2normalized
wcgain
wcsens
wcmargin
robuststab
Purpose
10robuststab
Syntax
[stabmarg,destabunc,report,info] = robuststab(sys)
[stabmarg,destabunc,report,info] = robuststab(sys,opt)
Description
system. A stability robustness margin greater than 1 means that the uncertain
system is stable for all values of its modeled uncertainty. A stability robustness
margin less than 1 implies that certain allowable values of the uncertain
elements, within their specified ranges, lead to instability.
Numerically, a margin of 0.5 (for example) implies two things: the uncertain
system remains stable for all values of uncertain elements that are less than
0.5 normalized units away from their nominal values and, there is a collection
of uncertain elements that are less than or equal to 0.5 normalized units away
from their nominal values that results in instability. Similarly, a margin of 1.3
implies that the uncertain system remains stable for all values of uncertain
elements up to 30% outside their modeled uncertain ranges. See
actual2normalized for converting between actual and normalized deviations
from the nominal value of an uncertain element.
As with other uncertain-system analysis tools, only bounds on the exact
stability margin are computed. The exact robust stability margin is guaranteed
to lie in between these upper and lower bounds.
The computation used in robuststab is a frequency-domain calculation. If the
input system sys is a ufrd, then the analysis is performed on the frequency
grid within the ufrd. If the input system sys is a uss, then an appropriate
10-275
robuststab
Basic Syntax
Suppose sys is a ufrd or uss with M uncertain elements. The results of
[stabmarg,destabunc,Report] = robuststab(sys)
Description
LowerBound
UpperBound
DestabilizingFrequency
10-276
robuststab
the uncertain element, such that when jointly combined, lead to instability.
The command pole(usubs(sys,destabunc)) shows the instability. If A is an
uncertain atom of sys, then
actual2normalized(destabunc.A,sys.Uncertainty.A)
will be less than or equal to UpperBound, and for at least one uncertain element
of sys, this normalized distance will be equal to UpperBound, proving that
UpperBound is indeed an upper bound on the robust stability margin.
Report is a text description of the robustness analysis results.
Examples
Construct a feedback loop with a second-order plant and a PID controller with
approximate differentiation. The second-order plant has frequency-dependent
uncertainty, in the form of additive unmodeled dynamics, introduced with an
ultidyn object and a shaping filter.
robuststab is used to compute the stability margins of the closed-loop system
As the margin is less than 1, the closed-loop system is not stable for plant
models covered by the uncertain model Pu. There is a specific plant within the
uncertain behavior modeled by Pu (actually about 82% of the modeled
uncertainty) that leads to closed-loop instability, with the poles migrating
across the stability boundary at 9.1 rads/s.
The report variable is specific, giving a plain-language version of the
conclusion.
10-277
robuststab
report
report =
Uncertain System is NOT robustly stable to modeled uncertainty.
-- It can tolerate up to 81.8% of modeled uncertainty.
-- A destabilizing combination of 81.8% the modeled uncertainty
exists, causing an instability at 9.13 rad/s.
-- Sensitivity with respect to uncertain element ...
'delta' is 100%. Increasing 'delta' by 25% leads to a 25%
decrease in the margin.
Because the problem has only one uncertain element, the stability margin is
completely determined by this element, and hence the margin exhibits 100%
sensitivity to this uncertain element.
You can verify that the destabilizing value of delta is indeed about 0.82
normalized units from its nominal value.
actual2normalized(S.Uncertainty.delta,destabunc.delta)
ans =
0.8181
Use usubs to substitute the specific value into the closed-loop system. Verify
that there is a closed-loop pole near j9.1, and plot the unit-step response of the
nominal closed-loop system, as well as the unstable closed-loop system.
Sbad = usubs(S,destabunc);
pole(Sbad)
ans =
1.0e+002 *
-3.2318
-0.2539
-0.0000 + 0.0913i
-0.0000 - 0.0913i
-0.0203 + 0.0211i
-0.0203 - 0.0211i
-0.0106 + 0.0116i
-0.0106 - 0.0116i
step(S.NominalValue,'r--',Sbad,'g',4);
Finally, as an ad-hoc test, set the gain bound on the uncertain delta to 0.81
(slightly less than the stability margin). Sample the closed-loop system at 100
values, and compute the poles of all these systems.
10-278
robuststab
S.Uncertainty.delta.Bound = 0.81;
S100 = usample(S,100);
p100 = pole(S100);
max(real(p100(:)))
ans =
-6.4647e-007
Description
Sensitivity
Frequency
10-279
robuststab
Field
Description
BadUncertainValues
MussvInfo
10-280
robuststab
Description
LowerBound
UpperBound
DestabilizingFrequency
10-281
robuststab
Description
Sensitivity
Frequency
BadUncertainValues
MussvInfo
You can compute the smallest stability margin over all array dimensions via
min(stabmarg.UpperBound(:)).
10-282
robuststab
Algorithm
Limitations
Under most conditions, the robust stability margin that occurs at each
frequency is a continuous function of the problem data at that frequency.
10-283
robuststab
See Also
loopmargin
mussv
robopt
robustperf
wcgain
wcsens
wcmargin
10-284
schurmr
Purpose
10schurmr
Syntax
GRED = schurmr(G)
GRED = schurmr(G,order)
[GRED,redinfo] = schurmr(G,key1,value1,...)
[GRED,redinfo] = schurmr(G,order,key1,value1,...)
Description
schurmr returns a reduced order model GRED of G and a struct array redinfo
containing the error bound of the reduced model and Hankel singular values of
the original system.
The error bound is computed based on Hankel singular values of G. For a stable
system Hankel singular values indicate the respective state energy of the
system. Hence, reduced order can be directly determined by examining the
system Hankel SVs, .
With only one input argument G, the function will show a Hankel singular
value plot of the original model and prompt for model order number to reduce.
This method guarantees an error bound on the infinity norm of the additive
error || G-GRED || for well-conditioned model reduced problems [1]:
n
G Gred 2
i
k+1
Description
ORDER
10-285
schurmr
part of a system is kept, because from control stability point of view, getting rid
of unstable state(s) is dangerous to model a system.
'MaxError' can be specified in the same fashion as an alternative for 'ORDER'.
In this case, reduced order will be determined when the sum of the tails of the
Hankel SVs reaches the 'MaxError'.
Argument
Value
Description
'MaxError'
A real
number or a
vector of
different
errors
{Wout,Win}
cell array
'Display'
'on' or
'off'
'Order'
Integer,
vector or
cell array
'Weights'
Weights on the original model input and/or output can make the model
reduction algorithm focus on some frequency range of interests. But weights
have to be stable, minimum phase and invertible.
10-286
schurmr
Description
GRED
REDINFO
Given a state space (A,B,C,D) of a system and k, the desired reduced order, the
following steps will produce a similarity transformation to truncate the
original state-space system to the kth order reduced model [16].
1 Find the controllability and observability grammians P and Q.
2 Find the Schur decomposition for PQ in both ascending and descending
order, respectively,
T
V A PQV A
T
V D PQV D
1
=
0
0 0 n
n
0
0 0 1
3 Find the left/right orthonormal eigen-bases of PQ associated with the kth big
Algorithm
V A = [V R, SMALL, V L, BIG ]
4 Find the SVD of (VTL,BIG VR,BIG) = U VT
10-287
schurmr
V D = [ V R, BIG ,V L, SMALL]
5 Form the left/right transformation for the final kth order reduced model
The proof of the Schur balance truncation algorithm can be found in [2].
Examples
References
See Also
10-288
reduce
schurmr
balancmr
bstmr
ncfmr
hankelmr
hankelsv
10-289
sdhinfnorm
Purpose
10sdhinfnorm
Syntax
[gaml,gamu] = sdhinfnorm(sdsys,k)
[gaml,gamu] = sdhinfnorm(sdsys,k,delay)
[gaml,gamu] = sdhinfnorm(sdsys,k,delay,tol)
Description
Examples
10-290
sdhinfnorm
Algorithm
References
Bamieh, B.A., and J.B. Pearson, A General Framework for Linear Periodic
Systems with Applications to Sampled-Data Control, IEEE Transactions on
Automatic Control, Vol. AC37, 1992, pp. 418-435.
See Also
gapmetric
hinfsyn
norm
sdhinfsyn
sdlsim
10-291
sdhinfsyn
Purpose
10sdhinfsyn
Syntax
[K,GAM]=sdhinfsyn(P,NMEAS,NCON)
[K,GAM]=sdhinfsyn(P,NMEAS,NCON, KEY1,VALUE1,KEY2,VALUE2,...)
Description
partitioned as follows:
A B1 B2
P = C1 0 0
C2 0
where the continuous-time disturbance inputs enter through B1, the outputs
from the controller are held constant between sampling instants and enter
through B2, the continuous-time errors (to be kept small) correspond to the C1
partition, and the output measurements that are sampled by the controller
correspond to the C2 partition. B2 has column size ncon and C2 has row size
nmeas. Note that the D matrix must be zero.
sdhinfsyn synthesizes a discrete-time LTI controller K to achieve a given norm
(if possible) or find the minimum possible norm to within tolerance TOLGAM.
y1
u1
P
y2
u2
sampler
delay
Ts
hold
10-292
sdhinfsyn
requires that the relative difference between the last value that failed and the
last value that passed be less than TOLGAM.
Input arguments:
P
LTI plant
NMEAS
NCON
Optional input arguments (KEY, VALUE) pairs are similar to hinfsyn, but with
additional KEY values 'Ts' and 'DELAY'.
KEY
VALUE
Meaning
'GMAX'
real
'GMIN'
real
'TOLGAM'
real
'Ts'
real
'DELAY'
integer
'DISPLAY'
'off'
'on'
Output arguments:
Algorithm
H controller
GAM
10-293
sdhinfsyn
References
[1] Bamieh, B.A., and J.B. Pearson, A General Framework for Linear Periodic
Systems with Applications to Sampled-Data Control, IEEE Transactions on
Automatic Control, Vol. AC37, 1992, pp. 418-435.
See Also
norm
hinfsyn
sdhinfnorm
10-294
sdlsim
Purpose
10sdlsim
Syntax
sdlsim(p,k,w,t,tf)
sdlsim(p,k,w,t,tf,x0,z0)
sdlsim(p,k,w,t,tf,x0,z0,int)
[vt,yt,ut,t] = sdlsim(p,k,w,t,tf)
[vt,yt,ut,t] = sdlsim(p,k,w,t,tf,x0,z0,int)
Description
10-295
sdlsim
If p and/or k are LTI arrays with consistent array dimensions, then the time
simulation is performed pointwise across the array dimensions. The outputs
are 2-by-1-by-array dimension cell arrays. All responses can be plotted
simultaneously, for example, plot(vt).
[vt,yt,ut,t] = sdlsim(p,k,w,t,tf,x0,z0,int) The optional arguments
are int (integration step size), x0 (initial condition for p), and z0 (initial
condition for k). sdlsim forces int = (k.Ts)/N, where N>4 is an integer. If any
Examples
The closed-loop digital system is now set up. You can use sysic to construct the
interconnected feedback system.
systemnames = 'Pd C';
inputvar = '[ref]';
outputvar = '[Pd]';
input_to_Pd = '[C]';
input_to_C = '[ref ; Pd]';
sysoutname = 'dclp';
cleanupsysic = 'yes';
sysic;
lsim is used to simulate the digital step response.
[yd,td] = step(dclp,20*T);
10-296
sdlsim
0.5
0.1
0.2
0.3
0.4
0.5
0.6
Time: seconds
0.7
0.8
0.9
You can see the effect of a nonzero initial condition in the continuous-time
system. Note how examining the system at only the sample points will
underestimate the amplitude of the overshoot.
y2 = sdlsim(M,C,u,t,1,0,[0.25;0]);
plot(td,yd,'r*',y1{:},'b-',y2{:},'g--')
10-297
sdlsim
axis([0,1,0,1.5])
xlabel('Time: seconds')
title('Step response: non zero initial condition')
0.5
0.1
0.2
0.3
0.4
0.5
0.6
Time: seconds
0.7
0.8
0.9
10-298
output (solid)')
sdlsim
1.2
0.8
0.6
0.4
0.2
0.2
0.1
0.2
0.3
0.4
0.5
0.6
Time: seconds
0.7
0.8
0.9
Algorithm
See Also
gapmetric
hinfsyn
norm
sdhinfnorm
sdhinfsyn
10-299
sectf
Purpose
10sectf
Syntax
[G,T] = sectf(F,SECF,SECG)
Description
G
yG1
yT1
yT2
yF1
yG2
uT1
T
uT2
uF1
uF2
yF2
K
Figure 10-17: Sector transform G=lft(T,F,NU,NY)
10-300
uG1
uG2
sectf
SECG, SECF:
Conic Sector:
[-1,1] or [-1;1]
[0,Inf] or
[0;Inf]
0 Re [ y u ]
[A,B] or [A;B]
0 Re [ ( y Au ) ( y Bu ) ]
[a,b] or [a;b]
0 Re [ ( y diag ( a )u ) ( y diag ( b )u ) ]
0 Re [ ( S 11 u + S 12 y ) ( S 21 u + S 22 y ) ]
0 Re [ ( S 11 u + S 12 y ) ( S 21 u + S 22 y ) ]
where A,B are scalars in [, ] or square matrices; a,b are vectors; S=[S11
S12;S21,S22] is a square matrix whose blocks S11,S12,S21,S22 are either
scalars or square matrices; S is a two-port system S=mksys(a,b1,b2, ,'tss') with
transfer function
S(s) =
S 11 ( s ) S 12 ( s )
S 21 ( s ) S 22 ( s )
Output arguments
Description
10-301
sectf
Examples
P(s)
y1
y2
K(s)
Figure 10-18: Sector Transform Block Diagram
The Nyquist plots for this transformation are depicted in Figure 10-19. The
condition P1(s) inside [0, ] implies that P1(s) is stable and P1(j) is positive
real, i.e.,
10-302
sectf
P1 ( j ) + P 1 ( j ) 0
P1 = (s+2)/s in SEC[0,inf]
0
-0.05
-0.1
-0.1
-0.2
-0.15
-0.3
-0.2
-0.4
IMAG(P1)
IMAG(P)
-0.25
-0.5
-0.3
-0.6
-0.35
-0.7
-0.4
-0.8
-0.45
-0.9
-0.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
-1
0
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
REAL(P1)
REAL(P)
Algorithm
sectf uses the generalization of the sector concept of [3] described by [1]. First
the sector input data Sf= SECF and Sg=SECG is converted to two-port
state-space form; non-dynamical sectors are handled with empty a, b1, b2, c1,
c2 matrices. Next the equation
Sg ( s )
ug1
y g1
= Sf ( s )
uf1
y f1
10-303
sectf
Limitations
s 11 s 12 ;
0.
s 21 s 22
Also, you must have dim ( u F1 ) = dim ( y F1 ) since sectors are only defined for
square systems.
References
See Also
10-304
lft
hinfsyn
setlmis
Purpose
10setlmis
Syntax
setlmis(lmi0)
Description
Before starting the description of a new LMI system with lmivar and lmiterm,
type
setlmis([])
See Also
getlmis
lmivar
lmiterm
newlmi
10-305
setmvar
Purpose
10setmvar
Syntax
newsys = setmvar(lmisys,X,Xval)
Description
setmvar sets the matrix variable X with identifier X to the value Xval. All
terms involving X are evaluated, the constant terms are updated accordingly,
and X is removed from the list of matrix variables. A description of the
resulting LMI system is returned in newsys.
The integer X is the identifier returned by lmivar when X is declared.
Instantiating X with setmvar does not alter the identifiers of the remaining
matrix variables.
The function setmvar is useful to freeze certain matrix variables and optimize
with respect to the remaining ones. It saves time by avoiding partial or
complete redefinition of the set of LMI constraints.
Examples
10-306
setmvar
lmiterm([1 1 1 0],1) % I
lmis = getlmis
To find out whether this problem has a solution K for the particular Lyapunov
matrix P = I, set P to I by typing
news = setmvar(lmis,P,1)
The resulting LMI system news has only one variable Y = K. Its feasibility is
assessed by calling feasp:
[tmin,xfeas] = feasp(news)
Y = dec2mat(news,xfeas,Y)
See Also
evallmi
delmvar
10-307
showlmi
Purpose
10showlmi
Syntax
[lhs,rhs] = showlmi(evalsys,n)
Description
For given values of the decision variables, the function evallmi evaluates all
variable terms in a system of LMIs. The left- and right-hand sides of the n-th
LMI are then constant matrices that can be displayed with showlmi. If evalsys
is the output of evallmi, the values lhs and rhs of these left- and right-hand
sides are given by
[lhs,rhs] = showlmi(evalsys,n)
Examples
See Also
evallmi
setmvar
10-308
simplify
Purpose
10simplify
Syntax
B
B
B
B
Description
=
=
=
=
simplify(A)
simplify(A,'full')
simplify(A,'basic')
simplify(A,'off')
Examples
Create a simple umat with a single uncertain real parameter. Select specific
elements, note that result remains in class umat. Simplify those same elements,
and note that class changes.
p1 = ureal('p1',3,'Range',[2 5]);
L = [2 p1];
L(1)
UMAT: 1 Rows, 1 Columns
L(2)
UMAT: 1 Rows, 1 Columns
p1: real, nominal = 3, range = [2
simplify(L(1))
ans =
2
simplify(L(2))
5], 1 occurrence
10-309
simplify
5]
10-310
simplify
You can form the polynomial, which immediately gives a low order
representation.
cw = m/va;
fac2f = .16726*xcg*cw*cw*zcg - .17230*xcg*xcg*cw ...
-3.9*xcg*cw*zcg - .28*xcg*xcg*cw*cw*zcg ...
-.07*xcg*xcg*zcg + .29*xcg*xcg*cw*zcg ...
+ 4.9*xcg*cw - 2.7*xcg*cw*cw ...
+.58*cw*cw - 0.25*xcg*xcg - 1.34*cw ...
+100.1*xcg -14.1*zcg - 1.91*cw*cw*zcg ...
+1.12*xcg*zcg + 24.6*cw*zcg ...
+.45*xcg*xcg*cw*cw - 46.85
UMAT: 1 Rows, 1 Columns
m: real, nominal = 1.25e+005, range = [100000 150000], 4
occurrences
va: real, nominal = 80, range = [70 90], 4 occurrences
xcg: real, nominal = 0.23, range = [0.15 0.31], 2 occurrences
zcg: real, nominal = 0.105, range = [0 0.21], 1 occurrence
Create two real parameters, da and dx, and a 2-by-3 matrix, ABmat, involving
polynomial expressions in the two real parameters [2].
da = ureal('da',0,'Range',[-1 1]);
dx = ureal('dx',0,'Range',[-1 1]);
a11 = -.32 + da*(.8089 + da*(-.987 + 3.39*da)) + .15*dx;
a12 = .934 + da*(.0474 - .302*da);
a21 = -1.15 + da*(4.39 + da*(21.97 - 561*da*da)) ...
+ dx*(9.65 - da*(55.7 + da*177));
a22 = -.66 + da*(1.2 - da*2.27) + dx*(2.66 - 5.1*da);
b1 = -0.00071 + da*(0.00175 - da*.00308) + .0011*dx;
b2 = -0.031 + da*(.078 + da*(-.464 + 1.37*da)) + .0072*dx;
ABmat = [a11 a12 b1;a21 a22 b2]
10-311
simplify
1], 19 occurrences
1], 2 occurrences
1], 7 occurrences
1], 2 occurrences
Algorithm
Limitations
10-312
simplify
References
[1] Varga, A. and G. Looye, Symbolic and numerical software tools for
LFT-based low order uncertainty modeling, IEEE International Symposium
on Computer Aided Control System Design, 1999, pp. 5-11.
[2] Belcastro, C.M., K.B. Lim and E.A. Morelli, Computer aided uncertainty
modeling for nonlinear parameter-dependent systems Part II: F-16 example,
IEEE International Symposium on Computer Aided Control System Design,
1999, pp. 17-23.
See Also
umat
uss
ucomplex
ureal
uss
10-313
skewdec
Purpose
10skewdec
Syntax
x = skewdec(m,n)
Description
0
( n 1 ) ( n 2 )
(n + 1)
0
( n 3 )
(n + 2) (n + 3)
0
See Also
decinfo
lmivar
10-314
slowfast
Purpose
10slowfast
Syntax
[G1,G2] = slowfast(G,cut)
Description
slowfast computes the slow and fast modes decompositions of a system G(s)
such that
G ( s ) = [ G ( s ) ]s + [ G ( s ) ]f
,B
,D
,C
) denotes the slow part of G(s), and
where [ G ( s ) ] s : = ( A
11
1
1
1
,B
,D
,C
) denotes the fast part. The variable cut denotes the
[ G ( s ) ] := ( A
22
Find a unitary matrix V via the ordered Schur decomposition routines blksch
or rschur such that
T
A = V AV =
A
11 A 12
0 A
22
) < (A
).
Based on the style of ordered Schur form, you get i ( A
11
22
i
Finally solving the matrix equation for X
X XA
+A
=0
A
11
22
12
you get the state-space projections
,B
,D
,C
)
[ G ( s ) ]s : = ( A
11
1
1
1
and
,B
,D
,C
)
[ G ( s ) ]f : = ( A
22
2
2
2
where
10-315
slowfast
B
1
: = I X VB
0 I
B2
and
C
: = CV T I X
C
1 2
0 I
References
[1] M.G. Safonov, E.A. Jonckheere, M. Verma and D.J.N. Limebeer, Synthesis
of Positive Real Multivariable Feedback Systems, Int. J. Control, vol. 45, no.
3, pp. 817-842, 1987.
See Also
schur
modreal
10-316
Schur decomposition
Modal form realization
squeeze
Purpose
10squeeze
Syntax
B = squeeze(A)
Description
B = squeeze(A) returns an array B with the same elements as A but with all
the singleton dimensions removed. A singleton is a dimension such that
size(A,dim)==1. 2-D arrays are unaffected by squeeze so that row vectors
remain rows.
See Also
permute
reshape
10-317
stabproj
Purpose
10stabproj
Syntax
[G1,G2,m] = stabproj(G)
Description
Algorithm
Find a unitary matrix V via the ordered Schur decomposition routines blksch
or rschur such that
T
A = V AV =
A
11 A 12
0 A
22
Based on the style of ordered Schur form, you can get a stable A
11 and an
. (A
) < (A
) for the case of slowfast.
antistable A
22
11
22
B
1
: = I X VB
0 I
B2
and
10-318
stabproj
C
: = CV T I X
C
1 2
0 I
References
[1] M.G. Safonov, E.A. Jonckheere, M. Verma and D.J.N. Limebeer, Synthesis
of Positive Real Multivariable Feedback Systems, Int. J. Control, vol. 45, no.
3, pp. 817-842, 1987.
See Also
schur
modreal
Schur decomposition
Modal form realization
10-319
stack
Purpose
10stack
Syntax
umatout = stack(arraydim,umat1,umat2,...)
usysout = stack(arraydim,usys1,usys2,...)
Description
Examples
= ureal('zeta',1,'Range',[0.4 4]);
ureal('wn',0.5,'Range',[0.3 0.7]);
tf(1,[1 2*zeta*wn wn^2]);
tf(zeta,[1 10]);
You can stack along the first dimension to produce a 2-by-1 uss array.
stack(1,P1,P1)
USS: 2 States, 1 Output, 1 Input, Continuous System [array, 2 x 1]
wn: real, nominal = 0.5, range = [0.3 0.7], 3 occurrences
zeta: real, nominal = 1, range = [0.4 4], 1 occurrence
You can stack along the second dimension to produce a 1-by-2 uss array.
stack(2,P1,P2)
% produces a 1-by-2 USS array.
USS: 2 States, 1 Output, 1 Input, Continuous System [array, 1 x 2]
wn: real, nominal = 0.5, range = [0.3 0.7], 3 occurrences
zeta: real, nominal = 1, range = [0.4 4], 1 occurrence
10-320
stack
You can stack along the third dimension to produce a 1-by-1-by-2 uss array.
stack(3,P1,P2)
% produces a 1-by-1-by-2 USS array.
USS: 2 States, 1 Output, 1 Input, Continuous System [array, 1 x 1
x 2]
wn: real, nominal = 0.5, range = [0.3 0.7], 3 occurrences
zeta: real, nominal = 1, range = [0.4 4], 1 occurrence
See Also
append
blkdiag
horzcat
vertcat
10-321
symdec
Purpose
10symdec
Syntax
x = symdec(m,n)
Description
(n + 1) (n + 2) (n + 4)
(n + 2) (n + 3) (n + 5)
(n + 4) (n + 5) (n + 6)
See Also
10-322
decinfo
sysic
Purpose
10sysic
Syntax
sysout = sysic
Description
sysic requires that 3 variables with fixed names be present in the calling
workspace: systemnames, inputvar and outputvar.
systemnames is a char containing the names of the subsystems (double, tf,
zpk, ss, uss, frd, ufrd, etc) that make up the interconnection. The names
10-323
sysic
Examples
y1
noise
deltemp
setpoint
y2
y2
y1
g; g
6+ 6++
noise
57.3
setpoint
wt
deltemp
act
P = rss(3,2,2);
K = rss(1,1,2);
A = rss(1,1,1);
W = rss(1,1,1);
systemnames = 'W A K P';
inputvar = '[noise;deltemp;setpoint]';
outputvar = '[57.3*P(1);setpoint-P(2)]';
input_to_W = '[deltemp]';
input_to_A = '[K]';
input_to_K = '[P(2)+noise;setpoint]';
input_to_P = '[W;A]';
T = sysic;
Limitations
10-324
The syntax of sysic is limited, and for the most part is restricted to what is
shown here. The iconnect interconnection object can also be used to define
complex interconnections, and has a more flexible syntax.
sysic
See Also
iconnect
10-325
ucomplex
Purpose
10ucomplex
Syntax
A = ucomplex('NAME',nominalvalue)
A = ucomplex('NAME',nominalvalue,'Property1',Value1,...
'Property2',Value2,...)
Description
sets the nominal value to 6-j, the percentage uncertainty to 25 and, implicitly,
the Mode to 'Percentage'.
Examples
You can visualize the uncertain complex parameter by sampling and plotting
the data.
sa = usample(A,400);
w = linspace(0,2*pi,200);
circ = sin(w) + j*cos(w);
rc = real(A.NominalValue+circ);
10-326
ucomplex
ic = imag(A.NominalValue+circ);
plot(real(sa(:)),imag(sa(:)),'o',rc,ic,'k-')
xlim([2.5 5.5])
ylim([1.5 4.5])
axis equal
3.5
2.5
1.5
See Also
get
umat
ucomplexm
ultidyn
ureal
2.5
3.5
4.5
5.5
10-327
ucomplexm
Purpose
10ucomplexm
Syntax
M = ucomplexm('Name',NominalValue)
M = ucomplexm('Name',NominalValue,'WL',WLvalue,'WR',WRvalue)
M = ucomplexm('Name',NominalValue,'Property',Value)
Description
weighting matrices that quantify the size and shape of the ball of matrices
represented by this object. The default values for WL and WR are identity
matrices of appropriate dimensions.
Trailing Property/Value pairs are allowed, as in
M = ucomplexm('NAME',nominalvalue,'P1',V1,'P2',V2,...)
Examples
Create a ucomplexm with the name 'F', nominal value [1 2 3; 4 5 6], and
weighting matrices WL = diag([.1.3]), WR = diag([.4 .8 1.2]).
F = ucomplexm('F',[1 2 3;4 5 6],'WL',diag([.1 .3]),...
'WR',diag([.4 .8 1.2]));
Sample the difference between the uncertain matrix and its nominal value at
80 points, yielding a 2-by-3-by-80 matrix typicaldev.
typicaldev = usample(F-F.NominalValue,40);
Plot histograms of the deviations in the (1,1) entry as well as the deviations in
the (2,3) entry.
10-328
ucomplexm
The absolute values of the (1,1) entry and the (2,3) entry are shown by
histogram plots. Typical deviations in the (1,1) entry should be about 10 times
smaller than the typical deviations in the (2,3) entry.
subplot(2,1,1);
hist(abs(typicaldev(1,1,:)));xlim([0 .25])
title('Sampled F(1,1) - F(1,1).NominalValue')
subplot(2,1,2);
hist(abs(typicaldev(2,3,:)));xlim([0 .25])
title('Sampled F(2,3) - F(2,3).NominalValue')
0.05
0.1
0.15
0.2
0.25
0.2
0.25
15
10
See Also
get
umat
ucomplex
ultidyn
ureal
0.05
0.1
0.15
10-329
udyn
Purpose
10udyn
Syntax
n = udyn('name',iosize);
Description
Examples
You can create a 2-by-3 udyn element and check its size and properties.
N = udyn('N',[2 3])
Uncertain Dynamic System: Name N, size 2x3
size(N)
ans =
2
3
get(N)
Name: 'N'
NominalValue: [2x3 double]
AutoSimplify: 'basic'
See Also
10-330
ureal
ultidyn
ucomplex
ucomplexm
ufrd
Purpose
Syntax
usysfrd = ufrd(usys,frequency)
usysfrd = ufrd(usys,frequency,'Units',units)
usysfrd = ufrd(sysfrd)
usys = ufrd(response,frequency)
usys = ufrd(response,frequency,Ts)
usys = ufrd(response,frequency,RefSys)
usys = ufrd(response,frequency,'Units',units,Ts)
usys = ufrd(response,frequency,'Units',units,Ts,RefSys)
Description
10ufrd
Examples
Example 1
You create a continuous-time uncertain system with both parametric
uncertainty and unmodeled dynamics uncertainty. Compute the uncertain
10-331
ufrd
frequency response and plot the Bode plot, using 20 random samples, with a
color choice of red for random samples, and blue for nominal.
p1 = ureal('p1',5,'Range',[2 6]);
p2 = ureal('p2',3,'Plusminus',0.4);
p3 = ultidyn('p3',[1 1]);
Wt = makeweight(.15,30,10);
A = [-p1 0;p2 -p1];
B = [0;p2];
C = [1 1];
usys = uss(A,B,C,0)*(1+Wt*p3);
usysfrd = ufrd(usys,logspace(-2,2,60));
bode(usysfrd,'r',usysfrd.NominalValue,'b+')
Example 2
You convert a not-uncertain frd model to ufrd without uncertainties. You can
verify the equality of the nominal value of the ufrd and simplified
representation to the original system.
G = frd(tf([1 2 3],[1 2 3 4]),logspace(-2,2,40));
usys = ufrd(G)
UFRD: 1 Output, 1 Input, Continuous System, 40 Frequency points
isequal(usys.NominalValue,G)
ans =
1
isequal(simplify(usys,'class'),G)
ans =
1
See Also
10-332
frd
ss
ultidyn
Purpose
10ultidyn
Syntax
H = ultidyn('Name',iosize)
H =
ultidyn('Name',iosize,'Property1',Value1,'Property2',Value2,...)
Description
objects are used to represent unknown dynamic objects whose only known
attributes are bounds on their frequency response. Uncertain linear,
time-invariant objects have a name (the Name property), and an input/output
size (ioSize property).
The property Type is 'GainBounded' (default) or 'PositiveReal', and
describes in what form the knowledge about the objects frequency response is
specified.
If Type is 'GainBounded', then the knowledge is an upper bound on the
magnitude (i.e., absolute value), namely abs(H)<= Bound at all frequencies.
The matrix generalization of this is ||H||<= Bound.
If Type is 'PositiveReal' then the knowledge is a lower bound on the real
part, namely Real(H) >= Bound at all frequencies. The matrix generalization
of this is H+H' >= 2*Bound
The property Bound is a real, scalar that quantifies the bound on the frequency
response of the uncertain object as described above.
Trailing Property/Value pairs are allowed in the construction.
H=ultidyn('name',iosize,'Property1',Value1,'Property2',Value2,...)
10-333
ultidyn
Examples
Example 1
Create an ultidyn object with internal name 'H', dimensions 2-by-3, norm
bounded by 7.
H = ultidyn('H',[2 3],'Bound',7)
Uncertain GainBounded LTI Dynamics: Name H, 2x3, Gain Bound = 7
Example 2
Create a scalar ultidyn object with an internal name 'B', whose frequency
response has a real part greater than 2.5. Change the SampleStateDim to 5,
and plot the Nyquist plot of 30 random samples.
B = ultidyn('B',[1 1],'Type','PositiveReal','Bound',2.5)
Uncertain PositiveReal LTI Dynamics: Name B, 1x1, M+M' >= 2*(2.5)
B.SampleStateDim = 5;
nyquist(usample(B,30))
Nyquist Diagram
30
20
Imaginary Axis
10
10
20
30
10
10
20
30
40
50
60
Real Axis
See Also
10-334
get
ureal
uss
umat
Purpose
10umat
Syntax
h = umat(m)
Description
Examples
10-335
umat
The nominal value of M is the result when all atoms are replaced by their
nominal values. View the properties of M with get
M.NominalValue
ans =
5.0000
5.0000 + 5.0000i
-2.0000
1.0000 + 1.0000i
7.0000
0 + 2.0000i
0.8647 + 1.3854i
7.0000
-1.1715 + 2.3960i
Select the 1st and 3rd rows, and the 2nd column of M. The result is a 2-by-1
umat, whose dependence is only on b.
M([1 3],2)
UMAT: 2 Rows, 1 Columns
b: complex, nominal = 1+1i, radius = 0.5, 3 occurrences
See Also
10-336
ureal
ultidyn
ucomplex
ucomplexm
usample
uplot
Purpose
10uplot
Syntax
uplot(G1)
uplot(G1,G2)
uplot(G1,Xdata,Ydata)
uplot(G1,Xdata,Ydata,...)
uplot(G1,linetype)
uplot(G1,linetype,G2,...)
uplot(G1,linetype,Xdata,Ydata,linetype)
uplot(type,G1,linetype,Xdata,Ydata,linetype)
H = uplot(G1)
H = uplot(G1,G2)
H = uplot(G1,Xdata,Ydata)
H = uplot(G1,Xdata,Ydata,...)
H = uplot(G1,linetype)
H = uplot(G1,linetype,G2,...)
H = uplot(G1,linetype,Xdata,Ydata,linetype)
Description
uplot plots double and frd objects. The syntax is the same as the MATLAB
plot command except that all data is contained in frd objects, and the axes
are specified by type.
Description
'iv,d'
'iv,m'
'iv,lm'
'iv,p'
'liv,m'
'liv,d'
'liv,m'
10-337
uplot
Type
Description
'liv,lm'
'liv,p'
'r,i'
'nyq'
'nic'
Nicholas plot
'bode'
The remaining arguments of uplot take the same form as the MATLAB plot
command. Line types (for example,'+', 'g-.', or '*r') can be optionally
specified after any frequency response argument.
There is a subtle distinction between constants and frd objects with only one
independent variable. A constant is treated as such across all frequencies, and
consequently shows up as a line on any graph with the independent variable as
an axis. A frd object with only one frequency point always shows up as a point.
You might need to specify one of the more obvious point types in order to see it
(e.g., '+', 'x', etc.).
Examples
Two SISO second-order systems are created, and their frequency responses are
calculated over different frequency ranges.
a1 = [-1,1;-1,-0.5];
b1 = [0;2]; c1 = [1,0]; d1 = 0;
sys1 = ss(a1,b1,c1,d1);
a2 = [-.1,1;-1,-0.05];
b2 = [1;1]; c2 = [-0.5,0]; d2 = 0.1;
sys2 = ss(a2,b2,c2,d2);
omega = logspace(-2,2,100);
sys1g = frd(sys1,omega);
omega2 = [ [0.05:0.1:1.5] [1.6:.5:20] [0.9:0.01:1.1] ];
omega2 = sort(omega2);
sys2g = frd(sys2,omega2);
10-338
uplot
An frd object with a single frequency is also created. Note the distinction
between the frd object and the constant matrix in the subsequent plots.
sys3 = rss(1,1,1);
rspot = frd(sys3,2);
10
log magnitude
10
10
10
10
10
10
10
10
10
10
See Also
bode
plot
nichols
nyquist
semilogx, semilogy
sigma
10-339
ureal
Purpose
10ureal
Syntax
p = ureal('name',nominalvalue)
p = ureal('name',nominalvalue,'Property1',Value1,...
'Property2',Value2,...)
Description
Examples
Example 1
Create an uncertain real parameter and use get to display the properties and
their values. Create uncertain real parameter object a with the internal name
'a' and nominal value 5.
a = ureal('a',5)
Uncertain Real Parameter: Name a, NominalValue 5, variability =
[-1 1]
10-340
ureal
get(a)
Name:
NominalValue:
Mode:
Range:
PlusMinus:
Percentage:
AutoSimplify:
'a'
5
'PlusMinus'
[4 6]
[-1 1]
[-20 20]
'basic'
Note that the Mode is 'PlusMinus', and that the value of PlusMinus is indeed
[-1 1]. As expected, the range description of uncertainty is [4 6], while the
percentage description of uncertainty is [-20 20].
Set the range to [3 9]. This leaves Mode and NominalValue unchanged, but all
three descriptions of uncertainty have been modified.
a.Range = [3 9];
get(a)
Name:
NominalValue:
Mode:
Range:
PlusMinus:
Percentage:
AutoSimplify:
'a'
5
'PlusMinus'
[3 9]
[-2 4]
[-40 80]
'basic'
Example 2
Property/Value pairs can also be specified at creation.
b = ureal('b',6,'Percentage',[-30 40],'AutoSimplify','full');
get(b)
Name: 'b'
NominalValue: 6
Mode: 'Percentage'
Range: [4.2000 8.4000]
PlusMinus: [-1.8000 2.4000]
Percentage: [-30.0000 40.0000]
AutoSimplify: 'full'
10-341
ureal
Example 3
Specify the uncertainty in terms of percentage, but force Mode to 'Range'.
c = ureal('c',4,'Mode','Range','Percentage',25);
get(c)
Name: 'c'
NominalValue: 4
Mode: 'Range'
Range: [3 5]
PlusMinus: [-1 1]
Percentage: [-25 25]
AutoSimplify: 'basic'
See Also
10-342
ucomplex
umat
uss
usample
Purpose
10usample
Syntax
B = usample(A);
B = usample(A,N)
[B,SampleValues] = usample(A,N)
[B,SampleValues] = usample(A,Names,N)
[B,SampleValues] = usample(A,Names1,N1,Names2,N2,...)
Description
Examples
10-343
usample
class(Asample)
ans =
double
hist(Asample(:))
10-344
usample
You can sample the plant at 20 values (distributed uniformly about the tau and
gamma parameter cube).
[Psample1D,Values1D] = usample(P,20);
size(Psample1D)
20x1 array of state-space models
Each model has 1 output, 1 input, and 1 state.
You can sample the plant P at 10 values in the tau parameter and 15 values in
the gamma parameter.
[Psample2D,Values2D] = usample(P,'tau',10,'gamma',15);
size(Psample2D)
10x15 array of state-space models
Each model has 1 output, 1 input, and 1 state.
You can also evaluate the uncertain closed-loop at the same values, and plot
the step response using usubs.
subplot(2,1,2); step(usubs(CLP,Values1D))
10-345
usample
Step Response
6
5
Amplitude
4
3
2
1
0
0.5
1.5
2
Time (sec)
2.5
3.5
Step Response
1.5
Amplitude
0.5
See Also
10-346
usubs
4
Time (sec)
uss
Purpose
10uss
Syntax
usys
usys
usys
usys
usys
usys
Description
uss creates uncertain state-space models (uss objects) or to convert LTI models
to the uss class.
=
=
=
=
=
=
uss(a,b,c,d)
uss(a,b,c,d,Ts)
uss(d)
uss(a,b,c,d,Property,Value,...)
uss(a,b,c,d,Ts,Property,Value,...)
uss(sys)
Examples
You can first create two uncertain atoms and use them to create two uncertain
matrices. These four matrices can be packed together to form a 1-output,
1-input, 2-state continuous-time uncertain state-space system.
p1 = ureal('p1',5,'Range',[2 6]);
p2 = ureal('p2',3,'Plusminus',0.4);
A = [-p1 0;p2 -p1];
10-347
uss
B = [0;p2];
C = [1 1];
usys = uss(A,B,C,0);
See Also
10-348
frd
ss
uss/ssbal
Purpose
10uss/ssbal
Syntax
usysout
usysout
usysout
usysout
Description
=
=
=
=
ssbal(usys)
ssbal(usys,Wc)
ssbal(usys,Wc,FSflag)
ssbal(usys,Wc,FSflag,BLTflag)
Examples
10-349
uss/ssbal
p2=ureal('p2',-17,'Range',[-19 -11]);
p1=ureal('p1',3.2,'Percentage',0.43);
A = [-12 p1;.001 p2];
B = [120 -809;503 24];
C = [.034 .0076; .00019 2];
usys = ss(A,B,C,zeros(2,2))
USS: 2 States, 2 Outputs, 2 Inputs, Continuous System
p1: real, nominal = 3.2, variability = [-0.43 0.43]%, 1
occurrence
p2: real, nominal = -17, range = [-19 -11], 1 occurrence
usys.NominalValue
a =
x1
x2
x1
-12
3.2
x2 0.001
-17
b =
x1
x2
u1
120
503
u2
-809
24
c =
y1
y2
x1
0.034
0.00019
x2
0.0076
2
d =
y1
y2
u1
0
0
u2
0
0
Continuous-time model.
ssbal is used to balance the uncertain system usys.
usysout = ssbal(usys)
USS: 2 States, 2 Outputs, 2 Inputs, Continuous System
p1: real, nominal = 3.2, variability = [-0.43 0.43]%, 1
occurrence
p2: real, nominal = -17, range = [-19 -11], 1 occurrence
10-350
uss/ssbal
usysout.NominalValue
a =
x1
x2
x1
-12
0.3302
x2 0.009692
-17
b =
x1
x2
u1
0.7802
31.7
u2
-5.26
1.512
c =
y1
y2
x1
5.229
0.02922
x2
0.1206
31.74
d =
y1
y2
u1
0
0
u2
0
0
Continuous-time model.
See Also
canon
c2d
d2c
mussv
mussvextract
ss2ss
10-351
usubs
Purpose
10usubs
Syntax
B = usubs(M,atomname1,value1,atomname2,value2,...)
B = usubs(M,{atomname1;atomname2;...},{value1;value2;...})
B = usubs(M,StrucArray)
Description
etc., respectively.
B = usubs(M,ElementName1,value1,ElementName2,value2,...) sets the
elements in M, identified by ElementName1, ElementName2, etc., to the values in
value1, value2, etc. respectively.
In this case, if the value cell is 1-by-1, then that value is substituted for all the
listed atoms. For this situation, it is not required that the value be in a cell
array.
value can also be the string 'NominalValue' or 'Random' (or only partially
specified) in which case the nominal value, or a random instance of the atom is
used.
is allowed.
The names and values can also be grouped in a structure, with its field names
constituting the Names, and the field values constituting the Values. In the
following function call, StrucArray is a structure with field names and values.
10-352
usubs
B = usubs(M,StrucArray)
Example
You can use usubs to substitute for individual uncertainties. Create three
uncertain real parameters, and form a simple 2-by-2 uncertain matrix with
the parameters
a = ureal('a',5); b = ureal('b',3); c = ureal('c',1);
10-353
usubs
m = [a b;c a*b*c];
You can perform a single parameter substitution and check the results
m1 = usubs(m,'a',10);
simplify(m1(1,1))
ans =
10
simplify(10*m1(1,2)*m1(2,1) - m1(2,2))
ans =
0
You can replace one real parameter with a transfer function, and other
parameters with doubles. You can do this using two different forms of the
syntax and check that the results are identical.
m2 = usubs(m,'a',tf([5],[1 1]),'b',2.6,'c',1.3);
nv.a = tf([5],[1 1]);
nv.b = 2.6;
nv.c = 1.3;
m3 = usubs(m,nv);
norm(m2-m3,'inf')
ans =
0
See Also
10-354
gridureal
usample
simplify
wcgain
Purpose
10wcgain
Syntax
[maxgain,wcu,info] = wcgain(sys)
[maxgain,wcu,info] = wcgain(sys,opts)
Description
10
Various sample
responses
Magnitude
10
10
Nominal Response
10
10
10
10
10
10
Frequency
wcgain can perform two types of analysis on uncertain systems.
10-355
wcgain
10
Maximum Gain
pointwise
across frequency
Magnitude
10
WorstCase gain
degradation from nominal
10
10
10
10
10
10
10
Frequency
10-356
wcgain
10
Magnitude
10
Nominal
10
10
10
10
10
10
10
Frequency
Basic Syntax
Suppose sys is an ufrd or uss with M uncertain elements. Calculate the
worst-case gain of
[maxgain,maxgainunc] = wcgain(sys)
10-357
wcgain
Description
LowerBound
UpperBound
CriticalFrequency
Examples
10-358
wcgain
S2 = feedback(1,P*K2);
10-359
wcgain
Bode Diagram
10
Magnitude (abs)
10
10
Nominal S1
WorstCase S1
Nominal S2
WorstCase S2
2
10
10
10
10
Frequency (rad/sec)
10
10
10-360
wcgain
The third output argument info is a structure with the following fields
Field
Description
Sensitivity
Frequency
ArrayIndex
10-361
wcgain
Description
LowerBound
UpperBound
CriticalFrequency
10-362
Field
Description
Sensitivity
Frequency
ArrayIndex
wcgain
10-363
wcgain
Description
LowerBound
UpperBound
CriticalFrequency
10-364
Field
Description
Sensitivity
Frequency
ArrayIndex
wcgain
Advanced Options:
Array Dimension Handling with FreqPtWise Set to'on'
Description
LowerBound
UpperBound
CriticalFrequency
10-365
wcgain
Description
Sensitivity
ArrayIndex
Algorithm
10-366
wcgain
semidefinite program. wcgain uses branch and bound on the uncertain real
parameters to tighten the lower and upper bounds.
Limitations
See Also
loopmargin
mussv
norm
robuststab
wcgopt
wcsens
wcmargin
10-367
wcgopt
Purpose
10wcgopt
Create options object for use with wcgain, wcsens, and wcmargin
Syntax
options = wcgopt
options = wcgopt('name1',value1,'name2',value2,...)
wcgopt
Description
options = wcgopt (with no input arguments) creates an options object with all
the properties set to their default values.
options = wcgopt('name1',value1,'name2',value2,...) creates a wcgain,
wcsens and wcmargin options object called options in which specified properties
have specific values. Any unspecified property is set to its default value. It is
sufficient to type only enough leading characters to define the property name
uniquely. Case is ignored for property names.
wcgopt with no input or output arguments displays a complete list of option
10-368
Object Property
Description
Sensitivity
LowerBoundOnly
FreqPtWise
wcgopt
Object Property
Description
ArrayDimPtWise
frequency
LowerBound >= ABadThreshold +
MBadThreshold*Norm(NominalValue)
10-369
wcgopt
10-370
Object Property
Description
Meaning
VaryUncertainty
AbsTol
RelTol
AbsTol
MGoodThreshold
AGoodThreshold
MBadThreshold
AGoodThreshold
NTimes
MaxCnt
MaxTime
wcgopt
Example
You can create a wcgopt options object called opt with all default values.
opt = wcgopt
Property Object Values:
Sensitivity: 'on'
LowerBoundOnly: 'off'
FreqPtWise: 0
ArrayDimPtWise: []
VaryUncertainty: 25
Default: [1x1 struct]
Meaning: [1x1 struct]
AbsTol: 0.0200
RelTol: 0.0500
MGoodThreshold: 1.0400
AGoodThreshold: 0.0500
MBadThreshold: 20
ABadThreshold: 5
NTimes: 2
MaxCnt: 3
MaxTime: 720
The following statements change the absolute tolerance stopping criterion from
0.02 to 0.04 and the point wise over frequency test from the peak worst-case
value, opt.FreqPtWise=0, to the worst-case value at every frequency.
opt = wcgopt;
opt.AbsTol = 0.04;
opt.FreqPtWise = 1;
opt
Property Object Values:
Sensitivity: 'on'
LowerBoundOnly: 'off'
FreqPtWise: 1
ArrayDimPtWise: []
Default: [1x1 struct]
Meaning: [1x1 struct]
VaryUncertainty: 25
AbsTol: 0.0400
RelTol: 0.0500
MGoodThreshold: 1.0400
AGoodThreshold: 0.0500
10-371
wcgopt
MBadThreshold:
ABadThreshold:
NTimes:
MaxCnt:
MaxTime:
20
5
2
3
720
This statement makes a single call to wcgopt to set the maximum computation
time to 10000 seconds and disables the Sensitivity calculation.
opt = wcgopt('MaxTime',10000,'Sensitivity','off');
See Also
10-372
dkitopt
robopt
wcgain
wcnorm
wcsens
wcmargin
wcmargin
Purpose
10wcmargin
Syntax
wcmargi = wcmargin(p,c)
[wcmargi,wcmargo] = wcmargin(p,c)
wcmargi = wcmargin(p,c,opt)
[wcmargi,wcmargo] = wcmargin(p,c,opt)
Description
10-373
wcmargin
That is, if the closed-loop system has a 2-DOF architecture the reference
channel of the controller should be eliminated resulting in a 1-DOF
architecture as shown in the following figure. Either P or C must be an
uncertain system, uss or ufrd, or an uncertain matrix, umat. If P and C are
ss/tf/zpk or uss objects, the frequency range and number of points used to
calculate wcmargi and wcmargo are chosen automatically.
Basic Syntax
[wcmargi,wcmargo] = wcmargin(L)
[wcmargi,wcmargo] = wcmargin(P,C)
wcmargi and wcmargo are structures corresponding to the loop-at-a-time
worst-case, single-loop gain and phase margin of the channel. For the
single-loop transfer matrix L of size N-by-N, wcmargi is a N-by-1 structure. For
the case with two input arguments, the plant model P will have NY outputs and
NU inputs and hence the controller C must have NU outputs and NY inputs.
wcmargi is a NU-by-1 structure with the following fields:
10-374
Field
Description
GainMargin
PhaseMargin
wcmargin
Field
Description
Frequency
Sensitivity
wcmargo is an N-by-1 structure for the single loop transfer matrix input and
wcmargo is an NY-by-1 structure when the plant and controller are input. In
both these cases, wcmargo has the same fields as wcmargi. The worst-case
bound on the gain and phase margins are calculated based on a balanced
sensitivity function.
[wcmargi,wcmargo] = wcmargin(L,opt) and
[wcmargi,wcmargo] = wcmargin(p,c,opt) specify options described in opt.
(See wcgopt for more details on the options for wcmargin.)
Examples
10-375
wcmargin
; 6 d- K
;6
Set := 10, construct the nominal model G in state-space form, and compute
its frequency response.
a
b
c
d
G
K
=
=
=
=
=
=
[0 10;-10 0];
eye(2);
[1 8;-10 1];
zeros(2,2);
ss(a,b,c,d);
[1 -2;0 1];
The nominal plant was analyzed previously using the loopmargin command.
Based on experimental data, the gain of the first input channel, b(1,1), is
found to vary between 0.97 and 1.06. The following statement generates the
updated uncertain model.
ingain1 = ureal('ingain1',1,'Range',[0.97 1.06]);
b = [ingain1 0;0 1];
Gunc = ss(a,b,c,d);
10-376
wcmargin
You can use the command wcmargin to determine the worst-case gain and
phase margins in the presences of the uncertainty.
[wcmi,wcmo] = wcmargin(Gmodg,K);
The worst-case analysis corresponds to maximum allowable disk margin for all
possible defined uncertainty ranges. The worst-case single-loop margin
analysis performed using wcmargin results in a maximum allowable gain
margin variation of 1.31 and phase margin variations of 15.6 degs in the
second input channel in the presence of the uncertainties 'unmod' and
'ingain1'. wcmi(1)
ans =
GainMargin: [0.3613 2.7681]
PhaseMargin: [-50.2745 50.2745]
Frequency: 0.1000
Sensitivity: [1x1 struct]
wcmi(2)
ans =
GainMargin: [0.7585 1.3185]
PhaseMargin: [-15.6426 15.6426]
Frequency: 0.1000
Sensitivity: [1x1 struct]
Hence even though the second channel had infinite gain margin and 90 degrees
of phase margin, allowing variation in both uncertainties, 'unmod' and
'ingain1' leads to a dramatic reduction in the gain and phase margin. See the
loopmargin command page example for more details
You can display the sensitivity of the worst-case margin in the second input
channel to 'unmod' and 'ingain1' as follows:
wcmi(2).Sensitivity
ans =
ingain1: 12.1865
unmod: 290.4557
The results indicate that the worst-case margins are not very sensitive to the
gain variation in the first input channel, 'ingain1', but very sensitive to the
LTI dynamic uncertainty at the output of the plant.
10-377
wcmargin
You can display the sensitivity of the worst-case margin in the second output
channel to 'unmod' and 'ingain1' as follows:
wcmo(2).Sensitivity
ans =
ingain1: 16.3435
unmod: 392.1320
The results are similar to the worst-case margins at the input. However, the
worst-case margins at the second output channel are even more sensitive to the
LTI dynamic uncertainty than the input channel margins.
See Also
10-378
dmplot
loopsens
loopmargin
robuststab
usubs
wcgain
wcgopt
wcsens
wcnorm
Purpose
10wcnorm
Syntax
maxnorm = wcnorm(m)
[maxnorm,wcu] = wcnorm(m)
[maxnorm,wcu] = wcnorm(m,opts)
[maxnorm,wcu,info] = wcnorm(m)
[maxnorm,wcu,info] = wcnorm(m,opts)
Description
Basic syntax
Suppose mat is a umat or a uss with M uncertain elements. The results of
[maxnorm,maxnormunc] = wcnorm(mat)
maxnorm is a structure with the following fields
Field
Description
LowerBound
UpperBound
maximizes the matrix norm. There are M fieldnames, which are the names of
uncertain elements of mat. The value of each field is the corresponding value of
the uncertain element, such that when jointly combined, lead to the norm value
in maxnorm.LowerBound. The following command shows the norm:
norm(usubs(mat,maxnormunc))
10-379
wcnorm
Basic syntax with third output argument
A third output argument provides information about sensitivities of the
worst-case norm to the uncertain elements ranges.
[maxnorm,maxnormunc,info] = wcgain(mat)
The third output argument info is a structure with the following fields:
Field
Description
Sensitivity
ArrayIndex
10-380
wcnorm
points) is tracked. For that reason, many of the results will be of dimension
1-by-5-by-8.
In general, suppose that the array dimensions of sys are d1dF (758 in
the above example). Furthermore, assume that the ArrayDimPtWise property
of the wcgopt object has been set to some of the integers between 1 and F. Let
e1,e2,,eF denote the dimensions of the array on which the results are
computed. By definition, if j is an integer listed in ArrayDimPtWise, then ej=dj
(all grid points in slot j are computed), otherwise ej=1 (only the maximum in
slot j is computed). In the above example, with ArrayDimPtWise set to [2 3],
it follows that e1=1, e2=5, e3=8.
In this case, the following command
[maxgain,maxgainunc,info] = wcgain(sys,opt)
Description
LowerBound
UpperBound
10-381
wcnorm
Examples
Field
Description
Sensitivity
ArrayIndex
You can construct an uncertain matrix and compute the worst-case norm of the
matrix, as well as its inverse. Your objective is to accurately estimate the
worst-case, or the largest, value of the condition number of the matrix.
a=ureal('a',5,'Range',[4
b=ureal('b',2,'Range',[1
b=ureal('b',3,'Range',[2
c=ureal('c',9,'Range',[8
d=ureal('d',1,'Range',[0
M = [a b;c d];
Mi = inv(M);
[maxnormM] = wcnorm(M)
maxnormM =
LowerBound: 14.7199
UpperBound: 14.7327
[maxnormMi] = wcnorm(Mi)
maxnormMi =
LowerBound: 2.5963
UpperBound: 2.5979
6]);
3]);
10]);
11]);
2]);
The condition number of M must be less than the product of the two upper
bounds for all values of the uncertain elements making up M. Conversely, the
largest value of M condition number must be at least equal to the condition
number of the nominal value of M. Compute these crude bounds on the
worst-case value of the condition number.
10-382
wcnorm
condUpperBound = maxnormM.UpperBound*maxnormMi.UpperBound;
condLowerBound = cond(M.NominalValue);
[condLowerBound condUpperBound]
ans =
5.0757
38.2743
How can you get a more accurate estimate? Recall that the condition number
of an nxm matrix M can be expressed as an optimization, where a free
norm-bounded matrix tries to align the gains of M and M1
( M ) = max
m m
C
max ( ) 1
( max ( MM ) )
The range of values represented by Delta includes 2-by-2 matrices with the
maximum singular value less than or equal to 1.
You can create the expression involving M, Delta and inv(M).
H = M*Delta*Mi;
Finally, consider the stopping criteria and call wcnorm. One stopping criteria
for wcnorm(H) is based on the norm of the nominal value of H. During the
computation, if wcnorm determines that the worst-case norm is at least
ABadThreshold + MBadThreshold*norm ( H.NominalValue )
10-383
wcnorm
maxKappa
maxKappa =
LowerBound: 26.9629
UpperBound: 27.9926
You can verify that wcu makes the condition number as large as
maxKappa.LowerBound.
cond(usubs(M,wcu))
ans =
26.9629
Algorithm
See wcgain
See Also
lti/norm
svd
wcgain
wcgopt
10-384
wcsens
Purpose
10wcsens
Syntax
wcst
wcst
wcst
wcst
wcst
wcst
wcst
wcst
wcst
wcst
Description
=
=
=
=
=
=
=
=
=
=
wcsens(L)
wcsens(L,type)
wcsens(L,opt)
wcsens(L,type,scaling)
wcsens(L,type,scaling,opt)
wcsens(P,C)
wcsens(P,C,type)
wcsens(P,C,opt)
wcsens(P,C,type,scaling)
wcsens(P,C,type,scaling,opt)
Description
Equation
(I+CP)1
CP(I+CP)1
(I+PC)1
10-385
wcsens
Description
Equation
PC(I+PC)1
CP
PC
should only be the compensator in the feedback path, not any reference
channels, if it is a 2-dof architecture (see loopsens). If P and C are ss/tf/zpk
or uss objects, the frequency range and number of points are chosen
automatically. wcst is a structure with the following substructures:
Table 10-1: Fields of wcst
10-386
Field
Description
Si
Ti
So
To
PSi
CSo
Stable
wcsens
Description
MaximumGain
BadUncertainValues
BadSystem
Sensitivity
10-387
wcsens
the maximum relative gain of the uncertain sensitivity function. That is, the
maximum relative gain is the largest ratio of the worst-case gain and the
nominal gain evaluated at each frequency point in the analysis, Similarly if
scaling is a ss/tf/zpk/frd object, bounds on the maximum scaled gain of the
uncertain sensitivity function are found. If scaling is 'Relative'or a
ss/tf/zpk/frd object, the worst-case analysis peaks over frequency. If
scaling is an object, its input/output dimensions should be 1-by-1 or
dimensions compatible with P and C. type and scaling can also be combined
in a cell array, e.g.
wcst = wcsens(P,C,{'Ti','So'},'Abs','Si','Rel','PSi',wt)
wcst = wcsens(P,C,opt) or wcst = wcsens(P,C,type,scaling,opt)
specifies options for the worst-case gain calculation as defined by opt. (See
wcgopt for more details on the options for wcsens.)
The sensitivity of the worst-case sensitivity calculations to the individual
uncertain components can be determined using the options object opt. To
compute the sensitivities to the individual uncertain components, create a
wcgopt options object, and set the Sensitivity property to 'on'.
opt = wcgopt('Sensitivity','on');
wcst = wcsens(P,C,opt)
10-388
wcsens
Examples
The following constructs a feedback loop with a first order plant and a
proportional-integral controller. The time constant is uncertain and the model
also includes an multiplicative uncertainty. The nominal (input) sensitivity
function has a peak of 1.09 at omega = 1.55 rad/sec. Since the plant and
controller are single-input / single-output, the input/output sensitivity
functions are the same.
delta = ultidyn('delta',[1 1]);
tau = ureal('tau',5,'range',[4 6]);
P = tf(1,[tau 1])*(1+0.25*delta);
C=tf([4 4],[1 0]);
looptransfer = loopsens(P,C);
Snom = looptransfer.Si.NominalValue;
norm(Snom,inf)
ans =
1.0864
wcsens is then used to compute the worst-case sensitivity function as the
uncertainty ranges over its possible values. More information about the fields
in wcst.Si can be found in the wcgain help. The badsystem field of wcst.Si
contains the worst case sensitivity function. This worst case sensitivity has a
peak of 1.52 at omega = 1.02 rad/sec. The maxgainunc field of wcst.Si contains
the perturbation that corresponds to this worst case sensitivity function.
wcst = wcsens(P,C)
wcst =
Si: [1x1 struct]
Ti: [1x1 struct]
So: [1x1 struct]
To: [1x1 struct]
PSi: [1x1 struct]
CSo: [1x1 struct]
Stable: 1
Swc = wcst.Si.BadSystem;
omega = logspace(-1,1,50);
bodemag(Snom,'-',Swc,'-.',omega);
legend('Nominal Sensitivity','Worst-Case Sensitivity',...
'Location','SouthEast')
norm(Swc,inf)
ans =
1.5075
10-389
wcsens
References
J. Shin, G.J. Balas, and A.K. Packard, Worst case analysis of the X-38 crew
return vehicle flight control system, AIAA Journal of Guidance, Dynamics and
Control, vol. 24, no. 2, March-April 2001, pp. 261-269.
See Also
loopsens
loopmargin
robuststab
usubs
wcgain
wcgopt
wcmargin
10-390
wcsens
10-391
wcsens
10-392
Index
A
ACC Benchmark plant 10-29
actmod actuator model 5-20
actnom nominal actuator model 5-20
additive error 10-113
hankelmr 10-113
C
Chiang, R. Y.
bilinear pole shifting 10-31
cmsclsyn 10-37
balancmr 10-23
balancmr 3-6
Bamieh, B.A. 10-293
bilinear transform, frequency
continuous to continuous
pole-shifting transform 10-29
continuous to discrete
backward rectangular 10-27
forward rectangular 10-27
shifted Tustin 10-28
general bilinear 10-28
reverse transform 10-27
bisection algorithm 10-128
block diagrams
direction of arrows 5-30
bstmr 3-9
design goals
crossover 2-16
performance 2-16
roll-off 2-16
stability robustness 2-16
disturbance attenuation 2-6
D-K iteration control design commands
summary 5-27
dksyn 5-22
Doyle, J. C.
state-space H 10-112
D-scalings
automatic prefitting 10-61
E
Euclidean norms 5-33
F
feedback 4-8
fitmag 10-95
fitmaglp 10-95
Index-1
Index
bstmr 10-32
hankelmr 10-113
hankelsv 10-120
NCF 1-15
genphase 10-95
get
schurmr 10-285
I
InputGroup property 4-12
InputName property 4-12
H
H
loop shaping 1-10
mixed-sensitivity 1-10
mixsyn 2-17
norm 2-3
norm, sectf 10-301
sampled-data 1-10
H control
performance objectives 5-3
H2
norm 2-3
H2 control synthesis 10-107
Index-2
L
L2-norm 5-28
Le,V. X. 10-188
linear matrix inequalities
LMI solvers 1-18
LMI solvers 1-18
loop shaping 1-10
loopsyn 2-5
loop transfer function matrix 2-5
loopmargin 4-17
loopsens 4-15
Index
loop-shaping synthesis
loopsyn H optimal method 10-184
LTR loop transfer recovery method 10-194
loopsyn 10-184
LQG loop tranfer-function recovery. See ltrsyn
LQG optimal control 10-109
ltrsyn 10-194
magfit 10-95
ncfmargin 10-232
ncfmr 3-14
mfilter 10-207
norm 4-20
Normalized coprime factor 10-228
Left Compie Factorization 10-228
Right Coprime Facotrization 10-228
Normalized coprme factor
ncfmr 10-228
Normallized coprime factor
balanced model truncation 10-228
norms 5-28
H 2-2
H2 2-2
performance 5-29
Mixed H /H2
lcontroller synthesis 10-8
mixed H/H2
controller synthesis 1-10
mixed-sensitivity cost function 2-17
mixed-sensitivity loop shaping 2-17
mixed-sensitivity synthesis
augw 10-20
ncfsyn 10-232
NominalValue property 4-12
O
OutputGroup property 4-12
OutputName property 4-12
P
Percentage property 4-3
Index-3
Index
perturbation
additive 2-6
multiplicative 2-6
PlusMinus property 4-3
proper system 10-22
reduce 3-6
stabproj 10-318
S
Safonov, M. G.
imaginy axis zeros H 10-31
return difference matrix 10-112
stabiltiy and robustness 10-304
schurmr 3-6
sdhfsyn 10-292
sectf 10-300
sector bilinear transformation 10-12, 10-300
sensitivity 2-5
sensitivity S 10-20
singular values 2-3
properties of 2-3
Index-4
T
2-norm
definition 5-28
U
ultidyn 4-5
uncertain elements 4-2
uncertain LTI system 1-3
uncertain parameters 4-3
uncertain state-space object
See USS object
uncertainty
capturing 4-6
ureal 4-3
USS object 1-5
usubs
Index
W
W1 and W2 shaping filters 4-13
wcgain
Z
Zames, G. 10-304
Zhou, K. 10-235
Index-5