Finding the frequency and the phase shift of a Sin signal

15 次查看(过去 30 天)
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

请先登录,再进行评论。

更多回答(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