Digitalfiltersnotes 15 Oct 2018
Digitalfiltersnotes 15 Oct 2018
1
1 Introduction to Digital Filters
A filter is a system or network that selectively changes the waveshape, amplitude-
frequency and/or phase-frequency characteristics of a signal in a desired man-
ner. Comman filtering objectives are to improve the quality of a signal, to
extract information from signals or to separate two or more signals previously
combined.
A simplified block diagram of a real time digital filter with analog input and
output signal is shown in fig.1
2. Unlike analog filters, the performance of digital filters does not vary
with environmental changes, for example thermal variations, This elim-
inates the need to calibrate periodically.
5. Both the filtered and unfiltered data can be saved for further use.
2 FIR Filter
FIR filter is characterised by the following equation
N
X −1
y(m) = h(n)x(m − n) (3)
n=0
or
N
X −1
H(z) = h(k)z −k (4)
k=0
• Optimal Method
∞
X
Hd (ω) = hd (n)e−jωn (5)
n=0
and π
1
Z
hd (n) = Hd (ω)ejωn dω (6)
2π −π
In general the unit sample response hd (n) obtained from Eq.(6) is infinite
in duration and must be truncated at some ponit, say at n = M − 1, to yield
a FIR filter of length M.
Truncation of hd (n) to a length M − 1 is equivalent to multiplying hd (n)
by a window function, w(n), whose duration is finite.
2. Obtain the impulse response hd (n) of the desired filter by evaluting the
inverse Fourier transform in Eq.(6).
4. Obtain values of w(n) for the choosen window function and the valuse
of the actual FIR coefficients, h(n) by multiplying hd (n) by w(n).
Hd ((ω) = 1.e 0 ≤| ω |≤ ωc
−jω 2
0 otherwise
3 IIR Filter
IIR filters are characterised by
N
X M
X
y(n) = bk x(n − k) − ak y(n − k) (10)
k=0 k=1
or
N
X
bk z −k
k=0
H(z) = M
(11)
X
1+ ak z −k
k=1
1. Butterworth filter
4. Elliptical filters
5. Bessel filters
5 Butterworth filters
Low pass butterworth filters are all pole filters characterized by the magni-
tude -squared frequency response.
1
|H(Ω)|2 = (12)
1 + ( ΩΩC )2N
where N is the order of the filter, ΩC is its −3dB frequency (usually called
the cut off frequency).
By evaluating equ.12 at s = jΩ we get
π (2k+1)π
sk = Ωc ej 2 ej 2N (13)
inside the unit circle in the z-plane and all points in the RHP of s are mapped
into corresponding points out side the unit circle in the z-plane. The mapping
from the s-plane to the z-plane is given
2 1 − z −1
s= (17)
T 1 + z −1
This is called the bilinear transformation. Now
z = rejω (18)
and
s = σ + jΩ (19)
if we subtitute equ.18 in equ.17 and solve when r = 1 we get σ = 0 and
2 sin ω
Ω= (20)
T 1 + cos ω
2 ω
Ω = tan (21)
T 2
or
ΩT
ω = 2 tan−1
(22)
2
The relationship in equation 22 between the frequency varialbes in the two
domains is shown in fig.3
It is observed that the entire range is Ω (analog frequency domain) is
mapped into the range −π ≤ ω ≤ π (ω digital frequency domain). This
mapping is highly nonlinear. A frequency compression or frequency wraping
is observed. Also bilinear transformation maps the point s = ∞ into the
point z = −1.
where
2πfp
ωP = (25)
Fs
2πfs
ωs = (26)
Fs
2. Obtain order of Butterworth filter N using equ.27
A
s
log 10 A10p −1
10 10 −1
N≥ h i (27)
2 log ΩΩps
in step 4.
The impluse response h(t) is given by the inverse Laplace transform of equ.30
C
h(t) = L H(s) = L
−1 −1
= Cept (31)
s−p
C
H(z) = (34)
1 − epT z −1
For multiple poles H(s) first expand H(s) using partial fractions as sum of
single pole filters i.e.
C1 C2 CM
H(s) = + + ... + (36)
s − p1 s − p2 s − pM
M
X Ck
H(s) = (37)
k=1
s − pk
where pk are the poles of H(s). Each term on the right hand side of equ.37
has the same form as equ.30 Therefore we have
M M
X Ck X Ck
→ (38)
k=1
s − pk k=1
1 − epk T z −1
4. This method is unsuitable for highpass and bandstop filters since anti
aliasing filters are required.