Ece V Digital Signal Processing (10ec52) Notes
Ece V Digital Signal Processing (10ec52) Notes
10EC52
SYLLABUS
IA MARKS : 25
EXAM HOURS : 03
EXAMMARKS : 100
TRANSFORMS
UNIT - 4
RADIX-2 FFT
ALGORITHM FOR THE COMPUTATION OF DFT AND IDFTDECIMATIONINTIME AND DECIMATION-IN-FREQUENCY ALGORITHMS. GOERTZEL ALGORITHM, AND CHIRP-Z
TRANSFORM.
7 HRS
UNIT - 5
IIR FILTER DESIGN: CHARACTERISTICS OF COMMONLY
BUTTERWORTH AND CHEBYSHEVE FILTERS, ANALOG
TRANSFORMATIONS.
UNIT - 6
IMPLEMENTATION OF DISCRETE-TIME SYSTEMS: STRUCTURES FOR IIR AND FIR SYSTEMS
DIRECT FORM I AND DIRECT FORM II SYSTEMS, CASCADE, LATTICE AND PARALLEL
REALIZATION.
7 HRS
UNIT - 7
FIR FILTER DESIGN: INTRODUCTION TO FIR FILTERS, DESIGN OF FIR FILTERS USING RECTANGULAR, HAMMING, BARTLET AND KAISER WINDOWS, FIR FILTER DESIGN USING
FREQUENCY SAMPLING TECHNIQUE.
6 HRS
UNIT - 8
DESIGN OF IIR FILTERS FROM ANALOG FILTERS (BUTTERWORTH AND CHEBYSHEV) IMPULSE INVARIANCE METHOD. MAPPING OF TRANSFER FUNCTIONS: APPROXIMATION OF
DERIVATIVE (BACKWARD DIFFERENCE AND BILINEAR TRANSFORMATION) METHOD,
MATCHED Z TRANSFORMS, VERIFICATION FOR STABILITY AND LINEARITY DURING MAPPING
7 HRS
Dept., of ECE/SJBIT
Page 1
10EC52
TEXT BOOK:
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
REFERENCE BOOKS:
1. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
2. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 3RD EDITION, 2010.
3. DIGITAL SIGNAL PROCESSING, LEE TAN: ELSIVIER PUBLICATIONS, 2007
Dept., of ECE/SJBIT
Page 2
10EC52
INDEX SHEET
SL.NO
I
1.1
1.2
1.3
1.4
II
2.1
2.2
2.3
2.4
2.5
III
3.1
3.2
3.2
IV
4.1
4.2
4.3
4.4
V
5.1
5.2
5.3
5.4
VI
6.1
6.2
6.3
6.4
VII
7.1
7.2
7.3
7.4
7.5
7.6
VIII
TOPIC
Unit-1: Discrete Fourier Transforms
Frequency Domain Sampling
Reconstruction of Discrete time signals
DFT as a Linear Transform
DFT relationship with other transforms
UNIT - 2 : Properties of DFT
Multiplication of two DFTs Circular convolution
Additional DFT properties
Use of DFT in Linear Filtering
Overlap save and Overlap Add Method
Solution to Problems
UNIT 3 : Fast Fourier Transform Algorithms
Direct computation of DFT
Need for Efficient computation of DFT
FFT algorithms
UNIT 4 : Radix-2 FFT Algorithms for DFT and
IDFT
Decimation In Time Algorithms
Decimation-in-Frequency Algorithms
Goertzel Algorithms
Chirp-z-Transforms
UNIT 5 : IIR Filter Design
Characteristics of commonly used Analog Filters
Butterworth and Chebysheve Filters
Analog to Analog Frequency Transforms
Solution to problems
UNIT 6 : FIR Filter Design
Introduction to FIR filters
Design of FIR Filters using Rectangular and Hamming
window
Design of FIR Filters using Bartlet and Hamming window
F IR filter design using frequency sampling technique
UNIT 7 : Design of IIR Filters from Analog Filters
Impulse Invariance Method
Mapping of Transfer Functions
Approximation of derivative (Backward Difference and
Bilinear Transforms) method
Matched Z transforms
Verification for stability and Linearity during mapping
Solution to problems
UNIT 8 : Implementation of Discrete time systems
Dept., of ECE/SJBIT
PAGE NO.
6-16
18-26
27-35
39-60
61-78
79-106
107-144
141-161
Page 3
10EC52
Dept., of ECE/SJBIT
Page 4
10EC52
UNIT 1
FOURIER
TRANSFORMS
(DFT):
FREQUENCY
DFT
DOMAIN
SAMPLING
AND
6 HRS
RECOMMENDED READINGS
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 5
10EC52
UNIT 1
Discrete Fourier Transform
1.1
Introduction:
Before we introduce the DFT we consider the sampling of the Fourier transform of an
aperiodic discrete-time sequence. Thus we establish the relation between the sampled Fourier
transform and the DFT.A discrete time system may be described by the convolution sum, the
Fourier representation and the z transform as seen in the previous chapter. If the signal is
periodic in the time domain DTFS representation can be used, in the frequency domain the
spectrum is discrete and periodic. If the signal is non-periodic or of finite duration the
frequency domain representation is periodic and continuous this is not convenient to
implement on the computer. Exploiting the periodicity property of DTFS representation the
finite duration sequence can also be represented in the frequency domain, which is referred to
as Discrete Fourier Transform DFT.
DFT is an important mathematical tool which can be used for the software
implementation of certain digital signal processing algorithms .DFT gives a method to
transform a given sequence to frequency domain and to represent the spectrum of the sequence
using only k frequency values, where k is an integer that takes N values, K=0, 1, 2,..N-1.
The advantages of DFT are:
1. It is computationally convenient.
2. The DFT of a finite length sequence makes the frequency domain analysis much
simpler than continuous Fourier transform technique.
1.2
Consider an aperiodic discrete time signal x (n) with Fourier transform, an aperiodic finite
energy signal has continuous spectra. For an aperiodic signal x[n] the spectrum is:
X w
xn e
jwn
(1.1)
Dept., of ECE/SJBIT
Page 6
10EC52
2
as shown
N
below in Fig.1.1.
X[w]
w
0
Let us first consider selection of N, or the number of samples in the frequency domain.
If we evaluate equation (1) at w
2k
N
2k
X
xne j 2kn / N
N n
k 0,1,2,......., ( N 1) . (1.2)
We can divide the summation in (1) into infinite number of summations where each sum
contains N terms.
1
N 1
2 N 1
2k
j 2kn / N
j 2kn / N
.......
x
n
e
x
n
e
xne j 2kn / N
N
n N
n 0
n N
lN N 1
xne
j 2kn / N
l n lN
If we then change the index in the summation from n to n-l N and interchange the order of
summations we get:
Dept., of ECE/SJBIT
Page 7
10EC52
j 2kn / N
2k N 1
N xn lN e
n 0 l
Denote the quantity inside the bracket as xp[n]. This is the signal that is a repeating version of
x[n] every N samples. Since it is a periodic signal it can be represented by the Fourier series.
N 1
x p n ck e j 2kn / N
n 0,1,2,........, ( N 1)
k 0
With FS coefficients:
ck
1
N
N 1
x ne
j 2kn / N
n 0
k 0,1,2,......., ( N 1) (1.4)
Comparing the expressions in equations (1.4) and (1.3) we conclude the following:
ck
1 2
X
N N
k 0,1,......., ( N 1) . (1.5)
x p n
1
N
N 1
2 j 2kn / N
k e
X N
k 0
n 0,1,....., ( N 1) . (1.6)
The above formula shows the reconstruction of the periodic signal xp[n] from the samples of
the spectrum X[w]. But it does not say if X[w] or x[n] can be recovered from the samples.
Dept., of ECE/SJBIT
Page 8
10EC52
x[n]
n
0
L
xp[n]
N>=L
No aliasing
n
0
L
xp[n]
N
N<L
Aliasing
n
0
N
Fig. 1.2 Signal Reconstruction
Hence we conclude:
The spectrum of an aperiodic discrete-time signal with finite duration L can be exactly
2k
recovered from its samples at frequencies wk
if N >= L.
N
We compute xp[n] for n=0, 1,....., N-1 using equation (1.6)
Then X[w] can be computed using equation (1.1).
1.3
-jn
X (j) = x (n)
n= -
jn
X (n) =1/2 X (j) e
d , Where 2k/n
Dept., of ECE/SJBIT
Page 9
10EC52
2
Where x(n) is a finite duration sequence, X(j) is periodic with period 2.It is
convenient sample X(j) with a sampling frequency equal an integer multiple of its period =m
that is taking N uniformly spaced samples between 0 and 2.
Let k= 2k/n, 0kN-1
-j2kn/N
Therefore X(j) = x(n)
n=
Since X(j) is sampled for one period and there are N samples X(j) can be expressed
as
X(k) = X(j) =2kn/N
n=0
1.4
N-1
-j2kn/N
x(n)
0kN-1
1
1
1
1
1
-j
-1
j
1
-1
1
-1
1
j
-1
-j
Page 10
10EC52
Where {ck} are the Fourier coefficients. If we sample xa(t) at a uniform rate Fs = N/Tp = 1/T,
we obtain discrete time sequence
With ROC that includes unit circle. If X(z) is sampled at the N equally spaced points on the
unit circle Zk = e j2k/N for K= 0,1,2,..N-1 we obtain
The above expression is identical to Fourier transform X() evaluated at N equally spaced
frequencies k = 2k/N for K= 0,1,2,..N-1.
Dept., of ECE/SJBIT
Page 11
10EC52
If the sequence x(n) has a finite duration of length N or less. The sequence can be recovered
from its N-point DFT. Consequently X(z) can be expressed as a function of DFT as
Dept., of ECE/SJBIT
Page 12
10EC52
Question 3
Compute the eight-point DFT circular convolution for the following sequence
X3(n) = cos 3n/8
Dept., of ECE/SJBIT
Page 13
10EC52
Question 4
Define DFT. Establish a relation between the Fourier series coefficients of a continuous time
signal and DFT
Solution
The DTFT representation for a finite duration sequence is
Solution:-
Dept., of ECE/SJBIT
Page 14
10EC52
Question 6
Find the 4-point DFT of sequence x(n) = 6+ sin(2n/N), n= 0,1,N-1
Solution :-
Question 7
Solution
Dept., of ECE/SJBIT
Page 15
10EC52
Question 8
Solution
Dept., of ECE/SJBIT
Page 16
10EC52
UNIT 2
PROPERTIES OF DISCRETE FOURIER TRANSFORMS (DFT)
CONTENTS:PROPERTIES
OF
DFT,
MULTIPLICATION OF TWO
DFTS-
6 HRS
RECOMMENDED READINGS
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 17
10EC52
Unit 2
Properties of DFT
2.1 Properties:The DFT and IDFT for an N-point sequence x(n) are given as
In this section we discuss about the important properties of the DFT. These properties are
helpful in the application of the DFT to practical problems.
Periodicity:-
2.1.2 Linearity:
Dept., of ECE/SJBIT
If
Page 18
10EC52
X (k)
2.1.6 Symmetry:
Dept., of ECE/SJBIT
Page 19
10EC52
If x(n)
then
X(k)
Page 20
10EC52
Time shift:
If x (n) X (k)
mk
Then x (n-m) WN
X (k)
Question 2
State and Prove the: (i) Circular convolution property of DFT; (ii) DFT of Real and even
sequence.
Solution
(i) Convolution theorem
Circular convolution in time domain corresponds to multiplication of the DFTs
If y(n) = x(n) h(n) then Y(k) = X(k) H(k)
Ex let x(n) = 1,2,2,1 and h(n) = 1,2,2,1 Then y (n) = x(n) h(n)
Y(n) = 9,10,9,8
N pt DFTs of 2 real sequences can be found using a single DFT
Dept., of ECE/SJBIT
Page 21
10EC52
If g(n) & h(n) are two sequences then let x(n) = g(n) +j h(n)
G(k) = (X(k) + X*(k))
H(k) = 1/2j (X(K) +X*(k))
2N pt DFT of a real sequence using a single N pt DFT
Let x(n) be a real sequence of length 2N with y(n) and g(n) denoting its N pt DFT
Let y(n) = x(2n) and g(2n+1)
X (k) = Y (k) + WNK G (k)
Using DFT to find IDFT
The DFT expression can be used to find IDFT
X(n) = 1/N [DFT(X*(k)]*
(ii)DFT of Real and even sequence.
For a real sequence, if x(n) X(k)
X (N-K) = X* (k)
For a complex sequence
DFT(x*(n)) = X*(N-K)
If x(n)
then
X(k)
Real and even
real odd
Even and imaginary
imaginary and even
Question 3
Distinguish between circular and linear convolution
Solution
1) Circular convolution is used for periodic and finite signals while linear convolution is
used for aperiodic and infinite signals.
2) In linear convolution we convolved one signal with another signal where as in circular
convolution the same convolution is done but in circular pattern depending upon the
samples of the signal
3) Shifts are linear in linear in linear convolution, whereas it is circular in circular
convolution.
Question 4
Dept., of ECE/SJBIT
Page 22
10EC52
Solution(a)
Solution(b)
Solution(c)
Solution(d)
Dept., of ECE/SJBIT
Page 23
10EC52
Question 5
Solution
Question 6
Solution
Dept., of ECE/SJBIT
Page 24
10EC52
Dept., of ECE/SJBIT
Page 25
10EC52
UNIT 3
FAST FOURIER TRANSFORMS (FFT) ALOGORITHMS
CONTENTS:USE
OF
DFT
IN LINEAR FILTERING
COMPUTATION OF
DFT,
DFT (FFT
DIRECT
ALGORITHMS).
7 HRS
RECOMMENDED READINGS
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 26
10EC52
UNIT 3
FAST-FOURIER-TRANSFORM (FFT) ALGORITHMS
3.1 Digital filtering using DFT
In a LTI system the system response is got by convoluting the input with the impulse
response. In the frequency domain their respective spectra are multiplied. These spectra are
continuous and hence cannot be used for computations. The product of 2 DFT s is equivalent
to the circular convolution of the corresponding time domain sequences. Circular convolution
cannot be used to determine the output of a linear filter to a given input sequence. In this case a
frequency domain methodology equivalent to linear convolution is required. Linear
convolution can be implemented using circular convolution by taking the length of the
convolution as N >= n1+n2-1 where n1 and n2 are the lengths of the 2 sequences.
The IDFT yields data blocks of length N that are free of aliasing since the size of the
DFTs and IDFT is N = L+M -1 and the sequences are increased to N-points by appending
zeros to each block. Since each block is terminated with M-1 zeros, the last M-1 points from
each output block must be overlapped and added to the first M-1 points of the succeeding
Dept., of ECE/SJBIT
Page 27
10EC52
block. Hence this method is called the overlap method. This overlapping and adding yields the
output sequences given below.
Page 28
10EC52
In this method the size of the I/P data blocks is N= L+M-1 and the size of the DFts and
IDFTs are of length N. Each data block consists of the last M-1 data points of the previous
data block followed by L new data points to form a data sequence of length N= L+M-1. An Npoint DFT is computed from each data block. The impulse response of the FIR filter is
increased in length by appending L-1 zeros and an N-point DFT of the sequence is computed
once and stored.
The multiplication of two N-point DFTs {H(k)} and {Xm(k)} for the mth block of data yields
Since the data record is of the length N, the first M-1 points of Ym(n) are corrupted by
aliasing and must be discarded. The last L points of Ym(n) are exactly the same as the result
from linear convolution and as a consequence we get
Dept., of ECE/SJBIT
Page 29
10EC52
for k = 0, . . . , N - 1 where
We would like the procedure to be fast, simple, and accurate. Fast is the most important, so we will
sacrifice simplicity for speed, hopefully with minimal loss of accuracy
Page 30
10EC52
(Possibly even less since Sin is just Cos shifted by a quarter periods, so we could save just Cos
when N is a multiple of 4.)
Why tabulate? To avoid repeated function calls to Cos and sin when computing the DFT. Now
we can compute each X[k] directly form the formula as follows
For each value of k, there are N complex multiplications, and (N-1) complex additions. There
are N values of k, so the total number of complex operations is
Complex multiplies require 4 real multiplies and 2 real additions, whereas complex additions
require just 2 real additions N2 complex multiplies are the primary concern.
N2 increases rapidly with N, so how can we reduce the amount of computation? By exploiting
the following properties of W:
The first and third properties hold for even N, i.e., when 2 is one of the prime factors of N.
There are related properties for other prime factors of N.
Page 31
10EC52
straight forward implementation of the DFT can be computationally expensive because the
number of multiplies grows as the square of the input length (i.e. N2 for an N point DFT). The
FFT reduces this computation using two simple but important concepts. The first concept,
known as divide-and-conquer, splits the problem into two smaller problems. The second
concept, known as recursion, applies this divide-and-conquer method repeatedly until the
problem is solved.
Solution:-
Question 2
Solution:-
Dept., of ECE/SJBIT
Page 32
10EC52
Question 3
Solution:-
Dept., of ECE/SJBIT
Page 33
10EC52
Question 4
Solution:- (a)
(b)
Dept., of ECE/SJBIT
Page 34
10EC52
UNIT 4
GOERTZEL
7 HRS
RECOMMENDED READINGS
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 35
10EC52
UNIT 4
RADIX-2 FFT ALGORITHM FOR THE COMPUTATION OF DFT AND
IDFT
4.1 Introduction:
Standard frequency analysis requires transforming time-domain signal to frequency
domain and studying Spectrum of the signal. This is done through DFT computation. N-point
DFT computation results in N frequency components. We know that DFT computation
through FFT requires N/2 log2N complex multiplications and N log2N additions. In certain
applications not all N frequency components need to be computed (an application will be
discussed). If the desired number of values of the DFT is less than 2 log2N than direct
computation of the desired values is more efficient that FFT based computation.
Page 36
10EC52
Dept., of ECE/SJBIT
Page 37
10EC52
Now, let us split X(k) into the even and odd-numbered samples. Thus we obtain
Dept., of ECE/SJBIT
Page 38
10EC52
Page 39
10EC52
The computation procedure can be repeated through decimation of the N/2-point DFTs,
X(2k) and X(2k+1). The entire process involves v = log2 N of decimation, where each stage
involves N/2 butterflies of the type shown in figure 4.3.
Dept., of ECE/SJBIT
Page 40
10EC52
Dept., of ECE/SJBIT
Page 41
10EC52
X (k ) x(n)WNnk
(1)
n 0
Since
WN kN
N 1
m 0
m 0
X (k ) WN kN x(m)WNmk x(m)WN k ( N m )
(2)
yk (n) x(m)WN k ( n m )
(3)
m 0
hk (n) WN kn u (n)
(4)
Where yk(n) is the out put of a filter which has impulse response of hk(n) and input x(n).
The output of the filter at n = N yields the value of the DFT at the freq k = 2k/N
The filter has frequency response given by
H k ( z)
1
1 WN k z 1
(6)
The above form of filter response shows it has a pole on the unit circle at the frequency k =
2k/N.
Entire DFT can be computed by passing the block of input data into a parallel bank of N
single-pole filters (resonators)
Dept., of ECE/SJBIT
Page 42
10EC52
The above form of filter response shows it has a pole on the unit circle at the frequency k =
2k/N.
Entire DFT can be computed by passing the block of input data into a parallel bank of N
single-pole filters (resonators)
1.3 Difference Equation implementation of filter:
From the frequency response of the filter (eq 6) we can write the following difference
equation relating input and output;
H k ( z)
Yk ( z )
1
X ( z ) 1 WN k z 1
y k (n) WN k y k (n 1) x(n)
y k (1) 0
(7)
The desired output is X(k) = yk(n) for k = 0,1,N-1. The phase factor appearing in the
difference equation can be computed once and stored.
The form shown in eq (7) requires complex multiplications which can be avoided
doing suitable modifications (divide and multiply by 1 WNk z 1 ). Then frequency response of
the filter can be alternatively expressed as
H k ( z)
1 WNk z 1
1 2 cos(2k / N ) z 1 z 2
(8)
This is second order realization of the filter (observe the denominator now is a second-order
expression). The direct form realization of the above is given by
Dept., of ECE/SJBIT
(9)
vk (1) vk (2) 0
(10)
Page 43
10EC52
The recursive relation in (9) is iterated for n = 0,1,N, but the equation in (10) is computed
only once at time n =N. Each iteration requires one real multiplication and two additions.
Thus, for a real input sequence x(n) this algorithm requires (N+1) real multiplications to yield
X(k) and X(N-k) (this is due to symmetry). Going through the Goertzel algorithm it is clear
that this algorithm is useful only when M out of N DFT values need to be computed where M
2log2N, Otherwise, the FFT algorithm is more efficient method. The utility of the algorithm
completely depends on the application and number of frequency components we are looking
for.
Page 44
10EC52
From the given specifications we see that the spacing between the frequency samples is
/512 or 2/1024. In order to achieve this freq resolution we take 1024- point FFT of
the given 128-point seq by appending the sequence with 896 zeros. Since we need
only 128 frequencies out of 1024 there will be big wastage of computations in this
scheme.
X ( z k ) x(n) z k n
k 0,1,......L 1
(11)
n 0
Where zk is a generalized contour. Zk is the set of points in the z-plane falling on an arc which
begins at some point z0 and spirals either in toward the origin or out away from the origin such
that the points {zk}are defined as,
zk r0 e j 0 ( R0 e j0 ) k
Dept., of ECE/SJBIT
k 0,1,....L 1
(12)
Page 45
10EC52
Note that,
a. if R0< 1 the points fall on a contour that spirals toward the origin
b. If R0 > 1 the contour spirals away from the origin
c. If R0= 1 the contour is a circular arc of radius
d.If r0=1 and R0=1 the contour is an arc of the unit circle.
(Additionally this contour allows one to compute the freq content of the sequence x(n) at
dense set of L frequencies in the range covered by the arc without having to compute a large
DFT (i.e., a DFT of the sequence x(n) padded with many zeros to obtain the desired resolution
in freq.))
e. If r0= R0=1 and 0=0 0=2/N and L = N the contour is the entire unit circle similar to the
standard DFT. These conditions are shown in the following diagram.
Dept., of ECE/SJBIT
Page 46
10EC52
N 1
n 0
n 0
X ( z k ) x(n) z k n x(n)( r0 e j 0 ) nW nk
where
W R0 e j0
(13)
(14)
X ( zk ) W k
/2
(15)
k 0,1,..........L 1
(16)
Where
h(n) W n
/2
/2
N 1
y ( k ) g ( n) h( k n)
(17)
n 0
Page 47
10EC52
signal, which increases linearly with time. Such signals are used in radar systems are called
chirp signals. Hence the name chirp z-transform.
The portion of h(n) can be defined in many ways, one such way is,
Dept., of ECE/SJBIT
Page 48
10EC52
h2 (n) h(n)
0 n L 1
h(n ( N L 1))
L n M 1
10. Compute Y2(k) = G(K)H2(k), The desired values of y2(n) are in the range
0 n L-1 i.e.,
y(n) = y2(n) n=0,1,.L-1
11. Finally, the complex values X(zk) are computed by dividing y(k) by h(k)
For k =0,1,L-1
Page 49
10EC52
five-pole system with a periodic impulse train. The system was simulated to correspond to a
sampling freq. of 10 kHz. The poles are located at center freqs of 270,2290,3010,3500 & 4500
Hz with bandwidth of 30, 50, 60,87 & 140 Hz respectively.
Solution: Observe the pole-zero plots and corresponding magnitude frequency response for
different choices of |w|. The following observations are in order:
The first two spectra correspond to spiral contours outside the unit circle with a resulting
broadening of the resonance peaks
The last two choices correspond to spiral contours which spirals inside the unit circle and
close to the pole locations resulting in a sharpening of resonance peaks.
Dept., of ECE/SJBIT
Page 50
10EC52
Dept., of ECE/SJBIT
Page 51
10EC52
Solution:-
Dept., of ECE/SJBIT
Page 52
10EC52
Question 2
Page 53
10EC52
Question 3
Solution:-
Question 4
Solution:-
Dept., of ECE/SJBIT
Page 54
10EC52
Question 5
Solution:-
Question 6
Solution:-
This can be viewed as the convolution of the N-length sequence x(n) with implulse
response of a linear filter
Dept., of ECE/SJBIT
Page 55
10EC52
Dept., of ECE/SJBIT
Page 56
10EC52
UNIT 5
IIR FILTER DESIGN
CONTENTS:IIR
FILTER DESIGN:
BUTTERWORTH
AND
CHARACTERISTICS
CHEBYSHEVE
FILTERS,
ANALOG
TO
ANALOG
TRANSFORMATIONS.
FREQUENCY
6 HRS
RECOMMENDED READINGS
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 57
10EC52
Unit 5
Design of IIR Filters
5.1 Introduction
A digital filter is a linear shift-invariant discrete-time system that is realized using finite
precision arithmetic. The design of digital filters involves three basic steps:
The specification of the desired properties of the system.
The approximation of these specifications using a causal discrete-time system.
The realization of these specifications using finite precision arithmetic.
These three steps are independent; here we focus our attention on the second step. The
desired digital filter is to be used to filter a digital signal that is derived from an analog signal
by means of periodic sampling. The specifications for both analog and digital filters are often
given in the frequency domain, as for example in the design of low pass, high pass, band pass
and band elimination filters.
Given the sampling rate, it is straight forward to convert from frequency specifications
on an analog filter to frequency specifications on the corresponding digital filter, the analog
frequencies being in terms of Hertz and digital frequencies being in terms of radian frequency
or angle around the unit circle with the point Z=-1 corresponding to half the sampling
frequency. The least confusing point of view toward digital filter design is to consider the filter
as being specified in terms of angle around the unit circle rather than in terms of analog
frequencies.
Dept., of ECE/SJBIT
Page 58
10EC52
Many of the filters used in practice are specified by such a tolerance scheme, with no
constraints on the phase response other than those imposed by stability and causality
requirements; i.e., the poles of the system function must lie inside the unit circle. Given a set
of specifications in the form of Fig. 5.1, the next step is to and a discrete time linear system
whose frequency response falls within the prescribed tolerances. At this point the filter design
problem becomes a problem in approximation. In the case of infinite impulse response (IIR)
filters, we must approximate the desired frequency response by a rational function, while in the
finite impulse response (FIR) filters case we are concerned with polynomial approximation.
Dept., of ECE/SJBIT
Page 59
10EC52
The traditional approach to the design of IIR digital filters involves the transformation
of an analog filter into a digital filter meeting prescribed specifications. This is a reasonable
approach because:
The art of analog filter design is highly advanced and since useful results can be
achieved, it is advantageous to utilize the design procedures already developed for
analog filters.
Many useful analog design methods have relatively simple closed-form design
formulas.
Therefore, digital filter design methods based on analog design formulas are rather simple to
implement. An analog system can be described by the differential equation
In transforming an analog filter to a digital filter we must therefore obtain either H(z)
or h(n) (inverse Z-transform of H(z) i.e., impulse response) from the analog filter design. In
such transformations, we want the imaginary axis of the S-plane to map into the nit circle of
the Z-plane, a stable analog filter should be transformed to a stable digital filter. That is, if the
analog filter has poles only in the left-half of S-plane, then the digital filter must have poles
only inside the unit circle. These constraints are basic to all the techniques discussed here.
Dept., of ECE/SJBIT
Page 60
10EC52
Where, N is the order of the filter, c is the -3dB frequency, i.e., cutoff frequency, p is the
pass band edge frequency and 1= (1 /1+2 ) is the band edge value of Ha()2. Since the
product Ha(s) Ha(-s) and evaluated at s = j is simply equal to Ha()2, it follows that
The poles of Ha(s)Ha(-s) occur on a circle of radius c at equally spaced points. From Eq.
(5.29), we find the pole positions as the solution of
And hence, the N poles in the left half of the s-plane are
Dept., of ECE/SJBIT
Page 61
10EC52
Note that, there are no poles on the imaginary axis of s-plane, and for N odd there will
be a pole on real axis of s-plane, for N even there are no poles even on real axis of s-plane.
Also note that all the poles are having conjugate symmetry. Thus the design methodology to
design a Butterworth low pass filter with 2 attenuation at a specified frequency s is Find N,
Where is a parameter of the filter related to the ripple in the pass band as shown in Fig.
(5.7), and TN is the Nth order Chebyshev polynomial defined as
Dept., of ECE/SJBIT
Page 62
10EC52
Page 63
10EC52
The angular positions of the left half s-plane poles are given by
Then the positions of the left half s-plane poles are given by
Where k = r2 Cos k and k = r1 Sink. The order of the filter is obtained from
A Type II Chebyshev filter contains zero as well as poles. The magnitude squared response is
given as
Where TN(x) is the N-order Chebyshev polynomial. The zeros are located on the imaginary
axis at the points
Dept., of ECE/SJBIT
Page 64
10EC52
Where
and
The other approximation techniques are elliptic (equiripple in both passband and
stopband) and Bessel (monotonic in both passband and stopband).
To convert low pass filter into highpass filter the transformation used is
Dept., of ECE/SJBIT
Page 65
10EC52
Thus we obtain
Dept., of ECE/SJBIT
Page 66
10EC52
Where T is the sampling period and 1/T is the sampling frequency and it always corresponds
to 2 radians in the digital domain. In this problem, let us assume T = 1sec.
Then c = 0:5 and s = 0:75
Let us find the order of the desired filter using
Dept., of ECE/SJBIT
Page 67
10EC52
Dept., of ECE/SJBIT
Page 68
10EC52
b)
c) For the bilinear transformation technique, we need to pre-warp the digital frequencies
into corresponding analog frequencies.
Dept., of ECE/SJBIT
Page 69
10EC52
Question 2
Design a digital filter using impulse invariant technique to satisfy following
characteristics
(i) Equiripple in pass band and monotonic in stop band
(ii) -3dB ripple with pass band edge frequency at 0:5 radians.
(iii) Magnitude down at least 15dB at 0:75 radians.
Solution: Assuming T=1, = 0:5 and s = 0:75
The order of desired filter is
Dept., of ECE/SJBIT
Page 70
10EC52
Dept., of ECE/SJBIT
Page 71
10EC52
Dept., of ECE/SJBIT
Page 72
10EC52
Question 3
Dept., of ECE/SJBIT
Page 73
10EC52
Question 4
Solution:-
Dept., of ECE/SJBIT
Page 74
10EC52
UNIT 6
Implementation of Discrete time systems
CONTENTS:IMPLEMENTATION OF DISCRETE-TIME SYSTEMS: STRUCTURES FOR IIR AND FIR SYSTEMS
DIRECT FORM
II
REALIZATION.
7 HRS
RECOMMENDED READINGS:1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 75
10EC52
UNIT 6
Implementation of Discrete-Time Systems
6.1 Introduction
The two important forms of expressing system leading to different realizations of FIR & IIR
filters are
a) Difference equation form
N
k 1
k 1
y (n) a k y (n k ) bk x(n k )
b) Ration of polynomials
M
H (Z )
b Z
k 0
N
1 a k Z k
k 1
Dept., of ECE/SJBIT
Page 76
10EC52
M 1
b x(n k )
k 0
M 1
b Z
k 0
b 0 n n 1
Where we can identify h(n) n
0 otherwise
Different FIR Structures used in practice are,
1. Direct form
2. Cascade form
3. Frequency-sampling realization
4. Lattice realization
6.2.1 Direct Form Structure
Convolution formula is used to express FIR system given by,
y ( n)
M 1
h( k )
x(n k )
k 0
As can be seen from the above implementation it requires M-1 memory locations for
storing the M-1 previous inputs
It requires computationally M multiplications and M-1 additions per output point
It is more popularly referred to as tapped delay line or transversal system
Efficient structure with
linear phase characteristics are
possible where
h( n) h( M 1 n)
Dept., of ECE/SJBIT
Page 77
10EC52
Prob:
Realize the following system function using minimum number of multiplication
1
1
1
1
(1) H ( Z ) 1 Z 1 Z 2 Z 3 Z 4 Z 5
3
4
4
3
1 1 1 1
We recognize h(n) 1, , , , , 1
3 4 4 3
M is even = 6, and we observe h(n) = h(M-1-n)
h(n) = h(5-n)
i.e h(0) = h(5)
h(1) = h(4)
h(2) = h(3)
Direct form structure for Linear phase FIR can be realized
Exercise: Realize the following using system function using minimum number of
multiplication.
1
1
1
1
1
1
H ( Z ) 1 Z 1 Z 2 Z 3 Z 5 Z 6 Z 7 Z 8
4
3
2
2
3
4
1 1 1
1 1 1
h(n) 1, , , , , , , 1
m=9
2 3 4
4 3 2
odd symmetry
h(n) = -h(M-1-n);
h(n) = -h(8-n);
h(m-1/2) = h(4) = 0
h(0) = -h(8);
h(1) = -h(7); h(2) = -h(6); h(3) = -h(5)
Dept., of ECE/SJBIT
Page 78
10EC52
H (Z ) H k (Z )
k 1
Where H k ( Z ) bk 0 bk1 Z 1 bk 2 Z 2 k = 1, 2, .. K
and K = integer part of (M+1) / 2
The filter parameter b0 may be equally distributed among the K filter section, such that b0
= b10 b20 . bk0 or it may be assigned to a single filter section. The zeros of H(z) are grouped
in pairs to produce the second order FIR system. Pairs of complex-conjugate roots are
formed so that the coefficients {bki} are real valued.
Dept., of ECE/SJBIT
Page 79
10EC52
In case of linear phase FIR filter, the symmetry in h(n) implies that the zeros of H(z)
also exhibit a form of symmetry. If zk and zk* are pair of complex conjugate zeros then
1/zk and 1/zk* are also a pair complex conjugate zeros. Thus simplified fourth order
sections are formed. This is shown below,
Soln:
Dept., of ECE/SJBIT
Page 80
10EC52
This form can be realized with cascade of FIR and IIR structures. The term (1-z-N) is realized
1 N 1 H (k )
as FIR and the term
as IIR structure.
N k 0 1 WNk z 1
The realization of the above freq sampling form shows necessity of complex arithmetic.
Incorporating symmetry in h(n) and symmetry properties of DFT of real sequences the
realization can be modified to have only real coefficients.
H ( z)
Page 81
10EC52
1a
r1 (n) k1 f 0 (n) r0 (n 1)
1b
if
k1 a1 (1), then
f 1 ( n) y ( n)
If m=2
Y ( z)
1 a 2 (1) z 1 a 2 (2) z 2
X ( z)
y (n) x(n) a 2 (1) x(n 1) a 2 (2) x(n 2)
y (n) f 1 (n) k 2 r1 (n 1)
( 2)
Page 82
10EC52
a 2 (1) k1 k1 k 2
a 2 (1) k 2
Solving the above equation we get
k1
a2 (1)
1 a2 (2)
and
k 2 a2 (2)
(4)
Equation (3) means that, the lattice structure for a second-order filter is simply a cascade of
two first-order filters with k1 and k2 as defined in eq (4)
Similar to above, an Mth order FIR filter can be implemented by lattice structures with
M stages
a m (i ) a m (m)a m (m i )
1 k m2
Dept., of ECE/SJBIT
1 i m 1
Page 83
10EC52
The above expression fails if km=1. This is an indication that there isa zero on the unit
circle. If km=1, factor out this root from A(z) and the recursive formula can be applied
for reduced order system.
for m 2 and m 1
k 2 a 2 (2) & k1 a1 (1)
for m 2 & i 1
a (1) a 2 (2)a 2 (1) a 2 (1)[1 a 2 (2)]
a 2 (1)
a1 (1) 2
1 a 2 (2)
1 k 22
1 a 22 (2)
Thus k1
a 2 (1)
1 a 2 (2)
Problem:
Given FIR filter H ( Z ) 1 2Z 1 13 Z 2 obtain lattice structure for the same
Given a1 (1) 2 , a2 (2) 13
Using the recursive equation for
m = M, M-1, , 2, 1
here M=2
therefore m = 2, 1
if m=2 k 2 a2 (2) 13
if m=1 k1 a1 (1)
also, when m=2 and i=1
a2 (1)
2
3
a1 (1)
1 a2 (2) 1 13 2
Hence k1 a1 (1) 3 2
Dept., of ECE/SJBIT
Page 84
10EC52
a3 (0) 1
a3 (3) k 3 1
1
1
1
, k 2 , k 3 . Determine the FIR
2
4
3
direct
form
structure
1
3
1
a1 (1) k1
2
a 2 ( 2) k 2
1 1
1
2 3
4 2
6 3
9 3
12 4
Dept., of ECE/SJBIT
Page 85
a 3 (1)
a3 (0) 1 ,
3
,
4
10EC52
3 1
6 2
a 3 ( 2)
1
,
2
a3 (3)
1
4
b z
H(Z) =
k 0
N
1 a k z k
k 1
k 1
k 0
y (n) a k y (n k ) bk x(n k )
Dept., of ECE/SJBIT
Page 86
10EC52
Y ( z) V ( z) Y ( z)
.
X ( z) X ( z) V ( z)
where V(z) is an intermediate term. We identify,
H ( z)
V ( z)
X ( z)
1
N
1 ak z
-------------------all poles
k
k 1
M
Y ( z)
1 bk z k
-------------------all zeros
V ( z ) k 1
v ( n) x ( n) a k v ( n k )
k 1
Dept., of ECE/SJBIT
Page 87
10EC52
This realization requires M+N+! multiplications, M+N addition and the maximum of
{M, N} memory location
Dept., of ECE/SJBIT
Page 88
10EC52
H ( z ) H 1 ( z ) H 2 ( z )....H k ( z )
Where H k (Z ) could be first order or second order section realized in Direct form II form
i.e.,
bk 0 bk1 Z 1 bk 2 Z 2
H k (Z )
1 a k1 Z 1 a k 2 Z 2
where K is the integer part of (N+1)/2
Similar to FIR cascade realization, the parameter b0 can be distributed equally among the
k filter section B0 that b0 = b10b20..bk0. The second order sections are required to realize
section which has complex-conjugate poles with real co-efficients. Pairing the two complexconjugate poles with a pair of complex-conjugate zeros or real-valued zeros to form a
subsystem of the type shown above is done arbitrarily. There is no specific rule used in the
combination. Although all cascade realizations are equivalent for infinite precision arithmetic,
the various realizations may differ significantly when implemented with finite precision
arithmetic.
H k (Z )
H (Z ) C
1
k 1
k 1 1 p k Z
Where {pk} are the poles, {Ak} are the coefficients in the partial fraction expansion, and the
constant C is defined as C bN a N , The system realization of above form is shown below.
bk 0 bk1 Z 1
Where H k ( Z )
1 a k1 Z 1 a k 2 Z 2
Dept., of ECE/SJBIT
Page 89
10EC52
Once again choice of using first- order or second-order sections depends on poles of the
denominator polynomial. If there are complex set of poles which are conjugative in nature then
a second order section is a must to have real coefficients.
Problem 2
Determine the
(i)Direct form-I
(ii) Direct form-II
(iii) Cascade &
(iv)Parallel form realization of the system function
H (Z )
3
4
Dept., of ECE/SJBIT
10 1 76 Z 1 13 Z 2 1 2Z 1
Z 1 1 18 Z 1 1 12 j 12 Z 1 1 12 j 12 Z 1
7
8
Z 1 323 Z 2 1 Z 1 12 Z 2
H (Z )
H ( z)
10 1 12 Z 1 1 23 Z 1 1 2Z 1
10 1 56 Z 1 2Z 2 23 Z 3
15
8
3
47
Z 1 32
Z 2 17
643 Z 4
32 Z
7 1 3 2
1
(1 z
z )
(1 z 1 z 2 )
8
32
2
Page 90
10EC52
Cascade Form
H(z) = H1(z) H2(z)
Where
7
1
1 z 1 z 2
6
3
H1 ( z)
7 1 3 2
1 z
z
8
32
H1 ( z)
10(1 2 z 1 )
1
1 z 1 z 2
2
Dept., of ECE/SJBIT
Page 91
10EC52
Parallel Form
H(z) = H1(z) + H2(z)
7 1 3 2
1
(1 z
z )
(1 z 1 z 2 )
8
32
2
Problem: 3
Obtain the direct form I, direct form-II
Cascade and parallel form realization for the following system,
y(n)= -0.1 y(n-1)+0.2y(n-2)+3x(n)+3.6 x(n-1)+0.6 x(n-2)
Solution:
The Direct form realization is done directly from the given i/p o/p equation, show in below
diagram
H ( z)
Y ( z ) 3 3.6 z 1 0.6 z 2
X ( z ) 1 0.1z 1 0.2 z 2
Dept., of ECE/SJBIT
Page 92
10EC52
3 0.6 z 1
1 z 1
H
(
z
)
and
2
1 0.5 z 1
1 0.4 z 1
7
1
1
1 0.4 z
1 0.5 z 1
Dept., of ECE/SJBIT
Page 93
10EC52
1
N
1 a N (k ) Z k
1
AN ( Z )
k 1
y ( n) a N ( k ) y ( n k ) x ( n)
k 1
OR
N
x ( n) y ( n) a N ( k ) y ( n k )
k 1
For N=1
x(n) y(n) a1 (1) y(n 1)
Which can realized as,
We observe
x(n) f1 (n)
y(n) f 0 (n) f1 (n) k1 g 0 (n 1)
x(n) k1 y(n 1)
g1 (n) k1 f 0 (n) g 0 (n 1) k1 y(n) y(n 1)
k1 a1 (1)
Page 94
10EC52
This output can be obtained from a two-stage lattice filter as shown in below fig
f 2 (n) x(n)
f1 (n) f 2 (n) k 2 g1 (n 1)
g 2 (n) k 2 f1 (n) g1 (n 1)
f 0 (n) f1 (n) k1 g 0 (n 1)
g1 (n) k1 f 0 (n) g 0 (n 1)
y (n) f 0 (n) g 0 (n) f1 (n) k1 g 0 (n 1)
f 2 (n) k 2 g1 (n 1) k1 g 0 (n 1)
f 2 (n) k 2 k1 f 0 (n 1) g 0 (n 2) k1 g 0 (n 1)
f N ( n) x ( n)
f m1 (n) f m (n) k m g m1 (n 1)
g m (n) k m f m1 (n) g m1 (n 1)
Dept., of ECE/SJBIT
m=N, N-1,---1
m=N, N-1,---1
Page 95
10EC52
am (m) k m ;
am (0) 1
am (k ) am1 (k ) am (m)am1 (m k )
Conversion from direct form to lattice structure
am1 (0) 1
am1 (k )
k m a m (m)
am (k ) am (m) am (m k )
1 am2 (m)
If,
M
B (Z )
H (Z ) M
AN ( Z )
b
k 0
N
(k ) Z k
1 a N (k ) Z k
k 1
Where N M
A lattice structure can be constructed by first realizing an all-pole lattice co-efficients
k m , 1 m N for the denominator AN(Z), and then adding a ladder part for M=N. The
output of the ladder part can be expressed as a weighted linear combination of {gm(n)}.
Now the output is given by
M
y ( n) C m g m ( n)
m 0
Where {Cm} are called the ladder co-efficient and can be obtained using the recursive relation,
C m bm
C a (i m);
i m 1
Dept., of ECE/SJBIT
m=M, M-1, .0
Page 96
10EC52
Problem:4
Convert the following pole-zero IIR filter into a lattice ladder structure,
1 2Z 1 2Z 2 Z 3
H (Z )
1
1 13
85 Z 2 13 Z 3
24 Z
Solution:
Given bM ( Z ) 1 2Z 1 2Z 2 Z 3
1
85 Z 2 13 Z 3
And AN ( Z ) 1 13
24 Z
a3 (0) 1; a3 (1)
13
24
; a3 (2) 85 ; a3 (3)
1
3
k 3 a3 (3) 13
Using the equation
a (k ) am (m)am (m k )
am1 (k ) m
1 a 2 m(m)
for m=3, k=1
1 5
a (1) a3 (3)a3 (2) 13
24 3 . 8
a 2 (1) 3
2
1 a32 (3)
1 13
3
8
a2 (2) k 2
5
8
13 . 13
24
1
1 9
4513
72
8
9
1
2
a1 (1) k1
Dept., of ECE/SJBIT
Page 97
163
1 ( 12 ) 2 1 14
3
8
3
8
1
4
10EC52
1
3
C .a (1 m)
1
i m 1
m=M, M-1,1,0
C3 b3 1; C 2 b2 C3 a3 (1)
M=3
2 1.( 13
24 ) 1.4583
3
C1 b1 c1 a1 (i m)
i 2
b1 c 2 a 2 (1) c3 a3( 2)
m=1
2 1.4583( 83 ) 85 0.8281
3
c0 b0 c1 a1 (i m)
i 1
To convert a lattice- ladder form into a direct form, we find an equation to obtain
a N (k ) from k m (m=1,2,N) then equation for c m is recursively used to compute bm
(m=0,1,2,M).
Problem 5
Dept., of ECE/SJBIT
Page 98
10EC52
Dept., of ECE/SJBIT
Page 99
10EC52
Question 6
Dept., of ECE/SJBIT
Page 100
Dept., of ECE/SJBIT
10EC52
Page 101
Dept., of ECE/SJBIT
10EC52
Page 102
10EC52
UNIT 7
FIR FILTER DESIGN
CONTENTS:FIR
FILTER DESIGN:
INTRODUCTION
TO
FIR
AND
FILTERS, DESIGN OF
KAISER
WINDOWS,
FIR
FIR
FILTERS USING
6 HRS
RECOMMENDED READINGS
1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 103
10EC52
UNIT 7
Design of FIR Filters
7.1 Introduction:
Two important classes of digital filters based on impulse response type are
Finite Impulse Response (FIR)
Infinite Impulse Response (IIR)
H ( z)
b z
k 0
N
1 ak z
(1)
k
k 1
k 0
k 0
ak y(n k ) bk x(n k )
(2)
Each of this form allows various methods of implementation. The eq (2) can be viewed
as a computational procedure (an algorithm) for determining the output sequence y(n) of the
system from the input sequence x(n). Different realizations are possible with different
arrangements of eq (2)
Dept., of ECE/SJBIT
Page 104
10EC52
7.3.1 Disadvantages:
Sharp cutoff at the cost of higher order
Higher order leading to more delay, more memory and higher cost of implementation
Dept., of ECE/SJBIT
Page 105
10EC52
communication applications. Having linear phase ensures constant group delay for all
frequencies.
The further discussions are focused on FIR filter.
6.5 Examples of simple FIR filtering operations: 1.Unity Gain Filter
y(n)=x(n)
2. Constant gain filter
y(n)=Kx(n)
3. Unit delay filter
y(n)=x(n-1)
4.Two - term Difference filter
y(n) = x(n)-x(n-1)
5. Two-term average filter
y(n) = 0.5(x(n)+x(n-1))
6. Three-term average filter (3-point moving average filter)
y(n) = 1/3[x(n)+x(n-1)+x(n-2)]
7. Central Difference filter
y(n)= 1/2[ x(n) x(n-2)]
When we say Order of the filter it is the number of previous inputs used to compute the
current output and Filter coefficients are the numbers associated with each of the terms x(n),
x(n-1),.. etc
The table below shows order and filter coefficients of above simple filter types:
Dept., of ECE/SJBIT
Page 106
10EC52
Ex.
order
a0
a1
a2
4(HP) 1
-1
5(LP) 1
1/2
1/2
6(LP) 2
1/3
1/3
1/3
7(HP) 2
1/2
-1/2
b x(n k )
k 0
-(1)
M 1
h( k ) x ( n k )
- (2)
k 0
Dept., of ECE/SJBIT
Page 107
M 1
h( k ) z
10EC52
-(3) polynomial of degree M-1 in the variable z-1. The roots of this
k 0
M 1
)
2
M 1 (
h(
)z
2
M 1
)
2
M 3 (
h(
)z
2
M 3
)
2
...........
M 1
M 3
M 1
(
)
(
)
(
)
M 1
M 1 1
M 3 2
2
2
z
h(1) z
............ h(
) h(
) z h(
) z .....h( M 1) z 2
h(0) z
2
2
2
M 1
)
2
h(0) h( M 1)
h(1) h( M 2)
.
.
M 1
M 1
h(
) h(
)
2
2
M 1
M 3
h(
) h(
)
2
2
.
.
h( M 1) h(0)
Dept., of ECE/SJBIT
Page 108
10EC52
M 3
2
M
1
( M 1 2 n ) / 2
( M 1 2 n ) / 2
H ( z) z
h(
) h(n){ z
z
}
2
n 0
H ( z) z
M 1
)
2
M 1
)
2
M2 1
h(n){ z ( M 1 2 n ) / 2 z ( M 1 2 n ) / 2 }
n 0
2
M
1
M 1
j
H r (e ) h (
) 2 h(n) cos (
n)
2
2
n 0
M 1
( ) (
) if | H r (e j ) | 0
2
M 1
(
) if | H r (e j ) | 0
2
In case of M even the phase response remains the same with magnitude response expressed as
M2 1
1
H r (e j ) 2 h(n) cos (
n)
n 0
If the impulse response satisfies anti symmetry property (i.e., h(n)=-h(M-1-n))then for
M odd we will have
M 1
M 1
M 1
h(
) h(
) i.e., h(
)0
2
2
2
M23
M 1
j
H r (e ) 2 h(n) sin (
n)
n 0
If M is even then,
Dept., of ECE/SJBIT
Page 109
10EC52
M2 1
M 1
j
H r (e ) 2 h(n) sin (
n)
n 0
( ) (
The number of filter coefficients that specify the frequency response is (M+1)/2 when is M
odd and M/2 when M is even in case of symmetric conditions
In case of impulse response antisymmetric we have h(M-1/2)=0 so that there are
filter coefficients when M is odd and M/2 coefficients when M is even
(M-1/2)
Dept., of ECE/SJBIT
Page 110
10EC52
H ( z ) h( n) z n
n o
H ( z ) z ( M 1) [ h(n)( z 1 ) n ] z ( M 1) H ( z 1 )
n 0
Dept., of ECE/SJBIT
Page 111
10EC52
The plot above shows distribution of zeros for a Linear phase FIR filter. As it can be seen
there is pattern in distribution of these zeros.
7.7 Methods of designing FIR filters:
The standard methods of designing FIR filter can be listed as:
1. Fourier series based method
2. Window based method
3. Frequency sampling method
7.7.1 Design of Linear Phase FIR filter based on Fourier Series method:
Motivation: Since the desired freq response Hd(ej) is a periodic function in with
period 2, it can be expressed as Fourier series expansion
H d ( e j )
h ( n )e
1
2
jn
(e j )e jn d
This expansion results in impulse response coefficients which are infinite in duration and non
causal. It can be made finite duration by truncating the infinite length. The linear phase can be
obtained by introducing symmetric property in the filter impulse response, i.e., h(n) = h(-n). It
can be made causal by introducing sufficient delay (depends on filter length)
7.7.2 Stepwise procedure:
1. From the desired freq response using inverse FT relation obtain hd(n)
2. Truncate the infinite length of the impulse response to finite length with
M odd)
( assuming
Dept., of ECE/SJBIT
Page 112
10EC52
Exercise Problems
Problem 1 : Design an ideal bandpass filter with a frequency response:
H d (e j ) 1
for
3
4
4
0
otherwise
Find the values of h(n) for M = 11 and plot the frequency response.
hd (n)
1
2
(e j )e jn d
/ 4
3 / 4
1
jn
jn
e d e d
2 3 / 4
/4
1 3
sin
n
sin
n n
n
4
4
truncating to 11 samples we have h(n) hd (n) for | n | 5
0 otherwise
For n = 0 the value of h(n) is separately evaluated from the basic integration
h(0) = 0.5
Other values of h(n) are evaluated from h(n) expression
h(1)=h(-1)=0
h(2)=h(-2)=-0.3183
h(3)=h(-3)=0
h(4)=h(-4)=0
h(5)=h(-5)=0
The transfer function of the filter is
Dept., of ECE/SJBIT
Page 113
( N 1) / 2
[h(n){z
10EC52
z n }]
n 1
0.5 0.3183( z 2 z 2 )
the transfer function of the realizable filter is
H ' ( z ) z 5 [0.5 0.3183( z 2 z 2 )]
0.3183z 3 0.5 z 5 0.3183z 7
the filter coeff are
h ' (0) h' (10) h' (1) h' (9) h' (2) h' (8) h' (4) h' (6) 0
h' (3) h' (7) 0.3183
h' (5) 0.5
| H (e j ) |
( N 1) / 2
a(n) cos n
n 1
We have
a(0)=h(0)
a(1)=2h(1)=0
a(2)=2h(2)=-0.6366
a(3)=2h(3)=0
a(4)=2h(4)=0
a(5)=2h(5)=0
The magnitude response function is
|H(e j)| = 0.5 0.6366 cos 2 which can plotted for various values of
in degrees =[0 20 30 45 60 75 90 105 120 135 150 160 180];
Dept., of ECE/SJBIT
Page 114
10EC52
|H(e j)| in dBs= [-17.3 -38.17 -14.8 -6.02 -1.74 0.4346 1.11 0.4346 -1.74 -6.02 -14.8 -38.17 17.3];
for
for
Find the values of h(n) for N =11. Find H(z). Plot the magnitude response
From the freq response we can determine hd(n),
n
sin
/2
1
2 n and
hd (n)
e j n d
2 / 2
n
Truncating hd(n) to 11 samples
n0
h(0) = 1/2
h(1)=h(-1)=0.3183
h(2)=h(-2)=0
h(3)=h(-3)=-0.106
Dept., of ECE/SJBIT
Page 115
10EC52
h(4)=h(-4)=0
h(5)=h(-5)=0.06366
The realizable filter can be obtained by shifting h(n) by 5 samples to right h(n)=h(n-5)
h(n)= [0.06366, 0, -0.106, 0, 0.3183, 0.5, 0.3183, 0, -0.106, 0, 0.06366];
M 1
M 1
) h(n) cos (
n)]
2
2
n 0
| H r (e j ) || [0.5 0.6366 cos w 0.212 cos 3w 0.127 cos 5w] |
H r ( e j ) [ h (
Problem 3 :
Design an ideal band reject filter with a frequency response:
H d (e j ) 1
0
for
3
otherwise
and
2
3
Find the values of h(n) for M = 11 and plot the frequency response
-0.1378 0];
Dept., of ECE/SJBIT
Page 116
10EC52
W ( e j )
sin( M / 2)
sin( / 2)
The whole process of multiplying h(n) by a window function and its effect in freq domain are
shown in below set of figures.
Dept., of ECE/SJBIT
Page 117
10EC52
Suppose the filter to be designed is Low pass filter then the convolution of ideal filter freq
response and window function freq response results in distortion in the resultant filter freq
response. The ideal sharp cutoff chars are lost and presence of ringing effect is seen at the band
edges which is referred to Gibbs Phenomena. This is due to main lobe width and side lobes of
the window function freq response.The main lobe width introduces transition band and side
lobes results in rippling characters in pass band and stop band. Smaller the main lobe width
smaller will be the transition band. The ripples will be of low amplitude if the peak of the first
side lobe is far below the main lobe peak.
Dept., of ECE/SJBIT
Page 118
10EC52
wr (n) 1 for 0 n M 1
Dept., of ECE/SJBIT
2n
) for 0 n M 1
M 1
Page 119
10EC52
2n
for 0 n M 1
M 1
Dept., of ECE/SJBIT
Page 120
10EC52
wbart (n) 1
M 1
|
2
M 1
2|n
for 0 n M 1
2
M
1
M
I0
n
2
2
wk (n)
M 1
I 0
Dept., of ECE/SJBIT
for 0 n M 1
Page 121
Type of window
10EC52
Appr. Transition
Peak
sidelobe (dB)
Rectangular
4/M
-13
Bartlett
8/M
-27
Hanning
8/M
-32
Hamming
8/M
-43
Blackman
12/M
-58
Looking at the above table we observe filters which are mathematically simple do not
offer best characteristics. Among the window functions discussed Kaiser is the most complex
one in terms of functional description whereas it is the one which offers maximum flexibility
in the design.
7.8.9 Procedure for designing linear-phase FIR filters using windows:
1. Obtain hd(n) from the desired freq response using inverse FT relation
2. Truncate the infinite length of the impulse response to finite length with
Dept., of ECE/SJBIT
Page 122
10EC52
3.
4.
5.
Exercise Problems
Prob 1: Design an ideal highpass filter with a frequency response:
H d ( e j ) 1
0
for
| |
1
hd (n)
[
2
Dept., of ECE/SJBIT
/ 4
jn
jn
d ]
/4
Page 123
10EC52
1
n
[sin n sin ] for n and
n
4
/ 4
1
3
hd (0)
[ d d ] 0.75
2
4
/4
hd (n)
n0
hd(1) = hd(-1)=-0.225
hd(2) = hd(-2)= -0.159
hd(3) = hd(-3)= -0.075
hd(4) = hd(-4)= 0
hd(5) = hd(-5) = 0.045
The hamming window function is given by
2n
M 1
otherwise
M 1
M 1
)n(
)
2
2
N 11
n
5
5 n 5
whn(0) = 1
whn(1) = whn(-1)=0.9045
whn(2)= whn(-2)=0.655
whn(3)= whn(-3)= 0.345
whn(4)= whn(-4)=0.0945
whn(5)= whn(-5)=0
h(n)= whn(n)hd(n)
Dept., of ECE/SJBIT
Page 124
10EC52
M 3
2
M 1
M 1
H r (e jw ) [h(
) 2 h(n) cos (
n)
2
2
n 0
4
Dept., of ECE/SJBIT
Page 125
10EC52
for
| |
hd (n)
1
2
/4
j 3
e j n d
/4
(n 3)
4
(n 3)
this gives hd (0) hd (6) 0.075
sin
Dept., of ECE/SJBIT
Page 126
10EC52
7.9 Design of Linear Phase FIR filters using Frequency Sampling method
7.9.1 Motivation: We know that DFT of a finite duration DT sequence is obtained by sampling FT
of the sequence then DFT samples can be used in reconstructing original time domain samples if
frequency domain sampling was done correctly. The samples of FT of h(n) i.e., H(k) are sufficient
to recover h(n).
Since the designed filter has to be realizable then h(n) has to be real, hence even
symmetry properties for mag response |H(k)| and odd symmetry properties for phase response
can be applied. Also, symmetry for h(n) is applied to obtain linear phase chas.
Fro DFT relationship we have
1
h( n)
N
N 1
H ( k )e
j 2kn / N
for n 0,1,......N 1
k 0
N 1
H (k ) h(n)e j 2kn / N
for k 0,1,.........N 1
n 0
H ( z ) h( n) z n
n 0
H ( z)
1 z N
N
N 1
H (k )
1 e
k 0
Dept., of ECE/SJBIT
j 2kn / N
z 1
Page 127
10EC52
Since H(k) is obtained by sampling H(ej) hence the method is called Frequency Sampling
Technique.
Since the impulse response samples or coefficients of the filter has to be real for filter to be
realizable with simple arithmetic operations, properties of DFT of real sequence can be used.
The following properties of DFT for real sequences are useful:
H*(k) = H(N-k)
|H(k)|=|H(N-k)| - magnitude response is even
(k) = - (N-k) Phase response is odd
h( n)
1
N
N 1
H ( k )e
j 2kn / N
k 0
N 1
H
(
0
)
H (k )e j 2kn / N
k 1
N 1 / 2
N 1
1
h( n)
1
N
h( n)
1
N
h( n)
1
N
h( n)
1
N
h( n)
1
N
h( n)
1
N
( N 1) / 2
( N 1) / 2
j 2kn / N
H
(
0
)
H
(
k
)
e
H ( N k )e j 2kn / N
k 1
k 1
( N 1) / 2
( N 1) / 2
j 2kn / N
H * (k )e j 2kn / N
H (0) H (k )e
k 1
k 1
( N 1) / 2
( N 1) / 2
j 2kn / N
( H (k )e j 2kn / N ) *
H (0) H (k )e
k 1
k 1
( N 1) / 2
H
(
0
)
( H (k )e j 2kn / N ( H (k )e j 2kn / N ) *
k 1
( N 1) / 2
j 2kn / N
H (0) 2 Re( H (k )e
k 1
h( n)
1
N
( N 1) / 2
H
(
0
)
2
Re( H (k )e j 2kn / N
k 1
Dept., of ECE/SJBIT
Page 128
10EC52
Using the symmetry property h(n)= h (N-1-n) we can obtain Linear phase FIR filters using the
frequency sampling technique.
Exercise problems
Prob 1 : Design a LP FIR filter using Freq sampling technique having cutoff freq of /2
rad/sample. The filter should have linear phase and length of 17.
H d (e ) e
j (
M 1
)
2
for | | c
0
otherwise
with M 17 and c / 2
H d ( e j ) e j 8
for 0 / 2
for / 2
Selecting k
2k 2k
M
17
H (k ) H d (e j ) |
H (k ) e
0
H (k ) e
2k
8
17
2k
17
2k
17
2
2k
/2
17
for 0
for
j
16k
17
for k 0,1,......16
17
4
17
17
for
k
4
2
for 0 k
Dept., of ECE/SJBIT
Page 129
10EC52
H (k ) e
0
2k
8
17
for
for 0 k 4
5k 8
h(n)
Dept., of ECE/SJBIT
Page 130
10EC52
between to +
1
cos n
hd (n)
j e jn d
n and n 0
2
n
The hd(n) is an add function with hd(n)=-hd(-n) and hd(0)=0
a) rectangular window
h(n)=hd(n)wr(n)
h(1)=-h(-1)=hd(1)=-1
h(2)=-h(-2)=hd(2)=0.5
h(3)=-h(-3)=hd(3)=-0.33
h(n)=h(n-3) for causal system
thus,
( M 3) / 2
h(n) sin (
n 0
M 1
n)
2
b) Hamming window
h(n)=hd(n)wh(n)
where wh(n) is given by
Dept., of ECE/SJBIT
Page 131
2n
( M 1)
10EC52
( M 1) / 2 n ( M 1) / 2
0 otherwise
3 n 3
3
The window function coefficients are given by for n=-3 to +3
Wh(n)= [0.08 0.31 0.77 1 0.77 0.31 0.08]
We observe
With rectangular window, the effect of ripple is more and transition band width is
small compared with hamming window
With hamming window, effect of ripple is less whereas transition band is more
Page 132
10EC52
is very useful when out of phase component (or imaginary part) need to be generated from
available real component of the signal.
Solution:
As seen from freq chars it is defined as
H d (e j ) j 0
0
1
(1 cos n)
hd (n)
[ je jn d je jn d ]
n except n 0
2
n
0
At n = 0 it is hd(0) = 0 and hd(n) is an odd function
0
a) Rectangular window
h(n) = hd(n) wr(n) = hd(n) for -5 n 5
h(n)=h(n-5)
h(n)= [-0.127, 0, -0.212, 0, -0.636, 0, 0.636, 0, 0.212, 0, 0.127]
Dept., of ECE/SJBIT
Page 133
10EC52
H r (e j ) 2 h(n) sin (5 n)
n 0
b) Blackman Window
window function is defined as
n
2n
wb (n) 0.42 0.5 cos 0.08 cos
5
5
0
otherwise
5 n 5
Wb(n) = [0, 0.04, 0.2, 0.509,0.849,1,0.849, 0.509, 0.2, 0.04,0] for -5n5
h(n) = h(n-5) = [0, 0, -0.0424, 0, -0.5405, 0, 0.5405, 0, 0.0424, 0, 0]
Dept., of ECE/SJBIT
Page 134
10EC52
Solution:-
Dept., of ECE/SJBIT
Page 135
10EC52
Phase plot
Dept., of ECE/SJBIT
Page 136
10EC52
Question 2
Solution:-
Dept., of ECE/SJBIT
Page 137
Dept., of ECE/SJBIT
10EC52
Page 138
10EC52
Question 3
Solution:-
Dept., of ECE/SJBIT
Page 139
10EC52
Question 4
Solu
tion:-
Dept., of ECE/SJBIT
Page 140
10EC52
UNIT 8
Design of IIR Filters from Analog Filters
CONTENTS:DESIGN
OF
IIR
INVARIANCE METHOD.
(BACKWARD
MAPPING
DIFFERENCE
AND
(BUTTERWORTH
OF TRANSFER FUNCTIONS:
BILINEAR
AND
CHEBYSHEV) -
APPROXIMATION
TRANSFORMATION)
METHOD,
IMPULSE
OF DERIVATIVE
MATCHED
7 HRS
RECOMMENDED READINGS:1. DIGITAL SIGNAL PROCESSING PRINCIPLES ALGORITHMS & APPLICATIONS, PROAKIS &
MONALAKIS, PEARSON EDUCATION, 4TH EDITION, NEW DELHI, 2007.
2. DISCRETE TIME SIGNAL PROCESSING, OPPENHEIM & SCHAFFER, PHI, 2003.
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.
Dept., of ECE/SJBIT
Page 141
10EC52
UNIT - 8
DESIGN OF IIR FILTERS FROM ANALOG FILTERS
(BUTTERWORTH AND CHEBYSHEV)
8.1 Introduction
A digital filter is a linear shift-invariant discrete-time system that is realized using finite
precision arithmetic. The design of digital filters involves three basic steps:
The specification of the desired properties of the system.
The approximation of these specifications using a causal discrete-time system.
The realization of these specifications using _nite precision arithmetic.
These three steps are independent; here we focus our attention on the second step.
The desired digital filter is to be used to filter a digital signal that is derived from an analog
signal by means of periodic sampling. The speci_cations for both analog and digital filters are
often given in the frequency domain, as for example in the design of low
pass, high pass, band pass and band elimination filters. Given the sampling rate, it is straight
Page 142
10EC52
the point Z=-1 corresponding to half the sampling frequency. The least confusing point of
view toward digital filter design is to consider the filter as being specified in terms of angle
around the unit circle rather than in terms of analog frequencies.
Many of the filters used in practice are specified by such a tolerance scheme, with no
constraints on the phase response other than those imposed by stability and causality
requirements; i.e., the poles of the system function must lie inside the unit circle. Given a set
of specifications in the form of Fig. 7.1, the next step is to and a discrete time linear system
whose frequency response falls within the prescribed tolerances. At this point the filter design
problem becomes a problem in approximation. In the case of infinite impulse response (IIR)
filters, we must approximate the desired frequency response by a rational function, while in the
finite impulse response (FIR) filters case we are concerned with polynomial approximation.
Page 143
10EC52
Therefore, digital filter design methods based on analog design formulas are rather simple to
implement.
An analog system can be described by the differential equation
------------------------------------------------------------7.1
And the corresponding rational function is
---------------------------------------------------------7.2
--------------------------------------------------7.3
and the rational function
--------------------------------------------------------7.4
In transforming an analog filter to a digital filter we must therefore obtain either H(z)or h(n)
(inverse Z-transform of H(z) i.e., impulse response) from the analog filter design. In such
transformations, we want the imaginary axis of the S-plane to map into the finite circle of the
Z-plane, a stable analog filter should be transformed to a stable digital filter. That is, if the
analog filter has poles only in the left-half of S-plane, then the digital filter must have poles
only inside the unit circle. These constraints are basic to all the techniques discussed
Dept., of ECE/SJBIT
Page 144
10EC52
This technique of transforming an analog filter design to a digital filter design corresponds to
choosing the unit-sample response of the digital filter as equally spaced samples of the impulse
response of the analog filter. That is,
-------------------------------------------------------------------------7.5
Where T is the sampling period. Because of uniform sampling, we have
---------------------------------------------7.6
Or
---------------------------------------------7.7
Page 145
10EC52
Figure 7.3: Illustration of the effects of aliasing in the impulse invariance technique
analog filter as
------------------------------------------------7.8
From the discussion of the sampling theorem it is clear that if and only if
Then
Unfortunately, any practical analog filter will not be band limited, and consequently there is
interference between successive terms in Eq. (7.8) as illustrated in Fig. 7.3. Because of the
aliasing that occurs in the sampling process, the frequency response of the resulting digital
filter will not be identical to the original analog frequency response. To get the filter design
procedure, let us consider the system function of the analog filter expressed in terms of a
partial-fraction expansion
-----------------------------------------------------------------------7.9
The corresponding impulse response is
Dept., of ECE/SJBIT
Page 146
10EC52
--------------------------------------------------------------- 7.10
And the unit-sample response of the digital filter is then
--------------7.11
The system function of the digital filter H(z) is given by
------------------------------------------------------------7.12
In comparing Eqs. (7.9) and (7.12) we observe that a pole at s=sk in the S-plane transforms to
a pole at expskT in the Z-plane. It is important to recognize that the impulse invariant design
procedure does not correspond to a mapping of the S-plane to the Z-plane.
--------------------------7.13
Where y(n)=y(nT). Approximation to higher-order derivatives are obtained by repeated
application of Eq. (7.13); i.e.,
-------------------------- 7.14
For convenience we define
-------------------------------------------------------------------7.15
Dept., of ECE/SJBIT
Page 147
10EC52
---------------------------------------------7.16
Where y(n) = ya(nT) and x(n) = xa(nT). We note that the operation (1)[ ] is a linear shiftinvariant operator and that (k)[ ] can be viewed as a cascade of (k) operators (1)[ ]. In
particular
And
------------------------------------------------------------7.17
Comparing Eq. (7.17) to (7.2), we observe that the digital transfer function can be obtained
directly from the analog transfer function by means of a substitution of variables
---------------------------------------------------------------------------------7.18
So that, this technique does indeed truly correspond to a mapping of the S-plane to the Zplane, according to Eq. (7.18). To investigate the properties of this mapping, we must express
z as a function of s, obtaining
Dept., of ECE/SJBIT
Page 148
10EC52
------------------------------------------------------7.19
Which corresponds to a circle whose center is at z =1/2 and radius is 1/2, as shown in Fig. 7.4.
It is easily verified that the left half of the S-plane maps into the inside of the small circle and
the right half of the S-plane maps onto the outside of the small circle. Therefore, although the
requirement of mapping the j-axis to the unit circle is not satisfied, this mapping does satisfy
the stability condition.
Page 149
10EC52
In the previous section a digital filter was derived by approximating derivatives by differences.
An alternative procedure is based on integrating the differential equation and then using a
numerical approximation to the integral. Consider the first - order equation
-----------------------------------------------------------7.20
Where ya(t) is the first derivative of ya(t). The corresponding analog system function is
----------------------7.21
However, from Eq. (7.20),
Where y(n) = y(nT) and x(n) = x(nT). Taking the Z-transform and solving for H(z) gives
--------------------------------------------7.22
Dept., of ECE/SJBIT
Page 150
10EC52
From Eq. (7.22) it is clear that H(z) is obtained from Ha(s) by the substitution
-------------------------------------------------------------------7.23
That is,
--------------------------------------------------------------7.24
This can be shown to hold in general since an Nth - order differential equation of the form of
Eq. (7.1) can be written as a set of N first-order equations of the form of Eq. (7.20). Solving
Eq. (7.23) for z gives
----------------------------------------------------------------------------7.25
The invertible transformation of Eq. (7.23) is recognized as a bilinear transformation. To see
that this mapping has the property that the imaginary axis in the s-plane maps onto the unit
circle in the z-plane, consider z = ej, then from Eq. (7.23), s is given by
Dept., of ECE/SJBIT
Page 151
10EC52
Figure 7.5: Mapping of analog frequency axis onto the unit circle using the bilinear
Transformation
Thus for z on the unit circle, = 0 and and are related by
T /2 = tan (/2)
or
= 2 tan -1(T /2)
This relationship is plotted in Fig. (7.5), and it is referred as frequency warping. From the
_gure it is clear that the positive and negative imaginary axis of the s-plane are mapped,
respectively, into the upper and lower halves of the unit circle in the z-plane. In addition to the
fact that the imaginary axis in the s-plane maps into the unit circle in the z-plane, the left half
of the s-plane maps to the inside of the unit circle and the right half of the s-plane maps to the
outside of the unit circle, as shown in Fig. (7.6). Thus we see that the use of the bilinear
transformation yields stable digital filter from analog filter. Also this transformation avoids the
problem of aliasing encountered with the use of impulse invariance, because it maps the entire
imaginary axis in the s-plane onto the unit circle in the z-plane. The price paid for this,
however, is the introduction of a distortion in the frequency axis.
Dept., of ECE/SJBIT
Page 152
10EC52
Figure 4.6: Mapping of the s-plane into the z-plane using the bilinear transformation
-----------------------------------------------------------------7.26
the corresponding digital filter is
---------------------------------------------------------7.27
Where T is the sampling interval. Thus each factor of the form (s-a) in Ha(s) is mapped
into the factor (1- eaT z-1).
Dept., of ECE/SJBIT
Page 153
10EC52
Dept., of ECE/SJBIT
Page 154
10EC52
Question 2
Question 3
Dept., of ECE/SJBIT
Page 155
10EC52
Question 4
Question 5
Dept., of ECE/SJBIT
Page 156
Dept., of ECE/SJBIT
10EC52
Page 157
10EC52
Question 6
Dept., of ECE/SJBIT
Page 158
10EC52
Question 7
Dept., of ECE/SJBIT
Page 159
Dept., of ECE/SJBIT
10EC52
Page 160
Dept., of ECE/SJBIT
10EC52
Page 161