how to find magnitude and phase of fft output signal?
13 ビュー (過去 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!