ArticleslgStudy

science

Short-time Fourier transform

Short-time Fourier transform is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Short-time Fourier transform rather than just read about it. In short: The short-time Fourier transform (STFT) is a Fourier-related transform used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time. In practice, the procedure for computing STFTs is to divide a longer time signal into shorter segments of equal length and then compute the Fourier transform separately on each shorter segment.

Short-time Fourier transform — main illustration
Short-time Fourier transform — illustration

Key takeaways

  • Short-time Fourier transform belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Short-time Fourier transform to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Short-time Fourier transform from memory before moving on to harder problems.

Reference excerpt

The short-time Fourier transform (STFT) is a Fourier-related transform used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time. In practice, the procedure for computing STFTs is to divide a longer time signal into shorter segments of equal length and then compute the Fourier transform separately on each shorter segment. This reveals the Fourier spectrum on each shorter segment. One then usually plots the changing spectra as a function of time, known as a spectrogram or waterfall plot, such as commonly used in software defined radio (SDR) based spectrum displays. Full bandwidth displays covering the whole range of an SDR commonly use fast Fourier transforms (FFTs).

Forward STFT

Continuous-time STFT Simply, in the continuous-time case, the function to be transformed is multiplied by a window function which is nonzero for only a short period of time. The Fourier transform (a one-dimensional function) of the resulting signal is taken, then the window is slid along the time axis until the end resulting in a two-dimensional representation of the signal. Mathematically, this is written as:

𝐒𝐓𝐅𝐓{x(t)}(τ,ω)≡X(τ,ω)=∫−∞∞x(t)w(t−τ)e−iωtdt where w(τ) is the window function, commonly a Hann window or Gaussian window centered around zero, and x(t) is the signal to be transformed (note the difference between the window function w and the frequency ω). X(τ,ω) is essentially the Fourier transform of x(t)w(t−τ), a complex function representing the phase and magnitude of the signal over time and frequency. Often phase unwrapping is employed along either or both the time axis, τ, and frequency axis, ω, to suppress any jump discontinuity of the phase result of the STFT. The time index τ is normally considered to be "slow" time and usually not expressed in as high resolution as time t. Given that the STFT is essentially a Fourier transform times a window function, the STFT is also called windowed Fourier transform or time-dependent Fourier transform.

Discrete-time STFT

In the discrete time case, the data to be transformed could be broken up into chunks or frames (which usually overlap each other, to reduce artifacts at the boundary). Each chunk is Fourier transformed, and the complex result is added to a matrix, which records magnitude and phase for each point in time and frequency. This can be expressed as:

𝐒𝐓𝐅𝐓{x[n]}(m,ω)≡X(m,ω)=∑n=−∞∞x[n]w[n−m]e−iωn likewise, with signal x[n] and window w[n]. In this case, m is discrete and ω is continuous, but in most typical applications the STFT is performed on a computer using the fast Fourier transform, so both variables are discrete and quantized. The magnitude squared of the STFT yields the spectrogram representation of the power spectral density of the function:

spectrogram⁡{x(t)}(τ,ω)≡|X(τ,ω)|2 See also the modified discrete cosine transform (MDCT), which is also a Fourier-related transform that uses overlapping windows.

Sliding DFT If only a small number of ω are desired, or if the STFT is desired to be evaluated for every shift m of the window, then the STFT may be more efficiently evaluated using a sliding DFT algorithm.

Inverse STFT The STFT is invertible, that is, the original signal can be recovered from the transform by the inverse STFT. The most widely accepted way of inverting the STFT is by using the overlap-add (OLA) method, which also allows for modifications to the STFT complex spectrum. This makes for a versatile signal processing method, referred to as the overlap and add with modifications method.

Continuous-time STFT Given the width and definition of the window function w(t), we initially require the area of the window function to be scaled so that

∫−∞∞w(τ)dτ=1. It easily follows that

∫−∞∞w(t−τ)dτ=1∀ t and

x(t)=x(t)∫−∞∞w(t−τ)dτ=∫−∞∞x(t)w(t−τ)dτ. The continuous Fourier transform is

X(ω)=∫−∞∞x(t)e−iωtdt. Substituting x(t) from above:

X(ω)=∫−∞∞[∫−∞∞x(t)w(t−τ)dτ]e−iωtdt =∫−∞∞∫−∞∞x(t)w(t−τ)e−iωtdτdt. Swapping order of integration:

X(ω)=∫−∞∞∫−∞∞x(t)w(t−τ)e−iωtdtdτ =∫−∞∞[∫−∞∞x(t)w(t−τ)e−iωtdt]dτ =∫−∞∞X(τ,ω)dτ. So the Fourier transform can be seen as a sort of phase coherent sum of all of the STFTs of x(t). Since the inverse Fourier transform is

x(t)=12π∫−∞∞X(ω)e+iωtdω, then x(t) can be recovered from X(τ,ω) as

x(t)=12π∫−∞∞∫−∞∞X(τ,ω)e+iωtdτdω. or

x(t)=∫−∞∞[12π∫−∞∞X(τ,ω)e+iωtdω]dτ. It can be seen, comparing to above that windowed "grain" or "wavelet" of x(t) is

x(t)w(t−τ)=12π∫−∞∞X(τ,ω)e+iωtdω. the inverse Fourier transform of X(τ,ω) for τ fixed. An alternative definition that is valid only in the vicinity of τ, the inverse transform is:

x(t)=1w(t−τ)12π∫−∞∞X(τ,ω)e+iωtdω. In general, the window function w(t) has the following properties:

(a) even symmetry: w(t)=w(−t); (b) non-increasing (for positive time): w(t)≥w(s) if |t|≤|s|; (c) compact support: w(t) is equal to zero when |t| is large.

Resolution issues

One of the pitfalls of the STFT is that it has a fixed resolution. The width of the windowing function relates to how the signal is represented—it determines whether there is good frequency resolution (frequency components close together can be separated) or good time resolution (the time at which frequencies change). A wide window gives better frequency resolution but poor time resolution. A narrower window gives good time resolution but poor frequency resolution. These are called narrowband and wideband transforms, respectively.

… excerpt ends here. Continue reading the full article.

Illustrations

Short-time Fourier transform: A spectrogram visualizing the results of a STFT of the words "nineteenth century". Here, frequencies are shown increasing up the vertical axis, and time on the horizontal axis. The legend to the right shows that the color intensity increases with the density.
A spectrogram visualizing the results of a STFT of the words "nineteenth century". Here, frequencies are shown increasing up the vertical axis, and time on the horizontal axis. The legend to the right shows that the color intensity increases with the density.
Short-time Fourier transform: Comparison of STFT resolution. Left has better time resolution, and right has better frequency resolution.
Comparison of STFT resolution. Left has better time resolution, and right has better frequency resolution.
Short-time Fourier transform illustration
Short-time Fourier transform: 25 ms window
25 ms window
Short-time Fourier transform: 125 ms window
125 ms window

Worked examples

Example 1 — a first encounter with Short-time Fourier transform

Start with the simplest possible case. Write down what Short-time Fourier transform claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Short-time Fourier transform before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Short-time Fourier transform ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Short-time Fourier transform

In research
Short-time Fourier transform appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Short-time Fourier transform in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Short-time Fourier transform is common in secondary-school and first-year university syllabi. It links to neighbouring topics Fourier analysis, Signal processing, Time–frequency analysis, so understanding it makes those chapters shorter.
In everyday life
Look for Short-time Fourier transform outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Short-time Fourier transform” →

How to study Short-time Fourier transform in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Short-time Fourier transform means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Short-time Fourier transform out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Short-time Fourier transform in simple terms?

The short-time Fourier transform (STFT) is a Fourier-related transform used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time. In practice, the procedure for computing STFTs is to divide a longer time signal into shorter segments of equal…

Why does Short-time Fourier transform matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Short-time Fourier transform?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Short-time Fourier transform.

Tags

  • Fourier analysis
  • Signal processing
  • Time–frequency analysis
  • Transforms

Keep exploring