Fiveable

🔀Stochastic Processes Unit 12 Review

QR code for Stochastic Processes practice questions

12.2 Signal processing

12.2 Signal processing

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🔀Stochastic Processes
Unit & Topic Study Guides

Signal processing extracts, manipulates, and enhances information carried by signals. Within the study of stochastic processes, it provides the tools for dealing with real-world signals that are inherently noisy and random. This topic covers time and frequency domain analysis, LTI systems, sampling, filtering, spectral estimation, and noise reduction.

Fundamentals of signal processing

Signal processing is the analysis, manipulation, and interpretation of signals to pull out meaningful information or improve signal quality. A signal is any quantity that varies over time, space, or some other independent variable and carries information.

Signals fall into a few categories:

  • Continuous-time vs. discrete-time: continuous signals are defined for every instant (like a voltage from a microphone), while discrete signals exist only at specific time indices (like samples stored in a computer)
  • Analog vs. digital: analog signals have continuous amplitude values, while digital signals have both discrete time and discrete amplitude (after quantization)

These techniques show up across telecommunications, audio/video processing, biomedical engineering, and radar systems.

Signals in time and frequency domains

Time domain representation

The time domain represents a signal as a function of time: x(t)x(t) for continuous-time signals or x[n]x[n] for discrete-time signals. This view directly shows amplitude, duration, and how the signal evolves moment to moment.

The time domain is your go-to for analyzing transient behavior, locating peaks, and performing operations like time shifting or scaling.

Frequency domain representation

The frequency domain represents a signal as a function of frequency: X(f)X(f) for continuous-time signals or X(ω)X(\omega) for discrete-time signals. Instead of showing when things happen, it shows what frequencies are present and their magnitudes and phases.

This representation is essential for understanding periodic behavior, designing filters, and performing modulation. Many problems that look complicated in the time domain become straightforward in the frequency domain.

Fourier transform

The Fourier transform converts a time-domain signal into its frequency-domain representation. For a continuous-time signal:

X(f)=x(t)ej2πftdtX(f) = \int_{-\infty}^{\infty} x(t) e^{-j2\pi ft} dt

Think of it as decomposing a signal into a sum of sinusoids at different frequencies. Each frequency component gets a complex coefficient that encodes both magnitude and phase.

Inverse Fourier transform

The inverse Fourier transform goes the other direction, reconstructing the time-domain signal from its frequency components:

x(t)=X(f)ej2πftdfx(t) = \int_{-\infty}^{\infty} X(f) e^{j2\pi ft} df

The forward and inverse transforms form a pair. No information is lost in either direction, so you can freely move between domains depending on which makes your problem easier to solve.

Linear time-invariant (LTI) systems

An LTI system has two defining properties: linearity (superposition holds) and time-invariance (shifting the input in time shifts the output by the same amount). These constraints are powerful because they make the system fully characterizable by a single function.

Impulse response

The impulse response h(t)h(t) (or h[n]h[n] for discrete-time) is the output of an LTI system when the input is a unit impulse. It completely describes the system's behavior. Once you know h(t)h(t), you can determine the output for any input using convolution.

Convolution

Convolution combines an input signal with the system's impulse response to produce the output. For continuous-time systems:

y(t)=x(τ)h(tτ)dτy(t) = \int_{-\infty}^{\infty} x(\tau) h(t-\tau) \, d\tau

For discrete-time systems:

y[n]=k=x[k]h[nk]y[n] = \sum_{k=-\infty}^{\infty} x[k] \, h[n-k]

The key intuition: convolution weights each past input value by the impulse response, then sums the contributions. In the frequency domain, convolution becomes simple multiplication: Y(f)=X(f)H(f)Y(f) = X(f) \cdot H(f). This is one of the main reasons we work in the frequency domain.

Transfer function

The transfer function H(f)H(f) is the Fourier transform of the impulse response:

H(f)=h(t)ej2πftdtH(f) = \int_{-\infty}^{\infty} h(t) e^{-j2\pi ft} dt

It tells you how the system amplifies or attenuates each frequency. For discrete-time systems, the analogous tool is the Z-transform, giving H(z)H(z).

Stability and causality

  • Stability (BIBO): a bounded input always produces a bounded output. For an LTI system, this requires h(t)dt<\int_{-\infty}^{\infty} |h(t)| \, dt < \infty (the impulse response is absolutely integrable).
  • Causality: the output at time tt depends only on current and past inputs, meaning h(t)=0h(t) = 0 for t<0t < 0.

Both properties are necessary for any system you want to implement in real time.

Sampling and quantization

Sampling theorem

The Nyquist-Shannon sampling theorem states that a continuous-time signal can be perfectly reconstructed from its samples if the sampling frequency fsf_s is at least twice the highest frequency component fmaxf_{max} in the signal:

fs2fmaxf_s \geq 2 f_{max}

The minimum rate 2fmax2f_{max} is called the Nyquist rate. For example, audio signals with bandwidth up to 20 kHz require a sampling rate of at least 40 kHz (CD audio uses 44.1 kHz).

Aliasing

Aliasing occurs when you sample below the Nyquist rate. High-frequency components "fold" into lower frequencies and become indistinguishable from them. Once aliasing happens, the distortion is irreversible in the sampled data.

Prevention strategies:

  • Sample at a rate well above the Nyquist rate
  • Apply an anti-aliasing filter (a low-pass filter) before sampling to remove frequency content above fs/2f_s/2

Quantization error

Quantization maps continuous amplitude values to a finite set of discrete levels. This introduces quantization noise, which is the difference between the true sample value and its quantized representation.

  • More quantization levels (more bits) means smaller error. Each additional bit roughly adds 6 dB of SNR.
  • Non-uniform quantization (companding), used in telephony, allocates finer levels where the signal is most likely to be, reducing perceptual error.
Time domain representation, 9. Signals, Sampling & Filtering

Analog-to-digital conversion

Converting an analog signal to digital involves two steps in sequence:

  1. Sampling: capture the signal value at regular intervals (rate fsf_s)
  2. Quantization: round each sample to the nearest discrete level and encode it as a binary number

ADCs perform this in hardware and are found in audio recording, digital communications, sensor systems, and more.

Digital-to-analog conversion

DACs reverse the process, turning a stream of digital samples back into a continuous analog signal. This involves:

  1. Converting each digital code to an analog voltage or current
  2. Interpolation and reconstruction filtering to smooth the staircase-like output into a continuous waveform

Applications include audio playback, signal generators, and display systems.

Discrete-time signals and systems

Discrete-time Fourier transform (DTFT)

The DTFT extends the Fourier transform to discrete-time signals, mapping them to a continuous frequency variable ω\omega:

X(ω)=n=x[n]ejωnX(\omega) = \sum_{n=-\infty}^{\infty} x[n] \, e^{-j\omega n}

The result is periodic with period 2π2\pi. The DTFT is useful for theoretical analysis of discrete-time systems but requires an infinite-length signal, so it's not directly computable in practice.

Discrete Fourier transform (DFT)

The DFT handles finite-length signals of NN samples, producing NN frequency-domain values:

X[k]=n=0N1x[n]ej2πNkn,k=0,1,,N1X[k] = \sum_{n=0}^{N-1} x[n] \, e^{-j\frac{2\pi}{N}kn}, \quad k = 0, 1, \ldots, N-1

The DFT samples the DTFT at NN equally spaced frequencies. It's the workhorse of practical spectral analysis, filtering, and data compression.

Fast Fourier transform (FFT)

The FFT is an algorithm that computes the DFT efficiently, reducing complexity from O(N2)O(N^2) to O(NlogN)O(N \log N). It exploits symmetry and periodicity in the complex exponentials to eliminate redundant calculations.

For a signal with N=1024N = 1024 samples, the FFT requires roughly 10,000 operations instead of about 1,000,000. This speedup makes real-time spectral analysis feasible in audio, radar, and communications.

Z-transform

The Z-transform generalizes the DTFT by extending the frequency variable to the complex plane:

X(z)=n=x[n]znX(z) = \sum_{n=-\infty}^{\infty} x[n] \, z^{-n}

where zz is a complex variable. The DTFT is a special case obtained by evaluating on the unit circle (z=ejωz = e^{j\omega}).

The Z-transform is the primary tool for analyzing stability, causality, and frequency response of discrete-time systems. Poles inside the unit circle correspond to a stable system; poles outside indicate instability.

Filtering techniques

Low-pass filters

Low-pass filters pass frequencies below a cutoff frequency and attenuate those above it. They're used for removing high-frequency noise, smoothing signals, and extracting slow trends.

An ideal low-pass filter has a perfectly rectangular frequency response (instant transition from passband to stopband), but real filters have a gradual transition band. Common designs include Butterworth (maximally flat passband) and Chebyshev (sharper rolloff but with passband ripple).

High-pass filters

High-pass filters do the opposite: they pass high frequencies and attenuate low ones. They're useful for removing DC offset, baseline drift (common in biomedical signals), and low-frequency noise.

Band-pass filters

Band-pass filters allow only a specific range of frequencies through. They isolate signals of interest within a particular band, such as a single communication channel or a specific EEG rhythm. You can construct one by cascading a low-pass and a high-pass filter, or use dedicated design methods.

Band-stop filters

Band-stop (notch) filters attenuate a narrow range of frequencies while passing everything else. A classic application is removing 50/60 Hz power line interference from biomedical recordings. Elliptic filter designs are often used when a very narrow stopband is needed.

FIR vs IIR filters

PropertyFIRIIR
Impulse responseFinite durationInfinite duration
StabilityAlways stable (no feedback)Can be unstable if poles are outside the unit circle
Phase responseCan achieve exact linear phaseGenerally nonlinear phase
EfficiencyNeeds more coefficients for sharp cutoffsAchieves sharp selectivity with fewer coefficients

FIR filters are preferred when linear phase is critical (e.g., data communications, audio crossovers). IIR filters are preferred when computational efficiency matters and some phase distortion is acceptable. The choice depends on the application's requirements for stability, phase, and complexity.

Spectral analysis

Spectral analysis estimates how a signal's power is distributed across frequency. This is especially important for stochastic signals, where individual realizations differ but the statistical frequency content is stable.

Time domain representation, discrete signals - Amplitude and phase spectrum in MATLAB - Signal Processing Stack Exchange

Power spectral density (PSD)

The PSD describes power per unit frequency. It's defined as the Fourier transform of the autocorrelation function (the Wiener-Khinchin theorem):

Sxx(f)=Rxx(τ)ej2πfτdτS_{xx}(f) = \int_{-\infty}^{\infty} R_{xx}(\tau) \, e^{-j2\pi f\tau} d\tau

For discrete-time signals:

Sxx(ω)=m=Rxx[m]ejωmS_{xx}(\omega) = \sum_{m=-\infty}^{\infty} R_{xx}[m] \, e^{-j\omega m}

The connection to stochastic processes is direct: the autocorrelation function RxxR_{xx} characterizes the second-order statistics of a random process, and the PSD shows the same information in the frequency domain.

Periodogram

The periodogram estimates the PSD from a finite data segment by computing:

S^xx[k]=1NX[k]2\hat{S}_{xx}[k] = \frac{1}{N} |X[k]|^2

where X[k]X[k] is the DFT of the data. The periodogram is simple but has two problems:

  • High variance: the estimate doesn't get smoother as you collect more data in a single segment
  • Spectral leakage: the finite observation window causes energy to "leak" from one frequency bin into neighbors

Applying a window function (Hamming, Hann, Blackman) before computing the DFT reduces spectral leakage at the cost of slightly reduced frequency resolution.

Welch's method

Welch's method improves on the periodogram by averaging:

  1. Divide the signal into overlapping segments (typically 50% overlap)
  2. Apply a window function to each segment
  3. Compute the periodogram of each windowed segment
  4. Average all the periodograms

This reduces variance at the expense of frequency resolution (shorter segments mean coarser resolution). Welch's method is the standard approach in practice for vibration analysis, speech processing, and general spectral estimation.

Spectrograms

A spectrogram is a time-frequency representation that shows how spectral content evolves over time. It's computed using the Short-Time Fourier Transform (STFT): slide a window along the signal, compute the DFT within each window position, and stack the results.

The output is a 2D plot: time on the x-axis, frequency on the y-axis, and color/intensity representing power. Spectrograms are essential for analyzing non-stationary signals like speech, music, bird calls, and seismic events.

There's a fundamental trade-off: a longer window gives better frequency resolution but worse time resolution, and vice versa. This is a consequence of the uncertainty principle.

Noise reduction and signal enhancement

Signal-to-noise ratio (SNR)

SNR measures the strength of the desired signal relative to background noise:

SNR=PsignalPnoise\text{SNR} = \frac{P_{\text{signal}}}{P_{\text{noise}}}

Often expressed in decibels: SNR (dB)=10log10(PsignalPnoise)\text{SNR (dB)} = 10 \log_{10}\left(\frac{P_{\text{signal}}}{P_{\text{noise}}}\right)

An SNR of 20 dB means the signal power is 100 times the noise power. Most noise reduction techniques aim to increase the SNR.

Wiener filtering

The Wiener filter is the optimal linear filter in the minimum mean square error (MMSE) sense. Its frequency-domain form is:

HW(f)=Sxx(f)Sxx(f)+Snn(f)H_W(f) = \frac{S_{xx}(f)}{S_{xx}(f) + S_{nn}(f)}

where Sxx(f)S_{xx}(f) is the signal PSD and Snn(f)S_{nn}(f) is the noise PSD. At frequencies where the signal dominates (high SNR), the filter passes the signal through. At frequencies where noise dominates (low SNR), the filter attenuates.

The catch: you need to know (or estimate) both the signal and noise power spectra. Applications include speech enhancement, image denoising, and channel equalization.

Kalman filtering

The Kalman filter is a recursive algorithm that estimates the state of a dynamic system from noisy measurements. It operates in a predict-update cycle:

  1. Predict: use the system model to project the current state estimate forward in time
  2. Update: incorporate the new measurement, weighting it against the prediction based on their respective uncertainties

The Kalman filter is optimal for linear systems with Gaussian noise. It's widely used in navigation (GPS), target tracking, and biomedical signal processing. For nonlinear systems, extensions like the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) are used.

Adaptive filtering

Adaptive filters adjust their coefficients in real time based on an error signal, making them suitable for environments where signal or noise characteristics change over time.

Common algorithms:

  • LMS (Least Mean Squares): simple, low computational cost, but slower convergence
  • RLS (Recursive Least Squares): faster convergence but higher computational cost

Applications include echo cancellation in phone calls, active noise cancellation in headphones, and system identification where the system's characteristics are unknown or drifting.

Applications of signal processing

Audio and speech processing

Speech and audio processing relies heavily on spectral analysis. Key techniques include linear predictive coding (LPC) for modeling the vocal tract and mel-frequency cepstral coefficients (MFCCs) for feature extraction in speech recognition. Applications span virtual assistants, audio compression (MP3, AAC), noise-canceling headphones, and music production.

Image and video processing

Images are 2D signals, and many of the same principles apply. Spatial filtering, the 2D Fourier transform, and motion estimation are core tools. Applications include digital photography, medical imaging (CT, MRI reconstruction), video compression (H.264, H.265), surveillance, and computer vision.

Biomedical signal processing

Biological signals like ECG (heart), EEG (brain), and EMG (muscle) are noisy, non-stationary, and often low-amplitude. Time-frequency analysis, adaptive filtering, and pattern recognition are used to extract clinically useful information. Applications include heart rate monitoring, seizure detection, brain-computer interfaces, and prosthetic control.

Radar and sonar signal processing

Radar and sonar systems transmit signals and analyze the reflections to detect and locate targets. Key techniques include pulse compression (improving range resolution), Doppler processing (measuring target velocity), and beamforming (steering the sensor array's sensitivity pattern). Applications range from air traffic control and weather radar to submarine detection and geophysical exploration.