lmivar
Specify matrix variables in LMI problem
Description
defines a new matrix variable in the LMI system currently described. The array
X
= lmivar(type
,structure
)structure
specifies the structure of the variable. The optional
output X
is an identifier that can be used for subsequent reference to
the variable. Before using lmivar
to create any variables, initialize
the LMI system using setlmis
.
Examples
Type 1 and Type 2 Matrix Variables
Consider an LMI system with three matrix variables , , and such that:
is a 3-by-3 symmetric matrix (unstructured)
is a 2-by-4 rectangular matrix (unstructured)
=
where Δ is an arbitrary 5-by-5 symmetric matrix, and are scalars, and denotes the identity matrix of size 2.
Define these three variables using lmivar
.
setlmis([]) X1 = lmivar(1,[3 1]); % Type 1 X2 = lmivar(2,[2 4]); % Type 2 of dimension 2-by-4 X3 = lmivar(1,[5 1;1 0;2 0]); % Type 1
The last command defines as a variable of Type 1 with one full block of size 5 and two scalar blocks of sizes 1 and 2.
Type 3 Matrix Variables
Combined with the extra outputs n
and sX
of lmivar
, Type 3 allows you to specify fairly complex matrix variable structures. For instance, consider a matrix variable X with structure given by
,
where and are 2-by-3 and 3-by-2 rectangular matrices, respectively. Specify this structure as follows.
Define the rectangular variables and .
setlmis([]) [X1,n,sX1] = lmivar(2,[2 3]); [X2,n,sX2] = lmivar(2,[3 2]);
The outputs sX1
and sX2
give the decision variable content of and .
sX1
sX1 = 2×3
1 2 3
4 5 6
sX2
sX2 = 3×2
7 8
9 10
11 12
For instance, sX2(1,1) = 7
means that the (1,1) entry of is the seventh decision variable.
Next, use Type 3 to specify the matrix variable X and define its structure in terms of the structures of and .
[X,n,sX] = lmivar(3,[sX1,zeros(2);zeros(3),sX2]);
Confirm that the result X
has the desired structure.
sX
sX = 5×5
1 2 3 0 0
4 5 6 0 0
0 0 0 7 8
0 0 0 9 10
0 0 0 11 12
Input Arguments
type
— Matrix variable type
1 | 2 | 3
Matrix variable type, specified as 1, 2, or 3.
1 — Symmetric matrix with a block diagonal structure. Use
structure
to specify the size and structure of the diagonal blocks.2 — Full rectangular matrix. Use
structure
to specify the dimensions of the matrix.3 — Other structure. Use
structure
to provide further information about the structure of the variable.
structure
— Matrix variable structure
array
Matrix variable structure, specified as an array. How you specify the structure depends on the variable type.
Type | Value |
---|---|
type = 1 | For a matrix variable with
For instance, if the first block of |
type = 2 | For a full rectangular m-by-n
matrix variable, specify |
type = 3 | You can use Type 3 to specify sophisticated matrix variable
structures. To specify a variable
To help specify matrix variables of Type 3, use the
For examples specifying Type 3 LMI variables, see Type 3 Matrix Variables and Advanced LMI Techniques. |
Output Arguments
X
— Identifier for matrix variable
positive integer
Identifier for the matrix variable, returned as a positive integer. The value of
this identifier is k
, where k-1
is the number of
matrix variables previously declared in this LMI problem. The value of this identifier
is not affected by subsequent modifications of the LMI system.
n
— Number of decision variables
positive integer
Number of decision variables in the system so far, returned as a positive integer.
This value includes the decision variables in X
and those in
previously defined LMI variables.
sX
— Dependence of X
on decision variables
matrix
Dependence of X
on decision variables, returned as a matrix.
Each entry in sX
is either 0
, the index of a
decision variable, or minus the index of a decision variable. For instance, suppose that
X
depends on two decision variables,
x1 and
x1, as follows:
When you create the variable X
, the lmivar
command returns the following value for sX
.
sX = 2×2
0 -1
2 0
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)