Borrar filtros
Borrar filtros

how to find magnitude and phase of fft output signal?

5 visualizaciones (últimos 30 días)
Khaled Abojlala
Khaled Abojlala el 28 de Nov. de 2016
Editada: David Goodmanson el 30 de Nov. de 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?

Respuestas (1)

David Goodmanson
David Goodmanson el 29 de Nov. de 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 comentarios
Walter Roberson
Walter Roberson el 29 de Nov. de 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 el 30 de Nov. de 2016
Editada: David Goodmanson el 30 de Nov. de 2016
I had mentioned this in the answer at the top but in an rather offhand way, so thanks for emphasizing this important point.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by