National Instruments Calculator 370760B 01 User Manual

TM  
MATRIXx  
TM  
Xmath Xµ Manual  
MATRIXx Xmath Basics  
The MATRIXx products and related items have been purchased from Wind  
River Systems, Inc. (formerly Integrated Systems, Inc.). These reformatted user  
materials may contain references to those entities. Any trademark or copyright  
notices to those entities are no longer valid and any references to those entities  
as the licensor to the MATRIXx products and related items should now be  
considered as referring to National Instruments Corporation.  
National Instruments did not acquire RealSim hardware (AC-1000, AC-104,  
PCI Pro) and does not plan to further develop or support RealSim software.  
NI is directing users who wish to continue to use RealSim software and hardware  
to third parties. The list of NI Alliance Members (third parties) that can provide  
RealSim support and the parts list for RealSim hardware are available in our  
online KnowledgeBase. You can access the KnowledgeBase at  
www.ni.com/support.  
NI plans to make it easy for customers to target NI software and hardware,  
including LabVIEW real-time and PXI, with MATRIXx in the future.  
For information regarding NI real-time products, please visit  
www.ni.com/realtimeor contact us at [email protected].  
April 2004 Edition  
Part Number 370760B-01  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Important Information  
Warranty  
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects  
in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National  
Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives  
notice of such defects during the warranty period. National Instruments does not warrant that the operation of the software shall be  
uninterrupted or error free.  
A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before  
any equipment will be accepted for warranty work. National Instruments will pay the shipping costs of returning to the owner parts which are  
covered by warranty.  
National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical  
accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent  
editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected.  
In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.  
EXCEPT AS SPECIFIED HEREIN, NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF  
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF  
NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER. NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR  
DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY  
THEREOF. This limitation of the liability of National Instruments will apply regardless of the form of action, whether in contract or tort, including  
negligence. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments  
shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover  
damages, defects, malfunctions, or service failures caused by owner’s failure to follow the National Instruments installation, operation, or  
maintenance instructions; owner’s modification of the product; owner’s abuse, misuse, or negligent acts; and power failure or surges, fire,  
flood, accident, actions of third parties, or other events outside reasonable control.  
Copyright  
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying,  
recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National  
Instruments Corporation.  
Trademarks  
LabVIEW, MATRIXx, National Instruments, NI, ni.com, SystemBuild, and Xmathare trademarks of National Instruments  
Corporation.  
Product and company names mentioned herein are trademarks or trade names of their respective companies.  
Patents  
For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your software, the patents.txt file  
on your CD, or ni.com/patents.  
WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS  
(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF  
RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN  
ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT  
INJURY TO A HUMAN.  
(2) IN ANY APPLICATION, INCLUDING THE ABOVE, RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE  
IMPAIRED BY ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY,  
COMPUTER HARDWARE MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE FITNESS, FITNESS OF COMPILERS  
AND DEVELOPMENT SOFTWARE USED TO DEVELOP AN APPLICATION, INSTALLATION ERRORS, SOFTWARE AND  
HARDWARE COMPATIBILITY PROBLEMS, MALFUNCTIONS OR FAILURES OF ELECTRONIC MONITORING OR CONTROL  
DEVICES, TRANSIENT FAILURES OF ELECTRONIC SYSTEMS (HARDWARE AND/OR SOFTWARE), UNANTICIPATED USES OR  
MISUSES, OR ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS SUCH AS THESE ARE  
HEREAFTER COLLECTIVELY TERMED “SYSTEM FAILURES”). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD  
CREATE A RISK OF HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH) SHOULD  
NOT BE RELIANT SOLELY UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE. TO AVOID  
DAMAGE, INJURY, OR DEATH, THE USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO  
PROTECT AGAINST SYSTEM FAILURES, INCLUDING BUT NOT LIMITED TO BACK-UP OR SHUT DOWN MECHANISMS.  
BECAUSE EACH END-USER SYSTEM IS CUSTOMIZED AND DIFFERS FROM NATIONAL INSTRUMENTS' TESTING  
PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER MAY USE NATIONAL INSTRUMENTS PRODUCTS IN  
COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT EVALUATED OR CONTEMPLATED BY NATIONAL  
INSTRUMENTS, THE USER OR APPLICATION DESIGNER IS ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING  
THE SUITABILITY OF NATIONAL INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE  
INCORPORATED IN A SYSTEM OR APPLICATION, INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN,  
PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Contents  
1
Introduction  
1
1
2
3
1.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
1.2 Manual Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
1.3 How to avoid really reading this Manual . . . . . . . . . . . . . . . . . . .  
2
Overview of the Underlying Theory  
5
5
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.1.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.1.2 An Introduction to Norms . . . . . . . . . . . . . . . . . . . . . . .  
2.2 Modeling Uncertain Systems . . . . . . . . . . . . . . . . . . . . . . . . .  
2.2.1 Perturbation Models for Robust Control . . . . . . . . . . . . . . .  
2.2.2 Linear Fractional Transformations . . . . . . . . . . . . . . . . . .  
2.2.3 Assumptions on P, ∆, and the unknown signals . . . . . . . . . .  
2.2.4 Additional Perturbation Structures . . . . . . . . . . . . . . . . . .  
6
8
13  
13  
17  
22  
23  
iii  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.2.5 Obtaining Robust Control Models for Physical Systems . . . . . .  
2.3 Hand H2 Design Methodologies . . . . . . . . . . . . . . . . . . . . . .  
2.3.1 HDesign Overview . . . . . . . . . . . . . . . . . . . . . . . . .  
2.3.2 Assumptions for the HDesign Problem . . . . . . . . . . . . . .  
2.3.3 A Brief Review of the Algebraic Riccati Equation . . . . . . . . . .  
2.3.4 Solving the HDesign Problem for a Special Case . . . . . . . . .  
2.3.5 Further Notes on the HDesign Algorithm . . . . . . . . . . . . .  
2.3.6 H2 Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.3.7 Details of the H2 Design Procedure . . . . . . . . . . . . . . . . .  
2.4 µ Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.4.1 Measures of Performance . . . . . . . . . . . . . . . . . . . . . . .  
2.4.2 Robust Stability and µ . . . . . . . . . . . . . . . . . . . . . . . . .  
2.4.3 Robust Performance . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.4.4 Properties of µ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.4.5 The Main Loop Theorem . . . . . . . . . . . . . . . . . . . . . . .  
2.4.6 State-space Robustness Analysis Tests . . . . . . . . . . . . . . . .  
2.4.7 Analysis with both Real and Complex Perturbations . . . . . . . .  
2.5 µ Synthesis and D-K Iteration . . . . . . . . . . . . . . . . . . . . . . . .  
2.5.1 µ-Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.5.2 The D-K Iteration Algorithm . . . . . . . . . . . . . . . . . . . . .  
28  
29  
31  
32  
33  
36  
38  
40  
40  
42  
42  
44  
46  
47  
49  
51  
58  
58  
58  
60  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.6 Model Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.6.1 Truncation and Residualization . . . . . . . . . . . . . . . . . . . .  
2.6.2 Balanced Truncation . . . . . . . . . . . . . . . . . . . . . . . . . .  
2.6.3 Hankel Norm Approximation . . . . . . . . . . . . . . . . . . . . .  
64  
65  
65  
68  
3
Functional Description of Xµ  
71  
71  
71  
72  
74  
77  
78  
81  
81  
81  
82  
82  
85  
85  
85  
88  
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.2 Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.2.1 Dynamic Systems . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.2.2 pdms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.2.3 Subblocks: selecting input & outputs . . . . . . . . . . . . . . . . .  
3.2.4 Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.2.5 Continuous to Discrete Transformations . . . . . . . . . . . . . . .  
3.3 Matrix Information, Display and Plotting . . . . . . . . . . . . . . . . . .  
3.3.1 Information Functions for Data Objects . . . . . . . . . . . . . . .  
3.3.2 Formatted Display Functions . . . . . . . . . . . . . . . . . . . . .  
3.3.3 Plotting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.4 System Response Functions . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.4.1 Creating Time Domain Signals . . . . . . . . . . . . . . . . . . . .  
3.4.2 Dynamic System Time Responses . . . . . . . . . . . . . . . . .  
3.4.3 Frequency Responses . . . . . . . . . . . . . . . . . . . . . . . . . .  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3.5 System Interconnection . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
3.6 H2 and HAnalysis and Synthesis . . . . . . . . . . . . . . . . . . . . . .  
3.6.1 Controller Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . .  
91  
95  
95  
3.6.2 System Norm Calculations . . . . . . . . . . . . . . . . . . . . . . 105  
3.7 Structured Singular Value (µ) Analysis and Synthesis . . . . . . . . . . . 107  
3.7.1 Calculation of µ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107  
3.7.2 The D-K Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . 110  
3.7.3 Fitting D Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112  
3.7.4 Constructing Rational Perturbations . . . . . . . . . . . . . . . . . 120  
3.7.5 Block Structured Norm Calculations . . . . . . . . . . . . . . . . . 121  
3.8 Model Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121  
3.8.1 Truncation and Residualization . . . . . . . . . . . . . . . . . . . . 122  
3.8.2 Balanced Realizations . . . . . . . . . . . . . . . . . . . . . . . . . 123  
3.8.3 Hankel Singular Value Approximation . . . . . . . . . . . . . . . . 125  
4
Demonstration Examples  
127  
4.1 The Himat Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127  
4.1.1 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . 127  
4.1.2 State-space Model of Himat . . . . . . . . . . . . . . . . . . . . . . 128  
4.1.3 Creating a Weighted Interconnection Structure for Design . . . . . 131  
4.1.4  
H
Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.1.5 µ Analysis of the H Controller . . . . . . . . . . . . . . . . . . . 138  
4.1.6 Fitting D-scales for the D-K Iteration . . . . . . . . . . . . . . . . 140  
4.1.7 Design Iteration #2 . . . . . . . . . . . . . . . . . . . . . . . . . . 143  
4.1.8 Simulation Comparison with a Loopshaping Controller . . . . . . . 146  
4.2 A Simple Flexible Structure Example . . . . . . . . . . . . . . . . . . . . 153  
4.2.1 The Control Design Problem . . . . . . . . . . . . . . . . . . . . . 153  
4.2.2 Creating the Weighted Design Interconnection Structure . . . . . . 155  
4.2.3 Design of an HController . . . . . . . . . . . . . . . . . . . . . . 162  
4.2.4 Robustness Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 165  
4.2.5 D-K Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168  
4.2.6 A Simulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . 173  
5 Bibliography  
192  
201  
6
Function Reference  
6.1 Xµ Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201  
6.2 Xµ Subroutines and Utilities . . . . . . . . . . . . . . . . . . . . . . . . . 377  
Appendices  
391  
A
Translation Between Matlab µ-Tools and Xµ . . . . . . . . . . . . . . . 391  
A.1  
A.2  
Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392  
Matrix Information, Display and Plotting . . . . . . . . . . . . . . 397  
Download from Www.Somanuals.com. All Manuals Search And Download.  
A.3  
A.4  
A.5  
A.6  
A.7  
System Response Functions . . . . . . . . . . . . . . . . . . . . . . 398  
System Interconnection . . . . . . . . . . . . . . . . . . . . . . . . 399  
Model Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399  
H2 and H Analysis and Synthesis . . . . . . . . . . . . . . . . . 399  
Structured Singular Value (µ) Analysis and Synthesis . . . . . . . 400  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 1  
Introduction  
Xµ is a suite of Xmath functions for the modeling, analysis and synthesis of linear  
robust control systems. Robust control theory has developed rapidly during the last  
decade to the point where a useful set of computational tools can be used to solve a wide  
range of control problems. This theory has already been applied to a wide range of  
practical problems.  
This manual describes the Xµ functions and presents a demonstration of their  
application. The underlying theory is outlined here and further theoretical details can  
be found in the many references provided.  
It is assumed that the reader is familiar with the use of Xmath; the Xmath Basics  
manual and the on-line demos are a good way of getting started with Xmath. A good  
knowledge of control theory and application is also assumed. The more that is known  
about robust control theory the better as the details are not all covered here.  
1.1 Notation  
Several font types or capitalization styles are used to distinguish between data objects.  
The following table lists the various meanings.  
1
Download from Www.Somanuals.com. All Manuals Search And Download.  
Notation  
pdm  
Meaning  
Xmath parameter dependent matrix data object  
Dynamic System Xmath dynamic system data object  
Code examples and function names are set in typewriter font to distinguish them from  
narrative text.  
1.2 Manual Outline  
Chapter 2 outlines the applicable robust control theory. Perturbation models and linear  
fractional transformations form the basis of the modeling framework. The discussion is  
aimed at an introductory level and not all of the subtleties are covered. The theory  
continues with an overview of the H design technique. Again the reader is referred  
elsewhere for detail of the theory. The robust control methodology covered here is based  
on the analysis of systems with perturbations. This is covered in some detail as such an  
understanding is required for effective use of this software. Repeated analysis can be  
used to improve upon the synthesis; this takes us from the standard H design method  
to the more sophisticated µ-synthesis techniques.  
The translation between the theoretical concepts and the use of the software is made in  
Chapter 3. The means of performing typical robust control calculations are discussed in  
some detail. This chapter also serves to introduce the Xµ functions. The discussion is  
extended to include some of the relevant Xmath functions. A prior reading of Chapter 2  
is helpful for putting this material in context.  
The best means of getting an idea of the use of the software is to study completed design  
examples, given in Chapter 4. These currently includes a design study for an aerospace  
application. Typical modeling, analysis, synthesis, and simulation studies are illustrated.  
These studies can be used as initial templates for the user’s application.  
Chapter 6 is a function reference guide containing a formal description of each function.  
This is similar to that given via the on-line help capability. Functions are listed in  
relevant groupings at the start of the chapter. This gives an overview of some of the  
software capabilities.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1.3 How to avoid really reading this Manual  
The layout of the manual proceeds from introduction to background to syntax detail to  
application descriptions. This may be tediously theoretical for some. If you are one of  
those that considers reading the manual as the option of last resort1 then go directly to  
the applications (Chapter 4). If you have no prior Xmath experience then skimming  
through Chapter 3 is essential. After running the demos and getting a feel for what the  
software can do look briefly through the theory section.  
1And it seems that you are now exercising that option  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2  
Overview of the Underlying  
Theory  
2.1 Introduction  
The material covered here is taken from a variety of sources. The basic approach is  
described by Doyle [1, 2], and further elaborated upon by Packard [3]. Summaries have  
also appeared in work by Smith [4] and others.  
Motivating background can be found in the early paper by Doyle and Stein [5]. An  
overview of the robust control approach, particularly for process control systems, is  
given by Morari and Zafiriou [6]. The reader can also find a description of the H/µ  
synthesis robust control approach in [7].  
There are a number of descriptions of this approach to practical problems. In the last  
few years a significant number of these have been described in the proceedings of the  
American Control Conference (ACC) and the IEEE Control and Decision Conference  
(CDC). Only some of the early illustrative examples are cited here.  
Application of µ synthesis to a shuttle control subsystem is given by Doyle et al. [8].  
Examples of flexible structure control are described by Balas and  
coworkers [9, 10, 11, 12] and Smith, Fanson and Chu [13, 14]. There have also been  
5
Download from Www.Somanuals.com. All Manuals Search And Download.  
several studies involving process control applications, particularly high purity distillation  
columns. These are detailed by Skogestad and Morari in [15, 16, 17, 18]  
Section 2.2 introduces robust control perturbation models and linear fractional  
transformations. Weighted Hdesign is covered in Section 2.3. The analysis of closed  
loop systems with the structured singular value (µ) is overviewed in Section 2.4.  
Section 2.5 discusses µ synthesis and the D-K iteration. Model reduction is often used  
to reduce the controller order prior to implementation and this is covered in Section 2.6.  
2.1.1 Notation  
We will use some fairly standard notation and this is given here for reference.  
R
C
set of real numbers  
set of complex numbers  
n
R
set of real valued vectors of dimension n × 1  
set of complex valued vectors of dimension n × 1  
set of real valued matrices of dimension n × m  
set of complex valued matrices of dimension n × m  
identity matrix of dimension n × n  
n
C
n×m  
n×m  
R
C
In  
0
matrix (or vector or scalar) of zeros of appropriate dimension  
n×m  
The following apply to a matrix, M ∈ C  
.
MT  
M∗  
transpose of M  
complex conjugate transpose of M  
|M|  
absolute value of each element of M (also applies if M is a vector or scalar)  
real part of M  
imaginary part of M  
dimensions of M  
Re{M}  
Im{M}  
dim(M)  
σmax(M) maximum singular value of M  
σmin(M) minimum singular value of M  
Mij  
element of M in row i, column j. (also used for the i,j partition of a previously defined  
partition of M)  
an eigenvalue of M  
λi(M)  
ρ(M)  
kMk  
spectral radius (maxi |λi(M)|)  
norm of M (see section 2.1.2 for more details)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.1: The generic robust control model structure  
P
n
Trace(M) trace of M ( i=1 Mii)  
Block diagrams will be used to represent interconnections of systems. Consider the  
example feedback interconnection shown in Fig. 2.1. Notice that P has been partitioned  
into four parts. This diagram represents the equations,  
z
y
v
=
=
=
P11v + P12u  
P21v + P22u  
z.  
This type of diagram (and the associated equations) will be used whenever the objects  
P, z, y, etc., are well defined and compatible. For example P could be a matrix and z,  
y, etc., would be vectors. If P represented a dynamic system then z, y, etc., would be  
signals and  
y = P21v + P22u,  
Download from Www.Somanuals.com. All Manuals Search And Download.  
is interpreted to mean that the signal y is the sum of the response of system P21 to  
input signal v and system P22 to input signal u. In general, we will not be specific about  
the representation of the system P. If we do need to be more specific about P, then  
P(s) is the Laplace representation and p(t) is the impulse response.  
Note that Figure 2.1 is drawn from right to left. We use this form of diagram because it  
more closely represents the order in which the systems are written in the corresponding  
mathematical equations. We will later see that the particular block diagram shown in  
Figure 2.1 is used as a generic description of a robust control system.  
In the case where we are considering a state-space representation, the following notation  
is also used. Given P(s), with state-space representation,  
sx(s)  
=
=
Ax(s) + Bu(s)  
y(s)  
Cx(s) + Du(s),  
we associate this description with the notation,  
A B  
C D  
P(s) =  
.
The motivation for this notation comes from the example presented in Section 2.2.4. We  
will also use this notation to for state-space representation of discrete time systems  
(where s in the above is replaced by z). The usage will be clear from the context of the  
discussion.  
2.1.2 An Introduction to Norms  
A norm is simply a measure of the size of a vector, matrix, signal, or system. We will  
define and concentrate on particular norms for each of these entities. This gives us a  
formal way of assessing whether or not the size of a signal is large or small enough. It  
allows us to quantify the performance of a system in terms of the size of the input and  
output signals.  
Unless stated otherwise, when talking of the size of a vector, we will be using the  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Euclidean norm. Given,  
x1  
.
.
.
x =  
,
xn  
the Euclidean (or 2-norm) of x, denoted by kxk, is defined by,  
 
!
1/2  
n
X
kxk =  
|xi|  
.
i=1  
Many other norms are also options; more detail on the easily calculated norms can be  
found in the on-line help for the norm function. The term spatial-norm is often applied  
when we are looking at norms over the components of a vector.  
Now consider a vector valued signal,  
x1(t)  
.
.
.
x(t) =  
.
xn(t)  
As well as the issue of the spatial norm, we now have the issue of a time norm. In the  
theory given here, we concentrate on the 2-norm in the time domain. In otherwords,  
Z
1/2  
2
kxi(t)k =  
|xi(t)| dt  
.
−∞  
This is simply the energy of the signal. This norm is sometimes denoted by a subscript  
of two, i.e. kxi(t)k2. Parseval’s relationship means that we can also express this norm in  
the Laplace domain as follows,  
Z
1/2  
1
2π  
2
kxi(s)k =  
|xi(ω)| dω  
.
−∞  
Download from Www.Somanuals.com. All Manuals Search And Download.  
For persistent signals, where the above norm is unbounded, we can define a power norm,  
 
!
1/2  
Z
T
1
2T  
2
kxi(t)k = lim  
|xi(t)| dt  
.
(2.1)  
T →∞  
T  
The above norms have been defined in terms of a single component, xi(t), of a vector  
valued signal, x(t). The choice of spatial norm determines how we combine these  
components to calculate kx(t)k. We can mix and match the spatial and time parts of the  
norm of a signal. In practice it usually turns out that the choice of the time norm is  
more important in terms of system analysis. Unless stated otherwise, kx(t)k implies the  
Euclidean norm spatially and the 2-norm in the time direction.  
Certain signal spaces can be defined in terms of their norms. For example, the set of  
signals x(t), with kx(t)k2 finite is denoted by L2. The formal definition is,  
L2 = x(t) kx(t)k < ∞  
.
A similar approach can be taken in the discrete-time domain. Consider a sequence,  
{x(k)}k=0, with 2-norm given by,  
 
!
1/2  
X
2
kx(k)k2 =  
|x(k)|  
.
k=0  
A lower case notation is used to indicate the discrete-time domain. All signals with finite  
2-norm are therefore,  
l2 = x(k), k = 0, . . . , ∞ kx(k)k2 < ∞  
.
We can essentially split the space L2 into two pieces, H2 and H2. H2 is the set of  
elements of L2 which are analytic in the right-half plane. This can be thought of as  
those which have their poles strictly in the left half plane; i.e. all stable signals.  
Similarly, H2are all signal with their poles in the left half plane; all strictly unstable  
Download from Www.Somanuals.com. All Manuals Search And Download.  
signals. Strictly speaking, signals in H2 or Hare not defined on the ω axis. However  
we usually consider them to be by taking a li2mit as we approach the axis.  
A slightly more specialized set is RL2, the set of real rational functions in L2. These are  
strictly proper functions with no poles on the imaginary axis. Similarly we can consider  
RH2 as strictly proper stable functions and RH2 as strictly proper functions with no  
poles in Re(s)< 0. The distinction between RL2 and L2 is of little consequence for the  
sorts of analysis we will do here.  
The concept of a unit ball will also come up in the following sections. This is simply the  
set of all signals (or vectors, matrices or systems) with norm less than or equal to one.  
The unit ball of L2, denoted by BL2, is therefore defined as,  
BL2 = x(t) kx(t)k2 < 1  
.
Now let’s move onto norms of matrices and systems. As expected the norm of a matrix  
gives a measure of its size. We will again emphasize only the norms which we will  
consider in the following sections. Consider defining a norm in terms of the maximum  
gain of a matrix or system. This is what is known as an induced norm. Consider a  
matrix, M, and vectors, u and y, where  
y = Mu.  
Define, kMk, by  
kyk  
kMk = max  
.
u,kuk<kuk  
Because M is obviously linear this is equivalent to,  
kMk = max kyk.  
u,kuk=1  
The properties of kMk will depend on how we define the norms for the vectors u and y.  
If we choose our usual default of the Euclidean norm then kMk is given by,  
kMk = σmax(M),  
Download from Www.Somanuals.com. All Manuals Search And Download.  
where σmax denotes the maximum singular value. Not all matrix norms are induced  
from vector norms. The Froebenius norm (square root of the sum of the squares of all  
matrix elements) is one such example.  
Now consider the case where P(s) is a dynamic system and we define an induced norm  
from L2 to L2 as follows. In this case, y(s) is the output of P(s)u(s) and  
ky(s)k2  
kP(s)k = max  
.
u(s)∈L2 ku(s)k2  
Again, for a linear system, this is equivalent to,  
kP(s)k = max ky(s)k2 .  
u(s)BL2  
This norm is called the -norm, usually denoted by kP(s)k. In the single-input,  
single-output case, this is equivalent to,  
kP(s)k= ess sup |P(ω)|.  
ω
This formal definition uses the term ess sup, meaning essential supremum. The  
“essential” part means that we drop all isolated points from consideration. We will  
always be considering continuous systems so this technical point makes no difference to  
us here. The “supremum” is conceptually the same as a maximum. The difference is  
that the supremum also includes the case where we need to use a limiting series to  
approach the value of interest. The same is true of the terms “infimum” (abbreviated to  
“inf”) and “minimum.” For practical purposes, the reader can think instead in terms of  
maximum and minimum.  
Actually we could restrict u(s) ∈ H2 in the above and the answer would be the same. In  
other words, we can look over all stable input signals u(s) and measure the 2-norm of  
the output signal, y(s). The subscript, , comes from the fact that we are looking for  
the supremum of the function on the ω axis. Mathematicians sometimes refer to this  
norm as the “induced 2-norm.” Beware of the possible confusion when reading some of  
the mathematical literature on this topic.  
If we were using the power norm above (Equation 2.1) for the input and output norms,  
the induced norm is still kP(s)k.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The set of all systems with bounded -norm is denoted by L. We can again split this  
into stable and unstable parts. Hdenotes the stable part; those systems with |P(s)|  
finite for all Re(s)> 0. This is where the name “Hcontrol theory” originates, and we  
often call this norm the H-norm. Again we can restrict ourselves to real rational  
functions, so RLis the set of proper transfer functions with no poles on the ω axis.  
Similary, RHis the set of proper, stable transfer functions.  
Again, we are free to choose a spatial norm for the input and output signals u(s) and  
y(s). In keeping with our above choices we will choose the Euclidean norm. So if P(s) is  
a MIMO system, then,  
kP(s)k= sup σmax[P(ω)].  
ω
There is another choice of system norm that will arise in the following sections. This is  
the H2-norm for systems, defined as,  
Z
1/2  
1
2π  
kP(s)k2 =  
−∞ Trace[P(ω)P(ω)]dω  
,
where P(ω)denotes the conjugate transpose of P(ω) and the trace of a matrix is the  
sum of its diagonal elements. This norm will come up when we are considering linear  
quadratic Gaussian (LQG) problems.  
2.2 Modeling Uncertain Systems  
2.2.1 Perturbation Models for Robust Control  
A simple example will be used to illustrate the idea of a perturbation model. We are  
interested in describing a system by a set of models, rather than just a nominal model.  
Our uncertainty about the physical system will be represented in an unknown  
component of the model. This unknown component is a perturbation, ∆, about which  
we make as few assumptions as possible; maximum size, linearity, time-invariance, etc..  
Every different perturbation, ∆, gives a slightly different system model. The complete  
Download from Www.Somanuals.com. All Manuals Search And Download.  
robust control model is therefore a set description and we hope that some members of  
this set capture some of the uncertain or unmodeled aspects of our physical system.  
For example, consider the “uncertain” model illustrated in Figure 2.2. This picture is  
equivalent to the input-output relationship,  
y = [ (I + ∆Wm)Pnom ] u.  
(2.2)  
Figure 2.2: Generic output multiplicative perturbation model  
In this figure, ∆, Wm and Pnom are dynamic systems. The most general form for the  
theory can be stated with these blocks as elements of H. For the purposes of  
calculation we will be dealing with Xmath Dynamic Systems, and in keeping with this  
we will tend to restrict the theoretical discussion to RH, stable, proper real rational  
transfer function matrices.  
The only thing that we know about the perturbation, ∆, is that kk1. Each ∆,  
with kk1 gives a different transfer function between u and y. The set of all  
possible transfer functions, generated in this manner, is called P. More formally,  
P = (I + ∆Wm)Pnom kk1  
.
(2.3)  
Now we are looking at a set of possible transfer functions,  
y(s) = P(s)u(s),  
where P(s) ∈ P.  
Equation 2.2 represents what is known as a multiplicative output perturbation  
structure. This is perhaps one of the easiest to look at initially as W(s) can be viewed  
Download from Www.Somanuals.com. All Manuals Search And Download.  
as specifying a maximum percentage error between Pnom and every other element of P.  
The system Pnom(s) is the element of P that comes from ∆ = 0 and is called the  
nominal system. In otherwords, for ∆ = 0, the input-output relationship is  
y(s) = Pnom(s) u(s). As ∆ deviates from zero (but remains bounded in size), the  
nominal system is multiplied by (I + ∆Wm(s)). Wm(s) is a frequency weighting function  
which allows us the specify the maximum effect of the perturbation for each frequency.  
Including Wm(s) allows us to model P with ∆ being bounded by one. Any  
normalization of ∆ is simply included in Wm(s).  
We often assume that ∆ is also linear and time-invariant. This means that ∆(ω) is  
simply an unknown, complex valued matrix at each frequency, ω. If kk1, then, at  
each frequency, σmax(∆(ω)) 1. Section 2.2.3 gives a further discussion on the pros  
and cons of considering ∆ to be linear, time-invariant.  
Now consider an example of this approach from a Nyquist point of view. A simple first  
order SISO system with multiplicative output uncertainty is modeled as  
y(s) = (I + Wm(s)∆)Pnom(s) u(s),  
where  
1 + 0.05s  
1 + s  
0.1 + 0.2s  
1 + 0.05s  
Pnom(s) =  
and Wm(s) =  
.
Figure 2.3 illustrates the set of systems generated by a linear time-invariant ∆,  
kk1.  
At each frequency, ω, the transfer function of every element of P, lies within a circle,  
centered at Pnom(ω), of radius |Pnom(ω)Wm(ω)|. Note that for certain frequencies the  
disks enclose the origin. This allows us to consider perturbed systems that are  
non-minimum phase even though the nominal system is not.  
It is worth pointing out that P is still a model; in this case a set of regions in the  
Nyquist plane. This is model set is now able to describe a larger set of system behaviors  
than a single nominal model. There is still an inevitable mismatch between any model  
(robust control model set or otherwise) and the behaviors of a physical system.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1
0.5  
0
-0.5  
-1  
-0.5  
0
0.5  
1
1.5  
Real  
Figure 2.3: Nyquist diagram of the set of systems, P  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.4: Unity gain negative feedback for the example system, P0 + ∆Wa  
2.2.2 Linear Fractional Transformations  
A model is considered to be an interconnection of lumped components and perturbation  
blocks. In this discussion we will denote the input to the model by u, which can be a  
vector valued signal representing input signals such as control inputs, disturbances, and  
noise. The outputs signal, denoted in this discussion by y, are also vector valued and can  
represent system outputs and other variables of interest.  
In order to treat large systems of interconnected components, it is necessary to use a  
model formulation that is general enough to handle interconnections of systems. To  
illustrate this point consider an affine model description:  
y = (P0 + ∆Wa)u, kk1,  
(2.4)  
where u is the input and y is the output. ∆ again represents an unknown but bounded  
perturbation. This form of perturbed model is known as an additive perturbation  
description. While such a description could be applied to a large class of linear systems,  
it is not general enough to describe the interconnection of models. More specifically, an  
interconnection of affine models is not necessarily affine. To see this, consider unity gain  
positive feedback around the above system. This is illustrated in Figure 2.4.  
The new input-output transfer function is  
y = (P0 + ∆Wa)[I + (P0 + ∆Wa)]1 r.  
(2.5)  
It is not possible to represent the new system with an affine model. Note that stability  
questions arise from the consideration of the invertibility of [I + (P0 + ∆Wa)].  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.5: Generic LFT model structure including perturbations,∆  
A generic model structure, referred to as a linear fractional transformation (LFT),  
overcomes the difficulties outlined above. The LFT model is equivalent to the  
relationship,  
y = P21∆(I P11∆)1P12 + P22 u,  
(2.6)  
where the ∆ is the norm bounded perturbation. Figure 2.5 shows a block diagram  
equivalent to the system described by Equation 2.6. Because this form of interconnection  
is widely used, we will give it a specific notation. Equation 2.6 is abbreviated to,  
y = Fu(P, ∆)u.  
The subscript, u, indicates that the ∆ is closed in the upper loop. We will also use  
Fl(., .) when the lower loop is closed.  
In this figure, the signals, u, y, z and v can all be vector valued, meaning that the  
partitioned parts of P, (P11, etc.) can themselves be matrices of transfer functions.  
To make this clear we will look at the perturbed system example, given in Equation 2.4,  
Download from Www.Somanuals.com. All Manuals Search And Download.  
in an LFT format. The open-loop system is described by,  
y = Fu(Polp, ∆)u,  
where  
0 Wa  
I P0  
Polp  
=
.
The unity gain, negative feedback configuration, illustrated in Figure 2.4 (and given in  
Equation 2.5) can be described by,  
y = Fu(Gclp, ∆)r,  
where  
Wa(I + P0)1 Wa(I + P0)1  
Gclp  
=
(I + P0)1  
P0(I + P0)1  
Figure 2.5 also shows the perturbation, ∆ as block structured. In otherwords,  
∆ = diag(∆1, . . . , m).  
(2.7)  
This allows us to consider different perturbation blocks in a complex interconnected  
system. If we interconnect two systems, each with a ∆ perturbation, then the result can  
always be expressed as an LFT with a single, structured perturbation. This is a very  
general formulation as we can always rearrange the inputs and outputs of P to make ∆  
block diagonal.  
The distinction between perturbations and noise in the model can be seen from both  
Equation 2.6 and Figure 2.5. Additive noise will enter the model as a component of u.  
The ∆ block represents the unknown but bounded perturbations. It is possible that for  
some ∆, (I P11∆) is not invertible. This type of model can describe nominally stable  
systems which can be destabilized by perturbations. Attributing unmodeled effects  
purely to additive noise will not have this characteristic.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The issue of the invertibility of (I P11∆) is fundamental to the study of the stability of  
a system under perturbations. We will return to this question in much more detail in  
Section 2.4. It forms the basis of the µ analysis approach.  
Note that Equation 2.7 indicates that we have m blocks, ∆i, in our model. For  
notational purposes we will assume that each of these blocks is square. This is actually  
without loss of generality as in all of the analysis we will do here we can square up P by  
adding rows or columns of zeros. This squaring up will not affect any of the analysis  
results. The software actually deals with the non-square case; we must  
specify the input and output dimensions of each block.  
The block structure is a m-tuple of integers, (k1, . . . , km), giving the dimensions of each  
i block. It is convenient to define a set, denoted here by , with the appropriate block  
structure representing all possible ∆ blocks, consistent with that described above. By  
this it is meant that each member of the set of be of the appropriate type (complex  
matrices, real matrices, or operators, for example) and have the appropriate dimensions.  
In Figure 2.5 the elements P11 and P12 are not shown partitioned with respect to the  
i. For consistency the sum of the column dimensions of the ∆i must equal the row  
dimension of P11. Now define as  
n
o
= diag (∆ , . . . , ∆ ) dim(∆ ) = k × k  
.
1
m
i
i
i
It is assumed that each ∆i is norm bounded. Scaling P allows the assumption that the  
norm bound is one. If the input to ∆i is zi and the output is vi, then  
kvik = kizik ≤ kzik.  
It will be convenient to denote the unit ball of , the subset of norm bounded by  
one, by B∆. More formally  
n
o
B∆ = ∆ kk ≤ 1 .  
Putting all of this together gives the following abbreviated representation of the  
perturbed model,  
y = Fu(P, ∆)u,  
B∆.  
(2.8)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.6: Example model: multiplicative output perturbation with weighted output  
noise  
References to a robust control model will imply a description of the form given in  
Equation 2.8.  
As a example, consider one of the most common perturbation model descriptions,  
illustrated in Figure 2.6. This model represents a perturbed system with bounded noise  
at the output.  
The example model is given by,  
y = Wnw + (I + ∆Wu)Pnomu.  
The system Wn is a frequency dependent weight on the noise signal, w. This allows us  
to use a normalized representation for w. In other words the model includes the  
assumption that kwk1. Similarly, we assume that kk1 and Wu is a frequency  
dependent weight which specifies the contribution of the perturbation at each frequency.  
In a typical model Wn will be small (assuming that the noise is small compared to the  
nominal output) and Wu will increase at high frequencies (to capture the likely case that  
we know less about the model at higher frequencies). The LFT representation of this  
model is,  
h
i
w
u
y = Fu(P, ∆)  
,
where  
"
#
0
0
Wn  
WuPnom  
Pnom  
P =  
I
Download from Www.Somanuals.com. All Manuals Search And Download.  
Robust control models are therefore set descriptions. In the analysis of such models it is  
also assumed that the unknown inputs belong to some bounded set. Several choices of  
set for the unknown signals can be made, leading to different mathematical problems for  
the analysis. Unfortunately not all of them are tractable. The following section discusses  
the assumptions typically applied to the robust control models.  
2.2.3 Assumptions on P, , and the unknown signals  
It will be assumed that the elements of P are either real-rational transfer function  
matrices or complex valued matrices. The second case arises in the frequency by  
frequency analysis of systems.  
In modeling a system, P22 defines the nominal model. Input/output effects not  
described by the nominal model can be attributed to either unknown signals which are  
components of the model input (w in the previous example), or the perturbation ∆.  
Unmodeled effects which can destabilize a system should be accounted for in ∆. The ∆  
can loosely be considered as accounting for the following. This list is by no means  
definitive and is only included to illustrate some of the physical effects better suited to  
description with ∆.  
Unmodeled dynamics. Certain dynamics may be difficult to identify and there  
comes a point when further identification does not yield significant design  
performance improvement.  
Known dynamics which have been bounded and included in ∆ to simplify the  
model. As the controller complexity depends on the order of the nominal model a  
designer may not wish to explicitly include all of the known dynamics.  
Parameter variations in a differential equation model. For example linearization  
constants which can vary over operating ranges.  
Nonlinear or inconsistent effects. At some point a linear model will no longer  
account for the residual differences between the behaviors of the model and the  
physical system.  
Several assumptions on ∆ are possible. In the most general case ∆ is a bounded  
operator. Alternatively ∆ can be considered as a linear time varying multiplier. This  
assumption can be used to capture nonlinear effects which shift energy between  
frequencies. Analysis and synthesis are possible with this assumption; Doyle and  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Packard [19] discuss the implications of this assumption on robust control theory and we  
briefly touch upon this in Section 2.4.6. The most common assumption is that ∆ is an  
unknown, norm-bounded, linear time-invariant system.  
Systems often do not fall neatly into one of the usual choices of ∆ discussed above.  
Consider a nonlinear system linearized about an operating point. If a range of operation  
is desired then the linearization constants can be considered to lie within an interval.  
The model will have a ∆ block representing the variation in the linearization constants.  
If this is considered to be a fixed function of frequency then the model can be considered  
to be applicable for small changes about any operating point in the range. The precise  
meaning of small will depend on the effect of the other ∆ blocks in the problem.  
If the ∆ block is assumed to be time-varying then arbitrary variation is allowed in the  
operating point. However this variation is now arbitrarily fast, and the model set now  
contains elements which will not realistically correspond to any observed behavior in the  
physical system.  
The robust control synthesis theory gives controllers designed to minimize the maximum  
error over all possible elements in the model set. Including non-physically motivated  
signals or conditions can lead to a conservative design as it may be these signals or  
conditions that determine the worst case error and consequently the controller.  
Therefore the designer wants a model which describes all physical behaviors of the  
system but does not include any extraneous elements.  
The designer must select the assumptions on P and ∆. An inevitable tradeoff arises  
between the ideal assumptions given the physical considerations of the system, and those  
for which good synthesis techniques exist.  
The most commonly used assumption is that ∆ is a linear time invariant system. This  
allows us to consider the interconnection, Fu(P, ∆), from a frequency domain point of  
view. At each frequency ∆ can be taken as an unknown complex valued matrix of norm  
less than or equal to one. This leads to analyses (covered in Section 2.4) involving the  
complex structured singular value. The following section discusses more complicated  
block structures and their use in modeling uncertain systems.  
2.2.4 Additional Perturbation Structures  
Equation 2.7 introduced a perturbation structure, containing m perturbation blocks,  
i. This form of perturbation is applicable to a wide range of models for uncertain  
Download from Www.Somanuals.com. All Manuals Search And Download.  
systems. We will now look at other possible perturbation structures. For more detail on  
these structures (in the complex case) refer to Packard and Doyle [20].  
Consider a blocks which are of the form scalar × identity, where the scalar is unknown.  
In the following we will include q of these blocks in . The definition of is therefore  
modified to be,  
n
o
= diag(δ I , . . . , δ I , , . . . , ∆ ) dim(I ) = l × l , dim(∆ ) = k × k .(2.9)  
1
1
q
q
1
m
j
j
j
i
i
i
The block structure now contains the dimension of the q scalar × identity blocks and the  
m full blocks. The block structure is therefore, (l1, . . . , lq, k1, . . . , km). If  
dim(∆) = n × n, then these dimensions must be consistent. In otherwords,  
q
m
X
X
lj +  
ki = n.  
j=1  
i=1  
Note that this block structure collapses to the previously defined structure  
(Equation 2.7) when q = 0.  
The most obvious application of a repeated scalar block structure occurs when we know  
that perturbations occurring in several places in a system are identical (or perhaps just  
correlated). For example, dynamic models of aircraft often have the altitude (or  
dynamic pressure) occuring in several places in the model. Naturally the same value  
should be used in each place and if we model the altitude as an LFT parameter then the  
repeated scalar × identity approach is the most appropriate.  
This structure also allows us to express uncertain state-space models as LFTs. To  
illustrate this consider the following discrete time system.  
x(k + 1)  
=
=
Ax(k) + Bu(k)  
y(k)  
Cx(k) + Du(k).  
This digital system has transfer function,  
P(z)  
=
C(zI A)1B + D  
Download from Www.Somanuals.com. All Manuals Search And Download.  
=
=
Cz1(I z1A)1B + D  
Fu(Pss, z1I),  
where Pss is the real valued matrix,  
A B  
C D  
Pss  
=
,
and the scalar × identity, z1I, has dimension equal to the state dimension of P(z).  
This is now in the form of an LFT model with a single scalar × identity element in the  
upper loop.  
One possible use of this is suggested by the following. Define,  
= δInx δ ∈ C ,  
where nx is the state dimension. The set of models,  
Fu(Pss, ∆), B∆,  
is equivalent to P(z), |z| ≥ 1. This hints at using this formulation for a stability analysis  
of P(z). This is investigated further in Section 2.4.6.  
In the analyses discussed in Section 2.4 we will concentrate on the assumption that ∆ is  
complex valued at each frequency. For some models we may wish to restrict ∆ further.  
The most obvious restriction is that some (or all) of the ∆ blocks are real valued. This is  
applicable to the modeling of systems with uncertain, real-valued, parameters. Such  
models can arise from mathematical system models with unknown parameters.  
Consider, for example a very simplified model of the combustion characteristics of an  
automotive engine. This is a simplified version of the model given by Hamburg and  
Shulman [21]. The system input to be considered is the air/fuel ratio at the carburettor.  
The output is equivalent to the air/fuel ratio after combustion. This is measured by an  
oxygen sensor in the exhaust. Naturally, this model is a strong function of the engine  
speed, v (rpm). We model the relationship as,  
0.9  
0.1  
y = eT s  
+
u,  
d
1 + Tcs 1 + s  
Download from Www.Somanuals.com. All Manuals Search And Download.  
where the transport delay, Td, and the combustion lag, Tc, are approximately,  
252  
v
202  
v
Td =  
and Tc =  
.
For the purposes of our example we want to design an air/fuel ratio controller that  
works for all engine speeds in the range 2,000 to 6,000 rpm. We will use a first order  
Pad´e approximation for the delay and express the Td and Tc relationships in an LFT  
form with a normalized speed deviation, δv.  
The dominant combustion lag can be expressed as an LFT on 1/Tc as follows,  
0.9  
1 + Tcs  
=
Fu(Ptc, Tc1),  
where  
1  
1
s
Ptc  
=
.
0.9  
0
s
Note that Tc1 is easily modeled in terms of δv,  
1
Tc  
4000 + 2000δv  
=
,
δv ∈ R, |δv| ≤ 1.  
202  
The Pad´e approximation (with delay time, Td) is given by  
eT s Fu Pdelay, Td1  
,
d
where,  
2  
1
s
Pdelay  
=
.
4
1  
s
Download from Www.Somanuals.com. All Manuals Search And Download.  
Putting all the pieces together gives an engine model in the following fractional form.  
P(s) = Fu(Pmod, ∆),  
where  
7.14(s 19.8)  
141.5(1 + 1.006s)  
15.87  
s2  
s
s(s + 1)  
9.9  
Pmod  
=
,
0
9.9  
s
0.9(s 15.8)(s 19.8) 17.82(s 15.8)(1 + 1.006s)  
s(s + 1)  
27.75  
s3  
s
and ∆ B∆, with the structure defined as,  
= δvI2 δv ∈ R  
.
To capture the effects of unmodeled high frequency dynamics we will also include an  
output multiplicative perturbation. If the output multiplicative weight is Wm(s) then  
the complete open-loop model is,  
P(s) = Fu(Pmod, ∆),  
where,  
(2.10)  
7.14(s 19.8)  
141.5(1 + 1.006s)  
15.87  
0
s2  
s
s(s + 1)  
9.9  
0
0
0
9.9  
s
Pmod  
=
0.9(s 15.8)(s 19.8)  
17.82(s 15.8)(1 + 1.006s)  
27.75  
s3  
s
s(s + 1)  
0.9(s 15.8)(s 19.8)  
17.82(s 15.8)(1 + 1.006s)  
27.75  
Wm(s)  
s3  
s
s(s + 1)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
and ∆ B∆, with the structure defined as,  
= diag(δvI2, 1) δv ∈ R, 1 ∈ C  
.
Note that this is an LFT with a repeated real-valued parameter, δv (|δv| ≤ 1), and a  
complex perturbation, ∆1 (|1| ≤ 1).  
Note that as R ⊂ C, assuming that ∆ ∈ Cn×n, always covers the case where some of the  
i (or δj) are more appropriately modeled as real-valued. However this may be  
potentially conservative as the ∆ ∈ Cn×n, allows many more systems in the model set.  
In this case it would be somewhat better to consider combining the effects of δv and ∆1  
into a single complex valued ∆ with an appropriate weight.  
In principle, if we have additional information about the system (some δj ∈ R, for  
example) then we should use this information. Performing analyses with real valued  
perturbations is currently at the forefront of the structured singular value research. We  
will return to this issue in more detail when we cover the analysis methods (Section 2.4).  
2.2.5 Obtaining Robust Control Models for Physical Systems  
Obtaining a model of the above form is where the real engineering comes in. A designer  
must model and identify the physical system to arrive at such a model. This is usually  
an iterative process whereby designs are performed and then tested on the system. In  
this way the designer often obtains a feeling for the adequacy of the model.  
The best way of studying the modeling problem is to look at the documented  
experiences of others applying these approaches; particularly in similar applications. The  
citations given in the Section 2.1 will be useful in this regard. There are also approaches  
addressing the problem of obtaining LFT models from descriptions with variable  
state-space matrix coefficients [22, 23]. In the area of SISO process control, Laughlin et  
al. [24] describe the relationship between uncertainties in time constant, delay, and gain,  
and a suitable ∆ weighting. Models of this form are often applicable to process control.  
There is little formal theory addressing the robust control modeling problem although  
this is an area of increasing interest. A recent workshop proceedings volume on the  
subject is an excellent reference for those interested in this area [25]. Other references  
can be found in the review article by Gevers [26].  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
An area of work, known as identification in H, looks at experimental identification  
techniques which minimize the worst case Herror between the physical system and  
the model. The following works address this issue: [27, 28, 29, 30, 31, 32, 33, 34, 35].  
Applying the more standard, probabilistically based, identification techniques to  
uncertain systems is also receiving attention. Relevant work in this area is described  
in: [36, 37, 38, 39]  
Model validation is the experimental testing of a given robust control model. This can  
be useful is assessing model quality. This work is covered in the  
following: [4, 40, 41, 42, 43, 44, 45, 46]. An experimental example is described by  
Smith [47].  
The problems of identifying model parameters in an uncertain model is discussed further  
in [48, 49, 50]. A nonlinear ad-hoc approach for obtaining suitable multiplicative  
perturbation models for certain classes of systems is given in [51].  
Several researchers are also formalizing the interplay between identification and design  
in iterative approaches. In practical situations the designer usually ends up with ad-hoc  
identification/design iterations. The work in this area is described in [52, 53, 54, 55, 56].  
On reading the above works, one will get the impression that this area is the most  
poorly developed of the current robust control theory. In obtaining these models  
engineering judgement is of paramount importance. The users of this software are  
encouraged to document their experiences and bring this work to the authors’ attention.  
2.3 Hand H2 Design Methodologies  
The generic synthesis configuration is illustrated in LFT form in Figure 2.7. Here P(s)  
is referred to as the interconnection structure. The objective is to design K(s) such that  
the closed loop interconnection is stable and the resulting transfer function from w to e  
(denoted by G(s)),  
e
=
=
Fl[P(s), K(s)]w,  
G(s)w,  
satisfies a norm objective.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.7: LFT configuration for controller synthesis, G(s) = Fl[P(s), K(s)]  
Note that the interconnection structure, P(s), given here, differs from that discussed in  
the previous section. Here we set up P(s) so that the input, w, is the unknown signals  
entering our system. Typical examples would be sensor noise, plant disturbances or  
tracking commands. The output, e, represent signals that we would like to make small.  
In an engineering application these could include actuator signals and tracking errors.  
The signal y is the measurement available to the controller, K(s). In any realistic  
problem, some weighted component of w would be added to y to model sensor noise.  
The output of the controller, u, is our actuation input to the system. Again, a  
reasonable engineering problem would include a weighted u signal as a component of the  
penalty output, e.  
The interconnection structure, P(s), also contains any frequency weightings on the  
signals e and w. Weightings on components of e are used to determine the relative  
importance of the various error signals. Weight functions on w indicate the relative  
expected size of the unknown inputs.  
Xµ provides functions to calculate the controllers minimizing either the H2 or Hnorm  
of G(s). We will cover both of these approaches in the context of the design problem  
illustrated in Figure 2.7.  
Note that neither of these design approaches takes advantage of any information about  
structured perturbations occuring within the model. The following discussion can be  
considered as applying to a nominal design problem. Section 2.5 uses D-K iteration to  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
extend these approaches to the case where P(s) is replaced by Fu(P(s), ∆), ∆ B∆.  
2.3.1 HDesign Overview  
Again, recall from Section 2.1.2, the His norm of G(s) is,  
kG(s)k= sup σmax[G(ω)].  
ω
The Hnorm is the induced L2 to L2 norm. Therefore minimizing the Hnorm of  
G(s) will have the effect of minimizing the worst-case energy of e over all bounded  
energy inputs at w.  
Consider γ(K) to be the closed loop Hnorm achieved for a particular controller K. In  
other words,  
γ(K) = kFl(P, K)k.  
There is a choice of controller, K, which minimizes γ(K). This is often referred to as the  
optimal value of γ and is denoted by γopt. Furthermore, there is no stabilizing controller  
which satisfies,  
kG(s)k< γopt  
.
In a particular design problem, γopt is not known a priori. Therefore the functions  
calculating the Hcontroller use some form of optimization to obtain a value of γ close  
to γopt  
.
The first approaches to the solution of this problem were described by Doyle [1]. The  
book by Francis [57] gives a good overview of the early version of this theory. A  
significant breakthrough was achieved with the development of state-space calculation  
techniques for the problem. These are discussed in the paper colloquially known as  
DGKF [58]. The algorithmic details are actually given by Glover and Doyle [59].  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.3.2 Assumptions for the HDesign Problem  
There are several assumptions required in order to achieve a well-posed design problem.  
The DGKF paper gives a state-space solution to the Hdesign problem and we will use  
a similar notation here.  
Consider the open loop state-space representation of P(s), partitioned according to the  
signals shown in Figure 2.7,  
A
C1  
C2  
B1 B2  
D11 D12  
D21 D22  
P(s) =  
.
(2.11)  
We will assume that P(s) is a minimal representation. The following assumptions are  
required for a well-posed problem.  
(i) (A, B2) is stabilizable and (C2, A) is detectable;  
(ii) D12 and D21 are full rank;  
(iii) The matrix,  
A ωI B2  
C1 D12  
,
has full column rank for all ω ∈ R;  
(iv) The matrix,  
A ωI B1  
C2 D21  
,
has full row rank for all ω ∈ R.  
Item (i) is required so that input-output stability is equivalent to internal stability. If it  
is not satisfied then there are unstable modes which cannot be stabilized by any K(s).  
Items (ii) and (iii) mean that, at every frequency, there is no component of the output  
signal, e, that cannot be influenced by the controller. Similarly, items (ii) and (iv) mean  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
that the effect of all disturbances, w, at every frequency, can be measured by the  
controller. If either of these conditions are not met then the problem could be ill-posed.  
It is possible to violate these conditions by using pure integrators as design weights.  
While this could still give a meaningful design problem, solution via the state-space H∞  
approach requires that an approximation be used for the integrator weight. If item (iii)  
or (iv) is violated at ω = 0, then the integrator should be replaced with very low  
frequency pole.  
2.3.3 A Brief Review of the Algebraic Riccati Equation  
Solution of the Hdesign problem requires the solution of coupled Algebraic Riccati  
Equations (AREs). This is illustrated in more detail in the next section. Here we give a  
very brief review of the Riccati equation and the most common solution techniques.  
Some knowledge of this area is helpful because the design software displays variables  
related to the Riccati solutions and the user has the option of adjusting several software  
tolerances relating to these solutions. The notation used here comes from DGKF [58].  
The matrix equation,  
AT X + XA + XRX Q = 0,  
is an ARE. Given A, R and Q (with R and Q symmetric), we are interested in finding a  
symmetric positive definite solution, X. In other words, X = XT 0. With this ARE  
we associate a Hamiltonian matrix, denoted by H,  
A
R
H =  
.
Q AT  
If dim(A) = n × n, then dim(H) = 2n × 2n. Assume that H has no ω axis eigenvalues.  
The structure of H means that it has n stable (Re{s} < 0) and n unstable (Re{s} > 0)  
eigenvalues.  
Now consider finding a basis for the stable eigenvalues. Stacking the basis vectors  
together will give a 2n × n matrix,  
h
i
X1  
X2  
.
Download from Www.Somanuals.com. All Manuals Search And Download.  
We have partitioned the matrix into two n × n blocks, X1 and X2. If X1 is invertible,  
then  
X = X2X11  
,
is the unique, stabilizing solution to the ARE. The ability to form X doesn’t depend on  
the particular choice of X1 and X2.  
Given a Hamiltonian, H, we say that H dom(Ric) if H has no ω axis eigenvalues and  
the associated X1 matrix is invertible. Therefore, if H dom(Ric), we can obtain a  
unique stabilizing solution, X. This mapping, from H to X, is often written as the  
function, X = Ric(H).  
To give an idea of the application of the ARE consider the following lemma (taken from  
DGKF).  
Lemma 1 Suppose H dom(Ric) and X = Ric(H). Then:  
a) X is symmetric;  
b) X satisfies the ARE,  
AT X + XA + XRX Q = 0;  
c) A + RX is stable.  
This is of course the well know result relating AREs to the solution of stabilizing state  
feedback controllers.  
AREs can also be used in calculating the H-norm of a state-space system. The  
approach outlined here is actually that used in the software for the calculation of  
kP(s)k. Consider a stable system,  
A B  
C 0  
P(s) =  
.
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
Choose γ > 0 and form the following Hamiltonian matrix,  
A
CT C  
γ
2BBT  
AT  
H =  
.
The following lemma gives a means of checking whether or not kP(s)k< γ. A proof of  
this lemma is given in DGKF although it is based on the work of Anderson [60],  
Willems [61] and Boyd et al. [62].  
Lemma 2 The following conditions are equivalent:  
a) kP(s)k< γ;  
b) H has no eigenvalues on the ω axis;  
c) H dom(Ric);  
d) H dom(Ric) and Ric(H) 0 (if (C,A) is observable then Ric(H) > 0).  
As the above illustrates, AREs play a role in both stabilization and H-norm  
calculations for state-space systems. Before giving more detail on the Hdesign  
problem (Section 2.3.4), we will discuss some of the issues that arise in the practical  
calculation of ARE solutions.  
We can summarize an ARE solution method as follows:  
(i) Form the Hamiltonian, H.  
(ii) Check that H has no ω axis eigenvalues.  
(iii) Find a basis for the stable subspace of H.  
(iv) Check that X1 is invertible.  
(v) Form X = X2X11  
.
The first issue to note is that it is difficult to numerically determine whether or not H  
has ω axis eigenvalues. A numerical calculation of the eigenvalues is unlikely to give  
Download from Www.Somanuals.com. All Manuals Search And Download.  
any with a zero real part. In practice we must use a tolerance to determine what is  
considered as a zero real part.  
Finding a basis for the stable subspace of H involves either an eigenvalue or Schur  
decomposition. Numerical errors will be introduced at this stage. In most cases using an  
eigenvalue decomposition is faster and less accurate than using a Schur decomposition.  
Similarly, forming X = X2X11 will also introduce numerical errors. The Schur solution  
approach, developed by Laub et al. [63, 64, 65], is currently the best numerical approach  
to solving the ARE and is used in the software as the default method. An overview of  
invariant subspace methods for ARE solution is given by Laub [66]. Accurate solution of  
the ARE is still very much an active area of research.  
2.3.4 Solving the HDesign Problem for a Special Case  
We will now look at the Hdesign problem for a simplifying set of assumptions. The  
general problem (with assumptions given in Section 2.3.2) can be transformed into the  
simplified one given here via scalings and other transformations. The simplified problem  
illustrates the nature of the solution procedure and is actually the problem studied in  
DGKF. The formulae for the general problem are given in Glover and Doyle [59]. The  
software solves the general problem.  
Consider the following assumptions, with reference to the system in Equation 2.11:  
(i) (A,B1) stabilizable and (C1,A) detectable;  
(ii) (A,B2) stabilizable and (C2,A) detectable;  
(iii) D1T2[ C1 D12 ] = [ 0 I ];  
h
i
B1  
D21D2T1  
0
(iv)  
=
;
I
(v) D11 = D22 = 0.  
Assumption (i) is included in DGKF for technical reasons. The formulae are still correct  
if it is violated. Note that, with these assumptions,  
e = C1x + D12u,  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
and the components, C1x and D12u are orthogonal. D12 is also assumed to be  
normalized. This essentially means that there is no cross-weighting between the state  
and input penalties. Assumption (iv) is the dual of this; the input and unknown input  
(disturbance and noise) affect the measurement, y, orthogonally, with the weight on the  
unknown input being unity.  
To solve the Hdesign problem we define two Hamiltonian matrices,  
A
γ
2B1B1T B2B2T  
H
=
,
C1T C1  
AT  
and  
AT  
B1B1T  
γ
2C1T C1 C2T C2  
J
=
.
A  
The following theorem gives the solution to the problem.  
Theorem 3 There exists a stabilizing controller satisfying kG(s)k< γ if and only if  
the following three conditions are satisfied:  
a) H dom(Ric) and X = Ric(H ) 0.  
b) J dom(Ric) and Y = Ric(J ) 0.  
c) ρ(X Y ) < γ2.  
When these conditions are satisfied, one such controller is,  
ˆ
F
A
Z L  
K (s) =  
,
0
where,  
F
=
BT X  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
L
Z
=
=
=
Y CT  
2
(I γ2Y X )1  
A
A + γ2B1BT X + B2F + Z L C2.  
ˆ
1
Actually, the above formulation can be used to parametrize all stabilizing controllers  
which satisfy, kG(s)k< γ. This can be expressed as an LFT. All such controllers are  
given by,  
K
= Fl(M , Q),  
where,  
ˆ
A
C2  
Z L  
Z B2  
M
=
,
F
0
I
I
0
and Q satisfies: Q ∈ RH, kQk< γ. Note that if Q = 0 we get back the controller  
given in Theorem 3. This controller is referred to as the central controller and it is the  
controller calculated by the software.  
Note also that the controller given above satisfies kGk< γ. It is not necessarily the  
controller that minimizes kGkand is therefore referred to as a suboptimal H∞  
controller. In practice this is not a problem, and may even be an advantage. The optimal  
Hcontroller has properties which may not be desirable from an implementation point  
of view. One typical property is that the high frequency gain is often large. Suboptimal  
central controllers seem to be less likely to exhibit this characteristic.  
2.3.5 Further Notes on the HDesign Algorithm  
Now that we have covered the problem solution we can look at the areas that might give  
potential numerical problems. The above results give a means of calculating a controller  
(if one exists) for a specified γ value. As we mentioned earlier, the smallest such γ is  
referred to as γopt. An iterative algorithm is used to find γ close to γopt and calculate  
the resulting controller. The algorithm can be stated conceptually as follows:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
a) Choose γ γopt  
b) Form H and J  
c) Check that H dom(Ric) and J dom(Ric).  
d) Calculate X = Ric(H ) and Y = Ric(J )  
e) Check that X 0 and Y 0  
f) Check that ρ(X Y ) < γ2  
g) Reduce γ and go to step b).  
The value of γ can be reduced until one of the checks at steps c), e) or f) fails. In this  
case, γ < γopt and we use the X and Y of the lowest successful γ calculation to  
generate the controller. In the Xµ software a bisection search over γ is used to find a γ  
close to γopt. If step a) is not satisfied, the routine exits immediately and tells the user  
to select a higher initial choice for γ.  
As part of the check that H dom(Ric), (and J dom(Ric)) the real part of the  
eigenvalues is calculated. The software uses a tolerance to determine whether or not to  
consider these zero. The default tolerance works well in most cases; the user can adjust  
it if necessary.  
In practice determining that X (and Y ) is positive definite involves checking that,  
min Re{λi(X )} ≥ −ꢀ.  
i
Again, is a preset tolerance which can be adjusted by the user if necessary.  
The third check is that,  
ρ(γ2X Y ) < 1.  
Fortunately this is a relatively well conditioned test.  
The software displays the critical variables relating to each of these tests. The minimum  
real part of the eigenvalues of H (and J ) is displayed. Similarly the minimum  
Download from Www.Somanuals.com. All Manuals Search And Download.  
eigenvalue of X (and Y ) is displayed. The ultimate test of the software is to form the  
closed loop system and check both its stability and norm. We strongly suggest that the  
user always perform this step.  
The numerical issues discussed above are very unlikely to arise in low order systems.  
Experience has shown that systems with very lightly damped modes are more  
susceptible to numerical problems than those with more heavily damped modes.  
However, it has been found to be possible, with the software provided, to design  
controllers using 60th order interconnection structures with very lightly damped modes.  
2.3.6 H2 Design Overview  
Recall from Section 2.1.2 that the H2 norm of a frequency domain transfer function,  
G(s), is  
Z
1/2  
1
2π  
kG(s)k2 =  
Trace [G(ω)G(ω)] dω  
.
−∞  
Several characterizations of this norm are possible in terms of input/output signals. For  
example, if the unknown signals are of bounded energy, kGk2 gives the worst case  
magnitude of the outputs e. Alternatively, if impulses are applied to the inputs of G(s),  
kG(s)k2 gives the energy of the outputs e. H2 synthesis involves finding the controller  
which minimizes the H2 norm of the closed loop system. This is the same the well  
studied Linear Quadratic Gaussian problem.  
2.3.7 Details of the H2 Design Procedure  
The H2 design procedure is best explained by contrasting it with the Hprocedure  
explained in the previous sections. There are several differences, the most obvious being  
that the H2 design problem always has a unique, minimizing, solution. The other  
difference is that (in addition to the four conditions given in Section 2.3.2) D11 is  
required to be zero, even in the general case. If this condition is violated no controller  
will give a finite H2 norm for the closed loop system as it will not roll off as the  
frequency goes to .  
We present the H2 solution in an LFT framework rather than the more well known LQG  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H∞  
H2  
framework. We again assume the simplifying assumptions used in Section 2.3.4 The H2  
design solution is obtained (at least conceptually) from the Hdesign procedure by  
setting γ = and using the resulting central controller. It is interesting to compare the  
Hsolution, given above, and the H2 solution given below.  
Define two Hamiltonians, H2 and J2, by,  
A
B2B2T  
H2 =  
,
C1T C1 AT  
and  
AT  
B1B1T  
C2T C2  
J2 =  
.
A  
The sign definiteness of the off-diagonal blocks guarantees that H2 dom(Ric),  
J2 dom(Ric) and X2 = Ric(H2) 0 and Y2 = Ric(J2) 0. The following theorem  
gives the required result.  
Theorem 4 The unique H2 optimal controller is given by,  
ˆ
F2  
A2 L2  
K2(s) =  
,
0
where,  
F2  
L2  
=
=
=
B2T X2  
Y2C2T  
ˆ
A2  
A + B2F2 + L2C2.  
We commented above that the controller, K2, is (conceptually) obtained by choosing  
γ = in the Hdesign procedure. This does not mean that kGk= ; it simply  
means that we can make no a priori prediction about kGkfor this controller. K2  
minimizes kGk2 and yields a finite kGk. As such, it is often useful for determining an  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.8: Closed loop system, G(s), for performance analysis  
initial choice of γ for the Hdesign procedure. We will see later (Section 2.5) that it  
can also be used to initialize the D-K iteration procedure when an open-loop Hdesign  
is poorly conditioned.  
2.4 µ Analysis  
2.4.1 Measures of Performance  
Section 2.3 presented design performance objectives in terms of the norm (H2 or H) of  
a closed loop system. We will now expand on this idea of performance. Consider the  
closed loop system illustrated in Figure 2.8. The interconnection structure, P(s), is  
specified such that w represents unknown inputs; typically reference commands,  
disturbances and noise. The outputs, e, represent signals that we would like to be small.  
“Small” means in the sense of a selected norm. These signals might include actuator  
effort, and tracking error. As Figure 2.8 suggests, this analysis is typically applied after  
calculating a controller.  
The inputs w are described only as members of a set. The performance question is then:  
For all w in this set, are all possible outputs e also in some set? The following set  
Download from Www.Somanuals.com. All Manuals Search And Download.  
descriptions are considered, where B again denotes the unit ball.  
(
(
(
)
Z
T
1
2T  
2
Power :  
BP =  
w
w
w
lim  
| w(t) | dt 1  
(2.12)  
(2.13)  
(2.14)  
T →∞  
T  
)
Z
2
2
Energy :  
BL2 =  
kwk2 =  
| w(t) | dt 1  
−∞  
)
Magnitude : BL∞  
=
kwk= ess sup |w(t)| ≤ 1  
t
These norms are defined for scalar signals for clarity. The choice of w and e as the above  
sets defines the performance criterion. The performance can be considered as a test on  
the corresponding induced norm of the system. More formally,  
Lemma 5 (Nominal Performance)  
For all w in the input set, e is in the output set  
if and only if kG(s)k ≤ 1.  
Only certain combinations of input and output sets lead to meaningful induced norms.  
The Happroach is based on the cases w, e BP and w, e BL2. As we noted in  
Section 2.1.2, both of these cases lead to the following induced norm.  
kG(s)k= sup σmax [G(ω)] .  
ω
The choice of other input and output sets can lead to meaningful norms with  
engineering significance. For example w, e BLis arguably a more suitable choice for  
some problems and leads to kGk1 as a performance measure where  
Z
kGk1 = |g(τ)| dτ.  
0
and g(τ) is the convolution kernel (impulse response) of G(s). For a discussion on the  
other possible selections of input and output sets, and the mathematical advantages of  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.9: Perturbed closed loop system for stability analysis  
the induced norms, the reader is referred to Doyle [2]. The major advantage of choosing  
BP or BL2 is that the test for the performance can be considered in terms of the same  
norm as stability. This has significant advantages when we are considering performance  
and stability in the presence of perturbations, ∆.  
2.4.2 Robust Stability and µ  
Now we will consider the stability of a closed loop system under perturbations. In  
Figure 2.9, G(s), is a perturbation model of a closed loop system. In the following  
robust stability and robust performance analyses we will assume that ∆ is linear and  
time-invariant.  
We will also assume that the interconnection structure G(s) consists of stable transfer  
function matrices, where stability is taken to mean that the system has no poles in the  
closed right half plane. In practice this amounts to assuming that G22(s) (the nominal  
closed loop system model) is stable as the other elements, G11(s), G12(s), and G21(s),  
are weighting functions and can be chosen to be stable. The nominal closed loop system,  
G22(s), often arises from a standard design procedure (H2, H, or loopshaping for  
example) and will be stable.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Consider the case where the model has only one full ∆ block (m = 1 and q = 0 in  
Equation 2.9). This is often referred to as unstructured, and the well known result (refer  
to Zames [67] and Doyle and Stein [5]) is given in the following lemma.  
Lemma 6 (Robust Stability, Unstructured)  
Fu(G(s), ∆) is stable for all , kk1,  
if and only if kG11(s)k< 1.  
A generalization of the above is required in order to handle Fu(G(s), ∆) models with  
more than one full ∆ block. The positive real valued function µ can be defined on a  
complex valued matrix M, by  
det(I M∆) = 0 for all ∆ B∆,  
if and only if µ(M) < 1.  
Note that µ scales linearly. In other words, for all α ∈ R,  
µ(αM) = |α|µ(M).  
In practice the test is normalized to one with the scaling being absorbed into the  
interconnection structure. An alternative definition of µ is the following.  
0 if no ∆ solves det(I + M∆) = 0  
otherwise  
µ(M) =  
1  
n
o
min  
β
, kk ≤ β, such that det(I + M∆) = 0  
∆  
Note that µ is defined as the inverse of the size of the smallest destabilizing  
perturbation. This immediately gives the following lemma.  
Lemma 7 (Robust Stability, Structured)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Fu(G(s), ∆) stable for all B∆  
if and only if kµ(G11(s))k< 1.  
where  
kµ(G11(s))k= sup µ[G11(ω)].  
ω
The use of this notation masks the fact that µ is also a function of the perturbation  
structure, . The above definition of µ applies to the more general block structure given  
in Section 2.2.4. We can even consider the some of the blocks to be real valued, rather  
than complex valued. The robust stability lemma is still valid; however the calculation  
of µ becomes significantly more difficult.  
In applying the matrix definition of µ to a real-rational G11(s), it has been assumed that  
∆ is a complex constant at each frequency. This arises from the assumption that ∆ is  
linear and time-invariant. Under this assumption we can examine the combination of  
system and perturbation independently at each frequency. The analysis then involves  
looking for the worst case frequency. If ∆ is not time-invariant then the frequency by  
frequency analysis does not apply; ∆ can be used to shift energy between frequencies  
and cause instability not predicted by the above analysis.  
In practice this µ test is applied by selecting a frequency grid and at each frequency  
calculating µ(G11(ω)). The choice of range and resolution for this grid is a matter of  
engineering judgement. If very lightly damped modes are present a fine grid may be  
required in the region of those modes.  
2.4.3 Robust Performance  
The obvious extension to the above is to consider performance in the presence of  
perturbations ∆. For e, w BP or BL2 robust performance is a simple extension of  
robust stability.  
Lemma 8 (Robust Performance)  
Fu(G(s), ∆) is stable and kFu(G(s), ∆)k1 for all B∆  
Download from Www.Somanuals.com. All Manuals Search And Download.  
if and only if kµ(G(s))k< 1,  
b
where µ is taken with respect to an augmented structure ,  
n
o
dim(w)×dim(e)  
b
ˆ
ˆ
= diag(∆, ∆) ∆ , ∆ = C  
.
ˆ
The additional perturbation block, ∆ can be thought of as a “performance block”  
appended to the ∆ blocks used to model system uncertainty. This result is the major  
benefit of the choice of input and output signal norms; the norm test for performance is  
the same as that for stability. Robust performance is simply another µ test with one  
additional full block.  
The frequency domain robustness approach, outlined above, assumes that the  
perturbations, ∆, are linear and time-invariant. This assumption is the most commonly  
applied. Section 2.4.6 will consider a robustness analysis from a state-space point of  
view. This form of analysis applies to norm bounded non-linear or time varying  
perturbations. We will first look more closely at the properties of µ, particularly as they  
relate to its calculation.  
2.4.4 Properties of µ  
The results presented here are due to Doyle [68]. Fan and Tits [69, 70] have done  
extensive work on algorithms for tightening the bounds on the calculation of µ.  
Packard [3] has also worked on improvement of the bounds and the extension of these  
results to the repeated block cases. The most comprehensive article on the complex  
singular value is that by Packard and Doyle [20]. More detail is contained in the  
technical report by Doyle et al. [71].  
We will look at simple bounds on µ. The upper bound results are particularly important  
as they will form the basis of the design procedure provided in this software (D-K  
iteration).  
Defining a block structure made up of one repeated scalar, (= {λI | λ ∈ C}) makes  
the definition of µ the same as that of the spectral radius.  
n
o
= λI λ ∈ C  
µ(M) = ρ(M).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
n×n  
For the other extreme consider a single full block (= {| ∈ C  
}); the definition  
of µ is now the same as that for the maximum singular value,  
n×n  
= {| ∈ C  
}
µ(M) = σmax(M).  
Observe that every possible block structure, , contains {λI | λ ∈ C} as a perturbation;  
and every possible block structure, , is contained in Cn×n. These particular block  
structures are the boundary cases. This means that the resulting µ tests act as bounds  
on µ for any block structure, . This gives the following bounds.  
ρ(M)  
µ(M)  
σmax(M).  
The above bounds can be arbitrarily conservative but can be improved by using the  
following transformations. Define the set  
n
D = diag(D , . . . , D , d I , . . . , d I , ) D = D> 0,  
1
q
1
1
m
m
j
j
o
dim(Ii) = ki, di ∈ R, di > 0 (.2.15)  
This is actually the set of invertible matrices that commute with all ∆ . This allows  
us to say that for all D ∈ D and for all ∆ ,  
D
1D = ∆.  
Packard [3] shows that the restriction that di be positive real is without loss of  
generality. We can actually take one of these blocks to be one (or the identity).  
Now define Q as the set of unitary matrices contained in :  
n
o
Q = Q QQ = I  
.
(2.16)  
The sets D and Q can be used to tighten the bounds on µ in the following way (refer to  
Doyle [68]).  
max ρ(QM)  
µ(M)  
inf σmax(DMD1).  
(2.17)  
Q∈Q  
D∈D  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Actually, the lower bound is always equal to µ but the implied optimization has local  
maxima which are not global. For the upper bound Safonov and Doyle [72], have shown  
that finding the infimum is a convex problem and hence more easily solved. However the  
bound is equal to µ only in certain special cases. Here we use the infimum rather that  
the miminum because D may have a element which goes to zero as the maximum  
singular value decreases. So the limiting case (where an element of D is zero) is not a  
member of the set D.  
The cases where the upper bound is equal to µ are tabulated below.  
q = 0  
q = 1  
q = 2  
m = 0  
m = 1  
m = 2  
m = 3  
m = 4  
equal  
equal  
less than or equal  
less than or equal  
equal  
equal  
equal  
less than or equal less than or equal  
less than or equal less than or equal  
less than or equal less than or equal less than or equal  
Most practical applications of the µ theory involve models where q = 0. Here we see that  
we have equality with the upper bound for three or fewer blocks. Computational  
experience has yet to produce an example where the bound differs by more than  
15 percent. In practically motivated problems the gap is usually much less.  
2.4.5 The Main Loop Theorem  
We will introduce a fundamental theorem in µ analysis: the main loop theorem. From  
the previous discussion you will see that there are several matrix properties that can be  
expressed as µ tests. The spectral radius and the maximum singular value are two such  
quantities. The main loop theorem gives a way of testing such properties for perturbed  
systems. The test is simply a larger µ problem. This is the theorem underlying the  
extension from robust stability to robust performance.  
Consider a partitioned matrix,  
M11 M12  
M21 M22  
M =  
,
Download from Www.Somanuals.com. All Manuals Search And Download.  
and two block structures, 1 (compatible with M11) and 2 (compatible with M22).  
There are two perturbed subsystems that we can study here: Fu(M, 1), where ∆1 is  
closed in a feedback loop around M11; and Fl(M, 2), where ∆2 is closed in a feedback  
loop around M22.  
We have already seen that in the case of a dynamic system, the robust stability of  
Fu(M, 1) is analyzed by checking that µ1(M11) < 1. Here we have used µ1 to indicate  
that we are considering it with respect to the block structure 1. In the constant  
matrix case, we say that the LFT, Fu(M, 1) is well posed for all ∆1 B∆1 if and only  
if µ1(M11) < 1. This simply means that the inverse in the LFT equations is well defined  
for all ∆1 B∆1.  
The well posedness discussion above applies equally well to Fl(M, 2) and we will  
denote the µ test for M22 by µ2(M22). However, instead of looking at µ2 of M22, we  
want to look at µ2(Fu(M, 1)). Note that Fu(M, 1) has the same dimensions as M22  
and in fact Fu(M, 1) = M22 when ∆1 = 0. In otherwords, what happens when we  
apply the µ2 test to the whole set of matrices generated by Fu(M, 1).  
To answer this question we need to introduce a larger block structure, denoted here  
simply by . This is simply the diagonal combination of the previous two structures:  
= diag(1, 2).  
Note that this has compatible dimensions with M itself and the associated µ test will be  
denoted by µ(M). Now we can answer the question about what happens to  
µ2(Fu(M, 1)) for all ∆1 B∆1.  
Theorem 9 (Main Loop Theorem)  
µ1(M11) < 1  
and  
µ(M) < 1  
if and only if  
max µ2[Fu(M, 1)] < 1  
1B∆1  
This theorem underlies the fact that robust performance is a simple extension of robust  
stability. It has a much more significant role in developing connections between the µ  
theory and other theoretical aspects of control. The example in the following section is  
an illustration of this point.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.4.6 State-space Robustness Analysis Tests  
We will look at some more advanced state-space approaches to the analysis of robust  
performance. Most users of the software will concentrate on the more common frequency  
domain analysis methods covered in Section 2.4.3. The analysis tests given here can be  
implemented with the Xµ functions and the more advanced user can use these to study  
the robustness of systems with respect to time-varying and nonlinear perturbations.  
To illustrate this approach, consider the state-space LFT model of a system introduced  
in Section 2.2.4. A digital system is described by,  
x(k + 1)  
=
=
Ax(k) + Bu(k)  
y(k)  
Cx(k) + Du(k).  
This digital system has transfer function,  
P(z) = Fu(Pss, z1I),  
where Pss is the real valued matrix,  
A B  
C D  
Pss  
=
,
and the scalar × identity, z1I, has dimension nx, equal to the state dimension of P(z).  
This is now in the form of an LFT model with a single scalar × identity element in the  
upper loop.  
Define,  
1 = δInx δ ∈ C  
,
and note that with this definition,  
µ1(A) = ρ(A).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Therefore µ1(A) < 1 is equivalent to our system being stable. Furthermore, the  
maximum modulus theorem for a stable system tells us that,  
kP(z)k∞  
=
=
=
|szu|p1 σmax(P(z))  
sup σmax(Fu(Pss, z1I)  
|z1|≤1  
sup µ2(Fu(Pss, 1),  
1B∆1  
if 2 is defined as a single full block of dimensions matching the input-output  
dimensions of P(z). The main loop theorem (Theorem 9) immediately suggests the  
following result.  
Lemma 10  
P(z) is stable  
and  
kP(z)k< 1.  
µ(Pss) < 1  
if and only if  
Note that this tests whether or not the norm is less than one. It doesn’t actually  
calculate the norm. To do this we have to set up a scaled system and search over the  
scaling with makes µ(Pss) = 1.  
To apply this to a robust performance problem, consider the configuration shown in  
Figure 2.10. This is a state-space representation of a perturbed system. It would  
typically model an uncertain closed-loop system where the performance objective is  
kek ≤ kwk, for all w BL2 and all ∆ B∆.  
The real-valued matrix, Gss, is,  
A
B1  
B2  
Gss  
=
C1 D11 D12  
C2 D21 D22  
.
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.10: Perturbed system for state-space robustness tests  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Note that the nominal system is given by,  
ꢂꢀ  
A B1  
C1 D11  
Gnom(z) = Fu  
, z1I  
,
and the perturbed system is,  
G(z) = Fu(Fl(G, ∆), z1I).  
We assume that ∆ is an element of a unity norm bounded block structure, ∆ B∆.  
For the µ analysis we will define a block structure corresponding to Gss,  
s = diag(δ1Inx, 2, ∆) δ1 ∈ C, 2 ∈ Cdim(w)×dim(e), ∆  
.
Consider also a block structure corresponding to Fu(Gss, z1I),  
p = diag(∆2, ∆) ∆2 ∈ Cdim(w)×dim(e), ∆  
.
This is identical to the s structure except that the δ1Inx block, corresponding to the  
state equation, is not present. The following theorem gives the equivalence between the  
standard frequency domain µ test and a state-space µ test for robust performance (first  
introduced by Doyle and Packard [23]. The notation µwill denote a µ test with  
s
respect to the structure s, and µis a µ test with respect to the p structure.  
p
Theorem 11  
The following conditions are equivalent.  
i) µ(Gss) < 1  
(state-space µ test);  
s
ii) ρ(A) < 1 and max µ(Fu(Gss, eωI)) < 1  
(frequency domain µ test);  
p
ω[0,2π]  
Download from Www.Somanuals.com. All Manuals Search And Download.  
iii) There exists a constant β [0, 1] such that for each fixed B∆, G(z) is stable  
and for zero initial state response, e satisfies kek2 β kwk2  
(robust  
performance).  
The frequency domain µ test is implemented by searching for the maximum value of µ  
over a user specified frequency grid. Theorem 11 shows that this is equivalent to a  
single, larger, µ test. There are subtle distinctions between the two tests. As we would  
expect, calculation of the larger µ test is more difficult. More importantly, the result  
does not scale. In the frequency domain test, if  
ω  
max µ[Fu(Gss, e  
I
nx  
)] = β,  
p
ω[0,2π]  
where β > 1, then we are robust with respect to perturbations up to size 1. In the  
state-space test, if µ(Gss) = β, where β > 1, then we cannot draw any conclusions  
s
about the robust performance characteristics of the system. We must scale the inputs or  
outputs and repeat the calculation until the µ test gives a result less than one.  
In practice we can only calculate upper and lower bounds for both of these µ tests.  
Although the state-space and frequency domain µ tests are equivalent, their upper  
bound tests have different meanings. We will see that this difference can be used to  
study the difference between linear time-invariant perturbations and linear time-varying  
(and some classes of non-linear) perturbations.  
To clarify this issue, consider the D scales which correspond to s and p;  
T
Ds  
Dp  
=
=
diag(D1, d2I2, D) D1 = D1 > 0, dim(D1) = nx × nx,  
d2 > 0, dim(I2) = dim(w) × dim(w), D ∈ D  
,
diag(d2I2, D) d2 > 0, dim(I2) = dim(w) × dim(w), D ∈ D  
.
In the above D is the set of D-scales for the perturbation structure , and, for  
notational simplicity, we have assumed that dim(w) = dim(e). Now, the upper bound  
tests are:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
i) State-space upper bound:  
inf σmax[DsGssDs1] < 1;  
Ds∈Ds  
ii) Frequency domain, constant D, upper bound:  
ω  
inf  
max σmax[DpFu(Gss, e  
I
nx  
)D1] < 1;  
p
Dp∈D  
p ω[0,2π]  
iii) Frequency domain upper bound:  
ω  
max inf σmax[DpFu(Gss, e  
I
nx  
)D1] < 1.  
p
D ∈D  
ω[0,2π]  
p
p
In both the state-space and frequency domain, constant D, upper bound, a single D  
scale is selected to guarantee robust performance over all frequencies. These two tests  
(items i) and ii) above) are equivalent. In the frequency domain upper bound test  
(item iii)) a different D-scale is selected at each frequency.  
The relationship between all of these tests is summarized by the following:  
inf σmax[DsGssDs1] < 1  
State-space upper bound  
Ds∈Ds  
m
ω  
ω  
inf  
max σmax[DpFu(Gss, e  
I
)D1] < 1  
Frequency domain, constant D,  
upper bound  
nx  
nx  
p
Dp∈D  
p ω[0,2π]  
max inf σmax[DpFu(Gss, e  
I
)D1] < 1  
Frequency domain upper bound  
Frequency domain µ test  
State-space µ test  
p
D ∈D  
ω[0,2π]  
p
p
ω  
max µ[Fu(Gss, e  
I
nx  
)] < 1  
p
ω[0,2π]  
m
µ[Gss] < 1  
s
In the two cases where there are one way implications, there are real gaps. We have  
already seen that there is a gap between the frequency domain µ test and its upper  
bound for four or more full blocks. This is a computational issue.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The gap between the state-space (or constant D) upper bound and the frequency  
domain upper bound is more significant. In the state-space upper bound, a single D  
scale is selected. This gives robust performance for all ∆ satisfying, kvk ≤ kzk for all  
e ∈ L2. This can be satisfied for linear time-varying perturbations or non-linear cone  
bounded perturbations. The formal result is given in the following theorem (given in  
Packard and Doyle [20]).  
Theorem 12  
If there exists Ds ∈ Ds such that  
σmax[DsGssDs1] = β < 1,  
then there exists constants, c1 c2 > 0 such that for all perturbation sequences,  
{∆(k)}k=0 with ∆(k) , σmax[∆(k)] < 1, the time varying uncertain system,  
x(k + 1)  
e(k)  
x(k)  
w(k)  
= Fl(Gss, ∆(k))  
,
is zero-input, exponentially stable, and furthermore if {w(k)}k=0 l2, then  
2
2
2
2
c2(1 β2) kxk2 + kek2 β2 kwk2 + c1kx(0)k .  
In particular,  
2
2
2
kek2 β2 kwk2 + c1kx(0)k .  
The user now has a choice of robust performance tests to apply. The most appropriate  
depends on the assumed nature of the perturbations. If the state-space upper bound test  
is used, the class of allowable perturbations is now very much larger and includes  
perturbations with arbitrarily fast time variation. If the actual uncertainty were best  
modeled by a linear time-invariant perturbation then the state-space µ test could be  
conservative. The frequency domain upper bound is probably the most commonly used  
test. Even though the uncertainties in a true physical system will not be linear, this  
assumption gives suitable analysis results in a wide range of practical examples.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.4.7 Analysis with both Real and Complex Perturbations  
The above results only apply to the case where ∆ is considered as a constant complex  
valued matrix at each frequency. In many engineering applications restricting certain of  
the ∆ blocks to be real valued may result in a less conservative model. Analysis with  
such restrictions is referred to as the “mixed” µ problem.  
For example, consider the LFT form of the engine combustion model developed in  
Section 2.2.4 (Equation 2.10). The block structure contains both real and complex  
perturbations. A closed-loop model will also include these perturbations and the robust  
stability and robust performance analyses will involve calculation of µ with respect to  
both real and complex valued perturbations. We could simply assume that all  
perturbations were complex; this would certainly cover the situation. However, such an  
assumption may be too conservative to be useful. Calculation of mixed µ will give a  
more accurate result in this case.  
Efficient computation of µ in the mixed case is discussed by Doyle, Fan, Young, Dahleh  
and others [73, 74, 75, 76]. Accurate mixed µ analysis software will be available in the  
near future. Unlike the complex µ case, this will not directly lead to a compatible  
synthesis procedure. Significantly more work is required in this direction.  
2.5 µ Synthesis and D-K Iteration  
2.5.1 µ-Synthesis  
We now look at the problem of designing a controller to achieve a performance  
specification for all plants, P(s), in a set of plants, P. The previous sections have dealt  
with the questions of performance and robust stability in depth and the same framework  
is considered for the synthesis problem. Figure 2.11 illustrates the generic synthesis  
interconnection structure.  
The lower half of this figure is the same as that for the Hand H2 design procedure.  
The controller measurements are y, and the controller actuation inputs to the system are  
u. The configuration differs from the standard Hor H2 case in that Fu(P(s), ∆)  
(rather than the nominal plant, P22(s)) is used as the design interconnection structure.  
The problem is to find K(s) such that for all ∆ B∆, K(s) stabilizes Fu(P(s), ∆) and  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.11: The generic interconnection structure for synthesis  
kFu(Fl(P(s), K(s)), ∆)k1. This is equivalent to K(s) satisfying  
µ[Fl(P(s), K(s))] < 1. In other words, the closed loop system satisfies the robust  
performance specification.  
Unfortunately this problem has not yet been solved, except is a few special cases. The  
current approach to this problem, known as D-K iteration, involves the iterative  
application of the Hdesign technique and the upper bound µ calculation. We will give  
a brief conceptual overview here and give more algorithmic details in Section 2.5.2.  
Consider applying Hsynthesis to the full P(s) interconnection structure for this  
problem. Suppose that this gives a controller, K(s) such that K(s) stabilizes P(s) and  
kFl(P(s), K(s))k1.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Recall that this is an upper bound for the µ problem of interest, implying that,  
µ[Fl(P(s), K(s)] 1,  
as required. However the upper bound may be conservative, meaning that in order to  
guarantee that µ[Fl(P(s), K(s)] 1, we have had to back off on the performance and/or  
the stability margins.  
With the appropriate choice of D scalings the upper bound will be much closer to µ. In  
otherwords there exists D such that, kDFl(P(s), K(s))Dkis a close upper bound to  
µ[Fl(P(s), K(s)]. The µ-synthesis problem can be replaced with the following  
approximation (based on the upper bound):  
inf  
D∈D  
kDFl(P(s), K(s))D1k.  
(2.18)  
K(s) stabilizing  
The reader is referred to Doyle [1] for details of this problem.  
If this is considered as an optimization of two variables, D and K(s), the problem is  
convex in each of the variables separately, but not jointly convex. Doyle [2] gives an  
example where this method reaches a local nonglobal minimum.  
D-K iteration involves iterating between using D ∈ D and K(s) to solve Equation 2.18.  
There are several practical issues to be addressed in doing this and we discuss those in  
the next section.  
2.5.2 The D-K Iteration Algorithm  
The objective is to design a controller which minimizes the upper bound to µ for the  
closed loop system;  
inf  
D∈D  
kDFl(P(s), K(s))D1k.  
K(s) stabilizing  
The major problem in doing this is that the D-scale that results from the µ calculation  
is in the form of frequency by frequency data and the D-scale required above must be a  
Download from Www.Somanuals.com. All Manuals Search And Download.  
dynamic system. This requires fitting an approximation to the upper bound D-scale in  
the iteration. We will now look at this issue more closely.  
The D-K iteration procedure is illustrated schematically in Figure 2.12. It can be  
summarized as follows:  
i) Initialize procedure with K0(s): H(or other) controller for P(s).  
ii) Calculate resulting closed loop: Fl(P(s), K(s)).  
iii) Calculate D scales for µ upper bound:  
inf σmax[D(ω)Fl(P(s), K(s))D(ω)1].  
D(ω)∈D  
ˆ
ˆ
iv) Approximate frequency data, D(ω), by D(s) ∈ RH, with D(ω) D(ω).  
v) Design Hcontroller for D(s)P(s)D1(s).  
ˆ
ˆ
vi) Go to step ii).  
We have used the notation D(ω) to emphasize that the D scale arises from frequency by  
frequency µ analyses of G(ω) = Fl(P(ω), K(ω)) and is therefore a function of ω. Note  
that it is NOT the frequency response of some transfer function and therefore we do  
NOT use the notation D(ω).  
The µ analysis of the closed loop system is unaffected by the D-scales. However the H∞  
design problem is strongly affected by scaling. The procedure aims at finding at D such  
that the upper bound for the closed loop system is a close approximation to µ for the  
closed loop system. There are several details about this procedure that will now be  
clarified.  
At each frequency, a scaling matrix, D(ω), can be found such that  
σmax(D(ω)G(ω)D(ω)1) is a close upper bound to µ(G(ω)) (Figure 2.12c). The D  
scale is block diagonal and the block corresponding to the e and w signals can be chosen  
to be the identity. The part of D corresponding to the z signal commutes with ∆ and  
cancels out the part of D1 corresponding to the v signal. To illustrate this, consider  
the D scale that might result from a block structure with only m full blocks. At each  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 2.12: D-K iteration procedure: a) Design H(or other) controller: K0(s) [step  
i)]. b) Closed loop perturbed system for µ analysis [step ii)]. c) Frequency by frequency  
upper bound D(ω) scale approximation to µ analysis [step iii)]. d) Scaling of Hdesign  
ˆ
ˆ
problem by D(s) where D(ω) D(ω) [steps iv) & v)].  
Download from Www.Somanuals.com. All Manuals Search And Download.  
frequency we would have,  
d1I1  
.
.
.
D =  
,
dmIm  
Ie  
where the identity Ie is of dimensions dim(e) × dim(e).  
The calculation of a new Hcontroller requires a state-space realization of D(ω). For  
each di in D(ω) we must fit a transfer function approximation, which we will denote by  
ˆ
ˆ
di(s). This is denoted by D(s) in the above discussion. The observant reader will notice  
ˆ
that, as defined here, D(s) is not of the correct input dimension to multiply P(s). We  
must append another identity of dimension equal to the dimension of the signal y. The  
final result is,  
ˆ
d1(s)I1  
.
.
.
ˆ
D(s) =  
ˆ
dm(s)Im  
Ie  
Iy  
and  
d1 1(s)I1  
ˆ
.
.
.
1(s) =  
.
ˆ
D
dm1(s)Im  
ˆ
Iw  
Iu  
Throughout the theoretical discussion we have assumed that the perturbation blocks,  
i, were square. The software handles the non-square case. This makes a difference to  
D(s) and D1(s). The identity blocks (Im, etc.) shown above will be of different sizes  
ˆ
ˆ
for D(s) and D1(s) if the corresponding ∆i perturbation is non-square. Similarly, the  
ˆ
ˆ
1  
ˆ
ˆ
Iw and Iu identities in D (s) are not necessarily the same size as Ie and Iy in D(s).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Several aspects of this procedure are worth noting. For the µ analysis and D scale  
calculation, a frequency grid must be chosen. The range and resolution of this grid is a  
matter of engineering judgement. The µ analysis can require a fine grid in the vicinity of  
the lightly damped modes. The order of the initial controller, K0(s), is the same as the  
interconnection structure, G(s). The order of K(s) is equal to the sum of the orders of  
G(s), D(s) and D1(s). This leads to a trade-off between the accuracy of the fit  
ˆ
ˆ
ˆ
between D and D(s) and the order of the resulting controller, K(s).  
Another aspect of this to consider is that as the iteration approaches the optimal µ  
value, the resulting controllers often have more and more response at high frequencies.  
This may not show up in the µ calculation, the D scale fitting, or a frequency response  
of K(s), because the dynamics are occuring outside of the user specified frequency grid.  
However these dynamics affect the next Hdesign step and may even lead to numerical  
instability.  
The above discussion used an Hcontroller to initialize the iteration. Actually any  
stabilizing controller can be used. In high order, lightly damped, interconnection  
structures, the Hdesign of K0(s) may be badly conditioned. In such a case the  
software may fail to generate a controller, or may give controller which doesn’t stabilize  
the system. A different controller (the H2 controller is often a good choice) can be used  
to get a stable closed loop system, and thereby obtain D scales. Application of these D  
scales (provided that they do not add significantly many extra states) often results in a  
better conditioned Hdesign problem and the iteration can proceed.  
The robust performance difference between the Hcontroller, K0(s), and K(s), can be  
dramatic even after a single D-K iteration. The Hproblem is sensitive to the relative  
scalings between v and w (and z and e). The D scale provides the significantly better  
choice of relative scalings for closed loop robust performance. Even the application of a  
constant D scale can have dramatic benefits.  
2.6 Model Reduction  
High order interconnection structures will result in high order controllers. Often a  
controller of significantly lower order will perform almost as well. Approximating a  
state-space system by one of lower order is referred to as model reduction. There are  
several techniques available for this purpose in Xµ and the background to these  
techniques is discussed here.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.6.1 Truncation and Residualization  
The simplest form of model reduction is state truncation. Consider a system, P(s), with  
a partitioned state matrix,  
A11 A12 B1  
P(s) = A21 A22 B2  
.
C1 C2  
D
Truncating the states associated with A22 results in,  
A11 B1  
Ptrun(s) =  
.
C1  
D
In any practical application we would order the states so that those truncated do not  
significantly affect the system response. For example, to truncate high frequency modes,  
A is transformed to be diagonal (or with 2 × 2 blocks on the diagonal) and the  
eigenvalues are ordered in increasing magnitude. This results in A21 = 0 and A22  
corresponds to the high frequency modes.  
Truncation also affects the zero frequency response of the system. Residualization  
involves truncating the system and adding a matrix to the D matrix so that the zero  
frequency gain is unchanged. This typically gives a closer approximation to the original  
system at low frequency. If the original system rolls off with frequency, the low order  
residualized approximation will usually not share this characteristic. Using the above  
P(s), the result is,  
1  
A11 A12A22  
A
B1 A12A221B2  
21  
Presid(s) =  
.
1  
C1 C2A22  
A
D C2A221B2  
21  
2.6.2 Balanced Truncation  
Consider a stable state-space system,  
A B  
C D  
P(s) =  
.
Download from Www.Somanuals.com. All Manuals Search And Download.  
The controllability grammian, Y is defined as,  
Z
T
Y =  
e
AtBBT eA tdt,  
0
and the observability grammian, X, is defined as  
Z
T
X =  
eA tCT CeAtdt.  
0
The grammians, X and Y , satisfy the Lyapunov equations,  
AY + Y AT + BBT  
AT X + XA + CT C  
=
=
0
0,  
and this is typically how they are calculated. We can also see from the definitions that  
X 0 and Y 0. Actually Y > 0 if and only if (A,B) is controllable and X > 0 if and  
only if (C, A) is observable.  
Now consider the effect of a state transformation on these grammians. Define a new  
state, xˆ, by xˆ = T x, where T is invertible, to give  
ˆ ˆ  
A B  
P(s)  
=
=
ˆ
C D  
TAT 1 TB  
.
CT 1  
D
T
The new grammians are Y = TY T and X = T T XT 1. The product of the  
ˆ
ˆ
ˆ ˆ  
grammians, Y X is therefore given by,  
1  
ˆ ˆ  
Y X = T Y XT  
.
This illustrates that the eigenvalues of the product of the grammians is invariant under  
state similarity transformation.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
We will now look at a particular choice of transformation. For a minimal realization, we  
can always find a transformation that gives,  
T
ˆ
Y = T Y T = Σ,  
and  
X = T T XT 1 = Σ,  
ˆ
where Σ = diag(σ1, . . . , σn) and σi 0, i = 1, . . . , n. This realization, where the  
grammians are equal, is called a balanced realization. Each mode of the balanced system  
can be thought of as equally controllable and observable. Balanced realization was first  
introduced by Moore [77].  
The σi are known as the Hankel singular values of the system and are ordered such that  
σ1 is the largest and σn is the smallest. Because the eigenvalues of the product of the  
grammians are invariant with respect to similarity transformations, the Hankel singular  
values are system invariants. We will denote the Hankel norm of a system as kP(s)kH  
and this is given by,  
kP(s)kH = σ1.  
The input-output interpretation of the Hankel norm is the following,  
y(t)  
(0,)  
2
kPkH  
=
sup  
.
ku(t)k2  
u(t)∈L2(−∞,0)  
The notation, y(t) (0,), denotes the system output, considered only over the time  
interval zero to . So we are looking at the system output, from time zero to , in  
response to input signals from −∞ to zero. The Hankel norm is the maximum gain from  
past inputs to future outputs. Each signal, u(t) ∈ L2(−∞, 0) drives the system state to  
a particular location in the state-space, and the output (considered over (0, )) is the  
corresponding transient decay from that state.  
Balanced truncation involves obtaining a balanced realization of P(s) and then  
truncating the states corresponding to the smallest Hankel singular values. Enns [78]  
Download from Www.Somanuals.com. All Manuals Search And Download.  
and Glover [79] independently obtained the following bound on the error induced by  
balanced truncation.  
Theorem 13  
Given a stable, rational, P(s), and Pbal(s), the balanced truncation of order k < n. Then,  
n
X
kP(s) Pbal(s)k∞  
2
2
σi  
i=k+1  
and  
n
X
kP(s) Pbal(s)kH  
σi.  
i=k+1  
Unobservable or uncontrollable modes have a corresponding Hankel singular value of  
zero and we can see immediately from the above that their truncation does not affect  
the -norm of the system.  
2.6.3 Hankel Norm Approximation  
We can also consider the problem of finding the kth order controller which gives the  
closest fit (in terms of the Hankel norm) to the original system. The results given here  
are due to Glover [79]. The first thing to consider is a lower bound on the error, which is  
specified in the following lemma.  
Lemma 14  
Given a stable, rational P(s), and a kth order approximation, Pk(s). Then  
σk+1 ≤ kP(s) Pk(s)k.  
This tells us how well we can expect to do in terms of the norm. Actually, there  
exists a Pk(s) which achieves this bound. The only problem is that it can have unstable  
(or anti-causal) parts to it.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Consider the problem of finding the stable, order k realization which minimizes the  
Hankel norm of the error. Define, Phankel(s) as the minimizing system. Then we have,  
σk+1  
kP(s) Phankel(s)kH  
=
inf  
kP(s) Pk(s)kH.  
Pk(s) stable  
This system also satisfies -norm bounds on the error, as illustrated in the following  
theorem.  
Theorem 15  
Given a stable, rational, P(s), and the optimal kth order Hankel norm approximation,  
Phankel(s). Then  
n
X
kP(s) Phankel(s)k2  
σi.  
i=k+1  
Furthermore, there exists a constant matrix, D0, such that  
n
X
kP(s) (Phankel(s) + D0)k∞  
σi.  
i=k+1  
Careful examination of the previous section will indicate that the Hankel norm of a  
system is independent of the D term. The optimal Hankel norm approximation given  
above, Phankel(s), is considered to have a zero D term. It has the same error bounds as  
the balanced truncation. Theorem 15 states that we can find a D matrix to add to  
Phankel(s) to cut this bound in half.  
The most common use of balanced truncations and Hankel norm approximations is to  
reduce the order of a controller. Note that this will give a small -norm error with  
respect to the open-loop controller. It does not say anything about the preservation of  
closed loop properties. These should always be checked after performing a controller  
order reduction.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 3  
Functional Description of Xµ  
3.1 Introduction  
This chapter describes the Xµ functions in the context of their intended usage.  
Chapter 2 provides the reader with an idea of the theoretical basis behind the various  
analysis and design calculations. Here we outline the software functions available for  
doing those calculations.  
Robust control design uses a subset of data objects provided within Xmath. We discuss  
the details of the most heavily used objects: Dynamic Systems and pdms. This  
coverage overlaps that given in the Xmath Basics manual; only the emphasis is different.  
There are several subtleties which arise when using these data objects in a robust  
control context. These issues are discussed in Section 3.2.  
3.2 Data Objects  
Xmath provides a wide range of data objects. There are several which are of primary  
interest in control design: matrices, pdms and Dynamic System. The transfer function  
object is useful for specifying systems although all calculations will be done with state  
space Dynamic Systems. The control uses of these objects is reviewed in this section.  
71  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3.2.1 Dynamic Systems  
Xmath has a dynamic system data object which specifies a dynamic system in terms of  
A, B, C and D matrices. The dynamic equations of the system are,  
x˙(t)  
=
=
Ax(t) + Bu(t),  
y(t)  
Cx(t) + Du(t),  
in the continuous case, and  
x(kT + T )  
=
=
Ax(kT ) + Bu(kT ),  
y(kT )  
Cx(kT ) + Du(kT ),  
in the discrete time case. The discrete time sample period, T , is stored as part of the  
data object. The user can label the system inputs, u(t), outputs, y(t), and states, x(t).  
Also residing within the Xmath state-space object is the initial state, x(0). This is used  
primarily for time response calculations. It is debatable whether or not the initial state  
is an intrinsic attribute of the system as one frequently changes it for simulation. It has  
the advantage of reducing the time response calculation to a simple multiplication and it  
can easily be changed without accessing all of the other system variables.  
The Xmath core functions system and abcd are used to create state-space systems. The  
system function is also used to specify the initial state (and, as discussed in the next  
section, any other system attributes). The following example puts together a simple  
two-state system.  
# Specify the A, B, C & D matrices  
a = [-.15,.5;-.5,-.15]  
b = [.2,4;-.4,0]  
c = [5,5]  
d = [.1,-.1]  
sys = system(a,b,c,d)  
[a,b,c,d] = abcd(sys)  
Simple systems are easily generated as transfer functions. To achieve this we simply  
define the numerator and denominator polynomials and then divide one by the other.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
As above, these polynomials can be specified by their roots or their coefficients. Note  
that we can specify the variable, and for continuous systems we use “s”. To create a  
discrete system “z” is used.  
# Generate the system from the numerator and denominator  
# coefficients.  
numerator = makepoly([-.1,19.97,-7.02725],"s");  
denominator = makepoly([1,0.3,0.2725],"s");  
# We can also do this by specifying the roots of each  
# polynomial  
numerator = -0.1*polynomial([199.3475;0.3525],"s");  
denominator = polynomial( ...  
[-.15+0.5*jay;-.15-0.5*jay],"s");  
# Note that multiplying the by -0.1 does the correct  
# thing to the polynomial above. The final system is  
# obtained with the command:  
sys1 = numerator/denominator  
Labeling and Comments  
Xmath allows the user to label all the inputs, outputs and states in a state-space system.  
Any Xmath variable can also have a comment string associated with it.  
Keywords for the system function are used to label the system. In the following  
example, the two-input, single-output system generated above is used as the starting  
point. Comments can be attached to any variable in the workspace (or the workspace  
itself) with the comment command.  
# Set up vectors of strings for the labels  
inputs = ["disturbance";"actuator"]  
outputs = ["measurement"]  
states = ["x1";"x2"]  
# and attach them to sys  
sys = system(sys,inputNames = inputs,...  
outputNames = outputs,...  
stateNames = states)  
# We can also attach a comment to sys  
comment sys "Example system for the manual"  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Because the dynamic system is a built-in data object, the label information will be  
displayed by simply typing the object name (sys in the above) or appending a question  
mark to the statement. The core function commentof is used to read the comment  
attached to a specified variable.  
3.2.2 pdms  
A pdm can be thought of as a three-dimensional matrix. The typical control uses are  
time or frequency responses, where the domain variable (the third dimension) is time or  
frequency. The frequency response of a multiple-input, multiple-output (MIMO) system  
is a complex valued matrix at each frequency. A time response of a multiple-output  
system is a real valued vector at each time step.  
As we would expect, there is a core function for constructing pdms from the raw data:  
pdm. The data matrices can be either bottom or right concatenated. If there is an  
ambiguity, Xmath assumes that the data was bottom concatenated. Keywords can be  
used to specify the row and column dimensions of the data matrices.  
To extract the data again, the function makematrix returns the matrix data in right  
concatenated form. The domain of a pdm is obtained with the function domain.  
# Make a pdm with 2 values in the domain  
mat1 = random(2,2)  
mat2 = -1*random(2,2)  
dom = [1;1+pi]  
pdm1 = pdm([mat1;mat2],dom)  
# Extract back the data and the domain  
dom = domain(pdm1)  
data = makematrix(pdm1)  
The pdm data object also contains row, column and domain labels. These can be  
appended with the pdm command in exactly the same manner as the Dynamic System  
labels illustrated above. Refer to the Xmath Basics manual for graphical illustration and  
further details about pdms.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appending and Merging Data  
Time functions, for creating simulation inputs for example, can be created by combining  
pdms. Xmath has two such core functions: concatseg and insertSeg The concatseg  
appends the data of one pdm to another. The domain is recalculated such that it is  
always regular. The user can specify a new beginning value for the domain and the  
spacing is determined by a series of prioritized rules. insertSeg inserts the data from  
one pdm into another. It can also “insert” before the beginning, or after the end, of the  
first pdm and the resulting gap is filled with zeros. Again the domain of the result is  
recalculated from a user specified beginning and is always regular. Both of these  
functions are useful in creating time domain waveforms.  
In the typical robust control cases where we want to merge pdm data, the result will not  
have a regular domain. One example is merging experimental transfer function estimates  
from multiple experiments, prior to performing a least squares transfer function fit or  
error analysis. For this purpose, Xµ provides a mergeseg function. Keywords allow the  
user to specify whether to sort in ascending or descending order or even whether to sort  
at all. The following example illustrates the a typical use.  
# pdm1 and pdm2 have identical row and column  
# dimensions and at least some non matching  
# independent variables  
pdm3 = mergeseg(pdm1,pdm2,{ascending,!duplicates})  
As an aside, note that the sort function in Xmath sorts each column of each matrix in a  
pdm, rather than sorting the domain.  
Extracting Data by Independent Variable/Domain  
It is often useful to be able to extract a segment of matrix data from a pdm. The  
function extractseg performs this function. The user has the option of resetting the  
domain to a new starting value.  
# sys1g is a freq. response from 0.1 to 100 rad/sec  
# select data from 1 to 10 rad/sec as sys1g1  
sys1g1 = extractseg(sys1g,1,10)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Data can also be extracted by independent variable index number, by providing a scalar  
argument to the pdm. In the following example the fifth through tenth and the  
twentieth independent variables are specified for the smaller pdm, pdm2.  
size(pdm1)  
ans (a row vector) =  
pdm2 = pdm1([5:10,20])  
size(pdm2)  
1
1
1
1
100  
7
ans (a row vector) =  
Indexing and Finding Data  
The core function find returns the indices of the elements of a matrix which meet a user  
defined criterion. By using a Boolean function of a matrix as the argument to find, the  
an index to the entries satisfying the Boolean function can be generated. This function  
works equally well for for pdms.  
This is illustrated in the following example.  
# sys3g is a MIMO frequency response.  
# We want to find the frequencies where the  
# SVD of this response exceeds 1.  
idx = find(max(svd(sys3g))>1)  
domain(sys3g(idx(:,1)))  
There are several points to observe here. Both svd and max operate on pdms as well as  
matrices. Refer to Section 3.2.4 for additional details. The variable idx is a data object  
known as an indexlist. In this case the indexlist has three columns: the domain index,  
row index and column index. By selecting the domain index the appropriate sub-pdm  
can be selected.  
The indexlist command creates the indexlist data object from a given three column  
matrix. The indexlist data type can also be used for assigning data to part of a pdm.  
This is illustrated in the following example.  
# Assign the row 2, column 1 element of the 4th domain  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# index of the pdm the value 100.  
idxlst = indexlist([4,1,2])  
pdm1(idxlst) = 100  
Operations on the Independent Variables/Domain  
The domain of a pdm is readily changed via the pdm command. The following example  
illustrates a common application; changing a frequency domain in Hertz to  
radians/second.  
# The following scales the domain of a pdm,  
# pdm1, by a factor of 2*pi  
newpdm = pdm(pdm1,2*pi*domain(pdm1))  
Xmath provides a general purpose check which can be used to check whether two pdms  
have the same domain. For more information on this function, refer to Section 3.3.1.  
The following example illustrates this application.  
# Check whether or not pdm1 & pdm2 have the  
# same domains.  
stat = check(pdm1,pdm2,{samedomain})  
# stat = 1 if the domains are the same  
3.2.3 Subblocks: selecting input & outputs  
Because the Dynamic System is an Xmath data object, standard matrix referencing  
can be used to select subsets of the inputs and outputs. This is illustrated in the  
following.  
# Select inputs 1, 3, 4 & 5 and outputs 2 & 7 from the  
# system: bigsys.  
subsys = bigsys([1,3:5],[2,7])  
The same format has exactly the same function for pdms.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Select columns 1, 3, 4 & 5 and rows 2 & 7 from the  
# pdm: bigpdm.  
subpdm = bigpdm([1,3:5],[2,7])  
This referencing format can also be used to assign data to parts of a larger pdm. This is  
shown in the following example.  
# Replace the 3,2 block of a pdm with its absolute value  
pdm1(3,2) = abs(pdm1(3,2))  
When selecting subblocks of a Dynamic System or pdm, the appropriate original labels  
(input, output and state; row, column and domain) are appended to the subblock.  
3.2.4 Basic Functions  
In all Xµ functions which operator on Dynamic Systems a matrix input is interpreted  
as a system with constant gain: the equivalent of system([],[],[],mat). This  
interpretation also applies to binary operations between Dynamic Systems and  
matrices in both Xmath and Xµ. For example, +, *, daug,. . . .  
In binary operations between pdms and matrices, the matrix is assumed to have a  
constant value at each element of the domain of the pdm. Again, this is consistent with  
the interpretation of a matrix as a system with no dynamics.  
Note that this interpretation works for Xµ and the basic Xmath operations; it will not  
necessarily apply to other Xmath modules or more sophisticated Xmath functions.  
Augmentation  
Augmentation is the building of matrices from component pieces. Dynamic Systems  
and pdms can be augmented with the same syntax as matrices. Data objects can be  
augmented, side by side, with the command [A, B]. Similarly, [A; B], places A above B.  
In Dynamic Systems [A, B] is analogous to summing the outputs of the systems A  
and B. [A; B] is analogous to creating a larger system where the input goes to both A  
Download from Www.Somanuals.com. All Manuals Search And Download.  
and B. Augmentation for pdms simply performs the augmentation at each domain  
variable. The domains must be the same.  
Diagonal augmentation can be performed with the Xµ function daug. This is the  
equivalent of the matrix augmentation: [A, 0; 0, B], except that up to 20 arguments  
can be augmented in one function call.  
Algebraic Operations  
In binary operations (e.g. +, -, *) between a Dynamic System and a matrix, the  
matrix is assumed to represent the D matrix of a system. In other words, a system with  
constant gain (no dynamics).  
The transpose operator () is well defined for constants, pdms and Dynamic Systems.  
In the Dynamic System case it creates the equivalent of the following.  
[A,B,C,D] = abcd(sys)  
transsys = system(A’,C’,B’,D’)  
The conjugate transpose operator (*’) of a Dynamic System creates the adjoint  
operator. In other words.  
[A,B,C,D] = abcd(sys)  
adjsys = system(-A’,-C’,B’,D’)  
Random pdms can be created in with the Xµ function randpdm. This is useful for  
generating random time domain signals for use in simulations.  
Dynamic System Functions  
The poles and zeros of Dynamic System can be found with the Xmath core functions  
poles and zeros.  
Random systems can be created with the Xµ function randsys. The user can also  
specify additional system properties; for example, stability, a frequency range for the  
Download from Www.Somanuals.com. All Manuals Search And Download.  
poles, or a zero D term. Generating random systems is useful for simulating systems  
with unknown subsystems.  
Specialized Xµ functions are provided for useful manipulations of the state. For example  
transforming the A matrix to a real valued, 2 × 2 block diagonal form; here referred to  
as modal form. These state-space functions are tabulated below.  
Description  
Xµ  
function  
state similarity transform simtransform  
state reordering orderstate  
transform to modal form modalstate  
The simtransform function is can also be used on constant matrices and pdms. Xmath  
has a transfer function data object which does not have a uniquely defined state.  
Applying simtransform or orderstate to a transfer function data object returns a  
warning and an unchanged transfer function. Applying modalstate to a transfer  
function gives the appropriate state-space representation. With modalstate it is possible  
to specify whether the resulting modes are in ascending or descending magnitude order  
and whether or not the unstable modes are ordered separately from the stable ones.  
pdm Functions  
A wide range of matrix functions can also be applied to pdms. Xµ provides several  
additional functions which are often of use in typical control applications.  
The function spectrad calculates the spectral radius (maximum magnitude eigenvalue)  
of a matrix or pdm.  
Xmath provides an interpolation function (interpolate) which does only first order  
interpolation. There is also a built-in function, spline, for higher order spline fitting.  
Zero order interpolation is often required, particularly for looking at fine details in the  
inputs of Dynamic System responses. An additional Xµ interpolation function  
(interp) is used for this purpose. This command is also useful for mapping data on an  
irregularly spaced domain (from experiments for example) to a regular domain.  
Simple decimation is easily performed on pdms by direct indexing. The following  
example illustrates this.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# N is the decimation ratio.  
smallpdm = bigpdm([1:N:length(bigpdm)])  
3.2.5 Continuous to Discrete Transformations  
Xmath has a single function, discretize, for calculating continuous to discrete  
transformations. Several options are offered including forward and backward difference,  
Z-transform equivalent, bilinear and pole-zero matching.  
Xmath also has a makeContinuous function which performs the inverse of the  
discretize function. Naturally, it is only an inverse if certain pole/zero location and  
sampling period relations are assumed to hold.  
3.3 Matrix Information, Display and Plotting  
3.3.1 Information Functions for Data Objects  
The data object information is available in Xmath via the variable window. This  
displays the data object classification, row and column information and any associated  
comment for each variable in the workspace. For pdms or Dynamic Systems the  
domain or state dimension is also displayed. If open, this window is updated  
continuously; closing it will speed up calculations.  
The Xmath command who displays dimensional information in the command log  
window. pdms and Dynamic Systems both appear as three dimensional objects and it  
is not possible to distinguish between them using this command alone. The core  
function whatis displys the data object type.  
Within an Xmath function, data object attributes can be determined with the check or  
is functions. These have similar formats, with check being the more powerful. The  
function size is used to determine the actual dimensions.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3.3.2 Formatted Display Functions  
It is often useful to consider complex numbers in terms of frequency and damping. This  
is particularly applicable when studying the poles or zeros of a system. The command  
rifd provides a real-imaginary-frequency-damping formatted display for complex valued  
input. The following example illustrates the most common usage.  
# display the poles locations of system: sys1  
rifd(poles(sys1))  
Using the keyword {discrete} will give the display in terms of z-plane rather than the  
s-plane. If the input to rifd is a Dynamic System then both the poles and zeros are  
calculated and displayed.  
3.3.3 Plotting Functions  
As pdms are a native data object in Xmath, the standard Xmath plot function will  
correctly plot a pdm. Multiple pdms over differing domains can be handled with  
repeated calls to the plot function by using the graphical object created from the  
previous plot call. The Xmath Basics manual describes this feature in detail.  
The Xµ function ctrlplot provides more control system specific plotting capabilities.  
Keywords allow the user to easily specify Bode, Nyquist, Nichols and other plots.  
Because it handles graphic objects in a similar manner to plot, the resulting plots can  
be modified by subsequent plot function calls. An example is given below.  
sys1 = 1/makepoly([1,1],"s")  
sys2 = 2*sys1*10/makepoly([1,1,10],"s")  
w1 = logspace(0.01,10,50)’  
w2 = sort([w1;[0.35:0.01:0.65]’])  
sys1g = freq(sys1,w1)  
sys2g = freq(sys2,w2)  
# Bode plots  
Download from Www.Somanuals.com. All Manuals Search And Download.  
g1 = ctrlplot(sys1g,{bode});  
g1 = ctrlplot(sys2g,g1,{bode});  
g1 = plot({keep=g1,title = "Bode plots",...  
legend = ["sys1","sys2"]})?  
Bode plots  
10  
1
0.1  
sys1  
0.01  
sys2  
0.001  
0.0001  
1e-05  
0.01  
0.1  
1
10  
Frequency  
0
-50  
-100  
-150  
-200  
-250  
-300  
0.01  
0.1  
1
10  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Nyquist plots  
g2 = ctrlplot(sys1g,{nyquist});  
g2 = ctrlplot(sys2g,g2,{nyquist});  
g2 = ctrlplot(-1,g2,{nyquist,marker=1,line=0});  
g2 = plot(g2,{projection="orthographic",...  
legend=["sys1","sys3","critical point"],...  
title="Nyquist plots"})?  
Nyquist plots  
0.5  
0
-0.5  
sys1  
sys3  
critical point  
-1  
-1.5  
-2  
-2  
-1  
0
1
2
Real  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3.4 System Response Functions  
3.4.1 Creating Time Domain Signals  
The Signal Analysis Module contains several functions which are useful for building time  
domain signals: gcos and gsin. Xµ provides gstep for the creation of stair-step signals.  
The example below illustrates the generation of a sine wave and a step function.  
# A unit step over 10 seconds  
time = 0:10:.1  
y1 = gstep(time)  
# multiple steps over 10 seconds  
sdata = [1;-2;4]  
tdata = [3;5;7]  
y2 = gstep(time,tdata,sdata)  
# Freq: 2 Hz, Ampl: 0.5  
y3 = 0.5*gsin(time,2)  
Because of the native pdm data type, and the ease in which pdms can be augmented,  
vector (or even matrix) valued signals are easily created. For example:  
# A function depending on t  
time = 0:10:.1  
y1 = pdm(exp(0.1*time),time) - gsin(time,3/(2*pi))  
# A function independent of t  
y2 = uniform(time)  
# A 2 x 2 pdm  
pt = pdm(time,time)  
y3 = [pt/max(time),2*Cos(3*pt+0.2));...  
2+Sin(2*pt),sqrt(pt)+0.3*random(pt)]  
3.4.2 Dynamic System Time Responses  
In Xmath time responses can be calculated by simply multiplying a Dynamic System  
by a pdm. A zero-order hold equivalent is used with the sampling interval set to the  
Download from Www.Somanuals.com. All Manuals Search And Download.  
spacing in the input signal pdm. This means that the input pdm must be regularly  
spaced. Stair-case input functions with relatively few data points will often give  
erroneous results. The input signal should be interpolated (with interp) before being  
multiplied with the Dynamic System. The function defTimeRange will calculate a  
default integration step size and form the required time vector. This can be useful in  
creating an input pdm or as an input to interp. Note that the initial state is specified  
within the Xmath Dynamic System.  
Discrete time Dynamic Systems do not require an additional command as the time  
increment is contained within the Dynamic System data object. The time step in the  
input pdm must of course match the discrete system sample time.  
Xmath also provides several core functions for common time response calculations: step  
calculates the unit step response; impulse calculates the impulse response; and initial  
calculates the unforced response from initial conditions specified within the Dynamic  
System or provided as input arguments. In each of these functions the user may specify  
a time to override the default selected by defTimeRange.  
Time response calculations are illustrated in the following example. Several of the  
functions discussed in the previous sections are also used.  
# Create a second order lightly damped system.  
sys = 5/makepoly([1,1,5],"s")  
# Create an input signal with a step to +1 at  
# 1 second and a step to -1 at 5 seconds.  
# 10 second signal is created.  
A
u = gstep([0:0.05:10],[0;1;5],[0;1;-1])  
# Calculate the time response.  
y0 = sys*u  
# Repeat this calculation with an initial  
# condition of [-1;0]. Note that this is  
# only meaningful for a specified realization  
# and Xmath forces us to choose one. Here we  
# choose that returned as the abcd default  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[a,b,c,d] = abcd(sys)  
sys = system(a,b,c,d)  
y1 = system(sys,{X0=[-1;0]})*u  
# Now plot the result  
g1 = ctrlplot(u,{line style=2});  
g1 = ctrlplot(y0,g1,{line style=1});  
g1 = ctrlplot(y1,g1,{line style=4});  
g1 = plot(g1,{!grid})?  
2
1
0
-1  
-2  
-3  
0
2
4
6
8
10  
The native Xmath time domain simulation, using the * operation, has been  
supplemented with an Xµ function: trsp. This provides automatic selection of the  
integration time and, if necessary, interpolates the input signal appropriately. trsp also  
gives the option of linear interpolation of the input vector and a triangle hold equivalent  
discretization of the integration. This simulates the response of the system to signals  
which are linearly interpolated between samples. The syntax of the function is  
illustrated below.  
y = trsp(sys,u,tfinal,{ord,intstep})  
sys, u, and tfinal are the dynamic system, input signal and final time respectively. ord  
Download from Www.Somanuals.com. All Manuals Search And Download.  
and intstep are the interpolation order and integration step size. The system must be  
continuous. The integration order and sample time are prespecified for discrete time  
systems making the * operator is suitable for such simulations.  
Xµ provides a sampled data simulation function (sdtrsp) based on the interconnection  
structure shown in Figure 3.1.  
Figure 3.1: Interconnection structure for sampled data simulation  
The signals v and y are the continuous outputs of the continuous system, M(s). The  
simulation assumes that y is sampled and used as the input to the discrete system,  
N(z). The output of N(z), u(s) is assumed to be held with a zero order hold. All signals  
are calculated with the sample spacing determined by the continuous time system  
integration step size. The output of N(z) can be delayed by a fraction of the discrete  
time system sample time. This is useful for simulating systems with a partial period  
calculation delay; a situation which frequently occurs in practice.  
3.4.3 Frequency Responses  
The Xmath function freq is used for frequency response calculation. The input is a  
Dynamic System and a vector of frequency points. The frequency points can  
alternatively be specified by minimum and maximum variables and one of two other  
choices: the total number of points or phase tracking. If the total number of points is  
specified these are logarithmically spaced. If phase tracking is specified the points are  
selected such that the phase difference between points is less than a prespecified  
Download from Www.Somanuals.com. All Manuals Search And Download.  
maximum. This can be handy when first examining a high order system. An example is  
given below.  
# Create a single-input, two-output system.  
sys = [1/makepoly([1,0.1,1],"s");...  
makepoly([1,1],"s")/makepoly([1,10],"s")]  
# The automatic point selection is used.  
sysg = freq(sys,{Fmin=0.01,Fmax=100,track})  
# Now plot the result  
ctrlplot(sysg,{bode})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
100  
10  
1
0.1  
0.01  
0.001  
0.0001  
1e-05  
1e-06  
0.01  
0.1  
1
10  
100  
Frequency  
100  
50  
0
-50  
-100  
-150  
-200  
0.01  
0.1  
1
10  
100  
Frequency  
Note that the default frequency units in Xmath are Hertz. This applies generically to all  
functions where the user specifies frequency information, although many functions allow  
radians/second to be specified via a keyword.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 3.2: Generic Redheffer interconnection structure  
3.5 System Interconnection  
Interconnections of systems are used extensively in the design, analysis and simulation  
calculations. The most general form of interconnection, and the one used in forming  
closed loop systems, is the Redheffer (or star) product. The Xµ function starp performs  
this operation. This Redheffer product operation is illustrated in Figure 3.2. A MIMO  
Dynamic System (or matrix) is created from two MIMO Dynamic Systems.  
The syntax of the command to form this interconnection is,  
bigsys = starp(sys1,sys2,dim1,dim2)  
A more powerful, general, interconnection capability is given with the Xµ function  
sysic. This can be used to interconnect subsystems (Dynamic Systems or constant  
gain matrices) in an arbitrary manner. This is best illustrated by an example. Consider  
the interconnection shown in Figure 3.3.  
In each case it is assumed that the systems p, c, and wght, exist in the workspace prior  
to calling sysic. The final four-input, three-output system is shown in Figure 3.4.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 3.3: Example interconnection of subsystems  
Figure 3.4: Example interconnected system  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Using sysic to form this interconnection can be considered as four distinct operations.  
Specify the individual subsystems.  
Name and dimension the input signals.  
Specify, algebraically in terms of subsystem outputs or input signals, the output of  
the interconnected system.  
Specify, algebraically in terms of subsystem outputs or input signals, the input to  
each of the subsystems.  
Name the closed loop system.  
The Xµ script used to create the closed-loop system variable clp is shown below. A  
single-input, two-output plant is considered. sysic is used to form the closed loop system  
for a particular controller. Noise and disturbance signals, in addition to a command  
reference, are considered as inputs. Tracking error and the control actuation are the  
outputs of interest.  
# form the subsystems  
p1 = [1;1]*(1/makepoly([1,1,40],"s"));  
p = daug(1,1/makepoly([1,1],"s"))*p1;  
c = [50*makepoly([1,1],"s")/makepoly([1,10],"s"),-20];  
wght = 0.01;  
Name the subsystems - these must match with the workspace variables.  
snames = ["p"; "c"; "wght"]  
Name the final system inputs (names are arbitrary) Parenthesis are used to give a  
dimension > 1.  
inputs = ["ref"; "dist"; "noise(2)"]  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Specify the outputs in terms of the subsystem names and the input names. Note that  
individual outputs of MIMO systems and simple arithmetic combinations can be  
specified. Parenthesis specify which output of a MIMO system is to be used.  
outputs = ["p(1) + wght"; "7.5*c";  
"ref - 1.6*p(1) - 1.6*noise(2) - 1.6*wght"]  
Now specify the inputs to each of the named subsystem. The order is important. Note  
how the input to a multiple-input system (”c”) is specified.  
conx = ["c";...  
"ref-1.6*p(1)-1.6*noise(2)-1.6*wght; p(2)+noise(1)";...  
"dist"]  
Now the final system (clp) is formed.  
clp = sysic(snames,inputs,outputs,conx,p,c,wght)  
size(clp)?  
ans (a row vector) =  
3
4
4
rifd(clp)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.5627e+00  
-4.4373e+00  
-3.0000e+00  
-3.0000e+00  
0.0000e+00  
0.0000e+00  
-9.4375e+00  
9.4375e+00  
1.5627e+00  
4.4373e+00  
9.9028e+00  
9.9028e+00  
1.0000  
1.0000  
0.3029  
0.3029  
Zeros:  
real  
imaginary  
frequency  
damping  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H2  
H∞  
(rad/sec)  
ratio  
-1.0000e+00  
-5.0000e-01  
-5.0000e-01  
-1.0000e+01  
0.0000e+00  
6.3048e+00  
-6.3048e+00  
0.0000e+00  
1.0000e+00  
6.3246e+00  
6.3246e+00  
1.0000e+01  
1.0000  
0.0791  
0.0791  
1.0000  
The order of the names in the systemname variable, must match the order of the rows in  
the connections variable and the order of the last arguments in the sysic function call.  
3.6 H2 and HAnalysis and Synthesis  
This section discusses the synthesis functions available in Xµ. A weighted  
interconnection structure is set up so that either H2 or Hdesign methods can be  
applied. This discussion assumes that the reader is familiar with the theory and  
application of these methodologies. Section 2.3 gives a more detailed overview of the  
theory and outlines the algorithms used in the calculations. For specific design examples  
and further discussion refer to the demos given in Section 4.1.  
3.6.1 Controller Synthesis  
The generic synthesis interconnection structure is illustrated in Figure 3.5. The  
objective is to design K(s) such that the closed loop interconnection is stable and the  
resulting transfer function from w to e (denoted by G(s)) satisfies either an H2 or H∞  
norm objective.  
Xµ provide functions to calculate the controllers minimizing either the H2 or Hnorm  
of G(s); h2syn and hinfsyn respectively.  
Recall from Section 2.3 that the minimizing H2 norm controller (calculated by h2syn) is  
unique. The format of this function is given below.  
k = h2syn(p,nmeas,ncon)  
The variable p is the open loop interconnection structure (P(s) in Figure 3.5). This  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 3.5: Interconnection structure for controller synthesis  
structure contains more than just the open loop plant. It typically also contains  
frequency dependent weighting functions and specifies the structure of the  
interconnection between the open loop plant and the controller. The dimensions of y  
and u are specified by nmeas and ncon. The underlying Riccati equations can be solved  
by either an eigenvalue or Schur decomposition method. A keyword specifies the desired  
Riccati solution method. A simple is example is given at the end of this section.  
The hinfsyn function calculates a controller, K(s), which makes kG(s)kγ for a user  
specified γ. It is not possible to make γ arbitrarily small; there is a minimum value for γ  
(referred to as γopt) and γopt is not known a priori in a design problem. Therefore  
hinfsyn can also perform a bisection search for the smallest γ > γopt and use this value  
of γ for the control design. Again, Section 2.3 gives the relevant theoretical details.  
The syntax of hinfsyn is illustrated below. The final bound on the achieved γ is  
returned as gfin.  
[k,gfin] = hinfsyn(p,nmeas,ncon,gamma)  
If gamma is a scalar, the controller achieving that γ value is calculated, if one exists. If  
gamma is a two element vector a bisection search for the smallest γ value is performed.  
The function displays various intermediate calculations related to the eigenvalues of the  
Hamiltonian and the positivity of the Riccati solutions. As γ approaches γopt the Riccati  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H2  
H∞  
equation solution procedure often becomes poorly conditioned. Displaying intermediate  
calculation results allows the user to fine tune several tolerances if necessary. The  
intermediate Hamiltonian and Riccati solution details are displayed as the bisection  
proceeds. The bisection stopping tolerance, Riccati solution tolerances and the Riccati  
solution method are specified via keywords. Details on the meaning of these tolerances  
are given in Section 2.3.5.  
We now give a simple example illustrating the use of these functions. An oscillatory  
non-minimum phase SISO system is to be controlled in a unity gain negative feedback  
configuration. This example is for pedagogical purposes only and does not illustrate the  
generality of the approach with respect to MIMO systems and more general control  
configurations. The weighting functions have been chosen to be appropriate for an H∞  
design. The performance weight, Wperf, is close to 1/s giving good tracking. The  
actuator weight, Wact, increases at high frequency, penalizing fast actuator action. A  
sensitivity function and step response comparison have been included to illustrate  
typical function calls for these procedures. Inappropriate weight choices make this  
comparison blantantly unfair to the H2 approach; the user should not drawn any  
conclusions about the relative merits of either approach from this example.  
# Set up a simple closed loop problem.  
plant = makepoly([0.1,-0.1,1],"s")*makepoly([1,1],"s")...  
/(makepoly([1,0.1,.1],"s")*(makepoly([0.2,1],"s")))  
# Examine the plant frequency response.  
omega = logspace(0.001,100,200)  
plantg = freq(plant,omega)  
g0 = ctrlplot(plantg,{bode});  
g0 = plot(g0,{title="Open loop plant"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Open loop plant  
100  
10  
1
0.1  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
0
-100  
-200  
-300  
-400  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
The desired closed loop configuration is illustrated in Figure 3.6.  
Figure 3.6: Closed loop configuration  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H2  
H∞  
Figure 3.7: Weighted design interconnection structure: p  
In order to set up the design problem, we consider ref as an unknown input and the  
tracking error (input to k), and the actuator signal, u, as outputs to be minimized.  
These outputs are weighted with the weights Wperf and Wact respectively. The weighted  
interconnection structure for design, p, is illustrated in Figure 3.7.  
A more realistic problem would also include weighted noise on the measurement signal,  
y. We could also weight the ref input and add weighted disturbances to the plant input  
or output.  
# Create weights  
Wperf = 100/makepoly([100,1],"s")  
Wact = makepoly([0.5,0.05],"s")/makepoly([0.05,1],"s")  
Wperfg = freq(Wperf,omega)  
Wactg = freq(Wact,omega)  
g00 = ctrlplot(Wperfg,{logmagplot});  
g00 = ctrlplot(Wactg,g00,{logmagplot,line style=4});  
g00 = plot(g00,{title="Weighting functions",...  
legend=["Wperf";"Wact"],!grid})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Weighting functions  
100  
10  
1
0.1  
Wperf  
Wact  
0.01  
0.001  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
# Form the weighted interconnection structure  
sysnames = ["plant";"Wperf";"Wact"]  
sysinp = ["ref";"u"]  
sysout = ["Wperf"; "Wact"; "ref-plant"]  
syscnx = ["u";...  
"ref-plant";... # input to Wperf  
"u"] # input to Wact  
# input to plant  
p = sysic(sysnames,sysinp,sysout,syscnx,plant,...  
Wperf,Wact)  
# Design Hinf controller  
nctrls = 1  
nmeas = 1  
gmax = 25  
gmin = 0  
Kinf = hinfsyn(p,nmeas,nctrls,[gmax;gmin])  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
25.0000  
Y eig  
0.0e+00  
Hx eig  
X eig  
nrho xy  
0.0000  
p/f  
25.000  
5.2e-01  
1.7e-03  
1.0e-02  
p
Download from Www.Somanuals.com. All Manuals Search And Download.  
H2  
H∞  
12.500  
5.2e-01  
5.2e-01  
5.1e-01  
5.0e-01  
3.9e-01 -9.8e+01  
4.8e-01 1.8e-03  
1.7e-03  
1.7e-03  
1.7e-03  
1.7e-03  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
p
p
p
p
f
p
6.250  
3.125  
1.562  
0.781  
1.172  
Gamma value achieved:  
rifd(Kinf)  
1.1719  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0000e-02  
-1.0347e+00  
-2.6846e+00  
-2.6846e+00  
-1.2692e+01  
0.0000e+00  
1.0000e-02  
1.0347e+00  
3.5362e+00  
3.5362e+00  
1.2692e+01  
1.0000  
1.0000  
0.7592  
0.7592  
1.0000  
0.0000e+00  
2.3017e+00  
-2.3017e+00  
0.0000e+00  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-5.0000e+00  
-2.0000e+01  
3.1225e-01  
-3.1225e-01  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
5.0000e+00  
2.0000e+01  
0.1581  
0.1581  
1.0000  
1.0000  
# Design H2 controller  
K2 = h2syn(p,nmeas,nctrls)  
rifd(K2)  
Poles:  
real  
imaginary  
frequency  
damping  
Download from Www.Somanuals.com. All Manuals Search And Download.  
(rad/sec)  
ratio  
-1.4046e-01  
-1.4046e-01  
-1.5863e+00  
-1.5863e+00  
-5.2060e+00  
-2.3161e-01  
2.3161e-01  
3.4754e+00  
-3.4754e+00  
0.0000e+00  
2.7087e-01  
2.7087e-01  
3.8203e+00  
3.8203e+00  
5.2060e+00  
0.5186  
0.5186  
0.4152  
0.4152  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-5.0000e+00  
-2.0000e+01  
-3.1225e-01  
3.1225e-01  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
5.0000e+00  
2.0000e+01  
0.1581  
0.1581  
1.0000  
1.0000  
# Look at frequency responses of the controllers  
# Kinf and K2  
Kinfg = freq(Kinf,omega)  
K2g = freq(K2,omega)  
g1 = ctrlplot(Kinfg,{logmagplot});  
g1 = ctrlplot(K2g,g1,{logmagplot,line style=4});  
g1 = plot(g1,{title="Controllers",legend=["Kinf";"K2"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H2  
H∞  
Controllers  
10  
1
0.1  
0.01  
Kinf  
K2  
0.001  
0.0001  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
# Examine sensitivity functions  
sensinf = inv(1 + plant*Kinf)  
sensinfg = freq(sensinf,omega)  
sens2 = inv(1 + plant*K2)  
sens2g = freq(sens2,omega)  
g2 = ctrlplot(sensinfg,{logmagplot});  
g2 = ctrlplot(sens2g,g2,{logmagplot,line style=4});  
g2 = plot(g2,{title="Sensitivity functions",...  
legend=["Kinf","K2"],!grid})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Sensitivity functions  
10  
1
Kinf  
K2  
0.1  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Note that with the interconnection structure shown in Figure 3.7, the closed loop  
transfer function from ref to e(1) is simply Wperf*sensinf. If the Hof the resulting  
closed loop system was less than one, this would guarantee that sensinf was less than  
inv(Wperf) at every frequency. Note that from the above plot, this is not quite  
satisfied; as we might expect because the closed loop Hnorm is approximately 1.17.  
Now look at some step responses. Use sysic to create an unweighted interconnection  
(because the weightings are only for design purposes and are not actually implemented  
in the system). We create an open-loop interconnection and close the loop with starp for  
each controller.  
ic = sysic("plant",["ref";"ctrl"],["plant";"ref-plant"],...  
"ctrl",plant)  
clpinf = starp(ic,Kinf)  
clp2 = starp(ic,K2)  
# Examine step response  
step = gstep([0:0.1:10],0,1)  
yinf = clpinf*step  
y2 = clp2*step  
g3 = ctrlplot(yinf);  
g3 = ctrlplot(y2,g3,{line style=4});  
Download from Www.Somanuals.com. All Manuals Search And Download.  
H2  
H∞  
g3 = ctrlplot(step,g3,{line style=2});  
g3 = plot(g3,{title="Step responses",...  
legend=["Kinf";"K2";"input"]})?  
Step responses  
1.2  
1
0.8  
0.6  
Kinf  
K2  
input  
0.4  
0.2  
0
0
2
4
6
8
10  
3.6.2 System Norm Calculations  
Functions are provided for calculating the H2 and Hnorms of Dynamic Systems. In  
the H2 case, this involves the solution of a Lyapunov equation. A bisection method,  
involving the calculation of eigenvalues of a scaled Hamiltonian matrix, is required for  
the Hnorm calculation.  
The Xµ function for the two norm calculation is called h2norm. The syntax and  
operation are self explanatory.  
The calculation of the Hnorm involves the iterative solution of a Riccati equation.  
The technique is a generalization of the the theoretical result given in Lemma 2 in  
Section 2.3.3. As a result, a tolerance can be specified, and the calculation gives upper  
and lower bounds. The function is hinfnorm. The syntax is illustrated below.  
[out,omega] = hinfnorm(system,tol)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Bounds on the Hnorm are returned as out. An estimate of the frequency where the  
norm is achieved is returned as omega. Further control of the iteration is available via  
keywords.  
The following example calculates the H2 and Hnorms of each of the closed loop  
systems arising from the previous example. Notice that G2 has the minimum  
H2 norm and Ginf has the minimum Hnorm. We can also see that the Ginf has a  
slightly lower norm than the bound guaranteed from the hinfsyn function call.  
# Calculate the norms of each closed loop system.  
Ginf = starp(p,Kinf)  
G2 = starp(p,K2)  
hinfnorm(Ginf)?  
ans (a column vector) =  
1.17032  
1.16915  
hinfnorm(G2)?  
ans (a column vector) =  
36.2138  
36.1776  
h2norm(Ginf)?  
ans (a scalar) = 2.86197  
h2norm(G2)?  
ans (a scalar) = 2.78655  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3.7 Structured Singular Value (µ) Analysis and  
Synthesis  
This section covers the functions used in the D-K iteration procedure. The primary  
functions are the calculation of the controller (already discussed), the calculation of µ  
and the fitting of rational D scales. Several subroutines used for D scale fitting are  
useful in their own regard and are also discussed here. The discussion below assumes  
that the reader if familiar with the definition and use of µ; only the implementation  
issues are covered here. A simple application example is given here. To get a better idea  
of the standard approaches to µ and the D-K iteration, the reader should refer to the  
demos in Chapter 4. To find out more about the theoretical aspects of µ, including its  
application to robust stability and robust performance problems, refer to Section 2.4.  
3.7.1 Calculation of µ  
The function mu calculates the structured singular value. µ is is defined as a function of  
a matrix and a specified block structure. The most common use involves calculating µ at  
each frequency of a system frequency response. For this reason the µ function accepts  
pdm input arguments as well as matrices. The block structure is specified to the  
function in a coded form.  
In general only upper and lower bounds for µ are calculated. The upper bound (for the  
square ∆ block case) is given by,  
µ(M) inf σmax DMD1  
,
D∈D  
where D is the set of all matrices which commute with the perturbation, ∆. Recall that  
the lower bound is given by,  
max ρ(MQ) µ(M),  
Q∈Q  
where ρ denotes the spectral radius and Q is the set of all unitary perturbations of the  
specified block structure. The matrix Q achieving this maximization is a destabilizing ∆.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The outputs of the µ function are: the upper and lower bounds for µ; the D matrix for  
the upper bound; the Q matrix for the lower bounds; and a sensitivity estimate for the  
part of the D matrix corresponding to each block in ∆. The sensitivity estimate is  
essentially the gradient of the upper bound value with respect to the value of the D  
scale. It is useful in weighting the D scale fitting procedure.  
The function syntax is shown below.  
[mubnds,D,Dinv,Delta,sens] = mu(M,blk)  
The upper and lower bounds are returned in mubnds. The variable sens gives a measure  
of the sensitivity of the upper bound to the D matrix. Both D and Q are returned as  
the matrices (or pdms) D and Delta. Note that the inverse of D, used in the calculation  
of the upper bound, is also returned (as Dinv). This is done as, in the non-square ∆  
block case, the dimensions of D and D1 are different.  
The block structure is a vector of dimension: number of blocks × 2. For each block the  
output and input dimension is specified. To specify a scalar × identity block, the input  
dimension is set to zero.  
A power iteration, with several random restarts, is used for the lower bound. The upper  
bound calculation uses an Osborne balancing method and enhances this with the Perron  
vector method for problems with less than 10 blocks. These methods have been found to  
be appropriate for the vast majority of practically motivated problems.  
New algorithms for these calculations are currently under development. The most  
significant enhancement is the ability to calculate µ with respect to structures which  
include real valued blocks. Because of the development effort in this direction, a wide  
range of calculation options were not provided for the mu function.  
The following example gives the simplest matrix with a gap between µ and the D-scale  
upper bound. It also illustrates the use of the mu function for constant matrices.  
The following is the classic example showing that mu is not equal to its upper bound for  
more than three full blocks. We include a random scaling here to give a non-trivial  
D-scale.  
gamma = 3 + sqrt(3); beta = sqrt(3) -1  
a = sqrt(2/gamma); b = 1/sqrt(gamma)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
c = 1/sqrt(gamma); d = -sqrt(beta/gamma)  
f = (1+jay)*sqrt(1/(gamma*beta))  
psi1 = -pi/2; psi2 = pi  
U = [a,0; b,b; c,jay*c; d,f]  
V = [0,a; b,-b; c,-jay*c; f*exp(jay*psi1), d*exp(jay*psi2)]  
scl = diagonal(random(4,1)+0.1*ones(4,1))  
M = scl*U*V*’*inv(scl)  
Consider four 1×1 blocks. In this example mu is approximately 0.87.  
blk1 = [1,1; 1,1; 1,1; 1,1]  
[mubnds1,D1,Dinv1,Delta1] = mu(M,blk1)  
max(svd(M))?  
# a very crude upper bound  
ans (a scalar) = 3.17155  
max(svd(D1*M*Dinv1))? # the D scale upper bound  
ans (a scalar) = 1  
mubnds1?  
mubnds1 (a column vector) =  
1
0.864113  
Consider one 4×4 block (equivalent to maximum singular value).  
blk2 = [4,4]  
[mubnds2,D2,Dinv2,Delta2] = mu(M,blk2)  
Note that the perturbation is such that det(I MDelta) = 0.  
max(svd(D2*M*Dinv2))?  
ans (a scalar) = 3.17155  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mubnds2?  
mubnds2 (a column vector) =  
3.17155  
3.17155  
det(eye(4,4) - M*Delta2)?  
ans (a scalar) = -2.62055e-16 + 5.82345e-17 j  
3.7.2 The D-K Iteration  
Recall from Section 2.5 that the D-K iteration is used as an approximation to µ  
synthesis. This section discusses how Xµ implements this procedure.  
The D-K iteration procedure is as follows. The weighted design interconnection  
structure is referred to as P. The successive controllers are K i, i = 1,. . . and the  
successive closed loop systems are G i, i = 1,. . . . The block structure is coded within  
blk; nmeas is the number of controller measurements, and nctrls is the number of  
controller actuators outputs.  
1. Set i = 1.  
2. Design an initial Hcontroller, K 1, for the interconnection structure, P.  
K 1 = hinfsyn(P, nmeas, nctrls, gamma limits).  
3. Form the closed loop,  
G i = starp(P, K i).  
4. Calculate µ(G i) as follows.  
[bnds, D i, Dinv i, Delta i, sens i] = mu(G i, blk).  
This calculation gives the D-scales for the upper bound: D i. Figure 3.8 illustrates  
this step.  
5. Compare the closed loop to the design specifications; this will involve more than  
just the calculation of µ. The user has several options at this point:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
(a) Controller and closed loop are satisfactory so stop the iteration.  
(b) The iteration has converged and the controller and closed loop are not  
satisfactory. In this case the weighted design problem must be reformulated.  
(c) The iteration has not yet converged. Continue with step 6.  
6. Fit rational approximations to D i and Dinv i. The function to do this, musynfit,  
is described in more detail in Section 3.7.3. A typical function invocation is,  
[Dsys i, Dinvsys i] = musynfit(D i, blk, nmeas, nctrls, sens i).  
7. Apply rational approximations to D-scales to the weighted interconnection  
structure. This is equivalent to,  
P D = Dsys i P Dinvsys i.  
8. Set i = i + 1  
9. Design an Hcontroller, K i, for the interconnection structure, P D.  
K i = hinfsyn(P D, nmeas, nctrls, gamma limits).  
This step is illustrated in Figure 3.9.  
10. Go to step 3.  
Figure 3.8: µ calculation in the D-K iteration: Step 3 in the enumerated procedure. Note  
that µ(G i) σmax(D i*G i*Dinv i)  
The above iteration uses a standard Hdesign. It is possible to use the D-K iteration  
procedure with any MIMO design procedure (H2 for example).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 3.9: Hcontroller design. Step 9 in the enumerated procedure  
There is actually another possibility at step 5; numerical problems cause the iteration to  
diverge. As γ approaches its optimal value, the numerical properties of the calculation  
deteriorate. This may lead to mu(G i) increasing as i is increased. This problem is  
observed more often in systems with very lightly damped modes.  
A comparison of Figures 3.8 and 3.9 will show that Dsys i is not quite a rational  
approximation to D i. The reason is that Dsys i has as inputs, the lower outputs of P.  
These are actually passed through an identity for the design of the next controller: K j  
(with j = i+1). In other words,  
D i  
0
0
I
Dsys i ≈  
.
This identity is of dimension nmeas × nmeas and is the reason that nmeas and nctrls  
must be passed to the musynfit function. Do not confuse this identity with that  
corresponding to the last block in D i.  
3.7.3 Fitting D Scales  
The Xµ D-scale fitting function is musynfit; the syntax is as follows.  
[Dsys,Dinvsys] = musynfit(Dmagdata,blk,nmeas,nctrls,weight)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Both the D and D1 systems (Dsys and Dinvsys) are returned. The D scale  
(Dmagdata) comes from a µ calculation on a closed loop system. However, Dsys and  
Dinvsys are required to multiply the open loop system. They must therefore contain the  
identity matrices for the inputs and outputs which correspond to the measurements and  
controls. This information is not contained in blk and must be specified in the argument  
list: nmeas is the number of measurements and ncntrl is the number of controls. The  
user can specify a frequency domain weight for the fitting. The variable sens, returned  
from the mu function, is a good option.  
There are several choices of rational fitting functions available within musynfit. The  
D-scale input variables are magnitude data. Phase data, corresponding to a  
minimum-phase system is supplied with the Xµ function mkphase. The user has a choice  
of functions for the transfer function fitting: the Xmath function tfid and the Xµ  
function fitsys. The fitsys function is discussed in more detail in Section 3.7.3 below.  
For further information on tfid see the Xmath Basics Manual.  
There are several choices of graphical display available to help the user select the most  
appropriate fit. These are:  
1. The D-scale magnitude data and the last two transfer function fits are displayed.  
2. The D-scale magnitude data and the last two transfer function fits are displayed.  
An additional plot shows the weighting function.  
3. The D-scale magnitude data and the last two transfer function fits are displayed.  
An additional plot compares the µ upper bound (which uses the D-scale  
magnitude data) to the bound which would be obtained from a frequency response  
of the D-scale transfer function fit.  
In a problem with n perturbation blocks, there are n 1 D scales requiring fitting. This  
is because one can be chosen as the identity without loss of generality. The D scale for  
each block requires user interaction for the selection of the system order. The function  
fitsys is called to fit each D scale block. This is available to the user and is described  
in more detail below.  
Transfer Function Fitting Functions  
The underlying functions used for the fitting of each block of the D scale are described  
here as they may be of independent interest to the user. Other possible uses include  
Download from Www.Somanuals.com. All Manuals Search And Download.  
creating weights from data and simple system identification.  
Xµ provides two user callable functions for fitting SISO transfer functions to data. The  
first is mkphase calculates the phase corresponding to a minimum-phase stable system  
from magnitude data. This uses the complex cepstrum method described by Oppenheim  
and Schafer [80, p. 501] to generate the desired frequency response. The syntax of the  
function is given below.  
cdata = mkphase(magdata)  
The complex cepstrum method is used to generate the complex valued frequency  
response,cdata, of a SISO minimum-phase system with magnitude response magdata.  
The Xµ function fitsys fits a dynamic system to frequency domain data. The syntax is  
illustrated below.  
sys = fitsys(data,npoles,nzeros,weight)  
The number of poles and zeros in the system, sys, can be independently specified by the  
arguments npoles and nzeros. When called from musynfit these are always identical  
as an invertible system is required. This may not be appropriate for other applications  
of fitsys. For logscale frequency data a weight of 1/s is strongly recommended as this  
tends to balance the effects of high and low frequencies in the fit. In musynfit a 1/s  
weight is automatically applied and multiplies any other user specified weight.  
Chebyshev polynomials are used as basis functions for both the numerator and  
denominator polynomials. For further information see the work by Adcock [81]. The  
fitsys function is similar to the Xmath function tfid. The algorithm in fitsys has  
been fine-tuned for D-scale fitting and usually outperforms tfid in this application.  
We will now look at a simple design example using D-K iteration. The plant is a double  
integrator with an output perturbation. For more physically meaningful examples refer  
to Chapter 4.  
# The nominal plant is a double integrator.  
# A multiplicative perturbation weight reflects  
# increased uncertainty at high frequencies  
Download from Www.Somanuals.com. All Manuals Search And Download.  
plant = 1/makepoly([1,0,-0.01],"s")  
Wm = makepoly([1,20],"s")/makepoly([1,200],"s")  
omega = logspace(0.01,100,25)  
plantg = freq(plant,omega)  
Wmg = freq(Wm,omega)  
g1 = ctrlplot(plantg,{logmagplot});  
g1 = ctrlplot(Wmg,g1,{logmagplot,line style=4});  
g1 = plot(g1,{!grid,legend=["Open loop plant";...  
"multiplicative perturbation weight"]})?  
100  
10  
1
0.1  
0.01  
0.001  
0.0001  
Open loop plant  
multiplicative perturbation weight  
1e-05  
1e-06  
0.01  
0.1  
1
10  
100  
Frequency  
The open-loop system under consideration is illustrated in Figure 3.10.  
Figure 3.10: Open loop perturbation model  
# Now include some weights for performance:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Wperf = makepoly([0.01,1],"s")/makepoly([1,0.01],"s")  
Wact = 0.1* makepoly([1,1],"s")/makepoly([0.05,1],"s")  
Wnoise = 0.01  
Wref = makepoly([0.005,1],"s")/makepoly([0.05,1],"s")  
Wperfg = freq(Wperf,omega)  
Wactg = freq(Wact,omega)  
Wnoiseg = conpdm(Wnoise,omega)  
Wrefg = freq(Wref,omega)  
g2 = ctrlplot(Wperfg,{logmagplot});  
g2 = ctrlplot(Wactg,g2,{logmagplot,line style=3});  
g2 = ctrlplot(Wnoiseg,g2,{logmagplot,line style=4});  
g2 = ctrlplot(Wrefg,g2,{logmagplot,line style=5});  
g2 = plot(g2,{title="Performance Weights",y min=0.001,...  
legend=["tracking error";"actuator";...  
"noise";"reference input"],!grid})?  
Performance Weights  
100  
tracking error  
actuator  
noise  
reference input  
10  
1
0.1  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Set up a weighted interconnection structure for unity gain negative feedback. This  
includes the perturbation weight as well as those for the design performance objectives.  
A scalar multiplier is factored out of the perturbation. This is done to give a more  
interesting D-scale problem for this example.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
nms = ["plant";"Wm";"Wperf";"Wact";"Wnoise";"Wref"]  
inp = ["delt";"ref";"noise";"u"]  
outp = ["100*Wm"; "Wperf"; "Wact"; "Wref-0.01*delt-plant-Wnoise"]  
cnx = ["u"; "plant"; "Wref-0.01*delt-plant"; "u"; "noise"; "ref"]  
p = sysic(nms,inp,outp,cnx,plant,Wm,Wperf,Wact,Wnoise,Wref)  
The interconnection structure, p, is illustrated in Figure 3.11.  
Figure 3.11: Weighted interconnection structure, p  
# Perform an H infinity design.  
nmeas = 1  
ncntrls = 1  
gmin = 0  
# number of measurements  
# number of controls  
gmax = 100  
Kinf = hinfsyn(p,nmeas,ncntrls,[gmin;gmax])  
G = starp(p,Kinf)  
Gg = freq(G,omega)  
G11g = Gg(1,1)  
# weighted closed loop system  
G22g = Gg(2:3,2:3)  
rs = max(svd(G11g))  
np = max(svd(G22g))  
# robust stability  
# nominal performance  
Download from Www.Somanuals.com. All Manuals Search And Download.  
blk = [1,1; 2,2]  
[rpbnds1,D1,Dinv1,Delta1,sens1] = mu(Gg,blk)  
g3 = ctrlplot(np,{log});  
# plot on a log-linear scale  
g3 = ctrlplot(rs,g3,{log,line style=3});  
g3 = ctrlplot(rpbnds1,g3,{log,line style=[4,5]});  
g3 = plot(g3,{!grid,title="mu analysis",y lab="Magnitude",...  
legend=["nominal perf.";"robust stab.";...  
"robust perf.(upper)";"robust perf. (lower)"]})?  
mu analysis  
4
nominal perf.  
robust stab.  
robust perf.(upper)  
3
robust perf. (lower)  
2
1
0
0.01  
0.1  
1
10  
100  
# Fit transfer functions to D1 & Dinv1 for a mu  
# synthesis iteration  
[Ds,Dinvs] = musynfit(D1,blk,nmeas,ncntrls,sens1,{!plotweight})  
The following illustrates the musynfit screen display after selecting a 2nd order fit and  
then a 4th order fit.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
D scale fit, block: 1  
100  
Magnitude data  
Previous fit, order: 2  
New fit, order: 4  
10  
1
0.1  
0.01  
0.01  
0.1  
1
10  
100  
Frequency (Hz)  
# Apply the D scales to another H infinity design  
Kmu = hinfsyn(Ds*p*Dinvs,nmeas,ncntrls,[0;10])  
# Close the loop around the weighted interconnection  
# structure.  
Gmu = starp(p,Kmu) # weighted closed loop (2nd it.)  
omega = logspace(0.01,100,40)  
Gmug = freq(Gmu,omega)  
blk = [1,1; 2,2]  
[rpbnds2,D2,Dinv2,Delta2,sens2] = mu(Gmug,blk)  
# compare mu to the value from the previous iteration.  
g4 = ctrlplot(rpbnds2(1,1),{log});  
g4 = ctrlplot(rpbnds1(1,1),g4,{log,line style=4});  
g4 = plot(g4,{title="mu analysis of robust performance",...  
legend=["Kmu";"Kinf"],y lab="Magnitude",!grid})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mu analysis of robust performance  
4
3.5  
3
Kmu  
Kinf  
2.5  
2
1.5  
1
0.5  
0
0.01  
0.1  
1
10  
100  
3.7.4 Constructing Rational Perturbations  
For simulation purposes it is useful to be able to construct a rational approximation to  
the ∆ returned by the µ calculation. The approach is to choose a ∆ at a particular  
frequency, for example the one where µ is at a maximum, and obtain a MIMO system  
which has a frequency response (gain and phase) equal to ∆ at that frequency.  
The function for this purpose is function mkpert. The syntax is given below.  
pertsys = mkpert(Delta,blk,mubnds)  
This function takes as arguments the variables Delta, blk, and mubnds. The meaning of  
these is identical to the mu case. The frequency selected for the interpolation is that  
where the lower bound (in mubnds) is maximum. Alternatively the user can use  
keywords to specify a frequency at which to do the interpolation and specify the norm of  
the resulting pertsys. pertsys will be an all-pass system.  
Monte-Carlo simulation approaches require the ability to generate random perturbations  
having the correct block structure. The function for this purpose is randpert and its  
usage is illustrated below.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
pert = randpert(blk,{sys,sfreq,complex,pnorm})  
The user can specify whether the perturbation is a dynamic system or matrix, and  
whether it is real or complex valued, in addition to specifying the norm.  
3.7.5 Block Structured Norm Calculations  
It is possible to get an idea of the input/output combinations which are limiting the  
robust stability or robust performance of a system by examining the elements of the  
product, DMD1 at the critical frequency. Large values indicate a potential problem in  
the corresponding input/output pair. For systems with MIMO blocks this can be  
simplified to looking at the block norm of the matrix. This is done by partitioning up  
the matrix into blocks which correspond to the inputs and outputs of each block of ∆.  
Each partition is then replaced by the maximum singular value of the partition. In the  
case where all the ∆ blocks are 1 × 1 this reduces to the absolute value of the matrix. If  
there is only one ∆ block this is equivalent to calculating the maximum singular value of  
the matrix.  
The Xµ function for this purpose is called blknorm and its syntax is illustrated below.  
normM = blknorm(M,blk,p,{Frobenius})  
The user has the option of selecting other p norms (1 p ≤ ∞) or the Frobenius norm.  
The Euclidean norm is the most commonly used and is the default.  
3.8 Model Reduction  
The model reduction functions described here are often useful in obtaining a lower order  
realization of a controller. µ-synthesis controllers for complicated systems are often of  
high order. The controller order can often be significantly reduced with very little  
degradation in the closed loop performance.  
The user should be careful in reducing the order of an open-loop interconnection  
structure before doing a design. Very small changes in the interconnection structure can  
produce dramatic changes in the resulting closed loop system.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
A greater range of model reduction functions is available in the Model Reduction  
Module. Some of the functions described here are cross-licensed with that module.  
Section 2.6 describes the theory behind these functions.  
3.8.1 Truncation and Residualization  
Truncation is provided by the truncate function (cross-licensed with the Model  
Reduction Module). Residualization is performed with the Xµ function: sresidualize.  
The user must specify the original system and the number of states to be retained. In  
both cases the states in the upper left corner of the A matrix are retained.  
The following example illustrates the use of these functions and gives an idea of their  
error properties.  
# Create a five state system for reduction.  
a = daug(-0.891334,[-1.20857,0.799042;-0.799042,-1.20857],...  
-4.74685,-21.3013)  
b = [0.0262569;-0.189601;-0.113729;0.211465;-0.538239]  
c = [0.120725,-0.336942,0.397198,-0.700524,-1.02235]  
d = 0  
sys1 = system(a,b,c,d)  
# Reduce to a 3 state system by residualization  
# and truncation.  
sysout1 = sresidualize(sys1,3)  
sysout2 = truncate(sys1,3)  
fHz = logspace(0.01,100,100)  
sys1g = freq(sys1,fHz)  
sysout1g = freq(sysout1,fHz)  
sysout2g = freq(sysout2,fHz)  
residerror = sys1g - sysout1g  
truncerror = sys1g - sysout2g  
g1 = ctrlplot(sys1g,{logmagplot});  
g1 = ctrlplot(sysout1g,g1,{logmagplot,line style=2});  
Download from Www.Somanuals.com. All Manuals Search And Download.  
g1 = ctrlplot(sysout2g,g1,{logmagplot,line style=4});  
g1 = ctrlplot(residerror,g1,{logmagplot,line style=5});  
g1 = ctrlplot(truncerror,g1,{logmagplot,line style=6});  
g1 = plot(g1,{!grid,legend=["original system";...  
"residualized system";"truncated system";...  
"residualization error";"truncation error"]})?  
0.1  
0.01  
0.001  
original system  
residualized system  
truncated system  
residualization error  
0.0001  
truncation error  
1e-05  
0.01  
0.1  
1
10  
100  
Frequency  
3.8.2 Balanced Realizations  
The function balmoore (cross-licensed from the Model Reduction Module) produces a  
balanced realization and optionally truncates it. The can be used to obtain a balanced  
realization and the Hankel singular values without necessarily truncating the system.  
The following illustrates the use of the function using the same system as in the  
truncate and sresidualize example.  
# Balanced truncation.  
[sysout3,hsv] = balmoore(sys1,{nsr=3})  
sysout3g = freq(sysout3,fHz)  
balerr = sys1g - sysout3g  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Displaying the Hankel singular values shows which  
# states are close to unobservable and uncontrollable.  
hsv?  
hsv (a column vector) =  
0.0741834  
0.0726887  
0.0264105  
0.000146401  
2.7699e-07  
# Compare to the errors from the previous example.  
g2 = ctrlplot(sys1g,{logmagplot});  
g2 = ctrlplot(sysout3g,g2,{logmagplot,line style=2});  
g2 = ctrlplot(balerr,g2,{logmagplot,line style=4});  
g2 = ctrlplot(residerror,g2,{logmagplot,line style=5});  
g2 = ctrlplot(truncerror,g2,{logmagplot,line style=6});  
g2 = plot(g2,{!grid,legend=["original system";...  
"balanced truncation";"error: balmoore";...  
"error: sresidualize";"error: truncate"]})?  
0.1  
0.01  
0.001  
0.0001  
original system  
balanced truncation  
error: balmoore  
error: sresidualize  
error: truncate  
1e-05  
1e-06  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3.8.3 Hankel Singular Value Approximation  
The function ophank (also cross-licensed from the Model Reduction Module) is used to  
perform optimal Hankel norm approximation. Recall from Section 2.6.3 that there is an  
astable system achieving the lower bound. The unstable part of this system is returned  
as the second argument.  
The following applies the Hankel norm approximation technique to the previous  
example. The unstable part of the optimal approximation is sysout4u and the astable  
system, sysout4 + sysout4u would achieve the lower bound for the approximation  
error. The Hankel singular values can also be obtained by this function.  
# Optimal Hankel singular value approximation  
[sysout4,sysout4u,hsv] = ophank(sys1,{nsr=3})  
sysout4g = freq(sysout4,fHz)  
hankerr = sys1g - sysout4g  
# Compare to the errors from the previous example.  
g3 = ctrlplot(sys1g,{logmagplot});  
g3 = ctrlplot(sysout4g,g3,{logmagplot,line style=2});  
g3 = ctrlplot(hankerr,g3,{logmagplot,line style=6});  
g3 = ctrlplot(balerr,g3,{logmagplot,line style=4});  
g3 = ctrlplot(residerror,g3,{logmagplot,line style=5});  
g3 = plot(g3,{!grid,legend=["original system";...  
"Hankel norm approximation";"error: ophank";...  
"error: balmoore";"error: sresidualize"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0.1  
0.01  
0.001  
0.0001  
1e-05  
1e-06  
original system  
Hankel norm approximation  
error: ophank  
error: balmoore  
error: sresidualize  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 4  
Demonstration Examples  
4.1 The Himat Example  
The following demo can be run by executing the following Xmath command:  
execute file = "$XMATH/demos/xMu/himatdemo"  
4.1.1 Problem Description  
The Himat is a small scale remotely piloted aircraft built to investigate high  
maneuverability fighter aircraft design. The vehicle was flight tested in the late 1970s.  
The example studied here considers control of only the longitudinal dynamics. These are  
taken to be uncoupled from the lateral-direction dynamics. The nominal model and  
control objectives are described by Safonov et al. [82]. Further details can be found in  
the work by Hartman et al. [83] and Merkel et al. [84]. The vehicle is currently attached  
to the outside wall of the Museum of Science in Los Angeles.  
A four state rigid body model describes the dynamics. The states can be assigned the  
following physical meanings,  
127  
Download from Www.Somanuals.com. All Manuals Search And Download.  
δv Perturbations along the velocity vector.  
α Angle of attack. I.e. angle between the velocity vector and the aircraft’s longitudinal  
axis.  
q Rate-of-change of aircraft attitude angle.  
θ Aircraft attitude angle.  
Control can be exerted via the elevon and canard, denoted by δe and δc respectively.  
The angle of attack (α) and attitude angle (θ) are available as direct measurements.  
A weighted output disturbance rejection problem will be considered. This problem also  
encompasses other maneuvering objectives. The closed-loop perturbation model of the  
vehicle is illustrated in Figure 4.1.  
Figure 4.1: Himat open-loop perturbation model  
Note that Wp, Wdel, Himat and K are each two-input, two-output systems. Similarly,  
the inputs dist and pertin are two element vector signals. The desired result is the  
four-input, four-output system, denoted by clp, and shown in Figure 4.2. This is used in  
the design example given below.  
4.1.2 State-space Model of Himat  
The state space description of the Himat plane is given below. The states of the plant  
model are: forward speed (v), angle-of-attack (α), pitch rate (q) and pitch angle (θ).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 4.2: Interconnection structure for the himat design example  
The inputs are the elevon position and the canard position. The outputs that are to be  
kept small are angle-of-attack (α) and pitch angle (θ).  
The commands required to enter the state-space description are simply matrix  
assignments for each of A, B, C and D. Note that the states, inputs and outputs are  
named.  
a = [-0.0226, -36.6000, -18.9000, -32.1000;...  
0, -1.9000,  
0.0123, -11.7000, -2.6300,  
0.9830,  
0;...  
0;...  
0]  
0,  
0,  
1.0000,  
b = [  
0,  
0;...  
0;...  
-0.4140,  
-77.8000, 22.4000;...  
0,  
0]  
c = [0, 57.3000, 0,  
0;...  
0,  
0, 0, 57.3000]  
d = zeros(2,2)  
himat = system(a,b,c,d)  
comment himat "Himat vehicle state-space model"  
states = ["forward speed";"angle-of-attack";"pitch rate";"pitch  
angle"]  
inputs = ["elevon";"canard"]  
outputs = ["angle-of-attack";"pitch angle"]  
himat = system(himat,{stateNames=states,inputNames=inputs,...  
outputNames=outputs})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
himat (a state space system) =  
A
-0.0226  
0
0.0123  
0
-36.6  
-1.9  
-11.7  
0
-18.9  
0.983  
-2.63  
1
-32.1  
0
0
0
B
0
0
0
-0.414  
-77.8  
0
22.4  
0
C
0
0
57.3  
0
0
0
0
57.3  
D
0
0
0
0
X0  
0
0
0
0
State Names  
-----------  
forward speed  
angle-of-attack  
pitch rate  
pitch angle  
Input Names  
-----------  
elevon  
canard  
Output Names  
------------  
Download from Www.Somanuals.com. All Manuals Search And Download.  
angle-of-attack  
pitch angle  
System is continuous  
4.1.3 Creating a Weighted Interconnection Structure for Design  
The multiplicative input perturbation weight, Wdel, is constructed as a transfer function.  
The weight is,  
50(s + 100)  
(s + 10000)  
Wdel  
=
.
The output error weight, Wp, is created as,  
0.5(s + 3)  
(s + 0.03)  
Wp =  
.
This will be used as the performance weight. The appropriate commands are:  
wdel = makepoly([50,5000])/makepoly([1,10000])  
wp = makepoly([0.5,1.5])/makepoly([1,0.03])  
These can be displayed on a frequency response plot for comparison purposes.  
om1 = logspace(0.001,10000,100)  
wdelg = freq(wdel,om1)  
# frequency vector (Hz)  
comment wdelg "frequency response of wdel"  
wpg = freq(wp,om1)  
comment wpg "frequency response of wp"  
gph1 = ctrlplot([wdelg,wpg],{logmagplot});  
gph1 = plot(gph1,{title="Weights for HIMAT",!grid,...  
legend=["Perturbation weight";"Performance weight"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Weights for HIMAT  
100  
10  
1
Perturbation weight  
Performance weight  
0.1  
0.001  
0.01  
0.1  
1
10  
Frequency  
100  
1000  
10000  
The perturbation weight, Wdel, should actually be two-input, two-output. This is also  
true of the performance weight, Wp. In this example, we are weighting each performance  
channel identically. There is no requirement to do this and if we were more concerned  
with errors in α than errors in θ, then the appropriate channel would have a large weight  
applied. The function daug is used to make the 2×2 systems.  
wdel = daug(wdel,wdel)  
comment wdel "perturbation weight"  
wp = daug(wp,wp)  
comment wp "performance weight"  
The design interconnection structure is now created with the sysic function. The result  
is a state space system (8 states, 6 inputs and 6 outputs) called himat ic.  
The first two inputs and outputs correspond to the multiplicative perturbation block.  
Inputs and outputs 3 and 4 are the disturbance inputs & error outputs. The  
measurements going to the controller appear on outputs 5 & 6. The control actuation is  
put into the system on inputs 5 & 6.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sysn = ["himat";"wdel";"wp"]  
in = ["pert(2)";"dist(2)";"control(2)"]  
out = ["wdel";"wp";"himat + dist"]  
inter = ["control + pert"; "control"; "himat + dist"]  
himat ic = sysic(sysn,in,out,inter,himat,wdel,wp)  
comment himat ic "Himat design interconnection structure"  
4.1.4  
H
Design  
The next step is to design an H control law for Himat. The function hinfsyn designs  
an H control law based on the interconnection structure provided. hinfsyn requires  
the design interconnection structure, number of measurements, number of controls and  
single gamma or bisection bounds on γ.  
Optional input arguments are the tolerance for terminating the γ iteration (tol), an  
epsilon for Hamiltonian -axis eigenvalues (epr) and the epsilon for the Riccati  
solution positive definite tests (epp). Two Riccati solution methods are provided:  
eigenvalue or Schur (default) decomposition. hinfsyn returns the control law, k and the  
gamma value achieved, gf1.  
In this example, the system interconnection structure is himat ic, with 2 measurements,  
2 controls, a γ lower bisection bound of 0.8, a γ upper bisection bound of 6, a tolerance  
on the γ iteration of 0.05, and we’ll use the eigenvalue decomposition method to solve  
the Riccati equations. The default values of epr (0.5*sqrt(eps)) and epp (1e-6) will be  
used for the epsilon tests.  
gamma bounds = [0.8;6.0]  
nmeas = 2  
nctrls = 2  
# 2 measurements: attack angle & pitch  
# 2 controls: elevon & canard  
comment nmeas "number of controller measurements"  
comment nctrls "number of controller outputs"  
[k1,gf1] = hinfsyn(himat ic,nmeas,nctrls,gamma bounds,{tol=0.05})  
Test bounds:  
0.8000  
<
gamma <=  
6.0000  
Download from Www.Somanuals.com. All Manuals Search And Download.  
gamma  
6.000  
3.400  
2.100  
1.450  
1.775  
1.613  
1.694  
1.653  
Hx eig  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
X eig  
5.6e-05  
5.7e-05  
5.9e-05  
6.4e-05  
6.1e-05  
6.2e-05  
6.1e-05  
6.2e-05  
Hy eig  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
2.3e-02  
Y eig  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
nrho xy  
0.0626  
0.2020  
0.5798  
1.4678  
0.8652  
1.1028  
0.9725  
1.0343  
p/f  
p
p
p
f
p
f
p
f
Gamma value achieved:  
1.6938  
comment k1 "controller: iteration 1"  
comment gf1 "gamma value: iteration 1"  
g1 = starp(himat ic,k1)  
comment g1 "closed loop: iteration 1"  
An H control law has been designed which achieves an infinity norm of 1.6938 for the  
interconnection structure provided. First, we will examine aspects of the controller that  
was just designed, starting with the controller poles.  
rifd(k1)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-2.2609e-02  
-3.0000e-02  
-3.0000e-02  
-1.3833e+01  
-9.8959e+01  
-1.4712e+02  
-1.4712e+02  
-7.4256e+03  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
9.6846e+01  
-9.6846e+01  
0.0000e+00  
2.2609e-02  
3.0000e-02  
3.0000e-02  
1.3833e+01  
9.8959e+01  
1.7613e+02  
1.7613e+02  
7.4256e+03  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
0.8353  
0.8353  
1.0000  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-2.2516e-02  
-1.7226e+00  
-3.0272e+00  
-3.1034e+01  
-1.0000e+04  
-1.0000e+04  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
2.2516e-02  
1.7226e+00  
3.0272e+00  
3.1034e+01  
1.0000e+04  
1.0000e+04  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
Next, a magnitude plot of the frequency response of k1 is plotted to check that it looks  
reasonable.  
om2 = logspace(0.5,5000,25)  
k1 g = freq(k1,om2)  
comment k1 g "frequency response of k1"  
comment om2 "frequency vector (Hz)"  
gph2 = ctrlplot(k1 g,{bode});  
gph2 = plot(gph2,{title="Controller: k1"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Controller: k1  
1
0.1  
0.01  
0.001  
0.1  
1
10  
100  
1000  
10000  
Frequency  
200  
100  
0
-100  
-200  
-300  
0.1  
1
10  
100  
1000  
10000  
Frequency  
Onto the closed loop, first checking that it is stable by looking at the pole positions.  
rifd(g1)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
Download from Www.Somanuals.com. All Manuals Search And Download.  
-2.2517e-02  
-2.2600e-02  
-3.0000e-02  
-3.0000e-02  
-2.9369e+00  
-2.9974e+00  
-4.8310e+00  
-6.5876e+00  
-5.8350e+01  
-5.8350e+01  
-8.8792e+01  
-8.8792e+01  
-9.9778e+01  
-7.4258e+03  
-1.0000e+04  
-1.0000e+04  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
-5.6049e+01  
5.6049e+01  
-4.2881e+01  
4.2881e+01  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
2.2517e-02  
2.2600e-02  
3.0000e-02  
3.0000e-02  
2.9369e+00  
2.9974e+00  
4.8310e+00  
6.5876e+00  
8.0909e+01  
8.0909e+01  
9.8604e+01  
9.8604e+01  
9.9778e+01  
7.4258e+03  
1.0000e+04  
1.0000e+04  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
1.0000  
0.7212  
0.7212  
0.9005  
0.9005  
1.0000  
1.0000  
1.0000  
1.0000  
Zeros:  
ans (a scalar) =  
0
Now calculate a closed loop frequency response. This results in a 4x4 pdm: g1g  
g1g=freq(g1,om2)  
comment g1g "frequency response of g1"  
The singular values of the closed loop system are calculated. The maximum of the  
singular values over frequency is also calculated and compared to γ. As γ is a  
guaranteed upper bound on the infinity norm, this value should be less.  
g1gs = svd(g1g)  
comment g1gs "closed loop singular value: iteration 1"  
gph3 = ctrlplot(g1gs,{log});  
gph3 = plot(gph3,{!grid,...  
title="Singular value plot of the closed loop"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Singular value plot of the closed loop  
2
1.5  
1
0.5  
0
0.1  
1
10  
100  
1000  
10000  
4.1.5 µ Analysis of the H Controller  
The H control law can be analyzed using µ-analysis. The closed-loop system, g1, has 4  
inputs and 4 outputs. The first two inputs and outputs correspond to the uncertainty  
block, and the second two correspond to the disturbance rejection block, or performance  
block. Therefore, we can define the uncertainty inputs and outputs as a full 2×2  
uncertainty block and the disturbance rejection inputs and outputs as a full 2×2  
performance block. If the µ value for this control design is 1, then we are able to achieve  
robust performance for the set of defined weights and this control design.  
The mu function analyzes the robust performance and stability of the closed loop system.  
The syntax of the function is:  
[bnds,D,Dinv,Delta,sens] = mu(M,blk)  
The variable M is usually the frequency response of the closed loop system. blk defines  
the structure of the perturbations. In this example the block structure is two 2×2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
complex valued blocks.  
The upper and lower bounds of the µ function are returned in bnds. Also returned are  
the scaling matrices, D and Dinv, corresponding to the upper bound. The smallest  
destabilizing perturbation at each frequency is returned as Delta. The variable sens is  
the sensitivity of the upper bound to the D and Dinv scaling matrices. This will be  
useful as a weighting function for fitting transfer functions to the D and Dinv scaling  
blk = [2,2;2,2]  
[bnds1,D1,D1inv,Delta1,sens1] = mu(g1g,blk)  
comment blk "perturbation block structure"  
comment bnds1 "mu bounds: iteration 1"  
comment D1 "D scale: iteration 1"  
comment D1inv "D inverse scale: iteration 1"  
comment Delta1 "worst case perturbation: iteration 1"  
comment sens1 "D scale sensitivity: iteration 1"  
We plot the maximum singular value and µ on the same plot. The performance and  
stability specifications have been achieved if µ is less than one at all frequencies.  
gph4 = ctrlplot(g1gs(1,1),{log,line style=4});  
gph4 = ctrlplot(bnds1,gph4,{log,line style=[1,3]});  
gph4 = plot(gph4,{title="Max. singular value and mu comparison",...  
legend=["max. singular value";"mu upper bound";...  
"mu lower bound"],!grid})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Max. singular value and mu comparison  
1.8  
1.6  
1.4  
1.2  
1
max. singular value  
0.8  
0.6  
0.4  
mu upper bound  
mu lower bound  
0.1  
1
10  
100  
1000  
10000  
Note that µ(g1g) is not less than one at all frequencies — we have not met the design  
objectives. A D-K iteration will be used to lower µ and improve the robust performance  
with respect to these objectives.  
4.1.6 Fitting D-scales for the D-K Iteration  
In some cases the H controller is adequate for our purposes. It is not necessarily the  
controller which gives the best robust performance for our system — it essentially  
ignores the structure in the perturbations.  
The D-K iteration procedure using the D and Dinv scaling matrices in the µ calculation  
to set up an H problem which will usually give better robust performance.  
The first step is to pre and post multiply the interconnection, (himat ic in this case)  
with D and Dinv. Two things need to be done first. The D and Dinv matrices produced  
by µ are pdms and the interconnection is a state-space system. We must first fit transfer  
functions to the D and Dinv magnitude data before we can do the multiplication.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The second thing to note is that the interconnection structure has the additional control  
inputs and measurement outputs. The D and Dinv systems must be augmented with  
identities corresponding to these additional inputs and outputs.  
The musynfit function performs both of these operations. The syntax of musynfit is:  
[Dsys,Dinvsys] = musynfit(D,blk,nmeas,nctrls,sens,oldDsys)  
The variables D and sens come directly from the mu function. The block structure is  
specified by blk and nmeas and nctrls are the number of measurements and controls  
respectively.  
The outputs are the dynamic systems which approximate D and Dinv. The new scaled  
H
problem can be set up with  
new ic = Dsys * old ic * Dinvsys.  
D-K iteration involves iterating between calculating and fitting D-scales and designing  
controllers, K.  
If there are N blocks in the µ problem set up, then the D scale matrices have N 1  
different transfer functions that require fitting. The Nth transfer function is taken to be  
unity.  
We recommend choosing a 3rd order transfer function for the fit. This increases the  
number of states in the interconnection structure by 3*(size of block)*2. A different  
order can be chosen — which will lead to a slightly different controller in the subsequent  
analysis.  
Note that g1g is also passed to musynfit. This will provide the user with a comparison  
between the calculated upperbound and that based on the rational fit. This comparison  
is useful in deciding between fits of differing orders.  
[D1sys,D1invsys] = musynfit(D1,blk,nmeas,nctrls,sens1,g1g,{Hertz})  
Download from Www.Somanuals.com. All Manuals Search And Download.  
D scale fit, block: 1  
10  
1
Magnitude data  
Previous fit, order: 0  
New fit, order: 3  
0.1  
0.01  
0.1  
1
1
1
10  
100  
1000  
10000  
10000  
10000  
Frequency (Hz)  
Upper bound comparison, block: 1  
10  
Data based bound  
Previous fit bound, order: 0  
New fit bound, order: 3  
1
0.1  
0.1  
10  
100  
1000  
Frequency (Hz)  
D scale fit weight for block: 1  
10  
1
0.1  
0.01  
0.1  
10  
100  
1000  
Frequency (Hz)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
comment D1sys "system approx. to D1"  
comment D1invsys "system approx. to D1inv"  
4.1.7 Design Iteration #2  
The new D scales can be pre and post multiplied onto the orginal interconnection  
structure.  
himat ic2 = D1sys * himat ic * D1invsys  
[,,nx] = size(himat ic2)  
display "himat ic2 now has " + string(nx) + " states"  
himat ic2 now has 20 states  
comment himat ic2 "interconnection for iteration 2"  
Note the increase in states due to the inclusion of the D scales. A new H controller  
can now be designed.  
gamma bounds = [0.9,6.0]  
[k2,g2,gf2] = hinfsyn(himat ic2,nmeas,nctrls,...  
gamma bounds,{tol=0.05})  
Test bounds:  
gamma  
0.9000  
Hx eig X eig  
2.3e-02 -1.1e-09  
2.3e-02 -3.1e-12  
2.3e-02 -1.2e-08  
<
gamma <=  
Hy eig  
1.7000  
Y eig  
nrho xy  
0.3120  
0.6390  
1.1028  
0.8180  
0.9423  
1.0171  
p/f  
p
p
f
p
1.700  
1.300  
1.100  
1.200  
1.150  
1.125  
2.2e-02 -2.5e-27  
2.2e-02 -1.4e-29  
2.2e-02 -3.4e-22  
2.2e-02 -2.1e-15  
2.2e-02 -1.1e-15  
2.2e-02 -5.8e-31  
2.3e-02  
2.2e-14  
2.3e-02 -7.7e-10  
2.3e-02 -1.9e-08  
p
f
Gamma value achieved:  
1.1500  
comment k2 "controller: iteration 2"  
comment gf2 "gamma value: iteration 2"  
Note that we calculate the new closed loop using the original interconnection: himat ic.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
g2 = starp(himat ic,k2)  
comment g2 "closed loop: iteration 2"  
[,,nx] = size(k2)  
display "k2 now also has " + string(nx) + " states"  
k2 now also has 20 states  
This design probably resulted in a control law which achieved an infinity norm of  
approximately 1.1 for the new interconnection structure.  
k2 has been designed to reduce µ(g2). The singular values may actually get worse. We  
will see that this is the case here.  
The stability of g2 is examined with the function check. As used here, it will return a 1  
if it is stable and a zero if not. A frequency response is then calculated.  
check(g2,{stable})  
ans (a scalar) = 1  
g2g=freq(g2,om2)  
comment g2g "g2 frequency response"  
The µ analysis is repeated to assess the closed loop robust performance of the µ based  
controller (k2). The command format is identical to the last time.  
[bnds2,D2,D2inv,Delta2,sens2] = mu(g2g,blk)  
gph6 = ctrlplot(bnds2,{log,line style=[1,4]});  
gph6 = ctrlplot(bnds1,gph6,{log,line style=[3,5]});  
gph6 = plot(gph6,{title="Robustness analysis for the g2 system",...  
legend=["g2: mu upper bound";"g2: mu lower bound";...  
"g1: mu upper bound";"g1: mu lower bound"],!grid})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Robustness analysis for the g2 system  
1.8  
1.6  
1.4  
1.2  
1
g2: mu upper bound  
g2: mu lower bound  
g1: mu upper bound  
g1: mu lower bound  
0.8  
0.6  
0.4  
0.1  
1
10  
100  
1000  
10000  
comment bnds2 "mu bounds: iteration 2"  
comment D2 "D scale: iteration 2"  
comment D2inv "D inverse scale: iteration 2"  
comment Delta2 "worst case perturbation: iteration 2"  
comment sens2 "D scale sensitivity: iteration 2"  
Here we have only done a single D-K iteration. We are now much closer to the  
specifications although we still do not quite meet them. In practice several more  
iterations could be run to further improve the µ design. The next iteration would use  
the commands:  
[D2sys,D2invsys] = musynfit(D2,blk,nmeas,nctrls,sens2,g2g)  
himat ic3 = D2sys*himat ic*D2invsys  
k3 = hinfsyn(himat ic3,,nmeas,nctrls,gamma bounds,tol=0.05)  
and to analyze it we would use the commands:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
g3 = starp(himat ic,k3)  
g3g = freq(g3,omega)  
[bnds3,D3,D3inv,Delta3,sens3] = mu(g3g,blk)  
At this point we could do another iteration (to get k4) or perhaps run some simulations  
to check out k3 more thoroughly.  
4.1.8 Simulation Comparison with a Loopshaping Controller  
A loopshaping design is performed and compared to the H and µ designs. As the  
loopshaping design procedure is relatively standard, only the final controller is given  
here (klp).  
a =[-5.8928e-02,-6.3295e+00,-1.0440e+00,...  
-1.6190e-02, 1.8469e+00, 1.0405e-02;...  
-1.0283e+00,-1.5776e+03,-1.1900e+03,...  
-9.9924e+00, 1.7895e+01, 3.0329e+00;...  
1.0440e+00, 1.0146e+03,-4.2005e+01,...  
-1.0953e+00, 2.1755e+02, 9.9809e-01;...  
1.3287e-02, 9.6897e+00,-5.9979e-01,...  
-2.5448e-02, 1.3634e+01, 4.5286e-02;...  
6.4800e+00, 4.0284e+01,-5.9317e+02,...  
-1.5215e+01,-2.3726e+04,-8.1459e+01;...  
1.3057e-02,-4.0389e+00,-1.2179e+00,...  
-1.4332e-02,-5.3180e+01,-2.3590e-01]  
b =[1.2425e+00, -6.0707e-02; ...  
1.5602e+01, -6.9151e+01; ...  
-1.0002e+01, 5.5826e-01; ...  
-1.2752e-01, 1.1238e-01; ...  
-6.9355e+01, -1.4693e+01; ...  
-1.4459e-01 ,-1.2232e-01]  
c = [3.5741e-01,7.9890e-01,2.8247e+00,...  
8.7133e-02,-7.0893e+01,-1.7902e-01;...  
1.1915e+00,7.0885e+01,9.6107e+00,...  
1.4594e-01, 3.3669e-01,-6.1799e-02]  
Download from Www.Somanuals.com. All Manuals Search And Download.  
d = zeros(2,2)  
klp = system(a,b,c,d)  
comment klp "loop shape controller"  
We will compare the designs, with no error or uncertainty weights, for the nominal case  
and with a perturbation block of ∆ = [0.1,0;0,-0.1] for the input multiplicative  
perturbation.  
The time response will be from 0 to 2 seconds with a sample time of 0.01 seconds. We’ll  
look at a unit step input into the first channel.  
The unweighted closed loop system is now formed for each controller. The inputs and  
outputs to the perturbations are closed around a ∆ = 0 perturbation initially. This is  
equivalent to selecting the nominal inputs and outputs.  
sysnames = ["himat";"wdel"]  
invars = ["pert(2)"; "dist(2)"; "control(2)"]  
outvars = ["wdel"; "himat+dist"; "himat+dist"]  
connections = ["control + pert";"control"]  
gsim = sysic(sysnames,invars,outvars,connections,himat,wdel)  
comment gsim "unweighted interconnection"  
gsim mu = starp(gsim,k2)  
gsim hinf = starp(gsim,k1)  
gsim lp = starp(gsim,klp)  
comment gsim mu "closed loop system: mu ctrl"  
comment gsim hinf "closed loop system: hinf ctrl"  
comment gsim lp "closed loop system: klp ctrl"  
The nominal systems are studied first.  
gsim mu nom = gsim mu(3:4,3:4)  
gsim hinf nom = gsim hinf(3:4,3:4)  
gsim lp nom = gsim lp(3:4,3:4)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
comment gsim mu nom "nominal closed loop sys: mu ctrl"  
comment gsim hinf nom "nominal closed loop sys: hinf ctrl"  
comment gsim lp nom "nominal closed loop sys: klp ctrl"  
A step disturbance is introduced into the first channel.  
time = 0:2:0.01  
u = gstep(time)  
u = [u;0*u]  
# a unit step is the default  
# put zero into the other channel  
comment u "simulation input"  
y mu nom = gsim mu nom*u  
y hinf nom = gsim hinf nom*u  
y lp nom = gsim lp nom*u  
comment y mu nom "nominal response: mu ctrl"  
comment y hinf nom "nominal response: hinf ctrl"  
comment y lp nom "nominal response: klp ctrl"  
All controllers perform well on the nominal system. This can be seen by plotting the  
time histories of each.  
gph7 = plot(y mu nom,{rows=3,row=1,grid,...  
title="Kmu step dist. response (nominal)",...  
x lab="time",y max=1.5,y min=-1});  
gph7 = plot(y hinf nom,gph7,{row=2,grid,...  
title="Kinf step dist. response (nominal)",...  
x lab="time",y max=1.5,y min=-1});  
gph7 = plot(y lp nom,gph7,{row=3,grid,...  
title="Klp step dist. response: (nominal)",...  
x lab="time",y max=1.5,y min=-1})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kmu step dist. response (nominal)  
1.5  
1
0.5  
0
-0.5  
-1  
0
0
0
0.5  
0.5  
0.5  
1
1.5  
1.5  
1.5  
2
2
2
time  
Kinf step dist. response (nominal)  
1.5  
1
0.5  
0
-0.5  
-1  
1
time  
Klp step dist. response: (nominal)  
1.5  
1
0.5  
0
-0.5  
-1  
1
time  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The loopshaping design gives a decoupled response. Both the Hand µ designs trade  
decoupling for speed of response and, as we shall see, robustness with respect to  
perturbations.  
The simulation is repeated with a perturbation of size 0.1. Note that this is only 10% of  
the size perturbation that we were analyzing and designing for in the above.  
delta = [.1,0;0,-0.1]  
comment delta "example perturbation"  
gsim mu pert = starp(delta,gsim mu)  
gsim hinf pert = starp(delta,gsim hinf)  
gsim lp pert = starp(delta,gsim lp)  
comment gsim mu pert "perturbed closed loop sys: mu ctrl"  
comment gsim hinf pert "perturbed closed loop sys: hinf ctrl"  
comment gsim lp pert "perturbed closed loop sys: klp ctrl"  
y mu pert = gsim mu pert*u  
y hinf pert = gsim hinf pert*u  
y lp pert = gsim lp pert*u  
comment y mu pert "perturbed response: mu ctrl"  
comment y hinf pert "perturbed response: hinf ctrl"  
comment y lp pert "perturbed response: klp ctrl"  
The loop shaping controller performs poorly on the perturbed system. Again the time  
response of each system is plotted.  
gph8 = plot(y mu pert,{rows=3,row=1,grid,...  
title="Kmu step dist. response (perturbed)",...  
x lab="time",y max=1.5,y min=-1});  
gph8 = plot(y hinf pert,gph8,{row=2,grid,...  
title="Kinf step dist. response (perturbed)",...  
x lab="time",y max=1.5,y min=-1});  
gph8 = plot(y lp pert,gph8,{row=3,grid,...  
title="Klp step dist. response: (perturbed)",...  
x lab="time",y max=1.5,y min=-1})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kmu step dist. response (perturbed)  
1.5  
1
0.5  
0
-0.5  
-1  
0
0
0
0.5  
0.5  
0.5  
1
1.5  
1.5  
1.5  
2
2
2
time  
Kinf step dist. response (perturbed)  
1.5  
1
0.5  
0
-0.5  
-1  
1
time  
Klp step dist. response: (perturbed)  
1.5  
1
0.5  
0
-0.5  
-1  
1
time  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The loopshaping controller had good nominal performance and very poor robust  
performance. This was illustrated with a relatively small perturbation. The difference  
between the µ and H controllers was small in both the nominal and perturbed cases.  
This may not always be the case for several reasons.  
Only a single D-K iteration was performed here. Further iterations would further  
improve the performance of the µ controller.  
The perturbation chosen for the above simulation was not the worst case one. Note that  
here, each of the three closed loop systems will have a different worst case perturbation.  
To find these, perform a µ calculation on each closed loop system and use mkpert to  
construct the appropriate perturbations.  
The theoretical measure of performance is the H norm of the closed loop transfer  
function. When assessing different controllers by simulation we are applying additional,  
unformalized performance measures.  
In this case, the performance and perturbation channels were about equally scaled. The  
resulting D-scales were within an order of magnitude of unity. Choosing a different set  
of units for α and/or θ would change the H norm of the result without changing µ. A  
poor choice of engineering units could therefore lead to a larger difference between the  
H
controller and the µ controller.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.2 A Simple Flexible Structure Example  
The demonstration script, jplphBdemo.ms, runs through a D-K iteration design for a  
simple flexible structure problem.  
The following demo can be run by executing the following Xmath command:  
execute file = "$XMATH/demos/xMu/jplphBdemo"  
where $XMATH is the path to your Xmath source location.  
The problem comes from an experiment in the NASA Control Structures Interaction  
(CSI) program and is located at the Jet Propulsion Laboratory. A more complete  
description is given by Spanos et al. [85, 86, 87].  
The problem involves controlling the length of a laser path which reflects off of a series  
of mirrors mounted on a flexible structure. One measurement is available to the  
controller: the pathlength. There are two actuators, a voice coil and a piezo-electric,  
each driving a mirror in the path. These actuators are effectively in parallel at the same  
point. They differ significantly in their characteristics and uncertainty descriptions.  
This is a relatively simple problem and the user should be able to achieve similar results  
through standard classical techniques. The code given here serves as a suitable template  
for user written design scripts. It should be noted that a large number of frequency  
points are used in this design — perhaps more than necessary — and this significantly  
slows down the calculation of µ.  
4.2.1 The Control Design Problem  
The optical configuration is illustrated schematically in Figure 4.3. The laser system  
consists of a laser and optical interferometer. It is mounted on a fixed optical bench.  
The laser is directed to the actuated mirrors mounted on the flexible structure. The  
path continues back to the optical bench where it hits a target mirror and reflects back  
through the structure mirrors to the interferometer. The interferometer gives a  
measurement of the optical pathlength to an accuracy of 2.5 nm.  
Vibrations in the flexible structure affect the optical pathlength and the objective is to  
maintain a constant pathlength in the presence of such vibrations. Complicating the  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figure 4.3: Schematic diagram of the JPL Phase B optical testbed design problem  
problem is the fact that the voice-coil mirror assembly has significant mass and its  
movement excites a mode in the structure. An identically driven counterbalance  
effectively makes the piezo-electric actuator reactionless.  
The closed loop design problem is illustrated in Figure 4.4.  
Figure 4.4: JPL Phase B closed loop optical control configuration  
We now construct a model of the voice-coil mirror actuator, vcmodel. This model has  
been obtained from identification experiments. Note that it has an oscillatory pole pair  
at a frequency very close to an oscillatory zero pair.  
vcmodel1 = makepoly([1,.056309,1162.8],"s")/...  
makepoly([1,.78756,1189.1],"s")  
vcmodel2 = -252861.0/makepoly([1,1.0936,19.673],"s")  
vcmodel = vcmodel1*vcmodel2  
delete vcmodel1 vcmodel2  
size(vcmodel)?  
ans (a row vector) =  
1
1
4
In the frequency range of interest the piezo mirror driver can nominally be modeled as a  
Download from Www.Somanuals.com. All Manuals Search And Download.  
static gain. We will include some dynamic uncertainty in the actual design.  
piezo = 1  
4.2.2 Creating the Weighted Design Interconnection Structure  
The weighted, open-loop design interconnection structure is illustrated in Figure 4.5.  
For clarity, the two perturbations, ∆1 and ∆2, have been shown inside the structure. We  
have included perturbation models for both the actuators, involving the weights  
Wavoice, Wmvoice and Wmpiezo.  
In addition there is an error performance weight, Wperf, and two actuator penalties,  
Wactv and Wactp. The relative sizes of the noise and disturbance inputs are specified by  
the weights Wnoise and Wdist respectively.  
Figure 4.5: Weighted open-loop interconnection structure for the JPL Phase B optical  
design problem  
The voice coil additive weight, Wavoice, is simply a constant. Because the nominal voice  
coil model rolls off at 40db/decade this weight indicates significant gain and phase  
uncertainty for the frequencies where |Wavoice| > |vcmodel|.  
Wavoice = 1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The additive weight clearly provides for significant high frequency uncertainty. A  
multiplicative weight models the low frequency uncertainty. The value selected is  
somewhat arbitrary and can be considered as a tunable design weight.  
Wmvoice = 0.1  
A multiplicative perturbation is used to model uncertainty in the piezo driver.  
Experimental observations suggest a 5% deviation from nominal across the frequency  
range of interest.  
Wmpiezo = 0.05  
Wdist is a weight for disturbances on the flexible structure. The magnitude of this has  
been estimated by comparing experimental disturbance responses to the voice coil  
system response. This weight can also be considered as a variable in the design problem.  
Increasing the weight will place more emphasis on disturbance rejection in the final  
design.  
Wdist = 0.01  
The noise weight, Wnoise is selected based on what is necessary to achieve a final  
resolution of 10nm.  
Wnoise = 0.005  
The performance weight, Wperf is used to specify system performance up to 80 Hz. We  
use a 2nd order Butterworth filter to roll off at frequencies beyond 80 Hz.  
Wperf = butterworth(2,{Fc=80,dT=0})  
There are actuator penalties for the piezo driver, Wactp, and the voice coil driver, Wactv  
.
The piezo seems to have usable bandwidth out to about 400 Hz. We use a first order roll  
up, starting at 100 Hz. to penalize higher frequency actuation. The piezo penalty is set  
at about 200 times greater than the voice coil penalty. This is because the piezo  
actuator will saturate at 30 micrometers and the voice coil saturates at 6 mm.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
F = 100  
Wactp = makepoly([1/(2*pi*F),1],"s")/...  
makepoly([1/(200*pi*F),1],"s")  
Wactp = Wactp*4  
The lower frequency response of the voice-coil system means that the Wactv weight  
should begin rolling up at around 10 Hz.  
F = 10  
Wactv = makepoly([1/(2*pi*F),1],"s")/...  
makepoly([1/(200*pi*F),1],"s")  
Wactv = Wactv*0.02  
Both of these weights can be adjusted to trade between the relative responses from the  
voice-coil and the piezo. This should be done after examining simulations, or  
experimental closed loop data.  
The weights are concatenated together for easier display.  
weights = [Wperf;Wavoice;Wmvoice;Wmpiezo;Wdist;Wnoise;Wactp;Wactv]  
We now construct the weighted design interconnection structure using sysic.  
ssnames = ["vcmodel"; "Wavoice"; "Wmvoice"; "Wmpiezo";...  
"Wdist"; "Wnoise"; "Wperf"; "Wactp"; "Wactv"; "piezo"]  
inps = ["d1i"; "d2i"; "dist"; "noise"; "vact"; "pact"]  
ops = ["Wavoice";"Wmvoice";"Wmpiezo";"Wperf";"Wactv";"Wactp";...  
"d1i + vcmodel + d2i + piezo + Wnoise"]  
cnx = ["Wdist + vact"; "Wdist + vact"; "vcmodel"; "piezo";...  
"dist"; "noise"; "d1i + vcmodel + d2i + piezo + Wnoise";...  
"pact"; "vact"; "pact"]  
P = sysic(ssnames,inps,ops,cnx,vcmodel,Wavoice,Wmvoice,Wmpiezo,...  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Wdist,Wnoise,Wperf,Wactp,Wactv,piezo)  
size(P)?  
ans (a row vector) =  
7
6
8
Now select a frequency grid for calculating the frequency responses. Some additional  
points are included near the oscillatory modes.  
omega = logspace(1,1000,15)’  
omega = sort([omega; [5.275:0.05:5.625]’; [4.5:0.25:6.5]’])’  
Examine the frequency response of the open-loop system.  
vcmodelg = freq(vcmodel,omega)  
gph1 = ctrlplot(vcmodelg,bode);  
gph1 = plot(gph1,{title="voice coil model",!grid})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
voice coil model  
100000  
10000  
1000  
100  
10  
1
0.1  
0.01  
0.001  
1
10  
100  
1000  
Frequency  
100  
80  
60  
40  
20  
0
-20  
-40  
1
10  
100  
1000  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
And examine the design weights.  
weightsg = freq(weights,omega)  
gph2 = ctrlplot(weightsg,{logmagplot});  
gph2 = plot(gph2,legend=["Wperf";"Wavoice";"Wmvoice";...  
"Wmpiezo";"Wdist";"Wnoise";"Wactp";"Wactv"],...  
title="Design weights",!grid)?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Design weights  
100  
Wperf  
Wavoice  
Wmvoice  
Wmpiezo  
Wdist  
Wnoise  
Wactp  
10  
Wactv  
1
0.1  
0.01  
0.001  
1
10  
100  
1000  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.2.3 Design of an HController  
An Hdesign is now performed. Recall that we have one interferometer measurement  
and two controller outputs.  
nmeas = 1  
ncon = 2  
glimits = [0;20]  
[Khinf,gamma] = hinfsyn(P,nmeas,ncon,glimits,{tol=0.25})  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
20.0000  
Y eig  
Hx eig  
X eig  
nrho xy  
0.0007  
0.0026  
0.0109  
0.0487  
0.4059  
p/f  
20.000  
10.000  
5.000  
2.500  
1.250  
2.8e-02  
2.8e-02  
2.8e-02  
2.8e-02  
2.8e-02  
3.1e-07  
3.1e-07  
3.1e-07  
3.1e-07  
3.1e-07  
2.8e-01 -6.5e-17  
2.8e-01 -4.5e-17  
2.8e-01 -1.7e-16  
2.8e-01  
2.8e-01 -1.6e-16  
p
p
p
p
p
0.0e+00  
0.625  
0.938  
1.094  
1.172  
2.5e-07 *******  
2.8e-02 -1.9e+06  
2.8e-01 -2.2e-16 *******  
f
2.8e-01 -1.6e-16  
2.8e-01 -1.9e-16  
1.7198  
1.0727  
0.5933  
f
f
p
2.8e-02  
2.8e-02  
3.1e-07  
3.1e-07  
2.8e-01  
0.0e+00  
Gamma value achieved:  
1.1719  
Now form the closed loop and check the pole positions. As expected, it is stable.  
Ghinf = starp(P,Khinf)  
rifd(Ghinf)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-2.8248e-02  
-2.8248e-02  
-2.7911e-01  
-2.7911e-01  
-2.9727e+01  
-2.9727e+01  
3.4100e+01  
-3.4100e+01  
3.4212e+01  
-3.4212e+01  
-3.0010e+01  
3.0010e+01  
3.4100e+01  
3.4100e+01  
3.4213e+01  
3.4213e+01  
4.2241e+01  
4.2241e+01  
0.0008  
0.0008  
0.0082  
0.0082  
0.7038  
0.7038  
Download from Www.Somanuals.com. All Manuals Search And Download.  
-3.5543e+02  
-3.5543e+02  
-6.4598e+02  
-6.4598e+02  
-3.8358e+02  
-3.8358e+02  
-1.6934e+03  
-2.8107e+03  
-6.2832e+03  
-6.2832e+04  
-3.5543e+02  
3.5543e+02  
-3.3537e+01  
3.3537e+01  
-5.3777e+02  
5.3777e+02  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
5.0265e+02  
5.0265e+02  
6.4685e+02  
6.4685e+02  
6.6055e+02  
6.6055e+02  
1.6934e+03  
2.8107e+03  
6.2832e+03  
6.2832e+04  
0.7071  
0.7071  
0.9987  
0.9987  
0.5807  
0.5807  
1.0000  
1.0000  
1.0000  
1.0000  
Zeros:  
We can also look at the controller poles. It turns out that our controller is stable.  
rifd(Khinf)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-2.8002e-02  
-2.8002e-02  
-3.5543e+02  
-3.5543e+02  
-6.4828e+02  
-1.1873e+03  
-1.1873e+03  
-2.8870e+03  
3.4100e+01  
-3.4100e+01  
-3.5543e+02  
3.5543e+02  
0.0000e+00  
-3.0188e+02  
3.0188e+02  
0.0000e+00  
3.4100e+01  
3.4100e+01  
5.0265e+02  
5.0265e+02  
6.4828e+02  
1.2251e+03  
1.2251e+03  
2.8870e+03  
0.0008  
0.0008  
0.7071  
0.7071  
1.0000  
0.9692  
0.9692  
1.0000  
Zeros:  
We also look at a frequency response of the controller. Recall that it is single-input,  
two-output.  
Khinfg = freq(Khinf,omega);  
gph3 = ctrlplot(Khinfg,{bode});  
gph3 = plot(gph3,{title="Controller: Khinf"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Controller: Khinf  
1
0.1  
0.01  
0.001  
0.0001  
1
10  
100  
1000  
Frequency  
200  
150  
100  
50  
0
-50  
-100  
1
10  
100  
1000  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.2.4 Robustness Analysis  
The block structure has two perturbation ∆ blocks and a “performance” block. The two  
voice-coil perturbations are put into a single 1×2 block as they enter the system at the  
same point. Note that this is not identical to two separate blocks — for example a  
perturbation in which both blocks have magnitude one is now longer included. The  
advantage of doing this is that it give one less block in the resulting analysis and design  
problem. This makes the µ calculation easier (we now have three blocks and so the  
upper bound is actually equal to µ) and gives one less D-scale to be approximated in the  
D-K iteration.  
blk = [1,2; 1,1; 2,3]  
The frequency response of the closed loop system is calculated. The nominal  
performance test simply involves checking the Hnorm of the nominal closed loop  
system. This is a maximum singular value test.  
Ghinfg = freq(Ghinf,omega);  
npbnds = norm(svd(Ghinfg(4:6,3:4)),inf)  
Robust stability is a µ test as there are two pertubation blocks. Note that here we  
calculate µ with respect to the G11 partition and use a block structure containing only  
the perturbation blocks.  
[rsbnds,Drs,Drsinv,Deltars,sensrs] = mu(Ghinfg(1:3,1:2),[1,2; 1,1])  
Robust performance is a µ test on the entire G matrix.  
[rpbnds,D,Dinv,Delta,sens] = mu(Ghinfg,blk)  
These results are plotted. Note that µ tests give bounds and in this case the upper and  
lower bounds are almost indistinguishable.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph4 = ctrlplot(npbnds,{log,line style=4});  
gph4 = ctrlplot(rsbnds,gph4,{log,line style=[3,5]});  
gph4 = ctrlplot(rpbnds,gph4,{log,line style=[1,2]});  
gph4 = plot(gph4,{!grid,legend=["Nom perf";"Rob stab (up bnd)";...  
"Rob stab (lw bnd)"; "Rob perf (up bnd)";...  
"Rob perf (lw bnd)"],title="mu analysis of Ghinf"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
perturbed closed loop: vc actuator  
0.015  
0.01  
Khinf  
Kmu  
0.005  
0
-0.005  
-0.01  
-0.015  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.2.5 D-K Iteration  
We will now perform one D-K iteration to generate the controller Kmu. Significant  
robustness and performance improvement is achieved with only one iteration.  
Transfer functions are fit to the D-scales from the previous robust performance µ test.  
Here we preselect an order of 2 for each D-scale. This has been found to give a  
satisfactory result.  
[Dsys,Dinvsys] = musynfit(D,blk,nmeas,ncon,sens,[],2)  
Now a new weighted interconnection is formed by pre- and post-multiplying by the  
D-scale approximations. A second Hdesign is performed to get Kmu.  
Pd = Dsys*P*Dinvsys  
glimits = [0;20]  
Kmu = hinfsyn(Pd,nmeas,ncon,glimits,{tol=0.1,epr=1e-10,epp=1e-4})  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
20.0000  
Y eig  
Hx eig  
X eig  
nrho xy  
0.0001  
0.0006  
0.0022  
0.0090  
0.0364  
0.1518  
0.7425  
p/f  
20.000  
10.000  
5.000  
2.500  
1.250  
0.625  
0.312  
0.156  
0.234  
2.9e-02  
2.9e-02  
2.9e-02  
2.9e-02  
2.9e-02  
2.8e-02  
2.8e-02  
3.5e-10  
3.3e-10  
3.7e-10  
3.1e-10  
3.6e-10  
3.4e-10  
3.8e-10  
1.2e-01 -1.2e-15  
1.2e-01 -3.8e-16  
1.2e-01 -3.7e-16  
1.2e-01 -3.7e-16  
1.2e-01 -1.8e-15  
1.2e-01 -2.1e-16  
1.2e-01 -2.2e-29  
p
p
p
p
p
p
p
f
f
f
p
2.1e-02 -4.3e+06  
1.5e-01 -2.2e-17 18.9961  
2.6e-02  
2.7e-02  
2.7e-02  
3.6e-10  
3.8e-10  
3.9e-10  
1.3e-01 -2.3e-16  
1.2e-01 -9.8e-17  
1.2e-01 -1.9e-16  
1.7666  
1.0735  
0.8828  
0.273  
0.293  
Gamma value achieved:  
0.2930  
Note that this value of γ is significantly lower than even the µ value from the Ghinf  
closed loop system. Again, both the controller and closed loop system are stable.  
A frequency response of Kmu is calculated and plotted.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kmug = freq(Kmu,omega)  
gph5 = ctrlplot(Kmug,{bode});  
gph5 = plot(gph5,{title="Controller: Kmu"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Controller: Kmu  
1
0.1  
0.01  
0.001  
0.0001  
1
10  
100  
1000  
Frequency  
200  
150  
100  
50  
0
-50  
-100  
1
10  
100  
1000  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
We now examine the robustness properties of the new closed loop system. We already  
know that the robust performance test will be less than the γ value from the H∞  
synthesis above (in this case 0.2930). The results are again displayed graphically.  
Gmug = freq(Gmu,omega)  
npbnds = norm(svd(Gmug(4:6,3:4)),inf)  
[rsbnds,Drs,Drsinv,Deltars,sensrs] = mu(Gmug(1:3,1:2),[1,2; 1,1])  
[rpbnds,D,Dinv,Delta,sens] = mu(Gmug,blk)  
gph6 = ctrlplot(npbnds,{log,line style=4});  
gph6 = ctrlplot(rsbnds,gph6,{log,line style=[3,5]});  
gph6 = ctrlplot(rpbnds,gph6,{log,line style=[1,2]});  
gph6 = plot(gph6,{!grid,legend=["Nom perf";"Rob stab (up bnd)";...  
"Rob stab (lw bnd)"; "Rob perf (up bnd)";...  
"Rob perf (lw bnd)"],title="mu analysis of Gmu"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mu analysis of Gmu  
0.3  
0.25  
0.2  
0.15  
Nom perf  
Rob stab (up bnd)  
Rob stab (lw bnd)  
Rob perf (up bnd)  
Rob perf (lw bnd)  
0.1  
0.05  
0
1
10  
100  
1000  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4.2.6 A Simulation Study  
Now the two controllers (Khinf and Kmu) are studied by simulation. An unweighted  
interconnection is set up with sysic and starp is used to close the loop for each  
controller.  
ssnames = ["vcmodel"; "Wavoice"; "Wmvoice"; "Wmpiezo"; "piezo"]  
inps = ["d1i"; "d2i"; "dist"; "noise"; "vact"; "pact"]  
ops = ["Wavoice"; "Wmvoice"; "Wmpiezo";...  
"d1i + vcmodel + d2i + piezo + noise"; "vact"; "pact";...  
"d1i + vcmodel + d2i + piezo + noise"]  
cnx = ["dist + vact"; "dist + vact"; "vcmodel"; "piezo"; "pact"]  
Pnom =  
sysic(ssnames,inps,ops,cnx,vcmodel,Wavoice,Wmvoice,Wmpiezo,piezo)  
Random inputs are created for the noise and structure disturbances. Both are normally  
distributed. These are passed through their respective performance weights to give  
signals of the appropriate size (and if necessary frequency content). Both signals are  
plotted.  
u1 = randpdm(400,1,1,{Dlast=2,regular,zeromean})  
u2 = randpdm(400,1,1,{Dlast=2,regular,zeromean})  
u = [Wdist*u1; Wnoise*u2]  
gph7 = ctrlplot(u(1,1));  
gph7 = plot(gph7,{title="Simulation: disturbance"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Simulation: disturbance  
0.006  
0.004  
0.002  
0
-0.002  
-0.004  
-0.006  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph8 = ctrlplot(u(2,1));  
gph8 = plot(gph8,{title="Simulation: noise",...  
y lab="micrometers"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Simulation: noise  
0.003  
0.002  
0.001  
0
-0.001  
-0.002  
-0.003  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
A nominal response is calculated by setting ∆ = 0. To get the open-loop simulation  
model we close the unweighted interconnection structure with a controller equal to zero.  
deltazero = zeros(2,3)  
Kzero = zeros(2,1)  
nomolp = starp(deltazero,Pnom)  
nomolp = starp(nomolp,Kzero)  
yolp = nomolp*u  
gph9 = ctrlplot(yolp(1,1));  
gph9 = plot(gph9,{title="open loop beam length",...  
y lab="micrometers"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
open loop beam length  
10  
5
0
-5  
-10  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
Now we consider the closed-loop nominal response with Khinf and Kmu. The closed-loop  
system happens to have a large number of high frequency poles which do not contribute  
significantly to the response. They have the effect of forcing a very fine time  
discretization in the simulation, resulting in a long calculation time. We remove all poles  
of frequency greater than 100 rad/sec. by residualization. This is not intended as a  
general procedure — in some situations the high frequency behavior will be significant.  
nomclp = starp(deltazero,Pnom)  
nomclphinf = starp(nomclp,Khinf)  
nomclpmu = starp(nomclp,Kmu)  
fmax = 100;  
nlfpoles = sum(abs(poles(nomclphinf))<fmax)  
str = "Residualizing closed loop system to " + ...  
string(nlfpoles)+" states"  
display(str)  
Residualizing closed loop system to 6 states  
nsysclphinf = modalstate(nomclphinf)  
nsysclphinf = sresidualize(nsysclphinf,nlfpoles)  
nlfpoles = sum(abs(poles(nomclpmu))<fmax)  
nsysclpmu = modalstate(nomclpmu)  
nsysclpmu = sresidualize(nsysclpmu,nlfpoles)  
The closed-loop responses are calculated and plotted.  
yclphinf = nsysclphinf*u  
yclpmu = nsysclpmu*u  
gph10 = ctrlplot(yclphinf(1,1));  
gph10 = ctrlplot(yclpmu(1,1),gph10);  
gph10 = plot(gph10,{legend=["Khinf";"Kmu"],...  
title="closed loop beam length",...  
y lab="micrometers"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
closed loop beam length  
0.4  
0.3  
0.2  
0.1  
0
Khinf  
Kmu  
-0.1  
-0.2  
-0.3  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph11 = ctrlplot(yclphinf(2,1));  
gph11 = ctrlplot(yclpmu(2,1),gph11);  
gph11 = plot(gph11,{legend=["Khinf";"Kmu"],...  
title="closed loop: vc actuator"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
closed loop: vc actuator  
0.015  
0.01  
Khinf  
Kmu  
0.005  
0
-0.005  
-0.01  
-0.015  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph12 = ctrlplot(yclphinf(3,1));  
gph12 = ctrlplot(yclpmu(3,1),gph12);  
gph12 = plot(gph12,{legend=["Khinf";"Kmu"],...  
title="closed loop: piezo actuator"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
closed loop: piezo actuator  
0.03  
0.02  
0.01  
0
Khinf  
Kmu  
-0.01  
-0.02  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
Note that Kmu achieves better performance at the expense of greater actuator effort.  
We will now repeat this simulation for a perturbed system. A bad ∆ is chosen and  
scaled to have norm 0.5. This is obtained from destabilizing ∆ calculated for the µ lower  
bound. An all-pass system is fitted to ∆ at one frequency to create a real-rational  
perturbation. The frequency selected is that where µ is at its maximum. In this case we  
choose the ∆ that comes from the robust stability µ test. This gives the perturbation  
which comes closest to destabilizing the closed loop system. Using ∆ from the robust  
performance test would allow us to create a perturbation which minimizes the robust  
performance of the closed loop system.  
Here we use the worst-case ∆ for Kmu. This is almost certainly not the worst-case ∆ for  
Khinf. Again, the closed loop systems are residualized prior to calculating the responses.  
deltabad = mkpert(Deltars,blk(1:2,1:2),rsbnds,{pnorm=0.5})  
badclp = starp(deltabad,Pnom)  
badclphinf = starp(badclp,Khinf)  
badclpmu = starp(badclp,Kmu)  
nlfpoles = sum(abs(poles(badclphinf))<fmax)  
str = "Residualizing closed loop system to "+...  
string(nlfpoles)+" states"  
display(str)  
Residualizing closed loop system to 6 states  
nbclphinf = modalstate(badclphinf)  
nbclphinf = sresidualize(nbclphinf,nlfpoles)  
nlfpoles = sum(abs(poles(badclpmu))<fmax)  
nbclpmu = modalstate(badclpmu)  
nbclpmu = sresidualize(nbclpmu,nlfpoles)  
The responses are calculated and plotted.  
ybclphinf = nbclphinf*u  
ybclpmu = nbclpmu*u  
gph13 = ctrlplot(ybclphinf(1,1));  
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph13 = ctrlplot(ybclpmu(1,1),gph13);  
gph13 = plot(gph13,{legend=["Khinf";"Kmu"],...  
title="perturbed closed loop beam length",...  
y lab="micrometers"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Controller: Khinf  
1
0.1  
0.01  
0.001  
0.0001  
1
10  
100  
1000  
Frequency  
200  
150  
100  
50  
0
-50  
-100  
1
10  
100  
1000  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph14 = ctrlplot(ybclphinf(2,1));  
gph14 = ctrlplot(ybclpmu(2,1),gph14);  
gph14 = plot(gph14,{legend=["Khinf";"Kmu"],...  
title="perturbed closed loop: vc actuator"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
perturbed closed loop: vc actuator  
0.015  
0.01  
Khinf  
Kmu  
0.005  
0
-0.005  
-0.01  
-0.015  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph15 = ctrlplot(ybclphinf(3,1));  
gph15 = ctrlplot(ybclpmu(3,1),gph15);  
gph15 = plot(gph15,{legend=["Khinf";"Kmu"],...  
title="perturbed closed loop: piezo actuator"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
perturbed closed loop: piezo actuator  
0.03  
0.02  
0.01  
0
Khinf  
Kmu  
-0.01  
-0.02  
-0.03  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
Bibliography  
[1] J. C. Doyle, “Lecture notes on advances in multivariable control.” ONR/Honeywell  
Workshop, Minneapolis, MN., 1984.  
[2] J. Doyle, “Structured uncertainty in control system design,” in Proc. IEEE Control  
Decision Conf., pp. 260–265, 1985.  
[3] A. K. Packard, What’s new with µ: Structured Uncertainty in Multivariable  
Control. PhD thesis, University of California, Berkeley, 1988.  
[4] R. S. Smith, Model Validation for Uncertain Systems. PhD thesis, California  
Institute of Technology, 1990.  
[5] J. Doyle and G. Stein, “Multivariable feedback design: Concepts for a  
classical/modern synthesis,” IEEE Trans. Auto. Control, vol. AC-26, pp. 4–16, Feb.  
1981.  
[6] M. Morari and E. Zafiriou, Robust Process Control. New Jersey: Prentice-Hall,  
1989.  
[7] The MathWorks, Inc., Natick, MA, µ-Analysis and Synthesis Toolbox (µ-Tools),  
1991.  
[8] J. Doyle, K. Lenz, and A. K. Packard, “Design examples using µ synthesis: Space  
shuttle lateral axis FCS during reentry,” in Proc. IEEE Control Decision Conf.,  
pp. 2218–2223, dec 1986.  
[9] G. J. Balas, Robust Control of Flexible Structures, Theory and Experiment. PhD  
thesis, California Institute of Technology, 1990.  
[10] G. J. Balas and J. C. Doyle, “Identification of flexible structures for robust  
control,” IEEE Control Sys. Magazine, vol. 10, pp. 51–58, June 1990.  
193  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[11] G. J. Balas and J. C. Doyle, “Robust control of flexible modes in the controller  
crossover region,” in Proc. Amer. Control Conf., 1989.  
[12] G. J. Balas, A. K. Packard, and J. Harduvel, “Application of µ-synthesis techniques  
to momentum management and attitude control of the Space Station,” in AIAA  
Guidance, Navigation and Cont. Conf., 1991.  
[13] R. S. Smith, C.-C. Chu, and J. L. Fanson, “The design of H controllers for an  
experimental non-collocated flexible structure problem,” IEEE Trans. Control Syst.  
Tech., 1993. in press.  
[14] J. Fanson, C.-C. Chu, B. Lurie, and R. Smith, “Damping and structural control of  
the JPL phase 0 testbed structure,” J. Intell. Material Sys. & Struct., vol. 2,  
pp. 281–300, July 1991.  
[15] R. S. Smith, J. Doyle, M. Morari, and A. Skjellum, “A case study using µ:  
Laboratory process control problem,” in Proc. Int. Fed. Auto. Control, vol. 8,  
pp. 403–415, 1987.  
[16] R. S. Smith and J. Doyle, “The two tank experiment: A benchmark control  
problem,” in Proc. Amer. Control Conf., vol. 3, pp. 403–415, 1988.  
[17] S. Skogestad, M. Morari, and J. C. Doyle, “Robust control of ill-conditioned plants:  
High-purity distillation,” IEEE Trans. Auto. Control, vol. 33, pp. 1092–1105,  
December 1988.  
[18] S. Skogestad, “Correction to “Robust control of ill-conditioned plants: High purity  
distillation”,” IEEE Trans. Auto. Control, vol. 34, p. 672, June 1989.  
[19] J. Doyle and A. K. Packard, “Uncertain multivariable systems from a state space  
perspective,” in Proc. Amer. Control Conf., vol. 3, pp. 2147–2152, 1987.  
[20] A. K. Packard and J. C. Doyle, “The complex structured singular value,”  
Automatica, vol. 29, no. 1, pp. 71–109, 1993.  
[21] D. R. Hamburg and M. A. Shulman, “A closed loop A/F control model for internal  
combustion engines,” Soc. Automotive Eng., no. 800826, 1980.  
[22] B. G. Morton and R. M. McAfoos, “A mu-test for robustness analysis of a  
real-parameter variation problem,” in Proc. Amer. Control Conf., 1985.  
[23] J. Doyle and A. Packard, “Uncertain multivariable systems from a state space  
perspective,” in Proc. Amer. Control Conf., pp. 2147–2152, IEEE, 1987.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[24] D. L. Laughlin, K. G. Jordan, and M. Morari, “Internal model control and process  
uncertainty: mapping uncertainty regions for SISO controller design,” Int. J. of  
Control, vol. 44, no. 6, pp. 1675–1698, 1986.  
[25] R. S. Smith and M. Dahleh, eds., The Modeling of Uncertainty in Control Systems:  
Proceedings of the 1992 Santa Barbara Workshop. 391 pgs., Springer-Verlag, 1994.  
[26] M. Gevers, “Connecting identification and robust control: A new challenge,” in  
Proc. IFAC Symp. on Identification & System Parameter Estimation, vol. 1,  
pp. 1–10, 1991.  
[27] A. Helmicki, C. Jacobson, and C. Nett, “H identification of stable lsi systems: A  
scheme with direct application to controller design,” Proc. Amer. Control Conf.,  
pp. 1428–1434, 1989.  
[28] G. Gu and P. P. Khargonekar, “Linear and nonlinear algorithms for identification in  
Hwith error bounds,” in Proc. Amer. Control Conf., pp. 64–69, 1991.  
[29] A. J. Helmicki, C. A. Jacobson, and C. N. Nett, “Control oriented system  
identification: A worst-case/deterministic approach in H ,” IEEE Trans. Auto.  
Control, pp. 1163–1176, 1991.  
[30] P. Ma¨kil¨a and J. Partington, “Robust approximation and identification in H,”  
Proc. Amer. Control Conf., pp. 70–76, 1991.  
[31] G. Gu and P. P. Khargonekar, “Linear and nonlinear algorithms for identification in  
Hwith error bounds,” in IEEE Trans. Auto. Control, vol. 37, pp. 953–963, 1992.  
[32] G. Gu and P. P. Khargonekar, “A class of algorithms for identification in H,” in  
Automatica, vol. 28, pp. 299–312, 1992.  
[33] G. Gu, P. P. Khargonekar, and Y. Li, “Robust convergence of two-stage nonlinear  
algorithms for identification in H,” in Syst. and Control Letters, vol. 18,  
pp. 253–263, 1992.  
[34] R. G. Hakvoort, “Worst-case system identification in H : error bounds and  
optimal models,” in Selected Topics in Identification Modelling and Control, Delft  
University Press, Vol. 5 1992.  
[35] E.-W. Bai, “On-line H2, H and pointwise uncertainty bound quantification in  
identification of restricted complexity models,” in Proc. IEEE Control Decision  
Conf., pp. 1719–1724, 1992.  
[36] G. Goodwin and M. Salgado, “Quantification of uncertainty in estimation using an  
embedding principle,” in Proc. Amer. Control Conf., 1989.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[37] R. Kosut, M. Lau, and S. Boyd, “Parameter set identification of systems with  
uncertain nonparametric dynamics and disturbances,” in Proc. IEEE Control  
Decision Conf., vol. 6, pp. 3162–3167, 1990.  
[38] G. Goodwin, B. Ninness, and M. Salgado, “Quantification of uncertainty in  
estimation,” in Proc. Amer. Control Conf., pp. 2400–2405, 1990.  
[39] B. M. Ninness and G. C. Goodwin, “Robust frequency response estimation  
accounting for noise and undermodeling,” in Proc. Amer. Control Conf.,  
pp. 2847–2851, 1992.  
[40] R. S. Smith and J. Doyle, “Model invalidation — a connection between robust  
control and identification,” in Proc. Amer. Control Conf., pp. 1435–1440, 1989.  
[41] J. M. Krause, “Stability margins with real parameter uncertainty: Test data  
implications,” in Proc. Amer. Control Conf., pp. 1441–1445, 1989.  
[42] R. S. Smith and J. C. Doyle, “Model validation: A connection between robust  
control and identification,” IEEE Trans. Auto. Control, vol. 37, pp. 942–952, July  
1992.  
[43] M. Newlin and R. S. Smith, “Model validation and generalized µ,” in Proc. IEEE  
Control Decision Conf., pp. 1257–1258, 1991.  
[44] K. Poolla, P. Khargonekar, A. Tikku, J. Krause, and K. Nagpal, “A time-domain  
approach to model validation,” in Proc. Amer. Control Conf., pp. 313–317, 1992.  
[45] R. S. Smith, “Model validation and parameter identification for systems in H and  
l1,” in Proc. Amer. Control Conf., pp. 2852–2856, 1992.  
[46] T. Zhou and H. Kimura, “Input-output extrapolation-minimization theorem and its  
application to model validation and robust identification,” in The Modeling of  
Uncertainty in Control: Proceedings of the 1992 Santa Barbara Workshop (R. Smith  
and M. Dahleh, eds.), pp. 127–137, Springer-Verlag, 1994.  
[47] R. S. Smith, “Model validation for robust control: an experimental process control  
application,” in Proc. of the 13th IFAC World Congress, vol. 9, pp. 61–64, July  
1993.  
[48] J. M. Krause and P. P. Khargonekar, “Parameter identification in the presence of  
non-parametric dynamic uncertainty,” Automatica, vol. 26, pp. 113–124, 1990.  
[49] R. Smith and J. Doyle, “Towards a methodology for robust parameter  
identification,” in Proc. Amer. Control Conf., vol. 3, pp. 2394–2399, 1990.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[50] J. M. Krause, P. P. Khargonekar, and G. Stein, “Robust parameter adjustment  
with nonparametric weighted-ball-in-Huncertainty,” IEEE Trans. Auto. Control,  
vol. AC-35, pp. 225–229, 1990.  
[51] R. S. Smith and J. C. Doyle, “Closed loop relay estimation of uncertainty bounds  
for robust control models,” in Proc. of the 13th IFAC World Congress, vol. 9,  
pp. 57–60, July 1993.  
[52] R. J. Schrama and P. M. V. den Hof, “An iterative scheme for identification and  
control design based on coprime factorizations,” in Proc. Amer. Control Conf.,  
pp. 2842–2846, 1992.  
[53] R. J. P. Schrama, “Accurate identification for control: the necessity of an iterative  
scheme,” IEEE Trans. Auto. Control, vol. 37, pp. 991–994, July 1992.  
[54] Z. Zang, R. R. Bitmead, and M. Gevers, “H2 iterative model refinement and control  
robustness enhancement,” in Proc. IEEE Control Decision Conf., pp. 279–284, 1991.  
[55] D. Bayard, Y. Yam, and E. Mettler, “A criterion for joint optimization of  
identification and robust control,” IEEE Trans. Auto. Control, vol. 37, pp. 986–991,  
July 1992.  
[56] Z. Zang, R. R. Bitmead, and M. Gevers, “Disturbance rejection: on-line refinement  
of controllers by closed loop modelling,” in Proc. Amer. Control Conf.,  
pp. 2929–2833, 1992.  
[57] B. A. Francis, A Course in H Control Theory, vol. 88 of Lecture Notes in Control  
and Information Sciences. Berlin: Springer-Verlag, 1987.  
[58] J. Doyle, K. Glover, P. Khargonekar, and B. Francis, “State-space solutions to  
standard H2 and H control problems,” IEEE Trans. Auto. Control, vol. AC-34,  
pp. 831–847, 1989.  
[59] K. Glover and J. Doyle, “State-space formulae for all stabilizing controllers that  
satisfy an H norm bound and relations to risk sensitivity,” Syst. and Control  
Letters, vol. 11, pp. 167–172, Oct 1988.  
[60] B. D. O. Anderson, “An algebraic solution to the spectral factorization problem,”  
IEEE Trans. Auto. Control, vol. AC-12, pp. 410–414, 1967.  
[61] J. C. Willems, “Least-squares stationary optimal control and the algebraic Riccati  
equation,” IEEE Trans. Auto. Control, vol. AC-16, pp. 621–634, 1971.  
[62] S. Boyd, V. Balakrishnan, and P. Kabamba, “On computing the h norm of a  
transfer matrix,” Math Contr. Signals, Syst., 1988.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[63] A. J. Laub, “A Schur method for solving algebraic Riccati equations,” IEEE Trans.  
Auto. Control, vol. AC-24, pp. 913–921, 1979.  
[64] T. Pappas, A. J. Laub, and N. R. Sandell, “On the numerical solution of the  
discrete-time algebraic Riccati equation,” IEEE Trans. Auto. Control, vol. AC-25,  
pp. 631–641, 1980.  
[65] W. F. Arnold and A. J. Laub, “Generalized eigenproblem algorithms and software  
for algebraic Riccati equations,” Proc. IEEE, vol. 72, pp. 1746–1754, 1984.  
[66] A. J. Laub, “Invariant subspace methods for the numerical solution of Riccati  
Equations,” in The Riccati Equation (S. Bittanti, A. J. Laub, and J. C. Willems,  
eds.), pp. 163–196, Springer-Verlag, Berlin, 1991.  
[67] G. Zames, “On the input-output stability of nonlinear time-varying feedback  
systems, parts I and II.,” IEEE Trans. Auto. Control, vol. AC-11, pp. 228–238 and  
465–476, 1966.  
[68] J. Doyle, “Analysis of feedback systems with structured uncertainties,” IEE  
Proceedings, Part D, vol. 133, pp. 45–56, Mar. 1982.  
[69] M. K. H. Fan and A. L. Tits, “Characterization and efficient computation of the  
structured singular value,” IEEE Trans. Auto. Control, vol. AC-31, pp. 734–743,  
1986.  
[70] M. K. H. Fan and A. L. Tits, “m-form numerical range and the computation of the  
structured singular value,” IEEE Trans. Auto. Control, vol. AC-33, pp. 284–289,  
1988.  
[71] J. C. Doyle, A. K. Packard, P. M. Young, R. S. Smith, and M. P. Newlin, “The  
structured singular value,” Tech. Rep. NASA-CR-4524, NASA, March 1992.  
[72] M. G. Safonov and J. Doyle, “Minimizing conservativeness of robust singular  
values,” in Multivariable Control (S. Tzafestas, ed.), New York: Reidel, 1984.  
[73] M. K. H. Fan, A. L. Tits, and J. C. Doyle, “Robustness in the presence of joint  
parametric uncertainty and unmodeled dynamics,” in Proc. Amer. Control Conf.,  
pp. 1195–1200, 1988.  
[74] P. M. Young and J. C. Doyle, “Computation of the µ with real and complex  
uncertainties,” in Proc. IEEE Control Decision Conf., pp. 1230–1235, 1990.  
[75] P. M. Young, M. P. Newlin, and J. C. Doyle, “µ analysis with real parametric  
uncertainty,” in Proc. IEEE Control Decision Conf., 1991.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
[76] M. Dahleh, A. Tesi, and A. Vicino, “Extremal properties for the parametric robust  
performance problem,” Tech. Rep. UCSB-ME-91-4, Univ. California, Santa  
Barbara, Mech. Eng., 1991. also submitted to 30th IEEE CDC.  
[77] B. C. Moore, “Principal components analysis in linear systems: controllability,  
observability and model reduction,” IEEE Trans. Auto. Control, vol. AC-26,  
pp. 17–31, 1981.  
[78] D. F. Enns, Model Reduction for Control System Design. PhD thesis, Stanford  
University, 1984.  
[79] K. Glover, “All optimal Hankel-norm approximations of linear multivariable systems  
and their L-error bounds,” Int. J. of Control, vol. 39, no. 6, pp. 1115–1193, 1984.  
[80] A. V. Oppenheim and R. W. Schafer, Digital Signal Processing. New Jersey:  
Prentice-Hall, 1975.  
[81] J. L. Adcock, “Curve fitter for pole-zero analysis,” Hewlett-Packard Journal, p. 33,  
January 1987.  
[82] M. Safonov, A. Laub, and G. Hartman, “Feedback properties of multivariable  
systems: The role and use of the return difference matrix,” IEEE Trans. Auto.  
Control, vol. 26, no. 1, 1981.  
[83] G. Hartman, M. Barrett, and C. Greene, “Control designs for an unstable vehicle,”  
Tech. Rep. NAS 4–2578, NASA Dryden Flight Research Center, 1979.  
[84] P. Merkel and R. Whitmoyer, “Development and evaluation of precision control  
modes for fighter aircraft,” in AIAA Guidance, Navigation and Cont. Conf., 1976.  
Paper No. 76–1950.  
[85] J. T. Spanos and M. C. O’Neal, “Nanometer level optical control on the JPL  
Phase B testbed,” in ADPA/AIAA/ASME/SPIE Conf. Active Mat. & Adapt.  
Struct., Nov 1991.  
[86] M. C. O’Neal and J. T. Spanos, “Optical pathlength control in the nanometer  
regime on the JPL Phase B interferometer testbed,” in SPIE Int. Symp. Optical  
Appl. Sci. & Eng., July 1991.  
[87] J. T. Spanos and A. Kissil, “Modeling and identification of the JPL Phase B  
testbed,” in ADPA/AIAA/ASME/SPIE Conf. Active Mat. & Adapt. Struct., Nov  
1991.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 6  
Function Reference  
6.1 Xµ Functions  
The following pages contain descriptions of the Xµ functions. These are also available  
on-line via the help utility. Each description also gives an illustrative example of the  
function’s use.  
The functions are included in alphabetical order. For convenience they are  
cross-referenced by typical use in the following list.  
System building and interconnection  
daug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231  
randsys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329  
starp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355  
sysic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363  
Variable display and graphics  
201  
Download from Www.Somanuals.com. All Manuals Search And Download.  
rifd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335  
ctrlplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221  
Time response calculations and pdm functions  
gstep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247  
interp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281  
mergeseg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285  
randpdm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323  
sdtrsp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339  
trsp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Model reduction and state-space functions  
balmoore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205  
modalstate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293  
ophank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315  
orderstate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319  
simtransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345  
sresidualize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351  
truncate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373  
Controller synthesis  
hinfsyn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257  
h2syn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269  
hinfnorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251  
h2norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255  
µ analysis and D-K iteration  
blknorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209  
mkpert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289  
mu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295  
musynfit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299  
spectrad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349  
randpert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327  
Transfer function fitting  
fitsys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239  
mkphase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Miscellaneous functions  
conpdm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213  
consys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215  
csum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217  
delsubstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237  
substr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361  
Download from Www.Somanuals.com. All Manuals Search And Download.  
balmoore  
Syntax  
[SysR,HSV,T] = balmoore(Sys,{nsr,bound})  
Parameter List  
Inputs:  
Sys  
nsr  
Linear, stable, minimal state-space system  
(optional) If bound is used then a reduction will be per-  
formed which meets an error bound specified by the value  
in nsr, otherwise nsr is the order of the reduced system.  
If nsr is not specified, the user will be prompted for its  
value after the Hankel singular values are displayed.  
Keywords: bound Boolean; meet an upper bound on the error (see nsr).  
Outputs:  
SysR  
HSV  
T
Internally balanced reduced order system; dynamic system  
object.  
A column vector containing the Hankel singular values of  
the system, Sys.  
Square matrix containing the balancing transformation,  
i.e. xbal = Tx.  
Description  
Computes the balanced form of the system Sys which can be continuous or discrete,  
then optionally truncates to the desired order, nsr, via B.C. Moore’s algorithm.  
The user must ensure that the input system is minimal. Any initial state values or state  
names associated with Sys are assigned to SysR. Input and Output names are also  
maintained.  
This function is cross-licensed from the Model Reduction Module.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Reference  
B.C. Moore, “Principal Component Analysis in Linear Systems: Controllability,  
Observability and Model Reduction,” IEEE Trans. Auto. Ctrl., Vol. 26, No. 1, pp. 17–32,  
Feb. 1981.  
Example  
# Create a five state system for reduction.  
a = daug(-0.891334,[-1.20857,0.799042;-0.799042,-1.20857],...  
-4.74685,-21.3013)  
b = [0.0262569;-0.189601;-0.113729;0.211465;-0.538239]  
c = [0.120725,-0.336942,0.397198,-0.700524,-1.02235]  
d = 0  
sys1 = system(a,b,c,d)  
fHz = logspace(0.01,100,100)  
sys1g = freq(sys1,fHz)  
# Reduce to 3 states by balanced truncation.  
[sysout1,hsv] = balmoore(sys1,{nsr=3})  
sysout1g = freq(sysout1,fHz)  
balerr = sys1g - sysout1g  
# Reduce to a 3 state system by residualization  
# for comparison purposes.  
sysout2 = sresidualize(sys1,3)  
sysout2g = freq(sysout2,fHz)  
residerror = sys1g - sysout2g  
gph1 = ctrlplot([sys1g,sysout1g,sysout2g,...  
balerr,residerror],{logmagplot});  
gph1 = plot(gph1,{!grid,legend=["original system";...  
"reduced: balmoore";"reduced: sresidualize";...  
"balmoore error";"sresidualize error"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also:  
minimal, ophank.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
blknorm  
Syntax  
normM = blknorm(M,blk,p,Frobenius)  
Parameter List  
Inputs:  
M
Matrix (or pdm).  
blk  
Block structure. See mu section of the manual for a de-  
scription of the syntax.  
p
Scalar valued. Specifies the Holder “p” norm to be used,  
where 1 p inf. Optional. The default is p = 2.  
Keywords: Frobenius The Frobenius norm is used.  
Outputs: normM Matrix (or pdm) norms of each block of M.  
Description  
M is partitioned according the input/output partitions determined by blk. The  
maximum singular value of each partition is calculated and normA is the matrix (pdm)  
of norms.  
For example, if p = 2 (the default case) and blk represents a single perturbation (with  
compatible input/output dimensions) then normA is simply the maximum singular  
value. If blk consists of entirely 1×1 perturbations, then normA is equal to abs(A).  
Repeated scalar blocks are taken as full blocks. This neglects the assumed equivalences  
between parts of Delta.  
The Xmath function norm is used for the calculations. For further detail, refer to norm  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Examples  
A = random(3,3)-0.5*ones(3,3)?  
A (a square matrix) =  
0.0618661  
0.390622  
-0.112622  
0.0896177  
0.00422128  
0.42229  
0.185398  
-0.150638  
0.448818  
blknorm(A,[1,1; 1,1; 1,1])  
ans (a square matrix) =  
0.0618661  
0.390622  
0.112622  
0.0896177  
0.00422128  
0.42229  
0.185398  
0.150638  
0.448818  
blknorm(A,[3,3])  
ans (a scalar) = 0.682429  
# compare to the following:  
max(svd(A))  
ans (a scalar) = 0.682429  
B = [1,2,3,4; 5,6,7,-8; 9,10,-11,12]?  
B (a rectangular matrix) =  
1
5
9
2
6
10  
3
7
-11  
4
-8  
12  
blk = [2,1;1,1;1,1]  
# examine 1,1 entry of blknorm result  
blknorm(B,blk)  
ans (a square matrix) =  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.23607  
7.81025  
13.4536  
3
7
11  
4
8
12  
# and compare to  
norm(B(1,1:2))  
ans (a scalar) = 2.23607  
See Also  
norm  
Download from Www.Somanuals.com. All Manuals Search And Download.  
conpdm  
Syntax  
outpdm = conpdm(mat,domain,{skipChks})  
Parameter List  
Inputs:  
mat  
constant matrix  
domain  
domain over which outsys will be defined.  
Keywords: skipChks Boolean specifying that syntax checking is to be skipped.  
Outputs: outpdm pdm  
Description  
Creates a pdm data object from a constant matrix. Outpdm represents a constant gain;  
its value is repeated at every instance of the domain. It is equivalent to,  
outpdm = pdm(kronecker(ones(length(dom),1),mat),dom)  
and is a useful shorthand for including constant values in a pdm plot.  
This function may be superceded by redefining the augmentation operators  
and other functions in a later release of Xmath. To maintain future upwards  
compatibility avoid using this function when developing derivative software.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
consys  
Syntax  
outsys = consys(mat,{skipChks})  
Parameter List  
Inputs:  
Keywords: skipChks Boolean specifying that syntax checking is to be skipped.  
Outputs: outsys Dynamic System  
mat  
constant matrix  
Description  
Creates a Dynamic System object from a constant matrix. Outsys represents a  
constant gain; the A, B and C matrices are empty. It is equivalent to,  
outsys = system([],[],[],mat)  
and can be useful in specifying constant inputs to freq.  
This function may be superceded by redefining the augmentation operators  
and other functions in a later release of Xmath. To maintain future upwards  
compatibility avoid using this function when developing derivative software.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
csum  
Syntax  
[outpdm] = csum(inpdm, {channels})  
Parameter List  
Inputs:  
inpdm  
real or complex valued pdm or constant matrix  
Keywords: channels Sum over channels. outpdm has the same dimensions as  
inpdm.  
Outputs:  
outpdm output pdm  
Description  
Perform a cumulative sum over the rows of a matrix or a pdm. If channels is specified  
then the sum is performed over the domain of the pdm.  
Examples  
A = [ones(6,1),random(6,1)]?  
A (a rectangular matrix) =  
1
1
1
1
1
1
0.608453  
0.854421  
0.0642647  
0.827908  
0.926234  
0.566721  
csum(A)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ans (a rectangular matrix) =  
1
2
3
4
5
6
0.608453  
1.46287  
1.52714  
2.35505  
3.28128  
3.848  
pdmA = pdm(A,[1,2,3])?  
pdmA (a pdm) =  
domain |  
Col 1 Col 2  
-------+------------------------  
1 | Row 1  
| Row 2  
1
1
0.608453  
0.854421  
-------+------------------------  
2 | Row 1  
| Row 2  
1
1
0.0642647  
0.827908  
-------+------------------------  
3 | Row 1  
| Row 2  
1
1
0.926234  
0.566721  
-------+------------------------  
csum(pdmA)  
ans (a pdm) =  
domain |  
Col 1 Col 2  
-------+------------------------  
1 | Row 1  
| Row 2  
1
2
0.608453  
1.46287  
-------+------------------------  
2 | Row 1  
| Row 2  
1
2
0.0642647  
0.892173  
-------+------------------------  
3 | Row 1  
| Row 2  
1
2
0.926234  
1.49296  
-------+------------------------  
csum(pdmA,channels)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ans (a pdm) =  
domain |  
Col 1 Col 2  
-------+-----------------------  
1 | Row 1  
| Row 2  
1
1
0.608453  
0.854421  
-------+-----------------------  
2 | Row 1  
| Row 2  
2
2
0.672717  
1.68233  
-------+-----------------------  
3 | Row 1  
| Row 2  
3
3
1.59895  
2.24905  
-------+-----------------------  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ctrlplot  
Syntax  
graph = ctrlplot(pdm,old graph,{keywords})  
Parameter List  
Inputs:  
pdm  
Pdm (or matrix) containing the data to be plotted.  
old graph  
(optional) Graphical object to which data is added. Con-  
ceptually the same as plot(pdm,{keep=old graph}).  
Keywords:  
The following keywords specify the basic plot format. Only one can be selected.  
timeresp  
bode  
(default) real(pdm) vs. domain. This is the same as the  
default plot function and is suitable for time domain re-  
sponses  
Two subplots are generated: log magnitude vs. domain  
and angle vs. domain. They are positioned one above the  
other. If present, old graph must also be in this format.  
nyquist  
imag(pdm) vs. real(pdm). Standard Nyquist plot.  
log magnitude vs. angle. Standard Nichols chart.  
log magnitude vs. domain.  
nichols  
logmagplot  
phaseplot  
angle vs. domain.  
The following keywords specify whether the domain is log or linear scale. This is not  
applicable to the Nyquist or Nichols plots. The defaults depend upon which of the above  
control plot types has been selected.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
linear  
log  
linear domain. Default = 1 for timeresp keyword. Default  
= 0 for bode keyword.  
logarithmic domain. Default = 1 for bode keyword. De-  
fault = 0 for timeresp keyword.  
Default units can be supplied for the magnitude and phase plots (bode, nichols,  
logmagplot and phaseplot keywords) with the following keywords.  
degrees  
db  
Angles are specified in degrees (default = 1)  
log magnitudes are specified in decibels (default = 0).  
The following keywords behave identically to those in plot. They relate directly to the  
line/marker specifications and must be associated with a particular pdm.  
line  
(default = 1). Plot as a line type.  
(default = 0). Plot markers.  
refer to plot  
marker  
line style  
line width  
refer to plot  
marker style refer to plot  
marker size refer to plot  
Some preprocessing of the data is performed by the following keyword.  
unwrap  
Applicable to bode, nichols and phaseplot keywords.  
Phase changes of 2π are unwrapped, rather than being  
graphed between π and π. Default = 1.  
Outputs:  
graph  
Resulting graphical object.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
This function performs some common control system related plotting. The user can use  
ctrlplot to set up a basic plot and perform some preprocessing of the data. This  
generates a graphical object containing the data and the user can perform subsequent  
calls to plot to add things like text, labels, gridding etc. The second argument  
(optional) is a graphical object to which the pdm will be added.  
Plots over a domain (bode, timeresp, logmagplot, phaseplot) must be called with a pdm.  
A matrix or scalar can be turned into a suitable pdm with the conpdm function. Nyquist  
and Nichols plots can also plot scalars. Points such as -1 are often useful. The user  
should specify a marker so that such points show up. When mixing scalar and pdm data  
on a Nyquist or Nichols plot, plot the pdm data first to get a reasonable choice of axes.  
For Bode plots, two graphs are created — the magnitude and the phase plots — and  
positioned one above the other. The result is returned as a single graphical object.  
Similarly, when adding data to Bode plots, the existing graphical object must also  
contain two subplots.  
Default labels, corresponding to the most common use of the particular invocation, are  
put on the axes. These can be overwritten with subsequent calls to plot.  
Examples:  
# Create 2 systems.  
sys1 = 1/makepoly([1,1],"s")  
sys2 = 2*sys1*10/makepoly([1,1,10],"s")  
w1 = logspace(0.01,10,50)’  
w2 = sort([w1;[0.35:0.01:0.65]’])  
sys1g = freq(sys1,w1)  
sys2g = freq(sys2,w2)  
# Bode plots  
g1 = ctrlplot(sys1g,{bode});  
g1 = ctrlplot(sys2g,g1,{bode});  
g1 = plot({keep=g1,title = "Bode plots",...  
Download from Www.Somanuals.com. All Manuals Search And Download.  
legend = ["sys1","sys2"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Bode plots  
10  
1
0.1  
sys1  
sys2  
0.01  
0.001  
0.0001  
1e-05  
0.01  
0.1  
1
10  
Frequency  
0
-50  
-100  
-150  
-200  
-250  
-300  
0.01  
0.1  
1
10  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Nyquist plots  
g2 = ctrlplot(sys1g,{nyquist});  
g2 = ctrlplot(sys2g,g2,{nyquist});  
g2 = ctrlplot(-1,g2,{nyquist,marker=1,line=0});  
g2 = plot(g2,{projection="orthographic",...  
legend=["sys1","sys3","critical point"],title="Nyquist plots"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Nyquist plots  
0.5  
0
-0.5  
sys1  
sys3  
critical point  
-1  
-1.5  
-2  
-2  
-1  
0
1
2
Real  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Create a second order lightly damped system to illustrate  
# time response plotting. The calculation is repeated with  
# a non-zero initial condition.  
sys = 5/makepoly([1,1,5],"s")  
u = gstep([0:0.05:10],[0;1;5],[0;1;-1])  
y0 = sys*u  
[a,b,c,d] = abcd(sys)  
sys = system(a,b,c,d)  
y1 = system(sys,{X0=[-1;0]})*u  
# Now plot the result  
g1 = ctrlplot(u,{line style=2});  
g1 = ctrlplot(y0,g1,{line style=1});  
g1 = ctrlplot(y1,g1,{line style=4});  
g1 = plot(g1,{!grid,legend=["input";"x0 = zero";"non-zero x0"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2
1
0
input  
-1  
-2  
-3  
x0 = zero  
non-zero x0  
0
2
4
6
8
10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also:  
plot.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
daug  
Syntax  
out = daug (sys1,sys2,...)  
Parameter List  
Inputs:  
sys1 Input systems. These can be dynamical systems and con-  
stants, or pdms and constants.  
.
.
.
Outputs: out  
output system.  
Description  
Diagonal augmentation of dynamical system/pdm/constant, matrices.  
sys1  
0
. . .  
0
0
0
.
.
.
sys2 . . .  
.
.
.
out =  
.
.
.
.
.
.
0
0
. . . sysN  
Limitations  
Only 21 systems can be augmented with a single function invocation.  
Examples  
daug([1,1],[2;2],inf)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ans (a square matrix) =  
1
0
0
0
1
0
0
0
0
2
2
0
0
0
0
Inf  
sys1 = randsys(1,1,2,{stable})  
sys1 = system(sys1,{statenames="sys1state"})?  
sys1 (a state space system) =  
A
-0.886949  
B
0.853282  
0.012459  
0.748961  
C
0.186754  
D
0.492058  
X0  
0
State Names  
-----------  
sys1state  
System is continuous  
sys2 = randsys(1,2,1,{stable})  
sys2 = system(sys2,{statenames="sys2state",x0=1})?  
sys2 (a state space system) =  
A
Download from Www.Somanuals.com. All Manuals Search And Download.  
-1.67106  
B
0.579502  
C
0.262815  
0.436099  
D
0.911055  
0.808267  
X0  
1
State Names  
-----------  
sys2state  
System is continuous  
# Note the effect of the constant in the following  
daug(sys1,10,sys2)  
ans (a state space system) =  
A
-0.886949  
0
0
-1.67106  
B
0.853282  
0
0.012459  
0
0
0
0
0.579502  
C
0.186754  
0
0
0
0
0
0.262815  
0.436099  
Download from Www.Somanuals.com. All Manuals Search And Download.  
D
0.492058  
0.748961  
0
10  
0
0
0
0
0
0
0
0
0
0.911055  
0.808267  
0
X0  
0
1
State Names  
-----------  
sys1state  
sys2state  
System is continuous  
pdm1 = randpdm(3,2,2)?  
pdm1 (a pdm) =  
domain |  
Col 1  
Col 2  
-------+---------------------------  
0 | Row 1 0.810265 0.259043  
| Row 2 0.413909 0.359993  
-------+---------------------------  
1 | Row 1 0.691279 0.765686  
| Row 2 0.357265 0.76934  
-------+---------------------------  
2 | Row 1 0.547763 0.0962289  
| Row 2 0.956117 0.220741  
-------+---------------------------  
pdm2 = pdm(10*ones(3,1),domain(pdm1))?  
pdm2 (a pdm) =  
domain |  
-------+-----  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0 |  
-------+-----  
1 | 10  
-------+-----  
2 | 10  
10  
-------+-----  
daug(pdm1,pdm2)  
ans (a pdm) =  
domain |  
Col 1  
Col 2  
Col 3  
-------+----------------------------------  
0 | Row 1 0.810265 0.259043  
| Row 2 0.413909 0.359993  
0
0
| Row 3  
0
0
10  
-------+----------------------------------  
1 | Row 1 0.691279 0.765686  
| Row 2 0.357265 0.76934  
0
0
| Row 3  
0
0
10  
-------+----------------------------------  
2 | Row 1 0.547763 0.0962289  
| Row 2 0.956117 0.220741  
0
0
| Row 3  
0
0
10  
-------+----------------------------------  
Download from Www.Somanuals.com. All Manuals Search And Download.  
delsubstr  
Syntax  
[outstr] = delsubstr(str,charstr)  
Parameter List  
Inputs:  
str  
String or vector of strings.  
charstr String  
Outputs: outstr  
String or vector of strings.  
Description  
All occurences of the substring, charstr, within str are deleted.  
If, by deleting charstr, another occurence of charstr in created, it will not be deleted.  
Examine the second example closely to see the effect of this.  
Unless str is a scalar string, deleting a whole string element will cause an error.  
Example  
strvec = ["string one";"aaa";"xxyy"]  
out1 = delsubstr(strvec,"g o")?  
out1 (a column vector of strings) =  
strinne  
aaa  
xxyy  
out2 = delsubstr(strvec,"xy")?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
out2 (a column vector of strings) =  
string one  
aaa  
xy  
# If executed, the following would give an error  
# out3 = delsubstr(strvec,"a")?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
fitsys  
Syntax  
[sys] = fitsys(data,npoles,nzeros,weight, {skipchks,Hertz})  
Parameter List  
Inputs:  
data  
Complex valued data (pdm).  
npoles  
nzeros  
Order of requested fit. (optional, default = 0).  
Number of zeros in transfer function. (optional, default =  
npoles)  
weight  
Weighting function. (scalar, pdm, or Dynamic System)  
(optional, default = 1).  
Keywords: Hertz  
Boolean. This keyword is mandatory as the function must  
know whether the domain is in Hertz or radians/second  
(specified by !Hertz) to fit correctly. Note that the Xmath  
function freq assumes that the frequency range is specified  
in Hertz.  
skipchks Boolean. Skip the error checking. (Default = 0)  
Outputs:  
sys Dynamic system, order = npoles.  
Description  
Fits a transfer function to complex valued data. npoles and nzeros specifies the number  
of poles and zeros.  
The optional argument weight, specifies a weighting for the fit. If weight is a pdm it  
must be over the same domain as data. It may also be a Dynamic System, in which  
case the magnitude of its frequency response is the weight. A scalar weight may also be  
specified although this will have no effect. For logscale frequency data a weight of close  
to 1/s is strongly recommended.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The primary use of this routine is the fitting of D scale weights for mu synthesis  
iterations.  
Chebyshev polynomials are used as basis functions for both the numerator and  
denominator polynomials.  
WARNING: This routine uses iterative polynomial calculations which are not well  
conditioned for high order (> 6) fits.  
Reference  
For further information see: “Curve Fitter for Pole-Zero Analysis,” J.L. Adcock,  
Hewlett-Packard Journal, p. 33, January 1987.  
Example  
# Set up a plant to generated data for the fitting  
# problem.  
plant = makepoly([0.1,-0.1,1],"s")*makepoly([1,1],"s")...  
/(makepoly([1,0.1,.1],"s")*(makepoly([0.2,1],"s")))  
# Note that plant has right half plane zeros  
rifd(plant)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-5.0000e+00  
3.1225e-01  
-3.1225e-01  
0.0000e+00  
3.1623e-01  
3.1623e-01  
5.0000e+00  
0.1581  
0.1581  
1.0000  
Zeros:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0000e+00  
5.0000e-01  
5.0000e-01  
0.0000e+00  
3.1225e+00  
-3.1225e+00  
1.0000e+00  
3.1623e+00  
3.1623e+00  
1.0000  
-0.1581  
-0.1581  
omega = logspace(0.001,100,200)  
plantg = freq(plant,omega)  
# Use complex cepstrum to fit minimum phase equivalent  
# to the magnitude of the data. One of the principle  
# uses of the fitsys function is fitting approximations  
# to noisy data. To illustrate the concepts, no noise  
# is added here.  
cdata = mkphase(abs(plantg))  
gph1 = ctrlplot([plantg,cdata],{phaseplot});  
gph1 = plot(gph1,{title="Data and minimum phase fit",...  
legend=["original data";"minimum phase fit"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Data and minimum phase fit  
100  
0
-100  
-200  
-300  
-400  
original data  
minimum phase fit  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Create fitting weight. 1/s works well for logspaced  
# data.  
wght = 1/makepoly([1,0],"s")  
# Fit new system and compare pole location with  
# the original. Note that it is minimum phase.  
nsys = fitsys(cdata,3,3,wght)  
rifd(nsys)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.1043e-02  
-5.1043e-02  
-5.0107e+00  
-3.1249e-01  
3.1249e-01  
0.0000e+00  
3.1663e-01  
3.1663e-01  
5.0107e+00  
0.1612  
0.1612  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0189e+00  
-5.0906e-01  
-5.0906e-01  
0.0000e+00  
-3.0989e+00  
3.0989e+00  
1.0189e+00  
3.1405e+00  
3.1405e+00  
1.0000  
0.1621  
0.1621  
nsysg = freq(nsys,omega)  
gph2 = ctrlplot([plantg,nsysg],{bode});  
gph2 = plot(gph2,{title="Data and minimum phase fit",...  
legend=["original system";"minimum phase system"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Data and minimum phase fit  
100  
10  
original system  
minimum phase system  
1
0.1  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
100  
0
-100  
-200  
-300  
-400  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Limitations  
Limited to SISO systems.  
See Also  
tfid  
Download from Www.Somanuals.com. All Manuals Search And Download.  
gstep  
Syntax  
gPdm = gstep (ytime,timespec,valspec, {skipChks})  
Parameter List  
Inputs:  
ytime  
timespec times for specified step data (optional)  
valspec value for specified step data (optional)  
output time vector (seconds).  
Keywords: skipChks Boolean specifying that syntax checking is to be skipped.  
Outputs: gPdm pdm containing the step values as a function of time.  
Description  
This function creates a PDM over the domain: ytime. At ytime = timespec(i) the  
output steps to value: valspec(i) and maintains that value until the next specified step  
or the end of the domain.  
Example  
time = [0:100]  
steptimes = [5,25,30,65,90]  
stepvalues = [-1,2,1,-1.5,1.5]  
out = gstep(time,steptimes,stepvalues)  
gph1 = ctrlplot(out);  
gph1 = plot(gph1,{title="gstep example"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Data and minimum phase fit  
100  
10  
original system  
minimum phase system  
1
0.1  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
100  
0
-100  
-200  
-300  
-400  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also  
randpdm, gcos, gsin, gpulse, gsawtooth, gsquarewave  
Download from Www.Somanuals.com. All Manuals Search And Download.  
hinfnorm  
Syntax  
[out,omega] = hinfnorm(sys,tol,{imag eps,max it})  
Parameter List  
Inputs:  
sys  
sys  
Dynamic System, frequency response (pdm), or constant  
gain (matrix).  
Specifies the relative tolerance of the answer when the in-  
put is a Dynamic SystemDefault = 0.001.  
Keywords: imag eps Epsilon value for determining imaginary eigenvalues of the  
Hamiltonian. Default = sqrt(eps).  
max it  
Maximum number of iterations. Default = 100.  
Outputs:  
out  
H norm of the input system. Scalar or pdm or matrix  
input systems. 2×1 vector for Dynamic System inputs.  
An upper bound of inf indicates that the maximum number  
of iterations was exceeded.  
omega  
Frequency (Hz) where the norm is achieved.  
Description  
The H norm is defined to be the supremum, over frequency, of the maximum singular  
value of the system’s frequency response.  
If the input system is a pdm, it is assumed to be a frequency response and the norm is  
calculated only from the frequencies provided.  
If the inputs system is a matrix, it represents a constant gain and the maximum singular  
value of the matrix is returned. Note that this is NOT the same as the result of  
norm(sys,inf).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Stable Dynamic System norms are calculated by an iterative Hamiltonian method. In  
this case out is a 2×1 vector with upper and lower bounds for the norm.  
Example  
# Set up a simple closed loop problem.  
# This example is given in more detail in the  
# hinfsyn online help.  
plant = makepoly([0.1,-0.1,1],"s")*makepoly([1,1],"s")...  
/(makepoly([1,0.1,.1],"s")*(makepoly([0.2,1],"s")))  
# Create weights  
Wperf = 100/makepoly([100,1],"s")  
Wact = makepoly([0.5,0.05],"s")/makepoly([0.05,1],"s")  
# Form the weighted interconnection structure  
sysnames = ["plant";"Wperf";"Wact"]  
sysinp = ["ref";"control"]  
sysout = ["Wperf"; "Wact"; "ref-plant"]  
syscnx = ["control"; ...  
"ref-plant"; ...  
"control"]  
# input to plant  
# input to Wperf  
# input to Wact  
wghtic = sysic(sysnames,sysinp,sysout,syscnx,plant,...  
Wperf,Wact)  
# Design Hinf controller  
nctrls = 1  
nmeas = 1  
gmax = 25  
gmin = 0  
Kinf = hinfsyn(wghtic,nmeas,nctrls,[gmax;gmin])  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
25.0000  
Y eig  
Hx eig  
X eig  
nrho xy  
p/f  
Download from Www.Somanuals.com. All Manuals Search And Download.  
25.000  
12.500  
6.250  
3.125  
1.562  
0.781  
1.172  
5.2e-01  
5.2e-01  
5.2e-01  
5.1e-01  
5.0e-01  
1.7e-03  
1.7e-03  
1.7e-03  
1.7e-03  
1.7e-03  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
p
p
p
p
p
f
p
3.9e-01 -9.8e+01  
4.8e-01 1.8e-03  
Gamma value achieved:  
1.1719  
# form weighted closed loop system  
clpinf = starp(wghtic,Kinf)  
# Compare hinfnorm to gamma value. The H infinity  
# norm should be less than or equal to gamma.  
hinfnorm(clpinf)?  
ans (a column vector) =  
1.1701  
1.16893  
See Also  
h2norm, hinfsyn, h2syn.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
h2norm  
Syntax  
out = h2norm(sys)  
Parameter List  
Inputs:  
sys Continuous time Dynamic System  
Outputs: out H2 norm of the input system  
Description  
The H2 norm of a stable, strictly proper system is calculated. This is given by  
out = trace(CXC0),  
where X is the controllability grammian, solving the Lyapunov equation,  
AX + XA0 + BB0 = 0.  
Example  
# Set up a simple closed loop problem.  
# This example is also studied in the  
# hinfsyn on-line help.  
plant = makepoly([0.1,-0.1,1],"s")*makepoly([1,1],"s")...  
/(makepoly([1,0.1,.1],"s")*(makepoly([0.2,1],"s")))  
# Create weights  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Wperf = 100/makepoly([100,1],"s")  
Wact = makepoly([0.5,0.05],"s")/makepoly([0.05,1],"s")  
# Form the weighted interconnection structure  
sysnames = ["plant";"Wperf";"Wact"]  
sysinp = ["ref";"control"]  
sysout = ["Wperf"; "Wact"; "ref-plant"]  
syscnx = ["control"; ...  
"ref-plant"; ...  
"control"]  
# input to plant  
# input to Wperf  
# input to Wact  
wghtic = sysic(sysnames,sysinp,sysout,syscnx,plant,...  
Wperf,Wact)  
# Design H2 controller  
nctrls = 1  
nmeas = 1  
K2 = h2syn(wghtic,nmeas,nctrls)  
# Form the weighted closed loop system and calculate  
# its H2 norm.  
wghtclp2 = starp(wghtic,K2)  
h2norm(wghtclp2)?  
ans (a scalar) =  
2.78655  
See Also  
h2syn, hinfsyn, hinfnorm  
Download from Www.Somanuals.com. All Manuals Search And Download.  
hinfsyn  
Syntax  
[k,gfin,stat] = hinfsyn(p,nmeas,ncon,gamma,{keywords})  
Parameter List  
Inputs:  
p
Generalized interconnection structure (Dynamic Sys-  
tem)  
nmeas  
measurement vector dimension.  
ncon  
gamma  
control vector dimension.  
H
norm bound of controller. For a bisection search spec-  
ify gamma = [gamma min;gamma max].  
Keywords: schur solution real Schur decomposition for Riccati solution (default)  
eig solution  
tol  
eigendecomposition for Riccati solution.  
tol=value. Specifies the relative tolerance for stopping a  
bisection fit. Default = (gamma max - gamma min)/50  
epr  
epr = value. Tolerance for determining when the Hamilto-  
nian eigenvalues lie on the axis. Default = 0.5*sqrt(eps)  
epp  
epp = value. Tolerance for determining that a Riccati  
equation solution is positive definite. Default = 1e-6  
maxit = value. Maximum number of bisection iterations.  
Default = inf.  
maxit  
Outputs:  
k
Central H optimal controller.  
gfin  
stat  
H
norm achieved for the returned controller.  
return status  
0
Controller calculated  
-1 no controller exists for specified gamma value.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
The H (sub)optimal controller for the interconnection, p, is calculated. The resulting  
closed loop system is illustrated below.  
z
w
p
y
u
-
k
The variables ncon and nmeas are used to specify the dimensions of u and y in the above  
diagram (ncon = dim(u) and nmeas = dim(y)). The objective is to design a stabilizing  
controller, k, which minimizes the H2 norm of the closed loop system between w and z.  
The closed loop system can be formed with the command,  
clpsys = starp(p, k).  
p is a state-space system, which can be partitioned with respect to [z; y] and [w; u] in  
the following way.  
a
b1  
b2  
p = c1 d11 d12  
c2 d21 d22  
.
The following assumptions must hold:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. (a, b2, c2) is stabilizable and detectable  
2. d12 and d21 have full rank  
3. The matrix [a jωI, b2; c1, d12] has full column rank for all ω  
4. The matrix [a jωI, b1; c2, d21] has full row rank for all ω  
Reference  
This function uses the state-space formulae given in:  
“State-space formulae for all stabilizing controllers that satisfy an H norm bound and  
relations to risk sensitivity,” Keith Glover and John Doyle, Systems & Control Letters  
11, pp. 167–172., Oct, 1988.  
Example  
# Set up a simple closed loop problem.  
# A tracking problem is chosen. Weights are used to  
# trade off between tracking performance and actuator  
# effort.  
plant = makepoly([0.1,-0.1,1],"s")*makepoly([1,1],"s")...  
/(makepoly([1,0.1,.1],"s")*(makepoly([0.2,1],"s")))  
# Create weights (performance & actuator)  
Wperf = 100/makepoly([100,1],"s")  
Wact = makepoly([0.5,0.05],"s")/makepoly([0.05,1],"s")  
# Form the weighted interconnection structure  
sysnames = ["plant";"Wperf";"Wact"]  
sysinp = ["ref";"control"]  
sysout = ["Wperf"; "Wact"; "ref-plant"]  
syscnx = ["control"; ...  
"ref-plant"; ...  
"control"]  
# input to plant  
# input to Wperf  
# input to Wact  
Download from Www.Somanuals.com. All Manuals Search And Download.  
wghtic = sysic(sysnames,sysinp,sysout,syscnx,plant,...  
Wperf,Wact)  
# Design Hinf controller  
nctrls = 1  
nmeas = 1  
gmax = 25  
gmin = 0  
Kinf = hinfsyn(wghtic,nmeas,nctrls,[gmax;gmin])  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
25.0000  
Y eig  
Hx eig  
X eig  
nrho xy  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
0.0000  
p/f  
25.000  
12.500  
6.250  
3.125  
1.562  
5.2e-01  
5.2e-01  
5.2e-01  
5.1e-01  
5.0e-01  
1.7e-03  
1.7e-03  
1.7e-03  
1.7e-03  
1.7e-03  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
1.0e-02  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
0.0e+00  
p
p
p
p
p
f
p
0.781  
1.172  
3.9e-01 -9.8e+01  
4.8e-01 1.8e-03  
Gamma value achieved:  
rifd(Kinf)  
1.1719  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0000e-02  
-1.0347e+00  
-2.6846e+00  
-2.6846e+00  
-1.2692e+01  
0.0000e+00  
1.0000e-02  
1.0347e+00  
3.5362e+00  
3.5362e+00  
1.2692e+01  
1.0000  
1.0000  
0.7592  
0.7592  
1.0000  
0.0000e+00  
2.3017e+00  
-2.3017e+00  
0.0000e+00  
Zeros:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-5.0000e+00  
-2.0000e+01  
-3.1225e-01  
3.1225e-01  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
5.0000e+00  
2.0000e+01  
0.1581  
0.1581  
1.0000  
1.0000  
omega = logspace(0.001,100,200)  
Kinfg = freq(Kinf,omega)  
gph1 = ctrlplot(Kinfg,{bode});  
gph1 = plot(gph1,{title="Kinf"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kinf  
10  
1
0.1  
0.01  
0.001  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
40  
20  
0
-20  
-40  
-60  
-80  
-100  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Use sysic to create unweighted interconnection  
ic = sysic("plant",["ref";"ctrl"],["plant";"ref-plant"],...  
"ctrl",plant)  
clpinf = starp(ic,Kinf)  
rifd(clpinf)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-9.5105e-01  
-9.7350e-01  
-9.7350e-01  
-5.0000e+00  
-5.0901e+00  
-1.1812e+01  
3.1225e-01  
-3.1225e-01  
0.0000e+00  
-1.2285e+00  
1.2285e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
9.5105e-01  
1.5675e+00  
1.5675e+00  
5.0000e+00  
5.0901e+00  
1.1812e+01  
0.1581  
0.1581  
1.0000  
0.6211  
0.6211  
1.0000  
1.0000  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-1.0000e+00  
5.0000e-01  
5.0000e-01  
-5.0000e+00  
-2.0000e+01  
3.1225e-01  
-3.1225e-01  
0.0000e+00  
3.1225e+00  
-3.1225e+00  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
1.0000e+00  
3.1623e+00  
3.1623e+00  
5.0000e+00  
2.0000e+01  
0.1581  
0.1581  
1.0000  
-0.1581  
-0.1581  
1.0000  
1.0000  
# Examine sensitivity function  
sens = inv(1 + plant*Kinf)  
sensg = freq(sens,omega)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
gph2 = ctrlplot(sensg,{logmagplot});  
gph2 = plot(gph2,{title="Kinf controller: sensitivity function"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kinf controller: sensitivity function  
10  
1
0.1  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Examine step response  
step = gstep([0:0.1:10],0,1)  
y = clpinf*step  
gph3 = ctrlplot([y,step]);  
gph3 = plot(gph3,{title="Kinf controller: step response"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kinf controller: step response  
1.2  
1
0.8  
0.6  
0.4  
0.2  
0
0
2
4
6
8
10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See also  
hinfsyn, hinfnorm, h2norm  
Download from Www.Somanuals.com. All Manuals Search And Download.  
h2syn  
Syntax  
k = h2syn(p,nmeas,ncon,{keywords})  
Parameter List  
Inputs:  
p
Generalized interconnection structure (Dynamic Sys-  
tem)  
nmeas  
ncon  
measurement vector dimension.  
control vector dimension.  
Keywords: schur solution real Schur decomposition for Riccati solution (default)  
eig solution  
epr  
eigendecomposition for Riccati solution.  
epr = value. Tolerance for determining when the Hamilto-  
nian eigenvalues lie on the axis. Default = 0.5*sqrt(eps)  
Outputs:  
k
H2 optimal controller.  
Description  
The H2 optimal controller for the interconnection, p, is calculated. The resulting closed  
loop system is illustrated below.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
z
w
p
y
u
-
k
The variables ncon and nmeas are used to specify the dimensions of u and y in the above  
diagram (ncon = dim(u) and nmeas = dim(y)). The objective is to design a stabilizing  
controller, k, which minimizes the H2 norm of the closed loop system between w and z.  
p is a state-space system, which can be partitioned with respect to [z; y] and [w; u] in  
the following way.  
a
b1  
b2  
p = c1 d11 d12  
c2 d21 d22  
.
The following assumptions must hold:  
1. (a, b2, c2) is stabilizable and detectable  
2. d12 and d21 have full rank  
3. d11 = 0  
4. The matrix [a jωI, b2; c1, d12] has full column rank for all ω  
5. The matrix [a jωI, b1; c2, d21] has full row rank for all ω  
In theory the Riccati equations should always have a solution. However, Hamiltonian  
eigenvalues which are close to the imaginary axis will give problems. epr specifies a  
tolerance for how close the calculated eigenvalues can be to the axis.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Reference  
This function uses the state-space formulae given in:  
“State-space formulae for all stabilizing controllers that satisfy an H norm bound and  
relations to risk sensitivity,” Keith Glover and John Doyle, Systems & Control Letters  
11, pp. 167–172., Oct, 1988.  
Example  
# Set up a simple closed loop problem.  
# This example is also studied in the  
# hinfsyn on-line help.  
plant = makepoly([0.1,-0.1,1],"s")*makepoly([1,1],"s")...  
/(makepoly([1,0.1,.1],"s")*(makepoly([0.2,1],"s")))  
# Create weights. These are definitely not the best  
# for an H2 design - they are chosen to match with  
# the Hinf design example for comparison purposes.  
Wperf = 100/makepoly([100,1],"s")  
Wact = makepoly([0.5,0.05],"s")/makepoly([0.05,1],"s")  
# Form the weighted interconnection structure  
sysnames = ["plant";"Wperf";"Wact"]  
sysinp = ["ref";"control"]  
sysout = ["Wperf"; "Wact"; "ref-plant"]  
syscnx = ["control"; ...  
"ref-plant"; ...  
"control"]  
# input to plant  
# input to Wperf  
# input to Wact  
wghtic = sysic(sysnames,sysinp,sysout,syscnx,plant,...  
Wperf,Wact)  
# Design H2 controller  
nctrls = 1  
nmeas = 1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
K2 = h2syn(wghtic,nmeas,nctrls)  
rifd(K2)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.4046e-01  
-1.4046e-01  
-1.5863e+00  
-1.5863e+00  
-5.2060e+00  
-2.3161e-01  
2.3161e-01  
3.4754e+00  
-3.4754e+00  
0.0000e+00  
2.7087e-01  
2.7087e-01  
3.8203e+00  
3.8203e+00  
5.2060e+00  
0.5186  
0.5186  
0.4152  
0.4152  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-5.0000e+00  
-2.0000e+01  
-3.1225e-01  
3.1225e-01  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
5.0000e+00  
2.0000e+01  
0.1581  
0.1581  
1.0000  
1.0000  
omega = logspace(0.001,100,200)  
K2g = freq(K2,omega)  
gph1 = ctrlplot(K2g,{bode});  
gph1 = plot(gph1,{title="K2"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
K2  
1
0.1  
0.01  
0.001  
0.0001  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
50  
0
-50  
-100  
-150  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Use sysic to create unweighted interconnection  
ic = sysic("plant",["ref";"ctrl"],["plant";"ref-plant"],...  
"ctrl",plant)  
clp2 = starp(ic,K2)  
rifd(clp2)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-1.8120e-01  
-1.8120e-01  
-1.6753e+00  
-1.6753e+00  
-4.9957e+00  
-5.0000e+00  
3.1225e-01  
-3.1225e-01  
-4.2333e-01  
4.2333e-01  
3.4263e+00  
-3.4263e+00  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
4.6048e-01  
4.6048e-01  
3.8139e+00  
3.8139e+00  
4.9957e+00  
5.0000e+00  
0.1581  
0.1581  
0.3935  
0.3935  
0.4393  
0.4393  
1.0000  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e-02  
-5.0000e-02  
-1.0000e+00  
5.0000e-01  
5.0000e-01  
-5.0000e+00  
-2.0000e+01  
3.1225e-01  
-3.1225e-01  
0.0000e+00  
3.1225e+00  
-3.1225e+00  
0.0000e+00  
0.0000e+00  
3.1623e-01  
3.1623e-01  
1.0000e+00  
3.1623e+00  
3.1623e+00  
5.0000e+00  
2.0000e+01  
0.1581  
0.1581  
1.0000  
-0.1581  
-0.1581  
1.0000  
1.0000  
# Examine sensitivity function  
sens = inv(1 + plant*K2)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sensg = freq(sens,omega)  
gph2 = ctrlplot(sensg,{logmagplot});  
gph2 = plot(gph2,{title="K2 controller: sensitivity function"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
K2 controller: sensitivity function  
10  
1
0.1  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Examine step response  
step = gstep([0:0.1:10],0,1)  
y = clp2*step  
gph3 = ctrlplot([y,step]);  
gph3 = plot(gph3,{title="K2 controller: step response"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
K2 controller: step response  
1
0.8  
0.6  
0.4  
0.2  
0
0
2
4
6
8
10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See also  
hinfsyn, h2norm, hinfnorm  
Download from Www.Somanuals.com. All Manuals Search And Download.  
interp  
Syntax  
outpdm = interp(inpdm,stepsize,final {keywords})  
outpdm = interp(inpdm,domspec, {keywords})  
Parameter List  
Inputs:  
inpdm  
stepsize  
final  
Input pdm.  
Increment in outpdm domain.  
Last value in outpdm domain. Optional: default =  
max(domain(inpdm)).  
domspec Regular vector or pdm used to specify the domain of out-  
pdm.  
Keywords: order  
Interpolation order. Values are:  
0
1
zero order hold (default)  
linear interpolation  
Outputs:  
outpdm  
interpolated pdm  
Description  
m is interpolated to give outpdm. Two syntaxes are available for specifying the domain  
of outpdm.  
In the first the domain is,  
[min(domain(inpdm)):final:stepsize].  
If final is not specified max(domain(inpdm)) is used.  
The second syntax is, domain(domspec) if domspec is a pdm or domspec if domspec is a  
vector.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
This function differs from the interpolate function in that it can handle zero order  
hold type interpolation and deal with irregularly spaced input pdms. Irregularly spaced  
output pdms can be generated with the domspec syntax. These features are often useful  
when dealing with data generated from experiments.  
Example  
time = [0:1:5]  
u = gstep(time,time,time)  
u1 = interp(u,0.25,{order=0})  
time2 = sort(5*random(20,1))  
u2 = interp(u,time2,{order=1})  
gph1 = ctrlplot(u2,{marker=1,marker style=1,...  
marker size=1,line=0}); gph1 =  
plot(u1,gph1,{marker=1,marker style=6,...  
marker size=1,line=0}); gph1 =  
plot(u,gph1,{marker=1,marker style=9,...  
marker size=1,line=0}); gph1 = plot(gph1,{legend=["1st  
order interp.";...  
"0 order interp.";"original pdm"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5
4
3
2
1
0
1st order interp.  
0 order interp.  
original pdm  
0
1
2
3
4
5
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also  
interpolate  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mergeseg  
Syntax  
outpdm = mergeseg(pdm1,pdm2, {keywords})  
Parameter List  
Inputs:  
pdm1  
pdm2  
input pdm  
input pdm  
Keywords: domsort  
Sort the result of merging the pdms. If !domsort then  
pdm2 is simply concatenated onto pdm1. Boolean. De-  
fault = 1.  
increasing Sort in increasing order. Boolean. Default = 1.  
decreasing Sort in decreasing order. Boolean. Default = 0.  
duplicates Leave duplicated domain values in outpdm. If !duplicates  
is specified then only the matrices from pdm1 associated  
with the duplicate domain values are included in outpdm.  
The value of tol determines what constitutes equality in  
the domains. Boolean. Default = 1.  
tol  
Tolerance in determining duplicates in the domains. De-  
fault = eps*max([domain(pdm1);domain(pdm2)])  
Outputs:  
outpdm  
output pdm  
Description  
This function concatenates two pdms and then sorts them according to their domain.  
This is useful for merging experimental data taken over different frequency or time  
ranges. A regular domain is not required. The pdms must have equal row and column  
dimensions.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Example  
time1 = [0:0.025:1]  
pdm1 = gsin(time1,{frequency=2})  
time2 = [0.8:0.02:1.5]  
pdm2 = randpdm([],1,1,{dom=time2,zeromean})  
outpdm = mergeseg(pdm1,pdm2)  
gph1 = ctrlplot(outpdm);  
gph1 = plot(pdm1,gph1,{marker=1,marker style=8,...  
line=0});  
gph1 = plot(pdm2,gph1,{marker=1,marker style=1,...  
line=0,legend=["outpdm";"pdm1";"pdm2"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1
0.5  
0
outpdm  
pdm1  
pdm2  
-0.5  
-1  
0
0.5  
1
1.5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mkpert  
Syntax  
[pertsys] = mkpert(Delta,blk,mubnds,{fselect,pnorm,Hertz})  
Parameter List  
Inputs:  
Delta  
blk  
Lower bound perturbation data from mu calculation.  
(pdm)  
block structure (refer to mu function documentation).  
(matrix)  
mubnds Calculated mu bounds (pdm).  
Keywords: fselect  
pnorm  
Scalar valued. Specifies the frequency for interpolation,  
overriding that obtained from mubnds.  
Scalar valued. Specifies the norm of the resulting system,  
overriding that calculated from mubnds.  
Hertz  
Boolean. Domain of pdms are in units of Hertz. This  
keyword is mandatory. To specify radians/sec use !Hertz.  
Outputs:  
pertsys Constructed perturbation. (Dynamic System)  
Description  
Creates the rational, stable, system which interpolates the perturbation, Delta, at a  
specified frequency. The frequency chosen is the one where the lower bound to mu is  
maximum. This corresponds to the smallest destabilizing perturbation. The system has  
the assumed structure given by blk.  
This function may also be called with a single pdm argument. The result will interpolate  
the argument at its first domain value.  
This function is used to construct a bad perturbation, the effects of which can be  
studied by simulation.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The bounds, mubnds, are used to determine the ”worst-case” frequency for the  
interpolation. The norm of pertsys is 1/(norm(Delta())) where ω is the chosen  
frequency. This is the smallest destabilizing perturbation at that frequency.  
Both the interpolation frequency and the norm of pertsys can be specified via keywords.  
The user may be interested only in certain frequency ranges and may have an assumed  
norm bound on the perturbation (typically unity).  
Components of pertsys (or all of it if appropriate) may be real valued gains rather than  
dynamic systems.  
Example  
The use of mkpert is studied in context in the on-line help for musynfit and the manual  
documentation for musynfit (page 299).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mkphase  
Syntax  
[cdata] = mkphase(magdata, {skipchks,Hertz})  
Parameter List  
Inputs:  
magdata Magnitude data (pdm)  
Keywords: skipchks Boolean. Skip the error checking. (Default = 0)  
Hertz  
cdata  
The domain of the pdm is in Hertz. This is the default.  
!Hertz specifies a domain in rad/sec.  
Outputs:  
Complex valued data corresponding to a minimum phase  
transfer function.  
Description  
Fits phase data to magnitude data. The phase is equivalent to that produced by  
minimum phase system. A complex cepstrum method is used.  
Reference  
For further details see: “Digital Signal Processing,” A.V. Oppenheim & R.W. Schafer,  
p.501, Prentice-Hall, 1975.  
Example  
The on-line help example is the same as that for fitsys. Refer to page 239.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Limitations  
Limited to SISO systems.  
See Also  
fitsys, ccepstrum  
Download from Www.Somanuals.com. All Manuals Search And Download.  
modalstate  
Syntax  
outsys = modalstate(sys, {keywords})  
Parameter List  
Inputs:  
sys  
Input Dynamic System  
Keywords: increasing Boolean. Order in terms of increasing magnitude (contin-  
uous) or angle (discrete). Default = 1  
decreasing Boolean. Order in terms of decreasing magnitude (contin-  
uous) or angle (discrete). Default = 0  
splitstable Boolean. Separate the stable from the unstable modes and  
order separately. Default = 0.  
Outputs:  
outsys  
output Dynamic System  
Description  
Transform the system to give a block diagonal A matrix, with complex eigenvalues in  
2×2 blocks and real eigenvalues in 1×1 blocks. The system must be diagonalizable to  
avoid introducing errors. The initial condition is also transformed. The state names are  
deleted, however the input and output names, and period (if discrete) are preserved.  
Example  
sys = randsys(6,1,1,{stable})  
rifd(sys)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
Download from Www.Somanuals.com. All Manuals Search And Download.  
-8.1602e-01  
-8.1602e-01  
-4.6142e+00  
-4.6142e+00  
-2.2478e+01  
-3.9525e+01  
1.3353e+00  
-1.3353e+00  
-1.6648e+01  
1.6648e+01  
0.0000e+00  
0.0000e+00  
1.5649e+00  
1.5649e+00  
1.7275e+01  
1.7275e+01  
2.2478e+01  
3.9525e+01  
0.5215  
0.5215  
0.2671  
0.2671  
1.0000  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0270e+00  
-1.0270e+00  
-4.5529e+00  
-4.5529e+00  
-2.4416e+01  
-3.9534e+01  
-1.5086e+00  
1.5086e+00  
-1.6621e+01  
1.6621e+01  
0.0000e+00  
0.0000e+00  
1.8250e+00  
1.8250e+00  
1.7233e+01  
1.7233e+01  
2.4416e+01  
3.9534e+01  
0.5628  
0.5628  
0.2642  
0.2642  
1.0000  
1.0000  
sys1 = modalstate(sys)  
[a1,,,] = abcd(sys1)  
# compare a1 to the poles of sys  
a1?  
a1 (a square matrix) =  
-0.816024  
1.33529  
-1.33529  
-0.816024  
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-4.61417  
-16.6478  
16.6478  
-4.61417  
0
0
0
0
0
0
0
0
0
-22.4779  
0
-39.5252  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mu  
Syntax  
[mubnds,D,Dinv,Delta,sens] = mu(M,blk)  
Parameter List  
Inputs:  
M
Matrix or pdm.  
blk  
Block structure defined by a matrix of dimension: number  
of blocks × 2. If the ith block has c outputs and r inputs,  
then blk(i,:) = [r,c]. The default is equivalent to 1x1 blocks  
(M must be square).  
Outputs: mubnds Upper and lower bounds (in vector form) for mu(M).  
D,Dinv D-scale matrices giving the calculated upper-bound.  
mu(M) msv(D*M*Dinv)  
Delta  
sens  
Perturbation achieving the lower bound.  
Sensitivity of the upper bound with respect to the values  
in D & Dinv  
Description  
Calculates the upper and lower bounds of the structured singular value of M, with block  
structure: blk. The upper bound scaling matrices and the lower bound destabilizing  
perturbation also returned.  
The Osborne method is used to calculate the upper bound (for small matrices this is  
enhanced by a Perron Frobenius method) and a power iteration is used for the lower  
bound.  
Example  
# The following is the classic example showing  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# that mu is not equal to its upper bound for  
# more than three full blocks.  
gamma = 3 + sqrt(3); beta = sqrt(3) -1  
a = sqrt(2/gamma); b = 1/sqrt(gamma)  
c = 1/sqrt(gamma); d = -sqrt(beta/gamma)  
f = (1+jay)*sqrt(1/(gamma*beta))  
psi1 = -pi/2; psi2 = pi  
U = [a,0; b,b; c,jay*c; d,f]  
V = [0,a; b,-b; c,-jay*c; f*exp(jay*psi1), d*exp(jay*psi2)]  
scl = diagonal(random(4,1)+0.1*ones(4,1))  
M = scl*U*V*’*inv(scl)  
# Consider 4 1x1 blocks  
blk1 = [1,1; 1,1; 1,1; 1,1]  
[mubnds1,D1,Dinv1,Delta1] = mu(M,blk1)  
max(svd(M))?  
ans (a scalar) =  
2.81264  
max(svd(D1*M*Dinv1))?  
ans (a scalar) =  
mubnds1?  
1
mubnds1 (a column vector) =  
1
0.860682  
# Consider 1 4x4 block (equivalent to max sing. val.)  
blk2 = [4,4]  
[mubnds2,D2,Dinv2,Delta2] = mu(M,blk2)  
# Note that the perturbation is such that  
# det(I-M Delta) = 0.  
max(svd(D2*M*Dinv2))?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ans (a scalar) =  
mubnds2?  
2.81264  
mubnds2 (a column vector) =  
2.81264  
2.81264  
det(eye(4,4) - M*Delta2)?  
ans (a scalar) =  
-2.53156e-16 + 4.3828e-17 j  
For an example of how mu is used for system robustness analysis, refer to the on-line  
help for musynfit (page 299).  
Limitations  
This version of the software cannot handle repeated blocks or real valued blocks.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
musynfit  
Syntax  
[Dsys,Dinvsys] = musynfit(Dmag,blk,nmeas,nctrls,..  
weight,M,order,{keywords})  
Parameter List  
Inputs: Dmag New D matrix from mu calculation (magnitude data only).  
The domain is assumed to be in Hertz.  
blk  
nmeas scalar: number of measurements  
nctrls scalar: number of controls  
block structure (refer to mu function documentation).  
weight (optional) weighting function for the fit. Typically the sen-  
sitivity output of mu is used. Must be a pdm of dimension:  
number of blocks × 1.  
M
(optional) Matrix (pdm) of interest in the µ calculation.  
I.e. µ(M) σ(DMD1). If M is provided a second plot  
compares the µ(M) upper bound, based on Dmag, to the  
mu(M) upper bound using a frequency response of the D  
scale transfer function approximation.  
order  
(optional) A scalar (or vector of dimension nblks-1) spec-  
ifying the order of the fit to be used. If this argument is  
present, the function runs without requiring user interac-  
tion and does not graph the results.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Keywords: Hertz  
Boolean. This keyword is mandatory as the function must  
know whether the domain is in Hertz or radians/second  
(specified by !Hertz) to fit correctly. Note that the Xmath  
function freq assumes that the frequency range is specified  
in Hertz.  
plotweight Boolean, default = 0. This will generate a second plot  
showing the weighting function. This can be useful is as-  
sessing the quality of a given transfer function fit. If the  
variable M is also specified, the weighting function plot  
takes priority over the upper bound comparison plot.  
fit  
Integer specifying the routine to be used in fitting the  
data. This sets the default routine which may be changed  
interactively by the user. The choices are:  
fit = 1  
fit = 2  
Xmath function: tfid  
Xmu function: fitsys  
The default is fit = 2.  
Outputs:  
Dsys  
New left D scale system.  
Dinvsys  
New D inverse system (to be multiplied to M on the right).  
Description  
Fits stable, minimum phase, transfer functions to each block of the D-scale matrix. A  
complex cepstrum technique is used to generate the phase response from the provided  
magnitude data.  
The user may interactively select a fitting order and compare the result with the data. A  
choice of fitting routines is provided. If the order is specified in the command line the  
function is not interactive.  
Example  
# The nominal plant is a double integrator.  
# A multiplicative perturbation weight reflects  
# increased uncertainty at high frequencies  
Download from Www.Somanuals.com. All Manuals Search And Download.  
P = 1/makepoly([1,0,-0.01],"s")  
W = makepoly([1,20],"s")/makepoly([1,200],"s")  
# Set up an unweighted interconnection structure  
# for unity gain negative feedback. We include  
# the perturbation too.  
nms = ["P";"W"]  
inp = ["delt";"ref";"noise";"control"]  
outp = ["W" ;"ref- delt - P";"control";"ref-delt-P-noise"]  
cnx = ["control";"P"]  
ic = sysic(nms,inp,outp,cnx,P,W)  
# Now include some weights for performance:  
Wperf = makepoly([0.01,1],"s")/makepoly([1,0.01],"s")  
Wact = 0.1* makepoly([1,1],"s")/makepoly([0.05,1],"s")  
Wnoise = 0.01  
Wref = makepoly([0.005,1],"s")/makepoly([0.05,1],"s")  
# Apply weights to error signals and unknown  
# inputs.  
wghtic = daug(1,Wperf,Wact,1)*ic*daug(1,Wref,Wnoise,1)  
# Perform an H infinity design.  
nmeas = 1  
ncntrls = 1  
gmin = 0  
# number of measurements  
# number of controls  
gmax = 10  
Kinf = hinfsyn(wghtic,nmeas,ncntrls,[gmin;gmax])  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
10.0000  
Y eig  
Hx eig  
X eig  
nrho xy  
0.0049  
0.0207  
0.1061  
2.3572  
0.2681  
p/f  
10.000  
5.000  
2.500  
1.250  
1.875  
7.1e-01  
7.1e-01  
7.0e-01  
7.7e-04  
7.7e-04  
7.8e-04  
9.9e-03 -3.8e-19  
9.8e-03 -1.5e-19  
9.2e-03  
6.0e-03  
p
p
p
f
p
0.0e+00  
0.0e+00  
6.5e-01 -5.6e+02  
6.9e-01 7.9e-04  
8.5e-03 -1.1e-18  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1.562  
1.406  
1.484  
1.523  
6.8e-01  
6.7e-01  
6.7e-01  
6.7e-01  
8.0e-04  
8.1e-04  
8.0e-04  
8.0e-04  
7.7e-03  
7.0e-03 -1.1e-18  
7.4e-03 0.0e+00  
7.5e-03 -5.0e-19  
0.0e+00  
0.6811  
2.0900  
1.0394  
0.8249  
p
f
f
p
Gamma value achieved:  
G = starp(wghtic,Kinf)  
1.5234  
omega = logspace(0.01,100,25)  
Gg = freq(G,omega)  
G11g = Gg(1,1)  
G22g = Gg(2:3,2:3)  
rs = max(svd(G11g))  
np = max(svd(G22g))  
blk = [1,1; 2,2]  
[rpbnds1,D1,Dinv1,Delta1,sens1] = mu(Gg,blk)  
gph1 = ctrlplot([np;rs;rpbnds1],{log});  
gph1 = plot(gph1,{!grid,title="mu analysis",legend=["nominal  
perf.";...  
"robust stab.";"robust perf.(upper)";"robust perf.  
(lower)"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
mu analysis  
1.2  
1
0.8  
0.6  
0.4  
0.2  
0
nominal perf.  
robust stab.  
robust perf.(upper)  
robust perf. (lower)  
0.01  
0.1  
1
10  
100  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Fit transfer functions to D1 & Dinv1 for a mu  
# synthesis iteration  
[Ds,Dinvs] = musynfit(D1,blk,nmeas,ncntrls,sens1,Gg,{Hertz})  
Download from Www.Somanuals.com. All Manuals Search And Download.  
D scale fit, block: 1  
10000  
1000  
100  
10  
Magnitude data  
Previous fit, order: 0  
New fit, order: 3  
1
0.01  
0.1  
1
10  
10  
10  
100  
100  
100  
Frequency (Hz)  
Upper bound comparison, block: 1  
100  
10  
1
Data based bound  
0.1  
Previous fit bound, order: 0  
New fit bound, order: 3  
0.01  
0.001  
0.01  
0.1  
1
Frequency (Hz)  
D scale fit weight for block: 1  
1
0.1  
0.01  
0.001  
0.0001  
1e-05  
0.01  
0.1  
1
Frequency (Hz)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Apply the D scales to another H infinity design  
Kmu = hinfsyn(Ds*wghtic*Dinvs,nmeas,ncntrls,[gmin;gmax])  
Test bounds:  
gamma  
0.0000  
<
gamma <=  
Hy eig  
10.0000  
Y eig  
Hx eig  
X eig  
nrho xy  
0.0027  
0.0113  
0.0517  
0.4688  
*******  
*******  
1.2451  
0.6922  
p/f  
10.000  
5.000  
2.500  
1.250  
0.625  
0.938  
1.094  
1.172  
6.5e-01  
6.4e-01  
6.4e-01  
6.3e-01  
5.6e-07  
5.6e-07  
5.6e-07  
5.6e-07  
9.9e-03 -1.0e-15  
9.8e-03 -6.3e-16  
9.2e-03  
6.0e-03 -7.6e-20  
7.1e-14 *******  
7.1e-14 *******  
4.1e-03 -3.5e-16  
5.2e-03 -6.3e-18  
p
p
p
p
0.0e+00  
5.6e-01 -1.1e+00  
6.1e-01 -2.8e+01  
f
f
6.2e-01  
6.2e-01  
5.6e-07  
5.6e-07  
f
p
Gamma value achieved:  
1.1719  
# Close the loop around the weighted interconnection  
# structure.  
Gmu = starp(wghtic,Kmu)  
omega = logspace(0.01,100,40)  
Gmug = freq(Gmu,omega)  
blk = [1,1; 2,2]  
[rpbnds2,D2,Dinv2,Delta2,sens2] = mu(Gmug,blk)  
gph3 = ctrlplot(rpbnds2(1,1),{log});  
gph3 = ctrlplot(rpbnds1(1,1),gph3,{log});  
gph3 = plot(gph3,{!grid,title="Kmu & Kinf mu analysis",...  
legend=["Kmu: robust perf.";"Kinf: robust perf."]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Kmu & Kinf mu analysis  
1.2  
1
0.8  
0.6  
0.4  
0.2  
0
Kmu: robust perf.  
Kinf: robust perf.  
0.01  
0.1  
1
10  
100  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Look at the worst case perturbations for each of  
# the Kinf and Kmu controllers. Compare also a  
# random perturbation for each controller. In all cases the  
# perturbation is of size 0.5 and we choose a perturbation  
# which is bad at 1Hz.  
mupert = mkpert(Delta2,blk,rpbnds2,{fselect=1,pnorm=0.5,Hertz})  
mupert = mupert(1,1)  
# select part to close around top  
infpert = mkpert(Delta1,blk,rpbnds1,{fselect=1,pnorm=0.5,Hertz})  
infpert = infpert(1,1) # select part to close around top  
# set up an LFT for the reference tracking problem  
M = daug(W,1,1)*consys([0,0,1;1,0,1;-1,1,-1])*daug(1,1,P)  
mupertic = starp(mupert,M)  
mupertclp = starp(mupertic,Kmu)  
munomclp = starp(starp(0,M),Kmu)  
infpertic = starp(infpert,M)  
infpertclp = starp(infpertic,Kinf)  
infnomclp = starp(starp(0,M),Kinf)  
rpert = randpert(blk,{pnorm=0.5})  
rpert = rpert(1,1)  
rpertic = starp(rpert,M)  
murpert = starp(rpertic,Kmu)  
infrpert = starp(rpertic,Kinf)  
# Look at step responses  
time = [0:0.05:4]  
step = gstep(time,0,1)  
yinfnom = infnomclp*step  
yinfpert = infpertclp*step  
ymunom = munomclp*step  
ymupert = mupertclp*step  
gph4 = ctrlplot([step,yinfnom(1,1),yinfpert(1,1),...  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ymunom(1,1),ymupert(1,1)]);  
gph4 = plot(gph4,{legend=["input step";"Kinf nominal";...  
"Kinf pert.";"Kmu nominal";"Kmu pert."]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1.4  
1.2  
1
0.8  
0.6  
0.4  
0.2  
0
input step  
Kinf nominal  
Kinf pert.  
Kmu nominal  
Kmu pert.  
0
1
2
3
4
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Compare with a random perturbation  
yinfrandp = infrpert*step  
ymurandp = murpert*step  
gph5 = ctrlplot([step,yinfnom(1,1),yinfrandp(1,1),...  
ymunom(1,1),ymurandp(1,1)]);  
gph5 = plot(gph5,{legend=["input step";"Kinf nominal";...  
"Kinf rand. pert.";"Kmu nominal";"Kmu rand. pert."]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1.4  
1.2  
1
0.8  
0.6  
0.4  
0.2  
0
input step  
Kinf nominal  
Kinf rand. pert.  
Kmu nominal  
Kmu rand. pert.  
0
1
2
3
4
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also:  
mu, hinfsyn, mkpert, hinfnorm.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
ophank  
Syntax  
[SysR,SysU,HSV] = ophank(Sys,{nsr,onepass})  
Parameter List  
Inputs:  
Sys  
nsr  
Linear, stable, state-space system (continuous)  
(optional) Order of the reduced system. If not specified,  
the user will be prompted for its value after the Hankel  
singular values are displayed.  
Keywords: onepass (Boolean) If equal to 1 (true), reduction is calculated in  
one pass. If false (!onepass or onepass=0), reduction is  
calculated in (number of states of Sys - nsr) passes. De-  
faults to 1.  
Outputs:  
SysR  
SysU  
Reduced order system; dynamic system object.  
Anti-causal optimal system, (only with one keyword); dy-  
namic system object.  
HSV  
A column vector containing the Hankel singular values of  
the system, Sys.  
Description  
Calculates an optimal hankel norm reduction of Sys for the additive case.  
Any initial state values or state names associated with Sys are not assigned to SysR or  
SysU. Input and Output names are maintained.  
The current version of ophank is unable to deal with discrete time systems. Users are  
advised to call makecontinuous on discrete systems before calling ophank, and then  
re-discretize.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Uses additional subroutines ophiter, ophred, ophmult and stable.  
This function is cross-licensed from the Model Reduction Module.  
Example  
# Create a five state system for reduction.  
a = daug(-0.891334,[-1.20857,0.799042;-0.799042,-1.20857],...  
-4.74685,-21.3013)  
b = [0.0262569;-0.189601;-0.113729;0.211465;-0.538239]  
c = [0.120725,-0.336942,0.397198,-0.700524,-1.02235]  
d = 0  
sys1 = system(a,b,c,d)  
fHz = logspace(0.01,100,100)  
sys1g = freq(sys1,fHz)  
# Reduce to 3 states by Hankel norm approximation  
[sysout1,hsv] = ophank(sys1,{nsr=3})  
sysout1g = freq(sysout1,fHz)  
balerr = sys1g - sysout1g  
# Reduce to a 3 state system by residualization  
# for comparison purposes.  
sysout2 = sresidualize(sys1,3)  
sysout2g = freq(sysout2,fHz)  
residerror = sys1g - sysout2g  
gph1 = ctrlplot([sys1g,sysout1g,sysout2g,...  
balerr,residerror],{logmagplot});  
gph1 = plot(gph1,{!grid,legend=["original system";...  
"reduced: ophank";"reduced: sresidualize";...  
"ophank error";"sresidualize error"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0.1  
0.01  
0.001  
original system  
reduced: ophank  
reduced: sresidualize  
ophank error  
sresidualize error  
0.0001  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also  
minimal, balmoore.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
orderstate  
Syntax  
outsys = orderstate(sys,indx)  
Parameter List  
Inputs:  
sys  
Input Dynamic System  
indx  
Lists the desired order of the states in outsys.  
Outputs: outsys output dynamic system.  
Description  
Reorder the states according to the index argument. The state names and initial  
condition are also ordered. The input and output names, and period (if discrete) are  
preserved.  
Example  
sys1 = randsys(3,1,1,{stable})  
sys1 = system(sys1,{statenames=["s1";"s2";"s3"],...  
x0=[0.1;0.2;0.3]})?  
sys1 (a state space system) =  
A
-2.27378  
0.65518  
-1.2488  
3.32295  
-5.41526  
4.7424  
-8.82005  
9.0643  
-13.2781  
B
0.0879738  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0.710595  
0.688873  
C
0.659532  
0.181512  
0.390497  
D
0.15869  
X0  
0.1  
0.2  
0.3  
State Names  
-----------  
s1  
s2  
s3  
System is continuous  
sys2 = orderstate(sys1,[2,1,3])?  
sys2 (a state space system) =  
A
-5.41526  
3.32295  
4.7424  
0.65518  
-2.27378  
-1.2488  
9.0643  
-8.82005  
-13.2781  
B
0.710595  
0.0879738  
0.688873  
C
0.181512  
0.659532  
0.390497  
D
0.15869  
X0  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0.2  
0.1  
0.3  
State Names  
-----------  
s2  
s1  
s3  
Input Names  
-----------  
Input 1  
Output Names  
------------  
Output 1  
System is continuous  
Download from Www.Somanuals.com. All Manuals Search And Download.  
randpdm  
Syntax  
pdmout = randpdm (ndomain,nrows,ncolumns,{keywords})  
Parameter List  
Inputs:  
ndomain  
nrows  
length of the domain  
number of rows in pdmout  
ncolumns number of columns in pdmout  
Keywords: complex  
Boolean. A complex valued pdm is generated. Default =  
0.  
zeromean Boolean. The values are shifted so that zero is the mean.  
Default = 0.  
Dfirst  
First value in the domain. This only a bound if !regular.  
Default = 0.  
Last value in the domain. Again this is only a bound if  
!regular. Default = ndomain-1.  
Dlast  
regular  
Boolean. Domain is regular. !regular generates a random  
domain between Dfirst and Dlast. Default = 1.  
Outputs:  
pdmout  
Random pdm  
Description  
A random pdm, with user specified row, column and domain dimension, is generated.  
Several additional features can be specified by keywords: real or complex values,  
minimum and maximum values of the domain, and whether or not the domain is regular.  
Note that the domain related defaults give a domain of [0:ndomain:1]. ndomain can be  
specified as zero in which case a random matrix is returned. This is a reasonable way of  
generating a random complex matrix.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Examples  
pdm0 = randpdm(3,1,2,{zeromean})?  
pdm0 (a pdm) =  
domain |  
-------+-------------------------  
0 | -0.043917 -0.0789571  
-------+-------------------------  
1 | 0.37878 -0.457265  
-------+-------------------------  
2 | 0.0466939 -0.34413  
Col 1  
Col 2  
-------+-------------------------  
pdm1 = randpdm(4,1,1,{!regular,Dfirst=2,Dlast=19})?  
pdm1 (a pdm) =  
domain |  
---------+------------  
3.1543  
---------+------------  
4.87235 | 0.900169  
---------+------------  
10.0323 0.932966  
---------+------------  
18.3191 0.645692  
|
0.0605523  
|
|
---------+------------  
pdm2 = randpdm(pdm1)?  
pdm2 (a pdm) =  
domain |  
---------+------------  
3.1543  
---------+------------  
4.87235 | 0.174411  
---------+------------  
|
0.746793  
Download from Www.Somanuals.com. All Manuals Search And Download.  
10.0323  
---------+------------  
18.3191 0.81113  
|
0.922528  
|
---------+------------  
pdm3 = randpdm(0,3,2,{complex,zeromean})?  
pdm3 (a rectangular matrix) =  
-0.237052 - 0.10845  
0.097563 + 0.0140395 j  
0.0178566 - 0.153032  
j
-0.250958 - 0.392096 j  
-0.255142 - 0.419362 j  
0.0986898 + 0.375528 j  
j
Download from Www.Somanuals.com. All Manuals Search And Download.  
randpert  
Syntax  
[pert] = randpert(blk, {sys,sfreq,complex,pnorm})  
Parameter List  
Inputs:  
blk  
block structure (refer to mu function documentation).  
(matrix)  
Keywords: sys  
sfreq  
Boolean. Specifies that pert is a dynamic system. Default  
= !sys, i.e. pert is a matrix.  
Scalar valued. If a dynamic system is specified, sfreq is the  
frequency with significant phase. Units are Hertz. Default  
= 1.0.  
complex Boolean. Specifies that pert is complex valued. Default =  
1.  
pnorm  
Scalar valued. Specifies the norm of the resulting system.  
Default = 1.  
Outputs:  
pert  
Constructed perturbation  
Description  
Creates a perturbation of the structure specified by blk. By default this is a complex  
valued matrix. The sys keyword will create an allpass Dynamic System. sfreq is used  
to specify a frequency (in Hertz) where there is significant phase in the system.  
This function is used to construct random perturbations, the effects of which can be  
studied by simulation. Dynamic perturbations are appropriate for simulating the effects  
of unmodeled dynamics. In such cases, the crossover frequency, or a frequency where mu  
is large, are good choices.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Example  
The use of randpert is studied in context in the on-line help for musynfit and the  
manual documentation for musynfit (page 299).  
Download from Www.Somanuals.com. All Manuals Search And Download.  
randsys  
Syntax  
sys = randsys (nstates,noutputs,ninputs,{keywords})  
Parameter List  
Inputs:  
nstates  
number of states in sys  
number of outputs in sys  
number of inputs in sys  
noutputs  
ninputs  
Keywords: stable  
Boolean. sys is forced to be stable (default = 1)  
oscillatory Boolean. Oscillatory poles are allowed. (default = 1). !os-  
cillatory gives only real eigenvalues (continuous) or positive  
real eigenvalues (discrete).  
discrete  
dt  
Boolean. Generate a discrete time system. (default = 0).  
Sample period for discrete time system (default =  
1/(2*Fmax)).  
Fmax  
Fmin  
upper bound of sys pole frequencies (Hz) (default = 10 Hz  
or = 1/(2*dt) if dt specified)  
lower bound of sys poles frequencies (Hz) (default =  
Fmax/100 Hz)  
Dterm  
Select a random D term (default = 1: a D term is choosen)  
linear dist linear distribution of poles. The default is uniform (or  
normal) distribution on a log frequency axis. A linear fre-  
quency axis distribution may be more representative of  
some systems.  
Outputs:  
sys  
Random Dynamic System  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
A random system, with user specified state, input and output dimension, is generated.  
Several additional features can be specified by keywords: whether or not the system is  
stable, where or not it can contain oscillatory modes, whether or not it has a D term,  
and bounds on the minimum and maximum pole frequencies.  
If the discrete keyword is specified, a bilinear transformation is performed to get the  
random discrete system. A sample time can be specified with dt.  
Examples  
sys1 = randsys(4,1,2,{stable,!oscillatory,...  
Fmin=0.1,Fmax=10})  
size(sys1)?  
ans (a row vector) =  
rifd(sys1)?  
1
2
4
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-2.7920e+00  
-5.2688e+00  
-5.6953e+00  
-5.3738e+01  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
2.7920e+00  
5.2688e+00  
5.6953e+00  
5.3738e+01  
1.0000  
1.0000  
1.0000  
1.0000  
Zeros:  
sys2= randsys(10,1,1,{stable,oscillatory,Fmin=0.1,...  
Fmax=1,!Dterm})  
rifd(sys2)?  
Poles:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0408e+00  
-1.1390e+00  
-2.8050e-01  
-2.8050e-01  
-1.5337e+00  
-5.5566e-01  
-5.5566e-01  
-3.1454e+00  
-5.6798e+00  
-6.1039e+00  
0.0000e+00  
0.0000e+00  
-1.4858e+00  
1.4858e+00  
0.0000e+00  
-1.6958e+00  
1.6958e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
1.0408e+00  
1.1390e+00  
1.5120e+00  
1.5120e+00  
1.5337e+00  
1.7845e+00  
1.7845e+00  
3.1454e+00  
5.6798e+00  
6.1039e+00  
1.0000  
1.0000  
0.1855  
0.1855  
1.0000  
0.3114  
0.3114  
1.0000  
1.0000  
1.0000  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-8.6788e-02  
-8.6788e-02  
-1.0395e+00  
-1.5152e+00  
-6.3796e-01  
-6.3796e-01  
-3.1425e+00  
-5.8916e+00  
-5.8916e+00  
-1.0161e+00  
1.0161e+00  
0.0000e+00  
0.0000e+00  
-1.9633e+00  
1.9633e+00  
0.0000e+00  
1.5472e-01  
-1.5472e-01  
1.0198e+00  
1.0198e+00  
1.0395e+00  
1.5152e+00  
2.0643e+00  
2.0643e+00  
3.1425e+00  
5.8937e+00  
5.8937e+00  
0.0851  
0.0851  
1.0000  
1.0000  
0.3090  
0.3090  
1.0000  
0.9997  
0.9997  
fHz = logspace(0.01,100,100)  
sys1g = freq(sys1,fHz)  
sys2g = freq(sys2,fHz)  
gph1 = ctrlplot([sys1g,sys2g],{bode});  
gph1 = plot(gph1,{legend=["sys1 (input 1)";...  
"sys1 (input 2)";"sys2"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
10  
1
0.1  
sys1 (input 1)  
sys1 (input 2)  
sys2  
0.01  
0.001  
0.01  
0.1  
1
10  
100  
Frequency  
20  
0
-20  
-40  
-60  
-80  
-100  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sys3 = randsys(6,1,1,{discrete,dt=5})  
rifd(sys3)?  
Poles:  
radius  
angle  
(radians)  
0.1652  
0.0000  
0.0000  
-0.0394  
0.0394  
-0.2163  
0.2163  
0.4580  
0.7872  
0.7872  
0.9307  
0.9307  
Zeros:  
radius  
angle  
(radians)  
0.1623  
0.7981  
0.6658  
0.8921  
0.8921  
15.4278  
0.0000  
0.0000  
0.0000  
-0.1981  
0.1981  
3.1416  
Download from Www.Somanuals.com. All Manuals Search And Download.  
rifd  
Syntax  
[stat] = rifd(vec,{discrete,Hertz,degrees})  
Parameter List  
Inputs:  
vec  
complex valued vector (or Dynamic System - see below).  
Keywords: discrete Boolean. Vector is to be interpreted in the z domain,  
rather than the s domain. Default = 0.  
Hertz  
Boolean. Display frequency units in Hertz on the s plane.  
!Hertz gives a display in radians/sec. Default = 0.  
degrees Boolean. Display angle in degrees for z plane. !degrees  
gives a display in radians. Default = 0.  
Outputs:  
stat  
Status. stat = 1 if an error occurs.  
Description  
Displays complex valued vectors in terms of s or z domain properties. The primary use  
is for interpreting the output of poles or zeros in engineering units.  
For the s domain, the real and imaginary parts and frequency and damping are  
displayed.  
For the z domain, the pole radius and angle are displayed. Note that the angle is  
actually the normalized frequency (radians/sample).  
If vec is a Dynamic System, the poles and zeros are calculated and displayed. This is  
a useful shorthand for the most common usage: rifd(poles(system)). In this case  
there is no need to specify the discrete keyword as this is be determined directly from  
the Dynamic System.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Examples  
sys1 = randsys(4,3,2,{stable})  
rifd(sys1)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.6847e+00  
-2.4383e+00  
-8.7457e+00  
-1.5041e+01  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
1.6847e+00  
2.4383e+00  
8.7457e+00  
1.5041e+01  
1.0000  
1.0000  
1.0000  
1.0000  
Zeros:  
ans (a scalar) =  
0
# Compare rifd to A matrix eigenvalues  
[a,b,c,d] = abcd(sys1)  
Aeigs = eig(a)?  
Aeigs (a column vector) =  
-1.68474  
-2.43829  
-8.7457  
-15.0408  
rifd(Aeigs)  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.6847e+00  
-2.4383e+00  
-8.7457e+00  
-1.5041e+01  
0.0000e+00  
0.0000e+00  
0.0000e+00  
0.0000e+00  
1.6847e+00  
2.4383e+00  
8.7457e+00  
1.5041e+01  
1.0000  
1.0000  
1.0000  
1.0000  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sys2 = randsys(3,3,2,{stable,discrete})  
rifd(sys2)  
Poles:  
radius  
angle  
(radians)  
0.9641  
0.2985  
0.2985  
0.0000  
-0.5348  
0.5348  
Zeros:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sdtrsp  
Syntax  
[v,y,u] = sdtrsp(Sys,dSys,w,tfinal,...  
{ord,intstep,cdelay})  
Parameter List  
Inputs:  
Sys  
Continuous dynamic system. This is the upper system in  
the LFT. The initial states are used in the simulation.  
Digital dynamic system. Lower system in the LFT. The  
initial states are used in the simulation.  
dSys  
w
PDM. Input signal.  
tfinal  
Final time in the simulation (optional). Default = max  
time specified in w.  
Keywords: ord  
Scalar valued. Specifies order of interpolation for continu-  
ous signals in the system. Options are 0 or 1. Default =  
0.  
intstep Scalar valued. Integration step size. If not supplied a  
default will be calculated based on the system eigenvalues.  
It will be rounded to make it divide into the discrete system  
sample time by an integer value of at least 2.  
cdelay Scalar value. Delay implemented at the output to dSys.  
(in sec.) Optional, default = 0. It must be less than the  
digital system sample time.  
Outputs:  
v
y
u
Signal from upper system in the LFT.  
Signal into lower system in the LFT.  
Signal out of the lower system in the LFT.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
Time domain simulation of a sampled data interconnection. The applicable closed loop  
system is illustrated below.  
v
w
Sys  
y
u
-
dSys  
This is conceptually the equivalent of:  
v = starp(Sys, dSys) w.  
This function will handle interconnections in which the continuous time signals are not  
necessarily synchronized with the digital system. Computation delays which are a  
fraction of the sample period may also be simulated. The following equations represent  
the discrete system,  
z(kT + T )  
=
=
Adz(kT ) + Bdy(kT )  
u(kT + cdelay)  
Cdz(kT ) + Ddy(kT )  
For delays of greater than a sample period append additional states to dSys to model the  
integer sample period part of the delay. Use cdelay to model the fractional remainder.  
The actual calculation is performed with a fast discrete time equivalent. Intstep is the  
fast integration step size. The input vector, w will be interpolated to the same step size.  
Either a zero or first order interpolation is used, depending on the keyword ord. If ord =  
0 a zero-order hold equivalent is used for the continuous plant. In the ord = 1 case a  
Download from Www.Somanuals.com. All Manuals Search And Download.  
triangle hold equivalent is used. This is the same a linearly connecting the samples at  
the input to the hold.  
Some care is needed in the choice of cdelay and intstep. The default for intstep is based  
on the continuous system eigenvalues and the minimum time spacing in the input vector,  
w. It will be forced to be an integer divisor of the digital sample time. Intstep must also  
be a divisor of cdelay. The user can inadvertently force a very small integration period  
by selecting cdelay without regard to the sample period. Warnings are printed if this is  
suspected to be the case.  
The upper LTF block (continuous sytem) can be a constant matrix. The lower block  
(digital system) must be a discrete dynamic system in order to specify the sampling  
time. If a constant gain digital system is required specify it with,  
dSys = system([], [], [], Dd, T).  
Example:  
# Consider a continuous time plant,  
P = 1/makepoly([1,0,-0.05],"s")  
[a,b,c,d] = abcd(P)  
P = system(a,b,c,d)  
T = 1/20  
# sample period  
# The following digital controller is used.  
# The first input is the reference and the # second is the  
measurement.  
digC = system([-1.5,T/4; -2/T,-.5],[.5,2;1/T,1/T],...  
[-1/T^2,-1.5/T], [1/T^2,0],T)  
# Now consider a sample & hold version of P and  
# check that the closed loop digital system is stable  
# and has a reasonable step response.  
digP = discretize(P,T,exponential)  
snm = ["digP"; "digC"]  
Download from Www.Somanuals.com. All Manuals Search And Download.  
inps = "ref"  
outs = "digP"  
cnx = ["digC"; ...  
"[ ref;digP]"]  
# input to digP  
# input to digC  
digclp = sysic(snm,inps,outs,cnx,digP,digC)  
# Calculate the digital system step response  
time = [0:T:20*T]  
step = gstep(time,0,1)  
digy = digclp*step  
# Do a complete sampled data simulation. We  
# will assume that the controller has an input to  
# output calculation delay of 0.1*T. The  
# plant will also have a non-zero initial  
# condition and a sinusoidal disturbance will  
# be imposed at the output. The disturbance has  
# deliberately been chosen at above the Nyquist  
# frequency.  
#P = system(P,x0=[0.25;0])  
calcdelay = 0.1*T  
# initial condition  
# calculation delay  
finetime = [0:0.005:1]  
dist=0.25*gsin(finetime,frequency=11) # disturbance  
step = gstep(finetime,0,1) # step  
# calculate the continuous time part of the  
# system as the upper LFT object.  
ctssys = consys([0,1,1;1,0,0;0,1,1])*daug(1,1,P)  
ctssys = system(ctssys,x0=[0.25;0])  
ctsy = sdtrsp(ctssys,digC,[step;dist],...  
cdelay=calcdelay)  
gph1 = ctrlplot(ctsy);  
gph1 = plot(gph1,digy,{line=0,marker=1,...  
legend= ["sampled data calc.";"discrete calc."]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4
3
sampled data calc.  
discrete calc.  
2
1
0
-1  
-2  
0
0.2  
0.4  
0.6  
0.8  
1
Download from Www.Somanuals.com. All Manuals Search And Download.  
See Also  
trsp  
Download from Www.Somanuals.com. All Manuals Search And Download.  
simtransform  
Syntax  
out = simtransform(sys,X)  
Parameter List  
Inputs:  
sys Input system. This may be a state-space system, pdm or  
constant matrix.  
X
Similarity transform. X must be invertible  
Outputs: out output system - in the same class as the input.  
Description  
Apply a similarity transform to sys. If sys is a matrix or pdm this gives out =  
inv(X)*sys*X. If sys is a Dynamic System this transform is applied to the state.  
Applying this transform to a transfer function is meaningless as a state matrix has not  
been uniquely defined. This will return a warning and leave the transfer function  
unchanged.  
This command will remove the state names as they no longer have any meaning.  
Example  
sys1 = randsys(3,1,1,{stable})  
rifd(sys1)  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
Download from Www.Somanuals.com. All Manuals Search And Download.  
-1.9737e+01  
-9.7569e+00  
-9.7569e+00  
0.0000e+00  
-2.9129e+01  
2.9129e+01  
1.9737e+01  
3.0720e+01  
3.0720e+01  
1.0000  
0.3176  
0.3176  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-2.1990e+01  
-9.7962e+00  
-9.7962e+00  
0.0000e+00  
-2.9186e+01  
2.9186e+01  
2.1990e+01  
3.0786e+01  
3.0786e+01  
1.0000  
0.3182  
0.3182  
[a,b,c,d] = abcd(sys1)  
# Do a schur transform on the A matrix  
# and use for a similarity transform on the system.  
[as,X] = schur(a,{real})  
sysout = simtransform(sys1,X)?  
sysout (a state space system) =  
A
-19.737  
3.66249  
-9.75694  
-17.1748  
4.10895  
49.404  
-9.75694  
0
-8.88178e-16  
B
1.11535  
0.042032  
-0.151334  
C
1.17657  
-0.369351  
-0.163514  
D
0.566721  
Download from Www.Somanuals.com. All Manuals Search And Download.  
X0  
0
0
0
Input Names  
-----------  
Input 1  
Output Names  
------------  
Output 1  
System is continuous  
Download from Www.Somanuals.com. All Manuals Search And Download.  
spectrad  
Syntax  
out = spectrad(mat)  
Parameter List  
Inputs:  
mat Square matrix or pdm.  
Outputs: out spectral radius of the input.  
Description  
Calculates the spectral radius (magnitude of the maximum eigenvalue) of the input  
matrix.  
Example  
pdm1 = randpdm(3,2,2,{zeromean})?  
pdm1 (a pdm) =  
domain |  
Col 1  
Col 2  
-------+------------------------------  
0 | Row 1  
| Row 2  
0.0504605 -0.0914956  
0.221744 -0.0231464  
-------+------------------------------  
1 | Row 1  
0.139306  
0.496387  
| Row 2 -0.342521  
0.0350694  
-------+------------------------------  
2 | Row 1 -0.287094 0.0591451  
| Row 2 -0.0695034 -0.477195  
-------+------------------------------  
Download from Www.Somanuals.com. All Manuals Search And Download.  
eig(pdm1)?  
ans (a pdm) =  
domain |  
-------+-------------------------------  
0 | Row 1  
| Row 2  
0.013657 + 0.137601 j  
0.013657 - 0.137601 j  
-------+-------------------------------  
1 | Row 1  
| Row 2  
0.0871876 + 0.409031 j  
0.0871876 - 0.409031 j  
-------+-------------------------------  
2 | Row 1 -0.311974  
| Row 2 -0.452314  
-------+-------------------------------  
spectrad(pdm1)?  
ans (a pdm) =  
domain |  
-------+-----------  
0 |  
-------+-----------  
1 | 0.41822  
-------+-----------  
2 | 0.452314  
-------+-----------  
0.138277  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sresidualize  
Syntax  
sysout = sresidualize(sysin,ord)  
Parameter List  
Inputs:  
sysin  
ord  
Input Dynamic System  
Order of sysout  
Outputs: sysout output Dynamic System  
Description  
Residualize the states of sysin to the number specified by ord. The last nxord states  
(nx is the number of states in sysin) are residualized. If ord is greater than the number  
of states in sysin then sysout = sysin and a warning is displayed. sysin may be a  
constant matrix, in which case it is treated as a system with zero states.  
Example  
# Create a five state system for reduction.  
a = daug(-0.891334,[-1.20857,0.799042;-0.799042,-1.20857],...  
-4.74685,-21.3013)  
b = [0.0262569;-0.189601;-0.113729;0.211465;-0.538239]  
c = [0.120725,-0.336942,0.397198,-0.700524,-1.02235]  
d = 0  
sys1 = system(a,b,c,d)  
# Reduce to a 3 state system by residualization  
# and truncation.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sysout1 = sresidualize(sys1,3)  
sysout2 = truncate(sys1,3)  
fHz = logspace(0.01,100,100)  
sys1g = freq(sys1,fHz)  
sysout1g = freq(sysout1,fHz)  
sysout2g = freq(sysout2,fHz)  
residerror = sys1g - sysout1g  
truncerror = sys1g - sysout2g  
gph1 = ctrlplot([sys1g,sysout1g,sysout2g,residerror,...  
truncerror],{logmagplot});  
gph1 = plot(gph1,{!grid,legend=["original system";...  
"residualized system";"truncated system";...  
"residualization error";"truncation error"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0.1  
0.01  
0.001  
0.0001  
1e-05  
original system  
residualized system  
truncated system  
residualization error  
truncation error  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See also  
rifd, simtransform, orderstate modalstate, truncate.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
starp  
Syntax  
out = starp (upper,lower,dim1,dim2,skipChks)  
Parameter List  
Inputs:  
upper  
Upper object (Dynamic System, constant or pdm) in the  
interconnection  
lower  
dim1  
Lower object in the interconnection.  
The number of outputs of upper to be connected as inputs  
to lower. (Optional - see description for default)  
dim2  
The number of outputs of lower to be connected as inputs  
to upper. (Optional - see description for default)  
Keywords: skipChks (Boolean, default = 0). Don’t check input arguments – this  
includes type (Dynamic System, pdm) consistency and  
fractional well posedness. For pdms, the well posedness  
test may involve significant computation.  
Outputs:  
out  
Resulting interconnection.  
Description  
Connects two objects in a Redheffer “star product,” as illustrated in the following  
diagram.  
This results in the following system.  
Constant matrices can be interconnected with either pdms or dynamical systems. As  
expected a Dynamic System and a pdm cannot be interconnected in this way.  
If dim1 and dim2 are omitted, it is assumed that a linear fractional transformation is  
Download from Www.Somanuals.com. All Manuals Search And Download.  
specified. This is equivalent to:  
dim1 = min(upper output dim, lower input dim)  
and  
dim2 = min(upper input dim, lower output dim).  
Examples  
# Look at a constant matrix,  
M = random(4,4)  
lower = [3,4]  
# The interconnected LFT will have 2 rows and 3 columns  
result = starp(M,lower)?  
result (a rectangular matrix) =  
0.261939  
-0.648616  
-0.558202  
-1.11273  
0.484644  
0.107883  
# This is equivalent to:  
M11 = M(1:2,1:3)  
M12 = M(1:2,4)  
M21 = M(3:4,1:3)  
M22 = M(3:4,4)  
M11 + M12*lower*inv(eye(2,2)-M22*lower)*M21?  
ans (a rectangular matrix) =  
0.261939  
-0.648616  
-0.558202  
-1.11273  
0.484644  
0.107883  
# A much more common usage is to provide an interconnection  
Download from Www.Somanuals.com. All Manuals Search And Download.  
# structure for closing control loops. The following is  
# the structure for a simple unity gain negative feedback  
# system with plant P.  
P = 1/makepoly([1,1],"s")  
M = consys([0,1;1,-1])*daug(1,P)  
# Test this with a Proportional and PI controller  
Kp = 10  
KpInt = makepoly([10,100],"s")/makepoly([1,0],"s")  
rifd(starp(M,Kp))  
Poles:  
# look at poles and zeros  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.1000e+01  
Zeros:  
0.0000e+00  
1.1000e+01  
1.0000  
rifd(starp(M,KpInt))  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.5000e+00  
-5.5000e+00  
-8.3516e+00  
8.3516e+00  
1.0000e+01  
1.0000e+01  
0.5500  
0.5500  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
Download from Www.Somanuals.com. All Manuals Search And Download.  
-1.0000e+01  
0.0000e+00  
1.0000e+01  
1.0000  
# Now consider the system with an output multiplicative  
# perturbation (of 10%)  
W = consys(0.1)  
G = daug(W,1,1)*consys([0,0,1;1,0,1;-1,1,-1])*daug(1,1,P)  
# The nominal system is constructed by closing the  
# upper loop with 0. Any thing else is a perturbed  
# system.  
Gnom = starp(0,G)  
Gpert = starp(-1,G)  
# Now examine the closed loop affects for the PI  
# controller.  
rifd(starp(Gnom,KpInt))  
Poles:  
# same as before  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.5000e+00  
-5.5000e+00  
-8.3516e+00  
8.3516e+00  
1.0000e+01  
1.0000e+01  
0.5500  
0.5500  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0000e+01  
0.0000e+00  
1.0000e+01  
1.0000  
rifd(starp(Gpert,KpInt))  
# perturbation moves the poles.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Poles:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-5.0000e+00  
-5.0000e+00  
-8.0623e+00  
8.0623e+00  
9.4868e+00  
9.4868e+00  
0.5270  
0.5270  
Zeros:  
real  
imaginary  
frequency  
(rad/sec)  
damping  
ratio  
-1.0000e+01  
0.0000e+00  
1.0000e+01  
1.0000  
Download from Www.Somanuals.com. All Manuals Search And Download.  
substr  
Syntax  
littlestring = substr(bigstring,charindex,{skipChks})  
Parameter List  
Inputs:  
bigstring  
Input string (a 1×1 string matrix)  
vector indexing the characters to be returned in the output.  
charindex  
Keywords: skipChks  
Boolean specifying that syntax checking is to be skipped.  
Outputs:  
littlestring Output string  
Description  
substr takes characters from the string, bigstring and concatentates them to from the  
output, littlestring. The vector, charindex, determines the characters and their  
order.  
This function allows the user to select substrings from an input string. However, as  
shown in the example, there is no requirement that the characters specified in charindex  
be contiguous or non-repeated.  
To find a specified character in a string use the function: index.  
Example  
alphabet = " abcdefghijklmnopqrstuvwxyz"  
mantra = substr(alphabet,[14,22,1,19,22,13,6,20])?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
sysic  
Syntax  
[sys] = sysic(sysNames,sysInputs,sysOutputs,sysConnects,...  
subsys1,subsys2,...)  
Parameter List  
Inputs:  
sysNames  
sysInputs  
A vector of strings (of the same length as the number of  
subsystems) naming the subsystems.  
A vector of strings naming the exogenous inputs to the  
final system. Each named input must be a different row  
— however parenthesis can be used to denote vector valued  
input names.  
sysOutputs  
A vector of strings defining the exogenous outputs of the  
final system. These are defined in terms of input names or  
subsystem outputs.  
sysConnects A vector of strings (of the same length as the number of  
subsystems) defining the input to each subsystem.  
subsys1  
Subsystems to be connected. The subsystems can be com-  
binations of matrices and dynamic systems or combina-  
tions of matrices and pdms.  
.
.
.
Outputs: sys  
The interconnected system, which can be either a dynamic  
system, a pdm, or a matrix depending on the subsystems.  
Description  
sysic interconnects subsystems to form a single, larger system. The interconnection  
specification strings and the actual subsystems are passed as arguments to sysic. In  
this context, systems can be either Dynamic Systems or pdms. An interconnection  
with both Dynamic Systems and pdms is not well defined and will generate an error.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Matrices can also be included in the interconnection and are considered to be constant  
gains when connected with Dynamic Systems and considered to be constant for all  
domain values when connected with pdms.  
sysic is able to connect linear systems together. For more complete interconnection and  
simulation capabilities SystemBuild should be used.  
Limitations  
Only 20 subsystems can be interconnected with a single sysic call.  
Example  
# A standard unity gain negative feedback system  
# is set up. To illustrate some of the capabilities  
# an output noise and plant input disturbance are also  
# added. The output signals are the plant output,  
# controller effort and 10 x reference error.  
p = 1/makepoly([1,0.1,1],"s")  
c = makepoly([1,1],"s")/makepoly([1,10],"s")  
snames = ["p";  
"c"]  
# name for subsystem 1  
inputs = ["ref";  
# the name is arbitrary  
"dist(2)"]  
outputs = ["p + dist(1)";  
"c";  
# this input is a dim 2 vector  
# note reference to first dist input  
"10*ref - 10*p"] # linear combinations can be used  
conx = ["c + dist(2)"; # input to snames(1), i.e. "p"  
"ref - p - dist(1)"] # input to "c"  
clp = sysic(snames,inputs,outputs,conx,p,c)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
trsp  
Syntax  
[y,uint] = trsp(Sys,u,tfinal, ord,intstep)  
Parameter List  
Inputs:  
Sys  
Continuous dynamic system. The initial states are used in  
the simulation.  
PDM. Input signal.  
u
tfinal  
Final time in the simulation (optional). Default = max  
time specified in u.  
Keywords: ord  
Scalar valued. Specifies order of interpolation for continu-  
ous signals in the system. Options are 0 or 1. Default =  
0.  
intstep Scalar valued. Integration step size. If not supplied a  
default will be calculated based on the system eigenvalues.  
It will be rounded to make it divide into the discrete system  
sample time by an integer value of at least 2.  
Outputs:  
y
PDM. Output signal.  
uint  
Interpolated version of u.  
Description  
Time domain simulation of a continuous system. This is conceptually the equivalent of:  
y = Sys u.  
This function allows the user more control over the parameters in the simulation.  
The user can select an integration step (intstep) independently of the data spacing in  
u. Furthermore, the spacing of u can be non-regular and u will be interpolated if  
Download from Www.Somanuals.com. All Manuals Search And Download.  
necessary. If intstep is not specified the integration stepsize is determined from the  
system eigenvalues and the minimum spacing in the input signal, u.  
A zero or first order discrete equivalent of the systems can be specified. The standard  
Xmath * operator uses only a zero order discretization. The first order simulation  
actually uses a triangle hold equivalent. This is equivalent to connecting the samples  
going into the hold function. Although the continuous time hold is noncausal the  
discrete state-space system is causal. This is often more accurate at higher frequencies.  
Examples  
# We will use trsp to simulate the output of  
# a second order system for various inputs  
P = 400/makepoly([1,10,400],"s")  
time = [0:0.25:2]  
u = gstep(time,time,[0,1,0,-1,0,1,0,-1,0])  
# Examine the standard Xmath simulation  
y = P*u  
gph1 = ctrlplot(y);  
gph1 = plot(u,gph1,{marker=1,line=0,legend=["output";"input"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1.5  
1
0.5  
0
-0.5  
output  
input  
-1  
-1.5  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Compare trsp calculation to standard  
[ytrsp,uint] = trsp(P,u)  
gph2 = ctrlplot(ytrsp);  
gph2 = plot(y,gph2,{line style=4});  
gph2 = plot(u,gph2,{line=0,marker=1});  
gph2 = plot(uint,gph2,{line style=3,legend=["trsp calc.";...  
"* calc.";"input";"interpolated input"],title=...  
"Time response calculation comparisons"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Time response calculation comparisons  
1.5  
1
0.5  
0
-0.5  
trsp calc.  
* calc.  
input  
-1  
interpolated input  
-1.5  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
# Now look at 1st order interpolation  
[y1trsp,u1int] = trsp(P,u,{ord=1})  
gph3 = ctrlplot([y1trsp,u1int]);  
gph3 = plot(u,gph3,{line=0,marker=1,legend=...  
["1st order interpolation";...  
"interpolated input";"input data"],title=...  
"Time response calculation comparisons"})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Time response calculation comparisons  
1.5  
1st order interpolation  
interpolated input  
input data  
1
0.5  
0
-0.5  
-1  
-1.5  
0
0.5  
1
1.5  
2
Download from Www.Somanuals.com. All Manuals Search And Download.  
truncate  
Syntax  
sysout = truncate(sysin,ord)  
Parameter List  
Inputs:  
sysin  
ord  
Input Dynamic System  
Order of the truncated system: sysout  
Outputs: sysout Truncated output Dynamic System  
Description  
The function truncate is cross-licensed from the model reduction toolbox and has  
slightly more capabilities than those described here. See the online help for further  
details.  
Consider a partitioning of the input Dynamic System, sysin, as follows.  
A11 A12 B1  
A21 A22 B2  
sysin =  
,
C1 C2  
D
where A11 is of dimension ord × ord. The truncated output Dynamic System, sysout  
is simply,  
A11 B1  
C1  
sysin =  
.
D
Download from Www.Somanuals.com. All Manuals Search And Download.  
Example  
This example is identical to that described for sresidualize and compares the two  
methods of model reduction.  
# Create a five state system for reduction.  
a = daug(-0.891334,[-1.20857,0.799042;-0.799042,-1.20857],...  
-4.74685,-21.3013)  
b = [0.0262569;-0.189601;-0.113729;0.211465;-0.538239]  
c = [0.120725,-0.336942,0.397198,-0.700524,-1.02235]  
d = 0  
sys1 = system(a,b,c,d)  
# Reduce to a 3 state system by residualization  
# and truncation.  
sysout1 = sresidualize(sys1,3)  
sysout2 = truncate(sys1,3)  
fHz = logspace(0.01,100,100)  
sys1g = freq(sys1,fHz)  
sysout1g = freq(sysout1,fHz)  
sysout2g = freq(sysout2,fHz)  
residerror = sys1g - sysout1g  
truncerror = sys1g - sysout2g  
gph1 = ctrlplot([sys1g,sysout1g,sysout2g,residerror,...  
truncerror],{logmagplot});  
gph1 = plot(gph1,{!grid,legend=["original system";...  
"residualized system";"truncated system";...  
"residualization error";"truncation error"]})?  
Download from Www.Somanuals.com. All Manuals Search And Download.  
0.1  
0.01  
0.001  
0.0001  
1e-05  
original system  
residualized system  
truncated system  
residualization error  
truncation error  
0.01  
0.1  
1
10  
100  
Frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
See also  
rifd, simtransform, sresidualize, orderstate modalstate.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6.2 Xµ Subroutines and Utilities  
Several subroutines may also be of interest to the user. These subroutines typically  
perform self contained parts of a calculation. They may be of interest to those  
developing new robust control algorithms or wishing to study the calculation details of  
the algorithms given here. Beware of the fact that these subroutines may not contain  
error checking.  
These subroutines are included in alphabetical order and are cross-referenced by their  
calling functions in the following list.  
hinfsyn subroutines  
hinfcalc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381  
riccati eig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387  
riccati schur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389  
mu subroutines  
blkbal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379  
powermu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385  
Download from Www.Somanuals.com. All Manuals Search And Download.  
blkbal  
Syntax  
d = blkbal(M)  
Description  
Balances a square matrix assuming only scalar blocks. The Osborne method (growth  
rate: n2) is used for large systems and the Perron method (growth rate: n3) for smaller  
systems. The Perron method will exactly calculate mu for positive matrices.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
hinfcalc  
Syntax  
[X,Y,f,h,Ric fail,HX,HY,HXmin,HYmin] = ...  
hinfcalc(p,nmeas,ncon,g,epr,{keywords})  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Parameter List  
Inputs:  
p
Generalized interconnection structure (Dynamic Sys-  
tem)  
nmeas  
ncon  
g
measurement vector dimension.  
control vector dimension.  
H
norm of suboptimal controller to be calculated. Re-  
ferred to in the literature as gamma.  
Tolerance for determining when the Hamiltonian eigenval-  
ues lie on the -axis.  
epr  
Keywords: schur solution real Schur decomposition for Riccati solution (default)  
eig solution  
eigendecomposition for Riccati solution.  
Outputs:  
X
Riccati solution  
Riccati solution  
status of solution:  
Y
Ric fail  
0
1
2
Solution found.  
axis eigenvalues in Hamiltonian  
Unequal number of +ve & -ve eigenvalues in  
Hamiltonian. This represents a numerical failure  
in the eigenvalue ordering.  
3
Both of the above errors detected.  
f
Intermediate calculation for scaling and normalization  
Intermediate calculation for scaling and normalization  
X Hamiltonian  
h
HX  
HY  
Y Hamiltonian  
HXmin  
Minimum absolute value of the real part of the X Hamilto-  
nian eigenvalues. In other words, how close to the axis  
the eigenvalues lie.  
HYmin  
Minimum absolute value of the real part of the Y Hamil-  
tonian eigenvalues.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
Form and solve the Riccati equations for the H control problem. X and Y are the  
resulting Riccati solutions.  
THIS FUNCTION IS INTENDED ONLY AS A SUBROUTINE CALLED BY THE  
HINFSYN FUNCTION.  
*** NO ERROR CHECKING ***  
Download from Www.Somanuals.com. All Manuals Search And Download.  
powermu  
Syntax  
[lbnd,delta,errstat] = powermu(M,blk,rp,cp)  
Description  
Lower bound power algorithm based on the work of Andy Packard. The vector naming  
roughly corresponds to that in his thesis.  
*** NO ERROR CHECKING ***  
Download from Www.Somanuals.com. All Manuals Search And Download.  
riccati eig  
Syntax  
[x1,x2,stat,Heig min] = riccati eig(H,epp)  
Parameter List  
Inputs:  
H
Hamiltonian matrix.  
epp  
Tolerance for detecting proximity of eigenvalues to the jω  
axis.  
Outputs: x1,x2  
stat  
Basis vectors for stable subspace. See description below.  
Status flag.  
0
1
Stable subspace calculated.  
Failure to decompose into stable and  
unstable subspaces.  
Heig min Minimum absolute value of the real part of the eigenvalues  
of H.  
Description  
Solve the algebraic Riccati equation,  
A0X + XA + XRX Q = 0,  
by an eigenvalue decomposition method. The Hamiltonian, H, contains the Riccati  
equation variables in the matrix,  
A
Q
R
A0  
H =  
.
If H has no axis eigenvalues then there is an n dimensional (n = dim(A)) stable  
subspace of H. The vector, [x1 x2] spans that stable subspace and, if x1 is invertible, the  
Download from Www.Somanuals.com. All Manuals Search And Download.  
variable, X = x2x1 1, is the stabilizing solution to the Riccati equation.  
If H has axis eigenvalues then no stabilizing solution exists and the function returns a  
failure status. If any eigenvalue of H is within epp of the axis it is considered to lie on  
the axis and no solution is found. This may be due to numerical problems in finding  
the eigenvalues of poorly conditioned problems even when a stabilizing solution exists.  
See Also  
Riccati, riccati schur  
Download from Www.Somanuals.com. All Manuals Search And Download.  
riccati schur  
Syntax  
[x1,x2,stat,Heig min] = riccati schur(H,epp)  
Parameter List  
Inputs:  
H
Hamiltonian matrix.  
epp  
Tolerance for detecting proximity of eigenvalues to the jω  
axis.  
Outputs: x1,x2  
stat  
Basis vectors for stable subspace. See description below.  
Status flag.  
0
1
Stable subspace calculated.  
Failure to decompose into stable and  
unstable subspaces.  
Heig min Minimum absolute value of the real part of the eigenvalues  
of H.  
Description  
Solve the algebraic Riccati equation,  
A0X + XA + XRX Q = 0,  
by a real Schur decomposition method. The Hamiltonian, H, contains the Riccati  
equation variables in the matrix,  
A
Q
R
A0  
H =  
.
If H has no axis eigenvalues then there is an n dimensional (n = dim(A)) stable  
subspace of H. The vector, [x1 x2] spans that stable subspace and, if x1 is invertible, the  
Download from Www.Somanuals.com. All Manuals Search And Download.  
variable, X = x2x1 1, is the stabilizing solution to the Riccati equation.  
If H has axis eigenvalues then no stabilizing solution exists and the function returns a  
failure status. If any eigenvalue of H is within epp of the axis it is considered to lie on  
the axis and no solution is found. This may be due to numerical problems in finding  
the eigenvalues of poorly conditioned problems even when a stabilizing solution exists.  
See Also  
Riccati, riccati eig  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendices  
A Translation Between Matlab µ-Tools and Xµ  
This appendix outlines the functional equivalences between the Matlab µ-Tools and  
Xmath Xµ. The objective is to provide a smooth transition for users moving from  
µ-Tools to Xµ. We will assume that the reader is familiar with Matlab µ-Tools and the  
general operation of Xmath. The intent is that the overall functional capabilities are the  
same under either system and a prospective robust control designer chooses between  
Matlab, Xmath, or future matrix languages, on other issues (cost, support, software  
compatibility, etc.).  
There are enough similarities between µ-Tools and Xµ that one can move from one to the  
other without a great deal of additional learning. Most of the differences are syntactic.  
There is not always a direct function for function match between the two systems.  
The major differences are:  
The built-in data structures available with Xmath.  
The discrete-time system is available as an Xmath data object.  
Slightly different function names.  
The mu and musynfit functions handle the scaling and perturbation matrices in  
matrix, rather than coded vector, form.  
The implementation of the D-K iteration is slightly different.  
391  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The functionally equivalent commands will be listed, in each sub-section, for  
convenience. A more detailed discussion is given to illustrate the more subtle differences  
in the mu and D-K iteration aspects. More importantly, the Himat demo is available in  
both µ-Tools and Xµ. For a fast start on moving between platforms, study these demos  
side by side.  
A.1 Data Objects  
The underlying data structure in Matlab is the complex valued matrix, whereas in  
Xmath there various other objects available: polynomials, transfer functions, parameter  
dependent matrices, and dynamic systems.  
system/Dynamic System Functions  
The µ-Tools functions for creating and manipulating the systemmatrix have no Xµ  
equivalent as the underlying Xmath operators can directly handle the dynamic system  
and transfer function data objects.  
Also residing within the Xmath state-space object is the initial state. This is used  
primarily for time response calculations. It is debatable whether or not the initial state  
is an intrinsic attribute of the system as one frequently changes it for simulation. It does  
have the advantage of reducing the time response calculation to a simple multiplication  
and it can easily be changed without accessing all of the other system variables.  
The following table illustrates the equivalent functions, or indicates the data objects  
which provide the same functionality.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
µ-Tools Function Xmath/Xµ equivalent  
form system  
decompose system  
form system  
form system  
decompose system  
form system  
random system  
generate filters  
fit transfer functions drawmag  
pck  
unpck  
system  
abcd  
nd2sys  
zp2sys  
sys2pss  
pss2sys  
sysrand  
mfilter  
transfer function data objects  
transfer function data objects  
dynamic system data objects  
dynamic system data objects  
randsys  
butterworth, chebyshev  
fitsys, tfid  
The µ-Tools drawmag function provides an interactive graphical interface. There is  
currently no equivalent in Xµ. The equivalent underlying data fitting algorithm can be  
found in the Xµ function fitsys.  
varying/pdm Functions  
The equivalent functions for construction and manipulation of pdm data objects are  
shown below.  
Description  
µ-Tools Function Xmath/Xµ equivalent  
form varying  
break up varying vunpck  
vpck  
pdm  
makematrix  
get ivs.  
join varying  
sort by iv.  
select by iv. value  
select by index  
scale iv.  
getiv  
domain  
tackon  
sortiv  
xtract  
xtracti  
scliv  
concatseg, insertseg, mergeseg  
mergeseg  
extractseg, indexlist, find  
indexing by pdm(i)  
domain, pdm  
compare ivs.  
random varying  
indvcmp  
varyrand  
check  
randpdm  
As an aside, note that the sort function in Xmath sorts each column of each matrix in a  
pdm, rather than sorting the domain.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Subblocks: selecting input & outputs  
In µ-Tools the function sel selects rows and columns from a varying matrix or inputs  
and outputs from a system matrix. In Xmath these can be obtained by specifying row  
and column indexes. More flexibility of selecting parts of a pdm can be obtained by  
using the indexlist function.  
Augmentation  
Augmentation is the building of matrices from component pieces. The µ-Tools  
commands which perform these functions are given in the table below. For pdms or  
Dynamic Systems in Xmath these operations are generally performed identically to  
the equivalent matrix operation.  
Description  
µ-Tools Function Xmath/Xµ equivalent  
vertical augmentation  
horizontal augmentation sbs  
diagonal augmentation daug  
abv  
;
,
daug  
Algebraic Operations  
Similarly, algebraic operations on system or varying matrices in µ-Tools require a  
dedicated function. In the Xmath case the usual matrix operation suffices.  
Description  
µ-Tools Function Xmath/Xµ equivalent  
addition  
subtraction  
madd  
msub  
+
-
multiplication  
system scaling  
system scaling  
system scaling  
system inverse  
transpose  
mmult  
mscl  
sclin  
sclout  
minv  
*
*
*
*
inv  
*’  
transp  
conjugate transpose cjt  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Note that the transpose and conjugate transpose operators are defined differently for  
Matlab and Xmath.  
system/Dynamic System Functions  
The following functions perform useful manipulations to, or information about, the state  
of a system or Dynamic System.  
Description  
µ-Tools Function Xmath/Xµ equivalent  
calculate poles  
calculate zeros  
display poles  
spoles  
szeros  
rifd  
poles  
zeros  
rifd  
state similarity transform  
reorder state  
transform to modal format  
zero order hold equivalent  
statecc  
reordsys  
strans  
samhld  
simtransform  
orderstate  
modalstate  
discretize  
discretize  
Prewarped bilinear transform tustin  
varying/pdm Functions  
A large number of varying matrix operations have been written in µ-Tools. These are  
not required in the Xmath version as most of the functions operate on pdms as well as  
matrices. The following table lists these functions for µ-Tools and Xmath. These are  
only approximate functional equivalents — the more complicated functions differ in  
some important respects.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
µ-Tools Function Xmath/Xµ equivalent  
peak norm  
pkvnorm  
vabs  
norm, max  
abs  
diagonal  
round  
round  
imag  
real  
conj  
absolute value  
diagonal matrix  
round downwards  
round upwards  
imaginary part  
real part  
complex conjugate  
norm  
determinant  
eigenvalues  
vdiag  
vfloor  
vceil  
vimag  
vreal  
vconj  
vnorm  
vdet  
norm  
det  
eig  
veig  
inverse  
left division  
right division  
pseudo-inverse  
spectral radius  
singular values  
condition number  
vinv or minv  
vldiv  
vrdiv  
vpinv  
vrho  
inv  
\
/
pinv  
spectrad  
svd  
vsvd  
vrcond  
rcond or condition  
schur decomposition vschur  
schur  
expm  
interp or interpolate  
pdm(vector)  
matrix exponential  
interpolation  
decimation  
vexpm  
vinterp  
vdcmate  
vfft  
FFT  
fft  
inverse FFT  
spectral analysis  
vifft  
vspectrum  
ifft  
spectrum  
Beware of syntactical differences here. One obvious example is the order in which the  
eigenvalues and eigenvectors are returned from veig and eig. Note also the vrcond  
returns the inverse of the condition number whereas condition returns the condition  
number.  
The µ-Tools function vebe performs element-by-element function operations on a  
varying matrix. This has no counterpart in Xµ as the basic functions which operate on  
each element of a matrix (e.g. sin, cos, abs) are also defined on pdms in Xmath. For the  
same reason, the µ-Tools function veval has no Xµ counterpart: the Xmath execute  
command can be used to the same effect.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Miscellaneous Utilities  
Several utilities are provided in µ-Tools. These are subroutines used by other µ-Tools  
functions which may be of more general use.  
Description  
µ-Tools function Xmath/Xµ equivalent  
complex random number  
fit system to data  
Eigenvalue based Riccati solution ric eig  
Schur based Riccati solution ric schr  
crand  
fitsys  
randpdm  
fitsys  
riccati eig  
riccati schur  
A.2 Matrix Information, Display and Plotting  
Xmath provides matrix/data object size information via a variable window. There is no  
Matlab equivalent for this functionality. Command window information can be  
obtained via the following functions.  
Description  
matrix information minfo  
list workspace whos  
µ-Tools function Xmath/Xµ equivalent  
check, size, is  
who  
Plotting of varying matrices is provided by the Matlab µ-Tools function vplot. As  
pdms are a native data object in Xmath, the standard Xmath plot function will  
correctly plot a pdm. Multiple calls will overlay the data, even if the domains differ. The  
Xµ function ctrlplot is provided for more control specific plots: Bode, Nyquist,  
Nichols, log magnitude, etc..  
Both Matlab and Xmath allow interactive manipulation of the graphical data and  
storage and retrieval of plots from the workspace or the underlying file system.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
A.3 System Response Functions  
Creating Time Domain Signals  
The Xmath pdm data object allows the creation of time domain signals via standard  
and operators.  
Description  
µ-Tools function Xmath/Xµ equivalent  
cosine waveform  
sine waveform  
stair-step waveform step tr  
general waveform siggen  
cos tr  
sin tr  
cos  
sin  
gstep  
standard functions & operators  
Time Responses  
Xmath calculates time responses with the * operation. However, the Xµ function trsp  
provides significantly more functionality in the continuous time case. The equivalences  
are summarized below.  
Description  
µ-Tools function Xmath/Xµ equivalent  
continuous time response trsp  
trsp, *, deftimerange  
*
sdtrsp  
discrete time response  
sampled data response  
dtrsp  
sdtrsp  
Frequency Responses  
The relevant functions are shown below.  
Description  
frequency response frsp  
logarithmic vector logspace  
µ-Tools function Xmath/Xµ equivalent  
freq  
logspace  
The default frequency units in µ-Tools are radians/second whereas those in Xmath are  
Hertz. This applies generically to all commands where the user specifies frequency  
Download from Www.Somanuals.com. All Manuals Search And Download.  
information.  
A.4 System Interconnection  
Simple interconnection has already been outlined in the augmentation section above.  
The more complicated interconnection functions are almost identical in µ-Tools and Xµ.  
The only real difference is the calling syntax of sysic.  
Description  
µ-Tools function Xmath/Xµ equivalent  
Redheffer (star) product starp  
starp  
sysic  
system interconnection  
sysic  
A.5 Model Reduction  
The model reduction functions in Xµ are:  
Description  
µ-Tools function Xmath/Xµ equivalent  
residualization  
state truncation  
balanced realization  
sresid  
strunc  
sysbal  
sresidualize  
truncate  
balance  
Hankel norm reduction hankmr  
ophank  
The following frequency weighted model reduction functions have no equivalent in the  
current version of Xµ. It is intended to introduce this functionality in the next version.  
The functions are: sdecomp, sfrwtbal, sfrwtbld, sncfbal and srelbal.  
A.6 H2 and H Analysis and Synthesis  
The synthesis algorithms are identical and the syntax are similar.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
µ-Tools function Xmath/Xµ equivalent  
H2 norm calculation  
h2norm  
hinfnorm  
h2syn  
h2norm  
hinfnorm  
h2syn  
H
norm calculation  
H2 controller synthesis  
H
controller synthesis hinfsyn  
hinfsyn  
The major syntactical difference is that the Xµ functions do not return the closed loop  
system. This is easily calculated by a subsequent call to starp. The reason for this is  
that the D-K iteration changes typically involve a differently weighted closed loop  
system in subsequent operations. Having a separate calculation of the closed loop  
reduces the potential for confusion.  
The µ-Tools function hinffi has no Xmath/Xµ equivalent. This function calculates the  
full information H controller. hinfsyn solves the more general problem and is of more  
practical use in controller applications.  
A.7 Structured Singular Value (µ) Analysis and Synthesis  
The issue of whether or not the frequency domain variable is radian/second or Hertz  
arises here. Although this makes no difference to the calculation of µ is affects how the  
D scales and ∆ perturbations are interpolated. µ-Tools assumes that the frequency scale  
is radians/second. In Xµ the default assumption is Hertz. The reason for this is that  
Hertz is the default output of the frequency response calculation freq. In all cases  
where it makes a difference, the user can specify the keyword {!Hertz} to switch the  
meaning of the domain.  
Calculation of µ  
There is a difference in the returned variable format for the Xµ function mu. The  
Matlab function returns the D-scale and perturbations in coded vector form. The Xµ  
mu function returns both the D scale and its inverse in matrix form. The relevant  
functions are summarized below.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Description  
µ-Tools function Xmath/Xµ equivalent  
structured singular value mu  
mu  
D scale decoding  
unwrapd  
not required  
not required  
blknorm  
mkpert  
perturbation decoding  
block norm calculations  
rational perturbation  
random perturbations  
unwrapp  
blknorm  
dypert  
randel  
randpert  
In the Xµ mu function, only the default options of the µ-Tools mu calculations are  
available. In other words, a power iteration, with several random restarts, is used for the  
lower bound. The upper bound calculation uses an Osborne balancing method and  
enhances this with the Perron vector method for problems with less than 10 blocks.  
These methods have been found to be appropriate for the vast majority of practically  
motivated problems.  
New algorithms for these calculations are currently under development. The most  
significant enhancement is the ability to calculate µ with respect to structures which  
include real valued blocks. Because of the development effort in this direction, a wide  
range of calculation options were not provided for the current Xµ mu function.  
The scalar × identity block structure is not currently supported in the Xµ mu function.  
It will be included in the revised version discussed above.  
The D-K Iteration  
There is a significant difference in the way that Xµ handles the D-K iteration. The D  
scales are not incrementally factored into the previous iteration D-scales. Consider the  
initial design interconnection structure to be ic. An H design will produce the first  
controller: k1, using a function call like the following.  
k1 = hinfsyn(ic,nmeas,ncon,gamma)  
The closed loop system, obtained via  
g1 = starp(ic,k1)  
is then analyzed with mu. The typical function call is:  
Download from Www.Somanuals.com. All Manuals Search And Download.  
g1g = freq(g1,omega)  
[mubnds,Dmagdata] = mu(g1g,blk)  
From this, frequency domain D-scales are obtained, and a rational approximation is  
obtained via musynfit.  
[Dsys,Dinvsys] = musynfit(Dmagdata,blk,nmeas,nctrls,weight,g1g)  
A difference between the Xµ and µ-Tools implementations of musynfit is that, in the  
Xµ case, the inverse scaling system, Dinvsys, is generated by musynfit. Notice also  
that the previous D-scale fit is not passed as an argument.  
The new, D-scale weighted interconnection structure, ic2, is formed by,  
ic2 = Dsys*ic*Dinvsys  
A second design, k2, is now obtained with hinfsyn. Up to this point, the µ-Tools and  
Xµ procedures are essentially the same.  
The major difference is that the appropriate closed loop system is now formed with ic,  
not ic2. In other words,  
g2 = starp(ic,k2)  
Note that ic and ic2 differ only by the D-scales and therefore µ(g2) would be the same  
whether ic or ic2 were used for the closed loop system.  
Now mu is used to analyze the frequency response ofg2, giving rise to a new set of  
D-scales. Again, musynfit is used to fit state-space systems to these D-scales, giving  
rise to D2sys and D2invsys. Now the next interconnection structure, ic3, is formed by  
using these D-scales with the original interconnection. In command line form:  
ic3 = D2sys*ic*D2invsys  
Note that at each step, ic, is used to calculate the closed loop system, and also used to  
calculate the next design interconnection structure.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
The advantage of this is that in order to restart, or reproduce, an iteration, one need  
only save the previous controller. The µ-Tools approach requires saving the rational  
approximation to the previous D-scales. The controller is a more applicable data object  
to save and the saving of the previous D-scales depends on the quality of the rational  
approximation. The disadvantage is that the upper bound in the next µ calculation  
takes slightly longer as the closed-loop system does not have the numerical benefit of the  
effects of the previous D-scales. The speed difference is likely to be insignificant in  
practical problems.  
Fitting D Scales  
Rational transfer function fitting of magnitude data is required for the D-K iteration  
and has been mentioned above. The relevant functions are summarized here.  
Description  
µ-Tools function Xmath/Xµ equivalent  
fit D scale data  
phase calculation  
musynfit  
genphase  
musynfit  
mkphase  
transfer function fitting fitsys  
fitsys, tfid  
Note that the µ-Tools version of musynfit does not use the previous D scale magnitude  
data. This has implications in the D-K iteration and is discussed in more detail above.  
The alternative µ-Tools linear programming approach for D scale fitting, musynflp, is  
not supported in Xµ. Similarly, the underlying linear programming approach to transfer  
function fitting (µ-Tools functions fitmaglp, magdata) is not available in Xµ. The batch  
functionality of the µ-Tools function, muftbtch, is available in the Xµ version of  
musynfit.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Technical Support and Professional Services  
Visit the following sections of the National Instruments Web site at  
ni.comfor technical support and professional services:  
Support—Online technical support resources at ni.com/support  
include the following:  
Self-Help Resources—For immediate answers and solutions,  
visit the award-winning National Instruments Web site for  
software drivers and updates, a searchable KnowledgeBase,  
product manuals, step-by-step troubleshooting wizards, thousands  
of example programs, tutorials, application notes, instrument  
drivers, and so on.  
Free Technical Support—All registered users receive free Basic  
Service, which includes access to hundreds of Application  
Engineers worldwide in the NI Developer Exchange at  
ni.com/exchange. National Instruments Application Engineers  
make sure every question receives an answer.  
Training and Certification—Visit ni.com/trainingfor  
self-paced training, eLearning virtual classrooms, interactive CDs,  
and Certification program information. You also can register for  
instructor-led, hands-on courses at locations around the world.  
System Integration—If you have time constraints, limited in-house  
technical resources, or other project challenges, NI Alliance Program  
members can help. To learn more, call your local NI office or visit  
ni.com/alliance.  
If you searched ni.comand could not find the answers you need, contact  
your local office or NI corporate headquarters. Phone numbers for our  
worldwide offices are listed at the front of this manual. You also can visit  
the Worldwide Offices section of ni.com/niglobalto access the branch  
office Web sites, which provide up-to-date contact information, support  
phone numbers, email addresses, and current events.  
Download from Www.Somanuals.com. All Manuals Search And Download.  

Miller Electric Welding System ProHeat 35 User Manual
Miller Electric Welding System Welding User Manual
Multitech Modem MT5600ZDX User Manual
NEC Switch N8406 022A User Manual
Network Appliance Network Card Reseller Partner Program User Manual
Nilfisk ALTO Vacuum Cleaner 580 P User Manual
Omega Vehicle Security Thermometer HH506RA User Manual
Panasonic Cordless Telephone KX TGA641 User Manual
Panasonic DVD Player DVD F61 User Manual
Paradigm Speaker 270 User Manual