필터 지우기
필터 지우기

Mirrored result when inverse Fourier Transform the real part of the Fourier Transform

조회 수: 18 (최근 30일)
I'm not sure this is the right place to be asking this, but:
If I take the Fourier transform of a piece of data, remove the imaginary part and then take the inverse Fourier Transform (so back to the time domain), the result is mirrored. The original data has only positive times. Can anyone tell me the reason for this?
Thanks in advance
I remove the imaginary part to get the analytic signal
  댓글 수: 1
Adam
Adam 2014년 10월 24일
I tend to just use the hilbert function to get the analytic signal although I have in the past also dabbled with zeroing out half the spectrum to get the complex signal back and also got confused with it!

댓글을 달려면 로그인하십시오.

답변 (2개)

Rick Rosson
Rick Rosson 2014년 10월 24일
편집: Rick Rosson 2014년 10월 24일
There is a theorem, which is relatively easy to prove, that states: The Fourier transform of a real-valued signal is conjugate symmetric. Likewise, it is just as easy to show that: The inverse Fourier transform of a real-valued spectrum is conjugate symmetric. Conjugate symmetry simply means that the real-part of the signal will be even in time and the imaginary part of the signal will be odd in time. So that is why the result of the inverse Fourier transform is "mirrored" after removing the imaginary part of the spectrum.
In general, it is not useful or advisable to "throw away" the imaginary part of the spectrum. What is more useful and much more common is to visualize the magnitude of the Fourier spectrum, and sometimes the phase.
So, for example:
N = length(x);
X = fftshift(fft(x))/N;
dF = Fs/N;
f = -Fs/2:dF:Fs/2-dF;
figure;
ax(1) = subplot(2,1,1);
plot(f,abs(X));
ax(2) = subplot(2,1,2);
plot(f,angle(X));
linkaxes(ax,'x');
  댓글 수: 5
Rick Rosson
Rick Rosson 2014년 10월 24일
편집: Rick Rosson 2014년 10월 24일
The fft function knows nothing about "time". It is an implementation of the Discrete Fourier Transform (DFT), not the Continuous Time Fourier Transform (CTFT) or even the Discrete Time Fourier Transform (DTFT). The DFT implicitly assumes that the input variable x is simply a sequence of discrete numbers with indexes that range from 0 to N-1, where N is the number of samples in the sequence.
As a practical matter, however, it is often more meaningful if you assume that the index numbers for the first half of the spectrum range from 0 to +N/2 - 1 and for the second half from -N/2 to -1. Following this assumption, it is convenient to take the Fourier spectrum and swap the two halves, resulting in a spectrum where index 0 is located smack in the middle (okay technically if N is even, then the middle is halfway between index -1 and index 0), so that the negative frequencies are in the left half and the non-negative frequencies are in the right half. This method is usually accomplished using the fftshift function:
X = fftshift(fft(x));
So yes, the conjugate symmetry property simply applies to the resulting sequence as if the mid-point is the point of symmetry.

댓글을 달려면 로그인하십시오.


Rick Rosson
Rick Rosson 2014년 10월 24일
편집: Rick Rosson 2014년 10월 24일
I don't think that is the correct way to compute the analytic signal. What you want to do instead is set the Fourier spectrum to zero for the negative frequencies, and leave the rest of the spectrum as is.
So, for example:
X = fft(x);
N = length(X);
k = 0:N-1;
Y = 2*X;
Y(k > N/2-1) = 0;
y = ifft(Y);
  댓글 수: 2
Adam
Adam 2014년 10월 24일
I think you need a factor of 2 thrown in there at
y = 2 * ifft(Y);
otherwise your returned signal is at half strength due to removing half the magnitudes from the Fourier spectrum.
Even with that though the real part of the result I get is noticeably different from the original signal which confuses me a little as I am sure I have seen this kind of method used to implement a hilbert transform, but the hilbert function yields a real part that is pretty much identical to the original signal.
Rick Rosson
Rick Rosson 2014년 10월 24일
I updated my answer to account for the factor of 2 that you mentioned. I am not sure why there would be other differences though.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Hilbert and Walsh-Hadamard Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by