Time and frequency
Signal Processing: Spectra, Filters, Windows and Sampling

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.
A Kalman Filter Worked Example
A scalar Kalman filter run by hand on three measurements, showing the gain, the update and the shrinking variance.
Additive White Gaussian Noise (AWGN)
Additive white Gaussian noise added to a signal at a target SNR in decibels, with the variance worked out for real and complex data.
Analog Filter Design: From Specs to Order and Cutoff
Analog low-pass filter design from passband and stopband specifications: order, cutoff and poles for a Butterworth response.
Blackman Window: Formula and Properties
The Blackman window tapers a data record to push spectral sidelobes down to about −58 dB, at the price of a wider main lobe.
Butterworth Polynomial: Coefficients and Poles
The Butterworth polynomial is built from poles spaced evenly on a half circle; coefficients for orders 1 to 4 are worked out.
Circular Shift of a Matrix (Shift Matrix)
A circular shift moves matrix rows or columns by a fixed amount, wrapping what falls off one end back onto the other.
conv2: Two-Dimensional Convolution
Two-dimensional convolution of a matrix with a kernel: output sizes, separable kernels, edge handling and a hand-checked example.
Convolution of Two Vectors
Convolution of vectors as a flip-and-slide sum, with output length, the polynomial view and a worked example.
Decibels: 20·log10 of an Amplitude Ratio
Converting amplitude and power ratios to decibels with 20·log10 and 10·log10, with worked values such as log10(20) and 20·log10(5).
Deconvolution Explained: Polynomial Division with a Worked Example
Deconvolution is polynomial division on coefficient vectors; a hand-worked example shows the quotient, the remainder and why noise ruins it.
fftshift and the Centered Spectrum
fftshift swaps the halves of an FFT output so zero frequency sits in the middle; the page shows the even and odd cases.
Frequency Axis for a Spectrum
Building the frequency vector that labels each FFT bin from the sampling rate and record length, one-sided or two-sided.
Gaussian Window: Formula and Choice of σ
The Gaussian window is a bell-shaped taper whose width is set by σ; its spectrum is also bell-shaped, with no oscillating sidelobes.
Image Processing With Matrices
A grayscale image is a matrix; blurring, sharpening and edge detection are convolutions of that matrix with small kernels.
Inverse Discrete Fourier Transform (IDFT Matrix)
The inverse discrete Fourier transform as a matrix: the conjugate of the DFT matrix divided by N, with a 4-point check.
Inverse Fast Fourier Transform (IFFT)
The inverse fast Fourier transform computes the IDFT in N log N operations, using the forward FFT plus a conjugation.
Kalman-Bucy Filtering: The Continuous-Time Kalman Filter
The Kalman-Bucy filter estimates a continuously evolving state from noisy measurements, using a gain from a matrix Riccati equation.
nextpow2 and FFT Lengths
nextpow2 gives the exponent of the next power of two; the page shows how to size FFT padding and work out values by hand.
Raised Cosine Filter: Roll-Off and Impulse Response
The raised cosine filter shapes pulses so neighboring symbols do not interfere; the page works out its band edges and impulse response.
Resampling by Rational Factors
Changing a sampling rate by a ratio of two integers: the upsample factor, the anti-aliasing filter and the downsample factor.
Signal Processing Functions: An Overview
A map of the core signal processing functions, grouped by task, with the order in which they usually appear in a workflow.
Statistical Time Series Analysis (STSA)
Statistical time series analysis studies random sequences through autocorrelation, spectra and autoregressive models.
The sinc Function: sinc(x)
The sinc function sin(πx)/(πx): its zeros, its limit at 0, a table of values, and its role in ideal low-pass filtering.
Time Axis for Sampled Signals
A time axis for sampled data: instants n/fs, duration N/fs, start offsets, and how the axis ties to the frequency spacing.