Fmincon optimization for complex vectors

조회 수: 6 (최근 30일)
yasser
yasser 2016년 1월 30일
댓글: yasser 2016년 2월 3일
I'm having an optimization problem where the objective function and the constraints have log terms , the optimization variable is a 2d complex vector
When using fmincon I get an error that implies that optimizing over a complex variable is not allowed in fmincon
The problem is
Max log2(abs(h1*w(1))) st log2(abs(h2*w(2)))<epsilon
The optimization vector is w
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 31일
Break each optimization variable up into two pieces, one for the real part, one for the imaginary part:
function w4 = opt_driver(h1, h2)
obj = @(w) -objective(w, h1, h2);
nl = @(w) nonlcon(w, h1, h2);
w4 = fmincon(obj, [], [], [], [], nl);
function [c, ceq] = nonlcon(w, h1, h2)
ceq = [];
%positive value means the constraint is violated
c = log2(abs(h2* (w(3)+1i*w(4)) )) >= epsilon;
function f = objective(w, h1, h2)
f = log2(abs(h1* (w(1)+1i*w(2)) ));
The result would be a vector of 4 real values, with your w(1) being w4(1)+1i*w4(2) and your w(2) being w4(3)+1i*w4(4)
  댓글 수: 1
yasser
yasser 2016년 2월 3일
Thanks for your care and sorry for late reply

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by