Clear Filters
Clear Filters

constrain optimization, converged to an infeasible point

1 view (last 30 days)
Hi
When I run the attached .m file, which is a fmincon function, with a nonlinear equality constraint, however, the result converged to an infeasible point, could anyone help me...
Norm of First-order
Iter F-count f(x) Feasibility Steplength step optimality
0 4 2.570732e-02 3.787e+07 5.073e+07
Objective function returned complex; trying a new point...
1 18 3.044897e-03 3.008e+07 4.035e-02 4.083e-05 1.691e+07
2 23 9.626713e-03 3.481e+06 7.000e-01 3.194e-05 2.480e+07
3 32 1.044105e-02 2.114e+06 2.401e-01 2.349e-06 2.195e+07
4 36 1.044105e-02 2.114e+06 4.900e-01 8.375e-07 2.195e+07
Converged to an infeasible point.
fmincon stopped because the size of the current step is less than
the default value of the step size tolerance but constraints are not
satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
Attached will be my codes, could anyone help me get this out.
% define the function myPdc
function [Pdc]=myPdc(x)
E=169e9;
t=1.5*1e-6; %m
Q=1.33e4;
pi_n=-102*1e-11; %Pa-1
Rho_e=1e-4; %0.1 omega.m
omega=2*pi*10*1e6; % resonate frequency 10 MHz
Cv=702; %J/(kg*K)
gamma=113; %W/(m*K)
alpha=2.6e-6; %1/K
k=2*alpha*Rho_e*pi_n*E;
lamda=sqrt(gamma/(omega*Cv))*sqrt(-1i);
g=lamda^2/gamma*(1-2*lamda/x(2)*tanh(x(2)/(2*lamda)));
A=real(g);
B=imag(g);
a=x(1)*omega^2*(A^2+B^2)*k^2;
b=-2*Q*E*x(3)*t*k*B/x(2)+2*x(1)*omega^2*k*A;
c=x(1)*omega^2;
Jdc2=(-b-sqrt(b^2-4*a*c))/(2*a);
Pdc=2*Jdc2*x(3)*t*Rho_e*x(2);
end
% define the constraint
function [c,ceq]=mycon(x)
E=169e9;
t=1.5*1e-6;
omega=2*pi*10*1e6; % resonate frequency 10 MHz
c=[]; % no nonlinear inequality constraint
ceq=sqrt(2*E*x(3)*t/(x(1)*x(2)))-omega; % nonlinear equality constraint
end
% define the main function
x0=[1e-11,5e-6,1e-6];
A=[];
b=[];
Aeq=[];
beq=[];
% vlb=[];
% vub=[];
vlb=[1e-15,1e-9,1e-9];
vub=[1e-7,1e-3,1e-3];
options = optimoptions('fmincon','Display','iter','Algorithm','sqp');
[x,fval]=fmincon('myPdc',x0,A,b,Aeq,beq,vlb,vub,'mycon',options);
Thanks for help..,
  1 Comment
Torsten
Torsten on 19 Aug 2019
Edited: Torsten on 19 Aug 2019
Why don't you reduce your set of variables to be adjusted by solving your equality constraint for x(3), e.g., and inserting the so obtained expression for x(3) in the objective function ?

Sign in to comment.

Answers (0)

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!