Digital Signal Processing-Full
Digital Signal Processing-Full
hsqsev2sqxev
ygisxq
Second Edition
About the Author
A. Nagoor Kani is a multifaceted personality with an efficient technical expertise and management skills.
He obtained his BE in EEE from Thiagarajar College of Engineering, Madurai and MS (Electronics and
Control) through Distance Learning program of BITS, Pilani.
He started his career as a self-employed industrialist (1986-1989) and then changed his career to teaching
in 1989. He has worked as lecturer in Dr MGR Engineering College (1989-1990) and as Asst. Professor
in Satyabhama Engineering College (1990-1997). The author started his own coaching centre for BE
students named Institute of Electrical Engineering which was renamed as RBA Tutorials in 2005. The
author started his own companies in 1997. The companies currenly run by him are RBA Engineering
(manufacturing of lab equipments and microprocessor trainer kits), RBA Innovations (involved in developing
projects for engineering students and industries), RBA Tutorials (conducting coaching classes for engineering
and GATE students) and RBA Publications (publishing of engineering books.) His optimistic and innovative
ideas brought up RBA GROUP successfully.
He is an eminent writer and till now he has authored nine engineering books, and his books are very
popular among engineering students. He is known by name through his books in all engineering colleges
in south India and in some colleges in north India.
hsqsev2sqxev
ygisxq
Second Edition
A. Nagoor Kani
Founder, RBA Educational Group
Chennai
McGraw-Hill Offices
New Delhi New York St Louis San Francisco Auckland Bogotá Caracas
Kuala Lumpur Lisbon London Madrid Mexico City Milan Montreal
San Juan Santiago Singapore Sydney Tokyo Toronto
iv
ISBN-13: 9780070086654
ISBN-10: 0070086656
Information contained in this work has been obtained by Tata McGraw-Hill, from sources believed to be reliable.
However, neither Tata McGraw-Hill nor its authors guarantee the accuracy or completeness of any information
published herein, and neither Tata McGraw-Hill nor its authors shall be responsible for any errors, omissions, or
damages arising out of use of this information. This work is published with the understanding that Tata McGraw-Hill
and its authors are supplying information but are not attempting to render engineering or other professional services. If
such services are required, the assistance of an appropriate professional should be sought.
Typeset at Tej Composers, WZ-391, Madipur, New Delhi 110063, and printed at Rajkamal Electric Press, Plot No. 2,
Phase IV, HSIIDC, Kundli, Sonepat, Haryana 131 028
Dedicated to
2.1 Introduction.................................................................................................................................................2. 1
2.2 Discrete Time Signals................................................................................................................................2. 3
2.2.1 Generation of Discrete Time Signals................................................................................................2. 3
2.2.2 Representation of Discrete Time Signals...........................................................................................2. 4
2.2.3 Standard Discrete Time Signals......................................................................................................2. 5
2.3 Sampling of Continuous Time (Analog) Signals..............................................................................................2. 8
2.3.1 Sampling and Aliasing.................................................................................................................. 2. 8
2.4 Classification of Discrete Time Signals..............................................................................................................2.12
2.4.1 Deterministic and Nondeterministic Signals............................................................................................2.12
2.4.2 Periodic and Aperiodic Signals.............................................................................................................2.12
2.4.3 Symmetric (Even) and Antisymmetric (Odd) Signals.............................................................................2.15
2.4.4 Energy and Power Signals.................................................................................................................2.17
2.4.5 Causal, Noncausal and Anticausal Signals...........................................................................................2.19
2.5 Mathematical Operations on Discrete Time Signals............................................................................................2.20
2.5.1 Scaling of Discrete Time Signals........................................................................................................2.20
viii
Chapter 3 : Z - Transform
3.1 Introduction..............................................................................................................................................3. 1
3.2 Region of Convergence............................................................................................................................3. 4
3.3 Properties of Z-Transform...........................................................................................................................3. 11
3.4 Poles and Zeros of Rational Function of z....................................................................................................3. 27
3.4.1 Representation of Poles and Zeros in z-plane..................................................................................3. 28
3.4.2 ROC of Rational Function of z......................................................................................................3. 29
3.4.3 Properties of ROC......................................................................................................................3. 30
3.5 Inverse Z-Transform...................................................................................................................................3. 31
3.5.1 Inverse Z-Transform by Contour Integration or Residue Method......................................................... 3. 31
3.5.2 Inverse Z-Transform by Partial Fraction Expansion Method..............................................................3. 32
3.5.3 Inverse Z-Transform by Power Series Expansion Method................................................................3. 35
3.6 Analysis of LTI Discrete Time System Using Z-Transform.............................................................................. 3. 48
3.6.1 Transfer Function of LTI Discrete Time System.................................................................................3. 48
3.6.2 Impulse Response and Transfer Function........................................................................................3. 49
3.6.3 Response of LTI Discrete Time System Using Z-Transform................................................................3. 49
3.6.4 Convolution and Deconvolution Using Z-Transform..........................................................................3. 50
3.6.5 Stability in z-Domain.......................................................................................................................3. 51
3.7 Relation between Laplace Transform and Z-Transform...................................................................................3. 56
3.7.1 Impulse Train Sampling of Continuous Time Signal...........................................................................3. 56
3.7.2 Transformation From Laplace Transform to Z-Transform................................................................... 3. 57
3.7.3 Relation Between s-Plane and z-Plane...........................................................................................3. 57
x
4.1 Introduction............................................................................................................................................4. 1
4.2 Fourier Series of Discrete Time Signals (Discrete Time Fourier Series)..........................................................4. 2
4.2.1 Frequency Spectrum of Periodic Discrete Time Signals..................................................................4. 3
4.2.2 Properties of Discrete Time Fourier Series.................................................................................... 4. 4
4.3 Fourier Transform of Discrete Time Signals (Discrete Time Fourier Transform)................................................4. 9
4.3.1 Development of Discrete Time Fourier Transform from Discrete Time Fourier Series............................4. 9
4.3.2 Definition of Discrete Time Fourier Transform..................................................................................4. 10
4.3.3 Frequency Spectrum of Discrete Time Signal.................................................................................4. 11
4.3.4 Inverse Discrete Time Fourier Transform.......................................................................................4. 12
4.3.5 Comparison of Fourier Transform of Discrete and Continuous Time Signals..........................................4. 12
4.4 Properties of Discrete Time Fourier Transform..............................................................................................4. 13
4.5 Discrete Time Fourier Transform of Periodic Discrete Time Signals............................................................... 4. 20
4.6 Analysis of LTI Discrete Time System Using Discrete Time Fourier Transform................................................4. 22
4.6.1 Transfer Function of LTI Discrete Time System in Frequency Domain.............................................. 4. 22
4.6.2 Response of LTI Discrete Time System Using Discrete Time Fourier Transform...................................4. 23
4.6.3 Frequency Response of LTI Discrete Time System.........................................................................4. 23
4.6.4 Frequency Response of First Order Discrete Time System...............................................................4. 25
4.6.5 Frequency Response of Second Order Discrete Time System.........................................................4. 31
xi
7.4.1 Relation between analog and digital filter poles in bilinear transformation ................................................ 7. 16
7.4.2 Relation between analog and digital frequency in bilinear transformation ................................................ 7. 17
7.5 Specifications of digital IIR lowpass filter ............................................................................................................ 7. 24
7.6 Design of lowpass digital Butterworth filter ......................................................................................................... 7. 27
7.6.1 Analog Butterworth filter ....................................................................................................................... 7. 27
7.6.2 Poles of Butterworth lowpass filter ....................................................................................................... 7. 28
7.6.3 Transfer function of analog Butterworth lowpass filter ............................................................................ 7. 35
7.6.4 Frequency response of analog lowpass Butterworth filter ..................................................................... 7. 37
7.6.5 Order of the lowpass Butterworth filter ................................................................................................. 7. 37
7.6.6 Cutoff frequency of lowpass Butterworth filter ....................................................................................... 7. 37
7.6.7 Design procedure for lowpass digital Butterworth IIR filter ..................................................................... 7. 38
7.7 Design of lowpass digital Chebyshev filter ........................................................................................................ 7. 40
7.7.1 Transfer function of analog Chebyshev lowpass filter ........................................................................... 7. 42
7.7.2 Order of analog lowpass Chebyshev filter ........................................................................................... 7. 43
7.7.3 Cutoff frequency of analog lowpass Chebyshev filter ........................................................................... 7. 44
7.7.4 Frequency response of analog Chebyshev lowpass filter .................................................................... 7. 44
7.7.5 Design procedure for lowpass digital Chebyshev IIR filter ................................................................... 7. 45
7.8 Frequency transformation .................................................................................................................................. 7. 47
7.8.1 Analog frequency transformation .......................................................................................................... 7. 47
7.8.2 Digital frequency transformation ........................................................................................................... 7. 48
7.9 Summary of Important Concepts ....................................................................................................................... 7. 109
7.10 Short Questions and Answers ........................................................................................................................... 7. 111
7.11 MATLAB Programs .......................................................................................................................................... 7. 121
7.12 Exercises ......................................................................................................................................................... 7. 141
The chapter also presents the methods of obtaining responses of LTI discrete time systems and various
convolution methods. The deconvolution, correlation techniques and the inverse systems are clearly
explained with solved numericals. In addition, the concept of sampling and its importance are dealt with
briefly.
Chapter 3 explains Z-transform and its application to discrete time signals and systems. All the important
properties of Z-transform are presented explicitly. Inverse Z-transform and solution of difference
equations describing the discrete time systems are demonstrated with numerical examples. Also, the
structures for realization of IIR and FIR systems are provided.
Chapter 4 is dedicated to discrete time Fourier series and Fourier transform which forms the basics
for frequency domain analysis of discrete time signals and systems. In the first half of this chapter, the
discrete time Fourier series and the frequency spectrum using discrete time Fourier series are discussed
with relevant examples.
The second half of the chapter details the development of discrete time Fourier transform from discrete
time Fourier series, frequency spectrum, various properties of Fourier transform, and Fourier transform
of some standard discrete time signals. In addition, the computation of frequency responses of LTI
discrete time systems using Fourier transform are also explained with examples. The relation between
Fourier transform and Z-transform of discrete time signals is also discussed in the chapter.
Chapter 5 extends the understanding of the concepts of Discrete time Fourier transform(DTFT) to
DFT (Discrete Fourier transform) and FFT (Fast Fourier Transform). Development of DFT from
DTFT, properties of DFT, relation between DFT and Z-transform, analysis of the LTI systems using
DFT and FFT are extensively discussed.
Chapter 6 focuses on frequency response of FIR filters and characteristics various windows used
for FIR filter design. Also, design of linear phase FIR filters by windowing and frequency sampling
techniques are presented with suitable examples.
Chapter 7 explains the techniques for transforming analog filter to digital filter and the characteristics
of analog Butterworth and Chebyshev filters. Also, design of Butterworth and Chebyshev digital IIR
filters are presented with examples.
Chapter 8 discusses the quantization and representation of digital/binary number systems. The effects
due to finite precision of filter coefficients and products, and various types of overflow in recursive
computations are also discussed with appropriate examples.
Chapter 9 focuses on sampling rate conversion by decimation and interpolation and their effects on
frequency spectrum. Implementation of sampling rate conversion in filters and application of multirate
digital signal processing are also discussed in the chapter.
Chapter 10 is concerned with the estimation of energy spectrum of discrete time signals and power
spectrum of random process. The various nonparametric methods power spectrum estimation and
their performance characteristics are presented.
Chapter 11 focuses on architecture and programming of special purpose processors for digital signal
processing with particular concentration to Texas Instruments digital signal processors TMS320C5x
and TMS320C54x processors.
Chapter 12 provide a brief discussion on some applications of digital signal processing in speech,
musical sound, audio/video, communication and biomedical signals.
The author has taken care to present the concepts of Digital Signal Processing in a simple manner and
hope that the teaching and student community will welcome the book. The readers can feel free to
convey their criticism and suggestions to [email protected] for further improvement of the book.
A.Nagoor Ka ni
Kani
xxi
Acknowledgements
I express my heartful thanks to my wife Ms.C. Gnanaparanjothi Nagoor Kani and my sons
N. Bharath Raj alias Chandrakani Allaudeen and N.Vikram Raj for the support, encouragement and
cooperation they have extended to me throughout my career.
It is my pleasure to acknowledge the contributions to our technical editors Ms.K.Jayashree, Ms.
B.Hemavathy, Ms. S. Pavithra for editing and proofreading of the manuscript, and Ms. A. Selvi, Ms.
M. Faritha for type setting and preparing the layout of the book.
My sincere thanks to all reviewers for their valuable suggestions and comments which helps me to
explore the subject to greater depth.
I am also grateful to Ms.Vibha Mahajan, Mr.Ebi John, Ms. Koyel Ghosh, Mr. P.L.Pandita and
Ms. Sohini Mukherjee of Tata McGraw Hill Education for their concern and care in publishing this
work.
xxii
My special thanks to Ms. Koyel Ghosh of McGraw Hill Education for her care in bringing out this
work at the right time.
I thank all my office staff for their cooperation in carrying out my day-to-day activities.
Finally, a special note of appreciation is due to my sisters, brothers, relatives, friends, students and the
entire teaching community for their overwhelming support and encouragement to my writing.
A. Nagoor Kani
List of Symbols and Abbreviations
Symbols
B - Bandwidth in Hz
E - Energy of a signal
er - Rounding error
j - complex operator, −1
L - Number of segments
xxiv
M - Figure of merit
M - Mantissa
N - Fundamental period
P - Power of a signal
p - Pole
Q - Quality factor
r - Radix or base
S - Sign bit
t - Time in seconds
V - Variabiltiy
Î - Attenuation costant
Wo - Center frequency
s2 - Variance
s2eoi - Steady state output noise power due to input quantization error
* - Convolution operator
z - Integration operator
d
- Differentiation operator
dt
xxvi
Standard/Input/Output Signals
tp - Phase delay
tg - Group delay
F - Fourier transform
H - System operator
Q[ ] - Quantization operations
Z - Z-transform
Abbreviations
BIBO - Bounded Input Bounded Output
DT - Discrete Time
Var - Variance
1.1 Introduction
Digital Signal Processing (DSP) refers to processing of signals by digital systems like Personal
Computers (PC) and systems designed using digital Integrated Circuits (ICs), microprocessors and
microcontrollers. DSP gained popularity in the 1960s. Earlier, DSP systems were limited to general purpose
non-real-time scientific and business applications. The rapid advancement in computers and IC fabrication
technology leads to complete domination of DSP systems in both real-time and non-real-time applications
in all fields of engineering and technology.
The basic components of a DSP system are shown in fig 1.1. The DSP system involves conversion of
analog signal to digital signal, then processing of the digital signal by a digital system and then conversion
of the processed digital signal back to analog signal.
1.2 Signal
Any physical phenomenon that conveys or carries some information can be called a signal. The
music, speech, motion pictures, still photos, heart beat, etc., are examples of signals that we normally encounter
in day-to-day life.
When a signal is defined continuously for any value of an independent variable, it is called an analog
or continuous signal. Most of the signals encountered in science and engineering are analog in nature.
When the dependent variable of an analog signal is time, it is called a continuous time signal and it is denoted
as “x(t)”.
When a signal is defined for discrete intervals of an independent variable, it is called a discrete signal.
When the dependent variable of a discrete signal is time, it is called discrete time signal and it is denoted by
“x(n)”. Most of the discrete signals are either sampled versions of analog signals for processing by digital
systems or output of digital systems.
The quantized and coded version of the discrete time signals are called digital signals. In digital
signals the value of the signal for every discrete time “n” is represented in binary codes. The process of
conversion of a discrete time signal to digital signal involves quantization and coding.
Normally, for binary representation, a standard size of binary is chosen. In m-bit binary representation,
we can have 2m binary codes. The possible range of values of the discrete time signals are usually divided
into 2m steps called quantization levels, and a binary code is attached to each quantization level. The values
of the discrete time signals are approximated by rounding or truncation in order to match the nearest quantization
level.
The ratio of Z -transform of output and input is called transfer function of the discrete time system.
The inverse Z -transform of the system gives the impulse response of the system, which is used to study the
characteristics of a system.
Another important characteristic of any signal is frequency, and for most of the applications the
frequency content of the signal is an important criteria. The frequency range of some of the signals are listed
in table 1.1 and 1.2.
Table 1.1 : Frequency Range of Some Electromagnetic Signals
1.5 Filters
The filters are frequency selective devices. The two major types of digital filters are FIR (Finite Impulse
Response) and IIR (Infinite Impulse Response) filters.
Generally, the filter specification will be a desired frequency response. The inverse Fourier transform
of the frequency response will be the impulse response of the filter, and it will be an infinite duration signal.
The digital filters designed by choosing finite samples of impulse rseponse are called FIR filters, and the
filters designed by considering all the infinite samples are called IIR filters.
Since, an FIR filter is designed from the finite samples of impluse response, the direct design of FIR filter
is possible in which the transfer function of the filter is obtained by taking Z -transform of impulse response.
Note : Mathematically, the filter design is design of transfer function of the filter.
Since, an IIR filter is designed by considering / preserving the infinite samples of impulse response,
the direct design of IIR filter is not possible. Therefore, the IIR filter is designed via analog filter. For
designing IIR filter, first the specifications of IIR filter is transformed to specifications of analog filter using
bilinear or impulse-invariant transformation, then an analog filter transfer function is designed using
Butterworth or Chebychev approximation. Finally the analog filter transfer function is transfered to digital
filter transfer function using the transformation chosen for transforming the specifications.
2. Speech Processing
· Speech compression and decompression to reduce memory requirement of storage systems.
· Speech compression and decompression for effective use of transmission channels.
· Speech recognization for voice operated systems and voice based security systems.
· Speech recognization for conversion of voice to text.
· Speech synthesis for various voice based warnings or annoucements.
5. Power electronics
· The spectrum analysis of the output of coverters and inverters will reveal the harmonics present in
the output, which in turn helps to design suitable filter to eliminate the harmonics.
· The analysis of switching currents and voltages in power devices will help to reduce losses.
6. Image processing
· Image compression and decompression to reduce memory requirement of storage systems.
· Image compression and decompression for effective use of transmission channels.
· Image recognition for security systems.
· Filtering operations on images to extract the features or hidden information.
7. Geology
· The seismic signals are used to determine the magnitude of earthquakes and volcanic eruptions.
· The seismic signals are also used to predict nuclear explosions.
· The seismic noises are also used to predict the movement of earth layers (tectonic plates).
8. Astronomy
· The analysis of light received from a star is used to determine the condition of the star.
· The analysis of images of various celestial bodies gives vital information about them.
2.1 Introduction
In today's world, digital systems are employed for almost every application. The digital systems can
process only discrete signals. This chapter deals with time domain analysis of discrete time signals and
systems. In the first part of this chapter, the generation, representation, classification and mathematical
operations on discrete time signals are discussed in detail. In the second part of this chapter, the representation,
classification and response of discrete time systems are discussed in detail. The concept of LTI systems are
highlighted wherever necessary.
Discrete Signal and Discrete Time Signal
The discrete signal is a function of a discrete independent variable. The independent variable is
divided into uniform intervals and each interval is represented by an integer. The letter "n" is used to denote
the independent variable. The discrete or digital signal is denoted by x(n).
The discrete signal is defined for every integer value of the independent variable "n". The magnitude
(or value) of discrete signal can take any discrete value in the specified range. Here both the value of the
signal and the independent variable are discrete. The discrete signal can be represented by a one-dimensional
array as shown in the following example.
Example :
x(n) = { 2, 4, -1, 3, 3, 4 }
Here the discrete signal x(n) is defined for, n = 0, 1, 2, 3, 4, 5
\ x(0) = 2 ; x(1) = 4 ; x(2) = –1 ; x(3) = 3 ; x(4) = 3 ; x(5) = 4 .
When the independent variable is time t, the discrete signal is called discrete time signal. In discrete
time signal, the time is divided uniformly using the relation t = nT, where T is the sampling time period. (The
sampling time period is the inverse of sampling frequency). The discrete time signal is denoted by x(n) or x(nT).
Chapter 2 - Discrete Time Signals and Systems 2. 2
Since the discrete signals have a sequence of numbers (or values) defined for integer values of the
independent variable, the discrete signals are also known as discrete sequence. In this book, the term sequence
and signal are used synonymously. Also in this book, the discrete signal is referred as discrete time signal.
Digital Signal
The digital signal is same as discrete signal except that the magnitude of the signal is quantized. The
magnitude of the signal can take one of the values in a set of quantized values. Here quantization is necessary
to represent the signal in binary codes.
The generation of a discrete time signal by sampling a continuous time signal and then quantizing the
samples in order to convert the signal to digital signal is shown in the following example.
Let, x(t) = Continuous time signal
T = Sampling time
A typical continuous time signal and the sampling of this continuous time signal at uniform interval
are shown in fig 2.1a and fig 2.1b respectively. The samples of the continuous time signal as a function of
sampling time instants are shown in fig 2.1c. (In fig 2.1c, 1T, 2T, 3T, ....etc., represents sampling time instants
and the value of the samples are functions of this sampling time instants).
x (t) x (t) x (n t)
1.0 1.0 1.0
0.9
0.9 0.9 0.9
0.8 0.8
0.8 0.8 0.8
0 1T 2T 3T 4T 5T 6T 7T t 0 1T 2T 3T 4T 5T 6T 7T t 0 1T 2T 3T 4T 5T 6T 7T t
F ig 2 .1 a . F ig 2 .1 b . F ig 2 .1 c.
F ig 2 .1 : S a m p lin g a co n tin u o us tim e sig n a l to g en era te d iscrete tim e sig na l.
The numbers 0, 2, 4, ...., 2N form a sequence of even numbers and can be expressed as,
x(n) = 2n ; 0 £ n £ N
Chapter 2 - Discrete Time Signals and Systems 2. 4
3. A third method is by uniformly sampling a continuous time signal and using the amplitudes of
the samples to form a sequence.
Let, x(t) = Continuous time signal
Now, Discrete signal, x(nT) = x(t) t = nT ; − ∞ < n < ∞
where, T is the sampling interval
The generation of discrete signal by sampling a continuous time signal is shown in fig 2.1.
2.2.2 Representation of Discrete Time Signals
The discrete time signal can be represented by the following methods.
1. Functional representation
In functional representation, the signal is represented as a mathematical equation, as shown in the
following example. x (n )
x(n) = – 0.5 ; n = – 2 1.5
1.2
= 1.0 ; n = – 1 1.0
= – 1.0 ; n = 0 0.6
= 0.6 ; n = 1
= 1.2 ; n = 2
= 1.5 ; n = 3 −2 −1 0 1 2 3 n
= 0 ; other n −0.5
−1.0
F ig 2.2 : G ra phica l rep resenta tio n of a
2. Graphical representation d iscrete tim e sig na l.
In graphical representation, the signal is represented in a two-dimensional plane. The independent
variable is represented in the horizontal axis and the value of the signal is represented in the vertical axis as
shown in fig 2.2.
3. Tabular representation
In tabular representation, two rows of a table are used to represent a discrete time signal. In the first
row, the independent variable "n" is tabulated and in the second row the value of the signal for each value of
"n" are tabulated as shown in the following table.
n ........... –2 -1 0 1 2 3 ..............
x(n) ........... –0.5 1.0 –1.0 0.6 1.2 1.5 ..............
2. 5 Digital Signal Processing
4. Sequence representation
In sequence representation, the discrete time signal is represented as a one-dimensional array as
shown in the following examples.
An infinite duration discrete time signal with the time origin, n = 0, indicated by the symbol - is represented as,
x(n) = { ..... – 0.5, 1.0, –1.0, 0.6, 1.2, 1.5, ..... }
-
An infinite duration discrete time signal that satisfies the condition x(n) = 0 for n < 0 is represented as,
x(n) = { –1.0, 0.6, 1.2, 1.5, ... } or x(n) = {–1.0, 0.6, 1.2, 1.5, ... }
-
A finite duration discrete time signal with the time origin, n = 0, indicated by the symbol - is represented as,
x(n) = { – 0.5, 1.0, –1.0, 0.6, 1.2, 1.5 }
-
A finite duration discrete time signal that satisfies the condition x(n) = 0 for n < 0 is represented as,
x(n) = { –1.0, –0.6, 1.2, 1.5 } or x(n) = { –1.0, 0.6, 1.2, 1.5}
-
= 0; n < 0 4
3
2
3. Ramp signal 1
Ramp signal, u r ( n ) = n ; n ≥ 0 0 1 2 3 4 5 n
= 0 ;n < 0 F ig 2.5 : R a m p sig na l.
4. Exponential signal
n
Exponential signal, g( n) = a ; n ≥ 0
= 0 ;n < 0
0 1 2 3 4 5 6 n 0 1 2 3 4
F ig 2.6a : D e c re asin g e x po n en tia l sign a l. F ig 2.6b : In cre a sin g ex p o ne n tial sig n al.
F ig 2.6 : E xp o n en tia l sig n a l.
Chapter 2 - Discrete Time Signals and Systems 2. 6
5. Discrete time sinusoidal signal
The discrete time sinusoidal signal may be expressed as,
bg b g
x n = A cos ω 0n + θ ; for n in the range -¥ < n < +¥
xb ng = A sin bω n + θg ; for n in the range -¥ < n < +¥
0
−9 −8 −7 −6 −5 −4 4 5 6 7 8 9
−3 −2 −1 0 1 2 3
n
x (n )
F ig 2 .7 a : D iscrete tim e sin u so id a l sig n a l rep re se n ted
b y e q u a tio n x(n ) = A c o s( ω0 n ).
−6 −5 −4 −3 −2 −1 7 8 9 10 11 12
x (n ) 0 1 2 3 4 5 6 n
1. A discrete time sinusoid is periodic only if its frequency f0 is a rational number, (i.e., ratio of two
integers).
2. Discrete time sinusoids whose frequencies are separated by integer multiples of 2p are identical.
∴ x(n) = A cos[(w 0 + 2pk ) n + q], for k = 0,1,2...........are identical in the interval
-p£w0 £ p and so they are indistinguishable.
Proof :
Conclusion
n n
F ig 2.8 a : T h e d isc rete tim e se q u en c e re presen ted b y the F ig 2.8 b : T h e d isc rete tim e se q u en c e re presen ted b y the
n n
e qu a tio n, x r (n) = a c o s ω0 n for 0 < a < 1 . e qu a tio n, x r (n) = a c o s ω0 n for a > 1 .
F ig 2 .8 : R ea l p a rt o f co m p lex exp o n en tia l sig na l.
The imaginary part of x(n) will give rise to an exponentially increasing sinusoid sequence for a > 1 and
exponentially decreasing sinusoid sequence for 0 < a < 1.
x i (n ) x i (n )
0<a<1 a>1
n n
F0
where, f 0 = = Frequency of discrete sinusoid in cycles/sample
Fs
w0 = 2pf 0= Frequency of discrete sinusoid in radians/sample
Example 2.1
Consider the analog signals, x1(t) = 3 cos 2p(20t) and x2(t) = 3 cos 2p(70t).
Find a sampling frequency so that 70Hz signal is an alias of the 20Hz signal?
Solution
Let, the sampling frequency, Fs = 70 - 20 = 50Hz.
Example 2.2
Let an analog signal, xa(t) = 10 cos 200 pt. If the sampling frequency is 150Hz, find the discrete time signal
x(n). Also find an alias frequency corresponding to Fs = 150 Hz.
Solution
n
x(n) = x a (t) n = 10 cos 200πt n
= 10 cos 200 π ×
t = nT =
Fs t = Fs
Fs
= 10 cos
200π × n
= 10 cos
4π
n = 10 cos 2π −
2π FG
n = 10 cos
2π IJ 1
n = 10 cos 2π n
150 3 3 H3 K 3
We know that the discrete time sinusoids whose frequencies are separated by integer multiples of 2p are
identical.
∴ 10 cos
2π
n = 10 cos
2π FG
+ 2π n = 10 cos
8π IJ 4
n = 10 cos 2π n
3 3 H 3 K 3
4 2π
Now, 10 cos 2π n is an alias of 10 cos n.
3 3
4
Here the frequency of the signal, 10 cos 2π n is,
3
4
f= cycles / sample
3
F 4
We know that, f = ⇒ F = f Fs = × 150 = 200Hz
Fs 3
∴ when, Fs = 150Hz, F = 200Hz is an alias frequency.
2. 11 Digital Signal Processing
Example 2.3
Consider the analog signal, xa(t) = 6 cos50pt + 3 sin 200pt 3 cos100pt .
Determine the minimum sampling frequency and the sampled version of analog signal at this frequency.
Sketch the waveform and show the sampling points. Comment on the result.
Solution
The given analog signal can be written as shown below.
xa(t) = 6 cos50pt + 3 sin 200pt 3 cos100pt = 6 cos 2p F1t + 3 sin 2p F2t 3cos 2p F3t
Where, 2p F1 = 50p ; ÞF1 = 25Hz
2p F2 = 200p ; Þ F2 = 100Hz
2p F3 = 100p ;Þ F3 = 50Hz
The maximum analog frequency in the signal is 100Hz. The sampling frequency should be twice that of
this maximum analog frequency.
i.e., Fs ³ 2 Fmax Þ Fs ³ 2 ´ 100
Let, sampling frequency, Fs = 200Hz
∴ x a (nT) = x a ( t ) t = nT = x a (t) n
t =
Fs
50 πn 200 πn 100 πn πn πn
= 6 cos + 3 sin − 3cos = 6 cos + 3 sin πn − 3 cos
200 200 200 4 2
For integer values of n, sinpn = 0.
πn πn
∴ x a (nT ) = 6 cos
− 3 cos
4 2
The components of analog waveform and the sampling points are shown in fig1.
Comment : In the sampled version of analog signal xa (nT), the component 3 sin 200pt will give always zero
samples when sampled at 200Hz for any value of n. This is the drawback in sampling at Nyquist rate (i.e.,
sampling at Fs = 2Fmax).
1
6 c os 50 πt ; F1 = 25 H z ; T1 = = 0.04 s ec
F1
1
3 sin 200 πt ; F 2 = 100 H z ; T 2 = = 0.01 sec
F2
1
3 c os 100 πt ; F3 = 50 H z ; T3 = = 0.02 sec
F3
0.005
1
0.01 Fs = 200 H z ; T = = 0.005 sec
0.02 Fs
0.04
1 1 1 1
0 n
−1 −1 −1 −1 −1 −1 −1 −1
x (n) = {. . . . . . .2 , 1 , 2, − 1, − 1, 2 , 1 , 2, − 1, − 1, 2 , 1, 2 , − 1 , − 1 , . . . . . . . }
A
F ig 2.1 0 : P erio d ic d iscrete tim e sig n a l.
When a discrete time signal is a sum or product of two periodic signals with fundamental periods N1
and N2, then the discrete time signal will be periodic with period given by LCM of N1 and N2.
Example 2.4
Determine whether following signals are periodic or not. If periodic find the fundamental period.
a) x(n) = cos
FG 5π n + 1IJ b) x(n) = sin
FG n − πIJ c) x(n) = sin
π 2
n
H9 K H9 K 8
j7 πn 3 πn
5πn j
d) x(n) = e 4 e) x(n) = 2cos + 3e 4
3
2. 13 Digital Signal Processing
Solution
∴ N = 4 M1 \ N = 8 M2
Now, N is integer for M1 = 12, 22, 32, 42 ..... Now, N is integer for M2 = 1, 2, 3, 4 .....
2
When M1 = 2 and M2 = 1, we get a common value for N as, N = 8.
F π n + π8 + π8 nI
2
2
For interger M,
When N = 8 ; x(n + N) = sin GH 8 8 4 JK sin (q + 2p M) = sinq
FF π I I Fπ
= sin G G n + 2πnJ + 4 × 2πJ = sin G n
2 2
+ 2πn
IJ
HH 8 K K H8 K
π 2
= sin
n = x(n)
8
\ x(n) is periodic with fundamental period, N = 18 samples.
Chapter 2 - Discrete Time Signals and Systems 2. 14
j7 πn
d) Given that, x(n) = e 4
7 πN
Since, ej2pM = 1, for periodicity should be an integral multiple of 2p.
4
7 πN
Let , = M × 2π,
4
4 8M
∴ N = M × 2π × =
7π 7
Here, N is integer, when M = 7, 14, 21, ......
When M = 7 ; N = 8
\ x(n) is periodic with fundamental period of 8 samples.
3π n
5πn j
e) Given that, x(n) = 2 cos + 3e 4
3
Let , x(n) = x1(n) + x 2 (n)
5πn
where, x1(n) = 2 cos
3
3πn
j
x 2 (n) = 3e 4
5πn j
3 πn
Consider, x1(n) = 2 cos Consider, x 2 (n) = 3 e 4
3
b g
∴ x1 n + N1 = 2 cos
b
5 π n + N1 g j
3π(n +N2 )
3 b g
∴ x 2 n + N2 = 3 e 4
5πN1 6 3πN2 8
Let , = 2πM1 ⇒ N1 = M1 Let , = 2πM2 ⇒ N2 = M2
3 5 4 3
Let, M1 = 5 ; \ N1 = 6 Let, M2 = 3 ; \ N2 = 8
Substitute N1 = 6 in equation (1), Substitute N2 = 8 in equation (2),
b g
∴ x1 n + N1 = 2 cos
FG 5πn + 5π × 6IJ j
FG 3πn + 3π × 8 IJ
H4 4 K
H3 3 K b g
∴ x 2 n + N2 = 3e
F 5πn + 5 × 2πIJ
= 2 cos G j
FG 3πn +3× 2πIJ
H4 K
For integer M,
H3 K For integer M,
= 3e
5πn 3πn
cos(q +2pM) = cosq = 2cos = x1(n) ej(q + 2pM) = ejq j
4 =
3 = 3e x 2 (n)
\ x1(n) is periodic with fundamental period, \ x2(n) is periodic with fundamental period,
N1 = 6 samples. N2 = 8 samples.
Here, x(n) = x1(n) + x2(n), and x1(n) is periodic with period N1 = 6, and x2(n) is periodic with period N2 = 8.
Therefore, x(n) is periodic with period N, where N is LCM of N1 and N2.
The LCM of 6 and 8 is 24.
\ N = 24
\ x(n) is periodic with fundamental period, N = 24.
2. 15 Digital Signal Processing
2 2 2 2
2
1 1
1 1 1 1
−4 −3 −2 −1 0 1 2 3 4 n
−4 −3 −2 −1 0 1 2 3 4 n
−1 −1
−2 −2
x (n) = {1 , 2 , 3 , 1 , 2 , 1 , 3 , 2 , 1} x (n ) = {1, 2, − 2, − 1 , 0 , 1 , 2 , − 2, − 1 }
A
F ig 2.11 a : S y m m e tric (or e v en ) sig na l.
A
F ig 2.11 b : A ntisym m etric (o r o dd ) sig n al.
F ig 2.11 : S y m m etric a nd a ntisym m etric d iscrete tim e sig n al.
A discrete time signal x(n) which is neither even nor odd can be expressed as a sum of even and
odd signal.
Let, x(n) = xe (n) + xo (n)
bg
where, x e n = Even part of x(n)
xo(n) = Odd part of x(n)
Note : If x(n) is even then its odd part will be zero. If x(n) is odd then its even part will be zero.
Now, it can be proved that,
1
Even part, xe (n) = x(n) + x(− n)
2
1
Odd part, xo (n) = x(n) − x(− n)
2
Proof :
Let, x(n) = xe(n) + xo(n) ......(2.8)
1
∴ x e(n) = x(n) + x(− n)
2
On subtracting equation (2.10) from equation (2.8) we get,
1
∴ x o(n) = x(n) − x(− n)
2
Example 2.5
Determine the even and odd parts of the signals.
π
j n
a) x(n) = 3n b) x(n) = 3 e 5 c) x(n) = {2, − 2, 6, − 2}
Solution
a) Given that, x(n) = 3n
∴ x(−n) = 3−n
1 1 n
Even part, x e (n) = [x(n) + x( −n)] = [3 + 3−n ]
2 2
1 1 n
Odd part, x o (n) = [x(n) − x( −n)] = [3 − 3−n ]
2 2
π
j n
b) Given that, x(n) = 3 e 5
π
j n π π
x(n) = 3 e 5 = 3 cos n + j3 sin n
5 5
π
−j n π π
∴ x(−n) = 3 e 5 = 3 cos n − j3 sin n
5 5
1
Even part, x e (n) = [x(n) + x(−n)]
2
=
1 πLM π π π
3 cos n + j3sin n + 3 cos n − j3 sin n =
1 π OP
π
6 cos n = 3 cos n
LM OP
2 5 N 5 5 5 2 5 Q
5 N Q
1
Odd part, x o (n) = [x(n) − x( −n)]
2
=
LM 1 π π π π
3 cos n + j3sin n − 3 cos n + j3sin n
OP
N 2 5 5 5 5 Q
1L π O π
= Mj6 sin nP = j3 sin n
2N 5 Q 5
The energy of a signal may be finite or infinite, and can be applied to complex valued and
real valued signals.
If energy E of a discrete time signal is finite and nonzero, then the discrete time signal is called an
energy signal. The exponential signals are examples of energy signals.
The average power of a discrete time signal x(n) is defined as,
N
1 2 .....(2.12)
Power , P = lim
N→∞ 2N + 1 ∑ x( n)
n =− N
If power P of a discrete time signal is finite and nonzero, then the discrete time signal is called a power
signal. The periodic signals are examples of power signals.
For energy signals, the energy will be finite and average power will be zero. For power signals the
average power is finite and energy will be infinite.
a) x(n) =
FG 1IJ n
u(n) b) x(n) = sin
FG π nIJ c) x(n) = u(n)
H 4K H3 K
Solution
H 4K
F 1I n
+N N
1 2 1 2
Power, P = Lt ∑ x(n) = Lt ∑ (0.25)n
N→∞ 2N + 1 n = −N
N→ ∞ 2N + 1 n = 0
N N
1 1
= Lt ∑ (0.252 )n = Lt ∑ (0.0625)n
N→∞ 2N + 1 n = 0
N→∞ 2N + 1 n = 0
∑ x(n) =
2
∑
+∞
sin2
FG π nIJ = ∑ +∞
3
n = −∞ n = −∞
H3 K n = −∞ 2
Note : Sum of infinite 1's is infinity. Sum of samples of one period of cosinusoidal signal is zero.
N N
1 2 1 πn
Power, P = Lt
N→ ∞
2N + 1
∑ x(n) = Lt
N→∞
2N + 1
∑ sin2
3
n = −N n = −N
2. 19 Digital Signal Processing
1 L
MM ∑ 1 − ∑ cos 23π nOPP
N N
1 n
= Lt
N→∞ 2N + 1 2 N n = −N Q n = −N
= Lt
1 1 L
M1+ 14 +.......+
O
1+31 − 0P
31+ 1+ 11+.......+
N→∞ 2N + 1 MN
2 144 2444 44
N terms
42444
PQ N terms
1 1 1 1
= Lt 2N + 1 = Lt = watts
N→∞ 2N + 1 2 N→∞ 2 2
n = −∞ n =0
+∞
= ∑ u(n) = 1+ 1+ 1 . ........ ∞ = ∞
n =0
1 N
1 N
1 F I
G 3JJ
2
P = Lt ∑ x(n) = Lt ∑ u(n) = Lt
G 1+ 1+ 1+.........+1
N→∞
2N + 1 n = −N
N→∞
2N + 1 n =0
N→∞
2N + 1 H
1444 424444
N + 1 terms K
FG 1 IJ
N 1+ 1
= Lt
1
(N + 1) = Lt
H NK = 1+ ∞ = 1+ 0 = 1 watts
N→∞
2N + 1 N→∞ F 1I 2 + 1 2 + 0 2
N G2 + J
H NK ∞
A discrete time signal is said to be noncausal, if it is defined for either n ≤ 0, or for both n ≤ 0 and
n > 0. Therefore if x(n) is noncausal, then x(n) ≠ 0 for n < 0. A noncausal signal can be converted to causal
signal by multiplying the noncausal signal by a unit step signal, u(n).
When a noncausal discrete time signal is defined only for n ≤ 0, it is called an anticausal signal.
Chapter 2 - Discrete Time Signals and Systems 2. 20
Examples of Causal and Noncausal Signals
123
3
-
3 12
Causal signals
x(n) = {2, 2, 3, 3,.............}
-
x(n) = {1, –1, 2, –2, 3, –3}
123
123
-
12
Anticausal signals
x(n) = {............,2, 2, 3, 3}
-
Noncausal signals
x(n) = {2, 3, 4, 5, 4, 3, 2}
-
x(n) = {......, 2, 3, 4, 5, 4, 3, 2,......}
-
2. Folding
3. Shifting : Right shift (or advance) and left shift (or delay)
4. Addition
5. Multiplication
Amplitude scaling of a discrete time signal by a constant A is accomplished by multiplying the value
of every signal sample by the constant A.
Example :
Let, x(n) = 10 ; n=0 and A = 0.2, When n = 0 ; y(0) = A x(0) = 0.2 ´ 10 = 2.0
There are two ways of time scaling a discrete time signal. They are downsampling and upsampling.
n
In a signal x(n), if n is replaced by , where I is an integer, then it is called upsampling.
I
2. 21 Digital Signal Processing
Example :
If x(n) = bn ; n ³ 0 ; 0 < b < 1, then
x (n ) x 1 (n) x 2 (n)
b
0
1
b0 x 1 (n) = x(2n) b
0
x 2 (n) = x ej
n
2
b
b1
b2 b2
2
b
3
4
b
b 3
b4 b
b5 6 b6
b
0 1 2 3 4 5
0 1 2 3 6 n 0 1 2 3 4 5 6 n
n
F ig 2.12 a : A d isc re te tim e sig n al x (n ). F ig 2.12 b : D o w n sa m p le d sig na l o f x (n). F ig 2.12 c : U p sa m p le d sig n al x (n ).
F ig 2.1 2 : A d iscrete tim e sign a l a n d its tim e sca led versio n .
Example :
Let x(n) = 0.8n ; –2 £ n £ 2. Now the folded signal, x1(n) = x(–n) = –0.8n ; –2 £ n £ 2
x (n ) x 1 (n)
x 1 (n) = x ( −n)
1.6 1.6
0.8 0.8
−2 −1 0 1 2 n −2 −1 0 1 2 n
−0.8 −0.8
−1.6 −1.6
th
rd
d(n) = 1 ; for n = 0
0 m n
= 0 ; for n ¹ 0 F ig 2.1 5 : D elayed u nit im pu lse.
The unit impulse signal delayed by m units of time is denoted as d(n – m).
Now, d(n – m) = 1 ; n = m
= 0 ; n ¹m
2. 23 Digital Signal Processing
Delayed Unit Step Signal x 4 (n)
x 4 (n) = u(n −m )
1
The unit step signal is defined as,
u(n) = 1 ; for n ³ 0 n
m +1
0
m + 2
m + 4
m +3
m
= 0 ; for n < 0 F ig 2.1 6 : D elay ed un it step sig n a l.
The unit step signal delayed by m units of time is denoted as u(n – m).
Now, u(n – m) = 1 ; n ³ m
=0;n<m
A discrete time system is linear if it obeys the principle of superposition and it is time invariant if its
input-output relationship does not change with time. When a discrete time system satisfies the properties of
linearity and time invariance then it is called an LTI system (Linear Time Invariant system).
Impulse Response
When the input to a discrete time system is a unit impulse d(n) then the output is called an impulse
response of the system and is denoted by h(n).
The equation (2.17) is a constant coefficient difference equation, governing the input-output relation
of an LTI discrete time system.
In equation (2.17) the value of "N" gives the order of the system.
If N = 1, the discrete time system is called 1st order system
If N = 2, the discrete time system is called 2nd order system
If N = 3, the discrete time system is called 3rd order system , and so on.
The general difference equation governing 1st order discrete time LTI system is,
y(n) = – a1 y(n – 1) + b0 x(n) + b1 x(n – 1)
The general difference equation governing 2nd order discrete time LTI system is,
y(n) = – a2 y(n – 2) – a1 y(n – 1) + b0 x(n) + b1 x(n – 1) + b2 x(n – 2)
2.6.2 Block Diagram and Signal Flow Graph Representation of Discrete Time System
The discrete time system can be represented diagrammatically by block diagram or signal flow
graph. These diagrammatic representations are useful for physical implementation of discrete time system in
hardware or software.
The basic elements employed in block diagram or signal flow graph are adder, constant multiplier, unit
delay element and unit advance element.
Adder : An adder is used to represent addition of two discrete time signals.
Constant Multiplier : A constant multiplier is used to represent multiplication of a scaling factor
(constant) to a discrete time signal.
Unit Delay Element : A unit delay element is used to represent the delay of samples of a discrete
time signal by one sampling time.
Chapter 2 - Discrete Time Signals and Systems 2. 26
Unit Advance Element : A unit advance element is used to represent the advance of samples of a
discrete time signal by one sampling time.
The symbolic representation of the basic elements of block diagram and signal flow graph are listed in
table 2.1.
Table 2.1 : Basic Elements of Block Diagram and Signal Flow Graph
x1 ( n )
x1 (n ) x1 ( n ) + x 2 ( n )
Adder +
x1 ( n ) + x 2 ( n )
x2 (n)
x2 (n)
x (n ) a x(n ) a
a x (n ) a x(n )
Constant multiplier
x (n ) x (n − 1 ) z −1
z −1 x (n ) x (n − 1 )
Unit delay element
x (n ) x (n + 1 ) z
z x (n ) x (n + 1 )
Unit advance element
Example 2.7
Construct the block diagram and signal flow graph of the discrete time systems whose input-output
relations are described by the following difference equations.
a) y(n) = 0.7 x(n) + 0.7 x(n 1)
b) y(n) = 0.4 y(n 1) + x(n) 3 x(n 2)
c) y(n) = 0.2 y(n 1) + 0.7 x(n) + 0.9 x(n 1)
Solution
a) Given that, y(n) = 0.7 x(n) + 0.7 x(n 1)
The individual terms of the given equation are 0.7 x(n) and 0.7 x(n 1). They are represented by basic
elements as shown below.
2. 27 Digital Signal Processing
Block diagram representation Signal flow graph representation
0.7
x(n) 0.7 0.7 x(n) x(n) 0.7 x(n)
−1
−1
z
0.7 x(n) z 0.7 x(n − 1) 0.7 x(n) 0.7 x(n − 1)
The input to the system is x(n) and the output of the system is y(n). The above elements are connected
as shown below to get the output y(n).
−3 x(n − 2) 0.4 y (n − 1)
x (n) y (n)
x (n) y (n)
−1
z 0.4 −1
−1 −1 z
z z
x (n − 1) y (n − 1) x (n − 1)
−3 y (n − 1)
−1 0.4 y (n − 1)
z −1
0.4 z
x (n − 2)
−3 −3 x(n − 2)
x (n − 2)
The input to the system is x(n) and the output of the system is y(n). The above elements are connected
as shown below to get the output y(n).
x (n) y (n) x (n) 1 1 1 1 1 y (n)
+ +
−1
−1 z
−1 −1
z
z z 0.4
−3
−1
z −1
0.4 z
−3
x(n) x(n)
0.9 x(n − 1)
−1
z
−1
z
0 .9
0.9 x(n − 1)
0.9
x(n − 1) x(n − 1)
y(n)
0.2 y(n − 1)
y(n)
−1
z −1
z
0.2 y(n − 1) y(n − 1) 0.2
0.2
y(n − 1)
The input to the system is x(n) and the output of the system is y(n). The above elements are connected
as shown below to get the output y(n).
−1 −1 −1
z z
−1 z 0.9 0.2 z
0.9 0.2
N M
∴ y(n) + ∑ a m ybn − mg = ∑ bm xbn − mg
m=1 m= 0
N M
.....(2.18)
( or ) ∑ a m ybn − mg = ∑ b m xbn − mg with a o = 1
m= 0 m= 0
The solution of the difference equation (2.18) is the response y(n) of LTI system, which consists of
two parts. In mathematics, the two parts of the solution y(n) are homogeneous solution yh(n) and particular
solution yp(n).
2. 29 Digital Signal Processing
\ Response, y(n) = yh(n) + yp(n) .....(2.19)
The homogeneous solution is the response of the system when there is no input.The particular
solution yp(n) is the solution of difference equation for specific input signal x(n) for n ³ 0.
In signals and systems, the two parts of the solution y(n) are called zero-input response yzi(n) and
zero-state response yzs(n).
\ Response, y(n) = yzi(n) + yzs(n) .....(2.20)
The zero-input response is mainly due to initial conditions (or initial stored energy) in the system.
Hence zero-input response is also called free response or natural response. The zero-input response is given
by homogeneous solution with constants evaluated using initial conditions.
The zero-state response is the response of the system due to input signal and with zero initial
condition. Hence the zero-state response is called forced response.The zero-state response or forced response
is given by the sum of homogeneous solution and particular solution with zero initial conditions.
The homogeneous solution is obtained when x(n) = 0. Therefore the homogeneous solution is the
solution of the equation,
N
∑ a m y( n − m) = 0 .....(2.21)
m= 0
Let us assume that the solution of equation (2.21) is in the form of an exponential.
i.e., y(n) = ln
On substituting y(n) = ln in equation (2.21) we get,
N
∑ a m λn − m = 0
m= 0
On expanding the above equation (by taking a0 = 1), we get,
ln + a1 ln – 1 + a2 ln – 2 + ... + aN – 1 ln – (N – 1) + aN ln – N = 0
ln – N (lN + a1 lN – 1 + a2 lN – 2 + ... + aN – 1 l + aN) = 0
Now, the characteristic polynomial of the system is given by,
lN + a1 lN – 1 + a2 lN – 2 + ... + aN – 1 l + aN = 0
The characteristic polynomial has N roots, which are denoted as l1, l2,...lN.
The roots of the characteristic polynomial may be distinct real roots, repeated real roots or complex.
The assumed solutions for various types of roots are given below.
Distinct Real Roots
Let the roots l1, l2, l3, ... lN be distinct real roots. Now the homogeneous solution will be in the form,
y h ( n) = C1 λn1 + C2 λn2 + C3 λn3 + ...... + C N λnN
where, C1 , C2 , C3 ,......C N are constants that can be evaluated using initial conditions.
Chapter 2 - Discrete Time Signals and Systems 2. 30
Repeated Real Roots
Let one of the real roots l1 repeats p times and the remaining (N – p) roots are distinct real roots. Now,
the homogeneous solution is in the form,
The general form of particular solution for various types of inputs are listed in table 2.2.
Table 2.2 : Particular Solution
y(n) =
FG 4 − 0.8 y(−1)IJ (−0.8) n
+
5
H9 K 9
a) When y(1) = 0
4 5
∴ y(n) = ( −0.8)n + ; for n ≥ 0
9 9
=
LM b
4
g
−0.8 +
n 5 OP
u(n)
N
9 9 Q
b) When y(1) = 2/9
∴ y(n) =
FG 4 − 0.8 × 2IJ (−0.8) n
+
5
=
2.4 5 24
( −0.8)n + = (−0.8)n +
5
H9 9K 9 9 9 90 9
5 12
∴ y(n) = + (−0.8)n ; for n ≥ 0
9 45
=
LM 5 + 12 (−0.8)nOP u(n)
N 9 45 Q
Example 2.9
Determine the response y(n), n ³ 0 of the system described by the second order difference equation,
y(n) 0.2 y(n 1) 0.03 y(n 2) = x(n) + 0.4 x(n 1),
when the input signal is, x(n) = 0.2n u(n) and with initial conditions y( 2) = 0, y( 1) = 0.5.
Solution
Given that, y(n) 0.2 y(n 1) 0.03 y(n 2) = x(n) + 0.4 x(n 1) .....(1)
Homogeneous Solution
The homogeneous equation is the solution of equation (1) when x(n) = 0.
\ y(n) 0.2 y(n 1) 0.03 y(n 2) = 0 .....(2)
n
Put y(n) = l in equation (2). The roots of quadratic,
\ ln 0.2 ln 1 0.03 ln 2 = 0 λ2 − 0.2λ − 0.03 = 0 are,
ln 2 (l2 0.2l 0.03) = 0 0.2 ± 0.22 + 4 × 0.03
λ=
The characteristic equation is, 2
l2 0.2l 0.03 = 0 Þ (l 0.3) (l + 0.1) = 0 0.2 ± 0.4
= = 0.3, − 0.1
\ The roots are, l = 0.3, 0.1 2
The homogeneous solution, yh(n) is given by,
The total response y(n) of the system is given by sum of homogeneous and particular solution.
\ Response, y(n) = yh (n) + yp (n)
= C1 0.3n + C2 (0.1)n + ( 4) 0.2n ; for n ³ 0 .....(6)
To find y(0) and y(1)
When n = 0,
From equation (1) we get,
y(0) 0.2 y(1) 0.03 y(2) = x(0) + 0.4 x(1) .....(7)
Given that, y(1) = 0.5, y(2) = 0
x(n) = 0.2n u(n), \ x(0) = 0.20 = 1
x(1) = 0
On substituting the above conditions in equation (7) we get,
y(0) 0.2 ´ 0.5 0.03 ´ 0 = 1 + 0
\ y(0) = 1.1 .....(8)
When n = 1,
From equation (1) we get,
y(1) 0.2 y(0) 0.03 y(1) = x(1) + 0.4 x(0) .....(9)
We know that, y(0) = 1.1, y(1) = 0.5, y(2) = 0
Given that, x(n) = 0.2n u(n), \ x(0) = 0.20 = 1
x(1) = 0.21 = 0.2
On substituting the above conditions in equation (9) we get,
y(1) 0.2 ´ 1.1 0.03 ´ 0.5 = 0.2 + 0.4 ´ 1
\ y(1) = 0.6 + 0.235 = 0.835 .....(10)
To solve constants C1 and C2
When n = 0,
From equation (6) we get,
y(0) = C1 0.30 + C2 (0.1)0 + (4) 0.20 = C1 + C2 4 .....(11)
From equations (8) and (11) we can write,
C1 + C2 4 = 1.1
\ C1 + C2 = 5.1 .....(12)
2. 35 Digital Signal Processing
When n = 1,
From equation (6) we get,
y(1) = C1 ´ 0.3 + C2 (0.1) + (4) 0.2 = 0.3 C1 0.1C2 0.8 .....(13)
From equations (10) and (13) we can write,
0.3 C1 0.1C2 0.8 = 0.835
\ 0.3 C1 0.1C2 = 1.635 .....(14)
Equation (12) ´ 0.1 Þ 0.1C1 + 0.1C2 = 0.51
Equation (13) Þ 0.3C1 0.1C2 = 1.635
Add 0.4C1 = 2.145
2.145
∴ C1 = = 5.3625
0.4
From equation(12),
C2 = 5.1 C1 = 5.1 5.3625
= 0.2625
Total Response
y(n) = [5.3625(0.3)n 0.2625(0.1)n + (4) 0.2n] u(n) ; for all n
∞
Infinite memory is required
y(n) = ∑ x(n − m)
m= 0
Chapter 2 - Discrete Time Signals and Systems 2. 36
2.8.2 Time Invariant and Time Variant Systems
A system is said to be time invariant if its input-output characteristics do not change with time.
Definition : A relaxed system H is time invariant or shift invariant if and only if
H{x(n)} = y(n) implies that, H{x(n – m)} = y(n – m)
for every input signal x(n) and every time shift m.
i.e., in time invariant systems, if y(n) = H{x(n)} then y(n – m) = H{x(n – m)}.
Alternative Definition for Time Invariance
A system H is time invariant if the response to a shifted (or delayed) version of the input is identical
to a shifted (or delayed) version of the response based on the unshifted (or undelayed) input.
i.e., In a time invariant system, H{x(n - m)} = z-m H{x(n)}; for all values of m .....(2.22)
-m
The operator z represents a signal delay of m samples.
The diagrammatic explanation of the above definition of time invariance is shown in fig 2.19.
Procedure to Test for Time Invariance
1. Delay the input signal by m units of time and determine the response of the system for this
delayed input signal. Let this response be y(n – m).
2. Delay the response of the system for undelayed input by m units of time. Let this delayed
response be yd(n).
3. Check whether y (n – m) = yd(n). If they are equal then the system is time invariant.
Otherwise the system is time variant.
x (n) x (n − m ) y (n − m )
−m
Input signa l
z H
D elayed input R espons e for
D elay S y stem delay ed in put
Example 2.10
Test the following systems for time invariance.
a) y(n) = x(n) + x(n 1) b) y(n) = 2n x(n) c) y(n) = x(n) d) y(n) = x(n) b x(n 1)
Solution
a) Given that, y(n) = x(n) + x(n 1)
Test 1 : Response for delayed input
Let, y(n m) = Response for delayed input.
x(n) y(n − m) = x(n − m) + x(n − m − 1)
−m
x(n − m)
Input signal
z
Delayed input
H Response for
Delay System delayed input
2. 37 Digital Signal Processing
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x(n) y(n) = x(n) + x(n −1) y d (n) = x(n − m ) + x(n − m − 1)
Input sign al
H z
−m
Example 2.11
Test the following systems for time invariance.
M N
a) y(n) = x(n) + B b) y(n) = n x3(n) c) y(n) = bx(n) d) y(n) = ∑
k = 0
bk x(n − k) − ∑
k =1
a k y(n − k)
Chapter 2 - Discrete Time Signals and Systems 2. 38
Solution
a) Given that, y(n) = x(n) + B
Test 1 : Response for delayed input
Let, y(n m) = Response for delayed input.
y (n − m ) = x (n − m ) + B
x (n) x (n − m )
−m
Input signa l
z H R espons e for
D elayed input
D elay S y stem delay ed inp ut
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x (n) y (n) = x(n) + B y d (n) = x (n − m ) + B
H z
−m
Input signa l
z
D elayed input
H R espons e for
D elay S y stem delay ed inp ut
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x(n − m)
x (n) y (n) = b
x(n) y d(n) = b
H
−m
z
Input signa l R espons e for D elayed res ponse
S y stem undelay ed input D elay
Input signa l
H z
−m
T he s ys tem , H is linear if an d only if, H{a 1 x 1(n ) + a 2 x 2 (n)} = a 1 H{x 1 (n)} + a 2 H{x 2 (n)}
Example 2.12
Test the following systems for linearity.
a) y(n) = n x(n) b) y(n) = x(n2) c) y(n) = x2(n) d) y(n) = B x(n) + C
Solution
a) Given that, y(n) = n x(n)
Let H be the system represented by the equation, y(n) = nx(n).
The system H operates on x(n) to produce, y(n).
x(n)
H y (n) = H{x (n)} = n x (n )
x 1 (n)
H y 1 (n ) = H {x 1 (n )} = n x 1 (n)
x 2 (n)
H y 2 (n ) = H {x 2 (n )} = n x 2 (n)
x 3 (n)
H y 3 (n ) = H {x 3 (n )}
\ y3(n) = H{a1 x1(n) + a2 x2(n)} = n[a1 x1(n) + a2 x2(n)] = a1 n x1(n) + a2 n x2(n) .....(2)
The condition to be satisfied for linearity is, y3(n) = a1 y1(n) + a2 y2(n).
From equations (1) and (2) we can say that, y3(n) = a1 y1(n) + a2 y2(n). Hence the system is linear.
x 1 (n)
y 1 (n ) = H {x 1 (n )} = x 1 (n )
2
H
x 2 (n)
y 2 (n ) = H {x 2 (n )} = x 2 (n )
2
H
x 3 (n)
H y 3 (n ) = H {x 3 (n )}
x 2 (n)
y 2 (n ) = H {x 2 (n )} = x 2 (n )
2
H
x 2 (n)
H y 2 (n ) = H{x 2 (n )} = B x 2 (n ) + C
\ y3(n) = H{a1 x1(n) + a2 x2(n)} = B[a1 x1(n) + a2 x2(n)] + C = Ba1 x1(n) + B a2 x2(n) + C .....(2)
The condition to be satisfied for linearity is, y3(n) = a1 y1(n) + a2 y2(n).
From equations (1) and (2) we can say that, y3(n) ¹ a1 y1(n) + a2 y2(n). Hence the system is nonlinear.
Chapter 2 - Discrete Time Signals and Systems 2. 42
Example 2.13
Test the following systems for linearity.
Solution
a) Given that, y(n) = ex(n)
Let, y1(n) and y2(n) be the response of the system H for inputs x1(n) and x2(n) respectively.
x 1 (n) x 1 (n )
H y 1 ( n ) = H { x 1(n )} = e
x 2 (n)
H y 2 ( n ) = H { x 2 ( n )} = e x 2 ( n )
\ y3(n) = H{a1 x1(n) + a2 x2(n)} = e[ a1 x1(n) + a 2 x 2 (n)] = ea1 x1(n) ea 2 x 2 (n) .....(2)
The condition to be satisfied for linearity is, y3(n) = a1 y1(n) + a2 y2(n).
From equations (1) and (2) we can say that, y3(n) ¹ a1 y1(n) + a2 y2(n). Hence the system is nonlinear.
Let, y1(n) and y2(n) be the response of the system H for inputs x1(n) and x2(n) respectively.
x 1 (n)
H y 1 ( n ) = H { x 1(n )} = b x 1 ( n )
x 2 (n) x 2 (n )
H y 2 ( n ) = H { x 2 ( n )} = b
Example 2.14
Test the following systems for linearity.
M N
1
g
a y(n) = 3 x(n) +
x(n − 2)
g
b y(n) = x(n) − 2 x(n − 1) g
c y(n) = ∑
m = 0
bm x(n − m) − ∑
m = 1
cm y(n − m)
Solution
1
a) Given that, y(n) = 3 x(n) +
x(n − 2)
1
Let, H be the system represented by the equation, y(n) = 3x(n) + .
x(n − 2)
The system H operates on x(n) to produce, y(n).
x (n) 1
H y ( n ) = H { x (n )} = 3 x (n ) +
x (n − 2 )
Consider two signals, x1(n) and x2(n).
Let, y1(n) and y2(n) be the response of the system H for inputs x1(n) and x2(n) respectively.
x 1 (n) 1
H y 1( n ) = H { x 1( n )} = 3 x 1(n ) +
x 1( n − 2 )
x 2(n) 1
H y 2 (n ) = H { x 2 ( n )} = 3 x 2 ( n ) +
x 2 (n − 2 )
Chapter 2 - Discrete Time Signals and Systems 2. 44
F
∴ a1 y1(n) + a 2 y 2(n) = a1 3x1(n) +
1 I F
+ a 2 3x 2(n) +
1 I .....(1)
GH x1(n − 2) JK GH x 2(n − 2) JK
Consider a linear combination of inputs, a1 x1(n) + a2 x2(n) = x3(n).
Let, y3(n) be the response for x3(n).
x 3 (n)
H y 3 (n ) = H {x 3 (n )}
1 .....(2)
\ y3(n) = H{a1 x1(n) + a2 x2(n)} = 3[a1 x1(n) + a 2 x 2(n)] +
a1 x1(n − 2) + a 2 x 2(n − 2)
The condition to be satisfied for linearity is, y3(n) = a1 y1(n) + a2 y2(n).
From equations (1) and (2) we can say that, y3(n) ¹ a1 y1(n) + a2 y2(n). Hence the system is nonlinear.
x 2 (n)
H y 2 (n ) = H {x 2 (n )} = x 2 (n ) − 2 x 2 (n − 1)
\ y3(n) = H{a1 x1(n) + a2 x2(n)}= a1 x1(n) + a2 x2(n) 2[a1 x1(n 1) + a2 x2(n 1)]
= a1 x1(n) a1 2 x1(n 1) + a2 x2(n) a2 2 x2(n 1) .....(2)
The condition to be satisfied for linearity is, y3(n) = a1 y1(n) + a2 y2(n).
From equations (1) and (2) we can say that, y3(n) = a1 y1(n) + a2 y2(n). Hence the system is linear.
M N
c) Given that, y(n) = ∑
m=0
bm x(n − m) − ∑
m=1
cm y(n − m)
m x(n − m) −
N
∑ cm y(n − m)
H for the input x(n) |W m=0 m=1
M N
y2(n) = H{x2(n)} = ∑
m =0
bm x 2 (n − m) − ∑
m = 1
cm y 2 (n − m)
2. 45 Digital Signal Processing
F b x (n − m) − c y (n − m)I
M N
∴ a1 y1(n) + a 2 y 2(n) = a1 GH ∑ m =0
m ∑ 1 JK m=1
m 1
F M
+ a G ∑ b x (n − m) − ∑ c y (n − m)J
I N
.....(1)
2 m 2 m 2
H m =0 K m =1
M M N
.....(2)
= a1 ∑ bm x1(n − m) + a 2 ∑ bm x 2 (n − m) − ∑ cm y 3(n − m)
m=0 m=0 m=1
M M N N
= a1 ∑
m = 0
bm x1(n − m) + a 2 ∑
m = 0
bm x 2(n − m) − a1 ∑
m = 1
cm y1(n − m) − a 2 ∑
m = 1
cm y 2(n − m)
F b
M N I F M N I .....(4)
= a1 GH ∑
m = 0
m x1(n − m) − ∑c
m = 1
m y1(n − m) + a 2 JK GH ∑
m = 0
bm x 2(n − m) − ∑
m = 1
cm y 2(n − m)JK
The condition to be satisfied for linearity is, y3(n) = a1 y1(n) + a2 y2(n).
From equations (1) and (4) we can say that the condition for linearity is satisfied. Therefore the system is
linear.
0
When n = 0, y(0) = ∑ x(k)
k = −∞
= ... x(2) + x(1) + x(0) Þ The response at n = 0, i.e., y(0) depends on the
present input x(0) and past inputs x(1), x(2),.....
1
= ... x(2) + x(1) + x(0) + x(1) Þ The response at n = 1, i.e., y(1) depends on the
present input x(1) and past inputs x(0), x(1), x(2),..
From the above analysis we can say that for any value of n, the system output depends on present and
past inputs. Hence the system is causal.
c) Given that, y(n) = b x(n)
When n = 0, y(0) = b x(0) Þ Þ The response at n = 0, i.e., y(0) depends on the present input x(0).
When n = 1, y(1) = b x(1) Þ Þ The response at n = 1, i.e., y(1) depends on the present input x(1).
From the above analysis we can say that the response for any value of n depends on the present input.
Hence the system is causal.
d) Given that, y(n) = n x(n)
When n = 0, y(0) = 0 ´ x(0) Þ The response at n = 0, i.e., y(0) depends on the present input x(0).
When n = 1, y(1) = 1 ´ x(1) Þ The response at n = 1, i.e., y(1) depends on the present input x(1).
When n = 2, y(2) = 2 ´ x(2) Þ The response at n = 2, i.e., y(2) depends on the present input x(2).
From the above analysis we can say that the response for any value of n depends on the present input.
Hence the system is causal.
Example 2.16
Test the causality of the following systems.
a) y(n) = x(n) + 2 x(n + 3) b) y(n) = x(n2) c) y(n) = x(3n) d) y(n) = x(n)
Solution
a) Given that, y(n) = x(n) + 2 x(n + 3)
When n = 0, y(0) = x(0) + 2 x(3) Þ The response at n = 0, i.e., y(0) depends on the
present input x(0) and future input x(3).
2. 47 Digital Signal Processing
When n = 1, y(1) = x(1) + 2 x(4) Þ Þ The response at n = 1, i.e., y(1) depends on the
present input x(1) and future input x(4).
From the above analysis we can say that the response for any value of n depends on present and future
inputs. Hence the system is noncausal.
The term bounded output refers to finite and predictable output for any value of n. Hence if output
y(n) is bounded then there exists a constant My such that |y(n)| £ My and My < ¥ , for all n.
In general, the test for stability of the system is performed by applying specific input. On applying a
bounded input to a system if the output is bounded then the system is said to be BIBO stable.For LTI (Linear
Time Invariant) systems the condition for BIBO stability can be transformed to a condition on impulse
response as shown below.
Condition for Stability of LTI System
The condition for stability of an LTI system is,
+∞
∑ h( n ) < ∞ .....(2.24)
n =−∞
i.e., an LTI system is stable if the impulse response is absolutely summable.
Chapter 2 - Discrete Time Signals and Systems 2. 48
Proof
Let, x(n) = Input to LTI system.
y(n) = Response of LTI system for the input x(n).
Now, by convolution sum formula,
y(n) = x(n) * h(n) = h(n) * x(n) Convolution satisfy
commutative property.
+∞
= ∑
m = −∞
h(m) x( n − m)
+∞ Taking absolute
∴ y(n) = ∑ h(m) x( n − m) value on both sides.
m =−∞
+∞
For linear system the order summation
= ∑ h(m) x( n − m) and absolute value can be interchanged.
m = −∞
+∞
For linear system the order of multiplication
= ∑ h(m) x( n − m)
and absolute value can be interchanged.
m = −∞
+∞
= ∑ h(m) M X If input is bounded, then
|x(n m)| = constant = MX
m = −∞
+∞
= MX ∑ h(m) MX is indepentent of
m =−∞ summation index m.
+∞
= MX ∑ h( n) Change index m to n.
n = −∞
Example 2.17
Test the stability of the following systems.
a) y(n) = cos[x(n)] b) y(n) = x(n 3) c) y(n) = n x(n)
Solution
a) Given that, y(n) = cos [x(n)]
The given system is a nonlinear system, and so the test for stability should be performed for specific inputs.
The value of cos q lies between 1 to +1 for any value of q. Therefore the output y(n) is bounded for any
value of input x(n). Hence the given system is stable.
b) Given that, y(n) = x(n 3)
The given system is a time variant system, and so the test for stability should be performed for specific
inputs.
The operations performed by the system on the input signal are folding and shifting. A bounded input
signal will remain bounded even after folding and shifting. Therefore in the given system, the output will be
bounded as long as input is bounded. Hence the given system is BIBO stable.
c) Given that, y(n) = n x(n)
The given system is a time variant system, and so the test for stability should be performed for specific
inputs.
2. 49 Digital Signal Processing
Case i : If x(n) tends to infinity or constant, as "n" tends to infinity, then y(n) = n x(n) will be infinite as "n"
tends to infinity. So the system is unstable.
Case ii : If x(n) tends to zero as "n" tends to infinity, then y(n) = n x(n) will be zero as "n" tends to infinity.
So the system is stable.
Example 2.18
Determine the range of values of "p" and "q" for the stability of LTI system with impulse response,
h(n) = pn ; n < 0
= qn ; n ≥ 0
Solution
∞
n= 0
n
= ∑p
n=1
−n
+ ∑
n=0
qn
∞ ∞ ∞ ∞ n is always positive.
1 1 n
= ∑
n=1
+
pn n= 0 ∑
qn = ∑
n =1 p
n
+ ∑
n= 0
q
n
∞ F 1I ∞
n |p|0 = 1
= ∑ GH p JK
n=0
− 1+ ∑
n= 0
q
The summation of infinite terms in the above equation converges if, 0 < 1/|p| < 1 and 0 < |q| < 1. Hence
by using infinite geometric series formula,
+∞
1 1 Infinite geometric
∑
|h(n)| =
1
−1+
1 − | q| series sum formula
n = −∞ 1−
p ∞
1
Cn = ∑
= constant 1 − C
n = 0
Therefore, the system is stable if |p| > 1 and |q| < 1. if 0 < C < 1
Example 2.19
Test the stability of LTI systems, whose impulse responses are,
Solution
a) h(n) = 0.2n u(n)
+∞ +∞ ∞ Infinite geometric
∴ ∑ h(n) = ∑ 0.2n u(n) = ∑ 0.2n series sum formula
n= −∞ n = −∞ n= 0
∞
1 1
= = 1. 25 ∑ Cn =
1 − 0.2 n = 0
1− C
+∞ if 0 < C < 1
Since, ∑ h(n) < ∞, system is stable.
n= −∞
Chapter 2 - Discrete Time Signals and Systems 2. 50
b) h(n) = 0.3n u(n) + 2n u(n)
+∞ +∞
∴ ∑ h(n) = ∑ 0.3n u(n) + 2n u(n)
n= −∞ n = −∞ ∞
∞
n
∞
n 1 ∑ Cn = ∞
= ∑ 0.3 + ∑ 2 u(n) =
1 − 0.3
+∞=∞ n = 0
if C > 1
n=0 n= 0
+∞
Since, ∑ h(n) = ∞, system is unstable.
n= −∞
c) h(n) = 4n u(-
-n)
+∞ +∞ 0 +∞
∴ ∑ h(n) = ∑ 4n u( −n) = ∑ 4n = ∑ 4−n
n = −∞ n = −∞ n = −∞ n= 0
∞ ∞ n ∞
=
1
∑ 4n = ∑ GH 4 JK
F 1I = ∑ 0.25 n
=
1
= 1. 3333
n=0 n= 0 n= 0
1 − 0.25
+∞
Since, ∑ h(n) < ∞ , system is stable.
n= −∞
+∞ +∞
∴ ∑ h(n) = ∑ 0.2n u( −n) + 3n u( −n)
n= −∞ n= −∞
0 0 +∞ +∞
= ∑ 0.2n + ∑ 3n = ∑ 0.2−n + ∑ 3−n
n= −∞ n= −∞ n= 0 n=0
∞ ∞ ∞ n ∞ n
= ∑
1
+
1
= ∑
1
∑ GH
F IJ + ∑ FG 1IJ
n=0 0.2n n=0 3n n=0 0.2 K H 3K n=0
∞ ∞
n n 1
= ∑5 +∑ 0.333 = ∞ +
1 − 0.333
=∞
n=0 n= 0
+∞
Since, ∑ h(n) = ∞, system is unstable.
n= −∞
+∞
.....(2.31)
∴ x3 ( q ) = ∑ x1( m) x2 (q − m)
m =−∞
The evaluation of equation (2.31) to determine the value of x3(n) at n = q, involves the following five
steps.
1. Change of index : Change the index n in the sequences x 1 (n) and x 2(n), to get the
sequences x1(m) and x2(m).
2. Folding : Fold x2(m) about m = 0, to obtain x2(-m).
3. Shifting : Shift x2(-m) by q to the right if q is positive, shift x2(-m) by q to the left
if q is negative to obtain x2(q - m).
4. Multiplication : Multiply x1(m) by x2(q - m) to get a product sequence. Let the product
sequence be vq(m). Now, vq(m) = x1(m) × x2(q - m).
5. Summation : Sum all the values of the product sequence vq(m) to obtain the value of
x3(n) at n = q. [i.e., x3(q)].
The above procedure will give the value of x3(n) at a single time instant say n = q. In general, we are
interested in evaluating the values of the sequence x3(n) over all the time instants in the range -¥ < n < ¥ .
Hence the steps 3, 4 and 5 given above must be repeated, for all possible time shifts in the range
-¥ < n < ¥ .
Convolution of finite duration sequences
In convolution of finite duration sequences it is possible to predict the length of resultant sequence.
If the sequence x1(n) has N1 samples and sequence x2(n) has N2 samples then the output sequence
x3(n) will be a finite duration sequence consisting of "N1+N2–1" samples.
i.e., if, Length of x1(n) = N1
Length of x2(n) = N2
then, Length of x3(n) = N1 + N2 – 1
In the convolution of finite duration sequences it is possible to predict the start and end of the
resultant sequence. If x1(n) starts at n = n1 and x2(n) starts at n = n2 then, the initial value of n for x3(n) is
"n = n1 + n2". The value of x1(n) for n < n1 and the value of x2(n) for n < n2 are then assumed to be zero.The final
value of n for x3(n) is "n = (n1 + n2) + (N1 + N2 – 2)".
i.e., if, x1(n) start at n = n1
x2(n) start at n = n2
then, x3(n) start at n = n1 + n2
and x3(n) end at n = (n1 + n2) + (N1 + N2 – 1) – 1
= (n1 + n2) + (N1 + N2 – 2)
In equation (2.32) each product x(m) d(n – m) is an impulse and the summation of impulses gives the
sequence x(n).
From equation (2.32) we know that the signal x(n) can be expressed as a summation of impulses,
+∞
.....(2.35)
i.e., x(n) = ∑
m = −∞
x(m) δ(n − m)
y(n) = H
|RS ∑
+∞
x(m) δ(n − m)
|UV .....(2.36)
|T
m = −∞ |W
The system H is a function of n and not a function of m. Hence by linearity property the equation
(2.36) can be written as,
+∞
.....(2.37)
y(n) = ∑
m = −∞
x(m) H {δ(n − m)}
Let the response of the LTI system to the unit impulse input d(n) be denoted by h(n),
\ h(n) = H{d(n)}
Then by time invariance property the response of the system to the delayed unit impulse input
d(n m) is given by,
h(n m) = H{d(n m)} .....(2.38)
Using equation (2.38), the equation (2.37) can be expressed as,
+∞
y( n) = ∑
m = −∞
x( m) h(n − m)
The above equation represents the convolution of input x(n) with the impulse response h(n) to yield
the output y(n). Hence it is proved that the response y(n) of LTI discrete time system for an
arbitrary input x(n) is given by convolution of input x(n) with impulse response h(n) of the system.
+∞
∴ y2(n − m) = ∑
q = −∞
x1( q) x2(n − q − m) .....(2.43)
+∞ +∞
= ∑
p = −∞
∑
m = −∞
x1( m) x 2(p− m) x 3 (n − p) Using equation (2.41)
+∞ +∞
= ∑
m = −∞
x1(m) ∑
p = −∞
x 2 (p − m) x 3(n − p) .....(2.44)
Let, p m = q when p = ¥ , q = p m = ¥ m = ¥
\p=q+m when p = +¥ , q = p m = +¥ m = +¥
On replacing (p m) by q, and p by (q + m) in the equation (2.44) we get,
+∞ +∞
LHS = ∑ x1( m) ∑ x 2( q) x 3 ( n − q − m)
m = −∞ q = −∞
+∞
= ∑ x1( m) y2 ( n − m) Using equation (2.43)
m = −∞
= x1 (n) * y2(n)
= x1(n) * [x2(n) * x3(n)] Using equation (2.42)
= RHS
Chapter 2 - Discrete Time Signals and Systems 2. 56
Proof of Distributive Property :
Consider the discrete time signals x1(n), x2(n) and x3(n). By distributive property we can write,
x1 (n) * [x2(n) + x3(n)] = [x1(n) * x2 (n)] + [x1(n) * x3 (n)]
LHS RHS
LHS = x1(n) * [x2(n) + x3(n)]
= x1(n) * x4(n) x4(n) = x2(n) + x3(n)
+∞
= ∑
m = −∞
x1( m) x 4(n − m) m is a dummy variable used for convolution operation.
+∞
x4(n m) = x2(n m) + x3(n m)
= ∑
m = −∞
x1( m) [x 2( n − m) + x 3(n − m)]
+∞ +∞
= ∑
m = −∞
x1( m) x 2(n − m) + ∑
m = −∞
x1( m) x 3(n − m)
h 2 (n)
Example 2.20
Determine the impulse response for the cascade of two LTI systems having impulse responses,
n n
h1(n) =
FG 2IJ u(n) and h2 (n) =
FG 1IJ u(n).
H 5K H 5K
Solution
Let h(n) be the impulse response of cascade system. Now h(n) is given by convolution of h1(n) and h2(n).
+∞
\ h(n) = h1(n) * h2(n) = ∑
m = −∞
h1(m) h2 (n − m)
Example 2.21
Determine the overall impulse response of the interconnected discrete time systems shown below,
a) b)
n n
h1(n) =
FG 1IJ u(n); h2 (n) =
FG 1IJ u(n); h1(n) = an u(n) ; h2 (n) = δ(n − 1) ; h3 (n) = δ(n − 2)
H 3K H 2K
n
F 1I
h (n) = G J u(n)
3
H 5K
Solution
a) The given system can be redrawn as shown below.
h1(n)
y(n)
+
x(n)
h1(n)
+ h 3 (n)
h2 (n)
The above system can be reduced to single equivalent system as shown below.
y1(n)
h1(n)
y(n)
x(n) h1(n) + [(h1(n) + h2 (n)) ∗ h 3 (n)] y(n)
x(n)
+ ⇒
⇓
h1(n) + h2 (n) h 3 (n)
x(n) h(n) y(n)
The product of h1(m) h3(n m) will be nonzero in the range 0 £ m £ n. Therefore the summation index in
the above equation can be changed to m = 0 to n.
n
∴ h1(n) ∗ h3(n) = ∑ h (m) h (n
m = 0
1 3 − m)
n m n − m n m n −m
∑ FGH 3IJK FGH 5IJK ∑ FGH 3IJK FGH 5IJK FGH 5IJK
1 1 1 1 1
= =
m = 0 m = 0
n n m n n m
=
FG 1IJ ∑ FG 1IJ 5m =
FG 1IJ ∑ FG 5IJ
H 5K H 3K
m = 0
H 5K H 3K
m = 0
2. 59 Digital Signal Processing
n +1
FG 5IJ − 1 n Using finite geometric series sum formula.
F 1I H 3 K
∴ h (n) ∗ h (n) = G J
1 3
H 5K 5 − 1 Finite geometric series
3
n sum formula
FG 5IJ 5 − 1
n LM 3 FG 5IJ 5 − 3 OP
n n N
CN+1 − 1
1I H 3 K 3
F
=G J
F 1I
H 5K 5 − 3 = GH 5JK ∑ Cm =
C −1
3
MN 2 H 3K 3 2 PQ m = 0
n n n n n
=
FG 1IJ
5 FG 5IJ − 3 FG 1IJ = 5 FG 1IJ − 3 FG 1IJ ; for n ≥ 0
H 5K
2 H 3 K 2 H 5K 2 H 3K 2 H 5K
n n
5 F 1I 3 F 1I
= G J u(n) − G J u(n) ; for all n
2 H 3K 2 H 5K
The product of h2(m) and h3(nm) will be nonzero in the range 0 £ m £ n. Therefore the summation index
in the above equation can be change to m = 0 to n.
n
∴ h2 (n) ∗ h3 (n) = ∑
m = 0
h2 (m) h3(n − m)
n m n − m n m n −m
= ∑
FG 1IJ FG 1IJ = ∑
FG 1IJ FG 1IJ FG 1IJ Finite geometric series
m = 0
H 2K H 5 K m = 0
H 2K H 5K H 5K sum formula
n m n m N
FG 1IJ n
F 1I FG 1IJ ∑ FG 5IJ n
CN+1 − 1
=
H 5K ∑ GH 2JK 5 m
=
H 5K H 2K ∑
m = 0
Cm =
C −1
m = 0 m = 0
n + 1
n
FG 5IJ − 1
= GHF 51IJK H 2K Using finite geometric series sum formula.
5
−1
2
n
F 5I 5
=
FG 1IJ GH 2JK 2 − 1 = FG 1IJ LM 2 FG 5IJ 5 − 2 OP
n n n
H 5K 5 − 2 H 5K MN 3 H 2K 2 3 PQ
2
n n n n n
= G J G J − 32 FGH 51IJK = 35 FGH 21IJK − 32 FGH 51IJK
5 F 1I F 5 I
3 H 5K H 2K
for n ≥ 0
n n
5 F 1I
= G J u(n) − 32 FGH 51IJK u(n) for all n
3 H 2K
Now, the overall impulse response h(n) is given by,
=
LM 7 FG 1IJ − 13 FG 1IJ + 5 FG 1IJ OP u(n)
n n n
MN 2 H 3K 6 H 5K 3 H 2K PQ
Chapter 2 - Discrete Time Signals and Systems 2. 60
b) The given system can be reduced to single equivalent system as shown below.
h1(n) ∗ h 2 (n)
x(n) y(n)
+
h3 (n) ∗ h1(n)
⇓
x(n) [h1(n) ∗ h2 (n)] + [h 3 (n) ∗ h1(n)] y(n)
⇓
x(n) h(n) y(n)
∞
= ∑
m = −∞
h2 (m) h1(n − m) Using commutative property.
∞ ∞
= ∑
m = −∞
δ(m − 1) a(n − m) = ∑
m = −∞
δ(m − 1) an a −m
∞
=a n
∑
m = −∞
δ(m − 1) a −m
The product of d(m 1) and am in the above equation will be nonzero only when m = 1.
∞ ∞
= ∑
m = −∞
δ(m − 2) a (n − m) = ∑
m = −∞
δ(m − 2) an a −m
∞
=a n
∑ δ(m − 2) a −m
m = −∞
The product of d(m 2) and am in the above equation will be nonzero only when m = 2.
Let x1(n) and x2(n) be the input sequences and x3(n) be the output sequence.
1. Change the index "n" of input sequences to "m" to get x1(m) and x2(m).
2. Sketch the graphical representation of the input sequences x1(m) and x2(m).
3. Let us fold x 2 (m) to get x 2(–m). Sketch the graphical representation of the folded
sequence x2(–m).
4. Shift the folded sequence x2(–m) to the left graphically so that the product of x1(m) and
shifted x2(–m) gives only one nonzero sample. Now multiply x1(m) and shifted x2(–m) to get
a product sequence, and then sum up the samples of product sequence, which is the first
sample of output sequence.
5. To get the next sample of output sequence, shift x2(–m) of previous step to one position right
and multiply the shifted sequence with x1(m) to get a product sequence. Now the sum of the
samples of product sequence gives the second sample of output sequence.
2. To get subsequent samples of output sequence, the step 5 is repeated until we get a nonzero
product sequence.
Method 2: Tabular Method
The tabular method is same as that of graphical method, except that the tabular representation of the
sequences are employed instead of graphical representation. In tabular method, every input sequence, folded
and shifted sequence is represented by a row in a table.
Method 3: Matrix Method
Let x1(n) and x2(n) be the input sequences and x3(n) be the output sequence. In matrix method one of
the sequences is represented as a row and the other as a column as shown below.
Multiply each column element with row elements and fill up the matrix array.
Now the sum of the diagonal elements gives the samples of output sequence x3(n). (The sum of the
diagonal elements are shown below for reference).
x 2 (0) x 2 (1) x 2 (2) x 2 (3)
......
Example 2.22
Determine the response of the LTI system whose input x(n) and impulse response h(n) are given by,
x(n) = {1, 2, 0.5, 1} and h(n) = {1, 2, 1, 1}
- -
Solution
The response y(n) of the system is given by convolution of x(n) and h(n).
+∞
y(n) = x(n) ∗ h(n) = ∑
m = −∞
x(m) h(n − m)
x (m ) h (m ) h ( −m )
2 2 2
1 1 1 1 1 1
0.5
0 1 2 3 m −1 0 1 2 m −2 −1 0 1 m
−1 −1
F ig 1 : In p u t sequ e n ce. F ig 2 : Im p u lse resp o n se . F ig 3 : F o ld ed im p ulse respo nse.
The computation of each sample using the above equation are graphically shown in fig 4 to fig 10. The
graphical representation of output sequence is shown in fig 11.
2. 63 Digital Signal Processing
+∞ +∞ +∞
When n = −1 ; y(−1) = ∑
m = −∞
x(m) h( −1 − m) = ∑
m = −∞
x(m) h−1(m) = ∑
m = −∞
v −1(m)
h −1 (m ) x (m ) v −1 (m )
2
X 2 ⇒
1 1 1 1 1
0.5
−3 −2 −1 0 m 0 1 2 3 m −3 −2 −1 0 1 2 3 m
T he s um of pro du c t s e qu en c e v −1(m )
−1 F ig 4 : C o m p u ta tio n of y ( −1 ).
g iv e s y ( −1 ). ∴ y ( −1) = 1
+∞ +∞ +∞
When n = 0 ; y(0) = ∑
m = −∞
x(m) h(0 − m) = ∑
m = −∞
x(m) h0 (m) = ∑
m = −∞
v 0 (m)
h 0 (m ) x (m ) v 0 (m )
2 2 2
X 2 ⇒
1 1 1 1
0.5
−2 −1 0 1 m 0 1 2 3 m −2 −1 0 1 2 3 m
T h e s u m o f p rod uc t s eq ue nc e v 0 ( m )
−1 F ig 5 : C o m p u ta tion of y (0 ).
giv es y(0 ) . ∴ y (0) = 2 + 2 = 4
+∞ +∞ +∞
When n = 1 ; y(1) = ∑
m = −∞
x(m) h(1 − m) = ∑
m = −∞
x(m) h1(m) = ∑
m = −∞
v1(m)
h 1 (m ) x (m ) v 1 (m )
4
X ⇒
2 2
1 1 1 1 1
0.5 0.5
−1 0 1 2 m 0 1 2 3 m −1 0 1 2 3 m
−1 T he s um of pro du c t s e qu en c e v 1 (m )
F ig 6 : C o m p u ta tio n of y (1 ).
g iv e s y (1). ∴ y(1 ) = 1 + 4 + 0.5 = 5 .5
+∞ +∞ +∞
When n = 2 ; y(2) = ∑
m = −∞
x(m) h(2 − m) = ∑
m = −∞
x(m) h2 (m) = ∑
m = −∞
v 2 (m)
h 2 (m ) x (m ) v 2 (m )
X ⇒
2 2
2
1 1 1 1 1 1
0.5
0 1 2 3 m 0 1 2 3 m 0 1 2 3 m
−1
−1 T he s um of pro du c t s e qu en ce v 2 (m )
F ig 7 : C o m p u ta tio n of y (2 ). g iv e s y (2). ∴ y (2 ) = −1 + 2 + 1 + 1 = 3
Chapter 2 - Discrete Time Signals and Systems 2. 64
+∞ +∞ +∞
When n = 3 ; y(3) = ∑
m = −∞
x(m) h(3 − m) = ∑
m = −∞
x(m) h3 (m) = ∑
m = −∞
v 3 (m)
h 3 (m ) x (m ) v 3 (m )
X ⇒
2 2
2
1 1 1 1
0.5 0.5
1 2 3 4 m 2 m
0 0 1 3 0 1 2 3 4 m
−1
−2
F ig 8 : C o m p u ta tio n of y (3 ). T he su m o f pro du ct s e qu en ce v 3 (m )
giv es y (3). ∴ y (3) = −2 + 0.5 + 2 = 0 .5
+∞ +∞ +∞
When n = 4 ; y(4) = ∑
m = −∞
x(m) h(4 − m) = ∑
m = −∞
x(m) h4 (m) = ∑
m = −∞
v 4 (m)
h 4 (m ) x (m ) v 4 (m )
2 X ⇒
2
1 1
1 1 1
0.5
0 1 2 3 4 5 m
−1
0 1 2 3 m 0 1 2 3 4 5 m
−0.5
T h e s u m o f p rod uc t s eq ue nc e v 4 (m )
F ig 9 : C o m p u ta tio n of y (4 ).
give s y(4 ). ∴ y (4 ) = −0 .5 + 1 = 0 .5
+∞ +∞ +∞
When n = 5 ; y(5) = ∑
m = −∞
x(m) h(5 − m) = ∑
m = −∞
x(m ) h5 (m) = ∑
m = −∞
v 5 (m)
h 5 (m ) x (m ) v 5 (m )
2 X 2
⇒
1 1 1 1
0.5
0 1 2 3 4 5 6 m 0 1 2 3 m 0 1 2 3 4 5 6 m
−1
−1
F ig 1 0 : C o m p u ta tio n of y (5 ). T h e s um of p rod uc t s eq ue nc e v 5 (m )
g ive s y(5 ). ∴ y (5 ) = −1
y (n )
The output sequence, y(n) = {1, 4, 5.5, 3, 0.5, 0.5, − 1
A
} 5.5
1
0.5 0.5
−2 −1 0 1 2 3 4 5 6 7 n
−1
F ig 11 : G ra ph ica l rep resen ta tio n of y (n ).
2. 65 Digital Signal Processing
Method 2 : Tabular Method
The given sequences and the shifted sequences can be represented in the tabular array as shown below.
m 3 2 1 0 1 2 3 4 5 6
x(m) 1 2 0.5 1
h(m) 1 2 1 1
h(m) 1 1 2 1
h(1 m) = h1(m) 1 1 2 1
h(0 m) = h0(m) 1 1 2 1
h(1 m) = h1(m) 1 1 2 1
h(2 m) = h2(m) 1 1 2 1
h(3 m) = h3(m) 1 1 2 1
h(4 m) = h4(m) 1 1 2 1
h(5 m) = h5(m) 1 1 2 1
Each sample of y(n) is computed using the convolution formula,
+∞ +∞
y(n) = ∑ x(m) h(n − m)
m = −∞
= ∑ x(m) h (m),
m = −∞
n where hn (m) = h(n − m)
To determine a sample of y(n) at n = q, multiply the sequence x(m) and hq(m) to get a product sequence
(i.e., multiply the corresponding elements of the row x(m) and hq(m)). The sum of all the samples of the product
sequence gives y(q).
3
When n = −1 ; y( −1) = ∑
m = −3
x(m) h −1(m) Q The product is valid only for m = −3 to + 3.
h(n) h(n)
x(n) 1 2 1 −1 x(n) 1 2 1 −1
1 1 2 1 −1
1 1 ×1 1 ×2 1 ×1 1 × (−1)
2 2 4 2 −2
2 2 ×1 2×2 2 ×1 2 ×(−1) ⇒
0.5 0.5 1 0.5 −0.5
0.5 0.5 × 1 0.5 × 2 0.5 × 1 0.5 × (−1)
1 1 2 1 −1
1 1 ×1 1×2 1 ×1 1 × (−1)
Example 2.23
Determine the output y(n) of a relaxed LTI system with impulse response,
h(n) = an u(n) ; where |a| < 1 and
When input is a unit step sequence, i.e., x(n) = u(n).
Solution
The graphical representation of x(n) and h(n) after replacing n by m are shown below. Also the sequence
x(m) is folded to get x(m).
h (m ) x (m ) x ( −m )
1 1 1
a
2
a
3
a
0 1 2 3 m 0 1 2 3 m −3 −2 −1 0 m
F ig 1 : Im p u lse resp o n se. F ig 2 : Im p u lse sequ en ce. F ig 3 : F o ld ed inp u t sequ en ce.
Here both h(m) and x(m) are infinite duration sequences starting at n = 0. Hence the output sequence y(n)
will also be an infinite duration sequence starting at n = 0.
By convolution formula,
∞ ∞
y(n) = ∑ h(m) x(n − m) = ∑ h(m) x (m) ;
m = −∞ m =0
n where xn (m) = x(n − m)
The computation of some samples of y(n) using the above equation are graphically shown below.
2. 67 Digital Signal Processing
∞ ∞ ∞
When n = 0 ; y(0) = ∑
m = 0
h(m) x(0 − m) = ∑
m = 0
h(m) x 0 (m) = ∑
m = 0
v 0 (m)
h (m ) x 0 (m ) v 0 (m )
1 1 1
a
a
2
X ⇒
3
a
0 1 2 3 m −3 −2 −1 m 0 1 2
0 1 m
F ig 4 : C o m p u ta tio n of y (0 ). y (0) = 1
∞ ∞ ∞
When n = 1 ; y(1) = ∑
m = 0
h(m) x(1 − m) = ∑
m = 0
h(m) x 1(m) = ∑
m = 0
v1(m)
h (m ) x 1 (m ) v 1 (m )
1 1 1
a a
a
2 X ⇒
3
a
0 1 2 3 m −2 −1 m
0 1 −1 0 1 2 m
y (1) = 1 + a
F ig 5 : C o m p u ta tio n of y (1 ).
∞ ∞ ∞
When n = 2 ; y(2) = ∑
m = 0
h(m) x(2 − m) = ∑
m = 0
h(m) x 2 (m) = ∑
m = 0
v 2 (m)
h (m ) x 2 (m ) v 2 (m )
1 1 1
a a
2
a ⇒ a
2
a
3 X
0 1 2 3 m −1 0 1 2 m 0 1 2 3 m
2
y(2) = 1 + a +a
F ig 6 : C o m p u ta tio n of y (2 ).
Solving similarly for other values of n, we can write y(n) for any value of n as shown below.
n
y(n) = 1 + a + a 2 +......+ an = ∑a
p=0
p
; for n ≥ 0
y (n )
3
1+a+a +a
2
1 + a + a2
1+a
0 1 2 3 m
F ig 7 : G ra ph ica l rep rese n ta tio n o f y (n).
Chapter 2 - Discrete Time Signals and Systems 2. 68
3 3 3 3
2 2 2 2
1 1 1 1
0 1 2 3 n −4 −3 −2 −1 0 1 2 3 4 5 6 7 n
F ig 2.2 4 a : F in ite d u ra tio n seq u en c e x(n ). F ig 2.2 4 b : P erio d ic e xten sio n o f x (n ).
F ig 2.2 4 : A fin ite d u ra tion seq ue n ce a n d its p erio d ic e xten sio n .
Let us delay the periodic sequence xp(n) by two units of time as shown in fig 2.25(a). (For delay the
sequence is shifted right). Let us denote one period of this delayed sequence by x1(n). One period of the
delayed sequence is shown in fig 2.25(b).
x p (n −2 )
x 1 (n ) x1 (n) = xp ((n − 2))4
4 4 4 4
3 3 3 3
2 2 2 2
1 1 1 1
−2 −1 0 1 2 3 4 5 6 7 8 9 n 0 1 2 3 n
F ig 2 .2 5 a: x p (n ) d e la y ed b y tw o un its o f tim e. F ig 2 .2 5 b: O ne period of x p (n −2 ).
F ig 2 .2 5 : D elay ed versio n o f x p (n).
The sequence x1(n) can be represented by xp(n – 2, (mod 4)), or xp((n – 2))4, where mod 4 indicates that
the sequence repeats after 4 samples. The relation between the original sequence x(n) and one period of the
delayed sequence x1(n) are shown below.
x (1) = 2 x 1 (1) = 4
3 1 ⇒2 4 ⇒1 3
x (n) 4 3 2
x (2) = 3 x (0) = 1 x 1 (2) = 1 x 1 (n) x 1 (0) = 3
R otate x p(n) antic loc kw ise tw o tim es to get x 1(n)
= x p ((n − 2)) 4
x (3) = 4 x 1 (3) = 2
F ig 2.2 6 a: C ircu la r rep rese n ta tio n o f x (n). F ig 2.2 6 b: C ircu la r rep rese n ta tio n o f x 1 (n ).
F ig 2.2 6 : C ircu la r rep rese n ta tio n o f a sig n a l a nd its dela yed version .
Let us advance the periodic sequence xp(n) by three units of time as shown in fig 2.27(a). Let us denote
one period of this advanced sequence by x2(n). One period of the advanced sequence is shown in fig 2.27(b).
4 4 4 4
3 3 3 3
2 2 2 2
1 1 1 1
−3 −2 −1 0 1 2 3 4 5 6 7 8 n 0 1 2 3 n
F ig 2 .2 7 a: x p (n ) a d v an c ed by th ree u n its o f tim e. F ig 2 .2 7 b: O ne p e rio d of x p (n + 3 ).
F ig 2 .2 7 : A d va n c ed v ersion of x p (n ).
The sequence x2(n) can be represented by xp(n + 3, (mod 4)) or xp((n + 3))4, where mod 4 indicates that the
sequence repeats after 4 samples. The relation between the original sequence x(n) and one period of the
advanced sequence x2(n) are shown below.
x2(n) = xp(n + 3, (mod 4)) = xp((n + 3))4
\ When n = 0; x2(0) = xp((0 + 3))4 = xp((3))4 = x(3) = 4
When n = 1; x2(1) = xp((1 + 3))4 = xp((4))4 = x(0) = 1
When n = 2; x2(2) = xp((2 + 3))4 = xp((5))4 = x(1) = 2
When n = 3; x2(3) = xp((3 + 3))4 = xp((6))4 = x(2) = 3
The periodic sequences xp(n) and x2(n) can be represented as points on a circle as shown in fig 2.28.
From fig 2.28 we can say that x2(n) is simply xp(n) shifted circularly by three units in time where clockwise
direction has been selected for left shift or advance.
2 3 4 1
x (1) = 2 x 2 (1) = 1
3 1 4 2 ⇒1 3 ⇒2 4
x p (n) 4 1 2 3 x 2 (n)
x (2) = 3 x (0) = 1 x 2 (2) = 2 x 2 (0) = 4
R otate x p(n) cloc k w is e three tim es to get x 2(n)
x (3) = 4 x 2 (3) = 3
F ig 2.2 8 a: C ircu la r rep rese nta tio n o f x (n). F ig 2.2 8 b: C ircu la r rep rese nta tio n o f x 2 (n ).
F ig 2.2 8 : C ircu la r rep rese nta tio n o f a sig n a l a n d its ad v a nced versio n.
Chapter 2 - Discrete Time Signals and Systems 2. 70
Thus we conclude that a circular shift of an N-point sequence is equivalent to a linear shift of its
periodic extension and viceversa. If a nonperiodic N-point sequence is represented on the circumference of
a circle then it becomes a periodic sequence of periodicity N. When the sequence is shifted circularly, the
samples repeat after N shifts. This is similar to modulo-N operation. Hence, in general, the circular shift may
be represented by the index mod-N. Let x(n) be an N-point sequence represented on a circle and x¢(n) be its
circularly shifted sequence by m units of time.
Now, x¢(n) = x(n – m, mod N) º x((n – m))N ..... (2.53)
When m is positive, the equation (2.53) represents delayed sequence and when m is negative, the
equation (2.53) represents advanced sequence.
1
3
3
MMx M(2) x (1M)
2 2 x 2 ( 0)
M
..... x 2 ( 4)
M
x (3)
2
M
PP × MM M PP = MM M PP
MMx (N − 2) x ( N − 3) x2 ( N − 4) ..... x 2 ( 0) x ( N − 1) P
MM M PP MM M PP
2 2 2
MNx (N − 1) x ( N − 2) x 2 ( N − 3) ..... x 2 (1) x (0)
PP Mx (N − 2)P M x ( N − 2)P
1 3
2 2 2 Q MNx (N − 1) PQ MN x ( N − 1) PQ
1 3
Example 2.24
Perform circular convolution of the two sequences, x1(n) = {2, 1, 2, 1} and x2(n)= {1, 2, 3, 4}
- -
Solution
Method 1:Graphical Method of Computing Circular Convolution
Let x3(n) be the sequence obtained by circular convolution of x1(n) and x2(n).
The circular convolution of x1(n) and x2(n) is given by,
N − 1 N − 1
x3(n) = ∑
m = 0
x1(m) x 2((n − m))N = ∑ x (m) x
m = 0
1 2,n (m)
where x 2,n (m) = x 2((n − m))N and m is the dummy variable used for convolution.
The index n in the given sequences are changed to m and each sequence is represented as points on a
circle as shown below. The folded sequence x2(m) and circularly shifted sequences x2(n m) are also represented
on the circle.
x 1 (1) = 1 x 2 (1) = 2 x 2 (3) = 4
F ig 1 . F ig 2 . F ig 3 .
4 1 2 3
2 3 4 1
F ig 4 : C ircula rly sh ifted seq u en c es x 2 ( −m ) fo r n = 0 , 1 , 2 , 3 .
Chapter 2 - Discrete Time Signals and Systems 2. 74
The given sequences are 4-point sequences . \ N = 4.
Each sample of x3(n) is given by sum of the samples of product sequence defined by the equation,
3 3
x3 (n) = ∑
m = 0
x1(m) x 2,n (m) = ∑
m = 0
vn (m) ; where vn (m) = x1(m) x 2,n (m) .....(1)
Using the above equation (1), graphical method of computing each sample of x3(n) are shown in fig 5 to fig 8.
3 3 3
When n = 0 ; x 3 (0) = ∑
m = 0
x1(m) x 2 ((0 − m))4 = ∑
m = 0
x1(m) x 2,0 (m) = ∑
m = 0
v 0 (m)
1 4 1 ×4 = 4
2 x 1 (m ) 2 X 3 x 2, 0 (m ) 1 ⇒2 × 3 = 6 v 0 (m ) 2 ×1 = 2
−1 2 −1 × 2 = −2
T he su m o f sa m p les of v 0 (m ) giv es x 3 (0)
F ig 5: C o m p u ta tio n of x 3 (0 ). ∴ x (0 ) = 2 + 4 + 6 − 2 = 1 0
3
3 3 3
When n = 1 ; x 3 (1) = ∑
m = 0
x1(m) x 2 ((1 − m))4 = ∑
m = 0
x1(m) x 2,1(m) = ∑
m = 0
v1(m)
1 1 1 ×1 = 1
x 1 (m ) x 2, 1 (m ) ⇒ v 1 (m )
2 2 X 4 2 2 ×4 = 8 2 ×2 = 4
−1 3 −1 × 3 = −3
T he su m o f sa m ples of v 1 (m ) giv es x 3 (1)
F ig 6: C o m p u ta tio n of x 3 (1 ). ∴ x (1 ) = 4 + 1 + 8 − 3 = 1 0
3
3 3 3
When n = 2 ; x 3 (2) = ∑
m = 0
x1(m) x 2 ((2 − m))4 = ∑
m = 0
x1(m) x 2,2 (m) = ∑
m = 0
v 2 (m)
1 2 1 ×2 = 2
2 x 1 (m ) 2 X 1 x 2 , 2 (m ) 3 ⇒ 2 ×1 = 2 v 2 (m ) 2 ×3 = 6
−1 4 −1 × 4 = −4
T h e s u m o f s a m p le s of v 2 (m ) giv es x 3 (2)
F ig 7 : C o m p u ta tio n of x 3 (2 ). ∴ x 3 (2) = 6 + 2 + 2 − 4 = 6
3 3 3
When n = 3 ; x 3 (3) = ∑
m = 0
x1(m) x 2 ((3 − m))4 = ∑
m = 0
x1(m) x 2,3 (m) = ∑
m = 0
v 3 (m)
1 3 1 ×3 = 3
2 x 1 (m ) 2 X 2 x 2, 3 (m ) 4 ⇒ 2 ×2 = 4 v 3 (m ) 2 ×4 = 8
−1 1 −1 × 1 = −1
The index n in the given sequences are changed to m and then, the given sequences can be represented
in the tabular array as shown below. Here the shifted sequences x2, n(m) are periodically extended with a
periodicity of N = 4. Let x3(n) be the sequence obtained by convolution of x1(n) and x2(n). Each sample of x3(n) is
given by the equation,
N − 1 N − 1
x 3 (n) = ∑
m = 0
x1(m) x 2((n − m))N = ∑
m = 0
x1(m) x 2,n (m), where x 2,n (m) = x 2((n − m))N
x1(m) 2 1 2 1
x2(m) 1 2 3 4
x2((m))4 = x2,0(m) 4 3 2 1 4 3 2
To determine a sample of x3(n) at n = q, multiply the sequence, x1(m) and x 2,q (m), to get a product
sequence x1(m) x 2,q (m). [i.e., multiply the corresponding elements of the row x1(m) and x2, q(m)]. The sum of all
the samples of the product sequence gives x3(q).
3
When n = 0 ; x 3(0) = ∑
m =0
x1(m) x 2,0 (m)
= x1(0) x 2,0 (0) + x1(1) x 2,0 (1) + x1(2) x 2,0 (2) + x1(3) x 2,0 (3)
= 2 × 1 + 1 × 4 + 2 × 3 + (−1) × 2 = 2 + 4 + 6 − 2 = 10
The samples of x3(n) for other values of n are calculated as shown for n = 0.
3
When n = 1; x3(1) = ∑
m =0
x1(m) x 2,1(m) = 4 + 1 + 8 − 3 = 10
3
When n = 2; x 3(2) = ∑
m =0
x1(m) x 2,2(m) = 6 + 2 + 2 − 4 = 6
3
When n = 3; x3 (3) = ∑
m =0
x1(m) x 2,3 (m) = 8 + 3 + 4 − 1 = 14
l
∴ x3 (n) = 10, 10, 6, 14 q
A
Method 3 : Circular Convolution Using Matrices
The sequence x1(n) can be arranged as a column vector of order N ´ 1 and using the samples of x2(n) the
N ´ N matrix is formed as shown below. The product of the two matrices gives the sequence x3(n).
LMx (0)
2 x 2(3) x 2(2) x 2(1)OP LMx (0)OP
1 LMx (0)OP
3
MMx (1)
2 x 2 (0) x 2(3) x (2) P
2 MMx (1) PP
1
= MMx (1) PP
3
x (3) P
MMxx ((32))
2 x 2(1)
x 2(2)
x 2 (0)
x 2(1)
2
x (0)PQ
P MMxx ((32))PP
1
MMxx ((32)) PP
3
N2 2 N Q
1 N Q
3
Chapter 2 - Discrete Time Signals and Systems 2. 76
Example 2.25
Perform the circular convolution of the two sequences x1(n) and x2(n), where,
l
x1(n) = 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6 q
-
l
x 2(n) = 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5 q
-
Solution
Let x3(n) be the result of the circular convolution of x1(n) and x2(n). The given sequences consists of eight
samples. Then x3(n) will also have 8 samples.
The sequences are represented in the tabular array as shown below after replacing n by m. The sequence
x2(m) is folded and shifted.
m 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
x2((m))8 = x2,0(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5 1.3 1.1 0.9 0.7 0.5 0.3
x2((1 m))8 = x2,1(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5 1.3 1.1 0.9 0.7 0.5
x2((2 m))8 = x2,2(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5 1.3 1.1 0.9 0.7
x2((3 m))8 = x2,3(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5 1.3 1.1 0.9
x2((4 m))8 = x2,4(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5 1.3 1.1
x2((5 m))8 = x2,5(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5 1.3
x2((6 m))8 = x2,6(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 1.5
x2((7 m))8 = x2,7(m) 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1
7 7
x 3 (n) =
m =0
∑ x1(m) x 2 ((n − m))8 = ∑
m =0
x1(m) x 2,n (m) ; where x 2,n (m) = x 2 ((n − m))8
7 7
When n = 2; x3 (2) = ∑ x (m) x ((2 − m))
m=0
1 2 8 = ∑ x (m) x
m =0
1 2,2 (m) = 6.48
7 7
When n = 3; x3(3) = ∑ x (m) x ((3 − m))
m =0
1 2 8 = ∑ x (m) x
m =0
1 2,3 (m) = 6.64
7 7
When n = 4; x3 (4) = ∑ x (m) x ((4 − m))
m =0
1 2 8 = ∑
m=0
x1(m) x 2,4 (m) = 6.48
7 7
When n = 5; x3 (5) = ∑
m=0
x1(m) x 2((5 − m))8 = ∑
m=0
x1(m) x 2,5(m) = 6.00
7 7
When n = 6; x3(6) = ∑
m=0
x1(m) x 2 ((6 − m))8 = ∑ x (m) x
m =0
1 2,6 (m) = 5.20
7 7
When n = 7; x3(7) = ∑
m=0
x1(m) x 2 ((7 − m))8 = ∑ x (m) x
m =0
1 2,7 (m) = 4.08
lA
∴ x3(n) = 5.20, 6.00, 6.48, 6.64, 6.48, 6.00, 5.20, 4.08 q
Example 2.26
Find the linear and circular convolution of the sequences, x(n) = 1, 0.5 l q l q
and h(n) = 0.5, 1 .
A A
Solution
Linear Convolution by Tabular Array
∞
Let , y(n) = x(n) * h(n) = ∑
m = −∞
x(m) h(n − m) ; where m is a dummy variable for convolution.
Since both x(n) and h(n) starts at n = 0, the output sequence y(n) will also start at n = 0.
Since the length of x(n) and h(n) is 2, the length of y(n) is 2 + 2 1 = 3.
Let us change the index n to m in x(n) and h(n). The sequences x(m) and h(m) are represented in the
tabular array as shown below.
∞ 1
When n = 0 ; y(0) = ∑
m = −∞
x(m) h( −m) = ∑ x(m) h (m) = x(−1) h (−1) + x(0) h (0) + x(1) h (1)
m = −1
0 0 0 0
∞ 2
When n = 2 ; y(2) = ∑
m = −∞
x(m) h(2 − m) = ∑
m= 0
x(m) h2(m) = 0 + 0.5 + 0 = 0.5
l
∴ y(n) = 0.5, 1.25, 0.5 q
A
Circular Convolution by Tabular Array
N− 1
Let, y(n) = x(n) ∗ h(n) =
m=0
∑ x(m) h((n − m)) N ; where m is a dummy variable for convolution.
The index n in the sequences are changed to m and the sequences are represented in the tabular array as
shown below. The shifted sequence hn(m) is periodically extended with periodicity N = 2.
Note : The boldfaced number is the sample obtained by periodic extension.
m 1 0 1
x(m) 1 0.5
h(m) 0.5 1
h((m))2 = h0(m) 1 0.5 1
h((1 m))2 = h1(m) 1 0.5
N − 1 1
When n = 0 ; y(0) = ∑
m= 0
x(m) h((0 − m))2 = ∑ x(m) h (m)
m = 0
0
The sequence x(n) starts at n = 0 and h(n) starts at n = 1. Hence y(n) will start at n = 0 + (1) = 1.
The length of x(n) is 4 and the length of h(n) is 5. Hence the length of y(n) is (4 + 5 1) = 8. Also y(n) ends at
n = 0 + (1) + (4 + 5 2) = 6.
Let us change the index n to m in x(n) and h(n). The sequences x(m) and h(m) are represented on the
tabular array as shown below. Let us fold h(m) to get h(m) and shift h(m) to perform convolution operation.
Note : The unfilled boxes in the table are considered as zeros.
m 4 3 2 1 0 1 2 3 4 5 6 7
x(m) 1 1 2 2
h(m) 0.5 1 1 2 0.75
h(m) 0.75 2 1 1 0.5
h(1 m) = h1(m) 0.75 2 1 1 0.5
h(0 m) = h0(m) 0.75 2 1 1 0.5
h(1 m) = h1(m) 0.75 2 1 1 0.5
h(2 m) = h2(m) 0.75 2 1 1 0.5
h(3 m) = h3(m) 0.75 2 1 1 0.5
h(4 m) = h4(m) 0.75 2 1 1 0.5
h(5 m) = h5(m) 0.75 2 1 1 0.5
h(6 m) = h6(m) 0.75 2 1 1 0.5
Each sample of y(n) is given by summation of the product sequence, x(m) h(n m). To determine a
sample of y(n) at n = q, multiply the sequence x(m) and hq(m) to get a product sequence [i.e., multiply the
corresponding elements of the row x(m) and hq(m)]. The sum of all the samples of the product sequence gives
y(q).
+∞ +∞
i. e. , y(n) = ∑ x(m) h(n − m) = ∑ x(m) h (m)
m = −∞ m = −∞
n
3
When n = −1 ; y(−1) = ∑
m = −4
x(m) h−1(m)
= x(4) h1(4) + x(3) h1(3) + x(2) h1(2) + x(1) h1(1) + x(0) h1(0)
+ x(1) h1(1) + x(2) h1(2) + x(3) h1(3)
= 0 + 0 + 0 + 0 + (0.5) + 0 + 0 + 0 = 0.5
The samples of y(n) for other values of n are calculated as shown for n = 1.
3
When n = 0 ; y(0) = ∑
m = −3
x(m) h0 (m) = 0 + 0 + 0 + (−1) + 0.5 + 0 + 0 = −0.5
3
When n = 1 ; y(1) = ∑
m = −2
x(m) h1(m) = 0 + 0 + 1+ 1+ 1+ 0 = 3
3
When n = 2 ; y(2) = ∑
m = −1
x(m) h2 (m) = 0 + (−2) + ( −1) + 2 + ( −1) = −2
Chapter 2 - Discrete Time Signals and Systems 2. 80
4
When n = 3 ; y(3) = ∑
m= 0
x(m) h3(m) = −0.75 + 2 + (−2) + (−2) + 0 = −2.75
5
When n = 4 ; y(4) = ∑
m= 0
x(m) h4 (m) = 0 + 0.75 + 4 + 2 + 0 + 0 = 6.75
6
When n = 5 ; y(5) = ∑
m= 0
x(m) h5(m) = 0 + 0 + 1.5 + (−4) + 0 + 0 + 0 = −2. 5
7
When n = 6 ; y(6) = ∑
m= 0
x(m) h6 (m) = 0 + 0 + 0 + (−1.5) + 0 + 0 + 0 + 0 = −1.5
Note : The boldfaced numbers are samples obtained by periodic extension of the sequences.
m 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
x(m) 0 1 1 2 2 0 0 0
h(m) 0.5 1 1 2 0.75 0 0 0
h(m) 0 0 0 0.75 2 1 1 0.5
h((1 m))8 = h1(m) 0 0 0 0.75 2 1 1 0.5 0 0 0 0.75 2 1 1
h((0 m))8 = h0(m) 0 0 0 0.75 2 1 1 0.5 0 0 0 0.75 2 1
h((1 m))8 = h1(m) 0 0 0 0.75 2 1 1 0.5 0 0 0 0.75 2
h((2 m))8 = h2(m) 0 0 0 0.75 2 1 1 0.5 0 0 0 0.75
h((3 m))8 = h3(m) 0 0 0 0.75 2 1 1 0.5 0 0 0
h((4 m))8 = h4(m) 0 0 0 0.75 2 1 1 0.5 0 0
h((5 m))8 = h5(m) 0 0 0 0.75 2 1 1 0.5 0
h((6 m))8 = h6(m) 0 0 0.75 2 1 1 0.5 0 0 0 0.75 2 1 1 0.5
Let y(n) be the sequence obtained by circular convolution of x(n) and h(n).
Now, each sample of y(n) is given by,
6 6
y(n) = ∑
m = −1
x(m) h((n − m))8 = ∑
m = −1
x(m) hn (m) ; where hn (m) = h((n − m))8
2. 81 Digital Signal Processing
To determine a sample of y(n) at n = q, multiply the sequence x(m) and hq(m) to get a product sequence
x(m) hq(m), [i.e., multiply the corresponding elements of the row x(m) and hq(m)]. The sum of all the samples of the
product sequence gives y(q).
6
When n = −1 ; y(−1) = ∑
m = −1
x(m) h−1(n) = x( −1) h−1( −1) + x(0) h−1(0) + x(1) h−1(1) + x(2) h−1(2)
The samples of y(n) for other values of n are calculated as shown for n = 1.
6
When n = 0 ; y(0) = ∑ x(m) h0m = 0 + (−1) + 0.5 + 0 + 0 + 0 + 0 + 0 = −0.5
m = −1
6
When n = 1 ; y(1) = ∑ x(m) h1m = 0 + 1+ 1+ 1+ 0 + 0 + 0 + 0 = 3
m = −1
6
When n = 2 ; y(2) = ∑ x(m) h2m = 0 + (−2) + (−1) + 2 + (−1) + 0 + 0 + 0 = −2
m = −1
6
When n = 3 ; y(3) = ∑ x(m) h3m = 0 + (−0.75) + 2 + (−2) + (−2) + 0 + 0 + 0 = −2.75
m = −1
6
When n = 4 ; y(4) = ∑ x(m) h4m = 0 + 0 + 0.75 + 4 + 2 + 0 + 0 + 0 = 6.75
m = −1
6
When n = 5 ; y(5) = ∑ x(m) h5m = 0 + 0 + 0 + 1.5 + (−4) + 0 + 0 + 0 = −2.5
m = −1
6
When n = 6 ; y(6) = ∑ x(m) h6m = 0 + 0 + 0 + 0 + (−1. 5) + 0 + 0 + 0 = −1.5
m = −1
Note : 1. Since circular convolution is periodic, the convolution is performed for any one period.
2. It can be observed that the results of both the methods are same.
1. The entire sequence should be available before convolution can be carried out. This makes long
delay in getting the output.
The above problems can be overcome in the sectioned convolutions. In this technique the larger
sequence is sectioned (or splitted) into the size of smaller sequence. Then the linear convolution of each
section of longer sequence and the smaller sequence is performed. The output sequences obtained from the
convolutions of all the sections are combined to get the overall output sequence. There are two methods of
sectioned convolutions. They are overlap add method and overlap save method.
Chapter 2 - Discrete Time Signals and Systems 2. 82
2.11.1 Overlap Add Method
In the overlap add method, the longer sequence is divided into smaller sequences. Then linear
convolution of each section of longer sequence and smaller sequence is performed. The overall output
sequence is obtained by combining the output of the sectioned convolution.
Let, N1 = Length of longer sequence
N2 = Length of smaller sequence
Let the longer sequence be divided into sections of size N3 samples.
Note : Normally the longer sequence is divided into sections of size same as that of smaller sequence.
N3 + N2 −1
N3 N2 −1
N3 + N2 −1
N2 −1 N 3 − ( N 2 − 1) N2 −1
N3 + N2 − 1
N2 − 1 N 3 − ( N 2 − 1) N2 −1
O v erlapped region
N3 + N2 −1
N2 −1 N 3 − ( N 2 − 1) N2 −1
N3 + N2 −1
N2 −1 N 3 − ( N 2 − 1)
A ppended
w ith zero
F ig 2 .3 1 : A p p en d ing o f sec tio n s o f in pu t seq u en c e
in m eth o d 1 o f o ve rlap sa ve m e th o d .
N3 + N2 −1
N2 −1 N 3 − ( N 2 − 1) N2 −1
N3 + N2 −1
N2 −1 N 3 − ( N 2 − 1) N2 −1
N3 + N2 − 1
N2 −1 N3
O v erlapped region
N3 + N2 −1
N 3 −( N 2 − 1) N2 −1 N2 −1
A ppended
w ith zero
N3 + N2 −1
N 3 −( N 2 − 1) N2 −1 N2 −1
N3 + N2 −1
N3 N2 −1
N3 + N2 −1
N3 N2 −1
N3 + N2 −1
N2 −1 N 3 − ( N 2 − 1) N2 −1
N3 + N2 −1
N2 − 1 N 3 −( N 2 − 1 ) N2 −1
O v erlapped region
Example 2.28
Perform the linear convolution of the following sequences by a) Overlap add method, and b) Overlap
save method.
Solution
a) Overlap Add Method
In this method the longer sequence is sectioned into sequences of size equal to smaller sequence. Here
x(n) is a longer sequence when compared to h(n). Hence x(n) is sectioned into sequences of size equal to h(n).
Here linear convolution of each section is performed between two sequences each consisting of 2
samples. Hence each convolution output will consists of 2 + 2 1 = 3 samples. The convolution of each section
is performed by tabular method as shown below.
Note :
1. Here N1 = 8, N2 = 2, N3 = 2. \ (N2 1) = 2 1 = 1 and (N2 + N3 1) = 2 + 2 1 = 3
2. The unfilled boxes in the tables are considered as zero.
3. For convenience of convolution operation the index n is replaced by m in x1(n), x2(n), x3(n), x4(n) and h(n).
2. 85 Digital Signal Processing
Convolution of Section 1
+∞
m 1 0 1 2
y1(n) = x1(n) ∗ h(n) = ∑ x (m) h(n − m)
m = −∞
1
+∞
x1(m) 1 1
= ∑ x (m) h (m) ;
1 n n = 0, 1, 2
h(m) 1 1 m = −∞
where hn (m) = h(n − m)
h(m) = ho(m) 1 1
h(1 m) = h1(m) 1 1
When n = 0 ; y1(0) = ∑ x1(m ) h0 (m) = 0 − 1+ 0 = − 1
h(2 m) = h2(m) 1 1
When n = 1 ; y1(1) = ∑ x (m) h (m) = 1+ 1 = 2 1 1
x2(m) 2 2 +∞
h(m) 1 1
= ∑ x (m) h (m)
m = −∞
2 n ; n = 2, 3, 4
Convolution of Section 3
m 1 0 1 2 3 4 5 6
x3(m) 3 3
h(m) 1 1
h(m) 1 1
h(4 m) = h4(m) 1 1
h(5 m) = h5(m) 1 1
h(6 m) = h6(m) 1 1
+∞ +∞
y3(n) = x3(n) ∗ h(n) = ∑ x (m) h(n − m) = ∑ x (m) h (m)
m = −∞
3
m = −∞
3 n ; n = 4, 5, 6
Convolution of Section 4
m 1 0 1 2 3 4 5 6 7 8
x4(m) 4 4
h(m) 1 1
h(m) 1 1
h(6 m) = h6(m) 1 1
h(7 m) = h7(m) 1 1
h(8 m) = h8(m) 1 1
Chapter 2 - Discrete Time Signals and Systems 2. 86
+∞ +∞
y 4 (n) = x 4 (n) ∗ h(n) = ∑x
m = −∞
4 (m) h(n − m) = ∑ x (m) h (m)
m = −∞
4 n ; n = 6, 7, 8
∑ x (m) h (m) = 0 − 4 + 0 = −4
When n = 6 ; y 4 (6) = 4 6
Convolution of Section 2
m 2 1 0 1 2 3 4
x2(m) 2 2 3
h(m) 1 1 0
h(m) 0 1 1
h((2 m))3 = h2(m) 0 1 1 0 1
h((3 m))3 = h3(m) 0 1 1 0
h((4 m))3 = h4(m) 0 1 1
mf 4
y 2(n) = x 2(n) ∗ h(n) = ∑
m = mi
x 2(m) h((n − m))N = ∑ x (m) h (m) ;
m = 2
2 n n = 2, 3, 4
Convolution of Section 3
mf 6
y 3(n) = x 3 (n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
3 N = ∑ x (m) h (m) ;
m = 4
3 n n = 4, 5, 6
Convolution of section 4
m 2 1 0 1 2 3 4 5 6 7 8
x4(m) 4 4 0
h(m) 1 1 0
h(m) 0 1 1
h((6 m))3 = h6(m) 0 1 1 0 1
h((7 m))3 = h7(m) 0 1 1 0
h((8 m))3 = h8(m) 0 1 1
mf 8
y 4 (n) = x 4 (n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
4 N = ∑ x (m) h (m) ; n = 6, 7, 8
m = 6
4 n
∑ x (m) h (m) = −4 + 0 + 0 = −4
When n = 6 ; y 4 (6) = 4 6
It can be observed that the last sample in an output sequence overlaps with the first sample of next output
sequence. In overlap save method the overall output is obtained by combining the outputs of the convolution
of all sections. While combining the outputs, the overlapped first sample of every output sequence is discarded
and the remaining samples are simply saved as samples of y(n) as shown in the following table.
n 0 1 2 3 4 5 6 7 8
y1(n) 1 2 3
y2(n) 1 4 5
y3(n) 1 6 7
y4(n) 4 8 4
y(n) * 2 3 4 5 6 7 8 4
Note : Here y(n) is linear convolution of x(n) and h(n). It can be observed that the results of both the methods
are same, except the first N2 1 samples.
2. 89 Digital Signal Processing
Method 2
In method 2, the overlapping samples are placed at the end of the section.Each section of longer
sequence is converted to 3-sample sequence, using the samples of original longer sequence as shown below.
It can be observed that the last sample of x1(n) is placed as overlapping sample at the end of x2(n). The last
sample of x2(n) is placed as overlapping sample at the end of x3(n). The last sample of x3(n) is placed as
overlapping sample at the end of x4(n). Since there is no previous section for x1(n), the overlapping sample of
x1(n) is taken as zero.
= 1 ; n = 1 = 2 ; n = 3 = 3 ; n=5 = 4 ; n = 7
= 0; n=2 = 1 ; n = 4 = 2 ; n = 6 = 3 ; n = 8
Now perform circular convolution of each section with h(n). The output sequence obtained from circular
convolution will have three samples. The circular convolution of each section is performed by tabular method as
shown below.
m 2 1 0 1 2 3 4
x2(m) 2 2 1
h(m) 1 1 0
h(m) 0 1 1
h((2 m))3 = h2(m) 0 1 1 0 1
h((3 m))3 = h3(m) 0 1 1 0
h((4 m))3 = h4(m) 0 1 1
Chapter 2 - Discrete Time Signals and Systems 2. 90
mf 4
y 2 (n) = x 2(n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
2 N = ∑ x (m) h (m); n = 2,
m = 2
2 n 3, 4,
Convolution of Section 3
m 2 1 0 1 2 3 4 5 6
x3(m) 3 3 2
h(m) 1 1 0
h(m) 0 1 1
h((4 m))3 = h4(m) 0 1 1 0 1
h((5 m))3 = h5(m) 0 1 1 0
h((6 m))3 = h6(m) 0 1 1
mf 6
y3(n) = x3 (n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
3 N = ∑ x (m) h (m) ;
m = 4
3 n n = 4, 5, 6
Convolution of Section 4
m 2 1 0 1 2 3 4 5 6 7 8
x4(m) 4 4 3
h(m) 1 1 0
h(m) 0 1 1
h((6 m))3 = h6(m) 0 1 1 0 1
h((7 m))3 = h7(m) 0 1 1 0
h((8 m))3 = h8(m) 0 1 1
mf 8
y 4 (n) = x 4 (n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
4 N = ∑ x (m) h (m) ; n = 6, 7, 8
m = 6
4 n
∑
When n = 6 ; y 4 (6) = x 4 (m) h6 (m) = −4 + 0 − 3 = −7
When n = 7 ; y (7) = ∑ x (m) h (m) =
4 4 7 4+4+0 = 8
When n = 8 ; y (8) = ∑ x (m) h (m) =
4 4 8 0 − 4 + 3 = −1
2. 91 Digital Signal Processing
To Combine the Output of the Convolution of Each Section
It can be observed that the last sample in an output sequence overlaps with the first sample of next output
sequence. In overlap save method the overall output is obtained by combining the outputs of the convolution of
all sections. While combining the outputs, the overlapped last sample of every output sequence is discarded and
the remaining samples are simply saved as samples of y(n) as shown in the following table.
n 0 1 2 3 4 5 6 7 8
Note :
y1(n) 1 2 1
Here y(n) is linear convolution
y2(n) 3 4 1 of x(n) and h(n). It can be
y3(n) 5 6 1 observed that the results of both
the methods are same except the
y4(n) 7 8 1 last N21 samples.
y(n) 1 2 3 4 5 6 7 8 *
Example 2.29
Perform the linear convolution of the following sequences by a) Overlap add method and b) Overlap
save method.
Solution
a) Overlap Add Method
In this method the longer sequence is sectioned into sequences of size equal to smaller sequence. Here
x(n) is a longer sequence when compared to h(n). Hence x(n) is sectioned into sequences of size equal to h(n).
Given that x(n) = {1, 2, 3, 1, 2, 3, 4, 5, 6}. Let x(n) can be sectioned into three sequences, each
consisting of three samples of x(n) as shown below.
Let y1(n), y2(n) and y3(n) be the output of linear convolution of x1(n), x2(n) and x3(n) with h(n) respectively.
m 2 1 0 1 2 3 4
+∞
h(m) 2 1 1 +∞
h(m) = h0(m) 1 1 2
= ∑ x (m) h (m)
m = −∞
1 n
Convolution of Section 2
m 2 1 0 1 2 3 4 5 6 7
x2(m) 1 2 3
h(m) 2 1 1
h(m) = h0(m) 1 1 2
h(3 m) = h3(m) 1 1 2
h(4 m) = h4(m) 1 1 2
h(5 m) = h5(m) 1 1 2
h(6 m) = h6(m) 1 1 2
h(7 m) = h7(m) 1 1 2
∞ ∞
y 2(n) = x 2(n) ∗ h(n) = ∑ x (m) h(n − m) = ∑ x (m) h (m); n = 3, 4, 5, 6, 7
m = −∞
2
m = −∞
2 n
∑ x (m) h (m) = 0 + 0 − 2 + 0 + 0 = 2
When n = 3 ; y 2 (3) = 2 3
m 4 3 2 1 0 1 2 3 4
x1(m) 1 2 3 1 2
h(m) 2 1 1 0 0
h((m))5 = h0(m) 0 0 1 1 2 0 0 1 1
h((1 m))5 = h1(m) 0 0 1 1 2 0 0 1
h((2 m))5 = h2(m) 0 0 1 1 2 0 0
h((3 m))5 = h3(m) 0 0 1 1 2 0
h((4 m))5 = h4(m) 0 0 1 1 2
mf 4
y1(n) = x1(n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
1 N = ∑ x (m) h (m); n = 0, 1, 2, 3, 4
m = 0
1 n
Convolution of Section 2
m 4 3 2 1 0 1 2 3 4 5 6 7
x2(m) 1 2 3 4 5
h(m) 2 1 1 0 0
h(m) = h0(m) 0 0 1 1 2
h((3 m))5 = h3(m) 0 0 1 1 2 0 0 1 1
h((4 m))5 = h4(m) 0 0 1 1 2 0 0 1
h((5 m))5 = h5(m) 0 0 1 1 2 0 0
h((6 m))5 = h6(m) 0 0 1 1 2 0
h((7 m))5 = h7(m) 0 0 1 1 2
mf 7
y 2 (n) = x 2(n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
2 N = ∑ x (m) h (m); n = 3, 4, 5, 6, 7
m = 3
2 n
∑
When n = 3 ; y 2 (3) = x 2(m) h3 (m) = −2 + 0 + 0 4 + 5 = 1
When n = 4 ; y 2(4) =∑ x (m) h (m) = −1 − 4 + 0 + 0 5 = −10
2 4
Convolution of Section 3
m 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10
x3(m) 4 5 6 0 0
h(m) 2 1 1 0 0
h(m) = h0(m) 0 0 1 1 2
h((6 m))5 = h6(m) 0 0 1 1 2 0 0 1 1
h((7 m))5 = h7(m) 0 0 1 1 2 0 0 1
h((8 m))5 = h8(m) 0 0 1 1 2 0 0
h((9 m))5 = h9(m) 0 0 1 1 2 0
h((10 m))5 = h10(m) 0 0 1 1 2
mf 10
y3 (n) = x 3(n) ∗ h(n) = ∑ x (m) h((n − m))
m = mi
3 N = ∑ x (m) h (m)
m = 6
3 n ; n = 6, 7, 8, 9, 10
\ y(n) = x(n) * h(n) = {*, *, 7, 1, 8, 7, 7, 17, 13, 1, 6}
Note : Here y(n) is linear convolution of x(n) and h(n). It can be observed that the results of both the
methods are same except the first N2 1 samples.
Let h(n) be the impulse response of a system and h¢(n) be the impulse response of inverse system. Let
us connect the system and its inverse in cascade as shown in fig 2.36.
Identity sy s tem
H H
-1
y (n)
x(n) h(n) h ’(n) w (n) = x(n)
2.12.2 Deconvolution
In an LTI system the response y(n) is given by convolution of input x(n) and impulse response h(n).
i.e., y(n) = x(n) * h(n)
The process of recovering the input from the response of a system is called deconvolution. (or the
process of recovering x(n) from x(n) * h(n) is called deconvolution).
When the response y(n) and impulse response h(n) are available, then the input x(n) can be computed
using the equation (2.64).
x(n) =
1 LM n −1
y(n) − ∑ x(m) h(n − m)
OP .....(2.64)
h(0) MN m= 0 PQ
Proof :
Let x(n) and h(n) be finite duration sequences starting from n = 0. Consider the matrix method
of convolution of x(n) and h(n) shown below.
y(0)
y( n) = x(0) h(0) ⇒ x(0) =
h(0)
y(1) − x(0) h(1)
y(1) = x(1) h(0)+ x(0) h(1) ⇒ x(1) =
h(0)
y(2) − x(0) h(2) − x(1) h(1)
y(2) = x(2) h(0)+ x(1) h(1)+ x(0) h(2) ⇒ x(2) =
h(0)
y(3) − x(0) h(3) − x(1) h(2) − x(2) h(1)
y(3) = x(3) h(0)+ x(2) h(1)+ x(1) h(2)+ x(0) h(3) ⇒ x(3) =
h(0)
and so on.
From the above analysis, in general for any value of n, the x(n) is given by,
Solution
n
Given that, y(n) = ∑ x(m)
m=0
0
When n = 0; y(0) = ∑ x(m) = x(0)
m =0
1
When n = 1; y(1) =
m=0
∑ x(m) = x(0) + x(1) = y(0) + x(1)
2
When n = 2; y(2) = ∑
m =0
x(m) = x(0) + x(1) + x(2) = y(1) + x(2)
3
When n = 3; y(3) = ∑
m=0
x(m) = x(0) + x(1) + x(2) + x(3) = y(2) + x(3)
and so on,
x(0) = y(0) ; x(1) = y(1) y(0) ; x(2) = y(2) y(1) ; x(3) = y(3) y(2) and so on,
In general for any value of n, the signal x(n) can be written as,
2. 99 Digital Signal Processing
Example 2.31
When a discrete time system is excited by an input x(n), the response is y(n) = { 2, 5, 11, 17, 13, 12 }
--
If the impulse response of the system is h(n) = { 2, 1, 3 }, then what will be the input to the system?
-
Solution
Let N1 be number of samples in x(n) and N2 be number of samples in h(n), then the number of samples N3
in y(n) is given by,
N3 = N1 + N2 1
\ N1 = N3 N2 + 1 = 6 3 + 1 = 4 samples
Therefore x(n) is 4 sample sequence.
Each sample of x(n) is given by,
The evaluation of equation (2.68) to determine the value of rxy(m) at m = q involves the following three
steps.
1. Shifting : Shift y(n) by q times to the right if q is positive, shift y(n) by q times to the
left if q is negative to obtain y(n - q).
2. Multiplication : Multiply x(n) by y(n - q) to get a product sequence. Let the product
sequence be vq(n). Now, vq(n) = x(n) × y(n - q).
3. Summation : Sum all the values of the product sequence vq(n) to obtain the value of
rxy(m) at m = q. [i.e., rxy(q)].
The above procedure will give the value rxy(m) at a single time instant say m = q. In general we are
interested in evaluating the values of the sequence rxy(m) over all the time instants in the range -¥ < m < ¥ .
Hence the steps 1, 2 and 3 given above must be repeated, for all possible time shifts in the range -¥ < m < ¥ .
In the correlation of finite duration sequences it is possible to predict the start and end of the resultant
sequence. If x(n) is N-point sequence and starts at n = n1 and if y(n) is N2-point sequence and starts at n = n2 then,
the initial value of m = mi for rxy(m) is mi = n1 – (n2 + N2 – 1). The value of x(n) for n < n1 and the value of y(n) for
n < n2 are then assumed to be zero.The final value of m = mf for rxy(m) is mf = mi + (N1+N2– 2).
The correlation operation involves all the steps in convolution operation except the folding.
Hence it can be proved that the convolution of x(n) and folded sequence y(-n) will generate the crosscorrelation
sequence rxy(m).
i.e., r (m) = x(n) * y(-n) .....(2.69)
xy
The procedure given above can be used for computing autocorrelation of x(n). For computing
autocorrelation using equation (2.68) replace y(n – q) by x(n – q). Similarly when equation (2.69) is used,
replace y(–n) by x(–n).
The autocorrelation of N-point sequence x(n) will give 2N –1 point autocorrelation sequence.
If x(n) starts at n = nx then initial value of m = mi for rxx(m) is mi = – (N –1). The final value of m = mf for rxx(m)
is mf = mi + (2N–2).
2. 101 Digital Signal Processing
Properties of Correlation
1. The crosscorrelation sequence rxy(m) is simply a folded version of ryx(m),
i.e., rxy(m) = ryx(-m)
Similarly for autocorrelation sequence,
rxx(m) = rxx(-m)
Hence autocorrelation is an even function.
2. The crosscorrelation sequence satisfies the condition,
From the above equations we infer that the crosscorrelation sequence and autocorrelation
sequences attain their respective maximum values at zero shift/lag.
3. Using the maximum value of crosscorrelation sequence, the normalized crosscorrelation sequence
is defined as,
rxy (m)
ρxy (m) ≤
rxx (0) ryy (0)
Using the maximum value of autocorrelation sequence, the normalized autocorrelation sequence
is defined as,
rxx (m)
ρxx (m) ≤
rxx ( 0)
Multiply each column element with row elements and fill up the matrix array.
Now the sum of the diagonal elements gives the samples of output sequence rxy(m). (The sum of the
diagonal elements are shown below for reference).
:
:
rxy(0) = ..... + x(0) y(0) + .....
rxy(1) = ..... + x(1) y(0) + x(0 ) y(-1) + .....
rxy(2) = ..... + x(2) y(0) + x(1) y(-1) + x(0) y(-2) + .....
rxy(3) = ..... + x(3) y(0) + x(2) y(-1) + x(1) y(-2) + x(0) y(-3) + .....
:
:
Example 2.32
Perform crosscorrelation of the sequences, x(n) = {1, 1, 2, 2} and y(n) = {1, 0.5, 1}.
Solution
Let rxy(m) be the crosscorrelation sequence obtained by crosscorrelation of x(n) and y(n).
The crosscorrelation sequence rxy(m) is given by,
+∞
rxy = ∑ x(n) y(n − m)
n = −∞
x (n ) y (n )
2 2
1 1 1 1
0.5
0 1 2 3 n 0 1 2 n
F ig 1. F ig 2.
The 6 samples of rxy(m) are computed using the equation,
+∞ +∞
rxy (m) = ∑
n = −∞
x(n) y(n − m) = ∑
n = −∞
x(n) y m (n) ; where y m (n) = y(n − m)
The computation of each sample of rxy(n) using the above equation are graphically shown in fig 3 to fig 8.
The graphical representation of output sequence is shown in fig 9.
+∞ +∞ +∞
When m = −2 ; rxy ( −2) = ∑
n = −∞
x(n) y(n − ( −2)) = ∑
n = −∞
x(n) y −2 (n) = ∑
n = −∞
v − 2 (n)
x (n ) y −2 (n) v −2 (n)
2 2
X ⇒
1 1 1 1 1
0.5
0 1 2 3 n −2 −1 0 n −2 −1 0 1 2 3 n
T he su m o f pro du ct s eq ue n ce
v −2 (n ) giv es rxy ( −2)
F ig 3 : C o m p uta tio n o f r x y ( −2).
∴ rxy ( −2) = 0 + 0 + 1 + 0 + 0 + 0 = 1
+∞ +∞ +∞
When m = −1 ; rxy (−1) = ∑
n = −∞
x(n) y(n − ( −1)) = ∑
n = −∞
x(n) y −1(n) = ∑
n = −∞
v − 1(n)
x (n ) y −1 (n) v −1 (n )
2 2
X ⇒ 1
1 1 1 1
0.5 0.5
0 1 2 3 n −1 0 1 n −1 0 1 2 3 n
T he s um of pro du c t s e qu en c e
v −1(n ) g iv e s rx y ( −1 )
F ig 4 : C om p u ta tio n of rx y ( −1 ).
∴ rxy ( −1) = 0 + 0 .5 + 1 + 0 + 0 = 1 .5
Chapter 2 - Discrete Time Signals and Systems 2. 104
+∞ +∞ +∞
When m = 0 ; rxy (0) = ∑ x(n) y(n) = ∑ x(n) y 0 (n) = ∑ v 0 (n)
n = −∞ n = −∞ n = −∞
x (n ) y 0 (n ) v 0 (n )
2 2 2
X ⇒ 1
1 1 1 1
0.5 0.5
0 1 2 3 n 0 1 2 n 0 1 2 3 n
T he su m o f pro du ct s eq u en ce
x (n ) y 1 (n ) v 1 (n )
2 2 2
X ⇒
1 1 1 1 1 1
0.5
0 1 2 3 n 0 1 2 3 n 0 1 2 3 n
T he su m o f pro du ct s eq u en ce
F ig 6 : C o m p u ta tio n of rxy (1 ). v 1 (n) giv es rxy (1 )
∴ rx y (1 ) = 0 + 1 + 1 + 2 = 4
+∞ +∞ +∞
When m = 2 ; rxy (2) = ∑
n = −∞
x(n) y(n − 2) = ∑
n = −∞
x(n) y 2 (n) = ∑
n = −∞
v 2 (n)
x (n ) y 2 (n ) v 2 (n )
2 2 2
X ⇒ 1
1 1 1 1
0.5
0 1 2 3 n 0 1 2 3 4 n 0 1 2 3 4 n
T he su m o f pro du ct s eq u en ce
F ig 7 : C o m pu ta tio n o f rx y (2). v 2 (n ) giv es rx y (2 )
∴ rx y (2 ) = 0 + 0 + 2 + 1 + 0 = 3
+∞ +∞ +∞
When m = 3 ; rxy (3) = ∑
n = −∞
x(n) y(n − 3) = ∑
n = −∞
x(n) y 3(n) = ∑
n = −∞
v 3(n)
x (n ) y 3 (n ) v 3 (n )
2 2
X ⇒ 2
1 1 1 1
0.5
0 1 2 3 n 0 1 2 3 4 5 n 0 1 2 3 4 5 n
T he su m o f pro du ct s eq u en ce
F ig 8 : C o m p uta tio n o f rxy (3 ). v 3 (n ) giv es rx y (3 )
∴ rx y (3) = 0 + 0 + 0 + 2 + 0 + 0 = 2
2. 105 Digital Signal Processing
The crosscorrelation sequence, rxy(m) = {1, 1.5, 3.5, 4, 3, 2}
-
r x y (m )
4
3.5
3
2
1.5
1
−2 −1 0 1 2 3 m
F ig 9 : G ra p h ic a l rep resenta tio n o f rxy (m ).
Method 2: Tabular Method
The given sequences and the shifted sequences can be represented in the tabular array as shown below.
n 2 1 0 1 2 3 4 5
x(n) 1 1 2 2
y(n) 1 0.5 1
y(n (2)) = y2(n) 1 0.5 1
y(n (1)) = y1(n) 1 0.5 1
y(n) = y0(n) 1 0.5 1
y(n 1) = y1(n) 1 0.5 1
y(n 2) = y2(n) 1 0.5 1
y(n 3) = y3(n) 1 0.5 1
To determine a sample of rxy(m) at m = q, multiply the sequence x(n) and yq(n) to get a product sequence
[i.e., multiply the corresponding elements of the row x(n) and yq(n)]. The sum of all the samples of the product
sequence gives rxy(q).
3
When m = −2 ; rxy (−2) = ∑
n = −2
x(n) y −2(n) = 0 + 0 + 1+ 0 + 0 + 0 = 1
3
When m = −1 ; rxy (−1) = ∑ x(n) y
n = −1
−1(n) = 0 + 0.5 + 1+ 0 + 0 = 1.5
3
When m = 0 ; rxy (0) = ∑ x(n) y
n =0
0 (n) = 1+ 0.5 + 2 + 0 = 3.5
3
When m = 1 ; rxy (1) = ∑
n=0
x(n) y1(n) = 0 + 1+ 1+ 2 =4
4
When m = 2 ; rxy (2) = ∑ x(n) y (n)
n =0
2 = 0 + 0 + 2 + 1+ 0 =3
5
When m = 3 ; rxy (3) = ∑ x(n) y (n)
n=0
3 = 0 +0 + 0 + 2+ 0 +0 = 2
y ( −n ) y ( −n )
x (n) 1 0.5 1 x (n) 1 0.5 1
1 1 ×1 1 × 0.5 1 ×1 1 1 0.5 1
1 1 ×1 1 × 0.5 1 ×1 ⇒ 1 1 0.5 1
2 2 ×1 2 × 0.5 2 ×1 2 2 1 2
2 2 ×1 2 × 0.5 2 ×1 2 2 1 2
Example 2.33
Determine the autocorrelation sequence for x(n) = {1, 2, 3, 4}.
Solution
Let, rxx(m) be the autocorrelation sequence.
The autocorrelation sequence rxx(m) is given by,
+∞
rxx (m) = ∑
n = −∞
x(n) x(n − m)
n 3 2 1 0 1 2 3 4 5 6
x(n) 1 2 3 4
x(n (3)) = x3(n) 1 2 3 4
x(n (2)) = x2(n) 1 2 3 4
x(n (1)) = x1(n) 1 2 3 4
x(n) = x0(n) 1 2 3 4
x(n 1) = x1(n) 1 2 3 4
x(n 2) = x2(n) 1 2 3 4
x(n 3) = x3(n) 1 2 3 4
2. 107 Digital Signal Processing
Each sample of rxx(m) is given by,
+∞ +∞
rxx (m) = ∑
n = −∞
x(n) x(n − m) = ∑
n = −∞
x(n) xm (n) ; where xm (n) = x(n − m)
To determine a sample of rxx(m) at m = q, multiply the sequence x(n) and xq(n) to get a product sequence
[i.e., multiply the corresponding elements of the row x(n) and xq(n)]. The sum of all the samples of the product
sequence gives rxx(q).
3
W hen m = − 3 ; rxx ( − 3) = ∑
n = −3
x(n) x − 3 (n ) = 0 + 0 + 0 + 4 + 0 + 0 + 0 = 4
3
W hen m = − 2 ; rxx ( − 2) = ∑
n = −2
x(n) x − 2 (n ) = 0 + 0 + 3 + 8 + 0 + 0 = 11
3
W hen m = − 1 ; rxx ( − 1 ) = ∑
n = −1
x(n) x − 1(n ) = 0 + 2 + 6 + 12 + 0 = 20
3
W hen m = 0 ; rxx ( 0 ) = ∑
n = 0
x(n) x 0 (n ) = 1 + 4 + 9 + 16 = 30
4
W hen m = 1 ; rxx (1 ) = ∑
n = 0
x(n) x 1(n ) = 0 + 2 + 6 + 12 + 0 = 20
5
W hen m = 2 ; rxx ( 2) = ∑
n = 0
x(n) x 2 (n ) = 0 + 0 + 3 + 8 + 0 + 0 = 11
6
W hen m = 3 ; rxx (3) = ∑
n = 0
x(n) x 3 (n ) = 0 + 0 + 0 + 4 + 0 + 0 + 0 = 4
The output sequence obtained by circular correlation is also periodic sequence with periodicity of N
samples. Hence this correlation is also called periodic correlation. The circular correlation is defined for
periodic sequences. But circular correlation can be performed with non-periodic sequences by periodically
extending them.The circular correlation of two sequences requires that, at least one of the sequences should
be periodic. Hence it is sufficient if one of the sequences is periodically extended in order to perform circular
correlation.
Chapter 2 - Discrete Time Signals and Systems 2. 108
The circular correlation of finite duration sequences can be performed only if both the sequences
consists of same number of samples. If the sequences have different number of samples, then convert the
smaller size sequence to the size of larger size sequence by appending zeros.
In the equation (2.70), the sequence x(n) is unshifted and the sequence y*(n) is circularly shifted by
m units of time for correlation operation. The same results can be obtained if the sequence y*(n) is unshifted
and the sequence x(n) is circularly shifted opposite to that of earlier case by m units of time, hence the circular
correlation operation can also be expressed as,
N−1
rxy ( m) = ∑ x(( n + m))
n=0
N y* (n) .....(2.72)
Circular correlation basically involves the same three steps as that for correlation, namely shifting one
of the sequence, multiplying the two sequences and finally summing the values of product sequence. The
difference between the two is that in circular correlation the shifting (rotating) operations are performed in a
circular fashion by computing the index of one of the sequences by modulo-N operation. In correlation, there
is no modulo-N operation.
2.14.1 Procedure for Evaluating Circular Correlation
Let, x(n) and y(n) be periodic discrete time sequences with periodicity of N-samples. If x(n) and y(n)
are non-periodic then convert the sequences to N-sample sequence and periodically extend the sequence
y(n) with periodicity of N-samples.
Now the circular correlation of x(n) and y(n) will produce a periodic sequence rxy ( m) with periodicity
of N-samples. The samples of one period of rxy ( m) can be computed using the equation (2.70).
The evaluation of equation (2.73) to determine the value of rxy ( m) at m = q involves the following
four steps.
1. Conjugation : Take conjugate of y(n) to get y*(n). If y(n) is a real sequence then y*(n)
will be same as y(n). Represent the samples of one period of the sequences
x(n) and y*(n) on circles.
2. Rotation : Rotate y*(n) by q times in anticlockwise if q is positive, rotate y*(n) by
q times in clockwise if q is negative to obtain y*((n – q))N.
3. Multiplication : Multiply x(n) by y*((n – q))N to get a product sequence. Let the product
sequence be vq(m). Now, vq(m) = x(n) × y*((n – q))N.
4. Summation : Sum up the samples of one period of the product sequence vq(m) to
obtain the value of rxy ( m) at m = q. [i.e., rxy (q ) ].
The above procedure will give the value of rxy ( m) at a single time instant say m = q. In general, we are
interested in evaluating the values of the sequence rxy ( m) in the range 0 < m < N - 1. Hence the steps 2 ,
3 and 4 given above must be repeated, for all possible time shifts in the range 0 < m < N - 1.
2. 109 Digital Signal Processing
4. The sum of all the samples of the product sequence gives the sample rxy (q ) [i.e., rxy ( m) at m = q].
The above procedure is repeated for all possible values of m to get the sequence rxy ( m).
Method 2 : Using Tabular Array
Let x(n) and y(n) be the given real sequences. Let rxy ( m) be the sequence obtained by circular
correlation of x(n) and y(n). The following procedure can be used to get a sample of rxy ( m) at m = q.
1. Represent the sequences x(n) and y(n) as two rows of tabular array.
2. Periodically extend y(n). Here the periodicity is N, where N is the length of the given sequences.
3. Shift the sequence y(n), q times to get the sequence y((n – q))N. If q is positive then shift the
sequence to the right and if q is negative then shift the sequence to the left.
4. The sample of rxy (q ) at m = q is given by,
N−1 N−1
rxy (q) = ∑ x(n) y((n − q)) N = ∑ x(n) yq ( n)
n=0 n=0
where, yq (n) = y((n − q)) N
Determine the product sequence x(n)yq(n) for one period.
5. The sum of all the samples of the product sequence gives the sample rxy (q ) [i.e., rxy ( m)
at m = q].
The above procedure is repeated for all possible values of m to get the sequence rxy ( m).
Method 3: Using Matrices
Let x(n) and y(n) be the given N-point sequences. The circular correlation of x(n) and y(n) yields
another N-point sequence rxy ( m).
Chapter 2 - Discrete Time Signals and Systems 2. 110
In this method an N ´ N matrix is formed using the sequence y(n) as shown below. The sequence x(n)
is arranged as a column vector (column matrix) of order N ´ 1. The product of the two matrices gives the
resultant sequence rxy ( m).
L r (0) O
OP LM xx((10)) OP MM r (1) PP
xy
LMy(0) y(1) y ( 2) ..... y( N − 1) y( N )
xy
MMy(N) y( 0) y (1) ..... y ( N − 2) y( N − 1) P MM P M r ( 2) P
x( 2) P
MMy(MN − 1) y( N ) y(0) ..... y ( N − 3) y( N − 2) P
P × M
M M PP = MM M PP xy
MMy(2)
M M M M PP M M P MM M PP
y (3) y (4) ..... y( 0) y(1)
P MMx(N − 2)PP M r (N − 2)P
MNy(1) y( 2) y( 3) ..... y( N ) y( 0) PQ MNx(N − 1) PQ MM r (N − 1) PP xy
N Q xy
Example 2.34
Perform circular correlation of the two sequences, x(n) = {1, 1, 2, 1} and y(n)= {2, 3, 1, 1}
- -
Solution
Method 1:Graphical Method of Computing Circular Correlation
The given sequences are represented as points on circles as shown in fig 1 and 2.
x (1) = 1 y (1) = 3
x (3) = 1 y (3) = 1
F ig 1. F ig 2.
3 2 1 1
1 1 3 2
F ig 3 : C ircu la rly sh ifted seq u e nces y (n -m ), for m = 0 , 1 , 2, 3 .
Let rxy (m) be the sequence obtained by circular correlation of x(n) and y(n). The given sequences are 4
sample sequences and so N = 4. Each sample of rxy (m) is given by the equation,
N − 1 N − 1
rxy (m) = ∑
n = 0
x(n) y((n − m))N = ∑
n = 0
x(n) y m (n), where y m (n) = y((n − m))N
Using the above equation, graphical method of computing each sample of rxy (m) are shown in fig 4 to fig 7.
3 3 3
When m = 0 ; rxy (0) = ∑
n = 0
x(n) y((n − 0))4 = ∑
n = 0
x(n) y 0 (n) = ∑ v (n)
n = 0
0
1 3 1 ×3 = 3
y 0 ( n)
2 x (n) 1 X 1 2 ⇒ 2 ×1 = 2 v 0 (n) 1 ×2 = 2
1 1 1 ×1 = 1
1 2 1 ×2 = 2
2 x (n) 1 X 3 y 1( n) 1 ⇒ 2 ×3 = 6 v 1( n) 1 ×1 = 1
1 1 1 ×1 = 1
3 3 3
When m = 2 ; rxy (2) = ∑ x(n) y((n − 2))
n = 0
4 = ∑ x(n) y (n) = ∑ v (n)
n = 0
2
n = 0
2
1 1 1×1 = 1
2 x (n) 1 X 2 y 2 (n) 1 ⇒ 2 ×2 = 4 v 2 ( n) 1 ×1 = 1
1 3 1 ×3 = 3
T he su m o f sa m ples of v 2 (n) g iv e s rxy (2)
F ig 6 : C o m pu ta tio n o f rxy (2 ).
∴ rxy (2) = 1 + 1 + 4 + 3 = 9
3 3 3
When m = 3 ; rxy (3) = ∑ x(n) y((n − 3))
n = 0
4 = ∑ x(n) y (n) = ∑ v (n)
n = 0
3
n = 0
3
1 1 1 ×1 = 1
1 2 1 ×2 = 2
The given sequences are represented in the tabular array as shown below. Here the shifted sequences
ym(n) are periodically extended with a periodicity of N = 4. Let rxy (m) be the sequence obtained by circular
correlation of x(n) and y(n). Each sample of rxy (m) is given by the equation,
N − 1 N − 1
rxy (m) = ∑
n = 0
x(n) y((n − m))N = ∑
n = 0
x(n) y m (n), where y m (n) = y((n − m))N
n 0 1 2 3 4 5 6
x(n) 1 1 2 1
y(n) 2 3 1 1
To determine a sample of rxy (m) at m = q, multiply the sequence, x(n) and y q (n), to get a product sequence
x(n) xq(n) [i.e., multiply the corresponding elements of the row x(n) and yq(n)]. The sum of all the samples of the
product sequence gives rxy (m).
3
When m = 0 ; rxy (0) = ∑ x(n) y
n=0
0 (n)
The samples of rxy (m) for other values of m are calculated as shown for m = 0.
3
When m = 1; rxy (1) = ∑
n=0
x(n) y1(n) = 1 + 2 + 6 + 1 = 10
3
When m = 2; rxy (2) = ∑ x(n) y 2(n) = 1 + 1 + 4 + 3 = 9
n =0
3
When m = 3; rxy (3) = ∑
n =0
x(n) y3(n) = 3 + 1 + 2 + 2 = 8
l
∴ rxy (m) = 8, 10, 9, 8 q
A
Method 3 : Circular Correlation Using Matrices
The sequence rxy (m) can be arranged as a column vector of order N ´ 1 and using the samples of y(n) the
N ´ N matrix is formed as shown below. The product of the two matrices gives the sequence rxy (m).
(3) PQ
N N Q Nr
xy
Q2.2 Perform multiplication of discrete time signals, x1(n) = {2, 2, 1, 2} and x2(n) = {–2, –1, 3, 2}.
Solution
Q2.4 What are the basic elements used to construct the block diagram of discrete time system?
The basic elements used to construct the block diagram of discrete time system are adder, constant
multiplier and unit delay element.
x 1 (n) x 1(n ) + x 2 (n ) x 1 (n) ax 1 (n) x (n) x (n − 1)
−1
+ a z
x 2 (n)
Q2.10 Perform the circular convolution of the two sequences x1(n) = {1, 2, 3} and x2(n) = {4, 5, 6}.
Solution
Let x3(n) be the sequence obtained from circular convolution of x1(n) and x2(n). The sequence
x1(n) can be arranged as a column vector of order 3 ´1 and using the samples of x2(n) a 3 ´ 3 matrix
is formed as shown below. The product of two matrices gives the sequence x3(n).
LMx (0)
2 x2 (2) x 2 (1) OP LMx (0)OP LMx (0)OP
1 3 LM4 6 5 OP LM1OP LM31OP
⇒
MMNxx (1)
2
2 (2)
x2 (0) x 2 (2)
x2 (1)
P Mx (1)P = MMNxx (1)
1
x (0) PQ MN x (2) PQ
2 1
3
P
(2) PQ
3
MMN56 4 6
5
P M2P = MMN2831PPQ
4PQ MN 3PQ
1 1 ×1 1 ×4 1 ×2 1 1 4 2
⇒
2 2 ×1 2 ×4 2 ×2 2 2 8 4
Solution
Let rxx ( m) be the sequence obtained from circular autocorrelation of x(n). The sequence x(n) can
be arranged as a column vector of order 4´1 and again by using the samples of x(n) a 4´4 matrix
is formed as shown below. The product of two matrices gives the sequence rxx ( m) .
LMx(0) x(1) x(2) x(3) OP LMx(0)OP LMr xx (0) OP LM1 2 3 OP LM1OP LM 30OP
4
MMx(3)
x(2)
x(0)
x(3)
x(1)
x(0)
x(2)
x(1)
PP MMx(1) P = MMrr
x(2) P
xx (1)
xx (2) P
P ⇒ MM43 1
4
2
1
3
2
PP MM23PP = MM 2422PP
MNx(1) x(2) x(3) x(0) PQ MNx(3)PQ MNr xx (3) PQ MN2 3 4 1 PQ MN4PQ MN 24PQ
\ rxx ( m) = {30, 24, 22, 24 }
Q2.20 What is the difference between circular crosscorrelation and circular autocorrelation?
Circular crosscorrelation operation is circular correlation of two different sequences, whereas
circular autocorrelation is circular correlation of a sequence with itself.
Program 2.2
Write a MATLAB program to generate the standard discrete time signals exponential
and sinusoidal signals.
OUTPUT
The output waveforms of program 2.2 are shown in fig P2.2.
Program 2.3
Write a MATLAB program to find the even and odd parts of the signal x(n)=0.8n.
%To find the even and odd parts of the signal, x(n)= 0.8^n
subplot(2,2,1);stem(n,x1);
xlabel(n);ylabel(x1(n));title(signal x(n));
subplot(2,2,2);stem(n,x2);
xlabel(n);ylabel(x2(n));title(signal x(-n));
subplot(2,2,3);stem(n,xe);
xlabel(n);ylabel(xe(n));title(even part of x(n));
subplot(2,2,4);stem(n,xo);
xlabel(n);ylabel(xo(n));title(odd part of x(n));
Program 2.4
Write a MATLAB program to perform amplitude scaling and time shift on the
signal x(n) = 1+n; for n = 0 to 2.
function x = y(n)
x=(1.0 + n).*(n>=0 & n<=2);
2. 121 Digital Signal Processing
Note: The above program should be stored as a separate file in the current
working directory
OUTPUT
The input and output waveforms of program 2.4 are shown in fig P2.4.
Program 2.5
Write a MATLAB program to perform convolution of the following two discrete
time signals.
x1(n)=1; 1<n<10 x2(n)=1; 2<n<10
%******************Program to perform convolution of two signals
%******************x1(N)=1; n= 1 to 10 and x2(n)=1; n= 2 to 10
subplot(3,1,2);stem(n,x2);
xlabel(n);ylabel(x2(n));
title(signal x2(n));
subplot(3,1,3);stem(n1,x3);
xlabel(n);ylabel(x3(n));
title(signal, x3(n) =
x1(n)*x2(n));
OUTPUT
F ig P 2 .5 : O u tp u t w av efo rm s o f pro g ra m 2 .5.
The input and output waveforms of
program 2.5 are shown in fig P2.5.
2.18 Exercises
I. Fill in the blanks with appropriate words
1. A signal x(n) may be shifted in time by m units by replacing the independent variable n by _______.
2. The _______ of a signal x(n) is performed by changing the sign of the time base n.
3. If the average power of a signal is finite then it is called _______.
4. The smallest value of N for which x(n + N) = x(n) is true is called _______.
5. In a discrete time signal x(n), if x(n) = x(–n) then it is called _______ signal.
6. In a discrete time signal x(n), if x(–n) = –x(n) then it is called _______ signal.
7. The output of the system with zero input is called _______.
8. A discrete time system is _______ if it obeys the principle of superposition.
9. A discrete time system is _______ if its input-output relationship do not change with time.
10. The response of an LTI system is given by _______ of input and impulse response.
11. If the output of a system depends only on present input then it is called _______.
12. A system is said to be _______ if the output does not depends on future inputs and outputs.
13. An LTI system is causal if and only if its impulse response is _______ for negative values of n.
14. When a system output at any time n depends on past output values, it is called _______ system.
15. An N-point sequence is called _______ if it is symmetric about point zero on the circle.
16. An N-point sequence is called _______ if it is antisymmetric about point zero on the circle.
17. The _______ is called aperiodic convolution.
18. The _______ is called periodic convolution.
19. Appending zeros to a sequence in order to increase its length is called _______.
20. The two methods of sectioned convolutions are _______ and _______method.
2. 123 Digital Signal Processing
21. In _______ method of sectioned convolution, overlapped samples of output sequences are _______.
22. In _______ method, the overlapped samples in one of the output sequences are discarded.
23. The correlation of two different discrete time sequences is called _______ .
24. The cascade of a system and its inverse is _______.
25. The process of recovering the input from the response of a system is called ______ .
Answers
1. n – m 8. linear 15. even 22. overlap save
2. folding 9. time invariant 16. odd 23. cross correlation
3. power signal 10. convolution 17. linear convolution 24. identity system
4. fundamental period 11. memoryless or static 18. circular convolution 25. deconvolution
5. symmetric 12. causal 19. zero padding
6. antisymmetric 13. zero 20. overlap add, overlap save
7. natural response 14. recursive 21. overlap add, added
a) x(n) =
FG 1 IJ n
b) x(n) = −
FG 1 IJ n
c) x(n) =
FG 1 IJ −n
d) x(n) =
FG −1IJ −n
H 4K H 4K H 4K H4K
2. The process of conversion of continuous time signal into discrete time signal is known as,
a) aliasing b) sampling c) convolution d) none of the above
3. If Fs is sampling frequency then the relation between analog frequency F and digital frequency f is,
F F F 2F
a) f = b) f = s c) f = d) f =
2Fs F Fs Fs
4. If Fs is sampling frequency then the highest analog frequency that can be uniquely represented in its
sampled version of discrete time signal is,
Fs 1
a) b) 2Fs c) Fs d)
2 Fs
5. The sampling frequency of the following analog signal, x(t) = 4 sin150pt + 2 cos50pt should be,
a) greater than 75 Hz b) greater than 150 Hz c) less than 150 Hz d) greater than 50 Hz
6. Which of the following signal is the example for deterministic signal?
a) step b) ramp c) exponential d) all of the above
7. For energy signals, the energy will be finite and the average power will be,
a) infinite b) finite c) zero d) cannot be defined
n
8. In a signal x(n), if 'n' is replaced by , then it is called,
3
a) upsampling b) folded version c) downsampling d) shifted version
9. The unit step signal u(n) delayed by 3 units of time is denoted as,
a) u(n + 3) = 1; n ≥ 3 b) u(3 − n) = 1; n ≥ 3 c) u(n − 3) = 1; n ≥ 3 d) u(3n) = 1; n > 3
= 0; n < 3 = 0; n < 3 = 0; n < 3 = 0; n < 3
2. 125 Digital Signal Processing
10. The zero input response (or) natural response is mainly due to,
a) Initial stored energy in the system b) Initial conditions in the system
c) Specific input signal d) both a and b
11. If x(n) = an u(n) is the input signal, then the particular solution yp(n) will be,
a) Kn an u(n) b) K an u(n)
c) K1 an u(n) + K2 an u(n) d) K a–n u(n)
12. The discrete time system, y(n) = x(n–3) – 4x(n–10) is a,
a) dynamic system b) memoryless system c) time varying system d) none of the above
13. An LTI discrete time system is causal if and only if,
a) h(n) ¹ 0 for n < 0 b) h(n) = 0 for n < 0 c) h(n) ¹ ¥ for n < 0 d) h(n) ¹ 0 for n > 0
14. Which of the following system is causal?
a) h(n) = n
FG 1 IJ n
u(n + 1) b) y(n) = x2(n) – x(n+1) c) y(n) = x(–n) +x(2n–1) d) h(n) = n
FG 1 IJ n
u(n)
H 2K H 2K
15. An LTI system is stable, if the impulse response is,
∞ ∞ ∞
a) ∑ h(n) = 0 b) ∑ h(n) < ∞ c) ∑ h(n) ≠ 0 d) either a or b
n= −∞ n= −∞ n= −∞
a) y 1
nej b) 1 y n
n
bg c) ny(n) d) n –1y(n)
22. For a system y(n) = x(n–3) the impulse response of the system and the inverse system will be ––––––
and –––––– respectively.
a) h(n) = d(n + 3), x(n) = y(n – 3) b) h( n) = δ(3n), x(n) = y n ej
3
c) h(n) = d(n – 3), x(n) = y(n + 3) d) h(n) = d(n + 3), x(n) = y(3n)
Chapter 2 - Discrete Time Signals and Systems 2. 126
23. The circular correlation rx 1 x 2 (q) of the sequence x1(n) and x2(n) of length 'N' can be defined by the
equation,
∞ N −1
a) ∑ x1(n) x2 (n − q) b) ∑ x1(n) x∗2 (n − q)
n= −∞ n=0
N −1 ∞
c) ∑ x1(n) x∗2 b(n − q)gN d) ∑ x1(n) x∗2 b(n − q)gN
n=0 n=−∞
Answers
1. b 6. d 11. b 16. a 21. b
2. b 7. c 12. a 17. b 22. c
3. c 8. a 13. b 18. c 23. c
4. a 9. c 14. d 19. c 24. b
5. b 10. a 15. d 20. a 25. d
a) x(n) = sin
5π
n+6
FG IJ
b) x(n) = sin
7n
+π
FG IJ
c) x(n) = cos
4πn FG IJ
8 H K 3 H K 12 H K
d) x(n) = cos
π 2
n
FG IJ
e) x(n) = e j9 n f) x(n) = 4 sin
3πn
+ 5 cos
3πn
32 H K 2 4
E2.2 Determine the even and odd parts of the signals.
π
1 −j n
a) x(n) = 2n b) x(n) = 8e 6 l
c) x(n) = 6, 4, 2, 2 q
a
A
E2.3 a) Consider the analog signal x(t) = 2 sin80pt. If the sampling frequency is 60 Hz, find the sampled
version of discrete time signal x(n). Also find an alias frequency corresponding to Fs = 60 Hz.
b) Consider the analog signals, x1 (t) = 4 cos2π (30t) and x2 (t) = 4 cos 2π (5t). Find a sampling
frequency so that 30 Hz signal is an alias of 5 Hz signal.
c) Consider the analog signal, x(t) = 3 sin40π t − sin100π t + 2cos 50π t. Determine the minimum
sampling frequency and the sampled version of analog signal at this frequency. Sketch the
waveform and show the sampling points. Comment on the result.
E2.4 Determine whether the following signals are energy or power signals.
a) x(n) =
FG 5 IJ n
u( n)
FG
b) x(n) = cos
3π IJ
n
H 9K H 4 K c) x(n) = u(2n) d) x(n) = 2 u(3 – n)
E2.5 Construct the block diagram and signal flow graph of the discrete time systems whose input-
output relations are described by the following difference equations.
a) y(n) = 2y(n – 1) + 2.1 x(n – 1) + 0.5 x(n – 2)
b) y(n) = 1.6 x(n –2) + 0.7 x(n) + 3y(n – 1) + 0.3y(n – 2)
E2.6 Determine the response of the discrete time systems governed by the following difference equations.
a) y(n) = 0.1y(n – 1) + x(n – 1) + 0.7x(n) ; x(n) = 2–n u(n) ; y(–1) = –1
b) y(n) + 2.1y(n – 1) + 0.2y(n – 2) = x(n) + 0.56x(n –1) ; x(n) = u(n) ; y(–2) = 1; y(–1) = –3
Chapter 2 - Discrete Time Signals and Systems 2. 128
E2.7 Test the following systems for time invariance.
a) y(n) = x(n + 1) + x(n + 2) b) y(n) = nax(n) c) y(n) = x2(n + 2) + C d) y(n) = (n –1) x2(n) + C
E2.8 Test the following systems for linearity.
a) y(n) = x2(n) + x3(n – 1) b) y(n) = bx(n + 2) + nex(n) c) y(n) = a x(n) + b x( n)
1 N M
d) y(n) = x(n) + e) y(n) = ∑b m x( n + m) + ∑ c m y( n + m)
x(n) m= −1 m=0
h(n) =
R|S( −4a) n
; n≥0
|T 2b −n
; n<0
E2.12 a) Determine the impulse response for the cascade of two LTI systems having impulse responses,
h1 (n) =
FG 1 IJ n
u(n) and h2 (n) = d(n − 3) h2 (n)
H7 K x (n )
b) Determine the overall impulse response + y (n )
of the interconnected discrete time
system shown in fig E2.12.
h1(n) + h 3 (n)
F ig E 2 .1 2.
Take, h1 (n) =
FG 1 IJ n
u(n) ; h2 (n) =
FG 1 IJ n
u(n) ; h3 (n) =
FG 1 IJ n
u(n)
H 3K H6K H 9K
E2.13 Determine the response of an LTI system whose impulse response h(n) and input x(n) are given by,
l
a) h( n) = 1, 4, 1, −2, 1 q , l
x( n) = 1, 3, 5, −1, −2 q
A A
b) h( n) =
RS1 ; 0≤n≤2
, x( n) = a n u( n); a <1
T0 ; n≥3
E2.14 Perform circular convolution of the two sequences,
l
a) x1 ( n) = 1, 2, −1, 1 ; q l
x2 ( n) = 2, 4, 6, 8 q
b) x ( n) = l0,
1 0.6, −1, 15
., 2 ; q x ( n) = l−2,
2 3, 0.2, 0.7, 0.8 q
E2.15 The input x(n) and impulse response h(n) of an LTI system are given by,
l
x(n) = −1, 1, −1, 1, −1, 1 ; q l
h(n) = −0.5, 0.5, −1, 0.5, −1, −2 q
A A
Find the response of the system using a) Linear convolution, b) Circular convolution.
E2.16 Perform linear convolution of the following sequences by,
a) Overlap add method b) Overlap save method
l
x( n) = 1, −1, 2, 1, −1, 2, +1, −1, +2 q ; l
h( n) = 2, 3, −1 q
2. 129 Digital Signal Processing
E2.17 Perform crosscorrelation of the sequences,
l
x( n) = −1, 2 3, −4, ; q l
h( n) = 2, −1, −3, q
A A
E2.18 Determine the autocorrelation sequence for x(n) = 1, 4, 3, −5, 2 . l q
A
E2.19 Find the inverse system for the following discrete time system,
n
y(n) = ∑ c p x(p − 2) ; for n ≥ 0
p =0
E2.20 A discrete time system is excited by an input x(n), and the response is, y(n) = 4, 3, 6, 7.5, 3, 30, − 8 . m r
A
l
If the impulse response of the system is h(n) = 2, 4, −2 , then what will be the input to the system? q
A
E2.21 Perform circular correlation of the sequence, x(n) = −1, 1, 2, 6 and y(n) = 4, −2, −1, 2 . l q l q
Answers
E2.1 a) periodic; N=16 b) nonperiodic c) periodic; N=6 d) periodic; N=32 e) nonperiodic. f) periodic; N=8
π
E2.2 a) xe ( n) =
1 −2n
a + a2n b) xe ( n) = 8 cos n l q
c) x e ( n) = 1, 1, 2, 6, 2, 1, 1
2 6 A
x (n) = l−1, − 1, − 2, 0, 2, 1, 1q
1 π o
xo (n) = a −2n − a 2n
2
xo (n) = − j8 sin n
6
A
4πn
E2.3 a) x( n) = 2 sin ; Alias frequency = 100Hz b) Fs = 25Hz
3
2 πn πn
c) Fs,min = 100 Hz ; x( nT) = 3sin + 2 cos (sin πn = 0, for integer n)
5 2
The component sin100pt will give always zero samples when
sampled at 100Hz for any value of n (Refer fig E2.3c).
E2.4 a) E = 1.435J ; P = 0 ; Energy signal.
b) E = ¥ ; P = 0.5W ; Power signal.
c) E = ¥ ; P = 0.25W ; Power signal.
d) E = ¥ ; P=2W ; Power signal.
E2.5 a)
x (n ) 2.1x(n −1) y (n ) F ig E 2 .3 c : S a m p lin g p o ints.
−1 2.1
z + +
)
)
−1
−2
(n
x (n
2y
F ig E 2 .5 a.1 : B lo ck −1
0.5
−1
z z
0.5 2
d ia g ra m . x (n ) −1
1 z 2.1 1 1 1 y (n )
−1 −1
z 0.5 2 z
F ig E 2 .5 a.2 : S ig n al flow grap h .
Chapter 2 - Discrete Time Signals and Systems 2. 130
E2.5 b)
x (n ) y (n ) x (n ) 1 0.7 1 1 y (n )
0.7 + +
−1 3 −1
z z
−1 −1
z + 3 z
0.
6
3
1.
−1
−1 z
z
−1
z 1.6 0.3 z
−1
E2.6
LM
a) y(n) = −2.775(0.1) n + 3.375
FG 1 IJ OP u(n)
n
b) y(n) = 0.47 − 0.02 ( −0.1) n + 6.65 ( −2) n u(n)
MN H 2 K PQ
E2.7 a) c) Time invariant b) d) Time variant
E2.8 a) e) Linear b) c) d) Nonlinear
E2.9 a) b) c) d) e) Noncausal
E2.10 a) c) d) e) Stable system b) Unstable system
1 1
E2.11 For stability, 0 < a < and 0 < b <
4 2
FG 1 IJ ( n − 3) LM F 1 I n
FG IJ + FG 3 IJ FG 1IJ OP u(n)
3 1
n n
E2.12 a) h( n) =
H 7K u(n − 3) b) h( n) = 4
MN GH 6 JK −
H K H 2 K H 3K PQ
2 9
n
E2.13 a) y( n) = l1, 7, 18, 20, −6, −16, 5, 3, −2 q b) y( n) = ∑ ak ; for n = 0, 1, 2
A k =0
n
= ∑ a k ; for n > 2
k = n−2
E2.14 a) x3 ( n) = 8, −6, 4, 14 l q l
b) x3 ( n) = 6.08, −0.55, 6.4, −4.28, 0.72 q
A A
E2.15 l
y( n) = 0.5, −1, 2, −2.5, 3.5, −1.5, 1, −0.5, −0.5, 1, −2 q
A
l
E2.16 a) Overlap add method : y( n) = 2, 1, 0, 9, −1, 0, 9, −1, 0, 7, −2 q
b) Overlap save method : y( n) = l*, *, 0, 9, −1, 0, 9, −1, 0, 7, −2q
E2.17 r ( m) = l3, −5, −13, 13, 10, −8q
xy
A
1
E2.18 r ( m) = l2, 3, − 11, − 9, 55, − 9, − 11, 3, 2q
xx E2.19 x( n) = [ y( n + 2) − y( n + 1)] ; for n ≥ −1
cn + 2
A with initial condition x( −2) = y(0)
E2.20 l
x( n) = 2, −2.5, 10, −18.75, 49 q E2.21 rxy (m) = 4, −8, −1, 29 l q
A
Solution for Exercise Problems E2. 1
Digital Signal Processing - A. Nagoor Kani Chapter 2 - Discrete Time Signals and Systems
E2.1. Determine whether the following signals are periodic or not. If periodic, find the fundamental period.
a) x(n) = sin
FG 5π n + 6IJ
H8 K
Solution
b g
Now, x n + N = sin
FG 5π bn + Ng + 6IJ = sin FG 5πn + 6 + 5πN IJ
H8 K H8 8 K
5πN
Since sin (q + 2pM) = sin q, for periodicity, should be integral multiple of 2p.
8
5πN
Let, = M × 2π , M and N are integers.
8
8 16
∴ N = M × 2π × = M
5π 5
16
N = M , if M = 5, 10, 15, 20 ..... N will be a integer.
5
When M = 5 , N = 16.
b
x n + N = sing FG 5π n + 6 + 5π × 16IJ = sin FG 5π n + 6 + 10πIJ = sinFG 5π n + 6IJ = x(n).
H8 8 K H8 K H8 K
\ x(n) is periodic.
b) x(n) = sin
FG 7n + π IJ
H3 K
Solution
b g
x n + N = sin
FG 7(n + N) + πIJ = cos
FG 7n + π + 7NIJ
H 3 K H3 3 K
7N
Since cos (q + 2pM) = cos q, for periodicity, should be equal to integral multiple of 2p.
3
7N 2π × 3 6π
Let, = M × 2π ⇒ N = M = M
3 7 7
Here, N cannot be an integer for any integer value of M, and so, x(n) will not be periodic.
c ) x(n) = cos
FG 4π n IJ
H 12 K
Solution
bg FG π nIJ
x n = cos
H3 K
F π I F nπ + Nπ IJ
xbn + Ng = cos G (n + N)J = cos G
H3 K H 3 3 K
Nπ
= 2πM ⇒ N = 6M
3
For M = 1, 2, 3, ..... N will be integer.
For M = 1, N = 6.
\ x(n) is periodic.
d) x(n) = cos
FG π n IJ
2
H 32 K
Solution
∴ N = 8 M1 \ N = 32 M2
Now, N is integer for M1 = 12, 22, 32, 42 ..... Now, N is integer for M2 = 1, 2, 3, 4 .....
F π n + π32 + π32 nI 2
When N = 32 ; x(n + N) = cos GH 32 32 16 JK 2
FF π I I
= cosG G n + 2πnJ + 16 × 2πJ
2
H H 32 K K
Fπ
= cosG n + 2πnJ
I 2
H 32 K For integer M,
π 2 cos(q + 2pM) = cosq
= cos n = x(n)
32
\ x(n) is periodic with fundamental period, N = 32 samples.
e) x(n) = e j9n
Solution
b g
x n + N = e j9(n+N) = e j9n . e j9N
Since, e j2 πM = 1
2π
Let, b9Ng = M × 2π ⇒ N=
9
M
3πn 3πn
f) Given that, x(n) = 4 sin + 5 cos
2 4
Solution
3πn 3πn
Let, x1(n) = 4 sin Let, x2 (n) = 5 cos
2 4
b g
∴ x1 n + N1 = 4 sin
b
3 π n + N1 g b g
∴ x 2 n + N2 = 5 cos
b
3 π n + N2 g
2 4
= 4 sin
FG 3πn + 3πN IJ 1 .....(1) = 5 cos
FG 3πn + 3πN IJ 2 .....(2)
H2 2 K H4 4 K
3πN1 4 3πN2 8
Let, = 2πM1 ⇒ N1 = M1 Let, = 2πM2 ⇒ N2 = M2
2 3 4 3
Let, M1 = 3 ; \ N1 = 4 Let, M2 = 3 ; \ N2 = 8
Solution for Exercise Problems E2. 3
substitute N1 = 4 in equation (1), substitute N2 = 8 in equation (2),
b
∴ x1 n + N1 = 4 sin g FG 3πn + 3π × 4IJ FG 3πn + 3π × 8IJ
H2 2 K b g
∴ x 2 n + N2 = 5 cos
H4 4 K
F 3πn + 3 × 2πIJ
= 4 sin G F 3πn + 3 × 2πIJ
H2 K = 5 cos G
For integer M, For integer M, H4 K
sin(q + 2pM) = sinq 3πn cos(q + 2pM) = cosq 3πn
= 4 sin = x1(n) = 5 cos = x 2 (n)
2 4
\ x1(n) is periodic with fundamental period, N1 = 4 samples. \ x2(n) is periodic with fundamental period, N2 = 8 samples.
Here, x(n) = x1(n) + x2(n), and x(n) is periodic with period N1 = 4, and x2(n) is periodic with period N2 = 8.
1
a) x(n) = ⇒ x(n) = a −2n
a 2n
Solution
1
x(−n) = ⇒ x(−n) = a 2n
a −2n
Even part of the signal,
1 1 −2n
xe (n) = x(n) + x(−n) = a + a2n
2 2
Odd part of the signal is,
1 1
x0 (n) = x(n) − x(−n) = a −2n − a 2n
2 2
π
−j n
b) x(n) = 8 e 6
Solution
x(n) = 8 e
π
−j n
6
= 8 cos
LM π π
n − j sin n
OP
N 6 6 Q
x( −n) = 8 e
π
− j ( − n)
6 = 8 cos
LM π π
n + j sin n
OP
N 6 6 Q
xe (n) =
LM1 π π π OP π π
× 8 cos n − j sin n + cos n + j sin n = 8 cos n
N2 6 6 6 Q 6 6
1 L π π π π O π
x (n) = × 8 Mcos n − j sin n − cos n − j sin nP = − j8 sin n
0
2 N 6 6 6 6 Q 6
l
c) x(n) = 6, 4, 2, 2 q
A
Solution
l
Given that, x(n) = 6, 4, 2, 2 q
A
x(0) = 6, x(1) = 4, x(2) = 2, x(3) = 2
l
x( −n) = 2, 2, 4, 6 q
A
x(0) = 6; x( −1) = 4; x(−2) = 2; x( −3) = 2
E2. 4 DSP, Chapter 2 -Discrete Time Signals and Systems
1 1
Even part, x e (n) =
2
b
x(n) + x( −n) g Odd part, x 0 (n) =
2
b
x(n) − x( −n) g
at n = –3 ; x(n) + x(–n) = 0 + 2 = 2 n = –3 ; x(n) – x(–n) = 0 – 2 = –2
n = –2 ; 0+2 = 2 n = –2 ; = 0 – 2 = –2
n = –1 ; 0+4 = 4 n = –1 ; = 0 – 4 = –4
n= 0; 6 + 6 = 12 n= 0; = 6–6 = 0
n= 1; 4+0 = 4 n= 1; = 4–0 = 4
n= 2; 2+0 = 2 n= 2; = 2–0 = 2
n= 3; 2+0 = 2 n= 3; = 2–0 = 2
1 1
xe (n) = x(n) + x( −n) x0 (n) = x(n) − x( −n)
2 2
l
xe (n) = 1, 1, 2, 6, 2, 1, 1 q l
x0 (n) = −1, − 1, − 2 , 0, 2, 1, 1 q
A A
E2.3. a) Consider the analog signal x(t) = 2sin80pt. If the sampling frequency is 60 Hz, find the sampled version of
discrete time signal x(n). Also find an alias frequency corresponding to Fs = 60 Hz.
Solution
x(n) = x( t) n
t = nT =
Fs
F 5
Also, f = ⇒ F = fFs = × 60 = 100
Fs 3
b) Consider the analog signals x1(t) = 4 cos 2p (30t), x2(t) = 4 cos 2p (5t). Find a sampling frequency so that
30 Hz signal is an alias of 5 Hz signal.
Solution
Determine the minimum sampling frequency and the sampled version of analog signal at this frequency. Sketch the
waveform and show the sampling points.Comment on the result.
Solution
x(t) = 3 sin 40πt − sin100 πt + 2 cos 50πt ≡ x(t) = 3 sin 2πF1t − sin 2πF2 t + 2cos 2πF3 t
40 100 50
∴ F1 = = 20 Hz ; F2 = = 50 Hz ; F3 = = 25 Hz
2 2 2
Solution for Exercise Problems E2. 5
The maximum analog frequency in the signal is 50 Hz.
The minimum sampling frequency should be twice that of this maximum analog frequency.
Fs ≥ 2 Fmax ⇒ Fs ≥ 2 × 50
Let, Fs = 100Hz
∴ x(nT) = x(t) n
t=nT=
Fs
n n n 2πn π
x(nT) = 3 sin 40π × − sin 100π + 2cos 50π × = 3 sin − sin πn + 2 cos n
100 100 100 5 2
sin πn = 0, for integer values of n.
2πn πn
∴ x(nT) = 3 sin + 2cos
5 2
3 sin 40πt
1
⇒ F1 = 20 Hz, T1 = = 0.05 sec
20
sin 100πt
2cos 50πt
⇒ F3 = 25 Hz, T3 = 0.04
Fs = 100 Hz
Ts = 0.01sec
In the analog signal x(nT), the component sin 100pt will give always zero samples when sampled at 100Hz for any value of n.
This is the drawback in sampling at nyquist rate, which is Fs = 2 Fmax.
E2.4. Determine whether the following signals are energy or power signals.
a) x(n) =
FG 5 IJ n
u(n)
H 9K
Solution
x(n) =
FG 5 IJ u(n)
n
for all n.
H 9K
∴ x(n) = (0.55)n ; n ≥ 0
+∞ ∞ ∞ ∞
2
2 n
∑ d(0.55) i = ∑ b0. 302g
2 n
Energy, E = ∑
n = −∞
x(n) = ∑
n=0
(0.55)n =
n= 0 n= 0
∞
1
∴ E= ∑ (0.302)
n= 0
n
=
1 − 0.302
= 1. 43 Joules
N
1 2
Power, P = Lt
N→∞ 2N + 1
∑ x(n)
n = −N
N N
1 n 1
= Lt
N→∞ 2N + 1
∑ d(0.55) i 2
= Lt
N→∞
∑
2N + 1 n = 0
(0.302)n
n= 0
1 (0.302)N+1 − 1 1 0−1
= Lt = × =0
N→ ∞ 2N + 1 0.302 − 1 ∞ −0.698
P is zero and E is finite.
So x(n) is energy signal.
E2. 6 DSP, Chapter 2 -Discrete Time Signals and Systems
3π 1 + cos 2θ
b) x(n) = cos n cos2 θ =
4 2
Solution
F 1+ cos 2 × 3π n I
∑ GG 4 J
+∞ +∞ 2 +∞
2 3π
Energy, E = ∑ x(n) = ∑ cos JJ n =
n = −∞ GH
n= −∞ 2 4
K n = −∞
F 1I F 3π I
+∞
1 F 3π I 1 +∞ +∞
= G J ∑ G 1 + cos
H 2K H nJ =
2 K 2 GH
∑ 1 + ∑ cos 2 nJK = 2 b∞ + 0g = ∞ n
n = −∞ n = −∞ n = −∞
Power, P = Lt
1 1 N
n = −N
1 1 L O
= Lt M11+414+2144
2N + 1 2 MN
N→ ∞
.....31 + 1 + 11+44
1 + 12.....
44+ 31 + 0P
N termsPQ N terms
1 1 1
= Lt × 2N + 1 = = 0.5
N→ ∞ 2N + 1 2 2
Since P is finite and E is infinite, x(n) is power signal.
3π
It can be shown that cos n is periodic and sum of samples of one period of periodic cosine signal is zero.
2
cos
3π
b
n + N = cos
3πn 3πN
g+
FG IJ 3π 3π
2 2 2 H K n = 0 ; cos
2
n=1 n = 4 ; cos
2
n=1
3 πN 3π 3π
Let, = 2 πM n = 1 ; cos n=0 n = 5 ; cos n=0
2 2 2
4M 3π 3π
∴ N= n = 2 ; cos n = −1 n = 6 ; cos n = −1
3 2 2
Let, M = 3, Now, N = 4 3π 3π
n = 3 ; cos n=0 n = 7 ; cos n=0
2 2
3π
∴ cos n is periodic with
2
period 4 samples.
c) x(n) = u(2n)
Solution
+∞ ∞
2
E = ∑ x(n) = ∑ u(2n) 2
= ∑ u(n) = 1+ 1+ 1+ 1 ..... ∞ = ∞
n = −∞ n= 0 n = even
N N
1 2 1 1
P =
N→∞
Lt
2N + 1 ∑
n = −N
x(n) = Lt
N→∞ 2N + 1 ∑ u(2n)
n= 0
2
= Lt
N→∞
= 1+ 1+......+1
2N + 1 144244 3
N
1+ terms
2
N
FG 1 + 1IJ 1 1
+
1
= Lt
1
1+
N
=
FG IJ Lt
H N 2K = 2 ∞ = 2 =
1
.
N→∞ (2N + 1) 2 H K N→∞ F 1I
NG 2 + J 2+
1 2 4
H NK ∞
Since P is finite, E is infinite, x(n) is power signal.
d ) x(n) = 2 u(3 − n)
Solution
+∞ −3 −3
∑ b2 u(3 − n)g
2 2
E = ∑ x(n) = = ∑ 4 .......1 + 1 + 1 = ∞
14 4244 3 u (3 −n )
n = −∞ n = −∞ n = −∞ inf inite terms
+N −3
1 2 1
P =
N→∞
Lt
(2N + 1) ∑
n = −N
x(n) = Lt
N→∞ (2N + 1) ∑ 4 u(3 − n)
n=N
1 4
= Lt 4 1+ 1+ 1......+1 = Lt N− 2 n −3 −2 −1 0
N→∞ (2N + 1) 1442443 N→∞ (2N + 1)
N − 2 terms
Solution for Exercise Problems E2. 7
N × 4 1−
2 FG IJ 4 1−
FG 2 IJ
∴ P = Lt
N H K =
H ∞ 4
= =2
K
N→∞
N 2+
1 FG IJ 2+
1 2
N H K ∞
Solution
x (n − 1) 2.1 x (n −1)
−1
z 2.1
x (n − 1 )
x (n − 1 )
0.5 x (n − 2)
−1
z z
−1
0.5
x (n − 2) 0.5 0.5 x (n − 2) x (n − 2)
y (n )
y (n )
2 y(n −1 )
−1
z z
−1
y (n − 1)
2
2 y(n −1 )
−1
−2
−1 −1
(n
z
x(n
z 2
2y
0.5
0 .5
−1 −1
z 0.5 2 z
Solution
B lo c k D ia gra m S ig n a l F lo w G ra p h
0.7
x (n ) 0.7 0.7x(n) x (n ) 0.7x(n)
x (n )
x (n )
−1 −1 1.6 x (n −2)
z z
1.6
−1
−1
z
z
x (n −2 )
x (n − 2 ) 1.6 1.6 x (n − 2)
E2. 8 DSP, Chapter 2 -Discrete Time Signals and Systems
B loc k D ia gra m S ign a l F lo w G ra p h
y (n ) 3 y(n −1 ) y (n )
−1
z
−1 3
z
3 y(n − 1 ) y (n −1 )
y (n − 1 )
3
−1
z
−1 z
0.3
0.3 y (n − 2 )
y (n −2 )
0.3
0 .3
6
1.
−1
−1 z
z
−1 −1
z 1.6 0.3 z
E2.6. Determine the response of the discrete time systems governed by the following difference equations.
Solution
Homogeneous solution
When the input is zero the equation (1) can be written as,
ln – 0.1 l(n – 1) = 0
Particular solution
H 2K H 2K
Using the above values for x(n) and y(n) in equation(1) we get,
K
FG 1IJ u(n) − 0.1KFG 1IJ
n (n −1)
u(n − 1) = 0.7 ×
FG 1IJ u(n) + FG 1IJ
n n −1
u(n − 1) .....(4)
H 2K H 2K H 2K H 2K
To determine the value of ‘K’ evaluate equation(4) for n = 1.
K
FG 1IJ u(1) − 0.1KFG 1IJ u(0) = 0.7FG 1IJ u(1) + FG 1IJ u(0)
1 0 1 0
H 2K H 2K H 2K H 2K
1.35
0.5K − 0.1K = 0.35 + 1 ⇒ 0.4K = 1.35 ⇒ K= = 3.375
0.4
Solution for Exercise Problems E2. 9
\ The particular solution yp(n) is given by,
y p (n) = K
FG 1IJ u(n) = 3.375 × FG 1IJ u(n)
n n
.....(5)
H 2K H 2K
Total response
LM
y(n) = C(0.1)n + 3.375 ×
FG 1IJ OP u(n)
n
(or) y(n) = C(0.1)n + 3.375
FG 1IJ n
; for n ≥ 0 .....(6)
MN H 2 K PQ H 2K
At n = 0, from equation (1) we get,
y(0) − 0.1y(−1) = 0.7 x(0) + x( −1) .....(7)
\ y(0) = 0.6
MN H 2 K PQ
b) y(n) + 2.1 y(n – 1) + 0.2 y(n –2) = x(n) + 0.56 x(n – 1) ; x(n) = u(n) ; y(–2) = 1 ; y(–1) = –3.
Solution
y(n) + 2.1 y(n – 1) + 0.2 y(n – 2) = x(n) + 0.56 x(n – 1) .....(1)
Homogeneous Solution
\ ln + 2.1 ln – 1 + 0.2 ln – 2 = 0
λ2 + 2 .1 λ + 0.2 = 0 ⇒ bλ + 0.1g bλ + 2g = 0
\ The roots are, l1 = –0.1, l2= –2.
b g + C b−2g
yh (n) = C1 −0.1
n
2
n
for n ≥ 0
= C b −0.1g + C b −2g
n n .....(3)
1 2 u(n)
E2. 10 DSP, Chapter 2 -Discrete Time Signals and Systems
Particular Solution
Using the above values for x(n) and y(n) in equation(1) we get,
K u(n) + 2.1 K u(n –1) + 0.2 K u(n –2) = u(n) + 0.56 u(n –1) .....(5)
1.56
3.3K = 1. 56 ⇒ K= = 0.47
3.3
\ yp(n) = 0.47 u(n)
\ Total response,
y(n) = yh(n) + yp(n)
y(n) = [C1(–0.1)n + C2(–2)n + 0.47] u(n)
y(n) = C1(–0.1)n + C2(–2)n + 0.47 for n ³ 0. .....(6)
At n = 0 from equation (1) we get,
y(0) + 2.1 y(–1) +0.2 y(–2) = x(0) + 0.56 x(–1) .....(7)
Given, y(–1) = –3, Also, x(n) = u(n)
y(–2) = 1 \ x(0) = 1 and x(–1) = 0.
On substituting the above values in equation (7),
y(0) + 2.1 (–3) + 0.2 (1) = 1 + 0.
y(0) – 6.3 + 0.2 = 1 Þ y(0) – 6.1 = 1
\ y(0) = 1 + 6.1 = 7.1
At n = 1 from equation (1) we get,
y(1) + 2.1 y(0) + 0.2 y(–1) = x(1) + 0.56 x(0)
We know that, y(0) = 7.1 , x(0) = 1
y(–1) = –3 , x(1) = 1
\ y(1) + 2.1 (7.1) + 0.2 (–3) = 1 + 0.56 Þ y(1) + 14.31 = 1.56
\ y(1) = 1.56 – 14.31 = –12.75
Put n = 0 and y(0) = 7.1 in eqaution(6).
y(0) = C1(–0.1)0 + C2(–2)0 + 0.47
7.1 = C1 + C2 + 0.47
\ C1 + C2 = 7.1 – 0.47
\ C1 + C2 = 6.63 .....(8)
Put n= 1 and y(1) = –12.75 in equation(6).
y(1) = C1(–0.1)1 + C2(–2)1 + 0.47
–12.75 = –0.1C1 – 2 C2 + 0.47
0.1C1 + 2C2 = 12.75 + 0.47
\ 0.1C1 + 2 C2 = 13.22 .....(9)
1.9 C1 = –0.04
−0.04
C1 = = − 0.02
1. 9
∴ C2 = 6.63 − C1 = 6.63 + 0.02 = 6.65
\ y(n) = –0.02 (–0.1)n + 6.65 (–2)n + 0.47, for n ³ 0.
= [0.47 – 0.02 (–0.1)n + 6.65 (–2)n] u(n).
Solution for Exercise Problems E2. 11
E2.7. Test the following systems for time invariance.
a) y(n) = x(n + 1) + x(n + 2)
Solution
Given that, y(n) = H {x(n)} = x(n + 1) + x(n + 2)
Response for Delayed Input
y(n –m) = H {x(n – m)} = x(n –m + 1) + x(n – m + 2)
Response for Unshifted Input
y(n) = H {x(n)} = x(n + 1) + x(n + 2)
Delayed Response
l q
y d (n) = z −m H x(n) = z −m x(n + 1) + x(n + 2) = z −m x(n + 1) + z −m x(n + 2)
= x(n − m + 1) + x(n − m + 2)
l q
y d (n) = z −m H x(n) = z −m n a x(n) = n a x(n − m)
l q
y d (n) = z −m H x(n) = z −m x 2 (n + 2) + C = z −m x 2 (n + 2) + C = x 2 (n − m + 2) + C
l q
y d (n) = z −m H x(n) = z −m (n − 1) x 2 (n) + C = (n − 1) x 2 (n − m) + C.
y (n) = H lx (n)q = b x (n + 2) + ne
2 2 2
x 2 ( n)
m r
∴ y 3 (n) = H x 3 (n) = b x 3 (n + 2) + ne x 3 (n)
Solution
Let ‘H ’ be the system.
l q
∴ y(n) = H x(n) = a x(n) + b x(n)
l q
∴ y1(n) = H x1(n) = a x1(n) + b x1(n)
y (n) = H lx (n)q = a
2 2 x 2 (n) + b x 2 (n)
Solution
Let ‘H ’ be the system.
1
∴ y(n) = H x(n) = x(n) +l q x(n)
a1 a2
∴ a1 y1(n) + a 2 y 2 (n) = a1 x1(n) + + a 2 x 2 (n) + .....(1)
x1(n) x 2 (n)
1 1
m
∴ y 3 (n) = H x 3 (n) = x 3 (n) + r x 3 (n)
= a1x1(n) + a 2 x 2 (n) +
a1x1(n) + a 2 x 2 (n)
.....(2)
N M
e) y(n) = ∑b
m = −1
m x(n + m) + ∑c
m =0
m y(n + m)
Solution
N M
∴ y(n) = H x(n) = l q ∑b m x(n + m) + ∑c m y(n + m)
m = −1 m=0
Consider two signals, x1(n) and x 2 (n). Let y1(n) and y 2 (n) be the respective outputs.
N M
l q ∑ b x (n + m) + ∑ c y (n + m)
y1(n) = H x1(n) = m 1 m 1
m= −1 m=0
N M
l q ∑ b x (n + m) + ∑ c y (n + m)
y 2 (n) = H x 2 (n) = m 2 m 2
m= −1 m=0
L N O L M O
a y (n) + a y (n) = a M ∑ b x (n + m) + ∑ c y (n + m)P + a M ∑ b x (n + m) + ∑ c y (n + m)P
N M
.....(1)
1 1 2
MN
2 1
m= −1 PQ MN
m 1
m=0 PQ m 1 2
m= −1
m 2
m=0
m 2
N M
= ∑b
m = −1
m a1x1(n + m) + a 2 x 2 (n + m) + ∑c
m= 0
m y 3 (n + m)
N M M
.....(2)
= a1 ∑b
m = −1
m x1(n + m) + a 2 ∑b
m = −1
m x 2 (n − m) + ∑c
m= 0
m y 3 (n + m)
If y3(n) = H {a1 x1(n) + a2 x2(n)} ; then, y3(n + m) = H {a1 x1(n + m) + a2 x2(n + m)}
N N M M
= a1 ∑b
m = −1
m x1(n + m) + a 2 ∑b
m = −1
m x 2 (n + m) + a1 ∑c
m=0
m y1(n + m) + a 2 ∑c
m=0
m y 2 (n + m)
F b N M I
= a1 GH ∑
m = −1
m x1(n + m) + ∑c
m= 0
m y1(n + m) JK
F b N M I
+ a2 GH ∑
m = −1
m x 2 (n − m) + ∑c
m= 0
m JK
y 2 (n + m) .....(4)
Solution
When, n = –1, y(–1) = a x(–2) + x(1) ; Response depends on future input
n = 0, y(0) = a x(0) + x(0)
n = 1, y(0) = a x(2) + x(1) ; Response depends on future input.
Except n = 0 for all other values of n, the response depends on future input.
Hence the system is noncausal.
n n
c) y(n) = ∑ x(m) + ∑ x(2m)
m = −1 m = −∞
Solution
0 0
n = 0, y(0) = ∑ x(m) + ∑ x(2m) ⇒ y(0) = x( −1) + x(0) + ..... + x(−4) + x(−2) + x(0).....
m = −1 m = −∞
Solution
1
( 0 .3 ) 3
1 1
(0 .3)
n
( 0 .3 ) 2 ( 0 .3 ) 2
1 y (n )
1
0 .3 u (n + 2 ) 0 .3
1 1
X ⇒
0.3
2
( 0 .3 )
−3 −2 −1 0 1 2 −3 −2 −1 0 1 2 −3 −2 −1 0
Solution
4
y(n) = ∑ x(n − k) = x(n + 4)
k = −4
+ x(n + 3) + x(n + 2) + x(n + 1) + x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)
+∞ 4 0 4
∴ ∑ h(n)
n = −∞
= ∑ (8)
n = −∞
n
= ∑ (8) + ∑ (8)
n = −∞
n
n =1
n
∞
= ∑ (8)
n= 0
−n
+ 81 + 8 2 + 8 3 + 84
=
∞
F 1I
∑ GH 8 JK
n
+ 4680 =
∞
∑ (0.125) n
+ 4680 =
1
+ 4680
n= 0 n= 0 1 − 0.125
= 4681.14 = Constant
Hence it is stable system.
E2. 16 DSP, Chapter 2 -Discrete Time Signals and Systems
e) y(n) = x(n – 3)
If x(n) = d(n), then y(n) = h(n)
d(n – 3) = 1, only
\ h(n) = d(n – 3) when n = 3, and
∞ +∞ zero for all other
∴ ∑
n = −∞
h(n) = ∑
n = −∞
δ(n − 3) = 1
values of n
h(n) =
|RS ( −4a) n
; n ≥ 0
T|(2b) −n
; n < 0
Solution
The condition to be satisfied for the stability of the system is,
+∞ −1 ∞
∞ ∞
= ∑ |2b| n
+ ∑ |4a| n
n =1 n= 0
∞ ∞
= ∑ |2b| n
− |2b|0 + ∑ |4a| n
n= 0 n= 0
∞
1
If 0 <|2b| < 1, then ∑|2b| n
=
1 − |2b|
n= 0
∞
1
If 0 <|4a| < 1, then ∑|4a| n
=
1 − |4a|
n= 0
+∞
1 1
∴ ∑ h(n) = 1 − |2b| − 1+ 1 − |4a| = Constant
n = −∞
E2.12. a) Determine the impulse response for the cascade of two LTI systems having impulse responses,
h1 (n) =
FG 1 IJ n
∴ h(n) = ∑
∞
h2 (m) h1(n − m) =
∞
∑ δ(m − 3)
FG 1IJ n −m
=
∞
∑ δ(m − 3)
FG 1IJ FG 1IJ
n −m
m= 0 m=0
H 7K m=0
H 7K H 7K
FG 1IJ ∑ δ(m − 3) FG 1IJ
=
n ∞ −m
H 7K H 7K m=0
7
F 1I F 1I for n ≥ 3
∴ h(n) = G J G J
n −3
H 7K H 7K
F 1I
h(n) = G J u(n − 3) for all n.
n− 3
H 7K
Solution for Exercise Problems E2. 17
b) Determine the overall impulse response of the interconnected discrete time system shown in fig E2.12.
Take, h1 (n) =
FG 1 IJ n
u(n) ; h2 (n) =
FG 1 IJ n
u(n) ; h3 (n) =
FG 1 IJ n
u(n)
H 3K H6K H 9K
h 2 ( n)
x (n )
+ y (n )
h 1 ( n) + h 3 ( n)
Solution F ig E 2 .1 2
The given system can be redrawn as,
h 2 (n)
x (n ) y (n ) x (n ) y (n )
h 2 (n) + h 2 (n) + [(h 2 (n) + h1(n)) ∗ h3 (n)]
+ h 3 (n)
h1(n) x (n ) h(n) y (n )
b g
h(n) = h2 (n) + h1(n) + h2 (n) ∗ h3 (n) = h2 (n) + h1(n) ∗ h3 (n) + h2 (n) ∗ h3 (n) b g b g
Evaluation of h1(n) * h3(n)
∞
h1(n) ∗ h3 (n) = ∑ h (m) h (n − m)
m= −∞
1 3
=
n
∑ h (m) h (n − m) =
n
∑ GH 3 JK
F 1I FG 1IJ
m n −m
=
FG 1IJ ∑ FG 1IJ
n n m
9m =
FG 1IJ ∑ FG 9 IJ
n n m
m= 0
1 3
m= 0
H 9K H 9K H 3K m= 0
H 9K H 3K m= 0
FG 9 IJ − 1 n +1
F 1I H 3 K
n
= G J
H 9K 9 − 1
3
FG 9 IJ 9 − 1 n
FG 9 IJ 9 − 1 n
F 1I H 3 K 3
= G J
n
= G J
F 1I H 3 K 3 F 1I L 1 F 9 I 9 − 1 OP
= G J M G J
n n n
H 9K 9
−1
H 9K 2 H 9 K MN 2 H 3 K 3 2 PQ
3
3 F 1I
G J u(n) − 21 FGH 91IJK u(n) for all 'n'
n n
=
2 H 3K
Evaluation of h2(n) * h3(n)
h2 (n) ∗ h3 (n) =
+∞
∑ h (m) h (n − m) = ∑ h (m) h (n − m)
F 1I FG 1IJ = FG 1IJ ∑ FG 1IJ FG 1IJ
n
=
n
∑ GH 6 JK
m n −m n n m −m
m= −∞
2 3
m= 0
H 9K H 9K H 6K H 9K
2 3
m= 0 m= 0
F 1 I F 1I n
F 1I F 3 I = FG 1IJ H 2 K
n
= G J ∑ G J 9 = G J ∑ G J
m n
F 1I M H 2 K P
n m n n
H 9 K H 2 K H 9 K 3 − 1 = GH 9 JK MM 1 PP
m
H 9K H 6K m=0 m=0
2 MN 2 PQ
F 1I L F 3 I 3 − 2OP = FG 1IJ LMFG 3 IJ 3 − 2OP = FG 1IJ FG 3 IJ 3 − 2 FG 1IJ
= G J M2G J
n n n n n n n
H 9 K MN H 2 K 2 PQ H 9 K MNH 2 K PQ H 9 K H 2 K H 9K
F 3I F 1In
F 1 I F 1I F 1 I n
= G J 3 − 2 G J = 3 G J − 2 G J = 3 G J u(n) − G J u(n) for all n.
F 1I n n n n
H 18 K H 9K H 6K H 9K H 6K H 9K
Overall Impulse Response
b
h(n) = h2 (n) + h1(n) ∗ h3 (n) + h2 (n) ∗ h3 (n) g b g
E2. 18 DSP, Chapter 2 -Discrete Time Signals and Systems
h(n) =
FG 1IJ u(n) + LMFG 3 IJ FG 1IJ u(n) − FG 1IJ FG 1IJ u(n)OP + LM3 FG 1IJ u(n) − FG 1IJ u(n)OP
n n n n n
H 6K MNH 2 K H 3 K H 2 K H 9 K PQ MN H 6 K H 9 K PQ
FG 1IJ u(n) − 3 FG 1IJ u(n) + 3 FG 1IJ u(n) =
n n n
LM4 F 1I n
FG IJ
3 1
n
3 FG 1IJ OP u(n)
n
⇒ h(n) = 4
H 6K 2 H 9K 2 H 3K MN GH 6 JK −
H K
2 9
+
2 H 3 K PQ
E2.13. Determine the response of an LTI system whose and impulse response h(n) and input x(n) are given by,
a) l
h(n) = 1, 4, 1, − 2, 1 q
A
l
x(n) = 1, 3, 5, − 1, − 2 q
A
Solution
The response y(n) of the system is given by convolution of x(n) and h(n).
+∞
y(n) = x(n) ∗ h(n) = ∑ x(m) h(n − m)
m= −∞
The 9 samples of output sequence are computed by table method as shown below.
m –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7
x(m) 1 3 5 –1 –2
h(m) 1 4 1 –2 1
h(–m) 1 –2 1 4 1
h(–3–m) 1 –2 1 4 1
h(–2–m) 1 –2 1 4 1
h(–1–m) 1 –2 1 4 1
h(0 – m) 1 –2 1 4 1
h(1 – m) 1 –2 1 4 1
h(2 – m) 1 –2 1 4 1
h(3 – m) 1 –2 1 4 1
h(4 – m) 1 –2 1 4 1
h(5 – m) 1 –2 1 4 1
3
When n = −3 ; y(−3) = ∑ x(m) h(−3 − m) = 0 + 0 + 0 + 0 + 1+ 0 + 0 + 0 + 0 = 1
m = −5
3
When n = −2 ; y(−2) = ∑ x(m) h(−2 − m) = 0 + 0 + 0 + 4 + 3 + 0 + 0 + 0
m = −4
=7
3
When n = −1 ; y(−1) = ∑ x(m) h(−1 − m) = 0 + 0 + 1+ 12 + 5 + 0 + 0 = 18
m = −3
3
When n = 0 ; y(0) = ∑ x(m) h(0 − m)
m = −2
= 0 − 2 + 3 + 20 − 1+ 0 = 20
3
When n = 1 ; y(1) = ∑ x(m) h(1 − m)
m = −1
= 1 − 6 + 5 − 4 − 2 = −6
Solution for Exercise Problems E2. 19
4
When n = 2 ; y(2) = ∑ x(m) h(2 − m) = 0 + 3 − 10 − 1− 8 + 0 = −16
m = −1
5
When n = 3 ; y(3) = ∑ x(m) h(3 − m) = 0 + 0 + 5 + 2 − 2 + 0 + 0 = 5
m = −1
6
When n = 4 ; y(4) = ∑ x(m) h(4 − m) = 0 + 0 + 0 − 1+ 4 + 0 + 0 + 0 = 3
m = −1
7
When n = 5 ; y(5) = ∑ x(m) h(5 − m) = 0 + 0 + 0 + 0 − 2 + 0 + 0 + 0 + 0 = −2
m = −1
l
∴ y(n) = 1, 7, 18, 20, − 6, − 16, 5, 3, − 2 q
A
E2.13. b) h(n) =
|RS1 ; 0 ≤n≤ 2
T|0 ; n ≥ 3
n
x(n) = a u(n) ; |a| < 1
Solution
x (m ) h (m ) h ( −m )
0
a =1 1 1 1
a
2
a
3
a
0 1 2 3 m 0 1 2 3 6 m −3 −2 −1 0
4 5 −6 −5 −4 m
By convolution formula,
∞
y(n) = ∑ x(m) h(n − m)
m = −∞
∞ ∞
When n = 0 ; y(0) = ∑ x(m) h(0 − m) = ∑ v0 (m)
m=0 m=0
x (m ) h( −m ) v 0 (m )
0 0
a =1 1 1=a
a
a
2
x ⇒
3
0
a ∴ y (0) = a
0 1 2 3 m −3 −2 −1 0 1 m 0 1 2 m
∞ ∞
When n = 1 ; y(1) = ∑ x(m) h(1 − m) = ∑ v1(m)
m=0 m=0
x (m ) h (1 − m ) v 1 (m )
0
0
a =1 1=a
1 1
a 1
a
a
2
⇒
3
x y (1) = a
0
+ a
1
a
0 1 2 3 m −2 −1 0 1 m −1 0 1 2 m
Similarly,
When, n = 2 ; y(2) = a0 + a1 + a2
When, n = 3 ; y(3) = a1 + a2 + a3
When, n = 4 ; y(4) = a2 + a3 + a4
When, n = 5 ; y(5) = a3 + a4 + a5
n
∴ y(n) = ∑a
k =0
k
; for n = 0, 1, 2
n
= ∑a
k =n − 2
k
; for n > 2
E2. 20 DSP, Chapter 2 -Discrete Time Signals and Systems
E2.14. Perform circular convolution of the two sequences,
l
a) x1 (n) = 1, 2, − 1 −1 q and x2 (n) = 2, 4, 6, 8 l q
A A
Solution
N −1
Let x 3 (n) = x1(n) ∗ x 2 (n) = ∑ x (m) x
m=0
1 2,n (m) ; x 2,n (m) = x 2 ((n − m))N ; N = 4
x 1 ( 2 ) = −1 x 1( m ) x 1( 0 ) = 1 x2 (2) = 6 x 2 (m ) x 2 (0 ) = 2 x 2 (2 ) = 6 x 2 ( −m ) x 2 (0) = 2
x 1 ( 3 ) = −1 x 2 (3 ) = 8 x 2 (1) = 4
3 3
When n = 0 ; x 3 (0) = ∑ x (m) x
m=0
1 2,0 (m) = ∑ v (m) = 2 + 16 − 6 − 4 = 8
m=0
0
2 8 16
−1 x 1 (m ) 1 x 6 x 2 ,0 ( m ) 2 ⇒ −6 v 0 (m ) 2
−1 4 −4
3 3
When n = 1 ; x 3 (1) = ∑ x (m) x
m=0
1 2,1(m) = ∑ v (m) = 4 + 4 − 8 − 6 = −6
m=0
1
2 2 4
−1 6 −6
3 3
When n = 2; x 3 (2) = ∑ x (m) x
m=0
1 2,2 (m) = ∑ v (m) = 6 + 8 − 2 − 8 = 4
m=0
2
2 4 8
−1 x1(m) 1 x 2 x 2 , 2 (m) 6 ⇒ −2 v 2 (m ) 6
−1 8 −8
3 3
When n = 3 ; x 3 (3) = ∑ x (m) x
m=0
1 2,3 (m) = ∑ v (m) = 8 + 12 − 4 − 2 = 14
m=0
3
2 6 12
−1 x 1(m) 1 x 4 x 2, 3 (m ) 8 ⇒ −4 v 3 (m) 8
−1 2 −2
l
x 3 (n) = 8, − 6, 4, 14 q
A
b) Perform the circular convolution of the two sequences,
l
x1 (n) = 0, 0.6, − 1, 1.5, 2 ; x2 (n) = −2, 3, 0.2, 0.7, 0.8 q l q
A A
Solution
The response x3(n) of the system is given by convolution of x1(n) and x2(n).
Solution for Exercise Problems E2. 21
N −1 4
x 3 (n) = x1(n) ∗ x 2 (n) = ∑ x (m) x ((n − m))
m=0
1 2 N = ∑ x (m) x ((n − m))
m=0
1 2 5
4
= ∑ x (m) x
m=0
1 2,n (m)
m –4 –3 –2 –1 0 1 2 3 4
When n = 0 ;
4
x 3 (0) = ∑ x (m) x
m=0
1 2,0 (m) = x1(0) x 2,0 (0) + x1(1) x 2,0 (1) + x1(2) x 2,0 (2) + x1(3) x 2,0 (3) + x1(4) x 2,0 (4)
b g b
= (0 × −2) + 0.6 × 0.8 + −1 × 0.7 + 1.5 × 0.2 + 2 × 3 = 6.08 g b g b g
Similarly
g b g b b g b g
When n = 1 ; x 3 (1) = (0 × 3) + 0.6 × −2 + −1 × 0.8 + 1.5 × 0.7 + 2 × 0.2 = −0.55
A
E2.15. The input x(n) and impulse response h(n) of an LTI system are given by,
x(n) = l − 1, 1, − 1, 1, − 1, 1 q and l
h(n) = −0.5, 0.5, − 1, 0.5, − 1, − 2 q
A A
Find the response of the system using,
a) Linear Convolution
b) Circular Convolution
Solution
m –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7 8 9
x(m) –1 1 –1 1 –1 1
4
When n = −1, y( −1) = ∑ x(m) h
m = −6
−1(m)
= x( −6) h−1(−6) + x( −5) h−1( −5) + x( −4)h−1(−4) + x( −3) h−1(−3) + x( −2) h−1(−2) + x( −1)h−1(−1)
+ x(0) h−1(0) + x(1) h−1(1) + x(2)h−1(2) + x(3) h−1(3) + x(4) h−1(4)
= 0 + 0 + 0 + 0 + 0 + (−1 × − 0.5 ) + 0 + 0 + 0 + 0 + 0 = 0.5
4
When n = 0 ; y(0) = ∑ x(m) h (m) 0 b g b
= 0 + 0 + 0 + 0 + −1 × 0.5 + 1 × −0.5 + 0 + 0 + 0 + 0 = −1 g
m= −5
4
When n = 1 ; y(1) = ∑ x(m) h (m) 1 b g b g b
= 0 + 0 + 0 + −1 × −1 + 1 × 0.5 + −1 × −0.5 + 0 + 0 + 0 = 2 g
m= −4
4
When n = 2 ; y(2) = ∑ x(m) h (m) 2 b g b g b
= 0 + 0 + −1 × 0.5 + 1 × −1 + −1 × 0.5 + 1 × −0.5 + 0 + 0 = −2.5 g b g
m= −3
4
When n = 3 ; y(3) = ∑ x(m) h (m) 3 b g b g b g b
= 0 + −1 × −1 + 1 × 0.5 + −1 × −1 + 1 × 0.5 + −1 × −0.5 + 0 = 3.5 g b g
m= −2
4
When n = 4 ; y(4) = ∑ x(m) h (m) 4 b g b g b g b
= −1 × −2 + 1 × −1 + −1 × 0.5 + 1 × −1 + −1 × 0.5 + 1 × −0.5 = −1.5 g b g b g
m= −1
5
When n = 5 ; y(5) = ∑ x(m) h (m) 5 b g b g b g b
= 0 + 1 × −2 + −1 × −1 + 1 × 0.5 + −1 × −1 + 1 × 0.5 + 0 = 1 g b g
m= −1
6
When n = 6 ; y(6) = ∑ x(m) h (m) 6 b g b g b
= 0 + 0 + −1 × −2 + 1 × −1 + −1 × 0.5 + 1 × −1 + 0 + 0 = −0.5 g b g
m= −1
7
When n = 7 ; y(7) = ∑ x(m) h (m) 7 b g b g b
= 0 + 0 + 0 + 1 × −2 + −1 × −1 + 1 × 0.5 + 0 + 0 + 0 = −0.5 g
m= −1
8
When n = 8 ; y(8) = ∑ x(m) h (m) 8 b g b
= 0 + 0 + 0 + 0 + −1 × −2 + 1 × −1 + 0 + 0 + 0 + 0 = 1 g
m= −1
9
When n = 9 ; y(9) = ∑ x(m) h (m) 9 b g
= 0 + 0 + 0 + 0 + 0 + 1 × −2 + 0 + 0 + 0 + 0 + 0 = − 2
m= −1
l
y(n) = 0.5, − 1, 2, − 2.5, 3.5, − 1. 5, 1, − 0.5, − 0.5, 1, − 2 q
A
Solution for Exercise Problems E2. 23
b) Response of LTI system using circular convolution
The response y(n) is 11-point sequence. The y(n) start at n = –1 and end of n = 9. Hence both x(n) and h(n)
should be converted to 11-point sequence such that they start at n = –1 and end at n = 9 by appending zeros for
missing samples.
l
∴ x(n) = −1, 1, − 1, 1, − 1, 1, 0, 0, 0, 0, 0 q
A
l
h(n) = 0, − 0.5, 0.5, − 1, 0.5, − 1, − 2, 0, 0, 0, 0 q
A
9 9
Now, y(n) = x(n) ∗ h(n) = ∑ x(m) h((n − m))
m= −1
11 = ∑ x(m) h (m) ;
m= −1
n where hn (m) = h((n − m))11
m –10 –9 –8 –7 –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7 8 9
x(m) –1 1 –1 1 –1 1 0 0 0 0 0
9
When n = −1 ; y( −1) = ∑ x(m) h −1(m) b g
= −1 × −0.5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0.5
m= −1
9
When n = 0 ; y(0) = ∑ x(m) h (m) 0 b g b g
= −1 × 0.5 + 1 × −0.5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = −1
m= −1
9
When n = 1 ; y(1) = ∑ x(m) h (m) 1 b g b g b g
= −1 × −1 + 1 × 0.5 + −1 × −0.5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 2
m= −1
9
When n = 2 ; y(2) = ∑ x(m) h (m) 2 b g b g b g b g
= −1 × 0.5 + 1 × −1 + −1 × 0.5 + 1 × −0.5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = −2.5
m= −1
9
When n = 3 ; y(3) = ∑ x(m) h (m) 3 b g b g b g b g b
= −1 × −1 + 1 × 0.5 + −1 × −1 + 1 × 0.5 + −1 × −0.5 + 0 + 0 + 0 + 0 + 0 + 0 = 3.5 g
m= −1
9
When n = 4 ; y(4) = ∑ x(m) h (m) 4 b g b g b g b g b
= −1 × −2 + 1 × −1 + −1 × 0.5 + 1 × −1 + −1 × 0.5 + 1 × −0.5 + 0 + 0 + 0 + 0 + 0 = −1.5 g b g
m= −1
9
When n = 5 ; y(5) = ∑ x(m) h (m) 5 b g b g b g b
= 0 + 1 × −2 + −1 × −1 + 1 × 0.5 + −1 × −1 + 1 × 0.5 + 0 + 0 + 0 + 0 + 0 = 1 g b g
m= −1
9
When n = 6 ; y(6) = ∑ x(m) h (m) 6 b g b g b g b
= 0 + 0 + −1 × −2 + 1 × −1 + −1 × 0.5 + 1 × −1 + 0 + 0 + 0 + 0 + 0 = −0.5 g
m= −1
9
When n = 7 ; y(7) = ∑ x(m) h (m) = 0 + 0 + 0 + b1× −2g + b−1 × −1g + b1× 0.5g + 0 + 0 + 0 + 0 + 0 = −0.5
m= −1
7
E2. 24 DSP, Chapter 2 -Discrete Time Signals and Systems
9
When n = 8 ; y(8) = ∑ x(m) h (m) 8 b g b g
= 0 + 0 + 0 + 0 + −1 × −2 + 1 × −1 + 0 + 0 + 0 + 0 + 0 = 1
m= −1
9
When n = 9 ; y(9) = ∑ x(m) h (m) 9 b g
= 0 + 0 + 0 + 0 + 0 + 1 × −2 + 0 + 0 + 0 + 0 + 0 = −2
m= −1
m –2 –1 0 1 2 3 4
x(m) 1 –1 2
h(m) 2 3 –1
h(–m)=h0(m) –1 3 2
h1(m) –1 3 2
h2(m) –1 3 2
h3(m) –1 3 2
h4(m) –1 3 2
+∞
y1(n) = x1(n) ∗ h(n) = ∑ x (m) h(n − m)
m= −∞
1
+∞
= ∑ x (m) h (m) ;
m= −∞
1 n n = 0, 1, 2, 3, 4
The convolution of section –2 and 3 are identical to that of section -1 except the starting value of n.
∴ y 2 (n) = l 2, 1, 0, 7, − 2 q
An= 3
∴ y 3 (n) = l 2, 1, 0, 7, − 2 q
An= 6
Overall Output
n 0 1 2 3 4 5 6 7 8 9 10
y1(n) 2 1 0 7 –2
y2(n) 2 1 0 7 –2
y3(n) 2 1 0 7 –2
y(n) 2 1 0 9 –1 0 9 –1 0 7 –2
l
y(n) = 2, 1, 0, 9, − 1, 0, 9, − 1, 0, 7, − 2 q
Overlap save Method
l
x(n) = 1, − 1, 2, 1, − 1, 2, 1, − 1, 2 q
h(n) = l2, 3, − 1 q
N1 = 9, N2 = 3, Let N3 = 3
x1(n) = 1, n = 0 x 2 (n) = 1 , n = 3 x 3 (n) = 1, n = 6
= −1, n = 1 = −1, n = 4 = −1, n = 7
= 2, n = 2 = 2, n = 5 = 2, n = 8
Let, y1(n), y2(n) and y3(n) be output of linear convolution of x1(n), x2(n) and x3(n) with h(n) respectively.
Now each output will consists of 3 + 3 – 1 = 5 samples. Hence convert x1(n), x2(n), x3(n) and h(n) to 5 sample sequence as shown
below.
x1(n) = 1, n = 0 x 2 (n) = 1, n = 3 x 3 (n) = 1, n = 6
= −1, n = 1 = −1, n = 4 = −1, n = 7
= 2, n = 2 = 2, n = 5 = 2, n = 8
= 1, n = 3 = 1, n = 6 = 0, n = 9
= −1, n = 4 = −1, n = 7 = 0, n = 10
Convolution of Section 1
m –4 –3 –2 –1 0 1 2 3 4
x1(m) 1 –1 2 1 –1
h(m) 2 3 –1 0 0
h(–m)= h0(m) 0 0 –1 3 2 0 0 –1 3
h1(m) 0 0 –1 3 2 0 0 –1
h2(m) 0 0 –1 3 2 0 0
h3(m) 0 0 –1 3 2 0
h4(m) 0 0 –1 3 2
E2. 26 DSP, Chapter 2 -Discrete Time Signals and Systems
N −1 4
y1(n) = x1(n) ∗ h(n) = ∑ x (m) h((n − m)) = ∑ x (m) h (m) ;
m=0
1 n
m=0
1 n where hn (m) = h((n − m))5
4
When n = 0 ; y1(0) = ∑ x (m) h (m) =
m=0
1 0 2 + 0 + 0 − 1 − 3 = −2
4
When n = 1 ; y1(1) = ∑ x (m) h (m) =
m=0
1 1 3 − 2 + 0 + 0 + 1= 2
4
When n = 2 ; y1(2) = ∑ x (m) h (m) =
1 2 − 1− 3 + 4 + 0 + 0 = 0
m=0
4
When n = 3 ; y1(3) = ∑ x (m) h (m) =
m=0
1 3 0 + 1+ 6 + 2 + 0 = 9
4
When n = 4 ; y1(4) = ∑ x (m) h (m) =
m=0
1 4 0 + 0 − 2 + 3 − 2 = −1
∴ y1(n) = l − 2, 2, 0, 9, − 1 q
A
n=0
Convolution of Section 2
The output of convolution of section -2 will be identical to that of section-1 except the starting value of n.
∴ y 2 (n) = l − 2, 2, 0, 9, − 1 q
A
n= 3
Convolution of Section 3
m –4 –3 –2 –1 0 1 2 3 4 5 6 7 8 9 10
x3(m) 1 –1 2 0 0
h(m) 2 3 –1 0 0
h0(m) 0 0 –1 3 2
h6(m) 0 0 –1 3 2 0 0 –1 3
h7(m) 0 0 –1 3 2 0 0 –1
h8(m) 0 0 –1 3 2 0 0
h9(m) 0 0 –1 3 2 0
h10(m) 0 0 –1 3 2
10 10
y 3 (n) = x 3 (n) ∗ h(n) = ∑ x (m) h((n − m)) = ∑ x (m) h (m) ;
m=6
3 5
m=6
3 n where hn (m) = h((n − m))5
10
When n = 6 ; y 3 (6) = ∑ x (m) h (m) =
m=6
3 6 2+0+0+0+0 = 2
10
When n = 7 ; y 3 (7) = ∑ x (m) h (m) =
3 7 3−2+0+0+0=1
m=6
10
When n = 8 ; y 3 (8) = ∑ x (m) h (m) =
m=6
3 8 − 1− 3 + 4 + 0 + 0 = 0
10
When n = 9 ; y 3 (9) = ∑ x (m) h (m) =
3 9 0 + 1+ 6 + 0 + 0 = 7
m=6
10
When n = 10 ; y 3 (10) = ∑ x (m) h
m=6
3 10 (m) = 0 + 0 − 2 + 0 + 0 = −2
∴ y 3 (n) = l 2, 1, 0, 7, − 2 q
A n= 6
Solution for Exercise Problems E2. 27
Overall Output
n 0 1 2 3 4 5 6 7 8 9 10
y1(n) –2 2 0 9 –1
y2(n) –2 2 0 9 –1
y3(n) 2 1 0 7 –2
y(n) * * 0 9 –1 0 9 –1 0 7 –2
The 6 samples of crosscorrelation sequence are computed using table method as shown below.
n –2 –1 0 1 2 3 4 5
x(n) –1 2 3 –4
y(n) 2 –1 –3
y(n–(–1))= y–1(n) 2 –1 –3
y(n–0)= y0(n) 2 –1 –3
y(n–1)= y1(n) 2 –1 –3
y(n–2)= y2(n) 2 –1 –3
y(n–3)= y3(n) 2 –1 –3
y(n–4)= y4(n) 2 –1 –3
3
When m = −1 ; rxy ( −1) = ∑ x(n) y
n= −2
−1(n) = 0+0+3+0+0+0 = 3
3
When m = 0 ; rxy (0) = ∑ x(n) y (n) =
n= −1
0 0 + 1 − 6 + 0 + 0 = −5
3
When m = 1 ; rxy (1) = ∑ x(n) y (n) =
n=0
1 − 2 − 2 − 9 + 0 = −13
3
When m = 2 ; rxy (2) = ∑ x(n) y (n) =
n=0
2 0 + 4 − 3 + 12 = 13
E2. 28 DSP, Chapter 2 -Discrete Time Signals and Systems
4
When m = 3 ; rxy (3) = ∑ x(n) y (n) =
n=0
3 0 + 0 + 6 + 4 + 0 = 10
5
When m = 4 ; rxy (4) = ∑ x(n) y
n=0
4 (n) = 0 + 0 + 0 − 8 + 0 + 0 = −8
∴ rxy (m) =
RS 3, −5, − 13, 13, 10, − 8
UV
T A W
E2.18. Determine the autocorrelation sequence for x(n) = {1, 4, 3, –5, 2}
-
Solution
The autocorrelation sequence rxx(m) is given by,
+∞
rxx (m) = ∑ x(n) x(n − m)
n= −∞
n –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7
x(n) 1 4 3 –5 2
x–4(n) 1 4 3 –5 2
x–3(n) 1 4 3 –5 2
x–2(n) 1 4 3 –5 2
x–1(n) 1 4 3 –5 2
x0(n) 1 4 3 –5 2
x1(n) 1 4 3 –5 2
x2(n) 1 4 3 –5 2
x3(n) 1 4 3 –5 2
x4(n) 1 4 3 –5 2
3
When m = −4 ; rxx ( −4) = ∑ x(n) x
n= −5
−4 (n) = 0+0+0+0+2+0+0+0+0 = 2
3
When m = −3 ; rxx ( −3) = ∑ x(n) x
n= −4
−3 (n) = 0+0+0− 5+8+0+0+0 = 3
3
When m = −2 ; rxx ( −2) = ∑ x(n) x
n= −3
−2 (n) = 0 + 0 + 3 − 20 + 6 + 0 + 0 = −11
3
When m = −1 ; rxx ( −1) = ∑ x(n) x
n= −2
−1(n) = 0 + 4 + 12 − 15 − 10 + 0 = −9
3
When m = 0 ; rxx (0) = ∑ x(n) x (n) =
n= −1
0 1+ 16 + 9 + 25 + 4 = 55
4
When m = 1 ; rxx (1) = ∑ x(n) x (n) =
n= −1
1 0 + 4 + 12 − 15 − 10 + 0 = −9
5
When m = 2 ; rxx (2) = ∑ x(n) x (n) =
n= −1
2 0 + 0 + 3 − 20 + 6 + 0 + 0 = −11
Solution for Exercise Problems E2. 29
6
When m = 3 ; rxx (3) = ∑ x(n) x (n) = 3 0+0+0− 5 + 8+0+0+0= 3
n= −1
7
When m = 4 ; rxx (3) = ∑ x(n) x (n) = 4 0+0+0+0+2+ 0+0+0+0= 2
n= −1
Solution n
Given that, y(n) = ∑ c x(p − 2)
p=0
p
; for n ≥ 0
0
When n = 0 ; y(0) = ∑ c x(p − 2) = c x(−2) = x(−2)
p=0
p 0
⇒ x(−2) = y(0)
1
When n = 1 ; y(1) = ∑ c x(p − 2) = c x(−2) + c x(−1)
p=0
p 0 1
= x( −2) + c x( −1)
1
= y(0) + c x(−1) ⇒ x( −1) = y(1) − y(0)
c
2
When n = 2 ; y(2) = ∑ c x(p − 2) = c x(−2) + c x(−1) + c x(0)
p=0
p 0 1 2
E2.20. A discrete time system is excited by an input x(n), and the response is, y(n) = 4, 3, 6, 7.5, 3, 30, − 8 . If the l q
A
l q
impulse response of the system is h(n) = 2, 4, − 2 , then what will be the input to the system?
A
Solution
Let, N1 = Number of samples in x(n)
Now, N3 = N1 + N2 – 1 Þ N1 = N3 – N2 + 1 = 7 – 3 + 1 = 5 samples
1 LM n −1 O
x(n) = y(n) −
MN ∑ x(m) h(n − m)PP
h(0) m=0 Q
y(0) 4
When n = 0 ; x(0) = = =2
h(0) 2
LM
1 OP 1 1
When n = 1 ; x(1) =
MN ∑
h(0)
y(1) −
m= 0
x(m) h(1 − m) =
PQ h(0)
y(1) − x(0) h(1) =
2
3 − (2 × 4) = −2.5
1 L O 1 1
1
When n = 2 ; x(2) = M
h(0) MN
y(2) − ∑ x(m) h(2 − m)P =
PQ h(0) y(2) − x(0) h(2) − x(1) h(1) =
2
b g
6 − (2 × −2) − −2.5 × 4 = 10
m=0
E2. 30 DSP, Chapter 2 -Discrete Time Signals and Systems
1 LM 2 O= 1
When n = 3 ; x(3) = y(3) −
MN ∑ x(m) h(3 − m)PP y(3) − x(0) h(3) − x(1) h(2) − x(2) h(1)
h(0) m=0 Q h(0)
1
=
2
b g
7.5 − (2 × 0) − −2.5 × −2 − (10 × 4) = −18 . 75
1 LM 2 O= 1
When n = 4 ; x(4) = y(4) −
MN ∑ x(m) h(4 − m)PP y(4) − x(0) h(4) − x(1) h(3) − x(2) h(2) − x(3) h(1)
h(0) m=0 Q h(0)
1
=
2
b g
3 − (2 × 0) − −2.5 × 0 − (10 × −2) − (−18.75 × 4) = 49
l q l
∴ x(n) = x(0), x(1), x(2), x(3), x(4) = 2, − 2.5, 10, − 18.75, 49 q
A
E2.21. Perform circular correlation of the sequences, x(n) = −1, 1, 2, 6 l q and l q
y(n) = 4, − 2, − 1, 2
Solution
Let rxy (m) be the sequence obtained by circular correlation of x(n) and y(n).
q 0 1 2 3 4 5 6 7
x(n) –1 1 2 6
y(n) 4 –2 –1 2
y0(n) 4 –2 –1 2 4 –2 –1 2
y1(n) 2 4 –2 –1 2 4 –2 –1
y2(n) –1 2 4 –2 –1 2 4 –2
y3(n) –2 –1 2 4 –2 –1 2 4
3
When m = 0 ; rxy (0) = ∑ x(n) y (n) = −4 − 2 − 2 + 12 = 4
0
n= 0
3
When m = 1 ; rxy (1) = ∑ x(n) y (n) = −2 + 4 − 4 − 6 = −8
1
n=0
3
When m = 2 ; rxy (2) = ∑ x(n) y (n) = 1+ 2 + 8 − 12 = −1
2
n= 0
3
When m = 3 ; rxy (3) = ∑ x(n) y (n) = 2 − 1+ 4 + 24 = 29
3
n= 0
l
∴ rxy (m) = 4, − 8, − 1, 29 q
Chapter 3
Z-Transform
3.1 Introduction
Transform techniques are an important tool in the analysis of signals and systems. The Laplace
transforms are popularly used for analysis of continuous time signals and systems. Similarly Z-transform
plays an important role in analysis and representation of discrete time signals and systems. The Z-transform
provides a method for the analysis of discrete time signals and systems in the frequency domain which is
generally more efficient than its time domain analysis.
The Z-transform of x(n) will convert the time domain signal x(n) to z-domain signal X(z), where the
signal becomes a function of complex variable z.
jv z -plan e
The complex variable z is defined as, z1
r1
z = u + jv = r ejw ω1
−u u
where, u = Real part of z ; v = Imaginary part of z
r = u 2 + v 2 = Magnitude of z −jv
F ig 3 .1 : z-p la ne .
ω = tan −1 v = Phase or Argument of z
u
The u and v takes value from –¥ to +¥ . A two dimensional complex plane with values of u on
horizontal axis and values of v on vertical axis as shown in fig 3.1 is called z-plane. A circle with radius r1 in
z-plane represents all values of z1 having same magnitude r1 with variable phase w 1, where w 1 = 0 to 2p.
History of Z-Transform
A transform of a sampled signal or sequence was defined in 1947 by W. Hurewicz as,
∞
z [ f ( kT)] = ∑ f ( kT) z− k
k =0
Chapter 3 - Z - Transform 3. 2
which was later denoted in 1952 as Z-transform by a sampled-data control group at Columbia University led
by professor John R. Raggazini and including L.A. Zadeh, E.I. Jury, R.E. Kalman, J.E. Bertram, B. Friedland
and G.F. Franklin, (Source : www.ling.upenn.edu).
Definition of Z-Transform
Let, x(n) = Discrete time signal
X(z) = Z-transform of x(n)
The Z-transform of a discrete time signal, x(n) is defined as,
∞
X( z) = ∑ x( n ) z − n ; where, z is a complex variable. .....(3.1)
n = −∞
n = −∞
Since the time index n is defined for both positive and negative values, the discrete time signal x(n) in
equation (3.1) is considered to be two-sided and the transform is called two-sided Z-transform. If the signal
x(n) is one-sided signal, [i.e., x(n) is defined only for positive value of n] then the Z-transform is called
one-sided Z-transform.
The one-sided Z-transform of x(n) is defined as,
+∞
.....(3.2)
X( z) = Z{x( n)} = ∑ x( n) z − n
n= 0
The computation of X(z) involves summation of infinite terms which are functions of z. Hence it is
possible that the infinite series may not converge to finite value for certain values of z. Therefore for every
X(z) there will be a set of values of z for which X(z) can be computed. Such a set of values will lie in a particular
region of z-plane and this region is called Region Of Convergence (ROC) of X(z).
Inverse Z-Transform
Let, X(z) be Z-transform of x(n). Now the signal x(n) can be uniquely determined from X(z) and its
region of convergence (ROC).
The inverse Z-transform of X(z) is defined as,
x( n) =
1
2 πj z
c
X(z) z n −1 dz .....(3.3)
We also refer x(n) and X(z) as a Z-transform pair and this relation is expressed as,
Z
x(n) ¬ ® X(z)
Z-1
3. 3 Digital Signal Processing
Proof :
∴
zc
X(z) zn −1 dz =
zc k = −∞
+∞
∑ x(k) z n −1− k
dz
Interchanging the order of
=
+∞
∑
k = −∞
x(k)
z c
zn −1− kdz summation and integration.
Multiply and divide by 2pj.
∑
k = −∞
x(k)
1
2πj z
c
z n −1− k
dz .....(3.4)
1
2πj c z
zn −1− k dz = 1 ; k = n
= 0 ; k ≠ n
On applying Cauchy integral theorem the equation (3.4) reduces to,
z c
X(z) zn −1 dz = 2πj x(n)
+∞
∑ x(k)
k = −∞ n=k
= x(n)
∴ x(n) =
1
2πj zc
X(z) zn −1 dz
Geometric Series
The Z-transform of a discrete time signal involves convergence of geometric series. Hence the following
two geometric series sum formula will be useful in evaluating Z-transform.
1. Infinite geometric series sum formula.
If C is a complex constant and 0 < |C|< 1, then,
∞
1
∑= Cn = 1− C
.....(3.5)
n 0
N −1 N
1 − CN CN − 1 C N +1 − 1
When C ≠ 1, ∑ Cn =
1− C
=
C −1
or ∑ Cn =
C −1
.....(3.6)
n= 0 n= 0
N−1 N
When C = 1, ∑= Cn = N or ∑= Cn = N +1 .....(3.7)
n 0 n 0
Note : The infinite geometric series sum formula requires that the magnitude of C be strictly less than unity,
but the finite geometric series sum formula is valid for any value of C.
Chapter 3 - Z - Transform 3. 4
= x( − (N − 1)) z(N −1) + ....... + x( −2)z2 + x( −1) z + x(0) F ig 3.3 : R O C o f fin ite
d u ra tio n a ntica u sa l sig n a l.
In the above summation, when z = ¥ , all the terms except the last term become infinite. Hence the X(z)
exists for all values of z, except, z = ¥ . Therefore, the ROC of X(z) is entire z-plane, except z = ¥ .
Case iii : Finite duration, two-sided (noncausal) signal
Let, x(n) be a finite duration signal with N-samples, defined in the range –M £ n £ + M,
N −1
where, M =
2
l q
∴ x(n) = x( − M),......., x( −2), x( −1), x(0), x(1), x(2), ........x( M)
3. 5 Digital Signal Processing
Now, the Z-transform of x(n) is,
+M
X( z) = ∑− x(n) z− n
n= M
= x( − M ) z M + ....... + x( −2) z2 + x( −1) z + x(0) + x(1)z−1 + x(2)z −2 +......+ x( M) z − M
x(1) x(2) x( M)
= x( − M ) z M + ........ + x( −2) z2 + x( −1) z + x(0) + + + ...... +
z z2 zM
jv
z -p la n e
In the above summation, when z = 0, the terms with negative
R O C is e ntire u
power of z attain infinity and when z = ¥ , the terms with positive
z -p la n e ex c ep t
power of z attain infinity. Hence X(z) converges for all values of z, z = 0 an d z = ∞
except z = 0 and z = ¥ . Therefore, the ROC is entire z-plane, except F ig 3.4 : R O C o f fin ite
z = 0 and z = ¥ . d u ra tio n tw o -sid ed sig n a l.
Here the condition to be satisfied for the convergence of X(z) is, jv z -p lan e
0 < |r 2
–1
z| < 1 r2
| z|
\ |r2–1 z| < 1 Þ < 1 ⇒ |z| < |r2 |
| r2 | R O C of u
n
The term |r2| represents a circle of radius r2 in z-plane as shown in fig 3.6. x (n) = r 2 ; n ≤ 0
From the above analysis we can say that X(z) converges for all points internal to
the circle of radius r2 in z-plane. Therefore, the ROC of X(z) is interior of the F ig 3.6 : R O C o f infinite
circle of radius r2 as shown in fig 3.6. d u ratio n left-sid ed sign a l.
Sequence ROC
Finite, right-sided (causal) Entire z-plane except z = 0
Finite, left-sided (anticausal) Entire z-plane except z = ¥
Finite, two-sided (noncausal) Entire z-plane except z = 0 and z = ¥
Infinite, right-sided (causal) Exterior of circle of radius r1, where |z| > r1
Infinite, left-sided (anticausal) Interior of circle of radius r2, where |z| < r2
Infinite, two-sided (noncausal) The area between two circles of radius r2 and r1
where, r2 > r1, and r1< |z| < r2, (i.e., |z| >r1, and, |z| < r2)
3. 7 Digital Signal Processing
Table 3.2 : Characteristic Families of Signals and Corresponding ROC
0
n
x (n ) E n tire z -p la n e
L e ft-sid ed jv
(o r a n tic a usa l) e xc e pt z = ∞
z -p la n e
0
n
x (n ) E n tire z -p la n e
Tw o -side d
(o r n o nc a u sa l) jv e xc e pt z = 0
z -p la n e a nd z = ∞
0
n
Infinite Duration Signals
x (n ) jv
r1 z -p la n e
R ig h t-side d
(o r c au sal)
u
|z|> r 1
0
n
jv z-p la n e
x (n )
L e ft-sid ed
(o r a n tic a usa l)
u
r2
0
n
|z| < r 2
jv z -p la n e
x (n )
Tw o -side d r 1 < |z | < r 2
(o r n o nc a u sa l) r1
[|z | > r 1
a nd |z |< r 2 ]
r2
u
0
n
Chapter 3 - Z - Transform 3. 8
Example 3.1
Determine the Z-transform and their ROC of the following discrete time signals.
a) x(n) = {3, 4, 2, 7} b) x(n) = {6, 8, 9, 3} c) x(n) = {2, 4, 6, 8, 10}
- - -
Solution
a) Given that, x(n) = {3, 4, 2, 7}
-
i.e., x(0) = 3 ; x(1) = 4 ; x(2) = 2 ; x(3) = 7 ; and x(n) = 0 for n < 0 and for n > 3.
By the definition of Z-transform,
∞
Z {x(n)} = X(z) = ∑ x(n) z −n
n = −∞
The given sequence is a finite duration sequence defined in the range n = 0 to 3, hence the limits of
summation is changed to n = 0 to n = 3.
3 jv
∴ X ( z) = ∑
n = 0
x(n) z −n z -p la n e
The given sequence is a finite duration sequence defined in the range n = 3 to 0, hence the limits of
summation is changed to n = 3 to 0.
jv
0
z -p la n e
∴ X(z) = ∑
x(n) z
n = −3
−n
R O C is e ntire u
= x(−3) z3 + x( −2) z 2 + x(−1) z + x(0)
z -p la n e ex c e pt
= 6z3 + 8z2 + 9z + 3 z=∞
In X(z), when z = ¥ , except the last term all other terms become infinite. Hence X(z) will be finite for all
values of z, except z = ¥ . Therefore, the ROC is entire z-plane except z = ¥.
Example 3.2
Determine the Z-transform and their ROC of the following discrete time signals.
a) x(n) = u(n) b) x(n) = 0.3n u(n) c) x(n) = 0.8n u(n 1) d) x(n) = 0.3n u(n) + 0.8n u(n1)
Solution
a) Given that, x(n) = u(n)
The u(n) is a discrete unit step signal, which is defined as,
u(n) = 1 ; for n ³ 0 Infinite geometric series sum formula
= 0 ; for n < 0 ∞
1
By the definition of Z-transform,
∑
n = 0
Cn =
1− C
; if , 0 <|C|< 1
∞ ∞
Z{x(n)} = X(z) = ∑ x(n) z −n
= ∑ u(n) z −n
n = −∞ n = 0
∞ ∞
1 Using infinite geometric series sum formula.
= ∑ z −n = ∑ (z −1 n
) =
1 − z −1
n = 0 n = 0
1 z jv
= = 1 z -p la n e
1− 1 / z z − 1 |Z |=
.8
=0
u(n 1) = 0 ; for n ³ 0
|z |
=1 ; for n £ 1 u
ROC
\ x(n) = 0 ; for n ³ 0
n
= 0.8 ; for n £ 1
By the definition of Z-transform,
∞ −1
Z{x(n)} = X(z) = ∑ x(n) z −n = ∑ 0.8n z −n
n = −∞ n = −∞
∞ ∞ ∞
= ∑ 0.8 −n zn = ∑ (0.8 −1 z)n = ∑ (0.8 −1 z)n − 1 (0.81 z)0 = 1
n = 1 n = 1 n = 0
n n |z |
= Z{0.3 u(n)} + Z{0.8 u(−n − 1)} Using linearity property. =0 u
.8
z z
= − Using the results of (b) and (c). ROC
z − 0.3 z − 0.8
2 2
z(z − 0.8) − z(z − 0.3) z − 0.8z − z + 0.3z −0.5z
= = 2 = 2
(z − 0.3) (z − 0.8) z − 0.8z − 0.3z + 0.24 z − 1.1z + 0.24
+∞
X 2(z) = Z{x 2(n)} = ∑ x (n) z
n = −∞
2
−n
.....(3.9)
+∞ +∞
∴ Z{a1x1(n)+a2 x 2(n)} = ∑
n = −∞
a1x1(n)+a2 x 2 (n) z− n = ∑
n = −∞
a1x1(n) z− n +a2 x2 (n) z− n
+∞ +∞ +∞ +∞
= ∑
n = −∞
a1x1(n) z− n + ∑
n = −∞
a2 x2(n)z− n = a1 ∑
n = −∞
x1(n) z− n +a2 ∑ x (n)z
n = −∞
2
−n
2. Shifting property
Case i: Two-sided Z-transform
The shifting property of Z-transform states that, Z-transform of a shifted signal shifted by m-units of
time is obtained by multiplying zm to Z-transform of unshifted signal.
Let, Z{x(n)} = X(z)
Now, by shifting property,
Z{x(n–m)} = z–m X(z)
Z{x(n+m)} = zm X(z)
Proof :
By definition of Z-transform,
+∞
X(z) = Z{x(n)} = ∑ x(n) z −n
.....(3.10)
n = −∞
+∞
∴ Z{x(n − m)} = ∑ x(n − m) z −n
n = −∞
+∞
Let, n m = p, \ n = p + m
= ∑ x(p) z −(m + p)
when n ® -¥, p ® -¥
p = −∞
+∞ when n ® +¥, p ® +¥
= ∑ x(p) z −m
z− p
p = −∞
+∞ +∞
= z− m ∑ x(p) z
p = −∞
−p
= z− m ∑ x(n) z
n = −∞
−n
Let, p → n
+∞
= ∑ x(p) z
p = −∞
−p
zm
+∞ +∞
= zm ∑
p = −∞
x(p) z− p = zm ∑ x(n) z
n = −∞
−n
Let, p → n
Proof :
By definition of one-sided Z-transform,
+∞
X( z) = Z {x(n)} = ∑ x(n) z −n
.....(3.11)
n= 0
+∞
∴ Z {x(n − m)} = ∑
n=0
x(n − m) z− n
+∞ Multiply by zm and z m
= ∑
n=0
x(n − m) z− n zm z− m
+∞
= z− m ∑
n=0
x(n − m) z−( n − m)
Let, n m = p,
+∞ when n ® 0, p ® m
= z −m
∑ x(p) z −p
when n ® +¥, p ® +¥
p = −m
+∞ −1
= z− m ∑ x(p) z− p + z− m ∑ x(p) z− p
p= 0 p = −m
+∞ m
= z− m ∑ x(p) z− p + z− m ∑ x(− p) zp Let p = n, in first summation.
p= 0 p=1 Let p = i, in second summation.
+∞ m
= z− m ∑ x(n) z− n + z− m ∑ x(− i) zi Using equation (3.11).
n=0 i=1
m
= z− m X(z) + ∑ x( − i) z−(m − i) .....(3.12)
i=1
Note : In equation (3.12) if x(i) for i = 1 to m are zero then the shifting property of one-sided Z-transform
for delayed signal will be same as that for two-sided Z-transform.
3. 13 Digital Signal Processing
By definition of one-sided Z-transform,
+∞
Z {x(n+m)} = ∑
n=0
x(n + m) z− n
Multiply by zm and z m
+∞
= ∑
n=0
x(n + m) z− n zm z− m
+∞ Let, n + m = p,
= zm ∑ x(n + m) z −( n + m)
when n ® 0 , p ® m
n=0
+∞
when n ® + ¥ , p ® + ¥
= z m
∑ x(p) z− p
p=m
+∞ m −1
= zm ∑ x(p) z− p − zm ∑ x(p) z− p
p=0 p=0 Let p = n, in first summation.
+∞ m −1 Let p = i, in second summation.
= zm ∑ x(n) z− n − zm ∑ x(i) z− i
n=0 i=0 Using equation (3.11).
m −1
m
= z X(z) − ∑ x(i) z m−i
.....(3.13)
i=0
Note : In equation (3.13) if x(i) for i = 0 to m 1 are zero then the shifting property of one-sided Z-transform
for advanced signal will be same as that for two-sided Z-transform.
3. Multiplication by n (or Differentiation in z-domain)
If Z{x(n)} = X(z)
d
m
then Z nx(n) = − zr dz
X(z)
In general,
t FGH IJ X(z) m
d
o
Z n m x(n) = − z
Kdz
d F d F F d F IJ I ..... IJ I
= −z −z ..... G − z
dz GH dz GH H
G −z dzd
dz H
X(z)
K JK K JK
1444444424444444
3
m − times
Proof :
By definition of Z-transform,
+∞
X( z) = Z{x(n)} = ∑ x(n) z −n
.....(3.14)
n = −∞
+∞
∴ Z {n x(n)} = ∑
n = −∞
n x(n) z− n
+∞
= ∑
n = −∞
n x(n) z− n z z−1 Multiply by z and z 1
+∞
= −z ∑
n = −∞
x(n) − n z− n − 1
= −z ∑
+∞
x(n)
LM d z OP
−n d −n
z = − n z− n −1
n = −∞ N dz Q dz
+∞
d Interchanging summation
= −z
dz ∑ x(n) z
n = −∞
−n
and differentiation.
d
= −z X(z) Using equation (3.14).
dz
Chapter 3 - Z - Transform 3. 14
4. Multiplication by an exponential sequence, an (or Scaling in z-domain)
If Z{x(n)} = X(z)
o t
then Z a n x(n) = X(a −1z)
Proof :
By definition of Z-transform,
+∞
Z{x(n)} = ∑ x(n) z −n
.....(3.15)
n = −∞
+∞
∴ Z {a n x(n)} = ∑
n = −∞
a n x(n) z− n
+∞
= ∑ x(n) (a −1z)− n .....(3.16)
n = −∞
The equation (3.16) is similar
= X(a −1z) to the form of equation (3.15).
5. Time reversal
If Z{x(n)} = X(z)
then Z{x(–n)} = X(z–1)
Proof :
By definition of Z-transform,
+∞
Z{x(n)} = ∑ x(n) z −n
.....(3.17)
n = −∞
+∞
∴ Z {x( − n)} = ∑
n = −∞
x( − n) z− n
Let, p = n
+∞ when n ® -¥, p ® +¥
= ∑
p = −∞
x(p) zp when n ® +¥, p ® -¥
+∞
= ∑ x(p) (z−1 )− p .....(3.18)
p = −∞ The equation (3.18) is similar
= X(z−1) to the form of equation (3.17).
6. Conjugation
If Z{x(n)} = X(z)
then Z{x*(n)} = X*(z*)
Proof :
By definition of Z-transform,
+∞
X(z) = Z{x(n)} = ∑ x(n) z −n
.....(3.19)
n = −∞
+∞
∴ Z {x ∗(n)} = ∑
n = −∞
x∗(n) z− n
LM+∞ OP ∗
=
MN ∑
n = −∞
x(n) (z∗ )− n
PQ The equation (3.20) is similar
.....(3.20)
∗
= X(z∗ ) to the form of equation (3.19).
= X ∗( z∗ )
3. 15 Digital Signal Processing
7. Convolution theorem
If Z{x1(n)} = X1(z)
and Z{x2(n)} = X2(z)
then Z{x1(n) * x2(n)} = X1(z) X2(z)
+∞
where, x1 (n) ∗ x2 (n) = ∑
m = −∞
x1 (m) x2 (n − m) .....(3.21)
Proof :
By definition of Z-transform,
+∞
X1(z) = Z{x1(n)} = ∑ x (n) z
1
−n
.....(3.22)
n = −∞
+∞
X 2(z) = Z{x 2 (n)} = ∑ x (n) z 2
−n
.....(3.23)
n = −∞
+∞
∴ Z {x1(n) ∗ x 2 (n)} = ∑
n = −∞
x1(n) ∗ x 2 (n) z− n
8. Correlation property
If Z{x(n)} = X(z) and Z{y(n)} = Y(z)
then Z{rxy(m)} = X(z) Y(z –1)
+∞
where, rxy (m) = ∑ x(n) y(n − m)
n= −∞
.....(3.24)
Proof :
By definition of Z-transform,
+∞
X(z) = Z {x(n)} = ∑ x(n) z −n
.....(3.25)
n = −∞
+∞
Y(z) = Z{y(n)} = ∑ y(n) z −n
.....(3.26)
n = −∞
Chapter 3 - Z - Transform 3. 16
+∞
∴ Z { rxy (m)} = ∑
m = −∞
rxy (m) z− m
+∞ LM +∞ OP
= ∑
m = −∞ MN ∑
n = −∞
x(n) y(n − m) z− m
PQ Using equation (3.24).
+∞ +∞
= ∑ ∑
m = −∞ n = −∞
x(n) y(n − m) z− m z− n zn Multiply by zn and z n
+∞ +∞
= ∑ x( n) z− n ∑ y( n − m) z( n − m)
n = −∞ m = −∞ Let, n m = p \ m = n p
+∞ +∞
when m ® -¥, p ® +¥,
= ∑
n = −∞
x( n) z −n
∑
p = −∞
y(p) z p
when m ® +¥, p ® -¥.
LM +∞ OP LM +∞ OP
=
MN ∑
n = −∞
x( n) z− n
PQ MN ∑
p = −∞
y(p) (z−1)− p
PQ Using equations (3.25)
−1
= X(z) Y(z ) and (3.26).
x(0) = Lt X(z)
z→∞
Proof :
+∞
X( z) = ∑ x(n) z −n
n=0
Lt X( z) = Lt
LMx(0) +
x(1)
+
x(2)
+
x(3)
+ ......
OP
z→∞ z→∞ N z z2 z3 Q
= x(0) + 0 + 0 + 0 + ......
∴ x(0) = Lt X( z)
z→∞
3. 17 Digital Signal Processing
10. Final value theorem
Let x(n) be a one-sided signal defined in the range 0 £ n £ ¥.
Now, if Z {x(n)} = X(z),
then the final value of x(n) [i.e., x(¥ )] is given by,
x(∞) = Lt (1 − z −1 ) X(z) or x( ∞) = Lt
FG z − 1IJ X(z)
z→1 z→1 H zK
Proof :
By definition of one-sided Z-transfrom,
+∞
m r ∑ x(n) z
Z x(n) =
n=0
−n
.....(3.27)
+∞
m
∴ Z x(n − 1) − x(n) = r ∑ n=0
x(n − 1) − x(n) z− n
(LHS) (RHS)
m
LHS = Z x(n − 1) − x(n) r
m r m r
= Z x(n − 1) − Z x(n) Using linearity property.
−1
= z X( z) + x( −1) − X(z) Using shifting property and equation (3.27).
−1
= x( −1) − (1 − z ) X(z)
= Lt x(−1) − (1− z−1) X(z) Taking limit z → 1
z→1
+∞
RHS = ∑
n=0
x(n − 1) − x(n) z− n
+∞
= Lt
z→1 ∑
n=0
x(n − 1) − x(n) z− n Taking limit z ® 1
+∞
On applying limit z ® 1, the term zn
= ∑
n=0
x(n − 1) − x(n) becomes unity.
p Changing the summation index from
= Lt
p→∞ ∑
n=0
x(n − 1) − x(n) 0 to p and then taking limit p ® ¥.
m
Z x1 (n) x2 (n) = r 1
2 πj z
C
X (v) X
1 2
FH vz IK v −1
dv
x1(n) =
1
2πj z
C
X1( z) zn − 1 dz =
1
2πj z
C
X1( v) v n − 1 dv let, z = v .....(3.30)
+∞
X 2( z) = ∑ x ( n) z
2
−n
.....(3.31)
n = −∞
Using the definition of Z-transform, the Z {x1(n) x2(n)} can be written as,
+∞
m
Z x1( n) x 2( n) = r ∑ x (n) x (n) z
1 2
−n
n = −∞
L1 OP
=
+∞
∑ MM 2πj
n = −∞ N z
C
X1( v ) v n − 1 dv x 2( n) z− n
PQ Using equation (3.30).
=
1
2πj z
C
X1( v )
+∞
∑
n = −∞
x 2( n) z− n v n v −1 dv Interchanging the order of
summation and integration.
L OP
` =
1
2πj z
C
1
MN
+∞
n = −∞
F zI
X ( v ) M ∑ x ( n) G J
H vK 2
−n
PQ v
−1
dv
=
1
2πj z
C
X (v ) X FH z IK v dv
1
v 2
−1
Using equation (3.31).
∑
+∞
n = −∞
x1 (n) x∗2 (n) =
1
2πj z
C
FH IK
X1(z) X∗2 1∗ z−1 dz
z
3. 19 Digital Signal Processing
Proof :
x1(n) =
1
2πj z
C
X1( z) zn − 1 dz =
1
2πj z
C
X1( v) v n − 1 dv let, z = v .....(3.32)
Using the definition of Z - transform, the Z x1(n) x∗2( n) can be written as, { }
+∞
{
Z x1( n) x∗2( n) = } ∑ x1(n) x∗2(n) z− n
n = −∞
.....(3.34)
On substituting for x1(n) from equation (3.32) in equation (3.34) we can write,
LM 1 OP
+∞
∑ x (n) x (n) z
n = −∞
1
∗
2
−n
=
+∞
∑
n = −∞ MN 2πj z
C
X1( v ) v n − 1 dv x∗2( n) z− n
PQ
LM x (n) z v OP v dv
=
1
2πj z
C
X1( v)
MN ∑ n = −∞
+∞
PQ
∗
2
−n n −1
Interchanging the
order of summation
and integration.
L F zI O
=
1
2πj z
C
1
MN
+∞
X ( v ) M ∑ x ( n) G J P v dv
H v K PQ
n = −∞
∗
2
−n
−1
L Fz I O −n
∗
=
1
2πj z
C
1
MN
+∞
X ( v ) M ∑ x ( n) G J P v dv
H v K PQ
n = −∞
2
∗
∗
−1
=
1
2πj z
C
1
F I
X ( v ) X G z J v dv
Hv K
∗
2
∗
∗
−1
using equation (3.33).
∴
Z→1
lt
+∞
∑
n = −∞
x1( n) x∗2( n) z− n =
Z→1
lt
1
2πj z
C
X1( v ) X ∗2
FG z IJ v
Hv K
∗
∗
−1
dv
∑
n = −∞
+∞
x1( n) x∗2( n) =
1
2πj z
C
X1( v ) X∗2
FG 1 IJ v
Hv K
∗
−1
dv
∴
+∞
∑
n = −∞
x1( n) x∗2( n) =
1
2πj z C
X1( z) X∗2
FG 1 IJ z
Hz K
∗
−1
dz let v = z
Chapter 3 - Z - Transform 3. 20
Table 3.3 : Summary of Properties of Z-Transform
Note : X(z) = Z{x(n)} ; X1(z) = Z{x1(n)} ; X2(z) = Z{x2(n)} ; Y(z) = Z{y(n)}
Property Discrete time signal Z-transform
Linearity a1 x1(n) + a2 x2(n) a1 X1(z) + a2 X2(z)
m
m−1
Shifting x(n + m) z m X(z) − ∑ x( i ) z m − i
i= 0
(m ³ 0)
x(n); for all n x(n - m) z-m X(z)
x(n + m) z m X(z)
Multiplication by nm nm x(n) FG − z d IJ m
X(z)
(or differentiation in
z-domain)
H dz K
Scaling in z-domain
(or multiplication by an) an x(n) X(a-1 z)
+∞
Convolution x1 (n) ∗ x 2 (n) = ∑ x1 ( m) x 2 (n − m) X1(z) X2(z)
m = −∞
+∞
Corrrelation rxy ( m) = ∑ x( n) y(n − m) X(z) Y(z–1)
m = −∞
x( ∞) = Lt (1 − z −1 ) X(z)
z→1
( z − 1)
= Lt X(z)
Final value z→1 z
if X(z) is analytic for |z| > 1
Complex convolution
theorem
x1(n) x2(n) 1
2πj z
C
ej
X1 ( v) X2 z v −1 dv
v
Parseval’s relation
+∞
H dz K dz N dz Q dz N (z − 1) Q H (z − 1) 2
K 4
= −z G
F (z − 1) (z − 1 − 2z) IJ = −z FG −(z + 1) IJ = z(z + 1) u v du − u dv
d =
H (z − 1) K H (z − 1) K (z − 1) 4
v
3
v
3 2
d Lz +z O
3 2
F dI d L dO d L z(z + 1) O 2
∴ G −z J U(z) = −z M P
dz MN dz PQ dz MN (z − 1) PQ
−z U(z) = −z = −z
H dz K 3
dz N (z − 1) Q 3
= −z G
F (z − 1) (2z + 1) − (z + z)3 (z − 1) I = −z FG (z − 1) (z − 1) (2z + 1) − (z + z)3 IJ
3 2 2 2 2
H (z − 1) 6 JK GH (z − 1) JK 6
= −z
d2z + z − 2z − 1 − 3z − 3zi = −z d−z − 4z − 1i = zdz + 4z + 1i
2 2 2 2
4 4 4
bz − 1g bz − 1g bz − 1g
F dI zdz + 4z + 1i
3 2
n = 0 n = 0
H1 − z K z − 1−1
d F −z d T z I = −z d F −z × (z − 1) T − T z I
2 2 2
= −z
dz GH dz z − 1JK dz GH (z − 1) JK 2
d F z T I = −z × (z − 1) T − zT × 2(z − 1)
2 2 2 2
= −z
dz GH (z − 1) JK 2
(z − 1) 4
(z − 1) (z T 2 − T 2 − 2z T 2 ) −z T 2 − T 2 z T 2 (z + 1)
= −z × 4
= −z × =
(z − 1) (z − 1)3 (z − 1)3
b) Given that, x(t) = sinW
W 0t
The discrete time signal is generated by replacing t by nT, where T is the sampling time period.
\ x(n) = sin (W 0nT) = sin wn ; where w = W 0T
By the definition of one-sided Z-transform,
∞ ∞
e jθ − e − jθ
Z {x(n)} = X(z) = ∑ x(n) z −n = ∑ sin ωn × z −n sinθ =
n = 0 n = 0 2j
∞ ∞ ∞
e jωn − e − jωn −n 1 1
= ∑ 2j
z =
2j
∑ e jωn z −n −
2j
∑ e − jωn z −n
n = 0 n = 0 n = 0
∞
1 n 1 ∞ n
=
2j
∑ de jω
z −1 i −
2j n = 0
∑ d
e − jω z −1 i
n = 0
1 1 1 1
= −
2j 1 − jω
e z −1
2j 1 − e− jω z −1 Using infinite geometric
series sum formula.
1 z 1 z
= −
2j z − e jω 2j z − e− jω
z (z − e − jω ) − z (z − e jω ) z2 − z e− jω − z 2 + z e jω
= jω j
=
2j (z − e ) (z − e− ω ) 2j (z − z e − jω − z ejω + e jω e − jω )
2
z (e jω − e− jω ) / 2j e jθ − e− jθ
= 2 sin θ =
z − z (e jω + e − jω ) + 1 2j
z sin ω
= ; where ω = Ω 0 T e jθ + e − jθ
z 2 − 2z cos ω + 1 cos θ =
2
3. 23 Digital Signal Processing
c) Given that, x(t) = cosW
W 0t
The discrete time signal is generated by replacing t by nT, where T is the sampling time period.7
\ x(n) = cos(W 0nT) = cos wn ; where w = W 0T
By the definition of one-sided Z-transform,
∞ ∞
e jθ + e − jθ
Z {x(n)} = X(z) = ∑ x(n) z −n = ∑ cos ωn × z −n cos θ =
2
n =0 n =0
∞ ∞
e jωn + e − jωn −n 1 1 ∞ − jωn −n
= ∑ 2
z =
2
∑ e jωn z −n + ∑
2n = 0
e z
n = 0 n = 0
∞
1 1 ∞
=
2
∑ (e jω
z −1)n + ∑
2n = 0
(e− jω z −1)n
n = 0
1 1 1 1
= jω −1
+ Using infinite geometric
21 − e z 2 1 − e − jω z−1 series sum formula.
1 z 1 z
= +
2 z − e jω 2 z − e − jω
z (z − e− jω ) + z (z − e jω ) z 2 − z e − jω + z 2 − z e jω
= jω − jω
=
2 (z − e ) (z − e ) 2 (z − z e− jω − z e jω + e jω e − jω )
2
z (z − cos ω ) e jθ + e − jθ
= ; where ω = Ω0T cos θ =
z2 − 2z cos ω + 1 2
Example 3.5
Find the one-sided Z-transform of the discrete time signals generated by mathematically sampling the
following continuous time signals.
a) e a t cosW 0t b) e a t sinW 0t
Solution
a) Given that, x(t) = e a t cosΩ o t
The discrete time signal x(n) is generated by replacing t by nT, where T is the sampling time period.
\ x(n) = e a n T cos W 0nT = eanT cos wn ; where w = W 0T
By the definition of one-sided Z-transform we get,
∞ ∞
Fe jωn
+ e− jωn Iz
X(z) = Z {x(n)} = ∑
n=0
e − anT cos ωn z −n = ∑e
n=0
− anT
GH 2 JK −n
e jθ + e − jθ
∞ ∞ cos θ =
1 1
=
2 ∑
n=0
de − aT jω −1 n
e z i +
2 ∑ de
n=0
− aT
e − jω z −1 in 2
1 1 1 1 Using infinite
= + geometric series
2 1 − e − aT e jω z −1 2 1 − e− aT e− jω z −1
sum formula,
1 1 1 1 ∞
1
= +
2 1 − e jω / z eaT 2 1 − e− jω / z eaT ∑
n =0
Cn =
1 − C
=
1 LM z e aT
+
z eaT OP
aT jω
2 Nz e − e z e − e − jω
aT
Q
Chapter 3 - Z - Transform 3. 24
1 LM z e dz e − e i + z e dz e − e i OP
aT aT − jω aT aT jω
=
2 MN d z e − e i dz e − e i
aT PQ jω aT − jω
ze aT LM ze − e + ze − e aT OP − jω aT jω
=
2 MM dz e i − z e e − z e e + e e PP
aT 2 aT − jω aT jω jω − jω
N Q
ze aT LM 2z e − de + e i OP aT jω − jω
=
2 Mz e 2
− z e de + e i + 1P
2aT aT jω − jω
N Q
LM z e dz e − cos ωi OP
aT aT
e jθ + e − jθ
=
MN z e − 2z e cos ω + 1PQ ; where ω = Ω T
2 2aT aT 0 cosθ =
2
1 LM z e dz e − e i − z e dz e − e i OP
aT aT − jω aT aT jω
=
2j MN dz e − e i d z e − e i
aT PQ jω aT − jω
1
LM dz e i [z e − e − z e + e ] OP
aT aT − jω aT jω
=
2j MM dz e i − z e e − z e e + e e PP
aT 2 aT − jω aT jω jω − jω
N Q
LM z e de − e i / 2j
aT jω O
P
− jω
e jθ − e− jθ
=
MN z 2
e 2aT
− z e de + e i + 1P
aT
Q jω − jω sin θ =
2j
z eaT sin ω e jθ + e − jθ
= 2 2aT
; where ω = Ω 0 T cos θ =
z e − 2zeaT cos ω + 1 2
Example 3.6
Find the initial value, x(0) and final value, x(¥ ) of the following z-domain signals.
1 2 − 4z −1 1 − 3z −1
a) X(z) = b) c) X(z) =
1 − z −2 1 + 2z −1 − 3z −2 1 − 3.6z −1 + 1.8z −2
3. 25 Digital Signal Processing
Solution
1
a) Given that, X(z) =
1 − z −2
By initial value theorem of Z-transform we get,
1 1 1 1
x(0) = Lt X(z) = Lt = Lt = = =1
z→ ∞ z→ ∞ 1 − z −2 z → ∞ 1 − 1 1 −
1 1 − 0
2
z ∞
By final value theorem of Z-transform we get,
1 a2 b2 = (a + b) (a b)
x(∞) = Lt (1 − z −1) X(z) = Lt (1 − z −1)
z→ 1 z→ 1 1 − z −2
1 1 1 1
= Lt (1 − z −1) = Lt = =
z→ 1 (1 − z −1) (1 + z −1) z → 1 (1 + z −1) 1 + 1−1 2
2 − 4z −1
b) Given that, X(z) = −2
1 + 2z −1 − 3z
By initial value theorem of Z-transform we get,
4
2−
2 − 4z −1 z
x(0) = Lt X(z) = Lt = Lt
z→ ∞ z→ ∞ 1 + 2z −1 − 3z −2 z→ ∞ 2 3
1 + − 2
z z
4
2− The roots of quadratic
∞ 2− 0
= = = 2 z2 + 2z − 3 = 0 are,
2 3 1 + 0 + 0
1 + −
∞ ∞ −2 ± 22 − 4 × (−3) −2 ± 4
z= = = 1, − 3
By final value theorem of Z-transform we get, 2 2
2 − 4z −1
x(∞) = Lt (1 − z −1) X(z) = Lt (1 − z −1)
z→ 1 z→ 1 1 + 2z −1 − 3z −2
−2
2z (z − 1)(z − 2) 2(z − 1)(z − 2) 2(z − 2) 2(1 − 2) −2
= Lt = Lt = Lt = = = −0.5
z→ 1 z −2(z2 + 2z − 3) z → 1 (z − 1) (z + 3) z→ 1 z + 3 1 + 3 4
1 − 3 z −1
c) Given that, X(z) = −2
1 − 3.6z −1 + 1.8z
By initial value theorem of Z-transform we get,
3
1 − 3z −1 1−
x(0) = Lt X(z) = Lt = Lt z
z→ ∞ z → ∞ 1 − 3.6z −1 + 1.8z −2 z→ ∞ 3.6 1.8
1 − +
z z2
3
1− 1− 0
= ∞ = =1
3.6 1.8 1 − 0 + 0
1 − + The roots of quadratic z2 − 3.6z + 18
. = 0 are,
∞ ∞
By final value theorem of Z-transform we get, 3.6 ± 3.62 − 4 × 18
. 3.6 ± 2.4
z= = = 3, 0.6
2 2
x(∞) = Lt (1 − z −1) X(z)
z→ 1
1 − 3z −1 z −2(z − 1)(z − 3)
= Lt (1 − z −1) −1 −2
= Lt
z→ 1 1 − 3.6z + 1.8z z → 1 z (z 2 − 3.6z + 1.8)
− 2
(z − 1) (z − 3) z −1 1− 1 0
= Lt = Lt = = =0
z→ 1 (z − 3) (z − 0.6) z → 1 z − 0.6 1 − 0.6 0.4
Chapter 3 - Z - Transform 3. 26
Table 3.4 : Some Common Z-transform Pairs
X(z)
x(t) x(n) With positive With negative ROC
power of z power of z
d(n) 1 1 Entire z-plane
z 1
u(n) or 1 |z| > 1
z −1 1− z −1
z 1
an u(n) |z| > |a|
z−a 1− az −1
az az −1
n an u(n) ( z − a)2
|z| > |a|
(1 − az−1 ) 2
az (z + a) az −1 (1 + az −1 )
n2 an u(n) |z| > |a|
( z − a )3 (1 − az −1 ) 3
z 1
- an u(–n–1) |z| < |a|
z−a 1− az −1
az az −1
–nan u(–n–1) |z| < |a|
( z − a)2 (1 − az −1 ) 2
Tz Tz−1
t u(t) nT u(nT) |z| > 1
( z − 1) 2 (1 − z −1 ) 2
T2 z (z + 1) T2 z−1 (1 + z −1 )
t2 u(t) (nT)2 u(nT) |z| > 1
( z − 1) 3 (1 − z −1 ) 3
z 1
e- at u(t) e- anT u(nT) |z| > |e–aT|
z − e − aT 1− e − aT z −1
z T e − aT z −1 T e − aT
te- at u(t) nTe- anT u(nT) |z| > |e–aT|
( z − e − aT ) 2 (1 − e − aT z −1 ) 2
FG b
b0 1 + 1
z −1 +
b2 −2 b b
z + 3 z−3 + ..... + M z − M
IJ
X( z) =
H b 0 b0 b0 b0 K
F a
a G1 +
0
1
z −1 +
a 2 −2 a a
z + 3 z −3 + ..... + N z− N
IJ
H a 0 a0 a0 a0 K
F
z Gz −M M
+
b1 M −1
z
b b b
+ 2 z M − 2 + 3 z M − 3 + ..... M
IJ
= G
H b0 b0 b0 b0 K
F
z Gz −N N
+
a 1 N −1
z
a a a
+ 2 z N − 2 + 3 z N − 3 + ..... N
IJ Let, M = N
H a0 a0 a0 a0 K
(z − z1 ) (z − z2 ) (z − z3 ) ..... (z − z N ) .....(3.36)
= G
(z − p1 ) (z − p2 ) (z − p3 ) ..... (z − p N )
where, z1, z2, z3, .....zN are roots of numerator polynomial
p1,p2, p3, .....pN are roots of denominator polynomial
G is a scaling factor.
In equation (3.36) if the value of z is equal to one of the roots of the numerator polynomial, then the
function X(z) will become zero.
Therefore the roots of numerator polynomial z1, z2, z3, .....zN are called zeros of X(z). Hence the zeros are
defined as values z at which the function X(z) become zero.
In equation (3.36) if the value of z is equal to one of the roots of the denominator polynomial then the
funcion X(z) will become infinite. Therefore the roots of denominator polynomial p1, p2, p3, .....pN are called
poles of X(z). Hence the poles are defined as values of z at which the function X(z) become infinite.
Since the function X(z) attains infinite values at poles, the ROC of X(z) does not include poles.
In a realizable system, the number of zeros will be less than or equal to number of poles. Also for
every zero, we can associate one pole (the missing zeros are assumed to exist at infinity).
Let zi be the zero associated with the pole pi. If we evaluate |X(z)| for various values of z, then |X(z)| will
be zero for z = zi and infnite for z = pi. Hence the plot of |X(z)| in a three-dimensional plane will look like a pole
(or pillar-like structure) and so the point z = pi is called a pole.
Chapter 3 - Z - Transform 3. 28
3.4.1 Representation of Poles and Zeros in z-Plane
The complex variable, z is defined as,
z = u + jv
where, u = Real part of z
v = Imaginary part of z
Hence the z-plane is a complex plane, with u on real axis and v on imaginary axis (Refer fig 3.1 in section
3.1). In the z-plane, the zeros are marked by small circle " " and the poles are marked by letter "X".
For example consider a rational function of z shown below.
0.5 − 0.4 z −1 + 0.06 z −2
X( z) =
2 + 1.6 z −1 + 0.64 z −2
0.5 1 −
FG
0.4 −1
z +
0.06 −2
z
IJ
H
0.5 0.5 K 0.25 (1 − 0.8z −1 + 0.12 z −2 )
= =
FG
2 1 +
1.6 −1
z +
0.64 −2
z
IJ 1 + 0.8z −1 + 0.32 z −2
H 2 2 K
0.25 z −2 (z2 − 0.8z + 0.12) 0.25 (z − 0.2) (z − 0.6) .....(3.37)
= =
z −2 ( z2 + 0.8z + 0.32) (z + 0.4 − j0.4) (z + 0.4 + j0.4)
z1 = 0.6, z2 = 0.2 p1
j0.4
j0.2
The poles of X(z) are roots of denominator polynomial, z2 z1
r2
The convergence criteria for X(z) are,
r1
r1 r 2 r3
|z| > |r1| ; |z| > |r2| ; |z| > |r3| u
where, N(z) = z(z – r2) (z – r3) (z – r4) + z(z – r1) (z – r3) (z – r4)
+ z(z – r1) (z – r2) (z – r4) + z(z –r1) (z – r2) (z – r3)
The poles of X(z) are,
jv
p1 = r1 ; p2 = r2 ; p3 = r3 ; p4 = r4 z -p la n e
The convergence criteria for X(z) are,
|z| > |r1| ; |z| > |r2| ; |z| < |r3| ; |z| < |r4|
Since r1 < r2 < r3 < r4, the ROC is the region
inbetween the circles of radius r2 and r3 as shown in r1 r 2 r 3 r4 u
fig 3.11. Let rx be the magnitude of largest pole of causal
signal and let ry be the magnitude of smallest pole of
anticausal signal and let rx < ry. Now in terms of poles of R O C of x (n)
X(z) we can say that the ROC is the region in between F ig 3.11 : R O C o f x (n ) = r 1 u (n)+ r 2 u ( n )
two circles of radius rx and ry, where rx < ry. −r 3 u ( −n −1) −r 4 ( −n −1 ).
3.4.3 Properties of ROC
The various concepts of ROC that has been discussed in sections 3.2 and 3.4.2 are summarized as
properties of ROC and given below.
Property - 1 : The ROC of X(z) is a ring or disk in z-plane, with centre at origin.
Property - 2 : If x(n) is finite duration right-sided (causal) signal, then the ROC is entire z- plane except z = 0.
Property - 3 : If x(n) is finite duration left-sided (anticausal) signal, then the ROC is entire z-plane
except z = ¥.
Property - 4 : If x(n) is finite duration two-sided (noncausal) signal, then the ROC is entire z-plane
except z = 0 and z = ¥ .
Property - 5 : If x(n) is infinite duration right-sided (causal) signal, then the ROC is exterior of a circle of radius r1.
Property - 6 : If x(n) is infinite duration left-sided (anticausal) signal, then the ROC is interior of a
circle of radius r2.
Property - 7 : If x(n) is infinite duration two-sided (noncausal) signal, then the ROC is the region
in between two circles of radius r1 and r2.
Property - 8 : If X(z) is rational, [where X(z) is Z-transform of x(n)], then the ROC does not include
any poles of X(z).
Property - 9 : If X(z) is rational, [where X(z) is Z-transform of x(n)], and if x(n) is right-sided, then the
ROC is exterior of a circle whose radius corresponds to the pole with largest magnitude.
Property - 10 : If X(z) is rational, [where X(z) is Z-transform of x(n)], and if x(n) is left-sided, then the
ROC is interior of a circle whose radius corresponds to the pole with smallest magnitude.
Property - 11 : If X(z) is rational, [where X(z) is Z-transform of x(n)], and if x(n) is two-sided, then the
ROC is region in between two circles whose radius corresponds to the pole of causal part
with largest magnitude and the pole of anticausal part with smallest magnitude.
3. 31 Digital Signal Processing
x( n) =
1
2πj z
C
X(z) z n − 1dz .....(3.38)
Using partial fraction expansion technique the function X(z) zn – 1 can be expressed as shown below.
A1 A2 A3 AN .....(3.39)
X( z) z n − 1 = + + + ..... +
z − p1 z − p2 z − p3 z − pN
where, p1, p2, p3, ..... pN are poles of X(z) zn – 1 and A1, A2, A3, ..... AN are residues.
The residue A1 is obtained by multiplying the equation (3.39) by (z – p1) and letting z = p1.
Similarly other residues are evaluated.
∴ A1 = ( z − p1 ) X(z) z n −1 .....(3.40.1)
z = p1
A 2 = ( z − p2 ) X(z) z n −1 .....(3.40.2)
z = p2
A 3 = ( z − p3 ) X(z) z n −1 .....(3.40.3)
z = p3
M
M
A N = ( z − p N ) X(z) z n −1 .....(3.40.N)
z=p N
x ( n) =
1
2 πj z LMN
C
A1
z − p1
+
A2
z − p2
+
A3
z − p3
+ ..... +
AN
z − pN
OP dz
Q
LM OP
=
1
2 πj
A1
MN z
C
dz
z − p1
+ A2
z
C
dz
z − p2
+ A3
z
C
dz
z − p3
+ ..... + A N
z
C
dz
z − pN PQ
.....(3.41)
Chapter 3 - Z - Transform 3. 32
1
If , G(z) = , then by Cauchy' s integral theorem,
z − p0
zC
G(z) dz =
C
z 1
z − p0
dz = 2 πj ; if p0 is a point inside the contour C in z - plane .
=0 ; if p0 is a point outside the contour C in z - plane .
Using Cauchy's integral theorem, the equation (3.41) can be written as shown below.
1
x( n) = A1 2πj + A 2 2πj + A 3 2πj + ..... + A N 2 πj
2 πj
= A1 + A 2 + A 3 + ..... + A N .....(3.42)
= Sum of residues of X(z) z n − 1
On substituting for residues from equation (3.40.1) to (3.40.N) in equation(3.42), we get,
x( n) = (z − p1 ) X(z) z n −1 + (z − p2 ) X(z) z n −1
z = p1 z = p2
n −1
+ (z − p3 ) X(z) z + ..... + (z − p N ) X(z) z n −1
z = p3 z = pN
∑ LMN(z − p ) X(z) z OP
N
∴ x(n) = n −1 .....(3.43)
i=1
i
z = pi Q
where, N = Number or poles of X(z) zn – 1 lying inside the contour C.
Using equation (3.43), by considering only the poles lying inside the contour C, the inverse
Z-transform can be evaluated. For a stable system the contour C is the unit circle in z-plane.
N(z) .....(3.44)
X( z ) =
D ( z)
Let r1 be the magnitude of the largest pole and let the ROC be |z| > r1 (where r1 is radius of a circle in
z-plane), then each term of equation (3.47) gives rise to a causal sequence, and so the inverse Z-transform of
equation (3.47) will be as shown in equation (3.48).
x(n) = A1 p1n u(n) + A2 p2n u(n) + A3 p3n u(n) + ..... + AN pNn u(n) .....(3.48)
Let r2 be the magnitude of the smallest pole and let ROC be |z| < r2 (where r2 is radius of a circle in z-plane),
then each term of equation (3.47) give rise to an anticausal sequence, and so the inverse Z-transform of
equation (3.47) will be as shown in equation (3.49).
x(n) = –A1 p1n u(–n –1) – A2 p2n u(–n –1) – A3 p3n u(–n –1) – ..... – AN pNn u(–n –1) .....(3.49)
Sometimes the specified ROC will be in between two circles of radius rx and ry, where rx < ry.
[i.e., ROC is rx < |z| < ry]. Now in this case, the terms with magnitude of pole less than rx will give rise to causal
signal and the terms with magnitude of pole greater than ry will give rise to anticausal signal so that the
inverse Z-transform of X(z) will give a two-sided signal. [Refer section 3.4.2, case iii].
Evaluation of Residues
The coefficients of the denominator polynomial D(z) are assumed real and so the roots of the
denominator polynomial are real and/or complex conjugate pairs (i.e., complex roots will occur only in conjugate
pairs). Hence on factorizing the denominator polynomial we get the following cases. [The roots of the
denominator polynomial are poles of X(z)].
Case i : When roots (or poles) are real and distinct.
Case ii : When roots (or poles) have multiplicity.
Case iii : When roots (or poles) are complex conjugate.
Chapter 3 - Z - Transform 3. 34
Case i : When roots (or poles) are real and distinct
X(z)
In this case can be expressed as,
z
X( z) Q( z) Q( z)
= =
z D( z) ( z − p1 ) (z − p2 ) ...... ( z − p N )
A1 A2 AN
= + + ..... +
( z − p1 ) ( z − p2 ) (z − pN )
where, A1, A2 ...... AN are residues and p1, p2, ..... pN are poles.
X(z)
The residue A1 is evaluated by multiplying both sides of by (z–p1) and letting z = p1. Similarly
z
other residues are evaluated.
X(z)
∴ A1 = ( z − p1 )
z z = p1
X(z)
A 2 = ( z − p2 )
z z = p2
M
X(z)
A N = ( z − pN )
z z = pN
A xr =
1 dr LM(z − p ) q X(z) OP ; where, r = 0, 1, 2,....(q − 1)
r ! dz r N x
z Q z = px
X(z) X(z)
Let has one pair of complex conjugate pole. In this case can be expressed as,
z z
3. 35 Digital Signal Processing
X( z) Q(z) Q( z)
= =
z D(z) ( z − p1 ) (z − p 2 )......( z2 + az + b)......( z − p N )
A1 A2 Ax A*x AN
= + + ..... + + + ..... +
z − p1 z − p2 z − (x + jy) z − (x − jy) z − pN
The residues of real and nonrepeated roots are evaluated as explained in case i.
The residue Ax is evaluated as that of case i and the residue A*x is the conjugate of Ax.
N(z) .....(3.50.1)
Case i : X( z) = = c0 + c1 z−1 + c2 z−2 + c3 z −3 + .....
D(z)
N(z) .....(3.50.2)
Case ii : X( z) = = d 0 + d1 z1 + d 2 z2 + d 3 z3 + .....
D(z)
N(z)
Case iii : X( z) = = ..... + e −3 z3 + e −2 z2 + e−1 z + e0
D(z)
.....(3.50.3)
+ e1 z−1 + e2 z −2 + e3 z−3 + .....
The case-i power series of z is obtained when the ROC is exterior of a circle of radius r in z-plane
(i.e., ROC is |z| > r).
The case-ii power series of z is obtained when the ROC is interior of a circle of radius r in z-plane (i.e.,
ROC is |z| < r).
The case-iii power series of z is obtained when the ROC is in between two circles of radius r1 and r2 in
z-plane (i.e., ROC is r1 < |z| < r2).
By the definition of Z-transform, we get,
∞
X( z) = ∑ x( n ) z − n
n = −∞
On expanding the summation we get,
X( z) = ........ x( −3) z3 + x( −2) z2 + x( −1) z1 + x(0) z0
+ x(1) z −1 + x(2) z −2 + x( 3) z−3 + ......... .....(3.51)
On comparing the coefficients of z of equations (3.50) and (3.51), the samples of x(n) are determined.
[i.e., the coefficient of zi is the ith sample, x(i) of the signal x(n)].
Note : The different methods of evaluation of inverse Z-transform of a function X(z) will result in different
type of mathematical expressions. But the inverse Z-transform is unique for a specified ROC and so on
evaluating the expressions for each value of n, we may get a same signal.
Chapter 3 - Z - Transform 3. 36
Example 3.7
3 + 2z −1 + z −2
Determine the inverse Z-transform of the function, X(z) = by the following three methods
1 − 3z −1 + 2z −2
and prove that the inverse Z-transform is unique.
1. Residue Method
The roots of quadratic
2. Partial Fraction Expansion Method
z2 − 3z + 2 = 0 are,
3. Power Series Expansion Method
3 ± 32 − 4 × 2 3 ± 1
Solution z= = = 2, 1
2 2
Method-1 : Residue Method
3 + 2z −1 + z −2 z−2 (3z2 + 2z + 1) 3z2 + 2z + 1
Given that, X(z) = −1 −2
= −2 2 = 2 .
1 − 3z + 2z z (z − 3z + 2) z − 3z + 2
Let us divide the numerator polynomial by denominator polynomial and express X(z) as shown below.
3z 2 + 2z + 1 11z − 5
X(z) = =3+ 2 3
z 2 − 3z + 2 z − 3z + 2 z2 3z + 2 3z2 + 2z + 1
11z − 5 3z2 9z + 6
= 3+ () (+) ()
(z − 1) (z − 2)
11z 5
11z − 5
Let , X1(z) = 3 and X2 (z) = 2
; ∴ X(z) = X1(z) + X 2 (z)
z − 3z + 2
x(n) = Z −1{X(z)} = Z −1{X1(z)} + Z −1{X 2 (z)}
= Z −1{3} + Z −1{X 2 (z)}
= 3 δ(n) + ∑
N
LM(z − p ) X (z) z n − 1 OP Using residue theorem.
i =1 N i 2
z = pi Q
11z − 5 11z − 5
= 3 δ(n) + (z − 1) zn − 1 + (z − 2) zn − 1
(z − 1) (z − 2) z = 1 (z − 1) (z − 2) z =2
11 − 5 11 × 2 − 5 n − 1
= 3 δ(n) + (1)n −1 + 2
1− 2 2−1
∴ x(n) = 3 δ(n) − 6 u(n − 1) + 17(2)n − 1 u(n − 1) = 3 δ(n) + − 6 + 17(2)n − 1 u(n − 1)
When n = 0, x(0) = 3 0 + 0 =3
0
When n = 1, x(1) = 0 6 + 17 ´ 2 = 11
When n = 2, x(2) = 0 6 + 17 ´ 21 = 28
When n = 3, x(3) = 0 6 + 17 ´ 22 = 62
When n = 4, x(4) = 0 6 + 17 ´ 23 = 130
\ x(n) = {3, 11, 28, 62, 130, .....}
-
Method-2 : Partial Fraction Expansion Method
3 + 2z −1 + z −2 z −2 (3z2 + 2z + 1) 3z2 + 2z + 1
Given that, X(z) = −1 −2
= −2 2 = .
1 − 3z + 2z z (z − 3z + 2) (z − 1) (z − 2)
X(z) 3z2 + 2z + 1
∴ =
z z(z − 1) (z − 2)
3. 37 Digital Signal Processing
X(z) 3z2 + 2z + 1 A A2 A3
Let , = = 1+ +
z z(z − 1) (z − 2) z z − 1 z − 2
X(z) 3z 2 + 2z + 1 0 + 0 + 1
Now, A1 = z = z = = 0.5
z z=0 z(z − 1) (z − 2) z = 0 (0 − 1) 0 − 2 b g
X(z) 3z2 + 2z + 1 3 + 2 + 1
A 2 = (z − 1) = (z − 1) = = −6
z z=1 z(z − 1) (z − 2) z = 1 1 × (1 − 2)
X(z) 3z2 + 2z + 1 3 × 22 + 2 × 2 + 1
A3 = (z − 2) = (z − 2) = = 8.5
z z=2 z(z − 1) (z − 2) z = 2 2 × (2 − 1)
3 + 2z −1 + z −2
Given that, X(z) =
1 − 3z −1 + 2z −2
11z 5z2
1
3 + 2z −1 + z −2
∴ X(z) = = 3 + 11z −1 + 28z −2 + 62z −3 + 130z −4 + ..... .....(1)
1 − 3z −1 + 2z −2
Chapter 3 - Z - Transform 3. 38
Let, x(n) be inverse Z-transform of X(z).
Now, by definition of Z-transform,
+∞
X(z) = ∑ x(n) z −n
n = −∞
3z 2 + 2z + 1 z − 0.6 2z − 4
a) X(z) = b) X(z) = c) X(z) =
z 2 + 4z + 3 z2 + z + 2 (z − 1) (z + 2)2
Solution
3z 2 + 2z + 1
a) Given that, X(z) =
z 2 + 4z + 3
On dividing the numerator by denominator, the X(z) can be expressed as shown below.
−10z − 8 −10z − 8 10 − 8 2
A1 = (z + 1) = = = =1
(z + 1) (z + 3) z = −1 z + 3 z = −1 −1 + 3 2
−10z − 8 −10z − 8 −10 × ( −3) − 8
A2 = (z + 3) = = = −11
(z + 1) (z + 3) z = −3 z + 1 z = −3 −3 + 1
1 11 1 z 1 z Multiply and
∴ X(z) = 3 + − = 3 + − 11
z + 1 z + 3 z z − ( −1) z z − ( −3) divide by z.
z z
= 3 + z −1 − 11z −1
z − ( −1) z − ( −3) Z{δ(n)} = 1
On taking inverse Z-transform of X(z) we get, z
Z{an u(n)} =
z − a
x(n) = 3 δ(n) + ( −1)n−1 u(n − 1) − 11( −3)n−1 u(n − 1) z
If Z{an u(n)} =
z − a
= 3 δ(n) + ( −1)n−1 − 11( −3)n−1 u(n − 1) then by time shifting property,
z
Z{a(n − 1) u(n − 1)} = z −1
z − a
3. 39 Digital Signal Processing
When n = 0, x(0) = 3 + 0 + 0 = 3
When n = 1, x(1) = 0 + 1 11 = 10
When n = 2, x(2) = 0 1 + 33 = 32
When n = 3, x(3) = 0 + 1 99 = 98
When n = 4, x(4) = 0 1 + 297 = 296
\ x(n) = {3, 10, 32, 98, 296, .....}
-
Alternate Method
3z2 + 2z + 1
X(z) =
z2 + 4z + 3
X(z) 3z 2 + 2z + 1 3z2 + 2z + 1
∴ = 2
=
z z(z + 4z + 3) z(z + 1) (z + 3)
X(z)
By partial fraction expansion technique can be expressed as,
z
X(z) 3z2 + 2z + 1 A1 A2 A3
= = + +
z z(z + 1) (z + 3) z z + 1 z + 3
X(z) 3z 2 + 2z + 1 0 + 0 + 1 1
A1 = z = z = =
z z=0 z(z + 1) (z + 3) z = 0 (0 + 1)(0 + 3) 3
z − 0.6
A = (z + 0.5 − j1.323)
(z + 0.5 − j1.323) (z + 0.5 + j1.323) z = − 0.5 + j1.323
∴ b
A* = 0.5 + j0.416 g = b0.5 −
*
j0.416 g Multiply and
0.5 + j0.416 0.5 − j0.416 divide by z
∴ X(z) = +
z + 0.5 − j1.323 z + 0.5 + j1.323
1 z 1 z
= (0.5 + j0.416) + (0.5 − j0.416)
z z + 0.5 − j1.323 z z + 0.5 + j1.323
z z
= (0.5 + j0.416)z −1 + (0.5 − j0.416) z −1
z ( 0.5 + j1.323)
− − z ( 0.5 − j1.323)
− −
z
On taking inverse Z-transform of X(z) we get, If Z{an u(n)} =
z−a
then by time shifting property,
x(n) = (0.5 + j0.416) ( −0.5 + j1.323)(n −1) u(n − 1)
z
Z{a (n−1) u(n − 1)} = z −1
+ (0.5 − j0.416) ( −0.5 − j1.323)(n − 1) u(n − 1) z−a
Alternatively the above result can be expressed as shown below.
180 o = π rad
0.5 +j0.416 = 0.5 + j0.416 = 0.65 Ð39.7o = 0.65 Ð 0.22p
π
∴ 1o = rad
0.5 j0.416 = 0.5 j0.416 = 0.65 Ð-39.7o = 0.65 Ð -0.22p 180
0.5 + j1.323=1.414 Ð 110.7o = 1.414 Ð 0.61p
0.5 j1.323=1.414 Ð 110.7o = 1.414 Ð 0.61p
\ x(n) = [0.65 Ð 0.22p] [1.414 Ð 0.61p](n 1) u(n 1) + [0.65 Ð 0.22p] [1.414 Ð 0.61p](n 1) u(n 1)
= [0.65 Ð 0.22p] [1.414(n 1)Ð 0.61p (n 1)] u(n 1)
39.7
+ [0.65 Ð 0.22p] [1.414(n 1) Ð0.61p (n 1)] u(n 1) ∴ 39.7o = π = 0.22π rad
180
= 0.65 (1.414)(n 1) Ð(0.22p + 0.61pn 0.61p) u(n 1) 110.7
110.7o = π = 0.61π rad
+ 0.65 (1.414)(n 1) Ð(0.22p 0.61pn + 0.61p) u(n 1) 180
2z − 4
c) Given that, X(z) =
(z − 1) (z + 2) 2
By partial fraction expansion we get,
2z − 4 A1 A2 A3
X(z) = = + +
(z − 1) (z + 2)2 z−1 (z + 2)2 (z + 2)
2z − 4 2z − 4 2− 4 −2
A1 = (z − 1) = = = = −0.22
(z − 1) (z + 2)2 z = 1 (z + 2)2 z = 1 (1 + 2)2 9
2z − 4 2z − 4 2 × −2 − 4 −8
A2 = (z + 2)2 = = = = 2.67
(z − 1) (z + 2)2 z = −2 z−1 z = −2 −2 − 1 −3
A3 =
d LM(z + 2) 2 2z − 4 OP =
d LM 2z − 4 OP d
u v du − u dv
=
dz N (z − 1) (z + 2)2 Q dz N z−1 Q v v2
z = −2 z = −2
Multiply and
2(z − 1) − (2z − 4) 2( −2 − 1) − (2 × −2 − 4) 2 divide by z
= = = = 0.22
(z − 1)2 z = −2
( −2 − 1)2 9
−0.22 2.67 0.22 1 z 1 2.67z 1 z
∴ X(z) = + + = − 0.22 + + 0.22
z−1 (z + 2)2 z+2 z z−1 z (z + 2)2 z z+2
z 2.67 −1 −2z z
= − 0.22z−1 + z + 0.22z −1 Multiply and
z−1 −2 (z − ( −2))2 z − ( −2) divide by 2
z z az
Z {u(n)} = ; Z {an u(n)} = ; Z {nan u(n)} =
z−1 z−a (z − a )2
If Z{x(n)} = X(z) then by time shifting property Z{x(n 1)} = z1 X(z)
z z
∴ Z {u(n − 1)} = z −1 ; Z {a (n − 1) u(n − 1)} = z −1
z − 1 z − a
az
and Z{(n − 1) a (n − 1) u(n − 1)} = z −1
(z − a )2
On taking inverse Z-transform of X(z) using standard transform and shifting property we get,
x(n) = − 0.22 u(n − 1) − 1.335(n − 1)(−2)n−1u(n − 1) + 0.22(−2)n−1u(n − 1)
= −0.22 + [ −1335
. (n − 1) + 0.22] ( −2)n−1 u(n − 1)
Example 3.9
Determine the inverse Z-transform of the following function.
1 z2
a) X(z) = −1 −2 b) X(z) = 2
1 + 4.5 z + 3.5z z − z + 0.5
1 + z −1 1
c) X(z) = d) X(z) =
1 − z −1 + 0.5z −2 (1 + z −1) (1 − z −1)2
Solution
The roots of quadratic z2 + 4.5z + 3.5 = 0 are,
1
a) Given that, X(z) = −4.5 ± 4.52 − 4 × 3.5 −4.5 ± 2.5
1 + 4.5 z −1 + 3.5z −2 z= = = −1, − 3.5
2 2
1 1 z2 z2
X(z) = = = =
1 + 4.5z−1 + 3.5z−2 4.5 3.5 z2 + 4.5z + 3.5 (z + 1) (z + 3.5)
1 + +
z z2
X(z) z
∴ =
z (z + 1) (z + 3.5)
Chapter 3 - Z - Transform 3. 42
By partial fraction expansion, X(z)/z can be expressed as,
X(z) A1 A2
= +
z z+1 z + 3.5
X(z) z −1
A1 = (z + 1) = (z + 1) = = −0.4
z z =−1 (z + 1) (z + 3.5) z = −1 −1 + 3.5
X(z) z −3.5
A2 = (z + 3.5) = (z + 3.5) = = 1.4
z z = −3.5 (z + 1) (z + 3.5) z = − 3.5 −3.5 + 1
X(z) −0.4 1.4
∴ = +
z z+1 z + 3.5
z
−0.4z 1.4z −0.4z 1.4z Z{an u(n)} = ; ROC |z|>|a|
∴ X(z) = + = + z−a
z+1 z + 3.5 z − (−1) z − ( −3.5)
On taking inverse Z-transform of X(z), we get,
x(n) = 0.4(1)n u(n) +1.4(3.5)n u(n) = [-0.4(1)n+1.4(3.5)n] u(n)
z2
b) Given that, X(z) = 2
z − z + 0.5
z2 z2 The roots of quadratic
X(z) = 2 =
z − z + 0.5 (z − 0.5 − j0.5) (z − 0.5 + j0.5) z2 − z + 0.5 = 0 are,
X(z) z 1 ± 1 − 4 × 0.5
∴ = z=
z (z − 0.5 − j0.5) (z − 0.5 + j0.5) 2
By partial fraction expansion, we can write, = 0.5 ± j 0.5
X(z) A A*
= +
z z − 0.5 − j0.5 z − 0.5 + j0.5
X(z)
A = (z − 0.5 − j0.5)
z z= 0 . 5 + j 0. 5
z
= (z − 0.5 − j0.5)
(z − 0.5 − j0.5) (z − 0.5 + j0.5) z = 0. 5 + j 0 . 5
(z + 1)
= (z − 0.5 − j0.5)
(z − 0.5 − j0.5) (z − 0.5 + j0.5) z = 0. 5 + j 0 . 5
2
d) Given that, X(z) =
(1 + z −1) (1 − z −1) 2
2 2 2z3
X(z) = = =
(1 + z ) (1 − z−1)2
−1
z−1(z + 1) z−2(z − 1)2 (z + 1) (z − 1)2
X(z) 2z2
∴ =
z (z + 1) (z − 1)2
Chapter 3 - Z - Transform 3. 44
By partial fraction expansion, we can write,
X(z) A1 A2 A3
= + +
z z + 1 (z − 1)2 z − 1
X(z) 2z2 2z2 2( −1)2 2
A1 = (z + 1) = (z + 1) = = = = 0.5
z z = −1 (z + 1) (z − 1)2 z = −1
(z − 1)2 z = −1
(−1 − 1)2 4
2
X(z) 2z 2z2 2
A 2 = (z − 1) 2 = (z − 1) 2 = = =1
z z=1 (z + 1) (z − 1)2 z = 1
z + 1 z = 1
1 + 1
A3 =
d LM
(z − 1) 2
X(z) OP =
d LM
(z − 1) 2
2z2 OP d
u v du − u dv
=
dz N z Q z = 1
dz N (z + 1) (z − 1)2 Q z = 1
v v2
d L 2z O 2
(z + 1) 4z − 2z2 (1 + 1) × 4 − 2 6
= M P
dz N z + 1Q
=
(z + 1)2
=
(1 + 1)2
=
4
= 1.5
z = 1 z =1
X(z) 0.5 1 1. 5 z
∴ = + + Z {an u(n)} =
z z + 1 (z − 1)2 z − 1 z − a
z z z z
∴ X(z) = 0.5 + + 1.5 Z {n u(n)} =
z − (−1) (z − 1)2 z − 1 (z − 1)2
On taking inverse Z-transform of X(z) we get, z
Z {u(n)} =
x(n) = 0.5( −1)n u(n) + n u(n) + 1.5 u(n) z − 1
= [0.5( −1)n + n + 1.5] u(n)
Example 3.10 The roots of quadratic
Determine the inverse Z-transform of X(z) =
1 z2 − 4.5z + 3.5 = 0 are,
−1 −2
1 − 4.5 z + 3.5 z 4.5 ± 4.52 − 4 × 3.5
(a) if ROC : |z| > 3.5 (b) if ROC : |z| < 1.0. z=
2
Solution 4.5 ± 2.5
= = 3.5, 1
1 1 z2 2
Given that, X(z) = = =
1 − 4.5z−1 + 3.5z−2 z −2(z2 − 4.5z + 3.5) (z − 3.5) (z − 1)
The poles of X(z) are, z = 3.5 and z = 1.0.
a) When ROC is |z| > 3.5
In this case, the ROC is exterior of circle whose radius corresponds to largest pole. Hence x(n) will be a
causal signal. ( Refer section 3.4.2).
Let us express X(z) as a power series expansion in negative powers of z, by dividing the numerator of
X(z) by its denominator as shown below.
1+ 4.5 z −1 + 16.75 z −2 + 59.625 z −3 + 209.6875 z −4 +.........
1 − 4.5 z−1 + 3.5 z −2 1
1 − 4.5 z−1 + 3.5 z−2
( − ) (+) (−)
−1
4.5 z − 3.5 z−2
−1
4.5 z − 20.25 z−2 + 15.75 z −3
(−) (+) (−)
−2
16.75 z − 15.75 z−3
−2
16.75 z − 75.375 z −3 + 58.625 z −4
(−) (+) (−)
−3
59.625 z − 58.625 z −4
59.625 z −3 − 268.3125 z −4 + 208.6875 z −5
(−) (+) (−)
n = 0
On expanding the summation we get,
X(z) = x(0) z0 + x(1) z −1 + x(2) z−2 + x(3) z−3 + x(4) z −4 + ........ .....(2)
On comparing the two power series of X(z) [equations (1) and (2)], we get,
x(0) = 1 ; x(1) = 4.5 ; x(2) = 16.75; x(3) = 59.625; x(4) = 209.6875 ; .......
x(n) = l1, 4.5, 16.75, 59.625, 209.6875,....q
A
b) When ROC is |z| < 1.0
In this case, the ROC is interior of circle whose radius corresponds to smallest pole. Hence x(n) will be
an anticausal signal. (Refer section 3.4.2).
Let us express X(z) as a power series expansion in positive powers of z. Therefore, rewrite the denominator
polynomial of X(z) in the reverse order and then the numerator, is divided by the denominator as shown below.
0.286z2 + 0.368z3 + 0.391z4 + 0.398z5 + 1.4 z6 + .....
−2 −1
3.5 z − 4.5 z + 1 1
1 − 1.287z + 0.286z2
(−) (+) (− )
1.287z − 0.286z2
1.287z − 1.656z2 + 0.368z3
(−) (+) (−)
2
1.37z − 0.368z3
2
1.37z − 1.76z3 + 0.391z4
(−) (+) (−)
1.392z3 − 0.391z4
1.392z3 − 1791
. z4 + 0.398z5
(−) (+) (−)
1.4z4 − 0.398z5
M
1 1
∴ X(z) = =
1 − 4.5 z −1 + 3.5 z−2 3.5 z −2 − 4.5 z −1 + 1
= 0.286z2 + 0.368z3 + 0.391z4 + 0.398z5 + 1.4z6 + ..... .....(3)
jv jv
z -p la n e z -p la n e
z 0 .6
.2 |z |
= z
o t
Z 0.2n u(n) =
z − 0.2
|z |
=0
o t
Z 0.6n u(n) =
z − 0.6
u u
with ROC :|z|> 0.2 with ROC :|z|> 0.6
ROC ROC
ROC
3. 47 Digital Signal Processing
b) ROC is |z| < 0.2
The specified ROC is interior of the circle whose radius corresponds to the smallest pole, hence x(n) will
be an anticausal (or left-sided) signal. (Refer section 3.4.2).
\ x(n) = 1.5((0.6)n u(n 1)) 0.5 [(0.2)n u(n 1)] z
Z {−an u(−n − 1)} = ; ROC |z|<|a|
= 1.5 (0.6)n u(n 1) + 0.5 (0.2)n u(n 1) z−a
jv jv
z -p la n e z -p la n e
z .6
o n
Z −0.2 u( −n − 1) =tz − 0.2 |z |
=0
.2 |z |= 0
o t
Z −0.6n u( −n − 1) =
z
u u z − 0.6
with ROC :|z|< 0.2 ROC
ROC with ROC :|z|< 0.6
ROC u
jv jv
z -p la n e z -p la n e
z 0.
2 0.
6
o t
Z 0.2n u(n) =
z − 0.2 |z |
= |z |
=
o t
Z −0.6n u( −n − 1) =
z
u u z − 0.6
with ROC :|z|> 0.2
ROC with ROC :|z|< 0.6
ROC
l q
∴ Z y(n) = Z −
|RS ∑ a y(n − m) + ∑ b x(n − m)|UV
N M
|T m=1
m
|W m=0
m
|R N
|U |R |U
= Z S− ∑ a y( n − m) V + Z S ∑ b x(n − m) V
M
T| m=1
N
W| T|
m
W| m=0
M
m
Let y(n) = 0 for n < 0, now if Z{y(n)} = Y(z), then Z{y(n–m)} = z–m Y(z) (Using shifting property).
Let x(n) = 0 for n < 0, now if Z{x(n)} = X(z), then Z{x(n–m)} = z–m X(z) (Using shifting property).
Using shifting property of Z-transform, the equation (3.53) is written as shown below.
N M
Y ( z) = − ∑ a m z− m Y(z) + ∑ b m z− m X(z)
m=1 m=0
N M
Y( z) + ∑= a m z− m Y(z) = ∑= bm z− m X(z)
m 1 m 0
L
Y( z) M1 + ∑ a
N
z− m
OP = b M
z− m X(z)
MN m=1
m
PQ ∑ m=0
m
Y(z)
∑ b m z− m
m=0
∴ = N
X(z)
1 + ∑ a m z− m
m=1
l q
∴ Impulse reponse, h(n) = Z −1 H ( z) = Z −1
RS Y(z) UV Using equation (3.56).
T X(z) W
3.6.3 Response of LTI Discrete Time System Using Z-Transform
In general, the input-output relation of an LTI (Linear Time Invariant) discrete time system is represented
by the constant coefficient difference equation shown below, [equation (3.52)].
N M
bg
yn = − ∑ b
g ∑ b xbn − mg
am y n − m + m
m=1 m=0
N M .....(3.57)
( or ) ∑ a ybn − mg = ∑ b xbn − mg with a
m m o = 1
m= 0 m= 0
The solution of the above difference equation (equation (3.57)) is the (total) response y(n) of LTI
discrete time system, which consists of two parts. In signals and systems the two parts of the solution y(n)
are called zero-input response yzi(n) and zero-state response yzs(n).
\ Response, y(n) = yzi(n) + yzs(n) .....(3.58)
Zero-input Response (or Free Response or Natural Response) Using Z-Transform
The zero-input response yzi(n) is mainly due to initial output (or initial stored energy) in the system.
The zero-input response is obtained from system equation [equation (3.57)] when input x(n) = 0.
Chapter 3 - Z - Transform 3. 50
∑ a m yzi bn − mg = 0 ; with a o = 1
m= 0
On taking Z-transform of the above equation with non-zero initial conditions for output we can form
an equation for Yzi(z). The zero-input response yzi(n) of a discrete time system is given by inverse
Z-transform of Yzi(z).
Zero-State Response (or Forced Response) Using Z-Transform
The zero-state response yzs(n) is the response of the system due to input signal and with zero initial
output. The zero-state response is obtained from the difference equation governing the system [equation(3.57)]
for specific input signal x(n) for n ³ 0 and with zero initial output.
On substituting y(n) = yzs(n) in equation (3.57) we get,
N M
∑ b g ∑ b xbn − mg ; with a
a m y zs n − m = m o = 1
m= 0 m= 0
On taking Z-transform of the above equation with zero initial conditions for output [i.e., yzs(n)] and
nonzero initial values for input [i.e., x(n)] we can form an equation for Yzs(z). The zero-state response yzs(n) of
a discrete time system is given by inverse Z-transform of Yzs(z).
Total Response
The total response y(n) is the response of the system due to input signal and initial output (or intial
stored energy). The total response is obtained from the difference equation governing the system
[equation(3.57)] for specific input signal x(n) for n ³ 0 and with nonzero initial conditions.
On taking Z-transform of equation (3.57) with nonzero initial conditions for both input and output,
and then substituting for X(z) we can form an equation for Y(z). The total response y(n) is given by inverse
Z-transform of Y(z). Alternatively, the total response y(n) is given by sum of zero-input response yzi(n) and
zero-state response yzs(n).
\ Total response, y(n) = yzi(n) + yzs(n)
l q
Input, x(n) = Z −1 X(z) = Z −1
RS Y(z) UV
T H(z) W
Procedure : 1. Take Z-transform of y(n) to get Y(z).
2. Take Z-transform of h(n) to get H(z).
3. Divide Y(z) by H(z) to get X(z), [i.e., X(z) = Y(z) / H(z)].
4. Take inverse Z-transform of X(z) to get x(n).
3.6.5 Stability in z-Domain
Location of Poles for Stability
Let, h(n) be the impulse response of an LTI discrete time system. Now, if h(n) satisfies the condition,
+∞
then the LTI discrete time system is stable. [Refer Chapter 2, equation (2.24)].
The stability condition of equation (3.60) can be transformed as a condition on location of poles of
transfer function of the LTI discrete time system in z-plane.
Let, h(n) = an u(n)
+∞ +∞ ∞
Now , ∑−∞ h(n) = ∑−∞ a n u(n) = ∑ an
n= n= n= 0
∞
1
If |a| is such that, 0 < |a| < 1, then ∑ an =
1− a
= constant, and so the system is stable.
n= 0
∞
If |a| > 1, then ∑ a n = ∞ and so the system is unstable.
n= 0
z
l q
Now, H(z) = Z h(n) = Z a n u(n) = o t z − a
Here H(z) has pole at z = a.
If |a| < 1, then the pole will lie inside the unit circle and if |a| > 1, then the pole will lie outside the unit
circle. Therefore we can say that, for a stable discrete time system the poles should lie inside the unit circle.
The various types of impulse response of LTI discrete time system and their transfer functions and the
locations of poles are summarized in table 3.5.
Chapter 3 - Z - Transform 3. 52
Table 3.5 : Impulse Response and Location of Poles
Impulse response Transfer function Location of poles in
h(n) H(z) z-plane and ROC
n
h (n ) = a u (n) ; 0 < a < 1 jv
U n it c r z-
h (n )
z
H ( z) =
z − a a u
ROC is | z| > a
pole at z = a
+∞
n
∑| h ( n )| < ∞; S ta ble sy ste m S inc e 0 < a < 1, th e p o le z = a , lie s insid e th e
n = 0 u nit c irc le . T he R O C c o ntains th e un it c irc le .
n
h (n ) = ( −a ) u (n ) ; 0 < |−a | < 1
h (n )
jv
U n it circ le z -p la ne
z
H ( z) = −a u
z + a
n ROC is | z| > |− a| ROC
pole at z = − a
S inc e 0 < | −a | < 1 , th e po le a t z = −a , lie s
in sid e th e u nit c irc le . T he R O C c o ntains
+∞ th e u nit c irc le .
n U n it jv
h (n ) = a u (n) ; a > 1 z -p la ne
c irc le
h (n )
z
H ( z) =
z − a a u
ROC is | z| > a
pole at z = a ROC
+∞
n S inc e a > 1 , the p o le a t z = a, lies ou ts id e th e
∑| h (n)| = ∞ ; U n s tab le sy ste m
n = 0
u nit c irc le . T he R O C d o es no t c o n ta in th e
u nit c irc le .
n
h (n ) = ( −a) u (n ) ; | −a | > 1
h (n ) jv
U n it
c irc le z -p la ne
z
H ( z) =
z + a
ROC is | z| > |−a| −a u
n pole at z = − a
ROC
S inc e | −a | > 1 , th e po le at z = −a, lies ou tsid e
th e u nit c ircle. T he R O C d o e s n ot c on ta in
+∞
th e u nit c ircle.
∑| h(n )| = ∞ ; U n sta b le sy ste m
n = 0
3. 53 Digital Signal Processing
Table 3.5 : Continued....
Impulse response Transfer function Location of poles in
h(n) H(z) z-plane and ROC
n
h (n ) = a ( −1 ) u (n) ; a > 0 (i.e ., a is p o sitiv e )
h (n )
jv
a az U n it circ le z -p la ne
H ( z) =
z + 1
ROC is | z| > 1
−1 u
n pole at z = − 1
ROC
−a
T h e p ole a t z = −1 lie s o n th e u nit c irc le.
+∞ T h e R O C d oe s n o t c o nta in th e u nit c irc le .
∑| h ( n )| = ∞; U nsta b le syste m
n = 0
jv
n
h (n ) = n a u (n ) ; 0 < a < 1 U n it circle z -p la ne
h (n )
az
H ( z) =
(z − a) 2
ROC is | z| > a a u
Two poles at z = a
ROC
∞
n
∑| h ( n )| < ∞; S tab le syste m S inc e 0 < a < 1, th e tw o p o le s at z = a lie
in sid e th e u nit c irc le . T h e R O C c on ta in s
n = 0
th e u nit c irc le .
n
h (n ) = n ( −a ) u (n) ; 0 < | −a| < 1
jv
h (n )
U n it circle z -p la ne
az
H ( z) =
(z + a) 2
−a u
ROC is | z| > a
n Two poles at z = − a ROC
n
h (n ) = n ( −a) u (n ) ; |−a | > 1
h (n )
U n it jv
z -p la ne
c irc le
az
H ( z) =
(z + a) 2
−a u
ROC is | z| > |− a|
n
Two poles at z = − a ROC
S inc e | −a | > 1 , the tw o po le s a t z = −a lie
o utsid e th e un it c irc le . T h e R O C d oe s
n ot c on ta in the u n it c irc le .
∞
∑| h ( n )| = ∞; U n stab le sy stem
n = 0
h (n ) = n u(n) U n it jv
h (n ) z -p la ne
c irc le
z
H ( z) =
(z − 1) 2
ROC is | z| > 1
1 u
Two poles at z = 1 ROC
∞ T h e tw o po le s a t z = 1 , lie o n th e un it c irc le .
n
∑| h ( n )| = ∞; U n stab le sy stem T h e R O C d oe s no t co n ta in th e u nit c irc le.
n = 0
n
h (n ) = n ( −1 ) u (n ) ; | −a| > 1
h (n )
U n it jv
c irc le z -p la ne
z
H ( z) =
(z + 1) 2
ROC is | z| > 1 −1 u
n Two poles at z = − 1 ROC
∑| h ( n )| = ∞; U nsta b le sy ste m
n = 0
3. 55 Digital Signal Processing
Table 3.5 : Continued....
Impulse response Transfer function Location of poles in
h(n) H(z) z-plane and ROC
n
h (n ) = r co s ω0 n u (n) ; 0 < r < 1 jv
h (n ) H ( z) U n it circ le z -p la ne
r
n
z(z − r cosω 0 )
= r
p1
cos ω0
n (z − r cosω 0 − jr sinω 0 )
(z − r cosω 0 + jr sinω 0 ) r u
p2
ROC is |z| > r.
n ROC
A pair of conjugate poles at
z = p1 = r cos w 0 + jr sin w 0 S inc e 0 < r < 1 , the co n ju ga te p o le
∞ z = p2 = r cos w 0 – jr sinw 0 p airs lie in sid e th e un it c irc le . T h e
R O C con ta in s the u n it circ le .
∑| h ( n )| < ∞; S ta b le syste m
n = 0
n
h (n ) = r co s ω0 n u (n) ; r > 1 H ( z)
h (n ) U n it
jv z -p la ne
z(z − r cosω 0 ) c irc le p1
=
(z − r cosω 0 − jr sinω 0 ) r
(z − r cosω 0 + jr sinω 0 ) u
ROC is |z| > r. r
n
A pair of conjugate poles at ROC p2
z = p1 = r cos w 0 + jr sin w 0 S inc e r > 1 , th e c on ju g ate p ole
∞
z = p2 = r cos w 0 – jr sinw 0 p airs lie o utside th e un it c irc le .
∑| h ( n )| = ∞; U n stab le sy stem T h e R O C d oe s no t co n tain s th e
n = 0 u nit c ircle .
h (n ) = c o s ω0 n u (n )
h (n ) H ( z) U n it jv z -p la ne
1 z(z − cosω 0 ) c irc le p1
=
(z − cosω 0 − j sinω 0 )
(z − cosω 0 + j sinω 0 ) u
n ROC is |z| > 1. p2
ROC
A pair of conjugate poles
−1 on unit circle at, S inc e c o njug a te p ole pa irs lie
∞ z = p1 = cos w 0 + j sin w 0 o n th e circle . T h e R O C d o es
n ot c on ta in s th e u nit c irc le .
∑| h ( n )| = 0 ; S tab le sy stem
n = 0
z = p2 = cos w 0 – j sinw 0
Chapter 3 - Z - Transform 3. 56
ROC of a Stable System
Let, H(z) be Z-transform of h(n). Now, by definition of Z-transform we get,
+∞
H ( z) = ∑ h(n) z − n
n = −∞
∑
n = −∞
h(n) < ∞ ⇒ H ( z) < ∞
Therefore, we can conclude that z = 1 will be a point in the ROC of a stable system. Hence for a stable
discrete time system the ROC of impulse response should include the unit circle.
General Condition for Stability in z-plane
On combining the condition for location of poles and the ROC we can say that for a stable LTI discrete
time system the poles should lie inside the unit circle and the unit circle should be included in ROC of impulse
response of the system.
3.7 Relation Between Laplace Transform and Z-Transform
3.7.1 Impulse Train Sampling of Continuous Time Signal
Consider a periodic impulse train p(t) shown in fig 3.12a, with period T. The pulse train can be
mathematically expressed as shown in equation (3.61).
∞
p( t ) = ∑ δ( t − nT) ..... (3.61)
n =−∞
When a continuous time signal x(t) is multiplied by the impulse train p(t), the product signal will have
impulses. A continuous time signal x(t) and the product of x(t) and p(t) are shown in fig 3.12b and fig 3.12c
respectively. In fig 3.12c, the magnitudes of the impulses are equal to magnitude of x(t), and so the product
signal is impulse sampled version of x(t), with sampling period T. Let us denote the product signal as xp(t) and
it is mathematically expressed as shown in equation (3.62).
∞
xp (t) = ∑ x(nT) δ( t − nT) ..... (3.62)
n =−∞
On comparing equations (3.64) and (3.65) we can say that, if a discrete time signal x(nT) is a sampled
version of x(t), then Z-transform of the discrete time signal can be obtained from Laplace transform of
sampled version of x(t), by choosing the transformation, esT = z. This transformation is also called impulse
invariant transformation.
3.7.3 Relation Between s-Plane and z-Plane
Consider a point s1 in s-plane as shown in fig 3.13. Now the transformation, jΩ z -plan e
s1T
e = z1 ..... (3.66) LHP RHP
jΩ1 s1
will transform the point s1 to a corresponding point z1 in z-plane.
Let the coordinates of s1 be s1 and W 1 as shown in fig 3.13.
∴ s1 = σ1 + jΩ1 ..... (3.67) σ1 σ
Using equation (3.67) the equation (3.66) can be written as, F ig 3 .13 : s-p la ne .
2 πk
s1 = σ1 + jΩ1 + j , for k = 0, ± 1, ± 2 ..... ..... (3.70)
T
map as a single point in the z-plane described by equation,
e± j2 πk = 1 ; for integer k
FG σ1 + jΩ1 + IJ
j2 πk
T
z1 = eH T K = eσ1T e jΩ1T e j2 πk = eσ1T e jΩ1T ..... (3.71)
The equation (3.70) represents a strip of width 2p/T in the s-plane for values of imaginary part of s in
the range –p/T £ W £ +p/T is mapped into the entire z-plane. Similarly the strip of width 2p/T in the s-plane
for values of imaginary part of s in the range p/T £ W £ 3p/T is also mapped into the entire z-plane. Likewise
the strip of width 2p/T in the s-plane for values of imaginary part of s in the range -3p/T £ W £ -p/T is also
mapped into the entire z-plane.
In general any strip of width 2p/T in the s-plane for values of imaginary part of s in the range
(2k – 1)p/T £ W £ (2k + 1) p/T, where k is an integer, is mapped into the entire z-plane. Therefore we can say
that the transformation, esT = z, leads to many-to-one mapping, (and does not provide one-to-one mapping).
In this mapping, the left half portion of each strip in s-plane maps into the interior of the unit circle
in z-plane, right half portion of each strip in s-plane maps into the exterior of the unit circle in z-plane and the
imaginary axis of each strip in s-plane maps into the unit circle in z-plane as shown in fig 3.14.
jΩ jv
3π\T U n it
c irc le j1
LHP RHP
u
π\T
σ −1 1 u
−π\T
−j1
−3π\T
F ig 3.1 4 a : s-pla n e. F ig 3.1 4 b : z-pla n e.
F ig 3.1 4 : M a p p in g o f s-p lan e in to z-pla n e.
Y(z)
We know that, = H(z)
X(z) z−1 z−1 z
∴ H(z) = −1 −2
= −2 2
=
1 + 4z + 3z z (z + 4z + 3) (z + 1) (z + 3)
U sin g partial fraction expansion technique we can write,
H(z) 1 A B The roots of quadratic
= = +
z b gb
z +1 z + 3 g z+1 z+3 z2 + 4z + 3 are,
1 1 1 −4 ± 42 − 4 × 3
A = (z + 1) = = = 0.5 z=
(z + 1) (z + 3) z = −1 −1 + 3 2 2
−4 ± 2
1 1 1 = = −1, − 3
B = (z + 3) = = − = −0.5 2
(z + 1) (z + 3) z =−3 −3 + 1 2
H(z) 0.5 0.5 0.5z 0.5z
∴ = − ⇒ H(z) = −
z z+1 z +3 z +1 z+3
Chapter 3 - Z - Transform 3. 60
Example 3.13
Find the transfer function and unit sample response of the second-order difference equation with zero
initial condition,
y(n) = x(n) 0.25y(n 2).
Solution
The difference equation governing the system is,
y(n) = x(n) 0.25 y(n 2)
Let us take Z-transform of the difference equation governing the system with zero initial condition.
Z{y(n)} = Z{x(n) 0.25 y(n 2)}
Z {x(n)} = X(z)
Z{y(n)} = Z{x(n)} 0.25 Z{y(n 2)} Z {y(n)} = Y(z)
Y(z) = X(z) 0.25 z-2 Y(z) Z {y(n 2)} = z2 Y(z)
(Using shifting property)
Y(z) + 0.25z2 Y(z) = X(z)
Y(z)
We know that, = H(z) (a + b) (a − b) = a 2 − b2 j2 = −1
X(z)
1 1 z2
∴ H(z) = −2
= −2 2 =
1 + 0.25 z z (z + 0.25) (z + j 0.5) (z − j 0.5)
H(z) z A A∗
= = + ; where A∗ is conjugate of A.
z (z + j 0.5) (z − j 0.5) z + j 0.5 z − j0.5
H(z) z
A = (z + j0.5) = ( z + j0.5)
z z = − j0.5 (z + j0.5) (z − j0.5) z = − j0.5
z − j0.5 − j0.5 1
= = = = = 0.5
z j0.5 z = − j0.5
− j0.5 − j0.5 2( − j0.5) 2
∴ A∗ = 0.5
H(z) A A∗ 0.5 0.5
= + = +
z z + j0.5 z − j0.5 z + j0.5 z − j0.5
0.5z 0.5z 0.5z 0.5z
∴ H(z) = + = +
z + j0.5 z − j0.5 z − ( − j0.5) z − j0.5
The impulse response is obtained by taking inverse Z-transform of H(z).
3. 61 Digital Signal Processing
l
∴ Impulse response, h(n) = Z −1 H(z) = Z −1 q RS 0.5z
+
0.5z UV
Tz − ( − j0.5) z − j0.5 W
=
L
0.5 MZ −1 RS z UV
+ Z −1
RS
z UVOP
MN Tz − ( − j0.5) W T
z − j0.5 WPQ Z{an u(n)} =
z
= 0.5 ( − j0.5)n u(n) + ( j0.5)n u(n) z−a
= 0.5 (0.5)n cos 0.5nπ − jsin 0.5nπ + cos 0.5nπ + jsin 0.5nπ u(n)
= 0.5 (0.5)n [2 cos 0.5nπ] u(n)
= 0.5n cos (0.5nπ) u(n)
Example 3.14
Determine the impulse response sequence of the discrete time LTI system defined by,
y(n) 4y(n 1) + 4y(n 2) = x(n) 5x(n 3).
Solution
The difference equation governing the LTI system is,
y(n) 4y(n 1) + 4y(n 2) = x(n) 5x(n 3)
Let us assume that the initial conditions are zero. Z{x(n)} = X(z) , \ Z{ax(n m} = azmX(z)
On taking Z-transform of the difference equation Z{y(n)} = Y(z) , \ Z{ay(n m} = azmY(z)
governing the system we get,
Z{y(n) 4y(n 1) + 4y(n 2)} = Z{x(n) 5x(n 3)}
Z{y(n)} 4 Z{y(n 1)} + 4Z{y(n 2)} = Z{x(n)} 5 Z{x(n 3)}
Y(z) 4z1 Y(z) + 4z2 Y(z) = X(z) 5z3 X(z)
[1 4z1 + 4z2] Y(z) = [1 5z3] X(z) ot = z −z a
Z anu(n)
Y(z) 1 − 5z−3 az
∴ = Zona u(n)t = n
X(z) 1 − 4z −1 + 4z−2 2
(z − a)
Y(z)
We know that, = H(z) If Zlx(n)q = X(z) then by shifting
X(z)
1 − 5z −3 1 − 5z −3 z2 − 5z −1 property Zlx(n ± m)q = z X(z) ±m
∴ H(z) = −1 −2
= −2 2 =
1 − 4z + 4z z (z − 4z + 4) (z − 2)2
z2 5z −1 1 2z 5 2z (a b)2 = a2 2ab + b2
= − = z − z −2
(z − 2)2 (z − 2)2 2 (z − 2)2 2 (z − 2)2
The impulse response is obtained by taking inverse Z-transform of H(z).
R U
l q |S| 21 z bz 2−z2g − 52 z bz 2−z2g |V|
∴ Impulse response, h(n) = Z −1 H(z) = Z −1 2
−2
2
T W
1
= Z Sz
R| 2z |U − 5 Z |Rz 2z |U
−1
V S V
−1 −2
2 T| bz − 2g W| 2 T| bz − 2g W|
2 2
1 5
= bn + 1g (2) u(n + 1) − (n − 2) (2) u(n − 2)
n+1 n−2
2 2
Chapter 3 - Z - Transform 3. 62
Example 3.15
Find the impulse response of the system described by the difference equation,
y(n) 3y(n 1) 4y(n 2) = x(n) + 2x(n 1).
Solution
Z{y(n)} = Y(z) ; \ Z{y(n m)} = zm Y(z)
The difference equation governing the LTI system is,
Z{x(n)} = X(z) ; \ Z{x(n m)} = zm X(z)
y(n) 3y(n 1) 4y(n 2) = x(n) + 2x(n 1)
On taking Z-transform we get,
Y(z) 3z1Y(z) 4 z2Y(z) = X(z) + 2z1 X(z)
H(z) A B 12
. 0.2
∴ = + = −
z z−4 z+1 z−4 z+1
F z IJ
RS z UV
= an
∴ H(z) = 12
.
z
− 0.2
z
= 12
.
z FG IJ − 0.2 G
Z
Tz − a W
z−4 z+1 z−4 H K H z − (−1) K
The impulse response is obtained by taking inverse Z-transform of H(z).
\ Impulse response, h(n) = 1.2(4)n u(n) 0.2(1)n u(n)
Example 3.16
Determine the steady state response for the system with impulse function, h(n) = (j0.8)n u(n) for an input,
x(n) = cos (pn) u(n).
Solution
Let y(n) be the steady state response of the system, which is given by convolution of x(n) and h(n).
\ Steady state response, y(n) = x(n) * h(n)
On taking Z-transform of the above equation we get,
Z{y(n)} = Z{x(n) * h(n)}
Using convolution property.
\ Y(z) = X(z) H(z)
Y(z) z A B
= = +
z (z + 1) (z − j0.8) z+1 z − j0.8
Y(z) z z −1
A = (z + 1) = (z + 1) = =
z z= −1 (z + 1) (z − j0.8) z = −1
z − j0.8 z = −1
−1 − j0.8
1 −1 + j0.8 1 − j0.8 1 − j0.8
= × = = = 0.61 − j0.49
1 j0.8 −1 + j0.8 12 + 0.8 2 164
.
Y(z) z z j0.8
B = (z − j0.8) = (z − j0.8) = =
z z = j 0. 8 (z + 1) (z − j0.8) z = j0.8 z + 1 z = j 0 .8 j0.8 + 1
Solution
The difference equation governing the system is,
y(n) = 0.4 x(n) + x(n 1) + 0.2 x(n 2) + x(n 3) + 0.6 x(n 4)
On taking Z-transform we get,
Y(z) = 0.4X(z) + z1X(z) + 0.2z2X(z) + z3X(z) + 0.6z4X(z)
Solution
z
Given that, x(n) = u(n) ; m r m r
∴ X(z) = Z x(n) = Z u(n) =
z−1
.....(1)
Given that, y(n) = 0.8 y(n 1) + x(n)
\ y(n) + 0.8 y(n 1) = x(n)
If Z{y(n)}=Y(z)
On taking Z-transform of above equation we get,
then Z {y(n 1)} = z1 Y(z) y(1)
Y(z) + 0.8 z−1 Y(z) + y( −1) = X(z)
Using equation (1).
z
Y(z) 1+ 0.8 z −1 + 0.8 y( −1) =
z−1
FG 0.8 IJ = z − 0.8 y(−1)
Y(z) 1 +
H z K z−1
Y(z) G
F z + 0.8 IJ = z − 0.8 y(−1)
H z K z−1
z2 z y( −1)
∴ Y(z) = − 0.8
(z − 1) (z + 0.8) z + 0.8
3. 65 Digital Signal Processing
z2 P(z) z
Let, P(z) = ⇒ =
(z − 1) (z + 0.8) z (z − 1) (z + 0.8)
z A B
Let, = +
(z − 1) (z + 0.8) z − 1 z + 0.8
z 1 1 10 5
A= × (z − 1) z =1 = = = =
(z − 1) (z + 0.8) 1 + 0.8 18 . 18 9
z −0.8 −0.8 8 4
B= × (z + 0.8) z= −0.8 = = = =
(z − 1) (z + 0.8) −0.8 − 1 −18 . 18 9
P(z) 5 1 4 1 5 z 4 z
∴ = + ⇒ P(z) = +
z 9 z − 1 9 z + 0.8 9 z − 1 9 z + 0.8
5 z 4 z z y(−1)
∴ Y(z) = + − 0.8 .....(2)
9 z − 1 9 z + 0.8 z + 0.8
a) When y(1) = 0
From equation (2), when y(1) = 0, we get,
5 z 4 z
Y(z) = +
9 z − 1 9 z + 0.8
l q
∴ Response, y(n) = Z −1 Y(z) = Z −1
5 zRS +
4 z UV
T
9 z − 1 9 z + 0.8 W
5 4
= u(n) + (−0.8)n u(n)
9 9
b) When y(1) = 2/9
From equation (2), when y(1) = 2/9, we get,
5 z 4 z 2 z 5 z 2.4 z
Y(z) = + − 0.8 × = +
9 z − 1 9 z + 0.8 9 z + 0.8 9 z − 1 9 z + 0.8
5 z 24 z 5 z 12 z
= + = +
9 z − 1 90 z + 0.8 9 z − 1 45 z + 0.8
l q RS 5 z + 12
∴ Response, y(n) = Z −1 Y(z) = Z −1
z UV
T 9 z − 1 45 z + 0.8 W
L 5 12
=M +
O n
N 9 45 (−0.8) PQ u(n)
Note : Compare the result with example 2.8 of Chapter 2.
Example 3.19
Determine the response of LTI discrete time system governed by the difference equation,
y(n) 0.2 y(n 1) 0.03 y(n 2) = x(n) + 0.4 x(n 1) for the input, x(n) = 0.2n u(n) and with initial condition,
y(2)= 0, y(1) = 0.5.
Solution
z
Given that, x(n) = 0.2n u(n) ; l q n
∴ X(z) = Z x(n) = Z 0.2n u(n) =
z − 0.2
s .....(1)
Given that, y(n) 0.2 y(n 1) 0.03 y(n 2) = x(n) +0. 4 x(n 1)
On taking Z-transform of above equation we get,
Y(z) − 0.2 z−1 Y(z) + y(−1) − 0.03 z−2 Y(z) + z−1 y(−1) + y(−2) = X(z) + 0.4 z−1 X(z) + x(−1) .....(2)
l q l q
If Z y(n) = Y(z), then Z y(n − 1) = z−1 Y(z) + y( −1)
Y(z) − 0.2 z −1 Y(z) − 0.2 × 0.5 − 0.03 z−2 Y(z) − 0.03 z−1 × 0.5 + 0 = X(z) + 0.4 z −1 X(z) + 0
0.2 0.03 0.015 0.4
Y(z) − Y(z) − 0.1 − 2 Y(z) − = X(z) + X(z)
z z z z
∴ Y(z) 1 −
FG
0.2 0.03
− 2 −
IJ FG
0.015 IJ
+ 0.1 = X(z) 1 +
FG
0.4 IJ
H
z z K H z K H
z K
F z − 0.2 z − 0.03I − FG 0.015 + 0.1z IJ = FG z IJ FG z + 0.4IJ
Y(z) G
2
l q
∴ Response, y(n) = Z −1 Y(z) = Z −1 −4
RS z
+ 5.3625
z
− 0.2625
z UV
T z − 0.2 z − 0.3 z − ( −0.1) W
= −4(0.2)n u(n) + 5.3625(0.3)n u(n) − 0.2625( −0.1)n u(n)
= −4(0.2)n + 5.3625(0.3)n − 0.2625( −0.1)n u(n)
Note : Compare the result with example 2.9 of Chapter 2.
Example 3.20
Find the response of the time invariant system with impulse response, h(n) = {1, 2, 1, 2} to an input
signal, x(n) = {1, 2, 3, 4}.
Solution
Let, y(n) = Response or Output of an LTI system.
The response of an LTI system is given by the convolution of input signal and impulse response.
\ y(n) = x(n) * h(n) By convolution property
On taking Z-transform we get, Z{x(n) * h(n)} = X(z) H(z)
Z{y(n)} = Z{ x(n) * h(n)}
\ Y(z) = X(z) H(z)
Given that, x(n) = {1, 2, 3, 4}
By definition of one-sided Z-transform,
∞ 3
X(z) = ∑ x(n) z −n
= ∑ x(n) z -n
= x(0) z0 + x(1) z−1 + x(2) z−2 + x(3) z −3
n = 0 n = 0
= 1 + 2z−1 + 3z −2 + 4z −3
Given that, h(n) = { 1, 2, 1, 2}
By definition of one-sided Z-transform,
∞ 3
H(z) = ∑ h(n) z−n = ∑ h(n) z −n
= h(0) z0 + h(1) z−1 + h(2) z−2 + h(3) z −3
n = 0 n = 0
= 1+ 2z −1 − z−2 − 2z−3
\ Y(z) = X(z) H(z)
= [1 + 2z1 + 3z2 + 4z3] [1 + 2z1 z2 2z3]
= 1 + 2z1 z2 2z3
+ 2z1 + 4z2 2z3 4z4
+ 3z2 + 6z3 3z4 6z5
+ 4z3 + 8z4 4z5 8z6
= 1 + 4z1 + 6z2 + 6z3 + z4 10z5 8z6 .....(1)
By definition of one-sided Z-transform we get,
∞
Y(z) = ∑ y(n) z −n
n = 0
= y(0) z0 + y(1) z1 + y(2) z2 + y(3) z3 + y(4) z4 + y(5) z5+ y(6) z6 + ..... .....(2)
On comparing equations (1) and (2) we get,
y(0) = 1 y(2) = 6 y(4) = 1 y(6) = 8
y(1) = 4 y(3) = 6 y(5) = 10
\ The response of the system, y(n) = {1, 4, 6, 6, 1, 10, 8}
-
Chapter 3 - Z - Transform 3. 68
Example 3.21
Using Z-transform, perform deconvolution of the response, y(n) = 1, 4, 6, 6, 1, −10, −8 and m r
m
impulse response h(n) = 1, 2, −1, −2 to extract the input x(n). r
Solution
m
Given that, y(n) = 1, 4, 6, 6, 1, −10, −8 r
+∞ 6
∴ Y(z) = Zly(n)q = ∑ y(n) z −n
= ∑ y(n) z −n
n= −∞ n= 0
= 1+ 2z −1 − z −2 − 2z −3
Y(z)
We know that, H(z) =
X(z)
Y(z) 1+ 4 z−1 + 6 z−2 + 6 z−3 + z −4 − 10 z−5 − 8z−6
∴ X(z) = =
H(z) 1+ 2z−1 − z−2 − 2z−3
= 1+ 2z−1 + 3 z−2 + 4z−3 .....(1)
1+ 2z−1 + 3 z−2 + 4z −3
−1 −2 −3
1+ 2z −z − 2z 1 + 4 z−1 + 6 z−2 + 6 z−3 + z−4 − 10 z−5 − 8z−6
(–)
1 +(–)2 z−1(+)− z−2(+)− 2z−3
2 z−1 + 7 z −2 + 8 z−3 + z−4
(–)
2 z−1 +(–)4 z −2 (+)
− 2z−3 (+)
− 4z−4
3 z−2 + 10 z−3 + 5 z −4 − 10 z−5
(–)
3 z−2(–)+ 6 z−3(+)− 3 z−4(+)− 6 z−5
4z −3 + 8 z−4 − 4z−5 − 8z−6
(–)
4z −3(–)+ 8 z−4 (+)
− 4z−5 −(+)8z−6
0
n = −∞
∴ Input, x(n) = 1, 2, 3, 4 m r
-
3. 69 Digital Signal Processing
Example 3.22
An LTI system is described by the equation, y(n) = x(n) + 0.8 x(n 1) + 0.8 x(n 2) 0.49 y(n 2).
Determine the transfer function of the system. Sketch the poles and zeros on the z-plane.
Solution
Given that, y(n) = x(n) + 0.8 x(n 1) + 0.8 x(n 2) 0.49 y(n 2)
On taking Z-transform we get,
Y(z) = X(z) + 0.8z1 X(z) + 0.8z2 X(z) 0.49z2 Y(z) Z{y(n)} = Y(z); \ Z{y(n – m)} = z–mY(z)
2 1 2
Y(z) + 0.49z Y(z) = X(z) + 0.8z X(z) + 0.8z X(z) Z{x(n)} = X(z); \ Z{x(n – m)} = z–mX(z)
[1 + 0.49z2] Y(z) = [1 + 0.8z1 + 0.8z2] X(z)
Y(z) 1 + 0.8z−1 + 0.8z−2
∴ = .....(1)
X(z) 1 + 0.49z−2
The equation(1) is the transfer function of the LTI system.
Y(z) 1 + 0.8z−1 + 0.8z−2 z−2(z2 + 0.8z + 0.8)
H(z) = = =
X(z) 1 + 0.49z−2 z −2(z2 + 0.49)
z2 + 0.8z + 0.8
=
z2 + 0.49
jv
The poles are the roots of the denominator polynomial, j1
z -p la n e
z2 + 0.49 = 0 U n it c ircle
z1 j0.8
\ z2 = 0.49 j0.7 p1
j0.6
z = ± −0.49 = ± j0.7 j0.4
\ The poles are, p1 = j0.7, p2 = j0.7 j0.2
The zeros are the roots of the numerator polynomial,
−1 −0.8 −0.6 −0.4 −0.2 0.2 0.4 0.6 0.8 1.0
u
z2 + 0.8z + 0.8 = 0 −j0.2
Let y(n) be step response. Now the step response is given by convolution of step input, u(n) and impulse
response, h(n).
\ y(n) = u(n) * h(n) By convolution property,
On taking Z-transform we get, Z{u(n) * h(n)} = U(z) H(z)
Z{y(n)} = Z{u(n) * h(n)}
\ Y(z) = U(z) H(z)
On substituting for U(z) and H(z) from equations (1) and (2) respectively we get,
Note : Since impulse response is anticausal, the step response is also anticausal.
On taking inverse Z-transform of Y(z) we get step response.
∑ h(n) = ∑ b n
= ∑ |b|n
n = −∞ n = 0 n = 0
Since |b| < 1, using the infinite geometric series sum formula we can write,
∞
1
∑ |b|n =
1−|b|
Infinite geometric series sum formula
n = 0 ∞
1
∞
1 ∑ Cn =
1− C
; if , 0 <|C|< 1
∴ ∑ h(n) =
1−|b|
= constant n = 0
n = −∞
The term 1/(1|b|) is less than infinity and so the system is stable.
Example 3.25
Using Z-transform, find the autocorrelation of the causal sequence, x(n) = an u(n), 1 < a < 1.
Solution
Given that, x(n) = an u(n)
1 z
l q n
∴ X(z) = Z x(n) = Z anu(n) = s =
1 − a z−1 z − a
1 1 1
∴ X(z−1) = X(z) z=z −1
= =−
1− a z a z −1a
l q 1 F a2 1 1 1 a 1 I 1 1
∴ Z rxx (m) = −
a GH −
a2 − 1 z − a a2 − 1 z − 1 a
=− 2 + JK
a − 1 z − a a(a 2 − 1) z − 1 a
Chapter 3 - Z-Transform 3. 72
∴ rxx (m) = Z −1 −
RS a 1
+
1 1 UV z1 z = z0 = 1
T| 2
a −1 z − a 2
a(a − 1) z − 1a W| If Z {x(n)} = X(z)
then by shifting property
=−
a
Z −1 z−1
RS
z
+
1 UV
Z −1
RSz −1 z UV Z {x(n m} = zm X(z)
a −12
T
z−a a(a 2 − 1) W T| z − 1a W| o
Z anu(n) = t z
z−a
=− 2
a
a(n−1) u(n − 1) +
1 1 FG IJ n −1
u(n − 1) z
a −1 a(a 2 − 1) a H K o t
Z an−1u(n − 1) = z−1
z−a
1 L 1 F 1I
M G J
n −1 OP u(n − 1) = 1 LMF 1I n
n OP u(n − 1)
=
a − 1 MN a H a K
2
− a (a)n−1
PQ G J
a − 1 MNH a K
2
−a
PQ
3.8 Structures for Realization of LTI Discrete Time Systems in z-Domain
A discrete time system is a system that accepts a discrete time signal as input and processes it, and
delivers the processed discrete time signal as output. Mathematically, a discrete time system is represented
by a difference equation. Physically, a discrete time system is realized or implemented either as a digital
hardware ( like special purpose Microprocessor / Microcontroller) or as a software running on a digital
hardware (like PC-Personal Computer).
The processing of the discrete time signal by the digital hardware involves mathematical operations
like addition, multiplication and delay. Also the calculations are performed either by using fixed point arithmetic
or floating point arithmetic. The time taken to process the discrete time signal and the computational complexity,
depends on number of calculations involved and the type of arithmetic used for computation. These issues
are addressed in structures for realization of discrete time systems.
From the implementation point of view, the discrete time systems are basically classified as IIR and
FIR systems. The various structures proposed for IIR and FIR systems, attempt to reduce the computational
complexity, errors in computation, memory requirement and finite word length effects in computations.
Discrete Time IIR System
Let, H(z) = Transfer function of discrete time IIR system.
The general form of transfer function of IIR system is,
b 0 + b1 z −1 + b 2 z −2 + ..... + b M z − M
H(z) =
1 + a1 z −1 + a 2 z −2 + ..... + a N z − N
Let, X(z) = Input of the discrete time system in z-domain.
Y(z) = Output of the discrete time system in z-domain.
Y(z) b 0 + b1 z −1 + b2 z −2 + ..... + b M z − M
∴ H(z) = = .....(3.75)
X(z) 1 + a1 z −1 + a 2 z−2 + ..... + a N z− N
On taking inverse Z-transform of the above equation we get, If Z{x(n)} = X(z) then,
y( n) + a1 y( n − 1) + a 2 y( n − 2) + ..... + a N y( n − N ) Z{x(n-k)} = z-k X(z)
= b 0 x( n) + b1 x( n − 1) + b2 x( n − 2) + ..... + b M x( n − M )
y( n) = − a1 y( n − 1) − a 2 y( n − 2) − ..... − a N y( n − N )
+ b 0 x( n) + b1 x( n − 1) + b 2 x( n − 2) + ..... + b M x( n − M )
N M
∴ y( n) = − ∑ a m y( n − m) + ∑ bm x( n − m) .....(3.76)
m=1 m=0
The equation (3.75) is the transfer function of discrete time IIR system and the equation (3.76) is the
time domain difference equation governing discrete time IIR system. From equation (3.76), it is observed that
the output at any time n depends on past outputs and so the IIR systems are recursive systems.
Discrete Time FIR system
Let, H(z) = Transfer function of discrete time FIR system.
The general form of transfer function of FIR system is,
Y(z)
∴ H(z) = = b0 + b1 z−1 + b2 z−2 + ..... + b N −1 z− ( N −1) .....(3.77)
X(z)
On cross multiplying the equation (3.77) we get,
Y(z) = b0 + b1 z −1 + b2 z−2 + ..... + b N − 1 z − ( N −1) X(z)
= b0X(z) + b1 z−1 X(z) + b2 z −2 X(z) + ..... + b N −1 z − ( N −1) X(z)
The equation (3.77) is the transfer function of discrete time FIR system and the equation (3.78) is the
time domain difference equation governing discrete time FIR system. From equation (3.78), it is observed that
the output at any time n does not depend on past outputs and so the FIR systems are nonrecursive systems.
Basic Elements of Block Diagram
The difference equations of IIR and FIR systems can be viewed as a computational procedure (or
algorithm) to determine the output signal y(n) from the input signal x(n). The computations in the above
difference equation of a system can be arranged into various equivalent sets of difference equations.
For each set of equations, we can construct a block diagram consisting of adder, constant multiplier,
unit delay element and Unit advance element. Such block diagrams are referred to as realization of system or
equivalently as structure for realizing system.The basic elements used to construct block diagrams are listed
in table 3.6.
Chapter 3 - Z-Transform 3. 74
Table 3.6 : Basic elements of block diagram in time domain and z-domain
x 1 (n ) x 1 (n ) + x 2 (n ) X 1 (z ) X 1 (z ) + X 2 (z )
+ +
Adder
x 2 (n ) X 2 (z )
x (n ) a x (n ) X (z ) a X (z )
Constant multiplier
Y( z) b 0 + b1 z −1 + b 2 z −2 + ..... + b M z − M
H(z) = =
X( z) 1 + a1 z−1 + a 2 z −2 + ..... + a N z − N
The above two representations of IIR system can be viewed as a computational procedure
(or algorithm) to determine the output sequence y(n) from the input sequence x(n). Also, in the above
representations the value of M gives the number of zeros and the value of N gives the number of poles of the
IIR system.
The computations in the above equation can be arranged into various equivalent sets of difference
equations, which leads to different types of structures for realizing IIR systems.
Some of the structures of the system gives a direct relation between the time domain equation and the
z-domain equation.
The different types of structures for realizing the IIR systems are,
1. Direct form-I structure
2. Direct form-II structure
3. Cascade form structure
4. Parallel form structure
3. 75 Digital Signal Processing
y(n) = − a1 y( n − 1) − a 2 y( n − 2) − ..... − a N y( n − N )
+ b0 x(n) + b1 x(n − 1) + b2 x(n − 2) + ..... + b M x(n − M)
On taking Z-transform of the above equation we get,
Y( z) = − a1 z −1 Y(z) − a 2 z−2 Y(z) − ..... − a N z− N Y( z)
+ b 0 X(z) + b1 z −1 X(z) + b2 z−2 X(z) + ..... + b M z− M X(z) .....(3.79)
The equation of Y(z) [equation (3.79)] can be directly represented by a block diagram as shown in
fig 3.15 and this structure is called direct form-I structure. The direct form-I structure provides a direct relation
between time domain and z-domain equations. The direct form-I structure requires separate delays (z–1) for input
and output samples. Hence for realizing direct form-I structure more memory is required.
b 0 X (z)
X (z) b0 + + Y (z)
x (n ) y (n )
−1
z −1 −a 1 z Y (z ) z
−1
−1
b 1 z −1X (z)
z X (z ) z −1Y (z)
x (n −1)
b1 + + −a 1
y (n −1)
−1
z −2 z
−1
−1
−a 2 z Y (z)
−2
z X (z ) b 2 z X (z ) −2
b2 z Y (z )
x (n −2) + −a 2
y (n −2)
Y (z )
X (z )
−(Ν−1)
−(Μ−1)
−1
z
−1
z
−a N −1z
b M-1z
−(Μ−1) −(Ν−1)
z X (z ) z Y (z )
b M −1 −a N −1
x (n −(M −1)) + + y (n −(N −1))
b M z X (z)
−1
z −1 z
−Μ
−a N z −N Y (z )
−Μ
z X (z) z −ΝY (z)
bM −a N
x (n −M ) y (n −N )
From the direct form-I structure it is observed that the realization of an Nth order discrete time system with
M number of zeros and N number of poles, involves M+N+1 number of multiplications and M+N number of
additions. Also this structure involves M+N delays and so M+N memory locations are required to store the
delayed signals.
When the number of delays in a structure is equal to the order of the system, the structure is called
canonic structure. In direct form-I structure the number of delays is not equal to order of the system and so direct
form-I structure is noncanonic structure.
Chapter 3 - Z-Transform 3. 76
3.9.2 Direct Form-II Structure of IIR System
An alternative structure called direct form-II structure can be realized which uses less number of delay
elements than the direct form-I structure.
Consider the general difference equation governing an IIR system.
N M
y(n) = − ∑ a m y( n − m) + ∑ b m x( n − m)
m=1 m=0
y(n) = − a1 y(n − 1) − a 2 y( n − 2) − .....− a N y(n − N)
+ b0 x(n) + b1 x(n − 1) + b2 x(n − 2) + ..... + b M x(n − M)
On taking Z-transform of the above equation we get,
Y( z) = − a1 z−1 Y(z) − a 2 z−2 Y(z) − ..... − a N z − N Y(z)
+ b0 X(z) + b1 z −1 X(z) + b2 z−2 X(z) + ..... + b M z− M X(z)
Y(z) + a1 z−1 Y(z) + a 2 z−2 Y(z) + ..... + a N z− N Y(z)
= b0 X(z) + b1 z −1 X(z) + b2 z −2 X(z) + ..... + b M z − M X(z)
Y(z) 1 + a1 z−1 + a 2 z−2 + ..... + a N z − N
= X(z) b0 + b1 z −1 + b2 z −2 + ..... + b M z − M
Y( z) b + b1 z −1 + b 2 z −2 + ..... + b M z− M
= 0
X( z) 1 + a1 z −1 + a 2 z −2 + ..... + a N z − N
Y( z) W(z) Y(z)
Let, = ×
X(z) X(z) W(z)
W(z) 1 .....(3.80)
where, =
X(z) 1 + a1 z + a 2 z + ..... + a N z− N
−1 −2
Y(z) .....(3.81)
= b 0 + b1 z −1 + b 2 z −2 + ..... + b M z −M
W(z)
On cross multiplying equation (3.80) we get,
W(z) + a1 z–1 W(z) + a2 z–2 W(z) + ..... + aN z–N W(z) = X(z)
\ W(z) = X(z) - a1 z–1 W(z) - a2 z–2 W(z) - ..... - aN z-N W(z) ..... (3.82)
On cross multiplying equation (3.81) we get,
Y(z) = b0 W(z) + b1 z–1 W(z) + b2 z–2 W(z) + ..... + bM z–M W(z) ..... (3.83)
The equations (3.82) and (3.83) represent the IIR system in z-domain and can be realized by a direct
structure called direct form-II structure as shown in fig 3.16. In direct form-II structure the number of delays is
equal to order of the system and so the direct form-II structure is canonic structure.
From the direct form-II structure it is observed that the realization of an Nth order discrete time system with
M number of zeros and N number of poles, involves M+N+1 number of multiplications and M+N number of
additions. In a realizable system, N ³ M, and so the number of delays in direct form-II structure will be equal to
N. Hence, when a system is realized using direct form-II structure, N memory locations are required to store the
delayed signals.
3. 77 Digital Signal Processing
W (z) b 0W (z)
X (z ) + b0 + Y (z)
−1
z
−1
−a 1 z W (z) −1
−1 b 1 z W (z)
z W (z )
b1
+ −a 1 +
−1
z
−2
−a 2 z W (z) −2
b 2 z W (z)
z −2W (z )
+ b2
−a 2 +
W (z)
W (z)
-(N −1)
−(Ν−1)
−a N −1 z
−1
z
b N -1 z
−(Ν − 1)
z W (z )
+ −a N −1 b N −1 +
−1
z
−N
−a N z W (z ) −N
z W (z ) b N z −ΝX (z)
−a N bN
+ +
X (z) b0
Y (z)
−1 −1
z z
+ +
−a 1 b1
−1 −1
z z
+ −a 2
+
b2
−1 −1
z z
+ −a N −1 b M −1 +
−1 −1
z z
−a N bM
H2 H1
Example 3.26
Obtain the direct form-I, direct form-II, cascade and parallel form realizations of the LTI system governed by
the equation,
3 3 1
y(n) = − y(n − 1) + y(n − 2) + y(n − 3) + x(n) + 3 x(n − 1) + 2 x(n − 2)
8 32 64
Solution
Direct Form-I
Given that,
3 3 1
y(n) = − y(n − 1) + y(n − 2) + y(n − 3) + x(n) + 3 x(n − 1) + 2 x(n − 2) .....(1)
8 32 64
On taking Z-transform of equation(1) we get,
3 −1 3 −2 1 −3
Y(z) = − z Y(z) + z Y(z) + z Y(z) + X(z) + 3z −1 X(z) + 2z −2 X(z) .....(2)
8 32 64
The direct form-I structure can be obtained from equation (2), as shown in fig 1.
X (z) + + Y (z)
−1
−1 3 −1 z
z − z Y(z)
−1 8
3 z X(z) 3 −1
z Y(z)
−1
z X(z) 3 + + −
8
−1
3 −2 z
−1 z Y(z)
z 32
−2
2 z X(z) 3 −2
−2
z X(z) 2
+ 32
z Y(z)
1 −3 −1
z Y(z) z
64
F ig 1 : D irec t fo rm -I realiza tio n stru c tu re. 1 −3
z Y(z)
64
Chapter 3 - Z-Transform 3. 80
Direct Form-II
3 −1 3 −2 1 −3
Y(z) = − z Y(z) + z Y(z) + z Y(z) + X(z) + 3z −1 X(z) + 2z−2 X(z)
8 32 64
3 3 −2 1 −3
Y(z) + z −1 Y(z) − z Y(z) − z Y(z) = X(z) + 3z−1 X(z) + 2z −2 X(z)
8 32 64
LM 3
Y(z) 1 + z −1 −
3 −2
z −
1 −3
z
OP
= X(z) 1+ 3z −1 + 2z −2
N 8 32 64 Q
Y(z) 1+ 3z −1 + 2z −2
∴ =
X(z) 3 3 −2 1 −3 .....(3)
1 + z−1 − z − z
8 32 64
Y(z) W(z) Y(z)
Let , =
X(z) X(z) W(z)
W(z) 1
where, =
X(z) 3 −1 3 −2 1 −3 .....(4)
1+ z − z − z
8 32 64
Y(z)
= 1+ 3z −1 + 2z −2 .....(5)
W(z)
3 −1 3 −2 1 −3
W( z ) + z W( z ) − z W(z) − z W(z) = X(z)
8 32 64
3 3 −2 1 −3
or W(z) = X(z) − z −1 W(z) + z W(z) + z W(z) .....(6)
8 32 64
The equations (6) and (7) can be realized by a direct form-II structure as shown in fig 2.
W (z)
X (z ) + + Y (z )
z −1
− 3 z W (z)
−1 −1
8 3z W (z )
z −1W ( z)
+ −3 3 +
8
3 −2 z −1
z W (z)
32 −2
2z W (z )
3 z −2 W ( z)
+ 32
2 +
z −1
1 −3
z W (z)
64 z −3 W ( z)
1
64
Y(z) 1 + 3z −1 + 2z −2
= H(z) =
X(z) 3 3 −2 1 −3 .....(8)
1 + z −1 − z − z
8 32 64
The numerator and denominator polynomials of equation (8) should be expressed in the factored form.
Consider the numerator polynomial of equation (8).
1 + 3z−1 + 2z−2 = z−2 (z2 + 3z + 2)
= z−2(z + 1) (z + 2) = z−1(z + 1) z−1(z + 2)
e je
= 1 + z−1 1 + 2z−1 j .....(9)
−
2
±
FG 2 IJ 2
FG
−4 −
8 IJ
z=
8 H 8K H 64 K
2
2 4 32 2 6
− ± + − ±
8 64 64 8 8 −1 3 2 −4 1 −1
= = = ± = , = ,
2 2 8 8 8 8 4 2
∴1 +
3 −1
z −
3 −2
z −
1 −3
z = z −3 z +
1
z +
1
z −
FG IJ FG IJ FG 1IJ
8 32 64 8 2 H KH K H 4K
= z −1 z +
1 −1
z z +
1 −1
z
FG IJ FG IJ FG z − 1IJ
8 2 H K H K H 4K
= 1 +
1 −1
z 1 +
1 −1
z
FG
1
IJ FG IJ FG − 1 z IJ −1 .....(11)
8 2 H KH KH 4 K
From equations(8), (9) and (11) we can write,
1 + z−1 1 + 2z −1 1 .....(13)
Let, H(z) = × × = H1(z) × H2(z) × H3(z)
1 −1 1 −1 1 −1
1+ z 1+ z 1− z
8 2 4
1+ z−1 1+ 2z −1 1
where, H1(z) = ; H2(z) = and H3 (z) =
1 −1 1 1 −1
1+ z 1 + z−1 1− z
8 2 4
Chapter 3 - Z-Transform 3. 82
The transfer function H1(z) can be realized in direct form-II structure using equations (14) and (15), as
shown in fig 3.
X (z ) W1(z) Y 1 (z)
Y1(z) W1(z) Y1(z) 1 + z−1
Let, H1(z) = = = + +
X(z) X(z) W1(z) 1 + 1 z−1
8
−1
z
W1(z) 1 Y (z)
where, = and 1 = 1+ z−1 1 −1 −1
X(z) 1 −1 W ( z) −
8
z W1 (z) 1 z W1(z)
1+ z 1 −
8
8
1 −1 F ig 3 : D irect fo rm -II stru cture o f H 1 (z).
∴ W1(z) = X(z) − z W1(z) .....(14)
8
−1
Y1(z) = W1(z) + z W1(z) .....(15)
2 z W2(z)
2 1 −1
z−1W2(z)
−1
− z W2 (z)
2 1
W2(z) 1 Y (z) − 2
where, = and 2 = 1+ 2z −1 2
Y1(z) 1 −1 W 2 (z)
1+ z F ig 4 : D irect fo rm -II stru ctu re o f H 2 (z).
2
1 −1
∴ W2(z) = Y1(z) − z W2(z) .....(16)
2
Y2 (z) = W2(z) + 2z−1 W2 (z) .....(17)
Y2(z) 1 − 1 z−1 4
z Y(z) 1
z Y (z)
4 4
−1 −1
z z
z −1
1 1 1
− − 2
8 2 4
H(z) =
d1+ z i d1+ 2z i−1 −1
H(z) =
e1+ z je1 + 2 z j
−1 −1
A
+
B
+
C
FG1 + 1 z IJ FG1+ 1 z IJ FG1 − 1 z IJ = 1+ 1 z
−1 −1 −1 −1 1 −1
1+ z
1
1 − z −1
H 8 KH 2 KH 4 K 8 2 4
e1+ z j e1+ 2z j
−1
F −1
1 −1 IJ (1 − 8) (1 − 16) 105 35
A =
FG1 + 1 z IJ FG1 + 1 z IJ FG1− 1 z IJ × GH1 +
−1 −1 −1 8
z
K =
(1 − 4) (1 + 2)
=−
9
=−
3
H 8 KH 2 KH 4 K z −1 = − 8
d1 + z i d1 + 2z i
−1
F 1 I−1
(1 − 2) (1 − 4) (−1) × ( −3) 8
FG1+ 1 z IJ FG1 + 1 z IJ FG1− 1 z IJ × GH1+ 2 z JK
−1
B =
−1 −1 −1
=
FG1 − 1IJ FG1+ 1IJ = 3 3
×
=
3
H 8 KH 2 KH 4 K z−1 = − 2
H 4K H 2K 4 2
e1 + z j e1 + 2z j
−1
F 1 I −1
(1+ 4) (1+ 8) 5× 9
FG1 + 1 z IJ FG1 + 1 z IJ FG1 − 1 z IJ × GH1 − 4 z JK
−1
C =
−1 −1 −1
=
FG1 + 1IJ b1 + 2g = 3 × 3 = 10
H 8 KH 2 KH 4 K z−1 = 4
H 2K 2
35 8
−
3 3 10
∴ H(z) = + + = H1(z) + H2 (z) + H3(z)
1 −1 1 −1 1
1+ z 1+ z 1 − z −1
8 2 4
35 8
−
3 3 10
where, H1(z) = ; H2 (z) = ; H3 (z) =
1 −1 1 1
1+ z 1 + z −1 1 − z −1
8 2 4
Y(z) Y1(z) Y2(z) Y3(z)
Let , H(z) = ; H1(z) = ; H2(z) = ; H3(z) =
X(z) X(z) X(z) X(z)
Y(z) Y1(z) Y2 (z) Y3 (z)
∴ H(z) = H1(z) +H2 (z) +H3 (z) ⇒ = + +
X(z) X(z) X(z) X(z)
∴ Y(z) = Y1(z) + Y2(z) + Y3 (z)
The transfer function H1(z) can be realized in direct form-I 35
− X(z)
structure using equation (19) as shown in fig 7. 3
X (z ) + Y 1 (z)
35
−
Y1(z) 3
Let , H1(z) = = −1
z
X(z) 1 + 1 z −1
8 1 −1 −1
− z Y1 (z) z Y1(z)
8 1
On cross multiplying and rearranging we get, −
8
1 −1 35
Y1(z) = − z Y1(z) − X(z) .....(19) F ig 7 : D irect fo rm -I structure of H 1 (z).
8 3
Chapter 3 - Z-Transform 3. 84
The transfer function H2(z) can be realized in direct form-I
8
structure using equation (20) as shown in fig 8. X (z ) 3 + Y 2 (z)
8
X(z)
8 3
Y2(z) 3
1
z−
Let , H2(z) = =
X(z) 1
1 + z−1 1 −1 −1
z Y 2(z)
2 − z Y2 (z) 1
2 −
On cross multiplying and rearranging we get, 2
−1
z
1
−
H 1 (z) 8
Y 2 (z)
8
3 + +
−1
z
1
−
H 2 (z) 2
Y 3 (z)
10 +
−1
z
1
H 3 (z) 4 F ig 1 0 : P a ra llel fo rm rea liza tio n .
Example 3.27
Find the direct form-I and direct form-II realizations of a discrete time system represented by transfer
function,
2z3 − 4z2 + 11z − 8
H(z) =
b gc
z − 8 z2 − z + 3 h
Solution
Direct Form-I
Y(z)
Let, H(z) = ; where, Y(z) = Output and X(z) = Input.
X(z)
3. 85 Digital Signal Processing
=
2z3 − 4z2 + 11z − 8
=
c
z3 2 − 4z −1 + 11z −2 − 8z −3 h
3 2
z − 9 z + 11z − 24 z c1 − 9 z
3 −1
+ 11z −2
− 24 z h
−3
Y(z) 2 − 4z −1 + 11z −2 − 8z −3
∴ = .....(1)
X(z) 1 − 9z −1 + 11z −2 − 24 z −3
On cross multiplying equation (1) we get,
Y(z) − 9z −1 Y(z) + 11z −2 Y(z) − 24z−3 Y(z) = 2X(z) − 4z−1 X(z) + 11z−2 X(z) − 8z−3 X(z)
−1 −1 −1
z 9z Y (z ) z
−1
−4z X (z) −1
−1 + z Y (z )
z X (z ) −4 + 9
−1 −1
z −2 z
−2 −11z Y (z )
−2
11z X (z ) + −2
z X (z) 11 + −11 z Y (z )
−1 −1
z −3 −3 z
−3 −8z X (z ) 24z Y (z )
−3
z X (z ) −8 24 z Y (z )
Y(z)
= 2 − 4z−1 + 11z−2 − 8z −3 .....(4)
W(z)
On cross multiplying equation (3) we get,
W(z) − 9z −1 W(z) + 11z −2 W(z) − 24z −3 W(z) = X(z)
.....(5)
∴ W(z) = X(z) + 9z−1 W(z) − 11z−2 W(z) + 24 z−3 W(z)
On cross multiplying equation (4) we get,
Y(z) = 2W(z) 4z1 W(z) + 11z2 W(z) 8z3 W(z) .....(6)
Chapter 3 - Z-Transform 3. 86
The equations (5) and (6) can be realized by a direct form-II Structure as shown in fig 2.
W (z) 2W (z )
X (z ) + 2 + Y (z )
−1
z
−1
9z W (z) −1
−4z W (z)
−1
z W (z)
+ 9 −4 +
−1
z
−2
−11z W (z ) −2
−2
z W (z) 11z W (z)
+ −11 11 +
−1
z
−3
24z W (z ) −3
−3
z W (z) −8z W (z )
24 −8
Example 3.28
Find the digital network in direct form-I and II for the system described by the difference equation,
y(n) = x(n) + 0.3 x(n 1) 0.4 x(n 2) 0.8 y(n 1) + 0.7 y(n 2).
Solution
Given that, y(n) = x(n) + 0.3 x(n 1) 0.4 x(n 2) 0.8 y(n 1) + 0.7 y(n 2)
On taking Z-transform we get,
Y(z) = X(z) + 0.3z1 X(z) 0.4z2 X(z) 0.8z1 Y(z) + 0.7z2 Y(z) .....(1)
The direct form-I digital network can be realized using equation (1) as shown in fig 1.
+
X (z) + Y (z)
−1 −1
z −1 −1 z
0.3z X (z ) −0.8z Y (z )
−1 +
z X (z ) 0.3 + −0.8 −1
z Y (z)
−1
z −1
z
−2 −2
−2 −0.4z X (z ) 0.7z Y(z )
z X (z ) −2
z Y (z)
−0.4 0.7
−2
W(z) + 0.8z1 W(z) + 0.7z2 W(z) = X(z) −0.7 z W (z ) −2
−2 −0.4z W (z )
z W (z)
−0.7 −0 .4
\ W(z) = X(z) 0.8z1 W(z) 0.7z2 W(z) ..... (5)
On cross multiplying equation (4) we get, F ig 2 : D irect fo rm -II dig ita l netw o rk.
Y(z) = W(z) + 0.3z1 W(z) 0.4z2 W(z) ..... (6)
The direct form-II digital network is realized using equations (5) and (6) as shown in fig 2.
Example 3.29
1 − a cos ω 0 z −1
Realize the digital network described by H(z) in two ways. H(z) =
1 − 2a cos ω 0 z −1 + a 2 z −2
Solution
Y(z) 1 − a cos ω 0 z −1
Let , H(z) = =
X(z) 1 − 2a cos ω 0 z −1 + a 2 z −2
On cross multiplying we get,
Y(z) 2a cos w 0 z1 Y(z) + a2 z2 Y(z) = X(z) a cos w 0 z1 X(z)
\ Y(z) = X(z) a cos w 0 z1 X(z) + 2a cos w 0 z1 Y(z) a2 z2 Y(z)
Let, a cos w 0 = b. \ Y(z) = X(z) bz1 X(z) + 2bz1 Y(z) a2 z2 Y(z) ..... (1)
The equation (1) can be used to construct direct form-I structure of H(z) as shown in fig 1.
+
X (z ) + Y (z )
−1
z
−1 −1
z 2bz Y (z)
+ z Y (z )
−1
−1 2b
−1
z X (z) −bz X (z )
−b
Note : b = a cos w 0 z
−1
2 −2
−a z Y (z )
F ig 1 : D irec t fo rm -I rea liza tio n o f H (z). −a
2 −2
z Y (z)
Consider the direct form-I structure as cascade of two systems H1(z) and H2(z) as shown in fig 2.
X (z )
+
+ Y (z )
−1
z
−1
z
+
2b
−b
−1
z
H1(z)
2
−a
H 2(z)
X (z )
+
+ Y (z )
−1
z −1
z
+
2b
−b
−1
z
H 1(z)
2
−a
H 2 (z)
Since the input to delay elements in both the systems H1(z) and H2(z) of fig 3 are same, the outputs will also
be same. Hence the delays can be combined and the resultant structure is direct form-II structure, which is
shown in fig 4.
+ W (z )
X (z ) + Y (z )
z −1
2 bz −1W ( z) −1
+ z −1W ( z ) −bz W (z)
2b −b
W here, b = a cos ω0
z −1
−a 2 z −2 W ( z ) W (z) = A n interm ediate signal
z −2 W ( z)
−a 2
Example 3.30
Realize the given system in cascade and parallel forms.
1 + 0.25z −1
H(z) =
e1 − 2z −1
+ 0.25z −2 j e1 − 3z −1
+ 0.2z −2 j
Solution
Cascade Form
Let us realize the system as cascade of two second-order systems.
1 + 0.25z −1 1 1 + 0.25z −1
H(z) = = −1 −2
×
e1 − 2z −1 + 0.25z −2 j e1 − 3z −1 + 0.2z −2 j 1 − 2z + 0.25z 1 − 3z −1 + 0.2z −2
1 1 + 0.25z −1
where, H1(z) = −1
; H2(z) =
1 − 2z + 0.25z−2 1 − 3z−1 + 0.2z−2
Y1(z) 1
Let , H1(z) = = .....(1)
X(z) 1 − 2z−1 + 0.25z−2
3. 89 Digital Signal Processing
On cross multiplying equation (1) we get, +
X (z ) Y 1 (z )
Y1(z) − 2z −1 Y1(z) + 0.25z−2 Y1(z) = X(z)
−1
∴ Y1(z) = X(z) + 2z−1 Y1(z) − 0.25z−2 Y1(z) .....(2) −1
z
2z Y1 (z)
+ −1
Using equation (2) the direct form-II structure of 2 z Y1 (z)
H1(z) is realized as shown in fig 1.
−2 −1
Y(z) 1 + 0.25z −1 −0.25z Y1 (z) z
Let , H2(z) = =
Y1(z) 1 − 3z −1 + 0.2z −2 −0.25 z
−2
Y1 (z )
Y(z) W (z) Y(z)
Let , = 2 F ig 1 : D irect fo rm -II struc tu re o f H 1 (z).
Y1(z) Y1(z) W2(z)
W2 (z) 1
where, = .....(3)
Y1(z) 1 − 3z + 0.2z −2
−1
Y(z) + W 2 (z)
= 1 + 0.25z −1 .....(4) Y 1(z ) + Y (z)
W2 (z)
−1
On cross multiplying equation (3) we get, −1 z
3z W 2 (z )
+ z −1W 2 (z )
W2(z) − 3z−1 W2(z) + 0.2z−2 W2(z) = Y1(z) 3 0.25
−1 −2 −1
∴ W2 (z) = Y1(z) + 3z W2 (z) − 0.2z W2(z) .....(5) 0.25z W 2 (z )
−2 −1
On cross multiplying equation (4) we get, −0.2z W2 (z) z
−2
z W (z )
−0.2 2
Y(z) = W2 (z) + 0.25z −1 W2 (z) .....(6)
F ig 2 : D irect fo rm -II
Using equations (5) and (6) the direct form-II structure of H2(z) is
realized as shown in fig 2. stru ctu re o f H 2 (z).
The cascade structure of H(z) is obtained by connecting the structures of H1(z) and H2(z) in cascade as shown
in fig 3.
+ Y 1 (z) +
X (z ) + Y (z )
−1 −1
−1
z −1 z
2z Y1 (z) 3z W 2 (z) −1
+ −1
z Y1 (z ) + z W 2 (z )
2 3 0.25
−1
0.25z W 2 (z )
−2 −1 −2 −1
−0.25z Y1 (z ) z −0.2z W 2 (z) z
−2 −2
z Y 2 (z ) z W 2 (z)
−0.25 −0.2
H 1 (z) H 2 (z )
F ig 3 : C a sca de stru cture o f H (z).
Parallel Realization
1 + 0.25z −1
Given that , H(z) =
e1 − 2z −1
+ 0.25z −2 j e1 − 3z −1
+ 0.2z −2 j
By partial fraction expansion we can write,
1 + 0.25z −1 A + B z −1 C + D z −1
H(z) = = −1 −2
+ .....(7)
e1 − 2z −1
+ 0.25z −2
j e1 − 3z −1
+ 0.2z −2
j 1 − 2z + 0.25z 1 − 3z −1 + 0.2z −2
Chapter 3 - Z-Transform 3. 90
On cross multiplying equation (7) we get,
e j
1 + 0.25z−1 = ( A + B z−1) 1 − 3z−1 + 0.2 z−2 + (C + D z−1) 1 − 2z−1 + 0.25 z−2 e j
−1 −1 −2 −1 −2 −3
1 + 0.25z = A − 3Az + 0.2Az + Bz − 3Bz + 0.2Bz + C − 2Cz + 0.25Cz−2
−1
0.3625
0.05 (0.2B 2.25) 1.4B = 0.25 Þ 1.41B = 0.3625 ⇒ B = = 0.26
1.41
\ A = 0.2B 2.25 = 0.2 ´ 0.26 2.25 = 2.2
\ C = 1 A = 1 + 2.2 = 3.2
\ D = 0.8B = 0.8 ´ 0.26 = 0.21
−2 .2 + 0.26z−1
where, H1(z) =
1 − 2z−1 + 0.25z−2
3.2 − 0.21z−1
H2(z) =
1 − 3z−1 + 0.2z−2
Y(z) Y1(z) Y2 (z)
Let , H(z) = ; H1(z) = ; H2(z) =
X(z) X(z) X(z)
Y(z) Y1(z) Y2(z)
∴ H(z) = H1(z) + H2(z) ⇒ = + ⇒ Y(z) = Y1(z) + Y2(z)
X(z) X(z) X(z)
Realization of H1(z)
Y1(z) −2.2 + 0.26z −1
H1(z) = =
X(z) 1 − 2z−1 + 0.25z −2
3. 91 Digital Signal Processing
Y1(z) W1(z) Y1(z)
Let , =
X(z) X(z) W1(z)
W1(z) 1
where, = .....(9)
X(z) 1 − 2z−1 + 0.25z−2
Y1(z)
= −2.2 + 0.26z −1 .....(10)
W1(z)
On cross multiplying equation (9) we get,
The direct form-II structure of system H1(z) can be realized using equations (11) and (12) as shown in fig 4.
−1 z −1
2z W1 (z)
−1
+ z W1 (z)
2
−1
0.26z W1(z )
−2 −1
−0.25z W1 (z ) z
−2
z W1 (z)
−0.25
Realization of H2(z)
W2 (z) 1
where, = .....(13)
X(z) 1 − 3z−1 + 0.2z−2
Y2 (z)
= 3.2 − 0.21z 1 .....(14)
W2 (z)
+ W 2(z) 3.2W 2 (z )
X (z ) 3.2 + Y 2 (z)
−1 z −1
3z W2 ( z)
+ z −1W 2 ( z )
3 −1
−0.21z W 2 (z )
−0.2z
−2
W 2 (z ) z −1
−0.2 z −2 W 2 ( z )
+ W1(z) −2.2W1(z)
X (z ) −2.2 + + Y (z )
−1 z −1
2z W1(z)
+ z −1W1(z)
2
−1
0.26z W1(z)
−2 −1
−0.25z W1(z) z
z −2 W1(z)
H1( z)
−2 z −1
−0.2z W2 (z)
−0.2 z −2 W2 (z)
H 2 (z)
1 2 + 3z−1 + 4z −2
where, H1(z) = and H2 (z) =
1 16 −1 1 −2
1 − z −1 1+ z + z
4 63 63
Y (z) 1
Let , H1(z) = 1 =
X(z) 1 − 1 z−1 .....(1)
4
On cross multiplying equation (1) we get,
1 −1 1 −1
Y1(z) − z Y1(z) = X(z) ⇒ Y1(z) = X(z) + z Y1(z) .....(2)
4 4
The direct form-II structure of H1(z) can be obtained from equation (2) as shown in fig 1.
+ W 2 (z ) 2W 2 (z)
Y 1 (z) 2 + Y (z )
16 −1 z −1
− z W 2 (z )
63 −1
+ z −1W 2 ( z ) 3z W 2 (z)
16
−
63
3 +
1 −2 z −1
− z W 2 (z)
63 −2
z −2 W 2 ( z) 4z W 2 (z )
1
− 4
63
Example 3.32
−1 2
d1 − 2z i d5 − 3z + 2z i
−1 −1 −2
3 ± 32 − 4 × 5 × 2 3 ± j5.6
d i d5 − 3z + 2z i
1 − 2z−1 −1 −2 z=
2
=−
2
On examining the roots of the quadratic factor in the denominator it is observed that the roots
are complex conjugate. Hence the system has to be realized as cascade of one first-order section and one
second-order section.
2
∴ H(z) =
2 − z −1
×
1 − z−1
=
2 − z −1 e
×
j
1 − 2z−1 + z −2
1 2z−1 5 − 3z−1 + 2z−2 1 2z−1 5 − 3z−1 + 2z −2
X (z ) Y 1 (z)
Y1(z) 2 − z −1 2 + +
Let , H1(z) = = ..... (1)
X(z) 1 − 2z −1
−1 −1
z z
On cross multiplying equation (1) we get, −1
2z Y1(z)
−1
z Y1(z)
−1 −1
Y1(z) − 2z Y1(z) = 2X(z) − z X(z) −1 2
−1 −1
∴ Y1(z) = 2X(z) − z X(z) + 2z Y1(z) ..... (2) F ig 1 : D irec t fo rm -I rea liza tio n o f H 1 (z).
The direct form-I structure of H1(z) can be drawn using equation (2) as shown in fig 1.
Y 1 (z) 1
Y (z )
5
+ +
−1 −1
z z
−2 −1 3 −1
z Y1(z) z Y(z) −1
−1
z Y1(z) 5 5 z Y(z)
−2 + 3
5 + 5
−1 −1
z z
−2 1 −2
−2 −2
z Y1(z) z Y1(z) z Y(z) −2
5 5 2 z Y(z)
1 −
5 5
Y 1 (z 1 +
X (z ) 2 + + 5 + Y (z )
−1 −1 −1 −1
z z z z
−1 −2 −1
3 −1
2z Y1 (z ) z Y1 (z ) z Y (z ) −1
−1 −1 5
z X (z z Y1 (z ) 5 3
z Y (z )
−2 +
−1 2 5 + 5
−1
z Y1 (z )
−1 −1
z z
1 −2
−2 −2
−2 z Y1 (z) z Y (z ) −2
z Y1 (z ) 5 5 z Y (z)
1 2
−
5 5
=
e2 − z j e1 − 2z + z j = 2 − 4z + 2z − z
−1 −1 −2 −1 −2 −1
+ 2z−2 − z−3
−1 −2 −1
e1 − 2z j e5 − 3z + 2z j 5 − 3z + 2z − 10z
−1 −1 −2 + 6z−2 − 4z−3
0.4
2 − 5z−1 + 4z−2 − z −3 1
5 − 13z − + 8 z − − 4z −
2 3
2 − 5z −1 + 4z −2 −z
−3
∴ H(z) =
5 − 13z−1 + 8z −2 − 4z−3 2 − 5.2z −1 + 3.2z −2 − 1.6z −3
−1 −2 −3
0.2z + 0.8z + 0.6z (–) (+) (–) (+)
= 0.4 + 1 2 3
5 − 13z −1 + 8z−2 − 4z −3 0.2z − + 0.8z − + 0.6z −
e j
0.2 + 0.8z −1 + 0.6z −2 = A 5 − 3z −1 + 2z −2 + (B + C z −1) 1 − 2z −1 e j
0.2 + 0.8z −1 + 0.6z −2 = 5A 3Az −1 + 2Az −2 + B − 2B z −1 + Cz −1 2Cz −2 .....(8)
3
Here, A =
16
3 2 15 32 − 150 118 59
∴ B = 0.2 − 5A = 0.2 − 5 × = − = =− =−
16 10 16 160 160 80
3 12 21 192 − 210 18 9
∴ C = 1.2 − 7A = 1.2 − 7 × = − = =− =−
16 10 16 160 160 80
From equations (6) and (7) we can write,
3 −1 59 −1 9 −2
H(z) = 0.4 + z −1
LM A +
B + C z −1 OP = 0.4 + 16
z
+
−
80
z −
80
z
MN1 − 2 z −1
5 − 3z −1 + 2 z −2 PQ 1 − 2z −1 −1
5 − 3z + 2z −2
3 −1 59 −1 9 −2
z − z − z
Let , H(z) = 0.4 + 16 + 80 80 = H1(z) + H2(z) + H3(z)
−1 −1 −2
1 − 2z 5 − 3z + 2z
3 −1 59 −1 9 −1
z − z − z
where, H1(z) = 0.4 ; H2(z) = 16 −1 ; H3(z) = 80
−1
80
−2
1 − 2z 5 − 3z + 2z
Realization of H1(z)
Y1(z)
H1(z) = = 0.4 ⇒ Y1(z) = 0.4 X(z)
X(z)
3. 97 Digital Signal Processing
Using the above equation, the direct form-I structure of H1(z) is drawn as shown in fig 4.
0.4X (z)
X (z ) 0.4 Y 1 (z)
3 −1
z
Y2(z) 16
H2 (z) = =
X(z) 1 − 2z −1
On cross multiplying the above equation we get,
3 −1
Y2(z) − 2z−1 Y2(z) = z X(z)
16
3 −1 ..... (9)
∴ Y2 (z) = z X(z) + 2z−1 Y2(z)
16
Using equation (9) the direct form-I structure of H2(z) is drawn as shown in fig 5.
X (z ) Y 2 (z)
+
−1 −1
z z
3 −1
z X (Z ) −1 −1
−1 16 2z Y2 (z) z Y 2 (z )
z X (Z) 3
2
16
Realization of H3(z)
59 −1 9 −2
Y3(z) − 80 z − 80 z
H3(z) = =
X(z) 5 − 3 z −1 + 2 z−2
On cross multiplying the above equation we get,
59 −1 9 −2
5Y3(z) − 3z−1 Y3 (z) + 2 z−2 Y3(z) = − z X(z) − z X(z)
80 80
59 −1 9 −2 3 2 .....(10)
∴ Y3 (z) = − z X(z) − z X(z) + z−1 Y3 (z) − z −2 Y3(z)
400 400 5 5
Using equation (10) the direct form-I structure of H2(z) is drawn as shown in fig 6.
X (z ) Y 3 (z)
+
−1 −1
z z
59 −1 3
− z Y1(z) −1
z Y3 (z)
−1 400 5
z X(z) 59 3 −1
−
400 + + 5
z Y3 (z)
−1 −1
z z
9 −2 2 −2
− z Y1(z) − z Y3 (z) −2
−2
z X(z) 400 5 2 z Y3 (z)
−
9 −
400 5
X (z ) H 2 (z)
Y 2 (z)
+ +
−1 −1
z z
3 −1
z X (z ) −1
−1
z X (z) 16 2z Y2 (z) −1
z Y2 (z )
3
2
16
X (z ) H 3(z) Y 3 (z)
+
−1 −1
z z
59 −1 3 −1
−1 − z X (z ) z Y 3 (z )
z X (z) 400 5
+ 3 −1
59 z Y 3 (z )
−
400 + 5
−1 −1
z z
9 −2 2 −2
− z X (z ) − z Y 3 (z ) −2
−2 400 5 2 z Y 3 (z)
z X (z) −
9
−
400 5
Solution
1 1
Given that , y(n) − y(n − 1) − y(n − 2) = x(n)
2 4
On taking Z-transform we get,
The roots of quadratic
1 −1 1 −2
Y(z) − z Y(z) − z Y(z) = X(z) z 2 − 0.5z − 0.25 = 0 are,
2 4
FG
1 −
1 −1
z −
1 −2
z Y(z) = X(z)
IJ z=
0.52 + 4 × 0.25
0.5 ±
H 2 4 K 2
Y(z) 1 0.5 ± 1118
.
∴ = = = 0.809, − 0.309
X(z) 1 −1 1 −2 2
1 − z − z
2 4
Y(z) 1 1
∴ H(z) = = = −2 2
X(z) 1 − 1 z −1 − 1 z −2
2 4
z z − 0.5 z − 0.25 d i
1 1
= =
z −2 ( z − 0.809) (z + 0.309) (1 − 0.809z −1) (1 + 0.309z −1)
Let, H(z) = H1(z) H2(z)
1 1
where, H1(z) = ; H2(z) =
1 − 0.809z −1 1 + 0.309z−1
3. 99 Digital Signal Processing
Y1(z) 1 X (z ) + Y 1 (z)
Let , H1(z) = = .....(1)
X(z) 1 − 0.809z−1
−1
On cross multiplying equation (1) we get, z
Y 1 (z)
X (z ) + + Y (z )
z −1 z −1
−1
0.809z Y1(z) −0.309z −1Y(z)
z −1Y1(z) z −1Y(z)
H1(z) H2 (z)
F ig 3 : C a sca de stru ctu re.
The above two representations of FIR system can be viewed as a computational procedure
(or algorithm) to determine the output sequence y(n) from the input sequence x(n). Also in the above
representations the value of N gives the number of zeros of the FIR system. The computations in the above
equation can be arranged into various equivalent sets of difference equations, which leads to different types
of structures for realizing FIR systems. Some of the structures of the system gives a direct relation between
time domain equation and z-domain equation.
The different types of structures for realizing FIR systems are,
1. Direct form realization
2. Cascade realization
3. Linear phase realization
Chapter 3 - Z-Transform 3. 100
3.10.1 Direct Form Realization of FIR System
Consider the difference equation governing a FIR system,
If Z{x(n)} = X(z) then,
N−1
Z{x(n-k)} = z-k X(z)
y( n) = ∑ bm x( n − m)
m= 0
= b0 x( n) + b1 x( n − 1) + b2 x( n − 2) + ..... + b N −1 x( n − ( N − 1))
+ + + + + Y (z)
The individual second-order or first-order sections can be realized either in direct form structure or
linear phase structure. The overall system is obtained by cascading the individual sections as shown in
fig 3.23. The number of calculations and the memory requirement depends on the realization of individual
sections.
3. 101 Digital Signal Processing
X (z)
H 1 (z ) H 2 (z ) H m(z ) Y (z)
⇒
X (z) C 02
+ C 0M
+ Y (z)
C 01 +
−1 −1
−1 z z
z
+ +
C 11 C 12 C 1M
+
−1 −1
z z
−1
z
C 21 C 22 C 2M
Proof :
Let, N =7, \ h(n) = h(6n) Let, N =8, \ h(n) = h(7n)
n = 0, 1, 2, 3, 4, 5, 6 n = 0, 1, 2, 3, 4, 5, 6, 7
When n = 0; h(0) = h(6) When n = 0; h(0) = h(7)
When n = 1; h(1) = h(5) When n = 1; h(1) = h(6)
When n = 2; h(2) = h(4) When n = 2; h(2) = h(5)
When n = 3; h(3) = h(3) When n = 3; h(3) = h(4)
When the impulse response is symmetric, the samples of impulse response will satisfy the condition,
bn = bN-1-n
By using the above symmetry condition it is possible to reduce the number of multipliers required for
the realization of FIR system. Hence, the linear phase realization is also called realization with minimum
number of multipliers.
Consider the transfer function of FIR system,
Y(z)
H(z) = = b0 + b1 z−1 + b 2 z −2 + ..... + b N −1 z− ( N −1)
X(z)
The linear phase realization of the FIR system using the above equation for even and odd values of N
are discussed below.
Chapter 3 - Z-Transform 3. 102
Y(z)
H(z) = = b0 + b1 z−1 + b 2 z −2 + ..... + b N −1 z− ( N −1)
X(z)
N
−1
N −1 2 N −1 Dividing the summation of N
= ∑ bm z −m
= ∑ b m z− m + ∑Nbm z− m terms into two summations
m= 0 m= 0 m= with N/2 terms.
2
N N N
When, m = ; p = N − 1− = −1
2 2 2
When, m = N–1; p = N–1–(N–1) = 0
Let, m = p
N N
−1 −1 in the second
2 2
Y(z)
∴
X(z)
= ∑ bm z− m + ∑ bN −1− p z−( N −1− p) summation
m= 0 p= 0
N N
−1 −1
2 2
= ∑ bm z −m
+ ∑ bN −1− m z−( N −1− m)
m= 0 m= 0 Let, p = m
N N
−1 −1
2 2
= ∑ bm z− m + ∑ bm z− ( N −1− m) When impulse response
m= 0 m= 0 is symmetric,
N
−1 bm = bN-1-m
2
= ∑ b m z − m + z− ( N −1− m)
m= 0
−
FGN −2 IJ FGN −1IJ
z H 2 K X (z) −
H2 K
X (z ) X (z ) z −1X ( z) z −2 X ( z) z X (z)
−1 −1 −1
z z z
+ + + + + z −1
z −1 z −1 z −1
z −( N −1) X ( z ) z −( N −2 ) X ( z ) z −( N −3 ) X ( z ) GFN +1JI
− −
N
z H 2 K X (z) z 2 X (z)
b0 b1 b2 b M −1 bM
Y0 Y1 Y2 YN
2
−2 YN
−1
2
+ + + + Y (z )
∴ Y( z) = b 0 X( z) + z− ( N − 1) X( z) + b1 z −1 X( z) + z− ( N − 2)
X( z) + .....
LM FGH
−
N
2
− 2
IJ
K X( z) −
H 2 K X( z)OP
FG N + 1IJ LM FGH
−
N
2
−1
IJ
K X( z) −
N OP
+ bN + z + bN + z 2
2
− 2 MNz PQ 2
−1 MNz X( z)
PQ
When N is even, the above equation can be used to construct the direct form structure of linear phase
FIR system with minimum number of multipliers, as shown in fig 3.24. From the direct form linear phase
structure it is observed that the realization of an Nth order FIR discrete time system for even values of N
involves N/2 number of multiplications and N-1 number of additions. Also the structure involves N-1 delays
and so N-1 memory locations are required to store the delayed signals.
Case ii : When N is odd
N −1
Y(z)
H(z) =
X(z)
= b 0 + b1 z −1 + b 2 z −2 + ..... + b N −1 z − ( N −1) = ∑ b m z− m
m= 0
N−3
2 −
FG N −1IJ N −1
H 2K Dividing the summation of N
= ∑ b m z − m + b N −1 z + ∑N +b1m z− m terms into two summations
m= 0 2 m=
2
N −1
Let, p = N–1–m, \ m = N–1–p with terms.
2
N +1 N +1 N−3
When, m = ; p = N −1 − =
2 2 2
When, m = N–1 ; p = N–1 – (N–1) = 0
N− 3 N −3
Y(z) 2 −
FG N −1IJ 2
H 2K
∴
X(z)
= ∑ bm z −m
+ b N −1 z + ∑ b N −1− p z− ( N −1− p)
m= 0 2 p= 0
N −3 N−3
2 −
FG N −1IJ 2
H 2K
= ∑ bm z −m
+ b N −1 z + ∑ bN −1− m z− ( N −1− m)
m= 0 2 m= 0 Let, p = m
N−3 N−3
2 −
FG N −1IJ 2 When impulse response
H 2K
= ∑ bm z −m
+ b N −1 z + ∑ bm z− ( N −1− m) is symmetric,
m= 0 2 m= 0 bm = bN-1-m
N −3
−
FG N −1IJ 2
H 2K
= b N −1 z + ∑ bm z − m + z − ( N −1− m)
2 m= 0
F N −1IJ
−G
z H 2 K X( z) b g X( z) b g X( z)
− N −1) − N −2
∴ Y ( z ) = b N −1 + b 0 X ( z) + z + b1 z −1 X( z) + z +
2
LM −
FG N −5 IJ
H 2 K X( z) −
H 2 K X( z)OP
FG N + 3IJ LM −
FG N − 3 IJ
H 2 K X( z) −
FG N +1IJ
H 2K OP
..... + b N −5 z + z + b N −3 z + z X ( z)
2
MN PQ 2
MN PQ
When N is odd, the above equation can be used to construct the direct form structure of linear phase
FIR system with minimum number of multipliers, as shown in fig 3.25.
Chapter 3 - Z-Transform 3. 104
FGN −5 IJ
− FG N −3 IJ FG N −1 IJ
z
H 2 K X(z)
−
H 2 K X(z) −
H 2 K X(z)
X (z ) z z
1 −1 −1
z
−1
z− z z
+ + + +
−1 1 −1 −1
z z− z z
GFH N 2+3 JIK FGN +1 IJ
− FGN −1 IJ
−
z
H 2 K X(z) −
H2 K
z X(z) z X(z)
b N −5 b N −3 b N −1
2 2 2
Y N −5 Y N −3 Y N −1
2 2
2
+ + + + Y (z )
LM e FGN −1 IJ
Y 0 = b 0 X (z) + z −(N −1 ) X (z ) ; Y N −5 = b N −5 z
− N −5
2 j X (z) + z
e 2 j X (z) OP ;
− N −3
Y N −1 = b N −1 z
−
H2 K X (z )
2 2 MN PQ 2 2
From the direct form linear phase structure it is observed that the realization of an Nth order FIR
discrete time system for odd values of N involves (N+1)/2 number of multiplications and N-1 number of
additions. Also the structure involves N-1 delays and so N-1 memory locations are required to store the
delayed signals.
Example 3.34
Draw the direct form structure of the FIR system described by the transfer function,
1 −1 3 −2 5 −3 1 −4 7 −5
H(z) = 1 + z + z + z + z + z
2 8 4 2 8
Solution
Y(z) 1 −1 3 −2 5 −3 1 −4 7 −5
Let , H(z) = = 1 + z + z + z + z + z
X(z) 2 8 4 2 8
1 −1 3 5 1 7
∴ Y(z) = X(z) + z X(z) + z −2 X(z) + z −3 X(z) + z −4 X(z) + z −5 X(z) .....(1)
2 8 4 2 8
The direct form structure of FIR system can be obtained directly from equation (1).
1 3 5 1 7
2 8 4 2 8
1 −1 3 −2 5 −3 1 −4 7 −5
z X(z) z X(z) z X(z) z X(z) z X(z)
2 8 4 2 8
+ + + + + Y (z )
F ig 1 : D irect fo rm stru ctu re o f H (z).
3. 105 Digital Signal Processing
Example 3.35
Realize the following system with minimum number of multipliers.
1 1 −1 3 −2 1 −3 1 −4
a) H(z) = + z + z + z + z
4 2 4 2 4
1 1 −1 3 −2 3 −3 1 −4 1 −5
b) H(z) = + z + z + z + z + z
3 4 2 2 4 3
c) H(z) =
FG 1 +
1 −1 1 −2
z + z
IJ FG 1 +
1 −1 1 −2
z + z
IJ
H5 2 5 K H7 4 7 K
Solution
1 1 −1 3 −2 1 −3 1 −4
a) Given that, H(z) = + z + z + z + z ..... (1)
4 2 4 2 4
By the definition of Z-transform we get,
∝
H(z) = ∑ h(n) z −n
= h(0) + h(1) z −1 + h(2) z −2 + h(3) z −3 + ..... ..... (2)
n = 0
On comparing equations (1) and (2) we get,
+ +
z −1 z −1
−4
z X (z) z −3 X ( z )
3
1 1 4
4 2
3 −2
1 1 −1 z X(z )
X (z) + z −4 X (z ) z X (z ) + z −3 X (z) 4
4 2
+ + Y (z )
F ig 1 : L in ea r p h ase rea liza tio n o f H (z).
1 1 −1 3 −2 3 −3 1 − 4 1 −5
b) Given that, H(z) = + z + z + z + z + z
3 4 2 2 4 3
Y(z) 1 1 −1 3 −2 3 −3 1 −4 1 −5
Let , H(z) = = + z + z + z + z + z
X(z) 3 4 2 2 4 3
1 1 −1 3 −2 3 −3 1 1
∴ Y(z) = X(z) + z X(z) + z X(z) + z X(z) + z −4X(z) + z −5X(z)
3 4 2 2 4 3
1 1 −1 3
= X(z) + z −5 X(z) + z X(z) + z −4 X(z) + z −2 X(z) + z −3 X(z) .....(4)
3 4 2
Chapter 3 - Z-Transform 3. 106
The direct form realization z −1X(z) z −2 X(z)
of H(z) with minimum number of
X (z ) z −1 z −1
1 1 3
2 3 −2
3 4 z X(z) + z −3 X(z)
2
1 1 −1
X(z) + z −5 X(z) z X(z) + z −4 X(z)
3 4
+ + Y (z )
F ig 2 : L in e ar p h ase rea liza tio n o f H (z).
Y 1 (z)
X (z ) z −1 z −1
+ +
1 z −1 z −1
5 1
1 7 1
2 4
Y 1 (z)
+ + Y 1 (z)
H 1 (z) H 2 (z)
F ig 5 : C a sca de realiza tio n o f H (z).
3. 107 Digital Signal Processing
3.12 Short Questions and Answers Infinite geometric series sum formula,
∞
Q3.1 Find the Z-transform of an u(n). 1
∑ Cn =
1− C
; if , 0 < |C| < 1
By the definition of Z-transform, n = 0
∞ ∞
1 1 z
Z{an u(n)} = ∑
n= 0
an z − n = ∑
n= 0
(a z −1)n = = =
1 − az −1 1 − a / z z − a
n = −∞ n= 0
N−1
(b z −1)n =
−N N
1 − (b z −1)N 1 − bN z −N z z − b
N
d
z −N+1 zN − bN i d i
= ∑
n=0 1 − b z −1
=
1 − b z −1
=
z −1(z − b)
=
z−b
+∞
n 1 az z (z − a) + az z2
=z+a ∑ da z
n= 0
−1
i =z+a
1− a z −1
=z+
z−a
=
z−a
=
z−a
Q3.5 Determine the inverse Z-transform of X(z) = log (1 + az–1) ; |z| > |a|
Solution
Given that, X(z) = log (1 + az 1 ) ; |z| > |a|
Let, x(n) = Z1 {X(z)} Since ROC is exterior of a
circle of radius "a", the x(n)
By differentiation property of Z-transform we get,
should be a causal signal.
d
m
Z n x(n) = −z r dz
X(z)
d 1 a z −1
= −z log (1+ a z −1) = −z −1
( −a z −2 ) =
dz 1+ a z 1 + a z −1
a z −1 a z
= −1
= = a z −1
z (z + a ) z + a z − (−a) If Z{x(n)} = X(z)
∴ n x(n) = Z −1 RSa z −1 z UV
= a( −a)n−1 u(n − 1)
then by shifting property
T z − ( −a) W Z {x(n m} = zm X(z)
a
∴ x(n) = ( −a)n −1 u(n − 1)
n
Chapter 3 - Z - Transform 3. 110
2 z2
Q3.6 Determine x(0) if the Z-transform of x(n) is X(z) = .
(z + 3) (z − 4)
Solution
By initial value theorem of Z-transform,
2z2
x(0) = Lt X(z) = Lt
z →∞ z →∞ (z + 3) (z − 4)
2z2 2 2 2
= Lt = Lt =
z →∞
z 2 FG 1+
3IJ FG
1−
4 IJ
z →∞
1+
3
1−
FG
4
1+
3 IJ FG
1−
4 IJ FG IJ FG IJ = (1+ 0) (1 − 0) = 2
H z KH z K z zH ∞ KH
∞ K H KH K
Q3.7 Determine the Z-transform of x(n) = (n – 3) u(n).
Solution l q z z− 1
Z u(n) =
l q l q l
Z x(n) = Z (n − 3) u(n) = Z n u(n) − 3 u(n) q Zln x(n)q = −z
d
X(z)
dz
= Zln u(n)q − 3 Zlu(n)q u
d = v du − u dv
d F z I
= −z G J − 3 z z− 1 = −z
dz H z − 1K
z − 1− z
(z − 1)2
−
3z
z −1
v
Y(z) − 0.5 z −1Y(z) = X(z) + 0.4 z −1X(z) ⇒ Y(z) 1 − 0.5 z −1 = X(z) 1 + 0.4 z −1
Y(z) 1 + 0.4 z −1
∴ Transfer function, =
X(z) 1 − 0.5 z −1
Q3.9 The transfer function of a system is given by, H(z) = 1 – z –1. Find the response of the system
for any input, x(n).
Solution
Given that, H(z) = 1 z1
Y ( z)
We know that, H(z) =
X(z)
∴ Response in z - domain, Y(z) = H(z) X(z) = (1 − z −1) X(z) = X(z) − z −1 X(z)
l q n
∴ Response in time domain, y(n) = Z −1 Y(z) = Z −1 X(z) − z −1 X(z) = x(n) − x(n − 1) s
Q3.10 An LTI system is governed by equation, y(n) = –2 y(n – 2) – 0.5 y(n – 1) + 3 x(n – 1) + 5 x(n).
Determine the transfer function of the system.
Solution
Given that, y(n) = 2 y(n 2) 0.5 y(n 1) + 3 x(n 1) + 5 x(n)
On taking Z-transform of above equation we get,
Y(z) = −2 z −2 Y(z) − 0.5z −1 Y(z) + 3 z −1 X(z) + 5X(z)
3. 111 Digital Signal Processing
Y(z) 3z −1 + 5 5 z2 + 3 z
∴ Transfer function, H(z) = = −1 −2
= 2
X(z) 1 + 0.5 z + 2 z z + 0.5 z + 2
z−1
Q3.11 The transfer function of an LTI system is H(z) = . Determine the impulse response.
(z − 2) (z + 3)
Solution
z−1 A B
H(z) = = +
(z − 2) (z + 3) z − 2 z + 3
z−1 z −1 2−1 1
A= × (z − 2) z=2
= = =
(z − 2) (z + 3) z+3 z=2
2+3 5
z−1 z −1 − 3 − 1 −4 4
B= × (z + 3) z = −3
= = = =
(z − 2) (z + 3) z−2 z = −3
−3 − 2 −5 5
1 1 4 1
∴ H(z) = + z
5 z−2 5 z+3 n
Z an u(n) =s z−a
l q
Impulse response, h(n) = Z −1 H(z) = Z −1
RS 1 1
+
4 1 UV
T5 z−2 5 z+3 W o t
Z a(n−1) u(n − 1) = z −1
z
z−a
R1
=Z S z −1 −1 z 4
+ z −1
z UV
T5 z−2 5 z − (−3) W
1 (n −1) 4 1 (n −1)
= 2 u(n − 1) + ( −3)(n−1) u(n − 1) = 2 + 4 ( −3)(n−1) u(n − 1)
5 5 5
Q3.12 Determine the response of LTI system governed by the equation, y(n) – 0.5 y(n – 1) = x(n), for
input x(n) = 5n u(n), and initial condition y(–1) = 2.
Solution
z
Given that, x(n) = 5n u(n) ; l q
∴ X(z) = Z u(n) =
z−5
Given that, y(n) 0.5 y(n 1) = x(n),
Y(z) 2z − 5 A B
Let, = = +
z (z − 0.5) (z − 5) z − 0.5 z − 5
Chapter 3 - Z - Transform 3. 112
2z − 5 2 × 0.5 − 5 −4 40 8
A= × (z − 0.5) z = 0.5 = = = =
(z − 0.5) (z − 5) 0.5 − 5 −4.5 45 9
2z − 5 2× 5 − 5 5 50 10
B= × (z − 5) z = 5 = = = =
(z − 0.5) (z − 5) 5 − 0.5 4.5 45 9
Y(z) 8 1 10 1 8 z 10 z
∴ = + ⇒ Y(z) = +
z 9 z − 0.5 9 z−5 9 z − 0.5 9 z−5
l q
∴ Response, y(n) = Z −1 Y(z) = Z −1
RS 8 z
+
10 z UV
T9 z − 0.5 9 z−5 W n
Z an u(n) = s z
z−a
=
8
0.5n u(n) +
10 n
5 u(n) =
8
0.5n +
10 n LM
5 u(n)
OP
9 9 9 9 N Q
Q3.13 A signal x(t) = at is sampled at a frequency of 1/T Hz in the range –¥ < t < 0. Find the
Z-transform of the sampled version of the signal.
Solution
Given that, x(t) = at ; ¥ < t < 0
The sampled version of the signal x(nT) is given by, x(nT) = anT ; ¥ < nT < 0
1 1
Q3.14 The transfer function of a system is given by, H(z) = + . Determine the
1 − 0.5 z −1 1 − 2 z −1
stability and causality of the system for a) ROC : |z| > 2 ; b) ROC : |z| < 0.5.
Solution
a) ROC is |z| > 2
When ROC is |z| > 2, the impulse response h(n) should be right-sided signal.
When ROC is |z| < 0.5, the impulse response h(n) should be left-sided signal.
n= −∞ n=0
Y(z)
We know that, H(z) =
X(z)
d
∴ Y(z) = X(z) H(z) = −2 + 3z −1 + z −2 × 1 − z −1 + z −2 i d i
= −2 + 2z −1 − 2z −2 + 3z −1 − 3z −2 + 3z −3 + z −2 − z −3 + z −4
= −2 + 5z −1 − 4 z −2 + 2z −3 + z −4 .....(1)
By definition of Z - transform,
+∞
l q ∑ y(n) z
Y(z) = Z y(n) = −n
n= −∞
On expanding the above summation we get,
Y(z) =......+ y(0) + y(1) z −1 + y(2) z −2 + y(3) z −3 + y(4) z −4 +...... .
.....(2)
On comparing equations (1) and (2) we get,
y(0) = −2 ; y(1) = 5 ; y(2) = −4 ; y(3) = 2 ; y(4) = 1
m
∴ Response, y(n) = −2, 5, −4, 2, 1 r
Q3.17 Using Z-transform, perform deconvolution of response y(n) = −2, 5, −4, 2, 1 and impulse l q
l q
response h(n) = 1, −1, 1 , to extract the input x(n).
Solution
m
Given that, y(n) = −2, 5, −4, 2, 1 r
+∞ 4
l q ∑ y(n) z
Y(z) = Z y(n) = −n
= ∑ y(n) z −n
n= −∞ n=0
Y(z)
We know that, H(z) =
X(z)
Y(z) −2 + 5 z −1 − 4 z −2 + 2 z −3 + z −4
∴ X(z) = =
H(z) 1 − z −1 + z −2
− 2 + 3 z −1 + z −2
= −2 + 3 z −1 + z −2 . ....(1)
1 − z −1 + z −2 − 2 + 5z −1 − 4 z −2 + 2z −3 + z −4
By definition of Z - transform,
+∞
− 2(–)+ 2 z −1(+)− 2 z −2
(+)
l q ∑ x(n) z
X(z) = Z x(n) = −n
3 z −1 − 2 z −2 + 2z −3
n= −∞ 1 2
(–) 3 z −(+)− 3 z −(–) + 3z −3
On expanding the above summation we get,
z −2 − z −3 + z −4
X(z) =......+ x(0) + x(1) z −1 + x(2) z −2 + x(3) z −3 +.......
(–)
z −2(+)− z −3(–)+ z −4
.....(2)
0
On comparing equations (1) and (2) we get,
x(0) = −2 ; x(1) = 3 ; x(2) = 1
m
∴ Input, x(n) = −2, 3, 1 r
n
Q3.18 In an LTI system the impulse response h(n) = C for n £ 0. Determine the range of values of
C, for which the system is stable.
Solution
Given that, h(n) = C n for n £ 0.
+∞ 0 ∞ +∞
∴ ∑ h(n) = ∑ C = ∑ C
n = −∞ n = −∞
n
n= 0
−n
=
n= 0
∑ (C −1 n
)
+∞
1
If , 0 < C −1 < 1, then ∑ (C
n= 0
−1 n
) =
1 − C −1
+∞
−1
If , C > 1, then ∑ (C
n= 0
−1 n
) =∞
1
∴ For stability, C −1 < 1 ⇒ <1 ⇒ C >1
C
Q3.19 Using Z-transform, determine the response of the LTI system with impulse response
h(n) = 0.4 n u(n), for an input x(n) = 0.2n u(n).
Solution
Given that, x(n) = 0.2n u(n).
z
l q n
∴ X(z) = Z x(n) = Z 0.2n u(n) = s z − 0.2
l q
Response, y(n) = Z −1 Y(z) = Z −1 −
RS z
+2
z UV
T z − 0.2 z − 0.4 W
= −(0.2)n u(n) + 2 (0.4)n u(n) = 2 (0.4)n − (0.2)n u(n)
Q3.20 Using Z-transform perform deconvolution of response, y(n) = 2 (0.4)n u(n) – (0.2)n u(n) and
impulse response, h(n) = 0.4n u(n), to extract the input x(n).
Solution
Given that, y(n) = 2 (0.4)n u(n) (0.2)n u(n)
l q o
∴ Y(z) = Z y(n) = Z 2 (0.4)n u(n) − (0.2)n u(n) t
2z z 2 z (z − 0.2) − z (z − 0.4) 2 z2 − 0.4 z − z2 + 0.4 z z2
= − = = =
z − 0.4 z − 0.2 ( z − 0.4) (z − 0.2) ( z − 0.4) (z − 0.2) ( z − 0.4) (z − 0.2)
Given that, h(n) = 0.4n u(n)
z
l q o
∴ H(z) = Z h(n) = Z 0.4n u(n) = t z − 0.4
Y(z)
We know that, H(z) =
X(z)
Y(z) 1 z2 z − 0.4 z
∴ X(z) = = Y(z) × = × =
H(z) H(z) (z − 0.4) (z − 0.2) z z − 0.2
l q
∴ Input, x(n) = Z −1 X(z) = Z −1
z RS
= 0.2n u(n)
UV
z − 0.2 T W
Q3.21 Obtain the transfer function for the following structure.
X (z ) W (z) Y (z )
0.2 + +
−1
z
+ −0.4 0 .4 +
−1
z
0.5 0 .2
Chapter 3 - Z - Transform 3. 116
Solution
The following z-domain equations can be obtained from the given direct form-II structure.
W(z) = −0.4 z −1W(z) + 0.5z −2W(z) + 0.2 X(z)
W(z) 0.2
∴ W(z) + 0.4 z −1W(z) − 0.5z −2W(z) = 0.2 X(z) ⇒ =
X(z) 1+ 0.4 z −1 − 0.5 z −2
Y(z)
Y(z) = W(z) + 0.4 z −1W(z) + 0.2 z −2W(z) ⇒ = 1 + 0.4 z −1 + 0.2z −2
W(z)
The given direct form-II digital network can be realized by the transfer function,
Y(z) W(z) Y(z) 0.2 (1 + 0.4 z −1 + 0.2z −2 )
= × =
X(z) X(z) W( z ) 1 + 0.4 z −1 − 0.5 z −2
Q3.22 Realize the following FIR system with minimum number of multipliers.
h(n) = { –0.5, 0.8, –0.5 }
−1
Solution X (z ) −1 z X(z)
z
Given that, h(n) = {0.5, 0.8, 0.5 }
On taking Z- transform, +
∞ 2
H(z) = ∑ h(n) z −n
= ∑ h(n) z −n
−2
z X(z)
z
−1
n =0 n =0
−0.5
= h(0) + h(1) z −1 + h(2) z −2 = −0.5 + 0.8 z −1 − 0.5z −2 0.8
Y(z)
Let , H(z) = = −0.5 + 0.8 z −1 − 0.5 z −2 +
X(z) Y (z )
−1 −2
F ig Q 3 .2 2 : L in ea r p h ase
∴ Y(z) = −0.5 X(z) + 0.8 z X(z) − 0.5z X(z) rea liza tio n .
= −0.5 [ X(z) + z X(z) ] + 0.8 z −1 X(z)
−2
The linear phase structure is drawn using the above equation as shown in fig Q3.22.
Q3.23 The transfer function of an IIR system has 'Z' number of zeros and 'P' number of poles. How
many number of additions, multiplications and memory locations are required to realize the
system in direct form-I and direct form-II.
The realization of IIR system with Z zeros and P poles in direct form-I and II structure, involves Z+P
number of additions and Z+P+1 number of multiplications. The direct form-I structure requires Z+P
memory locations whereas the direct form-II structure requires only P number of memory locations.
Q3.24 What are the factors that influence the choice of structure for realization of an LTI system?
The factors that influence the choice of realization structure are computational complexity, memory
requirements, finite word length effects, parallel processing and pipelining of computations.
Q3.25 Draw the direct form-I structure of second-order IIR system with equal number of poles
and zeros.
X (z) + Y (z)
b0 +
x (n ) y (n )
−1 −1
z z
+
b1 + −a 1
−1 −1
z z
b2 −a 2
x (n ) + y (n ) x (n ) + y (n )
+ +
−1 −1 −1
z z z z
−1
b1 a1 b1 a1
a1 b1
H2 H1 a1 b1
Q3.27 What is the advantage in cascade and parallel realization of IIR systems ?
In digital implementation of LTI system the coefficients of the difference equation governing the
system are quantized. While quantizing the coefficients the value of poles may change. This will
end up in a frequency response different to that of desired frequency response.
These effects can be avoided or minimized, if the LTI system is realized in cascade or parallel
structure. [i.e, The sensitivity of frequency response characteristics to quantization of the
coefficients is minimized]
Q3.28 Compare the direct form-I and II structures of an IIR systems, with M zeros and N poles.
Direct form-I Direct form-II
1. Separate delay for input and output. 1. Same delay for input and output.
2. M + N + 1 multiplications are involved. 2. M + N + 1 multiplications are involved.
3. M + N additions are involved. 3. M + N additions are involved.
4. M + N delays are involved. 4. N delays are involved.
5. M + N memory locations are required. 5. N memory locations are required.
6. Noncanonical structure. 6. Canonical structure.
Chapter 3 - Z - Transform 3. 118
Q3.29 Compare the direct form and linear phase structures of an Nth order FIR system.
Direct form Linear phase
clear all
syms n T a real; %Let n, T, a be real variable
syms z complex; %Let z be complex variable
%(a)
x = n;
disp((a) z-transform of n is);
ztrans(x)
%(b)
x = a^n;
disp((b) z-transform of a^n is);
ztrans(x)
%(c)
x=n*(a^n);
disp((c) z-transform of n(a^n) is);
ztrans(x)
%(d)
x=exp(-a*n*T);
disp((d) z-transform of exp(-a*n*T) is);
ztrans(x)
OUTPUT
(a) z-transform of n is
ans =
z/(z-1)^2
(b) z-transform of a^n is
ans =
z/a/(z/a-1)
3. 119 Digital Signal Processing
(c) z-transform of n(a^n) is
ans =
z*a/(z-a)^2
(d) z-transform of exp(-a*n*T) is
ans =
z/exp(-a*T)/(z/exp(-a*T)-1)
Program 3.2
Write a MATLAB program to find Z-transform of the following causal signals.
a) 0.5n b) 1+n(0.4)(n-1)
%(a)
x1=0.5^n;
disp((a) z-transform of 0.5^n is);
X1=ztrans(x1)
%(b)
x2=1+n*(0.4^(n-1));
disp((b) z-transform of 1+n*(0.4^(n-1)) is);
X2=ztrans(x2)
OUTPUT
(a) z-transform of 0.5^n is
X1 =
2*z/(2*z-1)
(b) z-transform of 1+n*(0.4^(n-1)) is
X2 =
z/(z-1)+25*z/(5*z-2)^2
Program 3.3
Write a MATLAB program to find inverse Z-transform of the following z-domain
signals.
a) 1/(1-1.5z -1+0.5z -2) b) 1/((1+z-1)(1-z-1)2)
X=1/(1-1.5*(z^(-1))+0.5*(z^(-2)));
disp(Inverse z-transform of 1/(1-1.5z^-1+0.5z^-2)is);
x=iztrans(X,z,n);
simplify(x)
X=1/((1+(z^(-1)))*((1-(z^(-1))^2)));
disp(Inverse z-transform of 1/((1+z^-1)*(1-z^-1)^2))is);
x=iztrans(X,z,n);
simplify(x)
OUTPUT
Inverse z-transform of 1/(1-1.5z^-1+0.5z^-2) is
ans =
2-2^(-n)
Inverse z-transform of 1/((1+z^-1)*(1-z^-1)^2)) is
ans =
3/4*(-1)^n+1/2*(-1)^n*n+1/4
Chapter 3 - Z - Transform 3. 120
Program 3.4
Write a MATLAB program to perform convolution of signals,x1(n)= (0.4)nu(n) and
x 2 (n)=(0.5) n u(n),using Z-transform, and then to perform deconvolution using the
result of convolution to extract x1(n) and x2(n).
clear all;
syms n z
x1n=0.4^n;
x2n=0.5^n;
X1z=ztrans(x1n);
X2z=ztrans(x2n);
X3z=X1z*X2z; %product of z-transform of inputs
con12=iztrans(X3z);
disp(Convolution of x1(n) and x2(n) is);
simplify(con12) % convolution output
decon_X1z=X3z/X1z;
decon_x1n=iztrans(decon_X1z);
disp(The signal x1(n) obtained by deconvolution is);
simplify(decon_x1n)
decon_X2z=X3z/X2z;
decon_x2n=iztrans(decon_X2z);
disp(The signal x2(n) obtained by deconvolution is);
simplify(decon_x2n)
OUTPUT
Convolution of x1(n) and x2(n) is
ans =
5*2^(-n)-4*2^n*5^(-n)
The signal x1(n) obtained by deconvolution is
ans =
2^(-n)
The signal x2(n) obtained by deconvolution is
ans =
2^n*5^(-n)
Program 3.5
Write a MATLAB program to find residues and poles of z-domain signal,
(3z 2 +2z+1)/(z 2 -3z+2)
%*** Program to find partial fraction expansion of rational
% function of z
clear all
H=tf(z);
Ts=0.1;
b=[3 2 1 ]; %Numerator coefficients
a=[1 -3 2]; %Denominator coefficients
disp(The given transfer function is,);
H=tf([b], [a],Ts)
disp(The residues, poles and direct terms of given TF are,);
disp((r - residue ; p - poles ; k - direct terms));
[r,p,k]=residue(b,a)
disp(The num. and den. coefficients extracted from r,p,k,);
[b,a]=residue(r,p,k)
3. 121 Digital Signal Processing
OUTPUT
The given transfer function is,
Transfer function:
3 z^2 + 2 z + 1
---------------
z^2 - 3 z + 2
Sampling time: 0.1
The residues, poles and direct terms of given TF are,
(r - residue ; p - poles ; k - direct terms)
r =
17
-6
p =
2
1
k =
3
The num. and den. coefficients extracted from r,p,k are,
b =
3 2 1
a =
1 -3 2
Program 3.6
Write a MATLAB program to find poles and zeros of z-domain signal,
(z2+0.8z+0.8)/(z2+0.49), and sketch the pole zero plot.
H=tf(z);
Ts=0.1;
H=tf([num_coeff],[den_coeff],Ts);
zgrid on;
pzmap(H); %Pole-zero plot
OUTPUT
Roots of numerator polynomial z^2+0.8z+0.8 are zeros.
zeros =
-0.4000 + 0.8000i
-0.4000 - 0.8000i
Roots of denominator polynomial z^2+0.49 are poles.
poles =
0 + 0.7000i
0 - 0.7000i
The pole-zero plot is shown in fig P3.6.
Chapter 3 - Z - Transform 3. 122
Program 3.7
Write a MATLAB program to compute and sketch the impulse response of discrete
time system governed by transfer function, H(z)=1/(1-0.8z-1+0.16z2).
H=1/(1-0.8*(z^(-1))+0.16*(z^(-2)));
disp(Impulse response h(n) is);
h=iztrans(H); %compute impulse response
simplify(h)
N=15;
b=[0 0 1]; %numerator coefficients
a=[1 -0.8 0.16]; %denominator coefficients
[H,n]=impz(b,a,N); %compute N samples of impulse response
3.14 Exercises
I. Fill in the blanks with appropriate words
1. The –––––––– of X(z) is the set of all values of z, for which X(z) attains a finite value.
2. The transformation –––––– maps the s-plane into z-plane.
3. The ––––– of s-plane can be mapped into the ––––– of the unit circle in z-plane.
4. The ratio of Z-transform of output to Z-transform of input is called _______ of the system.
5. In the mapping z =esT, the _______ poles of s-plane are mapped into _______ of unit circle in z-plane.
6. In impulse invariant mapping the _______ poles of s-plane are mapped into _______ of unit circle
in z-plane.
7. In impulse invariant mapping the poles on the imaginary axis in s-plane are mapped on the _______ in
z-plane.
8. In _______ transformation any strip of width 2p/T in s-plane is mapped into the entire z-plane.
9. The phenomena of high frequency components acquiring the identity of low frequency components is
called _______.
10. For a causal LTI discrete time system the ROC should be _______ the circle of radius whose value
corresponds to pole with _______ magnitude.
11. If X(z) is rational, then the ROC does not include _______ of X(z).
12. The sequences multiplied by u(–n) are _______ and defined for _______.
13. The inverse Z-transform of transfer function is _______ of the system.
14. If Z-transform of x(n) is X(z), then Z-transform of x*(n) is _______.
15. The Z-transform of a shifted signal, shifted by 'q' units of time is obtained by _______ to Z-transform of
unshifted signal.
16. In IIR systems, the ___________ structure will give direct relation between time domain and z-domain.
17. When number of delays is equal to order of the system, the structure is called ___________.
18. The direct form realization of IIR system with M zeros and N poles involves ___________ multiplications.
19. The direct form-II realization of Nth order IIR system requires ___________ delays and memory locations.
20. The direct form realization of Nth order FIR system involves ___________ additions.
21. ___________ realization is called realization with minimum number of multipliers
Chapter 3 - Z - Transform 3. 124
Answers
1. region of convergence 8. impulse invariant 15. multiplying zq
2. s = (1/T) ln z 9. aliasing 16. direct form-I
3. left half, interior 10. outside, largest 17. canonic structure
4. transfer function 11. poles 18. M + N + 1
5. left half, interior 12. anticausal sequences, n £ 0 19. N
6. right half, exterior 13. impulse response 20. N – 1
7. unit circle 14. X*(z*) 21. linear phase
o t
10. If Z{x(n)} = X(z), then Z n m x(n) = − z
FG d IJ m
X(z) .
H dz K
11. The direct form-I structure of IIR system employs same delay for input and output samples.
12. In direct form-II realization of IIR system, N memory locations are required to store delayed signals.
13. In parallel or cascade realization, the memory requirement depends on realization of individual sections.
14. Scaling multipliers has to be provided between individual sections of cascade structure.
15. The linear phase realization of Nth order FIR system for odd values of N involves N/2 multiplications.
16. For linear phase realization of FIR system, the impulse response should be symmetric.
Answers
1. True 5. False 9. False 13. True
2. True 6. True 10. False 14. True
3. False 7. True 11. False 15. False
4. True 8. False 12. True 16. True
3. 125 Digital Signal Processing
III. Choose the right answer for the following questions
−a n an a n −1
a) x(n) = u(n) b) x(n) = u(n) c) x(n) = u(n − 1) d) none of the above
n! n! n!
7. The Z-transform of x(n) = [u(n) – u(n – 3)], for ROC |z| > 1 is,
z − z −3 z −2 z − 4z−2 + 3 z −3 z − z −2
a) X(z) = b) X(z) = c) X(z) = d) X(z) =
z −1 (z − 1) 2 (z − 1)2 z −1
z3 − 2 z2 + z
8. The system function H(z) = is,
z 2 + 0.25 z + 0.125
a) causal b) noncausal c) unstable but causal d) cannot be defined
9. If all the poles of the system function H(z) have magnitude smaller than 1, then the system will be,
a) stable b) unstable c) BIBO stable d) a and c
l q
10. If x(n) = 0.5, −0.25, 1 , then Z-transform of the signal is,
z2 z2 0.5 z2 − 0.25 z + 1 2 z2 + 4 z + 1
a) 2
b) 2
c) d)
0.5 z − 0.25z + 1 z − 0.5 z + 0.25 z2 z2
11. The ROC of the signal x(n) = an for –5 < n < 5 is,
a) entire z-plane b) entire z-plane except z = 0 and z = ¥
c) entire z-plane except z = 0 d) entire z-plane except z = ¥
12. If Z-transform of x(n) is X(z) then Z-transform of x(–n) is,
a) –X(z) b) X(–z) c) –X(z –1) d) X(z–1)
Chapter 3 - Z - Transform 3. 126
13. The inverse Z-transform of X(z) can be defined as,
a) x(n) =
1
2π czX( z) z n −1 dz b) x(n) =
1
2j czX( z) z n −1 dz
c) x(n) =
1
z
2 πj c
X( z) z n −1 dz d) x(n) =
1
2 πj c z
X( z) z − n dz
a)
1
z
X1 ( z) X*2
FG IJ
1 −1
z dz b)
1
z 1 FG IJ
X1 ( z) X2 * z −1 dz
2π c z HK 2π c z H K
c)
1
z * F 1I
X ( z) X G J z −1
dz d)
1
z F 1I
X ( z) X G J z * −1
dz
2 πj c
1 2
Hz K
*
2π c
1
Hz K 2 *
18. For a stable LTI discrete time system poles should lie ––––– and unit circle should be ––––––– .
a) outside unit circle, included in ROC b) inside unit circle, outside of ROC
c) inside unit circle, included in ROC d) outside unit circle, outside of ROC
n
19. An LTI system with impulse response, h(n) = (–a) u(n) and –a < –1 will be,
a) stable system b) unstable system
c) anticausal system d) neither stable nor causal
20. If X(z) has a single pole on the unit circle, on negative real axis then, x(n) is,
a) signed constant sequence b) signed decaying sequence
c) signed growing sequence d) constant sequence
n
21. The Z-transform of x(n) = –na u(–n – 1) is,
az a z(z + a) a z −1
a) X(z) = b) c) X(z) = d) both a and c
( z − a)2 ( z − a)3 (1 − a z−1 )2
Z Z
22. The ROC for x(n) ¬ ® X(z) is R1, then ROC of an x(n) ¬ ® X az is,
e j
-1
Z Z -1
R1 1
a) b) aR1 c) R1 d)
a R1
23. The Z-transform of a ramp function x(n) = n u(n) is,
z −z
a) X(z) = ; ROC is z > 1 b) X( z) = ; ROC is z > 1
(z − 1) 2 ( z − 1) 2
z −z
c) X( z) = ; ROC is z < 1 d) X( z) = ; ROC is z < 1
( z − 1) 2 ( z − 1) 2
3. 127 Digital Signal Processing
24. By impulse invariant transformation, if x(nT) is sampled version of x(t), then Z{x(nT)} is,
l
a) L x(nT) q z = e sT
b) L−1 x(nT) l q z = e − sT
l
c) L x(nT) q z = e − sT
l
d) L−1 x(nT) q z = e sT
LM
25. The Z-transform of x(n) = sin
π OP
n u(n) is,
N 2 Q
z z2 1 z
a) b) c) d)
z +1 2
z +1 z +1 z2 + 1
26. The factor that influence the choice of realization of structure is,
a) memory requirements b) computational complexity
c) parallel processing and pipelining d) all the above
27. The structure that uses separate delays for input and output samples is,
a) direct form-II b) direct form-I
c) cascade form d) parallel form
28. The linear phase realization structure is used to represent,
a) FIR systems b) IIR systems
c) both FIR and IIR systems d) all discrete time systems
29. The effect of quantization of coefficients on the frequency response is minimized in,
a) cascade realization b) parallel realization
c) direct form structure d) both a and b
30. The direct form-I and II structures of IIR system will be identical in,
a) all pole system b) all zero system
c) both a and b d) first-order and second-order systems
31. The condition for symmetry of impulse response of FIR system is,
a) h(n) = h(N–1) b) h(n) = h(N+1)
c) h(n) = h(N–n) d) h(n) = h(N–1–n)
32. The linear phase realization is used in FIR systems in order to minimize,
a) multipliers b) memory c) delays d) adders
33. Which one of the following FIR system has linear phase response?
a) y(n) = 0.4 x(n) + 0.1 x(n–1) + 0.5 x(n–2) b) y(n) = 0.3 x(n) + x(n–1) + 3.0 x(n–2)
c) y(n) = 0.5 x(n) + 0.7 x(n–1) d) y(n) = 0.6x(n) + 0.6 x(n–1)
34. The quantization error increases, when the order of the system 'N' increases in case of,
a) direct form realization b) cascade or parallel form realization
c) all IIR systems d) all FIR systems
1 + z −2 + 2z −3
35. The number of memory locations required to realize the system, H(z) = is,
1 + z −2 + z −4
a) 8 b) 7 c) 2 d) 10
Chapter 3 - Z - Transform 3. 128
36. Number of multipliers and adders required for direct form realization of Nth order FIR system are,
a) N, N+1 b) N, N–1 c) N+1, N d) N–1, N+1
37. The realization of linear phase FIR system for odd values of 'N' needs,
N N +1
a) multipliers b) multipliers c) N–1 multipliers d) N multipliers
2 2
Answers
1. c 7. d 13. c 19. a 25. d 31. d 37. b
2. a 8. b 14. b 20. a 26. d 32. a
3. b 9. a 15. b 21. d 27. b 33. d
4. d 10. c 16. b 22. a 28. a 34. a
5. c 11. b 17. c 23. a 29. d 35. b
6. b 12. d 18. c 24. a 30. c 36. b
l
a) x(n) = 4, 2, 8, 5 q l
b) x(n) = 3, 0, 0, 4, 45, 1 q
A A
c) x(n) = l2, 1, 1, 2, 5, 8, 2 q d) x(n) = −0.2 n u(n − 1)
A n
e) x(n) = (0.6) n u(n) + (0.7) n u( − n − 1) f) x(n) = (0.9)
E3.2 Find the one-sided Z-transform of the following discrete time signals.
a) x(n) = n 2 5n u(n) b) x(n) = n(0.5) n+4 c) x(n) = (0.5) n − 2 u(n) − u( n − 2)
E3.3 Find the one-sided Z-transform of the discrete signals generated by mathematically sampling
the following continuous time signals.
a) x(t) = 4 t e−0.6 t u(t) b) x(t) = 2 t 3 u(t)
E3.4 Find the time domain initial value x(0) and final value x(¥ ) of the following z-domain functions.
0.5 z3
a) X(z) = 2 b) X(z) =
e je
1 − z −1 1 + z−1 j b ge
z − 1 z2 − 0.2 j
E3.5 Determine the inverse Z-transform of the following functions using contour integral method.
a) X(z) =
b2z − 1g z b) X(z) =
z2 + z
c) X(z) =
(1 − e − a ) z
2
( z − 1) ( z − 2) 2 ( z − 1) ( z − e − a )
E3.6 Determine the inverse Z-transform of the following functions by partial fraction method.
z2 2 z2 − z z ( z2 + 3)
a) X(z) = b) X(z) = c) X(z) =
( z + 1) ( z + 2) 2 z − 5z2 + 8z − 4
3 ( z2 + 1) 2
2 − z −1
E3.7 Determine the inverse Z-transform of the function, X(z) =
LM1 − 1 z OP LM1 − 1 z OP
−1 −1
N 4 QN 3 Q
1 1 1 1
a) ROC : z > , b) ROC : z < , c) ROC : < z < .
3 4 4 3
Chapter 3 - Z - Transform 3. 130
E3.8 Determine the inverse Z-transform of the following function using power series method.
z
X(z) =
2 z2 − 3z + 1
a) ROC : z < 0.5, b) ROC : z > 1
E3.9 Determine the inverse Z-transform for the following functions using power series method.
1 −1
z 1− 1
z2 + z b) X(z) = 3 ; ROC : z >
a) X(z) = 2 ; ROC : z > 1 1 −1
z − 2z + 1 1+ z 3
3
E3.10 Determine the transfer function and impulse response for the systems described by the following
equations.
7 5
a) y(n) + 2 y( n − 1) − 3 y( n − 2) = x( n − 1) b) y(n) − y( n − 1) + y( n − 2) = 2 x( n)
4 8
c) y(n) = 0.2 x(n) − 5x( n − 1) + 0.6 y( n − 1) − 0.08 y( n − 2)
3 2
d) y(n) − y(n − 1) = x( n) + x( n − 1)
2 3
z (6 z − 8)
E3.11 A discrete time LTI system is characterized by the transfer function, H(z) = .
FG z−
1 IJ(z − 3)
H 2 K
Specify the ROC of H(z) and determine h(n) for the system to be, (i) stable, (ii) causal.
E3.12 Determine the unit step response of the discrete time LTI system, whose input and output
relation is described by the difference equation, y(n) + 7 y(n–1) = x(n), where the initial condition
is, y(–1) = 1.
E3.13 Determine the response of discrete time LTI system governed by the following difference
equation, 4 y(n) + 5 y(n –1) + y(n – 2) = x(n) ; with initial conditions, y(–2) = –2 and y(–1) = 1,
a f
n
for the input x(n) = 0.5 u(n).
E3.14 An LTI system has the impulse response h(n) defined by h(n) = x1 (n − 1) * x2 (n) .The Z-transform
of the two signals x1(n) and x2(n) are X1(z) = 2– 4z–1 and X2(z) = 1 + 5z –2 respectively. Determine
the output of the system for the input d( n – 1).
E3.15 Obtain the direct form-I, direct form-II, cascade and parallel form realizations of the LTI
system governed by the equation,
3 1 1
y(n) = − y(n − 1) + y(n − 2) + y(n − 3) + x(n) + 4x(n − 1) + 3x(n − 2)
4 2 4
E3.16 Realize the direct form-I, II structures of the IIR system represented by the transfer function,
(z + 5)
H(z) =
(z + 0.4) (z + 0.5) (z + 0.6)
E3.17 Determine the direct form-I, II, cascade and parallel realization of the following LTI system.
(z 3 − 8z 2 + 13z − 5)
H(z) =
(z − 0.75) (z 2 + z − 0.25)
3. 131 Digital Signal Processing
E3.18 Realize the cascade and parallel structures of the system governed by the difference equation,
3 1 1
y(n) − y(n − 1) − y(n − 2) = x(n) + x(n − 1)
10 10 9
E3.19 Draw the direct form structure of the FIR systems described by the following equations,
1 1 1 1
a) y(n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)
2 4 6 8
b) y(n) = 0.2 x(n) + 0.25 x(n − 1) + 0.3x(n − 2) − 0.35x(n − 3)
− 0.4 x(n − 4) − 0.45x(n − 5) − 0.5x(n − 6)
E3.20 Realize the following FIR systems with minimum number of multipliers.
a) H(z) = 0.2 + 0.4z−1 + 0.6z −2 + 0.4z −3 + 0.2z −4
FG
1 1 IJ FG
b) H(z) = 0.3 + z −1 + 0.3 z −2 0.5 − z −1 + 0.5z−2
IJ
H
9 7 KH K
1 3 3 3 1
c) y(n) = − x(n) + x(n − 1) + x(n − 2) + x(n − 3) − x(n − 4)
8 4 2 4 8
Answers
2 8 5
E3.1 a) X(z) = 4 + + 2+ 3 b) X(z) = 3 z5 + 4 z2 + 45 z + 1
z z z
ROC is entire z - plane except at z = 0. ROC is entire z - plane except at z = ∞.
c) X(z) = 2 z3 + 1 z2 + z + 2 + 5z −1 + 8z −2 + 2 z−3
ROC is entire z - plane except at z = 0 and z = ∞.
−0.2
d) X(z) = ; ROC is exterior of the circle of radius 0.2 in z - plane.
z − 0.2
−0.1z
e) X(z) = ; ROC is 0.6 < z < 0.7
(z − 0.6) (z − 0.7)
−0.21z
f) X(z) = ; ROC is 0.9 < z < 111
.
(z − 0.9) (z − 111
. )
E3.3 a) X(z) =
4 zT e −0.6T
b) X(z) =
d
2 T3 z z2 + 4 z + 1 i
( z − e−0.6T ) 2 ( z − 1)4
E3.4 a) Initial value, x(0) = 0.5 b) Initial value, x(0) = 1
Final value, x( ∞) = ∞ Final value, x(∞) = 1.25
E3.5 a) x(n) = n + 2 u(n) b) x(n) = (n + 1) 2 n u(n) + n 2 (n −1) u(n − 1)
e
c) x(n) = 1 − e − an u(n) j
E3.6 a) x(n) = ( −2) n − ( −1) n − n( −2) n u(n) b) x(n) = 1 + (1.5n − 1)2 n u(n)
c) x(n) =
LM j( − j) n
− jn +
n OP
( − j) n − jn u(n)
N 2j Q
Chapter 3 - Z - Transform 3. 132
LM F 1 I − 4 F 1I OP u(n)
n n
E3.7
MN GH 4 JK GH 3JK PQ
a) x(n) = 6
L F 1 I F 1I O
n
b) x(n) = M−6 G J + 4 G J P u( − n − 1)
n
MN H 4 K H 3K PQ
F 1I n
F 1I
c) x(n) = 6G J u(n) + 4 G J u( − n − 1)
n
H 4K H 3K
E3.8 l
a) x(n) .....31, 15, 7, 3, 1 q RS 1 , 3 , 7 , 15 , 31 ,......UV
b) x(n) = 0,
A TA 2 4 8 16 32 W
E3.9 l
a) 1, 3, 5, 7,...... q R 2 2 , −2 , 2 , ......UV
b) x(n) = S1, − ,
A TA 3 9 27 81 W
z 1
E3.10 a) H(z) = ; h(n) = 1 − ( −3) n u(n)
z2 + 2 z − 3 4
2 z2 1 1 5 LM F I n
FG IJ OP
n
b) H(z) =
2 7
z − z+
5
; h(n) =
3
−4
2
+ 10
4 MN GH JK
u(n)
H K PQ
4 8
0.2 z2 − 5z
c) H(z) = 2 ; h(n) = 24.8 (0.2) n − 24.6 (0.4) n u(n)
z − 0.6 z + 0.08
2
1 + z −1
d) H(z) = 3 ; h(n) =
3
n
u(n) +
2 3 FG IJ
n −1
u(n − 1)
FG IJ
3
1 − z −1 2 3 2 HK HK
2
E3.11 i) Stable system
E3.14 l
y1 (n) = 0, 0, 2, −4, 10, −20 q
A
3. 133 Digital Signal Processing
E3.15 X (z ) Y (z ) X (z ) W (z) Y (z )
+ + + +
−1 3 −1 −1
z 3 −1 z
−1
z
4z
−1
X (z ) − z Y(z) − z W (z ) 4z
−1
W (z)
4 4 −1
−1 3 3 z W ( z)
z X( z ) 4 + + −
4 z
−1
Y( z ) + −
4
4 +
−1 −1 −1
z 1 −2 z 1 −2 z
z Y(z) z W (z ) −2
−2 3z
−2
X( z ) 2 2 3z W (z )
z X( z ) 1 −2 1 z −2 W ( z)
3 + 2
z Y( z ) + 2 3
1 −3 −1 1 −3 −1
z Y(z) z z W (z) z
4 4 z −3
W ( z)
1 −3
1
4 z Y ( z) 4
X (z ) W1( z ) Y (z )
+ + +
−1 −1
z z
−1 −1
0.64z W1(z) 0.39z Y(z)
z − W1(z)
1
0.64 0.39
H1( z ) H2 ( z)
F ig E 3 .1 5 .3 : C a sca de stru ctu re.
E3.16
X (z ) Y 1(z ) Y (z )
+ + X (z ) Y (z )
+
0.64z −1 Y1 (z ) z −1
−1 −1 −1
z −1.5z Y (z) z
0.64
H 1 (z) −1
z X(z ) + −1.5 z −1Y (z )
−1 −1
z −2 z
Y 2 (z) −0.74z Y (z)
+ +
z −2 X (z ) + z −2 Y (z)
+ −0.74
−1
−0.39z −1 Y 1(z ) z
−1 −3 −1
z −0.12z Y (z ) z
−0.39 −3
z X (z) z −3 Y (z )
5 −0.12
H 2 (z )
F ig E 3 .1 6 .1 : D irect fo rm -I stru ctu re.
−1
−2 z
−0.74z W (z )
z −2 W (z )
+ +
−3 −1
−0.12z W (z) z
z −3 W (z ) 5z −3 W (z)
−0.12 5
E3.17
X (z ) Y (z ) X (z ) W(z) Y (z )
+ + + +
−1 z
−1 −0.25 z −1W(z) z
−1
z −8 z −1X(z) −0.25 z −1Y(z) −8z −1W(z)
−1
z W( z)
−1
z X( z) −8 + + −0.25 −1
z Y(z)
+ −0.25 −8 +
−1 −1 −1
z z z
13 z −2 X(z) z −2 Y(z) 13z −2 W(z)
z −2 W (z)
z −2 X(z) 13 + + 1 z −2 Y(z) + 1 13 +
−3 −1 −1
z
−1 −0.1875z Y(z) z −3
−0.1875 z W( z) z
−5 z −3 X(z ) −5z −3 W( z)
z −3 X( z) −3 z −3 W(z)
−5 z Y(z) −5
−1
z
H1(z) 0.25z −2 W2 (z) 5z
−2
W2 (z)
0.25 5
H2 (z)
F ig E .3 .1 7.3 : C a sca d e struc tu re.
X (z ) Y 1 (z) Y (z )
1 +
H 1 (z)
Y 2 (z)
+ W2 (z)
−1
z
H 2 (z) 0.75 z −1 W2 (z) 0.63 z −1 W2 (z)
0.75 0.63
Y 3 (z)
+ W3 (z)
−1
z
−z −1
W3 (z) −8.88 z −1 W3 (z)
+ −1 +
H 3 (z)
−1
0.25 z −2 W3 (z) z 6.71z −2 W3 (z)
0.25 6.71
E3.18
X (z) W1(z) Y1(z) Y (z)
+ + +
−1 −1
z z
1
− z −1Y(z)
5
1 1 1
2 −
1 −1 9 1 −1 5
z W1(z) z W1(z)
H1( z) 2 9 H 2 (z)
X (z ) 4X (z ) Y 1 (z) Y (z )
+
z −1
1 −1
z Y1 (z )
2
−1
1 z Y1 (z)
H 1 (z)
2
z −1
1 −1
− z Y 2 (z )
5
−1
1 z Y 2 (z )
−
H 2 (z) 5
1 1 1 1
2 4 6 8
1 −1 1 −2 1 −3 1 −4
z X (z ) z X (z) z X (z ) z X (z )
2 4 8
6
+ + + + Y (z)
F ig E 3 .1 9 a : D irect fo rm stru ctu re.
E3.19 b)
X (z ) z −1X(z) −1
z −2 X(z) z −3 X(z) z −4 X(z) z −5 X( z) z −6 X(z)
−1 −1 −1 −1 −1
z z z z z z
0.25z −1X(z) 0.3z −2 X(z) −0.35z −3 X(z) −0.4z −4 X(z) −0.45z −5 X(z) −0.5z −6 X(z)
0.2X(z)
+ + + + + + Y (z)
F ig E 3 .1 9 b : D irect fo rm stru ctu re.
Chapter 3 - Z - Transform 3. 136
E3.20 z −2 X(z)
X (z ) X(z) −1
z −1X(z) −1
z z
+
+
−1 −1
z z
z −4 X(z) z −3 X(z)
0.4 0.6
0.2
X (z ) X (z )
−1
z X (z ) Y 1 (z ) −1
z Y 1(z )
z −1 z −1
+ +
−2 −2
z X (z ) z Y 1(z )
−1 −1
z z
0.3 0.5
1 1
−
1 −1 9 −2 7
0.5[Y 1 (z)+ z Y 1(z )]
z X (z ) 1 −1
−2
0.3[X (z )+ z X (z)] 9 − z Y1 (z )
Y 1 (z ) 7 Y (z)
+ +
H 1 (z) H 2(z)
F ig E 3 .2 0 b : C a sca d e o f lin e a r p ha se stru ctu re.
z −1X(z) z −2 X(z)
X (z ) z
−1
z
−1
+
+
−1 −1
z z
z −4 X (z) z −3 X(z)
1 3 3
−
2 4 2
3 −1 3 −2
1 z X(z) + z −3 X(z) z X(z)
− X(z) + z −4 X(z) 4 2
8
+ +
Y (z )
F ig E 3 .2 0 c : L in ea r ph a se stru c tu re.
Solution for Exercise Problems E3. 1
E3.1 Determine the Z-transform and their ROC of the following discrete signals.
bg l
a) x n = 4 , 2, 8, 5 q
A
Solution
x(0) = 4; x(1) = 2; x(2) = 8; x(3) = 5,
and x(n) = 0 for n < 0 and for n>3.
By definition,
∞
l q b g ∑ x( n ) z
Z x( n ) = X z = −n
n = −∞
The given sequence is finite duration sequence and so the limits of summation is changed to, n = 0 and n = 3.
3
∴Xz =b g ∑ x( n ) z −n
bg bg bg
= x 0 z0 + x 1 z −1 + x 2 z −2 + x 3 z −3 bg
n=0
2 8 5
= 4 + 2z −1 + 8z −2 + 5z −3 = 4 + + +
z z2 z3
Here, X(z) will be finite for all values of z, except z = 0.
\ ROC is entire z-plane except at z = 0.
bg l
b) x n = 3 , 0, 0, 4, 45, 1 q
A
Solution
x(-5) = 3; x(-4) = 0; x(-3) = 0; x(-2) = 4; x(-1) = 45; x(0) = 1.
0
Xz =b g ∑ x(n)z −n
b g b g b g b g
= x −5 z5 + x −4 z4 + x −3 z3 + x −2 z2 + x −1 z1 + x 0 z0 b g bg
n = −5
bg l
c) x n = 2 , 1, 1, 2, 5, 8,2 q
A
Solution
3
Xz =b g ∑ x(n)z −n
= 2z 3 + 1z 2 + z + 2 + 5z −1 + 8 z −2 + 2 z −3
n = −3
bg b
d) x n = − 0.2 n u n − 1 g
Solution
x(n) = – 0.2nu(n – 1) = –0.2n ; n ³ 1
+∞ ∞ LM∞ OP
l q
Z x( n ) = X(z) = ∑ x(n) z −n
= ∑ − b0.2g
n
z −n = −
MN∑ b0.2g z
n −n
+ 0.20 z0 − 0.20 z0
PQ
n = −∞ n =1 n =1
LM∞ O n
=− ∑ d 0.2 z i − 1P −1
MN
n= 0 PQ
If |0.2 z–1| < 1, then using infinite geometric series sum formula we can write,
LM 1 O
X(z) = − − 1P
MN1− e0.2 z j PQ −1
E3. 2 DSP, Chapter 3 - Z-Transform
1 z z − 0.2 − z − 0.2
∴ X(z) = 1 − = 1− = =
e
1 − 0.2 z −1
j z − 0.2 z − 0.2 z − 0.2
0.2
Here, 0.2 z −1 < 1 ⇒ <1
z
∴ z > 0.2
bg b g
e) x n = ( 0.6 ) n u n + ( 0.7 )n u − n − 1 b g
Solution
∞ ∞ −1
b g ∑ b0.6g ubng + b0.7g ub−n − 1g z
Xz =
n n −n
= ∑ b0.6g
n
z −n + ∑ b0.7g
n
z −n
n = −∞ n= 0 n = −∞
∞ ∞ ∞ n ∞ n
= ∑
n= 0
(0.6)n z −n + ∑
n =1
(0.7)−n zn = ∑ d0.6 z i + ∑ d0.7 zi
n= 0
−1
n =1
−1
∞ n ∞ n
0 0
= ∑ d0.6 z
n= 0
−1
i + d0.7 zi + ∑ d0.7 zi − d0.7 zi
−1
n =1
−1 −1
∞ ∞
n n
= ∑ d0.6 z
n= 0
−1
i + ∑ d0.7 zi n=0
−1
−1
If 0.6z −1 < 1 and 0.7 −1z < 1, then using infinite geometric series sum formula we can write,
1 1 z 0.7
X(z) = + −1 = + −1
1 − 0.6z −1 1 − 0.7 −1z z − 0.6 0.7 − z
z 0.7 − (0.7 − z) z z
= + = +
z − 0.6 0.7 − z z − 0.6 0.7 − z
z z
= −
z − 0.6 z − 0.7
=
b g b g = −0.1z
z z − 0.7 − z z − 0.6
b gb g bz − 0.7gbz − 0.6g
z − 0.7 z − 0.6
0.6
Here, 0.6 z −1 < 1 ⇒ <1
|z|
|z|
Also, 0.7 −1z < 1 ⇒ <1
0.7
\ |z| > 0.6 and |z| < 0.7
\ ROC is region in between circles of radius 0.6 and 0.7 in z-plane.
bg
f) x n = ( 0.9 ) n
Solution
x(n) = (0.9)| n | is a two-sided sequence.
\ x(n) = 0.9| n | = 0.9 –n u(– n–1) + 0.9n u(n)
+∞ +∞
b g ∑ x(n) z
∴X z = −n
= ∑ b g
0.9 −n u −n − 1 + 0.9n u n z − n bg
n = −∞ n = −∞
−1 ∞ ∞ ∞
∑ b0.9g
n
∑ (0.9 z) + ∑ d0.9 z i
−n
=
n = −∞
z −n + ∑ 0.9
n=0
n
z −n =
n =1
n
n=0
−1
∞ ∞ ∞ ∞
= 0.9 zb g + ∑ b0.9 zg − b0.9 zg + ∑ d0.9 z i = ∑ b0.9 zg
0 n 0 −1 n n
−1+ ∑ d0.9 z −1
in
n =1 n= 0 n =0 n= 0
If 0.9z < 1 and 0.9 z −1 < 1, then using infinite geometric series sum formula we can write,
1 1 1 z −1.11 z
X(z) = − 1+ = −1 + = − 1+
1 − 0.9z 1 − 0.9z −1 −0.9(z − 1 / 0.9) z − 0.9 z − 1.11 z − 0.9
−1.11 − (z − 1.11) z −z z − z(z − 0.9) + z(z − 1.11) −0.21z
= + = + = =
z − 1.11 z − 0.9 z − 1.11 z − 0.9 (z − 1.11) (z − 0.9) (z − 1.11) (z − 0.9)
Solution for Exercise Problems E3. 3
|z| |z|
Here, 0.9 z < 1 ⇒ <1 ⇒ <1
1 / 0.9 1.11
0.9
Also, 0.9z −1 <1 ⇒ <1
|z|
E3.2 Find the one-sided Z-transform of the following discrete time signals.
bg
a) x n = n2 5 n u n bg
Solution
Let, x1(n) = 5n u( n )
∞ ∞
1 z
b g ∑5
By definition, X1 z = n
z −n = ∑ (5z −1 n
) = =
1 − 5z −1 z − 5
n= 0 n= 0
l q o t o
∴ X(z) = Z x(n) = Z n2 5n = Z n2 x1(n) = − z t dzd LMN−z dzd X (z)OPQ = −z dzd LMN−z dzd FGH z −z 5 IJK OPQ
1
d L F bz − 5 g − z I O d L 5z O L bz − 5g × 5 − c5z × 2 bz − 5gh OP 2
= −z M −zG
dz M H bz − 5g K P
J P = −z M P = − zM
Q dz MN bz − 5g PQ MN bz − 5 g PQ
2 2 4
N
L bz − 5g × 5 −10z OP = − z LM 5z − 25 − 10z OP = − z LM −5z − 25 OP = 5zbz + 5g
=− zM
MN bz − 5g PQ MN bz − 5g PQ MN bz − 5g PQ bz − 5g
3 3 3 3
bg
b) x n = n 0.5b g n+ 4
u(n)
Solution
bg
Let, x1 n = (0.5)n + 4 u(n) = 0.54 0.5n u(n)
z
bg l q
∴ X1 z = Z x1(n) = Z 0.5 4 0.5n u(n) = 0.54 Z 0.5 n u(n) = 0.5 4 n s z − 0.5
By property of Z - transform,
l q n s l q dzd X (z)
X(z) = Z x(n) = Z n(0.5)n+4 u(n) = Z nx1(n) = −z 1
d L z O d L z O L z − 0.5 − z OP = 0.5 z
= − 0.5 zM
5
dz MN z − 0.5 PQ dz MN z − 0.5 PQ
4 4 4
=− z 0.5 = −0.5 z
N (z − 0.5) Q bz − 0.5g 2 2
c) xb ng = b0.5 gn−2
ub ng − ubn − 2g
Solution
X(z) = Z x nm b g r = Z {b0.5g u(n)} − Z {b0.5g u(n − 2)}
n− 2 n− 2
1 L z O L z OP
0.5 MN z − 0.5 PQ
= −z M −2
2
N z − 0.5 Q
4z 1 4 z2 − 1
= − =
z − 0.5 z z − 0.5b g z(z − 0.5)
E3.3 Find the one-sided Z-transform of the discrete signals generated by mathematically sampling the
following continuous time signals.
a) x(t) = 4t e–0.6t u(t)
Solution
Let, t = nT
b g
x nT = 4 nT e −0.6nT u nT = ng n b g bg
where, g(n) = 4 T e-0.6nT u(nT) = 4Te– 0.6nT ; n ³0
∞ ∞ ∞
−0.6 T −1 n
b g l q ∑4Te
∴ G z = Z g(n) = −0.6nT
z − n = 4T ∑e −0.6nT
z −n = 4T ∑ ee z j
n= 0 n= 0 n= 0
1 1 4Tz
= 4T = 4T =
1 − e −0.6T z −1 z −1 z − e −0.6 T e
z − e −0.6 T j
E3. 4 DSP, Chapter 3 - Z-Transform
b g m b gr
Now, X z = Z ng n = − z
d
G z = −z
d
bg 4Tz
= −4zT
LM
z − e−0.6T − z 1 OP d i bg
dz dz z − e−0.6T N
z − e−0.6T
2
Q d i
−4zT z − e−0.6T − z 4zTe−0.6T
= 2
= 2
dz − e i −0.6T
dz − e i −0.6 T
bg
b) x t = 2t 3 u t bg
Solution
Let, t = nT.
\ x(nT) = 2 ( nT ) 3 u(nT) = 2 n3 T 3 u(nT) = n3 g( n )
where, g(n) = 2T 3 u(nT) = 2T3 ; n ³ 0
∞ ∞
1 z
b g l q ∑ 2T z
∴ G z = Z g(n) = 3 −n
= 2T 3 ∑z −n
= 2T 3
1 − z −1
= 2T 3
z −1
n= 0 n=0
s FGH dzd IJK G(z) = −z dzd LMN−z dzd FGH −z dzd G(z)IJK OPQ
3
l
Now, X(z) = Z x(nT) = Z n3 g(n) = −z q n
d d L z O d L z O
= −2zT M
L z − 1− z OP = 2zT 3
dz MN z − 1PQ dz MN z − 1PQ
3 3 3
Here, − z G(z) = −z 2T = −2zT
dz N (z − 1) Q (z − 1) 2 2
d F d I d L 2zT O d L z O L (z − 1) − z 2(z − 1) OP
3 2
∴ − z G −z G(z)J = − z M P = −2zT M P = −2zT M 3 3
dz H dz K dz N (z − 1) Q dz N (z − 1) Q N (z − 1) Q2 2 4
= − 2zT M
L z − 1− 2z OP = −2zT (−z − 1) = 2zT (z + 1)
3
3 3
N (z − 1) Q (z − 1) (z − 1) 3 3 3
bg
∴ X z =− z
d
−z
LM
d
−z
d
G(z)
FG IJ OP = −z d LM 2zT (z + 1) OP 3
dz N
dz dz H K Q dz N (z − 1) Q 3
d L z +z O
P = −2zT LMN (z − 1) (2z + 1()z−−(1z) + z) 3(z − 1) OPQ
2 3 2 2
= −2zT 3 M
dz N (z − 1) Q 3
3
6
= −2zT 3
LM (z − 1) (2z + 1) − 3(z + z) OP = −2zT LM 2z + z − 2z − 1− 3z
2
3
2 2
− 3z OP
N (z − 1) Q 4
N (z − 1) 4
Q
= −2zT 3
LM −z − 4z − 1OP = 2zT (z + 4z + 1)
2 3 2
N (z − 1) Q 4
(z − 1) 4
E3.4 Find the time domain initial value, x(0) and final value, x(¥ ) of the following z-domain functions.
0.5
a) X( z ) =
FH 1 − z IK FH 1 + z IK
−1
2
−1
Solution
By initial value theorem,
0.5
bg
x 0 = Lt X z = Lt bg 2
z →∞ z →∞
d1− z i d1+ z i −1 −1
0.5 0.5
= Lt =
z →∞
FG1− 1IJ FG1+ 1IJ FG1− 1 IJ FG1+ 1 IJ
2 2
H zK H zK H ∞ K H ∞ K
0.5
=
b1− 0g b1+ 0g = 0.5
2
z3
b) X( z ) =
b z − 1gFH z 2
− 0.2 IK
Solution
By initial value theorem,
LM z 3 OP z 1 3
1 1
bg
x 0 = Lt X z = Lt bg MN bz − 1gdz 2
− 0.2i P
= Lt
F 1I F 0.2 I
=
F 1I F
= =
0.2 I (1 − 0) (1 − 0) 1 × 1
=1
z →∞ z →∞
Q zGH1− z JK z GH1− z JK GH1− ∞ JK GH1− ∞ JK
z →∞ 2
2
a) X( z ) =
b2z − 1g z
b z − 1g 2
Solution
Given, X( z ) =
b2z − 1g z
bz − 1g 2
= sum of residues of
b2z − 1gz z n-1
bz − 1g 2
= sum of residues of
b2z − 1gz n
bz − 1g 2
= 2bn + 1gz − nz n n −1
z =1
∴ x(n) = bn + 2g u(n)
z2 + z
b) X( z ) =
b z − 2g 2
Solution
x(n) = sum of residues of X(z)zn-1
z2 + z
= sum of residues of zn-1
bz − 2g 2
zn + 1 + zn
= sum of residues of
bz − 2g 2
1 d M
L ez + z j OP n +1 n
∴ bg
xn =
1! dz M
b z − 2g ×
2
bz − 2g PQ 2
N z=2
= (n + 1)(zn ) + nzb g = n + 1 2 + n 2b g
d n +1 n
=
dz
z +z
z= 2
n −1
z=2
b gb g n n −1
∴ x n = n + 1 2 u n + n 2b
b g b gb g b g g u bn − 1g
n n −1
E3. 6 DSP, Chapter 3 - Z-Transform
FH 1 − e IK z
−a
c) X( z ) =
b z − 1g FH z − e IK −a
Solution
= sum of residues of
e1− e j z −a n
bz − 1g ez − e j −a
= bz − 1g
d1− e i z −a
+ dz − e i
d1− e i z
n
−a
−a n
b gd i
z − 1 z − e b − 1gdz − e i
z −a
z =1
−a
z=e −a
=
d1− e ib1g + d1− e ibeg = d1− e ib1g + d1− e ibeg
−a n −a − an −a n −a − an
= 1 − e − an
d1− e i −a
de − 1i d1− e i −a
−d1 − e i −a −a
E3.6 Determine the inverse Z-transform of the following functions using partial fraction method.
z2
a) X( z ) =
b z + 1gb z + 2g 2
Solution
X( z ) z
=
z bz + 1gbz + 2g 2
z −1
bz + 1gbz + 2 g b g
A1 = × z +1 2
= = −1 2
( −1 + 2)
z = −1
d L O d L z O bz + 1g − zb1g
A2 = M z
dz M bz + 1gbz + 2 g
× b z + 2g P
P =
dz MN z + 1PQ
2
=
N Q2
z = −2
z = −2 bz + 1g 2
z = −2
1 1
= = =1
bz + 1g 2
z =−2
b−2 + 1g 2
z −2 −2
bz + 1gbz + 2 g b g
2
A3 = × z+2 = 2
= =2
−2 + 1 −1
z =−2
z
∴
Xbzg
=
−1
+
1
+
2 bg
an u n
Z
→
z−a
z z + 1 z + 2 bz + 2 g 2
az
z z z bg
nan u n
Z
→
bz − a g 2
∴ Xbzg = − 1 × + + 2×
z +1 z + 2 bz + 2 g 2
z z 2z
= − 1× + +
z − (−1) z − (−2 ) z − (−2) b g 2
R| z z 2z U|
l q
∴ x(n) = Z −1 X(z) = Z −1 −1 × S| + +
b g VW|
2
T z − (−1) z − ( −2) z − ( −2)
RS z UV + Z RS z UV + Z R| 2z U|
= −1 × Z −1
T z − (−1) W T z − (−2) W
−1 −1
S| bz − (−2)g V|2
T W
= − b −1g ubng + b −2g ubng − n b −2g ubng
n n n
Solution
z 2 − 4z + 4
X( z ) 2z − 1
= 3 z −1 z3 − 5z2 + 8z − 4
z z − 5z 2 + 8z − 4
Here, z = 1 is one of the root of the polynomial z3- 5z2 + 8z - 4 = 0 z3 − z2
(–) (+)
Hence, z3- 5z2 + 8z - 4 = ( z-1)( z2 - 4z + 4) − 4z2 + 8z − 4
∴
Xz bg
=
2z − 1
=
2z − 1 − 4z 2 + 4z
z b ge
z − 1 z 2 − 4z + 4 z −1 z−2 j b gb g 2 (+) (–)
4z − 4
By partial fraction expansion, (a – b)2 = a2 – 2ab + b2 4z − 4
(–) (+)
b g=
Xz A1 A
+ 2 +
A3 0
z z −1 z − 2 z−2 b g 2
2z − 1 2 × 1− 1
A1 =
bz − 1gbz − 2 g × bz − 1g = (1− 2) = 1
2
z =1
2
d L 2z − 1 O = d L 2z − 1 O
A =
2 M
dz M bz − 1gbz − 2 g
× bz − 2g P
PQ dz MN z − 1 PQ
2
2
N z=2
z=2
=M
L 2bz − 1g − (2z −1)b1g OP = 2(2 − 1) − (2 × 2 − 1) = 2 − 3 = −1
MN bz − 1g PQ
2
(2 − 1)
z=2
1 2
2z − 1 2 × 2 −1 3
A3 =
bz − 1gbz − 2 g b g 2
=× z−2
2 −1
= =3
1
2
z=2
Xbzg 1 1 3
∴ = − +
z z − 1 z − 2 bz − 2 g 2
z z z z z 3 2z
Xbzg = 1× − 1× + 3×
z −1 z−2 bz − 2g = z − 1 − z − 2 + 2 × bz − 2g 2 2
∴ x(n) = Z lX(z)q = Z S
−1 |R z − z + 3 2 z |UV −1
T| z − 1 z − 2 2 bz − 2g W| 2
=Z S
R z UV − Z RS z UV + 3 Z R|S 2z U|V
−1 −1 −1
T z − 1W T z − 2 W 2 |T bz − 2g |W 2
. n − 1)2n u(n)
= 1 + (15
z( z 2 + 3 )
c) X( z ) = 2
e z + 1j
2
z2 + 1 = 0
Solution ∴ z2 = −1
2 2
X( z ) z +3 z +3
= = ∴ z = ± −1 = ± j
z
ez + 1j
2 2
bz + jg bz − jg
2 2
∴ z2 + 1 = (z + j) (z − j)
By partial fraction expansion,
bg
Xz A
= 1 +
A2
+
A1∗
+
A∗2
z z+ j z+ j b g b g 2
z−j z− j 2
d L
M
2 O LM bz − jg b2zg − ez + 3j 2bz − jg OP 2 2
× bz + jg P
z +3 2
A =
1
dz M bz + jg bz − jg
N 2
PQ = MN 2
bz − jg PQ
z= − j
4
z= − j
=
bz − jgb2zg − ez + 3j 2 = b−2jg 2b− jg − b−1+ 3g 2 = −4 − b4g = −8 = −1 = j
2
bz − jg 3
b− j − jg z= − j
b−2jg 8j j 3 3
E3. 8 DSP, Chapter 3 - Z-Transform
z2 + 3 z2 + 3 −1 + 3 2 1
bz + jg bz − jg b g
2
A2 = × z+ j = = = =−
2 2
z= −j
bz − jg 2
z= − j
b− j − j g 2
−4 2
A1∗ = ( j)∗ = − j
A∗2 = −
FG 1IJ ∗
=−
1
H 2K 2
−1 −1
∴
Xz b g= j
+ 2 +
−j
+ 2
z z+ j z+j b g 2
z− j z− j b g 2
z 1 z z 1 z
∴ X(z) = j − −j −
z+ j 2 z + j b g 2
z− j 2 z−j b g 2
z 1 − jz z 1 jz
=j
b g b g cz − b− jgh − j z − j − 2j bz − jg
z − −j
−
2 −j 2 2
∴ x(n) = Z lX(z)q −1
R| z 1 − jz z 1
U
jz |
= Z Sj
|T z − b− jg 2j cz − b− jgh z − j 2j bz − jg V|W
−1
+ −j − 2 2
= jZ S
|R z |UV + 1 Z R|S − jz U|V − j Z RS z UV − 1 Z
−1 −1 −1 −1
R| jz
S| bz − jg
U|
V|
|T z − b− jg |W 2j |T cz − b− jgh |W T z − j W 2j 2
T 2
W
1 1
= j b − jg ubng + nb − jg ubng − j b jg ubng − n j ubng
n n n n
2j 2j
L
= M j b − jg − j +
n n
b O
− jg − j P ubng
n n n
N 2 j Q
E3.7. Determine the inverse Z-transform of the function,
2 − z −1
X( z ) =
LM1 − b1 / 4g z OP LM1 − b1 / 3g z OP
−1 −1
N QN Q
1
bag ROC : z >
3
; bbg ROC : z < 4 ; bcg ROC : 41 <
1
z <
1
3
.
Solution
Given, X(z) =
2 − z −1
=
b g
z − 1 2z − 1
=
z b2z − 1g
b g
1 − 1/ 4 z −1
b g
1 − 1/ 3 z −1
z −2
z − 1/ 4 b g z − b1/ 3g b g z − b1/ 3g
z − 1/ 4
Now,
bg
Xz
=
b g
2z − 1
=
A1
+
A2
z b gb
z − 1/ 4 z − 1/ 3 g
z − 1/ 4 z − 1/ 3
= bz − 1 / 4g ×
b2z − 1g 2 × b1 / 4g − 1 −1 / 2 −1 / 2 1 F 12 I
∴ A1
bz − 1/ 4gbz − 1 / 3g z = 1/ 4
=
b1 / 4g − b1 / 3g = 3 − 4 = −1 / 12 = − 2 × GH − 1 JK = 6
12
b
A2 = z − 1/ 3 × g bz − 1b/24zgb−z1−g 1 / 3g =
2 × b1 / 3g − 1 −1 / 3 −1 / 3 1 12
b1 / 3g − b1/ 4g = 4 − 3 = 1/ 12 = − 3 × 1 = −4
z =1/ 3
12
∴
Xz bg= 6
+
−4
z z − 1/ 4 z − 1/ 3
6z 4z
∴ Xz = bg −
z − 1/ 4 z − 1/ 3
l q
∴ x(n) = Z −1 X(z) = Z −1
RS 6z − 4z UV = 6 Z RS z UV − 4 Z RS z UV −1 −1
T z − 1/ 4 z − 1/ 3 W T z − 1/ 4 W T z − 1/ 3 W
a) ROC : |z| >1/3 - ROC is exterior of the circle whose radius is given by largest pole. Therefore x(n) is causal or right-sided signal.
b g b g − 4 b1 / 3g ; for n ≥ 0
∴ x n = 6 1/ 4
n n
= 6 b1 / 4g − 4 b1 / 3g u bng
n n
Solution for Exercise Problems E3. 9
(b) ROC : | z | < 1/4 - ROC is interior of the circle whose radius is given by smallest pole. Therefore, x( n ) is anticausal or left-sided
signal.
b g LNM b g b n
∴ x n = −6 1 / 4 u −n − 1 − 4 − 1 / 3 u −n − 1 g eb g b n
gjOQP b g
= −6 1 / 4
n
b g ub−n − 1g
+ 4 1/ 3
n
(c) ROC : 1/4 <| z | < 1/3 - ROC is the region in between two circles of radius 1/4 and 1/3. Therefore, the term with pole = 1/3 will be
anticausal and the term with pole = 1/4 will be causal.
bg b g bg b g b n
∴ x n = 6 1 / 4 u n + 4 1 / 3 u −n − 1
n
g
E3.8. Determine the inverse Z-transform of the following function using power series method.
z
X( z ) =
2
2z − 3z + 1
Solution
z z z 1+ 3 z + 7z 2 + 15z3 + 31z 4 +......
Given that, X( z )= = =
2z2 − 3z + 1 2(z2 − 1.5z + 0.5) 2(z − 1) (z − 0.5) 1 − 3z + 2z2 1
If ROC is |z| < 0.5, then x(n) will be anticausal signal. 1− 3z + 2z2
(–) (+) (–)
3 z − 2z 2
If ROC is |z| > 1, then x(n) will be causal signal.
3z − 9z2 + 6z3
(–) (+) (–)
(a) ROC : | z | < 0.5
7z 2 − 6z 3
z z 7z2 − 21z3 + 14z 4
X( z )= = (–) (+) (–)
2z 2 − 3z + 1 1 − 3z + 2z2
15z 3 − 14z 4
= 1+ 3z + 7z 2 + 15z3 + 31z 4 + ......
15z 3 − 45z 4 + 30z5
.....(1) (–) (+) (–)
= ...... + 31z 4 + 15z3 + 7z 2 + 3z + 1
31z 4 − 30z5 ....
By definition of Z - transform,
+∞
l q ∑ x(n) z
X(z) = Z x(n) = −n
= ..... + x( −4)z4 + x( −3)z3 + x( −2)z 2 + x( −1)z + x(0) + ...... .....(2)
n = −∞
z2 + z
a) X( z ) = ; ROC : z > 1
z 2 − 2z + 1 1+ 3 z −1 + 5z −2 + 7z −3 ......
Solution z − 2z + 1 z 2 + z
2
z2 + z z2 + z z2 − 2z + 1
X(z) = = (–) (+) (–)
2
z − 2z + 1 bz − 1g 2
3 z −1
Since ROC is |z| > 1, x(n) is causal or right - sided. 3z − 6 + 3z −1
(–) (+) (–)
z2 + z 5 − 3z −1
∴ X(z) = 2 = 1 + 3z −1 + 5z −2 + 7z −3 +..... .....(1)
z − 2z + 1 5 − 10z −1 + 5z −2
(–) (+) (–)
By definition of Z - transform,
7z −1 − 5z −2 ....
+∞
l q ∑ x(n) z
X(z) = Z x(n) = −n
= ..... + x(0) + x(1)z −1 + x(2)z −2 + x(3)z −3 + ...... .....(2)
n = −∞
E3.10. Determine the transfer function and impulse response for the systems described by the following equations.
bg b g b
a) y n + 2 y n − 1 − 3y n − 2 = x n − 1 . g b g
Solution
bg b g b
Given that, y n + 2y n − 1 − 3y n − 2 = x n − 1 g b g
On taking Z - transform of above equation we get,
bg bg bg bg
Y z + 2z −1 Y z − 3 z −2 Y z = z −1 X z
Y bz g z −1
Transfer Function, H(z) = =
X b zg 1 + 2 z − 3 z −1 −2
z −1 z −1 z
bg
Let, H z = −1
1 + 2z − 3 z −2
= −2 2
z z + 2z − 3
= 2
z + 2z − 3
Solution for Exercise Problems E3. 11
1 1 1
B = (z + 3) = =−
bz − 1gbz + 3g z = −3
−3 − 1 4
1 z 1 z
bg
∴ Hz =
b g b g
4 z −1
−
4 z+3
∴ hbng = Z mH bzgr = Z S
−1
R| 1 z − 1 z U|V =−1
Z
RS
1 −1 z
−
z UV
T| 4 bz − 1g 4 bz + 3g W| 4 T
z − 1 z − ( −3) W
1 1
ubng − b −3g ubng =
n n
= 1 − (−3) u(n)
4 4
7 5
bg
b) y n −
4
b g
y n − 1 + y n − 2 = 2x n
8
b g bg
Solution
7 5
Given that, y n − bg 4
b g
y n − 1 + y n − 2 = 2x n
8
b g bg
On taking Z - transform of above equation we get,
7 −1 5
bg
Yz −
4
bg
z Y z + z −2 Y z = 2 X z
8
bg bg
FG1− 7 z −1IJ b g b g
+
5 −2
z Y z = 2X z
H 4 K 8
Yb zg 2
Transfer Function, H(z) = =
Xbzg 1− 7 z + 5 z −1 −2
4 8
2 2 2z2
bg
Let , H z =
7 −1 5 −2
=
LM 7 5 OP =
7 5
1− z + z z −2 z2 − z + z2 − z +
4 8 N 4 8 Q 4 8
Hz bg= 2z
=
A
+
B
z 2 7 5 1 5
z − z+ z− z− The roots of quadratic,
4 8 2 4
1 7 72 5
± −4×
A = z−
FG 1
×
IJ 2z
= 2 =
2×
1
=
1
=−
4
z=
4 42 8
H 2 K FG z − 1IJ FG z − 5 IJ 1 5
−
2 − 5 −3 / 4 3 2
H 2K H 4K z=
1 2 4 4
7 49 − 40
2 ±
4 16
=
5 2
B = z−
FG 5 IJ
×
2z
=
2×
4 = 5 / 2 = 5 / 2 = 5 × 4 = 10 7 1 3 7 3
H 4 K FG z − 1IJ FG z − 5 IJ 5 1
−
5−2 3/4 2 3 3 = ± × = ±
H 2K H 4K z=
5 4 2 4
8 2 4 8 8
4 10 4 5 1
= , = ,
Hz b g= −4
1 10 1 4 z 10 z
8 8 4 2
∴
FG z − 1IJ + 3 FG z − 5 IJ ⇒ Hbzg = − 3 FG z − 1IJ
z 3
+
3 FG z − 5 IJ
H 2K H 4K H 2K H 4K
4 F 1I 10 F 5 I
n n
∴ Impulse response, hbng = Z mH bzgr = − G J ubng + −1
G J ubng
3 H 2K 3 H 4K
1 L F 1I F 5I O n n
= M−4 G J + 10 G J P ubng
3 MN H 2 K H 4 K PQ
E3. 12 DSP, Chapter 3 - Z-Transform
bg bg b g
c) y n = 0.2x n − 5x n − 1 + 0.6 y n − 1 − 0.08y n − 2 b g b g
Solution
bg bg
Y z − 0.6z −1 Y z + 0.08 z −2 Y z = 0.2 X z − 5z −1 X z bg bg bg
bg
1− 0.6z −1 + 0.08z −2 Y z = 0.2 − 5z −1 Xbzg
Y bz g 0.2 − 5z −1
Transfer Function, H(z) = =
Xbzg 1− 0.6z + 0.08z −1 −2
∴
Hzbg= 0.2z − 5
=
0.2z − 5
=
A
+
B z = 0. 6 ±
(−0.6)2 − 4(0.08)
z 2
z − 0.6z + 0.08 z − 0.4 z − 0.2 b
z − 0.4 z − 0.2 gb g 2
0. 6 ± 0.2
z=
b
A = z − 0.4 × g bz − 00..24zg b−z5− 0.2g =
0. 2 × 0.4 − 5
0.4 − 0.2
= −24.6 2
z = 0.4 = 0.4, 0. 2
b
B = z − 0.2 × g bz − 00..24zg b−z5− 0.2g =
0. 2 × 0.2 − 5
0.2 − 0.4
= 24 .8
z = 0.2
Hz b g= −24.6
+
24 . 8
Z z − 0.4 z − 0.2
z z
bg
∴ H z = − 24.6
bz − 0.4g + 24. 8 bz − 0.2g
Impulse response, hbng = Z lH(z)q = − 24.6 b0.4g u(n) + 24.8 b0.2g ubng
−1 n n
3 2
bg
d) y n −
2
b g
y n−1 = x n + x n−1
3
bg b g
Solution
3 2
Given that, y n − bg 2
b g
y n − 1 = x(n) + x n − 1
3
b g
On taking Z - transform of above equation we get,
3 −1 2
bg
Yz −
2
bg
z Y z = X(z) + z −1 X z
3
bg
FG1− 3 z IJ Ybzg = X(z) FG1+ 2 z IJ
−1 −1
H 2 K H 3 K
2 −1
Y bz g 1 + 3 z
Transfer function, H(z) = =
Xbzg 1− 3 z −1
2
2 −1 2 2
1+ z z+
bg
Let, H z = 3 = 3 = z + 3 = z + 2 z −1 z
3 3 3 3 3 3 3
1− z −1 z− z− z− z− z−
2 2 2 2 2 2
H z = b g F z b6z1 I − 8g
GH z − 2 JK b z − 3g
Specify the ROC of H(z) and determine h(n) for the system to be, (i) Stable, (ii) Causal.
Solution for Exercise Problems E3. 13
Solution
b g F z b61zI − 8g
Given that H z =
GH z − 2 JK bz − 3g
By partial fraction,
Hzbg
=
6z − 8 A B
z FG z − 1IJ bz − 3g = z − 1 + z − 3
H 2K 2
6 10
F 1I
A = Gz − J ×
6z − 8
= 2
−8 −
= 2 =
10
=2
H 2 K FG z − 1IJ bz − 3g 1
−3 −
5 5
H 2K z=
1
2
2 2
18 − 8 10 20
b
B = z−3 × g F 61zI− 8 =
1
=
5
=
5
=4
GH z − 2 JK bz − 3g 3−
2 2
z=3
H(z) 2 4 2z z
∴
z
= +
1 z−3
⇒ bg
Hz =
1
+4
z − 3
z− z−
2 2
(ii) Causal :-
For causal system the ROC should be exterior of the circle corresponding to largest pole.
\ ROC : |z| > 3.
E3.12. Determine the unit step response of the discrete time LTI system whose input and output relation is described by the
difference equation,
Y(z)
LM z + 7 OP + 7 = z
N z Q z −1
Y(z) = G
F z − 7IJ × z =
b
z 7 − 6z g
H z −1 K z+7 (z − 1) (z + 7)
E3. 14 DSP, Chapter 3 - Z-Transform
By partial fraction,
Y(z) 7 − 6z A B
= = +
z (z − 1) (z + 7) z −1 z+7
b g bz −71−gb6zz+ 7g
A = z −1 ×
z = 1
=
7−6 1
=
1+ 7 8
7 − 6z 7 − 6 × ( −7) 49
B = (z + 7) × = =−
(z − 1) (z + 7) z= − 7 −7 − 1 8
Y(z) 1 1 49 1 1 z 49 z
∴ = − ⇒ Y(z) = −
z 8 z −1 8 z + 7 8 z −1 8 z + 7
1 49 1
∴ y(n) = Z −1 y(z) = l q 8
u(n) −
8
n
−7 u(n) =
8
b g
1 − 49 ( −7)n u(n)
E3.13. Determine the response of discrete time LTI system governed by the following difference equation,
4y(n) + 5 y(n – 1) + y(n –2) = x(n) ; with initial conditions, y(–2) = –2 ; y(–1) = 1 , for the input x(n) = (0.5)n u(n).
Solution
Y(z) M
L 4z + 5z + 1OP = z − 1 − 3
2
⇒ Y(z)
LM 4z 2
+ 5z + 1OP
=
b g
z2 − z − 0.5 − 3z z − 0.5 b g
MN z PQ z − 0.5 z
2
MN z 2
PQ b
z z − 0.5 g
LM z + 5 z + 1 OP2
2 2
∴ 4Y(z) MM z4 4 PP = z − z +z0(z.5−−03z.5) + 1. 5z
2
N Q
L z + 125
4Y(z) M
. z + 0.25 O
2
P =
−2z + 0.5z + 0.5 2
The roots of quadratic,
N z Q 2
z(z − 0.5)
z2 + 1. 25z + 0. 25 = 0 are,
−2z2 + 0.5z + 0.5 z2
∴ Y(z) = × −1. 25 ± 1. 252 − 4 × 0.25
z(z − 0.5) 2
4 z + 1. 25z + 0. 25 d i z=
2
=
d
0.25z −2z 2 + 0.5z + 0.5 i =
d
z −0.5z2 + 0.125z + 0.125 i =
−1. 25 ± 0.75
2
(z − 0.5)(z + 125
. z + 0.25) 2
bz − 0.5g bz + 1g bz + 0.25g = − 0.25, − 1
2
Y(z) −0 . 5z + 0.125z + 0 .125 A B C
= = + +
z b
z − 0.5 z + 1 z + 0.25g b gb
z − 0.5 z +1 z + 0. 25 g
2
−0 . 5z + 0.125z + 0 .125 −0 . 5 × 0.52 + 0125
. × 0.5 + 0 .125 0.0625
A = (z − 0.5) × = = = 0.056
b g b gb
z − 0.5 z + 1 z + 0. 25 g z = 0.5
b gb
0.5 + 1 0.5 + 0.25 g 1.125
z z z
∴ Y(z) = 0.056 + − 0.444 − 0.111
z − 0.5 z +1 z + 0.25
E3.14. An LTI system has the impulse response h(n) defined by h(n) = x1(n – 1)* x2( n). The Z-transform of the two signals
x1(n) and x2(n) are, X1(z) = 2 – 4z–1 and X2(z) = 1 + 5 z–2 respectively. Determine the output of the system for input
d(n – 1).
Solution
d id i
= z −1 2 − 4 z −1 1+ 5 z −2 = z −1 2 + 10z −2 − 4 z −1 − 20 z −3
= 2z −1 − 4z −2 + 10 z −3 − 20 z −4
Y1(z) = z −1 H(z)
= z −1 2z −1 − 4 z −2 + 10 z −3 − 20 z −4
= 2 z −2 − 4z −3 + 10 z −4 − 20 z −5 .....(1)
By definition of Z-transform,
l q l
Z x(n) = Z δ(n − 1) q
= z −1
+∞
l q ∑ y (n) z
Y1(z) = Z y1(n) = 1
−n
= ..... + y1(0) + y1(1)z −1 + y1(2)z −2 + y1(3)z −3
n = −∞
3 1 1
y(n) = − y(n − 1) + y(n − 2) + y(n − 3) + x(n) + 4 x(n − 1) + 3 x(n − 2)
4 2 4
Solution
Direct Form – I
Given that,
3 1 1
y(n) = − y(n − 1) + y(n − 2) + y(n − 3) + x(n) + 4 x(n − 1) + 3 x(n − 2)
4 2 4
Taking Z-transform,
3 −1 1 1
Y(z) = − z Y(z) + z−2 Y(z) + z−3 Y(z) + X(z) + 4z−1 X(z) + 3 z −2 X(z) .....(1)
4 2 4
E3. 16 DSP, Chapter 3 - Z-Transform
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
X (z ) X (z ) Y (z )
+ +
3 −1
−1 − z Y (z) −1
z −1 4 z
4z X (z )
−1 3
z X(z) 4 + + −
4 z
−1
Y(z)
−1 −1
z 1 −2 z
−2 z Y (z )
z
−2
X(z) 3z X(z) 2
1 −2
3 + z Y(z)
2
1 −3 −1
z Y (z) z
4
1 −3
4 z Y (z)
3 −1 1 1
Y(z) = − z Y(z) + z−2 Y(z) + z−3 Y(z) + X(z) + 4 z−1 X(z) + 3 z −2 X(z)
4 2 4
3 −1 1 1
Y(z) + z Y(z) − z −2 Y(z) − z −3 Y(z) = X(z) + 4 z −1 X(z) + 3 z −2 X(z)
4 2 4
LM
Y(z) 1 +
3 −1 1 −2 1 −3
z − z − z = X(z) 1 + 4z −1 + 3z −2
OP
N 4 2 4 Q
Y(z) 1 + 4 z −1 + 3 z −2
=
X(z) 1 + 3 z −1 − 1 z −2 − 1 z −3 .....(2)
4 2 4
Y(z) Y(z) W(z) X (z ) Y (z )
Let, = W (z)
X(z) W(z) X(z) + +
3 −1 −1
W(z) 1 − z W (z ) z
4z
−1
W (z)
Let, = 4
3 z −1 W ( z)
X(z) 1 + 3 z −1 − 1 z −2 − 1 z −3 + − 4 +
4
4 2 4
−1
1 −2 z
3 1 1 z W (z ) −2
∴ W(z) + z −1 W(z) − z −2 W(z) − z −3 W(z) = X(z) 2
1 z −2
W ( z) 3z W (z )
4 2 4 + 2 3
3 1 1 .....(3)
W(z) = X(z) − z−1 W(z) + z −2 W(z) + z −3 W(z) 1 −3 z
−1
4 2 4 z W (z)
4 z −3 W ( z)
1
Y ( z) 4
Let, = 1 + 4z −1 + 3z −2 ⇒ Y(z) = W(z) + 4z −1 W(z) + 3z −2 W(z) .....(4)
W( z ) F ig 2 : D irect fo rm -II stru ctu re.
Using equations (3) and (4), the direct form-II structure is drawn as shown in fig 2.
Cascade Form
where, H1(z) =
1+ 3 z −1
; H2 (z) =
1 B − 1.00 + 0.25 + 0.25
1 − 0.64 z −1 1 + 0.39 z −1 1 − 0.25 − 0.25 0
3 2
Y1(z) W1(z) Y1(z) ∴ z + 0.75z − 0.5z − 0.25
Let, H1(z) = =
X(z) X(z) W1(z) = (z + 1) (z2 − 0.25z − 0.25)
W1(z) 1 The roots of quadratic
Let, = ⇒ W1(z) − 0.64z −1 W1(z) = X(z)
X(z) 1 − 0.64 z −1
z2 − 0.25z − 0.25 = 0 are,
∴ W1(z) = X(z) + 0.64z W1(z) −1 .....(6)
0.25 ± 0.252 − 4( −0.25)
z=
2
0.25 ± 1.03
= = 0.64, − 0.39
2
Solution for Exercise Problems E3. 17
Y1(z) X (z ) Y 1 (z)
Let, = 1 + 3z −1 +
W1 ( z )
+
W1(z)
.....(7)
∴ Y1(z) = W1(z) + 3z −1 W1(z)
z −1
−1 −1
Using equations (6) and (7), the direct form-II structure of H1(z) is drawn as 0.64 z W1 (z ) 3z W1 (z)
shown in fig 3.
0.64 3
Y(z) 1
Let, H2 (z) = = ⇒ Y(z) + 0.39z −1Y(z) = Y1(z)
Y1(z) 1 + 0.39 z −1 F ig 3 : D irect fo rm -II stru ctu re of H 1 (z).
∴ Y(z) = Y1(z) − 0.39 z Y(z) −1 .....(8)
Y1 (z ) + Y (z )
Using equation (8), the direct form-II structure of H2(z) is drawn as shown in fig 4.
The cascade structure is obtained by connecting H1(z) and H2(z) in cascade as z
−1
−1
shown in fig 5. −0 .39 z Y(z)
−0 .3 9
X (z ) W 1( z ) Y 1 (z)
+ + + Y (z ) F ig 4: D irect form -II
stru cture of H 2 (z).
z −1
z −1 −1
−1 −1 −0.39 z Y ( z )
0.64z W1 (z ) 3z W1 (z)
Parallel Form
Consider the transfer function of the system [equation (5)].
1 + 3 z −1 A B
H(z) = = +
d id
1 − 0.64 z −1 1 + 0.39 z −1 i 1 − 0.64 z −1 1 + 0.39 z −1
1
1+ 3 ×
1 + 3 z −1
d1− 0.64 z id1+ 0.39 z i d i
A= × 1 − 0. z −1
= 0 .64 = 3. 53
−1 −1 1
z −1 =
1 1 + 0.39 ×
0.64 0.64
−1
1+ 3 ×
1 + 3 z −1
d1− 0.64 z id1+ 0.39 z i d
B= × 1 + 0.39 z i −1
= 0 .39 = −2 . 53
−1 −1 −1
z −1 =
−1 1 − 0.64 ×
0.39 0.39
3.53 2.53
H(z) = − Y 1 (z)
1 − 0.64 z −1 1 + 0.39 z −1
X (z ) 3 .5 3 + + Y (z )
3.53 −2 .53
Let, H1(z) = ; H2 (z) =
1 − 0.64 z −1 1 + 0.39 z −1 0.64z
−1
Y1 (z ) z
−1
Y1(z) 3.53 0 .6 4
Let, H1(z) = =
X(z) 1 − 0.64 z −1
∴ Y1(z) − 0.64z −1Y1(z) = 3.53X(z) Y 2 (z)
+
∴ Y1(z) = 3.53 X(z) + 0.64 z −1 Y1(z) .....(9)
−1
−0.39z Y 2 (z ) z −1
Y (z) −2.53
Let, H2 (z) = 2 =
X(z) 1 + 0.39 z −1 −0 .3 9
−1
∴ Y2 (z) + 0.39z Y2 (z) = −2.53X(z)
F ig 6 : P a ra llel stru ctu re.
∴ Y2 (z) = −2.53 X(z) − 0 . 39 z −1 Y2 (z) .....(10)
Using equations (9) and (10), the parallel structure is drawn as shown in fig 6.
E3. 18 DSP, Chapter 3 - Z-Transform
E3.16. Realize direct form-I, II structures of the IIR system represented by transfer function,
z+5
H(z) =
(z + 0.4)(z + 0.5)(z + 0.6)
Solution
Y(z) z+5 z+5
Let, H(z) = = =
X(z) (z + 0.4)(z + 0.5)(z + 0.6) (z2 + 0.9z + 0. 2) (z + 0.6)
z+5
=
z3 + 0.9z 2 + 0. 2z + 0.6z2 + 0.54z + 0.12 X (z ) Y (z )
+
z+5
= 3 −1 −1 −1
z + 1. 5 z2 + 0.74 z + 012
. z −1.5z Y (z ) z
−1
z X(z ) + −1.5 z −1Y (z )
=
d
z 1 + 5z −1 i z
−1
−2 z
−1
=
d
z −2 1 + 5 z −1 i −1 −3 −1
z −0.12z Y (z )
1 + 1.5 z −1 + 0.74 z −2 + 0.12 z −3 z
−3
z X (z) 5 −0.12 z −3 Y (z )
−2 −3 −3
Y(z) z + 5z 5z X (z )
∴ = .....(1)
. z −1 + 0.74z −2 + 0.12z −3
X(z) 1 + 15 F ig 1 : D irect fo rm -I stru ctu re.
On cross multiplying equation (1) we get,
Using equation (2), the direct form-I structure is drawn as shown in fig 1.
Using equations (3) and (4), the direct form-II sturcuture is drawn as F ig 2 : D irect fo rm -II structure.
shown in fig 2.
E3.17. Determine the direct form-I, II, cascade and parallel realization of the following LTI system.
z 3 − 8 z 2 + 13z − 5
H(z) =
b ge
z − 0.75 z 2 + z − 0.25 j
Solution
Direct Form – I
Y(z) 1 − 8 z −1 + 13z −2 − 5z −3 X (z )
∴ = .....(1) + + Y (z )
X(z) 1 + 0.25 z −1 − z −2 + 0.1875 z −3
−1
−1 z
z −8 z −1X(z) −0.25 z −1Y(z)
On cross multiplying equation (1) and rearranging we get,
z −1X(z) −8 + + −0.25 z −1Y(z)
Y(z) = −0.25 z −1 Y(z) + z −2 Y(z) − 0.1875 z −3 Y(z) −1 −1
z z
.....(2) 13 z −2 X(z) z −2 Y(z)
+ X(z) − 8 z −1 X(z) + 13 z −2 X(z) − 5z −3 X(z) z −2 X(z) 13 + + 1 z −2 Y(z)
Using equation (2), the direct form-I structure is drawn as shown in fig 1.
z
−1 −0.1875z −3 Y(z) z
−1
−3
−3 −5 z X( z )
z X( z ) −5 z −3 Y(z)
F ig 1 : D irect fo rm -I structure.
Solution for Exercise Problems E3. 19
Direct Form - II W(z)
X (z ) + + Y (z )
Let us express the transfer function of equation (1) as shown below.
Y(z) W(z) Y(z) 1 − 8 z −1 + 13 z −2 − 5z −3 z
−1
= = −1 −1
X(z) X(z) W(z) 1 + 0.25 z −1 − z −2 + 01875
. z −3 −0.25z W(z) −8z W (z )
W(z) 1 + −0.25 −8 +
Let, =
X(z) 1 + 0.25 z −1 − z −2 + 0.1875 z −3
−1
On cross multiplying the above equation and rearranging we get, z
−2
z W(z) −2
13 z W ( z)
W(z) = X(z) − 0.25 z−1 W(z) + z−2 W(z) − 01875
. z−3 W(z) .....(3)
+ 1 13 +
Y(z)
Let, = 1 − 8 z −1 + 13z −2 − 5z −3
W(z) z
−1
−3
−1
∴ Y(z) = W(z) − 8 z W(z) + 13 z W(z) − 5z W(z) −2 −3 .....(4) −0.1875z W(z) −3
−5 z W( z )
−0.1875 −5
Using equations (3) and (4), the direct form-II structure is realized as
shown in fig 2.
F ig 2 : D irect fo rm -II stru ctu re.
Cascade Form
b
(z − 0.75) (z2 + z − 0.25) gd
z − 0.75 z2 + z − 0.25 i of the polynomial,
z3 − 8z2 + 13z − 5 = 0
z d1 − z id1 − 7z + 5z i
3 −1 −1 −2
= 1 1 − 8 13 − 5
z d1 − 0.75 z id1 + z − 0.25 z i
3 −1 −1 −2
B 1 −7 5
∴ H(z) =
d1− z id1− 7 z + 5 z i
−1 −1 −2
1 −7 5 0
(1 − z −1)(1 − 7z −1 + 5z −2 )
Let, H(z) = = H1(z) H2 (z)
d1− 0.75 z id1+ z−1 −1
− 0.25 z −2 i W1 (z )
−1 −1 −2
X (z ) + + Y1 (z )
1− z 1 − 7z + 5z
where, H1(z) = ; H2 (z) =
1 − 0.75 z −1 1 + z −1 − 0.25 z −2 z
−1
−1 −1
−1
0.75z W1 (z ) −z W1 (z)
Y (z) W (z) Y1(z) 1− z
Let, H1(z) = 1 = 1 =
X(z) X(z) W1(z) 1 − 0.75 z −1 0.75 −1
W1(z) 1 .....(5) F ig 3.
Let, = ⇒ W1(z) = X(z) + 0.75 z −1 W1(z)
X(z) 1 − 0.75 z −1
Y1(z) W 2 (z)
Let, = 1 − z −1 ⇒ Y1(z) = W1(z) − z −1 W1(z) .....(6) Y 1 (z) Y (z )
W1(z) + +
Using equations (5) and (6), the direct form-II structure of H1(z) is realized −1
as shown in fig 3. z
−1 −1
−z W 2 (z) −7 z W 2 (z )
Y(z) W2 (z) Y(z) 1 − 7z −1 + 5z −2
Let, H2 (z) = = = + −1 −7 +
Y1(z) Y1(z) W2 (z) 1 + z −1 − 0.25 z −2
W2 (z) 1
Let, = ⇒ W2 (z) = Y1(z) − z −1 W2 (z) + 0.25 z −2 W2 (z) .....(7) z
−1
Y1(z) 1 + z −1 − 0.25 z −2 −2
0.25z W 2 (z ) −2
5z W 2 (z )
Y(z) 0.25 5
Let = 1 − 7 z −1 + 5 z −2 ⇒ Y(z) = W2 (z) − 7z −1 W2 (z) + 5z −2 W2 (z) .....(8)
W2 (z)
F ig 4.
Using equations (7) and (8), the direct form-II structure of H2(z) is drawn as shown in fig 4.
The cascade structure is obtained by connecting the structures of H1(z) and H2(z) in cascade as shown in fig 5.
−1
z
H1(z) 0.25z −2 W2 (z) 5z
−2
W2 (z)
0.25 5
H 2 (z)
F ig 5 : C a sca de structu re.
E3. 20 DSP, Chapter 3 - Z-Transform
Parallel Form
z3 − 8z2 + 13z − 5
=
z + 0.25z2 − z + 0.1875
3
1
z3 + 0.25z2 − z + 0.1875 z 3 − 8z2 + 13z − 5
3
z + 0.25z2 − z + 0.1875
(–) (–) (+) (–)
− 8.25z2 + 14z − 5.1875
X (z ) Y 1 (z)
1
H 1 (z)
F ig 6.
Solution for Exercise Problems E3. 21
Y2 (z) 0.63z −1
Let, H2 (z) = =
X(z) 1 − 0.75z −1
∴ Y2 (z) = 0.63z −1X(z) + 0.75z −1Y2 (z) .....(10)
z
−1
0.63 z −1
X(z) 0.75 z −1 Y2 (z)
⇒ 0.75 z −1 W2 (z)
z
Convert to 0.63 z −1 W2 ( z)
−1
X(z) z 0.63 0.75 direct form-II
0.75 0.63
z −1 Y2 ( z)
F ig 7 .
Y (z) −8.88z −1 + 6.71z −2
Let, H3 (z) = 3 =
X(z) 1 + z −1 − 0.25z −2
∴ Y3 (z) = −8.88z −1X(z) + 6.71z −2 X(z) − z −1Y3 (z) + 0.25z −2 Y3 (z) .....(11)
X (z ) Y 3 (z) X (z ) W 3 ( z) Y 3 (z)
+ +
−1
−1 z
−1 z
z −8.88 z −1 X ( z ) −z −1 Y 3 ( z ) −z −1 W 3 ( z) −8 .88 z −1 W 3 ( z )
−1
z −1 Y 3 ( z)
z X (z ) + + −1
⇒ + −1 +
C onvert to
z
−1
6.71 z −2 X ( z ) 0 . 25 z −2 Y 3 ( z ) z
−1
direc t form -II −1
0 . 25 z −2 W3 ( z) z 6 .71 z −2 W 3 ( z )
−2
z X (z ) 6.71 0.25 z −2 Y 3 ( z )
0.25 6.71
F ig 8.
The parallel structure is obtained by connecting the structures of H1(z), H2(z) and H3(z) in parallel as shown in fig 9.
X (z ) Y 1 (z) Y (z )
1 +
H 1 (z)
Y 2 (z)
+ W 2 (z )
−1
z
H 2 (z) 0.75 z −1 W 2 ( z) 0.63 z −1 W 2 ( z )
0.75 0.63
Y 3 (z)
+ W 3 ( z)
−1
z
−z −1 W 3 ( z ) −8 .88 z −1 W 3 ( z )
+ −1 +
H 3 (z)
−1
2 z
0 . 25 z − W3 (z) 6.71 z −2 W 3 ( z )
0.25 6.71
E3.18. Realize the cascade and parallel structures of the system governed by the difference equation,
3 1 1
y(n) − y(n − 1) − y(n − 2) = x(n) + x(n − 1)
10 10 9
Solution
On taking Z-transform of given equation we get,
3 −1 1 −2 1
Y(z) − z Y(z) − z Y(z) = X(z) + z −1 X(z)
10 10 9
LM
Y(z) 1 −
3 −1 1 −2
z − z
1
= X(z) 1 + z −1
OP LM OP
N 10 10 9 Q N Q
E3. 22 DSP, Chapter 3 - Z-Transform
1
1 + z −1
1
1 + z −1 FG1− 3 z −1
−
1 −2
z
IJ
= z −2 z 2 −
3
z−
1 FG IJ
H(z) =
Y(z)
= 9
X(z) 1 − 3 z −1 − 1 z −2
=
1
9
1 FG IJ FG IJ .....(1) H 10 10 K 10 10 H K
1 − z −1 1 + z −1
10 10 2 5 H KH K The roots of quadratic,
3 1
Cascade Form z2 − z− = 0 are,
10 10
Let, H(z) = H1(z) H2(z)
3
±
FG 3 IJ 2
−4
FG −1IJ
1
1 + z −1
1 z=
10 H 10 K H 10 K
where, H1(z) = 9 ; H2 (z) =
1 −1 1 −1 2
1− z 1+ z
2 5 =
1 3 FG
±
7 1
= , −
1 IJ
1
H
2 10 10 2 5 K
1 + z −1
Let, H1(z) =
Y1(z) W1(z) Y1(z)
= = 9 ∴ z−2 z2 −
FG 3
z−
1
= z −2 z −
1IJ FG IJ FG z + 1IJ
X(z) X(z) W1(z) 1 − 1 z −1 H 10 10 2 K H K H 5K
2
= 1−
FG 1 −1
z
IJ FG1+ 1 z IJ −1
Let,
W1(z)
=
1 1
⇒ W1(z) = X(z) + z −1 W1(z) .....(2)
H 2 KH 5 K
X(z) 1 − 1 z −1 2
2 X (z ) W1 ( z ) Y 1 (z)
Y1(z) 1 1 .....(3)
+ +
Let, = 1 + z −1 ⇒ Y1(z) = W1(z) + z −1 W1(z)
W1(z) 9 9
z −1 1
1 −1
Using equations (2) and (3), the direct form-II structure of H1(z) is drawn as shown in fig 1. −1
z W1 (z ) z W1 (z)
2 9
Y(z) 1 1 −1 1 1
Let, H2 (z) = = ⇒ Y(z) = Y1(z) − z Y(z) .....(4) 2 9
Y1(z) 1 + 1 z −1 5
5 F ig 1.
Using equation (4), the H2(z) is realized as shown in fig 2.
Y 1 (z) + Y (z )
The cascade structure is drawn by connecting H1(z) and H2(z) in cascade as shown in fig 3
z −1
X (z ) W1(z ) Y1 ( z ) Y(z) 1 −1
+ + + − z Y (z)
5
1
−
5
−1 −1
z z
1 −1
z W 1 (z ) 1 −1 −
1 −1 F ig 2.
z W 1 (z) z Y (z )
2 5
9
1 1 1
2 −
9 5
H 1( z) H 2 (z )
Parallel Form
Consider equation (1),
1 −1
1+ z
9 A B
H(z) =
FG1− 1 z IJ FG1+ 1 z IJ = 1− 1 z
−1 −1 −1
+
1
1 − z −1
H 2 KH 5 K 2 5
1 −1 1
1+ z 1+ ×2
F 1 IJ 1. 2222
IJ GH
A= 9 × 1− −1
= 9 = = 0.87
FG1− 1 z IJ FG1+ 1 z
−1 −1 2 K 1
1+ × 2 1.4
H 2 KH 5 K z −1 = 2
5
1 −1 1
1+ z 1+ (−5)
F 1 −1 IJ 0.4444
IJ GH
B= 9 × 1+ z = 9 = = 0 .13
FG1− 1 z IJ FG1+ 1 z
−1 −1 5 K 1
1 − (−5) 3.5
H 2 KH 5 K z −1 = −5
2
0.87 0.13
∴ H(z) = + X (z ) + Y 1 (z)
1 −1 1
1− z 1 + z −1
2 5
z −1
1 −1
Y (z) 0.87 1 z Y1 (z)
Let, H1(z) = 1 = ⇒ Y1(z) = 0.87 X(z) + z −1 Y1(z) .....(5) 2
X(z) 1 − 1 z −1 2 1
2 2
z −1
1 −1
z Y1 (z)
2
−1
1 z Y1 (z)
H 1 (z)
2
Y 2 (z)
+
z −1
1 −1
H 2(z) − z Y 2 (z)
5 −1
1 z Y 2 (z )
−
5
E3.19. Draw the direct form structure of the FIR systems described by the following equations.
1 1 1 1
a) y( n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)
2 4 6 8
Solution
On taking Z-transform of given equation we get,
1 −1 1 1 1
Y(z) = X(z) + z X(z) + z−2 X(z) + z−3 X(z) + z −4 X(z) .....(1)
2 4 6 8
Using equation (1), the direct form structure of FIR system is drawn as shown in fig 1.
X (z ) z −1X ( z ) z −2 X ( z ) z −3 X ( z ) z −4 X ( z )
−1 −1 −1 −1
z z z z
1 1 1 1
2 4 6 8
1 −1 1 −2 1 −3 1 −4
z X (z ) z X (z) z X (z) z X (z)
2 4 6 8
+ + + + Y (z)
F ig 1 : D irect fo rm stru ctu re o f F IR system .
b) y(n) = 0.2 x(n) + 0.25 x(n − 1) + 0.3 x(n − 2) − 0.35 x(n − 3) − 0.4 x(n − 4) − 0.45 x(n − 5) − 0.5 x(n − 6)
Solution
On taking Z-transform of given equation we get,
Y(z) = 0.2 X(z) + 0.25 z−1 X(z) + 0.3 z−2 X(z) − 0.35 z−3 X(z) − 0.4 z −4 X(z) − 0.45 z−5 X(z) − 0.5 z−6 X(z) .....(2)
Using equation (2), the direct form structure of FIR system is drawn as shown in fig 2.
X (z ) z −1X ( z ) −1
z −2 X ( z) z −3 X ( z) z −4 X ( z ) z −5 X ( z) z −6 X ( z )
−1 −1 −1 −1 −1
z z z z z z
Using equation (1), the linear phase realization structure of FIR system is drawn as shown in fig 1. (The linear phase structure
requires minimum number of multipliers).
X (z ) X (z ) z −1X ( z) −1
z −2 X ( z)
−1
z z
+
+
−1 −1
z z
z −4 X ( z) z −3 X ( z )
H 9 KH 7 K
+
Solution
−2
Let, H(z) = H1(z) H2(z) z X (z )
−1
z
Y1(z) 1 0.3
Let, H1(z) = = 0.3 + z −1 + 0.3 z −2 1
X(z) 9
1 −1 9
1 −1 −2 z X (z )
9
∴ Y1(z) = 0.3 X(z) + z X(z) + 0.3 z −2 X(z) 0.3[X (z )+ z X (z)] Y 1 (z )
9 +
1 F ig 2.
= 0.3 X(z) + z −2 X(z) + z −1 X(z) .....(2)
9 Y 1 (z ) −1
z Y 1(z )
−1
Using equation (2), the linear phase realization of H1(z) is obtained as shown in fig 2. z
Y(z) 1
Let, H2 (z) = = 0.5 − z −1 + 0.5 z −2 +
Y1(z) 7
1 −1 −2
z Y 1(z )
∴ Y(z) = 0.5 Y1(z) − z Y1(z) + 0.5 z −2 Y1(z) z
−1
7
0.5
1
= 0.5 Y1(z) + z −2 Y1(z) − z −1Y1(z) .....(3) −
1
7 7
1 −1
−2
0.5[Y 1(z)+ z Y 1(z )] − z Y1 (z )
Using equation (3), the linear phase realization of H2(z) is obtained as shown in fig 3. 7
+ Y (z)
Cascade Realization of H(z) F ig 3.
The cascade realization of H(z) with minimum number of multipliers is obtained by connecting the structures of H1(z) and H2(z) in
cascade as shown in fig 4.
−1
X (z ) X (z ) z X (z ) Y 1 (z ) −1
z Y 1(z )
z −1 z −1
+ +
−2 −2
z X (z ) z Y 1(z )
z −1 z −1
0.3 0.5
1 1 −1 1
9 − z Y1 (z) − 7
1 −1 7
z X (z )
−2
0.3[X (z )+ z X (z)] 9 −2
Y 1 (z ) 0.5[Y 1 (z)+ z Y 1(z )] Y (z)
+ +
H 1 (z) H 2(z)
F ig 4 .
Solution for Exercise Problems E3. 25
−1 3 3 3 1
c) y(n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3) − x(n − 4)
8 4 2 4 8
Solution
On taking Z-transform of given equation we get,
1 3 3 3 1
Y(z) = − X(z) + z −1 X(z) + z −2 X(z) + z−3 X(z) − z−4 X(z)
8 4 2 4 8
1 3 3
∴ Y(z) = − X(z) + z−4 X(z) + z −1 X(z) + z−3 X(z) + z−2 X(z) .....(4)
8 4 2
Using equation (4), the linear phase structure of FIR system is drawn as shown in fig 5.
z −1X ( z) z −2 X ( z )
−1
X (z ) z
−1
z
+
+
−1 −1
z z
z −4 X ( z ) z −3 X ( z )
1 3 3
−
8 4 2
3 −2
3 −1 z X (z )
−
1
X (z ) + z −4 X (z) z X (z ) + z −3 X (z) 2
8 4
+ +
Y (z )
F ig 5.
Chapter 4
4.1 Introduction
A periodic discrete time signal with fundamental period N can be decomposed into N harmonically
related frequency components. The summation of the frequency components gives the Fourier series
representation of periodic discrete time signal, in which the discrete time signal is represented as a function
of frequency of discrete time signal, w. The Fourier series of discrete time signal is called Discrete Time
Fourier Series (DTFS). The frequency components are also called frequency spectrum of the discrete time
signal.
The Fourier representation of periodic discrete time signals has been extended to nonperiodic signals
by letting the fundamental period N to infinity, and this Fourier method of representing nonperiodic discrete
time signals as a function of frequency of discrete time signal, w is called Fourier transform of discrete time
signals or Discrete Time Fourier Transform (DTFT). The Fourier representation of discrete time signal is
also known as frequency domain representation. In general, the Fourier series representation can be obtained
only for periodic discrete time signals, but the Fourier transform technique can be applied to both periodic
and nonperiodic signals to obtain the frequency domain representation of the discrete time signals.
The Fourier representation of discrete time signals can be used to perform frequency domain analysis
of discrete time signals, in which we can study the various frequency components present in the signal,
magnitude and phase of various frequency components. The graphical plots of magnitude and phase as a
function of frequency are also drawn. The plot of magnitude versus frequency is called magnitude spectrum
and the plot of phase versus frequency is called phase spectrum. In general, these plots are called frequency
spectrum.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 2
4.2 Fourier Series of Discrete Time Signals (Discrete Time Fourier Series)
The Fourier series (or Discrete Time Fourier Series, DTFS) of discrete time periodic signal x(n) with
periodicity N is defined as,
N−1 j2 πkn N−1 N−1
bg ∑c
xn = k e N = ∑ c k e jω 0 k n = ∑ ck e jω n k .....(4.1)
k=0 k=0 k=0
2π
where, ck = Fourier coefficients; w0= = Fundamental frequency of x(n)
N
2 πk
ω k = ω 0k = = k th harmonic frequency of x(n)
N
ck e jω k n = kth harmonic component of x(n)
The Fourier coefficients, ck for k = 0, 1, 2, ....., N-1 can be evaluated using equation (4.2).
N−1 − j2 πkn
1
ck =
N ∑ x(n) e N ; for k = 0, 1, 2, ....., N − 1 .....(4.2)
n=0
The Fourier coefficient ck represents the amplitude and phase associated with the kth frequency
component. Hence we can say that the fourier coefficients provide the description of x(n) in the frequency
domain.
Proof :
Consider the Fourier series representation of the discrete time signal x(n).
N−1 j2πkn
x( n) = ∑ ck e N
k=0
Let us replace k by p.
N−1 j2 πpn
∴ x( n) =
p=0
∑ cp e N
− j2πkn
Let us multiply the above equation by e N on both sides.
− j2 πkn N−1 j2πpn − j2 πkn
x(n) e N = ∑ cp e N e N
p=0
On evaluating the above equation for n = 0 to N 1 and summing up the values we get,
N−1 − j2πkn N−1 N−1 j2πpn − j2 πkn
∑ x(n) e N = ∑ ∑ cp e N e N
Let us interchange the order of summation in the right-hand side of the above equation and rearrange
as shown below.
N−1 − j2πkn N−1 N−1 j2 π( p − k)n
∑ x(n) e N = ∑ cp ∑ e N
=
where, ck is the Fourier coefficient of kth harmonic component.
The Fourier coefficient, ck is a complex quantity and so it can be expressed in the polar form as shown
below.
c k = |c k | ∠c k ; for k = 0, 1, 2, 3, .......N-1
where, |ck| = Magnitude of ck ; Ðc = Phase of c
k k
The term, |ck| represents the magnitude of kth harmonic component and the term Ð ck represents the
phase of the kth harmonic component.
The plot of harmonic magnitude / phase of a discrete time signal versus "k" (or harmonic frequency
w k )is called frequency spectrum. The plot of harmonic magnitude versus "k" (or w k) is called magnitude
spectrum and the plot of harmonic phase versus "k" (or w k) is called phase spectrum.
The Fourier coefficients are periodic with period N.
∴ ck + N = ck
Since Fourier coefficients are periodic, the frequency spectrum is also periodic, with period N.
Proof :
Consider the Fourier coefficient ck of the discrete time signal x(n).
N−1 − j2 πkn
1
ck =
N
∑ x(n) e N
n=0
1 N−1 − j2 π k n
1 N−1 − j2 π k n of n, e j2pn = 1
=
N
∑ x(n) e N e− j2 π n =
N
∑ x(n) e N = ck
n=0 n=0
For a periodic discrete time signal with period N, there are N Fourier coefficients denoted as c0, c1,
c2, ...... cN -1, and so the N-number of Fourier coefficients can be expressed as a sequence consisting of N
values.
Fourier coefficients, l
c k = c0 , c1 , c2 , c3 ,......... c N −1q
Magnitude spectrum, |c k | = l|c |, |c |, |c |, |c |,.........|c |q
0 1 2 3 N-1
j2 πnm
Frequency shifting e N x(n) ck – m
c k = c∗− k
|c k |=|c − k |
∠c k = −∠c − k
Symmetry of real signals x(n) is real
Re{c k } = Re{c − k }
Im{c k } = − Im{c− k }
Real and even x(n) is real and even ck are real and even
Real and odd x(n) is real and odd ck are imaginary and odd
Parseval's relation Average power P of x(n) is Average power P in terms of
defined as, Fourier series coefficients is,
N−1 N−1
1
P =
N ∑ |x(n)|2 P = ∑ |ck |2
n=0 k=0
N−1 N−1
1
N ∑ |x(n)|2 = ∑ |ck |2
n=0 k=0
Note : The average power in the signal is the sum of the powers of the individual frequency components. The
sequence |ck|2 for k = 0, 1, 2,....., (N - 1) is the distribution of power as a function of frequency and so it is called
the power density spectrum (or) power spectral density of the periodic signal.
4. 5 Digital Signal Processing
Example 4.1
Determine the Fourier series representation of the following discrete time signals.
j5πn
3 πn
a) x(n) = 2 sin πn b) x(n) = 3 cos c) x(n) = e 2
2 4
Solution
3
a) Given that, x(n) = 2 sin πn
2
Test for Periodicity
3 F 3 3 I
Let, x(n + N) = 2 sin
2
π(n + N) = 2 sin GH 2
πn +
2
πN JK
3
For periodicity πN should be equal to integral multiple of 2p.
2
3 4
Let, πN = M ´ 2p ; where M and N are integers. ⇒ N = M
2 3
Here N cannot be an integer for any integer value of M and so x(n) will not be periodic.
Fourier Series
Here x(n) is nonperiodic signal and so Fourier series does not exists.
πn
b) Given that, x(n) = 3 cos
4
Test for Periodicity
n=0
2
e
PQ
4 4
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 6
LM πk F3πk IJ F IJ O 8 πk 3πk 8 πk πk
3 1 −j 4 1 −j 1 GH 4 K + 1 eGH
− jπk KP −j
4
+j
4
−j
4
+j
4
∴ ck = 1+ e − e −e − e
MMN
8 2 2 2 2 PPQ
3L O e =e e
πk 3π k 3πk πk
1 1
−j 1−j 1 j j
= M1 + e P
− jπk − j2πk − j2πk x +y x y
e − e 4 −e − e 4 e + e 4 4
8M PQ
N 2 2 2 2
3L O For integer k,
πk 3π k 3πk πk
1 1
−j 1−j 1 j j
= M1 + e − e 4 −e − e 4 + e P− jπk 4 4
8M PQ e == cos j2pk
2pk j sin 2pk
N 2 2 2 2
1 j0 = 1
3L 1 F I − 1 F e + e I − e OP
πk πk 3πk 3πk
=
8M
M1+ G e +e
j
JK 2 GH
4
−j
4
JK PQ
j
4
−j
4 − jπk
N 2H e +e jθ − jθ
3L 1 πk 1 3πk O cos θ =
= M1+ 2 cos − 2 cos − ccos πk − j sin πkhP 2
8N 2 4 2 4 Q − jθ
e = cos θ − j sin θ
3L πk 3πk O
8 MN
= 1 + 2 cos − 2 cos − cos πk P For integer k, sin πk = 0
4 4 Q
3L
When k = 0 ; c = c = M1 + 2 cos
π×0
− 2 cos
3π × 0 O 3
− cos π × 0 P = × 0 = 0
k 0
8N 4 4 Q 8
3L
When k = 1 ; c = c = M1 + 2 cos
π ×1
− 2 cos
3π × 1 O 3
− cos π × 1P = × 4 = 1.5
k 1
8N 4 4 Q 8
3L
When k = 2 ; c = c = M1 + 2 cos
π×2
− 2 cos
3π × 2 O 3
− cos π × 2 P = × 0 = 0
k 2
8N 4 4 Q 8
3L
When k = 3 ; c = c = M1 + 2 cos
π×3
− 2 cos
3π × 3 O 3
− cos π × 3 P = × 0 = 0
k 3
8N 4 4 Q 8
3L
When k = 4 ; c = c = M1 + 2 cos
π×4
− 2 cos
3π × 4 O 3
− cos π × 4 P = × 0 = 0
k 4
8N 4 4 Q 8
3L
When k = 5 ; c = c = M1 + 2 cos
π×5
− 2 cos
3π × 5 O 3
− cos π × 5 P = × 0 = 0
k 5
8N 4 4 Q 8
3L
When k = 6 ; c = c = M1 + 2 cos
π×6
− 2 cos
3π × 6 O 3
− cos π × 6 P = × 0 = 0
k 6
8N 4 4 Q 8
3L π×7 3π × 7 O 3
When k = 7 ; c = c = M1 + 2 cos − 2 cos − cos π × 7 P = × 4 = 1.5
k
8N Q 8
7
4 4
The Fourier series representation of x(n) is,
N − 1 j2πkn 7 j2πkn 7 jπkn
x(n) = ∑ ck e N = ∑ ck e 8 = ∑ ck e 4
k =0 k =0 k =0
jπn j2πn j3πn j4πn j5πn j6 πn j7 πn
= c0 + c1 e4 + c2 e 4 + c3 e 4 + c4 e 4 + c5 e 4 + c6 e 4 + c7 e 4
jπn j7 πn
π
= 0 + 1.5 e 4 + 0 + 0 + 0 + 0 + 0 + 1.5 e 4 = 1.5 ejω n + 1.5 ej7ω
0 0 n
; where ω 0 =
4
j5 πn
c) Given that, x(n) = e 2
3 j5πn − j2 πkn
1
∴ ck =
4
∑ e 2 e 4 ; for k = 0, 1, 2, 3
n=0
1 3 jπn(5 − k)
1 LM jπ ( 5 − k) j2π ( 5 − k) j3π ( 5 − k) OP
=
4
∑ e 2 =
4
e0 + e
MN
2 + e 2 + e 2
PQ
n=0
=
1 LM
1 + e
jπ ( 5 − k)
+ e 2 + e
OP jπ ( 5 − k)
j3π ( 5 − k)
2
4 MN PQ
LM1 + cos π(5 − k) + jsin π(5 − k) + cos π(5 − k) + jsin π(5 − k) OP
1
=
4
MM 2 2
3π(5 − k)
P
3π(5 − k) P
MN + cos
2
+ jsin
2 PQ
1 L 5π 5π 15π 15π O
4 MN 2 PQ
When k = 0; ck = c =
0 1 + cos + jsin + cos 5π + jsin 5π + cos + jsin
2 2 2
1
=
1 + 0 + j − 1 + j0 + 0 − j = 0
4
1
When k = 1; ck = c1 = 1 + cos 2π + jsin 2π + cos 4π + jsin 4π + cos 6π + jsin6π
4
1
= 1 + 1 + j0 + 1 + j0 + 1 + j0 = 1
4
When k = 2; ck = c2 =
1
1 + cos
3π
+ jsin
LM
3π
+ cos 3π + jsin3π + cos
9π
+ jsin
9π OP
4 2 2N 2 2 Q
1
= 1 + 0 − j − 1 + j0 + 0 + j = 0
4
1
When k = 3; ck = c3 = 1+ cos π + jsin π + cos 2π + jsin 2π + cos 3π + jsin3π
4
1
= 1 − 1 + j0 + 1 + j0 − 1 + j0 = 0
4
The Fourier series representation of x(n) is,
N − 1 j2 πkn 3 j2 πkn 3 jπkn
x(n) = ∑ ck e N = ∑ ck e 4 = ∑c k e 2
k =0 k =0 k =0
jπn j3πn jπn jπn
= c0 + c1 e2 + c2 e jπn + c3 e 2 = 0 + e 2 + 0 + 0 =e 2 = e jω 0n
j5 πn
j
FG 4 πn +
πn IJ jπ n jπn
Note : x(n) = e 2 = e H 2 2 K = e j2πn e 2 = e 2 = e jω n 0
n=0 n =0
=
1 L
Mx(0) + x(1) e
− j2πk
3 + x(2) e
− j4 πk
3
OP =
1 LM
1 + 2e
− j2πk
3 − 3e
− j4 πk
3
OP
3 MN PQ 3 MN PQ
1
When k = 0; ck = c0 = [1 + 2 − 3] = 0
3
When k = 1; ck = c1 =
1 LM
1 + 2e − 3e
− j2π
3
OP − j4 π
3
3 MN PQ
1 L 2π 2π 4π 4π O
3 MN 3 PQ
= 1 + 2 cos − j2 sin − 3cos + 3 jsin
3 3 3
1 L 1 3 1 3O
= M
3 MN
1 − 2 ×
2
− j2 ×
2
+ 3×
2
− 3j × P
2 PQ
1 L3
= M − j 523 OPP = 21 − j 563 = 0.5 − j1.443
3 NM 2
124
. × π = 0.395π
π
Q
= 1.527∠ − 1.24 rad = 1.527∠ − 0.395π = 1.527 e−0.395π
When k = 2; ck = c 2 =
1 LM
1 + 2e − 3e 3
OP
− j4 π − j8 π
3
3 MN PQ
1 L 4π 4π 8π 8π O
3 MN 3 PQ
= 1 + 2 cos − j2 sin − 3 cos + 3 j sin
3 3 3
=
1 L
M1 − 2 × 21 + j2 × 23 + 3 × 21 + 3 j × 23 OPP
3 MN Q
=
1 3L O
M + j 5 23 PP = 21 + j 5 63 = 0.5 + j1.443 124
. × π = 0.395π
3 MN 2 π
Q
= 1.527 ∠1.24 rad = 1.527 ∠0.395π = 1.527 e j0.395π
The Fourier series representation of x(n) is,
N − 1 j2 πkn 2 j2πkn j2πn j4 πn
x(n) = ∑ ck e N = ∑c k e 3 = c0 + c1 e 3 + c2 e 3
k =0 k =0
j2 πn j4 πn
= 0 + 1.527 e− j0.395π e 3 + 1.527 e j0.395π e 3
The frequency spectrum has two components : Magnitude spectrum and Phase spectrum.
The magnitude spectrum is obtained from magnitude of ck and phase spectrum is obtained from
phase of ck.
m
Here, ck = c0 , c1, c2 = 0, r l 1.527 ∠ − 0.395π , 1.527 ∠0.395π q
∴ Magnitude spectrum, ck = 0, 1.527, 1.527 l q
Phase spectrum, ∠ck = 0, − 0.395π, 0.395π l q
The sketch of magnitude and phase spectrum are shown in fig 1.
Here both the spectrum are periodic with period, N = 3.
∠c k
ck
0.4π
2.0 0.395π 0.395π 0.395π
1.0 −3 −2 −1 0 1 2 3 5
4 k
0.5
4.3 Fourier Transform of Discrete Time Signals (Discrete Time Fourier Transform)
4.3.1 Development of Discrete Time Fourier Transform From Discrete Time Fourier Series
Let ~
x(n) be a periodic sequence with period N. If the period N tends to infinity then the periodic
sequence ~
x(n) will become a nonperiodic sequence x(n).
∴ x( n) = Lt ~x ( n)
N →∞
n=0 n=0
Since ~x ( n) is periodic, for even values of N, the summation index in the above equation can be
changed from n = − d N
2 i
− 1 to + N
2 . (For odd values of N, the summation index is n = − N2 to + N
2 ).
+N − j2 πkn +N
2 2
~
∴ Nc k = ∑ x(n) e N = ∑ ~x(n) e− jω n k
.....(4.3)
n = − N −1
e j n = − N −1
e j
2 2
2 πk
where, ω k =
N
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 10
n = − N −1
e j
2
k=0
The equation (4.8) is called inverse Fourier transform of x(n), which is used to extract the discrete time
signal from its frequency domain representation.
Since equation (4.6) extracts the frequency components of discrete time signal, the transformation
using equation (4.6) is also called analysis of discrete time signal x(n). Since equation (4.8) integrates or
combines the frequency components of discrete time signal, the inverse transformation using equation (4.8)
is also called synthesis of discrete time signal x(n).
The Fourier transform of a signal is said to exist if it can be expressed in a valid functional form. Since
the computation of Fourier transform involves summing infinite number of terms, the Fourier transform exists
only for the signals that are absolutely summable, i.e., given a signal x(n), the X(ejw ) exists only when,
+∞
∑
n = −∞
|x(n)| < ∞
MN X (e ) PQ
r
jω
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 12
4.3.4 Inverse Discrete Time Fourier Transform
Let, x(n) = Discrete time signal
X(ejw ) = Fourier transform of x(n)
The inverse discrete time Fourier transform of X(ejw ) is defined as,
π
x( n) =
1
2π z
−π
X( e jω ) e jωn dω ; for n = − ∞ to + ∞ .....(4.9)
Symbolically the inverse Fourier transform can be expressed as, F-1{X(ejw )}, where, F-1 is the operator
that represents the inverse Fourier transform.
π
−1
∴ x( n) = F {X(e )} =
1
2π
jω
z
−π
X( e jω ) e jωn dω ; for n = − ∞ to + ∞
jw
Since X(e ) is periodic with period 2p, the limits of integral in the above definition of inverse Fourier
transform can be either "-p to +p",or "0 to 2p", or "any interval of 2p".
We also refer to x(n) and X(ejw ) as a Fourier transform pair and this relation is expressed as,
F
x(n) ¬ ® X(ejw )
F -1
Alternate Method for Inverse Fourier Transform
The integral solution of equation (4.9)for the inverse Fourier transform is useful for analytic purpose,
but sometimes it will be difficult to evaluate for typical functional forms of X(ejw ). An alternate and more useful
method of determining the values of x(n) follows directly from the definition of the Fourier transform.
Consider the definition of Fourier transform of x(n).
+∞
X( e jω ) = ∑ x(n) e− jωn
n = −∞
Let us expand the above equation of X(ejw ) as shown below.
+∞
X(e jω ) = ∑ x(n) e− jωn
n = −∞
n = −∞ n = −∞
2. Periodicity
Let, F{x(n)} = X(ejw ), then X(ejw ) is periodic with period 2p.
\ X(ej(w + 2pm)) = X(ejw ) ; where m is an integer
Proof :
+∞
X(e j(ω + 2 π m) ) = ∑ x(n) e− j(ω + 2π m)n
n = −∞
+∞
= ∑ x(n) e − jω n
e− j2π m n
n = −∞
+∞
Since m and n are
= ∑ x(n) e − jωn
= X(e jω )
integers, ej2pmn = 1
n = −∞
Proof :
p = −∞
+∞
= ∑ x(p) e − jωm
e− jωp
p = −∞
+∞ +∞
= e− jω m ∑ x(p) e − jωp
= e− jω m ∑ x(n) e − jωn
Let, p → n
p = −∞ n = −∞
4. Time reversal
Let, F{x(n)} = X(ejw ), then F{x(-n)} = X(e-jw )
This means that if a signal is folded about the origin in time, its magnitude spectrum remains unchanged
and the phase spectrum undergoes a change in sign (phase reversal).
Proof :
+∞ +∞ Let, p = n
F {x(− n)} = ∑ x(−n) e − jωn
= ∑ x(p) e jωp
when n ® -¥, p ® +¥
n = −∞ p = −∞ when n ® +¥ , p ® -¥
+∞
= ∑ x(p) (e − jω − p
) .....(4.15)
p = −∞
The equation (4.15) is similar
= X(e− jω ) to the form of equation (4.14)
5. Conjugation
If, F{x(n)} = X (ejw )
then, F{x*(n)} = X*(e-jw )
Proof :
By the definition of Fourier transform,
+∞
X(e jω ) = F {x(n)} = ∑ x(n) e − jωn
n = −∞
+∞
∗ ∗
F {x (n)} = ∑ x (n) e
n = −∞
− jωn
LM x(n) (e
+∞ OP∗ = X(e ∗
MN ∑
− jω − n − jω
= ) )
n = −∞ PQ
= X∗(e− jω )
4. 15 Digital Signal Processing
6. Frequency shifting
Let, F{x(n)} = X(ejw ), then F{e jω n x(n)} = X(e j( ω − ω ) )
0 0
+∞
= ∑ x(n) e − j( ω − ω o )n
.....(4.17)
n = −∞
The equation (4.17) is similar
= X(e j( ω − ω o ) )
to the form of equation (4.16)
m
Now, F x1 (n) x2 (n) = r 1
2π z
+π
−π
X1 (e jλ ) X2 (e j( ω − λ ) ) dλ .....(4.18)
n = −∞
+∞
.....(4.19)
= ∑ x (n) x (n) e
2 1
− jωn
n = −∞
x1(n) =
1
2π z
−π
X1(e jω ) e jω n dω
Let, w = l
+π
=
1
2π z
−π
jλ
X1(e ) e jλ n
dλ .....(4.20)
LM 1 +π OP
F {x1(n) x 2 (n)} = ∑
+∞
n = −∞
x 2 ( n)
MN 2π z
−π
X1(e jλ ) e jλn dλ e− jωn
PQ
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 16
On interchanging the order of summation and integration in the above equation we get,
+π
LM x (n) e OP X (e
F {x1(n) x 2(n)} =
1
2π z
−π
MN ∑
+∞
n = −∞
2
− j( ω − λ )n
PQ1
jλ
) dλ
The term in the paranthesis in the above equation is similar to the definition of fourier
transform of x2(n) but at a frequency argument of (w -l).
+π
∴ F {x1(n) x 2(n)} =
1
2π z
−π
X 2(e j(ω − λ ) ) X1(e jλ ) dλ
+π
=
1
2π z −π
X1(e jλ ) X 2(e j(ω − λ ) ) dλ
Proof :
n = −∞
+∞
= ∑ n x(n) j × (− j) e
n = −∞
− jωn
Multiply by j and -j
+∞ j ´ (j) = 1
=j ∑ x(n) [ − jn e
n = −∞
− jωn
]
=j
+∞
∑
LM d e OP
x(n) − jωn d − jωn
e = − jn e− jωn
n = −∞ N dω Q dω
d L
M ∑ x(n) e OPP
+∞
− jωn
=j
dω NM Q
n = −∞ Interchanging summation
and differentiation
d
=j X(e jω )
dω Using equation (4.21)
9. Convolution theorem
If, F{x1(n)} = X1(ejw )
and, F{x2(n)} = X2(ejw )
then, F{x1(n) * x2(n)} = X1(ejw ) X2(ejw )
+∞
The Fourier transform of the convolution of x1(n) and x2(n) is equal to the product of X1(ejw ) and
jw
X2(e ). It means that if we convolve two signals in time domain, it is equivalent to multiplying their spectra in
frequency domain.
4. 17 Digital Signal Processing
Proof :
By the definition of Fourier transform,
+∞
X1(e jω ) = F {x1(n)} = ∑ x (n) e 1
− jωn
.....(4.23)
n = −∞
+∞
X 2(e jω ) = F {x 2(n)} = ∑ x (n) e 2
− jωn
.....(4.24)
n = −∞
+∞
F {x1(n) ∗ x 2(n)} = ∑ x1(n) ∗ x 2(n) e− jωn
n = −∞
+∞ LM +∞ OP Using equation (4.22)
= ∑
n = −∞ MN ∑
m = −∞
x1(m) x 2(n − m) e− jωn
PQ
+∞ +∞
Multiply by e-jwm and ejwm
= ∑ ∑ x1(m) x 2(n − m) e − jωn
e − jωm
e jωm e-jwm ´ ejwm = 1
n = −∞ m = −∞
+∞ +∞
Let, n m = p
when n ® -¥, p ® -¥
= ∑ x1(m) e− jωm ∑ x 2(n − m) e− jω( n − m)
when n ® +¥ , p ® +¥
m = −∞ n = −∞
+∞ +∞
= ∑ x1(m) e− jωm ∑ x 2(p) e− jωp
m = −∞ p = −∞
Let m = n, in first summation
LM x (n) e
+∞ OP LM x (n) e
+∞ OP
MN ∑ PQ MN ∑
= − jωn − jωn Let p = n, in second summation
n = −∞
1
n = −∞
2
PQ Using equations (4.23) and (4.24)
= X1(e jω ) X 2(e jω )
10. Correlation
If, F{x (n)} = X(ejw ) and F{y (n)} = Y(ejw )
then, F{rxy(m)} = X(ejw ) Y(e-jw )
+∞
Proof :
By the definition of Fourier transform,
+∞
X(e jω ) = F {x(n)} = ∑ x(n) e − jωn
.....(4.26)
n = −∞
+∞
Y(e jω ) = F {y(n)} = ∑ y(n) e − jωn
.....(4.27)
n = −∞
LM +∞ OP LM +∞ OP when m ® +¥ , p ® -¥.
=
MN ∑
n = −∞
x( n) e− jω n
PQ MN ∑
p = −∞
y(p) (e− jω )− p
PQ Using equations (4.26) and (4.27)
jω − jω
= X(e ) Y(e )
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 18
∑
+∞
n = −∞
x1 (n) x∗2 (n) =
1
2π z
−π
X1 (e jω ) X ∗2 (e jω ) dω .....(4.28)
When x1(n) = x2(n) = x(n), then Parseval’s relation can be written as,
+π x(n) x*(n) = |x(n)|2
∑
+∞
n = −∞
x(n) =
1
2π
2
z
−π
X(e ) dω jω
2
X(ejw ) X*(ejw ) = |X(ejw )|2
The above equation is also called energy density spectrum of the signal x(n).
Proof :
Let, F {x1(n)} = X1(ejw ) and F {x2(n)} = X2(ejw )
Now, by definition of Fourier transform, `
+∞
m r
F x1( n) = X1(e jω ) = ∑ x ( n) e
n = −∞
1
− jωn
.....(4.29)
In the above expression, Let us substitute for X1(ejw ) from equation (4.29),
+π
∴
1
2π z
-π
X1(e jω ) X 2* (e jω ) dω
z LMMN ∑ OP
+π +∞
1
= x1( n) e− jωn X *2 (e jω ) dω
2π
-π n = −∞ PQ Interchanging
L1 +π OP summation and integration
=
+∞
∑ x1(n) MM 2π
n = −∞ N z
-π
X *2 (e jω ) e− jωn dω
PQ Using equation (4.30)
L1 +π OP*
=
+∞
∑ x (n) MM 2π
n = −∞
1
N z
-π
X 2(e jω ) e jωn dω
PQ
+∞
= ∑ x1(n) x*2 (n)
n = −∞
4. 19 Digital Signal Processing
Differentiation in
d
j X(e jω )
frequency domain n x(n) dω
+∞
Convolution X1(ejw ) X2(ejw )
x1 ( n) ∗ x 2 ( n) = ∑ x1 ( m) x2 ( n − m)
m = −∞
+∞
Correlation rxy ( m) = ∑ x(n) y(n − m) X(ejw ) Y(e–jw )
m = −∞
Symmetry of X(e jω ) = X∗ ( e − jω )
real signals x(n) is real Re{X(e jω )} = Re{X(e − jω )}
Im{X(e jω )} = − Im{X(e − jω )}
| X( e jω )| =| X( e − jω )|, ∠X(e jω ) = −∠X(e − jω )
Symmetry of
real and even signal x(n) is real and even X(ejw ) is real and even
Symmetry of real and
odd signal x(n) is real and odd X(ejw ) is imaginary and odd
+π
Parseval's relation
+∞
∑
n = −∞
x1 (n) x∗2 (n)
1
2π z
−π
X1 ( e jω ) X∗2 ( e jω ) dω
E=
+∞
∑ |x(n)|
n = −∞
2 E=
1
2π z
−π
|X(e jω )|2 dω
+∞ π
∑ |x(n)|2 = 2π
n = −∞
1
z
−π
2
X(e jω ) dω
2
Note : The term X(e jw ) represents the distribution of energy as a function of frequency and so
it is called energy density spectrum or energy spectral density.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 20
bg
Let, g n = e jω 0 n
+∞
m b gr o t ∑ 2πδ(ω − ω
∴ G(e jω ) = F g n = F e jω 0 n = 0 − 2 πm) .....(4.31)
m =−∞
2π
where, ω 0 = = Fundamental frequency of g(n).
N
In equation (4.31), d(w) is an impulse function of w and w 0 lie in the range -p to + p.
The equation (4.31) can be proved by taking inverse Fourier transform of G(ejw ) as shown below.
Proof :
+∞
G(e jω ) = ∑ 2π δ( ω − ω 0 − 2πm )
m =− ∞
o
g( n) = F -1 G(e jω ) = t 1
z
2π − π
G(e jω ) e jωn dω
+π +∞
=
1
2π z ∑ 2π δ( ω − ω
−π m =− ∞
0 − 2πm ) e jωn dω
Note : Here the integral limit is -p to +p,
+π
= z
−π
δ(ω − ω 0 ) e jωn
dω = e jωn
ω =ω0
=e jω 0 n and in this range there is only one impulse
located at w 0 .
Consider the Fourier series representation of periodic discrete time signal x(n), shown below.
N−1
x(n) = ∑ c k e jω k n
k=0
N−1 − j2 πkn
1
where, c k =
N ∑ x(n) e N ; for k = 0, 1, 2, ....., (N − 1) .....(4.32)
n=0
2 πk
ωk =
N
On comparing g(n) and x(n), we can say that the Fourier transform of x(n) can be obtained from its
Fourier series representation, as shown below.
m b gr R|S| ∑ |UV ∑
N−1 +∞
X(e jω ) = F x n = F ck e jω k n = c k 2 π δ (ω − ω k ) .....(4.33)
T k=0 |W k =−∞
The equation (4.33) can be used to compute Fourier transform of any periodic discrete time signal x(n),
and the Fourier transform consists of train of impulses located at the harmonic frequencies of x(n).
4. 21 Digital Signal Processing
Table 4.3 : Some Common Discrete Time Fourier Transform Pairs
d(n) 1 1
1
d(n-n0) e − jωn0
e jωn 0
+∞ +∞
e jω 1
u(n) jω
+
e − 1 m =−∞
∑
π δ (ω − 2 πm)
1 − e − jω
+ ∑ π δ(ω − 2πm)
m =−∞
e jω 1
an u(n) jω
e −a 1− a e− jω
a e jω a e − jω
n
n a u(n)
(e jω − a ) 2 (1 − a e − jω ) 2
a e jω (e jω + a) a e − jω (1 + a e − jω )
n2 an u(n)
( e jω − a ) 3 (1 − a e − jω ) 3
e jω 1
e- at u(t) e- anT u(nT) − jω − aT
e jω − e − aT 1− e e
+∞
1 2π ∑ δ b ω − 2 πm g
m =−∞
1 − a2
n
a 1 − 2a cosω + a 2
+∞ +∞
2π
∑ δ( n − mN) N m=−∞ ∑ e
δ ω−
2π m
N j
m =−∞
+∞
e j Ω0 n t = e j ω 0 n
e j Ω0 t 2π ∑ δ(ω − ω 0 − 2 πm)
where, ω 0 = Ω 0T m =−∞
sin Ω0 nT +∞
π
sinΩ0 t = sin ω 0 n ∑
j m =−∞
δ (ω − ω 0 − 2 πm) − δ (ω + ω 0 − 2 πm)
where, ω 0 = Ω0T
cos Ω0 nT +∞
cosΩ0t = cos ω 0 n
π ∑ δ (ω − ω 0 − 2 πm) + δ (ω + ω 0 − 2 πm)
m =−∞
where, ω 0 = Ω0T
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 22
4.6 Analysis of LTI Discrete Time System Using Discrete Time Fourier Transform
4.6.1 Transfer Function of LTI Discrete Time System in Frequency Domain
The ratio of Fourier transform of output and the Fourier transform of input is called transfer function
of LTI discrete time system in frequency domain.
Let, x(n) = Input to the discrete time system
y(n) = Output of the discrete time system
\ X(ejw ) = Fourier transform of x(n)
Y(ejw ) = Fourier transform of y(n)
Y( e jω )
Now , Transfer function = .....(4.34)
X( e jω )
The transfer function of an LTI discrete time system in frequency domain can be obtained from the
difference equation governing the input-output relation of the LTI discrete time system given
below, [refer Chapter 2, equation (2.17)].
N M
y ( n) = − ∑ a m y( n − m) + ∑ b m x(n − m)
m=1 m=0
On taking Fourier transform of above equation and rearranging the resultant equation as a ratio of
Y(ejw ) and X(ejw ), the transfer function of LTI discrete time system in frequency domain is obtained.
Impulse Response and Transfer Function
Let, x(n) = Input of an LTI discrete time system
y(n) = Output / Response of the LTI discrete time system for the input x(n)
h(n) = Impulse response (i.e., response for impulse input)
Now, the response y(n) of the discrete time system is given by convolution of input and impulse
response, [refer Chapter 2, equation (2.33)].
+∞
.....(4.35)
∴ y(n) = x(n) ∗ h(n) = ∑ x(m) h(n − m)
m = −∞
Y ( e jω )
∴ H( e jω ) = .....(4.37)
X ( e jω )
From equations (4.34) and (4.37) we can say that the transfer function of a discrete time system in
frequency domain is also given by discrete time Fourier transform of impulse response.
4. 23 Digital Signal Processing
4.6.2 Response of LTI Discrete Time System using Discrete Time Fourier Transform
Consider the transfer function of LTI discrete time system.
Y( e jω )
H ( e jω ) =
X( e jω )
From the equation (4.39) we can say that the output y(n) is given by the inverse Fourier transform of
the product of X(ejw ) and H(ejw ).
Since the transfer function is defined with zero initial conditions, the response obtained by using
equation (4.39) is the forced response or steady state response of discrete time system.
Consider a special class of input (sinusoidal input), Ae jωn = A ( cos ωn + j sin ωn)
+∞
= A e jωn ∑
m = −∞
h(m) e− jωm .....(4.43)
Using equations (4.41) and (4.44), the equation (4.43) can be written as,
y(n) = x(n) H(ejw ) .....(4.45)
From equation (4.45), we can say that if a complex sinusoidal signal is given as input signal to an LTI
system, then the output is also a sinusoidal signal of the same frequency modified by H(ejw ). Hence H(ejw )
is called the frequency response of the system. An LTI system is characterized in the frequency domain by
its frequency response.
Chapter 4 - Fourier Series & Fourier Transform of Discrete Time Signals 4. 24
The function H(ejw ) is a complex quantity. Therefore, H(ejw ) produces a change in the amplitude and
phase of the input signal.
Let us express H(ejw ) as magnitude function and phase function.
\ H(ejw ) = |H(ejw )| ÐH(ejw )
where, |H(ejw ) | = Magnitude function
ÐH(ejw ) = Phase function
The sketch of magnitude function and phase function with respect to w will give the frequency
response graphically.
Let, H(ejw ) = Hr(ejw ) + jHi(ejw )
where, Hr(ejw ) = Real part of H(ejw )
Hi(ejw ) = Imaginary part of H(ejw )
The magnitude function is defined as,
|H(ejw )|2 = H(ejw ) H*(ejw ) = [Hr(ejw ) + jHi(ejw )] [Hr(ejw ) - jHi(ejw )]
where, H*(ejw ) is complex conjugate of H(ejw )
MN H (e ) PQ
r
jω
The drawback in frequency response analysis using Fourier transform is that the frequency response
is a continuous function of w and so it cannot be processed by digital systems. This drawback is overcome
in Discrete Fourier Transform (DFT) discussed in Chapter 5.
From equation (4.37) we can say that the frequency response H(ejw ) of an LTI system is same as
transfer function in frequency domain and so, the frequency response is also given by the ratio of Fourier
transform of output to Fourier transform of input.
Y(e jω ) .....(4.46)
i. e., Frequency response, H(e jω ) =
X ( e jω )
Properties of Frequency Response
1. The frequency response is periodic function of w with a period of 2p.
2. If h(n) is real, then the magnitude of H(ejw ) is symmetric and phase of H(ejw ) is antisymmetric
over the interval 0 £ w £ 2p.
3. If h(n) is complex, then the real part of H(ejw ) is symmetric and the imaginary part of H(ejw )
is antisymmetric over the interval 0 £ w £ 2p.
4. The impulse response h(n) is discrete, whereas the frequency response H(ejw ) is continuous
function of w.
4. 25 Digital Signal Processing
4.6.4 Frequency Response of First-Order Discrete Time System
A first-order discrete time system is characterized by the difference equation,
y(n) = x(n) + a y(n-1) .....(4.47)
On taking Fourier transform of equation(4.47) we get,
Y(ejw ) = X(ejw ) + a e-jw Y(ejw ) Þ Y(ejw ) - a e-jw Y(ejw ) = X(ejw )
Y( e jω ) 1
\ Y(ejw ) [1 - a e-jw ] = X(ejw ) Þ H (e jω ) = = .....(4.48)
X( e jω ) 1 − a e − jω
The equation(4.48) is the frequency response of first-order system. The frequency response can be
expressed graphically as two functions: Magnitude function and Phase function.
The magnitude function of H(ejw ) is defined as,
2 1 1 1
H (e jω ) = H ( e jω ) H ∗ (e jω ) = − jω jω
= jω − jω
(1 − a e ) (1 − a e ) 1 − a e − a e + a 2 e − jω e jω
1 1 .....(4.49)
= jω − jω 2
=
1 − a(e + e ) + a 1 − 2a cos ω + a 2
1
∴ H(e jω ) =
1 − 2a cos ω + a 2
∠H(e jω ) = tan −1
LM H (e
i
jω
)OP
; where H r (e jω ) is real part and H i (e jω ) is imaginary part.
MN H (e
r
jω
) PQ
To find the real part and imaginary part of H(ejw ), multiply the numerator and denominator of H(ejw )
[equation (4.48)], by the complex conjugate of the denominator as shown below.
LM H (e OP LM PQO
jω
) − a sin ω
The phase function, ∠H(e jω ) = tan −1 i
= tan −1
MN H (e
r
jω
) PQ N
1 − a cos ω
The Magnitude and Phase responses are calculated for a = 0.5, 0.8, -0.5 and -0.8 and tabulated in
Table-4.4. Using the calculated values, the |H(ejw )| and Ð H(ejw ) are sketched graphically for a = 0.5, 0.8, -0.5
and -0.8 in fig 4.1, 4.2, 4.3 and 4.4 respectively. From the plots it is inferred that the first-order system behaves
as a lowpass filter when "a" is in the range of "0 < a < 1" and behaves as a highpass filter when "a" is in
the range of "-1 < a < 0".
Chapter 4 - Fourier Series & Fourier Transform of Discrete Time Signals 4. 26
Table 4.4 : Frequency Response of First-Order Discrete Time System
H ( e jω ) =
1 FG −a sin ω IJ
∠H(e jω ) = tan −1
1 − 2a cos ω + a 2 H 1 − a cos ω K
L 1 F −a sin ω I OP π
= M tan G
MN π H 1 − a cosω JK PQ
−1
5.0
4.0
3.0
a = 0 .8
2.0
a = 0 .5
1.0
0.75
0.50
0.26
−π −7 π −6 π −5 π −4 π −3 π −2 π −π 0 π 2π 3π 4π 5π 6π 7π π
8 8 8 8 8 8 8 8 8 8 8 8 8 8
Chapter 4 - Fourier Series & Fourier Transform of Discrete Time Signals 4. 28
∠H ( e jω )
0.3π
a = 0 .8
0.2π
a = 0 .5
0.1π
0
−π −7 π −6 π −5 π −4 π −3 π −2 π −π π 2π 3π 4π 5π 6π 7π π
8 8 8 8 8 8 8 8 8 8 8 8 8
8
−0.1 π
−0.2 π
−0.3 π
4. 29 Digital Signal Processing
e j
H e jω
5.0
4.0
3.0
a = −0 .8
2.0
a = −0 .5
1.0
0.75
0.50
0.25
−π 7π 6π 4π 3π 2π π π 2π 3π 4π 5π 6π 7π π
− − 5π − − − −
− 8 8
8 8 8 8 8 8 8 8 8 8 8 8
Chapter 4 - Fourier Series & Fourier Transform of Discrete Time Signals 4. 30
a = −0.8
e j
∠H e jω
0.3π
0.2π
0.1π
−π π 0 π
7π 6π 5π 4π 3π 2π − π 2π 3π 4π 5π 6π 7π
− − − − − − 8
8 8 8 8 8 8 8 8 8 8 8 8 8
−0.1 π
−0.2 π
−0.3 π
4. 31 Digital Signal Processing
4.6.5 Frequency Response of Second-Order Discrete Time System
A second order discrete time system is characterized by the difference equation.
y(n) = 2r cosw 0 y(n–1) – r2 y(n–2) + x(n) – r cosw 0 x(n–1)
Let a = –r cosw 0 ; a = –2r cosw 0 ; b = r2
\ y(n) = -a y(n-1) - b y(n–2) + x(n) + a x(n–1) .....(4.50)
On taking Fourier transform of the equation (4.50) we get,
Y(e jω ) 1 + a e − jω
∴ H(e jω ) = = .....(4.51)
X(e jω ) 1 + α e − jω + β e − j2 ω
The equation (4.51) is the frequency response of second-order system.The frequency response can
be expressed graphically as two functions: Magnitude function and Phase function.
2 1 + a e − jω 1 + a e +jω
H (e jω ) = H ( e jω ) H∗ ( e jω ) = − jω − j2 ω
1+ αe +β e 1 + α e + jω + β e +j2ω
1 + a e jω + a e− jω + a 2
=
1 + α e jω + β e j2 ω + α e− jω + α 2 + α β e jω + β e − j2 ω + α β e − jω + β2
1 + a(e jω + e − jω ) + a 2
=
1 + α + β + αβ(e + e − jω ) + β(e j2ω + e− j2ω ) + α (e jω + e− jω )
2 2 jω
1 + 2a cos ω + a 2 .....(4.52)
= 2 2
1 + α + β + 2αβ cos ω + 2 β cos2ω + 2α cos ω
1
MN1 + α 2 2
+ β + 2α (1 + β) cos ω + 2β cos2ω PQ
The phase function of H(ejw ) is defined as,
∠H(e jω ) = tan −1
LM H (e i
jω
) OP ; where H r (e jω ) is real part and H i (e jω ) is imaginary part.
MN H (e r
jω
) PQ
To find the real part and imaginary part of H(ejw ), multiply the numerator and denominator of H(ejw )
[equation (4.51)], by the complex conjugate of the denominator as shown below.
1 + a e− jω 1 + α e jω + β e j2 ω
∴ H (ω ) = − jω − j2 ω
1+αe +βe 1 + α e jω + β e j2ω Using equation (4.52)
jω j2 ω − jω jω
1+ α e +β e +ae + aα + aβ e
= 2 2
1 + α + β + 2α (1 + β) cos ω + 2β cos2ω
Chapter 4 - Fourier Series & Fourier Transform of Discrete Time Signals 4. 32
1 + aα + ae − jω + (aβ + α ) e jω + β e j2 ω
H(e jω ) = e± jq = cosq ± jsinq
1 + α 2 + β2 + 2α (1 + β) cos ω + 2β cos2ω
1 + aα + a(cos ω − jsin ω ) + (aβ + α ) (cos ω + jsin ω ) + β(cos2ω + jsin2ω )
=
1 + α 2 + β 2 + 2α (1 + β) cosω + 2β cos2ω
1 + aα + (a + aβ + α )cos ω + β cos2ω
Real part, H r ( e jω ) =
1 + α 2 + β 2 + 2α (1 + β)cos ω + 2β cos2ω
(aβ + α − a)sin ω + β sin2ω
Imaginary part, H i (e jω ) =
1 + α 2 + β2 + 2α (1 + β)cosω + 2β cos2ω
( aβ + α − a) sin ω + β sin 2ω
∴ Phase function, ∠H(e jω ) = tan −1
1 + aα + (a + aβ + α ) cos ω + β cos 2ω
The magnitude and phase response are calculated for r = 0.5 and 0.9 and w 0 = p/4, and tabulated in
table 4.5. Using the calculated values, the |H(ejw )| and Ð H(ejw ) are sketched graphically for r = 0.5 and 0.8 and
w 0 = p/4 as shown in fig 4.5. From the plots it can be inferred that the second-order system behaves as a
resonant filter (or bandpass filter). The magnitude response shows a sharp peak close to the frequency
w = w 0 = p/4, which is called resonant frequency.
F 2 I 1/ 2
H ( e jω ) = 2 2
cos ω
GH 1 + α + β +1 +2αa(1++2aβ)cos J
ω + 2β cos2ω K
4
π
H 1.5625 − 1.7678 cosω + 0.5 cos2ω K
α = −2 r cos ω 0 = −2 × 0.5cos = −0.7071
4 L 1 F −0.4419 sin ω + 0.25 sin2ω I OP π
∠H ( e ω ) = M tan G
MN π H 1.25 − 1.1491 cosω + 0.25 cos2ω JK PQ
j −1
β = r 2 = 0.52 = 0.25
Case - ii
π
r = 0.9, ω 0 =
4 F I
1/ 2
r = 0.5 r = 0.9
w
|H(ejww )| Ð H(ejww ) |H(ejww )| Ð H(ejww )
−8π
= −π 0.69 0 0.53 0
8
−7 π
0.71 0.04p 0.55 0.07p
8
−6π
0.76 0.08p 0.59 0.14p
8
−5π
0.86 0.12p 0.7 0.21p
8
−4 π − π
= 1.03 0.13p 0.92 0.27p
8 2
−3π
1.27 0.11p 1.58 0.32p
8
−2 π
1.41 0.05p 5.28 0.02p
8
−π
1.29 – 0.01p 1.18 –0.24p
8
0 1.19 0 0.68 0
π
1.29 0.01p 1.18 0.24p
8
2π
1.41 –0.05p 5.28 –0.02p
8
3π
1.27 –0.11p 1.58 –0.32p
8
4π π
= 1.03 –0.13p 0.92 –0.27p
8 2
5π
0.86 –0.12p 0.7 –0.21p
8
6π
0.76 –0.08p 0.59 –0.14p
8
7π
0.71 –0.04p 0.55 –0.07p
8
8π
=π 0.69 0 0.53 0
8
Chapter 4 - Fourier Series & Fourier Transform of Discrete Time Signals 4. 34
nd
F ig 4.5 : M a g n itu de resp on se o f 2 o rd er
d iscrete tim e system .
e j
H e jω
6.0
5.0
4.0
3.0
2.0
r= 0 .9
r= 0 .5
1.0
0.75
0.50
0.26
−π −7 π −6 π −5 π −4 π −3π −2 π −π 0 π 2π 3π 4π 5π 6π 7π π
8 8 8 8 8 8 8 8 8 8 8 8 8 8
4. 35 Digital Signal Processing
e j
∠ H e jω
π nd
F ig 4.6 : P h a se resp o n se o f 2 o rder
d iscrete tim e system
0.5π
0.45π
0.4π
0.35π
0.3π
r = 0 .9 0.25π
0. π
r = 0 .5
0.15π
1π
0.05π
−ω −π
0
π
2π
6π 7π π ω
− 7π − 6π − 5π − 4π − 3π − π −π 8 3π 4π 5π
8
8 8 8 8 8 8 8 8 8 8 8
−0.05π
−0.1π
−0.15π
−0.2π
−0.25π
−0.3π
−0.35 π
−0.4 π
−0.45π
−0.5π
−π
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 36
x( t ) =
1
2π z
−∞
X(jΩ) e jΩt dΩ .....(4.53)
Let x(nT) be a discrete time signal obtained by sampling x(t) with sampling period, T.
∴ x(nT) = x(t) t = nT
∞
=
1
2π z
−∞
X(jΩ) e jΩt dΩ
t = nT
Using equation (4.53)
=
1
2π z
−∞
X(jΩ) e jΩnT
dΩ
summation of infinite number
of integrals.
( 2 m +1) π
=
1
∑
+∞
zT
FH e
X j Ω + 2 Tm
π IjK e FHj Ω+
T
I
2π m
K nT
dΩ
X( jΩ) in the interval
( 2 m − 1) π ( 2 m + 1) π
2π m = −∞ to
( 2 m −1) π T T
T
is identical with X(jΩ)
+π/T
=
1
2π m = −∞ ∑
+∞
z FH e
− π /T
+ π /T
X jΩ+
2π m
T jIK e jΩnT
e j2 π mndΩ in the interval − π to + π
T T
=
1
2π ∑
+∞
z FH e
m = −∞ − π / T
X j ω
T
+
2π m
T jIK e jωn
dω
Since m and n are integers
ej2pmn =1
π
=
1
2π
+∞
∑
m = −∞
1
T z FH e
−π
X j ω
T
+
2π m
T jIK e jωn
dω
The relation between analog
and digital frequency is Ω = ω
T
+π
=
1
2π z
−π
1
T
+∞
∑ XFH je
m = −∞
ω
T
+
2π m
T jIK e jωn
dω .....(4.54)
By the definition of inverse Fourier transform of a discrete time signal, the x(nT) can be written as,
+π
x( nT) =
1
2π z
−π
X(e jω ) e jωn dω .....(4.55)
∑ XFH je jIK
1 2π m .....(4.56)
X(e jω ) = ω
T
+ T
T m = −∞
+∞
e j
X e jω
Ωs
> Ωm
1 2
T
e j
X e jω
Ωs
= Ωm
1 2
T
e j
X e jω
Ωs
1 < Ωm Aliasing
2
T
−ωm −π π ωm ω
−6π+ ωm
−4π+ωm
0
2π + ωm
−3π
−2π−ωm
2π−ωm
4π−ωm
−4π
−2π+ωm
2π 4π
6π−ωm
−2π 3π
Therefore, in order to avoid aliasing the sampling frequency Fs should be greater than twice the
maximum frequency of continuous time signal Fm .
When the spectrum of sampled signal has no aliasing then it is possible to recover the original signal
from the sampled signal. When there is no aliasing, the spectrum X(ejw ) can be passed through a low pass
filter with cut-off frequency, w s/p. Now the equation of spectrum X(ejw ) [equation 4.57] can be written as
shown below.
1
X(e jω ) = X(jΩ) ⇒ X(jΩ) = T X(e jω ) .....(4.59)
T
On taking inverse Fourier transform of X(jW ) we get x(t). Hence by definition of inverse Fourier
transform of continuous time signal we get,
+∞ +π/T
x( t) =
1
2π z
−∞
X(jΩ) e jΩ t dΩ =
1
2π z
−π/T
X(jΩ) e jΩ t dΩ Because X(jW ) is zero outside the
interval - p / T to p / T
+ π /T
=
1
2π z
−π/T
T X(e jω ) e jΩt dΩ Substituting for X(jW ) from
equation (4.59).
+π/T
=
1
2π z
−π/T
T
+∞
x(t) =
1
2π z
−π/T
T
+∞
∑−∞x(nT) e
n=
− jΩTn
e jΩt
dΩ =
T
2π n=
+∞
∑−∞x(nT) z
−π/T
e jΩ ( t − nT) dΩ
T +∞
LM e OP
jΩ ( t − nT )
+π/T
T +∞
LM ej( π / T )( t − nT )
e j( − π / T)( t − nT) OP
=
2π ∑−∞ x(nT)
MN j(t − nT) PQ =
2π ∑−∞ x(nT)
MN j(t − nT) −
j( t − nT) PQ
n= −π/T n=
+∞
1 Le j( π / T )( t − nT )
− e − j( π / T )( t − nT)OP
= ∑ x(nT) (π / T)( t − nT) MMN 2j PQ
n = −∞
+∞
sin (( π / T)( t − nT))
= ∑ x(nT)
( π / T)( t − nT)
.....(4.60)
n = −∞
The equation (4.60) can be used to reconstruct the original continuous time signal x(t) from its samples
and the equation (4.60) is also called ideal interpolation formula.
The concepts discussed above are summarized as sampling theorem given below.
−F 2 −F c −F 1 0 F F F F 1 c 2 −F −F −F 0 F F F F
2 c 1 −F −F −F
1 c 0 2 F F 2 c 1 1 c F2 F
F ig 4 .8 : S a m p le freq u e ncy sp ectru m o f c on tin u o u s tim e b an d p a ss sig n a ls.
The maximum frequency in the bandpass signal is F2. According to sampling theorem, to avoid aliasing
the bandpass signal has to be sampled at a sampling frequency greater than 2F2. When F2 happens to be a
very high frequency, then sampling rate will be very high. In order to avoid high sampling rates the bandpass
signals can be shifted in frequency to an equivalent lowpass signal and the equivalent lowpass signal can be
sampled at a lower rate.
A bandpass signal can be shifted in frequency by an amount Fc to convert the signal to an equivalent
lowpass signal, and when the upper cutoff frequency F2 is an integer multiple of bandwidth B, then the
equivalent lowpass signal can be sampled at a rate of 2B samples per second.When the upper cutoff
frequency F2 is not an integer multiple of bandwidth B, then the sampling rate has to be slightly increased and
go upto 4B.
In general, the bandpass signals with a bandwidth of B Hz can be sampled at a rate of 2B to 4B Hz.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 40
4.8 Relation Between Z-Transform and Discrete Time Fourier Transform
The Z-transform of a discrete time signal x(n) is defined as,
+∞
X ( z) = ∑ x( n) z − n ..... (4.61)
n = −∞
where, z is a complex variable (or number).
The Fourier transform of a discrete time signal x(n) is given by,
+∞
X( e jω ) = ∑ x( n) e− jωn ..... (4.62)
n = −∞
From equation (4.61) and (4.62) we can say that if we replace z by ejww in the Z-transform of x(n) we get
Fourier transform of x(n).
The X(z) can be viewed as a unique representation of the signal x(n) in the complex z-plane. In z-plane,
the point z = ejw , represents a point with unit magnitude and having a phase of w. The range of frequency of
discrete time signal w is 0 to 2p. .Hence we can say that, the points on unit circle in z-plane are given by
z = ejw , when w is varied from 0 to 2p. .Therefore the Fourier transform of a discrete time signal x(n) can be
obtained by evaluating the Z- transform on a circle of unit radius as shown in equation (4.63).
∞ ∞
.....(4.63)
∴ X(e jω ) = X( z)
z = e jω
= ∑ x( n ) z − n = ∑ x( n) e− jωn
n = −∞ z = e jω n = −∞
jw
It is important to note that X(z) exists for z = e if unit circle is included in ROC of X(z). Therefore the
Fourier transform can be obtained from Z-transform by evaluating X(z) at z = ejw ,if and only if ROC of X(z)
includes the unit circle. Fourier transform of some of the common signals that can be obtained from
Z-transform are listed in table 4.6.
Table 4.6 : Some Common Z-transform and Fourier Transform Pairs
d(n) 1 1
z e jω
an u(n) ; a <1 jω
z−a e −a
az a e jω
n
n a u(n) ; a <1 ( z − a )2 (e jω − a ) 2
az (z + a) a e jω (e jω + a)
n2 an u(n) ; a <1
( z − a)3 ( e jω − a) 3
z e jω
e- at u(t) e- anT u(nT) ; e − aT < 1
z − e − aT jω
e − e − aT
z T e − aT e jω T e− aT
te- at u(t) nTe- anT u(nT) ; e − aT < 1 ( z − e − aT ) 2 (e jω − e− aT ) 2
4. 41 Digital Signal Processing
Example 4.3
Find the Fourier transform of x(n), where x(n) = 1 ; 0 ≤ n ≤ 5
= 0 ; otherwise
Solution
By the definition of Fourier transform, Using finite geometric
+∞ 5
1 − e − j6ω series sum formula,
jω
X(e ) = ∑ x(n) e − jωn
= ∑ x(n) e − jωn
=
1 − e − jω N
n = −∞ n = 0 1 − C N+ 1
∑ Cn =
n = 0
1− C
Fe j6 ω − j6ω
Ie − j6 ω
1−
− j6ω
e 2
− j6ω
e 2
GH 2 −e 2
JK 2
= =
− jω − jω
Fe jω − jω
Ie − jω
1− e 2 e 2
GH 2 −e 2
JK 2
F 2j sin 6ω I sin
6ω
G
=G 2 J e
− j6ω
+
jω − j5ω − j5ω
2 e 2 = sin 3ω e 2 e jθ − e − jθ
ω J
2 2 =
ω ω sin θ =
GH 2j sin 2 JK sin
2
sin
2
2j
Example 4.4
Determine the Fourier transform of the signal x(n) = a|n| ; 1 < a <1
Solution
The signal x(n) can be expressed as sum of two signals x1(n) and x2(n) as shown below.
\ x(n) = x1(n) + x2(n)
Let, X1(ejw ) = Fourier transform of x1(n) and X2(ejw ) = Fourier transform of x2(n). Using infinite geometric
By definition of Fourier transform, series sum formula
∞
1
+∞ +∞ +∞
1 ∑ Cn =
1− C
jω
X1(e ) = ∑ x1(n) e − jωn
= ∑ a e n − jωn
= ∑ (ae − jω n
) =
1 − a e − jω
n = 0
n = −∞ n =0 n = 0
(a e jω )0 = 1
By definition of Fourier transform,
+∞ −1 −1 +∞ +∞
X 2(e jω ) = ∑ x 2(n) e − jωn = ∑ a −n e − jωn = ∑ ( a e jω ) − n = ∑ (ae jω )n = ∑ (ae jω )n − 1
n = −∞ n = −∞ n = −∞ n = 1 n = 0
jω jω
1 1 − 1 + ae ae
= −1 = = Using infinite geometric
1 − a e jω 1 − a e jω 1 − a e jω series sum formula
Let X(ejw ) = Fourier transform of x(n). ∞
1
By property of linearity, ∑ Cn =
1− C
n = 0
1 a e jω
X(e jω ) = X1(e jω ) + X2(e jω ) = − jω
+
1− a e 1 − a e jω
jω jω − jω
1 − a e + a e (1 − a e ) 1 − a e jω + a e jω − a 2
= − jω jω
=
(1 − a e ) (1 − a e ) 1 − a e − jω − a e jω + a 2
1 − a2 e jθ + e − jθ
= cos θ =
1 − 2a cos ω + a 2 2
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 42
Example 4.5
2 MNH 3K H 5K QP
Solution
MNH 3K
2 H 5K PQ
1 LF 1I F 1I O 1 F 1I 1 F 1I
n n n n
∴ x(n) = MG J
2 MNH 3K
+ G J P = G J + G J ; for n ≥ 0
H 5K PQ 2 H 3K 2 H 5K
By definition of Fourier transform,
+∞
X(e ) = ∑ x(n) e
jω
L 1 F 1I 1 F 1I O
= ∑ M G J + G J Pe
− jωn
+∞ n n
− jωn
n = −∞ MN 2 H 3K 2 H 5K PQ
n = 0
=
1 F 1I∞ n
1 F 1I
∑ GH 3JK e + 2 ∑ GH 5JK e = 2 ∑ GH 3 e JK
− jωn 1 F1 I∞ n
− jωn
∞
− jω
n
+
1 ∞
∑ GH 5
F 1 e IJ
− jω
n
2 n = 0 n = 0 n = 0 2 n = 0
K
1 1 1 1
= +
2 1 − 1 e − jω 2 1 − 1 e − jω
3 5 Using infinite geometric
series sum formula
LM 1 − 1 e + 1 − 1 e OP
− jω − jω ∞
1
1 ∑ Cn =
=
2
MM F 15 I F 31 I PP n = 0 1− C
MN GH1 − 3 e JK GH1 − 5 e JK PQ
− jω − jω
L OP
1 M 2 − 0.53 e − jω
1 − 0.265 e − jω
=
2 MF
M 1 P =
GMN H1 − 5 e − 31 e + 151 e IJK PPQ
− jω − jω − j2ω 1 − 0.53 e − jω + 0.067 e − j2ω
Example 4.6
Compute the Fourier transform and sketch the magnitude and phase function of causal three sample
sequence given by,
1
x(n) = ; 0 ≤ n ≤ 2
3
= 0 ; else
Solution
Let, X(ejw ) be Fourier transform of x(n).
Now by definition of Fourier transform,
+∞ 2
X(e jω ) = ∑ x(n) e − jωn = ∑ x(n) e − jωn
n = −∞ n = 0
1 1 − jω 1 − j2ω
= x(0) e0 + x(1) e − jω + x(2) e − j2ω = + e + e
3 3 3
1 1 1
= + (cos ω − jsin ω ) + (cos 2ω − jsin 2ω )
3 3 3 e ± jθ = cos θ ± j sin θ
1 1
= (1 + cos ω + cos 2ω ) − j (sin ω + sin 2ω )
3 3
The X(ejw ) is evaluated for various values of w and tabulated in table 1. The magnitude and phase of X(ejw )
for various values of w are also listed in table 1. Using the values listed in table 1, the magnitude and phase
function are sketched as shown in fig 1 and fig 2 respectively.
4. 43 Digital Signal Processing
Table 1 : Frequency Response of the System
π
0.877 j0.363 = 0.949 Ð 0.392 = 0.949 Ð 0.125p 0.949 0.125p
8
2π
0.569 j0.569 = 0.805 Ð 0.785 = 0.805 Ð 0.25p 0.805 0.25p
8
3π
0.225 j0.544 = 0.587 Ð 1.179 = 0.587 Ð 0.375p 0.587 0.375p
8
4π π
= 0 j0.333 = 0.333 Ð 1.571 = 0.333 Ð 0.5p 0.333 0.5p
8 2
5π
0.03 j0.072 = 0.078 Ð 1.966 = 0.078 Ð 0.625p 0.078 0.625p
8
6π
0.098 j0.098 = 0.139 Ð 0.785 = 0.139 Ð 0.25p 0.139 0.25p
8
7π
0.261 + j0.108 = 0.282 Ð 0.392 = 0.282 Ð 0.125p 0.282 0.125p
8
8π
=π 0.333 + j0 = 0.333 Ð 0 = 0.333 Ð 0 0.333 0
8
9π
0.261 j0.108 = 0.282 Ð 0.392 = 0.282 Ð 0.125p 0.282 0.125p
8
10π
0.098 + j0.098 = 0.139 Ð 0.785 = 0.139 Ð 0.25p 0.139 0.25p
8
11π
0.03 + j0.072 = 0.078 Ð 1.966 = 0.078 Ð 0.625p 0.078 0.625p
8
12π 3π
= 0 + j0.333 = 0.333 Ð 1.571 = 0.333 Ð 0.5p 0.333 0.5p
8 2
13π
0.225 + j0.544= 0.589 Ð 1.179 = 0.589 Ð 0.375p 0.589 0.375p
8
14π
0.569 + j0.569 = 0.805 Ð 0.785 = 0.805 Ð 0.25p 0.805 0.25p
8
15π
0.877+ j0.363 = 0.949 Ð 0.392 = 0.949 Ð 0.125p 0.949 0.125p
8
16π
= 2π 1 + j0 = 1Ð 0 1 0
8
Note : The function X(e jw) is calculated using complex mode of calculator. The magnitude and phase are
calculated using rectangular to polar conversion technique.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 44
e j
X e jω e j
∠X e jω
1.0 0.75π
0.8 0.50π
0.6 0.25π
0.4 0
π 3π
−0.25 π 2 2
0.2
−0.50π
0 π π 3π ω
2π
2 2 −0.75π
jω
F ig 1 : M ag nitud e o f X (e ).
jω F ig 2 : P h a se o f X (e ).
Example 4.7
Find the convolution of the sequences, x1(n) = x 2(n) = 1, 3, 5 l q
A
Solution
+∞ +1
X1(e jω ) = ∑ x1(n) e − jωn = ∑ x1(n)e − jωn =e jω + 3 + 5 e − jω
n = −∞ n = −1
= e j2ω + 3 e jω + 5 + 3 e jω + 9 + 15 e − jω + 5 + 15 e − jω + 25 e − j2ω
= e j2ω + 6e jω + 19 + 30 e − jω + 25 e − j2ω .....(1)
By definition of Fourier transform,
+∞
X(e jω ) = ∑ x(n) e − jωn =..... x(−2) e j2ω + x(−1) e jω + x(0)
n = −∞
On comparing the two expressions [equations (1) and (2)] for H(e jw ), we can say that the samples of h(n)
are the coefficients of ejwn. Hence by inspection we can write,
h( −1) = 0.3 ; h(0) = 0.2 ; h(1) = 0.3 ; and h(n) = 0, for n < −1 and n > 1
l
∴ h(n) = 0.3, 0.2, 0.3 q
A
Example 4.9
Find the inverse Fourier transform of the frequency response of first order system, H(ejw ) = (1 a ejw )1 .
Solution
1
Given that, H(e jω ) = (1 − a e− jω )−1 =
1 − a e − jω
Using Taylor series expansion, the above equation of H(ejw ) can be expanded as shown below.
H ( e jω ) = 1 + a e − jω + a 2 e − j 2 ω + . . . . . . + a k e − jk ω + . . . . . . .....(1)
jw
Let, h(n) = Inverse Fourier transform of H(e ).
By definition of Fourier transform we get,
+∞
H(e jω ) = ∑ h(n) e − jωn
n = −∞
= . ....+ h( −2) e j2ω + h( −1) e jω + h(0) + h(1) e − jω + h(2) e − j2ω + ..... .....(2)
jw
On comparing the two expressions for H(e ) [equation (1) and (2)] we can say that the samples of h(n) are
the coefficients of ejwn.
RS
∴ h(n) = 1, a, a 2 ,..... , a k ,......
UV
TA W
R
|a
h(n) = S
n
; n≥0
⇒ h(n) = anu(n)
T|0 ; n<0
Example 4.10
jω 1 e jω + 1 + e − jω
Determine the output sequence from the output spectrum Y(ejw ), where Y(e ) =
2 1 − a e − jω
Solution
jw
The output sequence y(n) is obtained by taking inverse Fourier transform of Y(e ).
Y(e jω ) =
1 e jω + 1 + e − jω
=
1 LM e jω
+
1
+
e − jω OP
2 1 − a e− jω 2 N1 − a e − jω
1− a e − jω
1 − a e − jω Q
1
Y(e jω ) = Y1(e jω ) + Y2(e jω ) + Y3(e jω )
2
e jω 1 e − jω
where, Y1(e jω ) = ; Y2 (e jω ) = and Y3 (e jω ) =
1 − a e − jω 1 − a e − jω 1 − a e − jω
Let, y1(n) = F1{Y1(ejw )} ; y2(n) = F1{Y2(ejw )} ; y3(n) = F1{Y3(ejw )}
By Taylor's series expansion we get,
1 u(n) = 1 for n ≥ 0
Y2(e jω ) = = 1 + a e − jω + a 2e − j2ω + a 3 e − j3ω +.....
1 − a e − jω = 0 for n < 0
+∞ +∞
= ∑ an e − jωn = ∑ an u(n) e − jωn .....(1)
n = 0 n = −∞
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 46
By definition of Fourier transform we can write,
+∞
Y2 (e jω ) = ∑ y 2 (n) e − jωn .....(2)
n = −∞
Here, Y1(e jω ) =
e jω
= e jω Y2(e jω )
l q
then, F x(n ± m = e ± jωm X e jω d i
1 − a e − jω
∴ y1(n) = a (n + 1) u(n + 1) Using shifting property.
− jω
e
Here, Y3(e jω ) = = e − jω Y2(e jω )
1 − a e − jω
∴ y3(n) = a (n − 1)
u(n − 1) Using shifting property.
jw
Let, y(n) = Inverse Fourier transform of Y(e ).
∴ y(n) = F −1{Y(e jω )} = F −1
RS 1 Y1(e jω ) + Y2(e jω ) + Y3(e jω )
UV
T2 W
1
= F −1{Y1(ω )} + F −1{Y2(ω )} + F −1{Y3(ω )}
2
1
= y1(n) + y 2 (n) + y 3(n)
2
1 (n + 1)
= [a u(n + 1) + an u(n) + a(n − 1) u(n − 1)]
2
Example 4.11
If X(ejw ) = ej3w ; | w | £ 1
=0 ; 1< |w| £ p, Find x(n) and plot.
Solution
The x(n) is obtained by taking inverse Fourier transform of X(ejw ).
By definition of inverse Fourier transform,
+π +1
x(n) =
1
2π z
−π
X(e jω ) e jωn dω =
1
2π z
−1
e − j3ω e jωn dω
+1
LM e OP = 1 e 1 e jθ − e − jθ
=
1
2π z
−1
e jω (n − 3) dω =
1
2π
jω (n − 3)
MN j(n − 3) PQ j2π(n − 3)
−1
j(n − 3)
− e − j(n − 3) sin θ =
2j
=
1 LM e j(n − 3)
− e − j(n − 3) OP = 1 sin(n − 3)
π(n − 3) MN 2j PQ π(n − 3)
sin (n − 3)
= ; for all n , except n = 3.
π(n − 3)
L' Hospital rule
sin (n − 3) 1 sin (n − 3) 1 sin θ
When n = 3, x(n) = Lt = Lt = Lt =1
(n − 3) → 0 π(n − 3) π (n − 3) → 0 (n − 3) π θ→ 0 θ
The signal x(n) is an infinite duration signal and can be evaluated for all integer values of n in the range
n = ¥ to + ¥ . Here x(n) is evaluated for n = 2 to + 8 and plotted.
sin(6 − 3) −2 −1 0 1 2 3 4 5 6 7 8 n
When n = 6 ; x(6) = = 0.015
π(6 − 3) −0.05
sin(7 − 3) −0.061 −0.06 −0.06 −0.061
When n = 7 ; x(7) = = −0.06 −0.10
π(7 − 3)
sin(8 − 3)
When n = 8 ; x(8) = = −0.061 F ig 1 : G ra ph ica l rep resen ta tio n of x(n ).
π(8 − 3)
Here x(n) is a symmetrical signal with centre of symmetry at n = 3.
Example 4.12
1
Find x(n), if X(e jω ) =
1 − jω
1− e
8
Solution
1
Given that, X(e jω ) =
1 − jω U sin g infinite geometric
1− e
8
By Taylor's series expansion we can write, series sum formula,
X(e jω ) =
1
= 1+
1 − jω
e +
1 − jω
e
FG IJ + FG 1 e IJ
2
− jω
3
+ ..... ∑C
∞
n
=
1
1 −
1 − jω
e 8 8 H K H8 K n= 0 1− C
8
= ∑
∞
FG 1 e IJ
− jω
n
= ∑
∞
FG 1IJ e
n
− jωn ..... (1)
n = 0
H8 K n = 0
H 8K
By definition of Fourier transform we can write,
∞
..... (2)
X(e jω ) = ∑ x(n) e − jωn ; for n ≥ 0
n = 0
π +1
LM e OP +1
e jθ − e − jθ
h(n) =
1
2π z
−π
H(e jω ) e jωn dω =
1
2π z
−1
1 × e jωn dω =
1
2π
jωn
N jn Q −1
sin θ =
2j
=
1
ejn − e− jn =
1 LM e jn
− e− jn OP =
2 sin n
; for all n , except when n = 0
j2πn πn N 2j Q πn
When n = 0; h(n) can be evaluated using L' Hospital rule. L' Hospital rule
sin(−5)
When n = −5 ; h( −5) = = −0.061
π(−5) x (n )
sin(−4)
When n = −4 ; h( −4) = = −0.06 C entre of sy m m etry
π(−4)
0.35
sin( −3)
When n = −3 ; h( −3) = = 0.015 0.318
π( −3) 0.30
0.268 0.268
sin( −2)
When n = −2 ; h( −2) = = 0.145
π( −2) 0.25
sin(−1)
When n = −1 ; h( −1) = = 0.268 0.20
π(−1)
1 0.145 0.15 0.145
When n = 0 ; h( 0) = = 0 . 318 = 0.318
π
sin(1) 0.10
When n = 1 ; h(1) = = 0.268
π(1) 0.05
sin(2) 0.015 0.015
When n = 2 ; h(2) = = 0.145
π(2) −5 −4 −3 −2 −1 0 1 2 3 4 5 n
sin(3)
When n = 3 ; h(3) = = 0.015 −0.05
π(3)
−0.061 −0.06 −0.06 −0.061
sin(4) −0.10
When n = 4 ; h(4) = = −0.06
π(4)
F ig 1 : G ra ph ica l rep resen ta tio n of h (n ).
sin(5)
When n = 5 ; h(5) = = −0.061
π(5)
Here h(n) is a symmetrical signal with centre of symmetry at n = 0.
4. 49 Digital Signal Processing
Example 4.14
Find the transfer function of the second order recursive filter in frequency domain whose impulse response
is h(n) = rn sin(w 0n) u(n) for all n.
Solution
The transfer function of a system is the Fourier transform of impulse response.
By definition of Fourier transform, u(n) = 1 for n ≥ 0
+∞ +∞
= 0 for n < 0
jω
H(e ) = ∑ h(n) e − jωn
= ∑ n
r sin ω 0n e − jωn
n = −∞ n = 0
+∞
LM e jω 0 n
− e − jω 0n OP 1 +∞
= ∑ rn e − jωn = ∑ rn e jω 0n e − jωn − rn e − jω 0n e − jωn
n = 0 N 2j Q 2j n = 0
+∞ ∞
1 n 1 n
=
2j
∑ r e jω 0 e − jω −
2j
∑ r e − jω 0 e − jω
n = 0 n = 0
For |r| < 1, we can apply the infinite geometric series sum formula to give,
1 1 1 1 1 LM 1 − r e − jω 0
e − jω − 1 + r e jω 0 e − jω OP
H(e jω ) = − =
2j 1 − r e jω 0 e − jω 2j 1 − r e − jω 0 e − jω 2j MN d1 − r ei d1 − r e e
jω 0
e − jω − jω 0 − jω
i PQ
=
1 d
r − e − jω 0 + e jω 0 e − jω i =
1 r de −e ie jω 0 − jω 0 − jω
2j 1 − r e − jω 0
e − jω − r e jω 0 e − jω + r 2 e − j2ω 2j 1 − r de +e i +r e
jω 0
e − jω 0 − jω 2 − j2ω
1 r 2j sin ω 0 e − jω r sin ω 0 e − jω
= − jω 2 − j2ω
=
2j 1 − r 2 cos ω 0 e + r e 1 − 2r cos ω 0 e − jω + r 2 e − j2ω
Example 4.15
2
Find the output spectrum of an LTI system, if input x(n) = ; − 1≤ n ≤ 1
3
= 0 ; else
and the impulse response h(n) = an ; n≥0
=0 ; else
Solution
+∞ 1
X(e jω ) = F {x(n)} = ∑ x(n) e− jωn = ∑ x(n) e− jωn = x(−1) ejω + x(0) + x(1) e− jω
n =−∞ n = −1
2 jω 2 2 − jω 2 2 jω 2 2
= e + + e = + (e + e − jω ) = + (2 cos ω )
3 3 3 3 3 3 3
2 e jθ + e − jθ
= (1 + 2 cos ω ) cos θ =
3 2
+∞ ∞ ∞
1
H(e jω ) = F {h(n)} = ∑ h(n) e− jωn = ∑ an e− jωn = ∑ (a e− jω )n =
n = −∞ n= 0 n= 0 1 − a e − jω
Using infinite geometric
jw
The output spectrum Y(e ) is given by, series sum formula,
∞
2 1 2(1 + 2 cos ω ) 1
Y(e jω ) = X(e jω ) × H(e jω ) =
3
(1 + 2 cos ω ) ×
1 − a e − jω
=
3(1 − a e − jω ) ∑C
n= 0
n
=
1− C
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 50
Example 4.16
The impulse response of an LTI system is h(n) = {1, 2, 2, 1}. Find the response of the system for the input
x(n) = {1, 2, 3, 4}
Solution
The response y(n) of the system is given by convolution of x(n) and h(n).
\ y(n) = x(n) * h(n) ..... (1)
By convolution theorem of Fourier transform we get,
F{x(n) * h(n)} = X(ejw ) H(ejw ) ..... (2)
From equations (1) and (2) we can write,
F{y(n)} = X(ejw ) H(ejw )
Let, F{y(n)} = Y(ejw ) ; \ Y(ejw ) = X(ejw ) H(ejw )
\ y(n) = F1{Y(ejw )} = F1{X(ejw ) H(ejw )}
By definition of Fourier transform, we can write
+∞ 3
X(e jω ) = ∑ x(n) e − jωn
= ∑ x(n) e − jωn
n = −∞ n = 0
= x(0) e0 + x(1) e − jω
+ x(2) e − j2ω + x(3) e − j3ω
= 1 + 2 e − jω + 3 e − j2ω + 4 e − j3ω
By definition of Fourier transform we can write,
+∞ 3
H(e jω ) = ∑ h(n) e − jωn = ∑ h(n) e − jωn
n = −∞ n = 0
= h(0) e0 + h(1) e − jω
+ h(2) e − j2ω + h(3) e − j3ω
= 1 + 2e − jω + 2 e − j2ω + e − j3ω
X(e ) H(ejw ) = (1 + 2 ejw + 3 ej2w + 4ej3w ) (1 + 2 ejw + 2ej2w + ej3w )
jw
= ..... y(0) e0 + y(1) ejw + y(2) ej2w + y(3) ej3w + y(4) ej4w + y(5) ej5w + y(6) ej6w + ..... ..... (4)
On comparing equations (3) and (4) we get,
l
y(n) = 1, 4, 9, 15, 16, 11, 4 q
A
Example 4.17
Determine the impulse response and frequency response of the LTI system defined by,
y(n) = x(n) + b y(n 1).
Solution
a) Impulse Response
Y(z)
The impulse response h(n) is given by inverse Z-transform of H(z), where, H(z) = .
X(z)
4. 51 Digital Signal Processing
Given that, y(n) = x(n) + b y(n 1). .....(1)
On taking Z-transform of equation (1) we get,
Y(z) = X(z) + b z 1 Y(z) ÞÞ Y(z) b z 1 Y(z) = X(z) Þ Y(z) (1 b z 1 ) = X(z)
Y(z) 1
∴ H(z) = = .....(2)
X(z) 1 − b z −1
On taking inverse Z-transform of equation (2) we get,
1
h(n) = Z 1 {H(z)} = bn u(n) n
Z an u(n) = s 1 − az−1
The impulse response, h(n) = bn u(n), for all n.
b) Frequency Response
The frequency response H(ejw ) is obtained by evaluating H(z) when z = ejw .
1 1
∴ Frequency response, H(e jω ) = H(z) z = e jω = =
1 bz 1 z = e jω 1 be jω
The magnitude function of H(ejw ) is defined as,
N1 − b e 1 − b e Q − jω jω
N1 − b e jω
− b e − jω + b2 Q
1
L OP 2
=M
1 1
e jθ + e − jθ
MN1+ b − bde + e i PQ
2 jω − jω
d1+ b 2
− 2b cos ω i
1
2
cos θ =
2
N H (e ) Q r
jω
where, Hi(ejw ) = Imaginary part of H(ejw ) and Hr(ejw ) = Real part of H(ejw )
To separate the real parts and imaginary parts of H(ejw ), multiply the numerator and denominator by the
complex conjugate of the denominator.
1 1 − b e jω 1 − b e jω
∴ H(e jω ) = − jω
× jω
=
1 − be 1− b e 1 − b e jω − b e − jω + b2
1 b(cos ω + jsin ω ) 1 b cos ω jb sin ω
= =
2
1+ b − b e + ejω
d − jω
i 1 + b2 − 2b cos ω
1 b cos ω b sin ω
= j
1+ b2 2b cos ω 1+ b2 − 2b cos ω
b sin ω 1 b cos ω
∴ Hi (e jω ) = and Hr (e jω ) =
1+ b2 − 2b cos ω 1+ b2 − 2b cos ω
Solution
The frequency response H(ejw ) is obtained by taking Fourier transform of the impulse response h(n).
Given that, impulse response, h(n) = 0.8n u(n) for all n.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 52
On taking Fourier transform we get,
+∞
H(e jω ) = F {h(n)} = ∑ h(n) e − jωn
n = ∞
+∞ ∞ ∞
− jω n u(n) = 1; n ³ 0
= ∑
n = ∞
0.8n u(n)e − jωn = ∑
n = 0
0.8n e − jωn = ∑
n = 0
d0.8e i = 0; n < 0
Using infinite geometric series sum formula
1 ∞
= 1
1 − 0.8 e − jω Cn =∑1 − C
when |C|< 1
n = 0
The frequency response has two functions: Magnitude function and phase function,
The magnitude function is defined as,
1 1
Magnitude function, H(e jω ) = H(e jω ) H∗ (e jω ) = − jω
×
1 − 0.8 e 1 − 0.8 e jω
1 1
= =
jω − jω jω
1 − 0.8 e − 0.8e + 0.8 2
1 − 0.8(e + e − jω ) + 0.64
1 1
= = .....(1)
1.64 − 0.8(2cos ω ) 1.64 − 16
. cos ω
The phase function can be determined by separating the real and imaginary part of H(ejw ). To separate the
real and imaginary parts of H(ejw ), multiply the numerator and denominator by complex conjugate of the
denominator.
1 1 − 0.8 e jω 1 − 0.8 e jω Using equation (1)
∴ H(e jω ) = − jω
× jω
=
1 − 0.8 e 1 − 0.8 e 1.64 − 1.6 cos ω
1 − 0.8 (cos ω + j sin ω ) 1 − 0.8 cos ω j0. 8 sin ω
= = −
164
. − 1.6 cos ω 1. 64 − 1.6 cos ω 164 . − 1.6 cos ω
−0.8 sin ω
∴ Hi (e jω ) =
1. 64 − 1.6 cos ω
1 − 0.8 cos ω
Hr (e jω ) =
1. 64 − 1.6 cos ω
−0.8 sin ω
Hi (e jω ) 164. − 16 . cos ω −0.8 sin ω
∴ = =
Hr (e jω ) 1 − 0.8 cos ω 1 − 0.8 cos ω .....(2)
164
. − 16 . cos ω
∠H(e jω ) = tan−1
LM H (e ) OP = tan LM −0.8 sin ω OP
i
jω
−1
Using equation (2)
N H (e ) Q
r
jω
MN1 − 0.8 cos ω PQ
Example 4.19
A system has impulse response h(n) given by, h(n) = − 0.25 δ(n + 1) + 0.5 δ(n) − 0.75 δ(n − 1) .
a) Is the system BIBO stable? b) Is the system causal? Justify your answer. c) Find the frequency
response.
Solution
We know that, d(n) = 1 ; when n = 0
= 0 ; when n ¹ 0
Let us evaluate h(n) for different values of n.
4. 53 Digital Signal Processing
When n = −2 ; h(n) = h(−2) = − 0.25 δ ( −1) + 0.5 δ( −2) − 0.75 δ(−3) = 0 +0 + 0 = 0
When n = −1 ; h(n) = h( −1) = −0.25 δ(0) + 0.5 δ( −1) − 0.75 δ( −2) = − 0.25 + 0 +0 = − 0.25
When n = 0 ; h(n) = h(0) = −0.25 δ(1) + 0.5 δ(0) − 0.75 δ( −1) = 0 + 0.5 + 0 = 0.5
When n = 1 ; h(n) = h(1) = −0.25 δ(2) + 0.5 δ(1) − 0.75 δ(0) = 0 +0 − 0.75 = −0.75
When n = 2 ; h(n) = h(2) = − 0.25 δ(3) + 0.5 δ(2) − 0.75 δ(1) = 0 +0 +0 = 0
From the above analysis, we can infer that h(n) = 0 for n < 1 and n >1, and h(n) ¹ 0 only for n = 1, 0, 1.
Here, h( −1) = −0.25, h(0) = 0.5, h(1) = −0.75
l
∴ Im pulse response, h(n) = −0.25, 0.5, − 0.75 q
A
a) Check for Stability
+∞
For stability of a system, ∑ h(n) < ∞
n = −∞
+∞
c) Frequency Response
The frequency response H(ejw ) is the Fourier transform of h(n), or H(ejw ) is obtained by evaluating H(z)
Y(e jω )
at z = ejw , or H(ejw ) is given by .
X(e jω )
Method 1
By definition of Fourier transform,
+∞ Let, n − 1 = m
l q ∑ h(n) e
H(e jω ) = F h(n) = − jωn
∴ n = m +1
n = −∞
When n = −∞, m = −∞
LF 1I +∞
1 F 1I
n
O
= ∑ MG − J u(n) + G − J u(n − 1)P e
n-1
− jωn
When n = +∞, m = +∞
HMN 4 K
n = −∞ 2 H 4 K PQ
F 1I +∞
= ∑ G − J u(n) e
1 FG − 1IJ u(n − 1)e
n
− jωn
+∞ n-1
− jωn
2 ∑ H 4K
+
H 4K n = −∞ n = −∞
= ∑
+∞
FG − 1IJ u(n)e
n
− jωn
+
1 +∞
∑ −
FG IJ
1
m
u(m)e − jω (m + 1)
n = −∞
H 4K 2 m = −∞ 4 H K
4. 55 Digital Signal Processing
d i ∑ FGH − 41IJK e FG IJ F IJ FG − 1 e IJ
+∞ n m n m
1 +∞ 1 +∞
1 e − jω +∞
∴ H e jω =
n = 0
− jωn
+ ∑−
2m = 0 4 H K e − jωm e − jω = ∑ GH − 4 e
n =0
− jω
K +
2
∑
m =0
H 4 K
− jω
1 e − jω 1
= +
FG
1 − jω
1− − e
IJ
2 1
1 − − e − jω
FG IJ Using infinite
4 H K 4 H K geometric series
sum formula
1 − jω 1 − jω
e 1+ e ∞
1
1
=
1
+ 2
1
= 2
1 − jω
∑ Cn =
1− C
1+ e − jω 1 + e − jω 1 + e n = 0
4 4 4
Method 2
1 −1 1 − jω
1+ z 1+
e
The frequency response, H(e jω ) = H(z) = 2 = 2
z = e jω 1 1
1 + z −1 1+ e − jω
4 z = e jω 4
Method 3
1 1
Given that, y(n) + y(n − 1) = x(n) + x(n − 1)
4 2
On taking Fourier transform,
Y(e jω ) +
1 − jω 1
e Y(e jω ) = X(e jω ) + e − jω X(e jω ) ⇒ Y(e jω ) 1+
LM 1 − jω
e
OP
1
= X(e jω ) 1+ e − jω
LM OP
4 2 N 4 2Q N Q
1
Y(e jω ) 1+ e − jω
∴ Frequency response, H(e ) = = 2 jω
X(e jω ) 1 − jω
1+ e
4
Magnitude and Phase Function
1
Magnitude function, H(e jω ) = LMH(e ) H∗(e )OP ; where H∗(e ) is conjugate of H(e
jω jω 2 jω jω
)
N Q
1 1
LM 1 + 1 e − jω 1 O LM 1 + 1 e + 1 e + 1 OP
1+ e P jω 2 jω − jω 2
= MM 1 2 ×
− jω
2
1 PP = MM 12 12 jω
4
1 P
P jω − jω
1+ e 1+ e 1+ e + e +
N 4 4 Q N 4 4 16 Q
1 1
LM 1 + 1 (e jω
+e )+ − jω 1 OP 2 LM 5 + cos ω OP 2
= MM 12 4
1 PP =M 4
MN 17 1 P e jθ + e − jθ
jω
+ e − jω ) + + cos ω P
N 1 + 4 (e 16 Q 16 2 Q cos θ =
2
Hi (e jω )
The phase function of H(ejw ) is defined as, ∠H(e jω ) = tan−1
Hr (e jω )
where, Hi(ejw ) = Imaginary part of H(ejw ) and Hr(ejw ) = Real part of H(ejw ).
In order to separate the real part and imaginary parts of H(ejw ), multiply the numerator and denominator
of H(ejw ) by the conjugate of denominator of H(e jw ).
1 − jω 1 jω 1 jω 1 − jω 1
e
1+ 1+ e 1+ e + e +
jω
∴ H(e ) = 2 × 4 = 4 2 8
1 − jω 1 jω 1 jω 1 − jω 1
1+ e 1+ e 1+ e + e +
4 4 4 4 16
9 1 1
+ (cos ω + j sin ω ) + (cos ω − j sin ω )
= 8 4 2
17 1 jω
+ ( e + e − jω ) e± jθ = cos θ ± j sin θ
16 4
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 56
9 1 1 1 1
+ cos ω + cos ω + j sin ω − j sin ω
= 8 4 2 4 2
17 1
+ cos ω
16 2
9 3
cos ω j −
1
sin ω
FG IJ
= 8
+
4 +
4 H K
17 1 17 1
+ cos ω + cos ω
16 2 16 2
9 3 1
+ cos ω − sin ω
jω
∴ Hr (e ) = 8 4 jω
and Hi (e ) = 4
17 1 17 1
+ cos ω + cos ω
16 2 16 2
1
sin ω
LM OP LM OP
H (e jω ) 4 2 sin ω
Phase function, ∠H(e jω ) = tan−1 i jω = tan−1
Hr (e ) 9 3
= tan−1 MM
9 + 6 cos ω
PP MN PQ
+ cos ω
8 4 N Q
Example 4.21
Find the frequency response of the LTI system, governed by the difference equation,
y(n) + a1 y(n 1) + a2 y(n 2) = x(n)
Solution
Y(e jω ) 1
∴ Frequency response, H(e jω ) = =
X(e jω ) 1 + a1 e − jω + a 2 e − j2ω
∴ |H(e jω
)|= M
L 1
×
1 OP 2
MN1+ a e + a e 1+ a e + a e PQ
1
− jω
2
j2ω
1
jω
2
j2ω
=M
L 1 OP 2
MN 11+ a e jω
+ a e 2 + a j2ω
e + a 1+ a− jω
a e + a e2
1 + a a
1 2 e jω
+ a PQ 2
− j2ω
1 2
− jω 2
2
1
=M
L 1 OP 2
MN 12
1+ a + a + 2
a
2 (e +
1 e )jω
+ a (− jω
e + e )2+ a a ( j2ω
e + e ) PQ
− j2ω
1 2
jω − jω
=M
L 1 OP cos θ =
e 2
jθ
+ e − jθ
2
MN 12
1+ a + a + 2
2a
2 cos ω +12a cos 2 ω + 2a
2 a cos ω PQ 1 2
1
=M
L 1 OP 2
.....(1)
MN1+ a + a + 2a (a + 1)cos ω + 2a cos 2ω PQ
2
1
2
2 1 2 2
4. 57 Digital Signal Processing
Hi (e jω )
The Phase function of H(e jω ) is defined as, ∠H(e jω ) = tan−1
Hr (e jω )
where, Hi(ejw ) = Imaginary part of H(ejw ) and Hr(ejw ) = Real part of H(ejw )
To separate the real and imaginary parts, multiply the numerator and denominator of H(ejw ) by the
conjugate of the denominator of H(ejw ).
1 1 + a1 e jω + a 2 e j2ω
∴ H(e jω ) = − jω − j2ω
× .....(2)
1 + a1 e + a2 e 1 + a1 e jω + a 2 e j2ω
1 + a1 e jω + a 2 e j2ω
H(e jω ) = e jθ = cos θ + j sin θ
1+ a12 + a 22 + 2a1(a 2 + 1) cos ω + 2a 2 cos 2ω
1 + a1(cos ω + j sin ω ) + a 2 (cos 2ω + j sin 2ω )
=
1 + a12 + a 22 + 2a1(a 2 + 1) cos ω + 2a 2 cos 2ω
1 + a1 cos ω + a 2 cos 2ω
=
1 + a12 + a 22 + 2a1(a 2 + 1) cos ω + 2a 2 cos 2ω
a1 sin ω + a 2 sin 2ω
+j
1 + a12 + a 22 + 2a1(a 2 + 1) cos ω + 2a 2 cos 2ω
1 + a1 cos ω + a 2 cos 2ω
∴ Hr (e jω ) =
b g
1 + a12 + a 22 + 2a1 a 2 + 1 cos ω + 2a 2 cos 2ω
a1 sin ω + a 2 sin 2ω
Hi (ω ) = 2 2
b
1 + a1 + a 2 + 2a1 a 2 + 1 cos ω + 2a 2 cos 2ω g
The phase function, ∠H(e jω ) = tan−1
Hi (e jω )
= tan1
LM
a1 sin ω + a 2 sin 2ω OP
Hr (e jω ) MN
1 + a1 cos ω + a 2 cos 2ω PQ
Example 4.22
The impulse response of an LTI system is given by h(n) = rn cos(w 0n) u(n). Find the frequency response of
the system.
Solution
The frequency response H(ejw ) is obtained by taking Fourier transform of h(n).
By definition of Fourier transform,
+∞ +∞
H(e jω ) = ∑ h(n) e − jωn = ∑ rn cos ω 0n e − jωn
n = −∞ n = 0
+∞
LM e jω 0n
+ e − jω 0 n OP 1 +∞
= ∑ rn
N 2
e − jωn =
Q 2
∑ rn e jω 0n e − jωn + rn e − jω 0n e − jωn
n = 0 n = 0
+∞ ∞
1 n 1 n
=
2
∑ r e jω 0 e − jω +
2
∑ r e − jω 0 e − jω
n = 0 n = 0
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 58
For |r| < 1, we can apply the infinite geometric series sum formula to give,
1 1 1 1 1 LM 1 − r e − jω 0
e− jω + 1 − r e jω 0 e − jω OP
H(e jω ) = + =
2 1 − r e jω 0 e− jω 2 1 − r e − jω 0 e − jω 2 MN d1 − r e i d1 − r e e
jω 0
e − jω − jω 0 − jω
i PQ
=
1 d
2 − r e − jω e − jω 0 + e jω 0
=
i1 2 − r e de + e i
− jω jω 0 − jω 0
2 1 − r e− jω 0 e− jω − r e jω 0 e− jω + r 2 e − j2ω 2 1 − r e de − jω
+ e i e
jω 0
+ r − jω 0 2 − j2ω
1 2 − r e − jω 2 cos ω 0 1 r cos ω 0 e− jω
= − jω 2 − j2ω
=
2 1 − re 2 cos ω 0 + r e 1 − 2r cos ω 0 e− jω + r 2 e − j2ω
1 − r cos ω 0 e − jω
Frequency response, H(e jω ) =
1 − 2r cos ω 0 e − jω + r 2 e − j2ω
1 + a e− jω
Let, r cos w 0 = a ; 2r cos w 0 = a ; and r2 = b. ∴ H(ejω ) =
1 + α e− jω + β e− j2ω
The function H(ejw ) is same as frequency response of standard second order system. Hence refer
section 4.6.5.
Example 4.23
An LTI system is described by the difference equation, y(n) = ay(n 1) + bx(n). Find the impulse response,
magnitude function and phase function. Solve b, if |H(ejw )| = 1. Sketch the magnitude and phase response
for a = 0.7.
Solution
a) To Find Impulse Response
Let, Z{x(n)} = X(z), Z{y(n)} = Y(z), \ Z{y(n 1)} = z1 Y(z).
Given that, y(n) = ay(n 1) + bx(n).
On taking Z-transform we get,
Y(z) = az1Y(z) + b X(z) ÞÞ Y(z) az1Y(z) = b X(z) Þ (1 az1) Y(z) = b X(z)
Y(z) b 1
∴ H(z) = =
X(z) 1 − az−1 n
Z anu(n) = s 1 − az−1
The impulse response is obtained by taking inverse Z-transform of H(z).
1 1
OP = LM b × b OP = LM O
1
LM
Magnitude function, |H(e jω )| = H(e jω ) × H∗ (e jω )
b 2
2 2
Q N1 a e 1 a e Q N1 ae ae + a PQ
2
N jω jω jω jω 2
1
L 2 OP L 2
OP = 2
1
=M
b b b 2
=M
MN1 + a 2
ade + e ijω P
Q MN 1 + a 2a cos ω PQ 1+ a − 2a cos ω
jω 2 2
4. 59 Digital Signal Processing
The phase function is defined as,
∠H(e jω ) = tan−1
LM H (e ) OP
i
jω
where, Hi(ejw ) and Hr(ejw ) are imaginary and real parts of H(ejw ).
N H (e ) Q ;
r
jω
To separate real and imaginary parts of H(ejw ), multiply the numerator and denominator of H(ejw ) by the
complex conjugate of the denominator.
b 1 − a e jω b − ab e jω b ab(cos ω + jsin ω )
∴ H(e jω ) = − jω
× jω
= =
1− a e 1− a e 1 − a e jω − a e − jω + a 2 1+ a 2 − a(e jω + e− jω )
=
b ab cos ω − jab sin ω
=
b 1 a cos ω c
+j
−ab sin ω h
1 + a 2 − 2a cos ω 1 + a 2 − 2a cos ω 1 + a 2 − 2a cos ω
∴ Hr (ejω ) =
c
b 1 a cos ω h and Hi(ejω ) =
− ab sin ω
1 + a 2 − 2a cos ω 1 + a 2 − 2a cos ω
MNH (e ) PQ
r
jω
MN bc1 a cos ωh PQ MN 1− a cos ω PQ
c) To Evaluate b and Sketch Frequency Response
Given that, |H(ejw )| = 1
b
∴ =1 or b = 1 + a 2 − 2a cos ω
1 + a 2 − 2a cos ω
When ω =
−3π
; ∠H(e jω ) = tan−1
−0.7 sin c h = 0.32 = 0.32 × π = 0.1π rad
−3π
4
−π −0.7 sin c h −π
4 0.775
When ω = ; ∠H(ejω ) = tan−1 = 0.775 = × π = 0.25π rad
4 1 − 0.7 cos c h −π
4
π
−0.7 sin(0)
When ω = 0 ; ∠H(e jω ) = tan−1 =0
1 − 0.7 cos (0)
When ω =
π
; ∠H(e jω ) = tan−1
−0.7 sin 4 c h = − 0.775 = −0.775 × π = − 0.25 π rad
π
4 1 − 0.7 cos 4π ch π
2π −0.7 sin c h π
2 − 0.61
When ω = ; ∠H(e jω ) = tan−1 = − 0.61= × π = −0.19 π rad
4 1 − 0.7 cos c h π
2
π
3π −0.7 sin c h 3π
4 −0.32
When ω = ; ∠H(e jω ) = tan−1 = − 0.32 = × π = 0.1π rad
4 1 − 0.7 cos c h 3π
4
π
4π −0.7 sin π
When ω = ; ∠H(e jω ) = tan−1 =0
4 1 − 0.7 cos π
The phase function of fig 2 is sketched using the above calculated values. The magnitude function
is a straight line, passing through "1" as shown in fig 1.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 60
e j
H e jω
∠H e jω e j 0.3π
0.2π
0.1π
1 −ω −π −3 π −π −π 0 π π 3π π ω
4 2 4 4 2 4
−0.1 π
−0.2 π
−ω −π 0 π ω
−0.3 π
F ig 1 : M a gn itu d e fu n c tio n.
Example 4.24
Determine the frequency response of an LTI system governed by the difference equation,
y(n) = x(n) + 0.81 x(n 1) + 0.81 x(n 2) 0.45 y(n 2)
Solution
Let, F{y(n)} = Y(ejw ) \ F{y(n k)} = ejwk Y(ejw )
Let, F{x(n)} = X(ejw ) \ F{x(n k)} = ejw k X(ejw )
Given that, y(n) = x(n) + 0.81 x(n 1) + 0.81 x(n 2) 0.45 y(n 2)
On taking Fourier transform we get,
Y(e jw ) = X(e jw ) + 0.81 e jw X(ejw ) + 0.81 ej2w X(ejw ) 0.45 ej2w Y(ejw )
Y(e jw ) + 0.45ej2w Y(ejw ) = X(ejw ) + 0.81 e jw X(ejw ) + 0.81 ej2w X(e jw )
(1+ 0.45 e j2w ) Y(ejw ) = (1+ 0.81ejw + 0.81e j2w ) X(ejw )
Y(e jω ) 1 + 0.81 e− jω + 0.81 e− j2ω
∴ =
X(e jω ) 1 + 0.45 e − j2ω
Y(ejω ) 1 + 0.81 e − jω + 0.81 e− j2ω
The frequency response, H(e jω ) = =
X(ejω ) 1 + 0.45 e− j2ω
1
Magnitude function, |H(e jω )| = H(e jω ) H∗ (ejω ) 2
=M
L1+ 0.81 e + 0.81 e × 1+ 0.81 e + 0.81 e OP
jω j2ω jω j2ω 2
j2ω j2ω
N 1+ 0.45 e 1+ 0.45 e Q 1
LM jω j2ω − jω
OP 2 2 jω
2
= M
L 2.31 + 0.81(e + e ) + 0.66(e + e ) + 0.81(e + e ) OP
jω − jω jω − jω j2ω − j2ω 2
N 12
. + 0.45(e + e ) j2ω
Q
− j2ω
= M
L 2.31 + 162
. cos ω + 132
. cos ω + 162
. cos 2ω O
PPQ
2
MN 12
. + 0.9 cos 2ω
4. 61 Digital Signal Processing
1
L 2.31 + 2.94 cos ω + 162
∴ |H(e )| = M
jω . cos 2ω O
PPQ
2
.....(1)
MN .
12 + 0.9 cos 2 ω
To separate real part and imaginary parts of H(e jw ), multiply the numerator and denominator of
H(ejw ) by the complex conjugate of H(ejw ).
1 + 0.81 e − jω + 0.81 e − j2ω 1 + 0.45 e j2ω ..... (2)
∴ H(e jω ) = ×
1 + 0.45 e − j2ω 1 + 0.45 e j2ω
(1 + 0.81 e− jω + 0.81 e− j2ω ) (1 + 0.45 e j2ω ) Using equation (1)
=
12
. + 0.9 cos 2ω
1 + 0.45 ej2ω + 0.81 e− jω + 0.36 e jω + 0.81 e − j2ω + 0.36
=
12
. + 0.9 cos 2ω
. + 0.45(cos 2ω + j sin 2ω ) + 0.81(cos ω − j sin ω )
136
+ 0.36(cos ω + j sin ω ) + 0.81(cos 2ω − j sin 2ω )
=
12
. + 0.9 cos 2ω
. + 0.45 cos 2ω + 0.81 cos ω + 0.36 cos ω + 0.81 cos 2ω
136
∴ Hr (ejω ) =
. + 0.9 cos 2ω
12
. + 117
136 . cos ω + 126. cos 2ω
=
. + 0.9 cos 2ω
12
0.45 sin 2ω − 0.81 sin ω + 0.36 sin ω − 0.81 sin 2ω
Hi (e jω ) =
. + 0.9 cos 2ω
12
0. 45 sin ω − 0.36 sin 2ω
=
. + 0.9 cos 2ω
12
N H (e ) Q
r
jω
MN 136
. + 117
. cos ω + 126
. cos 2ω PQ
Example 4.25
The impulse response of system is h(n) = 1 ; 0 £ n £ (N 1) Using finite geometric
= 0 ; otherwise series sum formula
N 1
Find the transfer function and frequency response. 1 CN
Solution
∑ Cn =
1 C
n = 0
The transfer function H(z) is obtained by taking Z-transform of the impulse response,
N
∞ N− 1
d i
1 − z−1 1 − z −N
∴ Transfer function, H(z) = Z{h(n)} =
n= 0
∑ h(n) z −n = ∑
n= 0
z −n =
1− z −1
=
1 − z −1
The frequency response H(ejw ) is obtained by evaluating H(z) at z = ejw .
1 − z −N 1 − e− jωN
∴ Frequency response, H(ejω ) = H(z) z = e jω = =
1 − z−1 z = e jω
1 − e− jω
1
Magnitude function, |H(e jω )| = H(e jω ) H∗ (ejω ) 2
1 1
=
LM 1 e jωN
×
1 − e jωN OP = LM1 e − e + 1OP
2 jωN − jωN 2
N 1− e − jω
1 − e jω Q N 1 e − e + 1 Q
1
jω − jω
1 1
L 2 (e
=M
jωN
+ e − jωN )O
P = LMMN 22 22cos
2 ωN O
P = LMMN11 cos ωN O
P
2 2
MN 2 (e jω
+ e − jω ) PQ cos ω PQ cos ω PQ
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 62
In order to determine the phase function, the real and imaginary part of H(ejw ) has to be separated.
1 − e− jωN 1 − e jω
∴ H(ejω ) = ×
1 − e− jω 1 − e jω
1 − e jω − e − jωN + e− jωN e jω 1 − ejω − e− jωN + e− jω (N − 1)
= =
1 − e jω − e − jω + 1 2 − ( e jω + e − jω )
1 − (cos ω + j sin ω ) − (cos ωN − j sin ωN) + (cos ω(N − 1) − j sin ω(N − 1))
=
2 − 2 cos ω
1 − cos ω − cos ωN + cos ω(N − 1)
Real part , Hr (ejω ) =
2 − 2 cos ω
− sin ω + sin ωN − sin ω(N − 1)
Imaginary part , Hi (e jω ) =
2 − 2 cos ω
Let xa (nT) be the discrete time signal obtained by sampling the given analog signal.
= 2 cos
2πn
+ 5 sin
4πn
+ 12 cos
12πn
= 2 cos
2πn
+ 5 sin
4πn
+ 12 cos
2πn 10 πn
+
FG IJ
5 5 5 5 5 5 5 H K
= 2 cos
2πn
+ 5 sin
4πn
+ 12 cos
2πn
+ 2πn = 2 cos
FG
2πn
+ 5 sin
4πn IJ
+ 12 cos
2πn
5 5 5 5 H 5 K 5
2πn 4πn For integer n,
= 14 cos + 5 sin
5 5 cos(q + 2pn) = cosq
Comment : When sampled at 5000 Hz, the component 12 cos 12000pt is an alias of the component 2 cos 2000pt.
4. 63 Digital Signal Processing
Solution
Given signal is a periodic impulse signal with impulses located at n = 3k, for integer values of k.
Let, one period of the given signal be x1(n).
Now, x1(n) = {1, 0, 0 }, with period N = 3, and with fundamental frequency, w 0=2p/3.
The Fourier coefficient ck is given by,
N− 1 − jk 2πn 2 − jk2πn
1 1 1 1
ck =
N
∑
n= 0
x1(n) e N =
3
∑
n=0
x1(n) e 3 =
3
x(0) + 0 + 0 =
3
; for all k.
F IJ LM FG IJ OP = LMM e OP LM e OP
jπn jπn 2 2
jπn jπn
π πn
2
6 + e
−
6 6 e
−
6 e jθ + e − jθ
x(n) = cos G 2 cosθ =
H K N H KQ M
6
n = cos
6 2 PP = M
MN 2
+
2 PP 2
N Q Q
j 2π n − j 2π n − j 2π n j 2π n
1 1 1 1 1 1
= e 6 + e 6 + = e 6 + + e 6
4 4 2 4 2 4
1 − j 2ω 0 n 1 1 j 2ω 0 n π
= e + + e ; where ω 0 =
4 2 4 6
Q4.3 Find the Fourier transform of x(n) = { 2, 1, 2 }.
Solution
By definition of Fourier transform,
+∞ 2
X(e jω ) = ∑ x(n) e − jωn = ∑ x(n) e − jωn = x(0) e 0 + x(1) e − jω + x(2) e − j2ω
n = −∞ n = 0
= 2 + e − jω + 2 e− j2ω = 2 e− jω (e jω + e − jω ) + e − jω e jθ + e − jθ
cosθ =
= 4 cos ω e − jω + e − jω = (1 + 4 cos ω ) e − jω 2
4. 65 Digital Signal Processing
Q4.4 Determine the Fourier transform of x(n) = u(n) – u(n–N).
Using finite geometric
Solution series sum formula
N 1
x(n) can be expressed as, x(n) = 1 ; for n = 0 to N1. 1 CN
By definition of Fourier transform,
∑
Cn =
1 C
n = 0
+∞ N−1 N− 1
− jω n 1 − e− jωN
X(e jω ) = ∑ x(n) e − jωn = ∑ 1× e − jωn
= ∑ de i =
1 − e− jω
n= −∞ n=0 n= 0
F − jωN − jωN
I − jωN
LMjωN − jωN
OP L ωN O LM sin ωN OP
1− GH e 2 e 2 JK e 2 e 2 _
MN
e 2
PQ = e − jω GFH N2 − 21JIK M sin 2 P − jω GFH N2−1JIK
=
F − jω − jω
I = − jω
LMe jω − jω
OP MM ω PP = e MM ω2 PP
1− G e
H
2 e 2
JK e 2
MN
2 − e 2
PQ N sin 2 Q N sin 2 Q
Q4.5 Find the Fourier transform of , x(n) = –an u(–n –1), where |a| < 1. Using finite geometric
Solution series sum formula
N 1
1 CN
By definition of Fourier transform, when n = 0; an ejwn = 1 ∑
Cn =
1 C
n = 0
+∞ −1 ∞ ∞ ∞ n
jω jω jω
1 a a− e −a −e e
= 1− = 1− = = = jω
1 − a −1e jω a − e jω a − e jω a − e jω e −a
n −n
Q4.6 Find the discrete time Fourier transform of the signal , x(n) = (0.2) u(n) + (0.2) u( − n − 1).
Solution
By definition of Fourier transform,
∞ ∞ ∞
X(e jω ) = ∑ x(n) e− jωn = ∑ ( 0.2)n u(n) e− jωn + ∑ (0.2) −n
u( −n − 1) e− jωn
n= −∞ n= −∞ n= −∞
∞ −1 ∞ ∞
= ∑ (0.2 e − jω n
) + ∑ ( 0.2 e jω )−n = ∑ (0.2 e − jω n
) + ∑ (0.2 e jω )n when n = 0; (0.2ejw )n =1
n=0 n = −∞ n=0 n=1
∞ ∞
1 1
= ∑ ( 0.2 e − jω n
) + ∑ (0.2 ejω )n − 1=
1 − 0.2 e − jω
+
1 − 0.2 e jω
−1
n=0 n =0
Using infinite geometric
1 − 0.2 e jω + 1 − 0.2 e− jω − (1 − 0.2 e− jω ) (1 − 0.2 e jω )
= series sum formula
(1 − 0.2 e − jω ) (1 − 0.2 e jω ) ∞
1
1 − 0.2 e jω + 1 − 0.2 e− jω − (1 − 0.2 ejω − 0.2 e − jω + 0.04)
∑ Cn =
1− C
n = 0
=
1 − 0.2 e jω − 0.2 e− jω + 0.04 when |C|< 1
1 − 0.04 0.96
= = e jθ + e − jθ
1 − 0.2 (e jω + e − jω ) + 0.04 104. − 0.4 cos ω cosθ =
2
Q4.7 Determine the energy density spectrum of a discrete time signal , x(n) = a n u(n) for − 1 < a < 1.
Solution
Using infinite geometric
By definition of Fourier transform, series sum formula
∞
1
∞ ∞ ∞
− jω n 1
∑ Cn =
1 − C
X(e jω ) = ∑ x(n) e − jωn = ∑ an e − jωn = ∑ da e i =
1 − a e − jω
n = 0
Q4.8 Find the inverse Fourier transform of the rectangular pulse spectrum defined as,
X(e jω ) = 1 ; |ω | ≤ W
= 0 ; W ≤ |ω | ≤ π
Solution
By definition inverse Fourier transform,
π W
1 e jθ + e− jθ
x(n) =
2π z
−π
X(e jω ) e jωn dω =
1
2π z
−W
e jωn dω sin θ =
2j
W sin θ
=
1 LM e OP
jωn
=
1 LM e
j Wn
−
e− jWn OP =
1 LM e j Wn
− e − jWn OP θ
= sinc θ
2π N jn Q −W
2π N jn jn Q πn N 2j Q
sinWn W sinWn W
= = = sinc Wn
πn π Wn π
Q4.9 Determine the inverse Fourier transform of X(e jω ) = 2 π δ ( ω − ω 0 ), ω0 ≤ π .
Solution
The inverse Fourier transform of X(ejw ) is,
π π
x(n) =
1
2π z
−π
X(ejω ) ejωn dω =
1
2π z
−π
2 π δ(ω − ω 0 ) e jωn dω
Note : Here the integral limit is -p to
π
+p, and in this range there is only one
= z
−π
δ(ω − ω 0 ) e jωn
dω = e jωn
ω =ω 0
=e jω 0n
impulse located at w 0 .
1 − 2 a z −1
Q4.10 A causal discrete time LTI system has a system function H(z) = . Here 'a' is real and
2 b + z −1
|a| < 1. Find the value of 'b' so that the frequency response H(ejw ) of the system satisfies the
condition |H(ejw )| = 1 for all w.
Solution
1 − 2a z −1
Given that, H(z) =
2b + z −1
The frequency response of the system can be obtained by putting, z = e jw in H(z).
1 − 2a e − jω
∴ H(e jω ) == H(z) z = e jω
=
2b + e − jω
1 − 2a e − jω
Here, H(e jω ) = 1 ; ∴ =1 ⇒ 1 − 2a e − jω = 2b + e − jω
2b + e − jω
∴ 1 − 2 a cos ω + j 2 a sin ω = 2 b + cos ω − j sin ω
e± jθ = cos θ ± j sin θ
2 2 2 2
c1 − 2a cos ωh + c2 a sin ωh = c2b + cos ωh + csin ωh
1 + 4 a 2 cos 2ω − 4 a cos ω + 4 a 2 sin2 ω = 4 b2 + 4 b cos ω + cos 2ω + sin2ω sin2 θ + cos 2 θ = 1
1 + 4 a 2 − 4 a cos ω = 4 b2 + 4 b cos ω + 1
The above equation is true, when b = - a .
jω
Hence to satisfy the condition H(e ) = 1 for all w , b = -a .
4. 67 Digital Signal Processing
Q4.11 Determine the sampling period for the signal X(j W) = U ( j W + j W 0) – U (j W – j W 0), to
sample without aliasing.
Solution
The frequency spectrum of the given signal can be plotted as shown in fig Q4.11.
U ( Ω + Ω0 ) U ( Ω − Ω0 ) X ( j Ω)
1
−
− Ω0 0 Ω 0 Ω0 Ω − Ω0 0 Ω0 Ω
F ig Q 4 .11.
From the frequency spectrum of fig Q4.11, it is observed that the maximum frequency, W max is,
Ω0
Ωmax = Ω0 ; ∴ 2 π Fmax = Ω0 ⇒ Fmax =
2π
1
∴ Sampling frequency, Fs ≥ 2 Fmax ⇒ Sampling period, T ≤
Fs
1 1 π
∴Minimum sampling period, T = = =
Fs 2Fmax Ω0
F i. e. , T < π I . π
∴ In order to avoid aliasing the sampling period T should be less than GH Ω JK Ω0 0
Q4.12 Determine the Nyquist sampling frequency and Nyquist interval for the signal, x(t) = M
L sin 200 π t OP .
N πt Q
Solution
2
x(t) =
LM sin 200 π t OP =
1
sin2(200 π t) =
1 1 − cos 2(200π t)
MN π t PQ π t 2 2
π t 2 2
2
1 − cos 2 θ
=
1
1 − cos 400π t =
1
−
cos 400πt sin2 θ =
2
2 π2 t 2 2 π2 t 2 2 π2 t2
On comparing the cosine component with standard cosine wave "A cosW t" we get,
W = 400p Þ 2pF = 400p Þ F = 200 Hz
From the above analysis it is observed that, the maximum frequency in the signal Fmax = 200 Hz.
∴ Nyquist rate = 2 Fmax = 2 × 200 = 400 Hz
1 1
Nyquist interval = = = 2.5 ms
Nyquist rate 400
Solution 1
From the spectrum shown in fig Q4.13.1 it is observed
that the maximum frequency, Fm in the signal is 100 Hz.
Given that, Sampling frequency, Fs is 300 Hz, which is −100 −50 0 50 100 F (H z )
greater than 2 Fm , and so the signal is sampled without
F ig Q 4.13 .1.
aliasing.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 68
Frequency "f" of sampled discrete time signal corresponding to any frequency "F" of continuous time
signal is given by, f = F / Fs .
The magnitude of the spectrum of discrete time signal will be scaled by 1/T, where T = 1/ Fs. The
frequency spectrum of a discrete time signal will be periodic with periodicity of - 0.5 to + 0.5. (Refer
Chapter-2, Section 2.3). Therefore the frequency spectrum of sampled discrete time signal will be as
shown in fig Q4.13.2.
X (e jf )
2
T
1
T
400 350 −1 250 200 − 1 − 100 50 0 50 100 1 200 250 1 350 400 f
− − − − − 300
300 300 300 300 2 300 300 300 300 2 300 300 300
F ig Q 4.1 3.2.
Q4.14 If the spectrum shown in fig Q4.13.1 is sampled at a rate of 100 samples / sec. Sketch the
spectrum of the sampled discrete time signal.
Since the sampling frequency is less than 2 Fm, the spectrum of the sampled signal will have aliasing as
shown in fig Q4.14.1.
X (e jf )
2
T
1
T
−1 50 1 0 50 1 1 f
− =− =
100 2 100 2
F ig Q 4.1 4.1.
clear all
N=3; i=sqrt(-1);
x0=1; x1=2; x2=-1;
Ck=[];
for k=0:1:11
C=(1/N)*(x0+(x1*(exp(-i*2*pi*k/N)))+(x2*(exp(-i*4*pi*k/N))));
Ck=[Ck,C];
end
k = 0:1:11;
Ck %print the Fourier coefficients Ck
Mag_of_Ck = abs(Ck) %evaluate and print the magnitude of Fourier
%coefficients
Pha_of_Ck = angle(Ck) %evaluate and print the phase of Fourier
%coefficients
subplot(2,1,1), stem(k,Mag_of_Ck);
xlabel(k), ylabel(Magnitude of Ck);
subplot(2,1,2), stem(k,Pha_of_Ck);
xlabel(k), ylabel(Phase of Ck in rad.);
OUTPUT
Columns 8 through 12
0.1667 - 0.8660i 0.1667 + 0.8660i 0.6667 0.1667 - 0.8660i
0.1667 + 0.8660i
Mag_of_Ck =
0.6667 0.8819 0.8819 0.6667 0.8819 0.8819 0.6667 0.8819
0.8819 0.6667 0.8819 0.8819
Pha_of_Ck =
0 -1.3807 1.3807 0 -1.3807 1.3807 0 -1.3807
1.3807 0 -1.3807 1.3807
The magnitude and phase spectrum of program 4.1 are shown in fig P4.1.
Program 4.2
Write a MATLAB program to sketch the magnitude and phase spectrum of discrete time
systems represented by the following transfer functions.
a) H(ejw )=(1-e-j3w )/3(1-e-jw ) b) H(ejw )=2e-jw/2cos(w/2)
c) H(ejw )=2e-jw/2sin(w/2)
clear all
for w=-2*pi:0.01:2*pi
H1=(1/3)*(1-exp(-3*i*w))/(1-exp(-i*w));
H2=2*(exp(-i*w/2))*(cos(w/2));
H3=2*(exp(-i*w/2))*(sin(w/2));
subplot(3,2,1),plot(w1,MagH1);
xlabel(w in rad.),ylabel(Mag. of H1);
subplot(3,2,2),plot(w1,PhaH1);
xlabel(w in rad.),ylabel(Pha. of H1);
subplot(3,2,3),plot(w1,MagH2);
xlabel(w in rad.),ylabel(Mag. of H2);
subplot(3,2,4),plot(w1,PhaH2);
4. 71 Digital Signal Processing
xlabel(w in rad.),ylabel(Pha. of H2);
subplot(3,2,5),plot(w1,MagH3);
xlabel(w in rad.),ylabel(Mag. of H3);
subplot(3,2,6),plot(w1,PhaH3);
xlabel(w in rad.),ylabel(Pha. of H3);
OUTPUT
The magnitude and phase spectrum of program 4.2 are shown in fig P4.2.
Program 4.3
Write a MATLAB program to sketch the frequency response of the first-order discrete
time system governed by the transfer function,
clear all
j=sqrt(-1);w=[];Mag_H1=[];Pha_H1=[];Mag_H2=[];Pha_H2=[];
for w1=-pi:0.01:pi
H1 = 1/(1-0.5*exp(-j*w1));
H2 = 1/(1+0.5*exp(-j*w1));
H1_M = abs(H1);
H2_M = abs(H2);
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 72
H1_P = angle(H1);
H2_P = angle(H2);
Mag_H1=[Mag_H1, H1_M];
Mag_H2=[Mag_H2, H2_M];
Pha_H1=[Pha_H1,H1_P];
Pha_H2=[Pha_H2,H2_P];
w=[w,w1];
end
subplot(2,2,1),plot(w,Mag_H1);
xlabel(w in rad.),ylabel(Magnitude of H1(jw));
subplot(2,2,2),plot(w,Mag_H2);
xlabel(w in rad.),ylabel(Magnitude of H2(jw));
subplot(2,2,3),plot(w,Pha_H1);
xlabel(w in rad.),ylabel(Phase of H1(jw) in rad.);
subplot(2,2,4),plot(w,Pha_H2);
xlabel(w in rad.),ylabel(Phase of H2(jw) in rad.);
Program 4.4
Write a MATLAB program to sketch the frequency response of the second-order discrete
time system governed by the transfer function,
clear all
j=sqrt(-1);w=[];Mag_H=[];Pha_H=[];
r=0.9; wo=pi/2;
a=(-1*r*cos(wo));
alpha=2*a;
Beta=r^2;
for w1=-pi:0.01:pi
Num_of_H=(1+a*exp(-j*w1));
Den_of_H=(1+((alpha)*exp(-j*w1))+((Beta)*exp(-j*2*w1)));
H=Num_of_H / Den_of_H;
H_M=abs(H);
H_P=angle(H);
Mag_H=[Mag_H,H_M];
Pha_H=[Pha_H,H_P];
w=[w,w1];
end
subplot(2,1,1),plot(w,Mag_H);
xlabel(w in radians),ylabel(Magnitude of H(jw));
subplot(2,1,2),plot(w,Pha_H);
xlabel(w in radians),ylabel(Phase of H(jw));
OUTPUT
The frequency response consists of two parts : Magnitude spectrum and Phase
spectrum. The magnitude and phase spectrum of the given second-order discrete time
system are shown in fig P4.4.
4.12 Exercises
I. Fill in the blanks with appropriate words
1. The Fourier transform of continuous time signal involves integration, whereas the Fourier transform of
discrete time signal involves _______.
2. In Fourier transform of a real signal, the magnitude function is symmetric and phase function is _______.
3. The _______ operation of x(n) with h(n) is equal to the product X(ejw ) H(ejw ).
4. The Fourier transform of product of two time domain signals is equivalent to _______ of their Fourier
transforms.
5. The Fourier transform of the impulse response of an LTI system is called _______.
6. The Fourier transform of the discrete signal can be obtained by evaluating the Z-transform along _______.
7. A second-order LTI system will behave as a _______ filter.
8. A first-order LTI system will behave as a _______ filter.
9. A bandlimited signal with maximum frequency Fm can be fully recovered from its samples if sampled at a
frequency greater than or equal to _______.
10. The sampling rate for a bandpass signal with bandwidth "B" is _______.
Answers
1. summation 4. convolution 7. bandpass 9. 2 Fm
2. antisymmetric 5. frequency response 8. lowpass or highpass 10. 2B to 4B
3. convolution 6. unit circle
l
1. The Fourier coefficients of x(n) is, ck = 3, 2 + j, 1, 2 − j . The value of x(7) is, q
a) 1 b) 0 c) 2 - j d) 2 + j
2. For a periodic discrete time signal x(n), the Fourier coefficient c1 = –1 + j4.5. The value of c1 + N will be,
a) –1– j 4.5 b) –1 c) j4.5 d) –1+ j 4.5
8. The Fourier transform of correlation sequence of two discrete time signals x1(n) and x2(n) is given by,
a) X1(ejw ) X 2(ejw ) b) X1(ejw ) X2(e–jw ) c) X1(e–jw ) X2(e–jw ) d) none of the above
9. If h(n) is real, then magnitude of H(e jw ) is ______ and phase of H(e jw ) is _____.
a) symmetric, antisymmetric b) antisymmetric, symmetric
c) symmetric, symmetric d) antisymmetric, antisymmetric
10. The second order LTI discrete time system behaves as,
a) low pass filter b) high pass filter c) resonant filter d) all pass filter
12. If X(j W ) is frequency spectrum of a continuous time signal then, the frequency spectrum of sampled
version of the signal X(e j w ) is, (where w = W T),
∞
a)
1 +∞
∑X j
T m = −∞
dc ω
T
+ 2 πm
T hi b)
1
2π −∞ z
X( j ωT ) e jωnT dω c)
1 +∞
∑ X j ωT +
T m = −∞
dc 2 πm
T hi d)
1 +∞
∑X j
T m = −∞
d c hi
mω
T
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 76
13. A bandlimited continuous time signal with maximum frequency Fm , sampled at a frequency Fs , can be
fully recovered from its samples, provided that,
a) Fs ³ 2Fm b) Fs = 2Fm c) Fm ³ 2Fs d) Fs = Fm
14. If Z-transform of x(n) includes unit circle in its ROC, then the Fourier transform of x(n) can be
expressed as,
∞ ∞ ∞ ∞
a) ∑ x( n) z −n
b) ∑ x(n) z − jn
c) ∑ x ( n) z n
d) ∑ x( n) z −n
15. Let x(n) is real and x(n) = xe(n) + xo(n). If A(e j w ) is Fourier transform of xe(n) and if B(e j w ) is Fourier
transform of xo(n), then Fourier transform of x(n) is,
a) A(ejw ) + B(ejw ) b) A(e–jw ) + j B(e–jw ) c) A(ejw ) – jB(ejw ) d) A(e–jw ) – j B(e–jw )
16. If a continuous time signal x(t) has a nyquist rate of W 0 ,then nyquist rate for the continuous time
signal x2(t) is,
Ω0 Ω0
a) b) 2W 0 c) d) W 0
2 4
17. If the bandwidth of a bandpass signal x(t) is 2F , then the minimum sampling rate for bandpass signal
must be,
F F
a) 2F samples/sec b) 4F samples/sec c) samples/sec d) samples/sec
2 4
18. If X(e j w ) = e – j w for –p £ w £ p, then the discrete time signal x(n) is,
sin 2 π (n − 1) sin π(n − 1) sin π (2n − 1)
a) b) sin π(n − 1) c) d)
2 π (n − 1) π (n − 1) π (2n − 1)
19. The discrete time Fourier transform of the signal, x(n) = 0.5(n − 1) u(n − 1) is,
− jω − jω
e 0.5e 0.5e jω
a)
1 − 0.5 e − jω d
b) e − jω 1 − 0.5 e − jω i c)
1 − 0.5e− jω
d)
1 − 0.5 e − jω
1 0.8 0.8e − jω
a) does not exist b) c) d)
1 − 0.8e − jω 1 − 0.8e − jω 1 − 0.8 e − jω
Answers
1. c 5. a 9. a 13. a 17. b
2. d 6. c 10. c 14. d 18. c
3. b 7. d 11. c 15. a 19. a
4. d 8. b 12. a 16. b 20. a
4. 77 Digital Signal Processing
a) x(n) = 4 cos 8 π n l
b) x(n) = .....4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1,..... q
A
j5πn
c) x(n) = 9 e 2 d) x(n) = 4 sin 2 πn
3
e) x(n) = cos π3n + sin π5n
a) x(n) = 3cos 2π
n l
b) x(n) = −3, 4, −1, 2 q
5
A
c) x(n) = ( −1) n ; 0≤n≤7 LMd i − d i OP u(n)
1 n 1 n
d) x(n) = 0.5
= 0 ; otherwise N 0.4 0.8
Q
E4.3 Determine the convolution of the following sequences, using Fourier transform.
l q l
a) x1 (n) = 2, −2, 2 , x2 (n) = −2, 2, −2 q l q
b) x1 (n) = −2, −1, 0 , x2 (n) = −3, 5, −7 l q
A A A A
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 78
1 + 1 e − jω 1
c) Y(e ) =jω 7 d) H(e jω ) =
1 − 1 e − jω
7
e1 − 1 − jω
6
e j e1 − 1 − jω
5
e j
5
E4.5 a) A causal discrete time system is described by the equation, y(n) − 14 y(n − 1) − 141 y(n − 2) = x(n) ,
where x(n) and y(n) are input and output of the system. Find the impulse response h(n), frequency
response H(ejw ), magnitude function and phase function of the system.
(ii) Determine the response y(n) for the input, x(n) = cos π2n .
E4.6 A discrete LTI system is described by a difference equation, y(n) = x(n) – x(n – 1). Determine the
frequency response H(ejw ), impulse response h(n). Sketch the magnitude function and phase function.
E4.7 Sketch the magnitude and phase function of the discrete time LTI system described by the equation
y(n) = x(n) + x(n – 1).
1 1 1 1
E4.8 The impulse response of a system is, h(n) = 0.2
δ (n + 2) + 0.4 δ (n + 1) + 0.3 δ (n) + 0.4 δ (n − 1)
(i) Is the system BIBO stable? (ii) Is the system causal? (iii) Find the frequency response.
E4.9 l
The impulse response of an LTI system is h(n) = −2, −1, 1, −2 . Find the response of the system q
l q
for the input x(n) = 2, 2, 4, 1 , using convolution property of Fourier transform.
Find the system transfer function H(z), impulse response and frequency response of the system.
Also determine the magnitude and phase function.
Answers
− jπ jπ
c) x(n) = 9 e jω 0 n ; ω 0 =
π
2 d) x(n) = 2e 2
e jω 0 n + 2 e 2
e jω 0 n ; ω 0 = 2π
3
π π
j −j
e) x(n) = 21 e − j5ω 0 n + 21 e 2 e − j3ω 0 n + 21 e 2 e j3ω 0 n + 21 e j5ω 0 n ; ω0 = π
15
π π
−j j
(or) x(n) = 12 e 2 e j3ω 0 n + 12 e j5ω 0 n + 12 e j25ω 0 n + 21 e 2 e j27 ω 0 n ; ω 0 = π
15
4. 79 Digital Signal Processing
+∞
E4.2 a) X(e jω ) = 3π ∑ δ (ω − 2π
− 2 πm) + δ (ω + 2π
− 2 πm) b) X(e jω ) = −3 + 4e − jω − e − j2ω + 2 e − j3ω
5 5
m = −∞
sin 4 ω j GH
F π − 7ω IJ 0.625e − jω
2 K d) X(e jω ) =
c) X(e jω ) = e 1 − 3.75e − jω + 3125
. e − j2ω
cos(ω / 2)
l
a) x(n) = − 4, 8, −12, −8, −4 q l
b) x(n) = 6, −7, 9, 7 q
E4.3
A A
2cos πn
E4.4 a) x(n) = b) x(n) = (n + 1) a n u(n); |a|< 1
n
di n
d) h(n) = 6 LM d i − 5d i OP u(n)
1
n
1
n
c) y(n) = 1
7
u( n) + u( n − 1) N 5
Q 6
E4.5 a) h(n) = LM d i
7 1 n
+ 2 −1 n
d i OPQ u(n) ; H(e jω ) =
1
N 9 2 9 7
e1− 1
2
e − jω j e1 + 1
7
e− jω j
1
H(e jω
L
) =M
1 OP 2
; ∠H(e jω ) = tan −1
LM −5sin ω − sin 2ω OP
N 113
. − 0.664 cos ω − 014
. cos 2 ω Q N14 − 5 cosω − cos2ω Q
1 + 15 e − jω n n −1
b) (i) H(e jω ) =
1 − 15 e − jω
; h(n) = c h u ( n) + c h
1
5
1 1
5 5
u(n − 1)
π−ω
= 2
; for ω = 0 to π
0.375π
jω
|H (e )| 0.25π
2
1 .8 4 8 0.125π
1 .5 π
3π π
1 .4 1 4
−π − 4 − 2 −
4 0
1 .0 ω
π π 3π
0 .7 5 4 2 4
−0.125π
0 .5
−0.25π
ω
3π − π π π
−π
− −π 3π π
4 2 4 0 4 2 4 −0.375π
E4.7 ω
H(e jω ) = 2 cos ω e 2 ;
−j
2 e j H (e jω ) = 2 cos ch ω
2
∠H (e )
jω
jω ω
∠H(e ) = − 2
0.5π
0.375π
|H (e jω)|
2.0 0.25π
1.85
0.125π
1.5
0
1.41 ω
−π π π π π
− 3π − − 3π
4 2 4 4 2 4
1.0
−0.125π
0.77
−0.25π
0.5
−0.375π
ω
−π π π
− 3π − π 3π
0 π π
−
4 2 4 4 2 4 −0.5 π
F ig E 4 .7 .1 : M a g n itu de spe ctru m .
F ig E 4 .7 .2 : P h a se sp ec trum .
E4.8 h(n) = m 1
0.2
, 1
0.4
, 1
0.3
, 1
0.4 r; (i) The system is stable ; (ii) The system is noncausal.
A
(iii) H(e jω ) = 1
0.12
(0.4 + 0.6 cos ω + 0.6 cos 2ω + j 0.6 sin 2ω )
E4.9 l
y(n) = −4, −6, −8, −8, −1, −7, −2 q
A
1 − 0.6z−1 1 − 0.6e − jω
H(z) = ; H(e jω ) = ; h(n) = 0.2 n u( n) − 0.6 (0.2) n −1 u(n − 1)
E4.10 1 − 0.2 z −1 1 − 0.2e− jω
. − 12
136 . cos ω F 0.4 sin ω I
H(e jω ) =
. − 0.4 cos ω
104
; ∠H(e jω ) = tan −1 GH 112 J
. − 0.8 cos ω K
Solution for Exercise Problems E4. 1
Digital Signal Processing - A. Nagoor Kani Chapter 4 - Fourier Series and Fourier Transform
of Discrete Time Signals
Solution for Exercise Problems
E4.1. Determine the Fourier series representation of the following discrete time signals.
a) x(n) = 4 cos 8 πn
Solution
l
b) x(n) = .... 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1 ..... q
A
Solution
l
Given that, .... 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1.... q
A
Here, x(n) is periodic with period, N = 4 samples.
2π 2 π π
∴ N = 4, ∴ ω0 = = =
N 4 2
l
Let, x(n) = 4, 3, 2, 1 q
Fourier coefficients ck are given by,
2 πkn 2 πkn
1 −
N 1 −j 3 −j
1
ck = ∑
N n= 0
x(n) e N =
4
∑ x(n) e 4
n=0
1 L OP
2 πk 4 πk 6 πk
= Mx(0) + x(1) e
4 M
−j
4 + x(2) e
−j
4 + x(3) e
−j
4
PQ
N
1 L OP
πk 3 πk
= M4 + 3e + 2e
4 M
−j
2 − jπk
+ e
−j
2
PQ
N
When, k = 0
1 1 10 5
ck = c 0 = 4 + 3e0 + 2e0 + e0 = 4 + 3 + 2 +1 = =
4 4 4 2
When, k = 1
LM
1 −j
π OP −j
3π
ck = c1 = 4 + 3 e 2 + 2 e − jπ + e 2
MN
4 PQ
1L F π πI 3π 3π O
= M4 + 3 G cos − j sin J + 2 bcos π − j sinπg + cos − j sin P
4N H 2 2K 2 2 Q
1 1
= 4 + 3(0 − j) + 2(−1 − j0) + 0 − (− j) = 4 − 3j − 2 + j
4 4 0.78 π
× π = 0.248 π
1 1 1 π
= 2 − 2j = − j = 0.5 − j0.5 = 0.707 ∠ − 0.78
4 2 2 e − jπk = −1 ; for k odd
1 − j0.248 π = +1 ; for k even
= 0.707 ∠ − 0.248 π = e
2
When, k = 2
1
ck = c 2 = 4 + 3 e − jπ + 2 e − j2 π + e − j3 π
4
1 1 2 1
= 4 + 3 ( −1) + 2 (1) + 1 (−1) = 4 − 3+2−1 = =
4 4 4 2
E4. 2 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
When, k = 3
1 LM
−j
3π
. −j
9π OP = 1 L4 + 3 F cos 3π − j sin 3π I + 2 cos 3π − sin 3π + cos 9π − j sin 9π O
ck = c 3 =
4
4+3 e
MN
2 + 2 e − j3 π + e 2
PQ 4 MN GH 2 J b
2 K
g 2
P
2 Q
1
= 4 + 3(0 + j) + 2( −1 − j0) + 0 − j
4
1 2 + 2j 0.78
4 + 3j − 2 −j =
= = 0.5 + j0.5 = 0.707 ∠0.78 = 0.707 ∠0.248 π × π = 0.248 π
4 4 π
1 j0.248 π
= e
2
The Fourier series representation of x(n) is,
N −1 j2 πkn 3 j2 πkn 3 πkn 3
j
x(n) = ∑c k e N = ∑c k e 4 = ∑c k e 2 = ∑c k e jω 0kn = c 0 + c1 e jω 0n + c 2 e j2ω 0n + c 3 e j3ω 0n
k =0 k =0 k =0 k =0
Solution
Test for periodicity
5 π(n+N) FG j 5 πn + j 5πN IJ
x(n + N) = 9 e
j
2 = 9e
H 2 2K
5πN
Let, = 2π × M
2
2π × 2 4
∴ N= ×M = ×M
5π 5
Here ‘N’ is an integer for M = 5, 10, 15,....
Let, M = 5
\ N=4
Here x(n) is periodic with fundamental period, N = 4.
2π π
ω0 = =
N 2
Fourier series
The Fourier coefficients ‘ck’ are given by,
2 πkn
1 N −1 −j
ck =
N n= 0 ∑
x(n) e N ; for, k = 0, 1, 2, 3, ...... (N − 1)
5 πn
j
Here, N = 4, x(n) = 9 e 2
3 5 πn 2 πkn
1 j −j
∴ ck =
4
∑9 e 2 e 4 ; for, k = 0, 1, 2, 3
n=0
3 FG 5 −k IJ LM jπ G
F 5 −k IJ j2 πFG 5 −k IJ j3πFG 5 −k IJ O
+e H 2 K +e H 2 KP
jπn
9 H 2K 9
e0 + e H 2 K
=
4
∑ e =
4 MN PQ
n=0
LM F IJK
jπ G
5−k FG IJ O
KP j3 π
5−k
1+ e H + e H
9 2 jπ( 5 − k ) 2
= + e
4 MN PQ
=
9 LM1+ cos π(5 − k) + j sin π(5 − k) + cos π(5 − k) + j sin π(5 − k) + cos 3 π(5 − k) + j sin 3π(5 − k) OP
4 N 2 2 2 2 Q
When k = 0
ck = c 0 =
9
1+ cos
LM
5π
+ j sin
5π
+ cos 5 π + j sin 5 π + cos
15 π
+ j sin
15 π OP
4 N
2 2 2 2 Q
9 9
= 1+ 0 + j − 1 + j0 + 0 − j) = ×0=0
4 4
When k = 1
9
ck = c1 = 1+ cos 2π + j sin2π + cos 4 π + j sin 4 π + cos 6 π + j sin 6 π
4
9 9
= 1+ 1+ j0 + 1+ j0 + 1+ j0 = × 4 = 9
4 4
Solution for Exercise Problems E4. 3
When k = 2
ck = c 2 =
9 LM
1+ cos
3π
+ j sin
3π
+ cos 3 π + j sin 3π + cos
9π
+ j sin
9π OP
4 N 2 2 2 2 Q
9 9
= 1+ 0 − j − 1+ j0 + 0 + j = × 0 = 0
4 4
When k = 3
9
ck = c 3 = 1+ cos π + j sin π + cos 2π + j sin 2π + cos 3π + j sin 3π
4
9 9
= 1 − 1+ j0 + 1+ j0 − 1 + j0 = × 0 = 0
4 4
The Fourier series representation of x(n) is,
N −1 j2 πkn 3 j2 πkn 3 jπkn 3
x(n) = ∑c k e N = ∑c k e 4 = ∑c k e 2 = ∑c k e jω 0kn
k =0 k =0 k =0 k =0
= c 0 + c1 e jω 0n + c 2 e j2ω 0n + c 3 e j3ω 0n = 0 + 9e jω 0n + 0 + 0 π
ω0 =
jω 0 n 2
x(n) = 9 e
2πn
d) x(n) = 4 sin
3
Solution
Test for periodicity
x(n + N) = 4 sin
2π
(n + N) = 4 sin
2πn 2πN
+
FG IJ
3 3 3 H K
2πN 6π
Let, = 2π × M ⇒ N = × M = 3M
3 2π
Here, N is an integer for M = 1, 2, 3, ....
Let, M = 1, ∴ N=3
∴ x(n) is periodic with fundamental period N = 3.
∴ N=3
Fourier series
The Fourier coefficients ‘ck’ are given by,
2 πkn
1 −
N 1 −j
ck = ∑
N n= 0
x(n) e N ; for, k = 0, 1, 2, 3, ...... (N − 1)
2πn
Here, N = 3, x(n) = 4 sin
3
2 2 πkn
1 2 πn − j
∴ ck =
3
∑ 4 sin
3
e 3 ; for k = 0, 1, 2
n=0
MN∑ 3 H
=
3 n=0
3 3 K PQ
4 L
=
3 N
Msin0 bcos0 − jsin0g + sin 23π FGH cos 23πk − j sin 23πk IJK + sin 43π FGH cos 43πk − j sin 43πk IJK OPQ
4 L
∴ ck =
3 N
M0.866FGH cos 23πk − j sin 23πk IJK − 0.866 FGH cos 43πk − j sin 43πk IJK OPQ
When, k = 0,
4
ck = c 0 =
3
b
0.866 cos0 − j sin 0 − 0.866 cos0 − j sin 0 g b g
4
=
3
0.866 (1 − j0) − 0.866 1 − j 0 = 0 b g
When, k = 1,
ck = c1 =
4 LM0.866 FG cos 2π − j sin 2π IJ − 0.866 FG cos 4π − j sin 4π IJ OP
3 N H 3 3 K H 3 3 KQ
4
= 0.866( −0.5 − j0.866) − 0.866 ( −0.5 + j0.866)
3
E4. 4 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
π
4 4 π −j
∴ c1 =
3
b
0.866 −0.5 − j0.866 + 0.5 − j0.866 = 0.866 × ( − j1.732) = −2 j = 2 ∠ − = 2e 2
3 2
g
When, k = 2,
ck = c 2 =
4 LM0.866 FG cos 4π − j sin 4π IJ − 0.866 FG cos 8π − j sin 8π IJ OP = 4 0.866(−0.5 + j0.866) − 0.866 (−0.5 − j0.866)
3 N H 3 3 K H 3 3 KQ 3
π
4 4 π j
=
3
b
0.866 −0.5 + j0.866 + 0.5 + j0.866 = 0.866 × ( j1732
3
. ) = j2 = 2 ∠ = 2e 2
2
g
The Fourier series representation of x(n) is,
N −1 j2 πkn 2 j2 πkn 2
x(n) = ∑c
k =0
k e N = ∑c
k =0
k e 3 = ∑c
k =0
k e jω 0kn
−j
π
j
π 2π
ω0 =
= c0 + c1 e jω 0n + c 2 e j2ω 0n = 2 e 2 e jω 0n + 2 e 2 e jω 0n 3
πn πn
e) x(n) = cos + sin
3 5
Solution
Test for periodicity
Compare sine and cosine terms with standard form.
πn πn
Let, cos 2πf1 n = cos Let, sin 2πf2 n = sin
3 5
1 1 1 1 1 1
2 f1 = ⇒ f1 = ; N1 = =6 2 f2 = ⇒ f2 = ; N2 = = 10
3 6 f1 5 10 f2
Here, fundamental period is LCM (Least Common Multiple) of N1 and N2. The LCM of 6 and 10 is 30.
2 m= −∞
H 5 K 2 H 5 K m= −∞
+∞
L F 2π − 2πmIJ + δFG ω + 2π − 2πmIJ OP
= 3π ∑ MδG ω −
∞
{ } ∑ 2πδ bω − ω
F e jω 0n = 0 g
− 2πm
NH 5 K H 5
m =−∞
KQ m= −∞
b) x(n) = l−3, 4, − 1, 2q
A
Solution
By definition,
∞ 3
X(e jω ) = ∑ x(n) e− jωn = ∑ x(n) e− jωn
n = −∞ n= 0
− jω
= x(0)e + x(1) e 0
+ x(2) e − j2ω + x(3) e − j3ω = − 3 × 1 + 4 × e − jω − 1 × e − j2ω + 2 e − j3ω
= − 3 + 4 e − jω − e− j2ω + 2 e − j3ω
c) x(n) =
|RS( −1) ; 0 ≤ n ≤ 7
n
T| 0 ; otherwise,
Solution
By definition,
+∞ 7 7
X(e jω ) = ∑ x(n) e − jωn
= ∑ (−1) n
e − jωn = ∑ (− e − jω n
)
n = −∞ n= 0 n= 0
1 − ( −e − jω )8 1 − (−1)8 (e − jω )8 1 − e − j8ω
= − jω
= − jω
=
1 − (− e ) 1 − ( −e ) 1 + e − jω
− j8 ω − j8 ω j8 ω − j8 ω − j8 ω − j8 ω
1− e 2 ×e 2 e 2 ×e 2 −e 2 ×e 2
= − jω − jω
= jω − jω − jω − jω
1+ e 2 ×e 2 e2 ×e 2 +e 2 ×e 2
− j8 ω F I
jω
X(e ) =
e 2 e j4 ω − e − j 4 ω
=
− j8 ω
e 2 ×
jω
e2
GG 2 jsin 4ω JJ = e − j7 ω
2 j
sin 4ω
− jω jω
e 2 [e 2
− jω
e 2
GG 2 cos FGH ω IJK JJ cos
FG IJ
ω
H K
+ ]
H 2 K 2
− j7 ω jπ
sin 4ω sin 4ω jG
F π −7ω JI
=e 2 e2 = e
H 2 K
cos
ω FG IJ
cos
ω FG IJ
2 H K 2 H K
LMF 1 I − F 1 I OP u(n)
n n
d) x(n) = 0.5
MNGH 0.4 JK GH 0.8 JK PQ
Solution
Given that,
LMF 1 I − F 1 I OP u(n) n n
x(n) = 0.5
MNGH 0.4 JK GH 0.8 JK PQ
F 1 IJ − b0.5g FG 1 IJ ;
= 0.5 G
n n
for n ≥ 0
H 0.4 K H 0.8 K
E4. 6 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
By definition,
d i
X e jω = F x(n) = − 0.5
H 0.8 K PQ
− jωn
H 0.4 K = 0.5 ∑H 0.8 K
− jωn − jωn
LM FG1− 1 e IJ − FG1− 1 e IJ OP − jω − jω
= 0.5
1
− 0.5
1
= 0.5 M
H 0.8 K H 0.4 K P
1−
1 − jω
e 1−
1
e MM FG1− 1 e IJ FG1− 1 e IJ PP
− jω − jω − jω
0.4 0.8 N H 0.4 K H 0.8 K Q
LM OP
PP = 0.5 LMN1− 3.75 e1.25+e 3125 OP
− jω − jω
1. 25 e
= 0.5 M
MMN1− 01.8 e − jω
−
1
0.4
e +− jω 1
0.32
e
PQ
− j 2ω . e Q − jω − j2 ω
0.625e − jω
=
1 − 3.75 e − jω + 3.125 e − j2ω
E4.3. Determine the convolution of the following sequences using Fourier transform.
l
a) x1 (n) = 2, − 2, 2 , q l
x2 (n) = −2, 2, − 2 q
A A
Solution
1
X1(e jω ) = ∑ x1(n) e − jωn = x1(−1) e jω + x1(0)e 0 + x1(1)e − jω = 2 e jω − 2 + 2 e − jω
Using convolution property
n= −1
1 of Fourier transform.
X 2 (e jω ) = ∑ x 2 (n) e − jωn = x 2 ( −1) e jω + x 2 (0)e0 + x 2 (1)e − jω = −2 e jω + 2 − 2 e − jω
n= −1
d i = F lx (n) ∗ x (n)q = X (e
X e jω 1 2 1
jω
d
) X 2 (e jω ) = 2 e jω − 2 + 2 e − jω i d−2 e jω
+ 2 − 2 e − jω i
= − 4e j 2ω + 4 e jω − 4 + 4 e jω − 4 + 4 e − jω − 4 + 4 e − jω − 4 e − j 2ω = −4 e j 2ω + 8 e jω − 12 − 8 e − jω − 4e − j2ω .....(1)
2
X1(e jω ) = ∑ x (n) e
n=0
1
− jωn
= x1(0)e0 + x1(1)e − jω + x1(2)e − j2ω = −2 × e0 + −1 × e − jω + 0 = −2 − e − jω d i
2
X 2 (e jω ) = ∑ x (n) e
n=0
2
− jωn
d i d i d
= x 2 (0)e0 + x 2 (1)e − jω + x 2 (2)e − j2ω = −3 × e0 + 5 × e − jω + −7 × e − j 2ω = −3 + 5 e − jω − 7 e − j 2ω i
l q
X(e jω ) = F x1(n) ∗ x 2 (n) = X1(e jω ) X 2 (e jω ) = −2 − e − jω d i d −3 + 5 e − jω
− 7 e − j 2ω i
= 6 − 10 e − jω + 14 e − j 2ω + 3 e − jω − 5 e − j 2ω + 7 e − j 3ω = 6 − 7 e − jω + 9 e − j 2ω + 7 e − j 3ω .....(1)
n = −∞
− jωn
= .....x(0)e + x(1)e 0 − jω
+ x(2)e − j 2ω
+ x(3)e − j 3ω
+...... .....(2)
a) X(e jω ) = 2jω
Solution u = ω
du = dω
LM ω × e OP π
z z z
π π jωn
1 j2 j e jωn dv = e jωn dω
x(n) = 2 j ω × e jωn × dω = ω × e jωn × dω = − dω
2π −π
2π −π
π N jn jn Q −π
e jωn
v =
=
j LM ω e − e OP = j LM ω e + e OP
jωn jωn π jωn jωn π
jn
j
π N jn j n Q π N jn
LM π e + e − (−π) e − e OP
jπn
2 2
jπn
−π
n Q
− jπn − jπn
2
−π
z udv = uv − vdu z
=
π N jn n jn 2
n Q 2
j
LM π de − e i OP jπn − jπn
=
π MN jn d e +e i+
jπn
n
− jπn
PQ 2
=
j LM π b2 cos πng + 2jbsin πng OP = j LM π b2 cos πngOP = 2 cos πn for n = integer,
π N jn n Q π N jn Q n
2 sin πn = 0
1
b) X(e jω ) = 2
, a <1
e1 − a e j − jω
Solution
By convolution property,
1
Now, X1 e jω d i =
1 − a e − jω
= 1+ a e − jω + a 2 e − j2ω + a 3 e − j3ω +.....
∞ ∞
= ∑a n
e − jωn = ∑ a u(n) e n − jωn
⇒ x1(n) = anu(n)
n= 0 n = −∞
Here, d i = X de i
X e jω 1
jω
X 2 e jωd i
∞ n n n
∴ x(n) = x1(n) ∗ x 2 (n) = ∑ x (k) 1 x 2 (n − k ) = ∑ a u(k) a k n−k
u(n − k ) = ∑a k
an a − k = a n ∑a k −k
k= −∞ k=0 k =0 k=0
n
= an ∑ 1= a n
(n + 1) ; n ≥ 0
k=0
x(n) = (n + 1)anu(n)
1 − jω
e
1+
jω
c) Y(e ) = 7
1
1 − e − jω
7
Solution
F I
Ye e j
jω
=
1 1 − jω
+ e
1 − jω 7
1
1 − jω
GG JJ o
F an u(n) =t 1− a1e − jω
1− e 1− e GH JK
7 7 if F lx(n)q = Xee j jω
d i = F 1A I
H e jω +
FG1− 1 e IJ
B
GH1− 6 e JK − jω
H 5 K
− jω
FG
A = 1−
1 − jω
e ×
IJ 1
=
1
=
1
=
1
= −5
H 6 K FG1− 1 e IJ FG1− 1 e IJ
− jω − jω 1
1− × 6 1−
6
−
1
H 6 KH 5 K e − jω = 6
5 5 5
FG
B = 1−
1 − jω
e ×
IJ 1
=
1
=
1 1
= =6
H 5 K FG1− 1 e IJ FG1− 1 e IJ
− jω − jω 1
1− × 5 1−
5 1
H 6 KH 5 K e − jω = 5
6 6 6
LM OP LM OP
−5 6 1
∴ He e j jω
=
1 − jω
+
1 − jω
=6
1 − jω MM PP − 5 MM 11 − jω
PP
1− e 1− e 1− e
6 5 5 MN PQ MN1− 6 e PQ
On taking Inverse Fourier transform,
h(n) = 6
FG 1IJ u(n) − 5 FG 1IJ u(n) = LM6 FG 1IJ
n n n
−5
FG 1IJ OP u(n)
n
H 5K H 6K MN H 5 K H 6 K PQ
5 1
E4.5. a) A causal discrete time system is described by the equation, y(n) − y(n − 1) − y(n − 2) = x(n), where x(n)
14 14
and y(n) are input and output of the system. Find the impulse response h(n), frequency response H(e jw ), magnitude
function and phase function of the system.
Solution
5 1
Given, y(n) − y(n − 1) − y(n − 2) = x(n)
14 14 5 − jω 1 − j2 ω
Let, 1 − e − e =0
On taking Fourier transform of above equation we get, 14 14
Y(e jω ) −
5 − jω
Y(e jω ) −
1 − j2ω
Y(e jω ) = X(e jω )
FG
∴ e − j2 ω e j2 ω −
5 jω
e −
1
=0
IJ
14
e
14
e H 14 14 K
⇒
LM1− 5 e − jω
−
1 − j2 ω
e
OP
Y(e jω ) = X(e jω )
Let, e jω = x
N 14 14 Q ∴ x2 −
5
x−
1
=0
jω
Y(e ) 1 14 14
∴ Frequency response, H(e jω ) = =
X(e jω ) 1 − 5 e − jω − 1 e− j2ω The roots of quadratic
14 14
5 1
1 x2 − x− = 0 are,
= 14 14
1 FG 1
1 − e − jω 1 + e− jω
IJ FG IJ
2 H 7 KH K 5
±
FG 5 IJ 2
+
4
Using partial fraction, x=
14 H 14 K 14
2
jω A B
H (e ) =
FG 1 − jω IJ +
FG 1 − jω IJ =
FG
1 5
±
9 1
= , −
1 IJ
H 1− e
2 K H 1+ e
7 K H
2 14 14 2 7 K
A = 1−
FG 1 − jω
e
IJ 1
=
1
=
1
=
1 7
=
H 2 K FG1− 1 e IJ FG1+ 1 e IJ − jω − jω 1
1+ × 2 1+
2 9 9
H 2 KH 7 K e − jω = 2
7 7 7
B = 1+
FG 1 − jω
e
IJ 1
=
1
=
1
=
1 2
=
H 7 K FG1− 1 e IJ FG1+ 1 e IJ − jω − jω 1
1 − × −7 1+
7 9 9
H 2 KH 7 K e − jω = −7
2 2 2
7 2
9
jω 9 7 1 2 1
∴ H(e ) = + = +
1
1 − e − jω
FG IJ FG 1
1 + e − jω
IJ 9 1 − jω 9
1− e
1
1− − e − jω
FG IJ
2 H K H 7 K 2 7 H K
Solution for Exercise Problems E4. 9
o
Im pulse response, h(n) = F −1 H(e jω ) =
L
t MM 79 FGH 21IJK
n
+
2 −1FG IJ OP u(n)
n
N 9 7 H K PQ
Magnitude and phase function :-
1
H(e jω ) =
5 jω 1 − j2 ω
1− e − e
14 14
The magnitude function is,
1
LM OP 2
)= M
MM FG1− 5 e − 1 e IJ × FG1− 5 e − 1 e IJ PPP
1 1
H(e jω
− jω − j2 ω jω j2 ω
N H 14 14 K H 14 14 K Q
1
LM OP 2
= M PP
1
MM1− 5 e − 1 e − 5 e + 5 + 5 e − 1 e
jω j2ω − jω
2
jω − j2 ω
+
5 − jω 1
e + 2 PQ cos θ =
e jθ + e − jθ
N 14 14 14 14 14 14 2 2
14 2 14 2
1
=
F1+ 5 + 1 I + FG − 5 + 5 IJ ee + e j − 1 ee
2
j
GH 14 14 JK H 14 14 K
2 2
142
jω − jω j2ω
+ e − j2ω
= M
L 1 OP 2
.....(1)
N 113
. − 0.664 cos ω − 0.14 cos 2ω Q
The phase function is,
Hi (e jω )
∠H(e jω ) = tan−1
Hr (e jω )
FG1− 5 e jω
−
1 j2 ω
e
IJ 5
b 1
g b g
Let, H(e ) =jω 1
×
H 14 14 K =
1−
14
cos ω + j sin ω −
14
cos 2ω + j sin 2ω
FG 1−
5 − jω
e −
1 − j2 ω
e
IJ FG1− 5 e jω
−
1 j2 ω
e
IJ . − 0.664 cos ω − 0.14 cos 2 ω
113
H 14 14 K H 14 14 K
5 1 −j
5 sinω sin 2ω
+
FG IJ
= 14
1−
cos ω −
14
cos 2 ω
+
14 14 H K
113 . cos 2 ω
. − 0.664 cos ω − 014 . − 0.664 cos ω − 0.14 cos2 ω
113 Using equation (1)
d i
∴ ∠H e jω = tan−1
jω
Hi (e )
= tan−1
LM
−5 sinω − sin2ω OP
jω
Hr (e ) N
14 − 5 cos ω − cos 2ω Q
b) Consider an LTI system described by,
1 1
y(n) − y(n − 1) = x(n) + x(n − 1)
5 5
i) Determine the frequency response H(e jw ) of the system.
ii) Find the impulse response h(n) of the system.
π
iii) Determine its response y(n) for the input, x(n) = cos n
2
Solution
i) Frequency response
1 1
Given that, y(n) − y(n − 1) = x(n) + x(n − 1)
5 5
Y(e jω ) −
1 − jω 1
e Y(e jω ) = X(e jω ) + e − jω X(e jω ) ⇒ Y(e jω ) 1 −
LM 1 − jω
e
OP = X(e ) LM1+ 1 e OP
jω − jω
5 5 N 5 Q N 5 Q
1
1 + e − jω
Y(e jω ) 5 jω
∴ Frequency response, H(e ) = =
X(e jω ) 1 − 1 e − jω
5
E4. 10 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
ii) Impulse response
1 − jω LM OP F I
Let, H(e ) =jω 5
e 1+
=
1 1
+ e − jω
1
MM PP GG JJ
1 − jω 1 − jω 1 − jω
1− e
5
1− e
5
5 1− e
5 MN PQ GH JK
By taking inverse Fourier transform we get,
π
Given that, x(n) = cos n
2
l q RST
∴ X(e jω ) = F x(n) = F cos
π
n =π
+∞
UV ∑ LM FG
π π
δ ω − − 2 πm + δ ω + − 2 πm
IJ FG IJ OP
2 m = −∞W NH
2 2 K H KQ
We know that,
Y(e jω )
H(e jω ) = ⇒ Y(e jω ) = H(e jω ) X(e jω )
X(e jω )
1 − jω
jω jω
∴ Y(e ) = H(e ) X(e ) = 5
e
π
+∞
jω π
1+
π
δ ω − − 2πm + δ ω + − 2πm ∑
LM FG IJ FG IJ OP
1 − jω m= −∞
1− e
5
2 2 NH K H KQ
d i Lδ FG ω − π − 2πmIJ + δ FG ω + π − 2πmIJ O
π 5 + e − jω +∞
=
d5 − e i ∑ MN H 2
− jω
m = −∞
K H 2 K PQ
The response, y(n) is obtained by taking inverse Fourier transform of Y(ejw ).
z
π
1
Re sponse, y(n) = F −1 Y(e jω ) = n s 2π
Y(e jω ) e jωn dω
In the interval ω = −
π
to +
π
−π 2 2
d
π 5 + e − jω i
LMδ FG ω − π − 2πmIJ + δ FG ω + π − 2πmIJ OP e
z
π +∞ there are only two impluses
1
=
2π 5−e NH 2 − jω
K H 2∑ KQ
jωn
dω
π π
m= −∞
−π at ω = − and ω = +
2 2
LMδ FG ω − π IJ + δ FG ω + π IJ OP e dω
z
π − jω
1 5+e jωn
=
2 −π
5−e N H 2K H 2KQ
− jω
zd 5 + e − jω e jωn i FG IJ d
5 + e − jω e jωn
z i FG IJ
π π
1 π 1 π
= δ ω− dω + δ ω+ dω
2 −π
5−e − jω
H 2 K 2 −π 5 − e − jω 2 H K
The impulse δ ω −
FG
π
is
IJ
=
1 5+e d
− jω
e jωn i +
1 d5 + e ie − jω jωn
2H K
2 5−e − jω
2 5 − e − jω π
ω=−
π
ω=
π nonzero only at ω = −
2 2 2
F5 + e Ie π nπ
F5 + e Ie π nπ
The impulse δ ω +
FG
π
is
IJ
GH JK
j
2
−j
2
GH JK
−j
2
j
2
2H K
1 1 π
= π
+ π nonzero only at ω =
2 j
2
2 −j
2
2
5−e 5−e
nπ nπ π
1 5 + j −j 2 1 5− j j 2 j π π
= e + e e 2 = cos + j sin = 0 + j
2 5−j 2 5+ j 2 2
π
π π −j
2 π π
1 5.099 ∠0.197 − jn 1 5.099 ∠ − 0.197 jn 2 e = cos − j sin = 0 − j
= e 2 + e 2 2
2 5.099 ∠ − 0.197 2 5.099 ∠0.197
π π
− jn jn
= 0.5 ∠0.394 e 2 + 0.5 ∠ − 0.394 e 2
π π 0.394 π
− jn
2
jn
2
0.394 = × π = 0125
. π=
= 0.5 ∠0.125π e + 0.5 ∠ − 0.125π e π 8
π π
− jn jn
= 0.5 e j0.125 π e 2 + 0.5 e − j0.125 π e 2
Solution for Exercise Problems E4. 11
π π π π
j − jn −j jn
∴ y(n) = 0.5 e8 e 2 + 0.5 e 8 e 2
−j
FG nπ − π IJ
H 2 8K j
FG nπ − π IJ L F nπ π I F nπ π I O
H 2 8 K = 0.5Me jGH 2 − 8 JK + e− jGH 2 − 8 JK P
= 0.5 e + 0.5 e
MN PQ
= 0.5 × 2 cos
FG nπ − π IJ = cos
FG nπ − π IJ
H 2 8K H 2 8K
E4.6. A discrete LTI system is described by a difference equation, y(n) = x(n) – x(n –1). Determine the frequency response
H(ejw ), impulse response h(n). Sketch the magnitude function and the phase function.
Solution
i) Frequency response
=
−j
e 2
ω
LM j
e2
ω
−
−j
e 2
ω
OP = −j
e 2
ω
2j sin
FG ω IJ
MN PQ H 2K
jπ
π ω
ω j −j j=e2
= 2 sin e 2 e 2
2
ω jHG
F π −ω IJ
2 K
= 2 sin e
2
ω j GH
F π −ω JI
2 K
Frequency response, H(e jω ) = 2 sin e
2
ω
Here,sin is negative for negative frequency.
2
π−ω
ω j
∴ When ω = − π to 0 ; H(e jω ) = − 2 sin e 2
2
π−ω
ω j 2 e − jπ = − 1
= e − jπ 2 sin e
2
F π + ω IJ
−jG
ω H 2 K
= 2 sin e
2
π −ω
ω j
When ω = 0 to + π ; H(e jω ) = 2 sin e 2
2
ω
∴ Magnitude function, H(e jω ) = 2 sin
2
The magnitude and phase of H(ejw ) are calculated for various values of w and listed in the following table. Using the tabulated values,
the magnitude and phase spectrum are sketched as shown in fig 1 and fig 2.
E4. 12 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
Table : Magnitude and phase of H(ejww ) for various values of w . |H (e jω)|
2
w |H(ejww )| Ð H(e jww ) 1 .8 4 8
1 .5
1 .4 1 4
4π
− 2 0 1 .0
4 0 .7 5
3π 0 .5
− 1.848 –0.125p
4
ω
2π −π π −π −π
π π π
− 1.414 –0.25p −3 0
3π
4 2 4 4 2 4
4
F ig 1 : M a g n itu de sp e ctru m .
π
− 0.765 –0.375p jω
4 ∠H (e )
0.5π
0 0 ± 0.5p
0.375π
π
0.765 0.375p
4 0.25π
2π 0.125π
1.414 0.25p 3π π
4 −π − 4 − 2 −π
4 0
ω
3π π π 3π
1.848 0.125p 4 2 4
4 −0.125π
4π
2 0 −0.25π
4
−0.375π
F ig 2 : P h a se sp ectrum . −0.5π
E4.7. Sketch the magnitude and phase function of the discrete time LTI system described by the equation,
y(n) = x(n) + x(n – 1).
Solution
Given that, y(n) = x(n) + x(n − 1)
On taking Fourier transform of above equation we get,
ω ω
Y(e jω ) = X(e jω ) + e− jω X(e − jω ) ⇒ e
Y(e jω ) = X(e jω ) 1+ e − jω j e
−j
2 e
j
2 =1
|H (e jω)|
jω
Y(e ) −j
ω
−j
ω LM j
ω
−j
ω OP −j
ω
ω −j
ω 2.0
H(e jω ) = = 1 + e − jω = 1 + e 2 e 2 = e2 + e 2 e 2 = 2cos e 2
X(e jω ) MN PQ 2 1.85
1.5
jω ω
\ Magnitude function, H(e ) = 2 cos 1.41
2
jω −ω 1.0
Phase function, ∠H(e ) =
2
The magnitude and phase of H(ejw ) are calculated for various values of w 0.77
and listed in the following table. Using the tabulated values, the magnitude and phase 0.5
spectrum are sketched as shown in fig 1 and fig 2.
ω
−π π π 0
w |H(ejww )| Ð H(e jww ) − 3π − − π π 3π π
4 2 4 4 2 4
4π F ig 1 : M a g n itu de spe ctru m .
− 0 0.5p
4
3π ∠H (e )
jω
− 0.77 0.375p
4 0.5π
2π 0.375π
− 1.41 0.25p
4
π 0.25π
− 1.85 0.125p
4
0.125π
0 2 0
π 0
ω
1.85 – 0.125p −π π −π π π
− π −
3 3π
4 2 4 4 2
4 4
2π −0.125π
1.41 – 0.25p
4
−0.25π
3π
0.77 – 0.375p
4 −0.375π
4π
0 – 0.5p F ig 2 : P h a se sp ectru m . −0.5 π
4
Solution for Exercise Problems E4. 13
E4.8. The impulse response of a system is,
1 1 1 1
h(n) = δ(n + 2) + δ(n + 1) + δ(n) + δ(n − 1)
0.2 0.4 0.3 0.4
i) Is the system BIBO stable?
ii) Is the system causal?
iii) Find the frequency response.
Solution
Given that,
1 1 1 1
h(n) = δ(n + 2) + δ(n + 1) + δ(n) + δ(n − 1)
0.2 0.4 0.3 0.4
We know, δ(n) = 1 ; when n = 0
= 0 ; when n ≠ 0
1 1 1 1
When, n = −3 ; h(−3) = δ( −1) + δ( −2) + δ(−3) + δ( −4) = 0 + 0 + 0 + 0 = 0
0.2 0.4 0.3 0.4
1 1 1 1 1 1
When, n = −2 ; h(−2) = δ(0) + δ( −1) + δ(−2) + δ(−3) = + 0 + 0 + 0 =
0. 2 0.4 0.3 0.4 0.2 0.2
1 1 1 1 1 1
When, n = −1 ; h(−1) = δ(1) + δ(0) + δ(−1) + δ(−2) = 0 + + 0 + 0 =
0.2 0.4 0.3 0.4 0.4 0.4
1 1 1 1 1 1
When, n = 0 ; h(0) = δ(2) + δ(1) + δ(0) + δ(−1) = 0 + 0 + + 0 =
0. 2 0.4 0.3 0.4 0. 3 0.3
1 1 1 1 1 1
When, n = 1 ; h(1) = δ(3) + δ(2) + δ(1) + δ(0) = 0 + 0 + 0 + =
0. 2 0.4 0.3 0.4 0.4 0.4
1 1 1 1
When, n = 2 ; h(2) = δ(4) + δ(3) + δ(2) + δ(1) = 0 + 0 + 0 + 0 = 0
0. 2 0.4 0.3 0.4
h(n) =
RS 1 , 1
,
1
,
1 UV
T 0.2 0.4 0.3 0.4 W
A
i) Check for stability
+∞
For stable system, ∑ h(n) < ∞
n= −∞
+∞
1 1 1 1
= + + + = 13.33 = Constant
0.2 0.4 0.3 0.4
Hence the system is stable.
ii) Causality
For any value of ‘n’, the impulse response h(n) depends on future input d(n + 2) and d(n+1).
Hence the system is noncausal.
iii) Frequency response, H(ejww )
+∞
H(e jω ) = ∑ h(n) e − jωn
n=−∞
1 j2ω 1 jω 1 1 − jω
= h( −2) e j2ω + h( −1) e jω + h(0) + h(1) e − jω = e + e + + e
0.2 0.4 0.3 0.4
0.6 e j2ω + 0.3 e jω + 0.4 + 0.3 e − jω
=
0.4 × 0.3
1
=
0.12
b g d i
0.6 cos 2ω + j sin 2ω + 0.3 e jω + e − jω + 0.4
1
= 0.6 cos 2ω + j0.6 sin 2ω + 0.6 cos ω + 0.4
0.12
1
=
0.12
b
0.4 + 0.6 cos ω + 0.6 cos 2ω + j0.6 sin 2ω g
E4. 14 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
E4.9. The impulse response of an LTI system is h(n) = {–2, –1, 1, –2}.
Find the response of the system for the input x(n) = {2, 2, 4, 1}, using convolution property of Fourier transform.
Solution
Response, y(n) = x(n) ∗ h(n)
On taking Fourier transform we get,
l q l
F y(n) = F x(n) ∗ h(n) q
jω jω jω
∴ Y(e ) = X(e ) H(e ) Using convolution porperty.
By definition of Fourier transform,
3
H(e jω ) = ∑ h(n) e
n=0
− jωn
= h(0) + h(1)e − jω + h(2) e − j2ω + h(3)e − j3ω = −2 − e − jω + e − j2ω − 2 e − j3ω
3
X(e jω ) = ∑ x(n) e
n=0
− jωn
= x(0) + x(1)e − jω + x(2)e − j2ω + x(3)e − j3ω = 2 + 2e − jω + 4 e − j2ω + e − j3ω
d
X(e jω ) H(e jω ) = 2 + 2e − jω + 4 e − j2ω + e − j3ω i d −2 − e − jω
+ e − j2ω − 2 e − j3ω i
= − 4 − 2 e − jω + 2 e − j2ω − 4 e − j3ω
− 4 e − jω − 2 e − j2ω + 2 e − j3ω − 4 e − j4ω
− 8 e − j2ω − 4 e − j3ω + 4 e − j4 ω − 8 e − j5ω
− 2 e − j3ω − e − j4ω + e − j5ω − 2 e − j6ω
1 − 0.6 z −1 1 z −1
H(z) = −1
= −1
− 0.6
1 − 0.2 z 1 − 0.2z 1 − 0.2z −1
Im pulse response, h(n) = Z −1 H(z) l q n
Z anu(n) =s 1− az1
−1
−1
R|S 1 − 0.6 z U|V −1
=Z
|T1− 0.2z 1 − 0.2z |W
−1 −1 if Z lx(n)q = X(z) then
by shifting property
= Z −1
RS 1 UV − 0.6 Z R|S z −1
−1 U|V
T1− 0.2z W −1
T|1− 0.2z −1
W| l q
Z x(n − 1) = z −1X(z)
− jω
1 − 0.6 e
∴ H(e jω ) =
1 − 0.2 e − jω
1
jω jω
H(e ) = H(e ) H (e ) ∗ j∗
1
2 =
LM1− 0.6 e − jω
×
1 − 0.6 e jω OP 2
N1− 0.2 e − jω
1 − 0.2 e jω Q
1 e jθ + e − jθ
LM1− 0.6 e jω − jω
+ 0.6 O 2
1
L1− 0.6de jω
+e − jω
i + 0.36 OP 2 cosθ =
2
=M
− 0.6 e 2
=
N1− 0.2 e jω
− 0.2 e − jω + 0.2 Q
P 2
MN1− 0.2de jω
+ e − jω i + 0.04 PQ
1.36 − 1. 2cosω
= .....(1)
1.04 − 0.4 cosω
=
b
1.12 − 0.2 cosω + j sinω − 0.6 cos ω − j sinω g b g
1.04 − 0.4 cosω e± jθ = cos θ ± j sin θ
. − 0.8 cos ω
112 j0.4 sin ω
= +
1.04 − 0.4 cos ω 1.04 − 0.4 cos ω
F H I = tan F 0.4 sinω I
∴ ∠H(e jω ) = tan−1 GH H JKi
r
GH 112 −1
J
. − 0.8 cos ω K
Chapter 5
5.1 Introduction
The Discrete Time Fourier Transform (DTFT) discussed in Chapter 4, provides a method to represent
a discrete time signal in frequency domain and to perform frequency analysis of discrete time signal.
The drawback in DTFT is that the frequency domain representation of a discrete time signal obtained
using DTFT will be a continuous function of w and so it cannot be processed by digital system. The discrete
Fourier transform (DFT) has been developed to convert a continuous function of w to a discrete function of
w, so that frequency analysis of discrete time signals can be performed on a digital system.
Basically, the DFT of a discrete time signal is obtained by sampling the DTFT of the signal at N uniform
frequency intervals and the number of samples (i.e., value of N) should be sufficient to avoid aliasing of
frequency spectrum. The samples of DTFT are represented as a function of integer k, and so the DFT is a
sequence consisting of N complex numbers represented as X(k) for k = 0,1,2,3,...... (N – 1).
Since X(k) is a sequence consisting of complex numbers, the magnitude and phase of each sample can
be computed and listed as magnitude sequence and phase sequence respectively. The graphical plots of
magnitude and phase as a function of k are also drawn.
The plot of magnitude versus k is called magnitude spectrum and the plot of phase versus k is called
phase spectrum. In general, these plots are called frequency spectrum.
The drawback in DFT is that the computation of each sample of DFT involves a large number of
calculations and when large number of samples are required, the number of calculations will further increase.
In order to overcome this drawback, a number of methods or algorithms have been developed to reduce the
number of calculations. The various methods developed to compute DFT with reduced number of calculations
are collectively called Fast Fourier Transform (FFT).
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 2
Since X(k) is a sequence consisting of N-complex numbers for k = 0, 1, 2, ...... N-1, the DFT of x(n) can
be expressed as a sequence as shown below.
l
X( k ) = X(0), X(1), X(2),................ X( N − 1) q
5. 3 Digital Signal Processing
5.2.3 Frequency Spectrum Using DFT
The X(k) is a discrete function of frequency of discrete time signal w, and so it is also called discrete
frequency spectrum (or signal spectrum) of the discrete time signal x(n).
The X(k) is a complex valued function of k and so it can be expressed in rectangular form as,
X(k) = Xr(k) + jXi(k)
where, Xr(k) = Real part of X(k)
Xi(k) = Imaginary part of X(k)
Now the Magnitude function (or Magnitude spectrum) |X(k)| is defined as,
|X(k)|2 = X(k) X*(k) or X(k) = X(k) X* (k)
where X*(k) is complex conjugate of X(k)
2
Alternatively, X(k) = X(k) X* (k) = Xr ( k ) + jXi ( k ) X r ( k ) − jXi ( k )
= X2r ( k ) + Xi2 ( k )
N X (k) Q
r
Since X(k) is a sequence consisting of N-complex numbers for k = 0, 1, 2, ......... N-1, the magnitude and
phase spectrum of X(k) can be expressed as a sequence as shown below.
Magnitude sequence, X(k) = X(0) , n X(1) , X(2) ,................ s
X(N − 1)
l
Phase sequence, ∠X(k) = ∠X(0), ∠X(1), ∠X(2),................ ∠X(N −1)q
The magnitude and phase sequence can be sketched graphically as a function of k.
The plot of samples of magnitude sequence versus k is called magnitude spectrum and the plot of
samples of phase sequence versus k is called phase spectrum. In general, these plots are called frequency
spectrum.
5.2.4 Inverse DFT
Let, x(n) = Discrete time signal
X(k) = N-point DFT of x(n)
The inverse DFT of the sequence X(k) of length N is defined as,
N −1 j2 πkn
1
x(n) =
N ∑
k=0
X(k) e N ; for n = 0, 1, ....., N − 1 .....(5.3)
N −1 − j2 πkn
X 2(k) = DFT {x 2(n)} = ∑ x 2(n) e N .....(5.5)
n=0
N −1 − j2πkn
DFT {a1 x1(n) + a2 x 2(n)} = ∑ a1 x1(n) + a2 x 2 (n) e N
n=0
N −1 − j2 πkn N −1 − j2 πkn
= a1 ∑ x1(n)e N + a2 ∑ x (n) e
2
N
n=0 n=0
2. Periodicity
If a sequence x(n) is periodic with periodicity of N samples then N-point DFT, X(k) is also periodic with
a periodicity of N samples.
Hence, if x(n) and X(k) are N point DFT pair then,
x(n + N) = x(n) ; for all n
X( k + N) = X(k) ; for all k
Proof :
n=0 n=0
N−1 − j2πn k N−1 − j2 πn k
= ∑ x(n) e N e− j2πn = ∑ x(n) e N for integer n, e− j2πn = 1
n=0 n=0
= X(k ) Using definition of DFT.
5. 5 Digital Signal Processing
3. Circular time shift
The circular time shift property of DFT says that if a discrete time signal is circularly shifted in time
− j2 πkm
by m units then its DFT is multiplied by e N .
2 π km
−j
l q l
i. e., if , DFT x(n) = X(k), then DFT x(( n − m)) N = X(k) e q N
Proof :
m
DFT x((n − m))N r= n=0
∑ x((n − m))N e N = ∑
p=0
x(p) e N
Let, p = n m, \ n = p + m
N−1 − j2πkp − j2 πkm
= ∑ x(p) e N e N
p=0
LM
N−1 − j2πkp OP e − j2 πkm
MN ∑
= x(p) e N N
p=0 PQ
− j2πkm
= X( k) e N Using definition of DFT.
4. Time reversal
The time reversal property of DFT says that reversing the N-point sequence in time is equivalent to
reversing the DFT sequence.
i.e., if, DFT{x(n)} = X(k), then DFT{x (N-n)} = X(N-k).
Proof :
5. Conjugation
Let x(n) be a complex N-point discrete sequence and x*(n) be its conjugate sequence.
Now if, DFT{x(n)} = X(k), then DFT{x*(n)} = X*(N–k).
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 6
Proof :
N−1 − j2 πkn LM x(n) e OP
N−1 j2 πkn
∗
o
DFT x∗(n) t = ∑
n=0
x∗( n) e N =
n=0MN ∑ PQ
N
LM x(n) e
N−1 j2 πkn OP = LM x(n) e
∗
N−1 j2 πkn − j 2 πnN OP ∗
MN ∑ e− j2π n
PQ MN ∑
= N N e N ej2pn = 1
n=0 n=0 PQ
L N−1
= M ∑ x( n) e
− j2πn( N − k )
N
∗
OP = X(N − k) = X∗(N − k)
∗
Using definition of DFT.
MN n=0 PQ
6. Circular frequency shift
The circular frequency shift property of DFT says that if a discrete time signal is multiplied by
j2 πmn
e N its DFT is circularly shifted by m units.
R| j2 π m n U|
l q
i.e., if, DFT x(n) = X(k) then DFT x(n) e S| N
V| = X((k − m)) N
T W
Proof :
R| j2 πmn U| = x(n) e
N−1 j2πmn − j2πkn
S|
DFT x( n) e N
V| ∑ N e N
T W n=0
N−1 − j2 π( k − m) n
= ∑ x( n) e N
n=0
7. Multiplication
The multiplication property of DFT says that the DFT of product of two discrete time sequences is
equivalent to circular convolution of the DFTs of the individual sequences scaled by a factor 1/N.
1
i.e., if, DFT {x(n)} = X(k), then DFT x1 (n) x2 (n) = m r X (k) * X2 (k)
N 1
Proof :
1
N−1 j2 πkn
1
N −1 j2 πmn Let, k = m
By definition of inverse DFT, x1(n) =
N
∑ X1(k) e N =
N
∑ X1(m) e N .....(5.6)
k=0 m=0
By definition of DFT,
N −1 − j2 πkn N−1L1 N−1 j2 πmn OP − j2 πkn
DFT {x1(n) x 2 (n)} = ∑ x1(n) x2 (n) e N = ∑ MM N ∑ X1(m) e N
PQ x (n) Using
e 2
N
1
= X1(k) ∗ X 2(k)
N Using definition of circular convolution.
5. 7 Digital Signal Processing
8. Circular convolution
The circular convolution of two N-point sequences x1(n) and x2(n) is defined as,
N −1
x1 ( n) ∗ x 2 ( n) = ∑ x1 ( m) x 2 (( n − m)) N Refer equation (2.57) of Chapter 2.
m= 0
The convolution property of DFT says that, the DFT of circular convolution of two sequences is
equivalent to product of their individual DFTs.
Let, DFT{x1(n)} = X1(k) and DFT{x2(n)} = X2(k), then by convolution property,
DFT{x1(n) * x2(n)} = X1(k) X2(k)
Proof :
Consider the product X1(k) X 2(k). The inverse DFT of the product is given by,
N−1 j2πnk
1
DFT −1{X1(k) X 2(k)} =
N
∑ X1(k) X 2 (k) e N
k=0
j2 πk(n − m − p)
1 N−1 N−1 N−1
=
Nm=0
∑
x1(m) x 2(p) ∑ ∑ e N .....(5.9)
p=0 k=0
N-1 j2 πk(n − m − p)
Consider the summation ∑ e N in equation (5.9).
k=0
Let, n − m − p = qN, where q is an integer. Since q is an
integer, e j2p q =1.
N−1 j2 πk(n − m − p) N−1 j2 πkqN N−1 N−1
k
∴ ∑
k=0
e N = ∑
k=0
e N = ∑
k=0
ee j = ∑ 1
j2πq
k=0
k
=N .....(5.10)
N-1
Consider the summation ∑
p=0
x 2 (p) in equation (5.9).
Since, n − m − p = qN, p = n − m − qN
N−1 N−1 N−1 N−1
∴ ∑ x (p)
p=0
2 = ∑ x (n − m − qN) = ∑ x (n − m, mod N) = ∑ x ((n − m))
m=0
2
m=0
2
m=0
2 N .....(5.11)
Using equations (5.10) and (5.11), the equation (5.9) can be written as shown below.
N−1 N−1 N−1
1
DFT −1{X1(k) X 2 (k)} =
N m=0
∑ x (m) ∑ x ((n − m))
1
m=0
2 N N= ∑ x (m) x ((n − m))
m=0
1 2 N
= x1(n) ∗ x 2 (n)
Using definition of circular convolution.
∴ X1(k) X 2 (k) = DFT { x1(n) ∗ x 2(n)}
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 8
9. Circular correlation
The circular correlation of two sequences x(n) and y(n) is defined as,
N−1
rxy (m) = ∑ x(n) y∗ ((n − m)) N Refer equation (2.70) of Chapter 2.
n=0
Let, DFT{x (n)} = X(k) and DFT{y (n)} = Y(k), then by correlation property,
Consider the product X(k)Y * (k). The inverse DFT of the product is given by,
1 N−1 j2πnk
1 N−1 j2 πmk Let, n = m
DFT −1 {X(k) Y * (k)} = ∑ X(k) Y * (k) e N = ∑ X(k) Y * (k) e N
N k=0 N k=0
N-1 j2πk(m − n + p)
Consider the summation ∑ e N in equation (5.14).
k=0
N-1
Consider the summation ∑
p=0
y∗(p) in equation (5.14).
.....(5.16)
Since, m − n + p = qN, p = n − m + qN
N−1 N−1 N−1 N−1
∴ ∑ y* (p) = ∑ y*(n − m + qN) = ∑ y* (n − m, mod N) = ∑ y* ((n − m))
p=0 n=0 n=0 n=0
N
Using equations (5.15) and (5.16), the equation (5.14) can be written as shown below.
N−1 N−1
1
DFT −1 {X(k) Y * (k)} = ∑ x(n) ∑ y* ((n − m)) N N
N n=0 n=0
N−1
= ∑ x(n) y* ((n − m))
n=0
N = rxy (m)
Proof :
Consider the right - hand side term of Parseval's relation. Using equation (5.17).
1 N−1
1 N−1 L N−1 OP * − j2 πnk
n= 0 j2 πk
N
Let us evaluate X(z) at N equally spaced points on unit circle, i.e., at z = e
j2πk j2π k
N N 2πk
Note : Since, e = 1 and ∠e = ,
N
j2π k
the term, z = e N , for k = 0,1,2,3.....N − 1
represents N equally spaced points on unit circle in z-plane.
N−1 N−1 − j2 πkn
∴ X( z) j2 πk
= ∑ x(n)z− n j2 πk = ∑ x(n) e N .....(5.19)
z=e N n=0 z=e N n=0
1
Multiplication x1(n) x2(n) X1 ( k ) ∗ X2 ( k )
N
N−1
Circular convolution x1 ( n) ∗ x2 ( n) = ∑ x1 ( m) x2 (( n − m)) N X1(k) X2(k)
m=0
N−1
Circular correlation rxy ( m) = ∑ x(n) y* ((n − m)) N X(k) Y*(k)
n=0
Symmetry of X ( k ) = X∗ ( N − k )
real signals x(n) is real
X r ( k ) = Xr ( N − k )
Xi ( k ) = − Xi ( N − k )
| X( k )| = | X( N − k )|
∠X ( k ) = − ∠X ( N − k )
The DFT supports only circular convolution and so, the linear convolution of equation (5.22) has to
be computed via circular convolution. If x(n) is N1-point sequence and h(n) is N2-point sequence then linear
convolution x(n) and h(n) will generate y(n) of size N1 + N2 - 1. Therefore in order to perform linear convolution
via circular convolution the x(n) and h(n) should be converted to N1 + N2 - 1 point sequences by appending
zeros. Now the circular convolution of N1 + N2 - 1 point sequences x(n) and h(n) will give same result as that
of linear convolution.
Let, x(n) be N1-point sequence and h(n) be N2-point sequence.
Let us convert x(n) and h(n) to N1+N2-1 point sequences.
Let, Y(k) = N1 + N2 - 1 point DFT of y(n)
X(k) = N1 + N2 - 1 point DFT of x(n)
H(k) = N1 + N2 - 1 point DFT of h(n)
Now by circular convolution theorem of DFT,
DFT{x(n) * h(n)} = X(k) H(k)
On taking inverse DFT of the above equation we get,
x(n) * h(n) = DFT –1{X(k) H(k)}
Since, x(n) * h(n) = y(n), the above equation can be written as,
y(n) = DFT –1{X(k) H(k)} .....(5.23)
From the equation (5.23), we can say that the output y(n) is given by the inverse DFT of the product
of X(k) and H(k). Hence to determine the response of an LTI discrete time system, first find
N1 + N2 - 1 point DFT of input x(n) to get X(k) and N1 + N2 - 1 point DFT of impulse response h(n) to get H(k),
then take inverse DFT of the product X(k) H(k).
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 12
Example 5.1
Compute 4-point DFT and 8-point DFT of causal three sample sequence given by,
1
x(n) = ; 0 ≤ n ≤ 2
3
= 0 ; else
Show that DFT coefficients are samples of Fourier transform of x(n), (Refer example 4.6 of Chapter 4 for
Fourier transform).
Solution
By the definition of N-point DFT, the kth complex coefficient of X(k), for 0 £ k £ N 1, is given by,
N − 1 − j2πkn
X(k) = ∑ x(n) e N
n =0
a) 4-point DFT (\
\ N = 4)
4 −1 − j2πkn 2 − jπkn − jπk
X(k) = ∑ x(n) e 4 = ∑ x(n) e 2 = x(0) e0 + x(1) e 2 + x(2) e − jπk e±j q = cosq ± jsinq
n=0 n =0
− jπk
=
1 1
+ e 2 +
1 − jπk 1
e = 1+ cos
πk LM
− j sin
πk
+ cos πk jsin πk
OP
3 3 3 3 2 N 2 Q
For 4-point DFT, X(k) has to be evaluated for k = 0, 1, 2, 3.
1
When k = 0 ; X(0) = [1 + cos 0 − j sin 0 + cos 0 − j sin 0]
3
1
= (1 + 1 − j0 + 1 − j0) = 1 = 1∠0
3
When k = 1 ; X(1) =
1 LM
1 + cos
π
− j sin
π
+ cos π − j sin π
OP
3 N 2 2 Q
1 1 1
=
(1 + 0 − j − 1 − j0) = − j = ∠ − π / 2 = 0.333∠ − 0.5π
3 3 3
1
When k = 2 ; X(2) = 1 + cos π − j sin π + cos 2π − j sin 2π
3
1 1
= (1 − 1 − j0 + 1 − j0) = = 0.333∠0
3 3
When k = 3 ; X(3) =
1 LM
1 + cos
3π
− j sin
3π
+ cos 3π − j sin 3π
OP
3 N 2 2 Q
1 1 1
= (1 + 0 + j − 1 − j0) = j = ∠π / 2 = 0.333∠0.5π
3 3 3
\ The 4-point DFT sequence X(k) is given by,
When k = 1 ; X(1) =
1 LM
1 + cos
π
− j sin
π
+ cos
π
− j sin
π OP
3 N 4 4 2 2 Q
= 0.333 (1 + 0.707 − j0.707 + 0 − j1)
= 0.568 − j0.568 = 0.803∠ − 0.785 = 0.803∠ − 0.25π
0.785
1 LM 2π 2π 2π 2π OP × π = 0.25π
When k = 2 ; X(2) = 1 + cos − j sin + cos − j sin π
3 N 4 4 2 2 Q
= 0.333 (1 + 0 − j1 − 1 − j0)
= − j0.333 = 0.333∠ − π / 2 = 0.333∠ − 0.5π
When k = 3 ; X(3) =
1 LM
1 + cos
3π
− j sin
3π
+ cos
3π
− j sin
3π OP
3 N 4 4 2 2 Q
= 0.333 (1 − 0.707 − j0.707 + 0 + j1)
= 0.098 + j0.098 = 0.139∠ 0.785 = 0.139∠0.25π
When k = 4 ; X(4) =
1 LM
1 + cos
4π
− j sin
4π
+ cos
4π
− j sin
4π OP
3 N 4 4 2 2 Q
= 0.333 (1 − 1 − j0 + 1 − j0) = 0.333 = 0.333∠0
When k = 5 ; X(5) =
1 LM
1 + cos
5π
− j sin
5π
+ cos
5π
− j sin
5π OP
3 N 4 4 2 2 Q
= 0.333 (1 − 0.707 + j0.707 + 0 − j1)
= 0.098 − j0.098 = 0.139∠ − 0.785 = 0.139∠ − 0.25π
When k = 6 ; X(6) =
1 LM
1 + cos
6π
− j sin
6π
+ cos
6π
− j sin
6π OP
3 N 4 4 2 2 Q
= 0.333 (1 + 0 + j1 − 1 − j0)
= j0.333 = 0.333∠π / 2 = 0.333∠0.5π
When k = 7 ; X(7) =
1 LM
1 + cos
7π
− j sin
7π
+ cos
7π
− j sin
7π OP
3 N 4 4 2 2 Q Phase angles
= 0.333 (1 + 0.707 + j0.707 + 0 + j1) are in radians.
= 0.568 + j0.568 = 0.803∠0.785 = 0.803∠0.25π
0.50 π
0.8
0.25 π
0.6
0
1 2 3 4 K
0.4
−0.25π
0.2 −0.50π
0 −0.75 π
1 2 3 4 K
F ig 4 : P h a se sp e ctru m o f X (k) fo r N = 4 .
F ig 1 : M a g n itu d e sp ectru m o f X (k ) for N = 4 .
X(k) ∠X ( k )
0.75 π
0.50 π
0.25 π
0
1 2 3 4 5 6 7 8 K
−0.25π
−0.50π
−0.75 π
F ig 5 : P h a se sp e c tru m o f X (k ) fo r N = 8 .
X(k) ∠X ( k )
0.75π
0.50π
0.25π
0
1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 K
−0.25π 9
−0.50π
−0.75 π
F ig 6 : P h a se sp ectrum o f X (k ) for N = 1 6 .
5. 15 Digital Signal Processing
Example 5.2
Compute the DFT of the sequence, x(n) = {0, 1, 2, 1}. Sketch the magnitude and phase spectrum.
Solution
The given signal x(n) is 4-point signal and so, let us compute 4-point DFT.
By the definition of DFT, the 4-point DFT is given by, e±j q = cosq ± jsinq
4 −1 − j2πkn 3 − jπkn
X(k) = ∑ x(n) e 4 = ∑ x(n) e 2
n = 0 n = 0
− jπk − j3πk − jπk − j3πk
= x(0) e0 + x(1) e 2 + x(2) e− jπk + x(3) e 2 = 0 + e 2 + 2 e− jπk + e 2
πk πk 3πk 3πk
= cos − jsin + 2(cos πk − j sin πk) + cos − j sin
2 2 2 2
=
FG cos πk
+ 2 cos πk + cos
3πk IJ FG
− j sin
πk
+ sin
3πk IJ sin πk = 0 for integer k
H 2 2 K H 2 2 K
When k = 0 ; X(0) = ( cos 0 + 2 cos 0 + cos 0) j (sin 0 + sin 0)
= (1 + 2 + 1) j (0 + 0) = 4 = 4Ð 0
When k = 1; X(1) =
FG cos π + 2 cosπ + cos
3π IJ FG
− j sin
π
+ sin
3π IJ
H 2 2 K H 2 2 K
= (0 − 2 + 0) − j (1 − 1) = 2 = 2∠180o = 2∠π
c
When k = 2 ; X(2) = cos π + 2 cos 2π + cos 3π − j(sin π + sin 3π) h
= ( −1 + 2 − 1) − j (0 + 0) = 0
When k = 3 ; X(3) =
FG cos 3π + 2 cos 3π + cos
9π IJ FG
− j sin
3π
+ sin
9π IJ
H 2 2 K H 2 2 K
= (0 − 2 + 0) − j( −1 + 1) = 2 = 2∠180o = 2∠π
\ X(k) = { 4 Ð 0, 2Ð p, 0, 2Ð p }
Magnitude Spectrum, |X(k)| = { 4, 2, 0, 2 }
Phase Spectrum, ÐX(k) = { 0, p, 0, p }
X(k) ∠X ( k )
π π
π
4
0.75π
3
2 0.5π
2
2
0.25π
1
0 1 2 3 0 1 2 3
k k
F ig 1 : M a g n itu d e S p e ctru m . F ig 2 : P h a se S pe ctru m .
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 16
Example 5.3
Compute circular convolution of the following two sequences using DFT.
x1(n) = { 0, 1, 0, 1 } and x2(n) = { 1, 2, 1, 2 }
- -
Solution
Given that, x1(n) = { 0, 1, 0, 1 }. The 4-point DFT of x1(n) is,
4 −1 − j2πnk 3 − jπnk
l
DFT x1(n) q = X1(k) = ∑ x1(n) e 4 = ∑ x1(n) e 2 ; k = 0, 1, 2, 3
n = 0 n = 0
πk 3πk
−j −j
= x1(0) e0 + x1(1) e 2 + x1(2) e− jπk + x1(3) e 2
πk 3πk πk 3πk
−j −j −j −j
= 0 + e 2 + 0 + e 2 = e 2 +e 2
When k = 0 ; X1(0) = e0 + e0 = 1 + 1 = 2
− jπ − j3π e±j q = cosq ± jsinq
When k = 1 ; X1(1) = e 2 + e 2 = −j + j = 0
− jπ − j3π
When k = 2 ; X1(2) = e + e = − 1 − 1 = −2
− j3π − j9π
When k = 3 ; X1(3) = e 2 + e 2 = j − j= 0
− jπk − j3πk
= 1 + 2e 2 + e− jπk + 2 e 2
X1(k) =
|S 0 ; k = 1
X2 (k) =
|S 0 ; k = 1
||−2 ; k = 2 ||−2 ; k = 2
|T 0 ; k = 3 |T 0 ; k = 3
Let, X3(k) be the product of X1(k) and X2(k).
\ X3(k) = X1(k) X2(k)
∴ X3 (k ) = m 12, 0, 4, 0 r
5. 17 Digital Signal Processing
By circular convolution theorem of DFT, we get,
DFT {x1(n) * x2(n)} = X1(k) X2(k) Þ x1(n) * x2(n) = DFT-1 { X1(k) X2(k) } = DFT-1 { X3(k) }
Let x3(n) be the 4-point sequence obtained by taking inverse DFT of X3(k).
4 −1 j2πnk 3 jπnk
1 1 1
DFT − mX (k)r
3 = x3(n) = ∑ X3 (k) e 4 = ∑ X3(k) e 2 ; n = 0, 1, 2, 3
4 k = 0
4 k = 0
=
1 LM
X3 (0) e0 + X3(1) e
jπn
2 + X3(2) e jπn + X3(3) e
j3πn
2
OP sin πn = 0
4 MN PQ for integer n
1
= 12 + 0 + 4e jπn + 0 = 3 + e jπn = 3 + cos πn + j sin πn = 3 + cos πn
4
When n = 0 ; x 3(0) = 3 + cos 0 = 3 + 1 = 4
When n = 1 ; x 3(1) = 3 + cos π = 3 − 1 = 2
When n = 2 ; x3 (2) = 3 + cos 2π = 3 + 1 = 4
When n = 3 ; x 3 (3) = 3 + cos 3π = 3 − 1 = 2
∴ x1(n) ∗ x 2 (n) = x3 (n) = l4, 2, 4, 2q
-
Example 5.4
Compute linear and circular convolution of the following two sequences using DFT.
x(n) = {1, 2 } and h(n) = { 2, 1 }
- -
Solution
Linear Convolution by DFT
The linear convolution of x(n) and h(n) will produce a 3 sample sequence. To avoid time aliasing let us
convert the 2 sample input sequences into 3-sample sequences by padding with zeros.
∴ x(n) = 1, 2, 0l q and h(n) = l2, 1, 0q
- -
By the definition of N-point DFT, the three point DFT of x(n) is,
3−1 − j2πkn − j2πk − j4 πk − j2πk
X(k) = ∑ x(n) e 3 = x(0) e0 + x(1) e 3 + x(2) e 3 = 1 + 2e 3
n = 0
When k = 0 ; X(0) = 1 + 2e0 = 1+ 2 = 3
− j 2π
When k = 1; X(1) = 1 + 2 e 3 = 1 + 2( −0.5 − j0.866) = − j1.732 e±jq = cosq ± jsinq
− j4 π
When k = 2; X(2) = 1 + 2 e 3 = 1 + 2( −0.5 + j0.866) = j1.732
By the definition of N-point DFT, the three point DFT of h(n) is,
3−1 − j2πkn − j2πk − j4 πk − j2πk
H(k) = ∑ h(n) e 3 = h(0) e0 + h(1) e 3 + h(2) e 3 = 2 + e 3
n = 0
When k = 0 ; H(0) = 2 + e0 = 2 + 1= 3
− j 2π
When k = 1; H(1) = 2 + e 3 = 2 − 0.5 − j0.866 = 1.5 − j0.866
− j4 π
When k = 2; H(2) = 2 + e 3 = 2 − 0.5 + j0.866 = 1.5 + j0.866
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 18
Let, Y(k) = X(k) H(k) ; for k = 0, 1, 2
When k = 0 ; Y(0) = X(0) H(0) = 3 ´ 3 = 9
When k = 1 ; Y(1) = X(1) H(1) = ( j1.732) ´ (1.5j0.866) = 1.5 j2.598
When k = 2 ; Y(2) = X(2) H(2) = ( j1.732) ´ (1.5+j0.866) = 1.5 + j2.598
\ Y(k) = {9, 1.5 j2.598, 1.5 + j2.598}
-
The sequence y(n) is obtained from inverse DFT of Y(k). By definition of inverse DFT,
N − 1 j2πkn
1
y(n) = DFT −1 {Y(k)} = ∑ Y(k) e N ; for n = 0, 1, 2, ..... , N − 1
N k = 0
2 j2πkn
1
∴ y(n) =
3 ∑ Y(k) e 3
k = 0
1L OP
j2πn j4 πn
= MY(0) e +
3M
0
Y(1) e 3 + Y(2) e 3
PQ ; for n = 0, 1, 2
N
1L OP
j2πn j4πn
= M9 + (−1.5
3M
− j2.598) e 3 + (−1.5 + j2.598) e 3
PQ
N
j2πn j4 πn
= 3 + (−0.5 − j0.866) e 3 + (−0.5 + j0.866) e 3
When k = 0; H(0) = 2 + e0 = 2 + 1= 3
When k = 1; H(1) = 2 + e − jπ = 2 − 1 = 1
∴ H(k) = l3, 1q
-
Here, N = 2
1 j2πkn
1 1 1
∴ y(n) =
2
∑ Y(k) e
k =0
2 =
2
Y(0) + Y(1) e jπn =
2
9 − e jπn = 4.5 − 0.5e jπn
− j2 πk − j4 πk − j6 πk − j 2 ( N −1) πk
∴ X(k) = x(0) e0 + x(1)e N + x( 2) e N + x( 3) e N + ..... + x( N − 1) e N
123 14243 14243 14243 144424443
Complex Complex Complex Complex Complex
multiplication multiplication multiplication multiplication multiplication
1 444444444444444 424444444444444444 3
N − 1 Complex additions
4 4
4 (= 22) 12 16 4 ´ log222 =4 ´ 2 = 8 × log2 22 = × 2 = 4
2 2
8 8
8 (= 23) 56 64 8 ´ log223 = 8 ´ 3 = 24 × log2 23 = × 3 = 12
2 2
16 16
16 (= 24) 240 256 16 ´ log224 = 16 ´ 4 = 64 × log2 24 = × 4 = 32
2 2
32 32
32 (= 25) 992 1,024 32 ´ log225 = 32 ´ 5 = 160 × log2 25 = × 5 = 80
2 2
64 64
64 (= 26) 4,032 4,096 64 ´ log226 = 64 ´ 6 = 384 × log2 26 = × 6 = 192
2 2
128 128
128 (= 27) 16,256 16,384 128 ´ log227 = 128 ´ 7 = 896 × log2 27 = × 7 = 448
2 2
To simplify the notation it is desirable to define the complex valued phase factor WN (also called as
twiddle factor) which is an Nth root of unity as,
− j2π
WN = e N
Here, W represents a complex number 1Ð –2p. Hence the phase or argument of W is –2p. Therefore,
when a number is multiplied by W, only its phase changes by –2p but magnitude remains same.
− j2π
∴W = e
The phase value –2p of W can be multiplied by any integer and it is represented as prefix
in W. For example multiplying –2p by k can be represented as Wk.
− j2π × k
∴e ⇒ Wk
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 22
The phase value –2p of W can be divided by any integer and it is represented as suffix in W.
For example dividing –2p by N can be represented as WN.
1
− j2 π ×
− j2 π ÷ N N
∴e = e ⇒ WN
− j2 π n k nk
∴e N
e
= e − j2 π j N = WNnk .....(5.25)
The equation (5.26) is the definition of N-point DFT using phase factor, and this equation is popularly
used in FFT.
bg b g
∴ f1 n = x 2n ; for n = 0, 1, 2, 3 ....., N − 1
2
f b ng = xb2n + 1g
2 ; for n = 0, 1, 2, 3 ....., N −1
2
Let, X(k) = N-point DFT of x(n)
F1(k) = N/2 point DFT of f1(n)
F2(k) = N/2 point DFT of f2(n)
By definition of DFT the N/2 point DFT of f1(n) and f2(n) are given by,
N N
−1 −1
2 2
F1 (k) = ∑ f1(n) WNkn2 ; F2 (k) = ∑ f2 (n) WNkn2
n= 0 n= 0
Now, N-point DFT X(k), in terms of N/2 point DFTs F1(k) and F2(k) is given by,
k
X( k ) = F1 (k) + WN F2 (k) , where, k = 0, 1, 2, ....., N – 1 .....(5.27)
5. 23 Digital Signal Processing
The proof of equation (5.27) is given below.
Proof :
when n ® 2n, even numbered
By definition of DFT, the N-point DFT of x(n) is, samples of x(n) are selected.
N−1 when n ® 2n +1, odd numbered
X(k) = ∑ x(n) W kn
N
samples of x(n) are selected.
n=0
= ∑ x(n) W kn
N + ∑ x(n) WNkn ; k = 0, 1, 2 .....,N − 1
n = even n = odd
N N
−1 −1
2 2
= ∑ x(2n) WNk( 2n) + ∑ x(2n +1) W k( 2n +1)
N b g
..... 5.28
n= 0 n= 0
e
WNk( 2n) = e− j2π j N
k( 2n + 1)
e
= e− j2π j N/ 2
k2n
= W Nkn2
k kn k
.....(5.29)
Using equations (5.29) and (5.30), the equation (5.28) can be written as,
N N
−1 −1
2 2
kn kn k
X( k) = ∑ x(2n)
n= 0
WN 2 +
n= 0
∑ x(2n +1) W N2 W
N
x(2n) = f1(n) and x(2n+1) = f2(n)
N N
−1 −1
2 2
kn k kn
= ∑ f (n) W
n= 0
1 N2 + W
N ∑ f (n) W
n= 0
2 N2 .....(5.31)
By definition of DFT the N/2 point DFT of f1(n) and f2(n) are given by,
N N
−1 −1
2 2
F1(k) = ∑ f (n) W
1
kn
N2 and F2 (n) = ∑ f (n) W2
kn
N2 .....(5.32)
n= 0 n= 0
Having performed the decimation in time once, we can repeat the process for each of the sequences
f1(n) and f2(n). Thus f1(n) would result in the two N/4 point sequences and f2(n) would result in another two
N/4 point sequences.
Let the decimated N/4 point sequences of f1(n) be v11(n) and v12(n).
bg
Let, V11 k = N 4 point DFT of v11 n ; bg bg
V21 k = N 4 point DFT of v21 n bg
V12 bkg = N 4 point DFT of v b ng ; 12 V22 bkg = N 4 point DFT of v 22 b ng
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 24
x (0)
C om pute
x(4) 2-point D FT C om bine X (0)
2-point D FT s
to X (1)
get 4-point
x (2) C om pute D FT X (2)
2-point D FT C om bine
x (6)
4-point
X (3)
D FT s to
get 8-point
x (1) X (4)
C om pute D FT
2-point D FT C om bine
x (5) X (5)
2-point D FT s
to X (6)
get 4-point
x (3)
C om pute D FT
X (7)
x (7) 2-point D FT
The relations between the samples of various sequences are given below.
In the first stage of computation the two point DFTs of the 2-point sequences are computed.
b g ∑ v b ng W
V11 k = 11
nk
2 ; for k = 0, 1
n = 0, 1
0
When k = 0; V11 ( k ) = V11 (0) = v11 ( 0) W2 + v11 (1) W20 = v11 (0) + v11 (1) = x( 0) + x(4)
0
When k = 1; V11 ( k ) = V11 (1) = v11 ( 0) W2 + v11 (1) W21 = v11 ( 0) − W20 v11 (1) = x(0) − W20 x(4)
0 1
j2 π × − j2 π ×
W20 = e 2 = e0 = 1 W21 = e 2 = e − jπ = (cos π − j sin π) = − 1 = − 1 × W20 = − W20
0 0
When k = 0; V12 ( k ) = V12 (0) = v12 (0) W2 + v12 (1) W2 = v12 (0) + v12 (1) = x( 2) + x( 6)
0 0 0
When k = 1; V12 ( k ) = V12 (1) = v12 ( 0) W2 + v12 (1) W21 = v12 (0) − W2 v12 (1) = x(2) − W2 x(6)
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 26
Let, V21(k) =DFT{v21(n)}.
0
When k = 0; V21 ( k ) = V21 (0) = v21 ( 0) W2 + v21 (1) W20 = v21 (0) + v21 (1) = x(1) + x(5)
0
When k = 1; V21 ( k ) = V21(1) = v21 (0) W2 + v21 (1) W21 = v21 (0) − W20 v21(1) = x(1) − W20x(5)
0
When k = 0 ; V22 ( k ) = V22 (0) = v 22 ( 0) W2 + v22 (1) W20 = v22 ( 0) + v 22 (1) = x( 3) + x( 7)
0
When k = 1; V22 ( k ) = V22 (1) = v22 ( 0) W2 + v 22 (1) W21 = v22 ( 0) − W20 v 22 (1) = x( 3) − W20 x( 7)
In the second stage of computation the 4-point DFTs are computed using the results of first stage as
input. Let, F1(k) = DFT{f1(n)}. The 4-point DFT of f1(n) can be computed using equation (5.33).
∴ F1 (k) = V11 ( k ) + W4k V12 (k) ; for k = 0, 1, 2, 3. V11(k) and V12(k) are periodic
with periodicity of 2 samples.
When k = 0; F1 ( k ) = F1 (0) = V11 ( 0) + W40 V12 (0) \ V11(k + 2) = V11(k)
V12(k + 2) = V12(k)
When k = 1; F1 ( k ) = F1 (1) = V11 (1) + W41 V12 (1)
When k = 2; F1 ( k ) = F1 (2) = V11 ( 2) + W42 V12 (2) = V11 (0) − W40 V12 (0)
When k = 3; F1 ( k ) = F1 (3) = V11 ( 3) + W43 V12 (3) = V11 (1) − W41 V12 (1)
2
− j2 π ×
W42 = e 4 = e − jπ = (cos π − j sin π ) = −1 = −1 × W40 = − W40
3 2 1 1
− j2 π × − j2 π × − j2 π × − j2 π ×
W43 = e 4 =e 4 e 4 = e − jπ e 4 = (cos π − j sin π ) W41 = −1 × W41 = − W41
Let, F2(k) = DFT{f2(n)}. The 4-point DFT of f2(n) can be computed using equation (5.34).
∴ F2 (k) = V21 ( k ) + W4k V22 (k) ; for k = 0, 1, 2, 3. V21(k) and V22(k) are periodic
with periodicity of 2 samples.
When k = 0; F2 ( k ) = F2 (0) = V21 ( 0) + W40 V22 (0) \ V21(k + 2) = V21(k)
V22(k + 2) = V22(k)
When k = 1; F2 ( k ) = F2 (1) = V21 (1) + W41 V22 (1)
When k = 2; F2 ( k ) = F2 (2) = V21 ( 2) + W42 V22 (2) = V21 ( 0) − W40 V22 (0)
When k = 3; F2 ( k ) = F2 (3) = V21 ( 3) + W43 V22 (3) = V21 (1) − W41 V22 (1)
5. 27 Digital Signal Processing
Third Stage Computation
In the third stage of computation the 8-point DFTs are computed using the results of second stage as
inputs.
Let, X(k) = DFT{X(n)}. The 8-point DFT of x(n) can be computed using equation (5.27).
∴ X( k ) = F1 ( k ) + W8k F2 (k) ; for k = 0, 1, 2, 3, 4, 5, 6, 7 F1(k) and F2(k) are periodic with
periodicity of 4 samples.
When k = 0; X( k ) = X( 0) = F1 ( 0) + W80 F2 (0) \ F1(k + 4) = F1(k)
When k = 1; X( k ) = X(1) = F1 (1) + W81 F2 (1) F2(k + 4) = F2(k)
When k = 2; X( k ) = X( 2) = F1 ( 2) + W82 F2 ( 2)
When k = 3; X( k ) = X( 3) = F1 (3) + W83 F2 ( 3)
When k = 4; X( k ) = X( 4) = F1 ( 4) + W84 F2 (4) = F1 (0) − W80 F2 ( 0) − j2 π ×
4
W84 = e 8 = e − jπ
When k = 5; X( k ) = X(5) = F1 (5) + W85 F2 (5) = F1 (1) − W81 F2 (1)
= (cos π − j sin π)
When k = 6; X( k ) = X( 6) = F1 ( 6) + W86 F2 (6) = F1 (2) − W82 F2 ( 2)
= −1
When k = 7; X( k ) = X( 7) = F1 ( 7) + W87 F2 (7) = F1 (3) − W83 F2 ( 3)
W84 = W84 × W80 = − W80 W85 = W84 × W81 = − W81 W86 = W84 × W82 = − W82 W87 = W84 × W83 = −W83
5.7.2 Flow Graph for 8-Point DFT using Radix-2 DIT FFT
If we observe the basic computation performed at every stage of radix-2 DIT FFT in previous section,
we can arrive at the following conclusion.
1. In each computation two complex numbers "a" and "b" are considered.
1 1
x(0) x(0) + W 02 x(4) = V11(0)
1
1
W20
x(4) x(0) − W20 x(4) = V11(1)
−1
x(2) 1 1 x(2) + W20 x(6) = V12 (0)
1
1
W20
x(6) x(2) − W20 x(6) = V12 (1)
−1
1 1
x(1) x(1) + W20 x(5) = V21(0)
1
1
W20
x(5) x(1) − W20 x(5) = V21(1)
−1
1 1
x(3) x(3) + W20 x(7) = V22 (0)
1
W20 1
x(7) x(3) − W20 x(7) = V22 (1)
−1
W40 -1
1 0
V12(0) V11 0 − W4 V12 0 = F1 2
W41 -1 1
V12(1) V11 1 − W4 V12 1 = F1 3
1 1 0
V21(0) V21 0 + W4 V22 0 = F2 0
1
1 1 1
V21(1) V21 1 + W4 V22 1 = F2 1
1
W40 1
-1 0
V22(0) V21 0 − W4 V22 0 = F2 2
1
W41 -1 1
V22(1) V21 1 − W4 V22 1 = F2 3
1
1 1
F 1 (1) F1 (1) + W 8 F2 (1) = X (1)
1
1
1
F 1 (2) F1(2) + W 82 F 2 (2) = X (2)
1
1
1
F 1 (3) F1 (3) + W 83 F 2 (3) = X (3)
0 1
W 8
F 2 (0) F1(0) − W 80 F 2 (0) = X (4)
1
W 8 1
F 2 (1) F1 (1) − W 8 F2 (1) = X (5)
2
W 8
F 2 (2) F1(2) − W 82 F 2 (2) = X (6)
3
W8
F 2 (3) F1 (3) − W 83 F2 (3) = X (7)
The Combined Flow Graph (or Butterfly Diagram) of All the Three Stages of Computation
1 1 1 1 1 1
x (0) X (0)
1 1
0
W2 1 1
1 1 1
x (4) X (1)
−1 1 1
0
1 W4 1 1
1 −1 1
x (2) X (2)
1
1 1 1
0
W2 1 W4
1 1
x (6) X (3)
−1 −1
1
0
1 W8 1
1 1 1
x (1) X (4)
1 −1
0 1 1
W2 1 W8 1
1 1 −1
x (5) X (5)
−1 1
0 2
W4 1 W8 1 −1
1 1 −1
x (3) X (6)
0
1 3
1 1
W2 1 W4 −1 W8 1 −1
x (7) X (7)
−1
n=
2
N N N N
−1 −1 FG N IJ −1 −1
kN
∑ xFH n + N2 IK W FH IK
2 2 k n+ 2 2
H K x n + N WNkn WN2
= ∑ x(n) W
n=0
kn
N +
n=0
N
2
= ∑ x(n) W
n=0
kn
N + ∑
n=0
2
N N
−1 −1
n=0
N
2 Q n=0
N
N
n=0
2 Q
kn
N2 ∴ G1 k =b g ∑ g bng W 1
kn
N2 ; for k = 0, 1, 2,.. N 1
2
n=0
N
−1
2
= ∑ g (n) W
1
kn
N2 = G1(k)
n=0
5. 31 Digital Signal Processing
=
2
n=0N 2 Q N
N
−1
In the next stage of decimation the N/2 point frequency domain sequence G1(k) is decimated into two
numbers of N/4 point sequences D11(k) and D12(k), and G2(k) is decimated into two numbers of N/4 point
sequences D21(k) and D22(k).
Let D 11(k) and D12(k) be two numbers of N/4 point sequences obtained by the decimation of G1(k).
Let D11(k) be N/4 point DFT of d 11(n), and D12(k) be N/4 point DFT of d12(n).
Let D 21(k) and D22(k) be two numbers of N/4 point sequences obtained by the decimation of G2(k).
Let D21(k) be N/4 point DFT of d 21(n), and D22(k) be N/4 point DFT of d22(n).
Now, N/2 point DFTs can be obtained from two numbers of N/4 point DFTs as shown below.
G1(k)½k = even = D11(k)
G1(k)½k = odd = D12(k)
G2(k)½k = even = D21(k)
G2(k)½k = odd = D22(k)
Proof :
∑ g FH n + N4 IK W H FH IK
4 4 k n+ 4 4
= ∑ g (n) K g1 n + N W Nkn2 W N 42
k
n=0
1 W Nkn2 +
n=0
1 N2
4
= ∑
n=0
g1(n) W Nkn2 + ∑
n=0
4
N
L4
−1
O
kn
= ∑ Mg (n) + W g FH n + N IK P W
4 kn
kN
−j
2 π kN
W N2 = e N 2 = e − jπk
MN
n=0
1
4 PQ
N2 1 N2
k
N
−1
e j = b −1g
= e − jπ
k
= ∑ LMg (n) + g FH n + N IK OP W
4
= ∑ d (n) W kn
4
kn
= D11(k)
∴ D11(k) =
n=0
∑d 11(n) W Nkn4
N 1
4 Q 1 N4 11 N4
(n) = LMg b ng − g FH n + N IK OP W
n=0 n=0
n
d12
G1(k) k = odd = G1(2k + 1) ; for k = 0, 1, 2,....., N − 1
N 1 1
4 Q N2
4
D12(k) is N point DFT of d12(n).
N
−1 4
=
4
∑d 12(n) WNkn4
N N
−1 −1 n=0
=
4
∑ LMg (n) − g FH n + N IK OP W n
W Nkn4 =
4
d21(n) = g2(n) + g2 n + N FH IK
Similarly the N/2 point sequence G 2 (k) can be decimated 4
into two numbers of N/4 point sequences. D21(k) is N point DFT of d21(n).
4
G2(k) k = even = G2(2k) ; for k = 0, 1, 2, ....., N − 1 N
4
−1
4
N
4
−1
∴ D21(k) = d21(n) WNkn4 ∑
n=0
= ∑d 21(n) WNkn4 = D21(k)
LM
n=0
d22 (n) = g 2 (n) − g 2 n + N FH IK OP W n
N 4 Q N 2
The decimation of the frequency domain sequence can be continued until the resulting sequence are
reduced to 2-point sequences. The entire process of decimation involves, m stages of decimation where
m = log2N. The computation of the N-point DFT via the decimation in frequency FFT algorithm requires
(N/2)log2N complex multiplications and N log2N complex additions. (i.e., the total number of computations
remains same in both DIT and DIF).
5.8.1 8-point DFT Using Radix-2 DIF FFT
The DIF computations for an eight sequence is discussed in detail in this section. Let x(n) be an
8-point sequence. Therefore N = 8 = 23 = rm. Here, r = 2 and m = 3. Therefore, the computation of 8-point DFT
using radix-2 FFT involves three stages of computation.
The samples of x(n) are,
x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)
First Stage Computation
In the first stage of computation, two numbers of 4-point sequences g1(n) and g2(n) are obtained from
x(n) as shown below.
LM
g1 (n) = x(n) + x n + N e jOQP = x(n) + x(n + 4) ;for n = 0, 1, 2, 3
N 2
5. 33 Digital Signal Processing
When n = 0; g1(n) = g1(0) = x(0) + x(4)
When n = 1; g1(n) = g1(1) = x(1) + x(5)
When n = 2; g1(n) = g1(2) = x(2) + x(6)
When n = 3; g1(n) = g1(3) = x(3) + x(7)
LM
g 2 (n) = x(n) – x n + N
e jOPQ Wn
= x(n) – x(n + 4) W8n ; for n = 0, 1, 2, 3
N 2 N
b g
d11 (n) = g1 (n) + g1 n + N 4 = g1 (n) + g1 (n + 2) ; for n = 0, 1
= d11 (0) W20 + d11 (1) W21 W20 = d11 (0) − d11 (1) W20
Similarly the 2-point DFTs of the 2-point sequences d12(n), d21(n) and d22(n) are computed and the
results are given below.
D11 ( 0) = d11 ( 0) + d11 (1)
D11 (1) = d11 ( 0) − d11 (1) W20
D12 (0) = d12 (0) + d12 (1)
D12 (1) = d12 (0) − d12 (1) W20
D21 (0) = d 21 (0) + d 21 (1)
D21 (1) = d 21 (0) − d 21 (1) W20
D22 (0) = d 22 (0) + d 22 (1)
D22 (1) = d 22 (0) − d 22 (1) W20
1. In each computation two complex numbers "a" and "b" are considered.
2. The sum of the two complex numbers is computed which forms a new complex number "A".
3. Then subtract complex number "b" from "a" to get the term "a-b". The difference term "a-b" is
multiplied with the phase factor or twiddle factor "WNk " to form a new complex number "B".
The above basic computation can be expressed by a signal flow graph shown in Fig 5.7. (For detailed
discussion on signal flow graph, refer Chapter 2, Section 2.6.2).
1 a+ b
A = a+ b
1
1 k
WN k
b B = ( a − b)W N
−1 a −b
1 1
x(0) x(0) + x(4) = g1(0)
1
1 1
x(1) x(1) + x(5) = g1(1)
1
1 1
x(2) x(2) + x(6) = g1(2)
1
1 1
x(3) x(3) + x(7) = g1(3)
1
1 0
W8
0
x(4) [x(0) − x(4)] W8 = g 2 (0)
−1
1 1
−1 W8
1
x(5) [x(1) − x(5)] W8 = g 2 (1)
1 2
−1 W8 2
x(6) [x(2) − x(6)] W8 = g 2 (2)
1 3
−1 W8
3
x(7) [x(3) − x(7)] W8 = g 2 (3)
1 1
g2(0) g2 0 + g2 2 = d 21 0
1
1 1
g2(1) g2 1 + g2 3 = d 21 1
1
1 0
W4
−1 [g2 0 − g2 2 ]W
0
= d 22 0
g2(2) 4
1 1
W4 1
g2(3) [g2 1 − g2 3 ]W = d 22 1
−1 4
1 0
W2
d 1 1(1) [d 11 (0) − d 11 (1)]W 20 = D 11 (1) = G 1(2) = X (4)
−1
1 1
d 1 2 (0) d 12 (0) + d 12 (1) = D 12 (0) = G 1 (1) = X (2)
1
1 0
W2
d 1 2 (1) 0
[d 12 (0) − d 1 2 (1)]W 2 = D 12 (1) = G 1(3) = X (6)
−1
1 1
d 2 1 (0) d 21 (0) + d 21 (1) = D 21 (0) = G 2 (0) = X (1)
1
1 0
W2
d 2 1 (1) [d 2 1(0) − d 21 (1)]W 20 = D 21 (1) = G 2 (2) = X (5)
−1
1 1
d 2 2 (0) d 2 2 (0) + d 22 (1) = D 2 2 (0) = G 2 (1) = X(3)
1
0
1 W2
d 2 2 (1) [d 2 2 (0) − d 22 (1)]W 20 = D 22 (1) = G 2 (3) = X (7)
−1
F − j2 πnk ∗I
1N 1
−
1N 1
−
∗ 1 LM Xbkg W
N−1
∗ O
=
Nk=0
X(k) e∑ GH N
JK = ∑ b g eWNnk j
N k=0
Xk =
N MN ∑ e
nk
N j PPQ .....(5.35)
k=0
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 38
In equation (5.35), the expression inside the bracket is similar to that of DFT computation of a
sequence, with following differences.
1. The summation index is k instead of n.
2. The input sequence is X(k) instead of x(n).
3. The phase factors are conjugate of the phase factor used for DFT.
Hence, in order to compute inverse DFT of X(k), the FFT algorithm can be used by taking the conjugate of
phase factors. Also from equation (5.35) it is observed that the output of FFT computation should be divided
by N to get x(n).
The following procedure can be followed to compute inverse DFT using FFT algorithm.
1. Take N-point frequency domain sequence X(k) as input sequence.
2. Compute FFT by using conjugate of phase factors.
3. Divide the output sequence obtained in FFT computation by N, to get the sequence x(n).
Thus a single FFT algorithm can be used for evaluation of both DFT and inverse DFT.
Example 5.5
An 8-point sequence is given by x(n) = {2, 1, 2, 1, 1, 2, 1, 2}. Compute 8-point DFT of x(n) by
a) radix-2 DIT-FFT and b) radix-2 DIF-FFT. Also sketch the magnitude and phase spectrum.
Solution
a) 8-point DFT by Radix-2 DIT-FFT
The given sequence is first arranged in the bit reversed order.
The sequence x(n) The sequence x(n) in
in normal order bit reversed order x (0) = 2 2+ 1= 3
= −j 1 1
-1 3 −3 = 0
3
1
−j -1
−1 −1 −( −1)( −j)= −1 −j
The phase factors involved in third stage computation are W80 , W81 , W82 and W83.
1
6 6 + 6 = 12 = X(0)
1− j
1 F 1 − j 1 I = 1− j − F
1 + j 1 + j 1 + 1 = 1 + j −1 + 2 I = 1 + j0 . 414 = X(1)
(1 − j) + (−1 + j) GH 2 2 JK 2 2 2 2
GH
2
JK
1 0 + 0 × ( −j) = 0 = X(2)
0
1 F I
(1 + j) + (−1 − j) − 1 − j 1 = 1 + j + 1 + j 1 + j 1 − 1 = 1 + j 1 + 2
F I = 1 + j2 . 414 = X(3)
1+j
2
GH 2
JK 2 2 2 2 2
GH JK
1
6 6 − 6 = 0 = X( 4)
1 −1
−j 1
2 2 F 1 − j 1 I = 1 − j − F− 1 +j 1 +j 1 + 1
I = 1 − jF1 + 2 I = 1 − j2 . 414 = X(5)
−1 + j
−1
(1 − j) − ( −1 + j) GH 2 2 JK GH 2 2 2 2
JK GH 2 JK
−j
0 0 − 0 × (−j) = 0 = X(6)
1 1 −1
− −j
2 2 1 1 1 +j 1 +j 1 − 1
−1− j (1 + j) − ( −1 − j) GH
− −j JK = 1+ j − GH JK = 1+ j 1− 2 GH JK = 1 − j0 . 414 = X(7)
−1 2 2 2 2 2 2 2
For 8-point DFT by radix-2 FFT we require 3-stages of computation with 4-butterfly computation in each
stage. The given sequence is the input to first stage. For other stages of computations, the output of previous stage
will be the input for current stage.
1 1
x(0) = 2 2+1= 3
1
1 1
x(1) = 1 1+ 2 = 3
1
1 1
x(2) = 2 2+1= 3
1
1 1
x(3) = 1 1+2 = 3
1
1 1
x(4) = 1 2 −1= 1
−1 1 1
−j
1 2 2 1 1 1 1
x(5) = 2
−1
(1 − 2) GH 2
−j
2
JK =−
2
+j
2
1 −j
x(6) = 1 (2 − 1)( −j) = −j
−1 1 1
1 − −j
2 2 1 1 1 1
x(7) = 2
−1 (1 − 2) − GH 2
−j
2
JK =
2
+j
2
= cos
FG −π IJ + j sin
FG −π IJ 3
−1 −j
(3 − 3) ( −j) = 0
H 2K H 2K 1 1
= −j 1 1 + ( −j) = 1 − j
1
1 1 1 1 1 1 1 1 2
−
2
+j
2 1 GH−
2
+j
2
JK + GH 2
+j
2
JK =j
2
1
−1 1
−j 1 − ( −j) = 1 + j
1
1 1
+j −1 −j 1 1 1 1 2
2 2 MNGH −
2
+j
2
JK − GH 2
+j
2
JKPQ ( − j) = j
2
2
1− j (1 − j) + j = 1 + j0.414 = X (1)
2
2 2
j (1 − j) − j = 1 − j2.414 = X (5)
2 2
1+ j 2
(1 + j) + j = 1 + j2.414 = X (3)
2
2 2
j (1 + j) − j = 1 − j0.414 = X (7)
2 2
F ig 6 : B u tte rfly d iag ra m fo r th ird stag e o f ra d ix -2 D IF F F T.
The output sequence of third stage of computation = { 12, 0, 0, 0, 1+j0.414, 1j2.414, 1+j2.414, 1j0.414 }
The output sequence of third stage of computation is the 8-point DFT of the given sequence in bit
reversed order.
In DIF-FFT algorithm the input to first stage is in normal order and the output of third stage will be in the
bit reversed order. Hence the actual result is obtained by arranging the output sequence of third stage in normal
order as shown below.
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 42
The sequence X(k) The sequence X(k)
in bit reversed order in normal order
X(0) = 12 X(0) = 12
X(4) = 0 X(1) = 1+ j0.414
X(2) = 0 X(2) = 0
X(6) = 0 X(3) = 1+ j2.414
X(1) = 1+ j0.414 X(4) = 0
X(5) = 1 j2.414 X(5) = 1 j2.414
X(3) = 1+ j2.414 X(6) = 0
X(7) = 1 j0.414 X(7) = 1 j0.414
Each element of the sequence X(k) is a complex number and they are expressed in rectangular coordinates.
If they are converted to polar coordinates then the magnitude and phase of each element can be obtained.
Note : The rectangular to polar conversion can be obtained by using R ® P conversion in calculator.
The magnitude specturm is the plot of the magnitude of each sample of X(k) as a function of k as shown
in fig 7. The phase spectrum is the plot of phase of X(k) as a function of k as shown in fig 8.
When N-point DFT is performed on a sequence x(n) then the DFT sequence X(k) will have a periodicity of
N. Hence in this example the magnitude and phase specturm will have a periodicity of 8 as shown in fig 7 and
fig 8.
X (k ) ∠X (k)
12
12
0.5π
0.37π 0.37π
0.25π
N=8 0.12π 0.12π
0
1 2 3 4 5 6 7 8 9 10 11
0.5π −0.12π
2.61 2.61 2.61
1.08 0.25π −0.37π
1.08 1.08
0 1 2 3 4 5 6 7 8 9 10 11 k
F ig 7 : M a gn itude sp ectrum . F ig 8 : P hase spectrum .
5. 43 Digital Signal Processing
Example 5.6
In an LTI system the input x(n) = {1, 2, 3} and the impulse response h(n) = {1, 1}. Determine the response
of the LTI system by radix-2 DIT FFT.
Solution
The response y(n) of LTI system is given by linear convolution of input x(n) and impulse response h(n).
\ Response or Output, y(n) = x(n) * h(n)
The DFT (or FFT) supports only circular convolution. Hence to get the result of linear convolution from
circular convolution, the sequences x(n) and h(n) should be converted to the size of y(n) by appending with zeros
and circular convolution of x(n) and h(n) is performed.
The length of x(n) is 3 and h(n) is 2. Hence the length of y(n) is 3 + 2 1 = 4. Therefore given sequences
x(n) and h(n) are converted to 4 point sequences by appending zeros.
\ x(n) = {1, 2, 3, 0} and h(n) = {1, 1, 0, 0}
Now the response y(n) is given by, y(n) = x(n) * h(n).
Let, DFT {x(n)} = X(k), DFT {h(n)} = H(k), DFT{y(n)} = Y(k).
By convolution theorem of DFT we get,
DFT {x(n) * h(n)} = X(k) H(k)
\ y(n) = DFT1{Y(k)} = DFT-1{X(k) H(k)}
The various steps in computing y(n) are,
Step - 1 : Determine X(k) using radix-2 DIT algorithm.
Step - 2 : Determine H(k) using radix-2 DIT algorithm.
Step - 3 : Determine the product X(k)H(k).
Step - 4 : Take inverse DFT of the product X(k)H(k) using radix-2 DIT algorithm.
Input sequence to first stage = { 1, 3, 2, 0 }. The butterfly computations of first stage are shown in fig1.
x (3) = 0 2 −0 = 2
F ig 1 : B u tterfly d ia gram fo r
first sta ge o f ra d ix -2 D IT F F T.
Output sequence of first stage of computation = { 4, -2, 2, 2 }
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 44
Second stage computation
Input sequence to second stage computation = { 4, -2, 2, 2 }
The phase factors involved in second stage computation are W40 and W41 .
The butterfly computations of second stage are shown in fig 2.
1 1 − j2π ×
0
4 4 + 2 = 6 = X (0)
1 W40 = e 4 =1
1 1 1 π
−2 −2 + 2( −j) = −2 − 2j = X (1) − j2π × −j ×
1 W41 = e 4 =e 2
1
1
2
-1 4 − 2 = 2 = X (2)
= cos
FG −π IJ + jsinFG −π IJ
2
−j
1
-1 −2 − 2( −j) = −2 + 2j = X (3)
H 2K H 2K
= −j
F ig 2 : B u tte rfly dia gra m fo r seco n d stag e o f ra d ix -2 D IT F F T.
h(3) = 0 −1 − 0 = −1
F ig 3 : B u tterfly d ia gram fo r
first sta g e o f ra dix -2 D IT FF T.
= cos
FG −π IJ + jsinFG −π IJ
H 2K H 2K
= −j
5. 45 Digital Signal Processing
1 1
−1 −1 + ( −1) = −2 = H (0)
1
1 1
−1 −1 + ( −1)( −j) = −1 + j = H (1)
1
1
1 -1
−1 −1 − ( −1) = 0 = H (2)
1
−j -1
−1 −1 − ( −1)( −j) = −1 −j = H (3)
Y (1) = 4 4+4=8
stage of computation is W20 . d i
0 ∗
Y (3) = 4 4 −4 = 0
Since, dW i
2 = 1, it is not
considered for computation.
F ig 5 : B u tterfly d iag ram fo r
first sta g e o f in v erse D F T o f Y (k).
The output sequence of first stage computation = { 12, 12, 8, 0}
−12
1 1
−12 + 8 = −4 = 4y(0)
dW i 0
4 =e 4 =1
1 π
1 1 ∗
j2π × j ×
−12
1 1
1
−12 + (0)(j) = −12 = 4y(1) dW i 4 = e 4 =e 2
W4
0 ∗
d i =1 1
-1 = cos
FG π IJ + jsinFG π IJ
8
1 ∗
−12 − 8 = −20 = 4y(2) H 2K H 2K
0
d i
W4 =j 1
-1
−12 − (0)(j) = −12 = 4y(3)
=j
Example 5.7
Determine the response of LTI system when the input sequence x(n) = {1, 2, 2, 2, 1} by radix 2 DIT FFT.
The impulse response of the system is h(n) = {1, 1, 1, 1}.
Solution
The response of an LTI system is given by linear convolution of input x(n) and impulse response h(n).
\ Response or Output, y(n) = x(n) * h(n).
The DFT (or FFT) supports only circular convolution. Hence to get the result of linear convolution from
circular convolution, the sequence x(n) and h(n) should be converted to the size of y(n), by appending with zeros,
and then circular convolution of x(n) and h(n) is performed.
The length of x(n) = 5, and h(n) = 4. Hence the length of y(n) is 5 + 4 1 = 8.
Therefore x(n) and h(n) are converted into 8-point sequence by appending zeros.
\ x(n) = { 1, 2, 2, 2, 1, 0, 0, 0 } and h(n) = { 1, 1, 1, 1, 0, 0, 0, 0 }
Now, the response y(n) is given by, y(n) = x(n) * h(n).
Let, DFT {x(n)} = X(k), DFT {h(n)} = H(k), DFT {y(n)} = Y(k).
By convolution theorem of DFT we get,
DFT {x(n) * h(n)} = X(k) H(k)
\ y(n) = DFT-1{Y(k)} = DFT-1{X(k) H(k)}
The various steps in computing y(n) are,
Step - 1 : Determine X(k) using radix-2 DIT algorithm.
Step - 2 : Determine H(k) using radix-2 DIT algorithm.
Step - 3 : Determine the product X(k)H(k).
Step - 4 : Take inverse DFT of the product X(k)H(k) using radix-2 DIT algorithm.
Step-1 : To determine X(k)
Since x(n) is an 8 point sequence, we have to compute 8-point DFT.
The 8-point DFT by radix-2 FFT algorithm consists of 3 stages of computations with 4 butterflies in each
stage.
The given sequence x(n) is arranged in bit reversed order as shown in the following table.
5. 47 Digital Signal Processing
x(n) x(n)
Normal order Bit reversed order
x(0) = 1 x(0) = 1
x(1) = 2 x(4) = 1
x(2) = 2 x(2) = 2
x(3) = 2 x(6) = 0
x(4) = 1 x(1) = 2
x(5) = 0 x(5) = 0
x(6) = 0 x(3) = 2
x(7) = 0 x(7) = 0
The sequence arranged in bit-reversed order forms the input sequence to the first stage computation.
First stage computation
Input sequence to first stage = { 1, 1, 2, 0, 2, 0, 2, 0 }.
The butterfly computation of first stage is shown in fig 1.
The phase factor involved in first
x (0) = −1 −1+ ( −1)= −2 stage of computation is W20 .
Since, W20 = 1, it is not
x (4) = −1 −1 −( −1) = 0
considered for computation.
x (2) = 2 2+0 = 2
x (6) = 0 2 −0 = 2
x (1) = 2 2+0 = 2
x (5) = 0 2 −0 = 2
x (3) = 2 2+0 = 2
x (7) = 0 2 −0 = 2
= cos
FG −π IJ + jsinFG −π IJ
H 2K H 2K
= −j
1 1
2 2+2=4
1
1 1
2 2 + 2( −j) = 2 − 2j
1
1 1
-1
2 2 −2 = 0
1
−j -1
2 2 − 2( −j) = 2 + 2j
1
0 0 + 4 = 4 = X(0)
1
− 2j −2 j + (2 − 2 j) × 0.707 − j0.707 = −j4 . 828 = X(1)
1 −4 + 0 × ( −j) = −4 = X(2)
−4
1
2j 2 j + (2 + 2 j) × −0.707 − j 0.707 = −j0 . 828 = X(3)
1
4 0 − 4 = −4 = X( 4)
0.707 −1
−j0.707
2−2j −2j − (2 − 2j) × 0 .707 − j0 .707 = j0 . 828 = X(5)
−1
−j
0 −4 − 0 × ( −j) = −4 = X(6)
−1
−0.707
−j0.707 2 j − (2 + 2 j) × −0 .707 − j0 .707 = j4 . 828 = X(7)
2+2j
−1
h(n) h(n)
Normal order Bit reversed order
h(0) = 1 h(0) = 1
h(1) = 1 h(4) = 0
h(2) = 1 h(2) = 1
h(3) = 1 h(6) = 0
h(4) = 0 h(1) = 1
h(5) = 0 h(5) = 0
h(6) = 0 h(3) = 1
h(7) = 0 h(7) = 0
The sequence arranged in bit reversed order forms the input sequence to the first stage.
h(0) = −1 −1+ 0 = −1
The phase factor involved in first
h(4) = 0 −1 −0 = −1 stage of computation is W20 .
h(2) = −1 −1+ 0 = −1 Since, W20 = 1, it is not
considered for computation.
h(6) = 0 −1 −0 = −1
h(1) = 1 1+0= 1
h(5) = 0 1 −0 = 1
h(3) = 1 1+0 = 1
h(7) = 0 1 −0 = 1
−j
1
-1 = cos
FG −π IJ + jsinFG −π IJ
−1 −1 − ( −1)( −j) = −1 − j
H 2K H 2K
1 1 = −j
1 1+1=2
1
1 1
1 1 + 1( −j) = 1 − j
1
1 1 -1
1 1 −1 = 0
1
−j -1
1 1 − 1( −j) = 1 + j
Phase factors involved in third stage computations are W80 , W81, W82 , and W83.
0
− j2π ×
W80 = e 8 =1
1 π
W81 = e
− j2π ×
8 =e
−j ×
4 FG −π IJ + j sinFG −π IJ = 1 − j 1 = 0 . 707 − j0 . 707
= cos
H 4K H 4K 2 2
2 π
W82 = e
− j2π ×
8 = e
−j ×
2 F −π IJ + j sinFG −π IJ = − j
= cosG
H 2K H 2K
3 3π
W83 = e
− j2π ×
8 = e
−j ×
4 F −3π IJ + j sinFG −3π IJ = − 1 − j 1 = −0 . 707 − j0 . 707
= cosG
H4K H4K 2 2
1
−2 −2 + 2 = 0 = H (0)
1
−1 + j −1 + j + 1 − j × 0 .707 − j0 .707 = −1 − j0 . 414 = H(1)
1
0 0 + 0 × ( −j) = 0 = H (2)
1
−1 − j −1 − j + 1 + j × −0 .707 − j0 .707 = −1 − j2 . 414 = H( 3 )
1
2 −2 − 2 = −4 = H (4)
0.707 −1
−j0.707
1 −j −1 + j − 1 − j × 0 .707 − j0 .707 = −1 + j2 . 414 = H(5)
−1
−j
0 0 − 0 × ( −j) = 0 = H (6)
−0.707 −1
−j0.707
1+j −1 − j − 1 + j × −0 .707 − j0 .707 = −1 + j0.414 = H (7)
−1
F ig 6 : B u tte rfly d ia gra m for th ird sta g e of rad ix-2 D IT F F T o f H (k ) .
5. 51 Digital Signal Processing
Output sequence of third UV = m0, − 1− j0.414, 0, r
− 1 − j2.414, − 4, − 1 + j2.414, 0, − 1 + j0.414
stage computation W
The output sequence of third stage computation is the 8-point DFT of h(n).
Y(k) Y(k)
Normal order Bit reversed order
Y(0) = 0 Y(0) = 0
Y(1) = −2 + j4.828 Y(4) = 16
Y(2) = 0 Y(2) = 0
Y(3) = −2 + j0.828 Y(6) = 0
Y(4) = 16 Y(1) = − 2 + j4.828
Y(5) = −2 − j0.828 Y(5) = −2 − j0.828
Y(6) = 0
Y(3) = − 2 + j0.828
Y(7) = 2 − j4.828
Y(7) = 2 − j4.828
First stage computation
Y(2) = 0 0+0=0
it is not considered for
computation.
Y(6) = 0 0 −0 = 0
Input sequence of second stage = m 16, − 16, 0, 0, − 4 + j4, j5.656, − 4 − j4, j5.656 r
The butterfly computation of second stage is shown in fig 8.
The phase factors involved are (W0 )∗ and (W1)∗. 4 4
0
∗ j2π ×
16
1 1
16 + 0 = 16 dW i
0
4 =e 4 = e0 = 1
1 1 π
j2π × j ×
1 ∗
−16
1 1
1
−16 + (0)(+j) = −16 dW i
4 =e 4 =e 2
1
1
-1 = cos
FG π IJ + jsinFG π IJ
0
1
16 − 0 = 16
H 2K H 2K
+j -1 =j
0 −16 − (0)(+j) = −16
1 1
−4 + j4 (−4 + j4) + (−4 − j4) = −8
1
1 1
j5.656 j5.656 + j5.656(j) = −5.656 + j5.656
1
1 1 -1
−4 − j4 (−4 + j4) − (−4 − j4) = j8
1
+j -1
j5.656 j5.656 − j5.656 (j) = 5.656 + j5.656
Input sequence of third |UV = m 16, − 16, 16, − 16, − 8, − 5.656 + j 5 .656 , j8, 5.656 + j 5.656 r
stage computation |W
The butterfly computation of third stage is shown in fig 9.
The phase factors involved are (W80 )∗ , (W81)∗ , (W82 )∗ and (W83 )∗ .
5. 53 Digital Signal Processing
0
j2π ×
(W80 )∗ = e 8 =1
1 π
(W81)∗ = e
j2π ×
8 =e
j ×
4 = cos
FG π IJ + j sinFG π IJ = 1 + j 1 = 0. 707 + j0. 707
H 4K H 4K 2 2
2 π
(W82 )∗ = e
j2π ×
8 =e
j ×
2 F πI F πI
= cosG J + j sinG J = j
H 2K H 2K
3 3π
(W83 )∗ = e
j2π ×
8 =e
j×
4 F 3π I F 3π I 1 + j 1 = −0. 707 + j0. 707
= cosG J + j sinG J = −
H 4K H 4K 2 2
1
16 16 + ( −8) = 8 = 8y (0)
1
−16 −16 + −5 . 656 + j5 . 656 0.707 + j0 .707 = −24 = 8y (1)
1
16 16 + j8(j) = 16 − 8 = 8y (2)
1
−16 −16 + 5. 656 + j5. 656 × −0.707 + j0.707 = −24 = 8 y (3)
1 16 − (−8) = 24 = 8y (4)
−8
−1
0.707
+ j0.7 07 −1
−5.656 + j5.656 −16 − −5 . 656 + j5 . 656 0.707 + j0.707 = −8 = 8 y(5)
+j −1
j8 16 − j8(j) = 16 + 8 = 24 = 8y(6)
−0.707
+ j0.7 07 −1
5.656 + j5.656 −16 − 5. 656 + j5. 656 × −0 .707 + j0.707 = −8 = 8y(7)
Solution
The N-point DFT of x(n) is given by,
N − 1 2πnk
−j
DFT {x(n)} = X(k) = ∑
n = 0
x(n)e N ; for k = 0, 1, 2,.....N 1
πk 3πk
−j −j
= 1+ e 2 − 2e − jπk − 2e 2 ; for k = 0, 1, 2, 3
5. 55 Digital Signal Processing
Q5.2 Find the DFT of the sequence x(n) = {1, 1, 0, 0}. Also find magnitude and phase sequence.
Solution
−jFe + e I
πk
−j
πk
j
πk
−j
πk
ejθ e− jθ = 1
= 1+ e GH 2
JK
+0+0=e 4 4 4
= e
F πk I
−j
πk
F πk I ; for k = 0, 1, 2, 3
2cosG J = 2cosG J e
4
−j
πk
4
cosθ =
e jθ + e − jθ
H 4K H 4K 2
∴
F πk I
|X(k)| = 2cosG J and ∠X(k) =
πk
; for k = 0, 1, 2, 3
H 4K 4
Q5.3 Compute the DFT of the sequence x(n) = (–1)n for the period N = 16.
Solution
Given that, x(n) = (1)n = {...... 1, 1, 1, 1, 1, 1, ...........}. On evaluating the sequence for
all values of n, it can be observed that x(n) is periodic with periodicity of 2 samples. The DFT of x(n)
has to be computed for the period N = 16. Let us consider the 16-sample of the infinite sequence from
n = 0 to n = 15.
N − 1
1 − CN
The 16-point DFT of x(n) is given by, Cn = ∑
n = 0
1− C
n
15
−j
2πnk 15
−j
πnk 15 F e I
−j
πk
X(k) = ∑ x(n)e
n = 0
16 = ∑ (1)n × e 8 = ∑ GH JK 8
ejθ × e− jθ = 1
n = 0 n = 0
16
e− jθ = cos θ − j sin θ
F
1− G e
I j
πk
H JK 1 − e 8
1 − e
j
πk 16
8 j2πk
= = =
F I j
πk j
πk
j
πk
1 G e
H JK 1 + e 8 1 + e 8 8
πk
1 − cos 2πk j 16 e jθ + e − jθ
= e ; for k = 0, 1, 2, 3,.......15 cosθ =
πk 2
2 cos
16
Solution
∴ y(n) =
1 LM j
πn
Y(0)e0 + Y(1)e 2 + Y(2)e jπn + Y(3)e
j
3 πn
2
OP For interger n,
sinpn = 0.
4 MN PQ
1 1
= 1+ 0 + e jπn + 0 = 1+ cos πn + j sin πn = 0.25(1+ cos πn) ; for n = 0, 1, 2, 3
4 4
Q5.5 Calculate the percentage saving in calculations in a 512-point radix-2 FFT, when compared
to direct DFT.
Solution
Radix-2 FFT
N 512
Number of complex multiplications = log 2 N = × log 2 512
2 2
512 512
= × log 2 29 = × 9 = 2304
2 2
Percentage Saving
Number of additions in radix - 2 FFT
Percentage saving in additions = 100 × 100
Number of additions in direct DFT
4,608
= 100 × 100 = 98.2%
2,61,632
Number of multiplications in radix -2 FFT
Percentage saving in multiplications = 100 × 100
Number of multiplications in direct DFT
2,304
= 100 × 100 = 99.1%
2,62,144
Q5.6 Arrange the 8-point sequence, x(n) = {1, 2, 3, 4, –1, –2, –3, –4} in bit reversed order.
Q5.8 What are direct (or slow) convolution and fast convolution?
The response of an LTI system is given by convolution of input and impulse response.
The computation of the response of the LTI system by convolution sum formula is called slow
convolution because it involves very large number of calculations.
The number of calculations in DFT computations can be reduced to a very large extent by FFT
algorithms. Hence computation of the response of the LTI system by FFT algorithm is called fast
convolution.
The FFT is needed to compute DFT with reduced number of calculations. The DFT is required
for spectrum analysis and filtering operations on the signals using digital computers.
nk
where, WNnk = e− j2π d i N is the phase factor or twiddle factor.
The phase factors are equally spaced around the unit circle at frequency increments of Fs /N where Fs is
the sampling frequency of the time domain signal. This frequency increment or resolution is called bin
spacing. (The X(k) consists of N-numbers of frequency samples whose discrete frequency locations are
given by fk = kFs /N, for k = 0, 1, 2, ... N1).
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 58
clear all
clc
Program 5.2
Write a MATLAB program to perform 16-point DFT of the discrete time sequence
x(n)={1/3,1/3,1/3} and sketch the magnitude and phase spectrum.
clear all
clc
subplot(2,1,1)
stem(Wk,MagXk);
title(Magnitude spectrum)
xlabel(k); ylabel(MagXk)
subplot(2,1,2)
stem(Wk,PhaXk);
title(Phase spectrum)
xlabel(k); ylabel(PhaXk)
OUTPUT
The DFT sequence is,
Xk =
Columns 1 through 7
1.0000 0.8770 - 0.3633i 0.5690 - 0.5690i 0.2252 - 0.5437i
0 - 0.3333i -0.0299 - 0.0723i 0.0976 + 0.0976i
Columns 8 through 14
0.2611 + 0.1081i 0.3333 + 0.0000i 0.2611 - 0.1081i 0.0976 - 0.0976i
-0.0299 + 0.0723i -0.0000 + 0.3333i 0.2252 + 0.5437i
Columns 15 through 16
0.5690 + 0.5690i 0.8770 + 0.3633i
Program 5.3
Write a MATLAB program to perform 8-point DFT of the discrete time sequence
x(n)={2,1,2,1,1,2,1,2} and sketch the magnitude and phase spectrum.
clear all
clc
N = 8; % specify the length of the DFT
j=sqrt(-1);
xn = [2,1,2,1,1,2,1,2]; % input sequence
Xk = zeros (1,N); % initialize output sequence as zeros
OUTPUT
Program 5.4
Write a MATLAB program to perform inverse DFT. Take the frequency domain output
sequence of program 5.3 as input.
clear all
clc
N = 8; % declare the length of the inverse DFT
j=sqrt(-1);
% Xk is input sequence
XK = xk = [12, 1+j*0.4142,0,1+j*2.4142,0,1-j*2.4142,0,1-j*0.4142];
xn = zeros (1,N); %initialize output sequence as zeros
clear all
clc
subplot(2,2,2)
stem(n,Xn)
title(inverse DFT sequence) % Plot the inverse DFT sequence
xlabel(n); ylabel(Xn)
OUTPUT
5.13 Exercises
I. Fill in the blanks with appropriate words
1. In an N-point DFT of a finite duration sequence x(n) of length L, the value of N should be such
that_______.
2. The N-point DFT of a L-point sequence will have a periodicity of _______.
3. The convolution property of DFT says that DFT{x(n) * h(n)} = _______.
4. The N-point DFT of a sequence is given by Z-transform of the sequence at N equally spaced points
around the _______ in z-plane.
5. The convolution by FFT is called _______.
6. The convolution using convolution sum formula is called _______.
7. Appending zeros to a sequence in order to increase its length is called _______.
8. In DFT computation using radix-2 FFT, the value of N should be such that _______.
9. The number of complex additions and multiplications in radix-2 FFT are _______ and _______
respectively.
10. The number of complex additions and multiplications in direct DFT are _______ and _______
respectively.
11. In 8-point DFT by radix-2 FFT there are _______ stages of computations with _______ butterflies
per stage.
12. In _______ butterfly diagram the _______ is multiplied after add-subtract operations.
Answers
1. N ³ L 4. unit circle 7. zero padding 10. N(N–1), N2
2. N-samples 5. fast convolution 8. N = 2m 11. four, four
3. X(k) H(k) 6. slow convolution 9. Nlog2N, (N/2)log2N 12. DIF, phase factor
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 64
II State whether the following statements are True/False
1. The DFT of a sequence is a continuous function of w.
2. The DFT of a signal can be obtained by sampling one period of Fourier transform of the signal.
3. In sampling X(ejw ), the value of sample at w = 0 is same as the value of sample at w=2p.
4. The DFT of even sequence is purely imaginary and DFT of odd sequence is purely real.
5. In a DFT of real sequence, the real component is even and imaginary component is odd.
6. The multiplication of the DFTs of the two sequences is equal to the DFT of the linear convolution of
two sequences.
7. The DFT supports only circular convolution.
8. In FFT algorithm the N-point DFT is decomposed into successively smaller DFTs.
9. In N-point DFT using radix-2 FFT, the decimation is performed m times, where m=log2N.
10. Both DIT and DIF algorithms involves same number of computations.
11. Bit reversing is required for both DIT and DIF algorithms.
Answers
1. False 3. True 5. True 7. True 9. True 11. True
2. True 4. False 6. False 8. True 10. True
N -1 j2 pkn N -1 j2pkn
1 -
N
-
N
c) x(n) = X(n) e d) x(n) = N X(k) e
N n=0 n=0
c) X(k) e N d) X(k) e m N
4. The DFT of product of two discrete time sequences x1(n) and x2(n) is equivalent to,
1 1
a) X1 (k) * X2 (k) b) X1 (k) X2 (k)
N N
1
c) X1 (k) * X*2 (k) d) X1 (k) * X2 (k)
N
5. 65 Digital Signal Processing
5. By correlation property, the DFT of circular correlation of two sequences x(n) and y(n) is,
c) X(k) = X(z) j2 p kn
d) X(k) = X(z) j2p kn
-
z=e N z=e N
7. In an N-point sequence, if N = 16, the total number of complex additions and multiplications using
Radix-2 FFT are,
a) 64 and 80 b) 80 and 64
c) 64 and 32 d) 24 and 12
c) e - j2 p d) e - j2 pkN
9. The phase factors are multiplied before the add and subtract operations in,
10. If X(k) consists of N-number of frequency samples, then its discrete frequency locations are given by,
kFs Fs
a) fk = b) fk =
N N
kN
c) fk = d) fk = N
Fs
Answers
1. c 3. c 5. a 7. c 9. a
2. b 4. a 6. b 8. b 10. a
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 66
IV. Answer the Following questions
1. Define DFT of a discrete time sequence.
2. Define inverse DFT.
3. What is the relation between DTFT and DFT?
4. What is the drawback in Fourier transform and how is it overcome?
5. List any four properties of DFT.
6. State and prove the shifting property of DFT.
7. What is FFT?
8. What is radix-2 FFT?
9. How many multiplications and additions are involved in radix-2 FFT?
10. What is DIT radix-2 FFT?
11. What is phase factor or twiddle factor?
12. Draw and explain the basic butterfly diagram or flow graph of DIT radix-2 FFT.
13. What are the phase factors involved in the third stage of computation in the 8-point DIT
radix-2 FFT?
14. What is DIF radix-2 FFT?
15. Draw and explain the basic butterfly diagram or flow graph of DIF radix-2 FFT.
16. What are the phase factors involved in first stage of computation in 8-point DIF radix-2 FFT?
17. How will you compute inverse DFT using radix-2 FFT algorithm?
18. What is magnitude and phase spectrum?
E5.1 Compute 4-point DFT and 8-point DFT of causal sequence given by, x(n) = 81 ; 0 £ n £ 3
= 0 ; else
E5.2 l q
Compute DFT of the sequence, x(n) = 0, 2, 3, - 1 . Sketch the magnitude and phase spectrum.
E5.3 Compute DFT of the sequence, x(n) = l1, 3, 3, 3q . Sketch the magnitude and phase spectrum.
E5.4 Compute circular convolution of the following sequences using DFT.
l q l
x1 (n) = -1, 2, - 2, - 1 and x2 (n) = 1, - 2, - 1, - 2 q.
A A
E5.5 Compute linear and circular convolution of the following sequences using DFT.
l q
x(n) = 1, 0.2, - 1 , l
h(n) = 1, - 1, 0.2 . q
E5.6 l q
Compute 8-point DFT of the discrete time signal, x(n) = 1, 2, 1, 2, 1, 3, 1, 3 ,
a) using radix-2 DIT FFT and b) using radix-2 DIF FFT.
Also sketch the magnitude and phase spectrum.
5. 67 Digital Signal Processing
E5.7 l q
In an LTI system the input, x(n) = 1, 2, 1 and the impulse response, h(n) = 1, 3 . l q
Determine the response of LTI system by radix-2 DIT FFT.
E5.8 Compute the DFT and plot the magnitude and phase spectrum of the discrete time sequence,
l q
x(n) = 4, 4, 0, 2 , and verify the result using the inverse DFT.
E5.9 Determine the response of LTI system when the input sequence, x(n) = -2, - 1, - 1, 0, 2 by l q
radix 2 DIT FFT. The impulse response of the system is, h(n) = 1, - 1, - 1, 1 . l q
Answers
E5.1 l
4 - point DFT: X(k) = 0.5, 0, 0, 0 q
R0.5— 0, 0.326— - 0.374p, 0, 0.135— - 0.125p,
8 - point DFT: X(k) = S
UV
T 0, 0.135— 0.125p, 0, 0.326— 0.374 pW
E5.2 l
X(k) = 4— 0, 4.243— - 0.75p, 2— 0, 4.243— 0.75p q
X(k) = l4, 4.243, 2, 4.243q
— X( k ) = l0, - 0.75p, 0, 0.75pq — X (k)
p
0.75p
0.75p
0.5p
0.25p
X (k ) 4.243 1
4.243
0
4 2 3 K
-0.25 p
3
2 -0.5 p
2
1 -0.75 p
-0.75 p
-p
0 1 2 3 K
F ig E 5.2.1 : M a g nitu d e sp e ctru m . F ig E 5.2.2 : P h ase spe c trum .
E5.3 l
X(k) = 10— 0, 2—p , 2—p , 2—p q
X(k) = l10, 2, 2, 2q
— X( k ) = l0, p, p, pq
X (k ) — X (k)
10 p p p
p
8
0.75p
6
0.5p
4
2 2 2 0.25p
2
0
1 2 3 4 5 K
0 1 2
K 3
E5.4 x1 ( n) * x2 ( n) = -1, 9, - 3, 3 l q
E5.5 l
x( n) * h(n) = 1, - 0.8, - 1, 1.04, - 0.2 q
x( n) * h( n) = l2.04, - 1, - 1q
X (k ) — X (k)
p
14 p
12 0.75p
10 0.5p 0.5p
0.5p
8 0.25p
6 6
0 5 7
1 2 3 4 6 k
4
-0.25 p
2 1.414 1.414 1.414 1.414
-0.5p
-0.5p -0.5p
0 1 2 3 4 5 6 7 k -0.75p
-p
F ig E 5.6.1 : M a g n itu d e sp e c trum .
F ig E 5.6.2 : P h ase spe c trum .
E5.7 l
y(n) = 1, 5, 7, 3 q
E5.8 X(k) l q
= 10, 4 - j2, - 2, 4 + j2
= l10— 0, 4.472 — - 0.15p, 2—p , 4.472— 0.15pq
X(k) = l10, 4.472, 2, 4.472q
— X(k) = l0, - 0.15p, p, 0.15pq
—X (k)
p p
X (k )
10 0.5p
8 0.15p
6
4.472 4.472 0 1 2 3
k
4
2 -0.15 p
2
-0.5p
0 1 2 3 k
-p
F ig E 5.8.1 : M a g n itu d e spe c trum . F ig E 5.8.2 : P h ase spe c tru m .
E5.9 l
y(n) = -2, 1, 2, 0, 2, - 3, - 2, 1 q
Solution for Exercise Problems E5. 1
Digital Signal Processing - A. Nagoor Kani Chapter 5 - Discrete Fourier Transform (DFT) and
Fast Fourier Transform (FFT)
Solution for Exercise Problems
E5.1. Compute 4-point DFT and 8-point DFT of causal sequence given by,
1
a) x(n) = ; 0≤ n≤ 3
8
=0 else
Solution
By definition,
N−1 2πkn
−j
X(k) = ∑ x(n) e N
n=0
n=0 n=0
π 3π
=
1
+
1 −j 2 k
e +
1 − jπk 1 − j
e + e 2
k
=
1 LM
1 + cos
πk
− j sin
πk
+ cos πk − j sin πk + cos
3π
k − j sin
3π
k
OP
8 8 8 8 8 N 2 2 2 2 Q
For 4-point DFT, the X(k) has to be evaluated for, k = 0, 1, 2, 3.
1
When k = 0 ; X(0) = 1+ cos 0 − jsin0 + cos 0 − jsin0 + cos 0 − jsin0
8
1 4
= 1+ 1 − j0 + 1 − j0 + 1 − j0 = = 0.5
8 8
When k = 1 ; X(1) =
1 LM π π
1 + cos − j sin + cos π − j sin π + cos
3π
− j sin
3π OP
8 N 2 2 2 2 Q
1
= 1+ 0 − j − 1 − j0 + 0 + j = 0
8
1
When k = 2 ; X(2) = 1 + cos π − j sin π + cos 2π − j sin 2π + cos 3π − j sin 3π
8
1
= 1 − 1 − j0 + 1 − j0 − 1 − j0 = 0
8
When k = 3 ; X(3) =
1 LM
1 + cos
3π
− j sin
3π
+ cos 3π − j sin 3π + cos
9π
− j sin
9π OP
8 N 2 2 2 2 Q
1
= 1 + 0 + j − 1 − j0 + 0 − j = 0
8
l
∴ X(k) = 0.5, 0, 0, 0 q
Case (ii) : 8-point DFT, (\
\ N = 8)
7 2 πkn 3 πkn π π 3 πk
−j −j −j k −j k −j
X(k) = ∑ x(n) e
n=0
8
= ∑ x(n)e
n=0
4 = x(0)e0 + x(1) e 4 + x(2)e 2 + x(3) e 4
=
1 LM
1 + cos
πk
− j sin
πk
+ cos
πk
− j sin
πk
+ cos
3πk
− j sin
3πk OP
8 N 4 4 2 2 4 4 Q
1 1 4
When k = 0 ; X(0) = 1+ cos0 − jsin0 + cos0 − jsin0 + cos0 − jsin0 = 1+1 − j0 + 1− j0 + 1 − j0 = = 0.5∠0
8 8 8
When k = 1 ; X(1) =
1 LM π π π π
1 + cos − j sin + cos − j sin + cos
3π
− j sin
3π OP
8 N 4 4 2 2 4 4 Q
1
= 1 + 0.707 − j0 . 707 + 0 − j − 0.707 − j 0 .707
8
1 1177
.
= 1 − j2.414 = 0.125 − j 0 . 302 = 0. 326 ∠ − 1.177 = 0 . 326 ∠ − 0 . 374 π × π = 0.374 π
8 π
E5. 2 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
When k = 2 ; X(2) =
1 LM π π
1 + cos − j sin + cos π − j sin π + cos
3π
− j sin
3π OP
8 N 2 2 2 2 Q
1
= 1+ 0 − j − 1 − j0 + 0 + j = 0
8
When k = 3 ; X(3) =
1 LM
1 + cos
3π
− j sin
3π
+ cos
3π
− j sin
3π
+ cos
9π
− j sin
9π OP
8 N 4 4 2 2 4 4 Q
1
= 1 − 0.707 − j0 . 707 + 0 + j + 0.707 − j 0 . 707
8
1
= 1 − j0.414 = 0.125 − j0 . 052 = 0 .135 ∠ − 0.394 = 0.135 ∠ − 0 .125 π 0.394
8 × π = 0125
. π
π
1
When k = 4 ; X(4) = 1+ cos π − j sin π + cos 2π − j sin 2π + cos 3π − j sin 3π
8
1
1 − 1 − j0 + 1 − j0 − 1 + j0 = 0
=
8
1
When k = 5 ; X(5) = 1 + cos
LM
5π
− j sin
5π
+ cos
5π
− j sin
5π
+ cos
15π
− j sin
15π OP
8 N
4 4 2 2 4 4 Q
1
= 1 − 0.707 + j0 . 707 + 0 − j + 0.707 + j 0 . 707
8
1
= 1 + j0.414 = 0.125 + j0 . 052 = 0 .135 ∠0.394 = 0.135 ∠0.125π
8
When k = 6 ; X(6) =
1 LM
1 + cos
3π
− j sin
3π
+ cos 3π − j sin 3π + cos
9π
− j sin
9π OP
8 N 2 2 2 2 Q
1
= 1 + 0 + j − 1 − j0 + 0 − j = 0
8
When k = 7 ; X(7) =
1 LM
1 + cos
7π
− j sin
7π
+ cos
7π
− j sin
7π
+ cos
21π
− j sin
21π OP
8 N 4 4 2 2 4 4 Q
1 1
= 1 + 0.707 + j0 . 707 + j − 0.707 + j 0 . 707 = 1 + j 2.414
8 8 1177
.
× π = 0.374π
= 0.125 + j0 .302 = 0 . 326 ∠1.177 = 0 .326 ∠0.374 π π
The 8-point DFT sequence is given by,
l
X(k ) = 0.5 ∠0, 0.326 ∠ − 0.374 π, 0, 0.135 ∠ − 0.125 π, 0, 0.135 ∠0 .125π, 0, 0.326 ∠0.374 π q
∴ X(k) = l0.5, 0.326, 0, 0.135, 0, q
0.135, 0, 0.326
∠X(k ) = l0, − 0.374 π, 0, − 0.125 π, 0, 0.125 π, 0, 0.374 πq
E5.2. Compute DFT of the sequence, x(n) = {0, 2, 3, –1}. Sketch the magnitude and phase spectrum.
Solution
By definition, the 4 point DFT is given by,
3 2 πkn 3 π
−j − j kn
X(k) = ∑ x(n) e 4 = ∑ x(n) e 2
n=0 n=0
π 3π
−j k −j k
= x(0) + x(1) e 2 + x(2)e − jπk + x(3) e 2
LM
= 0 + 2 cos
πk
− j sin
πk OP
+ 3 cos πk − j sin πk − cos
3πk FG
− j sin
3πk IJ
N 2 2 Q 2 H 2 K
πk πk 3πk 3πk
= 2cos − j 2 sin + 3 cos πk − j 3 sin πk − cos + j sin
2 2 2 2
When k = 0 ; X(0) = 2 cos 0 − j 2 sin 0 + 3 cos 0 − j 3 sin 0 − cos 0 + j sin 0
= 2 − j0 + 3 − j0 − 1 + j0 = 4 = 4 ∠0
π π 3π 3π
When k = 1 ; X(1) = 2 cos − j 2 sin + 3 cos π − j 3 sin π − cos + j sin
2 2 2 2
2.356
= 0 − j2 − 3 − j0 − 0 − j = −3 − 3j = 4. 243 ∠ − 2.356 = 4.243 ∠ − 0.75π × π = 0.75π
π
When k = 2 ; X(2) = 2 cos π − j2sin π + 3cos 2π − j3sin2π − cos 3π + jsin3π
= −2 − j0 + 3 − j0 + 1 + j0 = 2 = 2 ∠0
3π 3π 9π 9π
When k = 3 ; X(3) = 2 cos − j 2 sin + 3 cos 3π − j 3 sin 3π − cos + j sin
2 2 2 2
= 0 + j2 − 3 − j0 − 0 + j = −3 + 3j = 4. 243 ∠ 2 .356 = 4.243 ∠0.75 π
Solution for Exercise Problems E5. 3
l
∴ X(k) = 4 ∠0, 4.243 ∠ − 0.75 π, 2 ∠0, 4.243 ∠0.75 π q
X(k) = l4, 4.243, 2, 4.243q
∠ X(k ) = l0, − 0.75π, 0, 0.75πq
∠X (k )
π
X (k ) 4.243 4.243 0.75π
0.75π
4
0.5π
3
2 0.25π
2
0
1 1 2 3 k
−0.25π
0 1 2 3
k −0.5π
F ig 1 : M a g n itud e sp e ctru m . −0.75 π −0.75 π
−π
F ig 2 : P h ase sp ectru m .
For integer k,
= 1+ 3 cos
LM πk
− j sin
πk OP + 3 cos πk − j sin πk + 3 LMcos 3πk − j sin 3πk OP sin pk = 0.
N 2 2 Q N 2 2 Q
πk πk 3 πk 3 πk
= 1 + 3 cos − j 3 sin + 3 cos πk + 3 cos − j 3 sin
2 2 2 2
When k = 0 ; X(0) = 1+ 3 cos0 − j3sin0 + 3cos0 + 3cos0 − jsin0
= 1+ 3 − j0 + 3 + 3 − j0 = 10 = 10 ∠0
π π 3π 3π
When k = 1 ; X(1) = 1+ 3 cos − j 3 sin + 3 cos π + 3 cos − j 3 sin
2 2 2 2
= 1+ 0 − j3 − 3 + 0 + j3 = −2 = 2 ∠π
When k = 2 ; X(2) = 1+ 3cos π − j3sin π + 3cos 2π + 3cos 3π − j3sin3π
= 1 − 3 − j0 + 3 − 3 − j0 = −2 = 2 ∠π
3π 3π 9π 9π
When k = 3 ; X(3) = 1+ 3cos − j 3 sin + 3 cos 3π + 3 cos − j 3 sin
2 2 2 2
= 1+ 0 + j3 − 3 + 0 − j3 = −2 = 2 ∠π
∴ l
X(k) = 10 ∠0, 2 ∠π, 2 ∠π, 2 ∠π q
X(k) = l10, 2, 2, 2 q
∠X(k) = l0, π, π, π q
X(k)
12
10 ∠X (k )
π π π
8 π
6 0.75π
4 0.5π
2 2 2
2 0.25π
1 2 3 k 0 1 2 3 k
F ig 1 : M a g n itu d e sp ectru m . F ig 2 : P h a se sp ectrum .
E5. 4 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
E5.4. Compute circular convolution of the following sequences using DFT.
x1(n) = {–1, 2, –2, –1} and x2(n) = {1, –2, –1, –2}
- -
Solution
l
Given that, x1(n) = −1, 2, − 2, − 1 q
A
The 4-point DFT of x1(n) is,
4 −1 2 πnk 3 πnk
−j −j
X1(k ) = ∑ x (n) e
n=0
1
4 = ∑ x (n) e
n=0
1
2 ; k = 0, 1, 2, 3
πk 3 πk
−j −j
= x1(0) e0 + x1(1) e 2 + x1(2) e − j πk + x1(3) e 2
πk 3 πk
−j −j
= −1 + 2 e 2 − 2e − j πk − e 2
= −1+ 2 cos
FG πk
− j sin
πk IJ b
− 2 cos πk − j sin πk − cos
3 πk
− j sin
3πk
g FGH IJ
H 2 2 K 2 2 K For integer k,
cosπk πk 3 πk 3 πk
= −1+ 2 − j2 sin − 2 cos πk − cos + j sin sin πk = 0.
2 2 2 2
π×0 π×0 3π × 0 3π × 0
When k = 0 ; X(0) = −1 + 2cos − j 2 sin − 2 cos π × 0 − cos + j sin = −2
2 2 2 2
π ×1 π ×1 3π × 1 3π × 1
When k = 1 ; X(1) = −1 + 2 cos − j 2 sin − 2 cos π × 1 − cos + j sin = 1 − j3
2 2 2 2
π×2 π×2 3π × 2 3π × 2
When k = 2 ; X(2) = −1 + 2 cos − j 2 sin − 2 cos π × 2 − cos + j sin = −4
2 2 2 2
π×3 π×3 3π × 3 3π × 3
When k = 3 ; X(3) = −1 + 2 cos − j 2 sin − 2 cos π × 3 − cos + j sin = 1+ j3
2 2 2 2
l
∴ X1(k ) = −2, 1 − j 3, − 4, 1+ j3 q
l
Given that, x2 (n) = 1, − 2, − 1, − 2 q
A
The 4-point DFT of x2(n) is,
4−1 2 πnk 3 πnk
−j −j
X 2 (k ) = ∑ x2 (n) e 4 = ∑ x2 (n) e 2 ; k = 0, 1, 2, 3
n=0 n=0
πk 3 πk
−j −j
= x 2 (0) e0 + x 2 (1) e 2 + x 2 (2) e − jπk + x 2 (3) e 2
πk 3 πk
−j −j
= 1− 2 e 2 − e − jπk − 2 e 2
= 1 − 2 cos
FG πk
− j sin
πk IJ b
− cos πk − j sin πk − 2 cos
3 πk
− j sin
3πk
g FGH IJ For integer k,
H 2 2 K 2 2 K sin πk = 0.
πk πk 3πk 3 πk
= 1 − 2cos + j 2 sin − cos πk − 2 cos + j 2 sin
2 2 2 2
π×0 π×0 3π × 0 3π × 0
When k = 0 ; X(0) = 1 − 2 cos + j 2 sin − cos π × 0 − 2 cos + j 2 sin = −4
2 2 2 2
π ×1 π ×1 3π × 1 3π × 1
When k = 1 ; X(1) = 1 − 2cos + j 2 sin − cos π × 1 − 2 cos + j 2 sin =2
2 2 2 2
π×2 π×2 3π × 2 3π × 2
When k = 2 ; X(2) = 1 − 2cos + j 2 sin − cos π × 2 − 2 cos + j 2 sin =4
2 2 2 2
π×3 π×3 3π × 3 3π × 3
When k = 3 ; X(3) = 1 − 2cos + j 2 sin − cos π × 3 − 2 cos + j2 sin =2
2 2 2 2
l
∴ X 2 (k ) = −4, 2, 4, 2 q
Let, X3(k) = X1(k) X2(k)
l q
DFT x1(n) ∗ x 2 (n) = X1(k ) X 2 (k )
l
∴ x1(n) ∗ x 2 (n) = DFT −1 X1(k ) X 2 (k ) = DFT −1 X 3 (k ) = x 3 (n) q m r
By definition of inverse DFT,
1 LM j
2 πn
j
4 πn
j
6 πn OP
= X 3 (0) e0 + X 3 (1) e 4 + X3 (2) e 4 + X3 (3) e 4
4 MN PQ
=
1 1
× 8 + (2 − j6) cos
πn
+ j sin
πnFG1
− × 16 cos πn + j sin πn +
1 IJ
2 + j6 b g b g FGH cos 32πn + j sin 32πn IJK
4 4 2 2 H4 4 K
For integer n,
FG 2 − j6 IJ FG cos πn + j sin πnIJ − 4 cos πn + 2 + j6 FG cos 3πn + j sin 3πnIJ
= 2+
H 4 KH 2 2K 4 H 2 2 K sin nπ = 0.
(2 − j6) F
When n = 0 ; x (0) = 2 +
3
4
GH cos π 2× 0 + j sin π 2× 0 IJK − 4 cos π × 0 + 2 +4 j6 FGH cos 3π2× 0 + j sin 3π2× 0 IJK = −1
(2 − j6) F
When n = 1 ; x (1) = 2 +
3
4
GH cos π 2× 1 + j sin π 2× 1IJK − 4 cos π × 1+ 2 +4 j6 FGH cos 3π2× 1 + j sin 3π2× 1IJK = 9
(2 − j6) F
When n = 2 ; x (2) = 2 +
3
4
GH cos π 2× 2 + j sin π 2× 2 IJK − 4 cos π × 2 + 2 +4 j6 FGH cos 3π2× 2 + j sin 3π2× 2 IJK = −3
(2 − j6) F
When n = 3 ; x (3) = 2 +
3
4
GH cos π 2× 3 + j sin π 2× 3 IJK − 4 cos π × 3 + 2 +4 j6 FGH cos 3π2× 3 + j sin 3π2× 3 IJK = 3
∴ x (n) = x (n) ∗ x (n) = l−1, 9, − 3, 3q
3 1 2
E5.5. Compute linear and circular convolution of the following sequences using DFT.
x(n) = { 1, 0.2, –1 }, h(n) = {1, –1, 0.2 }
Solution
Linear Convolution
4 2 πkn 2 2 πkn
−j −j
X(k ) = ∑ x(n) e 5 = ∑ x(n) e 5 ; k = 0, 1, 2, 3, 4
n= 0 n= 0
2 πk 4 πk
−j −j
= x(0) e0 + x(1)e 5 + x(2)e 5
= 1 + 0.2 cos
FG 2πk
− j sin
2πk
− cos
4 πk IJ FG
− j sin
4 πk IJ
H 5 5 5 K H 5 K
2πk 2πk 4πk 4πk
= 1+ 0.2 cos − j0.2 sin − cos + j sin
5 5 5 5
2π × 0 2π × 0 4π × 0 4π × 0
When k = 0 ; X(0) = 1+ 0.2 cos − j 0.2 sin − cos + j sin
5 5 5 5
= 0.2 + j0
2π × 1 2π × 1 4π × 1 4π × 1
When k = 1 ; X(1) = 1+ 0.2 cos − j 0.2 sin − cos + j sin
5 5 5 5
= 1.871+ j0.398
E5. 6 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
2π × 2 2π × 2 4π × 2 4π × 2
When k = 2 ; X(2) = 1+ 0.2 cos − j 0.2 sin − cos + j sin
5 5 5 5
= 0.529 − j1.069
2π × 3 2π × 3 4π × 3 4π × 3
When k = 3 ; X(3) = 1+ 0.2 cos − j 0.2 sin − cos + j sin
5 5 5 5
= 0.529 + j1.069
2π × 4 2π × 4 4π × 4 4π × 4
When k = 4 ; X(4) = 1+ 0.2 cos − j 0.2 sin − cos + j sin
5 5 5 5
= 1.871 − j0.398
l
∴ X(k) = 0.2 + j0, 1.871+ j0.398, 0.529 − j1.069, 0.529 + j1.069, 1.871 − j0.398 q
By definition, the 5-point DFT of h(n) is,
4 2 πkn 2 2 πkn
−j −j
H(k ) = ∑ h(n) e 5 = ∑ h(n) e 5 ; k = 0, 1, 2, 3, 4
n= 0 n= 0
2 πk 4 πk
−j −j
= h(0) e0 + h(1)e 5 + h(2)e 5
= 1 − cos
FG 2 πk
− j sin
2πk
+ 0.2 cos
IJ
4 πk
− j sin
4 πk FG IJ
H 5 5 5 K 5 H K
2πk 2πk 4 πk 4πk
= 1 − cos + j sin + 0.2 cos − j 0.2 sin
5 5 5 5
2π × 0 2π × 0 4π × 0 4π × 0
When k = 0 ; H(0) = 1 − cos + j sin + 0.2 cos − j 0.2 sin
5 5 5 5
= 0.2 + j0
2π × 1 2π × 1 4π × 1 4π × 1
When k = 1 ; H(1) = 1 − cos + j sin + 0.2 cos − j 0.2 sin
5 5 5 5
= 0.529 + j0.834
2π × 2 2π × 2 4π × 2 4π × 2
When k = 2 ; H(2) = 1 − cos + j sin + 0.2 cos − j 0.2 sin
5 5 5 5
= 1.871 + j0.778
2π × 3 2π × 3 4π × 3 4π × 3
When k = 3 ; H(3) = 1 − cos + j sin + 0.2 cos − j 0.2 sin
5 5 5 5
= 1.871 − j0.778
2π × 4 2π × 4 4π × 4 4π × 4
When k = 4 ; H(4) = 1 − cos + j sin + 0.2 cos − j 0.2 sin
5 5 5 5
= 0.529 − j0.834
l
∴ H(k) = 0.2 + j0, 0.529 + j0.834, 1.871 + j0.778, 1.871 − j0.778, 0.529 − j0.834 q
Let, Y(k) = X(k) H(k) for, k = 0, 1, 2, 3, 4.
l
∴ x(n) ∗ h(n) = DFT −1 X(k ) H(k) = DFT −1 Y(k ) = y(n) q l q
Solution for Exercise Problems E5. 7
By definition of inverse DFT,
N −1 2 πnk 4 2 πnk
1 j 1 j
y(n) =
N ∑ Y(k ) e N =
5 ∑ Y(k ) e 5 ; n = 0, 1, 2, 3, 4
k =0 k =0
2 πn 4 πn 6 πn 8 πn
1 1 j 1 j 1 j 1 j
= Y(0) e0 + Y(1)e 5 + Y(2)e 5 + Y(3)e 5 + Y(4)e 5
5 5 5 5 5
=
1
5
× 0.04 +
1
5
g FGH
b
0.658 + j1.771 cos
2 πn
5
+ j sin
2πn
5
IJ b
+
K
1
5
1.821 − j1.589 g FGH cos 45πn + j sin 45πn IJK
1 F 6πn + j sin 6πn IJ + 1 b0.658 − j1.771g FG cos 8πn + j sin 8πn IJ
+ b1.821 + j1.589g G cos
5 H 5 5 K 5 H 5 5 K
= 0.008 + b0.132 + j0.354g bcos 0.4 πn + j sin 0.4 πng + b0.364 − j0.318g bcos 0.8πn + j sin 0.8πng
+ b0.364 + j0.318g bcos1. 2πn + j sin1. 2πng + b0.132 − j0.354g bcos16 . πn + j sin1.6πng
When n = 0 ; y(0) = 0.008 + b0.132 + j0.354g bcos0 + jsin0g + b0.364 − j0.318g bcos0 + jsin0g
When n = 1 ; y(1) = 0.008 + 0.132 + j0.354 b g bcos0.4π + jsin0.4πg + b0.364 − j0.318g bcos 0.8π + jsin0.8πg
+ b0.364 + j0.318g bcos1.2π + jsin1.2πg + b0.132 − j0.354g bcos16. π + jsin1.6πg
When n = 2 ; y(2) = 0.008 + 0.132 + j0.354 b g bcos0.8π + jsin0.8πg + b0.364 − j0.318g bcos16. π + jsin1.6πg
+ b0.364 + j0.318g bcos2.4π + jsin2.4πg + b0.132 − j0.354g bcos 3.2π + jsin3.2πg
When n = 3 ; y(3) = 0.008 + 0.132 + j0.354 b g bcos1.2π + jsin1.2πg + b0.364 − j0.318g bcos 2.4π + jsin2.4πg
+ b0.364 + j0.318g bcos 3.6π + jsin3.6πg + b0.132 − j0.354g bcos 4.8π + jsin4.8πg
When n = 4 ; y(4) = 0.008 + 0.132 + j0.354 b g bcos1.6π + jsin1.6πg + b0.364 − j0.318g bcos 3.2π + jsin3.2πg
+ b0.364 + j0.318g bcos 4.8π + jsin4.8πg + b0.132 − j0.354g b cos 6.4π + jsin6.4πg
= 1 + 0.2 cos
FG 2 πk
− j sin
2πk
− cos
4 πk IJ FG
− j sin
4 πk IJ
H 3 3 3 K H 3 K
2πk 2πk 4 πk 4πk
= 1+ 0.2 cos − j0.2 sin − cos + j sin
3 3 3 3
E5. 8 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
When k = 0 ; X(0) = 1+ 0.2 cos 0 − j 0.2 sin 0 − cos 0 + j sin 0 = 0.2
2π 2π 4π 4π
When k = 1 ; X(1) = 1+ 0.2 cos − j 0.2 sin − cos + j sin = 1.4 − j1.039
3 3 3 3
4π 4π 8π 8π
When k = 2 ; X(2) = 1+ 0.2 cos − j 0.2 sin − cos + j sin = 1.4 + j1.039
3 3 3 3
l
∴ X(k) = 0.2, 1.4 − j1.039, 1.4 + j1.039 q
Given that, h(n) = {1, –1, 0.2}
3 −1 2 πnk 2 2 πnk
−j −j
H(k ) = ∑ h(n) e 3 = ∑ h(n) e 3 ; k = 0, 1, 2
n= 0 n= 0
2 πk 4 πk
−j −j
= h(0) e0 + h(1)e 3 + h(2)e 3
= 1 − cos
FG 2πk
− j sin
2 πk
+ 0.2 cos
4 πk IJ
− j sin
4 πk FG IJ
H 3 3 3 K 3 H K
2 πk 2πk 4 πk 4 πk
= 1 − cos + j sin + 0.2 cos − j 0.2 sin
3 3 3 3
l
∴ x(n) ∗ h(n) = DFT −1 X(k ) H(k) = DFT −1 Y(k ) = y(n) q l q
By definition of inverse DFT,
N −1 2 πnk 2 2 πnk
1 j 1 j
y(n) =
N
∑ Y(k ) e N =
3
∑ Y(k ) e 3
; n = 0, 1, 2
k =0 k =0
2 πn 4 πn
1 1 j 1 j
= Y(0) e0 + Y(1)e 3 + Y(2)e 3
3 3 3
=
0.04 3.04
+
FG cos 2πn + j sin 2πn IJ + 3.04 FG cos 4πn + j sin 4πn IJ
3 3 H 3 3 K 3 H 3 3 K
2πn 2 πn 4πn 4 πn
= 0.013 + 1.013 cos + j1.013 sin + 1.013 cos + j1.013 sin
3 3 3 3
(a) using radix-2 DIT FFT and (b) using radix-2 DIF FFT.
Input = { 1, 1, 1, 1, 2, 3, 2, 3 }
x (4) = 1 1 −1 = 0 x (5) = 3 2 − 3 = −1
x (6) = 1 1 −1 = 0 x (7) = 3 2 − 3 = −1
Input = { 2, 0, 2, 0, 5, –1, 5, –1 }
1 1
2 2+2=4
1 W40 = 1
1 1
0 0 + 0( −j) = 0 W41 = − j
1
1
1 −1
2 2 −2 = 0
1
−j
0 0 − 0( −j) = 0
−1
1 1
5 5 + 5 = 10
1
1 1
−1 −1 + ( −1)( −j) = −1 + j
1
1
1 −1
5 5 −5 = 0
1
−j
−1 −1 − ( −1)( −j) = −1 − j
−1
1 1
4 4 + 10 = 14 = X(0)
1
W80 = 1
1 1
0 0 + (−1 + j)(0.707 − j0.707) = j1.414 = X(1) W81 = 0.707 − j 0.707
1
W82 = − j
1 1 0 + 0(−j) = 0 = X(2)
0 W83 = −0.707 − j 0.707
1
1 1
0 0 + (−1 − j)(−0.707 − j0.707) = j1.414 = X(3)
1
1
1
1
10 4 − 10 = −6 = X(4)
−1
0.707
−j0.707 1
−1
−1 + j 0 − (−1 + j)(0.707 − j0.707) = −j1.414 = X(5)
−j 1
−1
0 0 − 0(−j) = 0 = X(6)
−0.707
−j0.707 1
−1
−1 − j 0 − (−1− j)(−0.707 − j0.707) = −j1.414 = X(7)
Input sequence = { 1, 2, 1, 2, 1, 3, 1, 3 }
1 1
x(0) = 1 1+1=2 W80 = 1
1
W81 = 0.707 − j 0.707
1
x(1) = 2 2+3=5
1
W82 = − j
1
W83 = −0.707 − j 0.707
1
x(2) = 1 1+1=2
1
1
1
x(3) = 2 2+3=5
1
1
1 1
x(4) = 1 (1 − 1) = 0
0.707
−j0.707
1
x(5) = 3 (2 − 3)(0.707 − j0.707) = −0.707 + j0.707
1 −j
x(6) = 1 (1 − 1)( −j) = 0
−0.707
1 −j0.707
x(7) = 3 (2 − 3)( −0.707 − j0.707) = 0.707 + j0.707
1 1 1 1
5 5 + 5 =10 −0.707 + j0.707 ( −0.7 07 + j0.707) + (0.707 + j0.707) = j1.414
1 1
1 1
−1 1 −1 1
2 (2 − 2) = 0 0 0 −0 = 0
1 1
−j −j
5 (5 − 5)( −j) = 0 0.707 + j0.707 [(−0.707 + j0.707) − (0.7 07 + j0.707)](−j) = j1.414
−1 −1
12 0.75π
10 0.5π 0.5π
0.5π
8 0.25π
6 6
0 5 7
1 2 3 4 6 k
4
−0.25π
2 1.414 1.414 1.414 1.414
−0.5π
−0.5π −0.5π
0 1 2 3 4 5 6 7 k −0.75π
E5.7. In an LTI system the input, x(n) = { 1, 2, 1 } and the impulse response, h(n) = { 1, 3 }. Determine the response of LTI
system by radix-2 DIT FFT.
Solution
Response, y(n) = x(n) * h(n) [linear convolution]
Given that, x(n) = { 1, 2, 1 } , h(n) = { 1, 3 }
Here, the length of x(n) is 3 and length of h(n) is 2.
\ Length of y(n) = 3 + 2 –1 = 4
Let us convert x(n) and h(n) to 4-point sequence by appending zeros.
\ x(n) = { 1, 2, 1, 0 } , h(n) = {1, 3, 0, 0 }
E5. 12 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
Now, y(n) = x(n) * h(n)
On taking DFT,
y(n) = DFT {x(n) * h(n)} Using convolution theorem.
\ Y(k) = X(k) H(k)
On taking inverse DFT,
l
y(n) = DFT −1 X(k ) H(k ) = DFT −1 Y(k ) q l q
Step - 1 : Determine X(k)
First Stage
x(0)=1 1+1=2
x(n) x(n)
(Normal) (Bit reversed)
x(3)=0 2−0=2
Output = {2, 0, 2, 2}
Second Stage
1 1
2 2 + 2 = 4 = X(0)
1
1 1
0 0 + 2(−j) = −j2 = X(1)
1
1
1 −1
2 2 − 2 = 0 = X(2)
1
−j
2 0 − 2( −j) = j2 = X(3)
−1
1 1+0= 1
h(n) h(n)
(Normal) (Bit reversed)
h(0) = 1 h(0) = 1
0 1 −0 = 1
h(1) = 3 h(2) = 0
0 3 −0 = 3
1
−j
3 1 − 3( −j) = 1 + j3
−1
l
∴ Y(k) = 16, − 6 − j2, 0, − 6 + j2 q
Step - 4 : Inverse DFT of Y(k)
First Stage
Y(k) Y(k)
16 16 + 0 = 16
(Normal) (Bit reversed)
16 − 0 = 16
Y(0) = 16 Y(0) = 16
0
Y(1) = –6 – j2 Y(2) = 0
−6 − j2 ( −6 − j2) + ( −6 + j2) = −12
Y(2) = 0 Y(1) = –6 – j2
Y(3) = –6 + j2 Y(3) = –6 + j2
−6 + j2 ( −6 − j2) − ( −6 + j2) = −j4
0 ∗
dW i = 1
4
Second Stage
1 1
16 16 + ( −12) = 4 = 4y (0)
1
1 1
16 16 + ( −j4)(j) = 20 = 4y (1)
1
1
1 −1
−12 16 − ( −12) = 28 = 4y (2)
1
+j
−j4 16 − (−j4)(j) = 12 = 4y (3)
−1
y(n) = {1, 5, 7, 3}
E5.8. Compute the DFT and plot the magnitude and phase spectrum of the discrete time sequence, x(n) = {4, 4, 0, 2}, and
verify the result using the inverse DFT.
Solution
I. DFT of x(n)
πk 3 πk
−j −j
= x(0)e0 + x(1) e 2 + x(2) e− j πk + x(3) e 2
FG
= 4 + 4 cos
πk
− j sin
πk IJ
+ 0 + 2 cos
3 πk FG
− j sin
3πk IJ
H 2 2 K 2 H 2 K
πk πk 3πk 3πk
= 4 + 4 cos − j 4 sin + 2 cos − j 2 sin
2 2 2 2
E5. 14 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
π×0 π×0 3π × 0 3π × 0
When k = 0 ; X(0) = 4 + 4 cos − j 4 sin + 2 cos − j 2 sin
2 2 2 2
= 10 = 10 ∠0
π ×1 π ×1 3π × 1 3π × 1 0.464
When k = 1 ; X(1) = 4 + 4 cos − j 4 sin + 2 cos − j 2 sin × π = 0.15 π
2 2 2 2 π
= 4 − j2 = 4.472 ∠ − 0.464 = 4.472 ∠ − 0.15 π
π×2 π×2 3π × 2 3π × 2
When k = 2 ; X(2) = 4 + 4 cos − j 4 sin + 2 cos − j 2 sin
2 2 2 2
= −2 = 2 ∠π
π×3 π×3 3π × 3 3π × 3
When k = 3 ; X(3) = 4 + 4 cos − j 4 sin + 2 cos − j 2 sin
2 2 2 2
= 4 + j2 = 4.472 ∠0.464 = 4.472 ∠0.15 π
l q
∴ X(k) = 10, 4 − j2, − 2, 4 + j2
∴ X(k) = l10 ∠0, 4.472 ∠ − 0.15 π, 2 ∠π, 4.472 ∠0.15 πq
∠X (k)
π π
X (k)
10 0.5π
8 0.15π
6
4.472 4.472 0
1 2 3
k
4
2 −0.15π
2
−0.5π
0 1 2 3 k
−π
F ig 1 : M a g n itu d e spe c trum . F ig 2 : P h ase spe c tru m .
l
X(k ) = 10, 4 − j2, − 2, 4 + j2 q
The 4-point inverse DFT of x(n) is,
4−1 2 πnk πnk
1 j 1 3 j
x(n) =
4 ∑ X(k) e
k= 0
4 =
4 k =0 ∑
X(k ) e 2 ; for n = 0, 1, 2, 3
πn 3 πn
1 1 j 1 1 j
= X(0) e0 + X(1) e 2 + X(2) e jπn + X(3) e 2
4 4 4 4
=
1
4
1
× 10 + 4 − j2 cos
4
πn
b
2
+ j sin
πn
2
1
4K g FGH
IJ b gb 1
4
g b g FGH
+ −2 cos πn + j sin πn + 4 + j2 cos
3 πn
2
+ j sin
3 πn
2
IJ
K For integer k,
sin pn = 0.
F πn + jsin πn IJ − 0.5 cos πn + b1+ j0.5g FG cos 3πn + j sin 3πn IJ
= 2.5 + b1 − j 0.5g G cos
H 2 2K H 2 2 K
\ Length of y(n) = 5 + 4 –1 = 8
Let, DFT {x(n)} = X(k) ; DFT {h(n)} = H(k) ; DFT {y(n)} = Y(k) and Y(k) = X(k) H(k)
x(1) = –1 x(4) = 2
x (4) = 2 −2 − 2 = −4 x (5) = 0 −1 − 0 = −1
x(2) = –1 x(2) = –1
x(4) = 2 x(1) = –1
x (6) = 0 −1 − 0 = −1 x (7) = 0 0− 0 = 0
x(5) = 0 x(5) = 0
x(6) = 0 x(3) = 0
1
−j
−1 −4 − ( −1)( −j) = −4 −j
−1
1 1
−1 −1 + 0 = −1
1
1 1
−1 −1 + 0( −j) = −1
1
1
1 −1
0 −1 − 0 = −1
1
−j
0 −1 − 0( −j) = −1
−1
1 1
−1 −1 + (−1) = −2 = X(0)
W80 = 1
1
1
1
W81 = 0.707 − j0.707
−4 + j (−4 + j) + (−1)(0.707 − j0.707) = −4.707 + j1.707 = X(1)
W82 = − j
1
1 1 W83 = −0.707 − j0.707
1 1 + (−1)(−j) = 1 + j = X(2)
1
1 1
−4 − j (−4 − j) + (−1)(−0.707 − j0.707) = −3.293 − j0.293 = X(3)
1
1
1
1
−1 −1 − (−1) = −2 = X(4)
−1
0.707
−0.707
1
−1
−1 (−4 + j) − (−1)(0.707 − j0.707) = −3.293 + j0.293 = X(5)
−j 1
−1
−1 1 − (−1)(−j) = 1 − j = X(6)
− 0.707
−0.707 1
−1
−1 (−4 − j) − (−1)(−0.707 − j0.707) = −4.707 − j1.707 = X(7)
\ X(k) {–2, –4.707 + j1.707, 1 + j, –3.293 –j0.293, 0, –3.293 + j0.293, 1 – j, –4.707 – j1.707}
Step - 2 : Find H(k)
First Stage
1 1 1 1
1 1 + (−1) = 0 −1 −1 + 1 = 0
1 1
1 1 1 1
1 1 + (−1)(−j) = 1 + j −1 −1 + (1)(−j) = −1 − j
1 1
1 1
1 −1 1 −1
−1 1 −1 − 1 = −2
1 1
−j −j
−1 1 − (− 1)(− j) = 1 − j 1 −1 − (1)(− j) = −1 + j
−1 −1
1
1 +j
1
(1 + j) + ( −1 − j) 0.707 − j0.707 = −0.414 + j = H(1) W80 = 1
1
W81 = 0.707 − j0.707
1 1
2 2 + (−2)(−j) = 2 + j2 = H(2) W82 = − j
1
W83 = −0.707 − j0.707
1
1
1−j (1 − j) + (−1 + j) −0.707 − j0.707 = 2.414 − j = H(3)
1
1
1 1
0 0 − 0 = 0 = H(4)
0.707
− j0.707 1
−1 − j 1 + j − −1 − j 0.707 − j0.707 = 2.414 + j = H(5)
−j 1
−2 2 − (−2)(−j) = 2 − j2 = H(6)
−0.707
− j0.707 1
−1 + j 1 − j − −1 + j −0.707 − j0.707 = −0.414 − j = H(7 )
Input = { 0, 0, j4, – j4, 0.242 – j5.414, –8.242 – j2.586, –8.242 + j2.586, 0.242 + j5.414}
Y(0) = 0 0+0=0
Y(k) Y(k)
(Normal) (Bit reversed)
Y(4) = 0 0 −0 = 0
Y(0) = 0 Y(0) = 0
Y(2) = j4 j4 + (−j4) = 0 Y(1) = 0.242 – j5.414 Y(4) = 0
Y(2) = j4 Y(2) = j4
Y(6) = −j4 j4 − (−j4) = j8 Y(3) = –8.242 + j2.586 Y(6) = –j4
Y(4) = 0 Y(1) = 0.242 – j5.414
Y(1) = 0.242 − j5.414 (0.242 − j5.414) + ( −8.242 − j2.586) = −8 − j8
Y(5) = –8.242 –j2.586 Y(5) = –8.242 – j2.586
Y(6) = –j4 Y(3) = –8.242 + j2.586
Y(5) = −8.242 − j2.586 (0.242 − j5.414) − (−8.242 − j2.586) = 8.484 − j2.828
Y(7) = 0.242 + j5.414 Y(7) = 0.242 + j5.414
l
Output = 0, 0, 0, j8, − 8 − j8, 8.484 − j2.828, − 8 + j8, − 8.484 − j2.828 q
E5. 18 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
Second stage computation 0 ∗
dW i = 1
4
l
Input = 0, 0, 0, j8, − 8 − j8, 8.484 − j2.828, − 8 + j8, − 8.484 − j2.828 q 1 ∗
1 1 1 1
dW i = j
4
0 0+0=0 −8 − j8 (−8 − j8) + (−8 + j8) = −16
1 1
1 1 1 1
0 0 + j8(j) = −8 8.484 − j2.828 (8.484 − j2.828) + (−8.484 − j2.828)j
1 1 = 11.312 − j11.312
1 1
1 −1 1 −1
0 0−0 =0 −8 + j8 (−8 − j8) − (−8 + j8) = −j16
1 1
j j
j8 0 − j8(j) = 8 −8.484 − j2.828 (8.484 − j2.828) − (−8.484 − j2.828)j
−1 −1 = 5.656 + j5.656
l
Output = 0, − 8, 0, 8, − 16, 11.312 − j11.312, − j16, 5.656 + j5.656 q
Third stage computation
l
Input = 0, − 8, 0, 8, − 16, 11.312 − j11.312, − j16, 5.656 + j5.656 q 0 ∗
dW i = 1
8
1 1
0 0 + (−16) = −16 = 8y(0) 1 ∗
dW i = 0.707 + j0.707
8
1
2 ∗
−8
1 1
−8 + (11.312 − j11.312)(0.707 + j0.707) = 8 = 8y(1) dW i = j
8
3 ∗
1
1 dW i = −0.707 + j0.707
8
1
0 0 + (−j16)j = 16 = 8y(2)
1
1 1
8 8 + (5.656 + j5.656)(−0.707 + j0.707) = 0 = 8y(3)
1
1
1
1
−16 0 − (−16) = 16 = 8y(4)
−1
0.707
+ j0.707 1
11.312 − j11.312 −8 − (11.312 − j11.312)(0.707 + j0.707) = −24 = 8y(5)
−1
j 1
−j16 0 − (−j16)j = −16 = 8y(6)
−1
−0.707
+ j0.707 1
5.656 + j5.656 8 − (5.656 + j5.656)(−0.707 + j0.707) = 16 = 8y(7)
−1
l
Output = −16, 8, 16, 0, 16, − 24, − 16, 16 q
The response y(n) is obtained by dividing each sample of output sequence by 8.
\ Response, y(n) = {–2, 1, 2, 0, 2, –3, –2, 1}
Chapter 6
FIR Filters
6.1 Introduction
The filters are frequency selective devices. An LTI system performs a type of discrimination or
filtering among the various frequency components at its input. The nature of this filtering action is determined
by the frequency response characteristic H(ejw ), which in turn depends on the choice of the system parameters
[e.g., the coefficients ak and bk in the difference equation governing the system]. Thus by proper selection
of the coefficients, we can design frequency selective filters that pass signals with frequency components
in some bands while they attenuate signals that contain frequency components in other frequency bands.
In general, the specification of a digital filter will be desired frequency response, Hd(ejw ). The desired
impulse response, hd(n) of the digital filter can be obtained by taking inverse Fourier transform of Hd(ejw ). Now,
the hd(n) will be an infinite duration discrete time signal defined for all values of n in the range – ¥ to +¥ .
The transfer function, H(z) of the digital filter is obtained by taking Z-transform of impulse response.
Since hd(n) is an infinite duration signal, the transfer function obtained from hd(n) will have infinite terms,
which cannot be realized or implemented in a digital system. Therefore, finite number of samples of hd(n) are
selected to form the impulse response, h(n) of the filter. The transfer function, H(z) is obtained by taking
Z-transform of finite sample impulse response, h(n). The filters designed by using finite samples of impulse
response are called FIR (Finite Impulse Response) filters.
Various Steps in Designing FIR Filter
H ( e jω ) = C e − jαω ; ω1 ≤ ω ≤ ω 2
.....(6.1)
= 0 ; otherwise
From equation (6.2) we can say that the LTI system output is simply a delayed and amplitude scaled
version of the input signal. A pure delay is usually tolerable and is not considered as distortion of the signal.
Likewise the amplitude scaling. Hence, the LTI system with frequency response defined by equation (6.1)
represents an ideal filter (in this example it is bandpass filter).
In general, an LTI system modifies the input spectrum X(ejw ) according to its frequency response
H(e ) to yield an output signal with spectrum, Y(ejw ) = H(ejw ) X(ejw ). In a sense, H(ejw ) acts as a weighting
jw
function or a spectral shaping function to the different frequency components in the input signal. When
viewed in this context any LTI system can be considered to be a frequency shaping filter, even though it may
not completely block any or all frequency components. Consequently the terms LTI system and filter are
synonymous, and are often used interchangeably. The frequency selective filters must be designed to
introduce negligible distortion in the signals that pass through them.
From equation (6.3) we can say that the magnitude of frequency response is constant and its phase is
a linear function of frequency. Therefore, if the phase function of frequency response of a filter is linear
function of frequency, then the filter is called linear phase filter.
In general, any deviation of the frequency response characteristics of a linear filter from the ideal
results in signal distortion. If the filter has a frequency variable magnitude response characteristic in the
passband then the filter introduces amplitude distortion. If the phase characteristic is not linear within the
desired frequency band, the signal undergoes phase distortion.
In order to examine the linear and nonlinear phase characteristics, two delay functions are defined and
they are phase delay and group delay.
θ( ω )
Phase delay, τ p = − .....(6.4)
ω
d
Group delay, τ g = − θ( ω ) .....(6.5)
dω
Chapter 6 - FIR Filters 6. 4
From equation (6.3),
θ(ω ) = −αω
θ( ω ) − αω
∴ τp = − =− =α
ω ω
d d
τg = − θ( ω ) = − ( − αω ) = α
dω dω
From the above equations it is observed that for a linear-phase filter, the delay is a constant, independent
of frequency. Consequently a filter that causes phase distortion has a variable frequency delay and one that
has linear phase has a constant delay within the desired frequency range. If the delay is not a constant within
the desired frequency range, we say that the filter introduces delay distortion. Thus delay distortion is
synonymous with phase distortion.
6.3 Ideal Frequency Response of Linear Phase FIR Filters
The filters are classified according to their frequency response characteristics. The ideal (desired)
frequency response Hd(ejw ) of four major types of filters are given below. The Hd(ejw ) is periodic, with
periodicity of 0 to 2p (or –p to +p). Also any analog frequency W will map (or can be converted) to frequency
of digital system w within the range 0 to 2p (or –p to +p). Hence the frequency response of digital filters are
defined in the interval 0 to 2p (or –p to +p).
Note : For conversion from analog frequency to frequency of digital system refer Impulse invariant transformation
or Bilinear transformation in Chapter 7.
Ideal frequency
response of lowpass filter , H d ( e jω ) = 0 ; for ω = − π to − ω c
− jαω
=Ce ; for ω = − ω c to + ω c
=0 ; for ω = + ω c to + π .....(6.6)
Ideal frequency
response of highpass filter , H d ( e jω ) = C e − jαω ; for ω = − π to − ω c
=0 ; for ω = − ω c to + ω c
=Ce − jαω
; for ω = + ω c to + π .....(6.7)
Ideal frequency
response of bandpass filter , H d (e jω ) = 0 ; for ω = − π to − ω c2
− jαω
=Ce ; for ω = − ω c2 to − ω c1
=0 ; for ω = − ω c1 to + ω c1
− jαω
=Ce ; for ω = + ω c1 to + ω c2
=0 ; for ω = + ω c2 to + π .....(6.8)
Ideal frequency
response of bandstop filter , H d (e jω ) = C e − jαω ; for ω = − π to − ω c2
=0 ; for ω = − ω c2 to − ω c1
− jαω
=Ce ; for ω = − ω c1 to + ω c1
=0 ; for ω = + ω c1 to + ω c2
=Ce − jαω
; for ω = + ω c2 to + π .....(6.9)
6. 5 Digital Signal Processing
|H d ( ω)| |H d ( ω)|
C C
−π −ω C 0 +ω +π C ω −π −ω C 0 +ω +πC ω
F ig 6.1 : M a g n itu de resp on se o f id ea l F ig 6.2 : M a g n itu de resp on se o f id ea l
low p a ss filter. h ig h p a ss filter.
jω
|H d (e jω)| |H d (e )|
C C
|H (e jω)|
1+ δp
Passband ripple
1−δp
Transition band
δs
Passband
Stopband
Stopband
ripple
0
ωp ωs π ω
δp - Passband ripple ; ωp - P assband edge frequency
δs - Stopband ripple ; ωs - Stopba nd edge frequency
θ( ω ) = ∠H (e jω ) = Phase function
H ( e jω ) = Magnitude function
Note : The magnitude is strictly positive, but the amplitude can be positive or negative.
From the property of Fourier transform when h(n) is real we can say that the magnitude function is a
symmetric function and the phase function is an antisymmetric function.
\ |H(ejw )| = |H (-ejw )|
|q(w)| = - |q (-w)|
Linear Phase and Symmetric Impulse Response
For many practical FIR filter, exact linearity of phase is a desired goal. Let us assume that the phase of
H(ejw ) is a linear function of w. Hence q(w) is directly proportional to w.
\ q(w) µw or q(w) = -aw ; for -p £ w £ +p .....(6.13)
where, a is a constant phase delay in samples
From equation (6.10) we get,
N−1
H(e jω ) = ∑ h( n) e− jωn .....(6.14)
n=0
sin αω
∑ h( n) sin ωn
n=0
= N−1
cos αω
∑ h( n) cos ωn
n=0
= h( n) sin e jω
N 1 − 2n
2
n = N −1 − n
= h( n) sin e jω
N 1−n−n
2
= h( n) sin e jωnn
2
= h( n) sin 0
=0
From the condition, a = (N - 1)/2 we can say that for every value of N there is only one value of phase
delay a for which linear phase can be obtained easily.
From the condition h(n) = h(N - 1 - n) we can say that for this value of a, [i.e., a = (N - 1)/2] the h(n)
has a special kind of symmetry. The impulse response h(n), when a = (N - 1)/2 and for odd and even values
of N are shown in fig 6.6 and 6.7 respectively. It can be observed that the impulse response is symmetric about
the centre of the sequence.
Chapter 6 - FIR Filters 6. 8
C entre of sy m m etry
h (n ) h (n ) C entre of sy m m etry
N = 11, α = − = 5
N 1 N −1
N = 10, α = = 4.5
2 2
0 1 2 3 4 5 6 7 8 9 10 n 0 1 2 3 4 5 6 7 8 9 n
F ig 6.6 : E xa m p le of sym m etric im p ulse F ig 6.7 : E xa m p le of sym m etric im p ulse
resp o n se for o d d N . response for even N .
Linear Phase and Antisymmetric Impulse Response
The definition of linear phase filter q(w) = -aw requires the filter to have both constant group delay
and constant phase delay. If only constant group delay is required an another type of linear phase filter is
defined in which the phase of H(ejw ) is a piece-wise linear function of w. For this case H(ejw ) can be expressed
in the Euler form as shown in equation (6.20).
H ( e jω ) = ± H ( e jω ) e j(β − αω ) .....(6.20)
jw
When H(e ) is expressed in the form of equation (6.20), we can prove that the only possible solution
of h(n) exists if,
N−1 π
α = 2
; β = ± 2
and h(n) = –h(N – 1 – n) ; for 0 £ n £ (N – 1) .....(6.21)
The filters that satisfy the three conditions of equation (6.21) have a delay of [(N - 1)/2] samples but
their impulse responses are antisymmetric around the centre of the sequence, as opposed to the true linear
phase sequences that are symmetric around the centre of the sequence.
h (n ) C entre of antisym m etry
h (n ) C entre of antisym m etry
N −1
N −1 N = 10, α = = 4.5
N = 11, α = =5 2
2
0 0
1 2 3 4 5 6 7 8 9 10 n 1 2 3 4 5 6 7 8 9 n
The frequency response of linear phase FIR filter when impulse response is symmetric and N is odd
with centre of symmetry at (N – 1)/2 is given by,
LM N −1
2
OP − jω N −1
e2j
H ee j = M hd
jω
i + ∑ 2h d
N −1
2
N −1
2
− ni cos ωn P e .....(6.22)
MN n=1 PQ
Let, H(ejw ) = A(w) e jq(w) .....(6.23)
where, A(w) = Amplitude function
q(w) = Phase function
On comparing equations (6.22) and (6.23) we get,
N −1
2
Amplitude function, A(ω ) = hd i + ∑ 2 h d − ni cos ωn
N −1
2
N −1
2 .....(6.24)
n=1
A typical sketch of symmetric impulse response when N = 9 and its corresponding amplitude function
of frequency response are shown in fig 6.10 and fig 6.11 respectively. From these sketches it can be observed
that the amplitude function of H(ejw ) is symmetric with w = p, when the impulse response is symmetric and N
is odd number.
When impulse response is symmetric and N is odd, the frequency response is non-zero at
w = 0 and w = p, and so this frequency response can be used to design lowpass, highpass, bandpass and
bandstop filters.
N −1
α= =4
2
Chapter 6 - FIR Filters 6. 10
Proof:
The Fourier transform of h(n) is,
h( n) is defined
+∞ N −1
jω − jωn − jωn
H(e ) = ∑ h( n) e = ∑ h(n) e for n = 0 to N − 1
n = −∞ n=0
When N is odd number the symmetric impulse response will have the centre of symmetry at n = (N - 1)/2.
Hence H(ejw ) is expressed as,
N 3
− jω N − 1 N−1
2
e j
jω
H(e ) = ∑ h(n) e− jωn + he N 2 1 j e 2
+ ∑ h(n) e− jωn
n= 0 n= N+1
2
N− 3
2 − jω N − 1
e j Let, m = N 1 n ; \ n = N 1 m
= ∑ h(n) e− jωn +h e N 1
2 je 2
When, n = N + 1 ; m = N − 1− N + 1 = N − 3
n= 0 2 2 2
N− 3 When, n = N 1 ; m = N 1 (N 1)= 0
2
+ ∑ h(N − 1 − m) e− jω(N − 1 − m)
m= 0
N−3 N−3
2 − jω N − 1 e j 2
= ∑
n=0
h( n) e − jωn
+h e N 1
2 je 2
+ ∑ h(N − 1 − n) e− jω(N − 1 − n)
n=0
Put, m = n
N−3 N−3
− jω N − 1
For symmetric
2
e j 2
= ∑
n=0
h( n)e − jωn
+h e N 1
2 je 2
+ ∑ h( n)e− jω(N − 1 - n)
n=0
impulse response,
h(N 1 n) = h(n).
R| N−3
2 L e j jω N − 1 e j O U| e j jω N − 1 − jω N − 1
= She h( n) Me PPV e
|T j ∑ MN
N 1 − jωn 2 − jω ( N − 1 − n ) 2 2
+ e +e e
2
n=0 Q|W
R| N−3
2 L e jω N − 1 − n
j+e e
U
j O| e e j − jω (N − 1) − N − 1 − n − jω N − 1
= S he + ∑ h( n) Me P
j PQV|W
N 1 2 2 2
|T 2
n=0 MN
R| N−3
2 L e jω N − 1 − n
j+e e
U
j O| e e j − jω N − 1 − n − jω N − 1
= She + ∑ h( n) Me P
j PQV|W
N 1 2 2 2 jθ − jθ
e +e
|T
2
n=0 MN cosθ =
2
R| N−3
2
U| e j − jω N − 1
= S he F I
K jV e
|T j ∑ eH
N 1 N−1 −n 2
+ h ( n) 2 cos ω
2
n=0 |W 2
N −1 N −1
−n ; n= −k
R| N−1
2
U| e j Let, k=
When, n = 0 ; k = − jω N − 1
2 2
N −1
= She − kj cos ωkV e
|T j ∑ e
N 1 N 1 2 2
+ 2h
2
k=1
2
|W When, n = ; k= =1 N −3
2
N −1 N − 3
2
−
2
R| N−1
2
U| e j − jω N − 1
= She
|T j ∑ e
N 1
2
+ 2 h − n j
N 1
cos
2
ω n V| e Put, k = n 2
n=1
W
6. 11 Digital Signal Processing
Case (ii) : Frequency response of linear phase FIR filter when impulse response is symmetric and N is even with
centre of symmetry at (N – 1)/2
The frequency response of linear phase FIR filter when impulse response is symmetric and N is even
with centre of symmetry at (N – 1)/2 is given by,
LM N O F N − 1I
2
H ee j = M ∑ 2 h e
jω
j cos FGH IjJ P e− jω H 2 K
N −n
2
ω n− 1
e 2 KP .....(6.27)
MN n=1 PQ
Let, H(ejw ) = A(w) ejq(w) .....(6.28)
where, A(w) = Amplitude function
q(w) = Phase function
On comparing equation (6.27) and (6.28) we get,
N
2
Amplitude function, A ω = b g ∑ 2 he j cose e N −n
2
ω n− 1
2 jj .....(6.29)
n=1
The sketch of symmetrical impulse response when N = 8 and its corresponding amplitude function of
frequency response are shown in fig 6.12 and 6.13 respectively. From these sketches it can be observed that
the amplitude function of H(ejw ) is antisymmetric with w = p, when impulse response is symmetric and N is
even number.
When impulse response is symmetric and N is even, the frequency response is non-zero at
w = 0 and zero at w = p, and so this frequency response can be used to design lowpass and bandpass filters
but cannot be used to design highpass and bandstop filters.
Centre of antisymmetry
Centre of symmetry
N=8
N−1
α= = 3 .5
2
+∞ N−1
H(e jω ) = h(n) is defined for
∑ h(n) e− jωn = ∑ h(n) e− jωn n = 0 to N 1
n = −∞ n=0
For symmetric impulse response with even number of samples (i.e., when N is even), the centre of
symmetry lies between n = (N/2)1 and n = N/2. Hence H(ejw ) is expressed as,
N −1
2 N−1
jω
H(e ) = ∑ h( n) e− jωn + ∑ h(n) e− jωn
n= 0 n = N/2
N −1 N −1
Let, m = N − 1 − n ; ∴ n = N − 1 − m
2 2
= ∑ h( n) e − jωn
+ ∑ h(N − 1− m) e − jω (N −1− m)
When, n = N ; m = N −1− N = N − 1
n= 0 m= 0
2 2 2
When, n = N − 1 ; m = N − 1 − (N − 1) = 0
N −1 N −1
2 2
= ∑ h( n) e − jωn
+ ∑ h(N − 1 − n) e − jω (N − 1 − n)
Put, m = n
n= 0 n= 0
N − 1 N − 1 For symmetric
2 2
impulse response,
= ∑ h(n) e− jωn + ∑ h(n) e− jω (N−1−n)
h(N 1 n) = h(n).
n = 0 n = 0
LM
N − 1
F FG IJ N−1 FG IJ I O FG IJ N−1 N−1
2
= M ∑ h(n) G e − jωn H jω
K 2
e H
− jω (N−1−n)KJP e H K
jω
2
− jω
2
MN G
H
e +e
JK PP
n = 0
Q
N − 1
L FG N−1IJ F IJ O N−1 F I N−1
2
= ∑ h(n) Me H
jω
2 K + e GH b g
−n − jω
K P e GH JK
N− 1 −
2
−n − jω
2
n = 0
MN PQ
LM N −1
2 F F IK + e FH IK I OP e FH IK
jω
N −1
−n − jω
N −1
−n − jω
N −1
= M ∑ h( n) G e H JK P
2 2 2
MN n=0 H PQ
jθ − jθ
LM N −1
2
OP FH IK − jω
N −1
cosθ = e + e
2
= M ∑ h( n) 2 cos e e jjP e 2
ω N −1 − n
2
MNn=0 PQ
LM
N −1 O F I
ijPP e H K
2 N −1
− jω
= M ∑ 2 h( n) cose d N 1 2
ω − n −
2 2
MN
n=0 PQ
LM N
2
OP FG IJ − jω
N −1 Let, k = − n ; ∴ n= −k N
2
N
2
= M∑ 2 he H K
MNk=1
2j cose e jjPP e
N− k ω k− 1
2
2
When, n = 0 ; k= N
2
Q When, n = − 1 ; k = − d − 1i =1 N
2
N
2
N
2
LM
N
2
OP FG IJ − jω
N −1
= M ∑ 2 he
MM
n=1
2 j cose e jjPP e H K
N − n ω n− 1
2
2
Put, k = n
N PQ
6. 13 Digital Signal Processing
Case (iii) : Frequency response of linear phase FIR filter when impulse response is antisymmetric and N
is odd with centre of antisymmetry at (N – 1)/2
The frequency response of linear phase FIR filter when impulse response is antisymmetric and N is
odd with centre of antisymmetry at (N – 1)/2 is given by,
LM N −1
2
OP FG
j π−
ω ( N −1) IJ
H ee j = M ∑ 2 h e j sin ωn e H K
jω 2 2
MN
N −1 − n
2 PP .....(6.32)
n=1
Q
Let, H(ejw ) = A(w) ejq(w) .....(6.33)
where, A(w) = Amplitude function
q(w) = Phase function
On comparing equations (6.32) and (6.33) we get,
N−1
2
Amplitude function, A (ω ) = ∑ 2 he N 2− 1 − nj sin ωn .....(6.34)
n=1
ω
Phase function, θ(ω ) = π – (N2 – 1) = β – αω .....(6.35)
2
π N − 1
where, β = and α =
2 2
N−1
2
Magnitude function, H ( e jω ) = A (ω ) = ∑ 2 he N 2− 1 − nj sin ωn .....(6.36)
n=1
A typical sketch of antisymmetric impulse response when N = 9 and its corresponding amplitude
function of frequency response are shown in fig 6.14 and fig 6.15 respectively. From these sketches it can be
observed that the amplitude function is antisymmetric with w = p when the impulse response is antisymmetric
and N is odd number.
The term ejp/2 makes the frequency response imaginary. Hence this frequency response is suitable for
designing Hilbert transformers and differentiators.
N=9
N −1
α= =4
2
n = −∞ n=0
N−3
− jω N − 1 N−1 The impulse response is
2
e j+
= ∑
n=0
h( n) e− jωn + h e j N−1
2
e 2
∑ N+1
h( n) e− jωn antisymmetric with centre of
N −1
n= 2 antisymmetry at n = 2
N− 3
2 N−1
= ∑ h(n) e− jωn + ∑ h(n) e− jωn
N+1
h
N −1
e j=0
2
n=0 n= 2
N−3 N −3
2 2 Let, m = N 1 n ; \ n = N 1 m
= ∑ h( n) e− jωn + ∑ h(N −1 − m) e − jω( N −1− m)
LM N−3
2 F FG IJ
jω
N−1
jω
FG N − 1IJ I OP − jω
FG N − 1IJ
h(N 1 n) = h(n).
= M ∑ h( n) G e − jωn
e
H K−e 2 − jω ( N − 1 − n )
e
H 2 K JJ P e H 2 K
MM n=0 G
H K PPQ
N
LM
N−3
2 F FHG
jω
N−1
−n
IJ FG
− jω ( N −1) − n −
N−1 IJ I OP − jω
FG N − 1IJ
= M ∑ h( n) e G 2 K − e
H 2 K JJ P e H 2 K
MM
n=0 G
H K PPQ
N
LM N−3
F FHG N−1 IJ F N−1 IJ I OP F N −1I
2
= M ∑ h( n) G e
jω
2
−n
K − e HG − jω
2
−n
JJ P e HG KJ
K − jω
2
e jθ − e− jθ
MM n=0 GH K PPQ sinθ =
N 2j
L OP I LM OP
N 3
N3
F N −1 2 jπ FG N −1IJ
= M
− jω −jω
2 H 2 K= F I H 2K
MM ∑ h( n) 2j sin ee
ω
N1
2
njjPP e MM ∑ 2 h(n)e
n=0
2
e
sin ω GH N2−1 − nJK jPP e
n=0
N Q N Q j= e
j
π
2
N−3
2
LM OP FG j
π
−
ω(N − 1) IJ Let, k =
N−1
− n ; ∴ n=
N−1
− k
eH K 2 2
= M ∑ 2 h( n) sineω e N−1
−n jj P 2 2
N−1
n=0 MN 2
PQ When, n = 0 ; k= 2
N −1
2
LM OP FG j
π
−
ω(N −1) IJ When, n =
N−3
2
; k=
N−1 N−3
2
− 2 =1
= M ∑ 2 he N −1
−k j sin ω k P eH 2 2 K
k=1 MN 2
PQ
LM
N −1
2
OP FG j
π
−
ω(N −1) IJ
= M∑ 2 he
MN
n =1
N −1
2
−n j sin ωnPP e H 2 2 K Put, k = n
Q
6. 15 Digital Signal Processing
Case (iv) : Frequency response of linear phase FIR filter when impulse response is antisymmetric and N is even
with centre of antisymmetry at (N – 1)/2
The frequency response of linear phase FIR filter when impulse response is antisymmetric and N is
even with centre of antisymmetry at (N – 1)/2 is given by,
LM N
2
OP FGH j π−
ω ( N −1) IJ
K
He e j = M ∑ 2 h e j e e jjP e
jω 1 2 2
sin
2
ω
N −n n−
2
MN n=1 PQ .....(6.37)
π
Phase function, θ(ω ) =
2 2
e j
– ω N – 1 = β – αω
π N−1 .....(6.40)
where, β = and α = 2
2
N
2
Magnitude function, H (e jω ) = A (ω ) = ∑ 2 he N2 − nj sinFH ωFGH n − 21 IJK IK .....(6.41)
n=1
The sketch of antisymmetric impulse response when N = 8 and its corresponding amplitude function
of frequency response are shown in fig 6.16 and fig 6.17 respectively. From these sketches it can be
observed that the amplitude function of H(ejw ) is symmetric with w = p, when the impulse response is
antisymmetric and N is even number.
The term ejp/2 makes the frequency response imaginary. Hence this frequency response is suitable for
designing Hilbert transformers and differentiators.
N=8
α= N − 1 = 3 .5
2
n=0 N
n=
2 Let, m = N1 n ; \ n = N 1m
N N
−1 −1 N N N
2 2
When, n = ; m = N − 1 − = −1
= ∑ h( n) e− jωn + ∑ h(N − 1 − m) e− jω(N −1− m) 2 2 2
n=0 m=0 When, n = N1 ; m = N 1 (N 1) = 0
N N
−1 −1
2 2
= ∑ h( n) e− jωn + ∑ h(N − 1− n) e− jω(N −1− n) Put, m = n
n=0 n=0
N N
−1 −1 For antisymmetric
2 2
= ∑ h( n) e − jωn
+ ∑ b− h( n)ge − jω( N − 1 − n) impulse response,
h(N 1 n) = h(n).
n=0 n=0
LM N
2
−1 F FG IJ
jω
N−1
jω
FG N − 1IJ I OP − jωFG N − 1IJ
= M ∑ h( n) G e − jωn
e
H K e 2 − jω(N − 1 − n)
e
H 2 K JP e H 2 K
MM n=0 GH JK P
N PQ
LM N
−1 F FGH N−1 IJ N−1 I OP FG N − 1IJ
2
= M ∑ h( n) G e
jω
2 K −e b g
−n − jω N − 1 − n −
2 JJ P e − jω
H 2 K
MM n=0 GH K PPQ
N
LMN
−1 F FGH N−1 IJ F N−1 IJ I OP − jω FG N 1IJ e jθ − e− jθ
2
= M ∑ h( n) G e
jω
2
n
K e GH − jω
2
n
KJP e H 2 K sinθ =
MM
n=0 GH JK P 2j
N PQ
LM
N
−1 OP FG N1 IJ
2
= M ∑ h( n) 2j sin ωe F N1
j I P e
− jω
H 2 K
MM
n=0
H 2
n
K PP
N Q
N
−1 LM jπ
OP FG N 1IJ
2
= M ∑ h( n) 2e sin H ω e 2 F N
n
1 I
jK PP e
− jω
H 2K
n =0 MM 2 2
PQ
N π
N LM
−1 OP FG π ω( N − 1) IJ j= e
j
2
2
= M ∑ 2 h(n) sinH ωe F N
−n−
1I
jK PP e H
j
2
−
2 K
MM
n= 0
2 2
PQ
N Let, k = N
2
−n ; ∴ n= N
2
−k
N
LM O F IJ N
FG IJ P e GH
2 π ω (N −1) When, n = 0 ; k=
j −
= M ∑ 2 he K 2
MN
N
2
−kj sin e ω H K jP k−
PQ
1
2
2 2
When, n = N
2
−1 ; k = N
2
− d −1i =1
N
2
k=1
N
2
LM OP FG j
π
−
ω(N −1) IJ Put, k = n
= M ∑ 2 he
n=1 MN
N
2
−n j sineωe jjPP e H n−
1
2
2 2 K
Q
6. 17 Digital Signal Processing
Case (v) : Frequency response of linear phase FIR filter when impulse response is symmetric and N is odd
with centre of symmetry at n = 0
The frequency response of linear phase FIR filter when impulse response is symmetric and N is odd
with centre of symmetry at n = 0, is given by,
N −1
2
.....(6.42)
e j
H e jω = h(0) + ∑ 2 h( n) cos ωn
n=1
A typical sketch of symmetric impulse response when N = 9 and its corresponding amplitude function
of frequency response are shown in fig 6.18 and fig 6.19 respectively. From these sketches it can be observed
that the amplitude function of H(ejw ) is symmetric with w = p, when the impulse response is symmetric and N
is odd number.
When impulse response is symmetric and N is odd, the frequency response is non-zero at
w = 0 and w = p, and so this frequency response can be used to design lowpass, highpass, bandpass and
bandstop filters.
N −1 = 4
2
N−1
−1 2 Here, centre of
= ∑ h(n) e − jωn
+ h(0) + ∑ h(n) e − jωn
symmetry is n = 0.
N−1 n=1
n= −
2
N−1 N−1
2 2 Using symmetry
= ∑ h(− n) e jωn + h(0) + ∑ h(n) e− jωn condition h( n) = h(n).
n=1 n=1
N−1 N−1
2 2
jωn
= ∑ h(n) e + h(0) + ∑ h(n) e− jωn
n=1 n=1
N−1
2
e jθ + e− jθ
= h(0) + ∑ h(n) e jωn + e− jωn cosθ =
2
n=1
N−1
2
= h(0) + ∑ h(n) 2 cos ωn
n=1
N−1
2
= h(0) + ∑ 2 h(n) cos ωn
n=1
Case (vi) : Frequency response of linear phase FIR filter when impulse response is antisymmetric and N
is odd with centre of antisymmetry at n =0
The frequency response of linear phase FIR filter when impulse response is antisymmetric and N is
odd with centre of antisymmetry at n = 0, is given by,
LM N −1
2
OP −jπ
Hee j = M ∑ 2 h( n) sin ωn P e
jω 2
.....(6.47)
MN n=1 PQ
Let, H(ejw ) = A(w) ejq(w) .....(6.48)
where, A(w) = Amplitude function
q(w) = Phase function
On comparing equations (6.47) and (6.48) we get,
N−1
2
Amplitude function, A (ω ) = ∑ 2 h( n) sin ωn .....(6.49)
n=1
π
Phase function, θ(ω ) = − .....(6.50)
2
N−1
2
Magnitude function, H ( e jω ) = A (ω ) = ∑ 2 h( n) sin ωn .....(6.51)
n=1
6. 19 Digital Signal Processing
A typical sketch of antisymmetric impulse response when N = 9 and its corresponding amplitude
function of frequency response are shown in fig 6.20 and fig 6.21 respectively. From these sketches it can be
observed that the amplitude function is antisymmetric with w = p when the impulse response is antisymmetric
and N is an odd number.
The term ejp/2 makes the frequency response imaginary. Hence this frequency response is suitable for
designing Hilbert transformers and differentiators.
Centre of antisymmetry Centre of antisymmetry
N −1
=4
2
Proof:
The Fourier transform of h(n) is,
h( n) is defined only
+∞ +N − 1
2
H(e jω ) = for n = − N 2− 1 to + N 2− 1 .
∑ h(n) e− jωn = ∑ h(n) e− jωn N −1
n = −∞ n= −
2
N−1
−1 2 Here, centre of
− jωn
= ∑ h(n) e + h(0) + ∑ h(n) e− jωn antisymmetry is n = 0.
N−1 n=1
n= −
2
N−1 N−1
2 2 Here, h(0) = 0
jωn
= ∑ h(− n) e + ∑ h( n) e− jωn
n=1 n=1
N−1 N−1
Using symmetric
2 2
jωn − jωn condition h( n) = h(n).
= ∑ (− h(n)) e + ∑ h(n) e
n=1 n=1
N−1 N−1
2 2 e jθ − e− jθ
jωn − jωn sinθ =
= − ∑ h(n) e −e = − ∑ h(n) 2 j sin ωn 2j
n=1 n=1
LM N−1
2
OP LM OP
N−1
2 −j
π π
−j
= M ∑ 2h( n) sin ωn P (− j) = M ∑ 2h( n) sin ωn P e 2
−j= e 2
MM n=1 PP MM PP
n=1
N Q N Q
Chapter 6 - FIR Filters 6. 20
Table 6.1 : Summary of Frequency Response Characteristics of Linear Phase FIR Filters
Case h(n) N A(w
w)
[Impulse Response] [Number of Symmetry [Amplitude
samples of h(n)] condition function of H(ejww )]
i Symmetric Odd h(N – 1 – n) = h(n) Symmetric
ii Symmetric Even h(N – 1 – n) = h(n) Antisymmetric
iii Antisymmetric Odd h(N – 1 – n) = – h(n) Antisymmetric
iv Antisymmetric Even h(N – 1 – n) = – h(n) Symmetric
v Symmetric Odd h(– n) = h(n) Symmetric
vi Antisymmetric Odd h(– n) = –h(n) Antisymmetric
Table 6.2 : Summary of A(w
w ) for Linear Phase FIR Filters
Case h(n) N Symmetry Magnitude function,
[Impulse response] condition |H(ejww )| = |A(w
w )|
N−1
2
N −1
i Symmetric Odd h(N – 1 – n) = h(n)
he j + ∑ 2 he
N –1
2
n=1
2 j
– n cos ωn
N
2
N–1
2
N −1
2
N −1
2
where, the Fourier coefficients hd(n) are the desired impulse response sequence of the filter.
The samples of hd(n) can be determined using equation (6.53), which is inverse Fourier transform of Hd(ejw ).
π
hd ( n) =
1
2π − πz e j
H d e jω e jωn dω .....(6.53)
The impulse response obtained from equation (6.53) is an infinite duration sequence. For FIR filters we
truncate this infinite impulse response to a finite duration sequence of length N, where N is odd.
N −1
∴ h( n) = hd ( n) ; for n = − e j to + e j
N −1
2 2
Let, HN(z) = Z{h(n)}
By definition of Z-transform,
N−1
2
H N ( z) = ∑ h( n) z − n .....(6.54)
N−1
n=−
2
The transfer function of equation (6.54) represents noncausal filter (due to the presence of positive
powers of z). Hence the transfer function of equation (6.54) is multiplied by z-(N - 1)/2 .
−
N −1
N −1
2
−
N −1
LM −1
N −1
2
OP
\ H(z) = z –(N – 1)/2
HN(z) = z 2
∑ h( n) z
N −1
−n
=z 2
MM ∑ h(n) z
N −1
−n
+ h(0) + ∑ h( n) z −n
PP
n= −
2 N
n= −
2
n=1
Q
−
N −1
LM
N −1
2
N −1
2
OP The Fourier coefficients h(n)
= z 2
MM ∑ h(−n) z + h(0) + ∑ h(n) z
n −n
PP is symmetric, with n = 0.
n=1
N n=1
Q \ h(–n) = h(n)
−
N −1
LM N −1
2
OP
= z 2
MM h ( 0) + ∑ h ( n ) z + z n
PP −n
.....(6.55)
N n=1
Q
Hence we see that causality is brought about by multiplying the transfer function by the delay factor
a = (N - 1)/2. This modification does not affect the amplitude response of the filter, however the abrupt
truncation of the Fourier series results in oscillations in the passband and stopband. These oscillations are
due to the slow convergence of the Fourier series, particularly near the points of discontinuity. This effect is
known as Gibbs phenomenon. The undesirable oscillations can be reduced by multiplying the desired impulse
response coefficients by an appropriate window function.
6. 23
Table 6.3 : Specification and Desired Impulse Response for FIR Filter Design by Fourier Series Method
π +ω c
Lowpass H d ( e jω
R|1 ; for
) = S0 ; for
– ωc ≤ ω ≤ + ωc
−π ≤ ω < – ωc
h d ( n) =
1
2π z
−π
jω
H d (e ) e jωn
dω =
1
2π z
−ω c
e jωn dω
||0 ; for jω
T ωc < ω ≤ π Q H d (e ) = 0 in the range − π ≤ ω < − ω c and + ω c < ω ≤ π
π −ω c π
Highpass H d (e jω
R|1 ; for
) = S1 ; for
– π ≤ ω ≤ – ωc
ωc ≤ ω ≤ π
h d ( n) =
1
2π z
−π
H d (e jω ) e jωn dω =
1
2π z
−π
e jωn dω +
1
2π z
ωc
e jωn dω
||0 ; for jω
T – ωc < ω < + ωc Q H d ( e ) = 0 in the range − ω c < ω < +ω c
R|1 ; for – ω c2 ≤ ω ≤ – ω c1 π − ω c1 ω c2
Bandpass H d ( e jω
||1 ; for
) = S0 ; for –π
ω c1 ≤ ω ≤ ω c2
≤ ω < − ω c2
h d ( n) =
1
2π z
−π
H d ( e jω ) e jωn dω =
1
2π z
−ω c2
e jωn dω +
1
2π
ω c1
z e jωn dω
||0 ; for – ω c1 < ω < + ω c1 Q H d ( e jω ) = 0 in the range − π ≤ ω < −ω c 2 ; − ω c1 < ω < + ω c1 and + ω c2 < ω ≤ π
||0 ; for
T ω c2 < ω ≤ π
R|1 ; for –π ≤ ω ≤ – ω c2 −ω c2 ω c1
Bandstop
|1 ; for
|
) = S1 ; for
– ω c1 ≤ ω ≤ + ω c1 h d ( n) =
1
2π z
π
H d ( e jω ) e jωn dω =
1
2π z e jωn dω +
1
2π z e jωn dω +
1
2π z
+π
e jωn dω
The impulse response is symmetric with n = 0, and so h(–n) = h(n). Hence it is sufficient if we,
calculate h(n) for n = 0 to +(N – 1)/2.
4. Take Z-transform of the impulse response to get the noncausal transfer function of FIR filter, HN(z).
N −1
+
2
l q
∴ H N ( z) = Z h ( n ) = ∑ h( n ) z − n
N −1
n=−
2
5. Convert the noncausal transfer function, HN(z) to causal transfer function, H(z) by multiplying
HN(z) by z –(N – 1)/2
N −1
+
N −1 2
−
∴ Transfer function, H(z) = z 2
∑ h( n) z − n
N −1
n=−
2
Alternatively,
−
N −1
LM N −1
2
OP Applying symmetry
condition, h(–n) = h(n).
Transfer function, H(z) = z 2
MMh(0) + ∑ h(n) z n
+z −n
PP Refer equation (6.55).
N n=1
Q
6. Draw a suitable structure for realization of FIR filter.
6. 25 Digital Signal Processing
Design verification
1. Determine the frequency response, H(ejw ).
Method - 1 : Choose a linear phase magnitude function |H(ejw )| from table 6.2. Using h(n),
obtain an equation for |H(ejw )|.
Method - 2 : The frequency response, |H(ejw )| can be obtained by replacing z by ejw in the
transfer function, H(z).
∴ Frequency response, H e jω = H ( z) e j z = e jω
Example 6.1
Design a FIR lowpass filter with cutoff frequency of 1 kHz and sampling frequency of 4 kHz with 11
samples using Fourier series method. Determine the frequency response and verify the design by sketching the
magnitude response.
Solution
Given that, Fc = 1 kHz ; Fs = 4 kHz
Ωc 2 πFc 2π × 1 × 10 3
∴ ω c = Ω cT = = = = 0.5 π rad / sample
Fs Fs 4 × 103
Hd (e jω ) = 1 ; for ω c ≤ ω ≤ + ω c
= 0 ; for π ≤ ω < − ω c and ωc < ω ≤ π
hd (n) =
1
2π z
−π
Hd (ejω ) e jωn dω =
1
2π z
−ω c
1 × e jωn dω
=
LM e OP = 1 LM e − e OP
1 jωn +ω c jω cn
e − e
− jω cn
jθ jθ
When n = 0, the factor
sinω cn
N jn Q 2π MN jn jn PQ sinθ = 2j
2π −ω c πn
becomes 0 / 0,
which is indeterminate.
1 Le −e OP = 1 sin ω n ; for all n, except n = 0.
jω cn − jω cn
=
πn N
M 2j Q πn c
U sin g L' Hospital rule,
sin ω cn 1 sin ω cn ω c sin Aθ
When, n = 0 ; hd (n) = hd (0) = Lt = Lt = Lt =A
n→ 0 πn π n→0 n π θ→ 0 θ
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 11 samples.
sin ω cn N−1 N−1
∴ h(n) = hd (n) = ; for n = − 2 to +
2
, except n = 0
nπ
ωc
= ; for n = 0
π
N − 1 11 − 1
Here, N = 11, ∴ = =5
2 2
Hence, calculate h(n) for n = 5 to +5
Since, the impulse response h(n) satisfies the symmetry condition, h(n) = h(n), calculate h(n) for n = 0 to 5.
Chapter 6 - FIR Filters 6. 26
ωc
When n = 0 ; h(0) = = 0.5
π
When n = 1 ; h(1) =
c
sin 0.5π × 1 h = 0.3183
π ×1 Note : Calculate sin q by keeping the
calculator in radian mode.
When n = 2 ; h(2) =
c
sin 0.5π × 2 h=0
π ×2
When n = 3 ; h(3) =
c
sin 0.5π × 3 h = −0.1061
π ×3
When n = 4 ; h(4) =
c
sin 0.5π × 4 h=0
π×4
When n = 5 ; h(5) =
c
sin 0.5π × 5 h = 0.0637
π×5
The transfer function H(z) of the digital lowpass filter is given by,
−
N−1
−
N−1
LM+
N−1
2
OP 5
H(z) = z 2 l q
Z h(n) = z 2
MM ∑ h(n) z
N−1
−n −5
PP = z ∑ h(n) z −n
n = −5
N
n= −
2 Q
= z−5 [h(−5) z5 + h( −4) z4 + h(−3) z3 + h(−2) z2 + h( −1) z + h(0) z0 + h(1)z−1 + h(2) z −2
= z−5 h(0) + h(1) z + z−1 + h(2) z2 + z−2 + h(3) z3 + z−3 + h(4) z4 + z−4 + h(5) z5 + z−5
Y(z)
Let , H(z) = = 0.5 z −5 + 0.3183 z−4 + z−6 − 0.1061 z−2 + z−8 + 0.0637 1 + z −10
X(z)
∴ Y(z) = 0.5 z−5 X(z) + 0.3183 z−4 X(z) + z−6 X(z) − 0.1061 z−2 X(z) + z−8 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
6. 27 Digital Signal Processing
−1 −2 −3 −4 −5
X (z ) −1
z X (z ) −1
z X (z ) −1
z X (z )
−1
z X (z ) −1
z X (z )
z z z z z
w
+ + +
−1 −1 −1 −1 −1
z z z z z
−10 −9 −8 −7 −6
z X (z ) z X (z ) z X (z ) z X (z ) z X (z )
0 .0 6 37 −0.1061 0.31 83
0 .5
−2 −8 −4 −6 −5
−10 −0.1061[z X (z ) + z X (z )] 0.3183[z X (z ) + z X (z )] 0.5z X (z)
0.0637[X (z) + z X (z )]
+ + + Y (z)
F ig 1 : L in ea r ph a se stru c tu re o f F IR lo w p a ss filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude
response, |H(ejww )| is given by |A(w
w )|,
N− 1
2
where, A(ω ) = h(0) + ∑ 2 h(n) cos ωn Refer table 6.2 case (v)
n =1
5
= h(0) + ∑ 2 h(n) cos ωn
n =1
= h(0) + 2 h(1) cos ω + 2 h(2) cos 2ω + 2 h(3) cos 3ω + 2 h(4) cos 4ω + 2 h(5) cos 5ω
= 0.5 + 2 × 0.3183cosω + 2 × 0 cos2ω + 2 × −0.1061 cos 3ω + 2 × 0cos 4ω
+ 2 × 0.0637cos5ω
= 0.5 + 0.6366 cosω − 0.2122 cos 3ω + 0.1274 cos 5ω
Using the above equation the amplitude response A(w) and magnitude function |H(ejw )| are calculated for
various values of w and listed in table 1. Using the tabulated values, the magnitude response is sketched as
shown in fig 2.
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e resp o n se o f F IR low p a ss filte r.
Alternate Method for Frequency Response
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = 0.5z −5 + 0.3183 z −4 + z −6 − 01061
. z −2 + z −8 + 0.0637 1 + z −10
z = e jω
− 01061
. cos 2ω − j sin 2ω + cos8ω − j sin 8ω + 0.0637 1 + cos10ω − jsin 10ω
= [0.5cos5ω + 0.3183 cos 4ω + 0.3183 cos 6ω − 0.1061cos 2ω − 0.1061cos8ω + 0.0637 + 0.0637 cos10ω ]
e j
Hd ejω = 1 ; for − π ≤ ω ≤ −ω c and ωc ≤ ω ≤ π
= 0 ; otherwise
The desired impulse response hd(n) of the highpass filter is,
π −ω c π
hd (n) =
1
2π z
−π
e j
Hd e jω e jωn dω =
1
2π z
−π
1 × e jωn dω +
1
2π z
ωc
1 × e jωn dω
=
1 LM e OP
jωn − ω c
+
1 LM e OP
jωn π
=
1 LM e
− jω cn
−
OP
e − jπn
+
1 LM e
jπn
−
e jω cn OP
2π MN jn PQ −π
2π MN jn PQ ωc
2π MN jn jn PQ 2π MN jn jn PQ
=
1 LM e − e
jπn − jπn
−
e jω cn
− e− jω cn OP
πn MN 2j 2j PQ e jθ − e− jθ
sinθ =
2j
1
= sin πn − sin ω cn ; for all n, except n = 0.
πn
N−1 7 −1
Here, N = 7, ∴ = =3
2 2
Hence, calculate h(n) for n= 3 to 3.
Since, the impulse response h(n) satisfies the symmetry condition, h(n) = h(n), calculate h(n) for n = 0 to 3.
Chapter 6 - FIR Filters 6. 30
ωc
When n = 0 ; h(0) = 1 − = 0.4
π
When n = 1 ; h(1) = −
b
sin 0.6π × 1 g = −0.3027
π ×1
When n = 2 ; h(2) = −
b
sin 0.6π × 2 g = 0.0935
π×2
When n = 3 ; h(3) = −
b
sin 0.6π × 3 g = 0.0623
π×3
The transfer function H(z) of the digital highpass filter is given by,
N−1
+
(N−1) (N−1) 2 +3
− −
H(z) = z 2 Z lh(n)q = z 2
∑N−1h(n) z−n = z−3 ∑ h(n) z−n
n= − n =−3
2
Y(z)
Let , H(z) = = 0.4 z −3 − 0.3027 z−2 + z−4 + 0.0935 z−1 + z −5 + 0.0623 1 + z−6
X(z)
Y(z) = 0.4z−3X(z) − 0.3027 z−2 X(z) + z−4X(z) + 0.0935 z−1X(z) + z −5X(z) + 0.0623 X(z) + z−6 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3
z X(z) z X(z) z X(z)
+ + +
−6 −5 −4
z X(z) z X(z) z X(z)
−3
0.0623 X(z) + z −6 X(z) 0.0935 z −1X(z) + z −5 X(z) −0.3027 z −2 X(z) + z −4 X(z)
NM QP 0.4z X(z)
+ + +
F ig 1 : L in e ar p h a se struc ture o f F IR h ig h p a ss filter.
6. 31 Digital Signal Processing
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude
response |H(ejww )| is given by |A(w
w )|,
N−1
2 3
Refer table 6.2 case (v)
where, A(ω ) = h(0) + ∑ 2 h(n) cos ωn = h(0) + ∑ 2 h(n) cos ωn
n =1 n =1
|H (e jω)|
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13π 14 π 15π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e resp o n se o f F IR h igh p a ss filte r.
Chapter 6 - FIR Filters 6. 32
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = 0.4 z −3 − 0.3027 z −2 + z −4 + 0.0935 z −1 + z −5 + 0.0623 1 + z −6
z = e jω
= [0.4 cos3ω − 0.3027 cos 2ω − 0.3027 cos 4ω + 0.0935 cos ω + 0.0935 cos5ω + 0.0623 + 0.0623 cos 6ω ]
+ j[ −0.4 sin 3ω + 0.3027 sin 2ω + 0.3027 sin 4ω − 0.0935 sin ω − 0.0935 sin 5ω − 0.0623 sin 6ω ]
Using the above equation, the frequency response H(ejw ) and magnitude function |H(ejw )| of highpass filter are calculated for various values
of w and listed in table 2. It is observed that the magnitude response obtained by both the methods are same.
Example 6.3
Design an FIR bandpass filter to pass frequencies in the range 1.5 kHz to 3 kHz and sampling frequency
of 8 kHz with 7 samples using Fourier series method. Determine the frequency response and verify the design by
sketching the magnitude response.
Solution
Given that, Fc1 = 1.5 kHz ; Fc2 = 3 kHz ; Fs = 8 kHz
Ω c1 2πFc1 2π × 1.5 × 103
∴ ω c1 = Ω c1T = = = = 0.375π
Fs Fs 8 × 103
Ω c2 2πFc2 2π × 3 × 103
ω c2 = Ωc2T = = = = 0.75π
Fs Fs 8 × 103
e j
Hd e jω = 1 ; for − ω c2 ≤ ω ≤ −ω c1 and ω c1 ≤ ω ≤ ω c2
= 0 ; otherwise
6. 33 Digital Signal Processing
The desired impulse response hd(n) of the bandpass filter is,
π − ω c1 ω c2
hd (n) =
1
2π z
−π
e j
Hd e jω e jωn dω =
1
2π z
− ω c2
1 × e jωn dω +
1
2π z
ω c1
1 × e jωn dω
=
1 LM e OP
jωn − ω c1
+
1 LM e OPjωn ω c 2
=
LM
1 e− jω c1n e− jω c2n
− +
OP
1 ejω c2n e jω c1n
−
LM OP
2π MN jn PQ −ω c2
2π MN jn PQ ω c1
2π MN
jn jn 2π jn PQ
jn MN PQ
=
1 e LM jω c 2n
−e − jω c 2n
−
e jω c1n
− e− jω c1n OP sinθ =
e jθ − e− jθ
πn MN 2j 2j PQ 2j
sin ω c2n − sin ω c1n
= ; for all n, except n = 0. When n = 0, the hd(n) become
πn
0/0, which is indeterminate.
∴ H(z) = z−3 h(3) z3 + h(2) z2 + h(1) z + h(0) + h(1)z−1 + h(2) z −2 + h(3) z −3 Using symmetry
condition,
= z−3 h(0) + h(1) z + z−1 + h(2) z2 + z−2 + h(3) z3 + z−3 h( n) = h(n)
= h(0) z−3 + h(1) z−2 + z−4 + h(2) z−1 + z−5 + h(3) z0 + z−6
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3
z X(z) z X(z) z X(z)
+ + +
−6 −5 −1
−4
z X(z) z X(z) z X(z)
−6 −1 −5 −2 −4 −3
0.1156[X(z) + z X(z)] −0.2716[z X(z) + z X(z)] −0.069[z X(z) + z X(z)] 0.375z X(z)
+ + +
F ig 1: L in ea r ph a se stru c tu re o f F IR b an d p a ss filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude
response |H(ejww )| is given by |A(w
w )|,
N−1
2
where, A(ω ) = h(0) + ∑ 2 h(n) cos ωn Refer table 6.2 case (v)
n = 1
3
= h(0) + ∑ 2 h(n) cos ωn
n =1
|H (e jω)|
2.0
1.8
1.6
1.4
1.2
1.0
0.8
0.6
0.4
0.2
ω
0
π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a g n itu de resp on se o f F IR b a n d p ass filter.
Alternate Method for Frequency Response
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = 0.375z −3 − 0.069 z −2 + z −4 − 0.2716 z −1 + z −5 + 01156
. 1 + z −6
z = e jω
= [0.375cos3ω − 0.069 cos 2ω − 0.069 cos 4ω − 0.2716 cos ω − 0.2716 cos5ω + 0.1156 + 01156
. cos 6ω ]
+ j[ −0.375 sin 3ω + 0.069 sin 2ω + 0.069 sin 4ω + 0.2716 sin ω + 0.2716sin 5ω − 01156
. sin 6ω ]
Chapter 6 - FIR Filters 6. 36
Using the above equation, the frequency response H(ejw ) and magnitude function |H(ejw )| of bandpass filter are calculated for various values
of w and listed in table 2. It is observed that the magnitude response obtained by both the methods are same.
Example 6.4
Design a FIR bandstop filter to reject frequencies in the range 1.5 kHz to 3 kHz and sampling frequency
of 8kHz with 7 samples using Fourier series method. Determine the frequency response and verify the design by
sketching the magnitude response.
Solution
Given that, Fc1 = 1.5 kHz ; Fc2 = 3 kHz ; Fs = 8 kHz
. × 103
Ω c1 2 πFc1 2π × 15
∴ ω c1 = Ω c1T = = = = 0. 375 π
Fs Fs 8 × 103
Ω c2 2πFc2 2π × 3 × 103
ω c2 = Ω c2T = = = = 0.75 π
Fs Fs 8 × 103
The desired frequency response Hd(ejw ) of bandstop filter is,
−ω c2 ω c1 π
=
1
2π z −π
1 × e jωn dω +
1
z
2π − ω
1 × e jωn dω +
c1
1
2π z
+ω c2
1 × ejωn dω
=
1 e LM jωnOP
−ω c2
+
1 e LM jωnOP
ω c1
+
LM
1 e jωn OP π
2π jn MN PQ −π
2π jn MN PQ − ω c1 MN
2π jn PQ ω c2
6. 37 Digital Signal Processing
∴ hd (n) =
LM
1 e − jω c2n e− jπn
− +
OP
1 ejω c1n e − jω c1n
− +
LM
1 e jπn ejω c2n
−
OP LM OP
MN
2π jn jn 2π jn PQ
jn 2π jn MN jn PQ MN PQ
=
1 Le
M
jπn
− e− jπn ejω c1n − e− jω c1n e jω c2n − e− jω c2n
+ −
OP e jθ − e− jθ
sinθ =
πn N 2j 2j 2j Q 2j
sin πn + sin ω c1n − sin ω c2n
= ; for all n, except n = 0
πn When n = 0, the
= 1−
FG ω c2 − ω c1 IJ ; for n = 0
H π K
N−1 7 −1
Here, N = 7, ∴ = =3
2 2
Since, the impulse response h(n) satisfies the symmetry condition, h(n) = h(n), calculate h(n) for n = 0 to 3.
When n = 0 ; h(0) = 1 −
FG ω c2 − ω c1
= 1−
IJ
0.75π − 0.375π FG
= 0.625
IJ
H π K π H K
sin (0.375π × 1) − sin(0.75π × 1)
When n = 1 ; h(1) = = 0.069
π ×1
sin (0.375π × 2) − sin(0.75π × 2)
When n = 2 ; h(2) = = 0.2716
π ×2
sin (0.375π × 3) − sin(0.75π × 3)
When n = 3 ; h(3) = = −0.1156
π×3
When n = −1 ; h(−1) = h(1) = 0.069
When n = −2 ; h(−2) = h(2) = 0.2716
When n = −3 ; h(−3) = h(3) = −0.1156
The transfer function H(z) of the digital bandstop filter is given by,
N−1
N−1 N−1
+ 3
2
− −
H(z) = z 2 l q
Z h(n) = z 2
∑ h(n) z−n = z−3 + ∑ h(n) z−n
N−1
n = − n = −3
2
= z−3 h( −3) z3 + h(−2) z2 + h(−1) z + h(0) z0 + h(1) z−1 + h(2) z−2 + h(3)z−3
Chapter 6 - FIR Filters 6. 38
∴ H(z) = z−3 h(3) z3 + h(2) z2 + h(1) z + h(0) + h(1) z−1 + h(2) z−2 + h(3)z−3 Using symmetry
condition,
= z−3 h(0) + h(1) z + z−1 + h(2) z2 + z−2 + h(3) z3 + z−3 h( n) = h(n)
Structure
Y(z)
Let , H(z) = = 0.625 z −3 + 0.069 z−2 + z−4 + 0.2716 z−1 + z−5 − 0.1156 1 + z −6
X(z)
∴ Y(z) = 0.625z−3 X(z) + 0.069 z−2 X(z) + z−4 X(z) + 0.2716 z −1 X(z) + z−5 X(z)
−1
z X(z) z −3X(z)
z
−1
z−1 z−1
+ + +
−1
−6
z −1 z −1 z
z X(z)
−3
−0.1156[X(z) + z−6X(z)]
−1 −5
0.2716[z X(z) + z X(z)] 0.069[z −2X(z) + z −4X(z)] 0.625z X(z)
+ + +
F ig 1 : L in ea r ph a se stru c ture of F IR ba n d sto p filte r.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude
function |H(ejww )| is given by |A(w
w )|,
N−1
2
where, A(ω ) = h(0) + ∑ 2 h(n) cos ωn Refer table 6.2 case (v)
n =1
3
A(ω ) = h(0) + ∑ 2 h(n) cos ωn
n =1
|H (e jω)|
1.3
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e resp o n se o f F IR b a n d sto p filter.
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = 0.625z −3 + 0.069 z −2 + z −4 + 0.2716 z −1 + z −5 − 01156
. 1 + z −6
z = e jω
e j
∴ H e jω = 0.625 cos3ω − j sin 3ω + 0.069 cos 2ω − j sin 2ω + cos 4ω − j sin 4ω
= [0.625cos 3ω + 0.069 cos 2ω + 0.069 cos 4ω + 0.2716 cos ω + 0.2716 cos5ω − 01156
. − 01156
. cos 6ω ]
+ j[ −0.625 sin 3ω − 0.069 sin 2ω − 0.069 sin 4ω − 0.2716 sin ω − 0.2716 sin 5ω + 0.1156 sin 6ω]
Using the above equation, the frequency response H(ejw ) and magnitude function |H(ejw )| of bandstop filter are calculated for various values
of w and listed in table 2. It is observed that the magnitude response obtained by both the methods are same.
6.8 Windows
The windows are finite duration sequences used to modify the impulse response of the FIR filters in
order to reduce the ripples in the passband and stopband, and also to achieve the desired transition from
passband to stopband.
The FIR filter design starts with desired frequency response, Hd(ejw ). The desired impulse response,
hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ). The desired impulse response will be an
infinite duration sequence. On multiplying finite duration window sequence with infinite duration impulse
response, we get a finite duration impulse response with modified samples, which is used to design FIR filter.
The different types of window sequences discussed in this book are,
1. Rectangular window, wR(n)
2. Bartlett or Triangular window, wT(n)
3. Hanning window, wC(n)
4. Hamming window, wH(n)
5. Blackman window, wB(n)
6. Kaiser window, wK(n)
6. 41 Digital Signal Processing
Alternatively,
Rectangular window, w R (n) = 1 ; n = 0 to N − 1
.....(6.57)
=0 ; other n
The rectangular window sequence defined by equation (6.56) can be used only for odd values of N, but
the window sequence defined by equation (6.57) can be used for both odd and even values of N.
The frequency response or frequency spectrum of rectangular window WR(ejw ) is obtained by taking
Fourier transform of rectangular window sequence wR(n).
ωN
jω
sin 2
∴ WR (e ) = F {w R (n)} = ω
.....(6.58)
sin 2
Proof :
N−1
2 N −1 FG
− jω n −
N−1 IJ
H K
WR (e jω ) = F { w R (n)} = ∑ e− jωn = ∑e 2
n= −
N−1 n=0 Using finite
2
geometric series
N−1 jω
FG N − 1IJ jω
FG N − 1IJ N−1 sum formula,
H 2 K H 2 K
= ∑ e− jωn e = e ∑e − jωn
N −1
1 − CN
n= 0 n=0 ∑C
n=0
n
=
1− C
− jωN jωN − jωN − jωN
jω
FG N − 1IJ − jωN jω
FG N − 1IJ
H 2 K 1 − e H 2 K e 2 e 2 − e 2 e 2
= e = e
1 − e− jω − jω jω − jω − jω
e 2 e2 − e 2 e 2
The magnitude and log-magnitude response of rectangular window for N = 31 are shown in fig 6.22(c)
and (d). The spectrum of WR(ejw ) has two features that are important, they are the width of the main-lobe and
side-lobe amplitude. The main-lobe width is defined as the distance between the two points closest to w = 0
where |WR(ejw )| in dB is zero. For the rectangular window the main-lobe width is equal to 4p/N. The maximum
side-lobe magnitude for WR(ejw ) occurs for the first side-lobe and is equal to approximately -13 dB.
The magnitude response |H(ejw )| and log-magnitude response of the lowpass filter designed using
rectangular window are shown in fig 6.22(e) and (f). The approximated filter response differs from the ideal
desired response in several ways. The sharp transition in the ideal response at w = w c has been converted into
a gradual transition. In the passband a series of overshoots and undershoots occur. In the stopband the ideal
desired response is zero, but the FIR filter has a nonzero response called leakage. These features can be
explained in terms of the features of the window spectrum.
Chapter 6 - FIR Filters 6. 42
N = 31
N = 31 N = 31
w
4π
N
F ig a : R ecta ng u lar w in d ow seq uen ce. F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f
o f recta ng u lar w ind ow. recta ng u lar w ind ow.
N = 31 N = 31
−13 dB N = 31 ωc =0.5 π rad/sam ple ωc =0.5 π rad/sam ple
jω
|H d (e )|
F ig d : L og -m a g nitu d e resp o nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m a g nitu d e resp o nse of F IR low pa ss
o f recta ng u lar w ind ow. filter d esig ned u sin g rectang ula r w in do w. filter d esig ned u sin g rectang ula r w in do w.
The main-lobe of WR(ejw ) causes the smearing of the desired transfer function features. The discontinuity in
Hd(e ) is converted into a gradual transition in H(ejw ). The width of the transition region is related to the width
jw
of the main-lobe of WR(ejw ). Since the main-lobe width of WR(ejw ) is equal to 4p/N, the size of this transition
region can be reduced to any desired size by increasing the size (N), of the window sequence. The increase in N
also increases the number of computations necessary to implement the FIR filter.
Since the side-lobes of WR(ejw ) extend over a wide frequency range, large magnitude components in
Hd(e ) becomes smeared over a wide range of frequencies in H(ejw ). In the passband this side-lobe effects appear
jw
both as overshoots and undershoots to the desired response. In the stopband, these effects appear as a
nonzero response. These side-lobe effects do not diminish significantly, but remain almost constant as the
duration of rectangular window is increased.
It is observed that whatever be the number of elements of hd(n) included in the h(n), the magnitudes of the
overshoot and leakage will not change significantly, when the rectangular window is used. This result is known as
the Gibbs phenomenon, after the American Mathematician Josiak Willard Gibbs of Yale, who first noted this effect.
To reduce these side-lobe effects, we must consider alternate window sequences having spectrum exhibiting
smaller side-lobes. We can observe that the side-lobes of the window spectrum W(ejw ) represent the contribution
of the high frequency components in the window sequence. For the rectangular window, these high frequency
components are due to the sharp transitions from 0 to 1 at the edges of window sequence. Hence the amplitudes
of these high frequency components, (i.e., the side-lobe level) can be reduced by replacing these sharp transitions
by more gradual ones. This is the motivation for development of the triangular window, cosine window, etc.
6. 43 Digital Signal Processing
Alternatively,
N−1
2 n−
2
Triangular window , w T ( n) = 1− N−1
; for n = 0 to N − 1
.....(6.60)
=0 ; other n
The triangular window sequence defined by equation (6.59) can be used only for odd values of N, but
the window sequence defined by equation (6.60) can be used for both odd and even values of N.
The frequency response or frequency spectrum of triangular window WT(ejw ) is obtained by taking
Fourier transform of triangular window sequence wT(n).
F sin eωe jj I
N−1
2
) = F lw ( n)q = G
GG sin JJJ
4 .....(6.61)
∴ WT ( e jω T ω
H K
2
N = 31 N = 31
N = 31
8π
N
N = 31 N = 31 N = 31
ωc =0.5 π rad/sam ple ωc =0.5 π rad/sam ple
−25 dB jω
|H d (e )|
F ig d : L og -m a g nitu d e resp o nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m a g nitu d e resp o nse of F IR low pa ss
o f B artlett w in do w. filter d esig ned u sin g B artlett w ind ow. filter d esig ned u sin g B artlett w ind ow.
The magnitude and log-magnitude response of triangular window for N = 31 are shown in fig 6.23(c) and
(d). In log-magnitude response of triangular window the first side-lobe level is smaller than that of the rectangular
window, being reduced from –13 to – 25 dB. But the mainlobe width is 8p/N or twice that of the rectangular
window having the same duration. This result illustrates that there is a trade off between main-lobe width and
sidelobe level.
The magnitude response |H(ejw )| and log-magnitude response of the lowpass filter designed using
triangular window are shown in fig 6.23(e) and (f). The triangular window produces a smoother magnitude response
for FIR filter. The transition from passband to stopband is not as steep as that for FIR filters designed using the
rectangular window. In the stopband, the response is smoother, but the attenuation is less than that produced by
the rectangular window. Because of these characteristics the triangular window is not usually a good choice.
w RC ( n) = a + (1 − a) cos e j ; for n = −
2 πn
N−1
N−1
2
to +
N−1
2
.....(6.62)
= 0 ; other n
Alternatively,
w RC ( n) = a − (1 − a) cos e j ; for n = 0 to N − 1
2 πn
N−1 .....(6.63)
= 0 ; other n
The raised cosine window sequence defined by equation (6.62) can be used only for odd values of N, but
the window sequence defined by equation (6.63) can be used for both odd and even values of N.
The frequency response or frequency spectrum of raised cosine window WRC(ejw ) is obtained by taking
Fourier tansform of raised cosine window sequence wRC(n).
jω
l
∴ WRC ( e ) = F w RC ( n) = a q sin
ωN
2
+
1 − a sin e ωN
2
−
πN
N −1 j
ω
sin 2
2 sin e ω
−
π
2 N −1 j
sin e j
ωN πN
+
1− a 2 N −1
+ .....(6.64)
sin e j
2 ω π
+
2 N −1
Proof :
+∞
m
WH (e jω ) = F w RC( n) = r ∑ wRC(n) e jωn
n = ∞
N1
2
IJ O e jωn UUsing equation (6.62)U
= ∑ LNMa + (1 a)cosFGH 2πn
N1 K QP
N1
n=
2
L
N1 F FG N1 IJ I O FG N1 IJ
= ∑ MMa + (1 a) cosG K P
2π n jω n
H 2 JJ P e H 2 K
NM
n=0 GH N1
K PQ
6. 45 Digital Signal Processing
N1 FG N 1IJ
∑ LMNa + (1 a) cose π jO e
jω
∴ WH (e jω ) =
2 πn jωn H 2 K
n=0
PQ N1
e
cos(θ π) = cosθ
FG IJN1 N1
jω
FG N 1IJ N1 jω
FG N 1IJ N1
e jθ + e− jθ
H 2 K jωn H 2 K e je
2 πn jωn cosθ =
= ae ∑e (1 a) e ∑ cos
N1 2
n=0 n=0
F N 1IJ
jω G
H 2 K
N1 F N 1IJ
jω G
H 2 K
N1 LM j2πn − j2πn
OP
= ae ∑ e jωn (1 a) e ∑ MN e N1 + eN 1 PQ e
jωn
n=0 n=0
2
F N 1IJ
jω G N1
H 2 K
= ae ∑ e jωn
n=0
F N 1IJ LM j2 πn − j2 πn OP
1 a jω GH
N1 N1
2 K
e N 1 e jωn + e N 1 e jωn
2
e
MN ∑
n=0
∑
n=0 PQ
F N 1IJ
jω G N1
H 2 K
= ae ∑ (e jω )n
n=0
F N 1IJ LM F FG 2π IJ I n F FG 2π IJ I n O
1 a jω GH K J PP
N1 −j ω N1 −j ω +
2
e 2 K
MM ∑ GG e H N1 KJ +
JK ∑ GG e H N1
JK P
n=0
N H n=0 H Q
jω
FG N 1IJ
H 2 K 1 e jωN
= ae
1 e jω
Using finite
jω
FG N 1IJ LM FGH j ω
IJ
2π
K N
FG 2π IJ N O
H N 1K P
j ω + geometric series
1 a H 2 K N1
2
e MM1 e FG j ω
2π I
J
+
1 e
F 2π IJ PP
jG ω +
sum formula,
N −1
N1 e H N 1K 1 e H N 1K Q ∑C n
=
1 − CN
n=0 1− C
jωN F jωN jωN I
e 2 GG e 2 e 2 JJ
jω
FG N −1IJ GH JK
= ae H 2K e jθ e− jθ = 1
jω F jω jω I
e 2 GG e 2 e 2 JJ
GH JK
FG
j ω
2π N IJ F FGH j ω
2π N IJ FG
j ω
2π NIJ I
F N − 1IJ e H N1 2 K GG e N1 2 K e H N1 2 K JJ
1 a jω GH
e 2 K H K
2 FG
j ω
H
2π 1 IJ
K
F FGH j ω
2π 1 IJ
K
FG
j ω
H
2π 1IJ I
K J
e N1 2 GG e N1 2
e N1 2
JK
H
FG
j ω +
2π N IJ F FGH j ω+
2π N IJ j ω +
FG 2π N IJ I
F N − 1IJ e
H N1 2 K GG e N1 2 K e H N1 2 K J
JK
1 a jω GH
e 2 K H
2 FG
j ω +
2π 1 IJ F FGHj ω+
2π 1 IJ FG
j ω +
2π 1 IJ I
e H N1 2 K GG e N1 2 K e H N1 2 K J
JK
H
Chapter 6 - FIR Filters 6. 46
LM jω FG N − 1IJ − jωN
+
jω OP sinωN
a eN
H 2 K Q e jθ − e− jθ
∴ WH e e j= jω 2 2 2
sin ω
sin θ =
2j
2
1 a MN jω GH
L F N − 1IJ − jFG ω + 2π IJ N + jFG ω + 2π IJ 1 OP sinFH e ω+
2π N
j IK
2 K H N 1K 2 H N 1K 2 Q N1 2
e
2 sinFH e j IK
2π 1
ω+
N1 2
LM jωN jω
jωN
+
jω OP sin ωN
= a eN 2 2 2 2 Q 2
ω
sin
2
L jωN jω jωN jπN jω jπ OP e
sin ωN πN
j
1 a MN 2 2
2
+
N−1
+
2
−
N−1 Q 2
−
N−1
e
2 sine ω
−
π
j
2 N−1
= a
sin ωN
2
jπ ωN
1 a N 1(N 1) sin 2 −
e
e πN
N−1 j
ω
sin
2
2 sin ω − e 2
π
N−1 j e ± jπ = − 1
e
jπ ωN
1 a N 1(N 1) sin 2 + e πN
N−1
j
2 sin ω + e 2
π
N−1
j
= a
sin ωN
2
+
ωN
1 − a sin 2 − e πN
N−1
j +
ωN
1 a sin 2 + e πN
N−1
j
ω
sin
2
2 sin ω − e 2
π
N−1
j 2 sin ω + e 2
π
N−1
j
6.8.4 Hanning Window
The Hanning window is one type of raised cosine window. The equation for Hanning window sequence
wC(n) is obtained by putting a = 0.5 in equations (6.62) and (6.63).
2 πn N−1 N−1
Hanning window, w C ( n) = 0.5 + 0.5 cos N − 1 ; for − 2
to + 2
=0 ; other n .....(6.65)
Alternatively,
2 n π
Hanning window , w C ( n) = 0.5 − 0.5 cos N − 1 ; for n = 0 to N − 1
.....(6.66)
=0 ; other n
The Hanning window sequence defined by equation (6.65) can be used only for odd values of N, but the
window sequence defined by equation (6.66) can be used for both odd and even values of N.
The frequency response or frequency spectrum of Hanning window WC(ejw ) is obtained by taking
Fourier transform of Hanning window sequence wC(n), which can also be obtained from equation (6.64) by
putting a = 0.5.
6. 47 Digital Signal Processing
jω
l
∴ WC ( e ) = F w C ( n) = 0.5 q sin
ωN
2
+ 0.25
e sin
ωN
2
−
πN
N −1 j
ω
sin e j
ω π
sin 2
−
2 N −1
sin e j
ωN πN
+
2 N −1
+ 0.25
sin e .....(6.67)
ω
+
π
2 N −1 j
N = 31 N = 31
N = 31
8π
N
F ig a : H a n nin g w in do w seq uen ce. F ig b : A m plitud e respo nse o f H a nn ing w in do w. F ig c: M ag nitud e respo nse o f
H a nn in g w in do w.
N = 31
N = 31 N = 31 ωc =0.5 π rad/sam ple
ωc =0.5 π rad/sam ple
−31 dB
|H d (e jω)|
F ig d : L og -m ag nitud e respo nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m ag nitud e respo nse o f F IR low pa ss
o f H a nn in g w in do w,. filter d esig ned usin g H an n ing w ind ow. filter d esig ned usin g H an n ing w ind ow.
The magnitude and log-magnitude response of Hanning window for N =31 are shown in fig 6.24(c) and (d).
In the log-magnitude response of WC(ejw ) the magnitude of the first side-lobe is –31 dB. An improvement of 6 dB
over the triangular window. When compared to triangular window, the main-lobe width is same but the magnitude
of side-lobe is reduced, hence the Hanning window is preferrable to triangular window.
The magnitude response |H(ejw )| and log-magnitude response of the lowpass filter designed by using
Hanning window are shown in fig 6.24(e) and (f). Most notable is the improved stopband attenuation characteristic.
The largest peak is approximately 44 dB relative to the passband level. At higher frequencies the stopband
attenuation is even greater.
Hamming noted that a reduction in the first side-lobe level can be achieved by adding a small constant
value to the raised cosine window. The equation for Hamming window sequence wH(n) is obtained by putting
a = 0.54 in equations (6.62) and (6.63).
Chapter 6 - FIR Filters 6. 48
π −1 N−1
∴ Hamming window, w H ( n) = 0.54 + 0.46 cos N2 −n1 ; for n = − N 2 to +
2
=0 ; other n .....(6.68)
Alternatively,
2 πn
Hamming window, w H ( n) = 0.54 − 0.46 cos N − 1 ; for n = 0 to N − 1
.....(6.69)
=0 ; other n
The Hamming window sequence defined by equation (6.68) can be used only for odd values of N, but the
window sequence defined by equation (6.69) can be used for both odd and even values of N.
The frequency response or frequency spectrum of Hamming window WH(ejw ) is obtained by taking Fourier
transform of Hamming window sequence wH(n), which can also be obtained from equation (6.64) by putting a = 0.54.
jω
∴ WH (e ) = F w H ( n) = 0.54l q sin
ωN
2
+ 0.23
e sin
ωN
2
−
πN
N −1 j
ω
sin e j
ω π
sin 2
−
2 N −1
sin e j
ωN πN
+
2 N −1
+ 0.23
sin e .....(6.70)
ω
+
π
2 N −1 j
N = 31 N = 31
N = 31
8π
N
N = 31 N = 31
N = 31
ωc=0.5 π rad/sam ple
ωc=0.5 π rad/sam ple
−41 dB
|H d (e jω)|
F ig d : L og -m a g nitu d e resp o nse F ig e: M ag nitud e respo nse o f F IR low pa ss filter F ig f: L og -m a g nitu d e resp o nse of F IR low pa ss
o f H a m m in g w in do w,. d esig ned u sin g H am m in g wind ow. filter d esig ned u sin g H am m ing w ind ow.
The magnitude and log-magnitude response of hamming window for N = 31 are shown in fig 6.25(c) and (d).
Hamming reduced the side-lobe magnitude while maintaining the main-lobe width, equal to 8p/N. The magnitude
of the first side-lobe has been reduced to –41dB, an improvement of 10 dB relative to the Hanning window. But this
improvement is achieved at the expense of the side-lobe magnitudes at higher frequencies, which are almost
constant with frequency. [With the Hanning window, the side-lobe amplitudes decrease with frequency].
The magnitude response |H(ejw )| and log-magnitude response of lowpass filter designed using the Hamming
window are shown in fig 6.25(e) and (f). It is noted that the first side-lobe peak is reduced to –51 dB, an
improvement of 7 dB relative to the Hanning window filter. However, as the frequency increases, the stopband
attenuation does not increase as much as with the filter produced by the Hanning window.
The stopband attenuation in the lowpass filter magnitude response is limited by the side-lobe level of the
window function. Even though the Hamming window achieved an attenuation of 51 dB (or gain of –51 dB) in the
stopband for our lowpass filter, it may not be sufficient for some applications.
2 πn 4 πn N–1 N–1
Blackman window, w B ( n) = 0.42 + 0.5 cos N–1
+ 0.08 cos N–1
; for – 2
to + 2
=0 ; other n .....(6.71)
Alternatively,
2 πn 4 πn
Blackman window, w B ( n) = 0.42 − 0.5 cos N–1
+ 0.08 cos N–1
; for n = 0 to N – 1
.....(6.72)
=0 ; other n
The Blackman window sequence defined by equation (6.71) can be used only for odd values of N, but the
window sequence defined by equation (6.72) can be used for both odd and even values of N.
The frequency response or frequency spectrum of Blackman window WB(ejw ) is obtained by taking
Fourier tranform of Blackman window sequence wB(n).
jω
l q
∴ WB ( e ) = F w B ( n) = 0.42
sin
ωN
2
+ 0.25
sine ωN
2
−
Nπ
N −1 j + 0.25 sin e ωN
2
+
Nπ
N −1 j
ω
sin e j sin e j
ω π ω π
sin 2
− +
2 N −1 2 N −1
The magnitude and log-magnitude response of Blackman window for N = 31 are shown in fig 6.26(c)
and (d). In Blackman window the width of main-lobe is 12p/N, which is highest among windows. It can be
observed that the magnitude of the first side-lobe is –58 dB and the side-lobe magnitude decreases with frequency.
This desirable feature is achieved at the expense of increased main-lobe width. However, the main-lobe width can
be reduced by increasing the value of N.
The magnitude response |H(ejw )| and log-magnitude response of lowpass filter designed using blackman
window are shown in fig6.26 (e) and (f). It is observed at the first side-lobe peak is –78 dB, an improvement of 27
dB relative to Hamming window filter. However, as the frequency increases, the stopband attenuation does not
increase as much as with the filter produced by the Hanning window.
Chapter 6 - FIR Filters 6. 50
N = 31
N = 31
N = 31
12 π
N
F ig a : B la ckm an w ind o w sequ ence. F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f
o f B la ckm a n w ind ow. B la ckm a n w ind o w.
N = 31
N = 31 N = 31
ωc =0.5 π rad/sam ple
ωc =0.5 π rad/sam ple
|H d (e jω)|
−58 dB
F ig d : L og -m ag nitu d e respo nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m ag nitu d e respo nse of F IR low pa ss
o f B la ckm an w ind ow,. filter d esig ned u sin g B la ckm an w in do w. filter d esig ned u sin g B la ckm an w in do w.
=0 ; other n .....(6.74)
where, β1 = a 1 –
LM e j OP
2n
2
0.5
N Q
N–1
Alternatively,
I 0 (β2 )
Kaiser window function, w K ( n) = I0 (a2 )
; for n = 0 to N − 1
.....(6.75)
=0 ; other n
where, β 2 = a
LMe j − en −
N–1
2
N–1 2
j OPQ
0.5
; a2 = a
N–1
N 2 2 2
The Kaiser window sequence defined by equation (6.74) can be used only for odd values of N, but the
window sequenced defined by equation (6.75) can be used for both odd and even values of N.
The parameter "a" is an independent variable that can be varied to control the side-lobe levels with
respect to the main-lobe peak. The modified Bessel function of the first kind I0(x) is given by,
6. 51 Digital Signal Processing
LMb0.5xg2 OP k
L FG IJ k O
∞ 2 ∞
= 1+ ∑ N Q
1 x
I 0 ( x) = 1 + ∑ MN k! 2H K PQ b k !g 2
k=1 k=1
∞ FH 0.25x2 IK k 0.25x 2
FH 0.25x2 IK 2 FH 0.25x2 IK 3 .....(6.76)
= 1 + ∑ b k!g2
= 1+
b1!g2
+
b2!g2
+
b3!g2
+.....
k=1
The series of equation (6.76) can be used to compute I0(b1), I0(a), I0(b2), I0(a2) and can be computed for any
desired accuracy. Usually 25 terms of the series are sufficient for most practical purposes.
The frequency response or frequency spectrum of Kaiser window, WK(ejw ) is obtained by taking Fourier
transform of Kaiser window sequence wK(n).
F N −1 F F II
2a
2 0.5 I
2
sin GH 2
GH GH JK JK
ω2 −
N −1 JK
∴ WK (e jω ) = F w K ( n) = l q I0 (a) F 2 F 2 a I 2 I 0.5 .....(6.77)
GH ω − GH N −1JK JK
Fig 6.27 to 6.29 shows the Kaiser window sequence and its frequency response for three different values
of "a". With increase in value of "a" the magnitude of first side-lobe reduces, but the width of main-lobe
increases. The width of the main-lobe can be reduced by increasing the length N of the window sequence. In the
lowpass filter designed using Kaiser window the stopband attenuation increases with increase in the value
of "a".
N = 31 N = 31
N = 31
N = 31 N = 31
N = 31 ωc =0.5 π rad/sam ple ωc =0.5 π rad/sam ple
jω
|H d (e )|
F ig d : L og -m a g nitu d e resp o nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m a g nitu d e resp o nse of F IR low pa ss
o f K a iser w ind ow. filter d esig ned u sin g K a iser w in do w. filter d esig ned u sin g K a iser w in do w.
N = 31 N = 31
N = 31
N = 31 N = 31
N = 31
ωc =0.5 π rad/sam ple ωc =0.5 π rad/sam ple
jω
|H d (e )|
F ig d : L og -m a g nitu d e resp o nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m a g nitu d e resp o nse of F IR low pa ss
o f K a iser w ind ow. filter d esig ned u sin g K a iser w in do w. filter d esig ned u sin g K a iser w in do w.
N = 31 N = 31
N = 31
N = 31 N = 31
N = 31 ωc =0.5 π rad/sam ple ωc =0.5 π rad/sam ple
|H d (e jω)|
F ig d : L og -m a g nitu d e resp o nse F ig e: M ag nitud e respo nse o f F IR low pa ss F ig f: L og -m a g nitu d e resp o nse of F IR low pa ss
o f K a iser w ind ow,. filter d esig ned u sin g K a iser w in do w. filter d esig ned u sin g K a iser w in do w.
− N −1
w R ( n) = 1 ; for n = − N2 1 to +
2
= 0 ; other n
Rectangular w R ( n) = 1 ; for n = 0 to N − 1
= 0 ; other n
2 |n | N −1 N −1
w T ( n) = 1 − N −1
; for n = − 2
to +
2
Triangular =0 ; other n
2|n − ( N −1)/ 2|
w T ( n) = 1 − N −1
; for n = 0 to N − 1
=0 ; other n
2πn N −1 N −1
w C ( n) = 05
. + 05
. cos N −1
; for n = − 2
to +
2
=0 ; other n
Hanning
2πn
w C ( n) = 05
. − 05
. cos N −1 ; for n = 0 to N − 1
=0 ; other n
2πn N −1 N −1
w H ( n) = 054
. + 0.46 cos N −1
; for n = − 2
to +
2
=0 ; other n
Hamming 2πn
w H ( n) = 054
. − 046
. cos N −1 ; for n = 0 to N − 1
=0 ; other n
2πn 4πn N −1 N −1
w B ( n) = 0.42 + 05
. cos N −1
+ 0.08 cos N −1
; for n = − 2
to +
2
=0 ; other n
Blackman
2πn 4πn
w B ( n) = 0.42 − 05
. cos N −1 + 0.08 cos N −1
; for n = 0 to N − 1
=0 ; other n
I 0 (β1 ) N −1 N −1
w k ( n) = ; for n = − 2
to +
2
I 0 (a)
=0 ; other n
where, β1 = a LM
1−
FG 2 n IJ 2 OP 0.5
N H N −1 K Q
I 0 (β 2 )
w K ( n) = ; for n = 0 to N − 1
I 0 (a 2 )
Kaiser =0 ; other n
N 2
N −1
a2 = a 2
Chapter 6 - FIR Filters 6. 54
K ais er (a = 4.5)
H anning
F ig 6 .3 0 : S h a p es o f va rio u s w in do w fu n ctio n s.
Table 6.5 : Frequency - Domain Characteristics of Some Window Functions
π ωc
Lowpass filter H d ( e jω
R|e
|
) = S0
− jωα
;
;
– ωc ≤ ω ≤ + ωc
– π ≤ ω < – ωc
h d ( n) =
1
2π z
−π
H d (e jω ) e jωn dω =
1
2π z
−ω c
e –jωα e jωn dω
||0 ; ωc < ω ≤ π jω
Q H d (e ) = 0 in the range − π ≤ ω < −ω c and + ω c < ω ≤ + π
T
+π –ω c π
Highpass filter H d ( e jω
R|e
|
) = Se
− jωα
− jωα
;
;
– π ≤ ω ≤ – ωc
ωc ≤ ω ≤ π
h d ( n) =
1
2π z
−π
H d (e jω ) e jωn dω =
1
2π z
−π
e –jωα e jωn dω +
1
2π z
ωc
e − jωα e jωn dω
Bandpass filter H d ( e jω ) = S0
||e
|
− jωα
;
;
;
– ω c2 ≤ ω ≤ – ω c1
ωc1 ≤ ω ≤ ω c2
– π ≤ ω < –ω c2
h d ( n) =
1
2π
−π
z jω
H d (e ) e jωn
dω =
1
2π z
−ω c 2
e –jωα
e jωn
dω +
1
2π z
ω c1
e − jωα e jωn dω
− jωα
;
;
–π ≤ ω ≤ –ω c2
– ωc1 ≤ ω ≤ +ω c1
h d ( n) =
1
2π z
−π
H d (e jω )e jωn dω =
1
2π z
−π
e jωα e jωndω +
1
2π z
− ω c1
e − jωα e jωn dω +
1
2π z
ω c2
e − jωα e jωn dω
h d ( n) =
1
2π z
+π
−π
H d ( e jω ) e jωn dω
n=0
h d ( n) =
1
2π z
+π
−π
H d ( e jω ) e jωn dω
The impulse response is symmetric with centre of symmetry at n = 0, and so h(–n) = h(n).
Hence it is sufficient if we calculate h(n) for n = 0 to (N – 1)/2.
6. 57 Digital Signal Processing
4. Take Z-transform of the impulse response h(n) to get the noncausal transfer function of FIR
filter, HN(z).
N −1
+
2
∴ H N (z) = Z h(n) =l q ∑ h( n) z N −1
−n
n =−
2
5. Convert the noncausal transfer function, HN(z) to causal transfer function, H(z) by multiplying
HN(z) by z – (N – 1)/2.
N −1 Applying symmetry
+
−
N −1 2 condition, h(– n) = h(n)
∴ Transfer function, H(z) = z 2 ∑ h ( n ) z −n
Refer equation (6.55).
N −1
n =−
2
−
N −1
LM N −1
2
OP
Alternatively, Transfer function, H(z) = z 2
MMh(0) + ∑ h(n) z
n=1
n
+z −n
PP
N Q
6. Draw a suitable structure for realization of FIR filter.
Design verification
1. Determine the frequency response, H(ejw ).
Method - 1 : Choose a linear phase magnitude function |H(ejw )| from table 6.2. Using h(n),
obtain an equation for |H(ejw )|.
Method - 2 : The frequency response, |H(ejw )| can be obtained by replacing z by ejw in the
transfer function, H(z).
∴ Frequency response, H e jω = H ( z) e j z = e jω
Example 6.5
Design a linear phase FIR lowpass filter using rectangular window by taking 7 samples of window sequence
and with a cutoff frequency, w c = 0.2p rad/sample.
Solution
Let us choose symmetric impulse response with symmetry condition h(N 1 n) = h(n). Therefore, the
desired ideal frequency response Hd(ejw ) for FIR lowpass filter is,
Hd (ejω ) = e− jωα ; ω c ≤ ω ≤ +ω c
=0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
+π +ω c
hd (n) =
1
2π z
−π
jω
Hd (e ) e jωn
dω =
1
2π z
−ω c
e− jωα e jωn dω
+ω c
LM e OP +ω c
LM e OP
=
1
2π z
−ω c
ejω(n − α)
dω =
1
2π
jω (n − α )
MN j(n − α) PQ −ω c
=
1
2π
jω c (n − α )
MN j(n − α)
−
e− jω c (n − α )
j(n − α) PQ
Chapter 6 - FIR Filters 6. 58
∴ hd (n) =
1 LM e jω c (n − α )
− e− jω c (n − α) OP e jθ − e− jθ
sinθ =
π(n − α ) MN 2j PQ 2j
sin ω c (n − α ) When n = a, the hd(n) becomes
= ; for all n, except n = α
π(n − α ) 0/0, which is indeterminate.
sin ω c (n − α )
∴ When n = α ; hd (n) = Lt U sin g L' Hospital rule,
(n − α ) → 0 π(n − α )
sin Aθ
1 sin ω c (n − α ) 1 ω Lt =A
= Lt = × ωc = c θ→ 0 θ
π (n − α ) → 0 (n − α ) π π
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
= h(0) + h(1) z−1 + h(2) z−2 + h(3) z −3 + h(4) z −4 + h(5) z −5 + h(6) z −6 Using symmetry
−1 −2 −3 −4 −5 −6 condition,
= h(0) + h(1) z + h(2) z + h(3) z + h(2) z + h(1) z + h(0) z
h(N 1 n) = h(n).
= h(0) 1+ z −6 + h(1) z−1 + z−5 + h(2) z−2 + z−4 + h(3) z−3
Structure
Y(z)
Let , H(z) = = 0.1009 1 + z−6 + 0.1514 z−1 + z−5 + 0.1871 z−2 + z−4 + 0.2z −3
X(z)
∴ Y(z) = 0.1009 X(z) + z −6 X(z) + 0.1514 z−1X(z) + z−5 X(z) + 0.1871 z −2X(z) + z−4 X(z) + 0.2z−3 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
6. 59 Digital Signal Processing
+ + +
−6 −1 −5 −2 −4 −3
0.1009 [X(z)+z X(z)] 0.1514 [z X(z)+z X(z)] 0.1871 [z X(z)+z X(z)] 0.2 z X(z)
+ + +
F ig 1 : L in e ar p h a se stru cture o f F IR lo w pa ss filte r.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N 1)/2, the magnitude
response |H(ejww )| is given by |A(w
w )|,
N −1
2
Refer table 6.2 case (i)
where, A(ω ) = h e j + ∑ 2he
N− 1
2
n=1
N− 1
2 j cos ωn
− n
3
∴ A(ω ) = h(3) + ∑ 2 h(3 − n) cos ωn
n=1
|H (e jω)|
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a g n itu de resp on se o f F IR lo w p ass filter.
H d (e jω ) = 1 ; – ω c ≤ ω ≤ +ω c
= 0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
h d ( n) =
1
2π z
−π
H d (e jω ) e jωn dω =
1
2π z
−ω c
1 × e jωn dω
=
1 LM e
jωn OP +ω c
=
1 LM e jω c n
−
e−
jω c n OP sinθ =
e jθ − e − jθ
2π MN jn PQ −ω c
2π MN jn jn PQ 2j
=
1 LM ejω c n
− e − jω c n OP = sin ω n c
; for all n, except n = 0
When n = 0, the hd(n) become
πn MN 2j PQ πn 0/0, which is indeterminate.
sin ω c n
∴ When n = 0 ; h d ( n) = Lt U sin g L' Hospital rule,
n→0 πn
sin Aθ
1 sin ω c n 1 ω Lt =A
= Lt = × ωc = c θ→ 0 θ
π n→0 n π π
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
N −1 N −1
Rectangular window sequence, w R ( n) = 1 ; for n = − 2
to + 2
= 0 ; otherwise
Since, h(n) satisfies the symmetry condition h(–n) = h(n), calculate h(n) for n = 0 to 3.
ω c 0.2 π
When n = 0 ; h(0) = = = 0.2
π π
sin ( 0.2 π × 1)
When n = 1 ; h(1) = = 0.1871
π ×1
sin ( 0.2 π × 2)
When n = 2 ; h(2) = = 0.1514
π×2
sin (0.2 π × 3)
When n = 3 ; h(3) = = 0.1009
π×3
bg
When n = −1 ; h( −1) = h 1 = 0.1871
N −1
N −1 N −1 2 3
− −
H ( z) = z 2 l q
Z h(n) = z 2
∑ h( n) z – n = z −3
N −1
∑ h( n) z – n
n = −3
n =−
2
LM
= z −3 h(3) z 3 + z −3 + h(2) z 2 + z −2 + h(1) z + z −1 + h(0) OP
N Q
= h(3) z 0 + z −6 + h(2) z −1 + z −5 + h(1) z −2 + z −4 + h(0) z −3
It is observed that the transfer function obtained in both the methods are same.
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = 0.1009 1 + z −6 + 01514
. z −1 + z −5 + 0.1871 z −2 + z −4 + 0.2 z −3
z = e jω
− j6ω − jω − j5ω − j2 ω − j4 ω
= 0.1009 1 + e + 01514
. e +e + 0.1871 e +e + 0.2 e − j3ω
+ j[ − 01009
. sin 6ω − 0.1514 sin ω − 01514
. sin 5ω − 01871
. sin 2ω − 01871
. sin 4ω − 0.2 sin 3ω ]
Using the above equation the frequency response H(ejw ) and magnitude function |H(ejw )| of lowpass filter are calculated for various values of
w and listed in table 2. It is observed that the magnitude response obtained by both the methods are same.
Chapter 6 - FIR Filters 6. 62
Example 6.6
Design a linear phase FIR highpass filter using hamming window, with a cutoff frequency, w c = 0.8p
rad/sample and N = 7.
Solution
Let us choose symmetric impulse response with symmetry condition h(N 1 n) = h(n). Therefore, the
desired ideal frequency response Hd(ejw ) for FIR highpass filter is,
Hd (e jω ) = e − jωα ; π ≤ ω ≤ −ω c and + ω c ≤ ω ≤ + π
=0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
π −ω c π
hd (n) =
1
2π z
−π
Hd (e jω ) e jωn dω =
1
2π z
−π
e − jωα e jωn dω +
1
2π z
ωc
e − jωα e jωn dω
−ω c π
=
1
2π z
−π
e jω (n − α ) dω +
1
2π z
ωc
e jω(n − α ) dω
=
LM
1 e jω (n − α ) OP −ωc
+
LM
1 ejω (n − α ) OP π
MN
2π j(n − α ) PQ −π MN
2π j(n − α ) PQ ωc
=
1LM e − jω c (n − α )
−
e− jπ(n − α ) OP +
1 LM e
jπ (n − α )
−
ejω c (n − α ) OP
2π MN j(n − α) j(n − α) PQ 2π MN j(n − α) j(n − α) PQ e jθ − e− jθ
sinθ =
2j
=
1 LM e jπ(n − α )
− e− jπ(n − α )
−
e jω c (n − α ) − e − jω c (n − α ) OP
π(n − α ) MN 2j 2j PQ
sin π(n − α ) − sin ω c (n − α )
= ; for all n, except n = α When n = a, the hd(n) becomes
π(n − α )
0/0, which is indeterminate.
6. 63 Digital Signal Processing
sin π(n − α ) − sin ω c (n − α )
When n = α ; hd (n) = Lt
(n − α ) → 0 π(n − α )
=
1 LM Lt
sin π(n − α )
− Lt
sin ω c (n − α ) OP
π N
(n − α ) → 0 (n − α ) (n − α ) → 0 (n − α ) Q U sin g L' Hospital rule,
1 sin Aθ
= (π − ω c ) Lt =A
π θ→ 0 θ
ω
= 1− c
π
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
The Hamming window sequence wH(n) is given by,
=0 ; otherwise
∴ h(n) = hd (n) wH(n)
=
b g
sin π n − α − sin ω c n − α b g 0.54 − 0.46 cos e j
2πn
; for n ≠ α
πn−α b g N− 1
= 1−
FG ωc IJ 0.54 − 0.46 cos e j
2πn
; for n = α
H π K N− 1
gL
−sinω c n − 3 b nπ O Since n and a are integers,
∴ h(n) =
bg MN0.54 − 0.46 cos 3 PQ ; for n ≠ 3
π n−3 sin (n a) p = 0.
L
−sin(0.8π (0 − 3)) M0.54 − 0.46 cos
0 × πO
N 3 PQ
When n = 0 ; h(0) = = −0.0081
π × (0 − 3)
When n = 3 ; h(3) = 1 −
FG 0.8π IJ LM0.54 − 0.46 cos 3 × π OP = 0.2
H π KN 3 Q
When n = 4 ; h(4) = h(6 − 4) = h(2) = −0.1441 Using symmetry condition
When n = 5 ; h(5) = h(6 − 5) = h(1) = 0.0469 h(N 1 n) = h(n) Þ h(6 n) = h(n).
= h(0) 1+ z−6 + h(1) z−1 + z−5 + h(2) z−2 + z−4 + h(3) z−3
= −0.0081 1+ z−6 + 0.0469 z−1 + z−5 − 0.1441 z−2 + z−4 + 0.2 z−3
Structure
Y(z)
Let , H(z) = = −0.0081 1+ z−6 + 0.0469 z−1 + z−5 − 0.1441 z−2 + z −4 + 0.2 z−3
X(z)
+ + +
0.2
−6 −1 −5 −2 −4 −3
−0.0081 [X(z)+z X(z)] 0.0469 [z X(z)+z X(z)] −0.1441 [z X(z)+z X(z)] 0.2 z X(z)
+ + +
F ig 1 : L in e ar p h a se stru ctu re o f F IR h ig hp a ss filte r.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N 1)/2, the magnitude
response |H(ejww )| is given by |A(w
w )|,
N− 1
2
where, A(ω ) = h e j + ∑ 2he
N −1
2
n=1
N− 1
2 j cos ωn
− n Refer table 6.2 case (i)
3
∴ A(ω ) = h(3) + ∑ 2 h(3 − n) cos ωn
n=1
|H (e jω)|
0.6
0.55
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
ω
0
π 2π 3π 4π 5π 6π 7π 8π 9π 10π 11π 12π 13π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a g n itu d e resp o nse of F IR h ig h p ass filter.
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16
0.0106 0.0106 16
0.1605 0.1605
1×π 10 × π
16
0.0094 0.0094 16
0.2289 0.2289
2×π 11×π
16
0.0061 0.0061 16
0.3083 0.3083
3×π 12× π
16
0.0005 0.0005 16
0.3923 0.3923
4× π 13× π
16
0.0076 0.0076 16
0.4723 0.4723
5×π 14 × π
16
0.0198 0.0198 16
0.5387 0.5387
6× π 15× π
16
0.0383 0.0383 16
0.5827 0.5827
7× π 16 × π
16
0.0661 0.0661 16
0.5982 0.5982
8× π
16
0.1062 0.1062
Let the symmetry condition be h(– n) = h(n). Therefore, the desired ideal frequency response Hd(ejw ) for FIR highpass filter is,
H d (e jω ) = 1 ; – π ≤ ω ≤ −ω c and + ω c ≤ ω ≤ + π
= 0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
Chapter 6 - FIR Filters 6. 66
By definition of inverse Fourier transform,
π −ω c π
h d ( n) =
1
2π z
−π
H d (e jω ) e jωn dω =
1
2π z
−π
1 × e jωn dω +
1
2π z
ωc
1 × e jωn dω
=
LM OP
1 e jωn
−ω c
+
LM
1 e jωn OP π
=
LM
1 e − jω c n
−
e − jπn
+
1 e jπn
−
OP
e jω c n LM OP
MN PQ
2 π jn
−π
MN
2 π jn PQ ωc
2π jn MN jn 2 π jn PQjn MN PQ
1 Le OP e jθ − e − jθ
jπn − jπn jω c n − jω c n
=
πn M
M −2 je −
e −e
2j PQ
sinθ =
2j
N
sin πn − sin ω c n
= ; for all n, except n = 0. When n = 0, the hd(n) becomes
πn
0/0, which is indeterminate.
sin πn − sin ω c n
When n = 0 ; h d (0) = Lt
n→0 πn U sin g L' Hospital rule,
=
LM 1 Lt
sin πn
−
1
Lt
sin ω c n ω
=1− c
OP Lt
sin Aθ
=A
Nπ n→0 n π n→0 n π Q θ→ 0 θ
The impulse response of FIR filter is obtained by multiplying hd(n) by window sequence.
= 0 ; otherwise
∴ h(n) = −
sin ω c n LM
0.54 + 0.46 cos
πn OP ; for n ≠ 0 For integer n sin p n = 0.
πn N 3 Q
= 1−
FG IJ LM0.54 + 0.46 cos πn OP ; for n = 0
ωc
H KN π 3 Q
When n = 0
F 0.8π IJ LM0.54 + 0.46 cos π × 0 OP = 0.2
; h(0) = G1 −
H π KN 3 Q
sin b0.8π × 1g L
When n = 1 ; h(1) = −
π×1
MN0.54 + 0.46 cos π 3× 1 OPQ = −0.1441
sin b0.8π × 2 g L
When n = 2 ; h(2) = −
π× 2 MN0.54 + 0.46 cos π ×3 2 OPQ = 0.0469
sin b0.8π × 3g L
When n = 3 ; h(3) = −
π× 3 MN0.54 + 0.46 cos π 3× 3 OPQ = −0.0081
When n = −1 ; h( −1) = h(1) = −0.1441
The transfer function H(z) of the digital FIR highpass filter is given by,
N −1
N −1 N −1 2 3
− −
H ( z) = z 2 l q
Z h(n) = z 2
∑
− N −1
h( n) z – n = z −3 ∑ h( n) z – n
n = −3
n=
2
LM
∴ H(z) = z −3 h(3) z 3 + z −3 + h(2) z 2 + z −2 + h(1) z + z −1 + h(0) OP
N Q
= h(3) z 0 + z −6 + h(2) z −1 + z −5 + h(1) z −2 + z −4 + h(0) z −3
It is observed that the transfer function obtained in both the methods are same.
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = −0.0081 1 + z −6 + 0.0469 z −1 + z −5 + −0.1441 z −2 + z −4 + 0.2 z −3
z = e jω
− 01441
. cos 2ω − j sin 2ω + cos 4ω − j sin 4ω + 0.2 cos 3ω − j sin 3ω
Using the above equation the frequency response H(ejw ) and magnitude function |H(ejw )| are calculated for various values of w and listed in
table 2. It is observed that the magnitude response obtained by both the methods are same.
Example 6.7
Design a linear phase FIR bandpass filter to pass frequencies in the range 0.4p to 0.65p rad/sample by
taking 7 samples of hanning window sequence.
Solution
Let us choose symmetric impulse response with symmetry condition h(N 1 n) = h(n). Therefore, the
desired ideal frequency response Hd(ejw ) for bandpass filter is,
hd (n) =
1
2π z
−π
Hd (e jω ) e jωn dω
− ω c1 ω c2
=
1
2π z
− ω c2
e− jωα e jωn dω +
1
2π z
ω c1
e − jωα e jωn dω
− ω c1 ω c2
=
1
2π z
− ω c2
e jω (n − α ) dω +
1
2π z
ω c1
e jω (n − α ) dω
=
LM e
1 OP + 1 LM e
jω (n − α )
− ω c1
OP jω (n − α )
ω c2
MN j(n − α) PQ
2π 2π MN j(n − α ) PQ
−ω c2 ω c1
1 Le − jω c1(n − α )
e OP + 1 LM e
− jω c 2 (n − α ) jω c 2 (n − α )
e jω c1(n − α ) OP e jθ − e− jθ
= M
2π MN j(n − α )
−
j(n − α ) PQ 2π MN j(n − α)
−
j(n − α ) PQ sinθ =
2j
=
1 LM e jω c 2 (n − α )
− e − jω c2 (n − α )
−
e jω c1(n − α ) − e− jω c1(n − α ) OP
π(n − α ) MN 2j 2j PQ When n = a, the hd(n)
sin ω c2 (n − α ) − sin ω c1(n − α ) becomes 0/0 which
= ; for all n except n = α.
π(n − α ) is indeterminate.
Fω −
=G c2 ω c1 IJ 0.5 − 0.5 cos c h 2πn
; for n = α
H π K N− 1
Since, h(n) satisfies the symmetry condition, h(N 1 n) = h(n), calculate h(n) for n = 0 to 3.
=
FG ω c2 − ω c1 IJ FG 0.5 − 0.5 cos nπ IJ ; for n = 3
H π KH 3K
c h c
sin 0.65π (0 − 3) − sin 0.4π (0 − 3) h LMN0.5 − 0.5 cos 0 3× π OPQ
When n = 0 ; h(0) = =0
π(0 − 3)
c h c
sin 0.65π (1 − 3) − sin 0.4π (1 − 3) h LMN0.5 − 0.5 cos 1 ×3 π OPQ
When n = 1 ; h(1) = = −0.0556
π(1 − 3)
c h c
sin 0.65π (2 − 3) − sin 0.4π (2 − 3) h LMN0.5 − 0.5 cos 2 ×3 π OPQ
When n = 2 ; h(2) = = −0.0143
π(2 − 3)
When n = 3 ; h(3) =
FG 0.65π − 0.4π IJ FG 0.5 − 0.5 cos 3π IJ = 0.25
H π KH 3K
N−1 6
l q ∑ h(n) z = ∑ h(n) z
H(z) = Z h(n) = −n −n
n=0 n=0
Structure
Y(z)
Let , H(z) = = −0.0556 z 1 + z 5 − 0.0143 z−2 + z−4 + 0.25 z−3
X(z)
∴ Y(z) = −0.0556 z 1 X(z) + z 5 X(z) − 0.0143 z−2 X(z) + z−4 X(z) + 0.25 z 3 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
Chapter 6 - FIR Filters 6. 70
−1
z X(z)
+ +
−1
z
+ +
F ig 1 : L in ea r ph a se stru c tu re fo r F IR b a ndp a ss filte r.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N 1)/2 the magnitude
response |H(ejw )| is given by |A(w)|,
N−1
2
Refer table 6.2
where, A(ω ) = h e j ∑ 2h e
N−1
2
+
n=1
N−1
2 j
− n cos ωn
case (i)
3
∴ A(ω ) = h(3) + ∑ 2h b3 − ng cos ωn
n=1
|H (e jω)|
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12π 13π 14 π 15 π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
(π/2) (π)
F ig 2 : M a gn itu d e resp o n se o f F IR b a n d p ass filter.
e j
H d e jω = 1 ; − ω c2 ≤ ω ≤ −ω c1 & + ω c1 ≤ ω ≤ ω c2
= 0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
π c1 −ω ω
1 c2
h d ( n) =
1
2π − πz e j
H d e jω e jωn dω =
1
2π −ω
1 × e jωn dω + z
2π + ω
c2
1 × e jωn dω z c1
=
LM OP + 1 LM e OP
1 e jωn
− ωc1
jωn
ωc 2
=
LM
1 e − jωc1n e − jωc 2n
− +
OP
1 e jωc 2n e jωc1n
−
LM OP
MN PQ 2π MN jn PQ
2 π jn
− ωc 2 ωc1
2π MN
jn jn 2π jn PQjn MN PQ
1 Le jω c 2 n − jω c2 n jωc1n
− e − jωc1n OP e jθ − e − jθ
= M −2 je − e
πn MN 2j PQ sinθ =
2j
=0 ; otherwise
\ Impulse response, h(n) = hd(n) ´ wC(n)
=
FG sin ω − sin ω IJ e0.5 + 0.5cos j ; for n ≠ 0
c2 c1 2 πn
H πn K N −1
F ω − ω IJ e0.5 + 0.5cos j
=G c2 c1
; for n = 0 2 πn
H π K N −1
∴ h(n) =
FG sin ω n − sin ω n IJ FG 0.5 + 0.5cos πn IJ ; for n ≠ 0
c2 c1
H πn KH 3K
=G
F ω − ω IJ FG 0.5 + 0.5cos πn IJ ; for n = 0
c2 c1
H π KH 3K
When n = 0 ; h(0) = M
L 0.65π − 0.4π OP LM0.5 + 0.5 cos π × 0 OP = 0.25
N π QN 3 Q
When n = 1 ; h(1) = M
L sin c0.65π × 1h − sin c0.4π × 1h OP L0.5 + 0.5 cos π × 1 O = −0.0143
MN π ×1 PQ MN 3 Q
P
When n = 2 ; h(2) = M
L sin c0.65π × 2h − sin c0.4π × 2h OP L0.5 + 0.5 cos π × 2 O = −0.0556
MN π×2 PQ MN 3 Q
P
When n = 3 ; h(3) = M
L sin c0.65π × 3h − sin c0.4π × 3h OP L0.5 + 0.5 cos π × 3 O = 0
MN π×3 PQ MN 3 PQ
When n = –1 ; h(–1) = h(1) = –0.0143 Using symmetry
condtion,
When n = –2 ; h(–2) = h(2) = –0.0556
h(–n) = h(n).
When n = –3 ; h(–3) = h(3) = 0
The transfer function H(z) of FIR bandpass filter is,
N −1
+
N −1 N −1 2 3
− −
H ( z) = z 2 l q
Z h( n) = z 2
N 1
∑ −h( n) z − n = z −3 ∑ h( n) z − n
n=− n = −3
2
Using symmetry
= z −3 h( −3) z 3 + h( −2) z 2 + h( −1) z + h(0) z 0 + h(1) z −1 + h(2) z −2 + h(3) z −3 condtion,
h(–n) = h(n).
= z −3 h(3) z 3 + h(2) z 2 + h(1) z + h(0) + h(1) z −1 + h(2) z −2 + h(3) z −3
LM
= z −3 h(3) z 3 + z −3 + h(2) z 2 + z −2 + h(1) z + z −1 + h(0) OP
N Q
= h(3) z 0 + z −6 + h( 2) z −1 + z −5 + h(1) z −2 + z −4 + h( 0) z −3
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = −0.0556 z −1 + z −5 − 0.0143 z −2 + z −4 + 0.25 z −3
z = e jω
e j e j
= −0.0556 e − jω − e − j5ω − 0.0143 e − j2ω − e − j4ω + 0.25 e − j3ω
Using the above equation the frequency response H(ejw ) and magnitude function |H(ejw )| are calculated for various values of w and listed in
table 2. It is observed that the magnitude response obtained in both the methods are same.
6. 73 Digital Signal Processing
Example 6.8
Design a linear phase FIR bandstop filter to reject frequencies in the range 0.4p to 0.65p rad/sample
using rectangular window, by taking 7 samples of window sequence.
Solution
Let us choose symmetric impulse response with symmetry condition, h(N 1 n) = h(n). Therefore, the
desired ideal frequency response Hd(ejw ) for bandstop filter is,
Hd (e jω ) = e − jωα ; π ≤ ω ≤ ω c2 and ω c1 ≤ ω ≤ + ω c1 and + ω c2 ≤ ω ≤ + π
=0 ; otherwise
The desired impulse response hd(n) obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
+π
hd (n) =
1
2π z
−π
Hd (e jω ) e jωn dω
− ω c2 ω c1 π
=
1
2π z
−π
e− jωα ejωn dω +
1
2π z
− ω c1
e− jωα e jωn dω +
1
2π
ω c2
z e− jωα ejωn dω
− ω c2 ω c1 π
=
1
2π z
−π
e jω (n − α ) dω +
1
2π z
− ω c1
e jω (n − α ) dω +
1
2π
ω c2
z ejω (n − α ) dω
=
LM
1 e jω (n − α ) OP OP + 1 LM e
− ω c2
+
LM OP
1 e jω (n − α )
ω c1
jω (n − α )
π
MN
2π j(n − α ) PQ −πPQ 2π MN j(n − α MN
) PQ
2π j(n − α ) − ω c1 ω c2
1 Le e OP + 1 LM e
− jω c 2 (n − α ) − jπ (n − α )
e OP + 1 LM e jω c1(n − α )
e OP − jω c1(n − α ) jπ (n − α ) jω c2 (n − α )
= M
2π MN j(n − α )
−
j(n − α ) PQ 2π MN j(n − α )
−
j(n − α ) PQ 2π MN j(n − α )
−
j(n − α ) PQ
=
1 LM e −e jω c1(n − α )
+
e −e − jω c1(n − α )
−
e −e OP
jπ(n − α ) − jπ (n − α ) jω c2 (n − α ) − jω c2 (n − α )
π(n − α ) MN 2j 2j 2j PQ
sinω c1(n − α ) + sin π(n − α ) − sin ω c2(n − α)
= ; for all n, except n = α e jθ − e− jθ
π(n − α ) sinθ =
2j
Chapter 6 - FIR Filters 6. 74
=
1 LM Lt
sin ω c1(n − α )
+ Lt
sin π(n − α )
− Lt
sin ω c2 (n − α ) OP
π N
(n − α ) → 0 (n − α ) (n − α ) → 0 (n − α ) (n − α ) → 0 (n − α ) Q
1
= ω c1 + π − ω c2 U sin g L' Hospital rule
π
sin Aθ
= 1−
FG ω c2 − ω c1 IJ Lt
θ→ 0 θ
= A
H π K
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
The window sequence for rectangular window wR(n) is given by,
wR (n) = 1 ; for n = 0 to N − 1
= 0 ; otherwise
N−1 7 −1
∴ α= = = 3 ; N − 1= 6
2 2
Hence calculate h(n) for n = 0 to 6.
Since, h(n) satisfies the symmetry condition, h(N 1 n) = h(n), calculate h(n) for n = 0 to 3.
∴ h(n) =
b g b
sinω c1 n − 3 − sinω c2 n − 3 g ; for n ≠ 3
π n−3 b g Since n and a are
ω − ω c1 integers, sin(n a)p = 0.
= 1 − c2 ; for n = 3
π
sin(0.4π (0 − 3)) − sin(0.65π (0 − 3))
When n = 0 ; h(0) = = −0.0458
π × (0 − 3)
sin(0.4π (1 − 3)) − sin(0.65π (1 − 3))
When n = 1 ; h(1) = = 0.2223
π × (1 − 3)
sin(0.4π (2 − 3)) − sin(0.65π (2 − 3))
When n = 2 ; h(2) = = 0.0191
π × (2 − 3)
When n = 3 ; h(3) = 1 −
FG 0.65π − 0.4π IJ = 0.75
H π K
When n = 4 ; h(4) = h(6 − 4) = h(2) = 0.0191
Using symmetry condition
When n = 5 ; h(5) = h(6 − 5) = h(1) = 0.2223 h(N 1 n) = h(n) Þ h(6 n) = h(n).
When n = 6 ; h(6) = h(6 − 6) = h(0) = −0.0458
The transfer function H(z) of FIR bandstop filter is given by,
N 1 6
l q ∑ h(n) z
H(z) = Z h(n) = n
= ∑ h(n) z n
n = 0 n = 0
6. 75 Digital Signal Processing
∴ H(z) = h(0) + h(1) z −1 + h(2) z−2 + h(3) z −3 + h(4) z−4 + h(5) z −5 + h(6) z −6 Using symmetry
= h(0) + h(1) z −1
+ h(2) z −2
+ h(3) z −3
+ h(2) z −4
+ h(1) z −5
+ h(0) z −6 condition,
h(N 1 n) = h(n).
= h(0) 1+ z−6 + h(1) z−1 + z −5 + h(2) z−2 + z−4 + h(3) z −3
Structure
Y(z)
Let , H(z) = = −0.0458 1+ z−6 + 0.2223 z −1 + z−5 + 0.0191 z−2 + z−4 + 0.75 z−3
X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3
z X(z) z X(z) z X(z)
−1 −1 −1
z z z
+ + +
−1 −1 −1
−6 z −5
z −4
z
z X(z) z X(z) z X(z)
−6 −1 −5 −2 −4 −3
−0.0458 [X(z) + z X(z)] 0.2223 [z X(z) + z X(z)] 0.0191 [z X(z) + z X(z)] 0.75z X(z)
+ + +
F ig 1 : L in ea r ph a se stru c tu re fo r F IR b a nd sto p filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N 1)/2 the magnitude
response |H(ejw )| is given by |A(w)|,
N−1
N−1
2
N−1 Refer table 6.2
where, A(ω ) = h e j + ∑ 2h e
2
n=1
2 j
− n cos ωn case (i)
3
∴ A(ω ) = h(3) + ∑ 2h b3 − ng cos ωn
n=1
Using the above equation the magnitude response, A(w) and magnitude function |H(ejw )| are calculated for
various values of w and listed in table 1. Using these values the magnitude response is plotted as shown in fig 2.
Chapter 6 - FIR Filters 6. 76
w ) and |H(ejww )| for various values of w .
Table 1: A(w
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0 ×π 9×π
16
1.1414 1.1414 16
0.2810 0.2810
1×π 10 × π
16
1.1223 1.1223 16
0.3365 0.3365
2×π 11×π
16
1.0646 0.0646 16
0.4689 0.4689
3×π 12×π
16
0.9697 0.9697 16
0.6583 0.6583
4 ×π 13×π
16
0.8416 0.8416 16
0.8705 0.8705
5×π 14 ×π
16
0.6907 0.6907 16
1.0640 1.0640
6 ×π 15×π
16
0.5346 0.5346 16
1.1992 1.1992
7 ×π 16 ×π
16
0.3974 0.3974 16
1.2478 1.2478
8 ×π
16
0.3054 0.3054
|H (e jω)|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13π 14 π 15π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e resp o n se o f F IR b a n dsto p filter.
= 0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
− ωc2 ωc1
h d ( n) =
1
2π z
π
−π
H d (e jω ) e jωn dω =
1
2π z
−π
1 × e jωn dω +
1
2π z
− ωc1
1 × e jωn dω +
1
2π zπ
ωc2
1 × e jωn dω
6. 77 Digital Signal Processing
∴ h d ( n) =
LM OP + 1 LM e OP + 1 LM e OP
1 e jωn
− ω c2
jωn
ωc1
jωn
π
MN PQ
2 π jn 2 π MN jn PQ
−π
2 π MN jn PQ
− ω c1 ωc 2
1 Le OP + 1 LM e − e OP + 1
− jω c 2 n LM e OP
− jπn jω c1n − jωc1n jπn jω c 2 n
e e
= M
2 π MN jn
−
jn PQ 2 π MN jn jn PQ 2 π MN jn −
jn PQ
M 2 j OPP + LMM e −2 je OPP − LMM e −2 je
1 Le − e OP
jπn − jπn jωc1n − jωc1n jω c 2 n − jω c 2 n e jθ − e − jθ
= sinθ =
πn MN Q N Q N PQ 2j
=
1 1 1
× π + × ω c1 − × ω c2 = 1 −
ω c2 − ω c1 FG IJ Lt
sin Aθ
= A
π π π π H K θ→0 θ
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
N −1 N −1
Rectangular window sequence, w R ( n) = 1 ; n = − 2
to +
2
= 0 ; otherwise
N −1 7 −1
Here, N = 7, w c1 = 0.4p rad/sample ; w c2 = 0.65p rad/sample ; = =3
2 2
Hence, calculate h(n) for n = –3 to 3.
Since, h(n) satisfies the symmetry condition, h(–n) = h(n), calculate h(n) for n = 0 to 3.
sin ω c1 − sin ω c2 For integer n,
∴ h(n) = ; for n ≠ 0
πn sin pn = 0
=1−
FG ω − ω IJ ; for n = 0
c2 c1
H π K
When n = 0 ; h(0) = 1 − G
F ω − ω IJ = 1 − FG 0.65π − 0.4π IJ = 0.75
c2 c1
H π K H π K
sin b0.4 π × 1g − sin b0.65π × 1g
When n = 1 ; h(1) = = 0.0191
π ×1
When n = 2 ; h(2) =
b g
sin 0.4 π × 2 − sin 0.65π × 2 b g = 0.2223
π×2
When n = 3 ; h(2) =
b g
sin 0.4 π × 3 − sin 0.65π × 3 b g = −0.0457
π×3
When n = −1 ; h( −1) = h(1) = 0.0191 Using symmetry
condtion,
When n = −2 ; h( −2) = h(2) = 0.2223
h(–n) = h(n).
When n = −3 ; h( −3) = h(3) = −0.0457
The transfer function H(z) of the digital FIR bandstop filter is given by,
N −1
N −1 N −1 2 3
− −
H( z) = z 2 l q
Z h(n) = z 2
∑
− N −1
h( n) z – n = z −3 ∑ h( n) z – n
n = −3
n=
2 Using symmetry
condtion,
−3 3 2 0 −1 −2 −3
=z h( −3) z + h( −2) z + h( −1) z + h(0) z + h(1) z + h( 2) z + h(3) z h(–n) = h(n).
Chapter 6 - FIR Filters 6. 78
LM
= z −3 h(3) z 3 + z −3 + h(2) z 2 + z −2 + h(1) z + z −1 + h(0) OP
N Q
= h(3) z 0 + z −6 + h(2) z −1 + z −5 + h(1) z −2 + z −4 + h(0) z −3
It is observed that the transfer function obtained in both the methods are same.
e j
Frequency response, H e jω = H ( z)
z = e jω
e j
∴ H e jω = −0.0457 1 + z −6 + 0.2223 z −1 + z −5 + 0.0191 z −2 + z −4 + 0. 75 z −3
z = e jω
= [ −0.0457 − 0.0457 cos6ω + 0.2223 cos ω + 0.2223 cos5ω + 0.0191 cos2ω + 0.0191 cos 4ω + 0.75 cos3ω ]
+ j[ 0.0457 sin 6ω − 0.2223 sin ω − 0.2223 sin 5ω − 0.0191 sin 2ω − 0.0191sin 4ω − 0.75 sin 3ω ]
Using the above equation the frequency response H(ejw ) and magnitude function |H(ejw )| are calculated for various values of w and listed in
table 2. It is observed that the magnitude response obtained in both the methods are same.
∴ H ( k ) = H d (e jω ) 2 πk ; for k = 0, 1, ..... (N − 1)
ω=
N
3. Compute the N samples of impulse response h(n) using the following equation.
When N is odd,
LM N−1
2
OP
1
Impulse response, h( n) =
N
MMH(0) + 2 ∑ Re H(k) e
k=1
j2 πnk / N
PP .....(6.76)
N Q
When N is even,
LM N
2
−1 OP
1
Impulse response, h( n) =
N
MMH(0) + 2 ∑ Re H(k) e j2 πnk / N
PP .....(6.77)
N k=1
Q Here, H ej
N
2
=0
n=0
∴ H ( k ) = H d (e jω ) 2 π ( 2 k + 1) ; for k = 0, 1, ..... (N − 1)
ω=
2N
Chapter 6 - FIR Filters 6. 80
3. Compute the N samples of impulse response h(n) using the following equation.
When N is odd,
N− 3 Here, H e j=0
N −1
2 2 L jnπ ( 2 K + 1) OP 2
n=0
Example 6.9
Determine the coefficients of a linear-phase FIR filter of length N = 15 which has a symmetric unit sample
response and a frequency response that satisfies the conditions
H e j
2πk
15
=1 ; for k = 0, 1, 2, 3
= 0.4 ; for k = 4
=0 ; for k = 5, 6, 7
Solution
N − 1
For linear phase FIR filter the phase function, q(w) = -aw where α = .
2
15 − 1
Here, N = 15, ∴ α = =7.
2
2πk 2πk
Also, here ω = ω k = = . Hence we can go for type-1 design.
N 15
In this problem the samples of the magnitude response of the ideal (desired) filter are directly given for
various values of k.
2πk
− j7 ×
∴ H(k) = Hd (ω ) ω = ω = 1 e − jαω k =e 15 ; k = 0, 1, 2, 3
k
2πk
− j7 ×
= 0.4 e− jαω k = 0.4 e 15 ; k = 4
=0 ; k = 5, 6, 7
M H(0) + 2 ∑ ReMH(k) e
PQPP
h(n) = N
N M MN
k = 1
MN PQ
1 LM L OPOP
7 j2πnk
= H(0) + 2 ∑ Re MH(k) e 15
15 M MN PQPQ
N k = 1
1 LM L OP LM OPOP
3 j2πnk j2πn × 4
= H(0) + 2 ∑ Re MH(k) e 15 2 Re H(4) e 15
15 M
N MN
k = 1 PQ + MN PQPQ
6. 81 Digital Signal Processing
1 LM 3 L − j7 ×
2πk OP
j2πnk L − j7 × OP OP H(0) = 1
2π × 4 j8 πn
∴ h(n) = 1 + 2 ∑ ReMe 15
× e 15 + 2 Re M0.4 e × e 15 15
15 MN k = 1 MN PQ MN PQ PQ
1 LM 3 L j2πk OP
(n − 7 ) L j8 π OPOP
(n − 7 )
= 1 + 2 ∑ Re Me 15 + 2 Re M0.4 e 15 jθ
e = cos θ + j sin θ
15 MN k = 1 MN PQ MN PQPQ jθ
∴ Re[e ] = cos θ
1 LM1 + 2 cos 2πk (n − 7) + 0.8 cos 8π (n − 7)OP
3
=
15 MN ∑ 15 15 PQ
k = 1
=
1 LM1+ 2 cos 2π (n − 7) + 2cos 4π (n − 7) + 2 cos 6π (n − 7) + 0.8 cos 8π (n − 7) OP
15 N 15 15 15 15 Q
N−1
Here N = 15, \ N 1 = 14, 2
= 7.
When n = 0 ; h(0) =
1 LM
1 + 2 cos
2π(0 − 7)
+ 2cos
4π(0 − 7)
+ 2cos
6π(0 − 7)
+ 0.8 cos
8π(0 − 7) OP
15 N 15 15 15 15 Q
= −0.0141
When n = 1 ; h(1) =
1 LM
1 + 2 cos
2π(1 − 7)
+ 2cos
4π(1 − 7)
+ 2cos
6π(1 − 7)
+ 0.8 cos
8π(1 − 7) OP
15 N 15 15 15 15 Q
= −0.0019
When n = 2 ; h(2) =
1 LM
1 + 2 cos
2π(2 − 7)
+ 2cos
4π(2 − 7)
+ 2cos
6π(2 − 7)
+ 0.8 cos
8π(2 − 7) OP
15 N 15 15 15 15 Q
= 0.04
When n = 3 ; h(3) =
1 LM
1 + 2 cos
2π(3 − 7)
+ 2cos
4π(3 − 7)
+ 2cos
6π(3 − 7)
+ 0.8 cos
8π(3 − 7) OP
15 N 15 15 15 15 Q
= 0.0122
When n = 4 ; h(4) =
1 LM
1 + 2 cos
2π(4 − 7)
+ 2cos
4π(4 − 7)
+ 2cos
6π(4 − 7)
+ 0.8 cos
8π(4 − 7) OP
15 N 15 15 15 15 Q
= −0.0914
When n = 5 ; h(5) =
1 LM
1 + 2 cos
2π(5 − 7)
+ 2cos
4π(5 − 7)
+ 2cos
6π(5 − 7)
+ 0.8 cos
8π(5 − 7) OP
15 N 15 15 15 15 Q
= −0.0181
When n = 6 ; h(6) =
1 LM
1 + 2 cos
2π(6 − 7)
+ 2cos
4π(6 − 7)
+ 2cos
6π(6 − 7)
+ 0.8 cos
8π(6 − 7) OP
15 N 15 15 15 15 Q
= 0.3130
When n = 7 ; h(7) =
1 LM
1 + 2 cos
2π(7 − 7)
+ 2cos
4π(7 − 7)
+ 2cos
6π(7 − 7)
+ 0.8 cos
8π(7 − 7) OP
15 N 15 15 15 15 Q
= 0 . 52
When n = 8, h(8) = h(15 1 8) = h(6) = 0.3130
Using symmetry condition
When n = 9, h(9) = h(15 1 9) = h(5) = 0.0181 h(N 1 n) = h(n)
When n = 10, h(10) = h(15 1 10) = h(4) = 0.0914
Chapter 6 - FIR Filters 6. 82
When n = 11, h(11) = h(15 1 11) = h(3) = 0.0122
When n = 12, h(12) = h(15 1 12) = h(2) = 0.04
When n = 13, h(13) = h(15 1 13) = h(1) = 0.0019
When n = 14, h(14) = h(15 1 14) = h(0) = 0.0141
The transfer function H(z) of the filter is given by Z-transform of h(n)
N − 1 14
∴ H(z) = Z h(n) = l q ∑ h(n) z −n
= ∑ h(n) z−n
n = 0 n = 0
= h(0) + h(1) z −1 + h(2) z−2 + h(3) z−3 + h(4) z −4 + h(5) z−5 + h(6) z−6 + h(7) z−7
+ h(8) z−8 + h(9) z−9 + h(10) z−10 + h(11) z−11 + h(12) z−12 + h(13) z−13 + h(14) z−14
= h(0) + h(1) z −1 + h(2) z−2 + h(3) z−3 + h(4) z −4 + h(5) z−5 + h(6) z−6 + h(7) z−7
+ h(6) z−8 + h(5) z−9 + h(4) z−10 + h(3) z−11 + h(2) z−12 + h(1) z−13 + h(0) z−14
= h(0) 1+ z−14 + h(1) z −1 + z−13 + h(2) z−2 + z−12 + +h(3) z−3 + z−11 Using symmetry
condition
+ h(4) z−4 + z −10 + h(5) z−5 + z−9 + h(6) z−6 + z−8 + h(7)z−7 h(N 1 n) = h(n)
= −0.0141 1+ z −14 − 0.0019 z −1 + z−13 + 0.04 z−2 + z−12 + 0 .0122 z−3 + z−11
Structure
Y(z)
Let , H(z) = = −0.0141 1+ z−14 − 0.0019 z−1 + z−13 + 0.04 z −2 + z −12
X(z)
+ 0.0122 z−3 + z−11 − 0.0914 z−4 + z −10 − 0.0181 z−5 + z−9
∴ Y(z) = −0.0141 X(z) + z −14 X(z) − 0.0019 z −1X(z) + z −13 X(z) + 0.04 z −2X(z) + z −12 X(z)
+ 0.0122 z −3 X(z) + z −11 X(z) − 0.0914 z −4 X(z) + z −10 X(z) − 0.0181 z −5 X(z) + z −9 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3 −4 −5 −6 −7
−1
z X(z) z X(z) z X(z) −1
z X(z) −1
z X(z) −1
z X(z) −1 z X(z)
−1 −1
z z z z z z z
+ + + + + + +
−7
z X(z)
−1 −1 −1 −1 −1 −1 −1
−14
z z −12
z −11
z −10
z −9
z −8
z
−13
z X(z) z X(z) z X(z) z X(z) z X(z) z X(z) z X(z)
−1 −2 −3 −4 −5 −6 −7
−0.0141 × [X(z) −0.0019 × [z X(z) 0.04 × [z X(z) 0.0122 × [z X(z) −0.0914 × [z X(z) −0.0181 × [z X(z) 0.3130 × [z X(z) 0.52z X(z)
−14 −13 −12 −11 −10 −9 −8
+z X(z)] +z X(z)] +z X(z)] +z X(z)] +z X(z)] + z X(z)] + z X(z)]
+ + + + + + +
F ig 1 .
6. 83 Digital Signal Processing
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N 1)/2 the magnitude
response |H(ejww )| is given by |A(w
w )|,
N−1
2
N−1 N−1
where, A(ω ) = h e j ∑ 2h e
2
+
n=1
2 j
− n cos ωn Refer table 6.2 case (i)
7
∴ A(ω ) = h(7) + ∑ 2h b7 − ng cos ωn
n=1
Using the above equation, the magnitude response A(w) and magnitude function |H(ejw )| are calculated for
various values of w and listed in table 1. Using these values the magnitude response is plotted as shown in fig 2.
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10π 11π 12 π 13 π 14 π 15π 16 π 17 π 18 π 19π 20π 21π 22 π 23π 24 π 25 π 26π 27 π 28π 29 π 30π 31π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π)
6. 84
6. 85 Digital Signal Processing
Alternate Method for Frequency Response
e j
Frequency response, H e jω = H ( z)
z = e jω
e j = −0.0141 1 + z
∴He jω −4
− 0.0019 z −1 + z −13 + 0.04 z −2 + z −12 + 0. 0122 z −3 + z −11
= − 0.0141 − 0.0141 cos14ω − j sin 14ω − 0.0019 cos ω − j sin ω + cos13ω − j sin 13ω + 0.04 cos 2ω − j sin 2ω + cos12ω − jsin 12ω
+ 0.0122 cos 3ω − j sin 3ω + cos11ω − j sin 11ω − 0.0914 cos 4ω − j sin 4ω + cos10ω − j sin 10ω
− 0.0181 cos5ω − j sin 5ω + cos 9ω − j sin 9 ω + 0.3130 cos 6ω − j sin 6ω + cos8ω − j sin 8ω + 0.52 cos 7ω − j sin 7ω
= [ − 0.0141− 0.0141cos14ω − 0.0019 cos ω − 0.0019 cos13ω + 0.04 cos2ω + 0.04 cos12ω + 0.0122 cos3ω + 0.0122 cos11ω
− 0.0914 cos4 ω − 0.0914 cos10ω − 0.0181 cos5ω − 0.0181cos 9ω + 0.3130 cos 6ω + 0.3130cos8ω + 0.52 cos 7ω ]
+ j[0.0141 sin14ω + 0.0019 sin ω + 0.0019 sin13ω − 0.04 sin 2ω − 0.04 sin 12ω − 0.0122 sin 3ω − 0.0122 sin11ω
+ 0.0914 sin 4ω + 0.0914 sin10ω + 0.0181sin 5ω + 0.0181 sin 9ω − 0.3130 sin 6ω − 0.3130 sin 8ω − 0.52 sin 7ω ]
Using the above equation the frequency response H(ejw ) and magnitude function |H(ejw )| are calculated for various values of w and listed in
table 2. It is observed that the magnitude response obtained in both the methods are same.
For k = 3 to 8, the samples lie in the range 0.5p < w < 1.5 p
The sampling points on the ideal frequency response are shown in fig 2. The magnitude of samples of H(k)
(Magnitude spectrum) are shown in fig 3.
jω
|H d (e )| |H (k )|
ω k
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10π 0 1 2 3 4 5 6 7 8 9 10
11 11 11 11 11 11 11 11 11 11 F ig 3 : M a g n itu de spe ctru m o f H (k ).
F ig 2 : S a m p lin g p o ints o f H d (e jω).
6. 87 Digital Signal Processing
Based on the above discussions, the equation for DFT coefficients H(k) can be written as shown below.
2πk
− j5×
H(k) = Hd (e jω ) = e− jαω k = e 11 ; for k = 0, 1, 2
ω = ωk
=0 ; for k = 3 to 8
2πk
− j5×
= e− jαω k = e 11 ; for k = 9, 10
LM N − 1
2 LM OPOP
j2πnk
1 Using equation(6.76).
h(n) =
N
MM
H(0) + 2 ∑ ReMH(k) e PPP N
MN k = 1 N QPQ
1 LM L OPOP
5 j2πnk
= H(0) + 2 ∑ ReMH(k) e 11
11 M MN PQPQ
N k = 1
1 LM L OPOP
2 2πk j2πnk
− j5 × H(0) = 1
= 1 + 2 ∑ ReMe e 11 11
11 M MN PQPQ
N k = 1
1 LM L OOP
2 j2πk
(n − 5)
= 1 + 2 ∑ Re Me 11 P
11 M MN PQPQ
N k = 1
=
1 L
M L
1 + 2 ReMe
j2π
11
OP + 2 ReLMe
(n − 5)
j4π
11
OPOP
(n − 5)
11 M
N MN PQ MN PQPQ
1 L 2π(n − 5) 4π(n − 5) O e jθ = cos θ + j sin θ
11 MN 11 PQ
= 1 + 2 cos + 2 cos
11 ∴ Re[e jθ ] = cos θ
N−1
Here, N = 11, \ N 1 = 10, 2
= 5.
Since, h(n) satisfies the symmetry condition h(N 1 n) = h(n) with centre of symmetry at (N 1)/2, calculate
h(n) for n = 0 to to 5.
When n = 0 ; h(0) =
LM
1
1 + 2 cos
2π(0 − 5)
+ 2cos
4π(0 − 5) OP
= 0.0694
11N 11 11 Q
1 L 2π(1 − 5) 4π(1 − 5) O
11 MN 11 PQ
When n = 1 ; h(1) = 1 + 2 cos + 2cos = −0.054
11
1 L 2π(2 − 5) 4π(2 − 5) O
When n = 2 ; h(2) =
11 NM 1 + 2 cos
11
+ 2cos
11 PQ
= −0.1094
1 L 2π(3 − 5) 4π(3 − 5) O
11 MN 11 PQ
When n = 3 ; h(3) = 1 + 2 cos + 2cos = 0.0474
11
1 L 2π(4 − 5) 4π(4 − 5) O
When n = 4 ; h(4) =
11 NM 1 + 2 cos
11
+ 2cos
11 PQ
= 0.3194
1 L 2π(5 − 5) 4π(5 − 5) O
11 MN 11 PQ
When n = 5 ; h(5) = 1 + 2 cos + 2cos = 0.4545
11
Chapter 6 - FIR Filters 6. 88
When n = 6 ; h(6) = h(11 1 6) = h(4) = 0.3194
= h(0) + h(1) z−1 + h(2) z−2 + h(3) z−3 + h(4) z −4 + h(5) z−5
+ h(4) z−6 + h(3) z−7 + h(2) z−8 + h(1) z−9 + h(0) z−10
= h(0) 1+ z−10 + h(1) z−1 + z −9 + h(2) z−2 + z−8 + h(3) z−3 + z−7
= 0.0694 1+ z−10 − 0.054 z−1 + z −9 − 0.1094 z−2 + z−8 + 0.0474 z−3 + z−7
Structure
Y(z)
Let , H(z) = = 0.0694 1+ z−10 − 0.054 z−1 + z −9 − 0.1094 z−2 + z−8
X(z)
+ 0.0474 z−3 + z −7 + 0.3194 z −4 + z−6 + 0.4545 z−5
∴ Y(z) = 0.0694 X(z) + z−10 X(z) − 0.054 z−1X(z) + z−9 X(z) − 0.1094 z −2X(z) + z−8 X(z)
+ 0.0474 z−3 X(z) + z−7 X(z) + 0.3194 z−4 X(z) + z −6 X(z) + 0.4545 z −5 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3 −4 −5
−1
z X(z) z X(z) −1
z X(z) −1
z X(z) z X(z)
−1 −1
z z z z z
+ + + + +
−1 −1 −1 −1 −1
−10
z z −8
z −7
z z
−9 −6
z X(z) z X(z) z X(z) z X(z) z X(z)
−1 −9 −2 −8 −3 −7 −4 −6 −5
0.0694[X(z) + z −10 X(z)] −0.054[z X(z) + z X(z)] −0.1094[z X(z) + z X(z)] 0.0474 [z X(z) + z X(z)] 0.3194 [z X(z) + z X(z)] 0.4545z X(z)
+ + + + +
F ig 1 .
6. 89 Digital Signal Processing
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N 1)/2 the magnitude
response |H(ejww )| is given by |A(w
w )|,
N−1
2
N−1 N−1
where, A(ω ) = h e j ∑ 2h e
2
+
n =1
2 j
− n cos ωn Refer table 6.2 case (i)
5
∴ A(ω ) = h(5) + ∑ 2h b5 − ng cos ωn
n=1
= h(5) + 2h(4) cos ω + 2h(3) cos 2ω + 2h(2) cos 3ω + 2h(1) cos 4ω + 2h(0) cos 5ω
= 0.4545 + 2 × 0.3194 cos ω + 2 × 0.0474 cos 2ω + 2 × 0.1094 cos 3ω
+ 2 × − 0.054 cos 4ω + 2 × 0.0694 cos 5ω
= 0.4545 + 0.6388 cosω + 0.0948 cos 2ω + 0.2188 cos 3ω − 0.108 cos 4ω
+ 0.1388 cos 5ω
Using the above equation, the magnitude response A(w) and magnitude function |H(ejw )| are calculated for
various values of w and listed in table 1. Using these values the magnitude response is plotted as shown in fig 2.
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10π 11π 12 π 13 π 14 π 15π 16 π 17 π 18 π 19π 20π 21π 22 π 23π 24 π 25 π 26π 27 π 28π 29 π 30π 31π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π)
6. 90
6. 91 Digital Signal Processing
Alternate Method for Frequency Response
e j
Frequency response, H e jω = H ( z)
z = e jω
e j = 0.0694 1 + z
∴He jω −10
− 0.054 z −1 + z −9 − 01094
. z −2 + z −8 + 0. 0474 z −3 + z −7
+ 0.3194 z −4 + z −6 + 0.4545 z −5
z = e jω
= 0.0694 + 0.0694 cos10ω − j sin 10ω − 0.054 cos ω − j sin ω + cos 9ω − j sin 9ω
− 01094
. cos 2ω − j sin 2ω + cos8ω − j sin 8ω + 0.0474 cos 3ω − j sin 3ω + cos 7ω − j sin 7 ω
= [ 0.0694 + 0.0694 cos10ω − 0.054 cos ω − 0.054 cos 9ω − 0.1094 cos2ω − 0.1094 cos8ω + 0.0494 cos3ω + 0.0474 cos 7ω
+ 0.3194 cos4 ω + 0.3194 cos 6ω + 0.4545cos5ω]
+ j[ −0.0694 sin10ω + 0.054 sin ω + 0.054 sin 9ω + 01094
. sin 2ω + 0.1094 sin 8ω − 0.0474 sin 3ω − 0.0474 sin 7ω
− 0.3194 sin 4ω − 0.3194 sin 6ω − 0.4545 sin 5ω ]
Using the above equation the frequency response H(ejw ) and magnitude function |H(ejw )| are calculated for various values of w and listed in
table 2. It is observed that the magnitude response obtained in both the methods are same.
N –1
Phase delay, α = 2
( i.e., phase delay is constant)
Impulse response, h(n) = h(N – 1 – n) (i.e., impulse response is symmetric)
Q6.10 How is the constant group and phase delay achieved in linear phase FIR filters?
Solution
Given that, H(ejw ) = (0.7 + 0.6 cos w 0.9cos 2w) ej7.5w .....(1)
Solution
Given that, H(ejw ) = (0.4 + 0.7 cos 2w 0.5cos 4w) ej(0.3p + 4w) .....(1)
b
∠ H(e jω ) = − 0.3π + 4ω g
b
Let , ∠ H(e jω ) = θ(ω ) = − 0.3π + 4ω g
Phase delay, τp = −
θ(ω )
=−
b
− 0.3π + 4ω
=
0.3π
+4
g
ω ω ω
dθ(ω ) d
Group delay, τ g = −
dω
=−
dω
c−b0.3π + 4ωgh = 4
Q6.13. What are the possible types of impulse response for linear phase FIR filters?
There are six types of impulse response for linear phase FIR filters
(i). Symmetric impulse response and N is odd with centre of symmetry at (N – 1)/2.
(ii). Symmetric impulse response and N is even with centre of symmetry at (N – 1)/2.
(iii). Antisymmetric impulse response and N is odd with centre of antisymmetry at (N – 1)/2.
(iv). Antisymmetric impulse response and N is even with centre of antisymmetry at (N – 1)/2.
(v). Symmetric impulse response and N is odd with centre of symmetry at n = 0.
(vi). Antisymmetric impulse response and N is odd with centre of antisymmetry at n = 0.
Q6.14 Write the magnitude and phase function of FIR filter when impulse response is symmetric
and N is odd.
N –1
Magnitude function, |H(e jω )|= hFGH N –1IJK + ∑= 2hFGH N2−1 − nIJK cosωn
2
n 1
Q6.15 Write the magnitude and phase function of FIR filter when impulse response is symmetric and N is
even.
N 2
F I
Magnitude function, |H(e jω )|= ∑ 2hFGH N2 − nIJK cosGH ωFGH n − 21 IJK JK
n =1
Q6.16 Write the magnitude and phase function of FIR filter when impulse response is antisymmetric and
N is odd.
N –1
2
Magnitude function, |H( e jω )|= ∑ 2 hFGH N –1 − nIJK sinωn
2
n =1
Q6.18 List the well known design techniques for linear phase FIR filter.
There are three well known method of design techniques for linear phase FIR filters. They are,
i. Fourier series method and window method.
ii. Frequency sampling method.
iii. Optimal filter design methods.
Q6.19 Write the two concepts that leads to the Fourier series or window method of designing FIR filters.
The following two concepts leads to the design of FIR filters by Fourier series method.
i. The frequency response of a digital filter is periodic with period equal to 2p.
ii. Any periodic function can be expressed as a linear combination of complex exponentials.
Q6.20. Write the procedure for designing FIR filter by Fourier series method.
i. Choose the desired frequency response Hd(ejw ) of the filter.
ii. Evaluate the Fourier series coefficients from frequency response, which gives the desired impulse
response hd(n).
iii. Truncate the infinite sequence h d(n) to a finite N-point sequence h(n), for n = – (N – 1)/2
to +(N – 1)/2
iv. Take Z-transform of h(n) to get a noncausal filter transfer function H(z).
v. Multiply H(z) by z–(N–1)/2 to convert the noncausal transfer function to a realizable causal FIR filter
transfer function.
Q6.21. How is causality brought-in in the Fourier series method of filter design?
The transfer function obtained in Fourier series method of filter design will represent an unrealizable
noncausal system. If we multiply the noncausal transfer function by z–(N–1)/2 then it will be converted to
a transfer function of causal system.
Q6.22. What is Gibbs phenomenon (or Gibbs oscillation)?
In FIR filter design by Fourier series method, the infinite duration impulse response is truncated to
finite duration impulse response. The abrupt truncation of impulse response introduces oscillations in
the passband and stopband. This effect is known as Gibbs phenomenon (or Gibbs oscillations).
Q6.23 Write the procedure for designing FIR filter using windows.
i. Choose the desired frequency response of the filter Hd(ejw ).
ii. Take inverse fourier transform of Hd(ejw ) to obtain the desired impulse response hd(n).
iii. Choose a window sequence w(n) and multiply hd(n) by w(n) to convert the infinite duration
impulse response to finite duration impulse response h(n).
iv. The transfer function H(z) of the filter is obtained by taking Z-transform of h(n).
6. 97 Digital Signal Processing
Q6.24 What are the desirable characteristics of the frequency response of window function ?
The desirable characteristics of the frequency response of window function are,
i. The width of the mainlobe should be small and it should contain as much of the total energy as
possible.
ii. The sidelobes should decrease in energy rapidly as w tends to p.
Q6.25 Write the procedure for FIR filter design by frequency sampling method.
i. Choose the desired frequency response Hd(ejw ).
ii. Take N-samples of Hd(ejw ) to generate the sequence H(k).
iii. Take inverse DFT of H(k) to get the impulse response h(n).
iv. The transfer function H(z) of the filter is obtained by taking Z-transform of impulse response.
Q6.26 What is the drawback in FIR filter design using windows and frequency sampling method? How is
it overcome?
The FIR filter design by window and frequency sampling method does not have precise control over
the critical frequencies such as w p and w s.
This drawback can be overcome by designing FIR filter using Chebyshev approximation technique.
In this technique an error function is used to approximate the ideal frequency response, in order to
satisfy the desired specifications.
Q6.27 What is meant by optimum equiripple design criterion? Why it is followed?
In FIR filter design by Chebyshev approximation technique, the weighted approximation error between
the desired frequency response and the actual frequency response is spread evenly across the passband
and stopband. The resulting filter will have ripples in both the passband and stopband. This concept
of design is called optimum equiripple design criterion.
The optimum equiripple criterion is used to design FIR filter in order to satisfy the specifications of
passband and stopband.
Q6.28 Write the characteristic features of rectangular window.
i. The main-lobe width is equal to 4p/N
ii. The maximum side-lobe magnitude is –13dB.
iii. The side-lobe magnitude does not decrease significantly with increasing w.
Q6.29 List the features of FIR filter design using rectangular window.
i. The width of the transition region is related to the width of the main-lobe of window spectrum.
ii. Gibbs oscillations are noticed in the passband and stopband.
iii. The attenuation in the stopband is constant and cannot be varied.
Q6.30 How can the transition width of the FIR filter can be reduced in design using windows?
In FIR filters designed using windows, the width of the transition region is related to the width of the
main-lobe in window spectrum. If the main-lobe width is narrow then the transition region in FIR filter
will be small. In general, the width of main-lobe is xp/N, where x = 4 or 8 or 12 and N is the length of the
window sequence used for designing the filter. Hence the width of main-lobe can be reduced by
increasing the value of N, which in turn reduces the width of the transition region in the FIR filter.
Chapter 6 - FIR Filters 6.98
Q6.31 Why are Gibbs oscillations are developed in rectangular window and how can it be eliminated or
reduced?
The Gibbs oscillations in rectangular window are due to the sharp transitions from 1 to 0 at the edges
of window sequence.
These oscillation can be eliminated or reduced by replacing the sharp transition by gradual transition.
This is the motivation for development of triangular and cosine windows.
Q6.32 List the characteristics of FIR filters designed using windows.
i. The width of the transition band depends on the type of window.
ii. The width of the transition band can be made narrow by increasing the value of N where N is the
length of the window sequence.
iii. The attenuation in the stopband is fixed for a given window, except in case of Kaiser window where
it is variable.
Q6.33 Write the characteristic features of triangular window.
i. The main-lobe width is equal to 8p/N.
ii. The maximum side-lobe magnitude is –25dB.
iii. The sidelobe magnitude slightly decreases with increasing w.
Q6.34 Why is triangular window is not a good choice for designing FIR filters ?
In FIR filters designed using triangular window the transition from passband to stopband is not sharp
and the attenuation in stopband is less when compared to filters designed with rectangular window.
For the above two reasons the triangular window is not a good choice.
Q6.35 Write the frequency response of Hanning window.
ωN F ωN − πN IJ F ωN πN I
Frequency response UV
WC (e jω ) = 0.5
sin
2
+ 0.25
sinGH
2 N –1 K + 0.25 sinGH 2 + N –1JK
of Hanning window W sin ω
sinGF ω
−
π IJ sin FGH ω + π IJK
2 H 2 N –1 K 2 N –1
ωN F ωN − πN IJ F ωN πN I
Frequency response UV
WH ( e jω ) = 0.54
sin
2 + 0.23
sinGH
2 N –1 K + 0.23 sinGH 2 + N –1JK
of Hamming window W sin ω
2
sinFG ω H −
π IJ
K sinFGH ω + π IJK
2 N –1 2 N –1
=0 ; other n
Q6.38 List the features of Hanning window spectrum.
i. The main-lobe width is equal to 8p/N.
ii. The maximum side-lobe magnitude is –31dB.
iii. The sidelobe magnitude decreases with increasing w.
6. 99 Digital Signal Processing
Q6.39 Compare the rectangular window and Hanning window.
FG 2 πn IJ ; FG N −1IJ N −1
Hamming window , w H ( n) = 0.54 + 0.46 cos H N −1 K for n = − H 2K to +
2
=0 ; other n
Alternatively,
Hamming window, w H ( n) = 0.54 − 0.46 cos FG 2 πn IJ ; for n = 0 to N − 1
H N −1 K
=0 ; other n
Q6.41 Compare the rectangular window and Hamming window.
Rectangular window Hamming window
i. The width of main-lobe in window i. The width of main-lobe in window
spectrum is 4p/N. spectrum is 8p/N.
ii. The maximum side-lobe magnitude ii. The maximum side-lobe magnitude
in window spectrum is –13dB. in window spectrum is –41dB.
iii. In window spectrum the side-lobe iii. In window spectrum the side-lobe
magnitude slightly decreases magnitude remains constant.
with increasing w.
iv. In FIR filter designed using iv. In FIR filter designed using Hamming
rectangular window, the minimum window, the minimum stopband
stopband attenuation is 22 dB. attenuation is 51dB.
=0 ; other n
where, β1 = a 1 –
LM e j OP
2n
.
2 05
N Q
N–1
Alternatively,
I 0 (β 2 )
Kaiser window function, w K ( n) = I 0 (a 2 )
; for n = 0 to N − 1
=0 ; other n
where, β 2 = a
LMe j − en − j OP
N–1
2
N–1 2
0.5
; a2 = a
N–1
N 2
Q 2 2
2 2 2 3
I 0 ( x) = 1 +
0.25 x2
+
e0.25x j + e0.25x j + .....
(1!) 2 (2!) 2 (3!) 2
The series of I0(x) is used to compute I0(b1), I0(a), I0(b2), I0(a2) and can be computed for any desired
accuracy. Usually 25 terms of the series are sufficient for most practical purposes.
Q6.49 List the desirable features of Kaiser window spectrum.
i. The width of the main-lobe and the peak side-lobe are variable.
ii. The parameter "a" in the Kaiser window function, is an independent variable that can be varied to
control the side-lobe levels with respect to main-lobe peak.
iii. The width of the main-lobe in the window spectrum (and so the transition region in the FIR filter)
can be varied by varying the length N of the window sequence.
Q6.50 Compare the Hamming window and Kaiser windows.
Hamming window Kaiser window
i. The width of main-lobe in window i. The width of main-lobe in window
spectrum is 8p/N. spectrum depends on the values of
"a" and N.
ii. The maximum side-lobe magnitude ii. The maximum side-lobe magnitude
in window spectrum is fixed at with respect to peak of main-lobe is
–41 dB. variable using the parameter "a".
Chapter 6 - FIR Filters 6. 114
6.14 Exercises
I. Fill in the blanks with appropriate words
1. The _______ is due to nonlinear phase characteristics of the filter.
2. The filters designed by using finite number of samples of impulse response are called _______.
3. In FIR filters _______ function is a linear function of w.
4. In FIR filters with constant phase delay the impulse response is _______.
5. In FIR filters with constant group and phase delay the impulse response is _______.
6. In linear phase filters when impulse response is antisymmetric and N is odd, the magnitude function
is _______.
7. In linear phase filters when impulse response is antisymmetric and N is even, the magnitude function
is _______.
8. The oscillations developed due to truncation of impulse response is called _______.
9. The linear phase FIR filter design by Chebyshev approximation technique is called _______.
10. In Fourier series method of FIR filter design the causality is brought by multiplying the transfer function
with _______.
11. The width of the main-lobe in window spectrum can be reduced by increasing the length of _______.
12. The width of _______ region of FIR filter directly depends on the width of main-lobe in window spectrum.
13. The _______ can be eliminated by replacing the sharp transitions in window sequence by gradual transition.
14. In rectangular window the width of main-lobe is equal to _______.
15. In _______ window spectrum the width of main-lobe is double that of rectangular window for same value
of N.
16. In _______ window spectrum the width of main-lobe is triple that of rectangular window for same value of N.
17. In _______ window spectrum the side-lobe magnitude is variable.
18. The _______ window spectrum has the highest attenuation for side-lobes.
19. In _______ window spectrum the increase in side-lobe attenuation is achieved at the expense of constant
attenuation at high frequencies.
20. In _______ window spectrum the higher side-lobe attenuation is achieved at the expense of increased
main-lobe width.
Answers
1. Phase distortion 8. Gibbs oscillation 15. Hamming
2. FIR filters 9. optimum equiripple design 16. Blackman
–(N–1)/2
3. phase 10. z 17. Kaiser
4. symmetric 11. window sequence. 18. Blackman
5. antisymmetric 12. transition 19. Hamming
6. antisymmetric 13. Gibbs oscillation 20. Blackman
7. symmetric 14. 4p/N
6. 115 Digital Signal Processing
II.State whether the following statements are True/False
1. The filter output is a delayed and amplitude scaled version of the input signal.
2. The filter that causes phase distortion has a variable frequency delay and the filter with linear phase has a
constant phase delay.
3. The ideal filters are noncausal.
4. FIR filters realized nonrecursively are always unstable.
5. In FIR filters the impulse response should have large number of samples to realize sharp cutoff filters.
6. In linear phase filters when impulse response is symmetric with odd number of samples, the magnitude
function will be antisymmetric.
7. In linear phase filters when impulse response is symmetric with even number of samples, the magnitude
function will be symmetric.
8. The frequency response of a digital filter is periodic with period equal to sampling frequency.
9. The truncation of impulse response result in oscillations in passband and stopband.
10. In a good window the width of main-lobe in its spectrum should be large in order to have maximum energy.
11. In a good window the side-lobes should increase in energy rapidly as w tends to p.
12. The frequency response of digital filter is periodic with period equal to sampling frequency.
13. The transfer function obtained by taking Z-transform of the truncated Fourier coefficients is causal.
14. The Gibbs oscillations can be reduced by multiplying the impulse response by an appropriate window
function.
15. The FIR filters designed using windows and frequency sampling method will not have control over w p and w s.
16. The width of main-lobe in window spectrum increases with increase in length of window sequence.
17. The transition width of FIR filter can be varied only when it is designed with kaiser window.
18. In windows, generally the relative peak of side-lobe with respect to main-lobe is fixed.
19. In kaiser window the peak side-lobe is variable but the width of main-lobe is fixed.
20. In hamming window spectrum the magnitude of side-lobes remains constant with increasing w.
Answers
1. True 5. True 9. True 13. False 17. False
2. True 6. False 10. False 14. True 18. True
3. True 7. False 11. False 15. True 19. False
4. False 8. True 12. True 16. False 20. True
− d θ( ω ) − θ ( ω ) − d θ(ω )
a) , b) , − ω θ(ω )
dω ω dω
θ ( ω ) d θ( ω ) d θ (ω )
c) , d) − ω θ(ω ) ,
ω dω dω
4. The frequency response of FIR filter with constant group delay will be in the form,
a) H(ejw ) = C e–ja w b) H(ejw ) = C e ja w
c) H(ejw ) = C e–j(b –aw) d) H(ejw ) = C ej(b –aw)
6. If w C is the cutoff frequency of lowpass filter, then the response lies only in the range of,
a) –w C £ w £ p b) –w C £ w £ w C
c) –p £ w £ –w C d) –w C £ w £ p
7. If w C is the cutoff frequency of highpass filter, then the response lies only in the range of,
a) w C £ w £ p and –p £ w £ 0
b) –p £ w £ –w C and w C £ w £ p
c) –w C £ w £ -p and –w £ w £ w C
d) –w C £ w £ 0 and 0 £ w £ w C
8. If w C1 and w C2 are the cutoff frequencies of bandpass filter, then the response lies only in the range of,
b) –p £ w £ –w C2 and -wC1 £ w £ 0
c) –w C2 £ w £ –w C1 and w C1 £ w £ w C2
d) w C1 £ w £ w C2 and w C2 £ w £ p
9. If w C1 and w C2 are the cutoff frequencies of bandstop filter, then the response lies only in the range of,
12. The symmetric impulse response having odd number of samples has,
a) Symmetric magnitude function. b) Antisymmetric magnitude function.
c) Both a and b. d) None of these.
13. The symmetric impulse response having even number of samples cannot be used to design,
a) Lowpass filter. b) Bandstop filter.
c) Highpass filter. d) Bandpass filter.
14. The width of the main-lobe in rectangular window spectrum is,
4π 16π 8π 2π
a) b) c) d)
N N N N
15. In Hamming window spectrum the side-lobe magnitude remains constant with,
a) decreasing w b) constant w
c) increasing w d) None of these.
16. In which window sequence, the width of the main-lobe can be adjusted by varying the length N of the
window?
a) Hamming b) Hanning c) Bartlett d) Kaiser
17. The condition for the impulse respone to be antisymmetric is,
a) h(n) = –h(N – 1 – n) b) h(n) = h(–n)
c) h(n) = h(N – 1 – n) d) All the above.
18. The width of the main-lobe should be ______ and it should contain as much of the total energy as possible.
a) Large b) Medium c) Very large d) Small
19. Symmetric impulse response having odd number of samples, N = 7 with centre of symmetry a is equal to,
a) 2 b) 5 c) 3.5 d) 3
20. Frequency response of LTI system, with constant phase delay
a) H(w) = ± |H(w)| e–ja w b) ± |H(w)| e j(b – a w)
c) H(w) = ± |H(w)| eja w d) ± |H(w)| e –j(b – a w)
Chapter 6 - FIR Filters 6. 118
Answers
1. d 5. a 9. d 13. c 17. a
2. b 6. b 10. b 14. a 18. d
3. a 7. b 11. a 15. c 19. d
4. c 8. c 12. a 16. d 20. a
E6.2 Design a FIR highpass filter with cutoff frequency of 2.3 kHz and sampling frequency of 8 kHz with
9 samples using Fourier series method. Determine the frequency response and verify the design by
sketching the magnitude response.
E6.3 Design a FIR bandpass filter to pass frequencies in the range 2.5 kHz to 3.8 kHz sampling frequency
of 9KHz with 9 samples using Fourier series method. Determine the frequency response and verify the
design by sketching the magnitude response.
E6.4 Design a FIR bandstop filter to reject frequencies in the range 2.5 kHz to 3.8 kHz and sampling
frequency of 9kHz with 9 samples using Fourier series method. Determine the frequency response and
verify the design by sketching the magnitude response.
6. 119 Digital Signal Processing
E6.5 Design a linear phase FIR lowpass filter using hamming window by taking 5 samples of window
sequence and with a cutoff frequency, w c = 0.35p rad/sample.
E6.6 Design a linear phase FIR highpass filter using rectangular window, with a cutoff frequency, w c = 0.48p
rad/sample and N = 5.
E6.7 Design a linear phase FIR bandpass filter to pass frequencies in the range 0.35p to 0.48p rad/sample
by taking 5 samples of rectangular window sequence.
E6.8 Design a linear phase FIR bandstop filter to reject frequencies in the range 0.35 p to
0.48p rad/sample using rectangular window, by taking 5 samples of window sequence.
E6.9 Determine the coefficients of a linear phase FIR filter of length N = 11 which has a symmetric unit
sample response and a frequency response that satisfies the conditions
H e j =1
2π k
11
; for k = 0, 1, 2, 3
=0 ; for k = 4, 5
E6.10 Design a linear phase FIR lowpass filter for the desired frequency response as given below, by
frequency sampling technique for N = 7.
H d (e jω ) = e − j3ω ; 0 ≤ ω ≤ 0.6π and 1.4π ≤ ω ≤ 2π
=0 ; 0.6π < ω < 1.4π
Answers
e j
H e jω = A (ω ) = 0.67 + 0.5478 cos ω − 0.2788 cos 2ω + 0.0066 cos 3ω + 01342
. cos 4ω
e j
H e jω = A (ω ) = 0.425 − 0.619 cosω + 01444
. cos 2ω + 01612
. cos 3ω − 01286
. cos 4ω
e j
H e jω = A (ω ) = 0.289 − 0.3288 cos ω − 01534
. cos 2ω + 0.3942 cos 3ω − 0.2508 cos 4ω
e j
H e jω = A (ω ) = = 0.711 + +0.3288cos ω + 0.1534 cos 2 ω − 0.3942 cos 3ω + 0.2508 cos 4 ω
e j
H e jω = A (ω ) = 0.35 + 0.3062cos ω + 0.0206 cos 2ω
e j
H e jω = A (ω ) = 0.52 − 0.6352 cosω − 0.0398cos2ω
Chapter 6 - FIR Filters 6. 120
e j
H e jω = A (ω ) = 0.13 + 0.068 cos ω − 0.2176 cos 2ω
e j
H e jω = A (ω ) = 0.87 − 0.068cos ω + 0.2176 cos 2ω
e j
H e jω = A(ω ) = 0.6363 + 0.587 cos ω − 0.254 cos 2ω − 0.0676 cos 3ω + 01978
. cos 4ω − 0.0992 cos5ω
e j
H e jω = A (ω ) = 0.7142 + 0.5148 cos ω − 0.3562 cos 2ω + 0127
. cos 3ω
Chapter 6 - FIR Filters 6. 102
Hamming window Kaiser window
iii. In window spectrum the side-lobe iii. In window spectrum the side-lobe
magnitude remains constant magnitude decreases with
with increasing w. increasing w.
iv. In FIR filter designed using iv. In FIR filter designed using Kaiser
hamming window, the minimum window, the minimum stopband
stopband attenuation is fixed at attenuation is variable and depends
51 dB. on the value of "a".
hd(1)=wc/pi;
k = 1 : 1 : ((N-1)/2)+1;
hd(k+1)=(sin(wc*k))./(pi*k);
hn(k)=hd(k)
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hn(1)*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m+1)*((exp(j*w*(m-a)))+ (exp(-j*w*(m+a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
H_mag=abs(Hw)
plot(w/pi,H_mag,k);
grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
hn =
0.5000 0.3183 0.0000 -0.1061 -0.0000 0.0637
6. 103 Digital Signal Processing
Hw =
Columns 1 through 8
1.0517 0.5659 - 0.8470i -0.3667 - 0.8853i -0.9277 - 0.1845i
-0.7143 + 0.7143i 0.2120 + 1.0658i 0.9768 + 0.4046i 0.7051 - 0.4711i
Columns 9 through 16
0.0000 - 0.5000i -0.1264 - 0.0845i 0.0529 - 0.0219i 0.0169 - 0.0850i
-0.0072 - 0.0072i 0.0531 - 0.0106i 0.0160 - 0.0386i 0.0104 + 0.0155i
Column 17
0.0517 + 0.0000i
H_mag =
Columns 1 through 16
1.0517 1.0187 0.9582 0.9459 1.0102 1.0867 1.0573 0.8480
0.5000 0.1520 0.0573 0.0867 0.0102 0.0541 0.0418 0.0187
Column 17
0.0517
Program 6.2
Write a MATLAB program to determine the impulse response of FIR highpass
Filter by Fourier series method and hence plot the frequency response.
wc=.6*pi;
N=7;
hd=zeros(1,N);
hd(1)=1-(wc/pi);
k = 1 : 1 : ((N-1)/2)+1;
hd(k+1)=(-sin(wc*k))./(pi*k);
hn(k)=hd(k)
Chapter 6 - FIR Filters 6. 104
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hn(1)*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m+1)*((exp(j*w*(m-a)))+ (exp(-j*w*(m+a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
H_mag=abs(Hw)
plot(w/pi,H_mag,k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR highpass filter designed by Fourier series method
is shown in fig p6.2.
hn =
0.4000 -0.3027 0.0935 0.0624
Hw =
Columns 1 through 8
0.1064 0.0688 - 0.0460i 0.0079 - 0.0191i 0.0110 + 0.0551i
0.0823 + 0.0823i 0.1278 + 0.0254i 0.0732 - 0.0303i -0.0221 + 0.0330i
Columns 9 through 16
-0.0000 + 0.2129i 0.2303 + 0.3447i 0.5679 + 0.2352i 0.7720 - 0.1536i
0.6479 - 0.6479i 0.1950 - 0.9802i -0.3995 - 0.9645i -0.8838 - 0.5906i
Column 17
-1.0678 - 0.0000i
H_mag =
Columns 1 through 16
0.1064 0.0827 0.0207 0.0562 0.1163 0.1303 0.0792 0.0397
0.2129 0.4146 0.6146 0.7871 0.9163 0.9994 1.0439 1.0630
Column 17
1.0678
Program 6.3
Write a MATLAB program to determine the impulse response of FIR bandpass Filter
by Fourier series method and hence plot the frequency response.
wc1=.375*pi;
wc2=.75*pi;
N=7;
hd=zeros(1,N);
hd(1)=(wc2-wc1)/pi;
k = 1 : 1 : ((N-1)/2)+1;
hd(k+1)=((sin(wc2*k))-(sin(wc1*k)))./(pi*k);
hn(k)=hd(k)
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hn(1)*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m+1)*((exp(j*w*(m-a)))+ (exp(-j*w*(m+a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
H_mag=abs(Hw)
plot(w/pi,abs(H_mag),k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR bandpass filter designed by Fourier series method
is shown in fig p6.3.
hn =
0.3750 -0.0690 -0.2717 0.1156
Hw =
Columns 1 through 8
-0.0751 -0.0583 + 0.0389i -0.0185 + 0.0446i -0.0014 - 0.0071i
-0.0805 - 0.0805i -0.2741 - 0.0545i -0.4553 + 0.1886i -0.4009 + 0.6000i
Columns 9 through 16
-0.0000 + 0.9184i 0.5736 + 0.8584i 0.9476 + 0.3925i 0.8694 - 0.1729i
0.4498 - 0.4498i 0.0638 - 0.3206i -0.0114 - 0.0275i 0.1530 + 0.1022i
Column 17
0.2616 + 0.0000i
Chapter 6 - FIR Filters 6. 106
H_mag=
Columns 1 through 16
0.0751 0.0701 0.0482 0.0072 0.1139 0.2795 0.4928 0.7216
0.9184 1.0324 1.0257 0.8864 0.6361 0.3269 0.0298 0.1840
Column 17
0.2616
Program 6.4
Write a MATLAB program to determine the impulse response of FIR bandstop
Filter by Fourier series method and hence plot the frequency response.
wc1=.375*pi;
wc2=.75*pi;
N=7;
hd=zeros(1,N);
hd(1)=1-((wc2-wc1)/pi);
k = 1 : 1 : ((N-1)/2)+1;
hd(k+1)=((sin(wc1*k))-(sin(wc2*k)))./(pi*k);
hn(k)=hd(k)
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hn(1)*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m+1)*((exp(j*w*(m-a)))+ (exp(-j*w*(m+a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
6. 107 Digital Signal Processing
H_mag=abs(Hw)
plot(w/pi,abs(H_mag),k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR bandstop filter designed by Fourier series method
is shown in fig p6.4.
hn =
0.6250 0.0690 0.2717 -0.1156
Hw =
Columns 1 through 8
1.0751 0.8897 - 0.5945i 0.4011 - 0.9684i -0.1937 - 0.9737i
-0.6266 - 0.6266i -0.7067 - 0.1406i -0.4686 + 0.1941i -0.1547 + 0.2315i
Columns 9 through 16
-0.0000 + 0.0816i -0.0180 - 0.0270i -0.0237 - 0.0098i 0.1114 - 0.0222i
0.2573 - 0.2573i 0.1313 - 0.6602i -0.3713 - 0.8964i -0.9844 - 0.6578i
Column 17
-1.2616 - 0.0000i
H_mag =
Columns 1 through 16
1.0751 1.0701 1.0482 0.9928 0.8861 0.7205 0.5072 0.2784
0.0816 0.0324 0.0257 0.1136 0.3639 0.6731 0.9702 1.1840
Column 17
1.2616
Program 6.5
Write a MATLAB program to determine the impulse response of FIR lowpass Filter
using rectangular window and hence plot the frequency response.
wc=.2*pi;
N=7;
hd=zeros(1,N);
a=(N-1)/2;
hna=wc/pi;
k = 1 : 1 : ((N-1)/2);
n=k-1-((N-1)/2);
hd(k)=(sin(wc*n))./(pi*n);
hn(k)=hd(k);
hn=[hn hna]
a=(N-1)/2;
w= 0 :pi/16 : pi;
Hw1=hna*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m)*((exp(j*w*(1-m)))+ (exp(-j*w*(1-m+2*a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
H_mag=abs(Hw)
plot(w/pi,H_mag,k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR lowpass filter designed using rectangular window is
shown in fig p6.5.
hn =
0.1009 0.1514 0.1871 0.2000
Hw =
Columns 1 through 8
1.0787 0.8435 - 0.5636i 0.3203 - 0.7733i -0.1146 - 0.5763i
-0.2276 - 0.2276i -0.0923 - 0.0184i 0.0530 - 0.0219i 0.0660 - 0.0988i
Columns 9 through 16
0.0000 - 0.1027i -0.0225 - 0.0337i 0.0270 + 0.0112i 0.0728 - 0.0145i
0.0552 - 0.0552i 0.0086 - 0.0432i 0.0034 + 0.0082i 0.0458 + 0.0306i
Column 17
0.0733 + 0.0000i
H_mag =
Columns 1 through 16
1.0787 1.0145 0.8370 0.5876 0.3219 0.0941 0.0573 0.1188
0.1027 0.0406 0.0292 0.0742 0.0781 0.0441 0.0089 0.0551
Column 17
0.0733
6. 109 Digital Signal Processing
Program 6.6
Write a MATLAB program to determine the impulse response of FIR highpass Filter
using Hamming window and hence plot the frequency response.
wc=.8*pi;
N=7;
hd=zeros(1,N);
a=(N-1)/2;
hna=1-(wc/pi);
k = 1 : 1 : ((N-1)/2);
n=k-1-((N-1)/2);
w_ham(k)=.54-.46*cos(2*pi*(k-1)/(N-1));
hd(k)=(-sin(wc*n))./(pi*n);
for s=1:length(k)
hn(s)=hd(s)*w_ham(s);
end
hn = [hn hna]
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hna*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m)*((exp(j*w*(1-m)))+ (exp(-j*w*(1-m+2*a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
Chapter 6 - FIR Filters 6. 110
H_mag=abs(Hw)
plot(w/pi,H_mag,k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR highpass filter designed using rectangular window
is shown in fig p6.6.
hn =
-0.0081 0.0469 -0.1441 0.2000
Hw =
Columns 1 through 8
-0.0104 -0.0077 + 0.0052i -0.0023 + 0.0056i 0.0001 + 0.0005i
-0.0054 - 0.0054i -0.0195 - 0.0039i -0.0354 + 0.0147i -0.0367 + 0.0549i
Columns 9 through 16
-0.0000 + 0.1062i 0.0892 + 0.1335i 0.2116 + 0.0876i 0.3024 - 0.0602i
0.2774 - 0.2774i 0.0921 - 0.4633i -0.2062 - 0.4977i -0.4845 - 0.3237i
Column 17
-0.5981 - 0.0000i
H_mag =
Columns 1 through 16
0.0104 0.0093 0.0060 0.0005 0.0077 0.0198 0.0383 0.0661
0.1062 0.1605 0.2290 0.3083 0.3923 0.4723 0.5387 0.5827
Column 17
0.5981
wc1=.4*pi;
wc2=.65*pi;
N=7;
hd=zeros(1,N);
a=(N-1)/2;
hna=(wc2-wc1)/pi;
k = 1 : 1 : ((N-1)/2);
n=k-1-((N-1)/2);
w_han(k)=.5-.5*cos(2*pi*(k-1)/(N-1));
hd(k)=(sin(wc2*n)-sin(wc1*n))./(pi*n);
for s=1:length(k)
hn(s)=hd(s)*w_han(s);
end
hn = [hn hna]
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hna*exp(-j*w*a);
Hw2=0;
for m=1:1:a
Hw3= hn(m)*((exp(j*w*(1-m)))+ (exp(-j*w*(1-m+2*a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
H_mag=abs(Hw)
plot(w/pi,H_mag,k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR bandpass filter designed using Hanning window is
shown in fig p6.7.
hn =
0 -0.0556 -0.0143 0.2500
Hw =
Columns 1 through 8
0.1102 0.0991 - 0.0662i 0.0555 - 0.1339i -0.0358 - 0.1801i
-0.1624 - 0.1624i -0.2713 - 0.0540i -0.2934 + 0.1216i -0.1928 + 0.2886i
Columns 9 through 16
-0.0000 + 0.3612i 0.1991 + 0.2979i 0.3137 + 0.1299i 0.3025 - 0.0602i
0.1911 - 0.1911i 0.0451 - 0.2269i -0.0757 - 0.1828i -0.1459 - 0.0975i
Chapter 6 - FIR Filters 6. 112
Column 17
-0.1675 - 0.0000i
H_mag =
Columns 1 through 16
0.1102 0.1192 0.1449 0.1836 0.2297 0.2766 0.3176 0.3471
0.3612 0.3583 0.3396 0.3085 0.2703 0.2313 0.1979 0.1754
Column 17
0.1675
Program 6.8
Write a MATLAB program to determine the impulse response of FIR bandstop filter
using rectangular window and hence plot the frequency response.
wc1=.4*pi;
wc2=.65*pi;
N=7;
hd=zeros(1,N);
a=(N-1)/2;
hna=1-((wc2-wc1)/pi);
k = 1 : 1 : ((N-1)/2);
n=k-1-((N-1)/2);
hd(k)=(sin(wc1*n)-sin(wc2*n))./(pi*n);
hn(k)=hd(k);
hn=[hn hna]
a=(N-1)/2;
w= 0 : pi/16 : pi;
Hw1=hna*exp(-j*w*a);
Hw2=0;
for m=1:1:a
6. 113 Digital Signal Processing
Hw3= hn(m)*((exp(j*w*(1-m)))+ (exp(-j*w*(1-m+2*a))));
Hw2=Hw2+Hw3;
end
Hw=Hw2+Hw1
H_mag=abs(Hw)
plot(w/pi,H_mag,k);grid;
title(Magnitude Response,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
The magnitude response of FIR bandstop filter designed using rectangular window
is shown in fig p6.8.
hn =
-0.0458 0.2223 0.0191 0.7500
Hw =
Columns 1 through 8
1.1413 0.9330 + 0.6234i 0.4074 - 0.9836i -0.1892 - 0.9512i
-0.5952 - 0.5952i -0.6776 - 0.1348i -0.4941 + 0.2047i -0.2209 + 0.3305i
Columns 9 through 16
-0.0000 + 0.3054i 0.1561 + 0.2336i 0.3108 + 0.1287i 0.4598 - 0.0915i
0.4654 - 0.4654i 0.1698 - 0.8538i -0.4072 - 0.9831i -0.9973 - 0.6663i
Column 17
-1.2479 - 0.0000i
H_mag =
Columns 1 through 16
1.1413 1.1222 1.0647 0.9698 0.8418 0.6909 0.5348 0.3975
0.3054 0.2809 0.3364 0.4688 0.6582 0.8705 1.0641 1.1994
Column 17
1.2479
E6.1. Design a FIR lowpass filter with cutoff frequency of 2 kHz and sampling frequency of 6 kHz with 9 samples using
Fourier series method. Determine the frequency response and verify the design by sketching the magnitude response.
Solution
Given that, Fc = 2 kHz ; Fs = 6 kHz
Ω c 2 πFc 2π × 2 × 103
∴ ω c = Ωc T = = = = 0. 67 π rad / sample
Fs Fs 6 × 103
The desired frequency response Hd(ejw ) of lowpass filter is,
Hd (e jω ) = 1 ; for − ω c ≤ ω ≤ +ω c
= 0 ; otherwise
The desired impulse response hd(n) of the lowpass filter is,
π ωc
hd (n) =
1
2π − πz d i
Hd e jω e jωn dω =
1
2π − ω
1 × e jωn dω z c
When n = 0, the factor
=
1 eLM OP = 1 LM e − e OP
jωn ω c jω c n − jω c n
sinθ =
e jθ − e − jθ sinω cn
becomes 0 / 0,
πn
2π jnN Q 2π MN jn jn PQ
−ωc
2j
which is indeterminate.
1 Le
M −2je OPPQ = π1n sinω n ; for all n, except n = 0
jω c n − jω c n
=
πn MN
c
U sin g L' Hospital rule,
sin ω cn sin Aθ
When n = 0 ; hd (n) = hd (0) = Lt Lt =A
n→0 πn θ→ 0 θ
1 sin ω cn ω c
= Lt =
πn→0 n π
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 9 samples.
sin ω cn N−1 N−1
∴ h(n) = hd (n) = ; for n = − 2 to +
2
, except n = 0
πn
ωc
= ; for n = 0
π
N−1 9 −1
Here, N = 9, ∴ = =4
2 2
Hence, calculate h(n) for n = –4 to +4.
Since, the impulse response h(n) satisfies the symmetry condition, h(–n) = h(n), calculate h(n) for n = 0 to 4.
ω c 0.67 π
When n = 0 ; h(0) = = = 0.67
π π
sin(0.67π × 1)
When n = 1 ; h(1) = = 0.2739
π ×1 Note : Calculate sinq by keeping the
sin (0.67π × 2) calculator in radian mode.
When n = 2 ; h(2) = = −0.1394
π×2
sin (0.67π × 3)
When n = 3 ; h(3) = = 0.0033
π×3
sin(0.67 π × 4)
When n = 4 ; h(4) = = 0.0671
π×4
When n = −1 ; h(−1) = h(1) = 0.2739
Using symmetry
When n = −2 ; h( −2) = h(2) = −0.1394
condition,
When n = −3 ; h( −3) = h(3) = 0.0033 h(–n) = h(n).
When n = −4 ; h( −4) = h(4) = 0.0671
The transfer function H(z) of the digital lowpass filter is given by,
N−1
+ 4
N−1 N−1 2
H(z) = z
−
2
l q
Z h(n) = z
−
2
N−1
∑ h(n) z −n
= z −4 ∑ h(n) z −n
n=− n = −4
2
E6. 2 DSP, Chapter 6 - FIR Filters
∴ H(z) = z −4 h( −4) z4 + h( −3) z 3 + h( −2) z2 + h(1) z + h(0) z0 + h(1) z −1 + h(2) z −2 + h(3)z −3 + h(4) z −4 Using symmetry
condition,
= z −4 h(4) z 4 + h(3) z3 + h(2) z2 + h(1) z + h(0) + h(1) z −1 + h(2) z −2 + h(3)z −3 + h(4) z −4 h(–n) = h(n).
Structure
Y(z)
Let, H(z) = = 0.67 z −4 + 0.2739 z −3 + z −5 − 0.1394 z −2 + z −6 + 0.0033 z −1 + z −7 + 0.0671 1 + z −8
X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3 −4
z X(z) z X(z) z X(z) z X(z)
−1 −1 −1 −1
z z z z
+ + + +
−1 −1 −1 −1
z −7
z −6
z −5
z
−8
z X(z) z X(z) z X(z) z X(z)
−1 −7 −2 −6 −3 −5 −4
0.0671[X(z) + z X(z)]
−8
0.0033[z X(z) + z X(z)] −0.1394[z X(z) + z X(z)] 0.2739[z X(z) + z X(z)] 0.67z X(z)
+ + + +
F ig 1 : L in ea r ph ase stru c tu re o f F IR low p a ss filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude response, |H(ejw)| is given by |A(w)|,
N −1
2
where, A(ω ) = h(0) + ∑ 2 h(n)cos ωn
n=1
Refer table 6.2 case (v)
4
= h(0) + ∑ 2 h(n)cos ωn
n=1
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0 ×π 9× π
16 1.0798 1.0798 16 0.9192 0.9192
1× π 10 × π
16 1.0500 1.0500 16 0.6636 0.6636
2× π 11× π
16 0.9814 0.9814 16 0.3839 0.3839
3× π 12 × π
16 0.9226 0.9226 16 0.1531 0.1531
4× π 13 × π
16 0.9184 0.9184 16 0.0142 0.0142
5× π 14 × π
16 0.9796 0.9796 16 –0.0357 0.0357
6× π 15 × π
16 1.0706 1.0706 16 –0.0354 0.0354
7× π 16 × π
16 1.1256 1.1256 16 –0.029 0.029
8× π
16 1.083 1.083
Solution for Exercise Problems E6. 3
jω
|H (e )|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10π 11π 12π 13 π 14π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
E6.2. Design a FIR highpass filter with cutoff frequency of 2.3 kHz and sampling frequency of 8 kHz with 9 samples
using Fourier series method. Determine the frequency response and verify the design by sketching the magnitude
response.
Solution
Given that, Fc = 2.3 KHz ; Fs = 8 KHz
d i
Hd e jω = 1 ; for − π ≤ ω ≤ −ω c and ωc ≤ ω ≤ π
= 0 ; otherwise
The desired impulse response hd(n) of the highpass filter is,
π −ω c π
hd (n) =
1
2π z
−π
d i
Hd e jω e jωn dω =
1
2π −π
z 1 × e jωn dω +
1
2π z
ωc
1 × e jωn dω
=
LM e OP
1 jωn −ωc
+
1 LM e OP
jωn π
=
1 LM e
− jω c n
−
e − jπnOP
+
1 LM e jπn
−
e jω cn OP
N jn Q
2π −π
2π N jn Q ωc
2π MN jn jn PQ2π MN jn jn PQ
1 Le − e jπn − jπn
e jω c n
− e − jω cn OP sinθ =
e jθ − e − jθ
= M 2j
πn MN
−
2j PQ 2j
Since, the impulse response h(n) satisfies the symmetry condition, h(–n) = h(n), calculate h(n) for n = 0 to 4.
ωc 0.575 π
When n = 0 ; h(0) = 1 − = 1− = 0.425
π π
When n = 1 ; h(1) = −
b
sin 0.575π × 1
= −0.3095
g
π ×1
When n = 2 ; h(2) = −
b
sin 0.575π × 2 g = 0.0722
π×2
When n = 3 ; h(3) = −
b
sin 0.575π × 3 g = 0.0806
π×3
When n = 4 ; h(4) = −
b
sin 0.575π × 4 g = −0.0643
π×4
When n = –1 ; h(–1) = h(1) = –0.3095
The transfer function H(z) of the digital highpass filter is given by,
N−1
+
(N −1) (N −1) 2 +4
− −
H(z) = z 2 Z
lh(n)q = z 2
∑
N −1
h(n) z −n = z −4 ∑ h(n) z −n
n= − n = −4
2
= z −4 h(−4) z 4 + h( −3) z 3 + h(−2) z 2 + h(−1) z + h(0) z0 + h(1)z −1 + h(2) z −2 + h(3) z −3 + h(4) z −4 Using symmetry
condition,
= z −4 h(4) z4 + h(3) z3 + h(2) z 2 + h(1) z + h(0) + h(1)z −1 + h(2) z −2 + h(3) z −3 + h(4) z −4 h(–n) = h(n).
Structure
Y(z)
Let, H(z) = = 0.425 z −4 − 0.3095 z −3 + z −5 + 0.0722 z −2 + z −6 + 0.0806 z −1 + z −7 − 0.0643 1 + z −8
X(z)
∴ Y(z) = 0.425 z −4 X(z) − 0.3095 z −3 X(z) + z −5 X(z) + 0.0722 z −2 X(z) + z −6 X(z) + 0.0806 z −1 X(z) + z −7 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3 −4
z X(z) z X(z) z X(z) z X(z)
−1 −1 −1 −1
z z z z
+ + + +
−1 −1 −1 −1
z −7
z −6
z −5
z
−8
z X(z) z X(z) z X(z) z X(z)
−8 −1 −7 −2 −6 −3 −5 −4
−0.0643[X(z) + z X(z)] 0.0806[z X(z) + z X(z)] 0.0722[z X(z) + z X(z)] −0.3095[z X(z) + z X(z)] 0.425z X(z)
+ + + +
F ig 1 : L in ea r ph ase stru c tu re o f F IR h ig h p a ss filter.
Solution for Exercise Problems E6. 5
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude response |H(ejw )| is given by |A(w)|,
N−1
2
Refer table 6.2 case (v)
where, A(ω) = h(0) + ∑ 2 h(n)cos ωn
n=1
4
= h(0) + ∑ 2 h(n)cos ωn
n=1
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 –0.017 0.017 16 0.4109 0.4109
1× π 10 × π
16 –0.0055 0.0055 16 0.7087 0.7087
2 ×π 11× π
16 0.0169 0.0169 16 0.9626 0.9626
3 ×π 12 × π
16 0.0250 0.0250 16 1.1052 1.1052
4× π 13 × π
16 0.0019 0.0019 16 1.1173 1.1173
5 ×π 14 × π
16 –0.0413 0.0413 16 1.0372 1.0372
6× π 15 × π
16 –0.0629 0.0629 16 0.9405 0.9405
7× π 16 × π
16 –0.0096 0.0096 16 0.8986 0.8986
8 ×π
16 0.152 0.152
|H (e jω)|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
E6.3. Design a FIR bandpass filter to pass frequencies in the range 2.5 kHz to 3.8 kHz sampling frequency of 9 kHz with
9 samples using Fourier series method. Determine the frequency response and verify the design by sketching the
magnitude response.
Solution
Given that, Fc1 = 2.5 kHz ; Fc2 = 3.8 kHz ; Fs = 9 kHz
Ω c1 2πFc1 2π × 2.5 × 103
∴ ω c1 = Ω c1T = = = = 0.556 π rad / sample
Fs Fs 9 × 103
Ω c2 2πFc 2 2π × 3.8 × 103
ω c 2 = Ωc2T = = = = 0.845π rad / sample
Fs Fs 9 × 103
E6. 6 DSP, Chapter 6 - FIR Filters
jw
The desired frequency response Hd(e ) of bandpass filter is,
d i
Hd e jω = 1 ; for − ω c2 ≤ ω ≤ −ω c1 and ω c1 ≤ ω ≤ ω c2
= 0 ; otherwise
The desired impulse response hd(n) of the bandpass filter is,
π − ω c1 ω c2
hd (n) =
1
2π −π
z d i
Hd e jω e jωn dω =
1
2π z
−ω c2
1 × e jωn dω +
1
2π ω c1
z 1 × e jωn dω
=
LM OP + 1 LM e OP
1 e jωn
− ω c1 jωn ω c 2
=
LM
1 e − jω c1n e − jω c 2n
− +
OP LM
1 e jω c 2n e jω c1n
−
OP
N Q 2π N jn Q
2π jn −ω c2 ω c1
2π MNjn jn 2π jn PQ jn MN PQ
1 Le jω c 2n − jω c 2n jω c1n
− e − jω c1n OP
= M −2je
πn MN
−
e
2j PQ sinθ =
e jθ − e − jθ
2j
sin ω c2n − sin ω c1n
= ; for all n, except n = 0. When n = 0, the hd(n) becomes
πn 0/0, which is indeterminate.
When, n = 0 ; hd (n) = hd (0) = Lt
LM sinω c 2n − sin ω c1n OP
n→ 0 N πn Q U sin g L' Hospital rule,
=
LM Lt
1 sin ω c 2n
− Lt
sin ω c1n OP sin Aθ
N π n→ 0 n n→ 0 n Q Lt
θ→ 0 θ
=A
1
= bω c2 − ω c1 g
π
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 9 samples.
sin ω c 2n − sin ω c1n N 1 N−1
∴ h(n) = hd (n) = ; for n = − 2− to +
2
, except n = 0
πn
ω c 2 − ω c1
= ; for n = 0
π
N−1 9 −1
Here, N = 9, ∴ = =4
2 2
Hence, calculate h(n) for n= –4 to 4.
Since, the impulse response h(n) satisfies the symmetry condition, h(–n) = h(n), calculate h(n) for n = 0 to 4.
ω c 2 − ω c1 0.845π − 0.556 π
When n = 0 ; h(0) = = = 0.289
π π
sin (0.845π × 1) − sin (0.556 π × 1)
When n = 1 ; h(1) = = −0.1644
π ×1
sin(0.845π × 2) − sin(0.556π × 2)
When n = 2 ; h(2) = = −0.0767
π×2
sin(0.845π × 3) − sin(0.556π × 3)
When n = 3 ; h(3) = = 0.1971
π×3
sin(0.845π × 4) − sin(0.556π × 4)
When n = 4 ; h(4) = = −0.1254
π×4
When n = –1 ; h(–1) = h(1) = –0.1644
When n = –2 ; h(–2) = h(2) = –0.0767
When n = –3 ; h(–3) = h(3) = 0.1971
When n = –4 ; h(–4) = h(4) = –0.1254
The transfer function H(z) of the digital bandpass filter is given by,
N −1
+ +4
N −1 N −1 2
H(z) =
−
z 2 l q
Z h(n) =
−
z 2 ∑ N−1
h(n) z − n = z −4 ∑ h(n) z −n
n=− n = −4
2
= z −4 h(−4) z 4 + h( −3) z 3 + h(−2) z 2 + h(−1) z + h(0) z0 + h(1)z −1 + h(2) z −2 + h(3) z −3 + h(4) z −4 Using symmetry
condition,
= z −4 h(4) z4 + h(3) z3 + h(2) z 2 + h(1) z + h(0) + h(1)z −1 + h(2) z −2 + h(3) z −3 + h(4) z −4 h(–n) = h(n).
Y(z)
Let, H(z) = = 0.289 z −4 − 0.1644 z −3 + z −5 − 0.0767 z −2 + z −6 + 0.1971 z −1 + z −7 − 0.1254 1 + z −8
X(z)
Y(z) = 0.289z −4 X(z) − 0.1644 z −3 X(z) + z −5 X(z) − 0.0767 z −2 X(z) + z −6 X(z) + 0.1971 z −1X(z) + z −7 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3 −4
z X(z) z X(z) z X(z) z X(z)
−1 −1 −1 −1
z z z z
+ + + +
−1 −1 −1 −1
z −7
z −6
z −5
z
−8
z X(z) z X(z) z X(z) z X(z)
−8 −1 −7 −2 −6 −3 −5 −4
−0.1254 [X(z) + z X(z)] 0.1971 [z X(z) + z X(z)] −0.0767 [z X(z) + z X(z)] −0.1644 [z X(z) + z X(z)] 0.289z X(z)
+ + + +
F ig 1 : L in ea r ph a se stru c tu re of F IR b an d p a ss filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude response |H(ejw )| is given by |A(w)|,
N−1
2
Refer table 6.2 case (v)
where, A(ω ) = h(0) + ∑ 2h(n)cos ωn
n=1
4
= h(0) + ∑ 2 h(n)cos ωn
n=1
Using the above equation, the amplitude response A(w) and magnitude function |H(ejw )| are calculated for various values of w and
listed in table 1. Using the tabulated values, the magnitude response is sketched as shown in fig 2.
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 –0.0498 0.0498 16 0.5365 0.5365
1× π 10 × π
16 –0.0247 0.0247 16 0.8874 0.8874
2 ×π 11× π
16 0.0276 0.0276 16 1.0943 1.0943
3 ×π 12 × π
16 0.0573 0.0573 16 1.0510 1.0510
4× π 13 × π
16 0.0285 0.0285 16 0.7579 0.7579
5 ×π 14 × π
16 –0.0442 0.0442 16 0.3334 0.3334
6× π 15 × π
16 –0.0925 0.0925 16 –0.0353 0.0353
7× π 16 × π
16 –0.0297 0.0297 16 –0.1806 0.1806
8 ×π
16 0.1916 0.1916
E6. 8 DSP, Chapter 6 - FIR Filters
jω
|H (e )|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13π 14 π 15 π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e respo n se o f F IR b a n d pa ss filte r.
E6.4. Design a FIR bandstop filter to reject frequencies in the range 2.5 kHz to 3.8 kHz and sampling frequency of 9kHz
with 9 samples using Fourier series method. Determine the frequency response and verify the design by sketching the
magnitude response.
Solution
Given that, Fc1 = 2.5 kHz ; Fc2 = 3.8 kHz ; Fs = 9 kHz
Ω c1 2 πFc1 2π × 2.5 × 103
∴ ω c1 = Ω c1T = = = = 0. 556 π rad / sample
Fs Fs 9 × 103
Ω c 2 2πFc2 2π × 3.8 × 103
ω c2 = Ωc2T = = = = 0.845 π rad / sample
Fs Fs 9 × 103
The desired frequency response Hd(ejw ) of bandstop filter is,
Hd (e jω ) = 1 ; − π ≤ ω ≤ −ω c 2 & − ω c1 ≤ ω ≤ ω c1 & + ω c 2 ≤ ω ≤ π
= 0 ; otherwise
The desired impulse response hd(n) of the bandstop filter is,
π
hd (n) =
1
2π − πz d i
Hd e jω e jωn dω
−ω c2 ω c1 π
=
1
2π z −π
1 × e jωn dω +
1
2π − ω z
1 × e jωn dω +
c1
1
2π + ω
1 × e jωn dω zc2
=
LM OP + 1 LM e OP + 1 LM e OP
1 e jωn
−ω c 2 jωn ω c1 jωn π
N Q 2π N jn Q 2π N jn Q
2π jn −π − ω c1 ω c2
1 Le e OP + 1 LM e − e OP + 1 LM e
− jω c 2n − jπn jω c1n − jω c1n jπn
e jω c 2n OP
= M
2π MN jn
−
jn PQ 2π MN jn jn PQ 2π MN jn
−
jn PQ
e jθ − e − jθ
1 Le − e jπn
e −e− jπn
e −e OP
jω c1n − jω c1n jω c 2n − jω c 2n sinθ =
=
πn MN
M 2j
+
2j
−
2j PQ
2j
= 1−
FG ω c2 − ω c1 IJ ; for n = 0
H π K
N−1 9 −1
Here, N = 9, ∴ = =4
2 2
Hence, calculate h(n) for n = –4 to +4.
Since, the impulse response h(n) satisfies the symmetry condition, h(n) = h(–n), calculate h(n) for n = 0 to 4.
When n = 0 ; h(0) = 1 −
bω c2 − ω c1 g = 0.711
π
sin (0.556π × 1) − sin(0.845π × 1)
When n = 1 ; h(1) = = 0.1644
π×1
sin(0.556π × 2) − sin(0.845 π × 2)
When n = 2 ; h(2) = = 0.0767
π×2
sin(0.556π × 3) − sin(0.845 π × 3)
When n = 3 ; h(3) = = −0.1971
π×3
sin (0.556π × 4) − sin(0.845π × 4)
When n = 4 ; h(4) = = 0.1254
π×4
When n = −1 ; h(−1) = h(1) = 0.1644
Using symmetry
When n = −2 ; h( −2) = h(2) = 0.0767 condition,
h(–n) = h(n).
When n = −3 ; h(−3) = h(3) = −0.1971
When n = −4 ; h(−4) = h(4) = 0.1254
The transfer function H(z) of the digital bandstop filter is given by,
N−1
+ 4
N−1 N−1 2
H(z) = z
−
2
l q
Z h(n) = z
−
2
∑ h(n) z
N−1
−n
= z −4 + ∑ h(n) z −n
n=− n = −4
2
= z −4 h(−4) z4 + h( −3) z3 + h(−2) z2 + h(−1) z + h(0) z0 + h(1) z −1 + h(2) z −2 + h(3)z −3 + h(4) z −4 Using symmetry
condition,
= z −4 h(4) z4 + h(3) z3 + h(2) z2 + h(1) z + h(0) + h(1) z −1 + h(2) z −2 + h(3)z −3 + h(4) z −4 h(–n) = h(n).
Structure
Y(z)
Let, H(z) = = 0.711z −4 + 0.1644 z −3 + z −5 + 0.0767 z −2 + z −6 − 0.1971 z −1 + z −7 + 0.1254 1 + z −8
X(z)
∴ Y(z) = 0.711z −4 X(z) + 0.1644 z −3 X(z) + z −5 X(z) + 0.0767 z −2 X(z) + z −6 X(z) − 0.1971 z −1 X(z) + z −7 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2 −3 −4
z X(z) z X(z) z X(z) z X(z)
−1 −1 −1 −1
z z z z
+ + + +
−1 −1 −1 −1
z −7
z −6
z −5
z
−8
z X(z) z X(z) z X(z) z X(z)
−8 −1 −7 −2 −6 −3 −5 −4
0.1254 [X(z) + z X(z)] −0.1971[z X(z) + z X(z)] 0.0767 [ z X(z) + z X(z)] 0.1644 [z X(z) + z X(z)] 0.711z X(z)
+ + + +
F ig 1 : L in ea r ph a se stru c tu re o f F IR b a nd sto p filte r.
E6. 10 DSP, Chapter 6 - FIR Filters
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude function |H(ejw )| is given by |A(w)|,
N −1
2
Refer table 6.2 case (v)
where, A(ω) = h(0) + ∑ 2 h(n)cos ωn
n=1
4
= h(0) + ∑ 2 h(n)cos ωn
n=1
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 1.0498 1.0498 16 0.4634 0.4634
1× π 10 × π
16 1.0247 1.0247 16 0.1125 0.1125
2 ×π 11× π
16 0.9723 0.9723 16 –0.0943 0.0943
3 ×π 12 × π
16 0.9426 0.9426 16 –0.0510 0.0510
4× π 13 × π
16 0.9714 0.9714 16 0.2420 0.2420
5 ×π 14 × π
16 1.0442 1.0442 16 0.6665 0.6665
6× π 15 × π
16 1.0925 1.0925 16 1.0353 1.0353
7× π 16 × π
16 1.0297 1.0297 16 1.1806 1.1806
8 ×π
16 0.8084 0.8084
|H (e jω)|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12π 13π 14 π 15 π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a g n itu d e resp o nse of F IR b an d sto p filte r.
E6.5. Design a linear phase FIR lowpass filter using hamming window by taking 5 samples of window sequence and
with a cutoff frequency, w c = 0.35p rad/sample.
Solution
Given, w c = 0.35p
Let the symmetry condition be h(– n) = h(n). Therefore, the desired ideal frequency response for FIR lowpass filter is,
Hd (e jω ) = 1 ; – ω c ≤ ω ≤ +ω c
=0 ; otherwise
The hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
Solution for Exercise Problems E6. 11
By definition of inverse Fourier transform,
+π +ω c
∴ hd (n) =
1
2π z
−π
Hd (e jω ) e jωn dω =
1
2π z
−ω c
1 × e jωn dω
=
LM e OP = 1 LM e − e
1 jωn
ωc jω c n − jω c n
OP sinθ =
e jθ − e − jθ
N jn Q 2π MN jn jn
2π −ω c PQ 2j
1 Le
M −2je OPP = π1n sin ωn ;
jω c n − jω c n
= for all n except n = 0 When n = 0, the hd(n) becomes
πn MN Q 0/0, which is indeterminate.
sin ω cn
∴ When, n = 0 ; hd (n) = hd (0) = Lt U sin g L' Hospital rule,
n →0 πn
sin Aθ
1 sin ω cn 1 ω Lt =A
= Lt = ωc = c θ→ 0 θ
π n→ 0 n π π
The impulse response of FIR filter is obtained by multiplying hd(n) by window sequence.
=0 ; otherwise
When n = 0 ; h(0) =
LM 0.35 π OP LM0.54+ 0.46 cos2π × 0 OP = 0.35
N π QN 4 Q
bsin0.35π × 1g L0.54+ 0.46 cos 2π × 1O = 0.1531
When n = 1 ; h(1) =
π ×1 MN 4 PQ Note : Calculate sinq by keeping
the calculator in radian mode.
bsin0.35π × 2g L0.54+ 0.46 cos2π × 2 O = 0.0103
When n = 2 ; h(2) =
π×2 MN 4 PQ
Using symmetry
When n = −1 ; h( −1) = hb1g = 0.1531
condition,
When n = −2 ; h( −2) = hb2g = 0.0103 h(–n) = h(n).
The transfer function H(z) of FIR lowpass filter is given by,
N−1
+ 2
N −1 N−1 2
H(z) = z
−
2
l q
Z h(n) = z
−
2
∑ h(n) z
N −1
–n
= z −2 ∑ h(n) z –n
n =− n = −2
2
= 0.35z −2 + 01531
. z −1 + z −3 + 0.0103 1 + z −4
Structure
Y(z)
Let, H(z) = = 0.35 z −2 + 0.1531 z −1 + z −3 + 0.0103 1 + z −4
X(z)
+ +
−1 −1
−4
z −3 z
z X(z) z X(z)
−1 −3 −2
0.0103[1 + z X(z)]
−4
0.1531[z X(z) + z X(z)] 0.35z X(z) F ig 1 : L in e ar p h a se stru ctu re
+ o f F IR lo w p a ss filter.
+
E6. 12 DSP, Chapter 6 - FIR Filters
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude response |H(ejw )| is given by
|A(w)|,
N −1
2
where, A(ω ) = h 0 + b g ∑ 2h bng cos ωn Refer table 6.2 case (v)
n=1
2
∴ A(ω ) = h(0) + ∑ 2 h(n)cos ωn
n=1
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 0.6768 0.6768 16 0.2712 0.2712
1× π 10 × π
16 0.6693 0.6693 16 0.2182 0.2182
2× π 11× π
16 0.6474 0.6474 16 0.1720 0.1720
3× π 12 × π
16 0.6124 0.6124 16 0.1334 0.1334
4× π 13 × π
16 0.5665 0.5665 16 0.1032 0.1032
5× π 14 × π
16 0.5122 0.5122 16 0.0816 0.0816
6× π 15 × π
16 0.4526 0.4526 16 0.0687 0.0687
7× π 16 × π
16 0.3907 0.3907 16 0.0644 0.0644
8× π
16 0.3294 0.3294
|H (e jω)|
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12 π 13π 14 π 15π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e resp o n se o f F IR lo w p a ss filte r.
E6.6 Design a linear phase FIR highpass filter using rectangular window, with a cutoff frequency, w c = 0.48p rad/sample
and N = 5.
Solution
Given, w c = 0.48p
Let the symmetry condtion be h(–n) = h(n).Therefore, the desired ideal frequency response for FIR highpass filter is,
Hd (e jω ) = 1 ; – π ≤ ω ≤ −ω c and + ω c ≤ ω ≤ + π
= 0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
π −ω c π
hd (n) =
1
2π z
−π
Hd (e jω ) e jωn dω =
1
2π z
−π
1 × e jωn dω +
1
2π
ωc
z 1 × e jωn dω
=
LM OP
1 e jωn
−ωc
+
1 e jωnLM OP π
2π jn N Q −π
2π jn N Q ωc
Solution for Exercise Problems E6. 13
∴ hd (n) =
1 LM e
− jω c n
−
e − jπn OP + 1 LM e jπn
−
e jω cn OP
2π MN jn jn PQ 2π MN jn jn PQ
=
LM
1 e jπn − e − jπn
−
e jω cn − e − jω cn OP e jθ − e − jθ
πn MN 2j 2j PQ sinθ =
2j
sin πn − sin ω cn
= ; for all n, except n = 0
πn When n = 0, the hd(n) becomes
sin πn − sin ω cn 0/0, which is indeterminate.
When n = 0 ; hd (n) = hd (0) = Lt
n→0 πn
U sin g L' Hospital rule,
1 sin πn sin ω cn
= Lt − Lt
π n→ 0 n n→0 n sin Aθ
Lt =A
1 1 ω θ→ 0 θ
= × π − ωc = 1− c
π π π
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
\ Impulse response, h(n) = hd(n) wR(n)
N −1 N −1
Re c tan gular window sequence, wR (n) = 1 ; n = − 2
to + 2
= 0 ; otherwise
Here N = 5, N – 1 = 4 ; w c = 0.48p rad/sample ; h(–n) = h(n)
When n = 0 ; h(0) = 1 −
FG 0.48π
= 0.52
IJ
H π K
When n = 1 ; h(1) =
b
−sin 0.48 × 1 g = −0.3176 For any integer n,
π ×1 sin pn = 0
When n = 2 ; h(2) =
b
−sin 0.48 × 2 g = −0.0199
π×2
Using symmetry
When n = −1 ; h( −1) = h(1) = −0.3176
condition,
When n = −2 ; h( −2) = h(2) = −0.0199 h(–n) = h(n).
The transfer function H(z) of FIR highpass filter is given by,
N−1
+ 2
N −1 N −1 2
H(z) = z
−
2
l q
Z h(n) = z
−
2
∑
N−1
h(n) z – n = z −2 ∑ h(n) z –n
n= − n= −2
2
+ +
−1 −1
z −3
z
−4
z X(z) z X(z)
+ +
F ig 1 : L in ea r ph a se stru ctu re o f F IR h ig hp a ss filte r.
E6. 14 DSP, Chapter 6 - FIR Filters
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0, the magnitude response |H(ejw )| is given by
|A(w)|,
N −1
2
where, A(ω ) = h(0) + ∑ 2 h(n)cos ωn
n=1
Refer table 6.2 case (v)
2
∴ A(ω ) = h(0) + ∑ 2h(n)cos ωn
n=1
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 –0.155 0.155 16 0.6806 0.6806
1× π 10 × π
16 –0.1397 0.1397 16 0.7912 0.7912
2 ×π 11× π
16 –0.0949 0.0949 16 0.8881 0.8881
3 ×π 12 × π
16 –0.0233 0.0233 16 0.9691 0.9691
4× π 13 × π
16 0.0708 0.0708 16 1.0329 1.0329
5 ×π 14 × π
16 0.1823 0.1823 16 1.0787 1.0787
6× π 15 × π
16 0.3050 0.3050 16 1.1062 1.1062
7× π 16 × π
16 0.4328 0.4328 16 1.1154 1.1154
8 ×π
16 0.5598 0.5598
|H (e jω)|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
E6.7. Design a linear phase FIR bandpass filter to pass frequencies in the range 0.35p to 0.48p rad/sample by taking
5 samples of rectangular window sequence.
Solution
Given that, w c1 = 0.35p ; w c2 = 0.48p
Let the symmetry condition h(– n) = h(n). Therefore, the desired ideal frequency response Hd(ejw ) for FIR bandpass filter is,
Hd (e jω ) = 1 ; – ω c 2 ≤ ω ≤ – ω c1 & + ω c1 ≤ ω ≤ + ω c 2
= 0 ; otherwise
Solution for Exercise Problems E6. 15
jw
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(e ).
By definition of inverse Fourier transform,
+π − ω c1 ω c2
hd (n) =
1
2π
−π
z Hd (e jω ) e jωn dω =
1
2π z
−ω c2
1 × e jωn dω +
1
2π z
ω c1
1 × e jωn dω
=
LM OP + 1 LM e OP
1 e jωn
− ω c1 jωn ω c 2
N Q
2π jn 2π N jn Q
−ω c2 ω c1
1 Le e OP + 1 LM e
− jω c1n − jω c 2n jω c 2n
e jω c1n OP e jθ − e − jθ
= M
2π MN jn
−
jn PQ 2π MN jn
−
jn PQ sinθ =
2j
1 Le jω c 2n − jω c 2n jω c1n − jω c1n
OP
= M −2je − e −2je
πn MN PQ When n = 0, the hd(n) becomes
sin ω c2n − sin ω c1n 0/0, which is indeterminate.
= ; for all n, except n = 0
πn
sin ω c2n − sin ω c1n
When n = 0 ; hd (n) = hd (0) = Lt U sin g L' Hospital rule,
n→ 0 πn
1 sin ω c2n sin ω c1n sin Aθ
= Lt − Lt Lt =A
π n→0 n n→ 0 n
θ→ 0 θ
1
π
ω c2 − ω c1
= b g
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
N−1 N −1
Rectangular window sequence, wR (n) = 1 ; for n = − 2
to + 2
= 0 ; otherwise
When n = 0 ; h(0) =
LM 0.48π − 0.35π OP = 0.13
N π Q
L sinb0.48 π × 1g − sinb0.35 π × 1g OP = 0.0340
When n = 1 ; h(1) = M
N π ×1 Q
When n = 2 ; h(2) = M
L sinb0.48 π × 2g − sinb0.35 π × 2g OP = −0.1088
N π×2 Q Using symmetry
When n = −1 ; h(−1) = h(1) = 0.0340 condition,
When n = −2 ; h(−2) = h(2) = −0.1088 h(–n) = h(n).
n= − n = −2
2 Using symmetry
= z −2 h(−2) z 2 + h( −1) z + h(0) + h(1) z −1 + h(2) z −2 condition,
h(–n) = h(n).
= z −2 h(2) z2 + z −2 + h(1) z + z −1 + h(0)
Structure
Y(z)
Let, H(z) = = 0.13 z −2 + 0.0340 z –1 + z –3 − 0.1088 1 + z −4
X(z)
+ +
−1
z
−4 −1 −3 −2
−0.1088 [X(z) + z X(z)] 0.0340 [z X(z) + z X(z)] 0.13z X(z)
+ +
F ig 1 : L in ea r ph a se stru c tu re fo r F IR b a n dp a ss filte r.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0 the magnitude response |H(ejw )| is given by |A(w)|,
N −1
2
where, A(ω ) = h(0) + ∑ 2h(n)cos ωn
n =1
Refer table 6.2 case (v)
2
= h(0) + ∑ 2h(n)cos ωn
n=1
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 –0.0196 0.0196 16 0.3177 0.3177
1× π 10 × π
16 –0.0043 0.0043 16 0.2578 0.2578
2× π 11× π
16 0.0389 0.0389 16 0.1754 0.1754
3× π 12 × π
16 0.1032 0.1032 16 0.0819 0.0819
4× π 13 × π
16 0.1780 0.1780 16 –0.0098 0.0098
5× π 14 × π
16 0.2510 0.2510 16 –0.0866 0.0866
6× π 15 × π
16 0.3098 0.3098 16 –0.1377 0.1377
7× π 16 × π
16 0.3443 0.3443 16 –0.1556 0.1556
8× π
16 0.3476 0.3476
|H (e jω)|
0.4
0.3
0.2
0.1
0 2π
π 3π 4π 5π 6π 7π 8π 9π 10 π 11π 12π 13π 14 π 15 π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : L in e ar p h a se stru cture o f F IR b a n d pa ss filte r.
Solution for Exercise Problems E6. 17
E6.8 Design a linear phase FIR bandstop filter to reject frequencies in the range 0.35p to 0.48p rad/sample using
rectangular window, by taking 5 samples of window sequence.
Solution
Given that, w c1 = 0.35p ; w c2 = 0.48p
Let the symmetry condition be h(– n) = h(n). Therefore, the desired ideal frequency response Hd(ejw ) for FIR bandstop filter is,
Hd (e jω ) = 1 ; – π ≤ ω ≤ – ω c 2 and – ω c1 ≤ ω ≤ + ω c1 and ω c 2 ≤ ω ≤ + π
= 0 ; otherwise
The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
By definition of inverse Fourier transform,
π −ω c2 ω c1 π
hd (n) =
1
2π
−π
z Hd (e jω ) e jωn dω =
1
2π z
−π
1 × e jωn dω +
1
2π z
− ω c1
1 × e jωn dω +
1
2π z
ω c2
1 × e jωn dω
=
LM OP + 1 LM e OP
1 e jωn
−ω c2 jωn ω c1
+
1 e jωn LM OP π
N Q
2π jn 2π N jn Q
−π − ω c1
2π jn N Q ω c2
1 Le OP + 1 LM e OP + 1 LM e OP
− jω c 2n − jπn jω c1n − jω c1n jπn jω c 2n
e e e
= M
2π MN jn
−
jn PQ 2π MN jn
−
jn PQ 2π MN jn
−
jn PQ
1 Le − e OP
jπn − jπn jω c1n − jω c1n jω c 2n − jω c 2n
= M 2j + e −2je
πn MN
−
e −e
2j PQ sinθ =
e jθ − e − jθ
2j
sin πn + sin ω c1n − sin ω c 2n
= ; for all n, except n = 0.
πn When n = 0, the hd(n) becomes
sin πn + sin ω c1n − sin ω c 2n 0/0, which is indeterminate.
When n = 0 ; hd (n) = hd (0) = Lt
n→ 0 πn
1 sin πn 1 sin ω c1n 1 sin ω c2n U sin g L' Hospital rule,
= Lt + Lt + Lt
π n→ 0 n π n→ 0 n π n→ 0 n
sin Aθ
1 1 1
= × π + × ω c1 − × ω c 2 = 1 −
ω c 2 − ω c1 FG IJ Lt
θ→ 0 θ
=A
π π π π H K
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
N −1 N−1
Rectangular window sequence, wR (n) = 1 ; n = − 2
to +
2
= 0 ; otherwise
∴ Impulse response, h(n) = hd (n) × wR (n)
N −1 N−1
= hd (n) ; for n = − 2
to +
2
When n = 0 ; h(0) = 1 −
FG ω − ω IJ = 0.87 c2 c1
H π K
sin b0.35 π × 1g − sin b0.48π × 1g
When n = 1 ; h(1) = = −0.0340
π ×1
When n = 2 ; h(2) =
b g
sin 0.35 π × 2 − sin 0.48π × 2 b g = 0.1088
π×2 Using symmetry
When n = −1 ; h(−1) = h(1) = −0.0340 condition,
When n = −2 ; h(−2) = h(2) = 0.1088 h(–n) = h(n).
The transfer function H(z) of the digital FIR bandstop filter is given by,
N −1
N−1 N −1 2 2
− −
H(z) = z 2
l q
Z h(n) = z 2
∑ h(n) z
− N −1
–n
= z −2 ∑ h(n) z –n
n = n = −2
2
Y(z)
Let, H(z) = = 0.87 z −2 − 0.0340 z −1 + z −3 + 0.1088 1+ z −4
X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1
z X(z)
+ +
−1
z
−4 −1 −3 −2
0.1088 [X(z) + z X(z)] −0.0340 [z X(z) + z X(z)] 0.87z X(z)
+ +
F ig 1 : L in ea r ph a se stru c tu re fo r F IR ba n dsto p filter.
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at n = 0 the magnitude response |H(ejw )| is given by
|A(w)|,
N −1
2
Refer table 6.2 case (v)
where, A(ω ) = h(0) + ∑ 2h(n)cos ωn
n =1
3
= h(0) + ∑ 2h(n)cos ωn
n=1
Using the above equation, the amplitude response, A(w) and magnitude function |H(ejw )| are calculated for various values of w and
listed in table 1. Using these values the magnitude response is plotted as shown in fig 2.
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 9× π
16 1.0196 1.0196 16 0.6822 0.6822
1× π 10 × π
16 1.0043 1.0043 16 0.7421 0.7421
2× π 11× π
16 0.9610 0.9610 16 0.8245 0.8245
3× π 12 × π
16 0.8967 0.8967 16 0.9180 0.9180
4× π 13 × π
16 0.8219 0.8219 16 1.0098 1.0098
5× π 14 × π
16 0.7489 0.7489 16 1.0866 1.0866
6× π 15 × π
16 0.6901 0.6901 16 1.1377 1.1377
7× π 16 × π
16 0.6556 0.6556 16 1.1556 1.1556
8× π
16 0.6524 0.6524
Solution for Exercise Problems E6. 19
jω
|H (e )|
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
ω
0
π 2π 3π 4π 5π 6π 7π 8π 9π 10π 11π 12 π 13π 14 π 15π 16π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ( π)
F ig 2 : M a gn itu d e respo n se o f F IR b a n dsto p filter.
E6.9 Determine the coefficients of a linear phase FIR filter of length N = 11 which has a symmetric unit sample response
and a frequency response that satisfies the conditions
H e j =1
2π k
11
; for k = 0, 1, 2, 3
=0 ; for k = 4, 5
Solution
N−1
For linear phase FIR filter the phase function, q(w) = -aw where α = 2
.
11 − 1
Here, N = 11, ∴ α = =5.
2
2πk 2πk
Also, here ω = ω k = = . Hence we can go for type-1 design.
N 11
In this problem the samples of the magnitude response of the ideal (desired) filter are directly given for various values of k.
2 πk
− j5 ×
∴ H(k ) = Hd (e jω = 1 e − jαω k = e 11 ; k = 0, 1, 2, 3
ω = ωk
=0 ; k = 4, 5, 6, 7
2 πk
− j5 ×
= 1 e − jαω k = e 11 ; k = 8, 9, 10
1
LM N− 1
2 L O OP j2 πnk
Using equation(6.76).
h(n) = H(0) + 2 MM ∑ ReMMH(k) e PPP N
N
N k= 1 N QPQ
1 L
MH(0) + 2 ∑ ReLMH(k) e OPOPP
5 j2 πnk
= 11
11 M MN PQQ
N k= 1
1 L
MH(0) + 2 ∑ ReLMH(k) e OPOPP
3 j2 πnk
= 11
11 M MN PQQ
N k= 1
1 L OP OP
M1 + 2 ∑ ReLMe
3 2 πk j2 πnk
− j5 ×
= × e 11 11 H(0) = 1
11 M
N k = 1 NM PQ PQ
1 L OPOP
3 L j2 πk e jθ = cos θ + j sin θ
= M
11 M
1 + 2 ∑ ReMe 11
(n − 5 )
When n = 0 ; h(0) =
LM
1
1 + 2 cos
2π(0 − 5)
+ 2cos
4 π(0 − 5)
+ 2cos
6 π(0 − 5) OP
= −0.0496
N
11 11 11 11 Q
1 L 2π(1 − 5) 4 π(1 − 5) 6π(1 − 5) O
11 MN 11 PQ
When n = 1 ; h(1) = 1 + 2 cos + 2cos + 2cos = 0.0989
11 11
+ h(4) z −4 + z −6 + h(5) z −5
+ 0.2935 z −4 + z −6 + 0.6363 z −5
Structure
Y(z)
Let, H(z) = = −0.0496 1+ z −10 + 0.0989 z −1 + z −9 − 0.0338 z −2 + z −8 − 0.1270 z −3 + z −7
X(z)
+ 0.2935 z −4 + z −6 + 0.6363 z −5
∴ Y(z) = −0.0496 X(z) + z −10 X(z) + 0.0989 z −1 X(z) + z −9 X(z) − 0.0338 z −2 X(z) + z −8 X(z)
+ + + + +
−1 −1 −1 −1 −1
−10
z z −8
z −7
z z
−9 −6
z X(z) z X(z) z X(z) z X(z) z X(z)
−10 −1 −9 −2 −8 −3 −7 −4 −6 −5
−0.0496[X(z) + z X(z)] 0.0989[z X(z) + z X(z)] −0.0338[z X(z) + z X(z)] −0.1270 [z X(z) + z X(z)] 0.2935 [z X(z) + z X(z)] 0.6363z X(z)
+ + + + +
F ig 1 .
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N –1)/2 the magnitude response |H(ejw )| is given
by |A(w)|,
N−1
2
where, A(ω ) = h e j + ∑ 2he
N −1
2
n=1
N −1
2 j
− n cos ωn Refer table 6.2 case (i)
5
= h(5) + ∑ 2h(5 − n)cos ωn
n=1
Using the above equation, the amplitude response, A(w) and magnitude function |H(ejw )| are calculated for various values of w and
listed in table 1. Using these values the magnitude response is plotted as shown in fig 2.
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 17 × π
16 1.0003 1.0003 16 0.0770 0.0770
1× π 18 × π
16 1.0059 1.0059 16 –0.0977 0.0977
2 ×π 19 × π
16 1.0111 1.0111 16 –0.1993 0.1993
3 ×π 20 ×π
16 0.9978 0.9978 16 –0.0945 0.0945
4× π 21× π
16 0.9715 0.9715 16 0.2205 0.2205
5 ×π 22 ×π
16 0.9667 0.9667 16 0.6204 0.6204
6× π 23 ×π
16 1.0113 1.0113 16 0.9412 0.9412
7× π 24 × π
16 1.0804 1.0804 16 1.0881 1.0881
8 ×π 25 × π
16 1.0881 1.0881 16 1.0804 1.0804
9× π 26 × π
16 0.9412 0.9412 16 1.0113 1.0113
10 × π 27 × π
16 0.6204 0.6204 16 0.9667 0.9667
11× π 28 × π
16 0.2205 0.2205 16 0.9715 0.9715
12 × π 29 ×π
16 –0.0945 0.0945 16 0.9978 0.9978
13 × π 30 ×π
16 –0.1993 0.1993 16 1.0111 1.0111
14 × π 31× π
16 –0.0977 0.0977 16 1.0059 1.0059
15 × π 32 ×π
16 0.0770 0.0770 16 1.0003 1.0003
16 × π
16 0.1599 0.1599
E6. 22 DSP, Chapter 6 - FIR Filters
31π
16
30π
16
29 π
16
28π
16
27 π
16
26π
16
25 π
16
24 π
16
23π
16
( π)
16
15π
16
14 π
16
13 π
16
12 π
16
11π
16
10π
16
9π
16
8π
16
7π
16
6π
16
5π
16
4π
16
3π
16
2π
16
16
0π
|H (e jω)|
0.1
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
1.2
E6.10 Design a linear phase FIR lowpass filter for the desired frequency response as |H d (e jω)|
given below, by frequency samplingtechnique for N = 7.
Solution ω
0 0.5π π 1.5π 2π
0.6π 1.4π
The magnitude response for ideal lowpass filter is shown in fig 1.
F ig 1 : Id e al m ag n itu d e
resp o n se o f F IR low p a ss filter.
Solution for Exercise Problems E6. 23
jw
The desired frequency response Hd(e ) of linear phase FIR lowpass filter with cutoff frequency 0.6p rad/sample is given by,
where, N = 7 ; α = 3
The DFT sequence H(k) is obtained by sampling Hd(ejw ) at 7 equidistant frequency points in a period of 2p. The 7 frequencies for
type-1 design are given by,
2πk 2πk
ωk = = ; for k = 0 to 6.
N 7
∴ H(k ) = Hd (ω ) ω = 2 πk = 2 πk
N 7
2π × 0 2π × 4
When k = 0 ; ω k = =0 When k = 4 ; ω k = = 114
. π
7 7
2π × 1 2π × 5
When k = 1 ; ω k = = 0.28 π When k = 5 ; ω k = = 1.43π
7 7
2π × 2 2π × 6
When k = 2 ; ω k = = 0.57 π When k = 6 ; ω k = = 1.71π
7 7
2π × 3
When k = 3 ; ω k = = 0.86π
7
From the above calculations the following observations can be made.
For k = 0 to 2, the samples lie in the range 0 £ w £ 0.6 p
For k = 3 to 4, the samples lie in the range 0.6p < w < 1.4 p
For k = 5 to 6, the samples lie in the range 1.4p £ w £ 2p
The sampling points of the ideal frequency response are shown in fig 2. The magnitude samples of H(k) (Magnitude spectrum) are
shown in fig 3.
|H d (e jω)|
|H (k )|
ω
0 π 2π 3π 4π 5π 6π ω
7 7 7 7 7 7 0 1 2 3 4 5 6
Based on the above discussions, the equation for DFT coefficients H(k) can be written as shown below.
2 πk
− j3 ×
H(k ) = Hd (e jω ) =e 7 ; for k = 0, 1, 2
ω = ωk
=0 ; for k = 3, 4
2 πk
− j3 ×
= e 7 ; for k = 5, 6
The samples of impulse response, h(n) are given by,
1
LM L
N− 1
2 O OP j2 πnk
h(n) = MM
H(0) + 2 ∑ ReMMH(k) e PPP N Using equation(6.76).
N
N N k= 1 QPQ
1 L
MH(0) + 2 ∑ ReLMH(k) e OPOPP
2 j2 πnk
= 7
7 M MN PQQ
N k = 1
1 L OPOP
M1+ 2 ∑ ReLMe
2 2 πk j2 πnk
− j3 ×
= e 7 7 H(0) = 1
7 M NM PQPQ
N k = 1
1 L L OPOP
2 j 2 πk (n − 3)
= M1 + 2 ∑ Re Me 7
7 M MN PQQP
N k = 1
When n = 0 ; h(0) =
LM 1
1 + 2 cos
2π(0 − 3)
+ 2 cos
OP
4 π(0 − 3)
= 0.0635
N 7 7 7 Q
1 L 2π(1 − 3) 4 π(1 − 3) O
When n = 1 ; h(1) = M1 + 2 cos
7 N 7
+ 2 cos
7 PQ = −0.1781
1 L 2π(2 − 3) 4π(2 − 3) O
When n = 2 ; h(2) = M1 + 2 cos
7 N 7
+ 2 cos
7 PQ = 0.2574
1 L 2π(3 − 3) 4π(3 − 3) O
When n = 3 ; h(3) = M1 + 2 cos
7 N 7
+ 2 cos
7 PQ = 0.7142
When n = 4 ; h(4) = h(7 − 1 − 4) = h(2) = 0.2574
Using symmetry condition
When n = 5 ; h(5) = h(7 − 1 − 5) = h(1) = −0.1781 h(N – 1 – n) = h(n)
When n = 6 ; h(6) = h(7 − 1 − 6) = h(0) = 0.0635
The transfer function H(z) of the filter is given by Z-transform of h(n).
N − 1 6
l q ∑ h(n) z
∴ H(z) = Z h(n) = −n
= ∑ h(n) z −n
n = 0 n = 0
= h(0) + h(1)z −1 + h(2) z −2 + h(3) z −3 + h(4) z −4 + h(5) z −5 + h(6) z −6 Using symmetry condition
−1 −2 −3 −4 −5 −6 h(N – 1 – n) = h(n)
= h(0) + h(1)z + h(2) z + h(3) z + h(2) z + h(1) z + h(0) z
−6 −1 −5 −2 −4
= h(0) 1+ z + h(1) z + z + h(2) z +z + +h(3) z −3
Structure
Y(z)
Let, H(z) = = 0.0635 1+ z −6 − 0.1781 z −1 + z −5 + 0.2574 z −2 + z −4 + 0.7142 z −3
X(z)
∴ Y(z) = 0.0635 X(z) + z −6 X(z) − 0.1781 z −1 X(z) + z −5 X(z) + 0.2574 z −2 X(z) + z −4 X(z) + 0.7142 z −3 X(z)
The above equation can be used to draw the FIR filter structure as shown in fig 4.
−1 −2 −3
−1
z X(z) z X(z) −1 z X(z)
−1
z z z
+ + +
−1 −1 −1
−6
z −5
z −4
z
z X(z) z X(z) z X(z)
−6 −1 −5 −2 −4 −3
0.0635[X(z) + z X(z)] −0.1781[z X(z) + z X(z)] 0.2574[z X(z) + z X(z)] 0.7142z X(z)
+ + +
F ig 4 .
Frequency Response
When impulse response is symmetric and N is odd with centre of symmetry at (N –1)/2 the magnitude response |H(ejw )| is given
by |A(w )|,
N −1
2
where, A(ω ) = h e j + ∑ 2h e
N−1
2
n =1
N −1
2 j
− n cos ωn Refer table 6.2 case (i)
3
= h(3) + ∑ 2h(3 − n)cos ωn
n=1
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
listed in table 1. Using these values the magnitude response is plotted as shown in fig 5.
0.1
jw
w A(w
w) |H(ejww )| = |A(w
w )| w A(w
w) |H(ejww )| = |A(w
w )|
0× π 17 × π
16 0.9998 0.9998 16 –0.2253 0.2253
1× π 18 × π
16 0.9956 0.9956 16 –0.0618 0.0618
2× π 19 × π
16 0.9865 0.9865 16 0.1746 0.1746
3× π 20 × π
16 0.9811 0.9811 16 0.4399 0.4399
4× π 21× π
16 0.9884 0.9884 16 0.6890 0.6890
5× π 22 × π
16 1.0119 1.0119 16 0.8863 0.8863
6× π 23 × π
16 1.0457 1.0457 16 1.0134 1.0134
7× π 24 × π
16 1.0731 1.0731 16 1.0704 1.0704
8× π 25 × π
16 1.0704 1.0704 16 1.0731 1.0731
9× π 26 × π
16 1.0134 1.0134 16 1.0457 1.0457
10 × π 27 × π
16 0.8863 0.8863 16 1.0119 1.0119
11× π 28 × π
16 0.6890 0.6890 16 0.9884 0.9884
12 × π 29 × π
16 0.4399 0.4399 16 0.9811 0.9811
13 × π 30 × π
16 0.1746 0.1746 16 0.9865 0.9865
14 × π 31× π
16 –0.0618 0.0618 16 0.9956 0.9956
15 × π 32 × π
16 –0.2253 0.2253 16 0.9998 0.9998
16 × π
16 –0.2838 0.2838
Chapter 7
IIR Filters
7.1 Introduction
The specification of a digital filter will be desired frequency response, Hd(ejw ). The desired impulse
response, hd(n) of the digital filter can be obtained by taking inverse Fourier transform of Hd(ejw ). Now, the
hd(n) will be an infinite duration discrete time signal defined for all values of n in the range –¥ to +¥ . The
filters designed by considering all the infinite samples of impulse response are called IIR (Infinite Impulse
Response) filters.
In digital domain, the processing of infinite samples of impulse response is practically not possible.
Hence direct design of IIR filter is not possible. Therefore, the IIR filters are designed via analog filters.
In design of IIR filter, the specification of an IIR filter is transformed to specification of an analog filter
and an analog filter with transfer function, H(s) is designed to satisfy the specification. Then the analog filter
is transformed to digital filter with transfer function, H(z).
We know that the analog filter with transfer function H(s) is stable if all its poles lie in the left half of the
s-plane. Consequently, if the conversion technique is to be effective, it should possess the following desirable
properties.
1. The imaginary axis in the s-plane should map into the unit circle in the z-plane. Thus there will
be a direct relationship between the two frequency variables in the two domains.
2. The left-half of the s-plane should map into the interior of the unit circle in the z-plane. Thus a
stable analog filter will be converted to a stable digital filter.
The analog filter is designed by approximating the ideal frequency response using an error function.
A number of solutions to the approximation problem of analog filter design are well developed. The popular
among them are Butterworth and Chebyshev approximation. The popular transformation techniques used for
transforming analog filter transfer function H(s) to digital filter transfer function H(z) are bilinear and impulse
invariant transformation. The digital transfer function H(z) can be realized in a software that runs on a digital
hardware (or it can be implemented in firmware).
The frequency response H(ejw ) of the digital filter can be obtained by letting z = ejw in the transfer
function H(z) of the filter.
Chapter 7 - IIR Filters 7. 2
The designed transfer function of the filter should represent a stable and causal system. For stability
and causality of analog filter, the analog transfer function should satisfy the following requirements.
1. The H(s) should be a rational function of "s" and the coefficients of "s" should be real.
2. The poles should lie on the left half of s-plane.
3. The number of zeros should be less than or equal to number of poles.
For stability and causality of digital filter, the digital transfer function should satisfy the following
requirements.
1. The H(z) should be a rational function of "z" and the coefficients of "z" should be real.
2. The poles should lie inside the unit circle in z-plane.
3. The number of zeros should be less than or equal to number of poles.
Advantages of Digital Filters
1. The values of resistors,capacitors and inductors used in the analog filters changes with
temperature. Since digital filters do not have these components, they have high thermal
stability.
2. In digital filters the precision of the filter depends on the length (or size) of the registers used to
store the filter coefficients. Hence by increasing the register bit-length (in hardware) the
performance characteristics of the filter like accuracy, dynamic range, stability and frequency
response tolerance, can be enhanced.
3. The digital filters are programmable. Hence the filter coefficients can be changed at any time to
implement adaptive features.
4. A single filter can be used to process multiple signals by using the techniques of multiplexing.
Disadvantages of Digital Filters
1. The bandwidth of the discrete signal is limited by the sampling frequency. The bandwidth of
real discrete signal is half the sampling frequency.
2. The performance of the digital filter depends on the hardware (i.e., depends on the bit length of
the registers in the hardware) used to implement the filter.
Important Features of IIR Filters
1. The physically realizable IIR filters do not have linear phase.
2. The IIR filter specifications include the desired characteristics for the magnitude response
only.
Table 7.1 : Comparison of Digital and Analog Filters
As
δs
0 Ωp Ωc Ωs Ω
0 Ωc Ω
P as sband T ransition S topband
P as sband S topband band
F ig a : N orm alized m ag n itud e respo n se o f id ea l F ig e : N orm alized m ag n itud e respo n se o f p ra ctica l
a na log lo w pa ss filter. a na log lo w pa ss filter.
|H d (j Ω)|
|H (j Ω)|
1 1
δp
Ap
1
= 0.707
2
δs
As
0 Ωc Ω 0 Ωs Ωc Ωp Ω
S topband P as sband S topband T ransition P as sband
band
F ig b : N orm alized m ag n itud e respo n se o f id eal F ig f : N orm alized m ag n itud e respo n se o f p ra ctical
a na log h ig hp ass filter. a na log h ig hp ass filter.
|H (j Ω)|
1
|H d (j Ω)| δp
Ap
1 1
= 0.707
2
As
δs
0 Ω
0 Ωc2
Ω
Ωc1 P as sband
|H (j Ω)|
1
|H d (j Ω)| δp
Ap
1 1
= 0.707
2
As
δs
0 Ω
0 Ωc2
Ω
Ωc1
S topband
As
δs
ωp ωc ωs ω
0 ωc
ω 0
δs
As
ω ωs ωc ωp ω
0 ωc 0
As
δs
0
ω
ωc1 ωc2
ω
0 P as sband
jω
|H ( e )|
1
jω
|H d ( e )| δp
Ap
1 1
= 0.707
2
As
δs
0
ω
0 ωc1 ωc2
ω
S topband
Therefore the impulse response h(n) can be obtained from equation (7.2) by replacing t by nT.
N
∴ h( n) = h( t )
t = nT
= h( nT) = ∑ A i e− p nT u( nT)
i
i=1
.....(7.3)
= A1 e− p1nT u( nT) + A 2 e− p 2 nT u( nT) + ..... + A N e − p N nT u( nT)
1 1 .....(7.5)
(
is transformed to )
→ − p i T −1
s + pi 1 − e z
zi = e(σ i + jΩ i )T
= e σ i T e jΩ i T
We know that "z i" is a complex number. Hence "z i" can be expressed in polar coordinates as, zi = |zi| Ð z i.
∴ |z i | ∠z i = eσ i T e jΩ i T ..... (7.10)
jΩ
3 π/T
jv
LHP RHP U nit circ le
j1
π/T
σ −1 1
u
−π/T
−j1
−3 π/T
F ig 7 .4 a : s-p la n e. F ig 7 .4 b : z-p la n e.
F ig 7 .4 : M a p p in g o f s-p la n e in to z-p la n e in im p u lse in v a ria n t tra n sfo rm a tio n .
The stability of a filter (or system) is related to the location of the poles. For a stable analog filter the
poles should lie on the left half of the s-plane. Since the left half of s-plane maps inside the unit circle in
z-plane we can say that, for a stable digital filter the poles should lie inside the unit circle in z-plane.
7.3.2 Relation Between Analog and Digital Frequency in Impulse Invariant Transformation
Let, W = Analog frequency in rad/second.
w = Digital frequency in rad/sample.
Let, z = rejw be a point on z-plane,
and s = s + jW be the corresponding point in s-plane.
Then by impulse invariant transformation,
z = esT ..... (7.14)
7. 9 Digital Signal Processing
Put, z = r ejw and s = s + jW in equation (7.14).
∴ r e jω = e( σ + jΩ ) T
..... (7.15)
r e jω = eσT e jΩT
On equating the phase on either side of equation (7.15) we get,
ω
Digital frequency, w = W T or Ana log frequency, Ω = ..... (7.16)
T
When impulse invariant transformation is employed the equation (7.16) can be used to compute
the digital frequency for a given analog frequency and vice versa.
The mapping of analog to digital frequency is not one-to-one. Since w is unique over the range
(-p to +p), the mapping w = W T implies that the interval -p/T £ W £ +p/T maps into the corresponding
values of -p £ w £ +p. In general the interval (2k-1) p/T £ W £ (2k + 1) p/T (where k is an integer) maps into
the corresponding values of -p £ w £ +p. Thus the mapping from the analog frequency W to the digital
frequency w is many-to-one. This reflects the effects of aliasing due to sampling.
7.3.3 Useful Impulse Invariant Transformation
The following transformations are given without proof. The equation (7.17) can be used when the
analog real poles has a multiplicity of m. The equations (7.18) and (7.19) can be used when the analog poles
are complex conjugate.
1 ( −1) m − 1 d m − 1 1 .....(7.17)
→ m−1 − p i T −1
(s + pi ) m ( m − 1)! dpi 1 − e z
Example 7.1
2
For the analog transfer function, H(s) = 2
, determine H(z) using impulse invariant
s + 3s + 2
transformation if (a) T = 1 second and (b) T = 0.1 second.
2 2
B= × (s + 2) = = −2
(s + 1) (s + 2) s = −2 −2 +1
Chapter 7 - IIR Filters 7. 10
2 −2
∴ H(s) = +
s+1 s+2
By impulse invariant transformation we know that,
Ai Ai
→
s + pi (is transformed to )
1 − e − piT z −1
2 −2
∴ H(z) = + where p1 = 1 and p2 = 2
1 − e − p1T z−1 1 − e− p 2T z−1
2 −2
H(z) = −1
+
1− e T
z 1 − e2T z−1
(a) When T = 1 second
2 −2
H(z) = +
1 − e−1 z −1 1 − e−2 z−1
2 −2 2(1 − 0.1353z−1) − 2(1 − 0.3679z−1)
H(z) = −1
+ −1
=
1 − 0.3679z 1 − 0.1353z (1 − 0.3679z−1) (1 − 0.1353z−1)
2 − 1.6374z−1 − 2 + 18096
. z−1 0.1722 z−1
= −1 −1 −2
=
1 − 0.8187 z − 0.9048z + 0.7408 z .
1 − 17235 z−1 + 0.7408 z−2
Alternatively,
0.1722 z−1 0.1722 z−1
H(z) = −1 −2
= −2 2
1 − 1. 7235 z + 0.7408 z z (z − 1. 7235 z + 0.7408)
0.1722z
=
z2 − 1. 7235 z + 0.7408
Alternatively,
0.1722 z 0.0172 z
HN (z) = T × H(z) = 0.1 × =
z2 − 1. 7235 z + 0.7408 z2 − 1. 7235 z + 0.7408
7. 11 Digital Signal Processing
Example 7.2
Convert the analog filter with system transfer function,
(s + 0.1)
H(s) =
(s + 0.1)2 + 9
into a digital IIR filter by means of the impulse invariant method.
Solution
Method - I
s + 0.1 s + 0.1
Given that, H(s) = =
(s + 0.1)2 + 9 (s + 0.1)2 + 32
Using transformation of equation (7.18) we can write,
H(z) =
c
1 − e−0.1T cos 3T z−1 h =
c
1 − e−0.1 cos 3 z−1 h
Put, T = 1
1 − 2e −0.1T
ccos 3Th z −1
+e −2 × 0.1T
z −2
1 − 2e ccos 3h z
−0.1 −1
+ e−0.2 z−2
1 + 0.8958 z −1
=
.
1 + 17916 z−1 + 0.8187 z−2
Alternatively,
1 + 0.8958 z −1 1 + 0.8958 z −1 z2 + 0.8958 z
H(z) = −1 −2
= −2 2
= 2
1 + 1. 7916 z + 0. 8187 z z (z + 1. 7916 z + 0. 8187) z + 1. 7916 z + 0. 8187
b g ∗
A∗ = 0.5 = 0.5
0.5 0.5
∴ H(s) = +
s + 0.1 − j3 s + 0.1 + j3
By impulse invariant transformation we know that,
Ai Ai
→ and let, T = 1
s + pi (is transformed to
1 − e−piT z−1
0.5 0.5 0.5 0.5
∴ H(z) = + = +
1 − e−(0.1 − j3)T z−1 1 − e−(0.1 + j3)T z−1 1 − e−0.1 e j3 z−1 1 − e−0.1 e− j3 z−1
Example 7.3
Using impulse invariant transformation convert the following analog filter transfer function to digital
filter transfer function by taking sampling time, T = 0.5 second.
2.8s 2 + 4.8s + 2.9
H(s) =
(s + 3) (s 2 + s + 0.85)
Solution
Method - I
2 − 2.8844 z−1 + 1.213 z−2 + 0.8 − 0.1785 z−1 − 0.5769 z−1 + 0.1287z−2
=
1 − 1.4422 z−1 + 0.6065 z −2 − 0.2231z−1 + 0.3218 z−2 − 0.1353 z−3
2 .8 − 3.6398 z−1 + 13417
. z−2
=
1 − 1.6653 z + 0.9283 z − 0.1353 z−3
−1 −2
Alternatively,
2 .8 − 3.6398 z −1 + 13417
. z −2 z −3 (2 .8 z3 − 3.6398 z2 + 13417
. z)
H(z) = −1 −2 −3
= −3 3
1 − 1.6653 z + 0.9283 z − 0.1353 z z (z − 1.6653 z 2 + 0.9283 z − 0.1353)
2 .8 z3 − 3.6398 z 2 + 13417
. z
=
z3 − 1.6653 z2 + 0.9283 z − 0.1353
Alternatively,
2 .8z3 − 3.6398 z 2 + 13417
. z . z3 − 18199
14 . z2 + 0.6709 z
HN (z) = T × H(z) = 0.5 × 3 2
= 3 2
z − 1.6653 z + 0.9283 z − 0.1353 z − 1.6653 z + 0.9283 z − 0.1353
2
2 .8(−0.5 + j0.7746) + 4.8(−0.5 + j0.7746) + 2 .9
=
(−0.5 + j0.7746 + 3) (−0.5 + j0.7746 + 0.5 + j0.7746)
2 .8( −0.5 + j0.7746)2 + 0.5 + j3.7181
= = 0.4
(2.5 + j0.7746) ( j1.5492)
B∗ = (0.4)∗ = 0.4
2 0.4 0.4
∴ H(s) = + +
s + 3 s + 0.5 − j0.7746 s + 0.5 + j0.7746
1 1 1
= 2× + 0.4 × + 0.4 ×
s +3 s + (0.5 − j0.7746) s + (0.5 + j0.7746)
1 1 1 Using
H(z) = 2 × + 0.4 × + 0.4 ×
1− e −3T
z −1
1− e − ( 0.5 − j0.7746 )T
z −1
1− e − ( 0.5 + j0.7746 )T −1
z equation (7.17).
2 0.4 0.4
= + + Put, T = 0.5
1 − e−3 × 0.5 z−1 1 − e−( 0.5 − j0.7746) × 0.5 z −1 1 − e −( 0.5+ j0.7746) × 0.5z −1
2 0.4 0.4
= + +
1 − e−1.5 z−1 1 − e−0.25 e j0.3873 z −1 1 − e−0.25 e − j0.3873z−1
=
2
+
d i d
0.4 1 − e−0.25 e− j0.3873z−1 + 0.4 1 − e−0.25 e j0.3873z−1 i
1 − 0.2231 z−1 d id
1 − e−0.25 e j0.3873 z −1 1 − e −0.25 e − j0.3873 z −1 i
2 0.4 − 0.4 e −0.25 e − j0.3873z −1 + 0.4 − 0.4 e −0.25 e j0.3873z −1
= −1
+
1 − 0.2231 z 1 − e −0.25 e − j0.3873 z −1 − e−0.25 e j0.3873 z −1 + e −0.5 z −2
=
2
+
e
0.8 − 0.4 e−0.25 ej0.3873 + e − j0.3873 z−1 j
−1
1 − 0.2231z e
1 − e−0.25 e j0.3873 + e − j0.3873 z−1 + e−0.5 z−2 j
=
2
+
0.8 − 0.4 e −0.25
2 cos 0.3873 z−1 c h
c
1 − 0.2231z −1 1 − e−0.25 2 cos 0.3873 z−1 + e −0.5 z−2 h
2 0.8 − 0.5769 z−1
= +
1 − 0.2231z −1 1 − 1.4422 z−1 + 0.6065 z−2
=
e j e
2 1 − 1.4422 z−1 + 0.6065 z −2 + 0.8 − 0.5769 z −1 1 − 0.2231z−1 je j
e1 − 0.2231z je1 − 1.4422 z
−1 −1
+ 0.6065 z −2
j
7. 15 Digital Signal Processing
2 − 2.8844 z−1 + 1213
. z−2 + 0.8 − 0.1785 z−1 − 0.5769 z−1 + 0.1287 z−2
∴ H(z) =
1 − 1.4422 z −1 + 0.6065 z−2 − 0.2231z −1 + 0.3218 z−2 − 0.1353 z −3
Alternatively,
=
e
z−3 2.8 z3 − 3.6398 z2 + 1.3417 z j
z −3
ez
3
− 16653
. 2
z + 0.9283 z − 0.1353 j
2 .8 z3 − 3.6398 z2 + 1.3417 z
=
z − 1.6653 z2 + 0.9283 z − 0.1353
3
dy( t ) .....(7.20)
Let , = x( t )
dt
On integrating both sides of equation (7.20) we get,
nT nT The trapezoidal rule when integration is
z dy( t )
dt
dt =
z x( t ) dt approximated by two trapezoids is,
b
( n − 1) T
y( t )
nT
( n − 1) T
=
nT
z x(t) dt
z
a
f(x) dx =
b−a
2
f ( a ) + f ( b)
( n −1) T
( n − 1) T
nT
b
y( nT) − y ( n − 1) T = g z
( n − 1) T
x(t) dt
.....(7.21)
The integral on the right side of equation (7.21) can be approximated by the trapezoidal rule, so that,
.....(7.22)
y( nT) − y[( n − 1) T] = ejT
2
b
x( nT) + x ( n − 1)T g
For discrete time system, the equation (7.22) can be written as,
y( n) − y( n − 1) =
T
x( n) + x( n − 1) .....(7.23)
2
Chapter 7 - IIR Filters 7. 16
On taking Z-transform of equation (7.23) we get,
T
Y ( z ) − z −1 Y ( z ) = 2
X(z) + z−1 X(z)
T
1 − z−1 Y(z) = 2
1 + z −1 X(z)
2(1 − z−1 )
Y(z) = X(z) .....(7.24)
T(1 + z −1 )
On taking Laplace transform of equation (7.20) we get,
s Y(s) = X(s) .....(7.25)
On comparing equations (7.24) and (7.25) we can say that,
2 1 − z −1
s Y( s) ( → Y(z) .....(7.26)
is transformed to) T
1 + z −1
by bilinear transformation, where T is the sampling time period.
2 1− z −1
Hence in the s-domain transfer function, if "s" is substituted by the term the resulting
T
1 + z −1
transfer function will be z-domain transfer function.
7.4.1 Relation Between Analog and Digital Filter Poles in Bilinear Transformation
The mapping of s-domain function to z-domain function by bilinear transformation is a one to one
mapping, that is, for every point in z-plane, there is exactly one corresponding point in s-plane and
vice versa. The transformation is accomplished when,
2 1 − z −1
s= .....(7.27)
T
1 + z −1
The equation (7.27) can be rearranged as shown below to express "z" in terms of "s".
2 1 − z −1 T 1 − z −1 T z −1 ( z − 1)
s= ⇒ s= ⇒ s=
T
1 + z −1 2
1 + z −1 2
z −1 ( z + 1)
Tz −1 .....(7.28)
∴ 2
s=
z +1
On cross multiplying equation (7.28) we get,
T T T T T
2
s(z + 1) = z −1 ⇒ 2
s z + 2 s = z −1 ⇒ 2
s z − z = −1 − 2 s
e T
∴ – z 1– 2s = − 1 + j e T
2
s j
T
1 + 2
s
∴ z= T .....(7.29)
1 − 2
s
In equation (7.29), the variable "s" represent a point on s-plane and "z" is the corresponding point in
z-plane.
Let, si = si + jW i.
On substituting, si = si + jW i in equation (7.29) we get,
T T T
1 + 2 ( σ i + jΩi ) 1 + 2 σ i + j 2 Ωi .....(7.30)
zi = T
= T T
1− 2
(σi + jΩi ) 1− σ
2 i
− j 2 Ωi
7. 17 Digital Signal Processing
The magnitude of equation (7.30) is given by,
1
LM e1 + σ j + e Ω j OP
T
2 i
2 T
2 i
2 2
..... (7.31)
= M
MN e1 − σ j + e Ω j PPQ
zi 2 2
T T
i − i
2 2
jΩ jv
U n it c ircle j1
LHP RHP
σ −1 1 u
−j1
Fe jω − jω I
2 1 − e 2 − jω
GH 2 e 2 − e − jω JK
∴ jΩ = = e jθ e− jθ = 1
T 1 + e − jω
T Fe jω − jω I
GH 2 e 2 + e − jω JK
Chapter 7 - IIR Filters 7. 18
− jω Fe jω − jω I e jθ − e − jθ
2
e 2
GH 2 −e 2
JK ω
2 2 j sin 2
sinθ =
2j
jΩ = =
T − jω Fe jω − jω I T 2 cos ω
e 2
GH 2 +e 2
JK 2 cosθ =
e jθ + e − jθ
2
ω
2 sin 2 2 ω
∴Ω = = tan
T cos ω T 2 .....(7.33)
2
2 ω
∴ Analog frequency, Ω = tan
T 2
The equation (7.33) relates the analog frequency, W and digital frequency, w.
From equation (7.33) we get,
ΩT ω ω ΩT
= tan ⇒ = tan −1
2 2 2 2
ΩT .....(7.34)
∴ Digital frequency, ω = 2 tan −1
2
The equation (7.34) can be used to estimate the digital frequency w for a given analog
frequency, W . The equation (7.33) is used to calculate the analog frequency for a given digital frequency.
From the above analysis it is evident that the analog frequency W and digital frequency w has a nonlinear
relationship, because the entire negative imaginary axis in the s-plane (from W = –¥ to 0) is mapped into the
lower half of unit circle in z-plane (from w = –p to 0) and the entire positive imaginary axis in the
s-plane (from W = 0 to +¥ ) is mapped into the upper half of unit circle in z-plane (from w = 0 to +p). This
nonlinear mapping introduces a distortion in the frequency axis, which is called frequency warping.
ω = ΩT (Impulse invariant)
π −1
ω = 2tan ΩT/2
(Bilinear transformation)
2 Warping
0 1 2 3 4 5 6 7 8 9 10
ΩT
F ig 7 .6 : C o rresp on d e nce b etw een a n alo g a n d d igital freq u en c ies
resu ltin g fro m th e b ilin ea r tra nsfo rm a tio n .
The effect of warping on the magnitude response can be explained by considering an analog filter
with a number of passbands as shown in fig 7.7. The corresponding digital filter will have same number of
passbands, but with disproportionate bandwidth, as shown in fig 7.7.
7. 19 Digital Signal Processing
In designing digital filter using bilinear transformation the effect of warping on amplitude response
can be eliminated by prewarping the analog filter. In this method, the specified digital frequencies are
converted to analog equivalent using equation (7.33). This analog frequencies are called prewarp frequencies.
Using the prewarp frequencies, the analog filter transfer function is designed and then it is transformed to
digital filter transfer function.
The effect of warping on the phase response can be explained by considering an analog filter with
linear phase response as shown in fig 7.8. The phase response of corresponding digital filter will be nonlinear.
From the above discussions it can be stated that the bilinear transformation preserves the magnitude
response of an analog filter only if the specification requires piecewise constant magnitude, but the phase
response of the analog filter is not preserved. Therefore the bilinear transformation can be used only to
design digital filters with prescribed magnitude response with piecewise constant values. A linear phase
analog filter cannot be transformed to a linear phase digital filter using bilinear transformation.
jω
|H (e )| Ω ∠H (e jω) Ω
Ω Ω
|H (j Ω)| ∠H (j Ω)
F ig 7.7 : T he w a rp ing effect o n m ag n itu d e resp o n se. F ig 7.8 : T he w a rp ing effect o n p h a se respo n se .
Example 7.4
2
For the analog transfer function, H(s) = , determine H(z) using bilinear transformation if
s 2 + 3s + 2
(a) T = 1 second and (b) T = 0.1 second.
Solution
2
Given that, H(s) =
s 2 + 3s + 2
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
2
∴ H(z) =
F2 1− z −1 2 I F2 I
1 − z−1
GH T 1 + z−1 JK +3 GH T JK
1 + z−1
+2
2
=
−1 2
4 e1 − z j +
6 e1 − z j + 2
−1
T2 −1 2 T e1 + z j
−1
e1 + z j
Chapter 7 - IIR Filters 7. 20
2
∴ H(z) = 2 2
d
4 1 − z −1 i d id
+ 6T 1 − z−1 1 + z −1 + 2T 2 1 + z −1 i d i
2
d
T 2 1 + z−1 i
2
=
d
2T 2 1 + z −1 i (a + b) (a b) = a2 b2
2 2
d
4 1 − z −1 i d
+ 6T 1 − z −2 + 2T 2 1 + z−1 i d i
(a) T = 1 second
2
∴ H(z) =
d i 2 1 + z −1
−1 2 −1 2
4d1 − z i + 6d1 − z i + 2 d1 + z i −2
2d1 + 2z + z i −1 −2
(a + b)2 = a 2 + 2ab + b2
=
4 d1 − 2z + z i + 6d1 − z i + 2 d1 + 2z
−1 −2 −2 −1
+z −2
i (a − b)2 = a 2 − 2ab + b2
H(z) =
2 × 0.12 1 + z−1 d i
2 2
d
4 1 − z −1 i d
+ 6 × 0.1 1 − z −2 + 2 × 0.12 1 + z −1 i d i
=
d
0 .02 1 + 2z−1 + z−2 i
d
4 1 − 2z −1
+z −2
i + 0.6d1 − z i + 0.02 d1 + 2z −2 −1
+ z −2 i
0.02 + 0.04z−1 + 0.02z−2
=
4.62 − 7.96 z−1 + 3.42 z−2
0.02 0.04 −1 0.02 −2
+ z + z 0.0043 + 0.0087 z −1 + 0.0043 z −2
= 4.62 4.62 4.62 =
7.96 −1 3.42 −2 1 − 17229
. z−1 + 0.7403 z−2
1− z + z
4.62 4.62
Alternatively,
2s
Given that, H(s) =
s 2 + 0.2s + 1
2 1 − z −1
Put , s = in H(s) to get H(z).
T 1 + z −1
F2 1 − z −1 I 4 (1 − z−1)
2 GH T 1+ z −1 JK 1 + z −1
∴ H(z) = = Put, T = 1
F2 1 − z −1 I 2
F2 1 − z−1 I −1 2
4 (1 − z )
−1 2 +
0.4 (1 − z−1)
+1
GH T 1 + z −1 JK + 0.2GH T 1 + z−1 JK
+1 (1 + z ) 1 + z −1
4(1 − z−1)
(1 + z−1) 4(1 − z−1)(1 + z −1)
= −1 2 −1 −1 −1 2
=
4(1 − z ) + 0.4(1 − z ) (1+ z ) + (1 + z ) 4(1 − z ) + 0.4(1 − z−1) (1+ z −1) + (1 + z−1)2
−1 2
−1 2
(1 + z )
4(1 − z −2 )
= −1
(a + b) (a b) = a2 b2
4(1 − 2z + z ) + 0.4(1 − z−2 ) + (1 + 2z−1 + z−2 )
−2
(a + b)2 = a 2 + 2ab + b2
4 4 −1 (a − b)2 = a 2 − 2ab + b2
− z
4 − 4z−2 5.4 5.4
= =
5.4 − 6z−1 + 4.6z−2 6 −1 4.6 −2
1− z + z
5.4 5.4
0 .7407 − 0. 7407 z−1
=
1 − 1.111z−1 + 0.8519 z−2
Alternatively,
0 .7407 z2 − 0. 7407 z
=
z2 − 1.111z + 0.8519
Example 7.6
s3
Obtain H(z) from H(s) when T =1 second, and H(s) =
(s + 1) (s 2 + s + 1)
Solution
s3
Given that, H(s) =
(s + 1) (s 2 + s + 1)
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
Chapter 7 - IIR Filters 7. 22
F2 1 − z−1 I 3
GH T 1+ z−1 JK
∴ H(z) =
F2 1 − z −1 I LF 2
+ 1J MG
1 − z−1 I 2
2 1 − z−1 OP
GH T 1 + z −1 K MNH T 1 + z−1 JK +
T 1 + z−1
+1
PQ
8(1 − z−1)3
(1 + z−1)3
=
LM 2(1 − z −1
)
+1
OP LM 4(1 − z−1)2 2(1 − z−1)
+ +1
OP Put, T = 1
MN 1 + z−1
PQ MN (1 + z−1)2 1 + z −1 PQ
8(1 − z −1)3
(1 + z−1)3
=
LM 2(1 − z ) + (1 + z
−1 −1
) OP LM 4(1 − z−1)2 + 2(1 − z−1) (1 + z −1) + (1 + z−1)2 OP
MN (1 + z ) −1
PQ MN (1 + z−1)2 PQ
8(1 − z −1)3
=
2(1 − z ) + (1 + z ) 4(1 − z −1)2 + 2(1 − z−1) (1+ z −1) + (1 + z−1)2
−1 −1
8(1 − z−1)(1 − 2z −1 + z −2 )
=
−1 −1
2 − 2z + 1+ z 4(1 − 2z −1 + z −2 ) + 2(1 − z −2 ) + (1 + 2z −1 + z −2 )
8(1 − 2z−1 + z −2 − z −1 + 2z −2 − z −3 )
=
3 − z −1 7 − 6z−1 + 3z −2
Alternatively,
0.381 − 11429
. z−1 + 1.1429 z−2 − 0.381z −3
H(z) =
1 − 11905
. z + 0.7143 z−2 − 0.1429 z −3
−1
z −3 0.381z3 − 11429
. z2 + 11429
. z − 0.381
=
z−3 z3 − 11905
. z2 + 0.7143 z − 0.1429
0.381z3 − 11429
. z2 + 11429
. z − 0.381
= 3 2
z − 11905
. z + 0.7143 z − 0.1429
7. 23 Digital Signal Processing
Example 7.7
Convert the analog filter with system function H(s) into digital filter using bilinear transformation.
s + 0.3
H(s) = ; Take T = 0.5
(s + 0.3)2 + 16
Solution
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
2 1 − z −1 2(1 − z −1)
−1 +
0.3 + 0.3
T 1+ z T(1+ z −1)
∴ H(z) = =
F2 1 − z−1 I 2
F 2 1 − z−1 I −1
4(1 − z ) 2
+
1.2(1 − z −1)
+ 16.09
GH T 1 + z−1 JK GH
+ 0.6
T 1 + z−1 JK
+ 16.09 2 −
T (1+ z )1 2
T(1+ z−1)
Alternatively,
A s = 0.2
δs
A s , dB = −14dB
0 ωp ωs ω
F ig 7.9a : G a in vs ω. F ig 7.9b .
F ig 7.9 : M a gn itu d e resp o n se o f d ig ita l IIR lo w p a ss filter.
7. 25 Digital Signal Processing
Case ii : Attenuation at passband and stopband edge frequency
Alternatively, the specification of the filter can be attenuation at passband and stopband edge
frequencies. The attenuation in normal value is inverse of the gain in normal value. The attenuation is usually
expressed in decibels (dB). Since the gain at edge frequencies are less than 1, the attenuation in normal values
will be greater than1, and the dB-attenuation is positive.
1 1
Let , α p = = jω
= Attenuation at passband edge frequency
Ap H (e )
ω =ω p
1 1
αs = = = Attenuation at stopband edge frequency
A s H ( e jω )
ω =ω s
LM 1 OP LM 1 OP
α p,dB = 20 log M P = 20 log M PP = dB- Attenuation at passband edge frequency
MN A p PQ M H ( e jω )
N ω =ω p
Q
LM 1 OP LM 1 OP
α s,dB = 20 log M P = 20 log M jω PP = dB- Attenuation at stopband edge frequency
MN A PQ MN H(e )
s
ω =ω s Q
The attenuation in normal values can be conveted to dB-attenuation or vice-versa as shown below.
a p,dB = 20 log a p Þ a p = 10(ap,dB/20)
a s,dB = 20 log a s Þ a s = 10(as,dB/20)
The attenuation can be converted to gain or vice versa using the following equations.
1 1
Ap = αp =
αp Ap
1 1
As = αs =
αs As
A p ,dB = −α p,dB α p ,dB = − A p ,dB
A s,dB = −α s,dB α s,dB = − A s,dB
Example
Let, a p,dB = +1.9382dB » +2dB
a s,dB = +13.9794dB » +14dB
The dB-attenuation can be converted to normal values as shown below.
a p = 10(ap,dB /20) = 10(1.9382/20) = 1.25
a s = 10(as,dB /20) = 10(13.9794/20) = 5
The attenuation can be converted to gain as shown below.
1 1
Ap = = = 0.8
α p 1.25
1 1
As = = = 0. 2
αs 5
The gain in normal values can be converted to dB-gain as shown below.
Ap,dB = 20 log Ap = 20 log 0.8 = –1.9382 dB
As,dB = 20 log As = 20 log 0.2 = –13.9794 dB
Note : The dB-gain and dB-attenuation are numerically same, but dB-gain is negative and dB-attenuation
is positive.
Chapter 7 - IIR Filters 7. 26
The attenuation response and log-attenuation response of a digital IIR lowpass filter are shown in
fig 7.10.
1
α=
H ( e jω )
αs , dB = 14dB
αs = 5
αp = 1.2 5
δp , d B
αp , d B = 2dB
0 ωp ωs ω 0 ωp ωs ω
F ig 7.10a : A tte n u atio n v s ω. F ig 7.10b : d B -atte n ua tio n v s ω.
F ig 7 .1 0 : A tten u a tio n resp o n se o f d ig ita l IIR lo w p a ss filte r.
Case iii : Ripple at passband and stopband edge frequency
Sometimes, the specifications are given in terms of ripple or tolerance in the passband and stopband.
The ripple can be in normal values or in decibels (dB).
Let, dp = Passband ripple.
ds = Stopband ripple.
dp, dB = 20 log dp = Passband ripple in dB.
ds,dB = 20 log ds = Stopband ripple in dB.
The dB-ripples can be converted to normal values as shown below.
dp = 1 – 10(–dp,dB/20)
ds = 10(–ds,dB/20)
The ripples in normal values can be converted to gain or attenuation as shown below.
1 1
Ap = 1 − δp αp = =
Ap 1 − δp
1 1
As = δs αs = =
As δs
The ripples in dB can be converted to dB-gain or dB-attenuation as shown below. Usually, the ripples
are specified as positive dB.
A p ,dB = −δ p ,dB α p ,dB = δ p ,dB
A s,dB = −δ s,dB α s,dB = δ s,dB
The ripples in dB can be converted to gain or attenuation in normal values as shown below.
( − δ p ,dB / 20 ) ( δ p ,dB / 20)
A p = 10 α p = 10
( − δ s,dB / 20) ( δ s,dB / 20 )
A s = 10 α s = 10
7. 27 Digital Signal Processing
Example
Let, dp,dB = +1.9382 dB » +2 dB
ds,dB = +13.9794 dB » +14 dB
The dB-ripples can be converted to ripples in normal values as shown below.
dp = 1–10(-dp,dB /20) = 1–10(–1.9382/20) = 0.2
ds = 10(-ds,dB /20) = 10(–13.9794/20) = 0.2
The dB ripples can be converted to dB-gain and dB-attenuation as shown below.
Ap,dB = –dp,dB = – 1.9382 dB » –2 dB
As,dB = –ds,dB = – 13.9794 dB » –14 dB
a p,dB = dp,dB = + 1.9382 dB » +2 dB
a s,dB = ds,dB = + 13.9794 dB » +14 dB
The dB-ripples can be converted to gain and attenuation in normal values.
Ap = 10(-dp,dB /20) = 10(–1.9382/20) = 0.8
As = 10(-ds,dB /20) = 10(–13.9794/20) = 0.2
a p = 10(dp,dB /20) = 10(1.9382/20) = 1.25
Since, |H(jW )|2 = H(jW ) H*(jW ) = H(jW ) H(–jW ), the equation (7.35) can be written as shown below.
1 ..... (7.36)
H ( j Ω ) H ( − jΩ ) = 2N
1+ e j
Ω
Ωc
We know that the frequency response H(jW ) of an analog filter is obtained by letting s = jW in the
analog transfer function H(jW ). Hence substituting W by s/j in equation (7.36) gives the system transfer
function.
Chapter 7 - IIR Filters 7. 28
1 1 ..... (7.37)
∴ H (s) H(– s) = =
F s jI
1+ G J
2N
F s I
1+ G
2
N
HΩ K c H j Ω JK
2 2
c
In equation (7.37), when s/W c is replaced by sn (i.e., letting W c = 1 rad/sec) the transfer function is
called normalized transfer function.
1
∴ H (sn ) H(– sn ) = ..... (7.38)
1 + ( – s2n ) N
The transfer function of equation (7.38) will have 2N poles which are given by the roots of the
denominator polynomial. It can be shown that the poles of the transfer function symmetrically lies on a unit
circle in s-plane with angular spacing of p/N. (Refer example 7.8 to example 7.13).
Properties of Butterworth Filters
1. The Butterworth filters are all pole designs. (i.e., the zeros of the filters exist at infinity).
For integer k,
Now, sn will have 2N values which are given by 2N roots of unity. These
e j2pk = cos2pk + jsin2pk
2N roots can be evaluated by taking 1 as ej2pk, where k is an iteger.
= 1 + j0 = 1
1 1 πk
j
∴ sn = 12 N = e j2 πk e j 2N =e N
Therefore, when N is odd, the 2N poles of Butterworth filter are given by the equation,
πk
j
sn = e N ; for k = 1, 2, 3, ..... 2N ......(7.40)
7. 29 Digital Signal Processing
case ii : When N is even
When N is even, (–1)N = 1
Hence the equation (7.39) can be written as,
1
1 + s2N
n =0 ⇒ s2N
n = −1 ⇒ sn = ( −1)
2N
Now, sn will have 2N values which are given by 2N roots of –1. These 2N roots can be evaluated by
taking –1 as ej(2k –1)p, where k is an iteger. For integer k,
1 1 ( 2 k −1) π
e j(2k – 1)p = cos(2k – 1)p + jsin(2k – 1)p
j
e
∴ sn = ( −1) 2 N = e j( 2 k − 1) π j 2N =e 2N
= –1 + j0 = –1
Therefore, when N is even the 2N poles of Butterworth filter are given by,
( 2 k −1) π
j
∴ sn = e 2N ; for k = 1, 2, 3, ..... 2N ......(7.41)
jΩ s-plane
Example 7.8
Unit circle
Determine the poles of lowpass Butterworth filter for
N = 1. Sketch the location of poles on s-plane and hence
determine the normalized transfer function of lowpass filter.
Solution p1 p2
X X σ
jπk −1 1
When N = 1, from equation (7.40), sn = e ; for k = 1, 2
jΩ
Example 7.9 s -plane
U nit circ le
Solution X
p 1∗
X
p ∗2 −j0.707
When N = 2, from equation (7.41),
j
( 2k − 1) π F ig 1 : L o c atio n o f p oles o n s-p lan e ,
sn = e 4 ; for k = 1, 2, 3, 4 w h en N = 2.
( 2− 1) π π
j
4
j
4
π π
When k = 1 ; sn = e =e = 1∠π / 4 = cos + j sin = 0. 707 + j0. 707 = p1
4 4
Chapter 7 - IIR Filters 7. 30
( 4 −1) π 3π
j
4
j
4
3π 3π
When k = 2 ; sn = e =e = 1∠3π / 4 = cos + j sin = −0. 707 + j0. 707 = p2
4 4
(6 −1) π 5π
j j 5π 5π
When k = 3 ; sn = e 4 =e 4 = 1∠5π / 4 = cos + j sin = −0. 707 − j0. 707 = p∗2
4 4
( 8 −1) π 7π
j j 7π 7π
When k = 4 ; sn = e 4 =e 4 = 1∠7π / 4 = cos + j sin = 0. 707 − j0. 707 = p1∗
4 4
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p2 and p2*.
1
∴ Normalized transfer function, H(sn ) =
(sn − p 2 ) (sn − p∗2 )
1
∴ H(sn ) =
(sn + 0.707 − j0.707) (sn + 0.707 + j0.707)
1 (a + b) (a b) = a2 b2
=
(sn + 0.707)2 − (j0.707)2
1
=
(sn + 0.707)2 + 0.7072
1 1
= =
sn2 + 2 × 0.707 sn + 0.707 2 + 0.7072 sn2 + 1414
. sn + 1
−j0.866 X
Solution
X
p ∗2 p 1∗
sn = p3 = 1 Þ sn p 3 = 0 Þ (sn + 1) = 0
1
∴ Normalized transfer function, H(sn ) =
(sn − p3 ) (sn − p2 ) (sn − p∗2 )
1
∴ H(sn ) =
(sn + 1) (sn + 0.5 − j0.866) (sn + 0.5 + j0.866)
1
= (a + b) (a b) = a2 b2
(sn + 1) ((sn + 0.5)2 − (j0.866)2 )
1 1
= =
(sn + 1) ((sn + 0.5)2 + 0.8662 ) (sn + 1) (sn2 + 2 × 0.5 sn + 0.52 + 0.8662 )
1
=
(sn + 1) (sn2 + s + 1)
Example 7.11 p3
jΩ s -plane
p2
U nit circ le
X
p ∗4 X
X
p ∗1
Solution
X
X
p ∗3 p ∗2
When N = 4, from equation (7.41),
F ig 1 : L o c atio n o f p oles o n s-p lan e ,
( 2k − 1) π w h en N = 4.
j
sn = e 8 ; for k = 1, 2, 3, 4, 5, 6, 7, 8
( 2− 1) π π
j
8
j
8
π π
When k = 1 ; sn = e =e = 1∠π / 8 = cos + j sin = 0.924 + j0. 383 = p1
8 8
( 4 − 1) π 3π
j
8
j
8
3π 3π
When k = 2 ; sn = e =e = 1∠3π / 8 = cos + j sin = 0.383 + j0. 924 = p2
8 8
(6 −1) π 5π
j
8
j
8
5π 5π
When k = 3 ; sn = e =e = 1∠5π / 8 = cos + j sin = −0.383 + j0. 924 = p3
8 8
Chapter 7 - IIR Filters 7. 32
( 8 −1) π 7π
j
8
j
8
7π 7π
When k = 4 ; sn = e =e = 1∠7π / 8 = cos + j sin = −0.924 + j0. 383 = p4
8 8
(10 − 1) π 9π
j j 9π 9π
When k = 5 ; sn = e 8 =e 8 = 1∠9π / 8 = cos + j sin = −0.924 − j0. 383 = p∗4
8 8
(12−1)π 11π
j j 11π 11π
When k = 6 ; sn = e 8 =e 8 = 1∠11π / 8 = cos + j sin = −0.383 − j0. 924 = p3∗
8 8
(14 −1) π 13π
j j 13π 13π
When k = 7 ; sn = e 8 =e 8 = 1∠13π / 8 = cos + j sin = 0.383 − j0. 924 = p∗2
8 8
(16 − 1) π 15π
j j 15π 15π
When k = 8 ; sn = e 8 =e 8 = 1∠15π / 8 = cos + j sin = 0.924 − j0. 383 = p1∗
8 8
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p3, p3*, p4 and p4*.
\ sn = p3 = 0.383 + j0.924 Þ sn p3 = 0 Þ (sn + 0.383 j0.924) = 0
1
∴ Normalized transfer function, H(sn ) =
(sn − p3 ) (sn − p3∗ ) (sn − p 4 ) (sn − p∗4 )
1
∴ H(sn ) =
(sn + 0.383 − j0.924) (sn + 0.383 + j0.924) (sn + 0.924 + j0.383) (sn + 0.924 + j0.383)
1
=
d
(sn + 0.383)2 − (j0.924)2 (sn + 0.924)2 − (j0.383)2 id i (a + b) (a b) = a2 b2
1
=
d(s n id
+ 0.383)2 + 0.9242 (sn + 0.924)2 + 0.3832 i
1
=
(sn2 + 2 × 0.383 sn + 0.3832 + 0.9242 ) (sn2 + 2 × 0.924 sn + 0.9242 + 0.3832 )
1
=
(sn2 + 0.766 sn + 1) (sn2 + 1848
. sn + 1)
Example 7.12 p3
jΩ s -plane
p2
U nit circ le
X
X
p ∗4 X p 1∗
X
X
p ∗3 p ∗2
F ig 1 : L o c atio n o f p oles o n s-p lan e ,
w h en N = 5.
7. 33 Digital Signal Processing
Solution πk
j
When N = 5, from equation (7.40), sn = e 5 ; for k = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
π ×1
j π π
When k = 1 ; sn = e 5 = 1∠π / 5 = cos + j sin = 0.809 + j0. 588 = p1
5 5
π×2
j
5
2π 2π
When k = 2 ; sn = e = 1∠2π / 5 = cos + j sin = 0.309 + j0. 951 = p2
5 5
π ×3
j
5
3π 3π
When k = 3 ; sn = e = 1∠3π / 5 = cos + j sin = −0.309 + j0. 951 = p3
5 5
π×4
j
5
4π 4π
When k = 4 ; sn = e = 1∠4π / 5 = cos + j sin = −0.809 + j0. 587 = p4
5 5
π×5
j
5
5π 5π
When k = 5 ; sn = e = 1∠5π / 5 = cos + j sin = −1 + j0 = p5
5 5
π ×6
j 6π 6π
When k = 6 ; sn = e 5 = 1∠6π / 5 = cos + j sin = −0.809 − j0. 587 = p∗4
5 5
π ×7
j 7π 7π
When k = 7 ; sn = e 5 = 1∠7π / 5 = cos + j sin = −0.309 − j0. 951 = p∗3
5 5
π×8
j 8π 8π
When k = 8 ; sn = e 5 = 1∠8π / 5 = cos + j sin = 0.309 − j0. 951 = p∗2
5 5
π×9
j 9π 9π
When k = 9 ; sn = e 5 = 1∠9π / 5 = cos + j sin = 0.809 − j0. 588 = p1∗
5 5
π ×10
j
5
10π 10π
When k = 10 ; sn = e = 1∠10π / 5 = cos + j sin = 1 + j0 = p6
5 5
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p3, p3*, p4, p4* and p5.
\ sn = p3 = 0.309 + j0.951 Þ sn p3 = 0 Þ (sn + 0.309 j0.951) = 0
sn = p5 = 1 Þ sn p5 = 0 Þ (sn + 1) = 0
1
∴ Normalized transfer function, H(sn ) =
(sn − p5 ) (sn − p3 ) (sn − p3∗ ) (sn − p4 ) (sn − p∗4 )
1
∴ H(sn ) =
(sn + 1) (s + 0.309 − j0.951) (sn + 0.309 + j0.951) (sn + 0.809 − j0.587) (sn + 0.809 + j0.587)
1
= (a + b) (a b) = a2 b2
(sn + 1) ((sn + 0.309)2 − (j0.951)2 ) ((sn + 0.809)2 − (j0.587)2 )
1
=
(sn + 1) ((sn + 0.309)2 + 0.9512 ) ((sn + 0.809)2 + 0.5872 )
1
=
(sn + 1) (sn2 + 2 × 0.309 sn + 0.3092 + 0.9512 ) (sn2 + 2 × 0.809 sn + 0.8092 + 0.5872 )
1
=
(sn + 1) (sn2 + 0.618 sn + 1) (sn2 + 1.618 sn + 1)
Chapter 7 - IIR Filters 7. 34
jΩ
Example 7.13 s -plane
p4
p3
Determine the poles of lowpass Butterworth filter
X
U nit circ le
X
for N = 6. Sketch the location of poles on s-plane and p5 p2
X
X
hence determine the normalized transfer function of
lowpass filter.
p6 3 π/1 2
X X p1
π/12
σ
X X p 1∗
p ∗6
X
p ∗5 p ∗2
Solution
X
X
When N = 6, from equation (7.41), p ∗4 p ∗3
j
( 2k −1)π F ig 1 : L o c atio n o f p oles o n s-p lan e ,
sn = e 12 ; for k = 1, 2, 3, ...... 12 w h en N = 6.
( 2−1) π π
j
12
j
12
π π
When k = 1 ; sn = e =e = 1∠π / 12 = cos + j sin = 0.966 + j0. 259 = p1
12 12
( 4 −1) π 3π
j
12
j
12
3π 3π
When k = 2 ; sn = e =e = 1∠3π / 12 = cos + j sin = 0.707 + j0. 707 = p2
12 12
(6 −1) π 5π
j
12
j
12
5π 5π
When k = 3 ; sn = e =e = 1∠5π / 12 = cos + j sin = 0.259 + j0. 966 = p3
12 12
(8 −1) π 7π
j
12
j
12
7π 7π
When k = 4 ; sn = e =e = 1∠7π / 12 = cos + j sin = −0.259 + j0. 966 = p4
12 12
(10 −1) π 9π
j
12
j
12
9π 9π
When k = 5 ; sn = e =e = 1∠9π / 12 = cos + j sin = −0.707 + j0. 707 = p5
12 12
(12−1) π 11π
j
12
j
12
11π 11π
When k = 6 ; sn = e =e = 1∠11π / 12 = cos + j sin = −0.966 + j0. 259 = p6
12 12
(14 −1) π 13π
j j 13π 13π
When k = 7 ; sn = e 12 =e 12 = 1∠13π / 12 = cos + j sin = −0.966 − j0. 259 = p∗6
12 12
(16 −1) π 15π
j j 15π 15π
When k = 8 ; sn = e 12 =e 12 = 1∠15π / 12 = cos + j sin = −0.707 − j0. 707 = p∗5
12 12
(18 −1) π 17 π
j j 17π 17π
When k = 9 ; sn = e 12 =e 12 = 1∠17π / 12 = cos + j sin = −0.259 − j0. 966 = p∗4
12 12
( 20 −1)π 19π
j j 19π 19π
When k = 10 ; sn = e 12 =e 12 = 1∠19π / 12 = cos + j sin = 0.259 − j0. 966 = p∗3
12 12
( 22− 1) π 21π
j j 21π 21π
When k = 11 ; sn = e 12 =e 12 = 1∠21π / 12 = cos + j sin = 0.707 − j0. 707 = p∗2
12 12
( 24 − 1) π 23π
j j 23π 23π
When k = 12 ; sn = e 12 =e 12 = 1∠23π / 12 = cos + j sin = 0.966 − j0. 259 = p1∗
12 12
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p4, p4*, p5, p5*, p6 and p6*.
1
∴ Normalized transfer function, H(sn ) =
(sn − p4 ) (sn − p∗4 ) (sn − p5 ) (sn − p∗5 ) (sn − p6 ) (sn − p∗6 )
1
∴ H(sn ) =
(sn + 0.259 − j0.966) (sn + 0.259 + j0.966) (sn + 0.707 − j0.707) (sn + 0. 707 + j0.707)
(sn + 0.966 − j0.259) (sn + 0.966 + j0.259)
1
=
d(s n + 0.259)2 − ( j0.966)2 i d(s
n + 0.707)2 − (j0.707)2 i d(s n + 0.966)2 − (j0.259)2 i
1
=
d i d
(sn + 0.259)2 + 0.9662 + (sn + 0.707)2 + 0.7072 i d(sn + 0.966)2 + 0.2592 i
1
∴ H(sn ) =
(sn2 + 2 × 0.259 sn + 0.2592 + 0.9662 ) (sn2 + 2 × 0.707 sn + 0.7072 + 0.7072 )
(sn2 + 2 × 0.966 sn + 0.9662 + 0.2592 )
1
=
(sn2 + 0.518 sn + 1) (sn2 + 1.414 sn + 1) (sn2 + 1.932 sn + 1)
When N is odd,
N−1
2
1 1 .....(7.43)
H(sn ) =
sn + 1 ∏ s2n + b k sn + 1
k=1
1
1 sn + 1
1
2 s2n + 1414
. sn + 1
1
3 (sn + 1) (s2n + sn + 1)
1
4 (s2n + 0.765sn + 1) (s2n + 1848
. sn + 1)
1
5 (sn + 1) ( s2n + 0.618 sn + 1) (s2n + 1618
. sn + 1)
1
6 (s2n + 1932
. sn + 1) (s2n + 1414
. sn + 1) (s2n + 0.518 sn + 1)
N = 10
N=2
N=4
ΩC Ω
³ F ig 7 .11 : M a g n itu d e resp o n se o f b u tterw o rth
lo w p a ss filter fo r va rio u s va lu es o f N .
7.6.5 Order of the Lowpass Butterworth Filter
In Butterworth filters the frequency response of the filter depends on the order, N. Hence the order N
has to be estimated to satisfy the given specifications.
Usually the specifications of the filter are given in terms of gain at a passband and stopband frequency.
Let, Ap = Gain or Magnitude at a passband frequency W p.
As = Gain or Magnitude at a stopband frequency W s.
Calculate a parameter N1 using equation (7.47) and correct it to nearest integer. Choose N such that N ³ N1.
log
LM e1/A 2s − 1
j OP
N1 = 1
MN e
1/A 2p − 1
j PQ ..... (7.47)
2
log
FG IJ
Ωs
H K
Ωp
Sometimes, the specifications of the filter are given in terms of dB-attenuation at a passband and
stopband frequency.
Let, a p, dB = dB-attenuation at a passband frequency W p.
a s, dB = dB-attenuation at a stopband frequency W s.
Calculate a parameter N1 using equation (7.48) and correct it to nearest integer. Choose N such that N ³ N1.
LMF 0.1α s,dB I
1
2
OP
10 −1
log MG J PP
MNH 10 0.1α p ,dB
− 1K
Q ..... (7.48)
N1 = Ωs
log Ωp
The equation (7.49) is preferable to equation (7.50), because the cutoff frequency W c calculated using
equation (7.49) ensures smallest amplitude distortion (or ripple) in the passband.
For bilinear transformation,
2 ωp 2 ω
Ωp = tan ; Ωs = tan s
T 2 T 2
For impulse invariant transformation,
ωp ωs
Ωp = ; Ωs =
T T
where T is the sampling time.
Case ii : When the specifications are a p,dB, a s,dB, w p, w s
Ωs
Cutoff frequency, Ωc = 1
0.1α s,dB .....(7.51)
e
10 −1 j 2N
Alternatively ,
Ωp
Cutoff frequency, Ωc = 1
0.1α p ,dB .....(7.52)
e
10 −1 j 2N
log
LM e1/ A 2s − 1
j OP
N1 = 1
MN e
1/ A 2p − 1
j PQ .....(7.57)
2 F I
log G J Ωs
H K Ωp
Choose N such that, N ³ N1. Usually N is chosen as nearest integer just greater than N1.
3. Determine the normalized transfer function, H(sn) of the analog lowpass filter.
When N is even,
N
2
1 .....(7.58)
H ( sn ) = ∏ s2n + b k sn + 1
k=1
When N is odd,
N−1
2
1 1
H(sn ) =
sn + 1 ∏ s2n + b k sn + 1
.....(7.59)
k=1
Ωs .....(7.61)
Cutoff frequency, Ωc = 1
1/ A 2s − 1 2 N
e j
5. Determine the unnormalized analog transfer function H(s) of the lowpass filter.
H ( s) = H (sn ) s s
n=
Ωc
When the order N is even, H(s) is obtained by letting sn ® s/W c in equation (7.58).
N N
2
1 2
Ωc2
∴ H (s) = ∏ s2n + b k sn + 1
= ∏= s2 + b k Ωcs + Ωc2 .....(7.62)
k=1 k 1
s
sn =
Ωc
When the order N is odd, H(s) is obtained by letting sn ® s/W c in equation (7.59).
N−1 N−1
1 2
1 Ωc 2
Ωc2
∴ H(s) =
sn + 1 ∏ s2n + b k sn + 1
=
s + Ωc ∏= s2 + b k Ωcs + Ωc2 .....(7.63)
k=1 k 1
s
sn =
Ωc
6. Determine the transfer function of digital filter, H(z). Using the chosen transformation in step-1,
transform H(s) to H(z). When impulse invariant transformation is employed, if T < 1, then multiply
H(z) by T to normalize the magnitude.
7. Realize the digital filter transfer function H(z) by a suitable structure.
8. Verify the design by sketching the frequency response H(ejw ).
H (e jω ) = H ( z)
z = e jω
Note : The basic filter design is lowpass filter design. The highpass, bandpass or bandstop filters are
obtained from lowpass filter design by frequency transformation.
where Î is attenuation constant and CN(W /W c) is the Chebyshev polynomial of the first kind of degree N.
1
L1 O 2
The attenuation constant, ∈ = M − 1P ..... (7.65)
MN A 2
p PQ
where, Ap is the gain or magnitude at passband edge frequency W p
For small values of N the Chebyshev polynomial is given by,
R|cos( N cos x)−1
; for |x| ≤ 1
C N ( x) = S|cosh( N cosh x) −1 ..... (7.66)
T ; for |x| > 1
For large values of N the Chebyshev polynomial is given by the recurrence relation,
CN(x) = 2xCN – 1(x) – CN – 2 (x) ..... (7.67)
with initial values C0(x) = 1 and C1(x) = x
The transfer function of the analog system can be obtained from equation (7.64) by substituting
W by s/j.
1
∴ H ( s) H (– s) =
1 + ∈2 C 2N
FG s j IJ ..... (7.68)
HΩ K c
1. The magnitude |H( jW )| oscillates between 1 and 1 1+ ∈2 within the passband and so the filter
is called equiripple in the passband.
5. With large values of N, the transition from passband to stopband becomes more sharp and
approaches ideal characteristics.
Chapter 7 - IIR Filters 7. 42
7.7.1 Transfer Function of Analog Chebyshev Lowpass Filter
For a stable and causal filter the poles should lie on the left half of s-plane. Hence the desired filter
transfer function is obtained by selecting N number of left half poles. When N is even all the poles are complex
and exist as conjugate pair. When N is odd, one of the pole is real and all other poles are complex and exist as
conjugate pair. Therefore the transfer function of Chebyshev filters will be a product of second-order factors.
Normalized Chebyshev Lowpass Filter Transfer Function
Let, N be the order of the filter.
Let, H(sn) be the normalized Chebyshev lowpass filter transfer function.
When N is even,
N
2
Bk
H ( sn ) = ∏ s2n + b k sn + c k
..... (7.70)
k=1
When N is odd,
N−1
2
B0 Bk
H ( sn ) =
s + c0 ∏ s2n + b k sn + c k
......(7.71)
k=1
where, b k = 2 y N sin e ( 2 k − 1) π
2N
j ..... (7.72)
c k = y 2N + cos2 e ( 2 k − 1)π
2N
j ..... (7.73)
c0 = yN ..... (7.74)
R 1 1 U|
1 |LMF OP L OP −
1 N 1 N
S 1 IK 2 1
− MFH
1 IK 2 1
V|
2 |MH
yN = + 1 + + 1 +
∈2 ∈ PQ MN ∈2 ∈ PQ ..... (7.75)
|TN |W
For even values of N the parameter Bk are evaluated using the equation (7.76)
1
H ( sn ) s = 1
n = 0 ..... (7.76)
(1 + ∈2 ) 2
For odd values of N the parameter Bk are evaluated using the equation (7.77)
H ( sn ) s = 1 ..... (7.77)
n = 0
While evaluating Bk using equation (7.76) or (7.77), it is normal practice to take, B0 = B1 = B2 = ..... = Bk.
Unnormalized Chebyshev Lowpass Filter Transfer Function
The unnormalized transfer function is obtained by replacing sn by s/W c in the normalized transfer
function, where W c is the cutoff frequency of the lowpass filter.
Let, N be the order of the filter.
7. 43 Digital Signal Processing
Let, H(s) be the normalized Chebyshev lowpass filter transfer function.
When N is even, H(s) is obtained by letting sn ® s/W c in equation (7.70).
N N
2 2
Bk Bk Ω2c
∴ H (s) = ∏ s2 + b k sn + c k
= ∏ s + b k Ωc s + c k Ω2c
2
k=1 n k=1 ..... (7.78)
s
sn =
Ωc
LMF e j I
1
1/ A 2s − 1 2
OP
cosh −1
MMGH e J
1/ A p j − 1 K
2 PP
N1 = N Q .....(7.80)
cosh −1
FG IJ
Ωs
H K
Ωp
Sometimes, the specifications of the filter are given in terms of dB-attenuation at a passband and
stopband frequency.
Let, ap,dB = dB-attenuation at a passband frequency, W p.
Let, a s,dB = dB-attenuation at a stopband frequency, W s.
Calculate a parameter N1 using equation (7.81) and correct it to nearest integer. Choose N such
that N ³ N1.
LMF 0.1α s,dB I
1
2
OP
−1
cosh −1
MMGH 1010 0.1α p ,dB J
− 1K
PP
N1 = N Q
cosh −1
FΩ I .....(7.81)
GH Ω JK
s
p
Chapter 7 - IIR Filters 7. 44
7.7.3 Cutoff Frequency of Analog Lowpass Chebyshev Filter
The IIR filters are designed to satisfy a prescribed gain or attenuation at a passband and stopband
frequency. But practically the cutoff frequency, W c is used to decide the useful frequency range of the filter.
Therefore, in Chebyshev filter design the passband and stopband specifications are used to estimate the
order, N of the filter and Nth order normalized Chebyshev lowpass filter is designed. Then the normalized
lowpass filter is unnormalized using the cutoff frequency.
In Chebyshev filters the passband edge frequency, W p is considered as cutoff frequency, W c and this
cutoff is not equal to 3 dB cutoff frequency, W 3dB.
The 3 dB cutoff frequency of Chebyshev filter is given by, Ω3dB = Ωc cosh e 1
N
cosh −1 ∈1 j ..... (7.82)
7.7.4 Frequency Response of Analog Chebyshev Lowpass Filter
The frequency response of Chebyshev |H (j Ω)|
N =5
filter depends on the order N as shown in fig 1.0
7.12. It can be observed that the approximated
magnitude response approaches the ideal 1
N =4
N =5
Ωc Ω
F ig 7 .1 2 : M a g n itu d e resp o n se o f C h eb y sh e v typ e -1
lo w p a ss filter fo r va rio u s va lu e o f N .
|H (j Ω)| |H (j Ω)|
1 1
1 1
Ap = Ap =
2 2
1+ε 1+ε
As As
Ωp Ωs Ω Ωp Ωs Ω
F ig a : C h eb yshev type-1 , w h en N is odd. F ig b : C h eb yshev type-1 , w h en N is even.
|H (j Ω)| |H (j Ω)|
1 1
1 1
Ap = Ap =
2 2
1+ε 1+ε
As As
Ωp Ωs Ω Ωp Ωs Ω
F ig c : C h eb yshev type-2 , w h en N is odd. F ig d : C h eb yshev type-2 , w h en N is even.
F ig 7 .1 3 : M a g n itu d e respo n se o f a n a lo g C h e b ysh ev filters.
7. 45 Digital Signal Processing
7.7.5 Design Procedure for Lowpass Digital Chebyshev IIR Filter
Let, w p = Passband edge digital frequency in rad/sample.
w s = Stopband edge digital frequency in rad/sample.
1
T= = Sampling time in seconds.
Fs
where, Fs = sampling frequency in Hz.
Ap = Gain at a passband frequency w p.
As = Gain at a stopband frequency w s.
Note-1: If passband dB-attenuation, a p,dB and stopband dB-attenuation, a s,dB are specified, then convert
them to Ap and As as shown below.
Ap = 10(ap,dB/20) ap,dB and a s,dB are positive dB
As = 10(as,dB/20)
Bd d n a b s s a p t eshnt i sdeemii ft ie2:
mc oeSp s s t t a - Bd d n a b s s a p f o d a e , n o i t aun e
ap,dB. Remember that ap,dB equal to dp,dB. (refer section 7.5).
3: If T is not specified then take T = 1 second.
1. Choose either bilinear or impulse invariant transformation, and determine the specifications of
equivalent analog filter. The gain or attenuation of analog filter is same as digital filter. The band edge
frequencies are calculated using the following equations.
Let, Wp = Passband edge analog frequency corresponding to w p.
Ws = Stopband edge analog frequency corresponding to w s.
For bilinear transformation,
Note : If either T or Fs is not
2 ωp .....(7.83)
Ωp = tan specified then take T= 1 sec.
T 2
1
2 ω .....(7.84) If Fs is specified, then T =
Ωs = tan s Fs
T 2
For impulse invariant transformation,
ωp .....(7.85)
Ωp =
T
ω .....(7.86)
Ωs = s
T
2. Decide the order N of the filter. In order to estimate the order N, calculate a parameter N1 using the
following equation. Choose N such that N ³ N1. Usually N is chosen as nearest integer just greater than N1.
LMF e j I
1
1/ A 2s − 1 2
OP
cosh −1
MMGH e J
1/ A p j − 1 K
2 PP
N1 = N Q .....(7.87)
cosh −1
FG IJ
Ωs
H K
Ωp
Chapter 7 - IIR Filters 7. 46
3. Determine the normalized transfer function H(sn), of the filter.
When the order N is even,
N
2
Bk
H ( sn ) = ∏ 2
k = 1 sn + b k sn + c k
.....(7.88)
When the order N is odd,
N−1
2
B0 Bk
H ( s) =
s + c0 ∏ s2 + bk s + ck
.....(7.89)
k=1
where, b k = 2 y N sin e ( 2 k − 1) π
2N
j .....(7.90)
c k = y 2N + cos2 e ( 2 k − 1)π
2N
j .....(7.91)
c0 = yN .....(7.92)
R|L 1 OP
1
N LMF 1 OP −
1
N
U|
yN =
1
2
S|MMFH 1
∈2
+1 IK 2
+
1
∈ PQ –
MNH
1
∈2
+1 IK 2
+
1
∈ PQ V| .....(7.93)
|TN |W
1
∈ = FH 1/ A 2p IK −1 2 .....(7.94)
H ( s) = H ( sn ) s s
n=
Ωc
5. Determine the transfer function of digital filter, H(z). Using the chosen transformation,
in step-1transform H(s) to H(z). When impulse invariant transformation is employed, if T < 1, then
multiply H(z) by T to normalize the magnitude.
H ( e jω ) = H ( z ) z = e jω
Note : The highpass, bandpass and bandstop filters are obtained from lowpass filter design by frequency
transformation.
The highpass or bandpass or bandstop filters are designed by designing a lowpass filter and then
using frequency transformation, the transfer function of the desired filter is obtained. The frequency
transformation can be carried in s-domain (analog) or in z-domain (digital).
Ω0
where, Ω0 = Ωp Ωs and Q =
Ωs − Ωp
To design a filter, first design a normalized lowpass filter from the given specifications, and determine
the analog normalized transfer function (either Butterworth or Chebyshev transfer function) of the lowpass
filter. Then choose the transformation from the table 7.2 and determine the analog transfer function of the
desired filter.
Chapter 7 - IIR Filters 7. 48
Table 7.2 : Summary of Transformation for Analog Filter
Ωc
Highpass sn →
s
Q (s2 + Ω02 )
Bandpass sn →
Ω0s
Ω 0s
Bandstop sn →
Q (s2 + Ω02 )
From the analog transfer function H(s) the digital transfer function H(z) is obtained by either bilinear
transformation or impulse invariant transformation.
7.8.2 Digital Frequency Transformation
Table 7.3 : Summary of Transformation for Digital Filter
sin
FG ω ′ + ω IJ
c c
−1
z − α α =
H 2 K
Lowpass z −1 → F ω ′ − ω IJ
1 − αz −1 sinG c c
H 2 K
cos
FG ω ′ + ω IJ
c c
z −1 →
z −1 + α α =
H 2 K
Highpass F ω ′ − ω IJ
1 + αz −1 cosG c c
H 2 K
cosG
F ω + ω IJ
s p
α =
H 2 K = cos ω
z −2 −
2 αk − 1
k + 1
z +
k − 1
k + 1 cosG
F ω − ω IJ
s p
0
Bandpass
z −1
→ −
k − 1 −2 2 αk − 1 H 2 K
z − z + 1
k + 1 k + 1
k = cosG
F ω − ω I tan ω
s p
H 2 JK 2
c
cosG
F ω + ω IJ
s p
2αk −1 k − 1 α =
H 2 K = cos ω
−1
z −2 −
k + 1
z +
k + 1 cosG
F ω − ω IJ
s p
0
Bandstop
z →
k − 1 −2 2αk −1 H 2 K
z − z + 1
k + 1 k + 1
k = cosG
F ω − ω I tan ω ′
s p
H 2 JK 2
c
7. 49 Digital Signal Processing
Using digital frequency transformation the following filters can be designed from the lowpass digital
filter with cutoff frequency, w c' .
1. Lowpass filter with cutoff frequency, w c.
2. Highpass filter with cutoff frequency w c.
3. Bandpass filter with center frequency w 0 and lower and upper cutoff frequency w 1 and w 2.
4. Bandstop filter with center frequency w 0 and lower and upper cutoff frequency w 1 and w 2.
To design a filter, first design a lowpass digital filter from the given specifications, (either Butterworth
or Chebyshev) and determine H(z). Then choose the transformation from table 7.3 and determine the digital
transfer function of the desired filter.
Example 7.14
The normalized transfer function of an analog filter is given by,
1
H(sn ) =
sn2 + 1.4142sn + 1
Convert the analog filter to a digital filter with a cutoff frequency of 0.4p, using bilinear transformation.
Solution
To preserve the magnitude response the prewarping of analog filter has to be performed. For this
the analog cutoff frequency is determined using bilinear transformation and the analog transfer function is
unnormalized using this analog cutoff frequency. Then the analog transfer function is converted to digital
filter transfer function using bilinear transformation.
Given that, digital cutoff frequency, w c = 0.4p rad/sample. Let T = 1 second.
In Bilinear transformation,
2 0.4π 0.4π
Analog cutoff frequency, Ωc = tan = 2 tan = 1.4531 rad / second
T 2 2
Normalized analog transfer function,
1
H(sn ) =
sn2 + 1.4142sn + 1
∴ Unnormalized U|
analog filter
|V H(s) = 1
|| FsI 2
F s I +1
transfer function W GH Ω JK
c
+1.4142 GH Ω JK
c
Ω 2c
=
s 2 +14142
. Ω cs + Ω 2c
1.45312
=
s + (1.4142 × 1.4531)s + 1.45312
2
2.1115
= 2
s + 2 .055s + 2 .1115
2 1 z 1
The H(z) is obtained by substituting, s = in H(s)
T 1+ z 1
Chapter 7 - IIR Filters 7. 50
2.1115
∴ H(z) =
4(1 − z−1)2 + 4.11(1 − z−1) (1+ z −1) + 2.1115(1+ z −1)2
(1 + z−1)2
2.1115(1 + z −1)2
= −1
4(1 − 2z + z ) + 4.11( 1 − z−2 ) + 2.1115(1+ 2z−1 + z−2 )
−2
Alternatively,
0.2066 + 0.4131z −1 + 0.2066z −2
H(z) =
1 − 0.3695z −1 + 0.1958 z −2
z −2 (0.2066 z2 + 0.4131z + 0.2066) 0.2066 z2 + 0.4131z + 0.2066
= −2 2
=
z (z − 0.3695z + 0.1958) z 2 − 0.3695z + 0.1958
Example 7.15
Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.1second, to
satisfy the following specifications.
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 4.436 dB
Stopband attenuation ³ 20 dB
Passband edge frequency = 0.35p rad/sample
Stopband edge frequency = 0.7p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p, dB / 20 j = 10b −4.436 / 20g = 0.6
A s = 10
e − α s ,dB / 20j = 10b −20 / 20g = 0.1
7. 51 Digital Signal Processing
Solution
Specifications of digital IIR lowpass filter
2
ωp
Passband edge analog frequency, Ωp = T
tan
2
Using equation (7.53).
2 0.35π
= tan = 12.256 rad / second
0.1 2
2ωs
Stopband edge analog frequency, Ω s = T
tan Using equation (7.54).
2
2 0.7π
= tan
0.1 2
= 39.2522 rad / second
Order of the filter
LM FH 1/ A 2 IK − 1O LM e 1/ 0.12 j − 1OP
log
MN FH
s
2 I − 1P
P log
N1 =
1 1/ Ap K Q=1 MN e 1/ 0.6 2 j − 1PQ
Using equation (7.57).
2 Ω
log s 2 log 39.2522
Ωp 12.256
log
99 LM OP
=
1 1. 7778 N
= 17267
. Q
2 log 39.2522
12 .256
Let, order, N = 2.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk sn + 1
Using equation (7.58).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
Chapter 7 - IIR Filters 7. 52
N 2
Here, N = 2, ∴ k= 2
=
2
=1
1
b g
∴ H sn =
sn2 + b1 sn + 1
Calculate sin q using
When k = 1 ; bk = b1 = 2 sin LM b g OP = 1.4142
2−1 π
calculator in radian mode.
N Q2× 2
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
H(s) = H sn b g s
=
sn2 + 1.4142 sn + 1 s s
sn = n = Ω
Ωc c
1 1
∴ H(s) = = 2
s2 s s + 1.4142 Ω cs + Ω 2c
+ 1.4142 +1
Ω 2c Ωc Ω 2c
Ω 2c 12.44392
= = 2
s + 1.4142 Ω cs + Ω c s + 1.4142 × 12.4439 s + 12.44392
2 2
154.8506
=
s 2 + 17.5982 s + 154.8506
154.8506
H(z) = H(s) =
s 2 + 17.5982 s + 154.8506
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
154.8506
=
F 2 1− z I −1 2 F 2 1 − z I + 154.8506
−1
GH T 1 + z JK −1 + 17.5982 GH T 1 + z JK −1
154.8506
=
−1 2
e j
4 1− z
+
e
35.1964 1 − z−1 j + 154.8506
−1 2
T e1 + z j
2
e
T 1+ z j
−1
154.8506
=
−1 2 2
e
4 1− z j e je j
+ 35.1964 T 1 − z−1 1 + z −1 + 154.8506 T 2 1 + z−1 e j
2
e
T 2 1 + z −1 j
7. 53 Digital Signal Processing
Alternatively,
=
d
z−2 0.1708 z2 + 0.3415 z + 0.1708 i = 0.1708 z 2
+ 0.3415 z + 0.1708
z −2
dz 2
− 0.5407 z + 0.2237 i 2
z − 0.5407 z + 0.2237
X (z ) 0 .1708 X ( z ) Y (z )
0.17 08 + +
−1 −1
z z
−1 −1
z z
−2
z −2 X (z) 0.1708 z X ( z) −0 .2237 z −2 Y (z ) −2
z Y (z)
0.17 08 −0.2237
−1
z
0 .5407 z −1W ( z ) 0.3415 z −1W ( z)
z −1W ( z )
+ 0.54 07 0.34 15 +
−1
z
−0.2237 z −2 W ( z ) 0 .1708 z −2 W ( z )
z −2 W ( z)
−0.2237 0.17 08
=
c h
0.1708 + 0.3415 cos ω − j sin ω + 0.1708 cos 2ω − j sin 2ω c h e− jθ = cos θ − j sin θ
c h
1 − 0.5407 cos ω − j sin ω + 0.2237 cos 2ω − j sin 2ω c h
c0.1708 + 0.3415 cos ω + 0.1708 cos 2ωh + j c−0.3415 sin ω − 0.1708 sin 2ωh
=
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
H de i c0.1708 + 0.3415 cos ω + 0.1708 cos 2ω h + j c −0.3415 sin ω − 0.1708 sin 2ω h
N
jω
Let , Hde i =
jω
=
H de iD
jω
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
where, HN(ejw ) = (0.1708 + 0.3415cosw + 0.1708 cos2w) + j( 0.3415sinw - 0.1708sin2w)
HD(ejw ) = (1 0.5407cosw + 0.2237cos2w) + j(0.5407sinw - 0.2237sin2w)
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of lowpass filter is
sketched as shown in fig 3.
|H (e jω)|
1.0
0.9
0.8
0.707
0.7 ωc = 2 tan −1 GH Ω2 T JK
c
0.6
= 2 tan −1
FG 12.4439 × 0.1 IJ
0.5 H 2 K
1.1132
0.4 = 1.1132 = × π
π
0.2
0.1
ω
0 π 2π 4π
3π 5 π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc = 0.35 π ( π/2 ) ( π)
Ap = 10
e −δ p,dB / 20 j = 10b −4.436 / 20g = 0.6
As = 10
e − α s ,dB / 20j = 10b −20 / 20g = 0.1
Solution
Specifications of digital IIR highpass filter
Passband edge digital frequency, w p = 0.7p rad/sample
Stopband edge digital frequency, w s = 0.35p rad/sample
Gain in normal value at passband edge, Ap = 0.6
Gain in normal value at stopband edge, As = 0.1
Sampling time, T = 0.1second
The highpass filter is designed via lowpass filter using frequency transformation technique. Hence the
given specifications of IIR highpass filter are converted to corresponding specification of IIR lowpass filter.
Specifications of digital IIR lowpass filter
The specification of lowpass filter is obtained by taking passband edge of highpass as stopband edge of
lowpass and stopband edge of highpass as passband edge of lowpass. The gain of passband and stopband
remain same.
\ Passband edge digital frequency, w p = 0.35p rad/sample
\ Stopband edge digital frequency, w s = 0.7p rad/sample
Gain in normal value at passband edge, Ap = 0.6
Gain in normal value at stopband edge, As = 0.1
2 ωs
Stopband edge analog frequency, Ω s = T
tan Using equation (7.54).
2
2 0.7π
= tan
0.1 2
= 39.2522 rad / second
Order of the filter
LM e 1/ A 2 j − 1O LM e 1/ 0.12 j − 1O
IK − 1PP
s
log
MN FH 2
log
MN e 1/ 0.6 2
P
j − 1PQ
N1 =
1 1/ Ap
Q =
1 Using equation (7.57).
2 Ω
log s 2 log 39.2522
Ωp 12.256
log
LM 99 OP
=
1 N1. 7778 Q = 17267
.
2 log 39.2522
12.256
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk sn + 1
Using equation (7.58).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N 2
Here, N = 2, ∴ k= 2
=
2
=1
1
∴ H sn =b g sn2 + b1 sn + 1
1
∴ H sn =b g sn2 + 1.4142 sn + 1
The highpass filter with cutoff frequency, W c can be obtained from normalized lowpass filter using the
transformation, sn ® Wc/s.
Chapter 7 - IIR Filters 7. 58
∴ H(s) = H sn b g Ωc
sn =
s
1
∴ H(s) = H sn b g Ω
=
sn2 + 1.4142 sn + 1 Ωc
sn = c sn =
s s
1 1 s2
= = = 2
Ω 2c Ωc Ω 2c .
+ 14142 Ω cs + s 2
s + 1.4142 Ω cs + Ω 2c
2 + 1.4142 +1 2
s s s
s2 s2
= 2 2
= 2
s + 1.4142 × 12 .4439 s + 12.4439 s + 17.5982 s + 154.8506
Digital IIR highpass filter transfer function, H(z)
For bilinear transformation,
s2
H(z) = H(s) = 2
s + 17.5982 s + 154.8506
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
F 2 1− z I −1 2
GH T 1 + z JK −1
=
F 2 1 − z I + 17.5982 2 F 1 − z I + 154.8506
−1 2 −1
GH T 1 + z JK −1
T GH 1 + z JK
2
T −1
−1 2
4 e1 − z j
−1 2
T e1 + z j 2
=
−1 2
4 e1 − z j 35.1964 e1 − z j −1
+ + 154.8506
−1 2 T e1 + z j −1
T e1 + z j
2
−1 2
4 e1 − z j
−1 2
T e1 + z j 2
=
−1 2 −1 2
4 e1 − z j + 35.1964 Te1 − z je1 + z j + 154.8506 T e1 + z j −1 −1 2
−1 2
T e1 + z j 2
−1 2
4 e1 − z j (a + b) (a b) = a b 2 2
= 2 2 2
−1 2 (a + b) = a + 2ab + b −1 2
4 e1 − z j + 35.1964 Te1 − z je1 + z j + 154.8506 T e1 + z j −1 −1 2
2 2 2
(a − b) = a − 2ab − b
4 e1 − 2z + z j −1 −2
= Put, T = 0.1
4 e1 − 2z + z j + 35.1964 × 0.1e1 − z j + 154.8506 × 0.1 e1 + 2z + z j
−1 −2 −2 2 −1 −2
7. 59 Digital Signal Processing
=
e
4 1 − 2z−1 + z−2 j
e
4 1 − 2z −1
+z −2
j + 3.5196 e1 − z j + 1.5485e1 + 2z
−2 −1
+ z −2 j
4 − 8z−1 + 4z−2
=
9.0681 − 4.903 z−1 + 2.0289 z−2
4 8 4
− z−1 + z−2
= 9.0681 9.0681 9.0681
4.903 −1 2.0289 −2
1− z + z
9.0681 9.0681
0.4411 − 0.8822 z−1 + 0.4411z−2
=
1 − 0.5407 z−1 + 0.2237 z −2
Alternatively,
0.4411 − 0.8822 z −1 + 0.4411z −2
H(z) =
1 − 0.5407 z −1 + 0.2237 z−2
=
d
z −2 0.4411z2 − 0.8822 z + 0.4411 i
d
z−2 z2 − 0.5407 z + 0.2237 i
0.4411z2 − 0.8822 z + 0.4411
=
z2 − 0.5407 z + 0.2237
X (z ) 0 . 4411 X (z) Y (z )
0.44 11 + +
−1 −1
z z
−1 −1
z −1X (z) −0. 8822 z X (z ) 0. 5407 z Y (z) −1
z Y (z)
−0.8822
+ + 0.54 07
−1 −1
z z
−2 −2
0. 4411 z X (z ) −0. 2237 z Y (z) −2
z −2 X (z) z Y (z)
0.44 11 −0.2237
F ig 1 : D irec t fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR hig h p ass filter.
Direct form-II structure of digital IIR highpass filter
Y(z)
= 0.4411 − 0.8822 z−1 + 0.4411z −2 .....(3)
W(z)
On cross multiplying equation (2) we get,
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
−1
z
−1 −1
0 .5407 z W ( z ) −0. 8822 z W (z)
z −1W ( z )
+ 0.54 07 −0.8822
+
−1
z
−2 −2
−0.2237 z W ( z ) 0. 4411 z W (z )
z −2 W ( z)
−0.2237 0.44 11
F ig 2 : D irec t form -II stru cture of 2 n d o rder dig ita l IIR hig h pa ss filter.
=
c h
0.4411 − 0.8822 cos ω − j sin ω + 0.4411 cos 2ω − j sin 2ω c h
c c h h
1 − 0.5407 cos ω − j sin ω + 0.2237 cos 2ω − j sin 2ω
=
c h c h
0.4411 − 0.8822 cos ω + 0.4411cos 2ω + j 0.8822 sin ω − 0.4411sin 2ω
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
H de i c0.4411 − 0.8822 cos ω + 0.4411cos 2ω h + j c0.8822 sin ω − 0.4411sin 2ω h
N
jω
Let , Hde i =
jω
=
H de i
D
jω
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
where, HN(ejw ) = (0.4411 0.8822cosw + 0.4411cos2w) + j(0.8822sinw - 0.4411sin2w )
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of highpass filter is
sketched as shown in fig 3.
|H (e jω)|
1.0
0.9
0.8
0.707 Ωc T
0.7 ω c = 2 tan −1
2
0.6
= 2 tan −1
FG 12.4439 × 0 .1IJ
0.5 H 2 K
1.1132
0.4 = 1.1132 = × π
π
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc = 0.35 π ( π/2 ) ( π)
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 3.01 dB
Stopband attenuation ³ 13.97 dB
Passband edge frequency = 0.45p rad/sample
Stopband edge frequency = 0.65p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20j = 10b −3.01/ 20g = 0. 707
As = 10
e −α s,dB / 20j = 10b −13.97 / 20g = 0.2
Solution
Specifications of digital IIR lowpass filter
2
ωp
Passband edge analog frequency, Ωp = T
tan Using equation (7.53).
2
2 0.45π
= tan
0.5 2
= 3.4163 rad / second
2 ωs
Stopband edge analog frequency, Ωs = T
tan Using equation (7.54).
2
2 0.65π
= tan
0.5 2
= 6.5274 rad / second
7. 63 Digital Signal Processing
Order of the filter
LM FH 1/ A 2
s
IK − 1O
P LM FH 1/ 0.22 IK − 1 O
P
log log
1 MN FH 1/ A 2
s
IK − 1P
Q=1 MN FH1/ 0.707 2 IK − 1P
Q Using equation (7.57).
N1 =
2 Ω 2 6.5274
log s log
Ωp 3.4163
log
24 LM OP
=
1 .
10006 N
= 2.4538 Q
2 log 6.5274
3.4163
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1 ∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N − 1 3 − 1
Here, N = 3, ∴ k= 2
=
2
=1
1
∴ H sn =b g (sn + 1) (sn2 + b1 sn + 1)
1
∴ H sn =b g (sn + 1) (sn2 + sn + 1)
1 1
= =
sn3 + sn2 + sn + sn2 + sn + 1 sn3 + 2 sn2 + 2 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
sn3 + 2 sn2 + 2 sn + 1 s s
sn = n =
Ωc Ωc
Chapter 7 - IIR Filters 7. 64
1 1
∴ H(s) = =
FG s IJ 3
F s IJ
+ 2G
2
+2
s
+1
s3 + 2 Ω c s 2 + 2 Ω 2c s + Ω3c
HΩ K c HΩ K c Ωc Ω3c
Ω3c
=
s + 2 Ωc s + 2 Ω 2c s + Ω3c
3 2
3.84333
=
s + 2 × 3.8433 s + 2 × 3.84332 s + 3.84333
3 2
56.7692
=
s3 + 7.6866 s 2 + 29.5419s + 56 .7692
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
56.7692
H(z) = H(s) =
s3 + 7.6866 s 2 + 29.5419 s + 56.7692
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
56.7692
=
F 2 1− z I −1 3 F 2 1− z I −1 2 F 2 1 − z I + 56.7692
−1
GH T 1 + z JK −1
+ 7.6866 G
H T 1 + z JK −1
+ 29.5419 GH T 1 + z JK
−1
56.7692
=
8(1 − z−1)3 + 7.6866 × 4T (1 − z−1)2 (1 + z−1) + 29.5419 × 2T 2 (1 − z−1)(1 + z−1)2
Put,
+ 56.7692 × T3 (1 + z−1)3
3 −1 3 T = 0.5
T (1 + z )
56.7692 × 0.53 (1 + z−1)3
=
8 (1 − z−1)3 + 7.6866 × 4 × 0.5 (1 − z−1)2 (1 + z−1) + 29.5419 × 2 × 0.52 (1 − z−1)(1 + z−1)2
7.0962 (1 + z−1)3 (a + b) (a b) = a2 b2
=
8 (1 − z−1)3 + 15.3732 (1 − z−1)2 (1 + z−1) (a + b)3 = a3 + 3a 2b + 3ab 2 + b3
+ 14.771(1 − z−1)(1 + z−1)2 + 7.0962 (1 + z−1)3 (a − b)3 = a3 − 3a 2b + 3ab2 − b3
7.0962 + 212886
. z−1 + 21.2886 z−2 + 7.0962z−3
= −1 −2
8 (1 − 3 z + 3z − z ) + 15.3732 (1 − z−1 − z−2 + z−3 ) + 14.771(1 + z−1 − z−2 − z−3 )
−3
7.0962 + 212886
. z−1 + 21.2886 z−2 + 7.0962z−3
=
45.2404 − 3.3136 z−1 + 15.1444 z−2 − 0.3016 z −3
7.0962 212886
. 212886
. 7.0962 −3
+ z −1 + z −2 + z
= 45 .2404 45. 2404 45. 2404 45.2404
3.3136 −1 15.1444 −2 0.3016 −3
1− z + z − z
45.2404 45.2404 45.2404
0.1569 + 0.4706 z −1 + 0.4706 z−2 + 0.1569 z−3
=
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3
7. 65 Digital Signal Processing
Alternatively,
=
d
z−3 0.1569 z3 + 0.4706 z2 + 0.4706 z + 0.1569 i
z −3
dz 3 2
− 0.0732 z + 0.3348 z − 0.0067 i
3 2
0.1569 z + 0.4706 z + 0.4706 z + 0.1569
=
z3 − 0.0732 z2 + 0.3348 z − 0.0067
0.1569X (z)
X (z) 0.15 69 + + Y (z)
−1 −1
z z
−1 −1
−1 0.4706z X (z) 0.0732z Y (z) −1
z X (z) z Y (z)
0.4706 + + 0.07 32
−1 −1
z z
−2 0.4706z −2 X (z ) −0.3348z −2 Y (z ) −2
z X (z) z Y (z )
0.47 06 + + −0.3348
−1 −1
z z
−3 0.1569z −3 X (z ) 0.0067z −3 Y (z )
z X (z ) −3
0.1569 0.00 67 z Y (z )
W (z) 0.1569W (z )
X (z ) + 0.15 69
+ Y (z )
−1
z
−1 −1
0.0732z W (z ) z W (z ) 0.4706z −1W (z )
+ 0.07 32 0.4706
+
−1
z
−0.3348 z −2 W (z) −2 0.4706z −2 W (z)
z W (z)
+ −0.3348 0.4706
+
−1
z
0.0067z −3 W (z) −3 0.1569z −3 W (z )
z W (z )
0.00 67 0.1569
=
c h c
0.1569 + 0.4706 cos ω − j sin ω + 0.4706 cos 2ω − j sin 2ω + 0.1569 cos 3ω − j sin 3ω h c h
c h c
1 − 0.0732 cos ω − j sin ω + 0.3348 cos 2ω − j sin 2ω − 0.0067 cos 3ω − j sin 3ω h c h
(0.1569 + 0.4706 cos ω + 0.4706 cos 2ω + 0.1569 cos 3ω )
+ j ( −0.4706 sin ω − 0.4706 sin 2ω − 0.1569 sin 3ω )
=
c
1 − 0.0732 cos ω + 0.3348 cos 2ω − 0.0067 cos 3ω h
c
+ j 0.0732 sin ω − 0.3348 sin 2ω + 0.0067 sin 3ω h
(0.1569 + 0.4706 cos ω + 0.4706 cos 2ω + 0.1569 cos 3ω )
Let , Hee j =
jω e j=
HN e jω + j ( −0.4706 sin ω − 0.4706 sin 2ω − 0.1569 sin 3ω )
H ee j
D
jω (1 − 0.0732 cos ω + 0.3348 cos 2ω − 0.0067 cos 3ω )
+ j (0.0732 sin ω − 0.3348 sin 2ω + 0.0067 sin 3ω )
0.9
0.8
0.707
0.7
Ωc T
0.6 ω c = 2 tan −1
2
0.5
= 2 tan −1
FG 3.8433 × 0.5 IJ
H 2 K
0.4
1.5306
= 1.5306 = × π
π
0.3
= 0.49 π rad / sam ple
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7 π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc= 0.49 π ( π/2 ) ( π)
F ig 3 : F req u ency resp o nse of 3 rd ord er d ig ita l B u tterw o rth IIR h ig hp a ss filter.
Chapter 7 - IIR Filters 7. 68
Example 7.18
Design a Butterworth digital IIR highpass filter using bilinear transformation by taking T = 0.5second, to
satisfy the following specifications.
0.707 £ |H(ejw )| £ 1.0 ; for 0.65p £ w £ p
jw
|H(e )| £ 0.2 ; for 0 £ w £ 0.45p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 3.01dB
Stopband attenuation ³ 13.97dB
Passband edge frequency = 0.65p rad/sample
Stopband edge frequency = 0.45p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p, dB / 20 j = 10b −3.01/ 20 g = 0.707
A s = 10
e − α s ,dB / 20j = 10b −13.97 / 20 g = 0.2
Solution
Specifications of digital IIR highpass filter
Passband edge digital frequency, w p = 0.65p rad/sample
Stopband edge digital frequency, w s = 0.45p rad/sample
Gain in normal value at passband edge, Ap = 0.707
Gain in normal value at stopband edge, As = 0.2
Sampling time, T = 0.5 second.
The highpass filter is designed via lowpass filter using frequency transformation technique. Hence the
given specifications of IIR highpass filter are converted to corresponding specification of IIR lowpass filter.
Specifications of digital IIR lowpass filter
The specification of lowpass filter is obtained by taking passband edge of highpass as stopband edge of
lowpass and stopband edge of highpass as passband edge of lowpass. The gain of passband and stopband
remain same.
\ Passband edge digital frequency, w p = 0.45p rad/sample
Stopband edge digital frequency, w s = 0.65p rad/sample
Gain in normal value at passband edge, Ap = 0.707
Gain in normal value at stopband edge, As = 0.2
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.707 Gain is same in analog
and digital filter.
Gain in normal value at stopband edge, As = 0.2
For bilinear transformation,
2 ωp Using equation (7.53).
Passband edge analog frequency, Ωp = tan
T 2
2 0.45π
= tan = 3.4163 rad / second
0.5 2
7. 69 Digital Signal Processing
2 ωs
Stopband edge analog frequency, Ω s = T
tan Using equation (7.54).
2
2 0.65π
= tan = 6.5274 rad / second
0.5 2
Order of the filter
LM c h − 1OP
1/ A 2
s Lc 1/ 0.22 h − 1 OP
1
log
MN d i − 1PQ 1 log MMN c
2
1/ Ap 1/ 0.707 2 h − 1PQ Using equation (7.57).
N1 = =
2 Ωs 2 6.5274
log log
Ωp 3.4163
log
LM 24 OP
=
1 N1. 0006 Q = 2.4538
2 6.5274
log
3.4163
For odd N,
N− 1
2
1 1
b g
H sn =
sn + 1 ∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N − 1 3 − 1
Here, N = 3, ∴ k= 2
=
2
=1
b g bs + 1g ds 1+ b s + 1i
∴ H sn = 2
n n 1 n
When k = 1 ; b = b = 2 sin LM b g OP = 1
2−1 π Calculate sin q using
k
N Q 1 2× 3 calculator in radian mode.
1 1 1
∴ Hbs g = n = =
b g e + s + 1j s
s + 1 s n
2
n n
3
n + sn2 + sn + sn2 + sn + 1 sn3 + 2 sn2 + 2 sn + 1
The highpass filter with cutoff frequency, W c can be obtained from normalized lowpass filter using the
transformation, sn ® Wc/s.
∴ H(s) = H sn b g Ωc
sn =
s
1
∴ H(s) = H sn b g Ω
=
sn3 + 2sn2 + 2sn + 1 Ωc
sn = c sn =
s s
1 1
= =
FG Ω IJ
c
3
+2
FG Ω IJ c
2
+2
Ωc
+1
Ω3c + 2 Ω 2cs + 2 Ω c s 2 + s3
HsK HsK s s3
s3 s3
= = 3
s + 2 Ω cs + 2 Ωc s + Ω c s + 2 × 3.8433 s + 2 × 3.84332 s + 3.84333
3 2 2 3 2
s3
= 3 2
s + 7.6866s + 29.5419s + 56.7692
Digital IIR highpass filter transfer function, H(z)
For bilinear transformation,
s3
H(z) = H(s) = 3 2
s + 7.6866s + 29.5419s + 56.7692
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
F 2 1− z I −1 3
GH T 1 + z JK −1
=
F 2 1− z −1 3 I + 7.6866 F 2 1 − z I + 29.5419 F 2 1 − z I + 56.7692
−1 2 −1
Put, T = 0.5
GH T 1 + z −1 JK GH T 1 + z JK GH T 1 + z JK
−1 −1
8 (1 − z−1)3
T3(1 + z−1)3 (a + b) (a b) = a2 b2
=
8 (1 − z −1)3 + 7.6866 × 4T(1 − z−1)2 (1+ z−1) (a + b)3 = a3 + 3a 2b + 3ab2 + b3
2 −1 −1 2 3 −1 3
+29.5419 × 2T (1 − z )(1 + z ) + 56.7692 × T (1 + z ) (a − b)3 = a3 − 3a 2b + 3ab2 − b3
T3(1 + z−1)3
8 (1 − z−1)3
=
8 (1 − z ) + 7.6866 × 4 × 0.5 (1 − z−1)2 (1+ z −1)
−1 3
8 (1 − z−1)3
=
8 (1 − z−1)3 + 15.3732 (1 − z−1)2 (1+ z−1) + 14.771(1 − z−1) (1+ z −1)2 + 7.0962 (1 + z−1)3
8 (1 − 3z −1 + 3z−2 − z −3 )
= −1 −2
8(1 − 3z + 3z − z ) + 15.3732 (1 − z−1)(1 − z−2 ) + 14.771(1 − z−2 )(1 + z−1)
−3
=
e
z−3 0.1768 z3 − 0.5305 z2 + 0.5305 z − 0.1768 j
z −3
ez
3 2
− 0.0732 z + 0.3348 z − 0.0067 j
3 2
0.1768 z − 0.5305 z + 0.5305 z − 0.1768
=
z3 − 0.0732 z2 + 0.3348 z − 0.0067
−1 −1
z z
−1 −1
−1 −0.5305z X (z) 0.0732z Y (z ) −1
z X (z) z Y (z)
−0.5305 + + 0.07 32
−1 −1
z z
−2 −2
−2 0.5305z X (z ) −0.3348z Y (z ) −2
z X (z) z Y (z )
0.53 05 + + −0.3348
−1 −1
z −3 z
−3
−3 −0.1768z X (z) 0.0067z Y (z ) −3
z X (z ) −0.1768 0.00 67 z Y (z )
W(z) 1
where, = .....(2)
X(z) 1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3
Y(z)
= 0.1768 − 0.5305 z−1 + 0.5305 z−2 − 0.1768 z−3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) 0.0732z1W(z) + 0.3348z2W(z) 0.0067z3W(z) = X(z)
\ W(z) = X(z) + 0.0732z1W(z) 0.3348z2W(z) + 0.0067z3W(z) .....(4)
Chapter 7 - IIR Filters 7. 72
On cross multiplying equation (3) we get,
Y(z) = 0.1768W(z) 0.5305z1W(z) + 0.5305z2W(z) 0.1768z3W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z) 0.1768W (z )
X (z ) + 0.17 68
+ Y (z )
−1
z
−1 −1 −1
0.0732z W (z ) z W (z ) −0.5305z W (z)
+ 0.07 32 −0.5305
+
−1
z
−2 −2
−0.3348z W (z ) −2 0.5305z W (z )
z W (z)
+ −0.3348 0.53 05 +
−1
z
−3
0.0067z W (z ) −3 −3
−0.1768z W (z)
z W (z )
0.00 67 −0.1768
− jω − j2ω − j3ω
0.1768 − 0.5305 e + 0.5305 e − 0.1768 e
=
1 − 0.0732 e− jω + 0.3348 e− j2ω − 0.0067 e− j3ω
=
c h c
0.1768 − 0.5305 cos ω − j sin ω + 0.5305 cos 2ω − j sin 2ω − 0.1768 cos 3ω − j sin 3ω h c h
c h c
1 − 0.0732 cos ω − j sin ω + 0.3348 cos 2ω − j sin 2ω − 0.0067 cos 3ω − j sin 3ω h c h
c0.1768 − 0.5305 cos ω + 0.5305 cos 2ω − 0.1768 cos 3ωh
+ j c0.5305 sin ω − 0.5305 sin 2ω + 0.1768 sin 3ω h
=
c1 − 0.0732 cos ω + 0.3348 cos 2ω − 0.0067 cos 3ω h
+ j c0.0732 sin ω − 0.3348 sin 2ω + 0.0067 sin 3ω h
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of highpass filter is
sketched as shown in fig 3.
Note : Verify the result with MATLAB program 7.4.
7. 73 Digital Signal Processing
Table 1: H(ejww ) and |H(ejww )| for various values of w
w HN(ejww ) HD(ejww ) H(ejww ) |H(ejww )|
0× π
16
0 + j0 1.2549 + j0 0 + j0 0
1×π
16
0.0004 j0.0013 1.232 j0.1101 0.0002 j0.0011 0.0011
2×π
16
0.0059 j0.0088 1.1665 j0.2025 0.0036 j0.0082 0.0089
3×π
16
0.0268 j0.022 1.0686 j0.2621 0.0189 j0.0252 0.0315
4× π
16
0.0733 j0.0304 0.953 j0.2783 0.0623 j0.0501 0.0799
5×π
16
0.1475 j0.0145 0.8378 j0.2471 0.1573 j0.0637 0.1697
6× π
16
0.238 + j0.0473 0.7414 + j0.1717 0.3187 + j0.100 0.3189
7× π
16
0.3186 + j0.1703 0.6801 + j0.0619 0.4872 + j0.2061 0.5290
8× π
16
0.3537 + j0.3537 0.6652 + j0.0665 0.4738 + j0.5791 0.7482
9× π
16
0.3080 + j0.5763 0.7012 + j0.1943 0.1964 + j0.8763 0.8981
10 × π
16
0.1586 + j0.7976 0.7851 + j0.3018 0.1642 + j0.9528 0.9668
11× π
16
0.0951 + j0.9657 0.906 + j0.3715 0.4640 + j0.8756 0.9910
12× π
16
0.4269 + j1.0306 1.047 + j0.3913 0.6806 + j0.7300 0.9980
13× π
16
0.7864 + j1.9583 1.1877 + j0.3566 0.8296 + j0.5578 0.9997
14 × π
16
1.1097 + j0.7415 1.3069 + j0.2709 0.9269 + j0.3752 1.0000
15× π
16
1.3342 + j0.4047 1.3867 + j0.1461 0.9820 + j0.1884 0.9999
16 × π
16
1.4146 + j0 1.4147 + j0 1.9999 + j0 0.9999
|H (e jω)|
1.0
0.9
0.8
0.707
0.7
Ωc T
0.6 ω c = 2 tan −1
2
0.5
= 2 tan −1
FG 3.8433 × 0.5 IJ
H 2 K
0.4
1.5306
= 1.5306 = × π
π
0.3
= 0.49 π rad / sam ple
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7 π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc= 0.49 π ( π/2 ) ( π)
F ig 3 : F req u ency resp o nse of 3 rd ord er d ig ita l B u tterw o rth IIR h ig hp a ss filter.
Chapter 7 - IIR Filters 7. 74
Example 7.19
Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking
T = 1second, to satisfy the following specifications.
0.707 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.3p
jw
|H(e )| £ 0.2 ; for 0.75p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 3.01dB
Stopband attenuation ³ 13.97dB
Passband edge frequency = 0.3p rad/sample
Stopband edge frequency = 0.75p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e − δp1,dB / 20j = 10b −3.01/ 20 g = 0.707
A s = 10
e −α s , dB / 20j = 10b −13.97 / 20 g = 0.2
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.3p rad/sample
Stopband edge digital frequency, w s = 0.75p rad/sample
Gain in normal value at passband edge, Ap = 0.707
Gain in normal value at stopband edge, As = 0.2
Sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.707 Gain is same in analog
and digital filter.
Gain in normal value at stopband edge, As = 0.2
For impulse invariant transformation,
ωp 0.3π Using equation (7.55).
Passband edge analog frequency, Ωp = = = 0.9425π rad / second
T 1
ωs 0.75π
Stopband edge analog frequency, Ω s = = = 2.3562 rad / second Using equation (7.56).
T 1
Order of the filter
LM FH1/ A 2
s
IK − 1O
P LM FH 1/ 0.22 IK − 1 O
P LM 24 OP
log log
1 MN FH 2
1/ Ap IK − 1P
Q=1 MN FH
1/ 0.707 2 IK − 1P
Q 1
log
N1. 0006 Q = 17339
N1 = = . Using equation (7.57).
2 Ω 2 0.9425 2 log 0.9425
log s log
Ωp 2.3562 2.3562
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk sn + 1
Using equation (7.58).
k =1
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
sn2 + 1.4142 sn + 1 s s
sn = n = Ω
Ωc c
1 1 Ω2c
= 2
= 2 2
= 2
s s s + 1.4142 Ω cs + Ω c s + 1.4142 Ω cs + Ω2c
+ 1.4142 +1
Ω 2c Ωc Ωc2
2
.
10645 1.1332
= 2 2
= 2
s + 1.4142 × 10645
. s + 10645
. s + 1.5054 s + 1.1332
To convert the analog transfer function to digital transfer function, the above equation can be modified
as follows.
1.1332
∴ H(s) =
s 2 + 0.7527 × 2s + 0.75272 − 0.75272 + 1.1332
1.1332 (s + a)2 = s 2 + 2as + a 2
=
bs + 0.7527g 2
+ 0.5666
2a = 15054
. ⇒ a=
1.5054
= 0.7527
1.1332 0.7527 2
= ×
0.7527 2
b
s + 0.7527 + 0.75272 g
0.7527
= 1.5055 ×
bs + 0.7527g 2
+ 0.75272
Chapter 7 - IIR Filters 7. 76
Digital IIR lowpass filter transfer function, H(z)
b
→
c
e − aT sin bT z−1 h Using equation (7.19).
bs + a g 2
+b 2 is transformed to
1− 2e − aT
ccos bTh z −1
+e −2aT
z −2
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
∴ H(z) = 1.5055 ×
e−0.7527 ×1
csin 0.7527 × 1h z −1
Put, T = 1
1 − 2 e−0.7527 ×1
(cos 0.7527 × 1) z−1 + e−2 × 0.7527 × 1 −2
z
0.3220 z −1 0.4848 z−1
= 1.5055 × −1 −2
=
1 − 0.6877 z + 0.2219 z 1 − 0.6877 z−1 + 0.2219 z −2
Alternatively,
0.4848 z −1 0.4848 z −1
H(z) = −1 −2
= −2 2
1 − 0.6877 z + 0.2219 z z (z − 0.6877 z + 0.2219)
0.4848 z
=
z2 − 0.6877 z + 0.2219
Y(z) 0.4848 z −1
Let , H(z) = =
X(z) 1 − 0.6877 z −1 + 0.2219 z −2
X (z) + Y (z)
−1 −1
z z
−1 −1 −1
z X (z ) 0.4848 z X (z) 0.6877z Y (z ) −1
z Y (z )
0.48 48
+ 0.68 77
−1
z
−2
−0.2219z Y (z ) z −2 Y (z )
−0.2219
W(z) 1
where, = .....(2)
X(z) 1 − 0.6877 z + 0.2219 z−2
−1
Y(z)
= 0.4848 z−1 .....(3)
W(z)
7. 77 Digital Signal Processing
On cross multiplying equation (2) we get,
Using equation (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z)
X (z ) + Y (z )
−1
z
−1 −1
0.6877z W (z ) −1 0.4848z W (z)
z W (z)
+ 0.68 77 0.48 48
−1
z
−2
−0.2219z W (z) −2
z W (z )
−0.2219
0.4848 z−1
e j
H e jω = H(z)
z = e jω
=
1 − 0.6877 z−1 + 0.2219 z−2 z = e jω
0.4848 e − jω
=
1 − 0.6877 e− jω + 0.2219 e− j2ω
=
c
0.4848 cos ω − j sin ω h
c h
1 − 0.6877 cos ω − j sin ω + 0.2219 cos 2ω − j sin 2ω c h
0.4848 cosω − j0.4848 sin ω
=
c1 − 0.6877 cos ω + 0.2219 cos 2ωh + j c0.6877 sin ω − 0.2219 sin 2ωh
e j
Let , H e jω =
e j=
HN ejω 0.4848 cosω − j0.4848 sin ω
e j
HD ejω c1 − 0.6877 cos ω + 0.2219 cos 2ω h + j c0.6877 sin ω − 0.2219 sin 2ω h
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of lowpass filter is
sketched as shown in fig 3.
0.9
0.8
0.707
0.7
ωc = Ωc T = 1.0645 × 1
0.6
1.0645
= ×π
π
0.5
= 0.34 π rad / sam ple
0.4
0.3
0.2
0.1
ω
0 π 2π 4π 5π
3π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Ωc = 0.3 4 π ( π/2 ) ( π)
F ig 3 : F req u en c y resp o n se o f 2 n d ord e r d igital B u tterw o rth IIR low p a ss filte r.
7. 79 Digital Signal Processing
Example 7.20
Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 0.9151dB
Stopband attenuation ³ 11.2133dB
Passband edge frequency = 0.35p rad/sample
Stopband edge frequency = 0.7p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20j = 10b −0.9151/ 20g = 0.9
As = 10
e −α s ,dB / 20j = 10b −11.2133/ 20g = 0.275
Solution
Specifications of digital IIR lowpass filter
LM FH1/ A s2 IK − 1O
P LM FH
1/ 0.2752 IK − 1O
P
1
log
MN FH IK P
2 −1
1/ A p
Q=1
log
MN FH 1/ 0.92 IK −1 PQ 1 log LMN120.2346
.2231O
PQ = 2.8518 Using equation (7.57).
N= =
2 Ωs 2 2.1991 2 2.1991
log log log
Ωp .
10996 10996
.
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1
∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N − 1 3 − 1
Here, N = 3, ∴ k= 2
=
2
=1
1 1
b g
∴ H sn =
sn + 1 sn2 + b1 sn + 1
When k = 1; bk = b1 = 2 sin LM b g OP = 1
2−1 π Calculate sin q using
N Q2× 3 calculator in radian mode.
1 1
b g
∴ H sn = =
(sn + 1) (sn2 + sn + 1) sn3 + 2sn2 + 2sn + 1
H(s) = H sn b g s
sn =
Ωc
Ωs 2.1991
Ωc = 1
= 1
= 14489
. rad / sec
e1/ A 2
s j−1 2N F 1 I 6
H 0.2752
−1
K
1 Using equation (7.61).
∴ H(s) = H sn b g s
=
(sn + 1) (sn2 + sn + 1) s
sn = sn =
Ωc Ωc
1 1
=
F s + 1I F s 2
s I = Fs+Ω I Fs 2
+ s Ω c + Ω 2c I
GH Ω JK GH Ω
c
2
c
+
Ωc
+1 JK GH Ω JK GH c
c
Ω c2 JK
Ω3c 1.44893
= 2
=
( s + Ω c ) (s + s Ω c + Ω 2c ) 2
(s + 1.4489) (s + s × 14489
. + 14489
. 2
)
3.0417
= .....(1)
(s + 14489
. ) (s 2 + 1.4489 s + 2.0993)
3.0417
=
s3 + 2.8978s 2 + 4.1986s + 3.0417
To convert the analog transfer function to digital transfer function using impulse invariant transformation,
the equation (1) can be simplified as follows.
3.0417
H(s) =
(s + 14489
. ) (s2 + 1.4489 s + 2.0993)
By partial fraction expansion H(s) can be expressed as
3.0417 A Bs + C
= = + .....(2)
(s + 14489
. ) (s2 + 1.4489 s + 2.0993) s + 1.4489 s 2 + 14489
. s + 2.0993
7. 81 Digital Signal Processing
On cross multiplying the equation (2) we get
3.0417 = A(s2 + 1.4489s + 2.0993) + (Bs + C) (s + 1.4489)
3.0417 = As2 + 1.4489As + 2.0993A + Bs2 + 1.4489Bs + Cs + 1.4489C .....(3)
A Bs + C
∴ H(s) = +
s + 1.4489 s 2 + 1.4489s + 2.0993 (s + a)2 = s 2 + 2as + a 2
1.4489 −1.4489s 14489
.
= 2a = 14489
. ⇒ a= = 0.7245
s + 14489
. s 2 + 14489
. s + 2.0993 2
1.4489 1.4489s
= −
s + 14489
. 2
(s + 2 × 0.7245s + 0.72452 ) + FH 2.0993 − 0.72452 IK 2
1.4489 s + 0.7245 .
12548
= .
− 14489 + 0.8366 ......(4)
.
s + 14489 (s + 0.7245)2 + 12548
. 2
(s + 0.7245)2 + 12548
. 2
Using the above transformation, the H(s) of equation (4) can be transformed to H(z) as shown below.
14489
. 1 − e −0.7245 (cos 1.2548)z −1
∴ H(z) = −1.4489 −1
− 1.4489 −0.7245
Put, T = 1.
1− e z 1 − 2e (cos 1.2548)z −1 + e −2× 0.7245z −2
X (z) + Y (z)
−1 −1
z z
−1 −1
−1
z X (z) 0.5073z X (z) 0.536z Y (z) −1
0.50 73 + + 0 .5 3 6 z Y (z)
−1 −1
z z
−2 −2
−2 0.1985z X (z ) −0 .3055z Y (z) −2
z X (z) z Y (z )
0.19 85
+ −0.3055
−1
−3
z
0.0051z Y (z ) −3
0.00 51 z Y (z )
Y(z)
= 0.5073 z−1 + 0.1985 z−2 .....(7)
W(z)
7. 83 Digital Signal Processing
On cross multiplying equation (6) we get,
W(z) 0.536z1W(z) + 0.3055z2 W(z) 0.0551 z3W(z) = X(z)
W(z) = X(z) + 0.536z1W(z) 0.3055z2 W(z) + 0.0551z3W(z) .....(8)
On cross multiplying equation (7) we get,
Y(z) = 0.5073z1W(z) + 0.1985z2W(z) .....(9)
Using equations (8) and (9), the direct form-II structure is drawn as shown in fig 2.
X (z) W (z) Y (z )
+
−1
z
0.536 z −1W ( z) 0.5073 z −1W ( z )
z −1W ( z)
+ 0 .5 3 6 0.50 73 +
−1
z
−0 .3055 z −2 W ( z )
z −2 W ( z ) 0 .1985 z −2 W ( z )
+ −0.3055 0.19 85
−1
z
−3
0 .0551 z W ( z)
z −3 W ( z)
0.05 51
e j
Let , H e jω =
e j = (0.5073 cos + 0.1985 cos ω) + j(−0.5073 sin ω − 0.1985 sin 2ω)
HN ejω
H ee j
D
jω (1 − 0.536 cos ω + 0.3055 cos 2ω − 0.0551cos 3ω )
+ j(0.536 sin ω − 0.3055 sin 2ω + 0.0551sin 3ω )
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of lowpass filter is
sketched as shown in fig 3.
|H (e jω)|
1.0
0.9
0.8
0.707
0.7
0.5 1.4489
= × π = 0.46 π
π
0.4
0.3
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Ωc = 0.46 π ( π/2 ) ( π)
F ig 3 : F req u en c y resp o nse of 3 rd ord er d ig ita l B u tterw o rth IIR lo w p a ss filte r.
7. 85 Digital Signal Processing
Example 7.21
Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
Alternatively,
Passband ripple £ 1.9 dB
Stopband attenuation ³ 13.97dB
Passband edge frequency = 0.2p rad/sample
Stopband edge frequency = 0.32p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e − δp,dB / 20j = 10b −1.9 / 20 g = 0.8
As = 10
e − α s ,dB / 20j = 10b −13.97 / 20g = 0.2
Solution
Specifications of digital IIR lowpass filter
LM FH1/ A 2 IK − 1O
P LM FH 1/ 0.22 IK − 1O
P
log
MN FH
s
1/ A p IK − 1 P
2
log
MN FH
1/ 0.8 2 IK − 1P log
LM 24 OP
N=
1 Q=1 Q= 1 N
0.5625 Q
= 3.9928 Using equation (7.57).
2 Ωs 2 .
10053 .
2 log 10053
log log
Ωp 0.6283 0.6283
For even N,
N
2
1 Using equation (7.58).
b g ∏
H sn =
sn2 + bk sn + 1
k =1
where, bk = 2 sin LM b 2k −1 π g OP
N 2N Q Using equation (7.60).
Here, N = 4, ∴ k = 1, 2
1 1
∴ H sn = b g ×
sn2 + b1 sn + 1 sn2 + b2 sn + 1
= 2 sin LM b g O = 1.8478
2× 2−1 π
When k = 2 ; bk = b2
N QP
2 ×4
1
b g
H sn =
(sn2 + 0.7654 sn + 1) (sn2 + 18478
. sn + 1)
1
=
sn4 + 2.6132 sn2 + 3.4143 sn2 + 2.6132 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H snb g =
(sn2 + 0.7654 sn + 1)(sn2 + 18478
. sn + 1)
Using equation (7.61).
sn = s sn = s
Ωc Ωc
1 1
=
Fs 2
s IF s 2
s I = Fs 2
+ 0.7654 Ω c s + Ω c2 IFs 2
.
+ 18478 Ωc s + Ω 2c I
GH Ω 2
c
+ 0.7654
Ωc
+1 JK GH Ω 2
c
+ 1.8478
Ωc
+1 JK GH Ω 2c JK GH Ωc2 JK
Ω 4c 0.67574
= 2
=
(s + 0.7654 Ω cs + Ω c )(s 2
2
.
+ 18478 Ωc s + Ω 2c ) (s + 0.7654 × 0.6757 s + 0.67572 )
2
(s 2 + 18478
. × 0.6757 s + 0.67572 )
0.2085
= ....(1)
(s + 0.5172 s + 0.4566)(s2 + 12486
2
. s + 0.4566)
0.2085
= 4
s + 12486
. s3 + 0.4566 s 2 + 0.5172 s3 + 0.6458 s 2 + 0.2362 s + 0.4566 s 2 + 0.5701s + 0.2085
0.2085
=
s 4 + 1.7658 s3 + 1559
. s 2 + 0.8063 s + 0.2085
7. 87 Digital Signal Processing
To convert the analog transfer function to digital transfer function using impulse invariant transformation,
the equation (1) is simplified as follows.
−b ± b2 − 4ac −b ± b2 − 4ac
= =
2a 2a
−0.5172 ± 0.51722 − 4 × 1 × 0.4566 −1.2486 ± 12486
. 2
− 4 × 1 × 0.4566
= =
2 2
−0.5172 ± j1.2486 −1.2486 ± j0.5170
= = −0.2586 ± j0.6243 = = −0.6243 ± j0.2586
2 2
= (s − ( −0.2586 + j0.6243)) (s − ( −0.2586 − j0.6243)) = (s − ( −0.6243 + j0.2586)) (s − ( −0.6243 − j0.2586))
= (s + 0.2586 − j0.6243)(s + 0.2586 + j0.6243) = (s + 0.6243 − j0.2586)(s + 0.6243 + j0.2586)
0.2085
H(s) =
(s 2 + 0.5172 s + 0.4566)(s 2 + 1.2486 s + 0.4566)
0.2085
=
(s + 0.2586 − j0.6243) (s + 0.2586 + j0.6243)
(s + 0.6243 − j0.2586) (s + 0.6243 + j0.2586)
A2 A∗2
+ +
(s + 0.6243 − j0.2586) (s + 0.6243 + j0.2586)
where, A1, A1*, A2, A2* are residues
0.2085 × (s + 0.2586 − j0.6243)
A1 =
(s + 0.2586 − j0.6243)(s + 0.2586 + j0.6243) (s + 0.6243 − j0.2586) (s + 0.6243 + j0.2586) s = − 0.2586 + j0.6243
0.2085
=
(−0.2586 + j0.6243 + 0.2586 + j0.6243) ( −0.2586 + j0.6243 + 0.6243 − j0.2586)
( −0.2586 + j0.6243 + 0.6243 + j0.2586)
0.2085
= = −0.3121 + j0.1293
j12486
. (0.3657 + j0.3657) (0.3657 + j0.8829)
0.2085
=
(−0.6243 + j0.2586 + 0.2586 − j0.6243) ( −0.6243 + j0.2586 + 0.2586 + j0.6243)
(−0.6243 + j0.2586 + 0.6243 + j0.2586)
0.2085
= = 0.3121 − j0.7536
(−0.3657 − j0.3657) ( −0.3657 + j0.8829) j0.5172
Ai Ai
→ Using equation (7.17).
s + pi 1 − e − p i T z −1
Using the above transformation, the H(s) can be transformed to H(z) as shown below,
=
e j
−0.6242 + 0.3121e−0.2586 e j0.6243 + e− j0.6243 z−1 + j0.1293 e−0.2586 e j0.6243 − e− j0.6243 z−1 e j
1 − e−0.2586 (e j0.6243 + e− j0.6243 )z−1 + e−0.5172 z−2
+
e j
0.6242 − 0.3121e−0.6243 ej0.2586 + e− j0.2586 z−1 − j0.7536 e−0.6243 e j0.2586 − e− j0.2586 z−1 e j
−0.6243 j0.2586 − j0.2586 −1 −1.2486 −2
1− e (e +e )z +e z
=
− 0.6242 + 0.3121e b2 cos 0.6243g z + j0.1293 e c2 j sin 0.6243h z
−0.2586 −1 −0.2586 −1
1− e b2 cos 0.6243gz + e z
−0.2586 −1 −0.5172 −2
+
0.6242 − 0.3121e b2 cos 0.2586g z − j0.7536 e c2 j sin 0.2586h z
−0.6243 −1 −0.6243 −1
1− e b2 cos 0.2586gz + e z
−0.6243 −1 −1.2486 −2
e
− 0.6242 + 0.2744 z−1 1 − 1.0357 z−1 + 0.2869 z −2 + 0.6242 − 0.1167 z−1 j e j
e1− 1.2530 z −1
+ 0.5962 z−2 j
∴ H(z) =
e1 − 1.2530 z −1
+ 0.5962 z −2
j e1 − 1.0357 z −1
+ 0.2869 z −2
j
−0.6242 + 0.6465 z−1 − 0.1791z−2 + 0.2744 z−1 − 0.2842 z−2 + 0.0787 z−3
+ 0.6242 − 0.7821z−1 + 0.3721z−2 − 0.1167 z−1 + 0.1462 z −2 − 0.0696 z−3
=
1 − 1.0357 z−1 + 0.2869 z−2 − 12530
. z−1 + 1.2977 z−2 − 0.3595 z−3
+ 0.5962z−2 − 0.6175 z−3 + 0.171z−4
−1 −1
z z
−1
−1 0.0221z X (z ) 2.2887z −1Y (z)
z X (z) −1
0.02 21 + + 2.28 87 z Y (z)
−1 −1
z z
−2 −2
−2 0.055z X (z ) −2.1808z Y (z ) −2
z X (z) z Y (z )
0.05 5 + + −2.1808
−1
z −1
−3 −3
z
−3 0.0091z X (z) 0.977z Y (z )
z X (z) −3
0.00 91
+ 0 .9 7 7 z Y (z )
−1
−4 z
−0.171z Y (z ) −4
−0.171 z Y (z)
W(z) 1
where, = .....(3)
X(z) 1 − 2 .2887 z−1 + 2.1808 z−2 − 0.977 z−3 + 0.171z−4
Y(z)
= 0.0221z−1 + 0.055 z−2 + 0.0091z−3 .....(4)
W(z)
On cross multiplying equation (3) we get,
W(z) 2.2887z1W(z) + 2.1808z2W(z) 0.977z3W(z) + 0.171z4W(z) = X(z)
\ W(z) = X(z) + 2.2887z1W(z) 2.1808z2W(z) + 0.977z3W(z) 0.171z4W(z) .....(5)
On cross multiplying equation (4) we get,
Y(z) = 0.0221z1W(z) + 0.055z2W(z) + 0.0091z3W(z) .....(6)
Using equations (5) and (6), the direct form-II structure is drawn as shown in fig 2.
X (z) W (z) Y (z )
+
−1
z
−1
2 .2887 z −1W ( z) 0.0221 z W (z )
z −1W ( z)
+ 2.28 87 0.02 21 +
−1
z
−2 .1808 z −2 W ( z) −2
0.055 z W (z )
z −2 W ( z )
+ −2.1808 0.05 5
+
−1
z
−3 −3
0 .977 z W (z ) 0.0091 z W (z )
z −3 W ( z)
+ 0 .9 7 7 0.00 91
−4 −1
−0.171 z W (z) z
−0.171 z −4 W ( z )
F 0.7795IJ
0.6243 G s + (s + a 2 )2 = s 2 + 2a 2s + a 22
+
H 0.6243K 12486
.
(s + 2 × 0.6243s + 0.6243 ) + F 0.4566 − 0.6243 I
2 2 2
2 2a 2 = 12486
. ⇒ a2 =
2
H K = 0.6243
−0.6243(s + 0.5172) 0.6243(s + 1.2486)
= +
(s + 0.2586)2 + 0.62432 (s + 0.6243)2 + 0.2586 2
−0.6243(s + 0.2586 + 0.2586) 0.6243(s + 0.6243 + 0.6243)
= +
(s + 0.2586)2 + 0.62432 (s + 0.6243)2 + 0.2586 2
(s + 0.2586) 0.6243
= 0.6243 0.2586
(s + 0.2586)2 + 0.62432 (s + 0.2586)2 + 0.62432
(s + 0.6243) 0.6243 × 0.6243 0.2586
+ 0.6243 +
(s + 0.6243)2 + 0.25862 0.2586 (s + 0.6243)2 + 0.25862
Chapter 7 - IIR Filters 7. 92
(s + 0.2586) 0.6243
∴ H(s) = 0.6243 0.2586
(s + 0.2586)2 + 0.62432 (s + 0.2586)2 + 0.62432
(s + 0.6243) 0.2586
+ 0.6243 + 15072
.
(s + 0.6243)2 + 0.2586 2 (s + 0.6243)2 + 0.2586 2
Digital IIR lowpass filter transfer function, H(z)
In impulse invariant transformation,
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
1 − e−0.6243(cos 0.2586) z −1
+ 0.6243 −0.6243
1− 2 e (cos 0.2586) z−1 + e−2 × 0.6243 z−2
=
e
+ 0.6243 − 0.1168z−1 1 − 12530
. je
z−1 + 0.5962z−2 j
e .
1 − 12530z−1 + 0.5962z −2 j e1 − 10357
. z −1
+ 0.2869z−2 j
−0.6243 + 0.6466z−1 − 0.1791z−2 + 0.2744z −1 − 0.2842z−2 + 0.0787z−3
+ 0.6243 − 0.7822z−1 + 0.3722z−2 − 0.1168z−1 + 0.1464z−2 − 0.0696z−3
=
1 − 10357
. z−1 + 0.2869z−2 − 12530
. z−1 + 12977
. z−2 − 0.3595z−3
+ 0.5962z −2 − 0.6175z−3 + 0.171z−4
Note : The H(z) obtained by both the methods are same. The small difference in the coefficients are due to
the corrections (or rounding) made in calculations.
7. 93 Digital Signal Processing
Example 7.22
Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 1second, to
satisfy the following specifications.
Alternatively,
Ap = 10
e− δp,dB / 20j = 10b−3.0116 / 20g = 0. 707
As = 10
e −α s ,dB / 20j = 10b−21.9382/ 20g = 0.08
Solution
Specifications of digital IIR lowpass filter
LM FH 1/ A 2 IK − 1O LM FH IK − 1 O
1/ 0.08 2
log
s
P log P
MN FH s K − 1P MN FH1/ 0.707 2 IK − 1P
1/ A 2 I
N1 =
1 Q=1 Q Using equation (7.57).
2 Ω 2 .
14531
log s log
Ωp 0.6498
log
155.25 LM OP
=
1 .
10006 N
= 3.1341 Q
.
2 log 14531
0.6498
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 4.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk s n + 1
Using equation (7.58).
k =1
where, bk = 2 sin LM c 2k − 1 πh OP
N 2N
Q Using equation (7.60).
Here, N = 2, ∴ k = 1, 2
When k = 1, bk = b1 = 2 sin
LM b2 × 1 − 1gπ OP = 0.7654
MN 2 × 4 PQ Calculate sin q using
When k = 2, bk = b2 = 2 sin M
L b2 × 2 − 1gπ OP = 18478 calculator in radian mode.
MN 2 × 4 PQ .
1
b g
∴ H sn =
(sn2 + 0.7654 sn + 1) (sn2 + 18478
. sn + 1)
1
=
sn4 + 2.6132 sn3 + 3.4143 sn2 + 2.6132 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
H(s) = H sn b g s
sn =
Ωc
Ωs 14531
. Using equation (7.61).
Ωc = 1
= 1
= 0.7734 rad / second
e1/ A 2s j − 1 2N F 1 I 2× 4
H 0.08 2
−1
K
1
∴ H(s) = H sn b g =
sn4 + 2.6132 sn3 + 3.4143 sn2 + 2.6132 sn + 1 s
sn = s n =
s
Ωc Ωc
7. 95 Digital Signal Processing
1
∴ H(s) =
FG s IJ 4
F s IJ
+ 2.6132 G
3
+ 3.4143
FG s IJ 2
+ 2.6132
FG s IJ + 1
HΩ K c HΩ K c HΩ K
c HΩ K
c
1
=
s4 s3 s2 s
4 + 2.6132 3 + 3.4143 2 + 2.6132 +1
Ωc Ωc Ωc Ωc
Ω 4c
=
s + 2.6132 Ω c s + 3.4143 Ω 2c s 2 + 2.6132 Ω3c s + Ω 4c
4 3
0.77344
=
s + 2.6132 × 0.7734 s + 3.4143 × 0.77342 s 2 + 2.6132 × 0.77343 s + 0.77344
4 3
0.3578
=
s 4 + 2.021s3 + 2.0423 s 2 + 12089
. s + 0.3578
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
0.3578
H(z) = H(s) =
s 4 + 2.021s3 + 2.0423 s 2 + 12089
. s + 0.3578
1− z −1 1− z −1
s = 2 s = 2
T 1+ z −1 T 1+ z −1
0.3578
=
F 2 1− z I−1 4 F 2 1− z I −1 3 F 2 1− z I −1 2 F 2 1 − z I + 0.3578
−1
GH T 1 + z JK
−1
+ 2.021 GH T 1+ z JK −1
+ 2.0423 GH T 1 + z JK −1
+ 1.2089 GH T 1 + z JK
−1
0.3578
=
16(1 − z−1)4 + 2.021 × 8T (1 − z−1)3 (1 + z−1) + 2.0423 × 4T 2 (1 − z−1)2 (1 + z −1)2
Alternatively,
−1 −1
z z
−1 −1
−1 0.0332z X (z) 2.0892 z Y (z ) −1
z X (z) 0.0332 + + 2.08 92 z Y (z)
−1 −1
z z
−2 −2
−2 0.0498z X (z) −1.8975z Y (z ) −2
z X (z) z Y (z )
0.0498
+ + −1.8975
−1 −1
z z
−3 0.0332z −3 X (z ) −3
0.8133z Y (z )
z X (z ) −3
0.03 32 + + 0.81 33 z Y (z )
−1 −1
z −4 z
−4 0.0083z X (z ) −0.1378z −4 Y (z )
−4
z X (z ) 0.00 83 −0.1378 z Y (z )
W(z) 1
where, = .....(2)
X(z) 1 − 2.0892 z−1 + 18975
. z−2 − 0.8133 z−3 + 0.1378 z−4
Y(z)
= 0.0083 + 0.0332 z−1 + 0.0498 z−2 + 0.0332 z−3 + 0.0083 z −4 .....(3)
W(z)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z) 0.0083W (z )
X (z ) + 0.008 3
+ Y (z )
−1
z
−1 −1 −1
2.0892 z W (z) z W (z ) 0.0332z W (z )
+ 2.089 2 0.0332
+
−1
z
−2 −2
−1.8975z W (z ) −2 0.0498z W (z )
z W (z)
+ −1.8975 0.0498
+
−1
z
−3
0.8133z W (z ) −3 0.0332z −3 W (z )
z W (z )
+ 0.813 3 0.033 2 +
−1
z
−0.1378z −4 W (z ) −4 −4
0.0083z W (z)
z W (z)
−0.1378 0.008 3
Example 7.23
Design a Chebyshev digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
Ap = 10
e− δp,dB / 20j = 10b−0.9151/ 20g = 0.9
As = 10
e −α s ,dB / 20j = 10b−12.3958 / 20g = 0.24
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.25p rad/sample
Stopband edge digital frequency, w s = 0.5p rad/sample
Gain in normal value at passband edge, Ap = 0.9
Gain in normal value at stopband edge, As = 0.24
Sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.9
Gain is same in analog
Gain in normal value at stopband edge, As = 0.24 and digital filter.
For impulse invariant transformation,
ωp 0.25π
Passband edge analog frequency, Ωp = = = 0.7854 rad / second Using equation (7.85).
T 1
ω s 0.5π
Stopband edge analog frequency, Ωs = = = 1.5708 rad / second Using equation (7.86).
T 1
Order of the filter
1 1
LM FH1/ A s2 IK − 1O 2 LM FH1/ 0.242 IK − 1O 2
cosh−1
MN FH 2I − 1P
P cosh−1
MN FH 1/ 0.92 IK − 1 P
P Using equation (7.87).
N1 =
1/ A p K Q = Q
Ωs .
15708
cosh−1 cosh−1
Ωp 0.7854
1
cosh −1 LM16.3611OP 2
= N 0.2346 Q = 2.1077
.
15708
cosh−1
0.7854
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 3.
7. 99 Digital Signal Processing
Normalized transfer function, H(sn) of Chebyshev lowpass filter
For odd N,
N − 1
2
B0 Bk Using equation (7.89).
H(sn ) =
sn + c 0 ∏ sn2 + bk sn + ck
k = 1
N−1 3−1
Here, N = 3, ∴ k= 2
=
2
=1
B0 B1
∴ H(sn ) = × 2
sn + c0 sn + b1 sn + c1
1
e j
∈ = 1/ Ap2 − 1 2 Using equation (7.94).
e j
= 1 / 0.92 − 1 2 = 0.4843
R|L 1 1 U|
I 1O LF 1 I O
1 1 −
N N
1 |MF 1
G + 1J + P − MG
2 2
+ P
1 |V Using equation (7.93).
yN = S
2 |MH ∈
M|N K ∈PP
2 MMH ∈ + 1JK 2
∈P
PQ ||
T Q N W
1 1
L 1
1 MF I 1
OP 1
2
3 LMF 1 I
1
2 1
OP −
3
= G
2 MH 0.4843
+ 1J +
K 0.4843 PP −2 2 MMGH 0.4843 + 1JK 2
+
0.4843 P
2
MN Q N PQ
1
= [1.6335 − 0.6122] = 0.5107
2
c0 = yN = 0.5107 Using equation (7.94).
B0 B1 B0 B1
∴ H(sn ) = × 2 = ×
sn + c 0 sn + b1 sn + c1 sn + 0.5107 sn2 + 0.5107 sn + 10108
.
Chapter 7 - IIR Filters 7. 100
B0 B1
When sn = 0, H(sn ) = = 19372
. B0 B1
(0.5107) (1.0108)
1
∴ 1.9372 B0 B1 = 1 ⇒ B0 B1 = = 0. 5162
1.9372
Let, B0 = B1 ; ∴ B20 = 0.5162 ⇒ B0 = 0.5162 = 0.7185
∴ B1 = B0 = 0.7185
B0 B1 0.7185 0.7185
∴ H(sn ) = × = ×
sn + 0.5107 (sn2 + 0.5107 sn + 1.0108) (sn + 0.5107) (sn2 + 0.5107 sn + 1.0108)
0.5162
=
(sn + 0.5107) (sn2 + 0.5107 sn + 1.0108)
0.5162
=
sn3 + 10214
. sn2 + 12716
. sn + 0.5162
Unnormalized transfer function, H(s) of Chebyshev lowpass filter
H(s) = H snb g s
sn =
Ωc
0.5162
∴ H(s) = H sn b g =
(sn + 0.5107)(sn2 + 0.5107 sn + 10108
. )
sn = s sn = s
Ωc Ωc
0.5162
=
FG s IF s
+ 0.5107J G
2
s I
HΩ c KH Ω 2
c
+ 0.5107
Ωc
.
+ 10108 JK
0.5162
=
F s + 0.5107 Ω I F s c
2
+ 0.5107 Ω c + 10108
. Ω 2c I
GH Ω c
JK GH Ωc2 JK
0.5162 Ω3c
= 2
(s + 0.5107 Ω c )(s + 0.5107 Ωc s + 10108
. Ω 2c )
0.5162 × 0.78543
= 2
(s + 0.5107 × 0.7854)(s + 0.5107 × 0.7854s + 10108
. × 0.78542 )
0.2501 .....(1)
=
(s + 0.4011) (s 2 + 0.4011s + 0.6235)
0.2501
=
s3 + 0.8022 s 2 + 0.7844 s + 0.2501)
7. 101 Digital Signal Processing
To convert the analog transfer function to digital transfer function using impulse invariant transformation,
the equation (1) is simplified as shown below.
0.2501 A Bs + C
H(s) = 2
= + 2 .....(2)
(s + 0.4011)(s + 0.4011s + 0.6235) s + 0.4011 s + 0.4011s + 0.6235
0.2501 = As2 + 0.4011 As + 0.6235 A + Bs2 + 0.4011 Bs+ Cs + 0.4011 C ..... (3)
A Bs + C
∴ H(s) = +
(s + 0.4011) (s 2 + 0.4011s + 0.6235)
(s + a)2 = s 2 + 2as + a 2
0.4011 0.4011s
= − 0.4011
(s + 0.4011) (s 2 + 0.4011s + 0.6235) 2a = 0.4011 ⇒ a = = 0.2006
2
0.4011 0. 4011s
= −
(s + 0.4011)
( s 2 + 2 × 0.2006s + 0.2006 2 )+ FH 0.6235 − 0.20062IK 2
0.4011 s + 0.2006
= − 0.4011
(s + 0.4011) ( s + 0.2006)2 + 0.76372
b e− aT (sin bT )z−1
→
(s + a)2 + b2 is transformed to − aT
1 − 2e (cos bT )z−1 + e−2aT z−2
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
Put, T = 1
0.4011 1 − e−0.2006 (cos 0.7637)z−1
∴ H(z) = −0.4011 −1
− 0.4011 −0.2006
1− e z 1 − 2e (cos 0.7637) z−1 + e −2× 0.2006 z−2
0.0906z−1 + 0.0698z −2
=
1 − 18516
. z−1 + 14611
. z−2 − 0.4484z−3
Alternatively,
X (z) + Y (z)
−1 −1
z z
−1
−1
0.0906z X (z ) 1.8516z −1Y (z) −1
z X (z)
0.09 06 + + z Y (z)
−1 −1
z z
−2 0.0698z −2 X (z ) −1.4611z −2 Y (z ) −2
z X (z) z Y (z )
0.06 98
+ −1.4611
−1
z
0.4484z −3 Y (z ) −3
0.44 84 z Y (z )
W(z) 1
where, = .....(5)
X(z) .
1 − 18516z −1 + 14611
. z−2 − 0.4484z−2
Y(z)
= 0.0906z −1 + 0.0698z−2 .....(6)
W(z)
On cross multiplying equation (5) we get,
W(z) 1.8516z1W(z) + 1.4611z2W(z) 0.4484z3 W(z) = X(z)
\ W(z) = X(z) + 1.8516z1W(z) 1.4611z2W(z) + 0.4484z3 W(z) .....(7)
On cross multiplying equation (6) we get,
Y(z) = 0.0906z1X(z) + 0.0698z2W(z) .....(8)
Using equations (7) and (8), the direct form-II structure is drawn as shown in fig 2.
X (z) W (z) Y (z )
+
−1
z
1.8516z −1W (z ) 0.0906z −1W (z)
z −1W ( z)
+ 0.09 06
+
−1
z
−1.4611z −2 W (z)
z −2 W ( z ) 0.0698z −2 W (z )
+ −1.4611 0.06 98
−1
z
0.4484z −3 W (z )
z −3 W ( z)
0.44 84
Ap = 10
e− δp,dB / 20j = 10b−1.9 / 20g = 0.8
As = 10
e −α s ,dB / 20j = 10b−13.97 / 20g = 0.2
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.2p rad/sample
Stopband edge digital frequency, w s = 0.32p rad/sample
Gain in normal value at passband edge, Ap = 0.8
Gain in normal value at stopband edge, As = 0.2
sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.8 Gain is same in analog
and digital filter.
Gain in normal value at stopband edge, As = 0.2
For bilinear transformation,
2 ωp
Passband edge analog frequency, Ωp = tan Using equation (7.83).
T 2
2 0.2π
= tan = 0.6498 rad / second
1 2
2 ω
Stopband edge analog frequency, Ωs = tan s
T 2 Using equation (7.84).
2 0.32π
= tan = 1.0995rad / second
1 2
Order of the filter
1 1
−1
LM FH1/ A 2
s
IK − 1O 2
P −1
LM e1/ 0.22 j − 1OP 2 Using equation (7.87).
cosh cosh
MN FH 2I − 1P
1/ Ap K Q MN e
1/ 0.8 j − 1P
2
Q cosh−1 6.5319
N1 = = = = 2.2944
−1 Ωs .
10995 cosh−1 16921
.
cosh cosh−1
Ωp 0.6498
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 3.
7. 105 Digital Signal Processing
Normalized transfer function, H(sn) of Chebyshev lowpass filter
For odd N,
N − 1
2 Using equation (7.89).
B0 Bk
H(sn ) =
sn + c 0 ∏ sn2 + bk sn + ck
k = 1
N− 1 3−1
Here, N = 3, ∴ k= 2
=
2
=1
B0 B1
∴ H(sn ) = × 2
sn + c 0 sn + b1 sn + c1
e
∈ = 1/ Ap2 − 1 2j Using equation (7.94).
e j
= 1 / 0.82 − 1 2 = 0.75
R|L 1 1 U|
|SMFG 1 + 1IJ + 1OP − LMF 1 I OP
1 1 −
N N
1 2 2 1 |V
yN =
2 ||MMNH ∈ K ∈PPQ
2 MMGH ∈ + 1JK
2
+
∈ PP ||
Using equation (7.93).
T N Q W
1 1
L
1 MF 1 I 1 OP
1
2
3 LMF 1 I 1
2 1
OP −
3
= G
2 MH 0.75
+ 1J +
K 0.75 PP −
MMGH 0.75 + 1JK +
PPQ
2 2
0.75
NM Q N
1
= [1.4422 − 0.6934] = 0.3744
2
c0 = yN = 0.3744 Using equation (7.94).
B0 B1 B0 B1
∴ H(sn ) = × 2 = ×
sn + c 0 sn + b1 sn + c1 sn + 0.3744 sn2 + 0.3744 sn + 0.8902
Chapter 7 - IIR Filters 7. 106
B0 B1
When sn = 0, H(sn ) = = 3B0 B1
(0.3744) (0.8902)
1
∴ 3 B0 B1 = 1 ⇒ B0 B1 = = 0.3333
3
2
Let, B0 = B1 ; ∴ B0 = 0.3333 ⇒ B0 = 0.3333 = 0.5774
∴ B1 = B0 = 0.5774
B0 B1 0.5774 0.5774
H(sn ) = × 2 = × 2
sn + 0.3744 sn + 0.3744 sn + 0.8902 sn + 0.3744 sn + 0.3744 sn + 0.8902
0.3333 0.3333
= =
(sn + 0.3744) (sn2 + 0.3744 sn + 0.8902) sn3 + 0.7488 sn2 + 1.0304 sn + 0.3333
Unnormalized transfer function, H(s) of Chebyshev lowpass filter
H(s) = H sn b g s
sn =
Ωc
0.3333
∴ H(s) = H sn b g s
=
(sn3 + 0.7488 sn2 + 1.0304 sn + 0.3333) s
sn = sn =
Ωc Ωc
0.3333
=
Fs 3
s2 s I
GH Ω 3
c
+ 0.7488 2 + 1.0304
Ωc Ωc
+ 0.3333 JK
0.3333 × Ω3c
=
s + 0.7488 Ω c s 2 + 1.0304 Ω c2 s + 0.3333 Ω3c
3
0.3333 × 0.64983
=
s3 + 0.7488 × 0.6498 s 2 + 1.0304 × 0.64982 s + 0.3333 × 0.64983
0.0914
=
s3 + 0.4865 s 2 + 0.4351s + 0.0914
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
0.0914
H(z) = H s bg s=
2 1− z −1
T 1+ z −1
=
s3 + 0.4865 s 2 + 0.4351s + 0.0914 s = 2 1− z −1
T 1+ z −1
0.0914
=
F 2 1− z I −1 3 F 2 1− z I −1 2 F 2 1− z I + 0.0914
−1
GH T 1 + z JK −1 + 0.4865 GH T 1 + z JK
−1 + 0.4351GH T 1 + z JK
−1
0.0914
=
8(1− z −1)3 1.946(1− z−1)2 0.8702(1− z−1)
+ + + 0.0914
T3 (1 + z−1)3 T 2(1 + z−1)2 T (1 + z−1)
7. 107 Digital Signal Processing
0.0914
∴ H(z) =
8(1− z−1)3 + 1.946 T(1− z−1)2 (1 + z−1) + 0.8702 T 2(1− z−1)(1 + z−1)2 + 0.0914 T3(1 + z−1)3
T3 (1 + z−1)
0.0914 T3 (1 + z−1)3
=
8(1− z ) + 1.946 T(1− z ) (1 + z ) + 0.8702 T 2(1− z−1)(1 + z−1)2 + 0.0914 T3 (1 + z−1)3
−1 3 −1 2 −1
Put, T = 1
0.0914 (1 + 3z−1 + 3z−2 + z−3 )
=
8(1− 3z−1 + 3z −2 − z−3 ) + 1.946 (1− 2z−1 + z −2 )(1 + z−1) + 0.8702(1− z−1)(1 + 2z−1 + z−2 )
+ 0.0914 (1 + 3z−1 + 3z−2 + z−3 )
+ 0.0914 (1 + 3z−1 + 3z −2 + z −3 )
0.0083X (z)
X (z) 0.00 83 + + Y (z)
−1 −1
z z
−1 −1
−1 0.0251z X(z ) 2.2821z Y (z ) −1
z X (z) z Y (z)
0.0251
+ + 2.28 21
−1 −1
z z
−2 −2
−2 0.0251z X(z ) −1.9589z Y (z ) −2
z X (z) z Y (z )
0.0251
+ + −1.9589
−1 −1
z −3 z
−3
−3
0.0083z X(z ) 0.6264z Y (z ) −3
z X (z) 0.00 83 0.62 64 z Y (z )
W(z) 1
where, = .....(2)
X(z) 1 − 2.2821z−1 + 19589
. z−2 − 0.6264 z−3
Y(z)
= 0.0083 + 0.0251z−1 + 0.0251z−2 + 0.0083 z−3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) 2.2821z1W(z) + 1.9589z2 W(z) 0.6264 z3W(z) = X(z)
W(z) = X(z) + 2.2821z1W(z) 1.9589z2 W(z) + 0.6264z3W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.0083W(z) + 0.0168z1W(z) + 0.0168z2W(z) + 0.0083z3W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z) 0.0083W (z )
X (z ) + 0.00 83
+ Y (z )
−1
z
−1 −1
2.2821z W (z) z W (z ) 0.0251z W (z)
−1
+ 2.28 21 0.0251
+
−1
z
−2 −2
−1.9589z W (z ) −2 0.0251z W (z)
z W (z)
+ −1.9589 0.0251
+
−1
z
−3 −3
0.6264z W (z) −3
0.0083z W (z )
z W (z )
0.62 64 0.00 83
23. The bilinear transformation is one-to-one mapping whereas the impulse invariant transformation is
many-to-one mapping.
Chapter 7 - IIR Filters 7. 110
ΩT
24. In bilinear transformation an analog frequency, W is transformed to a digital frequency, ω = 2 tan −1 .
2
25. The distortion in the frequency axis due to nonlinear mapping of analog frequency to digital frequency
in bilinear transformation is called frequency warping.
26. The prewarping is conversion of specified digital frequency to analog frequency using the relation
2 ω
Ω= tan .
T 2
27. When expressed in dB, the gain and attenuation are numerically same but opposite in sign. The gain will
be negative dB, whereas the attenuation will be positive dB.
28. When expressed in dB, the attenuation and ripple are same.
29. In Butterworth filter design, the error function is selected such that the magnitude is maximally flat in the
passband and monotonically decreasing in the stopband.
30. The 2N poles of Butterworth normalized transfer function symmetrically lies on a unit circle in s-plane
with angular spacing of p/N (= 2p/2N).
31. The transfer function of Butterworth filter is obtained by considering the N-poles lying on left half of
s-plane.
32. When N is even, all poles of Butterworth filter are complex and exist as conjugate pair.
33. When N is odd, one pole of Butterworth filter is real and all other poles are complex and exist as conjugate
pair.
34. For normalized transfer function of the filter, cutoff frequency, W c = 1 rad/second.
35. In Butterworth approximation, the approximated magnitude ressponse approaches the ideal response as
the order N increases.
36. In type-1 Chebyshev approximation, the error function is selected such that, the magnitude response is
equiripple in the passband and monotonic in the stopband.
37. In type-2 Chebyshev approximation, the error function is selected such that, the magnitude response is
monotonic in passband and equiripple in stopband.
38. The type-2 Chebyshev magnitude response is also called inverse Chebyshev resposne.
39. The 2N poles of Chebyshev transfer function symmetrically lies on an ellipse in s-plane.
40. The transfer function of Chebyshev filter is formed by considering the N-poles lying on left half of
s-plane.
41. When N is even, all the poles of Chebyshev filter are complex and exist as conjugate pair.
42. When N is odd, one of the pole of Chebyshev filter is real and all other poles are complex and exist as
conjugate pair.
43. The normalized transfer function of lowpass filter is transformed to lowpass filter with cutoff frequency,
s
W c, by the transformation sn → .
Ωc
44. The normalized transfer function of lowpass filter is transformed to highpass filter with cutoff frequency,
Ωc
W c, by the transformation sn → .
s
45. The frequency response of digital IIR filter obtained by impulse invariant tansformation will be amplified
by the factor 1/T.
7. 111 Digital Signal Processing
7.10. Short Questions and Answers
Q7.1 Define an IIR filter.
The filter designed by considering all the infinite samples of impulse response are called IIR filters.
The impulse response is obtained by taking inverse fourier transform of ideal frequency response.
Q7.2 Distinguish between IIR and FIR filters.
The filter design starts from ideal frequency response. By taking inverse fourier transform of ideal
frequency response, the desired impulse response is obtained, which consists of infinite number
of samples.
The digital filters designed by selecting only N samples of the impulse response are called FIR
filters. The digital filters designed by considering all the infinite samples of impulse response are
called IIR filters.
Q7.3 Compare IIR and FIR filers.
IIR Filter FIR filter
i. All the infinite samples of impulse i. Only N samples of impulse
response are considered. response are considered.
ii. The impulse response cannot be directly ii. The impulse response can be directly
converted to digital filter transfer function. converted to digital filter transfer function.
iii. The design involves design of analog iii. The digital filter can be directly
filter and then transforming analog designed to achieve the desired
filter to digital filter. specifications.
iv. The specifications include the desired iv. The specifications include the
characteristics for magnitude response desired characteristics for both
only. magnitude and phase response.
v. Linear phase characteristics cannot be v. Linear phase filters can be easily
achieved. designed.
Q7.4 Classify the filters based on frequency response.
Based on frequency response, the filters can be classified into lowpass, highpass, bandpass and
bandstop filters.
Q7.5 What are the properties that are maintained same in the transformation of analog to digital
filter? (or Mention the two properties that an analog filter should have for effective
transformation).
The analog filters should be stable and causal for effective transformation to digital filters. While
transforming the analog filter to digital filters these two properties (i.e., stability and causality) are
maintained same, which means that the transformed digital filter should also be stable and causal.
Q7.6 What are the requirements for an analog filter to be stable and causal?
i. The analog filter transfer function H(s) should be a rational function of s and the coefficients
of s should be real.
ii. The poles should lie on the left half of s-plane.
iii. The number of zeros should be less than or equal to number of poles.
Q7.7 What are the requirements for a digital filter to be stable and causal?
i. The digital filter transfer function H(z) should be a rational function of z and the coefficients of
z should be real.
ii. The poles should lie inside the unit circle in z-plane.
iii. The number of zeros should be less than or equal to number of poles.
Chapter 7 - IIR Filters 7. 112
Q7.8 Sketch the various tolerance limits to approximate an ideal lowpass and highpass filter.
jω
|H(e )| jω
|H(e )|
1 δp 1 δp
Ap Ap
Ap = 1− δp
1
= 0.707 As = δs 1
2 = 0.707
2
δs
As As
δs
0 ωp ωc ωs ω ωs ωc ωp ω
0
π/T
σ −1 1
u
−π/T
−j1
−3 π/T
(s + a ) 1 − e − aT (cos bT) z −1
→
(s + a ) 2 + b2 1 − 2e aT (cos bT) z−1 + e −2 aT z −2
−
b e − aT (sin bT) z −1
→
2
(s + a ) + b 2
1 − 2e (cos bT) z−1 + e −2 aT z −2
− aT
Q7.22 What is the relation between digital and analog frequency in impulse invariant transformation?
The relation between analog and digital frequency in impulse invariant transformation is given by,
Digital frequency, w = W T
where, W = Analog frequency, and T = Sampling time period.
Q7.23 What is aliasing?
The phenomena of high frequency sinusoidal components acquiring the identity of low frequency
sinusoidal components after sampling is called aliasing. The aliasing problem will arise if the
sampling rate does not satisfy the Nyquist sampling criteria.
Q7.24 What is aliasing problem in impulse invariance method of designing digital filters? Why is it
absent in bilinear transformation?
In impulse invariant mapping, the analog frequencies in the interval (2k–1)p/T £ W £ (2k+1)p/T
(where k is an integer) maps into corresponding values of digital frequencies in the interval
–p £ w £ p. Hence the mapping of W to w is many-to-one.
This will result in high frequency components acquiring the identity of the low frequency
components if the analog filter is not band limited. This effect is called aliasing. The aliasing can be
avoided in bandlimited filters by choosing very small values of sampling time (or very high sampling
frequency).
The bilinear mapping is one-to-one mapping and so there is no effect of aliasing.
Q7.25 Obtain the impulse response of digital filter corresponding to an analog filter with impulse
response h(t) = 0.5e–2t and with a sampling rate of 1.0 kHz using impulse invariant method.
Solution
Given that, h(t) = 0.5e2t
1 1
∴ Sampling time, T = = = 10 3 second.
F 1 × 103
7. 115 Digital Signal Processing
Impulse response of U|h(n) = h(t)
V| t =nT
= 0.5e −2t = 0.5e 2nT
digital filter W t = nT
d i = 0.5FGH e × 10 IJK
n 3 n
= 0.5 e 2T −2
= 0.5b0.998g ; for n ≥ 0.
n
Q7.26 Given that, H(s) = 1/(s+1). By impulse invariant method, obtain the digital filter transfer
function and the difference equation of digital fitler.
Solution
1
Given that, H(s) =
s +1
In impulse invariant transformation,
1 1
→ − piT −1
s + pi 1 e z
−
Let T = 1 second,
∴ Transfer function of |UVH(z) = 1 =
1
=
1
digital filter |W 1− e z − T −1
1 − e−1z−1 1 − 0.368z−1
Y(z)
We know that, H(z) =
X(z)
Y(z) 1
∴ =
X(z) 1 − 0.368z−1
On cross multiplyting we get,
Y(z) 0.368z1 Y(z) = X(z)
\ Y(z) = X(z) + 0.368z1 Y(z)
On taking inverse Z-transform we get,
y(n) = x(n) + 0.368y(n1)
Q7.27 What is bilinear transformation ?
The bilinear transformation is a conformal mapping that transforms the s-plane to z-plane. In this
mapping the imaginary axis of s-plane is mapped into the unit circle in z-plane, the left half of s-plane
is mapped into interior of unit circle in z-plane and the right half of s-plane is mapped into exterior of
unit circle in z-plane. The bilinear mapping is a one-to-one mapping and it is accomplished when
2 1 − z −1
s=
T 1 + z −1
Q7.28 Sketch the mapping of s-plane to z-plane in bilinear transformation.
jΩ jv
U n it c ircle j1
LHP RHP
σ −1 1 u
−j1
i.e.,H(z) = H(s)
2 1− z −1
s=
T 1+ z −1
Q7.31 How is the analog frequency mapped to digital frequency in bilinear transformation?
In bilinear transformation, the digital frequency and analog frequency are related by the equation,
ΩT 2 ω
ω = 2 tan−1 or Ω = tan
2 T 2
From the above equations we can infer that the relation between analog and digital frequency is
nonlinear. Here the entire negative imaginary axis in the s-plane (from W = -¥ to 0) is mapped into
the lower half of unit circle in z-plane (from w = –p to 0) and the entire positive imaginary axis in the
s-plane (from W = 0 to +¥ ) is mapped into the upper half of unit circle in z-plane (from w = 0 to +p).
Q7.32 What is frequency warping?
In bilinear transformation the relation between analog and digital frequencies is nonlinear. When
the s-plane is mapped into z-plane using bilinear transformation, this nonlinear relationship
introduces distortion is frequency axis, which is called frequency warping.
Q7.33 What are the advantages and disadvantages of bilinear transformation?
Advantages of bilinear transformation
i. The bilinear transformation is one-to-one mapping.
ii. There is no aliasing and so the analog filter need not have a band limited frequency response.
iii. The effect of warping on amplitude response can be eliminated by prewarping the analog filter.
iv. Bilinear transformation can be used to design digital filters with prescribed magnitude response
with piecewise constant values.
Disadvantages of bilinear transformation
i. The nonlinear relationship between analog and digital frequencies introduces frequency
distortion which is called frequency warping.
ii. Using bilinear transformation, a linear phase analog filter cannot be transformed to a linear
phase digital filter.
Q7.34 What is prewarping? Why is it employed?
In IIR filter design using bilinear transformation, the conversion of the specified digital frequencies
to analog frequencies is called prewarping.
The prewarping is necessary to eliminate the effect of warping on amplitude response.
7. 117 Digital Signal Processing
Q7.35 Explain the technique of prewarping.
In IIR filter design using bilinear transformation the specified digital frequencies are converted to
analog equivalent frequencies, which are called prewarp frequencies. Using the prewarp frequencies,
the analog filter transfer function is designed and then it is transformed to digital filter transfer
function.
Q7.36 Compare the impulse invariant and bilinear transformations.
Impulse invariant transformation Bilinear transformation
i. It is many-to-one mapping. i. It is one-to-one mapping.
ii. The relation between analog ii. The relation between analog and
and digital frequency is linear. digital frequency is nonlinear.
iii. To prevent the problem of iii. There is no problem of aliasing
aliasing the analog filters and so the analog filter need not
should be bandlimited. be bandlimited.
iv. The magnitude and phase iv. Due to the effect of warping, the
response of analog filter can phase response of analog filter
be preserved by choosing cannot be preserved. But the
low sampling time or high magnitude response can be
sampling frequency. preserved by prewarping.
Q7.37 What is Butterworth approximation?
In Butterworth approximation, the error function is selected such that the magnitude is maximally
flat in the origin (i.e., at W = 0) and monotonically decreasing with increasing W .
Q7.38 How are the poles of Butterworth transfer function are located in s-plane?
The poles of the normalized Butterworth transfer function symmetrically lies on an unit circle in
s-plane with angular spacing of p/N.
Q7.39 Write the magnitude function of lowpass Butterworth filter.
The magnitude function of lowpass Butterworth filter is given by,
1
|H(jΩ)| =
1+
FG Ω IJ 2N
H (j Ω)
HΩ Kc
1.0
N=10
where, W c is the cutoff frequency and N=1
N is the order of the filter. 1
N=2
N=4
= 0.707
Q7.40 How the order of the filter affects the 2
When N is odd,
N −1
Transfer function of analogUVH(s) = Ω 2
Ω2c
s+ Ω ∏ s
c
lowpass Butterworth filter W c k =1
2
+ b k Ωc s + Ωc2
log
LM e j
1/ A 2s −1 OP
N1 =
1 MN e j
1/ A 2p −1 PQ
2 logFH IK
Ωs
Ωp
where Î is attenuation constant and CN(W /W c) is the Chebyshev polynomial of the first kind of
degree N.
Q7.48 How does the order of the filter affect the frequency response of Chebyshev filter?
From the magnitude response of type-1 Chebyshev filter it can be observed that the magnitude
response approaches the ideal response as the order of the filter is increased.
Q7.49 Sketch the magnitude response of type-1 Chebyshev filters.
|H (j Ω)| |H (j Ω)|
1 1
1 1
Ap = Ap =
2 2
1+ε 1+ε
As As
Ωp Ωs Ω Ωp Ωs Ω
F ig Q 7 .4 9 a : C h eb yshev type-1 , w h en N is odd. F ig Q 7 .4 9 b : C h eb yshev type-1 , w h en N is even.
|H (j Ω)| |H (j Ω)|
1 1
1 1
Ap = Ap =
2 2
1+ε 1+ε
As As
Ωp Ωs Ω Ωp Ωs Ω
F ig Q 7 .5 0 a : C h eb y sh e v typ e -2 , w h e n N is o d d . F ig Q 7 .5 0 b : C h eb yshev type-2 , w h en N is even.
R|L 1 O
1
N LF 1 I 1 O −
1
N
U|
1| F 1 I |V
= SMG + 1J + P − MG + 1J + P
2 1 2 1
yN
2 |MH ∈ K 2
∈P MMH ∈ K2
∈P ||
|TMN QP N QP W
Q7.52 How will you determine the order N of Chebyshev filter?
Calculate a parameter N1, using the following equation and correct it to nearest integer.
LMF e j I
1
1/ A 2s − 1 2
OP
cos h −1
MMGH e J
1/ A p j − 1 K
2 PP
N1 = N Q . Choose N such that N ³ N 1.
cos h −1
FG IJ
Ωs
H K
Ωp
Q7.53 How are the poles of Chebyshev transfer function are located in s-plane?
The poles of the Chebyshev transfer function symmetrically lies on an ellipse in s-plane.
Q7.54 Write the properties of Chebyshev type-1 filters.
i. The magnitude response is equiripple in the passband and monotonic in the stopband.
ii. The Chebyshev type-1 filters are all pole design.
iii. The normalized magnitude function has a value of 1 1+ ∈2 at the cutoff frequency W c.
iv. The magnitude response approaches the ideal response as the value of N increases.
Q7.55 Compare the Butterworth and Chebyshev Type-1 filters.
clear all
clc
PEF_A=(2/T)*tan((PEF_D)/2)
SEF_A=(2/T)*tan((SEF_D)/2)
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 2nd Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 4.4370
alpha_S = 20
PEF_A = 12.2560
SEF_A = 39.2522
N = 2
CF = 12.4439
Chapter 7 - IIR Filters 7. 122
Normalised Transfer Function is,
Transfer function:
1
s^2 + 1.414 s + 1
Columns 9 through 16
-0.2063 - 0.2962i -0.1805 - 0.1763i -0.1388 - 0.0987i -0.0972 - 0.0514i
-0.0617 - 0.0241i -0.0343 - 0.0095i -0.0151 - 0.0027i -0.0037 - 0.0003i
Column 17
-0.0000 - 0.0000i
Column 17
0.0000
clear all
clc
PEF_A=(2/T)*tan((PEF_D)/2)
SEF_A=(2/T)*tan((SEF_D)/2)
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 2nd Order Highpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 4.4370
alpha_S = 20
PEF_A = 12.2560
SEF_A = 39.2522
N = 2
CF = 12.4439
Chapter 7 - IIR Filters 7. 124
Normalised Transfer Function is,
Transfer function:
1
s^2 + 1.414 s + 1
Columns 1 through 8
0.0000 -0.0244 + 0.0056i -0.0908 + 0.0457i -0.1715 + 0.1551i
-0.2063 + 0.3488i -0.1252 + 0.5805i 0.0759 + 0.7517i 0.3196 + 0.8059i
Columns 9 through 16
0.5330 + 0.7652i 0.6922 + 0.6762i 0.8032 + 0.5709i 0.8786 + 0.4646i
0.9295 + 0.3629i 0.9632 + 0.2666i 0.9845 + 0.1750i 0.9962 + 0.0867i
Column 17
1.0000 + 0.0000i
Columns 1 through 16
0.0000 0.0251 0.1017 0.2313 0.4052 0.5938 0.7555 0.8670
0.9326 0.9676 0.9854 0.9939 0.9978 0.9994 0.9999 1.0000
Column 17
1.0000
%To design a Butterworth 3rd order lowpass filter using bilinear transformation
clear all
clc
PEF_A=(2/T)*tan((PEF_D)/2)
SEF_A=(2/T)*tan((SEF_D)/2)
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 3rd Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 3.0116
alpha_S = 13.9794
PEF_A = 3.4163
SEF_A = 6.5274
N = 3
CF = 3.8433
Chapter 7 - IIR Filters 7. 126
Columns 1 through 8
1.0000 0.9790 - 0.2039i 0.9142 - 0.4051i 0.7999 - 0.5994i
0.6243 - 0.7771i 0.3701 - 0.9134i 0.0295 - 0.9474i -0.3307 - 0.7816i
Columns 9 through 16
-0.5136 - 0.4202i -0.4296 - 0.0963i -0.2521 + 0.0434i -0.1186 + 0.0628i
-0.0460 + 0.0429i -0.0138 + 0.0205i -0.0026 + 0.0065i -0.0002 + 0.0008i
Column 17
0.0000 + 0.0000i
Columns 1 through 16
1.0000 1.0000 1.0000 0.9995 0.9968 0.9855 0.9478 0.8487
0.6636 0.4402 0.2558 0.1342 0.0629 0.0248 0.0070 0.0008
Column 17
0.0000
Program 7.4
clear all
clc
PEF_A=(2/T)*tan((PEF_D)/2)
SEF_A=(2/T)*tan((SEF_D)/2)
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 3rd Order Highpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 3.0116
alpha_S = 13.9794
PEF_A = 3.4163
SEF_A = 6.5274
N = 3
CF = 3.8433
Chapter 7 - IIR Filters 7. 128
Columns 1 through 8
0.0000 -0.0002 - 0.0011i -0.0036 - 0.0081i -0.0189 - 0.0252i
-0.0623 - 0.0500i -0.1572 - 0.0637i -0.3186 - 0.0099i -0.4871 + 0.2061i
Columns 9 through 16
-0.4737 + 0.5790i -0.1964 + 0.8762i 0.1642 + 0.9527i 0.4640 + 0.8756i
0.6805 + 0.7300i 0.8296 + 0.5578i 0.9269 + 0.3752i 0.9821 + 0.1884i
Column 17
1.0000 + 0.0000i
Columns 1 through 16
0.0000 0.0011 0.0089 0.0315 0.0799 0.1697 0.3188 0.5289
0.7481 0.8979 0.9667 0.9909 0.9980 0.9997 1.0000 1.0000
Column 17
1.0000
clear all
clc
PEF_A=PEF_D/T
SEF_A=SEF_D/T
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 2nd Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 3.0116
alpha_S = 13.9794
PEF_A = 0.9425
SEF_A = 2.3562
N = 2
CF = 1.0645
Chapter 7 - IIR Filters 7. 130
Normalised Transfer Function is,
Transfer function:
1
s^2 + 1.414 s + 1
Sampling time: 1
Columns 1 through 8
0.9074 0.8721 - 0.2591i 0.7549 - 0.5094i 0.5402 - 0.7112i
0.2562 - 0.7990i -0.0101 - 0.7493i -0.1887 - 0.6167i -0.2777 - 0.4718i
Columns 9 through 16
-0.3092 - 0.3499i -0.3118 - 0.2570i -0.3025 - 0.1883i -0.2898 - 0.1372i
-0.2776 - 0.0984i -0.2674 - 0.0678i -0.2599 - 0.0426i -0.2554 - 0.0206i
Column 17
-0.2539 - 0.0000i
Columns 1 through 16
0.9074 0.9098 0.9107 0.8931 0.8391 0.7493 0.6449 0.5475
0.4669 0.4041 0.3563 0.3207 0.2945 0.2759 0.2634 0.2562
Column 17
0.2539
clear all
clc
PEF_A=PEF_D/T
SEF_A=SEF_D/T
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 3rd Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 0.9151
alpha_S = 11.2133
PEF_A = 1.0996
SEF_A = 2.1991
N = 3
CF = 1.4489
Chapter 7 - IIR Filters 7. 132
Normalised Transfer Function is,
Transfer function:
1
s^3 + 2 s^2 + 2 s + 1
Sampling time: 1
Columns 1 through 8
0.9881 0.9512 - 0.2706i 0.8404 - 0.5261i 0.6535 - 0.7489i
0.3884 - 0.9106i 0.0598 - 0.9629i -0.2662 - 0.8581i -0.4807 - 0.6200i
Columns 9 through 16
-0.5352 - 0.3600i -0.4835 - 0.1682i -0.3985 - 0.0569i -0.3192 - 0.0024i
-0.2573 + 0.0193i -0.2132 + 0.0237i -0.1843 + 0.0192i -0.1681 + 0.0104i
Column 17
-0.1628 + 0.0000i
Columns 1 through 16
0.9881 0.9890 0.9915 0.9939 0.9900 0.9648 0.8985 0.7845
0.6450 0.5119 0.4025 0.3192 0.2580 0.2145 0.1853 0.1684
Column 17
0.1628
%To design a Butterworth 4th order lowpass filter using impulse invariant
transformation
clear all
clc
PEF_A=PEF_D/T
SEF_A=SEF_D/T
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 4th Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 1.9382
alpha_S = 13.9794
PEF_A = 0.6283
SEF_A = 1.0053
N = 4
CF = 0.6757
Chapter 7 - IIR Filters 7. 134
Normalised Transfer Function is,
Transfer function:
1
s^4 + 2.613 s^3 + 3.414 s^2 + 2.613 s + 1
Sampling time: 1
Columns 1 through 8
1.0003 0.7191 - 0.6952i -0.0382 - 0.9928i -0.7624 - 0.4102i
-0.4124 + 0.2461i -0.0836 + 0.2022i -0.0012 + 0.1075i 0.0140 + 0.0566i
Columns 9 through 16
0.0142 + 0.0312i 0.0117 + 0.0180i 0.0092 + 0.0109i 0.0072 + 0.0068i
0.0058 + 0.0043i 0.0048 + 0.0027i 0.0041 + 0.0016i 0.0038 + 0.0007i
Column 17
0.0037 + 0.0000i
Columns 1 through 16
1.0003 1.0002 0.9936 0.8657 0.4802 0.2188 0.1075 0.0583
0.0343 0.0215 0.0142 0.0099 0.0072 0.0055 0.0044 0.0039
Column 17
0.0037
clear all
clc
PEF_A=(2/T)*tan((PEF_D)/2)
SEF_A=(2/T)*tan((SEF_D)/2)
[N,CF]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Butterworth 4th Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 3.0116
alpha_S = 21.9382
PEF_A = 0.6498
SEF_A = 1.4531
N = 4
CF = 0.7734
Chapter 7 - IIR Filters 7. 136
Normalised Transfer Function is,
Transfer function:
1
s^4 + 2.613 s^3 + 3.414 s^2 + 2.613 s + 1
Sampling time: 1
Columns 1 through 8
1.0000 0.7827 - 0.6224i 0.1659 - 0.9837i -0.6317 - 0.6896i
-0.5858 + 0.1509i -0.1308 + 0.2296i -0.0035 + 0.1114i 0.0143 + 0.0471i
Columns 9 through 16
0.0114 + 0.0192i 0.0068 + 0.0076i 0.0035 + 0.0028i 0.0016 + 0.0009i
0.0006 + 0.0003i 0.0002 + 0.0001i 0.0000 + 0.0000i 0.0000 + 0.0000i
Column 17
-0.0000 - 0.0000i
Columns 1 through 16
1.0000 1.0000 0.9976 0.9352 0.6049 0.2642 0.1115 0.0492
0.0224 0.0101 0.0045 0.0018 0.0007 0.0002 0.0000 0.0000
Column 17
0.0000
clear all
clc
PEF_A=PEF_D/T
SEF_A=SEF_D/T
[N,CF]=cheb1ord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Chebyshev 3rd Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 0.9151
alpha_S = 12.3958
PEF_A = 0.7854
SEF_A = 1.5708
N = 3
CF = 0.7854
Chapter 7 - IIR Filters 7. 138
Normalised Transfer Function is,
Transfer function:
0.5162
s^3 + 1.021 s^2 + 1.272 s + 0.5162
Sampling time: 1
Columns 1 through 8
0.9997 0.7886 - 0.5273i 0.4090 - 0.8019i -0.1055 - 0.9597i
-0.7930 - 0.4270i -0.4297 + 0.1435i -0.1730 + 0.1408i -0.0814 + 0.0955i
Columns 9 through 16
-0.0438 + 0.0642i -0.0260 + 0.0442i -0.0167 + 0.0311i -0.0114 + 0.0221i
-0.0083 + 0.0155i -0.0064 + 0.0106i -0.0052 + 0.0066i -0.0046 + 0.0032i
Column 17
-0.0045 + 0.0000i
Columns 1 through 16
0.9997 0.9487 0.9002 0.9655 0.9007 0.4531 0.2230 0.1255
0.0778 0.0513 0.0353 0.0248 0.0176 0.0124 0.0084 0.0056
Column 171
0.0045
clear all
clc
PEF_A=(2/T)*tan(PEF_D/2)
SEF_A=(2/T)*tan(SEF_D/2)
[N,CF]=cheb1ord(PEF_A,SEF_A,alpha_P,alpha_S,s)
%Order and cutoff frequency
w=0:pi/16:pi;
display(Frequency Response is,)
Hw=freqz(num,den,w) %Frequency response
display(Magnitude Response is,)
Hw_mag=abs(Hw) %Magnitude response
plot(w/pi,Hw_mag,k);grid;
title(Magnitude Response of Chebyshev 3rd Order Lowpass Filter,fontweight,b);
xlabel(Normalised frequency, \omega/\pi,fontweight,b);
ylabel(Magnitude,fontweight,b);
OUTPUT
alpha_P = 1.9382
alpha_S = 13.9794
PEF_A = 0.6498
SEF_A = 1.0995
N = 3
CF = 0.6498
Chapter 7 - IIR Filters 7. 140
Normalised Transfer Function is,
Transfer function:
0.3333
s^3 + 0.7489 s^2 + 1.03 s + 0.3333
Sampling time: 1
Columns 1 through 8
1.0000 0.5843 - 0.6284i 0.1071 - 0.8164i -0.8586 - 0.3985i
-0.2173 + 0.1864i -0.0539 + 0.0878i -0.0184 + 0.0427i -0.0073 + 0.0223i
Columns 9 through 16
-0.0031 + 0.0120i -0.0014 + 0.0065i -0.0006 + 0.0035i -0.0002 + 0.0018i
-0.0001 + 0.0008i -0.0000 + 0.0003i -0.0000 + 0.0001i -0.0000 + 0.0000i
Column 17
0.0000 + 0.0000i
Columns 1 through 16
1.0000 0.8581 0.8234 0.9466 0.2863 0.1030 0.0465 0.0234
0.0124 0.0067 0.0035 0.0018 0.0008 0.0003 0.0001 0.0000
Column 17
0.0000
7.12. Exercises
I. Fill in the blanks with appropriate words
1. The two popular techniques used to approximate the ideal frequency response are –––––– and –––––
approximation.
2. The two techniques used to transform analog filter to digital filter are –––––– and ––––––
transformations.
3. The two properties which are preserved in analog to digital transformation are –––––– and ––––––.
4. The tolerance in the passband and stopband are called ––––––.
5. In –––––– transformation the impulse response of digital filter is the sampled version of the impulse
response of analog filter.
6. In impulse invariant (or bilinear) mapping the –––––– poles of s-plane are mapped into –––––– of unit
circle in z-plane.
7. In impulse invariant (or bilinear) mapping the right half poles of s-plane are mapped into _______ of unit
circle in z-plane.
8. In impulse invariant (or bilinear) mapping the poles on the imaginary axis in s-plane are mapped into the
–––––– in z-plane.
9. In –––––– transformation any strip of width 2p/T in s-plane is mapped into the entire z-plane.
10. The phenomena of high frequency components acquiring the identity of low frequency components is
called ––––––.
11. The impulse invariant mapping is –––––– mapping whereas bilinear mapping is ––––––.
12. The distortion in frequency axis due to nonlinear relationship between analog and digital frequency is
called ––––––.
13. In bilinear transformation the effect of warping on –––––– can be eliminated by –––––– the analog filter.
14. In –––––– approximation the magntidue response is maximally flat at the ––––––.
15. In Butterworth approximation the –––––– is –––––– decreasing function of frequency.
16. At the cutoff frequency the magnitude of the Butterworth filter is –––––– times the maximum value.
17. In type-1 Chebyshev approximation the magnitude response is –––––– in the passband and –––––– in
the stopband.
18. In type-2 Chebyshev approximation the magnitude response is monotonic in the –––––– and equiripple
in the ––––––.
19. The type-2 magnitude response is also called –––––– response.
20. In Chebyshev approximation, the normalized magnitude response has a value of –––––– at the c u t o f f
frequency.
Answers
1. Butterworth, 8. unit circle 15. magnitude function,
Chebyshev monotonically
2. impulse invariant, 9. impulse invariant 16. 1 2 or 0.707
bilinear
3. stability, causality 10. aliasing 17. equiripple,monotonic
4. ripples 11. many-to-one, one-to-one 18. passband, stopband
5. impulse invariant 12. frequency warping 19. inverse Chebyshev
6. left half, interior 13. amplitude response, prewarping 20. 1 1+ ∈2
7. exterior 14. Buttrerworth, origin
Chapter 7 - IIR Filters 7. 142
II.State whether the following statements are True/False
1. In IIR filters all the samples of impulse response are considered.
2. For direct relationship between analog and digital frequency, the imaginary axis in s-plane should map
into unit circle in z-plane.
3. In analog to digital transformation the stability is preserved by mapping left half of s-plane into the
interior of unit circle in the z-plane.
4. The bandwidth of the discrete signal is not affected by sampling frequency.
5. For a stable analog filter the poles should lie on the right half of s-plane.
6. For a stable digital filter the poles should lie on the unit circle.
7. The IIR filters will not have linear phase characteristics.
8. In impulse invariant transformation the frequency response characteristics of the analog filter is preserved.
9. In impulse invariant transformation the aliasing can be minimized by increasing the sampling time.
10. In impulse invariant transformation aliasing problem will arise if the sampling rate does not satisfy the
Nyquist criteria.
11. Using impulse invariant transformation, only band limited analog filter can be transformed to digital
filter without aliasing.
12. In impulse invariant transformation the problem of aliasing is due to many-to-one mapping.
13. In impulse invariant transformation the relation between analog and digital frequency is nonlinear.
14. In bilinear transformation the relation between analog and digital frequency is linear.
15. A linear phase analog filter can be transformed to linear phase digital filter using bilinear transformation.
16. In bilinear transformation the magnitude response of analog filter can be preserved by prewarping.
17. The poles of the Butterworth transfer function symmetrically lies on an unit circle in s-plane with angular
spacing of 2p/2N.
18. In Butterworth (or Chebyshev) approximation the magnitude response approaches the ideal response
as the order is increased.
19. In Chebyshev approximation the approximation function is selected such that the error is minimized over
a prescribed band of frequencies.
20. The poles of Chebyshev transfer function symmetrically lies on an ellipse in s-plane.
Answers
1. True 5. False 9. False 13. False 17. True
2. True 6. False 10. True 14. False 18. True
3. True 7. True 11. True 15. False 19. True
4. False 8. True 12. True 16. True 20. True
3
4. An analog filter transfer function is given by, H(s) = . When the filter is transformed to digital
s+1
filter using impulse invariant transformation, what are the poles and zeros of the filter?
a) Zero at z = 0, Pole at z = 0.368 b) Zero at z = 1, Pole at z = 0
c) Zero at z = 0.368, Pole at z = 0 d) Zero at z = 0, Pole at z = 1
5. The digital lowpass Chebyshev filter with following specification is realized using impulse invariant
transformation. What should be the attenuation constant and order N of the filter?
0.75 £ |H(w )| £ 1.0 ; 0 £ w £ 0.4p
|H(w )| £ 0.05 ; 0.5p £ w £ p
a) 0.9, N ≥ 10 b) 0.1, N ≤ 20 c) 0.882, N ≥ 6 d) 0.7, N ≤ 5
6. In Impulse invariant transformation the digital frequency 'w ' for a given analog frequency, W is
given by,
Ω T
a) ω = ΩT b) ω= c) ω = d) ω = tan ΩT
T Ω
0.3
7. In Impulse invariant transformation the analog system with transfer function, H(s) = is
s + 0.7
transformed to a digital system with transfer function,
−0.3 0.3
a) H(s) = b) H( s) =
1 − e −0.7 T z−1 1− e −0.7 T −1
z
0.7 0.7
c) H(s) = d) H( s) =
1 − e −0.3T z−1 1 − e0.3T z−1
0.2
8. In bilinear transformation the analog system with transfer function, H(s) = is
s + 0.9
transformed to a digital system with transfer function,
0.2 0.2
a) H ( s) = b) H ( s) =
2 1+z −1 T 1+z −1
+ 0.9 + 0.9
T 1− z −1 2 1− z −1
0.2 0.2
c) H ( s) = d) H (s) =
2 1 − z −1 T 1 − z −1
T 1 + z −1
+ 0.9 2 1 + z −1
+ 0.9
9. The transfer function of a normalized lowpass filter can be transformed to a highpass filter with cutoff
frequency, W c by the transformation,
1 Ωc s
a) s → b) s → c) s → d) s → Ωc
s s Ωc
Chapter 7 - IIR Filters 7. 144
10. The zeros of the Butterworth filters exist at
a) left half of s-plane. b) Origin
c) Infinity d) Right half of s-plane
11. The poles of Butterworth transfer function lie,
a) Symmetrically on a circle in s-plane
b) Symmetrically on an ellipse in s-plane
c) Antisymmetrically on a circle in s-plane
d) Antisymmetrically on an ellipse in s-plane
12. The poles of Buttterworth transfer function symmetrically lies on a circle in s-plane with angular
spacing,
π π 2π π
a) b) c) d)
N 2N N N2
13. In Butterworth and Chebyshev transfer function, when N is even, the nature of poles are,
a) Complex and exist as conjugate pair
b) Complex but not conjugate pairs
c) One pole is complex and other poles are real
d) One pole is real and other poles are complex
14. The Butterworth and Chebyshev transfer function, when N is odd, the nature of poles are,
a) Complex and exist as conjugate pair
b) Complex but not conjugate pairs
c) One pole is complex and other poles are real
d) One pole is real and other poles are complex
15. Consider the digital lowpass butterworth filter with following specification.
0.9 £ |H(w )| £ 1.0 ; 0 £ w £ 0.2p
|H(w )| £ 0.1 ; 0.4p £ w £ p
What should be the order of the filter to realize the above specifications using bilinear transformation?
a) N ≥ 3 b) N ≥ 20 c) N ≥ 4 d) N ≥ 5
16. The relation between analog and digital frequency is nonlinear in case of
a) Impulse invariant transformation. b) Bilinear transformation.
c) Frequency sampling. d) All the above.
17. The normalized transfer function of 3rd order lowpass Butterworth filter is
1 1
a) 3
b)
. s2n + sn + 1
s + 1414 (sn + 1) (s2n + sn + 1)
1 1
c) 2
d)
s ( sn + 1) s3n + s2n + sn + 1
7. 145 Digital Signal Processing
18. The unnormalized transfer function of lowpass Butterworth filter is obtained from normalized transfer
function by replacing sn by,
sn s
a) b) sn Ω c c) d) s Ωc
Ωc Ωc
19. Which of the following is true for a Chebyshev analog filter?
a) In type-1, the magnitude response is monotonic in passband and equiripple in stopband.
b) In type-1 the manitude response is monotonic in passband and stopband.
c) In type-2 the magnitude response is equiripple in passband and stopband.
d) In type-2 the magnitude response is monotonic in passband and equiripple in stopband.
20. The poles of Chebyshev transfer function lie,
a) Symmetrically on a circle in s-plane
b) Symmetrically on an ellipse in s-plane
c) Antisymmetrically on a circle in s-plane
d) Antisymmetrically on an ellipse in s-plane
Answers
1. c 5. c 9. b 13. a 17. b
2. b 6. a 10. c 14. d 18. c
3. d 7. b 11. a 15. a 19. d
4. a 8. c 12. a 16. b 20. b
s + 0.7
E7.2. Convert the analog filter with system transfer function, H(s) = into a digital IIR
s 2 + 1.4 s + 4.49
filter by means of the impulse invariant method.
E7.3. Using impulse invariant transformation convert the following analog filter transfer function to
1
digital filter transfer function by taking sampling time, T = 0.5 second, H(s) = 2 .
s + 2 s + 10
0.8
E7.4. For the analog transfer function, H(s) = , determine H(z) using bilinear
s 2 + 1.6s + 9.64
transformation if (a) T = 1 second and (b) T = 0.6 second.
4s
E7.5. Obtain H(z) from H(s) when T = 1 second and H(s) = .
(s + 0.5)(s + 4)
0.6 s 3
E7.6. Obtain H(z) from H(s) when T = 0.1 second, and H(s) = .
s + 4 s 2 + 0.9 s + 1
3
E7.7. Convert the analog filter with system function H(s) into digital filter using bilinear transformation.
(s + 0.1)
H(s) = ; Take, T = 0.2
(s + 0.1)2 + 5
E7.8. Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.2 second,
to satisfy the following specifications.
Alternate specification,
0.8 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.4p Passband ripple £ 1.9382 dB
|H(ejw )| £ 0.3 ; for 0.7p £ w £ p Stopband attenuation ³ 10.4576 dB
Passband edge frequency = 0.4p rad/sample
Draw direct form-I and II structure of the filter. Verify
Stopband edge frequency = 0.7p rad/sample
the design by sketching the frequency response.
E7.9. Design a Butterworth digital IIR highpass filter using bilinear transformation by taking T = 0.2 second,
to satisfy the following specifications.
Alternate specification,
0.8 £ |H(ejw )| £ 1.0 ; for 0.7p £ w £ p Passband ripple £ 1.9382 dB
|H(ejw )| £ 0.3 ; for 0 £ w £ 0.4p Stopband attenuation ³ 10.4576 dB
Passband edge frequency = 0.7p rad/sample
Draw direct form-I and II structure of the filter. Verify Stopband edge frequency = 0.4p rad/sample
the design by sketching the frequency response.
E7.10. Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.3 second,
to satisfy the following specifications.
Alternate specification,
0.45 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.675p
Passband ripple £ 6.9357 dB
|H(ejw )| £ 0.15 ; for 0.8p £ w £ p Stopband attenuation ³ 16.4781 dB
Passband edge frequency = 0.675p rad/sample
Draw direct form-I and II structure of the filter. Verify
Stopband edge frequency = 0.8p rad/sample
the design by sketching the frequency response.
7. 147 Digital Signal Processing
E7.11. Design a Butterworth digital IIR highpass filter using bilinear transformation by taking
T = 0.3second, to satisfy the following specifications. Alternate specification,
0.45 £ |H(ejw )| £ 1.0 ; for 0.8p £ w £ p Passband ripple £ 6.9357 dB
|H(ejw )| £ 0.15 ; for 0 £ w £ 0.675p Stopband attenuation ³ 16.4781 dB
Passband edge frequency = 0.8p rad/sample
Draw direct form-I and II structure of the filter. Verify
Stopband edge frequency = 0.675p rad/sample
the design by sketching the frequency response.
E7.12. Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking
T = 0.8second, to satisfy the following specifications. Alternate specification,
0.8 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.3p Passband ripple £ 1.9382 dB
|H(ejw )| £ 0.3 ; for 0.7p £ w £ p Stopband attenuation ³ 10.4576 dB
Passband edge frequency = 0.3p rad/sample
Draw direct form-I and II structure of the filter. Verify
Stopband edge frequency = 0.7p rad/sample
the design by sketching the frequency response.
E7.13. Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking
T = 1second, to satisfy the following specifications. Alternate specification,
0.45 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.5p Passband ripple £ 6.9357 dB
|H(ejw )| £ 0.15 ; 0.8p £ w £ p Stopband attenuation ³ 16.4781 dB
Passband edge frequency = 0.5p rad/sample
Draw direct form-I and II structure of the filter. Verify
Stopband edge frequency = 0.8p rad/sample
the design by sketching the frequency response.
E7.14. Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking
T = 1second, to satisfy the following specifications.
Alternate specification,
0.9 £ |H(ejw )| £ 1.0 ; for 0.3981p £ w £ p Passband ripple £ 0.9151 dB
|H(ejw )| £ 0.35 ; for 0.3981p £ w £ p Stopband attenuation ³ 9.1186 dB
Passband edge frequency = 0.25p rad/sample
Draw direct form-I and II structure of the filter. Verify
Stopband edge frequency = 0.3981p rad/sample
the design by sketching the frequency response.
E7.15. Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking
T = 0.6second, to satisfy the following specifications. Alternate specification,
0.6 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.3p Passband ripple £ 4.4370 dB
jw
Stopband attenuation ³ 33.9794 dB
|H(e )| £ 0.02 ; 0.575p £ w £ p Passband edge frequency = 0.3p rad/sample
Draw direct form-I and II structure of the filter. Stopband edge frequency = 0.575p rad/sample
E7.16. Design a Chebyshev digital IIR lowpass filter using impulse invariant transformation by taking
T = 1second, to satisfy the following specifications. Alternate specification,
0.87 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.25p Passband ripple £ 1.2096 dB
Stopband attenuation ³ 9.1136 dB
|H(ejw )| £ 0.35 ; for 0.375p £ w £ p
Passband edge frequency = 0.25p rad/sample
Draw direct form-I and II structure of the filter. Stopband edge frequency = 0.375p rad/sample
E7.17. Design a Chebyshev digital IIR lowpass filter using bilinear transformation by taking T = 0.5second,
to satisfy the following specifications. Alternate specification,
0.9 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.25p Passband ripple £ 0.9151 dB
Stopband attenuation ³ 9.1186 dB
|H(ejw )| £ 0.35 ; for 0.375p £ w £ p
Passband edge frequency = 0.25p rad/sample
Draw direct form-I and II structure of the filter. Stopband edge frequency = 0.375p rad/sample
Chapter 7 - IIR Filters 7. 148
Answers
1 − 01938
. z −1
E7.1 a) H(z) =
1 − 01536
. z + 0.0025z −2
−1
(s + 1) A B
H(s) = = +
(s + 2) (s + 4) s + 2 s + 4
(s + 1) −2 + 1 −1
A= × (s + 2) = = = −0.5
(s + 2) (s + 4) s = −2
−2+4 2
(s + 1) −4 + 1 −3 3
B= × (s + 4) = = = = 1.5
(s + 2) (s + 4) s = −4
−4 + 2 −2 2
−0.5 15
.
∴ H(s) = +
s+2 s+4
By impulse invariant transformation we know that,
Ai Ai
→
s + pi (is transformed to )
1 − e − p i T z −1
−0.5 1.5
∴ H(z) = + ; where, p1 = 2 and p2 = 4
1 − e − p1T z −1 1 − e − p 2 T z −1
−0.5 1.5
H(z) = +
1 − e–2 T z−1 1 − e –4 T z−1
(a) When T = 1 second
−0.5 1.5
H(z) = −2 −1
+
1− e z 1 − e −4 z −1
−0.5 1.5 −0.5(1 − 0.0183z −1) + 1.5(1 − 0.1353z −1)
H(z) = −1
+ −1
=
1 − 0.1353z 1 − 0.0183z (1 − 0.1353z −1) (1 − 0.0183z −1)
−0.5 + 0.0092z −1 + 1.5 − 0.203z −1 1 − 0.1938 z −1
= =
1 − 0.0183 z −1 − 01353z
. −1
+ 0.0025z −2 1 − 0.1536z −1 + 0.0025z −2
Alternatively,
1 − 0.1938 z −1 1 − 0.1938 z −1
H(z) = = −2 2
−1
1 − 0.1536 z + 0.0025 z −2
d
z z − 0.1536 z + 0.0025 i
z 2 − 0.1938 z
= 2
z − 0.1536 z + 0.0025
−0.5 1.5
H(z) = +
1 − e −1 z −1 1 − e −2 z −1
−0.5 1.5 −0.5(1 − 0.1353z −1) + 1.5(1 − 0.3679z −1)
= −1
+ −1
=
1 − 0.3679z 1 − 0.1353z (1 − 0.3679z −1) (1 − 0.1353z −1)
−0.5 + 0 .0677z −1 + 1.5 − 0.5519 z −1 1 − 0.4842 z −1
= −1 −1 −2
=
1 − 0.1353 z − 0.3679z + 0.0498 z 1 − 0.5032 z −1 + 0.0498 z −2
Alternatively,
1 − 0.4842 z −1 1 − 0.4842 z −1
H(z) = = −2 2
−1
1 − 0 . 5032 z + 0.0498 z −2
d
z z − 0 . 5032z + 0.0498 i
z2 − 0.4842 z
= 2
z − 0 . 5032 z + 0.0498
E7. 2 DSP, Chapter 7 - IIR Filters
Since T < 1, we can compute magnitude normalized transfer function, HN(z)
0.5 × (1 − 0.4842z −1) 0.5 − 0.2421z −1
HN (z) = T × H(z) = −1 −2
=
1 − 0.5032z + 0.0498 z 1 − 0.5032z −1 + 0.0498z −2
Alternatively,
0.5 × (z2 − 0.4842z) 0.5z2 − 0.2421z
HN (z) = T × H(z) = =
z2 − 0.5032z + 0.0498 z2 − 0.5032z + 0.0498
0.5 0.5
∴ H(s) =
bs + 0.7 − j2g + bs + 0.7 + j2g
By impulse invariant transformation we know that,
Ai Ai
→ and let, T = 1
s + pi (is transformed to )
1 − e − pi T z −1
=
d i d
0.5 1 − e −0.7 e − j2 z −1 + 0.5 1 − e −0.7 e j2 z −1 i
d1− e −0.7
id
e j2 z −1 1 − e −0.7 e − j2 z −1 i
0.5 − 0.5e −0.7 e − j2 z −1 + 0.5 − 0.5 e −0.7 e j2 z −1
=
1 − e −0.7 e − j2 z −1 − e −0.7 e j2 z −1 + e −0.7 e j2 e −0.7 e − j2 z −2
=
1 − 0.5 e −0.7 z −1 e j2 + e − j2 d i =
b g
1 − 0.5 × 2cos 2 e −0.7 z −1
cosθ =
e jθ + e − jθ
1− e −0.7
z −1
de j2
+e − j2
i+e −1.4
z −2 1− e −0.7
z −1
b2cos 2g + e −14
.
z −2
2
=
b
1 − cos 2 e −0.7 z −1 g =
1+ 0.2067 z −1 Note : Evalutate cosq by keeping
calculator in radian mode.
b
1 − 2 cos 2 e g −0.7 −1
z +e −1.4
z −2
1 + 0.4133 z −1 + 0.2466 z −2
Alternatively,
1 + 0.2067 z −1 1 + 0.2067 z −1 z2 + 0.2067 z
H(z) = −1 −2
= −2 2 = 2
1 + 0 .4133 z + 0.2466 z z (z + 0 . 4133 z + 0. 2466) z + 0 . 4133 z + 0. 2466
E7.3. Using impulse invariant transformation convert the following analog filter transfer function to digital filter
transfer function by taking sampling time, T = 0.5 second.
The roots of the quadratic
1 s2 + 2s + 10 = 0 are
H(s) =
s 2 + 2 s + 10
−2 ± 22 − 4 × 10
Solution s=
2
1 1 −2 ± j6
Given that, H(s) = = = = −1 ± j3
2
s + 2 s + 10 s + 1 − j3 s + 1+ j3b gb g 2
− j0.1667 j0.1667
∴ H(s) = +
s + 1 − j3 s + 1 + j3
By impulse invariant transformation we know that,
Ai Ai
→
(is transformed to ) − p i T −1
and let, T = 0.5
s + pi −
1 e z
− j 0.1667 j0.1667 − j0.1667 j 0.1667
∴ H(z) = + = +
1 − e − (1− j3)T z −1 1 − e − (1+ j3)T z −1 1 − e −0.5 e j15
.
z −1 1 − e −0.5 e − j15
.
z −1
=
d
− j0.1667 1 − e −0.5 e − j15
.
i
z −1 + j 0.1667 1 − e −0.5 e j15
.
z −1 d i
d1− e −0.5
e j15
.
z id1− e
−1 −0.5
e − j15
.
z i
−1
=
− j0.1667 e −0.5 z −1 e j15
.
− e − j15
.
d i
1 − e −0.5 z −1 e j15
.
d
+ e − j15
.
+ e −1 z −2 i
=
− j0.1667 e −0.5 2 j sin1.5 z −1b g =
b
− j0.1667 2 sin1.5 e −0.5 z −1 g cosθ =
e jθ + e − jθ
, sinθ =
e jθ − e − jθ
1− e −0.5
z −1
b2 cos1.5g + e −1 −2
z 1 − b2 cos 1.5g e −0.5 −1 −1 −2
z +e z 2 2j
Alternatively,
0.8
E7.4. For the analog transfer function, H(s) = , determine H(z) using bilinear transformation if
s 2 + 1.6s + 9.64
(a) T = 1 second and (b) T = 0.6 second.
Solution
0.8
Given that, H(s) =
s2 + 1.6s + 9.64
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
0.8
∴ H(z) =
F 2 1− z I −1
2
F 2 1− z I + 9.64 −1
GH T 1+ z JK −1 + 1.6 GH T 1+ z JK −1
0.8
= 2
d i
4 1− z −1
+
d
3.2 1 − z −1 i + 9.64
T d1 + z i
2 −1
2
d
T 1 + z −1 i
0.8
=
−1 2 −1 2
d
4 1− z i + 3.2T 1 − z d
i d1+ z i + 9.64T d1+ z i
−1 −1 2
2
T d1 + z i 2 −1
2
0.8T d1 + z i 2 −1
= 2 2
(a + b) (a – b) = a2 – b2
d
4 1 − z −1 i + 3.2Td1− z i + 9.64T d1+ z i −2 2 −1
E7. 4 DSP, Chapter 7 - IIR Filters
(a) T = 1 second
2
∴ H(z) =
d
0.8 1 + z −1 i
2 2
d
4 1 − z −1 i d i
+ 3.2 1 − z −2 + 9.64 1 + z −1 d i
=
d
0.8 1 + 2z −1 + z −2 i
d
4 1 − 2z + z −1 −2
i + 3.2 d1− z i + 9.64 d1+ 2z −2 −1
+ z −2 i
. z −1 + 0.8z −2
0.8 + 16 0.8 + 1.6z −1 + 0.8z −2
= =
. z −1 + 10.44 z −2
16.84 + 1128 FG
16.84 1 +
11.28 −1 10.44 −2
z + z
IJ
H16.84 16.84 K
0.8 1.6 −1 0.8 −2
+ z + z
16.84 16.84 16 .84 0.0475 + 0.0950 z −1 + 0.0475 z −2
= =
1+
11.28 −1 10.44 −2
z + z 1 + 0.6698 z −1 + 0.6199 z −2
16.84 16.84
Alternatively,
0.0475 + 0.0950 z −1 + 0.0475 z −2 z −2 (0.0475 z2 + 0. 0950 z + 0.0475) 0.0475 z 2 + 0.0950 z + 0.0475
H(z) = = =
1 + 0.6698 z −1 + 0.6199 z −2 z −2 z2 + 0.6698 z + 0.6199 z2 + 0.6698 z + 0.6199 d i
(b) T = 0.6 second
2
H(z) =
d
0.8 × 0.62 1 + z −1 i
2 2
d
4 1 − z −1 i d
+ 3.2 × 0.6 1 − z−2 + 9.64 × 0.62 1 + z −1 i d i
=
d i
0 .288 1 + 2z −1 + z −2
d
4 1 − 2z + z −1 −2
i + 1.92d1− z i + 3.4704 d1+ 2z
−2 −1
+ z −2 i
0.288 + 0.576z −1 + 0.288z −2
=
9.3904 − 1.0592 z −1 + 5.5504 z −2
0.288 0.576 −1 0.288 −2
+ z + z
9.3904 9.3904 9.3904 0.0307 + 0.0613 z −1 + 0.0307 z −2
= =
1.0592 −1 5.5504 −2 1 − 0 .1128 z −1 + 0.5911z −2
1− z + z
9.3904 9.3904
Alternatively,
0.0307 + 0.0613 z −1 + 0.0307 z −2 z −2 (0.0307 z2 + 0.0613 z + 0.0307) 0.0307 z2 + 0.0613 z + 0.0307
H(z) = = =
1 − 0.1128 z −1 + 0.5911z −2 z −2 (z2 − 0 .1128 z + 0.5911) z 2 − 0 .1128 z + 0.5911
4s
E7.5. Obtain H(z) from H(s) when T = 1 second and H(s) = .
(s + 0.5)(s + 4)
Solution
4s 4s 4s
Given that, H(s) = = =
(s + 0.5)(s + 4) s2 + 4s + 0.5s + 2 s2 + 4.5 s + 2
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
2 1 − z −1 F I
8 (1 − z −1)
4
T 1+ z −1 GH JK
1 + z −1
∴ H(z) = = Put, T = 1
F
2 1 − z −1
2
I
2 1 − z −1
−1
4 (1 − z )F2
+
9 (1 − z −1)
+2 I
GH
T 1 + z −1
+ 4.5 JK
T 1 + z −1
+ 2 −1
(1 + z ) GH
2
1 + z −1 JK
8(1 − z −1)
(1 + z −1) 8(1 − z −1)(1 + z −1)
= −1 2 −1 −1 −1 2
=
4(1 − z ) + 9(1 − z ) (1+ z ) + 2 (1 + z ) 4(1 − z ) + 9 (1 − z −1) (1+ z −1) + 2 (1 + z −1)2
−1 2
−1 2
(1 + z )
8(1 − z −2 ) 8 − 8z −2 (a + b) (a – b) = a2 – b2
∴ H(z) = = (a + b)2 = a 2 + 2ab + b 2
4(1 − 2z + z ) + 9(1 − z ) + 2 (1 + 2z + z ) 15 − 4z −1 − 3z −2
−1 −2 −2 −1 −2
(a − b)2 = a 2 − 2ab + b 2
8 8 −2
− z
15 15 0 .5333 − 0. 5333 z −2
= =
4 −1 3 −2 1 − 0 . 2667 z −1 − 0.2 z −2
1− z − z
15 15
Alternatively,
0 .5333 − 0.5333 z −2 z −2 (0.5333z 2 − 0.5333) 0 .5333 z2 − 0.5333
H(z) = −1 −2
= −2 2 =
1 − 0 .2667 z − 0.2 z z (z − 0 .2667 z − 0.2) z2 − 0 .2667 z − 0.2
Solution for Exercise Problems E7. 5
0.6 s 3
E7.6. Obtain H(z) from H(s) when T = 0.1 second, and H(s) = .
s + 4 s 2 + 0.9 s + 1
3
Solution
0.6 s 3
Given that, H(s) =
s + 4 s2 + 0.9 s + 1
3
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
F 2 1− z I −1
3
GH T 1+ z JK
0.6 −1
∴ H(z) =
F 2 1− z −1 3
I + 4 F 2 1− z I + 0.9 F 2 1− z I + 1
−1 2 −1 Put, T = 0.1
GH T 1+ z −1 JK GH T 1+ z JK GH T 1+ z JK
−1 −1
4800(1 − z −1)3
(1 + z −1)3
=
8000 (1 − z −1)3 1600 (1 − z −1)2 18 (1 − z −1)
+ + +1
(1 + z −1)3 (1 + z −1)2 1 + z −1
4800(1 − z −1)3
(1 + z −1)3
=
8000 (1 − z −1)3 + 1600 (1 − z −1)2 (1 + z −1) + 18 (1 − z −1)(1 + z −1)2 + (1 + z −1)3
(1 + z −1)3
4800(1 − 3z −1 + 3z −2 − z −3 )
= −1 −2
8000 (1 − 3z + 3z − z ) + 1600 (1 − 2z −1 + z −2 )(1 + z −1) + 18 (1 − z −1) (1 + 2z −1 + z −2 ) + (1 + 3z −1 + 3z −2 + z −3 )
−3
Alternatively,
−3 3 2
0.4990 − 14970z
. −1
+ 1.4970 z −2 + 0.4990 z −3 z 0.4990 z − 1.4970z + 1.4970 z + 0.4990
H(z) = =
1 − 2.6592 z −1 + 2.3272 z −2 − 0.6671z −3 z −3 z3 − 2.6592 z2 + 2.3272 z − 0.6671
0.4990 z3 − 14970z
. 2
+ 14970
. z + 0.4990
= 3 2
z − 2 .6592 z + 2.3272 z − 0.6671
E7.7. Convert the analog filter with system function H(s) into digital filter using bilinear transformation.
(s + 0.1)
H(s) = ; Take, T = 0.2
(s + 0.1)2 + 5
Solution
s + 0.1 s + 0.1 s + 0.1
Given that, H(s) = 2
= 2 = 2
(s + 0.1) + 5 s + 0.2s + 0.01 + 5 s + 0.2s + 5.01
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
2 1 − z −1 2(1 − z −1)
+ 0.1 + 0.1
T 1+ z −1 T(1+ z −1)
∴ H(z) = =
F 2 1− z I −1
2
F 2 1− z I −1 4(1 − z −1)2 0.4(1 − z −1)
+ + 5.01
GH T 1+ z JK−1 GH T 1+ z JK
+ 0.2 −1
+ 5.01 T 2 (1+ z −1)2 T(1+ z −1)
2(1 − z −1) + 01
. × 0.2(1 + z −1) 0.2(1 + z −1) 0.4(1 − z −1)(1 + z −1) + 0.004(1 + z −1)2
= = Put, T = 0.2
−1 2 −2 2 −1 2
4(1 − z ) + 0.4 × 0.2(1 − z ) + 5.01× 0.2 (1 + z ) 4(1 − z −1)2 + 0.08 (1 − z −2 ) + 0.2004 (1 + z −1)2
E7. 6 DSP, Chapter 7 - IIR Filters
0.4(1 − z −2 ) + 0.004 (1 + 2z −1 + z −2 )
∴ H(z) =
4(1 − 2z + z −2 ) + 0.08 (1 − z −2 ) + 0.2004 (1 + 2z −1 + z −2 )
−1
E7.8. Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.2second, to satisfy the
following specifications.
0.8 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.4p
|H(ejw )| £ 0.3 ; for 0.7p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 1.9382 dB
Stopband attenuation ³ 10.4576 dB
Passband edge frequency = 0.4p rad/sample
Stopband edge frequency = 0.7p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −1 .9382 / 20 g = 0.8
As = 10
e −α s,dB / 20 j = 10 b −10.4576 / 20 g = 0.3
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.4p rad/sample
Stopband edge digital frequency, w s = 0.7p rad/sample
Gain in normal value at passband edge, Ap = 0.8
Gain in normal value at stopband edge, As = 0.3
Sampling time, T = 0.2second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.8 Gain is same in analog
Gain in normal value at stopband edge, As = 0.3 and digital filter.
2 ωp
Passband edge analog frequency, Ωp = tan Using equation (7.53).
T 2
2 0.4π
= tan = 7.2654 rad / second
0.2 2
2 ω Using equation (7.54).
Stopband edge analog frequency, Ω s = tan s
T 2
2 0.7 π
= tan = 19.6261rad / second
0.2 2
Order of the filter
N 2
Here, N = 2, ∴ k = 2
= 2
=1
1
b g
∴ H sn =
sn2 + b1 sn + 1
Calculate sinq using
When k = 1 ; bk = b1 = 2 sin LM b g OP = 1.4142
2 −1 π calculator in radian mode.
N Q2×2
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
b g
H(s) = H sn
s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
sn2 + 1.4142 sn + 1 s s
sn = n =
Ωc Ωc
1 1
= = 2
s2 s s + 1.4142 Ω cs + Ω 2c
+ 1.4142 +1
Ω 2c Ωc Ω 2c
Ω 2c .
110061 2
= 2 2
= 2 2
s + 1.4142 Ω cs + Ω c s + 1.4142 × 11.0061s + 110061
.
121.1342
=
s 2 + 15.5648 s + 1211342
.
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
.
1211342
H(z) = H(s) =
s 2 + 15.5648 s + 1211342
.
2 1− z −1 2 1− z −1
s= s=
T 1+ z −1 T 1+ z −1
.
1211342 1211342
.
= =
F 2 1− z I −1
2
F 2 1− z I −1
4 d1 − z i −1
2
311296
. d
1 − z −1 i + 1211342
GH T 1+ z JK −1
+ 15. 5648 G
H T 1+ z JK + 1211342
. −1 + .
T d1 + z i 2 −1
2
d
T 1 + z −1 i
.
1211342
= 2 2
d
4 1− z −1
i + 311296
. d id
T 1 − z −1 1 + z −1 + 1211342
. i
T 2 1 + z −1 d i
2
d
T 2 1 + z −1 i
.
1211342 × 0.22 (1 + 2z −1 + z −2 )
= Put, T = 0.2
d
4 1 − 2z + z −1 −2
i + 311296
. × 0.2 d1 − z i + 1211342
. × 0.2 d1 + 2z
−2 2 −1
+ z −2 i
4 .8454(1 + 2z −1 + z −2 )
=
d
4 1 − 2z + z −1 −2
i + 6.2259 d1− z i + 4.8454 d1+ 2z
−2 −1
+ z −2 i
4.8454 9.6908 −1 4.8454 −2
+ z + z
4 . 8454 + 9.6908 z −1 + 4 .8454 z −2 15.0713 15.0713 15.0713
= =
−1
15.0713 + 1.6908 z + 2 .6195 z −2 1.6908 −1 2.6195 −2
1+ z + z
15.0713 15.0713
0.3215 + 0.643z −1 + 0.3215 z −2
=
1 + 01122
. z −1 + 01738
. z −2
E7. 8 DSP, Chapter 7 - IIR Filters
Alternatively,
H(z) =
−2 2
0.3215 + 0.643 z −1 + 0.3215 z −2 z 0.3215 z + 0.643 z + 0.3215
= =
d
0.3215 z 2 + 0.643 z + 0.3215 i
−1
1 + 0.1122 z + 0.1738 z −2 − 2 2
z z + 0.1122 z + 0.1738 d
z 2 + 0.1122 z + 0.1738 i
Direct form-I structure of digital IIR lowpass filter
X (z ) 0.3215 X(z) Y (z )
0.3215 + +
−1 −1
z z
−1
0.643 z X(z) −0.1122 z −1Y(z)
z −1X(z) −1
z Y(z)
0.643 + + −0.1122
−1 −1
z z
−2 −2
−2
z X(z) 0.3215 z X(z) −0.1738 z Y(z) −2
0.3215 −0.1738 z Y(z)
−1
z
−0.1122 z −1W(z)
0.643 z −1W(z)
z −1W(z)
+ −0.1122 0.643 +
−1
z
−2
−0.1738z W (z)
z −2 W( z) 0.3215 z −2 W(z)
−0.1738 0.3215
=
b g
0.3215 + 0.643 cos ω − j sin ω + 0.3215 cos 2ω − j sin 2ω b g
b g
1 + 0.1122 cos ω − j sin ω + 0.1738 cos 2ω − j sin 2ω b g
=
b0.3215 + 0.643 cos ω + 0.3215 cos 2ωg + jb−0.643 sin ω − 0.3215 sin 2ωg
b1+ 0.1122 cos ω + 0.1738 cos 2ωg + jb−0.1122 sin ω − 0.1738 sin 2ωg
Solution for Exercise Problems E7. 9
d i
Let, H e jω =
d i = b0.3215 + 0.643 cos ω + 0.3215 cos 2ωg + jb−0.643 sin ω − 0.3215 sin 2ωg
HN e jω
d i b1+ 0.1122 cos ω + 0.1738 cos 2ωg + jb−0.1122 sin ω − 0.1738 sin 2ωg
HD e jω
|H (e jω)|
1.0
0.9
0.8
Ω cT
ω c = 2 tan−1 GH 2 JK
0.707
0.7
0.6 = 2 tan −1
FG 11.0061 × 0.2 IJ
H 2 K
0.5 1.6665
= 1.6665 = ×π
π
0.4
= 0.53 π rad / sample
0.3
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10 π 11π 12 π 13π 14 π 15π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ω = 0.53π ( π)
c
E7.9. Design a Butterworth digital IIR highpass filter using bilinear transformation by taking T = 0.2second, to satisfy the
following specifications.
0.8 £ |H(ejw )| £ 1.0 ; for 0.7p £ w £ p
jw
|H(e )| £ 0.3 ; for 0 £ w £ 0.4p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
E7. 10 DSP, Chapter 7 - IIR Filters
Alternatively,
Passband ripple £ 1.9382 dB
Stopband attenuation ³ 10.4576 dB
Passband edge frequency = 0.7p rad/sample
Stopband edge frequency = 0.4p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −1 .9382 / 20 g = 0.8
As = 10
e −α s,dB / 20 j = 10 b −10.4576 / 20 g = 0.3
Solution
Specifications of digital IIR highpass filter
Passband edge digital frequency, w p = 0.7p rad/sample
Stopband edge digital frequency, w s = 0.4p rad/sample
Gain in normal value at passband edge, Ap = 0.8
Gain in normal value at stopband edge, As = 0.3
Sampling time, T = 0.2second
The highpass filter is designed via lowpass filter using frequency transformation technique. Hence the given specifications of IIR
highpass filter are converted to corresponding specification of IIR lowpass filter.
Specifications of digital IIR lowpass filter
The specification of lowpass filter is obtained by taking passband edge of highpass as stopband edge of lowpass and stopband
edge of highpass as passband edge of lowpass. The gain of passband and stopband remain same.
\ Passband edge digital frequency, w p = 0.4p rad/sample
\ Stopband edge digital frequency, w s = 0.7p rad/sample
Gain in normal value at passband edge, Ap = 0.8
Gain in normal value at stopband edge, As = 0.3
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.8
Gain is same in analog
Gain in normal value at stopband edge, As = 0.3 and digital filter.
For bilinear transformation,
2 ωp
Passband edge analog frequency, Ωp = tan
T 2 Using equation (7.53).
2 0.4π
= tan = 7.2654 rad / second
0.2 2
2 ω
Stopband edge analog frequency, Ω s = tan s Using equation (7.54).
T 2
2 0.7 π
= tan = 19.6261rad / second
0.2 2
Order of the filter
LM
e1 / A 2 j − 1
log F s I
OP
log
LM
e1/0.32 j − 1 OP10.1111 LM OP
log
N1 =
1 MN
H 1 / Ap K − 1 1
2
=
PQ MN
e1/0.8 2 j − 1 1
=
PQ
0. 5625 N
= 14536
. Q Using equation (7.57).
2 Ωs 2 19.6261 2 19.6261
log log log
Ωp 7.2654 7 .2654
For even N,
N
2
1
b g ∏s
H sn = 2
n + b k sn + 1 Using equation (7.58).
k =1
1
b g
∴ H sn =
sn2 + b1 sn + 1
∴ H(s) = H sn b g Ωc
sn =
s
1
∴ H(s) = H sn b g Ω
=
sn2 + 1.4142 sn + 1 Ωc
sn = c sn =
s s
1 1 s2
= = = 2
Ω 2c Ωc Ω 2c + 14142
. Ωcs + s 2
s + 1.4142 Ω cs + Ω 2c
2 + 1.4142 +1 2
s s s
s2 s2
= =
s2 + 1.4142 × 11.0061s + 110061
. 2
s2 + 15.5648 + 1211342
.
Digital IIR highpass filter transfer function, H(z)
For bilinear transformation,
s2
H(z) = H(s) = 2
s + 15.5648 s + 1211342
.
2 1− z −1 2 1− z −1
s= s=
T 1+ z −1 T 1+ z −1
2
F 2 1− z I −1
2 d i
4 1 − z −1
GH T 1+ z JK −1 T d1 + z i
2 −1
2
= =
F 2 1− z −1
2
I + 15.5648 F 2 1− z I + 1211342 4 d1 − z i −1 −1
2
311296
. d1− z i + 1211342
−1
GH T 1+ z −1 JK GH T 1+ z JK . −1 2 +
T d1 + z i −1
.
T d1 + z i 2 −1
2
d i 4 1 − z −1
2
T d1 + z i 2 −1
= 2 2
4 d1 − z i + 311296
−1
. T d1 − z id1 + z i + 1211342
. T d1 + z i −1 −1 2 −1
2
T d1 + z i 2 −1
2
4 d1 − z i −1
= 2 2 Put, T = 0.2
4 d1 − z i + 311296
−1
. Td1 − z id1 + z i + 1211342
. T d1 + z i−1 −1 2 −1
4 d1 − 2z + z i −1 −2
=
4 d1 − 2 z + z i + 311296
−1
. × 0.2 d1 − z i + 1211342
−2
. × 0.2 d1 + 2z + z i −2 2 −1 −2
4 d1 − 2z + z i −1 −2
4 − 8z + 4z −1 −2
= =
4 d1 − 2z + z i + 6.2259 d1 − z i + 4 .8453 d1 + 2z + z i 15 .0712 + 1.6906 z + 2.6194 z
−1 −2 −2 −1 −2 −1 −2
4 8 4
− z −1 + z −2
15 .0712 15 .0712 15.0712 0.2654 − 0.5308 z −1 + 0.2654z −2
= =
1.6906 −1 2 .6194 −2 1 + 0.1122 z −1 + 0.1738 z −2
1+ z + z
15 .0712 15 .0712
Alternatively,
H(z) =
−2 2
0.2654 − 0.5308 z −1 + 0.2654 z −2 z 0.2654 z − 0.5308 z + 0.2654
= =
d
0.2654 z2 − 0.5308 z + 0.2654 i
−1
1 + 0.1122 z + 0.1738 z −2 − 2 2
z z + 0.1122 z + 0.1738 z2 + 0.1122 z + 0.1738 d i
E7. 12 DSP, Chapter 7 - IIR Filters
Direct form-I structure of digital IIR highpass filter
Y(z) 0.2654 − 0.5308 z −1 + 0.2654 z −2
Let, H(z) = =
X(z) 1 + 0.1122 z −1 + 0.1738 z −2
On cross multiplying the above equation we get,
Y(z) + 0.1122z–1Y(z) + 0.1738z–2Y(z) = 0.2654X(z) – 0.5308z–1X(z) + 0.2654z–2X(z)
\ Y(z) = 0.2654X(z) – 0.5308z–1X(z) + 0.2654z–2X(z) – 0.1122z–1Y(z) – 0.1738z–2Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
X (z ) 0. 2654 X(z) Y (z )
0.2654 + +
−1 −1
z z
−0.5308 z −1 X(z) −0.1122 z −1Y(z)
z −1X(z) −1
z Y(z)
−0.5308
+ + −0.1122
−1 −1
z z
−2
z −2 X(z) 0. 2654 z X( z) −0.1738 z −2 Y(z) −2
0.2654 −0.1738 z Y(z)
F ig 1 : D irec t fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR hig h p ass filter.
Direct form-II structure of digital IIR highpass filter
Y(z) W(z) Y(z) 0.2654 − 0.5308 z −1 + 0.2654 z −2
Let, H(z) = = × =
X(z) X(z) W(z) 1 + 0.1122 z −1 + 0.1738 z −2
W(z) 1
where, = .....(2)
X(z) 1 + 0.1122 z −1 + 0.1738 z −2
Y( z )
= 0.2654 − 0.5308 z −1 + 0.2654 z −2 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) + 0.1122z–1W(z) + 0.1738z–2W(z) = X(z)
\ W(z) = X(z) – 0.1122z–1W(z) – 0.1738z–2W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.2654W(z) – 0.5308z–1W(z) + 0.2654z–2W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
−1
z
−0.1122 z −1W(z) −0.5308 z −1W( z)
z −1W(z)
+ −0.1122 −0.5308 +
−1
z
−2
−0.1738z W (z)
z −2 W( z) 0. 2654 z −2 W(z)
−0.1738 0.2654
F ig 2 : D irec t fo rm -II stru cture o f 2 n d o rder dig ita l IIR hig h pa ss filter.
Frequency Response, H(ejww )
=
0.2654 − 0.5308 e + 0.2654 e− jω − j2 ω
=
b g
0.2654 − 0.5308 cos ω − j sin ω + 0.2654 cos 2ω − j sin 2ω b g
1 + 0.1122 e − jω + 0.1738 e − j2ω b
1 + 0.1122 cos ω − j sin ω + 01738
. g b
cos 2ω − j sin 2ω g
b0.2654 − 0.5308 cos ω + 0.2654 cos 2ωg + j b0.5308 sinω − 0.2654 sin 2ωg
=
b1+ 0.1122 cos ω + 0.1738 cos 2ωg + jb−0.1122 sin ω − 0.1738 sin 2ωg
H de i b0.2654 − 0.5308 cos ω + 0.2654 cos 2ω g + j b0.5308 sin ω − 0.2654 sin 2ω g
N
jω
Let, Hde i =
jω
=
H de i
D
jω
b1+ 0.1122 cos ω + 0.1738 cos 2ωg + jb−0.1122 sin ω − 0.1738 sin 2ωg
where, HN(ejw ) = (0.2654 – 0.5308cosw + 0.2654cos2w) + j(0.5308sinw – 0.2654sin2w)
HD(ejw ) = (1 + 0.1122cosw + 0.1738cos2w) + j(–0.1122sinw – 0.1738sin2w)
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various values of w and listed in
table 1. Using the values listed in table 1, the magnitude response of highpass filter is sketched as shown in fig 3.
Solution for Exercise Problems E7. 13
jw jw
TABLE 1: H(e ) and |H(e )| for various values of w .
w w
|H (e jω)|
1.0
0.9
0.8
0.707
0.7
0.6 ω c = 2 tan −1 GH Ω2 T JK
c
0.5
= 2 tan−1
FG 11.0061 × 0.2 IJ
0.4
H 2 K
1.6665
0.3 = 1.6665 = ×π
π
= 0.53 π rad / sample
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10 π 11π 12 π 13π 14 π 15π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ω = 0.53π ( π)
c
E7.10. Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.3second, to satisfy the
following specifications.
0.45 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.675p
|H(ejw )| £ 0.15 ; for 0.8p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 6.9357 dB
Stopband attenuation ³ 16.4781 dB
Passband edge frequency = 0.675p rad/sample
Stopband edge frequency = 0.8p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b−6.9357 / 20 g = 0.45
As = 10
e −α s,dB / 20 j = 10 b−16.4781 / 20 g = 0.15
E7. 14 DSP, Chapter 7 - IIR Filters
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.675p rad/sample
Stopband edge digital frequency, w s = 0.8p rad/sample
Gain in normal value at passband edge, Ap = 0.45
Gain in normal value at stopband edge, As = 0.15
Sampling time, T = 0.3second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.45
Gain in normal value at stopband edge, As = 0.15 Gain is same in analog
and digital filter.
For bilinear transformation,
2 ωp
Passband edge analog frequency, Ωp = tan
T 2 Using equation (7.53).
2 0.675π
= tan = 11.9042 rad / second
0.3 2
2 ω
Stopband edge analog frequency, Ω s = tan s
T 2 Using equation (7.54).
2 0.8π
= tan = 20.5179 rad / second
0.3 2
Order of the filter
LM e1/ A 2s j − 1O LM e1/0.15 2 j − 1O
P LM OP
log
MN e P
j − 1PQ
log
MN e j − 1PQ log
43.4445
N1 =
1 1/ A p2
=
1 1/0.45 2
=
1 N
3.9383 Q
= 2.2049
2 Ωs 2 log 20.5179 2 log 20.5179 Using equation (7.57).
log
Ωp 11.9042 11.9042
Choose order N, such that N ³ N1 and N is an integer.
Let, order, N = 3.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1 ∏s 2
n + bk sn + 1 Using equation (7.59).
k =1
1 1
b g
∴ H sn = ×
sn + 1 sn2 + b1 sn + 1
When k = 1 ; bk = b1 = 2 sin LM b g OP = 1
2 −1 π Calculate sinq using
N Q
2×3
calculator in radian mode.
1 1
b g
∴ H sn = =
(sn + 1) (sn2 + sn + 1) sn3 + sn2 + sn + sn2 + sn + 1
1
=
sn3 + 2 sn2 + 2 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g =
bs + 1g ds 2
+ sn + 1 i
sn = s n n sn = s
Ωc Ωc
Solution for Exercise Problems E7. 15
1 1
H(s) =
F s + 1I F s 2
s I = Fs+Ω IFs 2
+ sΩ c + Ω 2c I
GH Ω JK GH Ω
c
2
c
+
Ωc
+ 1J G
K H Ω JK GH c
c
Ω 2c JK
=
Ω 3c
=
b10.9432g 3
bs + Ω g ds
c
2
+ sΩ c + Ω 2c i bs + 10.9432g ds 2
+ 10.9432s + 10.9432 2 i
1310.4879
=
bs + 10.9432g ds 2
+ 10.9432s + 119.7536 i
1310.4879
= 3 2
s + 21.8864 s + 239. 5072s + 1310.4876
1310.4879
H(z) = H(s) =
s3 + 21.8864 s2 + 239.5072 s + 1310.4876
2 1− z −1 2 1− z −1
s= s=
T 1+ z −1 T 1+ z −1
1310.4879
=
F 2 1− z I −1
3
F 2 1− z I −1
2
F 2 1− z I + 1310.4876
−1
GH T 1+ z JK −1
+ 21.8864 G
H T 1+ z JK −1
+ 239.5072 GH T 1+ z JK −1
1310.4879
=
8(1 − z −1)3 87.5456 (1 − z −1)2 479.0144 (1 − z −1)
+ + + 1310.4876
T 3 (1 + z −1)3 T 2 (1 + z −1)2 T (1 + z −1)
35.3832 (1 + 3 z −1 + 3 z −2 + z −3 ) (a + b) (a – b) = a2 – b2
= −1 −2
8 (1 − 3 z + 3 z − z −3 ) + 26.2636 (1 − z −2 )(1 − z −1)
(a + b)3 = a 3 + 3a 2b + 3ab 2 + b 3
−1 −2 −1 −2 −3
+ 431113
. (1 + z )(1 − z ) + 35.3832 (1 + 3 z + 3 z +z ) (a − b)3 = a 3 − 3a 2b + 3ab 2 − b3
35.3832 + 106.1496 z + 106 .1496 z + 35.3832z −3
−1 −2
=
8 (1 − 3 z + 3 z −2 − z −3 ) + 26.2636 (1 − z −1 − z −2 + z −3 ) + 43.1113 (1 + z −1 − z −2 − z −3 )
−1
+ 35.3832 (1 + 3 z −1 + 3 z −2 + z −3 )
35.3832 106.1496 −1 106.1496 −2 35.3832 −3
+ z + z + z
35.3832 + 106.1496 z −1 + 106 .1496 z −2 + 35.3832z −3 112.7581 112.7581 112.7581 112.7581
= −1 −2 −3
=
112.7581 + 98.9973 z + 60.7747 z + 10.5355 z 98.9973 −1 60.7747 −2 10.5355 −3
1+ z + z + z
112.7581 112.7581 112.7581
0.3138 + 0.9414 z −1 + 0.9414 z −2 + 0.3138 z −3
=
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
Alternatively,
H(z) = =
−3 3 2
d
0.3138 + 0.9414 z −1 + 0.9414 z −2 + 0.3138 z −3 z 0.3138 z + 0.9414 z + 0.9414 z + 0.3138 i
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3 z −3 z3 + 0.8779 z2 + 0.5389 z + 0.0934 d i
0.3138 z3 + 0.9414 z2 + 0.9414 z + 0.3138
=
z3 + 0.8779 z2 + 0.5389 z + 0.0934
Direct form-I structure of digital IIR lowpass filter
−1 −1
z z
−1 0.9414z −1X(z) −0.8779z −1Y(z)
z X(z) −1
+ z Y(z)
0.9414
+ −0.8779
−1 −1
z z
−2 0.9414z −2 X(z) −0.5389z −2 Y(z) −2
z X(z) z Y(z)
0.9414 + + −0.5389
−1 −1
z z
−3 0.3138z −3 X(z) −0.0934z −3 Y(z)
z X(z) −3
0.3138 −0.0934 z Y(z)
Y(z)
= 0.3138 + 0.9414 z −1 + 0.9414 z −2 + 0.3138 z −3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) + 0.8779z–1W(z) + 0.5389z–2 W(z) + 0.0934z–3W(z) = X(z)
\ W(z) = X(z) – 0.8779z–1W(z) – 0.5389z–2 W(z) – 0.0934z–3W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.3138W(z) + 0.9414z–1W(z) + 0.9414z–2W(z) + 0.3138z–3W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W(z) 0.3138W(z)
X (z ) + 0.3138
+ Y (z )
−1
z
−0.8779z −1W(z) −1
z W(z) 0.9414z −1W(z)
+ −0.8779 0.9414 +
−1
z
−0.5389z −2 W(z) −2 0.9414z −2 W(z)
z W(z)
+ −0.5389 0.9414 +
−1
z
−0.0934z −3 W(z) −3 0.3138z −3 W(z)
z W(z)
−0.0934 0.3138
=
b g b
0.3138 + 0.9414 cos ω − j sin ω + 0.9414 cos 2ω − j sin 2ω + 0.3138 cos 3ω − j sin 3ω g b g
b g g b b
1 + 0.8779 cos ω − j sin ω + 0.5389 cos 2ω − j sin 2ω + 0.0934 cos 3ω − j sin 3ω g
b0.3138 + 0.9414 cos ω + 0.9414 cos 2ω + 0.3138 cos 3ωg
+ j b −0.9414 sin ω − 0.9414 sin 2ω − 0.3138 sin 3ωg
=
b1+ 0.8779 cos ω + 0.5389 cos 2ω + 0.0934 cos 3ωg
+ j b −0.8779sinω − 0.5389 sin 2ω − 0.0934 sin 3ω g
Solution for Exercise Problems E7. 17
b0.3138 + 0.9414 cos ω + 0.9414 cos 2ω + 0.3138 cos 3ωg
Let, Hde i =
jω d i HN e jω
=
+ j b −0.9414 sin ω − 0.9414 sin 2ω − 0.3138 sin 3ω g
H de i Db1 jω
+ 0.8779 cos ω + 0 .5389 cos 2ω + 0.0934 cos 3ω g
+ j b −0.8779 sin ω − 0.5389 sin 2ω − 0.0934 sin 3ω g
The frequency response H(e ) and hence the magnitude response |H(ejw )| are calculated for various values of w and listed in
jw
table 1. Using the values listed in table 1, the magnitude response of lowpass filter is sketched as shown in fig 3.
TABLE 1: H(ejww ) and |H(ejww )| for various values of w .
w HN(ejww ) HD(ejww ) H(ejww ) |H(e jww )|
0 ×π
16
2.5102 + j0 2.5102 + j0 1 + j0 1.0000
1×π
16
2.3678 – j0.7183 2.4366 – j0.4294 0.9929 – j0.1198 1.0000
2 ×π
16
1.9693 – j1.3158 2.2279 – j0.8033 0.9707 – j0.2406 1.0000
3 ×π
16
1.3956 – j1.7005 1.9179 – j1.0772 0.9317 – j0.3633 1.0000
4 ×π
16
0.7576 – j1.8289 1.5547 – j1.2257 0.8724 – j0.4885 0.9999
5 ×π
16
0.1688 – j1.7137 1.1899 – j1.2460 0.7870 – j0.6161 0.9995
6 ×π
16
–0.2815 – j1.4153 0.8686 – j1.1564 0.6655 – j0.7433 0.9977
7 ×π
16
–0.5466 – j1.0227 0.6215 – j0.9896 0.4924 – j0.8616 0.9923
8 ×π
16
–0.6276 – j0.6276 0.4611 – j0.7845 0.2451 – j0.9441 0.9754
9 ×π
16
–0.5653 – j0.3021 0.3827 – j0.5771 –0.0876 – j0.9215 0.9256
10 ×π
16
–0.4222 – j0.0839 0.3693 – j0.3943 –0.4209 – j0.6766 0.7968
11× π
16
–0.2617 + j0.0258 0.3976 – j0.2503 –0.5006 – j0.2503 0.5597
12 ×π
16
–0.1299 + j0.0538 0.4453 – j0.1479 –0.2989 + j0.0216 0.2996
13 ×π
16
–0.0475 + j0.0389 0.4945 – j0.0815 –0.1061 + j0.0612 0.1225
14 ×π
16
–0.0103 + j0.0154 0.5342 – j0.0412 –0.0214 + j0.0272 0.0346
15 × π
16
–0.0007 + j0.0023 0.5592 – j0.0169 –0.0014 + j0.0041 0.0043
16 × π
16
0 + j0 0.5676 + j0 0 + j0 0
|H (e jω)|
1.0
0.9
Ωc T
0.8 ω c = 2 tan−1
2
0.707
0.7 = 2 tan −1
FG 10.9432 × 0.3 IJ
H 2 K
0.6
2.0473
= 2.0473 = × π
π
0.5
= 0.65 π rad / sample
0.4
0.3
0.2
0.1
ω
0 π 2π 4π 7π
3π 5π 6π 8π 9π 10π 11π 12π 13π 14π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ωc=0.65π ( π)
F ig 3 : F req u en c y resp o n se o f 3 rd ord er d igital B u tterw o rth IIR low p a ss filte r.
E7. 18 DSP, Chapter 7 - IIR Filters
E7.11. Design a Butterworth digital IIR highpass filter using bilinear transformation by taking T = 0.3second, to satisfy the
following specifications.
0.45 £ |H(ejw )| £ 1.0 ; for 0.8p £ w £ p
|H(ejw )| £ 0.15 ; for 0 £ w £ 0.675p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 6.9357 dB
Stopband attenuation ³ 16.4781 dB
Passband edge frequency = 0.8p rad/sample
Stopband edge frequency = 0.675p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −6.9357 / 20 g = 0.45
As = 10
e −α s,dB / 20 j = 10 b −16.4781 / 20 g = 0.15
Solution
Specifications of digital IIR highpass filter
Passband edge digital frequency, w p = 0.8p rad/sample
Stopband edge digital frequency, w s = 0.675p rad/sample
Gain in normal value at passband edge, Ap = 0.45
Gain in normal value at stopband edge, As = 0.15
The highpass filter is designed via lowpass filter using frequency transformation technique. Hence the given specifications of IIR
highpass filter are converted to corresponding specification of IIR lowpass filter.
Specifications of digital IIR lowpass filter
The specification of lowpass filter is obtained by taking passband edge of highpass as stopband edge of lowpass and stopband
edge of highpass as passband edge of lowpass. The gain of passband and stopband remain same.
Passband edge digital frequency, w p = 0.675p rad/sample
Stopband edge digital frequency, w s = 0.8p rad/sample
Gain in normal value at passband edge, Ap = 0.45
Gain in normal value at stopband edge, As = 0.15
Sampling time, T = 0.3second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.45
Gain is same in analog
Gain in normal value at stopband edge, As = 0.15 and digital filter.
For bilinear transformation,
2 ωp
Passband edge analog frequency, Ωp = tan
T 2 Using equation (7.53).
2 0.675π
= tan = 11.9042 rad / second
0.3 2
2 ω
Stopband edge analog frequency, Ω s = tan s
T 2 Using equation (7.54).
2 0.8π
= tan = 20.5179 rad / second
0.3 2
Order of the filter
LM e1/ A 2 j − 1O LM e1/0.15 2 j − 1O
P LM OP
log
MN e
s
P
1/ A p2 j − 1P
log
MN e j − 1PQ log
43.4445
N1 =
1 Q =
1 1/0.45 2
=
1 N3.9383 Q
= 2.2049 Using equation (7.57).
2 Ωs 2 log 20.5179 2 log 20.5179
log
Ωp 11.9042 11.9042
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1 ∏s 2
n + bk sn + 1
Using equation (7.59).
k =1
1 1
∴ H sn =b g ×
sn + 1 sn2 + b1 sn + 1
∴ H(s) = H sn b g Ωc
sn =
s
HsK HsK s s 3
s3 s3
= 3 2 2 3
= 3 2
s + 2 × 10.9432 s + 2 × 10.9432 s + 10.9432 s + 218864
. s + 239.5073s + 1310.4879
Digital IIR highpass filter transfer function, H(z)
For bilinear transformation,
s3
H(z) = H(s) = 3 2
s + 218864
. s + 239.5073 s + 1310.4879
2 1− z −1 2 1− z −1
s= s=
T 1+ z −1 T 1+ z −1
F 2 1− z I −1
3
GH T 1+ z JK −1
=
F 2 1− z −1
3
I + 218864 F I F I
−1
2
−1
8 (1 − z −1)3
T 3 (1 + z −1)3
= −1 3
8(1 − z ) + 21.8864 × 4T (1 − z ) (1 + z ) + 239.5073 × 2T 2 (1 − z −1)(1 + z −1)2 + 1310.4879 × T 3 (1 + z −1)3
−1 2 −1
T 3 (1 + z −1)3
−1 3 Put, T = 0.3
8 (1 − z )
=
8 (1 − z −1)3 + 218864
. × 4 × 0.3 (1 − z −1)2 (1+ z −1) (a + b)3 = a 3 + 3a 2b + 3ab 2 + b 3
+ 239.5073 × 2 × 0.32 (1 − z −1)(1 + z −1)2 + 1310.4879 × 0.33 (1 + z −1)3 (a − b)3 = a 3 − 3a 2b + 3ab 2 − b3
(a + b) (a – b) = a2 – b2
8 (1 − z −1)3
=
8 (1 − z −1)3 + 26.2637 (1 − z −1)2 (1+ z −1) + 43.1113 (1 − z −1) (1+ z −1)2 + 35.3832 (1 + z −1)3
=
d
8 1 − 3z −1 + 3z −2 − z −3 i
d
8 1 − 3 z + 3z −1 −2
−z −3
i + 26.2637 (1− z −2
)(1 − z ) + 43.1113 (1 + z −1)(1 − z −2 )
−1
+ 35.3832(1+ 3z −1 + 3z −2 + z −3 )
E7. 20 DSP, Chapter 7 - IIR Filters
8 − 24z −1 + 24z −2 − 8z −3
∴ H(z) =
d
8 1 − 3 z + 3z −1 −2
−z −3
i + 26.2637 (1− z −1
− z −2 + z −3 ) + 43.1113 (1+ z −1 − z −2 − z −3 )
+ 35.3832(1+ 3z −1 + 3z −2 + z −3 )
8 − 24z −1 + 24z −2 − 8z −3
=
112.7582 + 98.9972 z −1 + 60.7746 z −2 + 10.5356 z −3
8 24 24 8
− z −1 + z −2 − z −3
= 112.7582 112.7582 112.7582 112.7582
98.9972 −1 60.7746 −2 10.5356 −3
1+ z + z + z
112.7582 112.7582 112.7582
0.0709 − 0.2128 z −1 + 0.2128 z −2 − 0.0709 z −3
=
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
Alternatively,
H(z) = =
−3 3 2
d
0.0709 − 0.2128 z −1 + 0.2128 z −2 − 0.0709 z −3 z 0.0709 z − 0.2128 z + 0.2128 z − 0.0709 i
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3 z −3 z3 + 0.8779 z2 + 0.5389 z + 0.0934d i
3 2
0.0709 z − 0.2128 z + 0.2128 z − 0.0709
=
z3 + 0.8779 z 2 + 0.5389 z + 0.0934
Direct form-I structure of digital IIR highpass filter
0.0709X(z)
X (z) 0.0709 + + Y (z)
−1 −1
z z
−1 −0.2128z −1X(z) −1
−0.8779z Y(z)
z X(z) −1
+ z Y(z)
−0.2128
+ −0.8779
−1 −1
z z
−2 0.2128z −2 X(z) −0.5389z −2 Y(z) −2
z X(z) z Y(z)
0.2128 + + −0.5389
−1 −1
z z
−3 −0.0709z −3 X(z) −0.0934z −3 Y(z)
z X(z) −3
−0.0709 −0.0934 z Y(z)
W(z) 1
where, = .....(2)
X(z) 1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
Y(z)
= 0.0709 − 0.2128 z −1 + 0.2128 z −2 − 0.0709 z −3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) + 0.8779z–1W(z) + 0.5389z–2W(z) + 0.0934z–3W(z) = X(z)
\ W(z) = X(z) – 0.8779z–1W(z) – 0.5389z–2W(z) – 0.0934z–3W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.0709W(z) – 0.2128z–1W(z) + 0.2128z–2W(z) – 0.0709z–3W(z) .....(5)
Solution for Exercise Problems E7. 21
Using equation (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W(z) 0.0709W(z)
X (z ) + 0.0709
+ Y (z )
−1
z
−0.8779z −1W(z) −1
z W(z) −0.2128z −1W(z)
+ −0.8779 −0.2128
+
−1
z
−0.5389z −2 W(z) −2 0.2128z −2 W(z)
z W(z)
+ −0.5389 0.2128 +
−1
z
−0.0934z −3 W(z) −3 −0.0709z −3 W(z)
z W(z)
−0.0934 −0.0709
F ig 2 : D irec t form -II stru cture of 3 rd o rder dig ita l IIR h ig h pa ss filter.
Frequency Response, H(ejww )
=
b g g b b g
0.0709 − 0.2128 cos ω − j sin ω + 0.2128 cos 2ω − j sin 2ω − 0.0709 cos 3ω − j sin 3ω
b g g b b g
1 + 0.8779 cos ω − j sin ω + 0.5389 cos 2ω − j sin 2ω + 0.0934 cos 3ω − j sin 3ω
=
b0.0709 − 0.2128 cos ω + 0.2128 cos 2ω − 0.0709 cos 3ωg + jb0.2128sin ω − 0.2128 sin 2ω + 0.0709 sin 3ωg
b1+ 0.8779 cos ω + 0.5389 cos 2ω + 0.0934 cos 3ωg + jb−0.8779sin ω − 0.5389 sin 2ω − 0.0934 sin 3ωg
H de i b0.0709 − 0.2128 cos ω + 0.2128 cos 2ω − 0.0709 cos 3ω g + j b0.2128 sin ω − 0.2128 sin 2ω + 0.0709 sin 3ω g
N
jω
0.9
0.8
0.707
0.7 Ωc T
ω c = 2 tan −1
0.6 2
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10π 11π 12π 13π 14π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ωc=0.65π ( π)
E7.12. Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 0.8second, to
satisfy the following specifications.
0.8 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.3p
jw
|H(e )| £ 0.3 ; for 0.7p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 1.9382 dB
Stopband attenuation ³ 10.4576 dB
Passband edge frequency = 0.3p rad/sample
Stopband edge frequency = 0.7p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −1 .9382 / 20 g = 0.8
As = 10
e −α s,dB / 20 j = 10 b −10.4576 / 20 g = 0.3
Solution
Specifications of digital IIR lowpass filter
ωp 0.3π
Passband edge analog frequency, Ωp = = = 1.1781 rad / second Using equation (7.55).
T 0.8
ω s 0.7 π Using equation (7.56).
Stopband edge analog frequency, Ω s = = = 2.7489 rad / second
T 0.8
Solution for Exercise Problems E7. 23
Order of the filter
LM e 1/ A 2 j − 1O LM e1/0.3 2 j − 1O
P
j PPQ
s
log log
N1 =
1 MN e 1/ A p2 −1
=
1 MN e
1/0.8 2 j − 1PQ
Using equation (7.57).
2 Ω 2 2.7489
log s log
Ωp .
11781
log
10.1111 LM OP
=
1 0.5625
= N
1 1.2546
= 17047
. Q FG IJ
2 log 2.7489 2 0.3679 H K
.
11781
For even N,
N
2
1
b g ∏s
H sn = 2
n + b k sn + 1 Using equation (7.58).
k =1
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
sn2 + 1.4142 sn + 1 s s
sn = n =
Ωc Ωc
1 1
= = 2
s2 s s + 1.4142 Ω cs + Ω 2c
+ 1.4142 +1
Ω2c Ωc Ω 2c
Ω 2c .
15416 2
= 2 2
= 2 2
s + 1.4142 Ω cs + Ω c s + 1.4142 × 15416
. s + 15416
.
2.3765
=
s 2 + 2 .1801s + 2.3765
To convert the analog transfer function to digital transfer function using impulse invariant transformation, the above equation can
be simplified as follows.
2.3765 2.3765
H(s) = =
2
s + 10901
. × 2s + 10901
. 2 2
− 1.0901 + 2.3765 2
s + 1.0901 + 11882
. b g
2.3765 1.09 1.09
= × = 2.1803 ×
1.09 s + 10901
.
2
. 2
+ 109 b 2
g
. 2
s + 1.0901 + 109 b g
Digital IIR lowpass filter transfer function, H(z)
For impulse invariant transformation,
b
→
e− aT sin bT z−1b g Using equation (7.19).
bs + ag 2
+b 2 is transformed to
b
1− 2 e− aT cos bT z−1 + e−2aT z −2g
E7. 24 DSP, Chapter 7 - IIR Filters
T = 0.8 second,
H(z) = 2 .1803 ×
e −10901
. × 0.8
b
sin 1.09 × 0.8 z −1 g
1− 2 e −10901
. × 0.8
b g
. × 0.8 z −1 + e −2 × 1.0901 × 0.8 z −2
cos 109
= 2 .1803 ×
b
0.4181 sin 0.8720 z −1 g
b
1 − 2 × 0.4181 cos 0.8720 z −1 + 0.1748 z −2 g
0.6979 z −1
=
1 − 0.5379 z −1 + 0.1748 z −2
Alternatively,
0.6979 z −1 0.6979 z −1 0.6979z
H(z) = −1 −2
= −2 2 =
1 − 0.5379 z + 0.1748 z z (z − 0.5379z −1 + 0.1748) z 2 − 0.5379z + 0.1748
Since T < 1, we can compute magnitude normalized transfer function, HN(z)
0.8 × 0.6979z −1 0.5583 z −1
HN (z) = T × H(z) = −1 −2
=
1 − 0.5379z + 0.1748 z 1 − 0.5379z −1 + 0.1748z −2
Alternatively,
0.8 × 0.6979z 0.5583 z
HN (z) = T × H(z) = = 2
z2 − 0.5379z + 01748
. z − 0.5379z + 01748
.
−1 −1
z z
−1
z X(z) 0.5583 z −1X(z) 0.5379z Y(z) −1 −1
z Y(z)
0.5583
+ 0.5379
−1
z
−2
−0.1748z Y(z) z −2 Y(z)
−0.1748
−1
z
0.5379z −1W(z) −1 0.5583z −1W(z)
z W(z)
+ 0.5379 0.5583
−1
z
−0.1748z −2 W(z) −2
z W(z)
−0.1748
0.5583 z −1
d i
H e jω = H(z)
z = e jω
=
1 − 0.5379 z −1 + 0.1748 z −2 z = e jω
0.5583 e − jω
=
1 − 0.5379 e − jω + 0.1748 e − j2ω
=
b
0.5583 cos ω − j sin ω g
b
1 − 0.5379 cos ω − j sin ω + 01748
. g
cos 2ω − j sin 2ω b g
0.5583cosω − j 0.5583 sin ω
=
b1− 0.5379 cos ω + 0.1748 cos 2ωg + jb0.5379 sinω − 01748
. sin 2ω g
H de i N
jω
0.5583 cosω − j 0.5583 sin ω
Let, Hde i =
jω
=
H de i b
D
1 − 0jω
.5379 cos ω + 0.1748 cos 2ω g + j b0.5379 sin ω − 0.1748 sin 2ω g
|H (e jω)|
0.9
0.8
ω c = Ωc T
0.707
0.7 = 1.5416 × 0.8 = 1.2333
0.6
1.2333
= × π = 0.39 π rad / sample
π
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 4π 5π
3π 6π 7π 8π 9π 10π 11π 12 π 13 π 14 π 15π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc=0.39π ( π/2 ) ( π)
F ig 3 : F req u ency resp o n se o f digita l B u tte rw o rth IIR lo w p ass filter.
E7. 26 DSP, Chapter 7 - IIR Filters
E7.13. Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
0.45 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.5p
|H(ejw )| £ 0.15 ; 0.8p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 6.9357 dB
Stopband attenuation ³ 16.4781 dB
Passband edge frequency = 0.5p rad/sample
Stopband edge frequency = 0.8p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −6.9357 / 20 g = 0.45
As = 10 e j = 10 b −16.4781 / 20 g = 0.15
−α s,dB / 20
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.5p rad/sample
Stopband edge digital frequency, w s = 0.7p rad/sample
Gain in normal value at passband edge, Ap = 0.45
Gain in normal value at stopband edge, As = 0.15
Sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.45
Gain is same in analog
Gain in normal value at stopband edge, As = 0.15 and digital filter.
For impulse invariant transformation,
0.5 π ωp
Passband edge analog frequency, Ωp = = = 15708
. rad / second Using equation (7.55).
T 1
ω 0.8π
Stopband edge analog frequency, Ω s = s = = 2.5133 rad / second Using equation (7.56).
T 1
Order of the filter
log
LM e1/ A 2j
s −1
OP log LM e 1/ 0.15 2 j − 1O
P
N=
1 MN e
1/ A p2 − 1
j PQ = 1 MN e 1/0.45 2 j − 1PQ
2 Ωs 2 2.5133
log log Using equation (7.57).
Ωp .
15708
log
LM 43.4444 OP
1 N 3.9383 Q = 1 LM 10426
. O
=
2 log
2.5133 2 N .2041PQ = 2.5539
0
.
15708
Choose order N, such that N ³ N1 and N is an integer.
Let, order, N = 3.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1 ∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
N−1 3 −1
Here, N = 3, ∴ k = 2
= 2
=1
1 1
b g
∴ H sn =
sn + 1 sn2 + b1 sn + 1
When k = 1 ; bk = b1 = 2 sin LM b g OP = 1
2 −1 π Calculate sinq using
N Q 2×3
calculator in radian mode.
1 1
b g
∴ H sn = =
(sn + 1) (sn2 + sn + 1) sn3 + 2sn2 + 2 sn + 1
Solution for Exercise Problems E7. 27
Unnormalized transfer function, H(s) of Butterworth lowpass filter
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
(sn + 1)(sn2 + sn + 1) s
sn = sn =
Ωc Ωc
1 1
=
F s + 1I F s 2
s I = Fs+Ω IFs 2
+ Ω c s + Ω 2c I
GH Ω JK GH Ω
c
2
c
+
Ωc
+ 1J G
K H Ω JK GH c
c
Ω 2c JK
Ω 3c 1.3405 3
= 2
=
(s + Ω c )(s + Ω c s + Ω 2c ) (s + 1.3405) (s + 1.3405s + 1.34052 )
2
2.4088 2.4088
= =
(s + 1.3405)(s2 + 1.3405s + 1.7969) s3 + 2.681s2 + 3.5939s + 2.4088
To convert the analog transfer function to digital transfer function using impulse invariant transformation, the above equation can
be simplified as follows.
2.4088
H(s) =
(s + 13405)
. (s2 + 1.3405 s + 1.7969)
2.4088 A Bs + C
= + .....(1)
(s + 1.3405)(s2 + 13405
. s + 17969
. ) (s + 1.3405) (s2 + 13405
. s + 17969
. )
On cross multiplying equation (1) we get,
2.4088 = As2 + 13405
. As + 17969
. A + Bs2 + 13405
. Bs + Cs + 13405
. C .....(2)
On equating coefficients On equating coefficients of s in equation (2) On equating constants of equation (2)
of s2 in equation (2) we get, we get, we get,
1.3405 −1.3405s
∴ H(s) = +
s + 1.3405 s2 + 13405
. s + 17969
.
1.3405 1.3405s
= − 2
s + 13405
. s + 2s × 0.6703 + 0.67032 − 0.67032 + 17969
.
1.3405 1.3405 s
= −
s + 13405
. (s + 0.6703)2 + 13476
.
=
1.3405 LM
− 13405
.
s + 0.6703 − 0.6703 OP
s + 13405
. N(s + 0.6703)2 + 11609
. 2
Q
=
1.3405
− 13405
.
LM s + 0.6703 OP + 13405
.
LM 0.6703 OP
s + 13405
. N (s + 0.6703) + 11609
. 2 2
Q N (s + 0.6307) + 11609
2
. Q2
=
1.3405
− 13405
.
LM s + 0.6703 OP + 0.8985 LM 11609
. OP
s + 13405
. N (s + 0.6703) + 11609
. 2 2
Q 11609
. N (s + 0.6307 ) +2
11609
. Q 2
b e − aT (sin bT)z −1
→
2
(s + a) + b 2 is transformed to
1 − 2e (cos bT)z −1 + e −2aT z −2
− aT
E7. 28 DSP, Chapter 7 - IIR Filters
H(z) =
13405
.
− 1.3405
LM
1 − e −0.6703 cos(11609
. )z −1 OP Put, T = 1
1− e −1.3405 −1
z 1 − 2e N
−0.6703
cos(11609
. )z + e −2 × 0.6703z −2
−1
Q
+ 0.7740 M
L e −0.6703
sin(11609
. )z −1
O
P
N1− 2e cos(11609
−0.6703
. −1
)z + e z Q
−2 × 0.6703 −2
=
1.3405
− 13405
.
LM 1− 0.5116 × cos(11609 . )z −1OP
1 − 0.2617 z −1 N 1 − .
10232 × cos( .
11609 ) −1
z + 0 .2617 z Q −2
+ 0.7740 M
L 0.5116 × sin(11609
. )z −1
OP
N 1 − .
10232 × cos( .
11609 ) z−1
+ 0 .2617 z Q −2
X (z) + Y (z)
−1 −1
z z
−1
0.4405z −1X(z) 0.6695z Y(z) −1
z X(z) −1
0.4405 + + 0.6695 z Y(z)
−1 −1
z z
−2 0.1843z −2 X(z) −0.3684z −2 Y(z)
z X(z) −2
z Y(z)
0.1843
+ −0.3684
−1
z
0.0685z −3 Y(z) −3
0.0685 z Y(z)
W(z) 1
where, = .....(4)
X(z) 1 − 0.6695 z −1 + 0.3684 z −2 − 0.0685 z −3
Y ( z)
= 0.4405 z −1 + 0.1843 z −2 .....(5)
W(z)
On cross multiplying equation (4) we get,
W(z) – 0.6695z–1W(z) + 0.3684z–2 W(z) –0.0685 z–3W(z) = X(z)
\ W(z) = X(z) + 0.6695z–1W(z) – 0.3684z–2 W(z) + 0.0685z–3W(z) .....(6)
On cross multiplying equation (5) we get,
Y(z) = 0.4405z–1W(z) + 0.1843z–2W(z) .....(7)
Solution for Exercise Problems E7. 29
Using equation (6) and (7), the direct form-II structure is drawn as shown in fig 2.
X (z) W(z) Y (z )
+
−1
z
0.6695 z −1W(z) 0.4405 z −1W (z)
z −1W( z)
+ 0.6695 0.4405 +
−1
z
−2
−0.3684z W( z) 0.1843 z −2 W(z)
z −2 W(z)
−0.3684 0.1843
−1
z
−3
0.0685 z W (z)
z −3 W (z)
0.0685
0.4405 z −1 + 0.1843 z −2
d i
H e jω = H(z)
z = e jω
=
1 − 0.6695 z −1 + 0.3684 z −2 − 0.0685 z −3 z = e jω
=
b0.4405 cos ω + 01843
. cos 2ω g + jb −0.4405 sin ω − 0.1843 sin 2ω g
b1− 0.6695 cos ω + 0.3684 cos 2ω − 0.0685 cos 3ωg + j b0.6695 sin ω − 0.3684 sin 2ω + 0.0685 sin 3ωg
H de i N
jω
b0.4405 cos ω + 0.1843 cos 2ωg + jb−0.4405 sinω − 0.1843 sin 2ωg
Let, Hde i =
jω
=
H de i b1 − 0.6695 cos ω + 0.3684 cos 2ω − 0.0685 cos 3ω g + j b0.6695 sin ω − 0.3684 sin 2ω + 0.0685 sin 3ω g
D
jω
1.0
0.9
0.8
0.707 ω c = Ωc T = 1.3405 × 1
0.7
0.6 1.3405
= × π = 0.43 π
π
0.5
0.4
0.3
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9 π 10π 11π 12π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
( π/2 ) ωc=0.43 π ( π)
F ig 3 : F req u en c y resp o nse of 3 rd o rd er d ig ita l B utterw o rth IIR lo w p a ss filter.
E7.14. Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
0.9 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.25p
jw
|H(e )| £ 0.35 ; for 0.3981p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 0.9151 dB
Stopband attenuation ³ 9.1186 dB
Passband edge frequency = 0.25p rad/sample
Stopband edge frequency = 0.3981p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −0.9151 / 20 g = 0.9
As = 10
e −α s,dB / 20 j = 10 b −13.97 / 20 g = 0.35
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.25p rad/sample
Stopband edge digital frequency, w s = 0.3981p rad/sample
Gain in normal value at passband edge, Ap = 0.9
Gain in normal value at stopband edge, As = 0.35
sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.9
Gain is same in analog
Gain in normal value at stopband edge, As = 0.35 and digital filter.
For impulse invariant transformation,
ωp
Passband edge analog frequency, Ωp = Using equation (7.55).
T
0.25π
=
= 0.7854 rad / second
1
ω
Stopband edge analog frequency, Ω s = s
T Using equation (7.56).
0.3981π
= = 1.2507 rad / second
1
Solution for Exercise Problems E7. 31
Order of the filter
log
LM e 1/ A 2s − 1
j OP log LM e 1/ 0.35 2 − 1 j OP L 7.1633 O
N1 =
1 MN e1/ A p2 − 1
j PQ = 1 MN e 1/ 0.9 2 j −1 PQ = 1 log MN 0.2346 PQ = 1 1.4848 = 3.6734 Using equation (7.57).
2 Ω 2 12507
. 2 log 12507
. 2 0. 2021
log s log
Ωp 0.7854 0.7854
For even N,
N
2
1
b g ∏
H sn =
sn2 + bk sn + 1
Using equation (7.58).
k =1
When k = 1 ; bk = b1 = 2 sin LM b g
2 × 1− 1 π OP = 0.7654
N 2×4
Q
= 2 sin LM
When k = 2 ; b k = b 2
b 2 ×2 −1 π g O = 18478
N 2×4 PQ .
1
b g
H sn =
(sn2 + 0.7654 sn + 1) (sn2 + 18478
. sn + 1)
1
=
sn4 + 1.8478 sn3 + sn2 + 0.7654 sn3 + 14143
. sn2 + 0.7654 sn + sn2 + 18478
. +1
1
=
sn4 + 2.6132 sn3 + 3.4143sn2 + 2.6132 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
H(s) = H sn b g s
sn =
Ωc
(0.9778)4
=
(s + 0.7654 × 0.9778 s + 0.9778 2 )(s2 + 18478
2
. × 0.9778 s + 0.97782 )
0.9141
=
(s2 + 0.7484s + 0.9561)(s2 + 1.8068s + 0.9561)
0.9141
=
s 4 + 2.5552s 3 + 3.2644 s2 + 2.443 s + 0.9141
E7. 32 DSP, Chapter 7 - IIR Filters
To convert the analog transfer function to digital transfer function using impulse The roots of the quadratic
invariant transformation, the above equation is simplified as follows.
s2 + 0.7484s + 0.9561 = 0 are
0.9141
H(s) = −0.7484 ± 0 .7484 2 − 4 × 0.9561
s 4 + 2.5552 s 3 + 3.2644 s2 + 2.443s + 0.9141 s=
2
0.9141 −0.7484 ± j18067
.
= = = −0.3742 ± j0.9034
ds 2
id
+ 0.7484s + 0.9561 s2 + 18068
. s + 0.9561 i 2
=
0.9141 b
= s − ( −0.3742 + j0.9034) g
bs + 0.3742 − j0.9034gbs + 0.3742 + j0.9034gbs + 0.9034 − j0.3741g bs − (−0.3742 − j0.9034)g
bs + 0.9034 + j0.3741g = bs + 0.3742 − j0.9034g
By partial fraction expansion H(s) can be expressed as
bs + 0.3742 + j0.9034g
A1 A1∗
H(s) = +
s + 0.3742 − j0.9034 s + 0.3742 + j0.9034
The roots of the quadratic
A2 A ∗2 s2 + 1.8068s + 0.9561 = 0 are
+ +
s + 0.9034 − 0.3741 s + 0.9034 + 0.3741
−1.8068 ± 1.80682 − 4 × 0.9561
* *
where, A1, A , A2, A are residues s=
1 2 2
0.9141 × s + 0.3742 − j0.9034 −1.8068 ± j 0.7482
A1 = =
bs + 0.3742 − j0.9034gbs + 0.3742 + j0.9034gds 2
+ 18068
. s + 0.9561 i s = − 0.3742
2
+ j0.9034 = −0.9034 ± j0.3741
0.9141
=
(−0.3742 + j0.9034 + 0.3742 + j0.9034) [(−0.3742 + j0.9034)2
b
= s − (−0.9034 + j0.3741) g
(s − (−0.9034 − j0.3741))
+ 18068
. (−0.3742 + j0.9034) + 0.9561)]
0.9141
b
= s + 0.9034 − j0.3741 g
= = −0.4516 + j 01871
.
b gb
j1.8068 −0.3961 + j0.9562 g (s + 0.9034 + j0.3741)
0.9141
=
( −0.9034 + j0.3741)2 + 0.7484 (−0.9034 + j0.3741) + 0.9561 ( −0.9034 + j0.3741 + 0.9034 + j0.3741)
0.9141
=
b0.9562 − j0.3959gb j0.7482g = 0.4517 − j1.0907
A2* = Conjugate of A2 = 0.4517 + j1.0907
−0.4516 + j0.1871 −0.4516 − j0.1871 0.4517 − j1.0907 0.4517 + j1.0907
H(s) = + + +
s + 0.3742 − j0.9034 s + 0.3742 + j0.9034 s + 0.9034 − j0.3741 s + 0.9034 + j0.3741
Digital IIR lowpass filter transfer function, H(z)
For impulse invariant transformation,
Ai Ai Using equation (7.17).
→
s + pi is transformed to
1 − e − p i T z −1
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
=
b−0.4516 + j0.1871gd1− e −( 0.3742 − j0.9034)
i b gd
z −1 + −0.4516 − j0.1871 1 − e −(0.3742 − j0.9034) z −1 i
d1− e − ( 0.3742 − j0.9034)
z i d1 − e
−1
z i
− (0.3742 + j0.9034 ) −1
+
b0.4517 − j10907
. g d1− e z i + b0.4517 + j1.0907g d1 − e
−( 0.9034 + j0.3741) −1 −( 0.9034 − j0.3741) −1
z i
d1− e z i d1 − e
− ( 0.9034 − j0.3741) −1
z i
− ( 0.9034 + j0.3741) −1
∴ H(z) =
d i
−0.9032 + 0.4516 e −0.3742 e j0.9034 + e − j0.9034 z −1 + j0.1871e −0.3742 e j0.9034 − e − j0.9034 z −1 d i
1− e −0.3742
de j0.9034
+e − j0.9034
iz −1
+e −0.7484
z −1
+
d i
0.9034 − 0.4517 e −0.9034 e j0.3741 + e − j0.3741 z −1 − j1.0907 e −0.9034 e j0.3741 − e − j0.3741 z −1 d i
1− e −0.9034
de j0.3741
+e − j0.3741
iz −1
+e −1.8068
z −1
=
−0.9032 + 0.4516 e b2 cos 0.9034g z + j0.1871e b2j sin 0.9034g z
−0.3742 −1 −0.3742 −1
1− e b2 cos 0.9034g z + e z
−0.3742 −1 −0.7484 −1
+
0.9034 − 0.4517 e b2 cos 0.3741g z − j10907
−0.9034
. e b2j sin 0.3741g z −1 −0.9034 −1
1− e b2 cos 0.3741g z + e z
−0.9034 −1 −18068
. −1
=
d−0.9032 + 0.1823z id1− 0.7543 z −1 −1
i d
+ 0.1642 z −2 + 0.9034 − 0.0177 z −1 1 − 0.8515 z −1 + 0.4731z −2 id i
d1− 0.8515 z −1
+ 0.4731z −2
id1− 0.7543 z −1
+ 0.1642 z −2
i
−0.9032 + 0.6813z −1 − 0.1483 z −2 + 0.1823 z −1 − 0.1375 z −2 + 0.0299 z −3 + 0.9034 − 0.7692 z −1 + 0.4274 z −2
− 0.0177 z −1 + 0.0151z −2 − 0.0084 z −3
= −1 −2 −1 −2 −3
1 − 0.7543z + 0.1642 z − 0.8515 z + 0.6423 z − 0.1398 z + 0.4731z −2 − 0.3569z −3 + 0.0777 z −4
−1 −2 −3
0.0767 z + 0.1567 z + 0.0215 z
=
1 − 1.6058 z −1 + 12796
. z −2 − 0.4967 z −3 + 0.0777 z −4
Alternatively,
0.0767 z −1 + 0.1567 z −2 + 0.0215 z −3 0.0767 z −1 + 01567
. z −2 + 0.0215 z −3
H(z) = = −4 4
1 − 16058
. −1 −2 −3
z + 1.2796 z − 0.4967 z + 0.0777 z −4
z z − 1.6058 z + 1.2796 z2 − 0.4967 z + 0.0777
3
d i
3 2
0.0767 z + 0.1567 z + 0.0215z
=
z4 − 1.6058 z3 + 1.2796 z2 − 0.4967 z + 0.0777
X (z) + Y (z)
−1 −1
z z
−1 −1
−1 0.0767z X(z) 1.6058z Y(z) −1
z X(z) z Y(z)
0.0767 + + 1.6058
−1 −1
z z
−2 0.1567z −2 X(z) −1.2796z −2 Y(z) −2
z X(z) z Y(z)
0.1567 + + −1.2796
−1 −1
z z
−3 0.0215z −3 X(z) 0.4967z −3 Y(z) −3
z X(z) z Y(z)
0.0215 + 0.4967
−1
z
−0.0777z −4 Y(z)
−0.0777
z −4 Y(z)
W(z)
X (z ) + Y (z )
−1
z
1.6058z −1W(z) −1
z W(z) 0.0767z −1W(z)
+ 1.6058 0.0767 +
−1
z
−1.2796z −2 W(z) −2 0.1567z −2 W(z)
z W(z)
+ −1.2797 0.1567 +
−1
z
0.4967z −3 W(z) −3 0.0215z −3 W(z)
z W(z)
+ 0.4967 0.0215
−1
z
−0.777z −4 W(z)
−0.0777
E7.15. Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.6second, to satisfy
the following specifications.
0.6 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.3p
|H(ejw )| £ 0.02 ; 0.575p £ w £ p
Draw direct form-I and II structure of the filter.
Alternatively,
Passband ripple £ 4.4370 dB
Stopband attenuation ³ 33.9794 dB
Passband edge frequency = 0.3p rad/sample
Stopband edge frequency = 0.575p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −4.4370 / 20 g = 0.6
As = 10
e −α s,dB / 20 j = 10 b −33.9794 / 20 g = 0.02
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.3p rad/sample
Stopband edge digital frequency, w s = 0.575p rad/sample
Gain in normal value at passband edge, Ap = 0.6
Gain in normal value at stopband edge, As = 0.02
Sampling time, T = 0.6second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.6 Gain is same in analog
Gain in normal value at stopband edge, As = 0.02 and digital filter.
Solution for Exercise Problems E7. 35
For bilinear transformation,
2 ωp 2 0.3π Using equation (7.53).
Passband edge analog frequency, Ωp = tan = tan = 1.6984 rad / second
T 2 0.6 2
2 ω 2 0.575π
Stopband edge analog frequency, Ωs = tan s = tan = 4.2283 rad / second Using equation (7.54).
T 2 0.6 2
Order of the filter
LM FH1/ A 2 IK − 1O LM e1/0.02 2 j − 1O
log
MN FH
s
1/ A 2 IK − 1PP log
MN e −1
PP log LM 2499 OP 1 3.1479
N1 =
1 s
Q=1 1/0.6 2 j Q = 1 N17778
. Q= = 3.9736 Using equation (7.57).
2 Ωs 2 4.2283 2 log 4.2283 2 0.3961
log log
Ωp .
16984 16984
.
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 4.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For even N,
N
2
1
b g ∏s
H sn = 2
n + b k sn + 1 Using equation (7.58).
k =1
where, bk = 2 sin LM b 2k − 1 π g OP
N 2N
Q Using equation (7.60).
N 4
Here, N = 4, ∴ k = 2
= 2
=2
Calculate sinq using
When k = 1, bk = b1 = 2 sin
LM b2 × 1− 1gπ OP = 0.7654 calculator in radian mode.
N 2×4 Q
When k = 2, bk = b 2 = 2 sin M
L b2 × 2 − 1gπ OP = 18478
.
N 2×4 Q
1
b g
∴ H sn =
(sn2 + 0.7654 sn + 1) (sn2 + 18478
. sn + 1)
1
=
sn4 + 1.8478 sn3 + sn2 + 0.7654 sn3 + 1.4143 sn2 + 0.7654 sn + sn2 + 18478
. sn + 1
1
=
sn4 + 2.6132 sn3 + 3.4143 sn2 + 2.6132 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
b g
H(s) = H sn
s
sn =
Ωc
1
∴ H(s) =
s 4
s F I 3
FsI 2
F s I +1
Ω c4
+ 2.6132
Ωc GH JK + 3.4143 GH Ω JK
c
GH Ω JK
+ 2.6132
c
1
=
s4 s3 s2 s
4 + 2.6132 3 + 3.4143 + 2.6132 +1
ΩC Ωc Ω 2c Ωc
Ω 4c
=
s + 2.6132 Ωc s + 3.4143 Ω 2c s 2 + 2.6132 Ω 3c s + Ω c4
4 3
1.59024
=
s + 2.6132 × 1.5902 s + 3.4143 × 1.59022 s2 + 2.6132 × 1.59023 s + 1.59024
4 3
6.3945
=
s 4 + 4.1555 s3 + 8.6339 s 2 + 10.5082 s + 6.3945
E7. 36 DSP, Chapter 7 - IIR Filters
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
6.3945
H(z) = H(s) =
s4 + 4.1555 s3 + 8.6339 s2 + 10.5082 s + 6.3945
2 1− z −1 2 1− z −1
s= s=
T 1+ z −1 T 1+ z −1
6.3945
=
F 2 1− z I −1
4
F 2 1− z I −1
3
F 2 1− z I
−1
2
F 2 1− z I + 6.3945
−1
GH T 1+ z JK−1
+ 4.1555 G
H T 1+ z JK −1
+ 8.6339 GH T 1+ z JK
−1
+ 10 .5082 GH T 1+ z JK−1
6.3945
=
16 (1 − z −1)4 33.244 (1 − z −1)3 34.5356 (1 − z −1)2 210164
. (1 − z −1)
+ + + + 6.3945
T 4 (1 + z −1)4 T 3 (1 + z −1)3 T 2 (1 + z −1)2 T (1 + z −1)
6.3945
=
16(1 − z −1)4 + 33.244 T (1 − z −1)3 (1 + z −1) + 34.5356 T 2 (1 − z −1)2 (1 + z −1)2
+ 21.0164 T 3 (1 − z −1)(1 + z −1)3 + 6.3945 T 4 (1 + z −1)4
T 4 (1 + z −1)4
6.3945 T 4 (1 + z −1)4
= Put, T = 0.6
16 (1 − z ) + 33.244 T(1 − z ) (1 + z −1) + 34.5356 T 2 (1 − z −1)2 (1 + z −1)2
−1 4 −1 3
+ 210164
. T 3 (1 − z −1)(1 + z −1)3 + 6.3945 T 4 (1 + z −1)4
6.3845 × 0.64 (1 + z −1)4
=
16 (1 − z ) + 33.244 × 0.6 (1 − z ) (1 + z −1) + 34.5356 × 0.62 (1 − z −1)2 (1 + z −1)2
−1 4 −1 3
+ 4.5395 (1 + 2z −1 − 2z −3 − z −4 ) + 0.8287 (1 + 4z −1 + 6z −2 + 4z −3 + z −4 )
0.8287 + 3.3148 + 4.9722 z −2 + 3.3148 z −3 + 0.8287 z −4
=
53.7474 − 91.499 z −1 + 76.1066 z −2 − 29.8714 z −3 + 4.7756 z −4
0.8287 3.3148 −1 4.9722 −2 3.3148 −3 0.8287 −4
+ z + z + z + z
= 53.7474 53 .7474 53.7474 53.7474 53.7474
.
91499 76.1066 29.8714 4.7756
1− z −1 + z −2 − z −3 + z −4
53.7474 53.7474 53.7474 53.7474
0.0154 + 0.0617 z −1 + 0.0925 z −2 + 0.0617 z −3 + 0.0154 z −4
=
1 − 1.7024 z −1 + 14160
. z −2 − 0.5558 z −3 + 0.0889 z −4
Alternatively,
0.0154 + 0.0617 z −1 + 0.0925 z −2 + 0.0617 z −3 + 0.0154 z −4
H(z) =
1 − 1.7024 z −1 + 14160
. z −2 − 0.5558 z −3 + 0.0889 z −4
z −4 (0.0154z4 + 0.0617 z3 + 0.0925 z2 + 0.0617 z + 0.0154)
=
z −4 (z4 − 1.7024 z3 + 1.4160 z 2 − 0.5558 z + 0.0889)
0.0154z4 + 0.0617 z3 + 0.0925 z2 + 0.0617 z + 0.0154
=
z4 − 1.7024 z3 + 1.4160 z 2 − 0.5558 z + 0.0889
Direct form-I structure of digital IIR lowpass filter
Y(z) 0.0154 + 0.0617 z −1 + 0.0925 z −2 + 0.0617 z −3 + 0.0154 z −4
Let, H(z) = =
X(z) 1 − 1.7024 z −1 + 14160
. z −2 − 0.5558 z −3 + 0.0889 z −4
On cross multiplying the above equation we get,
Y(z) – 1.7024z–1Y(z) + 1.4160z–2Y(z) – 0.5558z–3Y(z) + 0.0889 z–4Y(z)
= 0.01054X(z) + 0.0617z–1X(z) + 0.0925z–2X(z) + 0.0617z–3X(z) + 0.0154z–4X(z)
\ Y(z) = 0.0154X(z) + 0.0617z–1X(z) + 0.0925z–2X(z) + 0.0617z–3X(z) + 0.0154z–4X(z)
+ 1.7024z–1Y(z) – 1.4160z–2Y(z) + 0.5558 z–3Y(z) – 0.0889 z–4Y(z) .....(1)
Solution for Exercise Problems E7. 37
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
0.0154X(z)
X (z) 0.0154 + + Y (z)
−1 −1
z z
−1 0.0617z −1X(z) −1
1.7024 z Y(z) −1
z X(z) z Y(z)
0.0617 + + 1.7024
−1 −1
z z
−2 0.0925z −2 X(z) −1.4160z −2 Y(z)
z X(z) −2
z Y(z)
0.0925 + + −1.4160
−1 −1
z z
−3 0.0617z −3 X(z) 0.5558z −3 Y(z)
z X(z) −3
0.0617 + + 0.5558 z Y(z)
−1 −1
z z
−4
0.0154z −4 X(z) −0.0889z −4 Y(z)
z X(z) 0.0154 −0.0889 z −4 Y(z)
W(z) 1
where, = .....(2)
X(z) 1 − 1.7024 z −1 + 1.4160 z−2 − 0.5558 z −3 + 0.0889 z −4
Y(z)
= 0.0154 + 0.0617 z −1 + 0.0925 z −2 + 0.0617 z −3 + 0.0154 z −4 .....(3)
W(z)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W(z) 0.0154W(z)
X (z ) + 0.0154 + Y (z )
−1
z
−1
1.7024 z W(z) −1
z W(z) 0.0617z −1W(z)
+ 1.7024 0.0617 +
−1
z
−1.4160z −2 W(z) −2 0.0925z −2 W(z)
z W(z)
+ −1.4160 0.0925 +
−1
z
0.5558z −3 W(z) −3 0.0617z −3 W(z)
z W(z)
+ 0.5558 0.0617 +
−1
z
−0.0889z −4 W(z) 0.0154z −4 W(z)
z −4 W(z)
−0.0889 0.0154
E7.16. Design a Chebyshev digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
0.87 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.25p
|H(ejw )| £ 0.35 ; for 0.375p £ w £ p
Draw direct form-I and II structure of the filter.
E7. 38 DSP, Chapter 7 - IIR Filters
Alternatively,
Passband ripple £ 1.2096 dB
Stopband attenuation ³ 9.1136 dB
Passband edge frequency = 0.25p rad/sample
Stopband edge frequency = 0.375p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20 j = 10 b −1.2096 / 20 g = 0.87
As = 10
e −α s,dB / 20 j = 10 b −9.1186 / 20 g = 0.35
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.25p rad/sample
Stopband edge digital frequency, w s = 0.375p rad/sample
Gain in normal value at passband edge, Ap = 0.87
Gain in normal value at stopband edge, As = 0.35
Sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.87
Gain is same in analog
Gain in normal value at stopband edge, As = 0.35 and digital filter.
For bilinear transformation,
0.25π ωp
Passband edge analog frequency, Ωp = = = 0.7854 rad / second Using equation (7.85).
T 1
ω 0.375π Using equation (7.86).
Stopband edge analog frequency, Ωs = s = = 1.1781rad / second
T 1
Order of the filter
1 1
cosh−1
LM e j O
1/ A 2s − 1 2
P cosh−1
LM e1/0.35 2 j − 1O 2
P LM 7.1633 OP
1
2
N1 =
MN e1/ A 2p j − 1 P
Q =
MN e
1/0.87 2 j − 1P
Q = cosh−1 N 0.3212 Q =
2.2341
= 2.3214 Using equation (7.87).
Ωs −1 .
11781
−1 .
11781 0.9624
cosh cosh
Ωp 0.7854 0.7854
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 3.
Normalized transfer function, H(sn) of Chebyshev lowpass filter
For odd N,
N− 1
2
B0 Bk
H(sn ) =
sn + c0 ∏
k = 1 sn2 + bk sn + c k
Using equation (7.89).
N−1 3−1
Here, N = 3, ∴ k = 2
= 2
=1
B0 B1
∴ H(sn ) = × 2
sn + c 0 sn + b1 sn + c1
1
d i
∈ = 1/ A p2 − 1 2
1
d i
= 1 / 0.87 2 − 1 2 = 0.5667
R|L 1
U 1
T W
LL O LMF 1 I
1
O −
1
OP
1 MM MF
1 3 1 3
G 1 I
+ 1J +
1 P 2 2 1 P PP
=
2 M MH 0.5667
MMNN K 0.5667 PPQ − MMNGH 0.5667 + 1JK
2 2
+
0.5667 P
PQ
Using equation (7.93).
PQ
1
= [1.5595 − 0.6412] = 0.4591
2
Using equation (7.94).
c0 = yN = 0.4591
Solution for Exercise Problems E7. 39
bk = 2 yN sin LM b 2k − 1 π g OP
N 2N Q
When k = 1; bk = b1 = 2 × 0.4591 sin
LM (2 − 1)π OP = 0.4591 Using equation (7.90).
N 2×3 Q
ck = yN2 + cos2 LM b g
2k − 1 π OP
N 2N Q Using equation (7.91).
ck = c = 0.4591 + cos M
L (2 − 1)π OP
2 2
1
N 2×3 Q
L1+ cos e j OP 2π
1 + cos 2θ
= 0.4591 + M cos2θ =
2 6
MM 2 PP 2
N Q
= 0.2108 + 0.75 = 0.9608
B0 Bk B0 B1
∴ H(sn ) = × = ×
sn + c 0 sn2 + b1 sn + c1 (sn + 0.4591) sn2 + 0.4591 sn + 0.9608
To evaluate B0 and B1,
Let, H(sn ) = 1,
sn = 0
B0 B1
When sn = 0, H(sn ) = = 2 .2670 B0 B1
(0.4591) (0.9608)
1
∴ 2.2670 B0 B1 = 1 ⇒ B0 B1 = ⇒ B0 B1 = 0.4411
2.2670
Let, B0 = B1 ; ∴ B02 = 0.4411 ⇒ B0 = 0.4411 = 0.6642
∴ B1 = B0 = 0.6642
B0 B1 0.6642 0.6642
b g
H sn =
(sn + 0.4591)
× 2 = ×
(sn + 0.4591sn + 0.9608) (sn + 0.4591) (sn2 + 0.4591sn + 0.9608)
0.4412
=
(sn + 0.4591)(sn2 + 0.4591sn + 0.9608)
0.4412
=
sn3 + 0.9182 sn2 + 11716
. sn + 0.4411
Unnormalized transfer function, H(s) of Chebyshev lowpass filter
H(s) = H sn b g s
sn =
Ωc
0.4412
∴ H(s) = H sn b g s
=
(sn + 0.4591)(sn2 + 0.4591sn + 0.9608) s
sn = sn =
Ωc Ωc
0.4412 0.4412
=
Fs IF s 2
s I = F s + 0.4591Ω I F s 2
+ 0.4591Ω c s + 0.9608Ω 2c I
GH Ω c
+ 0.4591J G
KHΩ 2
c
+ 0.4591
Ωc
+ 0.9608 JK GH Ω JK GH
c
c
Ω 2c JK
0.4412 Ω 3c
=
(s + 0.4591Ω c )(s + 0.4591Ω c s + 0.9608Ω 2c )
2
0.4412 × 0.7854 3
=
(s + 0.4591 × 0.7854)(s2 + 0.4591 × 0.7854 + 0.9608 × 0.78542 )
0.2138
=
(s + 0.3606)(s2 + 0.3606s + 0.5927) .....(1)
0.2138
=
s3 + 0.7212 s2 + 0.7227 s + 0.2137
To convert the analog transfer function to digital transfer function using impulse invariant transformation, the
equation (1) is simplified as follows.
By partial fraction expansion H(s) can be expressed as,
0.2138 A Bs + C
H(s) = = + ..... (2)
(s + 0.3606) (s2 + 0.3606s + 0.5927) s + 0.3606 s2 + 0.3606 s + 0.5927
E7. 40 DSP, Chapter 7 - IIR Filters
On cross multiplying the equation (2) we get,
0.2138 = A(s2 + 0.3606s + 0.5927) + (Bs + C) (s + 0.3607)
0.2138 = As2 + 0.3606 As + 0.5927 A + Bs2 + 0.3606 Bs+ Cs + 0.3606 C ..... (3)
On equating coefficients On equating coefficient of s in equation (3) On equating constants of equation (3)
of s in equation (3) we get, we get,
2 we get,
A Bs + C
∴ H(s) = +
(s + 0.3606) (s2 + 0.3606s + 0.5927)
(s + a)2 = s2 + 2as + a 2
0.3607 0.3607s 0.3606
= − 2s = 0.3606 ⇒ a = = 0.1803
s + 0.3606 s 2 + 0.3606s + 0.5927 2
0.3607 0.3607 s
= −
s + 0.3606
( s2 + 2 s × 0. 1803 + 0. 18032 ) + FH 0.5927 − 0.18032 IK 2
=
0.3607
−
0.3607s
=
0.3607
− 0.3607
LM
s + 0.1803 − 0.1803 OP
s + 0.3606 ( s + 0.1803)2 + 0.74852 s + 0.3606 N
(s + 0.1803)2 + 0.74852 Q
=
0.3607 LM
− 0.3607
s + 0.1803 OP + 0.3607
LM 0.1803 OP
s + 0.3606 N Q
(s + 0.1803)2 + 0.74852 N
(s + 0.1803)2 + 0.74852 Q
=
0.3607 L
− 0.3607 M
+
s 0.1803 O
P +
0.0650 L
M 0.7845 OP
s + 0.3606 N (s + 01803
. ) + 0.7845 Q 0.7845 N (s + 0.1803) + 0.7845 Q
2 2 2 2
=
0.3607 L s + 0.1803 OP + 0.0829 LM
− 0.3607 M
0.7845 OP
s + 0.3606 N (s + 0.1803 ) + 0. 2
7845 Q 2
N (s + 0.1803 ) + 0.7845 Q 2 2
b e − aT (sin bT) z −1
2 2
→
(s + a) + b 1 − 2 e (cos bT) z −1 + e −2aT z −2
− aT
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
Put, T = 1
∴ H(z) =
0.3607
− 0.3607
LM1 − e −0.1803 cos (0.7845) z −1 OP
−0.3606 −1 −0.1803
1− e z 1− 2 e N cos(0.7845) z −1 + e −2 × 0.1803 z −2 Q
L
+ 0.0829 M
e −0.1803 sin(0.7845) z −1 OP
N1− 2 e −0.1803
cos (0.7845) z −1 + e −2 × 0.1803
z −2 Q
0.3607 −0.3607 + 0.2132 z −1 0.0490 z −1
= −1
+ −1 −2
+ −1
1 − 0.6973 z 1 − 11820z
. + 0.6973 z 1 − 11820z
. + 0.6973 z −2
0.3607 −0.3607 + 0.2622 z −1
= −1
+ −1
1 − 0.6973 z 1 − 11820z
. + 0.6973 z −2
−1
0.3607(1 − 11820z
. + 0.6973z −2 ) + ( −0.3607 + 0.2622 z −1)(1− 0.6973z −1)
=
(1 − 0.6973z −1)(1− 11820
. z −1 +0.6973z −2 )
X (z) + Y (z)
−1 −1
z z
−1
0.0874z −1X(z) 1.8793z −1Y(z)
z X(z) −1
0.0874 + + 1.8793 z Y(z)
−1 −1
z z
−2 0.0687z −2 X(z) −1.5215z −2 Y(z)
z X(z) −2
z Y(z)
0.0687 + −1.5215
−1
z
0.4862z −3 Y(z) −3
0.4862 z Y(z)
W(z) 1
where, = .....(5)
X(z) 1 − 1.8793z −1 + 1.5215z −2 − 0.4862z −2
Y(z)
= 0.0874z −1 + 0.0687z −2 .....(6)
W(z)
On cross multiplying equation (5) we get,
W(z) – 1.8793z–1W(z) + 1.5215z–2W(z) – 0.4862z–3 W(z) = X(z)
\ W(z) = X(z) + 1.8793z–1W(z) – 1.5215z–2W(z) + 0.4862z–3 W(z) .....(7)
On cross multiplying equation (6) we get,
Y(z) = 0.0874z–1X(z) + 0.0687z–2W(z) .....(8)
Using equation (7) and (8), the direct form-II structure is drawn as shown in fig 2.
X (z) W(z) Y (z )
+
−1
z
1.8793 z −1W(z) 0.0874 z −1W(z)
z −1W(z)
+ 1.8793 0.0874 +
−1
z
−2
−1.5215z W(z) 0.0687 z −2 W(z)
z −2 W(z)
−1.5215 0.0687
−1
z
0.4862 z −3 W(z)
z −3 W(z)
0.4862
Ap = 10
e−δ p,dB / 20 j = 10 b −0.9151 / 20 g = 0.9
As = 10
e −α s,dB / 20 j = 10 b −9.1186 / 20 g = 0.35
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.25p rad/sample
Stopband edge digital frequency, w s = 0.375p rad/sample
Gain in normal value at passband edge, Ap = 0.9
Gain in normal value at stopband edge, As = 0.35
Sampling time, T = 0.5second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.9
Gain in normal value at stopband edge, As = 0.35 Gain is same in analog
For bilinear transformation, and digital filter.
2 ωp
Passband edge analog frequency, Ωp = tan
T 2
Using equation (7.83).
2 0.25 π
= tan = 1.6569 rad / second
0.5 2
2 ω
Stopband edge analog frequency, Ω s = tan s
T 2
2 0.375π Using equation (7.84).
= tan = 2.6727rad / second
0.5 2
Order of the filter
1 1
cosh−1
LM e1/ A 2 j O
s −1
2
P cosh−1
LM e1/0.35 2 j − 1O 2
PP
N1 =
MN e
1/ A p2 j − 1 P
Q =
MN e
1/0.9 2 j −1 Q =
cosh−1 5.5258
= 2.2643
Ω 2.6727 cosh−1 1.6131 Using equation (7.87).
cosh−1 s cosh−1
Ωp 16569
.
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 3.
Normalized transfer function, H(sn) of Chebyshev lowpass filter
For odd N,
N− 1
B0 2
Bk Using equation (7.89).
H(sn ) =
sn + c0
∏
k = 1 sn2 + bk sn + c k
N−1 3 −1
Here, N = 3, ∴ k= 2
=
2
=1
B0 B1
∴ H(sn ) = ×
sn + c 0 sn2 + b1 sn + c1
1
d
∈ = 1/ A p2 − 1 2i
1
d i
= 1 / 0.9 2 − 1 2 = 0.4843
Solution for Exercise Problems E7. 43
RL O LMF 1 I 1 OP U||
1 1
−
1 ||MF 1
1 N 1 N
yN =
I 1P 2
S G + 1JK + ∈P − MGH ∈ + 1JK + ∈P V| 2
2 |MH ∈ 2 2
|TMN PQ MN PQ |W
LL O LMF 1 I
1
O −
1
OP
1 MMMF
1 3 1 3
G 1 I
+ 1J +
1 P 2 2 1 P PP
K 0.4843 PPQ − MMNGH 0.4843 + 1JK
= + Using equation (7.93).
2 MMH 0.4843 2 2
0.4843 P
MMNN PQ PQ
1
= [1.6335 − 0.6122] = 0.5107 Using equation (7.94).
2
c 0 = yN = 0.5107
bk = 2 yN sin LM b 2k − 1 π g OP
N 2N Q
Using equation (7.90).
When k = 1 ; bk = b1 = 2 × 0.5107 sin e (2 −1) π
2× 3 j = 0.5107
ck = yN2 + cos2 LM b g
2k − 1 π OP
N 2N Q
π Using equation (7.91).
ck = c1 = 0.51072 + cos 2 e
j = 0.5107 (2 −1) π
6
2
+ cos 2
6
LM1+ cos 2π OP
6 1 + cos 2θ
= 0.51072 +M
MMN 2
PP cos2θ =
2
PQ
= 0.2608 + 0.75 = 1.0108
B0 B1 B0 B1
∴ H(sn ) = × 2 = × 2
sn + c 0 sn + b1 sn + c1 (s + 0.5107) sn + 0.5107 sn + 1.0108
To evaluate B0 and B1,
Let, H(sn ) = 1,
sn = 0
B0 B1
When sn = 0 ; H(sn ) = = 19372
. B0 B1
(0.5107) (1.0108)
1
∴ 1.9372 B0 B1 = 1 ⇒ B0 B1 = ⇒ B0 B1 = 0.5162
1.9372
Let, B0 = B1 ; ∴ B02 = 0.5162 ⇒ B0 = 0.5162 = 0.7185
∴ B1 = B0 = 0.7185
B0 B1 0.7185 0.7185
b g
H sn =
(sn + 0.5107)
× 2 = ×
(sn + 0.5107 sn + 1.0108) (sn + 0.5107) (sn2 + 0.5107 sn + 1.0108)
0.5162
=
(sn + 0.5107) (sn2 + 0.5107 sn + 10108)
.
0.5162
=
sn3 + 1.0214 sn2 + 1.2716sn + 0.5162
Unnormalized transfer function, H(s) of Chebyshev lowpass filter
H(s) = H sn b g s
sn =
Ωc
0.5162 0.5162
∴ H(s) = H sn b g =
sn3 + 10214
. sn2 + 1.2716 sn + 0.5162)
=
s3 s2 s
sn = s sn = s + 10214
. + 1.2716 + 0.5162
Ωc Ωc
Ω 3c Ω 2c Ωc
0.5162 0.5162 Ω c3
= 3 2 2
3
= 3 2
s + 10214
. Ω c s + 1.2716 Ω c s + 0.5162 Ω c s + 1.0214 Ω cs + 12716
. Ω 2c s + 0 .5162Ω 3c
3
Ωc
3
0.5162 × 16569
. 2.3480
= 3 2 2
=
s + 1.0214 × 16569s
. + 1.2716 × 16569
. s + 0.5162 × 1.65693 s 3 + 16924
. s2 +|3.4909s + 2.3480
E7. 44 DSP, Chapter 7 - IIR Filters
Digital IIR lowpass filter transfer function, H(z)
2.3480
H(z) = H s bg s=
2 1− z −1
T 1+ z −1
=
s3 + 16924
. s2 + 3.4909 s + 2.3480 2 1− z −1
s=
T 1+ z −1
2.3480
=
F 2 1− z I −1
3
F 2 1− z I −1
2
F 2 1− z I + 2.3480
−1
GH T 1+ z JK −1
+ 16924
. GH T 1+ z JK −1
+ 3.4909 GH T 1+ z JK
−1
2.3480
=
8(1− z −1)3 6 .7696(1− z −1)2 6.9818(1− z −1)
+ + + 2.3480
T 3 (1 + z −1)3 T 2 (1 + z −1)2 T (1 + z −1)
2.3480
=
8(1− z −1)3 + 6 .7696 T(1− z −1)2 (1 + z −1) + 6.9818 T 2 (1− z −1)(1 + z −1)2 + 2.3480 T 3 (1 + z −1)3
T 3 (1 + z −1)
2.3480 T 3 (1 + z −1)3
= Put, T = 0.5
8(1− z ) + 6 .7696 T(1− z ) (1 + z −1) + 6.9818 T 2 (1− z −1)(1 + z −1)2 + 2.3480 T 3 (1 + z −1)3
−1 3 −1 2
0.2935 (1 + 3z −1 + 3z −2 + z −3 )
= −1 −2 (a + b) (a – b) = a2 – b2
8(1− 3z + 3z − z ) + 3 .3848 (1− z −2 )(1 − z −1)
−3
(a + b)3 = a 3 + 3a 2b + 3ab 2 + b 3
+ 1.7455 (1+ z −1)(1 − z −2 ) + 0.2935(1 + 3z −1 + 3z −2 + z −3 )
(a − b)3 = a 3 − 3a 2b + 3ab 2 − b3
0.2935 + 0.8805 z −1 + 0.8805 z −2 + 0.2935 z −3
= −1 −2
8(1 − 3z + 3z − z ) + 3.3848 (1 − z −1 − z −2 + z −3 ) + 17455
−3
. (1 + z −1 − z −2 − z −3 ) + 0.2935 (1 + 3z −1 + 3z −2 + z −3 )
0.2935 0.8805 −1 0.8805 −2 0.2935 −3
+ z + z + z
0.2935 + 0.8805 z −1 + 0.8805 z −2 + 0.2935 z −3 13.4238 13.4238 13.4238 13.4238
= =
−1 −2
13.4238 − 24.7588 z + 19.7502 z − 6.0672 z −3 24.7588 −1 19.7502 −2 6.0672 −3
1− z + z − z
13.4238 13.4238 13.4238
0.0219 + 0.0656 z −1 + 0.0656 z −2 + 0.0219 z −3
=
1 − 1.8444 z −1 + 1.4713 z −2 − 0.4519 z −3
Alternatively,
0.0219 + 0.0656 z −1 + 0.0656 z −2 + 0.0219 z −3 z −3 (0.0219 z 3 + 0.0656 z2 + 0.0656 z + 0.0219
H(z) = =
1 − 1.8444 z −1 + 1.4713 z −2 − 0.4519 z −3 z −3 (z 3 − 18444
. z 2 + 14713
. z − 0.4519)
0.0219 z3 + 0.0656 z 2 + 0.0656 z + 0.0219
=
z3 − 1.8444 z2 + 14713
. z − 0.4519
Direct form-I structure of digital IIR lowpass filter
Y(z) 0.0219 + 0.0656 z −1 + 0.0656 z −2 + 0.0219 z −3
Let, H(z) = =
X(z) 1 − 1.8444 z −1 + 1.4713 z −2 − 0.4519 z −3
On cross multiplying the above equation we get,
Y(z) – 1.8444z–1Y(z) + 1.4713z–2Y(z) – 0.4519 Y(z) = 0.0219 X(z) + 0.0656z–1X(z) + 0.0656z–2X(z) + 0.0219z–3X(z)
\ Y(z) = 0.0219X(z) + 0.0656z–1X(z) + 0.0656z–2X(z) + 0.0219z–3X(z)
+ 1.8444z–1Y(z) – 1.4713z–2Y(z) + 0.4519z–3Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
0.0219X(z)
X (z) 0.0219 + + Y (z)
−1 −1
z z
−1 0.0656z −1X(z) 1.8444z −1Y(z) −1
z X(z) z Y(z)
0.0656 + + 1.8444
−1 −1
z z
−2 0.0656z −2 X(z) −1.4713z −2 Y(z)
z X(z) −2
z Y(z)
0.0656 + + −1.4713
−1 −1
z z
−3 0.0219z −3 X(z) 0.4519z −3 Y(z)
z X(z) −3
0.0219 0.4519 z Y(z)
W(z) 0.0219W(z)
X (z ) + 0.0219
+ Y (z )
−1
z
−1 −1
1.8444z W(z) z W(z) 0.0656z −1W(z)
+ 1.8444 0.0656
+
−1
z
−1.4713z −2 W(z) −2 0.0656z −2 W(z)
z W(z)
+ −1.4713 0.0656 +
−1
z
0.4519z −3 W(z) −3
z W(z) 0.0219z −3 W(z)
0.4519 0.0219
8.1 Introduction
The fundamental operations in the various computational procedure like convolution, spectral
estimation, etc., in DSP (Digital Signal Processing) are multiplication and addition. These operations are
performed using the samples of input sequence, samples of impulse response and the coefficients of the
difference equation governing the system. The informations (or numbers) used for computation are called
input data and the results of computation are called output data. The input and output data are stored in
registers in a digital system.
The registers are the basic storage device in digital system. The maximum size of the binary information
(or data) that can be stored in a register is called register word length. For example, when a register stores an
8-bit data then its word length is 8-bit. For storing the input data in registers they have to be quantized and
coded in binary. The quantization and coding depends on the register word length. For example, when the
register word length is 8-bit, we can generate 28 = 256 binary codes and so we have 256 quantized levels. Any
analog value of the input data has to be fitted into one of the 256 quantized levels in an 8-bit representation.
This quantization and coding will introduce error in input data, because the analog data has infinite precision
but the digital equivalent has finite precision.
While performing computations the size of the result may be exceeding the size of the register used for
storing the result. For example the result of the addition of two eight bit data may be 8 or 9 bits and the result
of the multiplication of two eight bit data may go up to 16-bits. In this case if the register used to store the
result is 8-bit, then the result has to be truncated or rounded to accommodate in the register. This makes the
system nonlinear, and leads to limit cycle behaviour. The effect of truncation or rounding can be represented
in terms of an additive error signal, which is called roundoff noise.
In general the effects due to finite precision representation of numbers in a digital system are commonly
referred to as finite word length effects. The following are some of the finite word length effects in digital
filters.
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 2
1. Errors due to quantization of input data by A/D (Analog-to-Digital) converter.
2. Errors due to quantization of filter coefficients.
3. Errors due to rounding the product in multiplication.
4. Errors due to overflow in addition.
5. Limit cycles.
− (1 − 2 −3 ) to + (1 − 2 −3 ) ⇒ − 7 to + 7 ⇒ − 0.87510 to + 0.87510
8 8
Table 8.1 : Binary Representation of Decimal Numbers
111.112 = (1 × 2 2 ) + (1 × 21 ) + (1 × 20 ) + (1 × 2 –1 ) + (1 × 2 –2 )
= (d –2 × 22 ) + (d –1 × 21 ) + ( d 0 × 20 ) + ( d1 × 2 –1 ) + (d 2 × 2 –2 )
2
= ∑ di r −i ; where, r = 2
i = –2
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 4
When r = 10, di = 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9.
In digital systems the numbers are represented in binary, in which the radix r = 2. Hence for a binary
number the equation (8.1) can be written as,
B
Binary number, N = ∑ d i 2− i .....(8.2)
i = –A
The binary digit d –A is called the Most Significant Digit (MSD) and the binary digit dB is called the
Least Significant Digit (LSD) of the binary number N. The binary point between the digits d0 and d1 does not
exist physically in the digital system. The binary digit is also known as bit.
In the various computation procedures of DSP we use fraction format because mixed numbers (i.e.,
numbers with integer and fraction parts) are difficult to multiply and the number of digits representing an
integer cannot be reduced by truncation or rounding. For the fraction format of binary numbers the equation
(8.2) can be modified as shown in equation (8.3).
B
Binary fraction number, N = ± ∑ d i 2−i
i=1
B
or Binary fraction number, N = ∑ d i 2− i .....(8.3)
i=0
In fixed point representation there is only one unique way of representing positive binary fraction
number as shown in equation (8.4).
B
= ∑ di 2−i ; where d 0 = 0 .....(8.4)
i=0
B
= (0 × 20 ) + ∑ di 2−i .....(8.5)
i=1
In equation (8.4) the most significant digit d0 is set to zero to represent the positive sign. In all the three
formats for negative numbers the most significant digit d0 is one to represent the negative sign.
Note : The binary point between d0 and d1 is not mandatory because it does not exist physically in a digital
system.
Sign-magnitude Format
In sign magnitude format the negative value of a given number differ only in sign bit (i.e., digit d0). The
sign digit d0 is zero for positive number and one for negative number. Except the sign bit all other digits of the
negative of a given number are same as that of its positive representation.
B
∴ Negative binary fraction number, N N = (1 × 2 0 ) + ∑ d i 2−i .....(8.6)
i=1
The range of decimal fraction numbers that can be represented in B-bit fixed point sign-magnitude
format is,
1
− 1 − 2 − ( B−1) to + 1 − 2 − ( B−1) ; with step size =
2B − 1
When B = 4,
1 1 7 7
Range = − 1 − 2 − ( 4 −1) to + 1 − 2 − ( 4 −1) = − 1 − 8 to + 1 − 8 = − 8 to + 8
= −0.87510 to + 0.87510
1 1 1
Step size = = 3 = = 0.12510
24 − 1 2 8
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 6
The 4-bit fixed point sign-magnitude binary representation of decimal fractions are listed in table 8.2.
Table 8.2 : Decimal Equivalents of 4-bit Binary Numbers in Fixed Point Representation
Example 8.1
Convert +0.12510 and 0.12510 to sign-magnitude format of binary and verify the result by converting the
binary to decimal.
Solution
Decimal to binary
Decimal to binary conversion conversion
.125
Convert Append Remove
+ .12510 → + .001 → 0.001 → 00012 ´2
to binary sign bit dot
0 .250
Convert Append Remove ´2
− .12510 → − .001 → 1.001 → 10012
to binary sign bit dot 0 .500
´2
\ + 0.125 = 00012
10 1 .000
0.12510 = 10012 ¯ ¯¯
.0 0 12
The positive number is same in all the formats of fixed point representation and it is given by
equation (8.5). In one’s complement format the negative of the given number is obtained by bit by bit
complement of its positive representation given by equation (8.5). The complement of a digit d i can be
obtained by subtracting the digit from one.
∴ Complement of d i = d i = (1 − d i ) .....(8.7)
In equation (8.5) if we set the sign bit to one and replace d i by (1 – d i ) we get the one’s complement
format for negative number.
B
∴ Negative binary fraction UV
N = (1 × 20 ) + ∑ (1 − d i )2−i .....(8.8)
number in one's complement 1c W i=1
The range of decimal fraction numbers that can be represented in B-bit fixed point one’s complement
format is same as that of sign-magnitude format. The 4-bit fixed point one’s complement binary representation
of decimal fraction are listed in table 8.2.
Example 8.2
Convert +0.12510 and 0.12510 to ones complement format of binary and verify the result by converting
the binary to decimal.
Solution
Decimal to binary conversion
Convert Append Remove
+ .12510 → +.001 → 0.001 → 00012
to binary sign bit dot
Convert Complement Append
Remove
− .12510 → − .001
→ −.110 → 1.110 → 11102
to binary fraction part sign bit dot
\ + 0.125 = 00012
10
Refer example 8.1
0.12510 = 11102 for decimal to binary
conversion of .12510
Binary to decimal conversion
Remove Convert
00012
→ +.001
→ + 0.12510
sign bit to decimal
Remove Complement
Convert
11102 → − .110 → − .001 → −.12510
sign bit fraction part to decimal
The two’s complement format provides single representation for zero, whereas the sign-magnitude
and one’s complement format has two representation for zero. Hence, the two’s complement format of binary
number system is practically used in all digital systems.
The range of decimal fraction numbers that can be represented in B-bit fixed point two’s complement
format is,
1
−1 to + 1 − 2− ( B−1) ;with step size =
2B − 1
When B = 4,
1 7
Range = −1 to + 1 − 2 − ( 4 −1) = −1 to + 1 − 8 = − 1 to + 8 = −1 to + 0.87510
1 1 1
Step size = 4−1
= 3
= = 0.12510
2 2 8
The 4-bit fixed point two’s complement binary representation of decimal fractions are listed in table 8.2.
Example 8.3
Convert +0.12510 and 0.12510 to twos complement format of binary and verify the result by converting
the binary to decimal.
Solution
–4 –3
The range of numbers that can be represented by this floating point format is from ± [2 ´2 ]
–4 3 –3
to ± [(2 – 2 ) ´ 2 ] i.e., from ± 7.8125 10 to ± 15.5.
4
Note : In the range of floating point format the 4 in 2 represents the 4-bit alloted for fractional binary
3 +3
number in mantissa and the 3 in 2 or 2 represents the maximum size of integer that can be
represented using 2-bits in exponent.
Let us represent +5, –5, +0.125 and –0.125 using the floating point format discussed above. Let us use
sign-magnitude format for representing mantissa and exponent. First the given decimal number is converted
to binary and then the binary point is moved to a position such that the most significant bit of mantissa is one
and the exponent is adjusted accordingly. This form of floating point number is called normalized form.
Convert
Convert Add Normalize exponent
+510 → + 1012 → + 101.0 × 20 → + .1010 × 2+310 to binary
to binary exponent
Remove Append
01010 × 20112 ← 0.1010 × 20112 ← + .1010 × 2+112
¯
Remove Append
11010 × 20112 ← 1.1010 × 20112 ← − .1010 × 2+112
¯
Remove Append
01000 × 2110 2 ←
0.1000 × 2110 2 ← + .1000 × 2−10 2
¯
dot sign bit
Remove Append
11000 × 2110 2 ←
1.1000 × 2110 2 ← − .1000 × 2−10 2
¯
dot sign bit
S E M
Convert fraction
∴ 1. M = 1.1001 → 1.1001 0000 0000 0000 0000 000
part to 23-bits
Convert
E = 13110
→ 1000 00112
to binary
∴ +2510 = 0 1000
14420011
44
3 11001 0000 0000
4444444 0000 0000 000
4244444444 3
B B B
1-bit 8-bit 23-bit
sign exponent mantissa
− 2510 = 1 1000
14420011
44
3 11001 0000 0000
4444444 0000 0000 000
4244444444 3
B B B
1-bit 8-bit 23-bit
sign exponent mantissa
∴ 0100 0001 1100 1000 0000 0000 0000 00002 = (−1)0 × 21000 00112 −12710 × 1.1001
= +213110 −12710 × 1.1001
= +24 × 1.1001 = +110012
+110012 = +(1 × 24 + 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 ) = +(16 + 8 + 0 + 0 + 1) = +2510
∴ 1100 0001 1100 1000 0000 0000 0000 00002 = (−1)1 × 21000 00112 −12710 × 1.1001
= −213110 −12710 × 1.1001
= −24 × 1.1001 = −110012
−110012 = −(1 × 24 + 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 ) = −(16 + 8 + 0 + 0 + 1) = −2510
Example 8.5
Add +0.375 and 0.625 by ones complement addition.
Solution
The ones complement representation of the given numbers are shown below.
Convert to Add sign Remove
+.37510 → +.0112
→ 0.0112
→ 00112
binary bit dot
0011
+ 1010
0101
Refer example 8.5 for
+ 1100 decimal to binary conversion
of .37510 and .62510.
Carry ® 1 0001 ¬ sum
® 1 (add carry to LSD)
0010 ¬ Final sum
Since the carry is one the sum is positive. The final sum can be obtained by adding the carry to least
significant digit (LSD) of the sum. The final sum can be converted to decimal as shown below.
Extract Convert to
00102 → + .0102 → +.2510
sign bit decimal
In summary,
+.625 Þ 0101
10 2
.375 Þ 1100
10 2
Refer example 8.5 for binary
(+.625 ) + (.375 ) Þ 00102 Þ + .2510 to decimal conversion of .0102.
10 10
Example 8.7
Add +0.375 and 0.625 by twos complement addition.
Solution
The twos complement representation of the given numbers are shown below.
Convert to Add sign Remove
+.37510 → +.0112
→ 0.0112
→ 00112
binary bit dot
In summary,
+.37510 Þ 00112
.62510 Þ 10112
Refer example 8.5 for binary
(+.37510) + (.625)10) Þ 11102 Þ .2510 to decimal conversion of .0102.
Example 8.8
Add +0.62510 and 0.37510 by twos complement addition.
Solution
The twos complement representation of the given numbers are shown below.
Convert to Add sign Remove
+0.62510 → +.1012
→ 0.1012
→ 01012
binary bit dot
Since the carry is one the sum is positive. The carry is discarded in twos complement addition. The sum
can be converted to decimal as shown below.
Extract Convert to
00102 → + .0102 → +.2510
sign bit decimal
In summary,
+.62510 Þ 01012
.37510 Þ 11012
Refer example 8.5 for binary
(+.62510) + (.37510) Þ 00102 Þ + .2510 to decimal conversion of .0102.
Remove Append
0101000 × 20112 ←
0.101000 × 20112 ← + .101000 × 2+112
¯
Remove Append
0100000 × 21012 ←
0.100000 × 21012 ← + .100000 × 2−012
¯
dot sign bit
\ +510 = 01 0100 00112
+0.2510 = 01 0000 01012
Since the exponents of +5 and +0.25, are not equal, the exponent of +0.25 is unnormalized to make its
exponent equal to that of +5.
unnormalizing
∴ +.2510 = 0.100000 × 21012 = 0.100000 × 21
→ = 0.000010 × 23 = 0.000010 × 20112
Now the unnormalized mantissa of +0.2510 is added to the mantissa of +510 to get the sum of mantissa.
The exponent of the sum is same as that of the exponents of the numbers added.
011
+ 510 Þ 0101000 ´ 2
011
+ .2510 Þ 0000010 ´ 2
011
(510 + .2510) Þ 0101010 ´ 2 Þ +5.2510
011
\ 5 + .25 = 0.101010 ´ 2 = 0101010 011
10 10 2
The sum in floating point format can be converted to decimal as shown below.
Convert
Re move exp onent
0101010 × 2011
→ +.101010 × 2+112 → +.101010 × 2+310 = +101010
. 2
sign bit to decimal
2 1 0 −1
+101010
. = +(1 × 2 + 0 × 2 + 1 × 2 + 0 × 2 + 1 × 2−2 + 0 × 2−3 )
= +(4 + 0 + 1 + 0 +.25 + 0) = +5. 2510
Solution
Let us convert +510 and +0.2510 to floating point format.
The quantization steps of decimal numbers that lies in the range –1 to +1 for b = 2 and b = 3 are listed
in table 8.3 and 8.4 respectively.
8. 17 Digital Signal Processing
Table 8.3 : Quantization Steps for B = 3 and b = B 1 = 2
Binary Quantization Steps
Code
Sign-magnitude One’s complement Two’s complement
000 +0 × 2 −2 = +0 × 14 = +0 +0 × 2 −2 = +0 × 14 = +0 +0 × 2 −2 = +0 × 14 = +0
1 1 1
001 + 1 × 2 − 2 = +1 × 4
= +0.25 + 1 × 2 − 2 = +1 × 4
= +0.25 + 1 × 2 − 2 = +1 × 4
= +0.25
1 1 1
010 +2 × 2 −2 = +2 × 4
= +0.50 +2 × 2 −2 = +2 × 4
= +0.50 +2 × 2 −2 = +2 × 4
= +0.50
1 1 1
011 +3 × 2 − 2 = +3 × 4
= +0.75 +3 × 2 − 2 = +3 × 4
= +0.75 +3 × 2 − 2 = +3 × 4
= +0.75
1 1 1
100 −0 × 2 −2 = −0 × 4 = −0 −3 × 2 −2 = −3 × 4 = −0.75 −4 × 2 −2 = −4 × 4 = −100
.
−b
3×2
−b
2 ×2
N N
F ig 8.2 a : Trun c a tio n ch a ra c teristics o f F ig 8.2 b : Trun c a tio n ch a ra c teristics o f sign -m ag n itu d e
tw o ’s c o m p lem en t q u a n tizer. o r o n e ’s co m p lem en t qu a n tize r.
F ig 8.2 : In p u t-o u tpu t c h aracteristics o f q u a n tize r u se d for tru n ca tio n .
The input-output characteristics of the quantizer used for truncation is shown in fig 8.2. In fig 8.2. the
quantization steps are marked on the y-axis. The range of unquantized numbers are marked on x-axis. The
characteristics shown in fig 8.2 can be interpreted as follows.
1. Any positive unquantized number in the range, 0 ≤ N < (1 × 2 − b ), will be assigned the
quantization step, 0 ´ 2–b.
2. Any positive unquantized number in the range, (1 × 2− b) ≤ N < (2 × 2 − b ), will be assigned the
quantization step, 1 ´ 2–b and so on.
3. In sign-magnitude and one’s complement quantizer, any negative unquantized number in the
range, (– 1 ´ 2–b) < N £ 0, will be assigned the quantization step, 0 ´ 2–b.
4. In sign-magnitude and one’s complement quantizer, any negative unquantized number in the
range, ( –2 ´ 2–b) < N £ (–1 ´ 2–b), will be assigned the quantization step, –1 ´ 2–b and so on.
5. In two’s complement quantizer, any negative unquantized number in the range, (– 1 ´ 2–b) £ N < 0,
will be assigned the quantization step, –1 ´ 2–b.
–b –b
6. In two’s complement quantizer, any negative unquantized number in the range, (–2 ´ 2 ) £ N < (–1´2 ),
will be assigned the quantization step, –2 ´ 2–b and so on.
In fixed point number system there are three different types of number representation. The effect of
truncation on positive numbers are same in all the three representations (because the format for positive
number is same in all the three representations). The error due to truncation of negative number depends on
the type of representation of the number.
8. 19 Digital Signal Processing
Let, N = Unquantized fixed point binary number.
Nt = Fixed point binary number quantized by truncation.
The quantization error in fixed point number due to truncation is defined as,
Truncation error, et = Nt – N ..... (8.13)
Case i : Positive number
The unquantized positive number in the range,
(1 × 2 − b ) ≤ N < ( 2 × 2 − b ) is→ N t = 1 × 2 − b
truncated to
−b
∴ Minimum error = 1 × 2 − 2 × 2 − b = −2 − b
Maximum error = 1 × 2 − b − 1 × 2 − b = 0
∴ Range of error = − 2 − b < e ≤ 0
N tf − N f
∴ Relative error due to truncation, ε t = ..... (8.15)
Nf
The range of errors for different types of representation for mantissa of floating point numbers are
shown in table 8.6.
Table 8.6 : Range of Errors in Truncation of Floating Point Numbers
Two's complement −2
−b
0 et
0 £ et < 2–b × 2
negative mantissa F ig 8.3a : F ixe d p o in t-tw o ’s c o m p le m en t.
One's complement positive
and negative mantissa −2 × 2 − b < ε t ≤ 0
Sign-magnitude positive
−2 × 2 − b < ε t ≤ 0 p( εt )
and negative mantissa
In truncation of binary number the range of error is 2 /4
b
−b −b et −b
−2 0 2 −2 × 2 0 εt
F ig 8 .3 c : F ix ed p oin t-o n e’s co m p lem en t F ig 8 .3 d : F lo a tin g p o in t-w h en m an tissa in
o r sign -m a g n itu d e. o n e’s c o m p lem ent o r in sig n m a gn itu d e .
F ig 8 .3 : Q ua n tiza tion noise p rob a b ility d e nsity fu n c tio ns fo r tru n ca tio n .
8. 21 Digital Signal Processing
8.4.3 Rounding
Rounding is the process of reducing the size of a binary number to finite word size of b-bits such that
the rounded b-bit number is closest to the original unquantized number. The rounding process consists of
truncation and addition. In rounding of a number to b-bits, first the unquantized number is truncated to b-bits
by retaining the most significant b-bits. Then a zero or one is added to the least significant bit of the truncated
number depending on the bit that is next to the least significant bit that is retained.
If the bit next to the least significant bit that is retained is zero then zero is added to the least significant
bit of the truncated number. If the bit next to the least significant bit that is retained is one then one is added
to the least significant bit of the truncated number. (Here adding one is called rounding up).
The input-output characteristics of the quantizer used for rounding is shown in fig 8.4. In fig 8.4. the
quantization steps are marked on y-axis. The range of unquantized numbers are marked on x-axis. The
characteristics shown in fig 8.4 can be interpreted as follows.
Nt
−b
3 ×2
−b
2 ×2
Note : Quantization step size = 2 −b
2−b
1 ×2
−b Half of quantization step size =
2
2 −b 2 −b 2 −b
−3 × −2 × −1 ×
2 2 2
2 −b 2 −b 2 −b
1× 2× 3× N
2 2 2
−b
−1 × 2
−b
−2 × 2
−b
−3 × 2
2– b 2–b
– ≤ er ≤
2 2
Let, Nf = Unquantized floating point binary number.
Nrf = Rounded floating point binary number.
Now, Nrf = Nf + Nfer ..... (8.17)
where er is the relative error due to rounding of a floating point number.
N rf − N f
∴ Relative error due to rounding, ε r = ..... (8.18)
Nf
The range of error due to rounding for all the three formats (i.e., one’s complement, two’s complement
and sign-magnitude) of the mantissa is same. In floating point representation the range of error made by
–b –b
rounding a number to b-bits is given by, –2 £ er £ 2 .
In rounding of binary number the range of error is known but the probability of obtaining an error
within the range is not known. Hence it is assumed that the errors occur uniformly throughout the interval and
with this assumption the probability density functions for rounding of fixed point and floating point numbers
are shown in fig 8.5.
p(er)
p(εr)
b
2
b
2 /2
−b 0 2 −b er −b −b
−2 −2 0 2 εr
2 2
F ig 8.5 a : R o u nd in g - fix ed po in t. F ig 8.5 b : R o u nd in g - flo a tin g p o in t.
F ig 8.5 : Q ua n tiza tio n n o ise p ro b a b ility d en sity fu n ctio n s fo r ro u n d in g .
R R
Quantization step size, q = B
= b+1 .....(8.19)
2 2
where, B = Size of binary including sign bit
b = B – 1 = Size of binary excluding sign bit.
Usually the analog signal is scaled such that the magnitude of quantized signal is less than or equal to
one. In such case the range of analog signal to be quantized is –1 to +1, therefore R = 2.
Let, x(n) = Unquantized sample of the signal
and xq(n) = Quantized sample of the signal
Now the quantization error is defined as,
Quantization error, e(n) = xq(n) – x(n) ..... (8.20)
In A/D converters the quantization can be performed by truncation or rounding. But the quantization
by rounding is preferred in A/D converters due to zero mean value of quantization error and low variance
when compared to truncation.
The quantization error for rounding will be in the range of –q/2 to +q/2 (Refer section 8.4.3 for the
characteristics of quantizer with rounding). Also we assume that all errors are equiprobable and so the mean
value of error is zero. The error due to rounding is treated as a random variable.
For a uniformly distributed random variable “x” in the interval, (x1, x2), the expected value (or mean
value) and variance are given by, x 2
1
Expected value, E{x} =
x 2 − x1 z
x1
x dx
1 LF q I FG − q IJ OP = 0
2 2 .....(8.21)
= MG J
2q MNH 2 K
−
H 2 K PQ
Variance of error signal, σ 2e = E{e2 } – E 2 {e} = E{e2 }
+q /2 +q /2
1 1 LM e OP
3
= q
2
− −
FG IJ
q
2H K
z
− q /2
2
e de =
q MN 3 PQ – q /2
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 24
2 2 −2B 2 −2B
When R = 2, σ 2e = 2 = .....(8.24)
12 3
xq(n)
h(n) + h(n)
x(n) y(n) x(n) y (n)
where, zc
denote integration around unit circle |z| = 1, in the anticlockwise direction.
The closed contour integration of equation (8.28) can be evaluated using residue theorem of
Z-transform.
1
∴ σ 2eoi = σ e2
2 πj
N
z c
H ( z) H ( z −1 ) z −1 dz
= σ 2e ∑ Re s
i 1
H ( z ) H ( z −1 ) z −1 z = pi
=
N
= σ 2e ∑
i 1
( z − p i ) H(z) H ( z −1 ) z −1 z = pi
..... (8.29)
=
–1 –1
where, p , p , ....., p are poles of H(z) H(z ) z .
1 2 N
Since the closed contour integration in equation (8.29) is around the unit circle |z| = 1, only the residues
for the poles that lie inside the unit circle in z-plane are considered.
For the recursive filter shown in fig 1, the input x(n) has a peak value of x(n) y’ (n)
10 V, represented by 6 bits. Compute the variance of output due to A/D conversion z
−1
0.93
process.
Solution F ig 1.
Let us assume that the input is positive and so the 6-bits are used to represent only positive numbers.
R
∴ Quantization step size, q =
2B
Given that, R = 10 and B = 6
10
∴ q= = 0.15625
26
q2 0.156252
Variance of error signal, σ 2e = = = 2.0345 × 10 −3 .....(1)
12 12
Consider the given LTI system without error e(n) as shown in fig 2. The
x(n) y(n)
difference equation of the system is,
−1
z
y(n) = 0.93 y(n 1) + x(n) 0.93
y(n−1)
On taking Z-transform of above equation we get,
1
F ig 2.
Y(z) = 0.93 z Y(z) + X(z)
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 26
1
Y(z) 0.93 z Y(z) = X(z)
1
Y(z) [1 0.93 z ] = X(z)
Y(z) 1
∴ =
X(z) 1 − 0.93 z−1
Y(z)
We know that the transfer function, H(z) =
X(z)
1
∴ H(z) =
1 − 0.93 z −1
1 1
∴ H(z) H(z−1) z−1 = × × z−1
1 − 0.93 z−1 1 − 0.93 z
z−1 −10753
. z−1
= =
FG1 − 0.93IJ (−0.93) FG z − 1 IJ FG z − 0.93 IJ
(z − 1.0753)
H z K H 0.93K H z K
−1.0753
=
(z − 0.93)(z − 10753
. )
Now, poles of H(z) H(z1) z1 are p1 = 0.93, p2 = 1.0753.
Here, p1 = 0.93 is the only pole that lies inside the unit circle in z-plane.
The steady state output noise power (or variance) due to input quantization error signal is given by,
N
= σ 2e ∑ Re s
i=1
H(z) H(z−1) z−1
z = pi
N
= σ e2 ∑
i=1
(z − pi ) H(z) H(z −1) z −1 Using equation (8.29)
z = pi
where, p1, p2, ....... pN are poles of H(z) H(z1) z1, that lies inside the unit circle in z-plane.
−10753
.
∴ σ 2eoi = σ 2e × (z − 0.93) ×
(z − 0.93)(z − 10753
. ) z = 0.93
−1.0753
= σ 2e × = 7.4006 σ e2
0.93 − 1.0753
= 7.4006 × 2.0345 × 10 −3 Using equation (1)
= 0.0151
Example 8.12
An LTI system is characterized by the difference equation, y(n) = 0.68 y(n 1) + 0.15x(n). The input
signal x(n) has a range of 5 V to +5 V, represented by 8-bits. Find the quantization step size, variance of the
error signal and variance of the quantization noise at the output.
Solution
Given that,
Range, R = 5 to +5 = 5 (5) = 10.
8. 27 Digital Signal Processing
Size of binary, B = 8 bits (including sign bit).
R 10
∴ Quantization step size, q = B
= 8 = 0.0390625
2 2
q2 0.03906252
Variance of error signal, σ 2e = = = 1.2716 × 10 −4 .....(1)
12 12
The difference equation governing the LTI system is,
y(n) = 0.68y(n 1) + 0.15x(n)
On taking Z-transform of above equation we get,
Y(z) = 0.68z1Y(z) + 0.15X(z)
Y(z) 0.68z1Y(z) = 0.15X(z)
Y(z) [1 0.68z1] = 0.15X(z)
Y(z) 0.15
∴ =
X(z) 1 − 0.68z−1
Y(z)
We know that the transfer function, H(z) = .
X(z)
0.15
∴ H(z) =
1 − 0.68z −1
0.15 0.15
∴ H(z) H(z−1) z−1 = × × z−1
1 − 0.68 z−1 1 − 0.68 z
0.0225z−1 −0.0331z−1
= =
FG1 − 0.68 IJ (−0.68) FG z − 1 IJ FG z − 0.68 IJ
(z − 1.4706)
H z K H 0.68 K H z K
−0.0331
=
(z − 0.68)(z − 1.4706)
Now, poles of H(z) H(z1) z1 are p1 = 0.68, p2 = 1.4706.
Here, p1 = 0.68 is the only pole that lies inside the unit circle in z-plane.
∴ Variance of the input quantization U| σ 1
noise at the output
V|
W
2
eoi = σ e2
2πj z
c
H(z) H(z −1) z−1 dz
N
= σ 2e ∑ Re s
i=1
H(z) H(z−1) z−1
z = pi
N
Using equation
= σ e2 ∑
i=1
(z − pi ) H(z) H(z −1) z−1 (8.29).
z = pi
1 1
where, p1, p2, ....... pN are poles of H(z) H(z ) z , that lies inside the unit circle in z-plane.
−0.0331
∴ σ 2eoi = σ 2e × (z − 0.68) ×
(z − 0.68)(z − 14706
. ) z = 0.68
−0 .0331
= σ 2e × = 0.0419 σ 2e
0.68 − 1.4706
= 0.0419 × 12716
. × 10 −4 Using equation (1)
= 5.328 × 10 −6
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 28
Example 8.13
0.45z
The output of an A/D converter is applied to a digital filter with the system function H(z) = .
z − 0.72
Find the output noise power for the digital filter, when the input signal is quantized to 7 bits.
Solution
The range of input signal is not specified.
\ Range, R = 1 to +1 = 1 (1) = 2
R 2
∴ Quantization step size, q = = = 0.015625
2B 27
q2 0.0156252
Variance of error signal, σ 2e = =
12 12
= 2.0345 × 10 −5 .....(1)
Given that,
0.45z
H(z) =
z − 0.72
0.45z 0.45z−1
∴ H(z) H(z −1) z −1 = × −1 × z −1
z − 0.72 z − 0.72
0.452 z−1 0.2025z−1
= =
FG
(z − 0.72)
1
− 0.72
IJ
(z − 0.72)
1 − 0.72z FG IJ
Hz K z H K
0.2025 z −1z −0.28125
=
F 1 IJ = (z − 0.72)(z − 13889
(z − 0.72)( −0.72) G z −
. )
H 0.72K
Now, poles of H(z) H(z1) z1 are p1 = 0.72, p2 = 1.3889.
Here, p1 = 0.72 is the only pole that lies inside the unit circle in z-plane.
N
= σ 2e ∑ Re s
i=1
H(z) H(z −1) z−1
z = pi
N
= σ 2e ∑
i=1
(z − pi ) H(z) H(z−1) z−1 Using equation (8.29)
z = pi
1 1
where, p1, p2, ....... pN are poles of H(z) H(z ) z , that lies inside the unit circle in z-plane.
8. 29 Digital Signal Processing
−0.28125
∴ σ 2eoi = σ 2e × (z − 0.72) ×
(z − 0.72)(z − 1.3889) z = 0.72
−0 .28125
= σ 2e × = 0.4205 σ 2e
0.72 − 1.3889
= 8.5551 × 10 −6
Example 8.14
1
For second - order IIR filter, H(z) =
(1− 0.5 z ) (1− 0.45 z−1)
−1
Study the effect of shift in pole location with 3-bit coefficient representation in direct and cascade form.
Solution
1 1
Given that, H(z) = =
(1 − 0.5 z −1) (1 − 0.45 z −1) z −1(z − 0.5) z −1(z − 0.45)
z2
=
(z − 0.5) (z − 0.45)
The roots of the denominator of H(z) are the original poles of H(z). Let the original poles of H(z) be
p1 and p2.
Here, p1 = 0.5 and p2 = 0.45
1
H(z) =
(1 − 0.5 z −1) (1 − 0.45 z −1)
1 1
= =
1 − 0.5 z −1 − 0.45 z −1 + 0.225 z −2 1 − 0.95 z −1 + 0.225 z −2
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 30
Let us quantize the coefficients by truncation.
Decimal to binary conversion
Convert to Truncate to Convert to .95 .225
.9510 → .11112 → .1112 → .87510
binary 3-bits decimal ´2 ´ 2
1 .90 0 .450
Convert to Truncate to
Convert to
.22510 → .00112 → .0012 → .12510 ´2 ´2
binary 3-bits decimal
1 .80 0 .900
Let H(z) be the transfer function of the IIR system after ´2 ´2
1 .60 1 .800
quantizing the coefficients.
´2 ´2
1 .20 1 .600
1 ¯¯¯¯ ¯¯¯¯
∴ H(z) = .11112 .00112
1 − 0.875 z−1 + 0.125 z −2
Binary to decimal conversion
Y(z) 1 .1112 = (1 ´ 21) + (1 ´ 22) + (1 ´ 23) = .87510
Let , H(z) = =
X(z) 1 − 0.875z−1 + 0.125 z−2 .0012 = (0 ´ 21) + (0 ´ 22) + (1 ´ 23) = .12510
X (z) Y (z)
+
z −1
−1
0.875z Y (z )
−1
z Y (z )
+
−1
z
−1
−0.125z Y (z )
−2
z Y (z )
1
Let , H(z) = 0.875 ± 0.8752 − 4 × 0.125
z−2 (z2 − 0.875 z + 0.125) z=
2
z2 z2 = 0.695 or 0.18
= 2
=
z − 0.875 z + 0.125 (z − 0.695) (z − 0.18)
The poles of H(z) are given by roots of the denominator polynomial of H(z) . Let the poles of H(z) be
pd1 and pd2 .
If we compare the poles of H(z) and H(z) we can observe that the poles of H(z) deviate very much from
the original poles.
8. 31 Digital Signal Processing
Case (ii) : Cascade Realization
1
Given that, H(z) =
(1 − 0.5 z −1) (1 − 0.45 z −1)
In cascade realization the system can be realized as cascade of first order sections.
1 1
where, H1(z) = and H2 (z) =
1 0.5 z 1 1 0.45 z 1
Let us quantize the coefficients of H1(z) and H2(z) by truncation.
Convert to Truncate to Convert to Decimal to binary conversion
.510 → .1000 2
→ .100 2 → .510 .45
binary 3 bits decimal .5
´2 ´2
Convert to Truncate to Convert to
.4510 → .01112
→ .0112 → .37510 1 .0 0 .90
binary 3 bits decimal
´2
1 .80
Let, H1(z) and H2 (z) be the transfer function of the first-order ´2
sections after quantizing the coefficients. 1 .60
´2
1
∴ H1(z) = 1 .20
1 0.5 z −1 ¯ ¯¯¯¯
.10002 .01112
1
H2(z) =
1 0.375 z −1 Binary to decimal conversion
. 1 0 0 2= ( 1 ´ 2 1) + ( 0 ´ 2 2) + ( 0 ´ 2 3 )
Y1(z) 1
Let , H1(z) = = = .510
X(z) 1 − 0.5 z −1 . 0 1 1 2= ( 0 ´ 2 1) + ( 1 ´ 2 2) + ( 1 ´ 2 3 )
= .37510
On cross multiplying the above equation we get,
Y1(z) 0.5z1Y1(z) = X(z)
\ Y1(z) = X(z) + 0.5z1Y1(z) .....(1)
Y(z) 1
Let , H2(z) = =
Y1(z) 1 − 0.375 z−1
X (z) Y 1 (z ) Y (z)
+ +
−1 −1 −1
−1 z
0.5z Y 1 (z ) z 0.375z Y (z)
0.5 −1 −1
H 1 (z ) z Y 1 (z) z Y (z ) H 2 (z )
On comparing the poles of the cascade system with original poles we can say that one of the pole is same
and other pole is very close to original pole.
Example 8.15
Discuss the effect of coefficient quantization on pole locations of the following IIR system, when it is
realized in direct form-I and in cascade form. Assume a word length of 4-bits through truncation.
1
H(z) = The roots of the quadratic
1 − 0.7 z −1 + 0.12z −2
z2 0.7z + 0.12 = 0, are given by,
Solution
0.7 ± 0.72 − 4 × 0.12
1 z=
Given that, H(z) = 2
1 − 0.7 z −1 + 0.12 z −2
0.7 ± 0.1
= = 0.4, 0.3
1 z2 2
= −2 2 = 2
z (z − 0.7z + 0.12) z − 0.7z + 0.12
z2 .....(1)
=
(z − 0.4)(z − 0.3)
The roots of the denominator of H(z) are the original poles of H(z). Let the original poles of H(z) be
p1 and p2.
Here, p1 = 0.4 and p2 = 0.3.
Case(i) : Direct form-I Realization
1
Given that, H(z) =
1 − 0.7z −1 + 0.12z −2
Let us quantize the coefficients by truncation.
1
∴ H(z) =
1 − 0.6875 z−1 + 0.0625 z−2
Y(z) 1
Let , H(z) = =
X(z) 1 − 0.6875 z−1 + 0.0625 z −2
Using the above equation the direct form-I structure of IIR system is drawn as shown in fig 1.
X (z) Y (z)
+
x (n ) y (n )
−1
z
−1
0.6875z Y (z ) −1
z Y (z )
+ 0.687 5
−1
z
−2
−0.0625z Y (z)
z −2 Y (z )
−0.0625
1 z2
Let , H(z) = −2 2
= 2
z (z − 0.6875 z + 0.0625) z − 0.6875z + 0.0625
If we compare the poles of H(z) and H(z) we can observe that the poles of H(z) deviate very much from
the original pole.
1 z2 z z
Given that, H(z) = −1 −2
= = × Using equation (1).
1 − 0.7 z + 0.12 z (z − 0.4)(z − 0.3) z − 0.4 z − 0.3
z z
= ×
z (1 − 0.4 z −1) z (1 − 0.3 z −1)
1 1
= × = H1(z) × H2(z)
1 − 0.4 z −1 1 − 0.3 z −1
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 34
1
where, H1(z) =
1 − 0.4 z −1
1
H2(z) =
1 − 0.3 z −1
In cascade realization the system can be realized as cascade of first-order sections.
Let us quantize the coefficients of H1(z) and H2(z) by truncation.
Let, H1(z) and H2(z) be the transfer function of the first-order sections after quantizing the coefficients.
1 1
∴ H1(z) = ; H 2 (z) =
1 − 0.375 z −1 1 − 0.25z −1
Y1(z) 1
Let , H1(z) = =
X(z) 1 − 0.375 z−1
X (z) Y 1 (z ) Y (z)
+ +
−1 −1
−1 z −1 z
0.375z Y 1 (z) 0.25z Y (z )
0.3 75 0.25
−1 −1
H 1 ( z) z Y 1 (z) z Y (z ) H 2 ( z)
Example 8.16
Consider the LTI system governed by the equation, y(n) + 0.8301y(n 1) + 0.7348y(n 2) = x(n 2).
Discuss the effect of coefficient quantization on pole locations, when the coefficients are quantized by,
(i) 3-bits by truncation (ii) 4-bits by truncation
Solution
Given that, y(n) + 0.8301y(n 1) + 0.7348y(n 2) = x(n 2)
On taking Z-transform of the given equation we get,
Y(z) + 0.8301z1Y(z) + 0.7348z2Y(z) = z2X(z) The roots of the quadratic,
2 2
[z + 0.8301z + 0.7348]z Y(z) = z X(z) 2 z2 + 0.8301z + 0.7348 = 0 are,
Let, H3(z) be the transfer function of the IIR system after quantizing the coefficients to 3-bits by truncation.
1
∴ H3(z) =
z2 + 0.75 z + 0.625
1
=
(z + 0.375 − j0.696)(z + 0.375 + j0.696)
The poles of H3(z) are given by roots of the denominator polynomial of H3(z) . Let the poles of H3(z)
be p13 and p23.
Let, H4 (z) be the transfer function of the IIR system Note : The decimal to binary
conversion is same as that of case(i).
after quantizing the coefficients to 4-bits by truncation.
Binary to decimal conversion
1 .11012 =(1´21)+(1´22)+(0´23) +(1´24)
∴ H4 (z) = 2
z + 0.8125 z + 0.6875 = .812510
The poles of H4 (z) are given by roots of the denominator polynomial of H4 (z) . Let the poles of H4 (z)
be p14 and p24.
e b0(n ) e b0(n )
x (n ) y (n ) x (n ) y (n )
b0 + + + + b0 + +
−1 e b1 (n ) e a1(n ) e a1 (n ) e b1(n )
z z −1 z −1
b1 + + −a 1 + −a 1 b1 +
H (z)
H (z)
e b0 (n ) e b0(n )
x (n ) x (n ) y (n )
b0 + + + + b0 + +
e b1(n ) e a1(n ) e a1 (n ) e b1 (n )
z −1 z
−1
z
−1
b1 + + + + −a 1 + + −a 1 b1 + +
e b2(n ) e a2(n ) e a2 (n ) e b2 (n )
z −1 z
−1
z
−1
b2 + + −a 2 + −a 2 b2 +
H (z) H (z)
x (n ) y (n )
+ + + +
e a11(n ) z
−1 e b11(n ) e a12(n ) z
−1 e b12(n )
+ −a 11 b 11 + + −a 12 b 12 +
H 1(z) H 2(z)
+ + −a 11 b 11 + + + + −a 12 b 12 + +
e a21(n ) z
−1 e b21(n ) e a22(n ) z
−1 e b22(n )
+ −a 21 b 21 + + −a 22 b 22 +
H 1(z) H 2(z)
In equation (8.32) the summation of hk(n) can be evaluated using Parseval’s theorem.
1
∴ σ 2ekop = σ 2ek
2 πj zc
Tk ( z) Tk ( z –1 ) z –1 dz ..... (8.33)
where, z c
denote integration around unit circle |z| = 1, in the anticlockwise direction.
The closed contour integration of equation (8.33) can be evaluated using residue theorem of
Z-transform as shown below.
N
∴ σ 2ekop = σ ek
2
∑ Res Tk (z) Tk (z–1) z–1 z = pi
i=1
N
= σ 2ek ∑
=
(z − pi ) Tk (z) Tk (z –1 ) z –1
z = pi
..... (8.34)
i 1
–1 –1
where p1, p2, ....., pN are poles of Tk(z) Tk(z ) z , that lie inside the unit circle in z-plane.