Sei sulla pagina 1di 61

Dept of BME, KUET Sub: BME 3111 1

Design of Infinite Impulse


Response (IIR) filters
Basic features of IIR filters
Dept of BME, KUET Sub: BME 3111 2

• Realizable IIR digital filters are characterized by the following recursive


equation:

where
h(k)= Impulse response of the filter which is theoretically infinite in duration,
ak and bk = The coefficients of the filter
x(n) = Input to the filter and
y(n) = Output to the filter
• IIR filter is a feedback system
• The transfer function
Basic features of IIR filters
Dept of BME, KUET Sub: BME 3111 3

• The transfer function of the IIR filter, H (z), can be factored as

• Zeros: Z1 Z2, ... are the zeros of H(z), that is those values of Z for which H(z) becomes zero.
• Poles: P1 P2, ... are the poles of H(z), that is values of z for which H(z) is infinite.

• A plot of the poles and zeros of the transfer function is known as the pole-zero
diagram and provides a very useful way of representing and analysing the filter
in the complex z-plane
Basic features of IIR filters
Dept of BME, KUET Sub: BME 3111 4

• IIR filter normally requires fewer coefficients than an FIR filter for the same set
of specifications, that is why IIR filters are used when sharp cutoff and high
throughput are the important requirements.
Design stages for digital IIR filters
Dept of BME, KUET Sub: BME 3111 5

• The design of IIR filters can be conveniently broken down into five main stages
1. Filter specification: Function of the filter (for example, lowpass) and the desired
performance.
2. Approximation or coefficient calculation: calculate the values of the coefficients, ak
and bk, in the transfer function, H(z), such that the specifications given in stage 1 are
satisfied.
3. Realization: Typical structures for IIR filters are parallel and cascade of second and/or
first-order filter sections
4. Analysis of finite word length effect
5. Implementation: It involves building the hardware and/or writing the software codes,
and carrying out the actual filtering operation
Design stages for digital IIR filters
Dept of BME, KUET Sub: BME 3111 6
Stage 1: performance specification
Dept of BME, KUET Sub: BME 3111 7

the design of digital IIR filters starts with an explicit specification of the
performance requirements.
• (i) signal characteristics (types of signal sources and sinks, I/O interface, data rates and
wordlengths, and frequencies of interest),
• (ii) the frequency response characteristics of the filter (the desired amplitude and/or
phase responses and their tolerances (if any), the speed of operation),
• (iii) the manner of implementation (for example, as a high level language routine in a
computer or as a DSP processor-based system, choice of signal processor, modes of
filtering (real-time or batch)), and
• (iv) other design constraints (such as costs and permissible signal degradation through
the filter).
In general, most of the above requirements are application dependent.
Stage 1: performance specification
Dept of BME, KUET Sub: BME 3111 8

• Tolerance scheme:

• Passband ripple in decibels

• Stopband attenuation in decibels


8.2
Stage 2: Calculation of IIR filter coefficients
Dept of BME, KUET Sub: BME 3111 9

• The task at this stage is to select one of a number of approximation methods


and calculate the values of the coefficients, ak and bk in such that the filter
specifications given in stage 1 are satisfied
• A simple way to obtain the IIR filter coefficients is to place poles and zeros judiciously in
the z-plane such that the resulting filter has the desired frequency response. This
approach is only useful for very simple filters, for example notch filtering.
1. Pole-Zero placement
• A more efficient approach is first to design an analogue filter satisfying the desired
specifications and then to convert it into an equivalent digital filter. Most digital IIR filters
are designed this way
2. Impulse Invariant
3. Matched z-transform
4. Bilinear z-transform
Pole-zero placement method
Dept of BME, KUET Sub: BME 3111 10

• When a zero is placed at a given point on the z-plane, the frequency response
will be zero at the corresponding point.

• A pole on the other hand


produces a peak at the
corresponding frequency
point; see Figure 8.3.
• Poles that are close to the
unit circle give rise to large
peaks 8.3

• zeros close to or on the circle produce troughs or minima.


Pole-zero placement method
Dept of BME, KUET Sub: BME 3111 11

• Thus, by strategically placing poles and zeros on the z-plane, we can obtain
simple lowpass, or other frequency selective, filters
• An important point to bear in mind is that for the coefficients of the filter to be
real, the poles and zeros must either be real (that is lie on the positive or
negative real axes) or occur in complex conjugate pairs
Example 8.1
Dept of BME, KUET Sub: BME 3111 12

Solution
• First, we must determine where to place the poles and zeros on the z-plane.
• Placing zeros
• Since complete signal rejection at dc i.e. 0 and 250 Hz; we need to place zeros at
corresponding points on the z-plane
• These are at angles of 0° and 360°x 250/500 = 180° on the unit circle
Example 8.1
Dept of BME, KUET Sub: BME 3111 13

• Placing poles
Angle
• To have the passband centred at 125 Hz requires us to place poles at ±360° x 125/500 =
±90°.
• To ensure that the coefficients are real, it is necessary to have a complex conjugate pole
pair
Location of pole in the unit circle
• The radius, r, of the poles is determined by the desired bandwidth
• An approximate relationship between r, for r > 0.9, and bandwidth, bw, is given by

• Here bw= 10Hz and Fs = 500 Hz


𝟏𝟎
𝒓=𝟏− 𝝅 = 𝟎. 𝟗𝟑𝟕
𝟓𝟎𝟎
Example 8.1

Dept of BME, KUET Sub: BME 3111 14

8.4

• From the pole-zero diagram, the transfer function can be written down by
inspection
Example 8.1
Dept of BME, KUET Sub: BME 3111 15

• The difference equation is

• Comparing the transfer function, H(z) with the general IIR equation, we find
that the filter is a second-order section with the following coefficients.
Assignment
Dept of BME, KUET Sub: BME 3111 16

• Due date next class on Tuesday 03 April 2018


Example 8.2
Impulse Invariant method of coefficient calculation
Dept of BME, KUET Sub: BME 3111 17

• In this method, starting with a suitable analogue transfer function, H(s), the
impulse response, h(t), is obtained using the Laplace transform.
• The h(t) so obtained is suitably sampled to produce h(nT), and
• The desired transfer function, H(z), is then obtained by z-transforming h(nT),
where T is the sampling interval.
Summery of impulse invariant method
Dept of BME, KUET Sub: BME 3111 18

1. Determine a normalized analogue filter, H(s), that satisfies the specifications


for the desired digital filter
2. If necessary, expand H(s) using partial fractions to simplify the next step
3. Obtain the z-transform of each partial fraction
4. Obtain H(z) by combining the z-transforms of the partial fractions into
second-order terms and possibly one first-order term. If the actual sampling
frequency is used then multiply H (z) by T.
Illustrating the impulse invariant method
Dept of BME, KUET Sub: BME 3111 19

Example 8.3: Digitize, using the impulse variant method, the simple analogue
filter with the transfer function given by

Solution: The impulse response, h(t), is given by the inverse Laplace transform:

• where L -1 symbolizes the inverse Laplace transform. According to the impulse


invariant method, the impulse response of the equivalent digital filter, h(nT), is
equal to h(t) at the discrete times t = nT, n = 0,1,2, ... , that is
Illustrating the impulse invariant method
Dept of BME, KUET Sub: BME 3111 20

Example 8.3
• The transfer function of H(z) is obtained by z-transforming h(nT):

• Thus, from the result above, we can write


Illustrating the impulse invariant method
Dept of BME, KUET Sub: BME 3111 21

impulse invariant method to a high-order filter


• To apply the impulse invariant method to a high-order (for example, Mth
order) IIR filter with simple poles, the transfer function, H(s), is first expanded
using partial fractions as the sum of single-pole filters

where the PK are the poles


of H(s).
• The z-transformation may be given by
Illustrating the impulse invariant method
Dept of BME, KUET Sub: BME 3111 22

Impulse invariant method to a high-order filter


• High-order IIR filters are normally realized as cascades or parallel combinations
of standard second-order filter sections. Thus the case when M = 2 is

• If the poles, P1 and P2, are complex conjugates, then C1 and C2 will also be
complex conjugates
Example 8.4
Dept of BME, KUET Sub: BME 3111 23

Assignment: Step by step full


calculation of the problem
Example 8.4
Dept of BME, KUET Sub: BME 3111 24

Solution:
• Before applying the impulse invariant method, we need to frequency scale the
normalized transfer function.
• This is achieved by replacing s by s/α, where α = 2π X 150 = 942.4778, to
ensure that the resulting filter has the desired response.
• Thus

Assignment: Step by step full


calculation o f the problem
Example 8.4
Dept of BME, KUET Sub: BME 3111 25

• Since the poles are complex conjugates, we can use the transfer function in
Equation
H(z) Assignment: Step by step full
calculation o f the problem
• Here,

• If we substitute 𝑧 = 𝑒 𝑗𝜔𝑇 , the value of H(z) at 𝜔 = 𝑜 𝑖𝑠 1223 (approximately


equal to the sampling frequency
• Such a large gain is characteristic of impulse invariant filters.
• To avoid overflow the transfer function is divided by sampling frequency or multiplied by T
Example 8.4
Dept of BME, KUET Sub: BME 3111 26

• Finally we obtain the transfer function as

Figure: A block diagram representation of


the filter
• An alternative method of removing the effect of the sampling frequency on the
filter gain is to work with normalized frequencies.
using T = 1 and α = 2πx 150/1280 = 0.7363
Remarks on the impulse invariant method
Dept of BME, KUET Sub: BME 3111 27

1. In the impulse invariant method, the


two impulse responses are identical at
the sampling instants
The impulse response of the discrete filter, h(nT), is
identical to that of the analogue filter, h(t), at the
discrete time instants t = nT, n = 0, 1, ... ; for this reason
the method is called the impulse invariant method.
2. The sampling frequency affects the
frequency response of the impulse
invariant discrete filter. A sufficiently
high sampling frequency is necessary
for the frequency response to be close
to that of the equivalent analogue filter.
Fig: Comparison of the impulse response of (a) an analogue
filter, h(t), and (b) its digital filter equivalent, h(nT).
Remarks on the impulse invariant method
Dept of BME, KUET Sub: BME 3111 28

3. The spectrum of the impulse invariant


filter corresponding to H(z) would be
the same as that of the original
analogue filter, H(s), but repeats at
multiples of the sampling frequency as
shown in Figure, leading to aliasing
The aliasing will be low.
 If the roll-off of the original analogue filter is
sufficiently steep
 If the analogue filter is bandlimited before the
impulse invariant method is applied
 Making the sampling frequency high, Figure: (a) Spectrum of an analogue filter and (b)
spectrum of an equivalent impulse invariant digital filter
showing effects of aliasing
Remarks on the impulse invariant method
Dept of BME, KUET Sub: BME 3111 29

• The impulse invariant method may be used for very sharp cutoff lowpass filters
with little aliasing, provided that the sampling frequency is reasonably high,
but it is unsuitable for highpass or bandstop filters unless an anti-aliasing filter
is used.
Matched z-transform (MZT) method of coefficient
calculation Dept of BME, KUET Sub: BME 3111 30

• This method directly maps the poles and zeros of an analog filter directly into
poles and zeros of the z-plane. We start with the transfer function of the
analog filter in factored form:
σ𝑀
𝑚=1 𝑠 − 𝑧𝑚
𝐻 𝑠 = 𝑁
σ𝑛=1 𝑠 − 𝑝𝑛
• The transfer function of the equivalent digital filter is obtained by replacing
terms of the form (𝑠 − 𝑎) with (1 − 𝑧 −1 𝑒 𝑎𝑇 ). This is called a ’matched z’
transform and gives the same pole location as impulse invariance but different
zero location.
Matched z-transform (MZT) method of coefficient
calculation Dept of BME, KUET Sub: BME 3111 31

• In higher order IIR filters, the second order filter sction is the basic building
block, where M=N=2
𝑠 − 𝑧1 𝑠 − 𝑧2
𝐻 𝑠 =
𝑠 − 𝑝1 𝑠 − 𝑝2
• Applying MZT we obtain
𝑠 − 𝑧1 𝑠 − 𝑧2 1 − 𝑒 𝑧1 𝑇 + 𝑒 𝑧2 𝑇 𝑧 −1 + 𝑒 (𝑧1 +𝑧2)𝑇 𝑧 −2

𝑠 − 𝑝1 𝑠 − 𝑝2 1 − 𝑒 𝑝1 𝑇 + 𝑒 𝑝2𝑇 𝑧 −1 + 𝑒 (𝑝1 +𝑝2)𝑇 𝑧 −2
• If the poles are complex conjugate
1 − 2𝑒 𝑧𝑟 𝑇 cos(𝑧𝑖 𝑇) 𝑧 −1 + 𝑒 𝑧𝑟 𝑇 𝑧 −2 Where,
𝑧𝑟 , 𝑧𝑖 real and imaginary part of zeros
𝑝𝑟 , 𝑝𝑖 real and imaginary part of poles
1 − 2𝑒 𝑝𝑟 𝑇 cos(𝑝𝑖 𝑇) 𝑧 −1 + 𝑒 𝑝𝑟 𝑇 𝑧 −2
Matched z-transform (MZT) method of coefficient
calculation Dept of BME, KUET Sub: BME 3111 32

• In practice, it is more convenient to express the second order analog filter


section in the familiar rational polynomial format:
𝑠 − 𝑧1 𝑠 − 𝑧2 𝐴0 + 𝐴1 𝑠 + 𝐴2 𝑠 2
𝐻 𝑠 = =
𝑠 − 𝑝1 𝑠 − 𝑝2 𝐵0 + 𝐵1 𝑠 + 𝐵2 𝑠 2

• The pole and zeros of H(s) are then given by


1
2 2
𝐵1 𝐵1 𝐵0
𝑝1,2 =− ± −
2𝐵2 2𝐵2 𝐵2
1
2 2
𝐴1 𝐴1 𝐴0
𝑧1,2 =− ± −
2𝐴2 2𝐴2 𝐴2
Example 8.5
Dept of BME, KUET Sub: BME 3111 33

• The normalized transfer function of an analog filter is given by


1
𝐻 𝑠 =
𝑠 2 + 2𝑠 + 1
Obtain the transfer function, H(z), of an equivalent digital filter using the
matched z-transform method. Assume a 3 db cutoff frequency of 150 Hz and a
sampling frequency of 1.28kHz
Dept of BME, KUET Sub: BME 3111 34
Example 8.5
Dept of BME, KUET Sub: BME 3111 35

• For the problem, the real and imaginary parts of the poles are
Summary of Matched z-transform
Dept of BME, KUET Sub: BME 3111 36

(1) Determine a suitable analog transfer function, H(s), that meets the
specifications of the desired digital filter.
(2) Find the locations of the poles and zeros of H(s). This may require factorizing
the analog transfer function, H(s).
(3) Map the poles and zeros from the s-plane to the z-plane.
(4) Combine the z-plane equations as appropriate to obtain the transfer
function, H(z).
Bilinerar z-transfor (BZT) method of coefficient
calculation Dept of BME, KUET Sub: BME 3111 37

• In the BZT method, the basic operation


required to convert an analogue filter
𝐻(𝑠) into an equivalent digital filter is to
replace s as follows:

𝑧−1 2
𝑠= 𝑘 , 𝑘 = 1 𝑜𝑟 …….(1)
𝑧+1 𝑇

Figure 7.9 An illustration of the s-plane to z-plane


• The above transformation maps the mapping using the bilinear z transformation. Note
analogue transfer function, 𝐻(𝑠), from the that the positive jω axis in the s-plane (that is, s=0
to s=j∞ )maps to the upper half of the unit circle,
s-plane into the discrete transfer function, and the negative jω' axis maps to the lower half.
H(z), in the z-plane
Bilinerar z-transfor (BZT) method of coefficient
calculation Dept of BME, KUET Sub: BME 3111 38

• In the figure the entire jω axis in the s-plane is mapped onto the unit circle, the
left-half s-plane is mapped inside the unit circle, and the right-half s-plane is
mapped outside the z-plane unit circle
• Unfortunately, direct replacement of s in H(s) as indicated in Equation (1) may
lead to a digital filter with an undesirable response
• by making the substitution 𝑧 = 𝑒 𝑗𝜔𝑇 and 𝑠 = 𝑗𝜔′, the analog frequency 𝜔′ and digital
frequency are related as

𝜔𝑇 2
𝜔′ = 𝑘 𝑡𝑎𝑛 , 𝑘 = 1 𝑜𝑟
2 𝑇
Bilinerar z-transfor (BZT) method of coefficient
calculation Dept of BME, KUET Sub: BME 3111 39

• The analogue frequency 𝜔' and the digital frequency, 𝜔, is almost linear for
small values of 𝜔, but becomes nonlinear for large values of 𝜔, leading to a
distortion (or warping) of the digital frequency response. This effect is normally
compensated for by prewarping the analogue filter before applying the bilinear
transformation.
• For a lowpass filter, the cutoff or bandedge frequency are prewar by using the
following equation


𝜔𝑝 𝑇 𝑤ℎ𝑒𝑟𝑒 𝑘 = 1 𝑜𝑟
2
𝜔𝑝 = 𝑘 𝑡𝑎𝑛 𝑇
2 𝜔𝑝 =specified cutoff frequency
𝜔𝑝′ =prewarped cutoff frequency
T= Sampling period
Summary of Bilinear z-transform (BZT) of coefficient
calculation Dept of BME, KUET Sub: BME 3111 40

• For standard, frequency selective IIR filters, the steps for using the BZT
1. Use the digital filter specifications to determine a suitable normalized transfer
function,𝐻(𝑠).
2. Determine the cutoff frequency, 𝜔𝑝 (or passband edge frequency 𝜔𝑝1 and 𝜔𝑝2 for
band pass ) of the digital filter
3. Obtain an equivalent analogue filter cutoff frequency ( 𝜔𝑝′ ) using the relation
(prewarped)

𝜔𝑝 𝑇
𝜔𝑝 = 𝑘 𝑡𝑎𝑛
2

′ 𝜔𝑝1 𝑇

𝜔𝑝2 𝑇
𝜔𝑝1 = 𝑘 𝑡𝑎𝑛 and 𝜔𝑝2 = 𝑘 𝑡𝑎𝑛
2 2
Summary of Bilinear z-transform (BZT) of coefficient
calculation Dept of BME, KUET Sub: BME 3111 41

4. Denormalize the analogue filter by frequency scaling H(s). This is achieved by replacing
s, depending upon filter type as
𝑠
𝑠= lowpas to lowpass 𝑠 2 +𝜔02
𝜔𝑝′ 𝑠= lowpas to band pass
𝑊𝑠

𝜔𝑝 𝑊𝑠
𝑠= lowpas to high pass 𝑠= lowpas to band stop
𝑠 𝑠 2 +𝜔02

Where 𝜔02 = 𝜔𝑝2


′ ′
𝜔𝑝1 ′
and 𝑤 = 𝜔𝑝2 ′
− 𝜔𝑝1

5. Apply the bilinear transformation to obtain the desired digital filter transfe rfunction
𝐻(𝑧) by replacing s in the frequency scaled transfer function 𝐻 ′ (𝑧) as.
s = (𝑧 − 𝑙)/(𝑧 + 1)
An illustration of the BZT method
Dept of BME, KUET Sub: BME 3111 42

Example 8.6- Lowpass filter It is required to design a digital filter to approximate


the following analogue transfer function:
1
𝐻 𝑠 =
𝑠 2 + 2𝑠 + 1

using BZT method obtain the transfer function, H(z), of the digital filter, assuming
a 3 dB cutoff frequency of 150 Hz and a sampling frequency of 1.28 kHz.
Dept of BME, KUET Sub: BME 3111 43
Assignment- Due date next class
Dept of BME, KUET Sub: BME 3111 44

Question: Describe the BZT method of coefficient calculation of IIR filter.


Mathematical Problem:
Example 8.6; 8.7; 8.8
Use of BZT and Classical analog filters to design IIR filters
Dept of BME, KUET Sub: BME 3111 45

• In real life, the analogue transfer function H(s) from which H(z) is obtained may
not be available and will have to be determined from the filter specifications.
• For standard frequency selective filtering tasks, H(s) can be derived from the
classic Butterworth, Chebyshev or elliptic filter’s transfer functions.
Use of BZT and Classical analog filters to design IIR filters
Dept of BME, KUET Sub: BME 3111 46

• Butterworth filter
• Characterized by the following magnitude squared frequency response

where N is the order of the filter and


𝜔𝑝′ is the 3 dB cutoff frequency

The transfer function of the analogue Butterworth filter, H(s), contains zero at infinity and poles which are uniformly
spaced on a circle of radius 1 in the s-plane at the following locations
Use of BZT and Classical analog filters to design IIR filters
Dept of BME, KUET Sub: BME 3111 47

Butterworth response Chebyshev type I

Chebyshev type II Elliptic Response


The BZT methodology using classical analog filters
Dept of BME, KUET Sub: BME 3111 48

• In cases where the prototype lowpass filter does not exist, the stages of BZT
method are
1. Prewarp the band edge or critical frequencies of digital filter
2. Find a suitable lowpass prototype analog filter based on the digital filter specification
and one of the classical filter charecteristics
3. Denormalize the prototype analog LP filter, 𝐻(𝑠) by frequency transformation and
scalling to obtain a new transfer function, 𝐻′(𝑠)
4. Apply the BZT to obtain the desired digital filter transfer function, 𝐻(𝑧)
Nyquist Effect
Dept of BME, KUET Sub: BME 3111 49

• The available frequency band for analog filter extends from zero to infinity,
where as for digital filter it is from zero to Nyquist frequency (i.e. half of
sampling frequency)
• The magnitude-frequency response of digital filter designed either of the three
methods may be significantly different from those of analog filter because the
entire analog frequency band (zero to infinity) is now compressed into a
narrow band (zero to Nyquist frequency) This differences represents a
distortion which is sometimes referred to as the Nyquist effect
Realization structures for IIR digital filters
Dept of BME, KUET Sub: BME 3111 50

• Realization involves converting a given transfer function, H(z), into a suitable


filter structure.
• Flow or block diagrams are normally used to depict filter structures and they
show the computational procedure for implementing the digital filter.
Realization structures for IIR digital filters
Dept of BME, KUET Sub: BME 3111 51

• The basic elements of realization structures are multipliers, adders, and delay
elements

8.23
Realization structures for IIR digital filters
Dept of BME, KUET Sub: BME 3111 52

• IIR filter is characterized by the following equations

𝑤ℎ𝑒𝑟𝑒, 𝑀 ≥ 𝑁

A direct form realization of an IIR filter.


Practical building blocks for IIR filters
Dept of BME, KUET Sub: BME 3111 53

• practical second-order building blocks used in realizing higher order IIR filters
are depicted in Figure.
Canonic section: This biquadratic section is characterized
by the following equations:

Canonic second order section

Direct realization: of the second-order IIR equation. It is


characterized by the following equations

Direct form second-order section


Practical building blocks for IIR filters
Dept of BME, KUET Sub: BME 3111 54

Canonic Realization vs Direct Realization


• The canonic section is the most popular because it has a good roundoff noise
property and requires a minimum number of storage elements, but it is
susceptible to internal overflows. To avoid internal overflow it is necessary to
scale the input to the filter section.

• Scaling is not mandatory for the direct form, because it has only one adder,
and may be preferred where scaling is not desired, for example high fidelity
digital audio. Under certain conditions the direct form is superior to the
canonic section, in terms of noise performance.
Cascade and parallel realization structures for higher IIR
filters Dept of BME, KUET Sub: BME 3111 55

• Assignment Due date: Next Class


Q: Describe the Cascades and parallel realization structures for higher-order IIR
filters (Hints: 8.13.2)
Example 8.20: with step by step calculation
Implementation of IIR Filter
Dept of BME, KUET Sub: BME 3111 56

• In the IIR filter, the output, 𝑦(𝑛), is computed for each input sample, 𝑥(𝑛)
Assuming cascade realization using the second-order direct form, the key
filtering equation is

• This equation clearly shows that to implement the filter we need the following
components
• Memory (for example ROM) for storing filter coefficients;
• Memory (for example RAM) for storing the present and past inputs and outputs
{𝑥(𝑛), 𝑥(𝑛 − 1), … } and {𝑦(𝑛), 𝑦(𝑛 − 1), … };
• Hardware or software multiplier( s);
• Adder or arithmetic logic unit.
Implementation of IIR Filter
Dept of BME, KUET Sub: BME 3111 57

• In modern real-time DSP, the filtering operations are efficiently performed with
a DSP processor such as the TMS320C25
• These processors have all the basic blocks on-board, including in-built hardware
multiplier(s).
• In some applications, standard 8-bit or 16-bit microprocessors such as the
Motorola 6800 or 68000 families offer attractive alternative implementations
• In batch or off-line processing a suitable high level language is used to
implement the filter. In this case, the filter is often implemented in a high level
language (for example C or FORTRAN) and runs in a general purpose computer
Computational requirements
Dept of BME, KUET Sub: BME 3111 58

• The designer must analyze the impact of the computational requirements of a


digital filter on the processor that will be used.
• The primary requirements for digital filters are multiplication, additions,
accumulation and delays or shifts.
• For example, a filter consisting of a second-order section would require typically four
multiplications, four additions, and some shifts and storage.
• If the filtering is performed in real time, for example at 44.1 kHz (for digital audio), the
arithmetic operations must be performed once every 1/(44.1 kHz).
• Allowance must also be made for other overheads such as fetching the input data or
saving or outputting the filtered data samples as well as other housekeeping operations.
Choosing Between FIR and IIR filters
Dept of BME, KUET Sub: BME 3111 59

• The choice between FIR and IIR filters depends largely on the relative
advantages of the two filter types.
1. FIR filters can have an exactly linear phase response. The implication of this is that no
phase distortion is introduced into the signal by the filter. This is an important
requirement in many applications, for example data transmission. biomedicine, digital
audio and image processing. The phase responses of IIR filters are nonlinear, especially
at the band edges.
2. FIR filters realized nonrecursively are always stable. The stability of IIR filters cannot
always be guaranteed
3. The effects of using a limited number of bits to implement filters such as roundoff
noise and coefficient quantization errors are much less severe in FIR than in IlR.
4. FIR requires more coefficients for sharp cutoff filters than IIR. Thus for a given
amplitude response specification, more processing time and storage will be required
for FIR implementation. However, one can readily take advantage of the computational
speed of the FFT and multirate techniques
Choosing Between FIR and IIR filters
Dept of BME, KUET Sub: BME 3111 60

5. Analog filters can be readily transformed into equivalent IIR digital filters meeting
similar specifications. This is not possible with FIR filters as they have no analog
counterpart. However, with FIR it is easier to synthesize filters of arbitrary frequency
responses
6. In general, FIR is algebraically more difficult to synthesize, if CAD support is not
available.
Summery- Choosing Between FIR and IIR filters
Dept of BME, KUET Sub: BME 3111 61

• From the above, a broad guideline on when to use FIR or IIR would be as
follows.
• Use IlR when the only important requirements are sharp cutoff filters and high
throughput, as IIR filters, especially those using elliptic characteristics, will give fewer
coefficients than FIR.
• Use FIR if the number of filter coefficients is not too large and, in particular, if little or no
phase distortion is desired. One might also add that newer DSP processors have
architectures that are tailored to FIR filtering, and indeed some are designed specifically
for FIRs

Potrebbero piacerti anche