Finite impulse response 2026-10-13
A linear time-invariant system has finite impulse response when its impulse response is nonzero at only finitely many indices. For a causal filter supported at indices ,
This is a finite discrete convolution. The coefficients specify the complete operation; they need not be positive or equal. Such a filter has a simple bounded-input estimate, , so bounded inputs remain bounded. The moving average chooses .
Impulse response 2026-10-14
The impulse response records the response to a unit impulse, with specified initial or boundary conditions. In continuous time the impulse is a Dirac delta function; in discrete time it is the Kronecker delta . For a linear time-invariant system with zero initial state, the response to a general input is its convolution with the impulse response. The impulse response of a causal filter is zero before the impulse.
For the five-sample moving average, a discrete impulse produces at and zero otherwise. The response lasts five samples, so this is a finite impulse response system. Its frequency response is the finite sum of the five delayed phase contributions: one short input experiment determines how every sustained sinusoid is filtered.
Moving average 2026-10-14
A moving average replaces each value by an average over a moving window of neighboring values. The simple trailing version with positive integer window length is the causal filter
It is a finite impulse response linear time-invariant system. A constant input remains unchanged because the weights sum to one. Weighted and centered averages are other choices; the definition of the window determines both the weights and whether future values are needed.
For an exact five-sample example, let
defined at every integer index. The first component completes one cycle in forty samples and the second in five. Averaging five consecutive samples cancels the second component exactly. The first becomes
The remaining component is slightly smaller and delayed by two samples; the filter does not recover the original component unchanged.
Figure 1.
A five-sample moving average cancels one sinusoid while attenuating and delaying another
. Details.
The example is in steady operation: its early output values use the specified negative-index samples. Starting a device at with an unknown past requires an initialization rule. Treating earlier samples as zero, shortening the initial window, and postponing output until a full window is available produce different initial values.
For zero-mean uncorrelated random variables with common variance , the averaged disturbance has
The standard deviation decreases by , but successive filtered errors share samples and are generally correlated. This variance calculation also assumes the wanted component is not damaged by averaging. A rapidly changing feature can be suppressed along with the disturbance.
The frequency response explains the cancellation and limits of this method. A moving average preserves low frequencies comparatively well, yet its side lobes make it a poor substitute for a sharply selective frequency cutoff. Smith develops this time-domain versus frequency-domain distinction in The Scientist and Engineer's Guide to Digital Signal Processing, chapter 15: moving-average filters.