Least Square Minimization (Levenberg-Marquant method) of damped oscillation curves

21 ビュー (過去 30 日間)
Louise
Louise 2019 年 12 月 2 日
編集済み: Matt J 2019 年 12 月 2 日
Hi,
My goal is to fit my experimental data (attached) with the following equation with Levenberg Marquant method :
A*exp(-c*t)*sin(2*pi*f*t+phi), where A is the amplitude, t is time, c is the damping coefficient and f the frequency and phi the phase coefficient.
As my skills are weak in least square minimzation in Matlab, thanks in advance for your help,
Louise.

採用された回答

Matt J
Matt J 2019 年 12 月 2 日
You can use lsqcurvefit with the 'levenberg-marquardt' Algorithm setting
  4 件のコメント
Louise
Louise 2019 年 12 月 2 日
Well it doesn't work better...
Matt J
Matt J 2019 年 12 月 2 日
編集済み: Matt J 2019 年 12 月 2 日
This works a bit better. I don't know if I trust the model enough to expect a better fit.
fun = @(x,t) x(1)*exp(-x(2)*t).*sin(2*pi*x(3)*t+x(4))+x(5);
x0 = [max(S),1,0.1,1,mean(S)];
options = optimoptions('lsqcurvefit','Algorithm','levenberg-marquardt');
lb = [0,0,0,-1,-inf];
ub = [inf,inf,inf,1,+inf];
x = lsqcurvefit(fun,x0,t,S,lb,ub,options)
plot(t,S,'ko',t,fun(x,t),'b-')
legend('Data','Fitted exponential')
title('Data and Fitted Curve')

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOffline Frequency Response Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by