Fminsearch results shows shift from measured curve. How should I solve this?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Matt J
el 23 de En. de 2023
As you can see above, the code doesn't run. SOme variables have not been specified.
Respuestas (1)
Matt J
el 23 de En. de 2023
Editada: Matt J
el 23 de En. de 2023
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 comentario
Matt J
el 23 de En. de 2023
Editada: Matt J
el 23 de En. de 2023
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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!