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 .
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.

Articles by others on the same topic (1)

Finite Impulse Response (FIR) refers to a type of digital filter used in signal processing. The defining characteristic of FIR filters is that their impulse response— the output of the filter when presented with an impulse input— is finite in duration. This means that the filter responds to an input signal and then settles to zero after a certain number of discrete time steps. ### Key Characteristics of FIR Filters: 1. **Finite Duration**: The output only relies on a finite number of input samples.