필터 지우기
필터 지우기

Need help for a nonlinear constraint optimization problem

조회 수: 4 (최근 30일)
Mohammad
Mohammad 2018년 2월 20일
댓글: Mohammad 2018년 2월 21일
Dear all,
I am going to solve the following nonlinear constraint optimization problem using MATLAB. I was wondering if you could please help me how to do that,
minimize -trace(W^-1)
subject to
(A-B1*k)W+W*(A-B1*k)'=-B2*B2';
sqrt(trace(C'*W*C)) <= 1;
max(eig(A-B1*k)) <= -1;
A, B1 and B2 are known matrices and k is the unknown 2*2 matrix. (W is also a 2*2 matrix).
I wrote the following code but got error,
function [c,ceq] = constr(k)
c(1) = (A-B1*k)*W+W*(A-B1*k)'+B2*B2';
c(2) = sqrt(trace(C'*W*C))-1;
c(3) = max(eig(A - B1*k))+1;
ceq = [];
end
clc
clear
close all
A = [-1 0
0 -2];
B1 = eye(2);
B2 = eye(2);
C = eye(2);
g2 = 3; g3 = -1;
x0=[1;1];
A=[];
b=[];
Aeq=[];
beq=[];
lb=[];
ub=[];
nonlcon = @constr;
fun = @(k)(-trace(inv(W)));
k = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon)
Thanks a lot.
  댓글 수: 6
Torsten
Torsten 2018년 2월 21일
Your x0-vector contains 8 elements now ?
Best wishes
Torsten.
Mohammad
Mohammad 2018년 2월 21일
Got it. Thanks!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver-Based Nonlinear Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by