You are on page 1of 4

FIR vs.

IIR Filter
Michael Hraschan Matthias Viertler

AbstractIn this article we will discuss the advantage of FIR lter over IIR lter. Therefore we will sum up the properties of the already available IIR lter and compare them to the newly announced FIR lter. We will see, that each lter has its own characteristics, but that there are some differences between those two.

I. G ENERAL If we know the lter response, we can calculate the lters amplitude and phase behaviour. In General a lter gives us a certain response to a given input signal. In an digital system a signal consists of samples and each sample in the signal is a pulse. Therefore it is quite easy to calculate the lter response. With the known IIR lters, we had an input and received a (theoretically) innite number of output pulses. With the FIR lters described here, we get an nite number of response pulses. FIR lter gives us some advantages over IIR lter which we will describe later. II. IIR F ILTER A. General IIR stands for Innite Impulse Response. As mentioned above we get an output response with (theoretically) innite samples. The rational system function in the z-plane is: H (z ) =
M k k=0 bk z N k k=1 ak z

Fig. 1: Direct Form I - Can be obtained directly out of the difference equation
Source: http://zone.ni.com/reference/en-XX/help/371988C-01/ lvdfdtconcepts/iir direct specs/

1) Direct Form I: We get the Direct Form I, seen in gure 1, from the difference equation in equation 3. This is also the advantage of the Direct Form I: you can get it directly from the difference equation. 2) Direct Form II: The Direct Form II, seen in 2, is obtained by a series of a pole-lter and a zero-lter. The advantage of the DF-II is that it has less round-offnoise because only a part of the output is affected by the multiplication noise. IIR lter responses can be created with few coefcients comparing to FIR lter. This means, that for computing the output, less computer power is required than calculating the response with an FIR lter. 3) Parallel Form: Equation 1 can be written as a partial fraction expansion in the form
Np N1 k

(1)

where ak and bk are the lter coefcients, M the number of zeros and N the number of poles. From this system function we get the corresponding timedomain difference equation: y [n] = a1 y [n 1] + a2 y [n 2] + + ak y [n k ] + b0 x[n] + b1 x[n 1] + + bk x[n k ] We can see that the output of the IIR lter depends on previous input AND output samples. One problem with IIR lters is that they dont have a linear phase-characteristic, so they should be used in applications where linearity is not a big issue. Due to the fact that IIR lters have zeros and poles, a poorly designed lter could get unstable if the zeros and poles lie outside the unit circle. B. IIR system structures There are different ways to implement IIR lters: Direct Form I and II. (2)

H (z )

=
k=0 N2

Ck z

+
k=1

Ak + 1 ck z 1

(3)

k=1

Bk (1 ek z 1 ) 1 ) (1 dk z 1 )(1 d kz

where N = N1 + 2N2 . This form represents the system function as a parallel combination of 1st - and 2nd -order IIR system, with Np possible scaled delay paths. A basic concept of the parallel form is seen in gure 3. The parallel form works better with quantization effects, which will be discussed later.

equation. If we look at the system function in equation 1, which represents the system function for both direct forms, the sets of coefcients ak and bk are the ideal (inniteprecision) coefcients. If the coefcients get quantized, the system function changes to: H (z ) =
M k k=0 bk z N k kz k=1 a

(4)

Fig. 2: Direct Form II - Less round off noise through only part of output is leaded back
Source: http://zone.ni.com/reference/en-XX/help/371988C-01/ lvdfdtconcepts/iir direct specs/

Where a k and bk are the quantized coefcients a k = ak + ak and bk + bk with the quantization errors ak and bk . The poles and zeros of the system are the roots of the denumerator and numerator polynomials. With the quantization error, each pole and zero now gets affacted by all of the quantization errors in the denominator and numerator polynomials. Therefore small errors in the numerator or denumerator (and therefore for the poles and zeros) can cause large shifts of the poles and/or zeros. This can cause a major derivation from the original system design. The more zeros and poles a system has, the greater is the sensitivity to quantization errors. To reduce the effects of quantization on zeros and poles, direct forms should be avoided and insted the parallel form should be used because its much less sensitive to coefcient quantization than the equivalent direct form because the 2nd order subsystem in the parallel form is not extremely sensitive to quantization. D. Design methods Innite impulse response, or IIR, lters are the digital counterpart to analog lters. Design Methods are: 1) Bilinear Transform: The Bilinear Transform is a nonlinear mapping that maps a function of the complex variable s to a function of a complex variable z. A stable lter stays stable at this transform but the imaginary axis experiences a linear distortion.

Fig. 3: Parallel Form for IIR lter


Source: http://cnx.org/content/m11919/latest/

C. Quantization effects As mentioned before, an IIR system has poles and zeros. When the system is poorly designed, it may happen that the system is unstable. When the parameters of a IIR system are quantized, the poles and zeros of the system move to new positions in the z-plane. When the zeros and poles move, the system no longer meets the original design specications. And as mentioned before, the system even can get unstable. Its complicated to analyse the effects of coefcient quantization on the system. Powerful simulations could be used to simulate the quantization effects on the frequency-response. But sometimes its also useful to see how the system function is affected by quantization of the coefcients of the difference

2) Pronys Method: Similar to the Fourier transform, Pronys method extracts valuable information from a uniformly sampled signal and builds a series of damped complex exponentials or sinusoids. This allows for the estimation of frequency, amplitude, phase and damping components of a signal.

III. FIR F ILTER A. General The problem of IIR lters is, that they are not stable in every case. Therefore our idea is to reduce the system function to the nominator which means, there are no poles any more and so the system is always stable. This is because there is no possibility the system function will be innity. So the causal (realizable) FIR systems the system function has only zeros, except for poles with z = 0 and therefore all

C. Quantization effects In FIR systems, we only have to consider the zeros for quantization effects since all poles are at z = 0. In general, direct forms should be avoided for high-order IIR systems, but in FIR systems direct forms are commonly used. To analyse the effects of quantization on FIR systems, we express the system function for a direct form FIR system as:
M

Fig. 4: Tapped delay line structure - input is weighted by the coefcients


Source: http://cnx.org/content/m11919/latest/

H (z ) = coefcients ak in equation 1 are zero and we get:


M n=0

h[n]z n .

(7)

H [z ] =
k=0

bk z k

(5)

Now when we assume the coefcients h[n] get quantized, [n] = h[n] + h[n] (same which results in new coefcients h procedure as with IIR lters), the system function changes to:
M

and the corresponding time-domain difference equation:


M

(z ) = H
n=0

[n]z n = H (z ) + H (z ). h

(8)

y [n] =
k=0

bk x [ n k ]

(6)

where y[n] is the output signal of the lter at instant n, x[n] is the input signal at instant n, bk the lter coefcient - the impulse response from 0 to N instants, N- number of samples in the pulse response. We can see, that the output no longer depends on previous output samples, only on previous input samples. The output can be recognized as the discrete convolution of x[n] with the impulse response: bn 0 n = 0, 1, M otherwise

This means, that the system function (and therefore the frequency response) of the quantized system is linearly related to the quantization errors in the impulse-response coefcients. The system can be represented as an parallel system with the unquantized system and the error-system. D. Design methods To design a lter means to select the coefcients such that the system has specic characteristics. The required characteristics are stated in lter specications. Most of the time lter specications refer to the frequency response of the lter. There are different methods to nd the coefcients from frequency specications: 1) Window Design Method: The main idea behind the Window Design Method is to consider an ideal IIR lter and then apply a window function to it. This is - in time domain - a multiplication of the innite impulse by the window function. This results in the frequency response of the IIR being convolved with the frequency response of the window function thus the imperfections of the FIR lter (compared to the ideal IIR lter) can be understood in terms of the frequency response of the window function. 2) Frequency Sampling Method: Given a desired frequency response, the frequency sampling design method designs a lter with a frequency response exactly equal to the desired response at a particular set of frequencies. E. Fast Convolution All fast convolution algorithms have in common, that they calculate linear convolution efciently in the frequencydomain, by simple multiplication of discrete Fourier spectra, known as circular convolution. The term fast is reasoned by the Fast Fourier Transform (FFT) used to convert between the time- and frequencydomain.

h[n] =

We can see now, that the because of the fact, that the output only depends on the previous input samples, we get an nite impulse response from our lter. Therefore this lter is called Finite Impulse Response Filter (FIR). Because of the fact, that we have a nite impulse response, we can easier get an linear phase-characteristic because we can easily make the coefcient sequence symmetric around the center coefcient. FIR lters are generally designed to be linear-phase, so they should be used in applications where a linear phasecharacteristic is required. We obtain linear phase characteristic by making the coefcient sequence symmetric around the center coefcient. That means the rst coefcient is the same as the last, the second is the same as the second to last etc. The only problem with FIR lters is that we require more memory than with IIR lters, because FIR lters are not recursive and therefore they need more coefcients than IIR lters. This also leads to a longer computation delay.

B. Direct Forms The FIR direct form is called tapped delay line structure because of the chain of delay elements at the top of the diagram (see 4).

IV. M INIMUM PHASE An LTI system is considered stable and causal when all poles are inside the unit circle. But the stability and causability dont have any restrictions on the zeros of the system. For certain problems it is useful to analyse the inverse system function ( H1 (z ) ) and look at the zeros and poles. When the poles and zeros of the system function lie within the unit circle, the poles and zeros of the inverse system function also remain in the unit circle (poles become the zeros of the system). Those system are called minimum phase systems. The main difference between the minimum phase characteristic of FIR and IIR lter is, that with FIR lter you dont have to care about the poles, because they are at z = 0. V. C OMPARISION A comparision between IIR and FIR is in table I
IIR Depend on previous input and output samples Dont have linear-phase characteristics Used where linear-phase is not a big issue FIR Depend on previous input samples Have linear-phase characteristics Used where linear-phase is needed Good delay characteristics Require more memory only has zeros Easier to implement

Has zeros and poles Complex to implement

TABLE I: Comparision between FIR and IIR VI. C ONCLUSION In conclusion we can say, IIR lters should be used when a linear-phase is not a big issue. Theyre harder to design but therefore more efcient to compute. FIR lters should always be used, when linear phase is inevitable. FIR lters are also easier to design but are less efcient. R EFERENCES
[1] A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed. Upper Saddle River, New Jersey: Prentice-Hall, 2009. [2] Hamming, R. W., Digital Filters Dover Pubn Inc, 1997. [3] Gold, B. and Rader, C. M., Digital Processing of Signals. McGrawHill, 1969. [4] Bateman, A. and Paterson-Stephens, I., The DSP Handbook: Algorithms, Applications and Design Techniques. Addison-Wesley Longman, 2001.

You might also like