IFFT of Real Values of the FFTs of a Series of Overlapping Signal Windows


Click on each image for a full-resolution version. Depending on your browser, the results may be heavily aliased.

The Original Signal

The original sampled signal is a simple sine wave:

The Windowing Function

The windowing function is a tent function that starts at 0 goes to 1 at the midpoint and then returns to 0. The windows overlap by half meaning that any window starts at the previous window's midpoint (except for the initial window).

The Pseudospectrogram Procedure

The pseudo-spectrogram is generated by the following simple procedure:

  1. capture overlapping windows of the signal samples. For example if the signal was three samples long:
    [ 1 2 3 ]
    and the window size was 2 samples, then we would have the three windows:
    [1 2] [2 3] [3 0]
    Note that there is a zero at the end of the last window because we are sampling beyond the bounds of the signal; we need the last window so that each value is captured by at least two windows (also note that this doesn't apply to the initial values).
  2. Multiply each window by the tent function of the same width as the window. A 2-sample-wide tent would simply be [0.5 0.5].
  3. Compute the FFT of these resulting windows, but keep only the real values of the results.

The Reconstruction Procedure

The reconstruction of the original signal from these windows is even simpler:

  1. Compute the Inverse FFT of each window, but only keep the real values of the results.
  2. Add all the windows together in order, offsetting each subsequent window by half the window size.

Reconstruction Results Using 4-Sample Window Size

Detail of the signal:

Reconstruction Results Using 8-Sample Window Size

Detail of the signal:

Reconstruction Results Using 16-Sample Window Size

Detail of the signal:

Reconstruction Results Using 32-Sample Window Size

Detail of the signal:

Reconstruction Results Using 64-Sample Window Size

Detail of the signal:

Reconstruction Results Using Window Sizes Greater Than 64

The results are identical to 64 size windows when using 128 and 256 size windows. At 512 and 1028, they start to exhibit weird amplitude artifacts.

Conclusion

As was expected, you pay for throwing out the imaginary data. There seems to be a constant of signal distortion whether the distortion is relatively localized (windows of size 4 and 8) or occuring in obvious periods (32 and greater).

I performed a very simple test to see how this will sound. I ran the signal through the matlab sound function at a frequency high enough to emit a tone. Naturally, there is an increasing assortment of amplitude modulation effects as the window widens, but the unfortunate result is that there is audible distortion for every window size.

Code