Finding the frequency and the phase shift of a Sin signal

조회 수: 14 (최근 30일)
Ahmad Badran
Ahmad Badran 2021년 5월 16일
댓글: Star Strider 2021년 5월 17일
Hallo,
i have this sin function with damping discribed with the equation in the photo, the plot under it is my signal.
how can i claculate F0 and phi0 of my Signal?

채택된 답변

Star Strider
Star Strider 2021년 5월 16일
One option is described in Curve fitting to a sinusoidal function and a version that could be more appropriate to your problem is How to filter noise from time-frequency data and find natural frequency of a cantilever?
The one change I would make to that code is to replace the ‘zci’ funciton with:
zci = @(x) find(diff(sign(x)));
since it is more robust.
Those routines will calculate the frequency, phase, and other parameters.
Another option of course is to use the fft function.
  댓글 수: 4
Ahmad Badran
Ahmad Badran 2021년 5월 17일
Thank you very much i set the number number of peaks to one and i think i got the wanted results
[pks, locs] = findpeaks(abs(FTs(Iv)),"NPeaks",1); % Peaks & Indices (May require'MinPeakHeight' Or 'MinPeakProminence' For Best Results)
Phase = angle(FTs(locs)); % Phase Angle At Peak
Phase0 = rad2deg(Phase)
PeakFreq = Fv(locs)
hope it's right
thank you again
Star Strider
Star Strider 2021년 5월 17일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by