Design of Digital Filters
Introduction
•Filters are a particularly important class of LTI systems.
•A Frequency selective filter means the LTI system that passes certain frequency
components of its input signal and totally rejects others.
•In general, any system modifies certain frequencies relative to others is also called a
filter.
•Digital filter is a linear time-invariant systems that passes certain desired frequency
components without distortion and block certain frequencies.
• The objective of filtering is to extract information from the signals or to separate two
or more signals or to enhance a signal (relative to noise).
• This chapter concentrates on the design of causal discrete-time LTI systems, or
commonly referred to as digital filters, to realize analog filters.
• Depending on the impulse response of a system, the digital filters are divided into
two types, namely, FIR filters and IIR filters.
• If the impulse response of the filter is of finite duration the filter is known as FIR
filter and if the impulse response is of infinite duration, then the filter is known
as IIR filter.
• An important step in the development of a digital filter is the determination of a
realizable transfer function H(z) approximating the given frequency response
specifications.
• The process of deriving the transfer function H(z) is called digital filter design.
Stages of Digital Filter
The design of causal digital filters involves the following stages:
1) Specifying the desired properties of the target analog system.
2) Approximating the specifications using a causal discrete-time LTI
system.
3) Realizing the causal discrete-time LTI system.
Classification of Analog Filters
• Filter is a system which rejects unwanted frequencies of the input signal
and allows the desired frequency components of a signal.
• Filters are of four types, Low Pass Filters, High Pass Filters, Band Pass
Filters and Band Stop Filters.
Have infinite duration
Non causal
Difficult to realize
• Low Pass Filters: The low pass filter allows the signal in the frequency
range 0 < ω < ωc and block the signal in the stop band ω > ωc .
• High Pass Filters: A high pass filter allows the signal in the frequency
above ω > ωc and rejects the signal between 0 < ω < ωc .
• Band Pass Filters: A band pass filter allows the signal between ωc1 to ωc2
and rejects the other signal.
• Band Stop Filters: A band stop filter rejects the signal between ωc1 to ωc2
and passes the remaining signal.
Digital Filter Specifications
•Digital Filter Specifications: The characteristics of a filter can be specified in frequency domain.
The key factors are:
•ωp = The pass band edge frequency in radians
•ωs = The stop band edge frequency in radians
•ωc = The cut-off frequency in radians
•δp = Pass band deviation (pass band error tolerance)
• δs = Stop band deviation (Maximum allowable magnitude in the stop
band)
Digital Filters
• According to the length of their impulse response sequences, the digital filters
are usually classified as:
Infinite impulse response (IIR) filters
M
r
b z r
H ( z) r 0
N
1 ak z k
k 1
Finite impulse response (FIR) filters
N 1
H ( z ) h( n) z n
n0
Design of IIR Filters from Analog Filters
• The design of a digital filter from an analog prototype requires that, to transform h a(t) to h(n) or
Ha(s) to H(z).
• A mapping from the s-plane to the z-plane may be written as
where s = m(z) is the mapping function.
In order for this transformation to produce an acceptable digital filter,
the mapping m(z) should have the following properties:
• The mapping from the jΩ-axis to the unit circle, Izl = 1, should be one to one and onto
the unit circle in order to preserve the frequency response characteristics of the analog
filter.
• Points in the left-half s-plane should map to points inside the unit circle to preserve the
stability of the analog filter.
• The mapping m(z) should be a rational function of z so that a rational H a(s) is mapped to
a rational H(z).
• The basic idea behind the conversion of an analog prototype transfer function H a(s)
into a digital IIR transfer function G(z) is to apply a mapping from the s-domain to
the z-domain so that the essential properties of the analog frequency response are
preserved.
We denote an analog transfer function as
Pa s
H a s
Da s
The digital transfer function derived from Ha(s) is denoted by
P z
G z
D z
The mapping function should be such that
The imaginary axis in the s-plane be mapping onto the
unit circle of the z-plane.
a stable analog transfer function be transformed into a
stable digital transfer function.
The widely used transformation is the Bilinear Transformation
and Impulse Invariance Method.
Impulse Invariance Method
Definition
The impulse response of the digital filter is identical to the impulse
response of an analog prototype filter at sampling instants.
Let Ha(s) be analog transfer function, then
ha t LT 1 H a s
The sample sequence of ha(t) is:
h n ha nT , t 0,1, 2,
For single-poles case, namely
N
Ai
Ha s
i 1 s si
We can be given by the inverse Laplace transform
N
ha t Ai e si t u t
i 1
The discrete-time sequence can be given by sampling ha(t) with time
interval T N
h n ha t Ai e si nT u nT
i 1
N
Ai
We can obtain by Z transform: H z siT 1
i 1 1 e z
Comparing H(z) with Ha(s), we can be given that the mapping
relation between s-plane and z-plane is: z e
sT
• Linear frequency transformation
T
• Stability is preserved
• The period of the sampling T should be small enough to avoid or
minimize the effect of the aliasing.
• Due to sampling the mapping is many-to-one
• This method is not suitable for high pass and band stop filters design.
Filter Design by Bilinear Transformation
• Avoids the aliasing problem of impulse invariance
• Maps the entire s-plane onto the unit-circle in the z-plane
– Nonlinear transformation
– Frequency response subject to warping
• Bilinear transformation
2 1 z 1
s 1
Td 1 z
• Transformed system function
2 1 z 1
H z Hc 1
Td 1 z
• Again Td cancels out so we can ignore it
• We can solve the transformation for z as
1 Td / 2 s 1 Td / 2 jTd / 2
z
1 Td / 2 s 1 Td / 2 jTd / 2
• Maps the left-half s-plane into the inside of the unit-circle in z
– Stable in one domain would stay in the other
• On the unit circle the transform becomes
1 jTd / 2
z e j
1 jTd / 2
• To derive the relation between and
2 1 e j 2 2e j / 2 j sin / 2 2 j
s j j / 2 tan
Td 1 e j
Td 2 e cos / 2 Td 2
• Which yields
2 T
tan or 2 arctan d
Td 2 2
To design a digital filter meeting the desired (digital)
specifications we have to :
① We must first prewarp the critical band edge frequencies to find
their analog equivalent.
② Design the analog prototype Ha(s) using the prewarped critical
frequencies.
③ Transform Ha(s) using the bilinear transformation to obtain the
desired digital transfer function G(z).
FIR Digital Filter Design
• Three commonly used approaches to FIR filter design:
1) Frequency sampling approach
2) Windowed Fourier series approach
3) Computer-based optimization methods (Optimal Equiripple Design Techniques)
• FIR filters normally used when there is a requirement of linear phase.
• FIR filter usually found in application where waveform distortion due to non linear phase
is harmful.
• In particular, we shall focus on frequency-selective lowpass filters, which suppress high-
frequency components.
Advantages and Disadvantage of FIR Filter
• FIR digital filter is always guaranteed stable.
• It is always possible to design FIR digital filters with exact linear-phase.
• Quantization noise can be made negligible for non-recursive realization.
• To achieve a specific magnitude response, higher order FIR filter is required
when compared an IIR filter. Hence, memory requirement and execution time
are higher.
Why linear phase filter?
• Linear phase filters maintain the relative positioning of the sinusoids in the
filter passband.
• This maintains the structure of the signal while removing unwanted frequency
components.
• To maintain the original structure of a signal in the passband frequency range,
linear phase (or close to linear phase) is required.
Linear-phase FIR transfer function
• If H(z) is required to have a linear-phase, its frequency response must be
of the form
He H e
j j
g
Where Hg(ω) is called the amplitude response.
note:
Hg(ω) is different from |H(ejω)|.
Θ(ω) is a linear-phase function.
Frequency Sampling Method
• Let the desired frequency function be Hd(ejω). We can
• a obtain Hd(k) by sampling it in ω∈[0,2π] with interval T
End!