LMIs in Control/pages/Switched systems H2 Optimization

From testwiki
Revision as of 07:49, 16 April 2020 by imported>DannyS712 (Update syntaxhighlight tags - remove use of deprecated <source> tags)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LMIs in Control/pages/Switched systems H2 Optimization


Switched Systems H2 Optimization

The Optimization Problem

This Optimization problem involves the use of the State-feedback plant design, with the difference of optimizing the system with a system matrix which "switches" in properties during optimization. This is similar to considering the system with variable uncertainty; an example of this would be polytopic uncertainty in the matrix A. which ever matrix is switching states, there must be an optimization for both cases using the same variables for both.

This is first done by defining the 9-matrix plant as such: Am×m, B1m×n, B2m×p, C1n×m, D11n×n, D12n×p, C2=I, D21=0, and D22=0. Using this type of optimization allows for stacking different LMI matrix states in order to achieve the controller synthesis for H.

The Data

The data is dependent on the type the state-space representation of the 9-matrix plant; therefore the following must be known for this LMI to be calculated: Am×m, B1m×n, B2m×p, C1n×m, D11n×n, D12n×p, C2=I, D21=0, and D22=0. What must also be considered is which matrix or matrices will be "switched" during optimization. This can be denoted as A(δ).

The LMI: Switched Systems H2 Optimization

There exists a scalar γ, along with the matrices X>0, W, and Z where:

||S(P,K(0,0,0,F))||H22γtraceW<γAX+XAT+B2Z+ZB2+B1B1T<0[X(C1X+D12Z)TC1X+D12ZW]>0


Where F=ZX1 is the controller matrix. This also assumes that the only switching matrix is A; however, other matrices can be switched in states in order for more robustness in the controller.


Conclusion:

The results from this LMI gives a controller gain that is an optimization of H2 for a switched system optimization.


Implementation

% Switched System H2 example
% -- EXAMPLE --

clear; clc; close all;

%Given
A  = [ 1  1  0  1  0  1;
      -1 -1 -1  0  0  1;
       1  0  1 -1  1  1;
      -1  1 -1 -1  0  0;
      -1 -1  1  1  1 -1;
       0 -1  0  0 -1 -1];
  
B1 = [ 0 -1 -1;
       0  0  0;
      -1  1  1;
      -1  0  0;
       0  0  1;
      -1  1  1];

B21= [ 0  0  0;
      -1  0  1;
      -1  1  0;
       1 -1  0;
      -1  0 -1;
       0  1  1];

B22= [ 0   0   0;
      -1   0   1;
      -1   1   0;
       1   1   0;
       1   0   1;
       0  -3  -1];

C1 = [ 0  1  0 -1 -1 -1;
       0  0  0 -1  0  0;
       1  0  0  0 -1  0];

D12= [ 1    1    1;
       0    0    0;
       0.1  0.2  0.4];

D11= [ 1  2  3;
       0  0  0;
       0  0  0];
   
%Error
eta = 1E-4;

%sizes of matrices
numa  = size(A,1);    %states
numb2 = size(B21,2);  %actuators
numb1 = size(B1,2);   %external inputs
numc1 = size(C1,1);   %regulated outputs

%variables
gam = sdpvar(1);
Y   = sdpvar(numa);
Z   = sdpvar(numb2,numa,'full');
W   = sdpvar(numc1);

%Matrix for LMI optimization
M11 = Y*A'+A*Y+B21*Z+Z'*B21'+B1*B1';
M12 = Y*A'+A*Y+B22*Z+Z'*B22'+B1*B1';
M2  = [Y            (C1*Y+D12*Z)'  ;
       C1*Y+D12*Z   W              ];

%Constraints
Fc = (M11 <= 0);
Fc = [Fc; M12 <= 0];
Fc = [Fc; trace(W) <= gam];
Fc = [Fc; M2 >= zeros(numa+numc1)];

opt = sdpsettings('solver','sedumi');

%Objective function
obj = gam;

%Optimizing given constraints
optimize(Fc,obj,opt);

%Displays output Hinf gain
fprintf('\n\nHinf for H2 optimal state-feedback problem is: ')
display(value(gam))

F = value(Z)*inv(value(Y)); %#ok<MINV>

fprintf('\n\nState-Feedback controller F matrix')
display(F)


Return to Main Page:

Template:BookCat