Why is the FFT of an anti-symmetric signal not correct?

4 views (last 30 days)
When taking the FFT of an anti-symmetric signal, the result should be purely imaginary, however, that's not the case with FFT. Also taking the FFT of a symmetric signal FFT should produce a purely real result, but it doesn't.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
The reason you're not getting the expected behavior from the FFT function is because you can't represent a signal in a computer as an anti-symmetric signal or symmetric signal, without a shift.
Below is an example of 129 points where the signal is anti-symmetric about some arbitrary point but not anti-symmetric about the n=0 axis. MATLAB assumes that the signal starts at n=0 (at time = 0), and any
points before n=0 have values of 0. Therefore, the signal is not anti-symmetric about the n=0 axis. The signal below is an anti-symmetric signal shifted.
In order to represent this example signal (x=[ones(64,1)*(-1); 0; ones(64,1)]) as a anti-symmetric signal (without a phase shift), the signal would have to start at n = -64 (or negative time), which is not possible in MATLAB (or computers in general. To make this signal symmetric about the n=0 axis, MATLAB would have to be able to represent the signal in negative samples (n=-64), which it can't. An anti-symmetric signal that has not been shifted looks like the following:
Since negative indices or negative time is not permissible in computers, you must consider your signal as having a phase shift, and compensate for that phase shift after taking the FFT of the signal.
Here's an example that uses a signal of 129 points (odd number of points to make the signal anti-symmetrical), and compensates for the phase shift. For further information on shifting sequences, please refer to a digital signal processing book, such as "Discrete-Time Signals Processing" by Alan V. Oppenheim & Ronald W. Schafer. (pg. 520)
>>x=[-1*ones(1,64) 0 ones(1,64)];
>>X=fft(x);
>>k=0:128;
>>phase_shift=exp(-j*2*pi*64*k/129); % calculating phase shift
>>XC=X./phase_shift; % FFT compensated for phase shift
>>max(abs(real(XC))) % Finding maximum real part
ans =
3.8880e-12
Note that although there's still a real part in the result of the compensated FFT, it's essentially equal to zero. The small real component is introduced as a result of round off error and computer accuracy.
>>max(abs(imag(XC)))
ans =
82.1199
Note the maximum values for the imaginary component are much larger.
Another way to get around this problem is to split your signal in two and add the first half of the signal to the end of the signal. Because of the FFTs repeating property, the result would be the same as having a signal which is centered at n=0.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!