Interactive visualization of autocorrelation, cross-correlation, and matched filtering for signal processing education.
The autocorrelation Rxx[τ] = Σ x[n]·x[n+τ] measures the similarity of a signal with a delayed copy of itself. It reaches its maximum at τ=0 (equal to the signal energy), is symmetric Rxx[τ]=Rxx[-τ], and reveals periodicities hidden in noisy signals. The Wiener-Khinchin theorem connects it to the power spectrum: Sxx(ω) = FFT{Rxx[τ]}.
The cross-correlation Rxy[τ] = Σ x[n]·y[n+τ] measures similarity between two different signals as a function of delay. Unlike autocorrelation, it is not necessarily symmetric. Its peak location indicates the time offset between the two signals — essential for time-delay estimation, synchronization, and template matching.
The matched filter is the optimal linear filter for maximizing the signal-to-noise ratio (SNR) in the presence of additive white noise. It convolves the received signal with a time-reversed copy of the known template: y[n] = Σ r[m]·h[n-m] where h[n] = s[-n]. The output peaks at the correct delay, providing the best possible detection performance for a known signal shape.
Barker codes are binary sequences with excellent autocorrelation properties — the sidelobe level is at most 1 (or -1). Known Barker codes have lengths 2, 3, 4, 5, 7, 11, and 13. They are widely used in radar, sonar, and communications for pulse compression, where a long sequence is transmitted but the matched filter output produces a sharp peak, improving range resolution while maintaining energy.
Pulse compression transmits a long modulated pulse (chirp or coded) and compresses it at the receiver via matched filtering. This achieves the range resolution of a short pulse with the energy of a long pulse. The compression ratio equals the time-bandwidth product (BT). Linear FM chirps achieve compression through frequency sweep; phase-coded pulses use Barker or other codes.