Skip to content Skip to navigation

Connexions

You are here: Home » Content » Short-time Fourier Transform

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Recently Viewed

This feature requires Javascript to be enabled.

Short-time Fourier Transform

Module by: Phil Schniter

Summary: This module introduces short-time Fourier transform.

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

We saw earlier that Fourier analysis is not well suited to describing local changes in "frequency content" because the frequency components defined by the Fourier transform have infinite (i.e., global) time support. For example, if we have a signal with periodic components plus a glitch at time t0 t0 , we might want accurate knowledge of both the periodic component frequencies and the glitch time (Figure 1).

Figure 1
Figure 1 (stft.png)

The Short-Time Fourier Transform (STFT) provides a means of joint time-frequency analysis. The STFT pair can be written XSTFTΩτ=-xtwtτ-Ωtdt XSTFT Ω τ t x t w t τ Ω t xt=12π--XSTFTΩτwtτΩtdΩdt x t 1 2 t Ω XSTFT Ω τ w t τ Ω t assuming real-valued wt w t for which |wt|2dt=1 t w t 2 1 . The STFT can be interpreted as a "sliding window CTFT": to calculate XSTFTΩτ XSTFT Ω τ , slide the center of window wt w t to time ττ, window the input signal, and compute the CTFT of the result (Figure 2).

Figure 2
"Sliding Window CTFT"
"Sliding Window CTFT" (sliding_window_ctft.png)

The idea is to isolate the signal in the vicinity of time ττ, then perform a CTFT analysis in order to estimate the "local" frequency content at time ττ.

Essentially, the STFT uses the basis elements b Ω , τ t=wtτΩt b Ω , τ t w t τ Ω t over the range t- t and Ω- Ω . This can be understood as time and frequency shifts of the window function wt w t . The STFT basis is often illustrated by a tiling of the time-frequency plane, where each tile represents a particular basis element (Figure 3):

Figure 3
Figure 3 (time_frequency_tiling.png)

The height and width of a tile represent the spectral and temporal widths of the basis element, respectively, and the position of a tile represents the spectral and temporal centers of the basis element. Note that, while the tiling diagram suggests that the STFT uses a discrete set of time/frequency shifts, the STFT basis is really constructed from a continuum of time/frequency shifts.

Note that we can decrease spectral width ΔΩ ΔΩ at the cost of increased temporal width Δt Δt by stretching basis waveforms in time, although the time-bandwidth product ΔtΔΩ Δt ΔΩ (i.e., the area of each tile) will remain constant (Figure 4).

Figure 4
Figure 4 (wndow_scaling.png)

Our observations can be summarized as follows:

  • the time resolutions and frequency resolutions of every STFT basis element will equal those of the window wt w t . (All STFT tiles have the same shape.)
  • the use of a wide window will give good frequency resolution but poor time resolution, while the use of a narrow window will give good time resolution but poor frequency resolution. (When tiles are stretched in one direction they shrink in the other.)
  • The combined time-frequency resolution of the basis, proportional to 1ΔtΔΩ 1 Δt ΔΩ , is determined not by window width but by window shape. Of all shapes, the Gaussian 1 wt=12π-12t2 w t 1 2 1 2 t 2 gives the highest time-frequency resolution, although its infinite time-support makes it impossible to implement. (The Gaussian window results in tiles with minimum area.)
Finally, it is interesting to note that the STFT implies a particular definition of instantaneous frequency. Consider the linear chirp xt=sinΩ0t2 x t Ω0 t 2 . From casual observation, we might expect an instantaneous frequency of Ω0τ Ω0 τ at time ττ since ,t=τ:sinΩ0t2=sinΩ0τt t τ Ω0 t 2 Ω0 τ t The STFT, however, will indicate a time-ττ instantaneous frequency of ddtΩ0t2| t=τ =2Ω0τ t τ t Ω0 t 2 2 Ω0 τ

Caution:

The phase-derivative interpretation of instantaneous frequency only makes sense for signals containing exactly one sinusoid, though! In summary, always remember that the traditional notion of "frequency" applies only to the CTFT; we must be very careful when bending the notion to include, e.g., "instantaneous frequency", as the results may be unexpected!

Footnotes

  1. The STFT using a Gaussian window is known as the Gabor Transform (1946).

Comments, questions, feedback, criticisms?

Send feedback