-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdefine_lmi_variables_jianbo.m
64 lines (43 loc) · 1.72 KB
/
define_lmi_variables_jianbo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
% In this script I define the LMI variables
% Eduardo Mendes - 07/26/17
% DELT - UFMG
% The LMI variables to be created are: Q, G, Y, gamma_1, gamma_2 and uk. These
% last three variables are scalars.
gamma_1 = sdpvar(1);
gamma_2 = sdpvar(1);
uk = sdpvar(1); % Old - assign(uk,CIu);
% To build the other LMI variables we need to know the dimensions of the system and
% control matrices. This can be easily achieved by looking at the defintions
% of such matrices.
%nx=2;
%nu=1;
% Set M is defined as the set of possible states (in Markov sense). In
% the case of the example M={1,2,3,..M} (Note that the first M is the
% calligraphic M in the paper). The second M is equal to 3 since the
% mode can take two different states = {1=normal,2=boom,3=slump}.
%M=3;
% N is the number of the predicted control strategy. In the case of the
% example in the paper N is set to 3.
%N=3;
% L is the number of vertices of the polytopic set for the system. In the
% case of the example in the paper L is set to 2
%L=2;
% T is the number of vertices of the polytopic set for the transition
% probability. In the case of the example T is set to 2.
%T=2;
% Define the other LMI variables
Q=sdpvar(nx,nx,N,M,'symmetric');
G=sdpvar(nx,nx,N,M,'full');
Y=sdpvar(nu,nx,N,M,'full');
if flagc == 1
mathW=sdpvar(nx,nx,N,M,'symmetric'); % Defined as W in the paper
mathU=sdpvar(nu,nu,N,M,'symmetric'); % Defoned as X in the paper
else
if flagc == 2
mathW=sdpvar(nx,nx,N,M,'symmetric'); % Defined as W in the paper
mathU=sdpvar(nu,nu,N,M,'symmetric'); % Defoned as X in the paper
mathX=sdpvar(nx,nx,N,M,'symmetric'); % Defined as Z in the paper
end
end
% Definition of a flag for LMI 24
flaglmi24=0;