You are on page 1of 8

EEC 430/530

Digital Signal Processing


Unit 9
Digital Filters

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 152


Digital Filters
• All digital filters are designed using software (such as the packages
in MATLAB’s signal processing toolbox).
• There are two types of digital filters: IIR and FIR.

• If the output of the filter is 𝑦 𝑛 and the input is 𝑥 𝑛 , then the


filter is the difference equation relating 𝑦 𝑛 and 𝑥 𝑛 .

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 153


• An IIR has difference equation
𝑦 𝑛 = 𝑎! 𝑦 𝑛 − 1 + ⋯ + 𝑎" 𝑦 𝑛 − 𝑁
+𝑏# 𝑥 𝑛 + 𝑏! 𝑥 𝑛 − 1 + ⋯ + 𝑏$ 𝑥 𝑛 − 𝑀
o The design process for an IIR produces the coefficients
𝑎! , 𝑎% , … , 𝑎" , 𝑏# , 𝑏! , … , 𝑏&
i.e. the output of the design process is the coefficients.
• A FIR has difference equation.
𝑦 𝑛 = ℎ 0 𝑥 𝑛 + ℎ 1 𝑥 𝑛 − 1 + ⋯ + ℎ 𝑀 𝑥(𝑛 − 𝑀)
• The coefficients ℎ 0 , … , ℎ 𝑀 are called either the coefficients in the
FIR’s difference equation, or the FIR’s impulse response coefficients –
the latter since the impulse response of the FIR, ℎ 𝑛 , show up in the
same way as the coefficients in its difference equation.
o The output of the design process for a FIR is the coefficients ℎ 0 , … , ℎ(𝑀).

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 154


• There is readily available software to design standard filters (LP,
HP, BP, BS) or filters with arbitrary frequency responses.
• The IIR design process is an “indirect” process in that an analog
filter that meets the specs is first designed, and then it is
transformed into a digital filter.
• FIR design processes chooses the ℎ 𝑘 ’s that minimize some
measure of the error between a desired frequency response and
the frequency response one gets from a system whose difference
equation is
𝑦 𝑛 = ℎ 0 𝑥 𝑛 + ℎ 1 𝑥 𝑛 − 1 + ⋯ + ℎ 𝑀 𝑥(𝑛 − 𝑀)
• These methods are “direct” methods in that they do not involve
analog filters in any way.

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 155


• Specs for either IIR or FIR are usually given as analog specs.
• These specs are first used to compute the filter order, then the
order and the specs are used to compute the filter’s coefficients.
• If 𝑁'() = order of a FIR, and
𝑁(() = order of an IIR, then
o a FIR requires 𝑁!"# multiplications (approximately) per output sample,
and an IIR requires 2𝑁""#multiplications (approximately) per output
sample.
o In most cases, though, 𝑁!"#/𝑁""# is on the order of tens or more for two
filters meeting the same specs, so the computational burden of a FIR is
significantly greater.

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 156


• A significant advantage of a FIR is that it has linear phase – which
means no phase distortion at the output.
• If linear phase is not an issue, an IIR may be preferred because of its
reduced computational burden.
o On the other hand, DSP architectures are often optimized to do the kind of
computation specifically required by a FIR, and so the computational advantage
of an IIR may be lost in these cases.
• FIRs are guaranteed stable – IIRs are not, and their stability must be
checked.
• The performance (and stability) of IIRs is more sensitive to
quantization of filter coefficients (due to the use of N bits) and noise
from rounding–off calculations than is the performance of FIRs.
• Meeting arbitrary filter specs is easy with FIRs, and very difficult or
impossible with IIRs.
Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 157
Filter Specs
• The desired frequency response of the filter (IIR or FIR) is
typically given in terms of
analog frequencies.
• For a LP filter, for instance,
the usual specs are:
o Passband edge frequency, 𝐹$ (Hz)
o Stopband edge frequency, 𝐹% Hz
o Peak passband ripple, 𝛼$ dB
o Min stopband attenuation, 𝛼% dB

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 158


End of Unit 9 – Digital Filters

Donoghue/Hizlan/Zhang Cleveland State University EEC 430/530 - 159

You might also like