Main Content

LMI Editor

Specify or display systems of LMIs as MATLAB expressions

Description

The LMI Editor is an interactive tool for the symbolic specification of LMI problems.

Using this tool, you can:

  • Describe LMI variables and LMI systems in terms of MATLAB® expressions instead of manually using the lmivar and lmiterm commands.

  • Visualize the equivalent sequence of lmivar and lmiterm commands that describe the LMI system.

  • Display the symbolic expression of the LMI system produced by a particular sequence of lmivar and lmiterm commands.

  • Save the symbolic description of the LMI system and load a saved description.

  • Write to a file or read from a the sequence of lmivar and lmiterm commands needed to specify a particular LMI system .

  • Generate the internal representation of the LMI system. The LMI Editor writes the result in a MATLAB variable. You can pass this workspace variable directly to the LMI solver commands or any other LMI command.

LMI Editor UI containing fields to specify variable names, types, and structure and to describe the LMIs as MATLAB expressions

Open the LMI Editor

  • MATLAB command prompt: Enter lmiterm.

Examples

expand all

This example shows how to specify LMI systems using LMI Editor. This example uses the same system as Specify LMI System at the Command Line.

Consider the stable transfer function,

G ( s ) = C ( s I - A ) - 1 B .

Suppose that G has four inputs, four outputs, and six states. Consider also a set of input/output scaling matrices D with block-diagonal structure given by:

D = ( d 1 0 0 0 0 d 1 0 0 0 0 d 2 d 3 0 0 d 4 d 5 ) .

The LMI problem in Specify LMI System at the Command Line is to find, if any a scaling D with the specified structure, such that the largest gain across frequency of D G ( s ) D - 1 is less than 1. The LMI formulation of this problem is as follows. There exists an adequate scaling D if the following feasibility problem has solutions. Find two symmetric matrices X R 6 × 6 and S = D T D R 4 × 4 such that:

( A T X + X A + C T S C X B B T X - S ) < 0 ,

X > 0 ,

S > 1 .

To specify this system using LMI Editor, first open the tool.

lmiedit

Enter a name for the LMI system in the name the LMI system field.

Portion of the LMI Editor with "LMI_sys_1" entered in the "name the LMI system" field

The LMI system of this example has matrix variables X and S. Define these variables using the variable name, type (S/R/G), and structure fields, one variable per line.

  • X and S are symmetric matrices, so set type (S/R/G) for both.

  • X is a single full symmetric block of size 6, so enter [6 1] for its structure.

  • Because S = D T D , the variable S has the same block-diagonal structure of D: two diagonal blocks, where the first is a 2-by-2 scalar block and the second is a full symmetric block. Therefore, set the second line in structure to [2 0; 2 1].

Portion of LMI Editor showing "variable name", "type (S/R/G)", and "structure" fields with the values given above

For more information about how to encode variable structure, see lmivar. To see the equivalent lmivar commands for defining the variables specified in LMI Editor, select view commands.

Portion of LMI Editor with "view commands" selected. The text field shows lines of MATLAB code that specify X and S using lmivar.

Next, define the LMIs by entering MATLAB expressions in the describe the LMIs as MATLAB expressions field. An LMI can stretch over several lines. However, do not specify more than one LMI per line.

Portion of LMI Editor showing the "describe the LMIs as MATLAB expressions" containing the LMIs written out as the MATLAB expressions

Again, you can see the equivalent lmiterm code by clicking view commands.

Make sure that you have defined all the system constants in the MATLAB workspace. For this example, those constants are the system matrices A, B, and C.

A = [  -0.8715    0.5202    0.7474    1.0778   -0.9686    0.1005;
       -0.5577   -1.0843    1.8912    0.2523    1.0641   -0.0345;
       -0.2615   -1.7539   -1.5452   -0.2143    0.0923   -2.4192;
        0.6087   -1.0741    0.1306   -2.5575    2.3213    0.2388;
       -0.7169    0.3582   -1.4195    1.7043   -2.6530   -1.4276;
       -1.2944   -0.6752    1.6983    1.6764   -0.3646   -1.7730 ];
  
B = [       0    0.8998   -0.2130    0.9835;
            0   -0.3001         0   -0.2977;
      -1.0322         0   -1.0431    1.1437;
            0   -0.3451   -0.2701   -0.5316;
      -0.4189    1.0128   -0.4381         0;
            0         0   -0.4087         0];
 
C = [      0    2.0034         0    1.0289    0.1554    0.7135;
      0.9707    0.9510    0.7059    1.4580   -1.2371    0.3174;
           0         0    1.4158    0.0475   -2.1935    0.4136;
     -0.4383    0.6489   -1.6045    1.7463   -0.3334   -0.5771];

You can now generate the internal representation of the LMI system. To do so, in the LMI Editor, click create.

Bottom of LMI Editor showing "internal description" heading and "create" button

The tool writes the result to a workspace variable named after the name the LMI system field. You can pass this workspace variable directly to the LMI solver commands or any other LMI command.

Tips

  • Editable text areas have built-in scrolling capabilities. To activate the scroll mode, click in the text area, maintain the mouse button down, and move the mouse up or down. The scroll mode is only active when all visible lines have been used.

Version History

Introduced before R2006a