Rectangular mask short-time Fourier transform

From HandWiki

In mathematics and Fourier analysis, a rectangular mask short-time Fourier transform (rec-STFT) is a simplified form of the short-time Fourier transform which is used to analyze how a signal's frequency content changes over time. In rec-STFT, a rectangular window (a simple on/off time-limiting function) is used to isolate short time segments of the signal. Other types of the STFT may require more computation time ( refers to the amount of time it takes a computer or algorithm to perform a calculation or complete a task) than the rec-STFT.

The rectangular mask function can be defined for some bound (B) over time (t) as

w(t)={ 1;|t|B 0;|t|>B
B = 50, x-axis (sec)

We can change B for different tradeoffs between desired time resolution and frequency resolution.

Rec-STFT

X(t,f)=tBt+Bx(τ)ej2πfτdτ

Inverse form

x(t)=X(t1,f)ej2πftdf where tB<t1<t+B

Property

Rec-STFT has similar properties with Fourier transform

  • Integration

(a)

X(t,f)df=tBt+Bx(τ)ej2πfτdfdτ=tBt+Bx(τ)δ(τ)dτ={ x(0);|t|<B 0;otherwise

(b)

X(t,f)ej2πfvdf={ x(v);vB<t<v+B 0;otherwise
  • Shifting property (shift along x-axis)
tBt+Bx(τ+τ0)ej2πfτdτ=X(t+τ0,f)ej2πfτ0
  • Modulation property (shift along y-axis)
tBt+B[x(τ)ej2πf0τ]dτ=X(t,ff0)
  • special input
  1. When x(t)=δ(t),X(t,f)={ 1;|t|<B 0;otherwise
  2. When x(t)=1,X(t,f)=2Bsinc(2Bf)ej2πft
  • Linearity property

If h(t)=αx(t)+βy(t),H(t,f),X(t,f),and Y(t,f)are their rec-STFTs, then

H(t,f)=αX(t,f)+βY(t,f).
  • Power integration property
|X(t,f)|2df=tBt+B|x(τ)|2dτ
|X(t,f)|2dfdt=2B|x(τ)|2dτ
X(t,f)Y*(t,f)df=tBt+Bx(τ)y*(τ)dτ
X(t,f)Y*(t,f)dfdt=2Bx(τ)y*(τ)dτ

Example of tradeoff with different B

Spectrograms produced from applying a rec-STFT on a function consisting of 3 consecutive cosine waves. (top spectrogram uses smaller B of 0.5, middle uses B of 1, and bottom uses larger B of 2.)

From the image, when B is smaller, the time resolution is better. Otherwise, when B is larger, the frequency resolution is better.

Advantage and disadvantage

Compared with the Fourier transform:

  • Advantage: The instantaneous frequency can be observed.
  • Disadvantage: Higher complexity of computation.

Compared with other types of time-frequency analysis:

  • Advantage: Least computation time for digital implementation.
  • Disadvantage: Quality is worse than other types of time-frequency analysis. The jump discontinuity of the edges of the rectangular mask results in Gibbs ringing artifacts in the frequency domain, which can be alleviated with smoother windows.

See also

References

  1. Jian-Jiun Ding (2014) Time-frequency analysis and wavelet transform