Skip to main content

Frequency-Domain Analysis

Learning Objectives

  • Explain what frequency-domain analysis shows that time-domain analysis does not
  • State the Fourier transform integral and describe what each term represents
  • Distinguish the CTFT, DTFT, FFT, and STFT and know when each applies
  • Explain why filtering becomes multiplication in the frequency domain
  • Interpret a magnitude spectrum to identify dominant frequencies and noise
  • Apply frequency-domain filtering to remove unwanted components from a signal in Python

Quick Answer

Frequency-domain analysis re-expresses a signal not as amplitude-over-time but as how much energy it contains at each frequency. The tool that gets you there is the Fourier transform, which decomposes any signal into a sum of sinusoids of different frequencies, amplitudes, and phases. This view matters because tasks that are awkward in the time domain — separating a tone from noise, designing a filter, analyzing a modulated carrier — become straightforward once you can see exactly which frequencies are present and how strong each one is. Filtering, in particular, turns into simple multiplication of spectra rather than the more complex convolution required in the time domain.

What Frequency-Domain Analysis Shows

Every physical signal — a voltage, a sound wave, an image row — can be looked at two ways: how it evolves over time, or which frequencies compose it. Frequency-domain analysis is the second view. Instead of a trace of amplitude against time, you get a spectrum: amplitude (and phase) plotted against frequency.

The tool that produces this view is the Fourier transform:

X(f) = ∫ x(t) e^(-j2πft) dt (integral over all time)

Here x(t) is the original time-domain signal, X(f) is its frequency-domain representation, f is frequency, and e^(-j2πft) is a complex exponential that acts as a "probe" for how strongly the signal correlates with a pure sinusoid at frequency f. Where X(f) is large, the signal contains a strong component at that frequency; where it's near zero, that frequency is essentially absent.

Why Move to the Frequency Domain?

  • Simplifies complex signals — a messy time-domain waveform often turns out to be a small number of clean spectral peaks, immediately telling you which frequencies dominate.
  • Enables filtering — removing a frequency band means attenuating a region of the spectrum, which is a direct, visual operation.
  • Facilitates modulation analysis — AM, FM, and digital modulation schemes are naturally described by how they shift and shape a signal's spectrum around a carrier frequency.
  • Supports noise reduction — noise that is spread across frequencies, or concentrated at frequencies the signal doesn't occupy, is much easier to spot and remove spectrally than in a tangled time-domain trace.

The Family of Fourier Transforms

Not every signal is analyzed with the same flavor of Fourier transform — the choice depends on whether the signal is continuous or discrete, and whether it is stationary or changing over time.

  • Continuous-Time Fourier Transform (CTFT) — for continuous-time signals, X(f) = ∫ x(t) e^(-j2πft) dt. This is the theoretical, "ideal" version.
  • Discrete-Time Fourier Transform (DTFT) — for discrete-time (sampled) signals: X(e^(jω)) = Σ x[n] e^(-jωn). It produces a continuous spectrum from a discrete sequence.
  • Fast Fourier Transform (FFT) — not a different transform mathematically, but a highly efficient algorithm for computing a sampled version of the DTFT (technically the DFT). This is what numpy.fft and every real-time spectrum analyzer actually run.
  • Short-Time Fourier Transform (STFT) — applies the Fourier transform to short, overlapping windows of a signal, giving both time and frequency information. Essential for non-stationary signals like speech or music, where the frequency content itself changes over time.

Worked Example: Removing High-Frequency Noise

Suppose you have a 5 Hz signal contaminated with high-frequency noise, sampled at 500 Hz.

import numpy as np

fs = 500
t = np.arange(0, 1, 1/fs)
signal = np.sin(2 * np.pi * 5 * t)
noisy = signal + 0.5 * np.random.normal(size=t.shape)

# Move to the frequency domain
freqs = np.fft.rfftfreq(len(t), d=1/fs)
spectrum = np.fft.rfft(noisy)

# Zero out everything above 10 Hz (frequency-domain filtering = multiplying by a mask)
spectrum[np.abs(freqs) > 10] = 0

# Back to the time domain
filtered = np.fft.irfft(spectrum)

The key idea: spectrum[...] = 0 is exactly a low-pass filter, implemented as multiplication in the frequency domain. Doing the equivalent operation directly in time would require convolving the noisy signal with a filter's impulse response — a heavier, less intuitive calculation.

Real-World Applications

  • Audio engineering — equalizers boost or cut specific frequency bands directly on the spectrum.
  • Telecommunications — channel equalization and modulation schemes are designed and analyzed in the frequency domain.
  • Medical imaging — MRI raw data is actually acquired in a frequency-domain representation (k-space) and converted to an image via an inverse Fourier transform.
  • Seismology — frequency-domain analysis separates the dominant vibration frequencies of an earthquake from background noise.

Key Terms

TermDefinitionRelated Concept
Frequency domainRepresentation of a signal as amplitude/phase versus frequencySpectrum
Fourier transformMathematical operation decomposing a signal into its frequency componentsCTFT, DTFT
SpectrumThe set of frequency components and their magnitudes/phases for a signalMagnitude spectrum
CTFTFourier transform for continuous-time signalsX(f) = ∫x(t)e^(-j2πft)dt
DTFTFourier transform for discrete-time signalsX(e^(jω))
FFTFast algorithm for computing a sampled DTFT/DFTComputational efficiency
STFTFourier transform applied to short windows, giving time+frequency resolutionNon-stationary signals, spectrogram
Frequency-domain filteringAttenuating a signal's spectrum by multiplying it with a frequency maskConvolution (time-domain equivalent)

Common Mistakes

Misconception: The FFT is a fundamentally different transform from the Fourier transform. Why it's wrong: The FFT is simply a fast computational algorithm for evaluating the discrete Fourier transform (DFT); it computes the same mathematical result as a direct DFT, just far more efficiently for large sample sizes. Correct understanding: CTFT, DTFT, and DFT are the underlying mathematical transforms for different signal types; FFT is an implementation trick, not a separate theory.


Misconception: A signal's spectrum tells you everything about how the signal behaves over time. Why it's wrong: A standard Fourier transform gives frequency content averaged across the entire signal duration — it discards when each frequency occurred. Correct understanding: If timing of frequency changes matters (as in speech or music), you need the STFT or a similar time-frequency method, not a single full-length Fourier transform.


Misconception: Filtering in the frequency domain is "cheating" or less accurate than filtering in the time domain. Why it's wrong: Frequency-domain multiplication and time-domain convolution are mathematically equivalent operations — the Fourier transform of a convolution is the product of the Fourier transforms (the convolution theorem). Correct understanding: The two approaches give the same result; the frequency domain is simply more convenient to design and visualize the filter in.

Comparison and Connections

TransformSignal TypeOutputTypical Use
CTFTContinuous-timeContinuous spectrumTheoretical analysis
DTFTDiscrete-timeContinuous spectrum (periodic)Analyzing sampled signals
FFTDiscrete-time, finite lengthDiscrete spectrum (fast algorithm)Practical computation, real-time systems
STFTDiscrete-time, windowedTime-frequency map (spectrogram)Non-stationary signals: speech, music

Practice Questions

Recall

  1. Write the Fourier transform integral for a continuous-time signal and identify each term. Answer guidance: X(f) = ∫ x(t) e^(-j2πft) dt; x(t) is the time-domain signal, X(f) is its frequency-domain representation, f is frequency, t is time.

  2. Name the four Fourier transform variants covered and state which type of signal each applies to. Answer guidance: CTFT (continuous-time), DTFT (discrete-time), FFT (fast algorithm for computing DTFT/DFT on discrete-time signals), STFT (windowed transform for non-stationary signals, giving time+frequency information).

Understanding

  1. Explain why filtering is described as "multiplication" in the frequency domain but "convolution" in the time domain. Answer guidance: The convolution theorem states that convolving two signals in time is equivalent to multiplying their Fourier transforms in frequency. Since filtering is conceptually convolving a signal with a filter's impulse response, it appears as multiplication of spectra once both are transformed.

  2. Why is the STFT needed for analyzing speech, when a standard Fourier transform already gives frequency content? Answer guidance: Speech is non-stationary — its frequency content changes continuously as different sounds are spoken. A single full-signal Fourier transform averages this away, hiding when each frequency occurred. The STFT applies the transform to short windows, preserving a rough sense of time along with frequency.

Application

  1. You record a signal at 500 Hz sample rate and want to remove noise above 10 Hz. Describe the frequency-domain steps to do this, referencing the worked Python example. Answer guidance: Compute the FFT of the signal to get its spectrum, zero out (or attenuate) the spectral components at frequencies above 10 Hz, then apply the inverse FFT to return to the time domain — exactly as shown in the code example.

  2. An engineer needs to design an equalizer that boosts bass frequencies in a music track. Why is this task naturally suited to frequency-domain thinking? Answer guidance: Boosting "bass" means increasing the amplitude of a specific low-frequency band. In the frequency domain this is a direct, visual gain applied to that band of the spectrum; doing the equivalent in the time domain would require designing and convolving with a specific filter's impulse response.

Analysis

  1. Compare the information content of a standard FFT-based spectrum versus a spectrogram (STFT output) for a signal whose frequency changes over time, like a chirp. Answer guidance: A single FFT would show energy spread across the full range of frequencies the chirp swept through, without indicating the order or timing of those frequencies. A spectrogram shows frequency changing along a time axis, correctly revealing that the signal's frequency rises or falls over time.

  2. A student claims that once you have a signal's magnitude spectrum, you can perfectly reconstruct the original time-domain signal. Evaluate this claim. Answer guidance: False — the magnitude spectrum alone discards phase information. Reconstructing the exact original signal requires both magnitude and phase of the Fourier transform; two signals can have identical magnitude spectra but look completely different in time if their phases differ.

FAQ

Why don't we just always work in the frequency domain if it's so convenient? Because time information — when something happens, transient behavior, causality — matters for many tasks, and a standard Fourier transform (outside the STFT) discards or averages that timing information. Engineers move between domains depending on which one makes the current task easiest.

Is the frequency-domain representation of a signal unique? Yes, for a given signal and transform, X(f) is unique, and the inverse Fourier transform recovers x(t) exactly (given complete magnitude and phase information) — no information is lost in a well-posed forward-inverse transform pair.

What does a peak in a magnitude spectrum actually mean? It means the signal has a strong sinusoidal component at that frequency. The height of the peak reflects how much energy or amplitude that frequency component contributes to the overall signal.

Why does the FFT require a power-of-two length in some implementations? The classic radix-2 FFT algorithm is fastest when the signal length is a power of two, because it recursively splits the problem in half. Modern FFT libraries (like numpy.fft) handle arbitrary lengths efficiently too, though power-of-two lengths remain the most common convention.

Can frequency-domain analysis be applied to images, not just audio signals? Yes — the 2D Fourier transform decomposes an image into spatial frequency components (how rapidly brightness changes across the image), which is the basis for image filtering, compression (like JPEG), and pattern analysis.

Quick Revision

  • Frequency-domain analysis shows amplitude/phase versus frequency instead of versus time
  • X(f) = ∫ x(t) e^(-j2πft) dt is the continuous Fourier transform
  • CTFT handles continuous-time signals; DTFT handles discrete-time signals
  • FFT is a fast algorithm for computing the DFT — not a separate transform theory
  • STFT gives both time and frequency information, essential for non-stationary signals
  • Filtering = multiplication of spectra in frequency; = convolution of signals in time (convolution theorem)
  • A magnitude spectrum shows which frequencies are present and how strong they are, but not when they occurred (unless you use an STFT)
  • Magnitude alone cannot reconstruct a signal — phase information is also required
  • Frequency-domain thinking underlies equalization, modulation analysis, and MRI image reconstruction (k-space)
  • numpy.fft.rfft / irfft are the standard tools for real-valued signal spectral analysis in Python

Prerequisites: Time-Domain Analysis, Introduction to Signal Processing, complex exponentials

Related Topics: Fourier Transform, Digital Filters, Signal Sampling and Reconstruction

Next Topics: Fourier Transform, Digital Filters