Academic Company Events Community Support Solutions Products & Services Contact NI MyNI

Document Type: Prentice Hall
Author: Shie Qian and Dapang Chen
Book: Joint Time-Frequency Analysis -- Methods and Applications
Copyright: 1996
ISBN: 0-13-254384-2
NI Supported: No
Publish Date: Dec 30, 2011

Short-Time Fourier Transform

20 ratings | 4.35 out of 5
Print | PDF


The frequency contents of the majority of signals encountered in our everyday life change over time, such as biomedical signals, speech signals, stock indexes, and vibrations. Because the basis functions used in the classical Fourier analysis do not associate with any particular time instant, the resulting measurements, Fourier transforms, do not explicitly reflect a signal's time-varying nature.*

[* Although the phase characteristic of S(w) contains the time information, it is difficult to establish the point-to-point relationship between s(t) and S(w) based upon the conventional Fourier analysis.]

A simple way to overcome the deficiency possessed by the regular Fourier transform is to compare the signal with elementary functions that are localized in time and frequency domains simultaneously, i.e.,

which is a regular inner product and reflects the similarity between signal s(t) and the elementary function g(t-t)exp{jwt}. The function g(t) usually has a short time duration and thereby it is named the window function. Eq. (3.1) is called short-time Fourier transform (STFT) or windowed Fourier transform.

The formula (3.1) can be understood in several ways. Fig. 3-1 depicts the procedure of computing the STFT; first multiply the function g(t) with signal s(t) and compute the Fourier transform of the product s(t)g*(t-t). Because the window function g(t) has a short time duration, the Fourier transform of s(t)g*(t-t) reflects the signal's local frequency properties. By moving g(t) and repeating the same process, we could obtain a rough idea how the signal's frequency contents evolve over time.

Fig. 3-1 Short-Time Fourier Transform

Alternatively, we could also understand STFT from the concept of expansion introduced in Chapter 2. In STFT, we compare the signal s(t) with a set of elementary functions g(t-t)exp{jwt} that are concentrated in both time and frequency domains. Suppose that the function g(t) is centered at t = 0 and its Fourier transform is centered at w = 0. If the time duration and frequency bandwidth of g(t) are Dt and Dw then STFT(t,w) in (3.1) indicates a signal's behavior in the vicinity of [t - Dt, t + Dt] x [w - Dw, w + Dw].

In order to better measure a signal at a particular time and frequency (t,w), it is natural to desire that Dt and Dw be as narrow as possible. Unfortunately, the selections of Dt and Dw are not independent, which are related via the Fourier transform. If we let Dt and Dw be a signal's standard deviations as introduced in Chapter 2, then the product DtDw has to satisfy the uncertainty inequality, that is

There is a trade-off of the selection of the time and frequency resolution. If g(t) is chosen to have good time resolution (smaller Dt, then its frequency resolution must be deteriorated (larger Dw), or vice versa. The equality only holds when g(t) is a Gaussian function.

The reader should bear in mind that if {g(t-t)exp{jwt}} is considered as a ruler, then the different time and frequency tick marks for STFT are obtained by time-shifting and frequency-modulating a single prototype window function g(t). In the next chapter, we shall introduce another way to constitute time and frequency tick marks, which is commonly known as wavelets. Although the concepts of exploring a signal's time-varying nature are quite similar (performing inner product operations), the different way of building tick marks leads to very different outcomes.

The square of STFT is named STFT spectrogram to distinguish it from the time-dependent spectrum based upon other linear techniques, such as the Gabor expansion and the adaptive representations. STFT spectrogram is the most simple and used time-dependent spectrum, which roughly depicts a signal's energy distribution in the joint time-frequency domain. While the STFT in general is complex, the STFT spectrogram is always real-valued.

Example 3-1 STFT with Gaussian-type analysis function:



Intuitively, in the joint time-frequency domain, s(t) is centered in (0,0). Its time duration is determined by b. Substituting s(t) and g(t) into (3.1) yields

Applying the Gaussian characteristic function introduced in Example 2-4, we have

Fig. 3-2 The ellipse area reaches its minimum when the variance of analysis function perfectly matches the signal time duration, that is, a = b. The minimum area is 2p, which is twice as large as that of the Wigner-Ville distribution.

The corresponding STFT spectrogram is

which shows that STFT spectrogram is concentrated in (0,0), the center of signal s(t). The contours of equal height of SP in (3.5) are ellipses. The contour for the case where the levels are down to e-1 of their peak value is the ellipse indicated in Fig. 3-2. The area of this particular level ellipse is

where r = b/a is a matching indicator. The area A reflects the concentration of STFT. Naturally, the smaller the A is, the better the resolution. The resolution of STFT is subject to the selection of analysis function. The minimum of A in (3.6) occurs when r = 1. In other words, when the variance of analysis function a perfectly matches the time duration of the analyzed signal b, SP(t,w) in (3.5) will have the best resolution. However, because the signal duration b will likely be unknown, it would be difficult to achieve the optimal resolution in general. Moreover, it should bear in mind that even the optimal resolution, A = 2p, is twice as large as that of the Wigner-Ville distribution.

Taking the inverse Fourier transform with respect to STFT(t,w) in (3.1) yields

Let m = t, we have

which implies given STFT(t,w) for all t and w, we can completely recover the signal s(t).

It is worth noting that (3.7) is a highly redundant representation. In fact, the signal s(t) can be completely reconstructed merely from the sampled version of the short-time Fourier transform, STFT(mT,nW), where T and W denote the time and frequency sampling steps, respectively. In other words, we can use the sampled STFT to completely characterize signal s(t) and thereby save considerable computation as well as memory. Unfortunately, in this case, the reconstruction is no longer as simple as (3.7). We shall discuss this subject in more detail in the subsequent sections.

The STFT can also be viewed as a mapping from the time domain to the time-frequency domain, as illustrated in Fig. 3-3. For any time domain function s(t) and window function g(t), such mapping always exists. But the inverse may not be true. In other words, given a function g(t) and an arbitrary two-dimensional function B(t,w), there may be no physically existing signals s(t) whose STFT is equal to B(t,w). In this case, we say that B(t,w) is not a valid short-time Fourier transform. The simplest example is

Because no signal can be finite supported in both time and frequency domains, B(t,w) cannot be a valid joint time-frequency representation. As shown in Fig. 3-3, STFT(t,w) in fact is only a subset of the entire two-dimensional function B(t,w)).

Fig. 3-3 STFT(t,w) is a subset of the entire two-dimensional function. An arbitrary two-dimensional time-frequency function may not be a valid STFT(t,w).

For a given function g(t), a valid short-time Fourier transform has to be such that its inverse Fourier transform is separable, that is

For the digital signal processing application, it is necessary to extend the STFT framework to discrete-time signal. For the practical implementation, each Fourier transform in the STFT has to be replaced by the discrete Fourier transform, the resulting STFT is discrete in both time and frequency and thus is suitable for digital implementation, i.e.,


STFT[k,n] = STFT(t,w)|t=kDt, w = 2Pn/(LDt)

where Dt denotes the time sampling interval. g[k] = g(kDt) is the L-point window function. We call (3.10) the discrete STFT to distinguish it from the discrete-time STFT, which is continuous in frequency. It is rather easy to verify that the discrete STFT is periodic in frequency, that is,

STFT[k,n] = STFT[k, n + IL]

for l = 0, ±1, ±2, ±3.... Like the continuous-time STFT, arbitrary two-dimensional discrete function in general is not a valid discrete short-time Fourier transform.
Related Links:
Gabor Expansion - Inverse Sampled STFT
Gabor Expansion for Discrete Periodic Samples
Discrete Gabor Expansion

20 ratings | 4.35 out of 5
Print | PDF

Reader Comments | Submit a comment »

Kurt, please notice this is a Prentice Hall document, the entire contnet of this document was taken from "Joint Time- Frequency Analysis -- Methods and Applications". You can find the information about the book on the top left corenr of your screen. Thanks.
- Efrat S., National Instruments. - Aug 13, 2007

The figures look like they were taken from a book. Which book?
- - Jul 23, 2007


Excerpt from the book published by Prentice Hall Professional (
Copyright Prentice Hall Inc., A Pearson Education Company, Upper Saddle River, New Jersey 07458.
This material is protected under the copyright laws of the U.S. and other countries and any uses not in conformity with the copyright laws are prohibited, including but not limited to reproduction, DOWNLOADING, duplication, adaptation and transmission or broadcast by any media, devices or processes.