Effacer les filtres
Effacer les filtres

how to find magnitude and phase of fft output signal?

8 vues (au cours des 30 derniers jours)
Khaled Abojlala
Khaled Abojlala le 28 Nov 2016
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?

Réponses (1)

David Goodmanson
David Goodmanson le 29 Nov 2016
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 commentaires
Walter Roberson
Walter Roberson le 29 Nov 2016
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
David Goodmanson le 30 Nov 2016
Modifié(e) : David Goodmanson le 30 Nov 2016
I had mentioned this in the answer at the top but in an rather offhand way, so thanks for emphasizing this important point.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by