CVX status is solved but the result is abnormal and one constraint is not meet

Continuing the discussion from CVX/sedumi solves a SDP prblem,but the result is unreasonable and one constraint is not satisfied:

[quote=“iniesta2014, post:1, topic:3268, full:true”]
Hello,everyone.
Recently, I am trying to write my own matlab /cvx code on a SDP promblem based on a published paper. I have used the sedumi solver, and set the precision high. At first glance, It seems that I have solved the proplem successfully since the status is ’ solved ‘. However, compared with the result derived by the author , I’ve got far less values, which come to 10^-8 , while the normal values should be among 10 to 100, approximately. What’s worse, the solution doesn’t satisfy the first inequality constraint! However I’m sure that numerical calculations and variable initializations are correct.
I will show you the SDP problem and my code.

indent preformatted text by 4 spaces
n = 5; % Number of transmitters
omiga = 6.78 * 2* pi * 10^6; % Resonant angular frequency
rr = 50.336; % Receiver total impedance
rl = 50; % Receiver load impedance
rt = [0.336, 0.336, 0.3336, 0.336, 0.336]; % transmitter impedance
m = [1.6121, 0.00781, -0.0296, 0.00781, 0.1508].’* 10^-6; % mutual inductances between receiver and tansmitters
M = [5886.8, 0.3565, 0.1253, 0.3565, 0.2984;
0.3565, 5886.8, 0.3565, 0.1253, 0.2984;
0.1253, 0.3565, 5886.8, 0.3565, 0.2984;
0.3565, 0.1253, 0.3565, 5886.8, 0.2984;
0.2984, 0.2984, 0.2984,0.2984, 5886.8] * 10^-6; % mutual or self inductances among transmitters, which is used in computting B__

powerindex = 5:5:100; % 20 groups values of power, each of which is used in constraint condition 1
voltage = [1800,1800,1800,1800,1800].’.^(1/2); % voltage constaint used in constraint condition 2
current = [50,50,50,50,50].’.^(1/2); % current constaint used in constraint condition 2

% Run function METHOD_SDP_COPY 20 times to get enough points to draw
for power_index = 1:length(powerindex)
power = powerindex(power_index);
fprintf(‘circle is running ‘);
fprintf(’%d\n’,power_index);
[X] = METHOD_SDP_COPY(rt, rr, rl, m, power, current, voltage, omiga, n, M);
end

Hello,everyone.
Recently, I am trying to write my own matlab /cvx code on a SDP promblem based on a published paper. I have used the sedumi solver, and set the precision high. At first glance, It seems that I have solved the proplem successfully since the status is ’ solved '. However, compared with the result derived by the author , I’ve got far less values, which come to 10^-8 , while the normal values should be among 10 to 100, approximately. What’s worse, the solution doesn’t satisfy the first inequality constraint! I’m sure that numerical calculations and variable initializations are correct.
I will show you the SDP problem and my code.

%% init parameters

I’ve merged your posts under one topic.

This prblem has confused me a lot. But I still can’t make it. Do you have interest in solving this problem? Besides I still don’t known how to upload my code correctly!

I’m going to guess it’s a scaling issue. Try scaling your problem so that you don’t need M, m, etc. to have values in the 10^-6 range, which is very near the precision of the solver itself.

I have to set these values in the 10−6 range since these parameters have specific physical meaning. Will it be useful if I use another solver such as sdpt3 and mosek ? I will be very greatful if you give me some other advice.

I understand, but the solvers frankly don’t care about physical meaning. You’re going to have to rescale. You can change back once the model is solved and get your physical meaning back.

You are right! According to your advice, I finally make it! Many thanks!