DSP - Unit II PDF
DSP - Unit II PDF
Unit II:
Digital Filters: Design and Structures
3
Module I:
DT LTI Systems as Frequency
Selective Circuits:
Digital Filters
4
Ideal Digital Filters:
An Ideal Digital Filter is a LTI system; which has frequency response
function that provides H ( ) 1 within certain band of frequencies
(pass band) and H ( ) 0 at other frequencies (stop band). Ideally
phase response is zero.
Frequency Response of Ideal Low-pass Filter:
Plot for one period of 2π: [- π, π )
5
Frequency Response of Ideal High-pass
Filter and Ideal Band-pass Filter
7
Concept of Filtering:
8
Solution:
11
Summary of ideal impulse response of
standard frequency selective filters
Low Pass
High Pass
Band Pass
Band Stop
15
MATLAB Prog Results: Magnitude Responses
for several M are shown in figure.
Designed for cut-off frequency: pi/4
rad/sample.
Length of unit impulse response: 2M+1
Phase response is non-zero (not shown).
16
Important implications in the design of
practical digital filters:
The frequency response cannot be zero over any finite frequency
band, except at a finite set of points in frequency.
The magnitude response cannot be constant in any finite range of
frequencies.
The transition from pass band to stop band cannot be infinitely
sharp There is always a transition band between pass band and
stop band.
Oscillatory behaviour (Ripples) in Practical frequency responses in
pass band and stop band (around cut off) is called Gibbs
Phenomenon.
The phase response is not zero. The magnitude and phase response
can’t be independently specified.
Practically we can design a filter with finite length of unit impulse
response: Finite Impulse Response (FIR) filter: Length of unit
impulse response is finite. Always have Ripples.
Practically it is also possible to design Infinite Impulse Response
(IIR) filter using feedback (recursion) to avoid ripples; but in that
case the unit impulse response will not follow the infinitely delayed
sinc function but some other practical function.
17
Paley Wiener Theorem:
19
FIR Filters:
The unit impulse response of an FIR filter has finite duration and
corresponds to having no denominator in the rational function
H(z):
There is no inherent feedback in the difference Equation
representation. This results in the reduced form:
M
y (n) bk x(n k )
k 0
Unit impulse response of causal FIR filter is given by:
h(n) bn ,0 n M M 1 taps
h(n) 0, otherwise
The FIR systems are always stable. S h n
n
2
0
Example of FIR filter: M-tap Moving
Average Filter
Causal M-tap Moving Average filter is given by difference
equation: 1
y ( n) ( x(n) x(n 1) ..... x(n ( M 1)))
M
1 M 1
M k 0
x(n k )
1
h( n) ;0 n M 1
M
1
H ( z) (1 z 1 z 2 ...... z ( M 1) )
M
H(z) contains only numerator polynomial of –ve power of z.
Have zeros located anywhere in z-plane and poles only at
origin only, no non-zero poles Always stable.
It can be implemented recursively or non-recursively.
Recursive implementation reduces hardware/ computation
required.
21
Non-Recursive implementation:
Const. Multiplier
M-1 -adders 1/
x(n) M
y(n)
Recursive implementation:
1
y (n) y (n 1) ( x(n) x(n M ))
M
2 -adders y(n)
1/
x(n) M
Const. Multiplier
-1 Z-1
Z-M
1 – M Unit delay element 22
Frequency Response of the Moving-
Average System
𝑀−1 −𝑗𝜔𝑛1
𝐻 𝜔 = 𝑒
𝑀 𝑛=0
MATLAB Plot for M=2, M=3 and M=20:
Basically a LPF; Magnitude response is not flat and contain sidelobes
that increase with M, Linear Phase response in pass band.
As M increases: BW reduces; more precise in detecting average.
magnitude plot
1 magnitude plot
1
|H(w)|
|H(w)|
0.5
0.5
0
-4 -3 -2 -1 0 1 2 3 4 0
w in radians/sample -4 -3 -2 -1 0 1 2 3 4
phase plot w in radians/sample
2 phase plot
4
<H(w)
<H(w)
1 2
0 0
-1 -2
-2 -4
-4 -3 -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 3 4
w in radians/sample w in radians/sample
23
Infinite-duration impulse response (IIR)
Filter:
N M
y (n) ak y (n k ) bk x(n k )
k 1 k 0
M
Y ( z) k
b z k
H ( z) k 0
N
1 ak z k
X ( z)
k 1
x(n) y(n)
3/4 Z-1
-1/8
Z-1
Obtain governing difference equation, system transfer function, pole-zeros, stability, unit
impulse response and frequency response functions.
3 1
𝑦 𝑛 =𝑥 𝑛 + 𝑦 𝑛−1 − 𝑦(𝑛 − 2)
4 8
1 𝑧2 𝑧2
𝐻 𝑧 = 3 1 = 3 1 = 1 1
1− 𝑧 −1 + 𝑧 −2 𝑧2− 𝑧 + (𝑧− )(𝑧− )
2 4
4 8 4 8
Stable as poles inside unit circle in z-plane.
1 1
ℎ 𝑛 = (2( )𝑛 − ( )𝑛 )𝑢(𝑛) IIR
2 4
1
𝐻 𝜔 = 3 1
1− 𝑒 −𝑗𝜔 + 𝑒 −2𝑗𝜔
4 8
25
MATLAB Plot of unit impulse response
and frequency response:
26
Comparison of FIR and IIR filters:
Parameter FIR Filter IIR Filter
Length of h(n) Finite Infinite
Stability Always Stable Stable or Unstable,
Stability needs to be
investigated
Pole-zero Contains zeros located Contains zeros and poles
anywhere in z-plane, poles located anywhere in z-
only at origin plane
Implementation Recursive or Non-recursive Recursive only
Feedback Not inherent Inherent
Magnitude Contains ripples in passband Possible to have ripple
Response and stopband less passband and
stopband
Phase response Possible to have linear phase Non linear phase
response response only
Order of the filter More Less
and components
reqd. for same
27
specifications
Module III
Basics of Linear Phase FIR Filters
28
Measure of Phase Linearity:
Phase Delay (𝝉p)and Group Delay(𝝉g)
Phase Delay:
Practical filters have non-zero phase response.
A signal consists of several frequency components.
Phase response is a function of frequency.
So practically the group of frequency components
when passed through practical digital filter
experience group time delay.
The phase delay is the amount of time delay each
individual frequency components of the signal
suffer while transmitted through a system (digital
filter here).
Phase delay contd.
Group Delay (Envelope Delay)
1
h(n) ;0 n M 1
M
M
M 1 j
( M 1) sin( )
1 1
H ( )
M
e
n 0
j n
M
e 2 2
sin( )
2
Linear Phase FIR Filters:
Linear Phase Response: h ; where and
are constants.
A sufficient condition for h(n) to obtain linear phase
FIR filter of length M:
The unit impulse response h(n) of the FIR filter
should be symmetrical or anti-symmetrical w.r.t.
center line:
h(n)= h(M-1-n) or h(n) = -h(M-1-n)
n=0,1,…,(M-1)
• If = 0 or Symmetrical h(n).
• If = /2 or 3/2 Anti-Symmetrical h(n).
• For FIR filters the filter-length M, can be even or, odd.
• It returns four types of linear phase FIR filters.
Four types of linear phase FIR filter:
Example of h(n):
Type III: Odd Anti-Symmetric
Type I: Odd Symmetric (M-1)/2 Middle sample is always 0.
Middle sample can take any value
h(n)
h(n) 0
M-1
0 M-1
(M-1)/2
(M-1)/2 (M-1)/2
(M)/2
(M)/2 (M)/2
Four types of linear phase FIR
filters:
Type Filter Symmetry/ Group
Length M Anti Symmetry Delay 𝝉g
I Odd h(n)= h(M-1-n) (M-1)/2
n=0,1,…,(M-3)/2
h((M-1)/2): Any value
II Even h(n)= h(M-1-n) (M-1)/2
n=0,1,…,(M-2)/2
h( n) h( M 1 n)
H ( z ) z ( M 1) H ( z 1 )
This result implies that the zeros of H(z) are identical to the
zeros of H(z –1).
That means zeros of H(z) must occur in reciprocal way.
In other words, if z1 is the zero of H(z) , then also has zero
at 1/z1.
Figure shows the symmetry that exists in the location of the
zeros of the linear phase FIR filter.
Single zero at zero at z=1 and a zero at z=-1 may occur.
Zero Locations of Linear-Phase FIR
Transfer Functions
Typical zero locations shown below
Why IIR Filters can’t be Linear Phase?
39
Type I: M odd, h(n)=h(M-1-n)
Conclusion…
LP
HP
BP
BS
Module III
Linear Phase FIR Filter Design:
Co-efficient Calculation Methods
47
Methods of Calculation of Linear
Phase FIR Coefficients
1. The Window Method: Truncate and shape unit
impulse response of ideal filters using some
window function
2. Frequency Sampling Method: Use DFT and
IDFT
3. Optimal ripple or, Min-max design method: Use
Optimization Criteria
If the mathematical model of h(n) is symmetrical or
anti-symmetrical, each method can lead to design of
a linear phase FIR Filter.
Summery of ideal impulse response of
standard frequency selective filters
Filter type Ideal unit impulse response hd(n)
Low Pass
High Pass
Band Pass
Band Stop
Illustration Example 1:
M=11
h(0) -0.0417 h10
h(1) 0.0000 h(9)
h(2) 0.0696 h(8)
h(3) 0.1476 h(7)
h(4) 0.2087 h(6)
h(5) 0.2318
Rectangular Rectangle 1
For M = 7,
For M = 11,
h(n) 0.6562
n 0
h(5) 0.25
M 1
h(n) 0.8611
n 0
That means every sample of h(n) we
have to multiply with 1.5239 That means we have to multiply with 1.1613
h(0) 0 h(10)
h(0) 0 h(6) h(1) 0.000 h(9)
h(1) 0.0808 h(5) h(2) 0.0349 h(8)
h(2) 0.2287 h(4) h(3) 0.1109 h(7)
h(3) 0.381 h(4) 0.2091 h(6)
h(5) 0.2903
Solution: Example 2 (b): Blackman Window
2 n 4 n
w(n) 0.42 0.5 cos 0.08 cos
M 1 M 1
2 n 4 n M 1
h(n) 2 f c sinc2 f c (n ) 0.42 0.5 cos 0.08 cos , where
M 1 M 1 2
and 0 n M 1
For M = 7 For M = 11,
h(0) 0 h(6)
h(1) 0.0207 h(5) h(0) 0 h(10)
h(2) 0.1418 h(4) h(1) 0.000 h(9)
h(3) 0.25 h(2) 0.0151 h(8)
h(3) 0.0811 h(7)
h(4) 0.1911 h(6)
M 1 h(5) 0.25
h(n) 0.5750
n 0
h(0) 0 h(6)
h(n) 0.8247
n 0
h(n) 0.7073
n 0
M 1
, thus multiply with 1.4138
h(n) 0.9302
n 0
71
Generalized Frequency Response of
Practical Filters:
4. As = –50dB. Both Hamming and Blackman can provide attenuation less than –
Solution: 50dB. We can choose the Hamming window, which provides the smaller transition
band and hence has the smaller length. Although we do not use the passband ripple
value of
Ap 0.25 dB
in the design, we will have to check the actual ripple from the design and
verify that it is indeed within the given tolerance with the use of MATLAB.
= p s
6.6
=
M
6.6
M 66
0.1
, we are taking the odd value of M = 67. 33
hn hd n wn
0, 0 0.275
H d 1, 0.275 0.625
0, 0.625
in the design, we will have to check the actual ripple from the design and verify that it is indeed within the given tolerance
with the use of MATLAB
6.2
L P L S
M
6.2
M 124
0.05
, we are taking the odd value of M = 125.
62
hn hd n wn
0.625 sinc0.625 (n 62) 0.275 sinc0.275 (n 62)
2 n
0.5 0.5 cos 124 , 0 n 124
78
Kaiser Window:
All The window functions considered so far are fixed shape, simple to
apply and simple to understand. But have following disadvantages:
Designing procedure includes only the stopband attenuation As. Designing
does not having control over passband ripples measure by Ap.
For a given window, stopband attenuation is fixed, even if we increase the
filter length M No relationship between As and M or transition width.
2n
2
I 0 1 1
M 1 0 n M 1
wn
I 0
where Io(.) is the modified zero-order Bessel function of first kind. Io(x)
is normally evaluated using the following power series expansion:
I x 1
L
x / 2
k 2
0
k!
where typically L < 25. k 1
A 7.95
A 20 log10 min p , s M
2.2855
parameter 𝛽 controls the way the window function tapers at the edges in
the time domain
Kaiser Window: Time and Frequency
Domain Representation, M=51
Kaiser Window: Design Steps
From the given specifications (𝛿𝑝 , 𝛿𝑠 , 𝜔𝑠 , 𝜔𝑝 ) identify the desired
frequency response ( 𝐻𝑑 (𝜔)) .
Determine cutoff frequency 𝜔𝑐 from specifications.
Obtain unit impulse response, hd(n), for desired filter.
Determine transition width ∆𝜔, A and δ from given specifications.
Find the filter length M (odd) and α.
Determine β parameter.
Obtain h(n)= hd(n-α)w(n).
Design Example 5: Kaiser Window
86
FIR Filter Structures:
92
POLE-ZERO PLACEMENT METHOD: IDEA
IIR Filter System Transfrer Function :
M
z z
k
Non Trivial zeros
H z K z N M k 1
; z e j ; z k , p k complex numbers
N
Non Trivial poles
z p
k 1
k
Gain Trivial zeros and poles
z 1 re 1 re
j j
1 2r cos r 2
H 3 z
H3
1 re z 1 re z
j 1 j 1
1 2r cos z 1 r 2 z 2
POLE-ZERO PLACEMENT METHOD:
Highpass filter
The opposite holds true for HPF.
Obtain simple HPF by reflecting (folding) the
pole-zero plot of LPF about the imaginary
axis in the z-plane.
Thus we obtain the system function for
figure with |a\<1
H z
K
1 az 1 1
H 2 z
1 a 1 z 1
H 3 z
K
H 3 z
1 2r cos 1 r 2
2 1 az 1 1 2r cos 1 z 1 r 2 z 2 1 2r cos 1 z 1 r 2 z 2
A simple lowpass-to-highpass filter
transformation
H hp H lp
b z k
k
H lp z k 0
N
1 a k z k
k 1
b e jk
M M
bk e j k 1 b e
k
jk
H lp
k
k 0
k
H hp H hp
N k 0 k 0
1 a k e jk N N
1 a k e j k 1 1 a k e jk
k
k 1
k 1 k 1
1 b z k
k
k
H hp z k 0
N
1 1 ak z k
k
k 1
H lp z
0.1 1 z 1
0.1 1 z 1
1 0.8 z 1 H hp z
1 0.8 z 1
Examples:
Ans.
1 z 1 y n 0.9 y n 1 0.05xn xn 1
H z K K 0.05
c 3.036
1 0.9 z 1
y (n) 0.0282 cos n 134.2
6
Pole-zero Placement Method:
Bandpass filter
Can’t be realized with first order transfer fun.
Second order: H z 1 2r cosK 1 zz r z
2
1 1 2 2
0
H z
K
1 2r cos 0 z 1 r 2 z 2
H
K
1 re j 0
e j 0
1 re j 0
e j 0
H 1 at 0
K 1 r 1 r 2 2r cos 0
Pole-zero placement method: Notch
Filter
Special Band Stop Filter
Notch filters are used in many applications where specific
frequency component is eliminated.
For example, biomedical instrumentation and recording
systems signals are interfered by power line frequency 50-
Hz (that is called power-line Hum), needs to be eliminated
by notch filter.
Contains one or more nulls in its frequency response
characteristic.
For complete rejection at frequency 0 , we have to put
zeros at z e 1, 2
j 0
1 e j 0
z 1 1 e j0 z 1 1 2 cos z 1
z 2 K
1 r 2r cos 0
2
H z K H z K K: H 1; 21 cos 0
0
1 re j0 z 1 1 re j0 z 1
1 2r cos 0 z 1 r 2 z 2
Pole-zero Placement Method: Comb
Filter
Comb filter can be viewed as any filter which repeats pass
and stop bands periodically across the overall frequency
band [-π, π].
The applications of comb filter in ionosphere measurement
Comb Filter:
L
1 a 1 z
L
H z
2 1 a z
L
H z
1 r 2r cos 0
2
1 2 cos 0 z 1 z 2
21 cos 0
1 2r cos 0 z 1 r 2 z 2
H z
1 r 2r cos 0
2
1 2 cos 0 z L z 2 L
21 cos 0
1 2r cos 0 z L r 2 z 2 L
Pole-Zero Placement Method: All
Pass Filter
All pass filter passes all frequency
components of its input with magnitude gain
unity, H 1,
The poles and zeros in APF are reciprocals of
one another.
B z a a z a z z 1 N 1 N
H z N 1
Az 1 a z a z 1 N
1 N
Az 1
H z z N
Az
H z
a z , 1
1 a 1
First-order APF: 1 az 1 1
a cos d h 1 a2
h 2 tan 1 g
1 a cos d 1 a 2 2a cos
11
6
Overview of Continuous Time Signals
and Systems in Laplace (s) domain
The Laplace transform is a well established mathematical technique for
solving linear constant co-efficient differential equations (LCCDE).
Continuous time LTI systems are described by using unit impulse response
function h(t) or using LCCDE which relates input and output.
The continuous time LTI systems can be analysed and designed easily in s
domain rather than in time domain. Analog filters are continuous time LTI
systems.
The Laplace transform changes a signal in the time domain into a signal in
the s-domain, also called complex s – plane; where s = σ + j Ω.
A time domain signal, x(t), is transformed into an s-domain signal, X(s).
ℒ 𝑑𝑥 𝑡 ℒ
𝑥(𝑡) 𝑋(𝑠) 𝑠𝑋(𝑠)
𝑑𝑡
Laplace transform for CT signals and systems is analogous to Z-transform of
DT signals and systems with z = esTs ;where, Ts is sampling interval.
Overview of Continuous Time Signals
and Systems in Laplace (s) domain
In a factored form:
The roots of the numerator, z1, z2 , z3 ,.. are the zeros while the roots of
the denominator, p1, p2, p3,.. , are the poles of system transfer
function.
Overview of Continuous Time Signals
and Systems in Laplace (s) domain
A causal CT LTI system with system function H(s) is stable if all its poles
lie in the left half of s-plane; i.e. real part of pole is negative.
For a stable CT LTI system the Laplace transform and Fourier transform
are related as: H(Ω) = H(s)|s= jΩ
Where H(Ω) is frequency response function and it is Fourier transform of
h(t).
H(Ω) is a complex function of frequency variable Ω with -∞< Ω< ∞. |H(Ω)|
is magnitude response and ᶿh(Ω) is phase response.
The design of analog filters in the s-domain involves two steps:
1. Specifying the number and location of the poles and zeros and hence specify H(s).
This is a pure mathematical problem, with the goal of obtaining the best
approximation to desired frequency response.
2. An electronic circuit using OPAMP, R-L-C is derived that synthesize this s-domain
representation.
IIR Digital Filter from Analog Filter
Two approaches:
For any kind of frequency response analog LPF is
designed first prototype filter
Prototype Analog LPF Design:
Determine filter transfer function H(s) to satisfy given specifications.
A causal Analog LTI system with system function H(s) is stable if all its
poles lie in the left half of s-plane.
This approach has no control over the phase response of the IIR filter.
Therefore, IIR filter design will be treated as magnitude design only.
Here, we specify the magnitude characteristics only and accept the phase
response that is obtained from the design.
Specifications of Normalized Magnitude frequency response:
Ωp passband edge frequency
Ωs stopband edge frequency
δs Peak stopband ripple
δp Peak passband ripple
N Order of filter depends on all other specs.
Ωc cutoff frequency Depends on all.
More sophisticated techniques,
which simultaneously approximate both the
magnitude and phase responses, require advanced optimization tools.
Standard Magnitude Frequency
Response Shapes:
At c ; H c
2 1
2
H c
1
0.707 3dB
2
Butterworth LPF: Transfer function,
poles and order
The T.F. thatNsatisfy Butterworth frequency response:
c j 2 k N 1
H s N 1 sk c e 2N
, k 0, 1, 2,, N 1
s s k
k 0
N
log 1 s2 1
The resulting denominator polynomial is Butterworth polynomial. 2 log s c
The angular spacing between the poles on the circle is N
No zeros in H(s)
1 s2 1
log
2
N
2 log s p
or
1
2 1
(1 p ) 2
Example: Analog Butterworth LPF
Design
Design an analog p 1000 rad / sec
lowpass Butterworth s 4000 rad / sec
filter with a passband p 0 .1 2
1
1 0.2346
edge of 500Hz, a 1 p
2
stopband edge of s 0 .1
N=6 N=7
Chebyshev Type-I Low Pass
Normalized Magnitude Response:
H(s) has poles only.
The poles of Chebyshev-I filter lie on the ellipse in the s-plane with major axis.
1/ N
2 1 1 2 1
1
and minor axis
2
r1 p r2 p
2 2
The position of poles for Chebeshev-I filter lies on ellipse at the coordinates x k , y k
x k r2 cos k , k
2k N 1
y k r1 sin k , k 1, 2, , N 1 2N
Chebyshev Type-II Low Pass
Normalized Magnitude Response:
Contains zeros as well as poles.
H
2 1
C N2 s p
1 2
2
N s
C
For same specifications Chebyshev filter will result in lower order compared to
Buttorworth filter but have ripples in either of the band.
In other words for the same order of the filter, Chebyshev filter has smaller transition
width compared to Buttorworth filter
Elliptic Low Pass Normalized
Magnitude Response
Contains both zeros and poles
H
1
UN (x) is a Jacobian elliptical function of order N
2
1 U N P
2
N even N odd
Providing smallest order filter for a given set of specifications but have ripples in
both the bands.
We can say that for a given order, an elliptical filter has the smallest transition width.
Bessel Low Pass Normalized
Magnitude Response
b0
H s B N (s) is the N - order Bessel polynomial
B N s
B N s s N bN 1 s N 1 bN 2 s N 2 b1 s b0
bk
2 N k ! k 0, 1, , N 1
2 N k k! N k !
B N s 2 N 1B N 1 ( s ) s 2 B N 2 ( s )
B 0 (s) = 1 and B1 (s) = s + 1
Note: The order of the BPF/BSF filter will be doubled after filter
transformation. In BPF/BSF filter design specification, the "order" refers to the
order of the prototype LPF.
For Buttorworth design we can also consider cut off frequencies in place of
band edge frequencies.
Digital Filter Transformations: zz
13
4
Required Properties of sz mapping
(Transformation) for IIR Filter Design
The left half of s-plane should be map into the inside the
unit circle of z-plane. Thus, stable and causal analog filter
will be converted into stable and causal digital filter.
The jΩ axis in the s-plane should map into the unit circle in
the z-plane. Thus, there will be direct relationship between
the two frequency variables in two domains without
aliasing one to one mapping.
The right half of s-plane will map into outside the unit circle
in z-plane.
One such transformation which satisfy all these properties is
Bilinear transformation given by equation:
2 1 z 1
s
T 1 z 1
T Sampling time ( step size) for conversion of filter
from s domain to z domain; T is arbitrary and can
𝐻 𝑧 =𝐻 𝑠 | 2 1−𝑧 −1
𝑠=𝑇 be set to suitable value.
1+𝑧 −1
Bilinear Transformation: Mapping
Characteristics
The bilinear transformation is derived by
applying the trapezoidal numerical integration
approach to the differential equation
representation of H(s) that leads to the
difference equation representation of H(z).
s j 2 r 2 1
T 1 r 2r cos
2
z re j
2 2r sin
2 re j 1 T 1 r 2r cos
2
j j
T re 1
If r < 1 then σ<0 and if r>1 then σ>0.
2 r cos 1 j sin
Therefore, the left hand s-plane maps inside the
T r cos 1 j sin
unit circle of z-plane and right hand s-plane maps
2
r 2 1
j
2r sin
outside the unit circle.
T 1 r 2 2r cos 1 r 2 2r cos Again r=1 implies σ=0, the imaginary axis jΩ of s-plane
maps into unit circle of z-plane.
Bilinear Transformation: Frequency
Warping Effect
2 sin 2 T
For r = 1: tan
2 tan
T 1 cos T 2
1
2
The point Ω=∞ maps the point ω=π
and Ω=-∞ maps the point ω=-π.
Thus the entire range of is mapped
only once into the range No
aliasing and one to one mapping.
However, the mapping is highly
nonlinear.
The mapping is compressed at high
frequency end. This effect is called
frequency warping.
Warping effect needs to be taken
into consideration while designing
IIR digital filter.
Illustration of Frequency Warping
Effect in BPF design from Analog
Frequency Response
Example 1:
Convert following first order analog Butterworth prototype
LPF to a digital filter with cut off frequency 0.2π using
Bilinear transformation.
14
4
Basic IIR Filter Structures:
Direct-Forms:
Direct Form I
Direct From II
Transposed Form
Cascade Form (Cascade of Second order sections)
Parallel Form
Lattice – Ladder Form
Factors that influence our choice:
Computational complexity in terms of number of arithmetic
operations (multiplications and additions)
Memory requirements: number of locations required to store the co-
efficients, past inputs and outputs (delay elements) and any
intermediate computed values.
Finite-word-length effects (Finite precision effects): Quantization
error effects due to finite precision of hardware/software
Capability of Parallel or Pipelined processing
Direct Form I:
2(1 − 𝑧 −1 )(1 + 2𝑧 −1 + 𝑧 −2 )
𝐻 𝑧 =
(1 + 0.5𝑧 −1 )(1 − 0.9𝑧 −1 + 0.81𝑧 −2 )
Solution: Residues for parallel form:
C=-4.938, K1=2.157, K2=4.78, K3=-1.595
Module XI
Finite Precision Effects
15
9
Finite Precision Effects: Finite Word
Length Effects
In any digital hardware the word length (bit size) of register, memory
location and arithmetic unit (adder, multiplier) is finite can represent
finite precision number only.
Finite Precision Effects in hardware implementation occur due to:
1. Input (Signal) Quantization representation of signal sample
problem of ADC SQNR = α + 6n; where α is constant depending on
nature of signal and n is number of bits used to represent signal
amplitude.
2. Co-efficient (System) Quantization representation of filter co-
efficients using finite word length register. This effect is more serious in
IIR systems than in FIR Change in pole locations due to finite
precision representation of system co-efficients change in stability.
3. Arithmetic (Process) Quantization Overflow and Round off noise
in addition and multiplication, Limit cycles (undesirable oscillations in
output) Results of addition and multiplication are represented by
using finite precision Influenced by data format used by processor
Fixed point Vs. Floating point.
General model accounting for finite-
precision effects:
𝐻 𝑧 = 𝑀−1 𝑘=0 𝑏𝑘 𝑧
−𝑘 = 𝑀−1 𝑏 𝑧 −𝑘 + 𝑀−1 ∆𝑏 𝑧 −𝑘 = 𝐻 𝑧 +
𝑘=0 𝑘 𝑘=0 𝑘
∆𝐻 𝑧
Effectively it is two FIR systems connected in parallel.
System function of the quantized system ∆𝐻 𝑧 is linearly
related to the quantization errors in the filter coefficients.
Frequency Response: 𝐻 ω = 𝐻 𝜔 + ∆𝐻 𝜔
Designer: Needs to take care of some error specifications
(allowable tolerance) in 𝐻 𝜔 so that actual filter 𝐻 ω
meets the specifications within allowable tolerance.
Error bound is used as guidelines in determining suitable
word length for a given FIR filter.
Error Bound:
Let we want to allow co-efficient quantization error ∆𝑏𝑘 in
range [-∆/2, ∆/2]: ∆𝑏𝑘 𝑚𝑎𝑥 ≤ ∆/2
∆𝐻 𝜔 = 𝑀−1 𝑘=0 ∆𝑏𝑘 𝑒
−𝑗𝜔𝑘
𝑀−1 −𝑗𝜔𝑘
∆𝐻 𝜔 = 𝑘=0 ∆𝑏𝑘 𝑒
𝑀−1 𝑀−1
𝜕𝐷 𝑧
𝜕𝑎𝑘
𝜕𝑝𝑖 𝑧=𝑝𝑖 −𝑝𝑖 𝑁−𝑘
= 𝜕𝐷 𝑧 = 𝑁 (By analysis)
𝜕𝑎𝑘 𝑗=1,𝑗≠𝑖 (𝑝𝑖 −𝑝𝑗 )
𝜕𝑧 𝑧=𝑝𝑖