Fminsearch results shows shift from measured curve. How should I solve this?
2 次查看(过去 30 天)
显示 更早的评论
I am working with several measurement data which I am reading through matlab and then using Fminsearch to estimate through different model equations to fit with the measurement data. But fminsearch is giving a shift from the measured data as shown in picture. Blue one is the measured curve and orange one is the fminsearch estimation. How should I solve this? I am a beginner so would be helpful with some guidance. Thank you.

My sample of fminsearch:

4 个评论
Matt J
2023-1-23
As you can see above, the code doesn't run. SOme variables have not been specified.
回答(1 个)
Matt J
2023-1-23
编辑:Matt J
2023-1-23
The x_Start=[1,1] selection looks very arbitrary. If one of the parameters is the oscillation amplitude, it should be closer to 0.4.
Other than that, though, there is too little information to diagnose. We would need to see the full code including the FitnessFunction (and as text, not a screenshot).
1 个评论
Matt J
2023-1-23
编辑:Matt J
2023-1-23
I notice that the least squares prediction F can be written as a linear combination of known things.
Q= abs(v) .* z ./ (Fc + (Fs - Fc) * exp(r));
zdot = v - sigma0*Q;
F = sigma0 * (z+zdot.*ts) + sigma1 * z_dot + sigma2.*v; % eq. 3
= sigma0*(z + v) - sigma0^2.*Q.*ts - sigma0*sigma1.*Q + (sigma1+sigma2)*v
= C1*(z + v) - C2.*Q.*ts - C3.*Q + C4*v
So, you can solve for C1 .. C4 by solving a set of linear equations.
Then, from the C coefficients, you can easily solve for sigma0 and sigma1.
Then, you can use that as an initial guess for the original optimization.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!