h(t)
t>T
T
In practice, the impulse response, even of IIR systems, usually approaches zero and can be neglected past a certain point. However the physical systems which give rise to IIR or FIR responses are dissimilar, and therein lies the importance of the distinction. For instance, analog electronic filters composed of resistors, capacitors, and/or inductors (and perhaps linear amplifiers) are generally IIR filters. On the other hand, discrete-time filters (usually digital filters) based on a tapped delay line employing no feedback are necessarily FIR filters. The capacitors (or inductors) in the analog filter have a "memory" and their internal state never completely relaxes following an impulse (assuming the classical model of capacitors and inductors where quantum effects are ignored). But in the latter case, after an impulse has reached the end of the tapped delay line, the system has no further memory of that impulse and has returned to its initial state; its impulse response beyond that point is exactly zero.
Although almost all analog electronic filters are IIR, digital filters may be either IIR or FIR. The presence of feedback in the topology of a discrete-time filter (such as the block diagram shown below) generally creates an IIR response. The z domain transfer function of an IIR filter contains a non-trivial denominator, describing those feedback terms. The transfer function of an FIR filter, on the other hand, has only a numerator as expressed in the general form derived below. All of the
ai
i>0
The transfer functions pertaining to IIR analog electronic filters have been extensively studied and optimized for their amplitude and phase characteristics. These continuous-time filter functions are described in the Laplace domain. Desired solutions can be transferred to the case of discrete-time filters whose transfer functions are expressed in the z domain, through the use of certain mathematical techniques such as the bilinear transform, impulse invariance, or pole–zero matching method. Thus digital IIR filters can be based on well-known solutions for analog filters such as the Chebyshev filter, Butterworth filter, and elliptic filter, inheriting the characteristics of those solutions.
Digital filters are often described and implemented in terms of the difference equation that defines how the output signal is related to the input signal:
\begin{align} y[n]{}=&
1 | |
a0 |
(b0x[n]+b1x[n-1]+ … +bPx[n-P]\\ &{}-a1y[n-1]-a2y[n-2]- … -aQy[n-Q]) \end{align}
where:
P
bi
Q
ai
x[n]
y[n]
A more condensed form of the difference equation is:
y[n]=
1 | |
a0 |
P | |
\left(\sum | |
i=0 |
bix[n-i]-
Q | |
\sum | |
j=1 |
ajy[n-j]\right)
which, when rearranged, becomes:
Q | |
\sum | |
j=0 |
ajy[n-j]=
P | |
\sum | |
i=0 |
bix[n-i]
To find the transfer function of the filter, we first take the Z-transform of each side of the above equation, where we use the time-shift property to obtain:
Q | |
\sum | |
j=0 |
ajz-jY(z)=
P | |
\sum | |
i=0 |
biz-iX(z)
We define the transfer function to be:
\begin{align} H(z)&=
Y(z) | |
X(z) |
\\ &=
| ||||||||||
|
\end{align}
Considering that in most IIR filter designs coefficient
a0
H(z)=
| ||||||||||
|
The transfer function allows one to judge whether or not a system is bounded-input, bounded-output (BIBO) stable. To be specific, the BIBO stability criterion requires that the ROC of the system includes the unit circle. For example, for a causal system, all poles of the transfer function have to have an absolute value smaller than one. In other words, all poles must be located within a unit circle in the
z
The poles are defined as the values of
z
H(z)
0=
Q | |
\sum | |
j=0 |
ajz-j
Clearly, if
aj\ne0
z
IIR filters are sometimes preferred over FIR filters because an IIR filter can achieve a much sharper transition region roll-off than an FIR filter of the same order.
Let the transfer function
H(z)
H(z)=
B(z) | |
A(z) |
=
1 | |
1-az-1 |
governed by the parameter
a
0<|a|<1
H(z)
a
h(n)=anu(n)
where
u(n)
h(n)
n\ge0
The main advantage digital IIR filters have over FIR filters is their efficiency in implementation, in order to meet a specification in terms of passband, stopband, ripple, and/or roll-off. Such a set of specifications can be accomplished with a lower order (Q in the above formulae) IIR filter than would be required for an FIR filter meeting the same requirements. If implemented in a signal processor, this implies a correspondingly fewer number of calculations per time step; the computational savings is often of a rather large factor.
On the other hand, FIR filters can be easier to design, for instance, to match a particular frequency response requirement. This is particularly true when the requirement is not one of the usual cases (high-pass, low-pass, notch, etc.) which have been studied and optimized for analog filters. Also FIR filters can be easily made to be linear phase (constant group delay vs frequency)—a property that is not easily met using IIR filters and then only as an approximation (for instance with the Bessel filter). Another issue regarding digital IIR filters is the potential for limit cycle behavior when idle, due to the feedback system in conjunction with quantization.
Impulse invariance is a technique for designing discrete-time infinite-impulse-response (IIR) filters from continuous-time filters in which the impulse response of the continuous-time system is sampled to produce the impulse response of the discrete-time system. Impulse invariance is one of the commonly used methods to meet the two basic requirements of the mapping from the s-plane to the z-plane. This is obtained by solving the T(z) that has the same output value at the same sampling time as the analog filter, and it is only applicable when the inputs are in a pulse.
Note that all inputs of the digital filter generated by this method are approximate values, except for pulse inputs that are very accurate. This is the simplest IIR filter design method. It is the most accurate at low frequencies, so it is usually used in low-pass filters.
For Laplace transform or z-transform, the output after the transformation is just the input multiplied by the corresponding transformation function, T(s) or T(z). Y(s) and Y(z) are the converted output of input X(s) and input X(z), respectively.
Y(s)=T(s)X(s)
Y(z)=T(z)X(z)
Y(s)=T(s)
Y(z)=T(z)
y(t)=L-1[Y(s)]=L-1[T(s)]
y(n)=y(nT)=y(t)|t=sT
T(z)=Y(z)=Z[y(n)]
T(z)=Z[y(n)]=Z[y(nT)]
T(z)=Z\left\{L-1[T(s)]t=nT\right\}
T(z)=Z[T(s)]*T
Step invariance is a better design method than impulse invariant. The digital filter has several segments of input with different constants when sampling, which is composed of discrete steps. The step invariant IIR filter is less accurate than the same input step signal to the ADC. However, it is a better approximation for any input than the impulse invariant.
Step invariant solves the problem of the same sample values when T(z) and T(s) are both step inputs. The input to the digital filter is u(n), and the input to the analog filter is u(t). Apply z-transform and Laplace transform on these two inputs to obtain the converted output signal.
Perform z-transform on step input
Z[u(n)]=\dfrac{z}{z-1}
Y(z)=T(z)U(z)=T(z)\dfrac{z}{z-1}
L[u(t)]=\dfrac{1}{s}
Y(s)=T(s)U(s)=\dfrac{T(s)}{s}
T(z)=\dfrac{z-1}{z}Y(z)
T(z)=\dfrac{z-1}{z}Z[y(n)]
T(z)=\dfrac{z-1}{z}Z[Y(s)]
T(z)=\dfrac{z-1}{z}Z[\dfrac{T(s)}{s}]
The bilinear transform is a special case of a conformal mapping, often used to convert a transfer function
Ha(s)
Hd(z)
\begin{align} z&=esT\\ &=
esT/2 | |
e-sT/2 |
\\ & ≈
1+sT/2 | |
1-sT/2 |
\end{align}
where
T
s
s=(1/T)ln(z)
The inverse of this mapping (and its first-order bilinear approximation) is
\begin{align} s&=
1 | |
T |
ln(z)\\ &=
2 | \left[ | |
T |
z-1 | |
z+1 |
+
1 | |
3 |
\left(
z-1 | |
z+1 |
\right)3+
1 | |
5 |
\left(
z-1 | |
z+1 |
\right)5+
1 | |
7 |
\left(
z-1 | |
z+1 |
\right)7+ … \right]\\ & ≈
2 | |
T |
z-1 | |
z+1 |
\\ &=
2 | |
T |
1-z-1 | |
1+z-1 |
\end{align}
This relationship is used in the Laplace transfer function of any analog filter or the digital infinite impulse response (IIR) filter T(z) of the analog filter.
The bilinear transform essentially uses this first order approximation and substitutes into the continuous-time transfer function,
Ha(s)
s\leftarrow
2 | |
T |
z-1 | |
z+1 |
.
That is
Hd(z)=Ha(s)
| | |||||||||
|
=Ha\left(
2 | |
T |
z-1 | |
z+1 |
\right).