I have come across a peculiarity of FFTs which has got me somewhat baffled. I've simply summed up 101 sine waves and taken the FFT using this matlab script :

clear all
f=1e9;                                 % Centre Frequency 1GHz
df=2.5e6;                                % Carrier Frequency 2.5MHz
Time=linspace(-100e-9,100e-9,1000);      % Region of time to simulate over
Voltage=Time.*0;                        % Initialise Voltages to zero 
for loop=-50:50                         % Sum 101 carrier Frequencies
figure(1)                               %Plot Time dependent response
subplot(2,1,2)                               %Plot Frequency Content 

The output is as I had expected, with the correct frequency content : enter image description here
However, if I simply add a significant time delay (by re-running the script with delay=150e-9;, such that the main constructive interference lobe disappears outside the calculation window) the frequency content of the resulting time trace collapses to two peaks. enter image description here
However the time trace is still the summation of 101 sin waves albeit now out of phase because of the introduced delay ?? Intuitively I would have expected the absolute frequency content of the trace to be preserved and only the phases modified by the delay. Upon reflection I can perhaps understand that the frequency content must be modified on energy conservation grounds, but can anybody rationalise what is going on here ?

  • $\begingroup$ Per hotpaw2s answer: Easy to see if you increase the delay gradually. The center blob in the middle shifts to the right and eventually moves out of the window. Your delay is about 750 samples which is more than half the window size. $\endgroup$
    – Hilmar
    Jan 4 '16 at 13:42

You aren't looking at the frequency content of your sum of sinewave. You are looking at the frequency content of a rectangular window on your sinewaves, and the window (FFT length) is shorter than the least common multiple of all the sinewave periods.

Signals that are not orthogonal within a window can cancel each other out partially or completely within that window. What has happened is that you've chosen a window of a length such that each sinewave can get nearly completely cancelled out by the next higher and lower frequency pair of sinusoids of the "right" phase. The ones on the ends are the only ones that aren't sandwiched, and thus aren't cancelled.

  • $\begingroup$ Thanks for the answer. I agree that this is what the FFT trace tells us, but is still surprising as the voltage consists of an orthogonal set of sinwaves (note 1GHz is an integer multiple of 2.5MHz, so you can rewrite the voltage signal as a summation of sin(2.pi.df.time.N) where N is an integer multiple). By definition these orthogonal sinewaves cannot cancel each other out ! Yet by narrowing the observation window you can achieve cancellation ? $\endgroup$
    – Marky0
    Jan 4 '16 at 20:09
  • $\begingroup$ Intuitively this still makes no sense to me. $\endgroup$
    – Marky0
    Jan 4 '16 at 20:19
  • $\begingroup$ Your time window is not 1/1GHz, but (100+100)/1GHz, over which two sinwaves of 1005 and 1002.5 GHz are not orthogonal. $\endgroup$
    – hotpaw2
    Jan 4 '16 at 20:39
  • $\begingroup$ For intuition, use just two sinewaves and shrink the window to one sample. It's obvious that you can pick a point where the sum is zero Volts, e.g. complete cancellation, no matter how orthogonal the frequencies are over an infinite time period. $\endgroup$
    – hotpaw2
    Jan 4 '16 at 20:44

I have marked @hotpaw2 answer as correct, but after further thought I post a simple visual explanation of what is going on here.

Instead of taking the FFT of a complex pulse, consider instead a simple pulse as shown in the figure below. By applying a fourier series expansion, this pulse (or any pulse) can also be created from the weighted summation of an infinite set of orthognal sinwaves as defined in the original question.

enter image description here

It is now fairly obvious that the FFT of the pulse within the red window will contain all the spectral content of the pulse (as shown in the first figure of the original question), where as the FFT of the green window will contain no spectral content at all (as shown in the second figure of the original question). This is true even though the trace within each window can still be constructed from the summation of a orthogonal set of sinwaves by the same fourier series expansion. The FFT window transforms the trace within the window onto a different orthogonal set of sinwaves, as described in @hotpaw2 answer. The original fourier series expansion used to construct the pulse and its corresponding frequency components are no longer relevant.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.