finding out phase shift in time domain from FFT result

118 次查看(过去 30 天)
Hallo, I have a signal represented by a sum of sinusoids (each having a different frequency and different phase shifts in the time domain). I do an FFT in matlab and get the amplitude spectrum of the wave. But from the phase spectrum i am not able to correlate the phase angles. (angle(signal) gives a different angle from what I expect.. for example if my 3rd harmonic sinus is 50 degress phase shifted, i get something irrelevant like 90 degress) My application would be, I have a random signal and I need to remove only one frequency component from the signal. If I don't have the time-phase shift of that frequency component, then I cant remove it from the signal. How do I get the phase angle from FFT?

采纳的回答

Wayne King
Wayne King 2014-2-3
编辑:Wayne King 2014-2-3
You can get the phase from the output of fft()
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*100*t-pi/4)+cos(2*pi*200*t-pi/2);
xdft = fft(x);
angle([xdft(101) xdft(201)])
but you have to keep in mind that:
1.) Phase is only defined modulo 2*pi
2.) Additive noise (if it is white) occurs at all frequencies so it will affect the phase.
You can see from the example above, the phase is correctly identified at 100 and 200 Hz.
Also, I don't understand your statement:
"I have a random signal and I need to remove only one frequency component from the signal. If I don't have the time-phase shift of that frequency component, then I cant remove it from the signal. How do I get the phase angle from FFT?"
If you really are just removing one sinusoidal component, why do you need the phase, you just need to know the DFT bin of the "positive" and "negative" frequency component.
Remove 200 Hz.
N = length(xdft);
conjbin = N-201+2;
ydft = xdft;
ydft([201 conjbin]) = 0;
y = ifft(ydft);
plot(y) % 200 Hz is removed
  3 个评论
Shrikant
Shrikant 2015-10-16
Hey Wayne, Can you tell me why did you put 101 as your frequency instead of 100? This does not work for sinusoidal...

请先登录,再进行评论。

更多回答(2 个)

Shivaputra Narke
Shivaputra Narke 2014-2-3
Search 'fft phase' in Matlab help menu.

Zohaib
Zohaib 2014-8-29
Hello Wayne king .. need your lil help bro
kidnly tell me how to calculate phase of a signal which is summation of four sinusoidal signal .. thr is phase shift due to mechanical vibrations .. i want to find phase shift of each component of signal .. kindly help ?

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by