1. Home

Time and frequency

Signal Processing: Spectra, Filters, Windows and Sampling

Plaster model of upright bars of different heights, like a frequency spectrum, in a daylit gallery (AI-generated image)
AI-generated image

A sampled signal can be read in two ways: as values in time, or as a mix of frequencies. Signal processing is the craft of moving between the two views and doing the work in whichever is easier. This section collects the methods, from convolution to spectral windows, with examples small enough to compute by hand.

Filtering in the time domain

A linear filter is a convolution. Every output sample is a weighted sum of nearby input samples, and the weights are the filter’s impulse response. The page on convolution of vectors covers the forward operation, and deconvolution covers the inverse, where polynomial division recovers an input from a filtered output. The inverse direction is the delicate one. Noise is amplified at frequencies where the filter is weak, a point that returns in nearly every measurement application.

The frequency view

The discrete Fourier transform expresses N samples as N complex amplitudes. A direct evaluation needs on the order of N² multiplications, while the fast algorithm needs about N log N, which is the reason spectral methods are practical at all. The inverse discrete Fourier transform page shows the transform as a matrix and its inverse as the conjugate transpose divided by N, so nothing is lost in the round trip. Details such as where the zero frequency lands in the output array, and how long the transform should be, have pages of their own: the fftshift page for the first, the page on FFT lengths for the second.

Windows, sinc and leakage

A real recording is finite, which amounts to multiplying an endless signal by a rectangular window. The spectrum of that rectangle is the sinc function, and its slowly decaying side lobes smear strong components into their neighbors. Tapered windows such as the Blackman window trade a wider main lobe for far lower side lobes. The choice depends on the question: closely spaced tones favor a narrow main lobe, while a weak tone next to a strong one favors low side lobes.

Filters, noise and time series

Other pages in the section handle filter design, resampling by rational factors, additive noise models and axis bookkeeping for time and frequency. Longer records lead to statistical treatments such as time series analysis, and recursive estimators such as the Kalman filter appear in a worked example.

Reading order

A short route: convolution, then the transform and its inverse, then windows. Sampling rate sets everything. A signal must be sampled at more than twice its highest frequency, otherwise components fold back and cannot be told apart from lower ones. Keep that fact in mind when reading any spectrum.

Matrix tools underneath all this are described in linear algebra, and the glossary defines the vocabulary.

Questions about signal processing

What is the sampling rate needed to capture a signal?

The sampling rate must exceed twice the highest frequency present in the signal. This limit is called the Nyquist rate. If sampling is slower, higher frequencies fold back onto lower ones and cannot be separated afterward, so the signal is usually low-pass filtered before sampling to remove anything above half the rate.

Why are windows applied before a Fourier transform?

A transform assumes the data segment repeats forever. If the segment does not contain a whole number of cycles, the jump at the join smears energy across many frequency bins, which is called leakage. A window tapers the ends toward zero, trading a slightly wider peak for much lower side lobes.

What is the difference between convolution and correlation?

Convolution flips one sequence before sliding it across the other and summing products; correlation slides without flipping. Filtering a signal with an impulse response is a convolution. Correlation measures similarity at different shifts and is used to find delays or repeated patterns, so the two agree only when the kernel is symmetric.

Why does the FFT work best at certain lengths?

The fast algorithm splits the transform into smaller ones, and it is quickest when the length factors into small primes, with powers of two the classic case. Padding the signal with zeros up to the next suitable length is common. Padding adds no new information, though, and only interpolates the spectrum.

Back to top