How to find the matrix that minimizes a certain objective function, with complex constraints?

Hi all.
Given 3 known m by m matrices M1 and M2 and B, I want to find the matrix X that minimize the following objective:
Obj = -trace(M1*inv(M2+X)*M1*inv(M2+X))
subject to X-B being semidefenite, i.e.,
X - B >=0.
The matrix B is purely complex and anti-symmetric (i.e., transpose(B) = -B) while M1, M2 and the solution X are real symmetric matrices.
I tried to use fmincon, but I ran into some issues with fmincon and complex numbers. An example code in which dimension m=2 is provided below.
[M1,M2] = cov_mat(1);
B = 1i*[0 1;-1 0];
fun =@(X) -trace((M1/(M2+X))^2);
X0 = eye(2*m);
% If I understand correctly, my constraint should be expressed in a vectorised manner,
% i.e., X-B>=0 should be replaced with kron(eye(2*m),eye(2*m))*X(:) >= B(:);
A = -eye(2*m);A = kron(A,eye(2*m));
B = B(:);
X = fmincon(fun,X0,A,B);
function [sigma,dsigma] = cov_mat(T)
sigma = coth(1/T) * eye(2);
dsigma = (coth(1/T)^2 - 1)/T^2 * eye(2);
end
Any hints on how to fix this, or any alternative methods to solve this problem are appreciated.

 采纳的回答

Convert this to an unconstrained problem with the change of variables X=B+Z'*Z and then use fminunc,
M3=M2+B;
fun = @(Z) -norm( M1/(M3+Z'*Z),'fro')^2;
Z = fminunc(fun,Z0);
X=B+Z'*Z;

5 个评论

Hi Matt, thanks for your comment. The final answer X should be a symmetric matrix, but it's clear to me that
X = B+Z'*Z
is not symmetric, because B is not a symmetric matrix, which when added to Z'*Z makes X not symmetric.
I thought this is already implied by the other constraint, but maybe I should have mentioned this explicitely. I have editted the question now to reflect this.
The general condition for X-B to be positive semidefinite is, for unknown real matrices C and D,
X = B + ( C'-D'*1i )*( C + D*1i )
For X to be real, we must have, in addition,
X = C'*C + D'*D
B*1i = C'*D - D'*C
So, an fmincon-based search for the optimal C and D would be,
fun = @(C,D) -norm( M1/(M3 + C'*C + D'*D),'fro')^2;
fun = @(p) fun(p(:,:,1),p(:,:,2));
nonlequ = @(C,D) C'*D - D'*C - B*1i;
nonlcon = @(p) deal([], nonlequ(p(:,:,1),p(:,:,2)) );
CD0=cat(3,C0,D0);
CD = fmincon( fun,p0,[],[],[],[],[],[],nonlcon);
Hi Matt, thanks again. I like your trick in writing X = B + ( C'-D'*1i )*( C + D*1i ).
There's something that I don't follow, I would appreciate if you comment on this: What is the connection between the 'fro' norm and the trace? When I run the code with the objective being trace, matlab gives an error. But with the norm it works. Nonetheless, I am not sure if this is the same objective that I want.
The Frobenius norm is defined here:
It looks very much like what you were trying to implement.
Fantastic, that solves my problem. Your whole answer was beautiful, I really appreciate it. Thanks a lot :)

请先登录,再进行评论。

更多回答(0 个)

类别

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by