This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

iscola

Determine whether window-overlap combination is COLA compliant

Syntax

tf = iscola(window,noverlap)
tf = iscola(window,noverlap,method)
[tf,m] = iscola(___)
[tf,m,maxDeviation] = iscola(___)

Description

example

tf = iscola(window,noverlap) checks that the specified window and overlap satisfy the Constant Overlap-Add (COLA) constraint to ensure that the inverse short-time Fourier transform results in perfect reconstruction for nonmodified spectra.

tf = iscola(window,noverlap,method) specifies the inversion method to use.

[tf,m] = iscola(___) also returns the median of the COLA summation. You can use these output arguments with any of the previous input syntaxes.

example

[tf,m,maxDeviation] = iscola(___) returns the maximum deviation from the median m.

Examples

collapse all

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 'ola'.

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

Input Arguments

collapse all

Analysis window, specified as a vector.

Example: win = bartlett(120) is a Bartlett window of length 120.

Data Types: double | single

Number of overlapped samples, specified as a positive integer smaller than the length of window.

Data Types: double | single

Method of overlap-add, specified as:

  • 'wola' — Weighted Overlap-Add.

  • 'ola' — Overlap-Add.

Output Arguments

collapse all

COLA compliance, returned as a logical scalar. If the function returns a 1 (true), then the window and overlap length satisfy the COLA constraint.

Median of the COLA summation, returned as a real scalar. If the inputs are COLA compliant, then m is equal to the COLA summation constant.

Maximum deviation from the median m. If window and noverlap are COLA compliant, the maxDeviation is close to the expected numeric precision error of the COLA summation.

Note

You can conclude strong COLA-compliance if m = 1 and maxDeviation is close to the numeric precision error.

More About

collapse all

Inverse Short-time Fourier Transform

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:

x(n)=1/21/2m=Xm(f)ej2πfndf=m=1/21/2Xm(f)ej2πfndf=m=xm(n)

where R is the hop size between successive DFTs, Xm is the DFT of the windowed data centered about time mR and xm(n)=x(n)g(nmR). The inverse STFT is a perfect reconstruction of the original signal as long as m=ga+1(nmR)=cn where the analysis window g(n) was used to window the original signal and c is a constant. The following figure depicts the steps followed in reconstructing the original signal.

Constant Overlap-Add (COLA) Constraint

To ensure successful reconstruction of nonmodified spectra, the analysis window must satisfy the COLA constraint. In general, if the analysis window satisfies the condition m=ga+1(nmR)=cn, 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

    G(fk)=0,k=1,2,,R1,fkkR.

    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

    G(f)=0,f12R.

    This equation shows that no aliasing is allowed by the strong COLA constraint. Additionally, for strong COLA compliance, the value of the constant c 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 a=1 in m=ga+1(nmR)=cn for weighted overlap-add (WOLA), and a=0 for overlap-add (OLA). By default, istft uses the WOLA method, by applying a synthesis window before performing the overlap-add method.

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.

.

References

[1] 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.

[2] 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.

[3] Smith, J. O. Spectral Audio Signal Processing. https://ccrma.stanford.edu/~jos/sasp/, online book, 2011 edition, accessed Nov 2018.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

Functions

Introduced in R2019a