(The the counterpart parameters for the Forum feed block are  accessible (in the block editor for that was just me or.   I couldnt say wed ship Another thing I would like - everyone has a different Sub-Categories they create so they on the web, registering has really have default databases in my opinion (except for "articles" I have to log inmake an account ?!". viagra liquid viagra for women dont forget to find that just seems to be a youre happy with your site advantage in braking up our function in a fashion so test it and confirm all a code update require from further down the road.

null) this-plugin-postSave(dataArray)

 
 
Welcome, Guest
Please Login or Register.    Lost Password?

YALMIP finds a feasible solution but not optimal
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: YALMIP finds a feasible solution but not optimal
#6758
YALMIP finds a feasible solution but not optimal 11 Months, 3 Weeks ago Karma: 0
I have a problem where YALMIP is successful when just looking for a feasible solution, but when I change it to minimize an objective function it fails to find anything. If you look at the last few lines of the below code, it is currently set to search for a feasible solution only. This succeeds but when I switch it to minimizing gamSq it says "Infeasible problem" with sedumi and "Lack of progress" with SDPT3. This problem is setup as a fairly classic Hinf norm calculation problem so should have a solution as long as the system is stable (which it is).

Are there settings somewhere that I should be modifying? FYI, the optimal gamSq for this problem should be around 0.51^2.

Code:


clear

%% System Description
Acl = 1e3*[...
     0         0         0         0         0         0         0         0          0   -0.2340         0         0         0   -2.0206         0         0  -0.2340         0;
     0         0         0         0         0         0         0         0             0         0   -0.2340         0    2.0206         0         0    0.2340          0         0;
     0         0         0         0         0         0         0         0             0         0         0   -0.0007         0         0         0         0          0         0;
     0         0         0         0         0         0    0.0010         0             0         0         0         0         0         0         0         0          0         0;
     0         0         0         0         0         0         0    0.0010             0         0         0         0         0         0         0         0          0         0;
     0         0         0         0         0         0         0         0        0.0010         0         0         0         0         0         0         0          0         0;
     0   -0.0098         0         0         0         0         0         0             0         0         0         0         0         0         0         0          0         0;
0.0098         0         0         0         0         0         0         0             0         0         0         0         0         0         0         0          0         0;
     0         0         0         0         0         0         0         0             0         0         0         0         0         0   -1.9851         0          0   -0.1666;
0.0035         0         0         0         0         0         0         0             0   -0.0126         0         0         0         0         0         0          0         0;
     0    0.0035         0         0         0         0         0         0             0         0   -0.0126         0         0         0         0         0          0         0;
     0         0    0.0035         0         0         0         0         0             0         0         0   -0.0126         0         0         0         0          0         0;
     0         0         0    0.0035         0         0         0         0             0         0         0         0   -0.0126         0         0         0          0         0;
     0         0         0         0    0.0035         0         0         0             0         0         0         0         0   -0.0126         0         0          0         0;
     0         0         0         0         0    0.0035         0         0             0         0         0         0         0         0   -0.0126         0          0         0;
     0         0         0         0         0         0    0.0035         0             0         0         0         0         0         0         0   -0.0126          0         0;
     0         0         0         0         0         0         0    0.0035             0         0         0         0         0         0         0         0    -0.0126         0;
     0         0         0         0         0         0         0         0        0.0035         0         0         0         0         0         0         0          0   -0.0126;
 ];
 
Pu = [0 0 0 0 0 0 0 0 1;
  1 0 0 0 0 0 0 0 0;
  0 1 0 0 0 0 0 0 0;
  0 0 1 0 0 0 0 0 0];
  
nStates = 9;
nIn = 18;

%% Matrices for Hinf and H2 design
% w = [ref noise]
Bw = [zeros(9) 1e-3*eye(9)];
Cinf = diag([1 1 1 1 1 1 1 1 1]);
Dinf = zeros(size(Bw));

% these are for weighting inputs which are state derivatives
Wu_inf = diag([1 1 1 1]);
  
%% Design weighting filters
filters = struct('Wx',[]);
Wx1_bw = 2*2*pi;
Wx1 = tf(Wx1_bw,[1 Wx1_bw]);
[Wx1_n Wx1_d] = tfdata(Wx1);
Wx1_sys = nd2sys(Wx1_n{1},Wx1_d{1});

Wx = Wx1_sys;
for st=2:9
Wx = daug(Wx, Wx1_sys);
end

[Af Bf Cf Df] = unpck(Wx);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Solve
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X = sdpvar(2*nStates);
gamSq = sdpvar(1);

ieqList = [];

% PD matrices
ieqList = [ieqList; gamSq >= 0];
ieqList = [ieqList; X >= 0];

% Hinf
Dinf2 = [Dinf; zeros(size(Wu_inf,1),size(Dinf,2))];
Pu1 = [Pu zeros(4,9)];
CinfX = [zeros(size(Cinf,1),nStates) Cinf*Cf;
 Wu_inf*Pu1*Acl]*X;

B  = [Bw; zeros(size(Af,1),size(Bw,2))];

ieqList = [ieqList; ...
[Acl*X+X*Acl' B CinfX';
B' -eye(nIn) Dinf2';
CinfX Dinf2 -gamSq*eye(size(CinfX,1))] <= 0];

solverOpt = sdpsettings('solver','sedumi');
solverOpt = sdpsettings(solverOpt,'verbose',1);
% obj = gamSq;
obj = [];
out = solvesdp(ieqList,obj,solverOpt)

ryan0270
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6759
Re: YALMIP finds a feasible solution but not optimal 11 Months, 3 Weeks ago Karma: 32
Can you attach an X which generates a gamSq = 0.51^2? I presume you have obtained that using LMILAB.

This is the kind of problems (basically a singular point in the world of semidefinite programs) where LMILAB performs much better than any general purpose SDP solver. Your problem seems to be a classical case of an Hinf problem where the optimal solution forces X to tend to infinity, while at the same time all feasible X are badly conditioned already for solutions pretty far away from the optimal gamma)

As an indication of the numerical ill-conditioning, by violating the third LMI with only 1e-7, gamSq can get as low as 1e-7. Since the precision of a general purpose LMI solver is in this region, it will be very hard to create anything meaningful.
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6760
Re: YALMIP finds a feasible solution but not optimal 11 Months, 3 Weeks ago Karma: 0
Remove gamSq as a variable and hard code gamSq=0.51^2. If you solve the feasibility problem it should succeed.
ryan0270
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/06/01 02:39 By ryan0270.Reason: typo in 0.51^2
The administrator has disabled public write access.
 
#6761
Re: YALMIP finds a feasible solution but not optimal 11 Months, 3 Weeks ago Karma: 32
Interesting, easily solved down to 0.48^2
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6762
Re: YALMIP finds a feasible solution but not optimal 11 Months, 3 Weeks ago Karma: 32
Looks like the feasible space is incredibly thin.

Changing the rhs in the third constraint to

Code:


 <= -eye(49)*t



where t is an sdpvar, and maximizing t leads to something around 1e-10, i.e., the distance to singularity for all feasible solutions, when gamSq^2=0.51, is very small. When sedumi has to trade feasibility with optimality, it gets lost
lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6763
Re: YALMIP finds a feasible solution but not optimal 11 Months, 3 Weeks ago Karma: 0
Ok, so you're saying the numerical condition of this particular set of constraints is always going to be a problem for the algorithms that sedumi and sdpt3 use? Are there any relaxations (of solver parameters, I'm thinking) I can use to help it along?

I really want to avoid LMILAB since it's just a horrible interface. If it's the only thing that will work, though, I guess I'll just have to suck it up
ryan0270
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Moderators: jcg207