A linear filter obeys the superposition principle: filtering gives . Many familiar examples are also linear time-invariant systems, represented by an impulse response and convolution. Linearity alone does not imply time invariance: multiplying by the index is linear but changes its behavior when the same input is shifted.
The moving average is a finite impulse response example implemented by arithmetic; a band-pass filter can instead be built from a series RLC circuit. Their frequency responses explain which oscillations pass through. Choosing a filter means choosing how much amplitude, timing and detail may change, not simply removing every visible fluctuation.
A causal filter uses only present and past input values to produce its current output. The trailing moving average is causal; a centered average that uses future samples is not. Future samples can be available when processing a finished recording, but they are unavailable to a live measurement at the current time.
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 filterIt 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, letdefined 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 becomesThe remaining component is slightly smaller and delayed by two samples; the filter does not recover the original component unchanged.
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 hasThe 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.
A band-pass filter preferentially transmits signals within a range of frequencies and attenuates sufficiently lower and higher frequencies. Taking the output voltage across the resistor in a series RLC circuit gives one example: the resonant series RLC response selects a band around . [ref]
https://www.feynmanlectures.caltech.edu/II_22.html#Ch22-S7. Feynman lectures, II.22.7: resonant frequency filters
. Articles by others on the same topic
A linear filter is a mathematical operation applied to signals or images that processes the input data in a way that satisfies the principles of linearity. Linear filters are widely used in signal processing, image processing, and communications for various purposes including noise reduction, signal enhancement, and feature extraction.
