Determine whether window-overlap combination is COLA compliant
Create a periodic root-Hann window of length 120. Test whether the window is COLA compliant with a 50% overlap.
win = sqrt(hann(120,'periodic')); noverlap = 60;
Check whether the window is COLA compliant with a 50% overlap.
tf = iscola(win,noverlap)
tf = logical 1
Create a periodic Hamming window of length 256. Set the method of Overlap-Add as
window = hamming(256,'periodic'); method = 'ola'; noverlap = 128;
Test whether the window is COLA compliant with a 50% overlap. Also calculate the median of the COLA summation and the maximum deviation from that summation.
[tf,m,maxDeviation] = iscola(window,noverlap,method)
tf = logical 1
m = 1.0800
maxDeviation = 2.2204e-16
window— Analysis window
Analysis window, specified as a vector.
win = bartlett(120) is a Bartlett window of length
noverlap— Number of overlapped samples
Number of overlapped samples, specified as a positive integer smaller than the
method— Method of overlap-add
Method of overlap-add, specified as:
'wola' — Weighted Overlap-Add.
'ola' — Overlap-Add.
tf— COLA compliance
COLA compliance, returned as a logical scalar. If the function returns a
1 (true), then the window and overlap length satisfy the COLA
Median of the COLA summation, returned as a real scalar. If the inputs are COLA
m is equal to the COLA summation constant.
You can conclude strong COLA-compliance if
m = 1 and
maxDeviation is close to the numeric precision error.
The inverse short-time Fourier transform is computed by taking the IFFT of each DFT vector of the STFT and overlap-adding the inverted signals. The ISTFT is calculated as follows:
where is the hop size between successive DFTs, is the DFT of the windowed data centered about time and . The inverse STFT is a perfect reconstruction of the original signal as long as where the analysis window was used to window the original signal and is a constant. The following figure depicts the steps followed in reconstructing the original signal.
To ensure successful reconstruction of nonmodified spectra, the analysis window must satisfy the COLA constraint. In general, if the analysis window satisfies the condition , the window is considered to be COLA-compliant. Additionally, COLA compliance can be described as either weak or strong.
Weak COLA compliance implies that the Fourier transform of the analysis window has zeros at frame-rate harmonics such that
Alias cancellation is disturbed by spectral modifications. Weak COLA relies on alias cancellation in the frequency domain. Therefore, perfect reconstruction is possible using weakly COLA-compliant windows as long as the signal has not undergone any spectral modifications.
For strong COLA compliance, the Fourier transform of the window must be bandlimited consistently with downsampling by the frame rate such that
This equation shows that no aliasing is allowed by the strong COLA constraint. Additionally, for strong COLA compliance, the value of the constant must equal 1. In general, if the short-time spectrum is modified in any way, a stronger COLA compliant window is preferred.
You can use the
iscola function to check for weak COLA compliance. The
number of summations used to check COLA compliance is dictated by the window length and
hop size. In general, it is common to use in for weighted overlap-add (WOLA), and for overlap-add (OLA). By default,
istft uses the
WOLA method, by applying a synthesis window before performing the
In general, the synthesis window is the same as the analysis window. You can construct useful WOLA windows by taking the square root of a strong OLA window. You can use this method for all nonnegative OLA windows. For example, the root-Hann window is a good example of a WOLA window.
In general, computing the STFT of an input signal and inverting it does not result in perfect reconstruction. If you want the output of ISTFT to match the original input signal as closely as possible, the signal and the window must satisfy the following conditions:
Input size — If you invert the output of
istft and want the result to be the same length as the
x, the value of must be an integer.
COLA compliance — Use COLA-compliant windows, assuming that you have not modified the short-time Fourier transform of the signal.
Padding — If the length of the input signal is such that the value of k is not an integer, zero-pad the signal before computing the short-time Fourier transform. Remove the extra zeros after inverting the signal.
 Allen, J. B. “Short Term Spectral Analysis, Synthesis, and Modification by Discrete Fourier Transform” IEEE Transactions on Acoustics, Speech and Signal Processing. Vol. 25, No. 3, June 1977, pp. 235–238.
 Griffin, D. W., and J. S. Lim. “Signal Estimation from Modified Short-Time Fourier Transform.” IEEE Transactions on Acoustics, Speech and Signal Processing. Vol. 32, No. 2, April 1984, pp. 236–243.
 Sharpe, Bruce. Invertibility of Overlap-Add Processing. https://gauss256.github.io/blog/cola.html, accessed July 2019.
 Smith, J. O. Spectral Audio Signal Processing. https://ccrma.stanford.edu/~jos/sasp/, online book, 2011 edition, accessed Nov 2018.