how to find magnitude and phase of fft output signal?
14 次查看(过去 30 天)
显示 更早的评论
Hi How can I get the amplitude and phase of fft output signal for specific frequency? let say we have this signal: y=A*sin(w1t+phi1)+B*sin(w2t+phi2) using fast Fourier transform we will get the two frequencies (w1 and w2). How can I get those frequencies and phases?
0 个评论
回答(1 个)
David Goodmanson
2016-11-29
Hello Khaled, If you have t=0 as the first element of a uniform time array, then calculating y from that and taking the fft will give two peaks per frequency. For a given frequency w, assuming your normalization is correct, the left complex amplitude [C exp(i phi)] is the positive freq. contribution, to be multiplied by exp(iwt), and the right complex amplitude [C exp(-i phi)] is the negative freq. contribution, to be multiplied by exp(-iwt). Adding these you get the result 2C cos(wt + phi). It's most often stated in terms of cos but of course it is also 2C sin(wt + phi + pi/2).
This all assumes you have fft'd a real function as in your example.
4 个评论
Walter Roberson
2016-11-29
Small correction: the amplitudes of the pairs are complex conjugates iff and only if the inputs were real-valued. If the input signal was complex valued then the two halves are not complex conjugates.
David Goodmanson
2016-11-30
编辑:David Goodmanson
2016-11-30
I had mentioned this in the answer at the top but in an rather offhand way, so thanks for emphasizing this important point.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filter Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!