0% found this document useful (0 votes)
28 views

Manual of "The Robust LMI Parser" - Version 3.0

This document provides a manual for the Robust LMI Parser toolbox. It introduces linear matrix inequalities and their use in control theory applications involving uncertain systems. It describes how the toolbox can help automate the process of generating LMIs for parameter-dependent problems, avoiding tedious manual derivation. This allows robust stability analysis of systems with polytopic or multi-simplex parameter dependence to be performed through simple commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Manual of "The Robust LMI Parser" - Version 3.0

This document provides a manual for the Robust LMI Parser toolbox. It introduces linear matrix inequalities and their use in control theory applications involving uncertain systems. It describes how the toolbox can help automate the process of generating LMIs for parameter-dependent problems, avoiding tedious manual derivation. This allows robust stability analysis of systems with polytopic or multi-simplex parameter dependence to be performed through simple commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Manual of “The Robust LMI Parser” – Version 3.

0
Cristiano M. Agulhari∗, Alexandre Felipe†, Ricardo C. L. F. Oliveira†, and Pedro L. D. Peres†

October 29, 2018

Abstract
The ROLMIP (Robust LMI Parser), built to work under MATLAB jointly with YALMIP, is a toolbox
aimed to ease the programming of Linear Matrix Inequality (LMI) relaxations for parameter-dependent
LMIs with parameters lying in unit simplexes (or inside known intervals). Through simple commands,
the user is able to define matrix polynomials, as well as to described the desired parameter-dependent
LMI conditions in a easy way, considerably reducing the programming time. The main commands and
definitions are thoroughly explained in this manual.

1 Introduction
In the last decades, problems formulated in terms of Linear Matrix Inequality (LMI) conditions and solved
by Semidefinite Programming (SPD) techniques became more and more common in several fields related
to engineering and applied mathematics. Specifically in control theory, the growing usage of such relevant
tools has led to important results on the analysis of systems stability, synthesis of robust controllers and
filters for uncertain systems and synthesis of optimal control models, just to name a few problems [4].
Accompanying the growth of the usage of LMI optimization, a large number of solvers based on interior
point methods were developed, as well as interfaces for parsing the LMIs, most of them free and easily
accessible. Thanks to such remarkable advance in the computational tools to define, manipulate and solve
LMIs, in many cases one can say that if a problem can be cast as a set of LMIs, then it can be considered as
solved [4]. Unfortunately, this is not completely true for large scale systems, since LMI solvers are limited
to a few thousands of variables and LMI rows, but progresses are being made.
Usually, the approach to solve LMIs is decomposed in two steps: first, an interface for parsing the
conditions is used, for example the YALMIP [11] or the LMI Control Toolbox from MATLAB [7]; then,
an LMI solver is invoked to find a solution (if any), for example SeDuMi [22], SDPT3 [23] or MOSEK [1].
Some auxiliary toolboxes may also be used in addition to the parser and solver, for example the SOSTOOLS
[17], which is used to transform a sum of squares problem into an SDP formulation, GloptiPoly [9], used
to handle optimization problems over polynomials, and the R-RoMuLOC [16, 5, 15, 24], a toolbox for the
manipulation and resolution of conditions related to robust multi-objective control.
To motivate the use of ROLMIP consider, for instance, the problem of analyzing the stability of a
discrete-time linear system given by
x(k + 1) = Ax(k), (1)
with x(k) ∈ Rn being the state vector of the system and A ∈ Rn×n being the dynamic matrix. Following
the Lyapunov stability theory, such system is stable if and only if there exists a symmetric matrix P ∈ Rn×n
such that the LMI  
P A′ P
>0 (2)
PA P
holds. Such LMI can be easily programmed and solved using, respectively, any LMI parser and solver
available.
Consider now that system (1) is affected by uncertainties, i.e., the system matrix is parameter-dependent
and is given by A(α). The robust stability analysis of such system can be performed by rewriting the LMI

Federal University of Technology of Paraná – UTFPR, Campus Cornélio Procópio, PR. E-mail: [email protected]

School of Electrical and Computer Engineering, University of Campinas – UNICAMP, 13083-852, Campinas, SP, Brazil.
E-mails: [email protected], {ricfow,peres}@dt.fee.unicamp.br

1
condition (2) as  
P (α) A(α)′ P (α)
>0 (3)
P (α)A(α) P (α)
but, in this case, (3) must hold for all admissible α. In order to transform the parameter-dependent LMI
into a finite set of standard LMIs, some information about A(α) must be added, as well as some structure
must be imposed to the unknown variable P (α). For instance, consider that A(α) and P (α) have a polytopic
structure
X N N
X
A(α) = αi Ai , P (α) = αi Pi , α ∈ ∆N , (4)
i=1 i=1
being Ai and Pi the vertices of the respective polytopes, N the number of vertices and ∆N the set known
as unit simplex, given by
N
X
∆N = α ∈ R N :

αi = 1 , αi ≥ 0 , i = 1, . . . , N . (5)
i=1

Applying the definition of A(α) and the chosen structure for P (α), given by (4), to the robust stability
condition expressed in the parameter-dependent LMI (3), one gets the following homogeneous polynomial
matrix inequality, of degree 2 on α,
  XN   NX N
−1 X  
P (α) A(α)′ P (α) Pi A′i Pi Pi + Pj A′i Pj + A′j Pi
= α2i + αi αj > 0. (6)
P (α)A(α) P (α) Pi Ai Pi Pi Aj + Pj Ai Pi + Pj
i=1 i=1 j=i+1

A sufficient (but not necessary) way to guarantee that (3) holds is to impose that all the matrix coefficients
of the monomials are positive definite. This has been done, for instance, in [18] (discrete-time systems)
and [19] (continuous-time systems). A less conservative set of conditions may be obtained by modeling
the variable P (α) in (6) as a homogeneous polynomial with generic degree g > 1 and then imposing the
positivity of all matrix coefficients [12, 3]. Programming these LMIs requires an a priori knowledge on the
formation law of the monomials, which depends on the number N of uncertain parameters and on the degree
of the polynomial variable P (α). In [13], a systematic way to deal with such cases has been developed, but in
the context of robust LMIs presenting at most products between two parameter-dependent matrices. When
the LMIs to be solved are more complex and have products involving three or more parameter-dependent
matrices, a systematic procedure to generate the coefficients of the monomials can be very hard (at least
tedious) to be developed.
Consider now that matrix A(·) depends on two parameters, α and β, being each parameter contained in
an independent unit simplex, i.e.,
N1 X
X N2
A(α, β) = αi βj Aij , α ∈ ∆ N1 , β ∈ ∆ N2 , (7)
i=1 j=1

That is, the parameters α and β lie in the multi-simplex Ω = ∆N1 × ∆N2 (i.e., the Cartesian product of
∆N1 and ∆N2 ). Defining
X N2
N1 X
P (α, β) = αi βj Pij , (8)
i=1 j=1

then the parameter-dependent LMI to verify the robust stability of the system becomes
 
P (α, β) A(α, β)′ P (α, β)
> 0, (9)
P (α, β)A(α, β) P (α, β)
which is a completely different case than the one in (6), with A(α) described in terms of one simplex as in (4),
therefore with a different formation law for the monomials. This illustrates that each new case requires the
manipulation of different polynomials and such task, as well as programming the resulting LMIs, can be
tedious, time-demanding and also a source of programming errors.
The toolbox described in this manual, called Robust LMI Parser1 , intends to overcome these problems by
automatically computing all the coefficients of the monomials of a given parameter-dependent LMI. Those
1
Available at http://rolmip.github.io

2
coefficients define the set of sufficient LMI conditions to be programmed. A feasible solution assures that
the parameter-dependent LMI conditions are verified for the entire domain of uncertainty. The toolbox
is developed for MATLAB and works jointly with YALMIP, returning the entire set of LMIs through a
few simple commands that describe the structure of the known matrices and variables involved in the
parameter-dependent LMIs to be investigated.

2 Installation notes
ROLMIP was built on the top of YALMIP [11], a freely distributed general purpose optimization parser
MATLAB toolbox. Therefore the first step before using ROLMIP is to download2 and install YALMIP.
The ROLMIP installation is simple: just unzip the installation file (robust lmi parser.zip) and then
add the decompressed folder on MATLAB’s path. To check if ROLMIP is working properly, run the script
rolmiptest.m.
In order to solve the semidefinite problems proposed in this manual, it is necessary to install a proper
solver. Among the several solvers publicly available, we recommend the following:

• SeDuMi (http://sedumi.ie.lehigh.edu/)

• MOSEK (http://www.mosek.com/)

• SDPT3 (http://github.com/SQLP/SDPT3)

The examples and outputs shown in this manual were generated by using YALMIP R20180612 with
SeDuMi 1.3, operating under MATLAB R2015a.

2.1 Notes on Version 3.0


The current version is considerably different from the previous ones, mainly due to the introduction of a
new variable type, named rolmipvar. With this modification, the commands and definitions are more
straightforward and easy to use and understand, and even the computational time necessary to parse the
parameter-dependent LMIs has been optimized. We strongly suggest the use of rolmipvar instead of the
old commands poly struct and parser poly. However, such old commands are still implemented and even
somewhat improved in the current version, and the MATLAB routines that already use ROLMIP continue
to work.
Concerning specifically the automatic creation of executable MATLAB files: the latter version provided a
set of procedures (using the old commands poly struct and parser poly) whose objective was to generate
automatically MATLAB .m files, saving computational time if a set of conditions need to be executed several
times. Such features are still part of ROLMIP, but not yet adapted to work using the rolmipvar variables
included in the present version. Please refer to the manual of the previous version for further details.

2.2 YALMIP compatibility issues


Since YALMIP does not recognize the classes of ROLMIP in its source code, some compatibility issues
may occur. Usually, such problems may happen if sdpvar and rolmipvar variables are mixed in the same
expression. Thus, in order to avoid conflicts, we strongly suggest that the script under development be
solely based on rolmipvar variables. If using both structures is unavoidable, it is important to guarantee
that rolmipvar variables appear before the sdpvar ones when writing the expressions, as emphasized in
Remark 2 in Section 7.2.

2
https://yalmip.github.io/download/

3
3 Preliminaries
ROLMIP currently considers the following assumptions:
• The polynomial matrices are dependent on parameters that either are defined over a unit (or multi)
simplex domain, or have known bounds;
• The number of vertices of a given simplex is always the same, although different simplex domains may
present different numbers of vertices.
Several examples illustrating the usage of the commands are presented throughout the manual. Single
commands are displayed using a font similar to the one used in MATLAB and start with >>. Fully
functional scripts, presented in some examples, are encapsulated by a black box , while the MATLAB
outputs generated by such scripts are displayed inside a red box .

4 Structure and definition of a polynomial variable


The main structure of ROLMIP is the rolmipvar class, which stores the informations regarding the
polynomial structure of the parameter-dependent matrices. Internally, a rolmipvar variable is a structure
composed by the following fields:
• vertices: Contains the number of vertices of each simplex;
• data: This field is a vector of elements (stored using the type cell array from MATLAB) that de-
scribes all the monomials of the variable. Each position of the vector is composed by the fields value,
which contains the value of coefficient of the monomial, and exponent, describing the exponent of
the monomial;
• label: Informs the label of the variable, which is used mainly for the LATEX text generation;
• opcode: Describes how a variable is constructed, either if it is a user-defined variable or if it is the
result of a previous mathematical operation;
• bounds: Used only if the polynomial depends on time-varying parameters with known variation rates.
The fields of the rolmipvar structure are not directly accessible by the user, and some of them (namely
opcode and bounds) are defined only for internal purposes. For instance, consider a polynomial matrix
M (α, β) defined in a multi-simplex domain as

M (α, β) = α21 β1 M1 + α1 α2 β1 M2 + α22 β1 M3 + α21 β2 M4 + α1 α2 β2 M5 + α22 β2 M6


+ α21 β3 M7 + α1 α2 β3 M8 + α22 β3 M9 , (10)

with α ∈ Λ2 and β ∈ Λ3 . The internal structure of the related rolmipvar variable is illustrated on Table 1.

Table 1: Structure of the rolmipvar variable representing the polynomial defined in (10).
label = ’M’
vertices = [2 3]
data(1) data(2) data(9)
value = M1 value = M2 value = M9
...
exponent{1} exponent{2} exponent{1} exponent{2} exponent{1} exponent{2}
[2 0] [1 0 0] [1 1] [1 0 0] [0 2] [0 0 1]

4.1 Accessing the monomials of a rolmipvar variable


There are two ways to access the informations of the polynomials:
• Using the index operator ( ) with the exponents of the desired monomial. For instance, to consult the
coefficient related to the monomial α21 β2 of the polynomial M (α, β) defined in (10), enter the command
>> M([2 0],[0 1 0]);

4
• By using the command
>> Mi = coeffs(poly);
which returns a cell structure containing all the coefficients of the monomials from the rolmipvar
variable poly. In this case, the output contains only the monomials, and not the respective exponents,
which can be obtained through the command
>> expMi = exponents(poly);
The output variable expMi is structured as
expMi{index}
where index corresponds to the coefficient stored in ndexMii. The structure of ndexexpMii is
similar to the exponent component shown in Table 1.

4.2 Defining polynomial variables composed by known matrices in a multi-simplex


domain
Every polynomial variable, regardless if depending on (multi) simplex or bounded parameters, is defined of
type rolmipvar. The variable definition may be performed using several different syntaxes3 depending on
how the polynomial is described by the user, as detailed below.
If the matrix polynomial has known coefficients (as opposed to sdpvar4 variables), the polynomial
variable is obtained by
poly = rolmipvar(M,label,vertices,degree)
The output poly is a rolmipvar variable that fully describes the polynomial. The input M contains
data about the coefficients and the monomials of the polynomial to be defined. The input label is a string
and consists of a name used to refer the variable, used mainly to generate the LATEX code of a polynomial
through the command texify, presented later. The inputs vertices and degree inform, respectively,
the number of parameters (vertices) and the polynomial degrees of the parameters associated to each simplex
of the polynomial. If a parameter-independent matrix is to be defined, then the parameters vertices and
degree may be omitted or set to zero.
For instance, consider that matrix A(α) has the following structure
A(α) = α1 A1 + α2 A2 , α1 + α2 = 1, α1 ≥ 0, α2 ≥ 0
i.e., A(α) is characterized by a polytope of N = 2 vertices and is modeled as a homogeneous polynomial of
degree g = 1 with parameters in the unit simplex. There are three ways of inputting the coefficients A1 and
A2 through variable M:
1. Concatenating the matrices A1 and A2 ;
>> M = [A1 A2];

2. Using M as a cell array;


>> M{1} = A1; M{2} = A2; (11)

3. Informing, in the cell array M, the exponent of the monomial to which each matrix is related.
>> M{1} = {[1 0],A1}; M{2} = {[0 1],A2}; (12)
Using this syntax, the exponent of the monomial αn1 1 αn2 2 . . . αnNN is encoded as [n1 n2 . . . nN ]. If more
simplexes are used, then each cell has extra elements; refer to Example 2.
Please note that, if the first two ways are used, then every monomial must be defined, and the order of
elements is important. On the other hand, if the third way is used, then there is no specific order, and the
undefined monomials are set to zero by default.
Constant matrices may be defined by setting vertices with the number of vertices for the problem
under investigation and degree = 0. However, the structure will be more complex and may result on
more expensive computations.
3
The syntaxes are somewhat similar to the poly struct command available on prior versions.
4
Variables used in YALMIP toolbox.

5
Example 1
Consider the polynomial matrix A(α) with degree g = 1 that represents a polytopic linear system with
N = 3 vertices given by
A(α) = α1 A1 + α2 A2 + α3 A3 , α ∈ ∆3 ,
being    
1 0 2 0 3 0
A1 = , A2 = , A3 = .
0 1 0 2 0 3
Such a polynomial can be defined using the following script5

%Example 1
A1 = eye(2);
A2 = 2*eye(2);
A3 = 3*eye(2);
A = [A1 A2 A3];
polyA = rolmipvar(A,'A',3,1);

The contents of the rolmipvar variable polyA are displayed as

Label: A
Vertices: [3]
Degrees: [1]

a1*[1 0] + a2*[2 0] + a3*[3 0]


[0 1] [0 2] [0 3]

To retrieve the matrix-valued coefficient A2 , for example, it suffices to type


>> A2 = polyA([0 1 0]);
and, since the returned variable is a cell array, the coefficient can be accessed by typing
>> A2{1}
Also, the execution of the command
>> Ai = coeffs(polyA);
outputs, to the variable Ai, a cell structure containing each of the monomials of polyA. For instance,
typing Ai1 results in

ans =

1 0
0 1

Note that the command coeffs only displays the coefficients of the monomials, but not the respective
exponents. Such information can be retrieved by using the command
>> expAi = exponents(polyA);
For instance, entering expAi11 yields

ans =

1 0 0

indicating that the coefficient Ai{1} refers to the monomial α1 .


5
Available in the file example 1.m within the folder manual examples.

6
Example 2
Let A(α, β) be the polynomial matrix given by

A(α, β) = α21 β1 A1 + α1 α2 β1 A2 + α22 β1 A3 + α21 β2 A4 + α1 α2 β2 A5 + α22 β2 A6 + α21 β3 A7 + α1 α2 β3 A8 + α22 β3 A9 ,

i.e., with 2 vertices and degree 2 on the first simplex, and 3 vertices and degree 1 on the second simplex,
being  
k 0
Ak = , k = 1, . . . , 9.
0 k
The polynomial A(α, β) can be defined by using the script6

%Example 2
A1 = eye(2);
A2 = 2*eye(2);
A3 = 3*eye(2);
A4 = 4*eye(2);
A5 = 5*eye(2);
A6 = 6*eye(2);
A7 = 7*eye(2);
A8 = 8*eye(2);
A9 = 9*eye(2);

A{1} = {[2 0],[1 0 0],A1};


A{2} = {[1 1],[1 0 0],A2};
A{3} = {[0 2],[1 0 0],A3};
A{4} = {[2 0],[0 1 0],A4};
A{5} = {[1 1],[0 1 0],A5};
A{6} = {[0 2],[0 1 0],A6};
A{7} = {[2 0],[0 0 1],A7};
A{8} = {[1 1],[0 0 1],A8};
A{9} = {[0 2],[0 0 1],A9};
polyA = rolmipvar(A,'A',[2 3],[2 1]);

The contents of the variable polyA are given by

Label: A
Vertices: [2 3]
Degrees: [2 1]

a1ˆ2*b1*[1 0] + a1*a2*b1*[2 0] + a2ˆ2*b1*[3 0]


[0 1] [0 2] [0 3]

+ a1ˆ2*b2*[1 0 0] + a1*a2*b2*[5 0] + a2ˆ2*b2*[6 0]


[0 1 0] [0 5] [0 6]

+ a1ˆ2*b3*[7 0] + a1*a2*b3*[8 0] + a2ˆ2*b3*[9 0]


[0 7] [0 8] [0 9]

To retrieve the matrix-valued coefficient A4 , for example, it suffices to type

>> A4 = polyA([2 0],[0 1 0]);

and the desired coefficient is available in A4{1}.


6
Available in the file example 2.m within the folder manual examples.

7
In Example 2, two simplexes are used: one with α and another with β. Note that, when defining
the structure of A{·}, the first element of the cell array corresponds to α and the second corresponds to
β. When using ROLMIP, it is important to keep the track on the assortment of the defined simplexes,
otherwise errors can occur. For ease of notation, in this manual the simplex names are sorted, by default,
in the order {α, β, γ, δ, . . .}.
A monomial can be individually set after being defined. For instance, in Example 2, to set the monomial
with the term α21 β2 equal to identity I, one might enter the command polyA([2 0],[0 1 0]) = eye(2);

Example 3
Parameter-independent matrices can be constructed by simply omitting the input parameters vertices
and degree. For instance, a 3 × 3 identity matrix can be defined using

polyI = rolmipvar(eye(3),'I');

Example 4
The parameter-dependent scalar variables

a(α) = −α1 + α2 , b(β) = −3β1 + 2β2

can be defined through the script

%Example 4
ma{1} = {[1 0],-1};
ma{2} = {[0 1],1};
a = rolmipvar(ma,'a',2,1);
mb{1} = {[0 0],[1 0],-3};
mb{2} = {[0 0],[0 1],2};
b = rolmipvar(mb,'b',[0 2],[0 1]);

The contents of a and b are shown in the following.

>> a
Label: a
Vertices: [2]
Degrees: [1]

a1*[-1] + a2*[1]

>> b
Label: b
Vertices: [0 2]
Degrees: [0 1]

b1*[-3] + b2*[2]

4.3 Defining polynomials composed by optimization sdpvar variables in a multi-simplex


domain
To declare a polynomial matrix as an optimization variable, one may use the following syntax

poly = rolmipvar(rows,cols,label,param,vertices,degree).

The coefficients of the monomials are matrices with dimensions rows × cols whose entries are opti-
mization variables and, since ROLMIP is built on the top of YALMIP, they are internally stored using
the sdpvar type provided by YALMIP. The argument param is a string that indicates if the variable is
symmetric ('symmetric'), rectangular ('full'), symmetric Toeplitz ('toeplitz'), symmetric Hankel

8
('hankel') or Skew-symmetric ('skew'). If param is not informed, square matrices are declared as
symmetric and non-square matrices are defined as full. Note that such argument is similar to the sdpvar
instruction used to define the variables in the YALMIP parser.
To define a known scalar in terms of a ROLMIP structure, one may use the syntax

poly = rolmipvar(M,label,'scalar'),

which returns the structure related to the scalar M with label given by label. If the scalar is a sdpvar
variable, the following syntax may be used

poly = rolmipvar(label,'scalar').

It is important to highlight that it is not necessary to define parameter-independent matrices and scalars as
rolmipvar variables, unless the user intends to generate the LATEX code of the polynomials, as discussed in
details in Section 5.

Example 5
A symmetric polynomial variable P (α) ∈ R3×3 of degree 2, with α in a simplex of dimension N = 3, can be
defined by

>> polyP = rolmipvar(3,3,'P','symmetric',3,2);

Example 6
A full polynomial variable P (α, β) ∈ R3×3 of degree 2 and N = 3 vertices on the first simplex, and degree
1 and N = 4 vertices on the second simplex, can be defined by

>> polyP = rolmipvar(3,3,'P','symmetric',[3 4],[2 1]);

4.4 Defining matrices polynomially dependent on bounded parameters


In several situations, the system matrices depend on uncertain parameters with known bounds, and a series
of transformations must be applied in order to rewrite such matrices within a multi-simplex domain. The
situations considered in the prior cases are all matrices already represented on a multi-simplex. However, it
is possible to use ROLMIP to represent matrices polynomially dependent on bounded parameters without
previously applying such transformations.
Suppose, for instance, that one needs to define a polynomial matrix A(θ1 , θ2 ), given by

A(θ1 , θ2 ) = A0 + θ1 A1 + θ2 A2 + θ12 θ2 A3 ,

with
a1 ≤ θ1 ≤ a1 , a 2 ≤ θ 2 ≤ a2 .
ROLMIP allows the definition of such polynomial, provided that the bounds of the parameters are also
informed. Internally the transformation to a multi-simplex domain is applied, but such a transformation is
not explicit to the user, easing further polynomial operations. The syntax for such is

poly = rolmipvar(M,label,bounds).

The input M is a cell array that contains the informations on the matrix coefficients and the associated
monomials, defined in a similar way as in (12). The input label informs the label of the variable, and
bounds is an m × 2 matrix that contains the bounds of the m parameters considered (first column with
the lower limits and the second column with the upper limits).

9
Example 7
The polynomial matrix A(θ1 , θ2 ), given by
A(θ1 , θ2 ) = A0 + θ1 A1 + θ2 A2 + θ12 θ2 A3 ,
with
−2 ≤ θ1 ≤ 3, 4 ≤ θ2 ≤ 8,
and  
k+1 0
Ak = , k = 0, 1, 2, 3
0 k+1
can be defined using the following sequence of commands.

%Example 7
A0 = [1 0; 0 1];
A1 = [2 0; 0 2];
A2 = [3 0; 0 3];
A3 = [4 0; 0 4];

A{1} = {[0 0],A0};


A{2} = {[1 0],A1};
A{3} = {[0 1],A2};
A{4} = {[2 1],A3};
polyA = rolmipvar(A,'A',[-2 3; -4 8]);

The contents of the variable polyA are output in MATLAB as follows.

Label: A
Vertices: [2 2]
Degrees: [2 1]

a1ˆ2*b1*[-79 0] + a1*a2*b1*[172 0]
[0 -79] [0 172]

+ a2ˆ2*b1*[-149 0] + a1ˆ2*b2*[149 0]
[0 -149] [0 149]

+ a1*a2*b2*[-332 0] + a2ˆ2*b2*[319 0]
[0 -332] [0 319]

If the polynomial matrix is an optimization variable, one may use the syntax
poly = rolmipvar(rows,cols,label,parametr,polmask,bounds).
The matrix coefficients with dimensions rows × cols are internally declared, and returned as sdpvar
variables to the output poly. The argument parametr is a string that indicates if the variable is sym-
metric ('symmetric'), rectangular ('full'), symmetric Toeplitz ('toeplitz'), symmetric Hankel
('hankel') or Skew-symmetric ('skew'). If parametr is not informed, square matrices are declared as
symmetric and non-square matrices are defined as full. Note that such command is similar to the sdpvar
instruction used to define the variables in the YALMIP parser. The input polmask is a cell array containing
the exponents of the parameters desired for the output polynomial, and bounds contains the bounds of the
parameters.

Example 8
To define the 3 × 3 symmetric polynomial variable P (θ1 , θ2 ), whose desired structure is given by
P (θ1 , θ2 ) = P0 + θ1 P1 + θ23 P2 + θ12 θ24 P3 ,

10
with
−2 ≤ θ1 ≤ 3, 4 ≤ θ2 ≤ 8,
one may use the syntax

>> polyP = rolmipvar(3,3,'P','sym',{[0 0],[1 0],[0 3],[2 4]},[-2 3; -4 8]);

The output of typing polyP is shown as follows.

Linear matrix variable 3x3 (symmetric, real, 24 variables)


Label: P
Vertices: [2 2]
Degrees: [2 4]

Internally, the polynomial with parameters lying in known intervals is converted to a multi-simplex rep-
resentation, each parameter generating a different simplex with 2 vertices. In general terms, the parameter
θi is rewritten as
θi = α1 ai + α2 ai ,
and then the polynomial is homogenized.

5 Operating on polynomials
Once the rolmipvar variables are defined, the most common operations may be performed between poly-
nomials or between constant matrices and polynomials. Every necessary homogenization is automatically
performed by ROLMIP, as illustrated in the following example.

Example 9
Suppose that the rolmipvar variables polyA and polyB have already been defined and are respectively
given by
A(α) = α1 A1 + α2 A2 , B(α) = α1 B1 + α2 B2 .
The sum
>> resul1 = polyA + polyB;
yields a polynomial given by

A(α) + B(α) = α1 (A1 + B1 ) + α2 (A2 + B2 )

The product
>> resul2 = polyA*polyB;
yields a polynomial given by

A(α)B(α) = α21 (A1 B1 ) + α1 α2 (A1 B2 + A2 B1 ) + α22 (A2 + B2 ).

Finally, operations between polynomials and non-polynomial matrices are performed as expected. Let
C be a matrix (with compatible dimensions) defined on MATLAB. The operation
>> resul3 = polyA + C;
produces
A(α) + C = α1 (A1 + C) + α2 (A2 + C),
and the operation
>> resul4 = polyA*C;
results on
A(α)C = α1 (A1 C) + α2 (A2 C).

The following script7 is an example for the implementation of the given commands, along with the
resulting outputs.
7
Available in the file example 9.m within the folder manual examples.

11
%Example 9
A1 = eye(2);
A2 = 2*eye(2);
A = [A1 A2];
polyA = rolmipvar(A,'A',2,1);

B1 = 3*eye(2);
B2 = 4*eye(2);
B = [B1 B2];
polyB = rolmipvar(B,'B',2,1);

resul1 = polyA + polyB

resul2 = polyA*polyB

C = 5*eye(2);
resul3 = polyA + C

resul4 = polyA*C

>> resul1
Label: A+B
Vertices: [2]
Degrees: [1]

a1*[4 0] + a2*[6 0]
[0 4] [0 6]

>> resul2
Label: A*B
Vertices: [2]
Degrees: [2]

a1ˆ2*[3 0] + a1*a2*[10 0] + a2ˆ2*[8 0]


[0 3] [0 10] [0 8]

>> resul3
Label: A+<>
Vertices: [2]
Degrees: [1]

a1*[6 0] + a2*[7 0]
[0 6] [0 7]

>> resul4
Label: A*<>
Vertices: [2]
Degrees: [1]

a1*[5 0] + a2*[10 0]
[0 5] [0 10]

12
Remark 1
The string <> appearing in the Label property is a standard string to refer to non-labeled variables, such
as the variable C.
The concatenation of several polynomial rolmipvar variables in a matrix is done using the same
notation of other matrix concatenations in MATLAB, as illustrated in the following example.

Example 10
Consider the following matrix-valued variables
       
1 0 2 0 3 0 4 0
A(α) = α1 + α2 , B(β) = β1 + β2 .
0 1 0 2 0 3 0 4

The matrix  
A(α) B(β)
T (α, β) =
B(β) 0
can be constructed through the following script.

%Example 10
A1 = eye(2);
A2 = 2*eye(2);
B1 = 3*eye(2);
B2 = 4*eye(2);

A{1} = {[1 0],A1};


A{2} = {[0 1],A2};
B{1} = {[1 0],B1};
B{2} = {[0 1],B2};

polyA = rolmipvar(A,'A',2,1);
polyB = rolmipvar(B,'B',2,1);
polyB = fork(polyB,'B',1,2);

polyT = [polyA polyB;


polyB zeros(2,2)];

>> polyT
Label: [[A,B];[B,<>]]
Vertices: [2 2]
Degrees: [1 1]

a1*b1*[1 0 3 0] + a2*b1*[2 0 3 0]
[0 1 0 3] [0 2 0 3]
[3 0 0 0] [3 0 0 0]
[0 3 0 0] [0 3 0 0]

+ a1*b2*[1 0 4 0] + a2*b2*[2 0 4 0]
[0 1 0 4] [0 2 0 4]
[4 0 0 0] [4 0 0 0]
[0 4 0 0] [0 4 0 0]

In general, the MATLAB operations that are adapted to work over rolmipvar variables are:

• Transpose operation: the transpose is applied over the matrix-valued coefficients of all monomials;

• Command blkdiag: used if one needs to construct a rolmipvar block-diagonal matrix;

13
• Command trace: returns a rolmipvar, with each coefficient corresponding to the trace of the
respective matrix monomial, since
N N
!
X X
trace αi Ai = αi trace(Ai ).
i=1 i=1

Other implemented commands are described in the following.

Command FORK
This command replaces the parameters from one (multi) simplex domain to another.
The syntax
polyout = fork(polyin,newlabel)
changes the entire multi-simplex domain of the polynomial polyin, generating a new variable with label
newlabel.

Example 11
Suppose that polyin represents the polynomial

A(α) = α1 A1 + α2 A2 .

The application of the command fork results on the polynomial polyout that represents

A(β) = β1 A1 + β2 A2 ,

as shown in the following script8 . Note that the fork command is useful to declare variables in different
simplexes (for instance the scalar variables in Example 4) in a simpler way.

%Example 11
A1 = eye(2);
A2 = 2*eye(2);
A = [A1 A2];
polyA = rolmipvar(A,'A',2,1)

polyAfork = fork(polyA,'Afork')

>> polyA
Label: A
Vertices: [2]
Degrees: [1]

a1*[1 0] + a2*[2 0]
[0 1] [0 2]

>> polyAfork
Label: Afork
Vertices: [0 2]
Degrees: [0 1]

b1*[1 0] + b2*[2 0]
[0 1] [0 2]

8
Available in the file example 11.m within the folder manual examples.

14
Example 12
Suppose that polyin represents the polynomial

A(α, β) = α1 β1 A1 + α2 β1 A2 + α1 β2 A3 + α2 β2 A4 .

The application of the command fork results on the polynomial polyout that represents

A(γ, δ) = γ1 δ1 A1 + γ2 δ1 A2 + γ1 δ2 A3 + γ2 δ2 A4 ,

as shown in the following9 .

%Example 12
A1 = eye(2);
A2 = 2*eye(2);
A3 = 3*eye(2);
A4 = 4*eye(2);

A{1} = {[1 0],[1 0],A1};


A{2} = {[0 1],[1 0],A2};
A{3} = {[1 0],[0 1],A3};
A{4} = {[0 1],[0 1],A4};
polyA = rolmipvar(A,'A',[2 2],[1 1])

polyAfork = fork(polyA,'Afork')

>> polyA
Label: A
Vertices: [2 2]
Degrees: [1 1]

a1*b1*[1 0] + a2*b1*[2 0] + a1*b2*[3 0] + a2*b2*[4 0]


[0 1] [0 2] [0 3] [0 4]

>> polyAfork
Label: Afork
Vertices: [0 0 2 2]
Degrees: [0 0 1 1]

c1*d1*[1 0] + c2*d1*[2 0] + c1*d2*[3 0] + c2*d2*[4 0]


[0 1] [0 2] [0 3] [0 4]

Note that the command fork only changes the parameters that define the monomials, but not the values
of the coefficients of the monomials.
The syntax
polyout = fork(polyin,newlabel,targetin)
only change the simplexes given in input vector targetin.

Example 13
Suppose that polyin represents the polynomial

A(α, β, γ) = α1 β1 γ1 A1 + α2 β1 γ2 A2 + α1 β2 γ3 A3 + α2 β2 γ1 A4 .

The command
9
Available in the file example 12.m within the folder manual examples.

15
>> polyout = fork(polyin,'B',[2]);
provides the polynomial polyout that represents

B(α, δ, γ) = α1 δ1 γ1 A1 + α2 δ1 γ2 A2 + α1 δ2 γ3 A3 + α2 δ2 γ1 A4 .

%Example 13
A1 = eye(2);
A2 = 2*eye(2);
A3 = 3*eye(2);
A4 = 4*eye(2);

A{1} = {[1 0],[1 0],[1 0 0],A1};


A{2} = {[0 1],[1 0],[0 1 0],A2};
A{3} = {[1 0],[0 1],[0 0 1],A3};
A{4} = {[0 1],[0 1],[1 0 0],A4};
polyA = rolmipvar(A,'A',[2 2 3],[1 1 1])

polyB = fork(polyA,'B',2)

>> polyA
Label: A
Vertices: [2 2 3]
Degrees: [1 1 1]

a1*b1*c1*[1 0] + a2*b1*c1*[0 0] + a1*b2*c1*[0 0]


[0 1] [0 0] [0 0]

+ a2*b2*c1*[4 0] + a1*b1*c2*[0 0] + a2*b1*c2*[2 0]


[0 4] [0 0] [0 2]

+ a1*b2*c2*[0 0] + a2*b2*c2*[0 0] + a1*b1*c3*[0 0]


[0 0] [0 0] [0 0]

+ a2*b1*c3*[0 0] + a1*b2*c3*[3 0] + a2*b2*c3*[0 0]


[0 0] [0 3] [0 0]

>> polyB
Label: B
Vertices: [2 0 3 2]
Degrees: [1 0 1 1]

a1*c1*d1*[1 0] + a2*c1*d1*[0 0] + a1*c2*d1*[0 0]


[0 1] [0 0] [0 0]

+ a2*c2*d1*[2 0] + a1*c3*d1*[0 0] + a2*c3*d1*[0 0]


[0 2] [0 0] [0 0]

+ a1*c1*d2*[0 0] + a2*c1*d2*[4 0] + a1*c2*d2*[0 0]


[0 0] [0 4] [0 0]

+ a2*c2*d2*[0 0] + a1*c3*d2*[3 0] + a2*c3*d2*[0 0]


[0 0] [0 3] [0 0]

16
Finally, the syntax

polyout = fork(polyin,newlabel,targetin,targetout)

changes the simplexes on input vector targetin, respectively, to the simplexes informed on targetout.

Example 14
Suppose that polyin represents the polynomial

A(α, β, γ) = α1 β1 γ1 A1 + α2 β1 γ2 A2 + α1 β2 γ3 A3 + α2 β2 γ1 A4 .

The command

>> polyout = fork(polyin,'B',[1 2],[2 4]);


results on the polynomial polyout that represents

A(β, δ, γ) = β1 δ1 γ1 A1 + β2 δ1 γ2 A2 + β1 δ2 γ3 A3 + β2 δ2 γ1 A4 .

%Example 14
A1 = eye(2);
A2 = 2*eye(2);
A3 = 3*eye(2);
A4 = 4*eye(2);

A{1} = {[1 0],[1 0],[1 0 0],A1};


A{2} = {[0 1],[1 0],[0 1 0],A2};
A{3} = {[1 0],[0 1],[0 0 1],A3};
A{4} = {[0 1],[0 1],[1 0 0],A4};
polyA = rolmipvar(A,'A',[2 2 3],[1 1 1])

polyB = fork(polyA,'B',[1 2],[2 4])

17
>> polyA
Label: A
Vertices: [2 2 3]
Degrees: [1 1 1]

a1*b1*c1*[1 0] + a2*b1*c1*[0 0] + a1*b2*c1*[0 0]


[0 1] [0 0] [0 0]

+ a2*b2*c1*[4 0] + a1*b1*c2*[0 0] + a2*b1*c2*[2 0]


[0 4] [0 0] [0 2]

+ a1*b2*c2*[0 0] + a2*b2*c2*[0 0] + a1*b1*c3*[0 0]


[0 0] [0 0] [0 0]

+ a2*b1*c3*[0 0] + a1*b2*c3*[3 0] + a2*b2*c3*[0 0]


[0 0] [0 3] [0 0]

>> polyB
Label: B
Vertices: [0 2 3 2]
Degrees: [0 1 1 1]

b1*c1*d1*[1 0] + b2*c1*d1*[0 0] + b1*c2*d1*[0 0]


[0 1] [0 0] [0 0]

+ b2*c2*d1*[2 0] + b1*c3*d1*[0 0] + b2*c3*d1*[0 0]


[0 2] [0 0] [0 0]

+ b1*c1*d2*[0 0] + b2*c1*d2*[4 0] + b1*c2*d2*[0 0]


[0 0] [0 4] [0 0]

+ b2*c2*d2*[0 0] + b1*c3*d2*[3 0] + b2*c3*d2*[0 0]


[0 0] [0 3] [0 0]

Command ADDSIMPLEX
The command addsimplex, whose syntax is

>> polyout = addsimplex(polyin,vertices);


adds a new simplex to the informed polynomial polyin, and the inserted simplex has the number of vertices
indicated in input vertices.

Example 15
Suppose that polyin represents the polynomial

A(α, β, γ).

The command

>> polyout = addsimplex(polyin,3);


results on the polynomial polyout that represents

A(α, β, γ, δ),

18
being δ a simplex with 3 vertices.

%Example 15
A1 = eye(2);
A2 = 2*eye(2);
A3 = 3*eye(2);
A4 = 4*eye(2);

A{1} = {[1 0],[1 0],[1 0 0],A1};


A{2} = {[0 1],[1 0],[0 1 0],A2};
A{3} = {[1 0],[0 1],[0 0 1],A3};
A{4} = {[0 1],[0 1],[1 0 0],A4};
polyA = rolmipvar(A,'A',[2 2 3],[1 1 1])

polyout = addsimplex(polyA,3)

>> polyA
Label: A
Vertices: [2 2 3]
Degrees: [1 1 1]

a1*b1*c1*[1 0] + a2*b1*c1*[0 0] + a1*b2*c1*[0 0]


[0 1] [0 0] [0 0]

+ a2*b2*c1*[4 0] + a1*b1*c2*[0 0] + a2*b1*c2*[2 0]


[0 4] [0 0] [0 2]

+ a1*b2*c2*[0 0] + a2*b2*c2*[0 0] + a1*b1*c3*[0 0]


[0 0] [0 0] [0 0]

+ a2*b1*c3*[0 0] + a1*b2*c3*[3 0] + a2*b2*c3*[0 0]


[0 0] [0 3] [0 0]

>> polyout
Label: A
Vertices: [2 2 3 3]
Degrees: [1 1 1 0]

a1*b1*c1*[1 0] + a2*b1*c1*[0 0] + a1*b2*c1*[0 0]


[0 1] [0 0] [0 0]

+ a2*b2*c1*[4 0] + a1*b1*c2*[0 0] + a2*b1*c2*[2 0]


[0 4] [0 0] [0 2]

+ a1*b2*c2*[0 0] + a2*b2*c2*[0 0] + a1*b1*c3*[0 0]


[0 0] [0 0] [0 0]

+ a2*b1*c3*[0 0] + a1*b2*c3*[3 0] + a2*b2*c3*[0 0]


[0 0] [0 3] [0 0]

Command EVALPAR
The command evalpar is used to compute the value of the matrix polynomial given the values of the
parameters. The syntax is

19
>> var = evalpar(poly,paramval)
The input poly contains the rolmipvar variable, and paramval contains the values of the param-
eters. If the polynomial is defined directly on the (multi) simplex, then paramval is a cell array (even
if the polynomial is defined over only one simplex), and paramval must be a vector if poly is a matrix
polynomially dependent on bounded parameters.

Example 16
Suppose that poly represents the polynomial
     
2 1 0 −3 4 2 0 1
A(α) = α1 + α1 α2 + α2 .
2 −1 2 3 −2 4

The command

>> var = evalpar(poly,{[0.3 0.7]})


performs the calculation
       
2 1 0 −3 4 2 0 1 −0.54 1.33
(0.3) + (0.3)(0.7) + (0.7) =
2 −1 2 3 −2 4 −0.38 2.5

%Example 16
A{1} = {[2 0],[1 0; 2 -1]};
A{2} = {[1 1],[-3 4; 2 3]};
A{3} = {[0 2],[0 1; -2 4]};
poly = rolmipvar(A,'A',2,2);
var = evalpar(poly,{[0.3 0.7]})

>> var
var =

-0.5400 1.3300
-0.3800 2.5000

Example 17
Suppose that poly represents the polynomial
       
1 0 −3 4 0 1 4 7
A(α, β) = α1 β12 + α1 β1 β2 + α2 β1 β2 + α2 β22 .
2 −1 2 3 −2 4 1 −2

The command

>> var = evalpar(poly,{[0.3 0.7],[0.1 0.9]})


performs the calculation
     
2 1 0 −3 4 0 1
(0.3)(0.1) + (0.3)(0.1)(0.9) + (0.7)(0.1)(0.9)
2 −1 2 3 −2 4
   
2 4 7 2.190 4.140
+ (0.7)(0.9) =
1 −2 0.501 −0.804

20
%Example 17
A{1} = {[1 0],[2 0],[1 0; 2 -1]};
A{2} = {[1 0],[1 1],[-3 4; 2 3]};
A{3} = {[0 1],[1 1],[0 1; -2 4]};
A{4} = {[0 1],[0 2],[4 7; 1 -2]};
poly = rolmipvar(A,'A',[2 2],[1 2]);
var = evalpar(poly,{[0.3 0.7],[0.1 0.9]})

>> var
var =

2.1900 4.1400
0.5010 -0.8040

Example 18
Suppose that poly represents the polynomial
       
0 1 2 3 2 5 −1 2 3 3
A(θ) = + θ1 + θ1 θ2 + θ2 , −8 ≤ θ1 ≤ 8, −8 ≤ θ2 ≤ 8.
2 4 −2 5 2 0 0 8

The command

>> var = evalpar(poly,[2 3])


performs the calculation
         
0 1 2 3 5 −1 3 3 91 22
A(θ) = +2 + (22 )3 + 32 = .
2 4 −2 5 2 0 0 8 22 86

%Example 18
A{1} = {[0 0],[0 1; 2 4]};
A{2} = {[1 0],[2 3; -2 5]};
A{3} = {[2 1],[5 -1; 2 0]};
A{4} = {[0 2],[3 3; 0 8]};
poly = rolmipvar(A,'A',[-8 8; -8 8]);
var = evalpar(poly,[2 3])

>> var
var =

91 22
22 86

Command DOUBLE
In YALMIP parser [11], the command double is applied on sdpvar variables, returning the double pre-
cision values of the variables (if such values are already assigned). If the command double is applied on
a rolmipvar variable, it returns the respective polynomial with monomials given on the double precision
values.

21
Command DIFF
Usually, when dealing with linear parameter-varying (LPV) systems, where the parameters may be time-
varying, the parameter-dependent inequalities depend on the time-derivative of some parameter-dependent
matrix variables. For example, the continuous-time LPV system

ẋ(t) = A(α(t))x(t), α(t) ∈ ∆N ,

is asymptotically stable if there is a symmetric positive definite matrix P (α(t)) satisfying

d
A(α(t))′ P (α(t)) + P (α(t))A(α(t)) + P (α(t)) < 0.
dt
For ease of notation, consider that
d
P (α(t)) = Ṗ (α(t)).
dt
Suppose that the parameter-dependent variable P (α(t)) depends affinely on α(t), that is
N
X
P (α(t)) = αi (t)Pi .
i=1

Then one has


N
X
Ṗ (α(t)) = α̇i (t)Pi .
i=1

If the variation rates of the parameters α(t) are bounded, and such bounds are previously known, then the
space where the parameters αi (t) and α̇i (t) can assume values can be modeled as a polytope described by
the set
R N
( )
X X
N ℓ ℓ
Υ= ϕ∈R : ϕ= βℓ h , hi = 0, ∀ℓ = 1, . . . , R, β ∈ ΛR ,
ℓ=1 i=1

where the vectors hℓare the vertices of the polytope. Using this representation, Ṗ (α(t)) can be represented
in a polytopic way over a different simplex, such as
N X
X M
Ṗ (α(t)) = βℓ hℓi Pi , β ∈ ∆M ,
i=1 ℓ=1

For more details on this representation, please refer to [6, 8].


The presented transformation can be automatically performed using the command diff of ROLMIP,
whose standard syntax is

>> dotpoly = diff(poly,labelout,dotbounds)


The polynomial to be derived is given by poly, the label of the derived polynomial is given by
labelout10 , and dotbounds contains the bounds of the variation rates of the parameters. By default, the
Multi-Parametric Toolbox (MPT) [10] is used, if installed, to generate the vectors hℓ , through the applica-
tion of vertex enumeration algorithms [2], which are computationally faster. Otherwise, the transformation
is computed using a recursive technique.
Note that, without knowing such bounds, it is not possible to generate a polytope where the vector α̇(t)
lies and, as a consequence, the variable P (α(t)) must be α(t) independent, that is, a polynomial of degree
zero on α(t). If the input polynomial depends on only one simplex, then dotbounds can be a vector;
otherwise, it must be a cell array, each cell containing the information about each simplex.
10
If the input labelout is not informed, then the label of the output polynomial is composed by the string dot
concatenated with the label of the input polynomial.

22
Example 19
Suppose that one needs to calculate the derivative of the polynomial poly, defined over one simplex of three
vertices, being the variation rates of each parameter bounded by

−1 ≤ α̇1 (t) ≤ 1, −1 ≤ α̇2 (t) ≤ 1, −1 ≤ α̇3 (t) ≤ 1.

The vectors that describe the polytopic region where the parameters α̇i (t) lie are given by
 
 1 1 0 −1 −1 0 1
h · · · h6 =  0

1 1 0 −1 −1
−1 −1 0 1 1 0

and a graphical illustration is depicted in Figure 1.

0.5
α̇3 (t)

-0.5

-1
-1

-0.5 1
0.5
0
0
0.5
-0.5
α̇1 (t) 1 -1 α̇2 (t)

Figure 1: Feasible region associated to the constraints −1 ≤ α̇i ≤ 1 and α̇1 + α̇2 + α̇3 = 0.

The derivative of the polynomial is obtained by the command

>> dotpoly = diff(poly,labelout,[-1 1; -1 1; -1 1]);

%Example 19
A{1} = {[1 0 0],eye(2)};
A{2} = {[0 1 0],2*eye(2)};
A{3} = {[0 1 0],3*eye(2)};
poly = rolmipvar(A,'A',3,1);
dotpoly = diff(poly,'dpoly',[-1 1; -1 1; -1 1])

23
Label: dpoly
Vertices: [3 6]
Degrees: [1 1]

a1*b1*[-1 0] + a2*b1*[-1 0] + a3*b1*[-1 0] + a1*b2*[1 0]


+ a2*b2*[1 0] +
[ 0 -1] [ 0 1] [ 0 -1] [0 1]
[0 1]
a3*b2*[1 0] + a1*b3*[-1 0] + a2*b3*[-1 0] + a3*b3*[-1 0]
+ a1*b4*[-2 0] +
[0 1] [0 -1] [0 -1] [0 -1]
[0 -2]
a2*b4*[-2 0] + a3*b4*[-2 0] + a1*b5*[1 0] + a2*b5*[1 0]
+ a3*b5*[1 0] +
[0 -2] [0 1] [0 1] [0 1]
[0 -2]
a1*b6*[2 0] + a2*b6*[2 0] + a3*b6*[2 0]
[0 2] [0 2] [0 2]
>>

Example 20
Suppose that one needs to calculate the derivative of the polynomial poly, defined over two simplexes: the
first (α) of three vertices, and the second (β) of two vertices. The variation rates of each parameter are
bounded by

−1 ≤ α̇1 (t) ≤ 2, −3 ≤ α̇2 (t) ≤ 4, −8 ≤ α̇3 (t) ≤ 6, −4 ≤ β̇1 (t) ≤ 1, −6 ≤ β̇2 (t) ≤ 9.

The derivative of the polynomial is obtained by the commands

>> dotbounds{1} = [-1 2; -3 4; -8 6];


>> dotbounds{2} = [-4 1; -6 9];
>> dotpoly = diff(poly,labelout,dotbounds);

%Example 20
A{1} = {[1 0 0],[1 0],eye(2)};
A{2} = {[1 0 0],[0 1],2*eye(2)};
A{3} = {[0 1 0],[1 0],3*eye(2)};
A{4} = {[0 1 0],[0 1],4*eye(2)};
A{5} = {[0 0 1],[1 0],5*eye(2)};
A{6} = {[0 0 1],[0 1],6*eye(2)};
poly = rolmipvar(A,'A',[3 2],[1 1]);
dotbounds{1} = [-1 2; -3 4; -8 6];
dotbounds{2} = [-4 1; -6 9];
dotpoly = diff(poly,'dpoly',dotbounds)

24
>> dotpoly
a1*b1*c1*d1*[14 0] + a2*b1*c1*d1*[14 0] + a3*b1*c1*d1*[14 0]
[0 14] [0 14] [0 14]

+ a1*b2*c1*d1*[14 0] + a2*b2*c1*d1*[14 0] + a3*b2*c1*d1*[14 0]


[0 14] [0 14] [0 14]

+ a1*b1*c2*d1*[0 0] + a2*b1*c2*d1*[0 0] + a3*b1*c2*d1*[0 0]


[0 0] [0 0] [0 0]

+ a1*b2*c2*d1*[0 0] + a2*b2*c2*d1*[0 0] + a3*b2*c2*d1*[0 0]


[0 0] [0 0] [0 0]

+ a1*b1*c3*d1*[2 0] + a2*b1*c3*d1*[2 0] + a3*b1*c3*d1*[2 0]


[0 2] [0 2] [0 2]

+ a1*b2*c3*d1*[2 0] + a2*b2*c3*d1*[2 0] + a3*b2*c3*d1*[2 0]


[0 2] [0 2] [0 2]

+ a1*b1*c4*d1*[-12 0] + a2*b1*c4*d1*[-12 0] + a3*b1*c4*d1*[-12 0]


[0 -12] [0 -12] [0 -12]

+ a1*b2*c4*d1*[-12 0] + a2*b2*c4*d1*[-12 0] + a3*b2*c4*d1*[-12 0]


[0 -12] [0 -12] [0 -12]

+ a1*b1*c1*d2*[9 0] + a2*b1*c1*d2*[9 0] + a3*b1*c1*d2*[9 0]


[0 9] [0 9] [0 9]

+ a1*b2*c1*d2*[9 0] + a2*b2*c1*d2*[9 0] + a3*b2*c1*d2*[9 0]


[0 9] [0 9] [0 9]

+ a1*b1*c2*d2*[-5 0] + a2*b1*c2*d2*[-5 0] + a3*b1*c2*d2*[-5 0]


[0 -5] [0 -5] [0 -5]

+ a1*b2*c2*d2*[-5 0] + a2*b2*c2*d2*[-5 0] + a3*b2*c2*d2*[-5 0]


[0 -5] [0 -5] [0 -5]

+ a1*b1*c3*d2*[-3 0] + a2*b1*c3*d2*[-3 0] + a3*b1*c3*d2*[-3 0]


[0 -3] [0 -3] [0 -3]

+ a1*b2*c3*d2*[-3 0] + a2*b2*c3*d2*[-3 0] + a3*b2*c3*d2*[-3 0]


[0 -3] [0 -3] [0 -3]

+ a1*b1*c4*d2*[-17 0] + a2*b1*c4*d2*[-17 0] + a3*b1*c4*d2*[-17 0]


[0 -17] [0 -17] [0 -17]

+ a1*b2*c4*d2*[-17 0] + a2*b2*c4*d2*[-17 0] + a3*b2*c4*d2*[-17 0]


[0 -17] [0 -17] [0 -17]

If the polynomial is defined from a matrix polynomially dependent on bounded parameters, then the
derivative can be obtained using the syntax

>> dotpoly = diff(poly,labelout,bounds,dotbounds)


The input bounds informs the bounds of each parameter, and the bounds of their variation rates are

25
given by the vector dotbounds.

Example 21
Suppose that one needs to calculate the derivative of the polynomial poly, depending on parameters θ1 , θ2
and θ3 . The bounds and variation rates are given by

−2 ≤ θ1 (t) ≤ 4, 3 ≤ θ2 (t) ≤ 6, 1 ≤ θ3 (t) ≤ 8,

−1 ≤ θ̇1 (t) ≤ 5, −3 ≤ θ̇2 (t) ≤ 2, −7 ≤ θ̇3 (t) ≤ 3.


The derivative of such polynomial can be calculated using the command

>> dotpoly = diff(poly,labelout,[-2 4; 3 6; 1 8],[-1 5; -3 2; -7 3]);

%Example 21
A{1} = {[0 0 0],eye(2)};
A{2} = {[1 0 0],2*eye(2)};
A{3} = {[1 1 0],3*eye(2)};
A{4} = {[0 2 0],4*eye(2)};
A{5} = {[1 1 1],5*eye(2)};
A{6} = {[0 0 3],6*eye(2)};
poly = rolmipvar(A,'A',[-2 4; 3 6; 1 8]);
dotpoly = diff(poly,'dpoly',[-2 4; 3 6; 1 8],[-1 5; -3 2; -7 3])

Command PARTIAL
The command partial computes the partial derivatives of a polynomial variable with respect to the
simplex parameters. The syntax of partial is

>> dpoly = partial(poly,labelout,simpnum)


where poly is the input polynomial, labelout is the label of the resultant polynomial, simpnum is the
index of the simplex domain in which respect the polynomial is differentiated, and dpoly is a cell structure
containing the computed gradient vector.
For instance, suppose that P (α, β) is a polynomial with α in a simplex with three vertices, and β in a
simplex with two vertices. The command

>> dpoly = partial(poly,'dPda',1);


computes the gradient vector
 
∂P (α, β) ∂P (α, β) ∂P (α, β) ∂P (α, β)
= .
∂α ∂α1 ∂α2 ∂α3

Similarly, the command

>> dpoly = partial(poly,'dPdb',2);


yields  
∂P (α, β) ∂P (α, β) ∂P (α, β)
= .
∂β ∂β1 ∂β2
If the variable simpnum is not informed, then the partial derivative is calculated over the first simplex.

26
Example 22
Consider the polynomial A(α) given by

A(α) = α21 A1 + α1 α2 A2 + α22 A3 ,

∂A(α)
defined as the variable poly. The partial derivative can be computed through the command
∂α
>> dpoly = partial(poly,'dAda');

>> dotbounds{1} = [-1 2; -3 4; -8 6];


>> dotbounds{2} = [-4 1; -6 9];
>> dotpoly = diff(poly,labelout,dotbounds);

%Example 22
A{1} = {[2 0],eye(2)};
A{2} = {[1 1],3*eye(2)};
A{3} = {[0 2],5*eye(2)};

poly = rolmipvar(A,'A',2,2);
dpoly = partial(poly,'dAda')

>> dpoly
dpoly =

[2 rolmipvar] [2 rolmipvar]

>> dpoly{1}
Label: dAda
Vertices: [2]
Degrees: [1]

a1*[2 0] + a2*[3 0]
[0 2] [0 3]

>> dpoly{2}
Label: dAda
Vertices: [2]
Degrees: [1]

a1*[3 0] + a2*[10 0]
[0 3] [0 10]

Command DISCSHIFT
The stability analysis for discrete-time LPV systems can be performed using procedures similar to the ones
used in the continuous-time case. For instance, the discrete-time LPV system

x(k + 1) = A(α(k))x(k), α(k) ∈ ∆N

is asymptotically stable if the exists a symmetric positive definite matrix P (α(k)) satisfying

A(α(k))′ P (α(k + 1))A(α(k)) − P (α(k)) < 0.

Therefore, it is necessary to define not only P (α(k)), but also the respective time-shifted matrix P (α(k +1)).

27
Suppose that P (α(k)) is defined as
N
X
P (α(k)) = αi (k)Pi .
i=1

Consequently,
N
X
P (α(k + 1)) = αi (k + 1)Pi .
i=1

If the variation rates of the parameters α(k) are bounded, being such bounds previously known and given
by
di ≤ αi (k + 1) − αi (k) ≤ di , 0 ∈ [di , di ], i = 1, . . . , N,
then one may define a polytope to represent all the possible values of α(k) and α(k + 1), resulting in
  X M
N X  
P (α(k)) P
= βℓ hℓi i , β ∈ ∆M
P (α(k + 1)) Pi
i=1 ℓ=1

where hℓ are the vertices of the polytope. The procedure is generalized to deal with an arbitrary number of
time-instants η ahead, that is, for P (α(k + η)).
Time-shifted matrices can be automatically computed using the command discshift, whose syntax is

>> polyout = discshift(polyin,eta,bounds,targetin,targetout);


The input polynomial is described by polyin, eta is an integer corresponding to the maximum number
of shifts needed, the bounds [di , di ] are given by bounds, and the inputs targetin and targetout
correspond, respectively, to the simplex that is shifted and to the index of the new simplex domain. The
Multi-Parametric Toolbox (MPT) [10] is necessary to calculate the vectors hℓ and, if such toolbox is not
installed, an error will occur. The output polyout is a cell structure with eta+1 positions containing all
the time-shifted matrices up to eta, represented in the new simplex domain. If bounds is not informed
then the parameters are supposed to vary arbitrarily (di = −di = 1, i = 1, . . . , N ), and if targetout is not
given then the next simplex domain available is used to represent the output polynomials. If the variable is
defined only over one simplex, then targetin does not need to be informed.

Example 23
Consider the matrix polynomial A(α(k)) given by
   
1 0 3 0
A(α(k)) = α1 (k) + α2 (k) ,
0 1 0 3

with
|α1 (k + 1) − α1 (k)| ≤ 0.4, |α2 (k + 1) − α2 (k)| ≤ 0.6.
The polynomials A(α(k)), A(α(k + 1)) and A(α(k + 2)), represented in the same simplex domain β ∈ ∆M ,
can be obtained by the command

>> polyout = discshift(polyin,2,[-0.4 0.4; -0.6 0.6]);


The output polyout{1}, polyout{2} and polyout{3} contain, respectively, the resultant polyno-
mials A(α(k)), A(α(k + 1)) and A(α(k + 2)). The utilization of the discshift command is detailed in the
following.

%Example 23
A{1} = eye(2);
A{2} = 3*eye(2);

polyA = rolmipvar(A,'A',2,1);
polyout = discshift(polyA,2,[-0.4 0.4; -0.6 0.6]);

28
>> polyout
polyout =

[2 rolmipvar] [2 rolmipvar] [2 rolmipvar]

>> polyout{1}
Label: A
Vertices: [2 14]
Degrees: [0 1]

b1*[3 0] + b2*[2.2 0] + b3*[2.6 0] + b4*[1.8 0]


[0 3] [0 2.2] [0 2.6] [0 1.8]

+ b5*[1.8 0] + b6*[1 0] + b7*[1 0] + b8*[1 0]


[0 1.8] [0 1] [0 1] [0 1]

+ b9*[1 0] + b10*[3 0] + b11*[1.4 0] + b12*[2.2 0]


[0 1] [0 3] [0 1.4] [0 2.2]

+ b13*[3 0] + b14*[3 0]
[0 3] [0 3]

>> polyout{2}
Label: A(k+1)
Vertices: [2 14]
Degrees: [0 1]

b1*[3 0] + b2*[3 0] + b3*[1.8 0] + b4*[1 0] + b5*[1 0]


[0 3] [0 3] [0 1.8] [0 1] [0 1]

+ b6*[1 0] + b7*[1.8 0] + b8*[1 0] + b9*[1.8 0] + b10*[2.2 0]


[0 1] [0 1.8] [0 1] [0 1.8] [0 2.2]

+ b11*[2.2 0] + b12*[3 0] + b13*[3 0] + b14*[2.2 0]


[0 2.2] [0 3] [0 3] [0 2.2]

>> polyout{3}
Label: A(k+2)
Vertices: [2 14]
Degrees: [0 1]

b1*[2.2 0] + b2*[2.2 0] + b3*[1 0] + b4*[1.8 0] + b5*[1 0]


[0 2.2] [0 2.2] [0 1] [0 1.8] [0 1]

+ b6*[1.8 0] + b7*[2.6 0] + b8*[1 0] + b9*[1 0] + b10*[1.4 0]


[0 1.8] [0 2.6] [0 1] [0 1] [0 1.4]

+ b11*[3 0] + b12*[3 0] + b13*[3 0] + b14*[3 0]


[0 3] [0 3] [0 3] [0 3]

29
Example 24
Consider now the matrix
       
1 0 3 0 5 0 7 0
A(α(k), β(k)) = α1 (k)β1 (k) + α1 (k)β2 (k) + α2 (k)β1 (k) + α2 (k)β2 (k) .
0 1 0 3 0 5 0 7

Since the shift operation is performed over one simplex domain, the polynomial A(α(k + 1), β(k + 1)) can
be computed by applying the discshift command first over one simplex, and then using the command
again on the resulting polynomial, as detailed in the following commands.

%Example 24
A{1} = {[1 0],[1 0],eye(2)};
A{2} = {[1 0],[0 1],3*eye(2)};
A{3} = {[0 1],[1 0],5*eye(2)};
A{4} = {[0 1],[0 1],7*eye(2)};
polyA = rolmipvar(A,'A',[2 2],[1 1]);

%Generates A(\alpha(k+1),\beta(k))
polyaux = discshift(polyA,1,[-0.4 0.4; -0.6 0.6],1,3);

%Applies discshift on A(\alpha(k+1),\beta(k)) to generate


%A(\alpha(k+1),\beta(k+1))
polyout = discshift(polyaux{1},1,[-0.4 0.4; -0.6 0.6],2,4);
polyout{1}

30
>> polyout{1}
Label: A
Vertices: [2 2 6 6]
Degrees: [0 0 1 1]

c1*d1*[7 0] + c2*d1*[3 0] + c3*d1*[3 0] + c4*d1*[4.6 0]


[0 7] [0 3] [0 3] [0 4.6]

+ c5*d1*[5.4 0] + c6*d1*[7 0] + c1*d2*[5 0] + c2*d2*[1 0]


[0 5.4] [0 7] [0 5] [0 1]

+ c3*d2*[1 0] + c4*d2*[2.6 0] + c5*d2*[3.4 0] + c6*d2*[5 0]


[0 1] [0 2.6] [0 3.4] [0 5]

+ c1*d3*[5 0] + c2*d3*[1 0] + c3*d3*[1 0] + c4*d3*[2.6 0]


[0 5] [0 1] [0 1] [0 2.6]

+ c5*d3*[3.4 0] + c6*d3*[5 0] + c1*d4*[5.8 0] + c2*d4*[1.8 0]


[0 3.4] [0 5] [0 5.8] [0 1.8]

+ c3*d4*[1.8 0] + c4*d4*[3.4 0] + c5*d4*[4.2 0] + c6*d4*[5.8 0]


[0 1.8] [0 3.4] [0 4.2] [0 5.8]

+ c1*d5*[6.2 0] + c2*d5*[2.2 0] + c3*d5*[2.2 0] + c4*d5*[3.8 0]


[0 6.2] [0 2.2] [0 2.2] [0 3.8]

+ c5*d5*[4.6 0] + c6*d5*[6.2 0] + c1*d6*[7 0] + c2*d6*[3 0]


[0 4.6] [0 6.2] [0 7] [0 3]

+ c3*d6*[3 0] + c4*d6*[4.6 0] + c5*d6*[5.4 0] + c6*d6*[7 0]


[0 3] [0 4.6] [0 5.4] [0 7]

Command TEXIFY
The command texify, with syntax given by

>> out = texify(poly,option,var1,. . .,varN,simplexnames);


returns the LATEX code of the input polynomial poly. The argument option is a string that informs if the
desired output format presents an explicit dependence of the polynomial on the simplexes ('explicit'),
only the polynomial variables without showing their dependence on the simplexes ('implicit'), or the
polynomial structure showing each monomial ('polynomial'). The arguments var1,. . .,varN are the
variables that are used in the expression to be output; it is necessary to inform separately each variable in
such a way that the procedure can assess the information needed. Finally, the input simplexnames is a
cell array of strings containing the desired names for each simplex, already in LATEX format. If only one
string is informed instead of a cell array of strings, then it is supposed that the user intends to represent all
the simplexes using one single (multi-simplex) variable. If simplexnames is not informed, then standard
names are used. The name of the polynomial variables is equal to the label informed in their definition.

Example 25
Consider the polynomial A(α, β), being both simplexes of degree 1 and 2 vertices and defined by the variable
Ai, and the polynomial P (α), of degree 1 and defined by the variable Pi. The command

31
>> out = texify(Ai'*Pi + Pi*Ai,'explicit',Ai,Pi,{'\alpha','\beta'});

produces the output

out =

A(\alpha,\beta)'P(\alpha)+P(\alpha)A(\alpha,\beta)

On the other hand, the command

>> out = texify(Ai'*Pi + Pi*Ai,'explicit',Ai,Pi,'\alpha')

returns

out =

A(\alpha)'P(\alpha)+P(\alpha)A(\alpha)

The command

>> out = texify(Ai'*Pi + Pi*Ai,'implicit',Ai,Pi)

yields

out =

A'P+PA

Finally, the command

>> out = texify(Ai'*Pi + Pi*Ai,'polynomial',Ai,Pi,{'\alpha','\beta'})

returns the LATEX code

out =

\alpha {1}ˆ{2}\ beta {1}( A {1}' P {1}+ P {1} A {1})


+ \alpha {1}\ alpha {2}\ beta {1}( A {1}' P {2}+ A {2}' P {1}+ P {1} A {2}+ P {2} A {1})
+ \alpha {2}ˆ{2}\ beta {1}( A {2}' P {2}+ P {2} A {2})
+ \alpha {1}ˆ{2}\ beta {2}( A {3}' P {1}+ P {1} A {3})
+ \alpha {1}\ alpha {2}\ beta {2}( A {3}' P {2}+ A {4}' P {1}+ P {1} A {4}+ P {2} A {3})
+ \alpha {2}ˆ{2}\ beta {2}( A {4}' P {2}+ P {2} A {4})

6 Composing matrices and LMIs


The construction of matrices of polynomials and LMIs using ROLMIP is done in an intuitive way, just as in
YALMIP11 . For example, suppose that the LMIs associated with the parameter-dependent LMI conditiion
given in (3) are to be implemented, and suppose that the matrices A(α) and P (α) are defined by the
rolmipvar variables Ai and Pi, respectively. The resulting set of LMIs is defined using
11
In previous versions of ROLMIP, such construction is performed using the command construct lmi; this command
is still implemented for backwards compatibility, but it will be discontinued.

32
>> LMIs = [[Pi Ai'*Pi; Pi*Ai Pi] > 0];

Any necessary degree homogenization is automatically performed by ROLMIP.

6.1 Pólya’s relaxation


An interesting relaxation usually performed when dealing with LMI conditions over homogeneous poly-
nomials is based on the Pólya’s theorem for the case of positive polynomials with matrix-valued coeffi-
cients [20, 21, 14]. For a better understanding of Pólya’s relaxation, suppose for example condition (3), and
suppose that there exists a matrix P (α) = P (α)T > 0 of degree g satisfying the condition. A simple way
to verify that P (α) satisfies the condition is to check if each monomial of the homogeneous polynomial is
positive definite. This is sufficient, but not necessary; in some cases, the polynomial is positive definite but
not all the coefficients of the monomials are positive. In this case, according to Pólya’s theorem, there exists
an integer d > 0 such that the monomials of
 d
N
M X  
X (j)  P (α) A(α)′ P (α)
 α i (13)
P (α)A(α) P (α)
j=1 i=1

are definite positive, being α(j) the j-th simplex on a multi-simplex domain.
The Pólya’s relaxation technique is currently implemented on ROLMIP within the command polya,
with syntax

>> polyout = polya(polyin,d);


being d the degree d of the relaxation.

Example 26
The implementation of the LMIs resultant from the matrix polynomial (13) being positive definite can be
performed through the following sequence of commands.

%Example 26
A{1} = {[1 0],eye(2)};
A{2} = {[0 1],2*eye(2)};

polyA = rolmipvar(A,'A',2,1);
polyP = rolmipvar(2,2,'P','sym',2,1);
cond = [polyP polyA'*polyP; polyP*polyA polyP];
LMIs = [cond > 0]
d = 3;
condpolya = polya(cond,d);
LMIspolya = [condpolya > 0]

33
>> LMIs
++++++++++++++++++++++++++++++++
| ID | Constraint |
++++++++++++++++++++++++++++++++
| #1| Matrix inequality 4x4 |
| #2| Matrix inequality 4x4 |
| #3| Matrix inequality 4x4 |
++++++++++++++++++++++++++++++++

>> LMIspolya
++++++++++++++++++++++++++++++++
| ID | Constraint |
++++++++++++++++++++++++++++++++
| #1| Matrix inequality 4x4 |
| #2| Matrix inequality 4x4 |
| #3| Matrix inequality 4x4 |
| #4| Matrix inequality 4x4 |
| #5| Matrix inequality 4x4 |
| #6| Matrix inequality 4x4 |
++++++++++++++++++++++++++++++++

Note the increased number of LMIs after the application of Pólya’s relaxation.
In the following section, more involved examples based on uncertain linear systems problems, are pre-
sented for a better understanding of ROLMIP.

7 Solving Uncertain Linear Systems Problems with ROLMIP


7.1 Robust Stability Analysis
Consider the problem of robust stability analysis of the discrete-time linear system given in (1) with the
following uncertain dynamic matrix
   
0.1 0.9 0.5 0
A(α) = α1 + α2
0 0.1 1 0.5

The first step is the the declaration of A(α) as a rolmipvar, which can be performed as (there are other
possibilities)

>> A{1} = [0.1 0.9;0 0.1];


>> A{2} = [0.5 0;1 0.5];
>> A = rolmipvar(A,'A(\alpha)',2,1)
and the last command prints in screen:

Label: A(\alpha)
Vertices: [2]
Degrees: [1]

a1*[0.1 0.9] + a2*[0.5 0]


[0 0.1] [1 0.5]

The next step is to choose the structure for the Lyapunov matrix. For instance, consider an affine
(degree one) polynomial dependence on α, as in (4). In this case the declaration of P (α) is done through
the command

34
>> P = rolmipvar(2,2,'P(\alpha)',2,1)

echoing in screen

Linear matrix variable 2x2 (symmetric, real, 3 variables)


Label: P(\alpha)
Vertices: [2]
Degrees: [1]

As shown in last section, the programming of the robust stability condition is very easy (the echo in
screen, produced by YALMIP, is also shown):

>> LMIs = [[P A'*P; P*A P] >= 0]

++++++++++++++++++++++++++++++++
| ID | Constraint |
++++++++++++++++++++++++++++++++
| #1| Matrix inequality 4x4 |
| #2| Matrix inequality 4x4 |
| #3| Matrix inequality 4x4 |
++++++++++++++++++++++++++++++++

Note that the number of LMIs (three) agrees with the number of monomials of the expression given
in (6) when N = 2. Actually, each monomial gives rise to one LMI. After solving the set of LMIs (using
SeDuMi) with the command:

>> optimize(LMIs,[],sdpsettings('verbose',0,'solver','sedumi'));

and checking the status of the constraints after the optimization, one has

>> checkset(LMIs)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| ID | Constraint | Primal residual | Dual residual |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| #1| Matrix inequality | 0.17957 | 1.9148e-14|
| #2| Matrix inequality | 0.12168 | 3.058e-14|
| #3| Matrix inequality | 0.056108 | 2.2844e-14|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

As the primal residuals are positive, the LMIs are strictly feasible, assuring the robust stability of A(α).
Moreover, the Lyapunov matrix that certifies the robust stability can be inspected using the command:

>> double(P)
Label: P(\alpha)
Vertices: [2]
Degrees: [1]

a1*[0.56664 0.0039574] + a2*[1.0987 0.062489]


[0.0039574 0.87634] [0.062489 0.45827]

It is worth to emphasize that, depending on the solver used or on the MATLAB version, different values
for P (α) can be obtained.

35
7.2 Guaranteed H∞ Cost Computation
Consider the continuous-time uncertain time-invariant system given by

ẋ(t) = A(α)x(t) + B(α)w(t)
(14)
y(t) = C(α)x(t) + D(α)w(t)

with A(α) ∈ Rn×n , B(α) ∈ Rn×r , C(α) ∈ Rq×n and D(α) ∈ Rq×r . The transfer function from the
disturbance input w to the output y, for a fixed α, is given by
−1
H(s, α) = C(α) sI − A(α) B(α) + D(α)

The bounded real lemma assures the Hurwitz stability of A(α) (i.e., all eigenvalues have negative real part)
for all α ∈ ∆N and a bound γ to the H∞ norm of the transfer function from w to y. It can be formulated
as follows [4].

Lemma 1
Matrix A(α) is Hurwitz and kH(s, α)k∞ < γ for all α ∈ ∆N if there exists a symmetric positive definite
matrix P (α) = P (α)′ > 0 such that
 
A(α)′ P (α) + P (α)A(α) + C(α)′ C(α) ⋆
< 0, ∀α ∈ ∆N (15)
B(α)′ P (α) + D(α)′ C(α) D(α)′ D(α) − γ 2 I

In this example, consider a fourth-order mass-spring system, also investigated in [14], whose matrices
are given by

0 0 1 0
   
0
 0 0 0 1  0   
A= − m2 1 c0
 , B =  1  , C = 0 1 0 0 , D = 0,
1 m1 − m1 0  
m1

1 1 c0
m2 − m2 0 − m2 0

with
0.5 ≤ m1 ≤ 1.5, 0.75 ≤ m2 ≤ 1.25, 1 ≤ c0 ≤ 2.
Setting θ1 = 1/m1 , θ2 = 1/m2 and θ3 = c0 , one has

2/3 ≤ θ1 ≤ 2, 0.8 ≤ θ2 ≤ 4/3, 1 ≤ θ3 ≤ 3,

and the matrices can be rewritten as


         
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
A(θ) = 
0 0 0 0 + θ1 −2 1 0 0 + θ1 θ3 0
     + θ2   + θ2 θ3  ,
0 −1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 −1 0 0 0 0 0 −1
 
0
0  
B(θ) = θ1 
1 , C(θ) = 0 1 0 0 , D(θ) = 0.

The implementation of LMI relaxations that search for a feasible solution while minimizing µ = γ 2 is
given in the sequence12 .
12
This code is available as Example 5 1.m in the installation file.

36
Algorithm 1

1 clear;
2 degP = 1;
3 A{1} = {[0 0 0],[0 0 1 0; 0 0 0 1; 0 0 0 0; 0 0 0 0]};
4 A{2} = {[1 0 0],[0 0 0 0; 0 0 0 0; -2 1 0 0; 0 0 0 0]};
5 A{3} = {[1 0 1],[0 0 0 0; 0 0 0 0; 0 0 -1 0; 0 0 0 0]};
6 A{4} = {[0 1 0],[0 0 0 0; 0 0 0 0; 0 0 0 0; 1 -1 0 0]};
7 A{5} = {[0 1 1],[0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 -1]};
8 Ai = rolmipvar(A,'A',[2/3 2; 0.8 4/3; 1 3]);
9 B{1} = {[1 0 0],[0;0;1;0]};
10 Bi = rolmipvar(B,'B',[2/3 2]);
11 Ci = rolmipvar([0 1 0 0],'C',0,0);
12 Di = rolmipvar(0,'D',0,0);
13 Pi = rolmipvar(4,4,'P','sym',[2 2 2],[degP degP degP]);
14 mu = sdpvar(1,1);
15 T11 = Ai'*Pi + Pi*Ai + Ci'*Ci;
16 T21 = Bi'*Pi + Di'*Ci;
17 T22 = Di'*Di - mu*eye(1);
18 T = [T11 T21'; T21 T22];
19 LMIs = [Pi >= 0, T <= 0];
20 optimize(LMIs,mu);
21 gama = sqrt(double(mu));

Remark 2
Note that, when defining variable T22 in row 17, a rolmipvar (Di) is mixed with a sdpvar (mu). However,
as Di appears first, the subtraction is performed by the rolmipvar class, that is prepared to deal with
sdpvar variables. On the other hand, the equivalent declaration: -mu*eye(1)+Di'*Di would produce
an error, since the sdpvar comes first in the expression.
As illustrated, the implementation of LMI conditions using the Robust LMI Parser is simple and straight-
forward. Moreover, the different sets of LMIs for larger degrees of the homogeneous polynomial variable
P (α) can be readily obtained by simply changing degP. Those LMIs, that would demand complex and
tedious manipulations without using the parser, provide clear improvements in the computation of the H∞
guaranteed cost. Table 2 shows the values of γ ∗ = min γ subject to (15) obtained when the degree of the
variable P (α) increases. With g = 2, γ ∗ reaches the worst case value of the H∞ norm (computed through
brute force).

Table 2: Values of γ ∗ = min γ obtained when varying the degree of the polynomial variable P (α).

degP γ∗
0 2.8429
1 1.0540
2 1.0108
3 1.0108
4 1.0108
5 1.0108

In order to analyze the results obtained when applying the Pólya’s relaxation, as described in Section 6.1,
on Algorithm 7.2 for d = 3, it suffices to insert the following block of commands between lines 18 and 19:

d = 3;
t = polya(T,d);

37
The results obtained for the application of the latter addition on the code on the minimization of γ,
subject to (15) with Pólya’s relaxation, are shown on Table 3.

Table 3: Values of γ ∗ = min γ obtained when varying the degree of the polynomial variable P (α) for d = 3.

degP γ∗
0 2.8429
1 1.0308
2 1.0108
3 1.0108
4 1.0108
5 1.0108

8 Conclusion
A computational package, named Robust LMI Parser, is presented in this manual. The main objective of
the toolbox is to facilitate the task of programming LMIs that are sufficient conditions for robust LMIs,
i.e., for parameter-dependent LMI conditions whose entries are algebraic manipulations of homogeneous
polynomials of generic degree with parameters in the unit simplex or in known intervals. The toolbox is
under constant evolution and some new features are to be implemented. Suggestions of improvements and
bug reports are welcome and can be sent to the email [email protected].

References
[1] E. D. Andersen and K. D. Andersen. The MOSEK interior point optimizer for linear programming:
An implementation of the homogeneous algorithm. In H. Frenk, K. Roos, T. Terlaky, and S. Zhang,
editors, High Performance Optimization, volume 33 of Applied Optimization, pages 197–232. Springer
US, 2000. http://www.mosek.com.

[2] D. Avis and K. Fukuda. A pivoting algorithm for convex hulls and vertex enumeration of arrangements
and polyhedra. Discrete & Computational Geometry, 8(3):295–313, September 1992.

[3] P.-A. Bliman, R. C. L. F. Oliveira, V. F. Montagner, and P. L. D. Peres. Existence of homogeneous


polynomial solutions for parameter-dependent linear matrix inequalities with parameters in the simplex.
In Proceedings of the 45th IEEE Conference on Decision and Control, pages 1486–1491, San Diego, CA,
USA, December 2006.

[4] S. Boyd, L. El Ghaoui, E. Feron, and V. Balakrishnan. Linear Matrix Inequalities in System and
Control Theory. SIAM Studies in Applied Mathematics, Philadelphia, PA, 1994.

[5] M. Chamanbaz, F. Dabbene, D. Peaucelle, and R. Tempo. R-RoMulOC: A unified tool for randomized
and robust multiobjective control. In Proceedings of the 8th IFAC Symposium on Robust Control Design
(ROCOND 2015), volume 48, pages 144–149, Bratislava, July 2015.

[6] G. Chesi, A. Garulli, A. Tesi, and A. Vicino. Robust stability of time-varying polytopic systems via
parameter-dependent homogeneous Lyapunov functions. Automatica, 43(2):309–316, February 2007.

[7] P. Gahinet, A. Nemirovskii, A. J. Laub, and M. Chilali. LMI Control Toolbox User’s Guide. The Math
Works, Natick, MA, 1995.

[8] J. C. Geromel and P. Colaneri. Robust stability of time varying polytopic systems. Systems & Control
Letters, 55(1):81–85, January 2006.

[9] D. Henrion and J. B. Lasserre. GloptiPoly: Global optimization over polynomials with Matlab and
SeDuMi. ACM Transactions on Mathematical Software, 29(2):165–194, June 2003.

38
[10] M. Herceg, M. Kvasnica, C. N. Jones, and M. Morari. Multi-Parametric Toolbox 3.0. In Proceedings
of the 2013 European Control Conference, pages 502–510, Zurich, Switzerland, July 2013.

[11] J. Löfberg. YALMIP: A toolbox for modeling and optimization in MATLAB. In Proceedings of the 2004
IEEE International Symposium on Computer Aided Control Systems Design, pages 284–289, Taipei,
Taiwan, September 2004. https://yalmip.github.io/.

[12] R. C. L. F. Oliveira and P. L. D. Peres. LMI conditions for robust stability analysis based on poly-
nomially parameter-dependent Lyapunov functions. Systems & Control Letters, 55(1):52–61, January
2006.

[13] R. C. L. F. Oliveira and P. L. D. Peres. Parameter-dependent LMIs in robust analysis: Characterization


of homogeneous polynomially parameter-dependent solutions via LMI relaxations. IEEE Transactions
on Automatic Control, 52(7):1334–1340, July 2007.

[14] R. C. L. F. Oliveira and P. L. D. Peres. A convex optimization procedure to compute H2 and H∞


norms for uncertain linear systems in polytopic domains. Optimal Control Applications and Methods,
29(4):295–312, July/August 2008.

[15] D. Peaucelle and D. Arzelier. Robust multi-objective control toolbox. In Proceedings of the 2006
IEEE International Symposium on Computer Aided Control Systems Design, pages 1152–1157, Munich,
Germany, 2006.

[16] D. Peaucelle, A. Tremba, D. Arzelier, A. Bortott, G.C. Calafiore, G. Chevarria, F. Dabbene, E. Gryaz-
ina, B.T. Polyak, P.S. Shcherbakov, M. Sevin, Ph. Spiesser, and R. Tempo. R-romuloc : Randomized
and robust multi-objective control toolbox, January 2014.

[17] S. Prajna, A. Papachristodoulou, P. Seiler, and P. A. Parrilo. SOSTOOLS: Sum of squares optimization
toolbox for MATLAB, 2004. http://www.cds.caltech.edu/sostools.

[18] D. C. W. Ramos and P. L. D. Peres. A less conservative LMI condition for the robust stability of
discrete-time uncertain systems. Systems & Control Letters, 43(5):371–378, August 2001.

[19] D. C. W. Ramos and P. L. D. Peres. An LMI condition for the robust stability of uncertain continuous-
time linear systems. IEEE Transactions on Automatic Control, 47(4):675–678, April 2002.

[20] C. W. Scherer. Higher-order relaxations for robust LMI problems with verifications for exactness. In
Proceedings of the 42nd IEEE Conference on Decision and Control, pages 4652–4657, Maui, HI, USA,
December 2003.

[21] C. W. Scherer. Relaxations for robust linear matrix inequality problems with verifications for exactness.
SIAM Journal on Matrix Analysis and Applications, 27(2):365–395, June 2005.

[22] J. F. Sturm. Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Opti-
mization Methods and Software, 11(1–4):625–653, 1999. http://sedumi.ie.lehigh.edu/.

[23] K. C. Toh, M. J. Todd, and R. Tütüncü. SDPT3 — A Matlab software package for semidefinite
programming, Version 1.3. Optimization Methods and Software, 11(1):545–581, 1999. https://github.
com/SQLP/SDPT3.

[24] A. Tremba, G. C. Calafiore, F. Dabbene, E. Gryazina, B. T. Polyak, P. S. Shcherbakov, and R. Tempo.


RACT: Randomized Algorithms Control Toolbox for MATLAB. In Proceedings 17th IFAC World
Congress, Seoul, volume 41, pages 390–395, 2008.

39

You might also like