Fiveable

🔌Intro to Electrical Engineering Unit 17 Review

QR code for Intro to Electrical Engineering practice questions

17.3 Convolution and correlation

17.3 Convolution and correlation

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🔌Intro to Electrical Engineering
Unit & Topic Study Guides

Convolution

Convolution Integral and Sum

Convolution is how you find the output of a linear time-invariant (LTI) system when you know two things: the input signal and the system's impulse response. The impulse response is simply what the system outputs when you feed it the shortest possible "spike" input.

For continuous-time systems, the convolution integral is:

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

where x(t)x(t) is the input signal and h(t)h(t) is the impulse response. That "spike" input is modeled as the Dirac delta function δ(t)\delta(t), an idealized pulse with infinite height, zero width, and an area of 1.

For discrete-time systems, the convolution sum does the same job:

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

Here the "spike" input is the Kronecker delta δ[n]\delta[n], which equals 1 at n=0n = 0 and 0 everywhere else.

In both cases, the idea is the same: you're building the output sample-by-sample (or point-by-point) by sliding the flipped impulse response across the input and summing up the overlapping products.

Convolution Integral and Sum, Circuit Theory/Convolution Integral - Wikibooks, open books for an open world

System Response and Impulse Response

If you know a system's impulse response h(t)h(t) (or h[n]h[n]), you know everything about how that LTI system behaves. Any input you throw at it can be broken into a collection of scaled, shifted impulses, and the output is the sum of the corresponding scaled, shifted impulse responses. That's exactly what the convolution operation computes.

This is why impulse responses matter so much in practice. Filters, equalizers, and control systems are all characterized by their impulse responses. Measure or design hh, and you can predict the output for any input.

Steps to compute convolution (graphical method):

  1. Write out x(τ)x(\tau) and h(τ)h(\tau).

  2. Flip h(τ)h(\tau) to get h(τ)h(-\tau).

  3. Shift the flipped version by tt to get h(tτ)h(t - \tau).

  4. Multiply x(τ)x(\tau) and h(tτ)h(t - \tau) together.

  5. Integrate (or sum, for discrete-time) the product over all τ\tau.

  6. Repeat for each value of tt you need.

Convolution Integral and Sum, Animated illustration of the convolution of two functions. | TikZ example

Correlation

Cross-Correlation and Auto-Correlation

While convolution asks "what does this system output?", correlation asks "how similar are these two signals?"

Cross-correlation measures the similarity between two signals as you slide one past the other in time. The continuous-time cross-correlation of x(t)x(t) and y(t)y(t) is:

Rxy(τ)=x(t)y(t+τ)dtR_{xy}(\tau) = \int_{-\infty}^{\infty} x(t) \, y(t + \tau) \, dt

The variable τ\tau is the lag, the time-shift applied to one signal. Where Rxy(τ)R_{xy}(\tau) peaks tells you the lag at which the two signals line up best. This is exactly how radar and sonar systems estimate the distance to a target: they transmit a pulse, receive the echo, and cross-correlate to find the time delay.

Auto-correlation is the cross-correlation of a signal with itself:

Rxx(τ)=x(t)x(t+τ)dtR_{xx}(\tau) = \int_{-\infty}^{\infty} x(t) \, x(t + \tau) \, dt

Auto-correlation always peaks at τ=0\tau = 0 (a signal is most similar to itself with no shift). Its real usefulness is in revealing repeating patterns. If a signal has a periodic component, the auto-correlation will show peaks at lags equal to the period. Applications include pitch detection in audio and identifying cyclic behavior in data.

Properties of Correlation

A few properties make correlation easier to work with:

  • Time-shifting: If you shift one of the input signals by some amount t0t_0, the cross-correlation function shifts by the same amount. The shape doesn't change, only where the peak lands.
  • Symmetry: Cross-correlation is not symmetric in general: Rxy(τ)=Ryx(τ)R_{xy}(\tau) = R_{yx}(-\tau). Swapping which signal you shift is the same as flipping the lag axis. Auto-correlation, however, is symmetric: Rxx(τ)=Rxx(τ)R_{xx}(\tau) = R_{xx}(-\tau).
  • Duality with convolution: Cross-correlation of xx and yy equals the convolution of xx with the time-reversed version of yy. This means you can compute correlation using the same fast algorithms built for convolution, including the Fast Fourier Transform (FFT). In the frequency domain, cross-correlation becomes Rxy(f)=X(f)Y(f)R_{xy}(f) = X(f) \cdot Y^*(f), where Y(f)Y^*(f) is the complex conjugate of Y(f)Y(f).

Convolution vs. Correlation at a glance: Convolution flips one signal then slides; correlation just slides. Convolution finds a system's output; correlation measures similarity between signals. They're closely related mathematically but answer different questions.