Fitting a damping function to a sinusoidal response

I'm attempting to fit an exponential damping function to a sinusoidal wave by iterating zeta values.
However, it seems I can never get it to properlly 'ride' along the peaks, meaning it always crosses the response function (pic)
As I understand, the damping function looks like exp(-zeta*wn*t). I have estimated the value of wn and I have all values of time.
The function code looks like this:
xi1 = 0.01;
y = exp(-xi1*wn1*(time1-4.3))-0.6568;
plot(time1-4.3,Response1)
hold on
plot(time1-4.3,y)
hold off
grid on
I subtract 0.6568 to have the damping function begin on the first peak.

답변 (2개)

Image Analyst
Image Analyst 2020년 1월 31일

0 개 추천

Try using findpeaks(), and then just pass the peak locations into fitnlm(), like in my attached demo.

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

질문:

2020년 1월 31일

답변:

2020년 1월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by