finding out phase shift in time domain from FFT result
40 ビュー (過去 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?
0 件のコメント
採用された回答
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
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 件)
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 ?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!