Categorizing Filters By Their Memory of Past Data
This page describes digital filter terminology and the categorization of filters by how much past data they remember. This page is part of the section on Filtering that is part of A Guide to Fault Detection and Diagnosis..
Filtering notation
This section is concerned with discrete time systems, that is, systems described by variables that are sampled at discrete points in time. The sampling time is indicated with integers k, k1, k2, ... representing the current time, the previous sample time, the sample time before that, and so on.
A filter takes an input signal x over time, processes it, and produces a filtered output signal y. The value of the input variable x sampled at a time k is written x(k), and the filter output generated at time k is written as y(k) . The filter output may depend on current and some previous values of x. These are indicated as x(k), x(k1), ... . Filter implementations store previous values of inputs or outputs in memory, depending on the type of filter.
“Autoregressive” (AR) / “Moving Average” (MA) terminology
In the terminology of time series analysis, two major filter categories are autoregressive (AR) and moving average (MA).
Moving average filters depend only on the current and previous inputs x(k), x(k1), ..., not their outputs y(k), y(k1), ... . For a linear moving average filter, the output is a weighted sum of a set of recent inputs. The most familiar “simple moving average” discussed later has equal weights (whose sum equals 1.0), but there are many variations using different weights.
Autoregressive filters such as the exponential filter discussed later depend on previous output values y(k), y(k1), ... , as well as the current input value x(k).
Filters that use both previous inputs and outputs are called, not surprisingly, ARMA filters.
“Infinite Impulse Response” (IIR) / “Finite Impulse Response” (FIR) terminology
Electrical engineers use a different terminology, based on the response to an “impulse” input, which is the theoretical limiting case of a very brief spike in the value of the input. An autoregressive filter is called an “Infinite Impulse Response (IIR) filter. A moving average filter is called a “Finite Impulse Response” (FIR) filter.
The viewpoint implied by this terminology is useful because it emphasizes the finite vs. infinite “memory” of a filter: how long the effects last after a change in input. In the case of a moving average filter based on n input samples, input values older than the n sampled values have no effect on the calculation. In other words, the older data is completely forgotten  hence the name “finite impulse response”. You can also think of this as “finite memory”. In the case of an autoregressive filter, because of the feedback from output back to input, the effects in theory last forever. In IIR filters such as the exponential filter, the effect of an old sampled input decays exponentially over time. In reality, after some time, the effect of an old input falls below the precision of the displays or of the fixedlength computational precision, so the memory doesn’t really last for an “infinite” time in actual implementation. In any case, this “infinite” memory isn’t usually that noticeable because the input variables do change in real applications.
Ironically enough, typical ”infinite” memory filters like the exponential filter don’t need as much computer memory as their finite (moving average) counterparts  it’s the feedback from output back to input that retains the effects of an old input.
Copyright 2010  2013, Greg Stanley
Return to Filtering Next: Aliasing
Return to A Guide to Fault Detection and Diagnosis
