Why fmincon does not minimize the objective function

3 次查看(过去 30 天)
Dear all, I have experiment data X1+X2, where in the model x_1=F/K1, F=K2*x_2+T*K2*x_2(dot), x_2(dot) is the first derivative of x_2 with respect to time. I want to determine the parameters K1,K2. F is the force from the experiment. so I determine x_2 by using Rung-Kutta 4th order method by proving initial condition of K2 and also for K1 for x_1. After getting x_1 and x_2 from initial guess of K1,K2, I find the error between experiment and model by e=(x1+x2) (experiment)-(x_1+x_2)(model). Then I use fmincon to minimize this error. Unfortunately, fmincon doesn't work. It doesn't minimize the error and it keeps value of K1,k2 the same as initial condition (There is no error in my code, fmincon runs but it just doesn't minimize error). Thus could you please help me related to this problems, I am looking forward to hearing from all of you soon. I will send you by matlab code if it is needed.
Best regards; S. Van

回答(1 个)

Walter Roberson
Walter Roberson 2017-11-6
fmincon is a local minimizer, not a global minimizer. If the initial conditions are even just slightly more favorable than the immediately adjacent locations, then fmincon may get stuck there.
We would need your code to make more detailed suggestions.
  4 个评论
Van S
Van S 2017-11-7
I made a mistake for last time, now I have edited to use fmincon in my code. I could not attach my excel file. Could you please give me your email address. Thank you very much !
Best regards;

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Optimization Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!