Problem with minimization with respect to Frobenius Norm

65 views
Skip to first unread message

Liane

unread,
Apr 27, 2013, 5:21:13 AM4/27/13
to yal...@googlegroups.com
Hello Johan,

I want to calculate the minimal Frobeniusnorm of a psd Matrix Z satisfying some semidefinite contraints.

My approach is the following:

function [y,M] = Frob(n,cl,BK,B)
Z=sdpvar(n,n,'full','complex');     % (an hermitian complex valued matrix)
sdpvar u;
e=Z(:);
F=[Z'==Z];
for i=1:cl
    F=[F,BK(:,:)-B(:,:,i) +Z >= 0];   % (one B(i) is equal to the BK, that yields that Z is psd)
end
F = [F, cone(e,u)];
solvesdp(F,u);                     %(using SEDUMI)
y=double(u);
M=double(Z);
end

Now, the problem is, that the optimal solution is almost zero. But looking at the constraints BK-B(i) this is wrong.

Do you see a Problem in the code?

Johan Löfberg

unread,
Apr 27, 2013, 5:34:28 AM4/27/13
to yal...@googlegroups.com
To begin with, you can simplify your code

Z=sdpvar(n,n,'full','complex');     % (an hermitian complex valued matrix)

F
=[Z'==Z];

is accomplished with (and generates a better model since you get half as many variables, and no equality constraints)

Z=sdpvar(n,n,'hermitian','complex');

Secondly, Frobenious norm is already available

F = [F, norm(Z,'fro') <= u];

The use of the Hermitian construct when creating Z will solve your problems. As you have coded it now, Z is a structurally un-Hermitian matrix (although you search for an hermitian by adding constraints). When having constraints of the type Z>=0 etc and Z is full, the constraint is interpreted as an elementwise constraint. For the psd cone to be active, the variable has to be structurally Hermitian.
Reply all
Reply to author
Forward
0 new messages