Yalmip LMI solving H2 optimal control problem run into numerical problem
30 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, everybody ,l am trying to use Yalmip toolbox to solve H2 optimal control problem,
l use the following LMI, While there is something wrong with my code, l can't get the expected result,
clear;
clc;
% system parameters
A = [-3 -2 1;
1 2 1;
1 -1 -1];
B1 = [1 0.2 0]';
B2 = [0.4 1 0.6]';
C1 = [1.2 0.5 0.3];
D12 = 1;
% declare the variable
P = sdpvar(3);
Z = sdpvar(1);
F = sdpvar(1,3);
mu = sdpvar(1);
% describe the LMI
mat1 = [A*P+P*A'+B2*F+F'*B2' P*C1'+F'*D12';
(P*C1'+F'*D12')' -eye(1)];
mat2 = [Z B1';
B1 P];
% declare the constraints
F = [mat1=<0; mat2>=0; P>=0; Z>=0 ;trace(Z)<=mu];
optimize(F, mu);
% result
Kd = value(F)*inv(value(P))
H2_norm = sqrt(value(mu))
I get the following result ,
SeDuMi 1.3 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
eqs m = 11, order n = 14, dim = 44, blocks = 4
nnz(A) = 61 + 0, nnz(ADA) = 97, nnz(L) = 54
it : b*y gap delta rate t/tP* t/tD* feas cg cg prec
0 : 2.90E+00 0.000
1 : -6.66E-01 6.49E-01 0.000 0.2239 0.9000 0.9000 1.72 1 1 1.9E+00
2 : -7.69E-01 1.94E-01 0.000 0.2995 0.9000 0.9000 1.17 1 1 5.3E-01
3 : -9.76E-01 6.63E-02 0.000 0.3410 0.9000 0.9000 0.50 1 1 2.2E-01
4 : -1.18E+00 2.25E-02 0.000 0.3396 0.9000 0.9000 0.25 1 1 9.0E-02
5 : -1.44E+00 9.77E-03 0.000 0.4343 0.9000 0.9000 0.10 1 1 6.0E-02
6 : -1.75E+00 3.75E-03 0.000 0.3836 0.9000 0.9000 0.03 1 1 3.7E-02
7 : -2.16E+00 1.33E-03 0.000 0.3553 0.9000 0.9000 0.22 1 1 1.9E-02
8 : -2.46E+00 5.28E-04 0.000 0.3964 0.9000 0.9000 0.23 1 1 1.1E-02
9 : -2.79E+00 1.44E-04 0.000 0.2725 0.9000 0.9000 0.58 1 1 3.6E-03
10 : -2.93E+00 3.91E-05 0.000 0.2716 0.9000 0.9000 0.68 1 1 1.2E-03
11 : -2.99E+00 3.03E-06 0.000 0.0775 0.9900 0.9900 0.90 1 2 9.5E-05
12 : -2.99E+00 1.98E-07 0.000 0.0653 0.9900 0.9900 0.97 1 2 6.3E-06
13 : -2.99E+00 3.82E-08 0.000 0.1934 0.9000 0.9000 0.93 3 3 1.3E-06
14 : -2.99E+00 1.16E-08 0.000 0.3044 0.9000 0.9000 0.76 7 4 4.6E-07
15 : -2.99E+00 4.26E-09 0.000 0.3662 0.9000 0.9000 0.60 16 14 2.1E-07
Run into numerical problems.
iter seconds digits c*x b*y
15 0.1 5.9 -2.9940592991e+00 -2.9940558596e+00
|Ax-b| = 2.8e-07, [Ay-c]_+ = 6.4E-08, |x|= 2.2e+02, |y|= 1.7e+02
Detailed timing (sec)
Pre IPM Post
8.500E-02 1.940E-01 7.800E-02
Max-norms: ||b||=1, ||c|| = 2,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 167.62.
the error message:
错误使用 lmi/value (line 12)
Double not applicable on list of constraints
出错 H2_state_feedback_control_LMI_method (line 274)
Kd = value(F)*inv(value(P))
any suggestions will be appreciated!
Thanks in advance!
4 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!