FIR and IIR Filters
In questa pagina 4
Discrete-time filters are used in digital signal processing, hence the name digital filters (if the amplitudes are quantized). Two categories of discrete-time systems are analyzed:
- FIR: finite impulse response;
- IIR: infinite impulse response.
In general a discrete-time convolutional LTI system is fully described by an ARMA (auto-regressive moving average) model:
so discrete-time filters can be modeled via ARMA models. The design of a filter amounts to designing the coefficients .
FIR filters
If all are zero for , the filter is FIR. The difference equation is not even auto-regressive (MA only):
Redefine , so that . Applying the DTFT (the shift becomes the factor , see Discrete-Time Fourier TransformThe DTFT of an aperiodic discrete-time signal is the 2pi-periodic function X(e^{j theta}) = sum x(k) e^{-j theta k}; it is obtained as the envelope of the DFT of the N-periodic repetition when N tends to infinity, and has translation, modulation, convolution and Parseval properties.Discrete-Time Fourier Transform →):
The reason why it is called FIR: is defined over the bounded support .
Reminder: in continuous-time systems is replaced by (so that the polynomial in appears in ).
IIR filters
If a discrete-time filter is not FIR then it is IIR. Now there is auto-regression in the difference equation: for at least one (typically ), the full ARMA model
Applying the DTFT:
hence the frequency response of an IIR filter
(For FIR filters the denominator is after the normalization .)
Example 1: first-order IIR filter
The term makes it IIR. DTFT:
Impulse response (causal, for , ): , , , i.e. .
Is this really a filter? The modulus is , periodic of period . Low frequencies are and high frequencies are .
- : . If there is amplification; if there is attenuation.
- : . If there is attenuation; if there is amplification.
Case : has a maximum at and decreases towards : a low-pass filter. Case : has a minimum at and grows towards : a high-pass filter. In both cases a larger makes the shape sharper (curve more peaked around for , a narrower dip for ). For the dip at becomes very sharp: a notch filter.
|H| (0<a<1) |H| (-1<a<0)
^ /\ ^
| _/ \_ |--.__ __.--
|__./ \.__ | \__ __/
+------+------> theta +--------\__/-------> theta
-pi 0 pi -pi 0 pi
low-pass high-pass (notch if a -> -1)Example 2: moving average of order 1 (FIR)
A moving average of order 1, so it must be an FIR filter. DTFT:
- : .
- : .
So is an arch from at up to at : high frequencies are attenuated and low frequencies are preserved, hence a low-pass filter. The impulse response is
Remark. FIR filters can be implemented by storing in memory a finite number of values representing their impulse response. This is very advantageous from a computational point of view.
Exercise (homework). Analyze for . (Left as an exercise in the notes; no solution is given.)
Versione ripasso
- ARMA model: . Designing the filter = designing .
- FIR: for (MA only). , ; ; with bounded support . Cheap to implement (store finitely many values).
- IIR: some with (auto-regression): . Continuous-time analogue: .
- Example , : , ; , . : low-pass; : high-pass; : very sharp notch. Larger : sharper.
- Example : , at , at : low-pass FIR with for .
- Typical mistakes: calling a filter FIR when there is any term on the left with ; forgetting that must be read over with low frequencies near and high frequencies near .