100% found this document useful (2 votes)
753 views

Digital Signal Processing-Full

Uploaded by

Quỳnh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
753 views

Digital Signal Processing-Full

Uploaded by

Quỳnh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1291

i

hsqs„ev2ƒsqxev
€‚ygiƒƒsxq
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.
hsqs„ev2ƒsqxev
€‚ygiƒƒsxq
Second Edition

A. Nagoor Kani
Founder, RBA Educational Group
Chennai

Tata McGraw Hill Education Private Limited


NEW DELHI

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

Published by the Tata McGraw Hill Education Private Limited,


7 West Patel Nagar, New Delhi 110 008.

Copyright © 2012, by Tata McGraw Hill Education Private Limited.


No part of this publication may be reproduced or distributed in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise or stored in a database or retrieval system without the prior written permission of
the publishers. The program listings (if any) may be entered, stored and executed in a computer system, but they may not
be reproduced for publication.

This edition can be exported from India only by the publishers,


Tata McGraw Hill Education Private Limited.

ISBN-13: 9780070086654
ISBN-10: 0070086656

Vice President and Managing Director— Ajay Shukla


Head—Higher Education Publishing and Marketing: Vibha Mahajan
Publishing Manager—SEM & Tech Ed.: Shalini Jha
Senior Editorial Researcher: Koyel Ghosh
Executive—Editorial Services: Sohini Mukherjee
Senior Production Manager: Satinder S Baveja
Asst. Production Manager: Anjali Razdan

Marketing Manager—Higher Ed: Vijay Sarathi


Senior Product Specialist: Tina Jajoriya
Graphic Designer: Meenu Raghav
General Manager—Production: Rajender P Ghansela
Production Manager: Reji Kumar

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

Cover printed at: Rajkamal


v

Dedicated to

My sister : Mrs. A. Rajina Bivi, MA, B.Ed

Brother-in-law : Dr. A. Kalilur Rahman, MBBS, MS(ORTHO)

Their daughter : Er. K. Shajina, BE

Their son : K. Shafiq, (MBBS)


Contents
Preface......................................................................................................................................................... xviii
Acknowledgement.......................................................................................................................................... xxi
List of Symbols and Abbreviations....................................................................................................................xxiii

Chapter 1 : Introduction to Digital Signal Processing

1.1 Introduction ......................................................................................................................................................... 1. 1


1.2 Signal ................................................................................................................................................................. 1. 2
1.3 Discrete Time System ........................................................................................................................................ 1. 2
1.4 Analysis of Discrete Time System ...................................................................................................................... 1. 3
1.5 Filters ................................................................................................................................................................. 1. 5
1.6 Finite Word Length Effects ................................................................................................................................... 1. 5
1.7 Multirate DSP ..................................................................................................................................................... 1. 6
1.8 Energy and Power Spectrum ............................................................................................................................. 1. 6
1.9 Digital Signal Processors .................................................................................................................................... 1. 6
1.10 Importance of Digital Signal Processing ............................................................................................................... 1. 7
1.11 Use of MATLAB in Digital Signal Processing ...................................................................................................... 1. 8

Chapter 2 : Discrete Time Signals and Systems

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

2.5.2 Folding (or Reflection or Transpose) of Discrete Time Signals..................................................................2.21


2.5.3 Time Shifting of Discrete Time Signals............................................................................................2. 22
2.5.4 Addition of Discrete Time Signals...................................................................................................2. 23
2.5.5 Multiplication of Discrete Time Signals.............................................................................................2. 23
2.6 Discrete Time System.............................................................................................................................2. 23
2.6.1 Mathematical Equation Governing Discrete Time System................................................................2. 24
2.6.2 Block Diagram and Signal Flow Graph Representation of Discrete Time System................................2. 25
2.7 Response of LTI Discrete Time System in Time Domain.................................................................................2. 28
2.7.1 Zero-Input Response or Homogeneous Solution...............................................................................2. 29
2.7.2 Particular Solution..........................................................................................................................2. 30
2.7.3 Zero-State Response...................................................................................................................2. 31
2.7.4 Total Response...........................................................................................................................2. 31
2.8 Classification of Discrete Time Systems......................................................................................................2. 35
2.8.1 Static and Dynamic Systems.........................................................................................................2. 35
2.8.2 Time Invariant and Time Variant Systems........................................................................................2. 36
2.8.3 Linear and Nonlinear Systems.......................................................................................................2. 39
2.8.4 Causal and Noncausal Systems................................................................................................... 2. 45
2.8.5 Stable and Unstable Systems.......................................................................................................2. 47
2.8.6 FIR and IIR Systems................................................................................................................2. 50
2.8.7 Recursive and Nonrecursive Systems..........................................................................................2. 51
2.9 Discrete or Linear Convolution...................................................................................................................2. 51
2.9.1 Representation of Discrete Time Signal as Summation of Impulses................................................... 2. 52
2.9.2 Response of LTI Discrete Time System using Discrete Convolution...................................................2. 53
2.9.3 Properties of Linear Convolution..................................................................................................2. 54
2.9.4 Interconnections of Discrete Time Systems.................................................................................... 2. 56
2.9.5 Methods of Performing Linear Convolution......................................................................................2. 61
2.10 Circular Convolution................................................................................................................................2. 68
2.10.1 Circular Representation and Circular Shift of Discrete Time Signal.................................................... 2. 68
2.10.2 Circular Symmetrics of Discrete Time Signal................................................................................. 2. 70
2.10.3 Definition of Circular Convolution...................................................................................................2. 70
2.10.4 Procedure for Evaluating Circular Convolution................................................................................2. 70
2.10.5 Linear Convolution via Circular Convolution................................................................................... 2. 72
2.10.6 Methods of Computing Circular Convolution...................................................................................2. 72
2.11 Sectioned Convolution..............................................................................................................................2. 81
2.11.1 Overlap Add Method...................................................................................................................2. 82
2.11.2 Overlap Save Method.................................................................................................................2. 82
ix

2.12 Inverse System and Deconvolution...........................................................................................................2. 96


2.12.1 Inverse System.........................................................................................................................2. 96
2.12.2 Deconvolution............................................................................................................................2. 97
2.13 Correlation, Crosscorrelation and Autocorrelation..........................................................................................2. 99
2.13.1 Procedure for Evaluating Correlation................................................................................................. 2.100
2.14 Circular Correlation........................................................... ........................................................................... 2.107
2.14.1 Procedure for Evaluating Circular Correlation....................................................................................... 2.108
2.14.2 Methods of Computing Circular Correlation..........................................................................................2.109
2.15 Summary of Important Concepts.....................................................................................................................2.113
2.16 Short Questions and Answers.........................................................................................................................2.114
2.17 MATLAB Programs...................................................................................................................................... 2.118
2.18 Exercises..................................................................................................................................................... 2.122

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

3.8 Structures for Realization of LTI Discrete Time Systems in z-Domain...............................................................3. 72


3.9 Structures for Realization of IIR Systems.....................................................................................................3. 74
3.9.1 Direct form-I Structure of IIR System..............................................................................................3. 75
3.9.2 Direct form-II Structure of IIR System.............................................................................................3. 76
3.9.3 Cascade form realization of IIR System...........................................................................................3. 78
3.9.4 Parallel form Realization of IIR System..........................................................................................3. 79
3.10 Structures for Realization of FIR Systems...................................................................................................3. 99
3.10.1 Direct form Realization of FIR System...........................................................................................3. 100
3.10.2 Cascade form Realization of FIR System.......................................................................................3. 100
3.10.3 Linear Phase Realization of FIR System.......................................................................................3. 101
3.11 Summary of Important Concepts...................................................................................................................3. 107
3.12 Short Questions and Answers..................................................................................................................3.109
3.13 MATLAB Programs....................................................................................................................................3. 118
3.14 Exercises..............................................................................................................................................3. 123

Chapter 4 : Fourier Series and Fourier Transform of Discrete Time Signals

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

4.7 Aliasing in Frequency Spectrum Due to Sampling.......................................................................................4. 36


4.7.1 Signal Reconstruction ( Recovery of Continuous Time Signal )........................................................4. 38
4.7.2 Sampling of Bandpass signal.......................................................................................................4. 39
4.8 Relation Between Z-Transform and Discrete Time Fourier Transform.............................................................4. 40
4.9 Summary of Important Concepts.............................................................................................................. 4. 63
4.10 Short Questions and Answers...................................................................................................................4. 64
4.11 MATLAB Programs...................................................................................................................................4. 69
4.12 Exercises...............................................................................................................................................4. 74

Chapter 5 : Discrete Fourier Transform (DFT) and Fast Fourier Transform


(FFT)

5.1 Introduction ....................................................................................................................................................... 5. 1


5.2 Discrete Fourier Transform (DFT) of Discrete Time Signal ................................................................................. 5. 2
5.2.1 Development of DFT From DTFT ....................................................................................................... 5. 2
5.2.2 Definition of Discrete Fourier Transform (DFT) ...................................................................................... 5. 2
5.2.3 Frequency Spectrum using DFT ......................................................................................................... 5. 3
5.2.4 Inverse DFT ....................................................................................................................................... 5. 3
5.3 Properties of DFT ............................................................................................................................................. 5. 4
5.4 Relation Between DFT and Z-Transform ............................................................................................................ 5. 9
5.5 Analysis of LTI Discrete Time Systems using DFT ............................................................................................ 5. 10
5.6 Fast Fourier Transform (FFT) ........................................................................................................................... 5. 19
5.7 Decimation In Time (DIT) Radix-2 FFT ............................................................................................................. 5. 22
5.7.1 8-Point DFT using Radix-2 DIT FFT .................................................................................................. 5. 24
5.7.2 Flow Graph for 8-Point DFT using Radix-2 DIT FFT ............................................................................ 5. 27
5.8 Decimation In Frequency (DIF) Radix-2 FFT ................................................................................................... 5. 29
5.8.1 8-Point DFT using Radix-2 DIF FFT ................................................................................................. 5. 32
5.8.2 Flow Graph for 8-Point DFT using Radix-2 DIF FFT ........................................................................... 5. 35
5.8.3 Comparison of DIT and DIF Radix-2 FFT ............................................................................................ 5. 37
5.9 Computation of inverse DFT Using FFT ............................................................................................................ 5. 37
5.10 Summary of Important Concepts ....................................................................................................................... 5. 53
5.11 Short Questions and Answers ........................................................................................................................... 5. 54
5.12 MATLAB Programs .......................................................................................................................................... 5. 58
5.13 Exercises ......................................................................................................................................................... 5. 63
xii

Chapter 6 : FIR Filters

6.1 Introduction ....................................................................................................................................................... 6. 1


6.2 LTI system as Frequency Selective Filters ........................................................................................................ 6. 2
6.3 Ideal Frequency Response of Linear Phase FIR Filters ..................................................................................... 6. 4
6.4 Characteristics of FIR Filters with Linear Phase ................................................................................................ 6. 6
6.5 Frequency Response of Linear Phase FIR filter ................................................................................................. 6. 8
6.6 Design Techniques for Linear Phase FIR Filters ................................................................................................. 6. 20
6.7 Fourier Series Method of FIR Filter Design ........................................................................................................ 6. 22
6.8 Windows .......................................................................................................................................................... 6. 40
6.8.1 Rectangular Window ........................................................................................................................... 6. 41
6.8.2 Bartlett or Triangular Window ............................................................................................................... 6. 43
6.8.3 Raised Cosine Window ...................................................................................................................... 6. 44
6.8.4 Hanning Window ................................................................................................................................ 6. 46
6.8.5 Hamming Window .............................................................................................................................. 6. 47
6.8.6 Blackman Window .............................................................................................................................. 6. 49
6.8.7 Kaiser Window ................................................................................................................................... 6. 50
6.8.8 Summary of Various Features of Windows .......................................................................................... 6. 54
6.9 FIR Filter Design Using Windows ..................................................................................................................... 6. 54
6.10 Design of FIR Filters by Frequency Sampling Technique ................................................................................... 6. 79
6.11 Summary of Important Concepts ....................................................................................................................... 6. 85
6.12 Short Questions and Answers ........................................................................................................................... 6. 86
6.13 MATLAB Programs .......................................................................................................................................... 6. 95
6.14 Exercises ......................................................................................................................................................... 6. 107

Chapter 7 : IIR Filters

7.1 Introduction ....................................................................................................................................................... 7. 1


7.2 Frequency response of analog and digital IIR filters ............................................................................................ 7. 3
7.3 Impulse invariant transformation ........................................................................................................................ 7. 6
7.3.1 Relation between analog and digital filter poles in impulse invariant transformation ................................. 7. 7
7.3.2 Relation between analog and digital frequency in impulse invariant transformation ................................. 7. 8
7.3.3 Useful impulse invariant transformation ................................................................................................ 7. 9
7.4 Bilinear transformation ....................................................................................................................................... 7. 15
xiii

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

Chapter 8 : Finite Word Length Effects in Digital Filters

8.1 Introduction ....................................................................................................................................................... 8. 1


8.2 Representation of Numbers in Digital System .................................................................................................... 8. 2
8.2.1 Binary Codes ..................................................................................................................................... 8. 2
8.2.2 Radix Number System ....................................................................................................................... 8. 3
8.2.3 Fixed Point Representation .................................................................................................................. 8. 5
8.2.4 Floating Point Representation ............................................................................................................... 8. 9
8.3 Types of Arithmetic in Digital Systems ............................................................................................................... 8. 12
8.3.1 One's Complement Addition ................................................................................................................ 8. 12
xiv

8.3.2 Two's Complement Addition ................................................................................................................ 8. 13


8.3.3 Floating Point Addition ......................................................................................................................... 8. 14
8.3.4 Floating point Multiplication...........................................................................................................8. 15
8.3.5 Comparison of Fixed Point and Floating Point Arithmetic ...................................................................... 8. 16
8.4 Quantization by Truncation and Rounding .......................................................................................................... 8. 16
8.4.1 Quantization Steps .............................................................................................................................. 8. 16
8.4.2 Truncation ........................................................................................................................................... 8. 18
8.4.3 Rounding ............................................................................................................................................ 8. 21
8.5 Quantization of Input Data .................................................................................................................................. 8. 22
8.6 Quantization of Filter Cofficients ......................................................................................................................... 8. 29
8.7 Product Quantization Error ................................................................................................................................ 8. 37
8.8 Limit Cycles in Recursive Systems ................................................................................................................. 8. 53
8.8.1 Zero Input Limit Cycle ......................................................................................................................... 8. 53
8.8.2 Overflow Limit Cycle .......................................................................................................................... 8. 61
8.8.3 Scaling To Prevent Overflow .............................................................................................................. 8. 62
8.9 Summary of Important Concepts ....................................................................................................................... 8. 73
8.10 Short Questions and Answers ........................................................................................................................... 8. 76
8.11 Exercises ......................................................................................................................................................... 8. 82

Chapter 9 : Multirate DSP

9.1 Introduction ....................................................................................................................................................... 9. 1


9.2 Downsampling (or Decimation) .......................................................................................................................... 9. 2
9.2.1 Spectrum of downsampler ................................................................................................................... 9. 4
9.2.2 Anti-aliasing Filter ................................................................................................................................ 9. 7
9.3 Upsampling (or Interpolation) ............................................................................................................................. 9. 16
9.3.1 Spectrum of Upsampler ...................................................................................................................... 9. 19
9.3.2 Anti-imaging Filter ............................................................................................................................... 9. 20
9.4 Sampling Rate Conversion ............................................................................................................................... 9. 24
9.4.1 Spectrum of Sampling Rate Convertor by a Rational Factor I/D .......................................................... 9. 25
9.5 Multistage implementation of Sampling Rate Conversion ................................................................................... 9. 26
9.6 Identifier in Multirate Digital Signal Processing ................................................................................................... 9. 27
9.7 Implementation of Sampling Rate Conversion in FIR Filters ............................................................................... 9. 32
9.7.1 Implementation of Sampling Rate Conversion using Decimator in FIR Filters ....................................... 9. 32
9.7.2 Implementation of Sampling Rate Conversion using Interpolator in FIR Filters ...................................... 9. 33
xv

9.8 Polyphase Decomposition ................................................................................................................................ 9. 34


9.8.1 Polyphase Decomposition of FIR Filters .............................................................................................. 9. 34
9.8.2 Polyphase Structure of Decimator ....................................................................................................... 9. 37
9.8.3 Polyphase Structure of Interpolator ...................................................................................................... 9. 38
9.8.4 Polyphase Decomposition of IIR Filters ............................................................................................... 9. 40
9.9 Applications of Multirate DSP ............................................................................................................................ 9. 46
9.9.1 Digital Filter Banks .............................................................................................................................. 9. 46
9.9.2 Sub-band Coding of Speech Signals ................................................................................................... 9. 46
9.9.3 Quadrature Mirror Filter (QMF) Bank .................................................................................................. 9. 47
9.10 Summary of Important Concepts ....................................................................................................................... 9. 48
9.11 Short Questions and Answers ........................................................................................................................... 9. 49
9.12 MATLAB Programs .......................................................................................................................................... 9. 53
9.13 Exercises ......................................................................................................................................................... 9. 60

Chapter 10 : Energy and Power Spectrum Estimation

10.1 Introduction ....................................................................................................................................................... 10. 1


10.2 Energy Spectrum of Discrete Time Signal ......................................................................................................... 10. 1
10.3 Random signal and Random Process ............................................................................................................... 10. 4
10.4 Power Spectrum of Random Process ............................................................................................................... 10. 5
10.5 Periodogram ..................................................................................................................................................... 10. 5
10.6 Use of DFT/FFT in Power Spectrum Estimation ................................................................................................ 10. 6
10.7 Nonparametric Methods of Power Spectrum Estimation .................................................................................... 10. 7
10.7.1 Bartlett Method of Power Spectrum Estimation .................................................................................... 10. 7
10.7.2 Welch Method of Power Spectrum Estimation ..................................................................................... 10. 8
10.7.3 Blackman-Tukey Method of Power Spectrum Estimation ..................................................................... 10. 10
10.8 Performance Characteristics of Nonparametric Methods of Power Spectrum Estimation .................................... 10. 23
10.8.1 Performance Characteristics of Periodogram Power Spectrum Estimation ........................................... 10. 24
10.8.2 Performance Characteristics of Bartlett Power Spectrum Estimation .................................................... 10. 26
10.8.3 Performance Characteristics of Welch Power Spectrum Estimation ..................................................... 10. 28
10.8.4 Performance Characteristics of Blackman-Tukey Power Spectrum Estimation ..................................... 10. 29
10.9 Summary of Important Concepts ....................................................................................................................... 10. 33
10.10 Short Questions and Answers ........................................................................................................................... 10. 34
10.11 MATLAB Programs .......................................................................................................................................... 10. 36
10.12 Exercises ......................................................................................................................................................... 10. 43
xvi

Chapter 11 : Digital Signal Processors

11.1 Introduction ....................................................................................................................................................... 11. 1


11.2 Special Features of Digital Signal Processors .................................................................................................... 11. 3
11.2.1 Fast Data Access ............................................................................................................................... 11. 3
11.2.2 Fast Computation ................................................................................................................................ 11. 5
11.2.3 Numerical Fidelity ............................................................................................................................... 11. 7
11.2.4 Fast Execution Control ....................................................................................................................... 11. 8
11.3 TMS320C5x Family of Digital Signal Processors ............................................................................................. 11. 8
11.3.1 Pin Diagram of TMS320C5x Processors ............................................................................................ 11. 10
11.3.2 Architecture of TMS320C5x Processors ............................................................................................. 11. 14
11.3.3 Functional Units in CPU of TMS320C5x Processors ......................................................................... 11. 15
11.3.4 On-Chip Memory in TMS320C5x Processors .................................................................................... 11. 19
11.3.5 On-Chip Peripherals of TMS320C5x Processors ................................................................................ 11. 19
11.3.6 Addressing Modes of TMS320C5x Processors .................................................................................. 11. 21
11.3.7 Instruction Pipelining in TMS320C5x Processors ................................................................................ 11. 23
11.3.8 Instructions of TMS320C5x Processors .............................................................................................. 11. 24
11.3.9 Assembly Language Programs in TMS320C5x Processors ............................................................... 11. 35
11.4 TMS320C54x Family of Digital Signal Processors ............................................................................................ 11. 44
11.4.1 Pin Diagram of TMS320C54x Processors .......................................................................................... 11. 47
11.4.2 Architecture of TMS320C54x Processors ........................................................................................... 11. 50
11.4.3 Functional Units in CPU of TMS320C54x Processors ....................................................................... 11. 51
11.4.4 On-Chip Memory in TMS320C54x Processors .................................................................................. 11. 56
11.4.5 On-Chip Peripherals of TMS320C54x Processors .............................................................................. 11. 57
11.4.6 Addressing Modes of TMS320C54x Processors ................................................................................ 11. 60
11.4.7 Instruction Pipelining in TMS320C54x Processors .............................................................................. 11. 63
11.4.8 Instructions of TMS320C54x Processors ............................................................................................ 11. 63
11.4.9 Assembly Language Programs in TMS320C54x Processors .............................................................. 11. 72
11.5 Summary of Important Concepts ....................................................................................................................... 11. 76
11.6 Short Questions and Answers ........................................................................................................................... 11. 78
11.7 Exercises ......................................................................................................................................................... 11. 82
xvii

Chapter 12 : Applications of DSP

12.1 Introduction ....................................................................................................................................................... 12. 1


12.2 Speech Processing .......................................................................................................................................... 12. 2
12.2.1 Speech Coding and Decoding ............................................................................................................ 12. 2
12.2.2 Speech recognition .............................................................................................................................. 12. 4
12.2.3 Speech Synthesis .............................................................................................................................. 12. 5
12.2.4 Digital Vocoder ................................................................................................................................... 12. 6
12.3 Musical Sound Processing ............................................................................................................................... 12. 6
12.3.1 Digital Music synthesis ...................................................................................................................... 12. 7
12.3.2 Musical Sound Processing For Recording .......................................................................................... 12. 7
12.4 Digital Radio ..................................................................................................................................................... 12. 8
12.5 Digital Television .............................................................................................................................................. 12. 9
12.6 DTMF in Telephone Dialing ............................................................................................................................... 12. 9
12.7 RADAR ........................................................................................................................................................... 12. 10
12.8 Biomedical Signal Processing ........................................................................................................................... 12. 11

Appendix 1 Important Mathematical Relations ........................................................................................................ A. 1


Appendix 2 MATLAB Commands and Functions ................................................................................................... A. 5
Appendix 3 Summary of Various Standard Transform Pairs ................................................................................... A. 11
Appendix 4 Summary of Properties of Various Transforms ..................................................................................... A. 14
Appendix 5 Summary of Important Equations for FIR Filter Design ......................................................................... A. 19
Appendix 6 Summary of Important Equations for IIR Filter Design .......................................................................... A. 23
Appendix 7 Summary of Properties of Power Spectrum Estimator ......................................................................... A. 24
INDEX ........................................................................................................................................................... I. 1
Preface
The main objective of this book is to explore the basic concepts of digital signal processing in a simple
and easy-to-understand manner.
This text on digital signal processing has been crafted and designed to meet student’s requirements.
Considering the highly mathematical nature of this subject, more emphasis has been given on the
problem- solving methodology. Considerable effort has been made to elucidate mathematical derivations
in a step-by-step manner. Exercise problems with varied difficulty levels are given in the text to help
students get an intuitive grasp on the subject.
This book with its lucid writing style and germane pedagogical features will prove to be a master text
for engineering students and practitioners.
Salient Features
The salient features of this book on Digital Signal Processing are,
- proof of properties of transforms are clearly highlighted by shaded boxes
- wherever required, problems are solved in multiple methods
- additional explanations for solutions and proofs are provided in separate boxes
- different types of fonts are used for text, proof and solved problems for better clarity
- keywords are highlighted by bold, italic fonts
Organization
In this book, the concepts of discrete time signals and their transforms are organized in four chapters
and two chapters are devoted for digital filter design. One chapter is devoted to each topic in digital
signal processing like finite word length effects, mutirate DSP, spectrum analysis, digital signal processors
and applications of DSP. Each chapter provides the foundations and practical implications with a large
number of solved numerical examples for better understanding.
The important concepts are summarized at the end of each chapter which can help in quick reference.
Another significant aspect of this book is MATLAB based computer exercises with complete explanations
given in each chapter. This will be of great assistance to both instructors and students.
Chapter 1 deals with a general introduction about various aspects of digital signal processing and its
importance in real life. Basic definitions of discrete time signals and systems, mathematical representation
of discrete time systems and significance of time and frequency domain analysis are presented in
brief. Introduction to various topics of digital signal processing like FIR filters, IIR filters, finite word
length effects, multirate DSP, power spectrum, digital signal processors, applications of digital signal
processing and usage of MATLAB in this course are also presented in a brief manner.
Chapter 2 is devoted to concepts of discrete time signals and systems and is more concerned with
generation, representation, classification, mathematical operations of discrete time signals and systems,
block diagram and signal flow graph notations.
xix

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.

Prateek Kumar Maharana Pratap Engineering College


Kanpur, Uttar Pradesh.
Ashish Suri Shri Mata Vaishno Devi University
Jammu, Jammu and Kashmir.
S.S Prasad National Institute of Technology (NIT)
Jamshedpur, Jharkhand.
Harpal Theti Kalinga Institute of Industrial Technology,
Bhubaneswar, Orissa.
Kishor Kinage D J Sanghvi Engineering College, Mumbai.
S. Moorthi National Insitute of Technology (NIT),
Tiruchirapalli, Tamil Nadu
S. Anand MEPCO SCHLENK Engineering Colledge,
Sivakasi, Tamil Nadu.
R. Prakash School of Electronics Sciences, Vellore Institute of Technology,
Vellore, Tamil Nadu.
J. Vijayraghavan Rajalakshmi Engineering College,
Chennai.
Jagadeshwar Reddy Sri Venkateswara Institute of Science and Technology,
Kadapa, Andhra Pradesh.
P. Biswagar R V College of Engineering,
Bangalore, Karnataka.

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

A - Number of integer digit

As - Gain at stopband edge frequency

Ap - Gain at passband edge frequency

B - Bandwidth in Hz

b - Size of binary excluding sign bit

ck - Fourier coefficients of exponential form of Fourier series of x(t)

D - Sampling rate reduction factor

E - Energy of a signal

Er - Relative error due to rounding

Et - Relative error due to truncation

er - Rounding error

f - Frequency of discrete time signal (or digital frequency) in


cycles/sample

F - Frequency of continuous time signal (or analog frequency) in Hz

fo - Fundamental frequency of discrete time signal in cycles/sample

Fo - Fundamental frequency of continuous time signal in Hz

Fm - Maximum frequency of continuous time signal in Hz

Fs - Sampling frequency of continuous time signal in Hz

I - Sampling rate mulitplication factor

j - complex operator, −1

L - Number of segments
xxiv

M - Figure of merit

M - Mantissa

N - Fundamental period

N - Order of the filter

Nf - Floating point binary number

Ntf - Truncated floating point number

P - Power of a signal

p - Pole

P xx(f) - Power spectrum

P xxB(f) - Bartlett power spectrum estimate

P xxBT(f) - Blackman-Tukey power spectrum estimate

P xxper (f) - Periodogram power spectrum estimate

P xxW(f) - Welch power spectrum estimate

q - Quantization step size

Q - Quality factor

R - Range of decimal number

r - Radix or base

S - Sign bit

S xx(f) - Energy spectrum

t - Time in seconds

T - Time period in seconds

V - Variabiltiy

W - Phase factor or Twiddle factor

x(n) - Discrete time signal or Ergodic random process


xxv

X(n) - Random process

z - Complex variable (z = u + jv)

z - Unit advance operator or Zero

z–1 - Unit delay operator

Î - Attenuation costant

W - Angular frequency of continuous time signal in rad/sec

Wo - Center frequency

Ws - Stop band edge analog frequency in rad/sec

Wp - Pass band edge analog frequency in rad/sec

w - Angular frequency of discrete time signal in rad/sample

wk - Sampling frequency point

wp - Pass band edge digital frequency in rad/sample

ws - Stop band edge digital frequency in rad/sample

s2 - Variance

s2eoi - Steady state output noise power due to input quantization error

ap - Attenuation at a pass band frequency

as - Attenuation at a stop band frequency

* - Convolution operator

* - Circular convolution operator

z - Integration operator

d
- Differentiation operator
dt
xxvi

Standard/Input/Output Signals

|A(w)| - Magnitude function

h(n) - Impulse response of discrete time system

h’(n) - Impulse response of inverse system

hd(n) - Desired impulse response

r xy(m) - Crosscorrelation sequence of x(n) and y(n)

r xx(m) - Autocorrelation sequence of discrete time signal

r xx(m) - Autocorrelation sequence of random process with finite data

gxx (m) - Autocorrelation sequence of random process with infinite data

rxx ( m) - Circular autocorrelation sequence of x(n)

rxy ( m) - Circular crosscorrelation sequence of x(n) and y(n)

u(n) - Discrete time unit step signal

w R (n) - Rectangular window sequence

w r (n) - Bartlett or triangular window sequence

w C (n) - Hanning window sequence

w H (n) - Hamming window sequence

w B (n) - Blackman window sequence

w K (n) - Kaiser window sequence

x(n) - Discrete time signal

x(n) - Input of discrete time system

xo(n) - Odd part of discrete time signal x(n)

x e(n) - Even part of discrete time signal x(n)

x(n–m) - Delayed or linearly shifted x(n) by m units

x((n–m)) N - Circularly shifted x(n) by m units, where N is period


xxvii

x(Dn) - Down sampled version of x(n)

x(n/I) - Upsampled version of x(n)

x P(n) - Periodic extension of x(n)

y(n) - Output / Response of discrete time system

y(n – m) - Delayed output / Response of discrete time system

yp(n) - Particular soultion of discrete time system

yn(n) - Homogenous solution of discrete time system

yzs(n) - Zero state response of discrete time system

yzi(n) - Zero input response of discrete time time system

d(n) - Discrete time impulse signal

d(n – m) - Delayed impulse signal

tp - Phase delay

tg - Group delay

q(w) - Phase function

Transform Operators and Functions


DFT - Discrete Fourier transform (DFT)

DFT–1 - Inverse DFT

E{X} - Expected value of random variable

F - Fourier transform

F–1 - Inverse Fourier transform

H - System operator

H –1 - Inverse system operator

H(z) - Transfer function


xxviii

H(ejw ) - Frequency response of the digital filter

HN(z) - Normalized transfer function

H d(ejw ) - Desired or ideal frequency response

Q[ ] - Quantization operations

X(e jw ) - Discrete time Fourier transform of x(n)

X r (e jw ) - Real part of X(ejw )

X i(e jw ) - Imaginary part of X(ejw )

X(jW ) - Fourier transform of x(t)

X(k) - Discrete Fourier transform of x(n)

X r (k) - Real part of X(k)

X i(k) - Imaginary part of X(k)

X(z) - Z-transform of x(n)

Z - Z-transform

Z–1 - Inverse Z-transform

Abbreviations
BIBO - Bounded Input Bounded Output

DFT - Discrete Fourier Transform

DIF - Decimation In Frequency

DIT - Decimation In Time

DT - Discrete Time

DTFS - Discrete Time Fourier Series

DTFT - Discrete Time Fourier Transform

FFT - Fast Fourier Transform

FIR - Finite Impulse Response


xxix

IIR - Infinite Impulse Response

LSD - Least Significant Digit

LHP - Left Half Plane

LTI - Linear Time Invariant

MSD - Most Significant Digit

NTF - Noise Transfer Function

RHP - Right Half Plane

ROC - Region Of Convergence

Var - Variance

QMF - Quardrature Mirror Filter

LPF - Low Pass Filter


Chapter 1
Introduction to Digital
Signal Processing

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.

Input analog Input digita l O utput digital O utput analog


s ignal s ignal D igital s ignal s ignal
ADC DAC
s ys tem

F ig 1.1 : B a sic c o m p o ne n ts o f a D S P system .


The real-world signals are analog, and only for processing by digital systems, the signals are converted
to digital. For conversion of signals from analog to digital, an ADC (Analog to Digital Converter) is employed.
The various steps in analog to digital conversion process are sampling and quantization of analog signals,
and then converting the quantized samples to suitable binary codes. The digital signals in the form of binary
codes are fed to digital system for processing, and after processing, it generates an output digital signal in
the form of binary codes. The output analog signal is constructed from the output binary codes using a
DAC (Digital to Analog Converter).
The processing of signals are basically spectrum analysis to determine the various frequency
components of a signal and filtering the signal to extract the required frequency component of the signal.
1. 2 Digital Signal Processing
The digital system can be a specially designed programmable hardware for DSP or an algorithm/
software running on a general purpose digital system like Personal Computer (PC).
Advantages of Digital Signal Processing
Some of the advantages of digital processing of signals are,
1. The digital hardware are compact, reliable, less expensive, and programmable.
2. Since the DSP systems are programmable, the performance of the system can be easily upgraded/
modified.
3. By employing high speed, sophisticated digital hardware higher precision can be achieved in
processing of signals.
4. The digital signals can be permanently stored in magnetic media so that they are transportable
and can be processed in non-real-time or off-line.

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.

1.3 Discrete Time System


Any process that exhibits cause and effect relation can be called a system. A system will have an input
signal and an output signal. The output signal will be a processed version of the input signal. A system is
either interconnection of hardware devices or software / algorithm.
A system which can process a discrete time signal is called a discrete time system, and so the input
and output signals of a discrete time system are discrete time signals.
Chapter 1 - Introduction to Digital Signal Processing 1. 3
A discrete time system is denoted by the letter H. The input of discrete time system is denoted as
“x(n)” and the output of discrete time system is denoted as “y(n)”. The diagrammatic representation of a
discrete time system is shown in fig 1.2.
D isc rete
tim e sy stem
x (n ) y (n )
H
Input signa l O utput sign al
or exc itation or respons e

F ig 1.2 : R ep resen ta tio n of d iscrete tim e system .


The operation performed by a discrete time system on input to produce output or response can be
expressed as,
Response, y(n) = H{x(n)}
where, H denotes the system operation (also called system operator).
When a discrete time system satisfies the properties of linearity and time invariance then it is called
LTI (Linear Time Invariant) discrete time system .
The input-output relation of an LTI discrete time system is represented by constant coefficient
difference equation shown below.
N M
bg
yn = − ∑ a m ybn − mg + ∑ bm xbn − mg
m=1 m=0

where, N = Order of the system, and M £ N.


The solution of the above difference equation is the response y(n) of the discrete time system, for the
input x(n).

1.4 Analysis of Discrete Time System


Mostly, the discrete time systems are designed for analysis of discrete time signals. Physically, the
discrete time systems are realized in time domain. In time domain, the discrete time systems are governed by
difference equations. The analysis of discrete time signals and systems in time domain involves solution of
difference equations. The solution of difference equations are difficult due to assumption of a solution and
then solving the constants using initial conditions.
In order to simplify the task of analysis, the discrete time signals can be transformed to some other
domain, where the analysis may be easier. One such transform exists for discrete time signals is Z-transform.The
Z-transform, will transform a function of discrete time “n” into a function of complex variable “z”, where
z = rejw .Therefore, Z-transform of a discrete time signal will transform the time domain signal into z-domain
signal.
On taking Z -transform of the difference equation governing the discrete time system, it becomes
algebraic equation in “z” and the solution of algebraic equation will give the response of the system as a
function of “z” and it is called z-domain response. The inverse Z -transform of the z-domain response, will
give the time domain response of the discrete time system. Also, the stability analysis of the discrete
systems are much easier in z-domain.
1. 4 Digital Signal Processing

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

Type of signal Wavelength (m) Frequency range (Hz)


Radio broadcast 104 to 102 3 ´ 104 to 3 ´ 106
Shortwave radio signals 102 to 10–2 3 ´ 106 to 3 ´ 1010
Radar / Space communications 1 to 10–2 3 ´ 108 to 3 ´ 1010
Common-carrier microwave 1 to 10–2 3 ´ 108 to 3 ´ 1010
Infrared 10–3 to 10–6 3 ´ 1011 to 3 ´ 1014
Visible light 3.9´10–7 to 8.1´10–7 3.7 ´ 1014 to 7.7 ´ 1014
Ultraviolet 10–7 to 10–8 3 ´ 1015 to 3 ´ 1016
Gamma rays and x-rays 10–9 to 10–10 3 ´ 1017 to 3 ´ 1018

Table 1.2 : Frequency Range of Some Biological and Seismic Signals

Type of Signal Frequency Range (Hz)


Electroretinogram 0 to 20
Electronystagmogram 0 to 20
Pneumogram 0 to 40
Electrocardiogram (ECG) 0 to 100
Electroencephalogram (EEG) 0 to 100
Electromyogram 10 to 200
Sphygmomanogram 0 to 200
Speech 100 to 4000
Wind noise 100 to 1000
Seismic exploration signals 10 to 100
Earthquake and nuclear explosion signals 0.01 to 10
Seismic noise 0.1 to 1
The frequency contents of a discrete time signal can be studied by taking Fourier transform of the
discrete time signal. The Fourier transform of discrete time signal is a particular class of Z-transform in which
z = ejw ,where “w” is the frequency of the discrete time signals.
Chapter 1 - Introduction to Digital Signal Processing 1. 5
The Fourier transform, will transform a function of discrete time “n” into a function of frequency
“w”. Therefore, Fourier transform of a discrete time signal will transform the discrete time signal into frequency
domain signal. The Fourier transform of the discrete time signal, is also called frequency spectrum of the
discrete time signal. The Fourier transform of the impulse response of a system is called frequency response
of the system. The frequency spectrum is a complex function of “w” and so can be expressed as magnitude
spectrum and phase spectrum. The magnitude spectrum is used to study the various frequency components
of the discrete time signal.
The frequency spectrum obtained via Fourier transform will be a continuous spectrum and so cannot
be computed by digital systems, Therefore, the samples of Fourier transform can be computed at sufficient
number of points by digital systems. The samples of Fourier transform can also be directly computed using
DFT ( Discrete Fourier Transform ). The computation of DFT involves a large number of calculations. In
order to reduce the computational task of DFT, a number of methods/algorithms are developed which are
collectively called FFT (Fast Fourier Transform). The DFT of discrete time signal will give the discrete
frequency spectrum of the signal.

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.

1.6 Finite Word Length Effects


In digital representation the signals are represented as an array of binary numbers, and the digital
system employ a fixed size of binary called “word size or word length” for number representation. This finite
word size for number representation leads to errors in input signals, intermediate signals in computations and
in the final output signals. In general, the various effects due to finite precision representation of numbers in
digital systems are called finite word length effects.
Some of the finite word length effects in digital systems are given below.
· Errors due to quantization of input data.
· Errors due to quantization of filter coefficients.
1. 6 Digital Signal Processing
· Errors due to rounding the product in multiplication.
· Errors due to overflow in addition.
· Limit cycles in recursive computations.

1.7 Multirate DSP


In many communication systems, the sampling rate conversion is a vital requirement. Some of the
systems that employ sampling rate conversion are video receivers that receive both NTSC and PAL signals,
audio systems that can play CDs recorded in different standards, etc.
The processing of discrete time signals at different sampling rates in different parts of a system is
called multirate DSP. In digital systems, the sampling rate conversion is achieved by either decimation or
interpolation. In decimation, the sampling rate is reduced, whereas in interpolation the sampling rate is
increased. The multirate DSP systems leads to reduction in computations, memory requirement and errors
due to finite word length effects.

1.8 Energy and Power Spectrum


There are many situations where the signals are corrupted by noise like sonar signals corrupted by
ambient ocean noise, speech signal from cockpit of an airplane corrupted by engine noise, etc. When the
signals are corrupted by noise, then the energy or power spectrum will be useful to identify the signal from
noise.
The energy spectrum can be computed for deterministic signals, and it is given by square of magnitude
of Fourier transform of the signal. Alternatively, the energy spectrum is given by Fourier transform of the
autocorrelation sequence of the signal.
The power spectrum can be estimated for nondeterministic signals or random process/signals. The
power spectrum estimation methods can be broadly classified into two groups, namely, nonparametric methods
and parametric methods.
In nonparametric methods, first an estimate of autocorrelation of the random process is determined
which represents the average behaviour of the signal, then the Fourier transform of estimated autocorrelation
is determined, which is the power spectrum estimate of the random process.
In parametric methods, first an appropriate model is selected for the given random process, then the
parameters of the model are computed using the available data of the random process. Finally, the power
spectrum is estimated from the constructed model.

1.9 Digital Signal Processors


The digital signal processors are specially designed microprocessors/microcontrollers for DSP
applications.
The importance of special purpose processors for signal processing applications were realised in 1980s,
and many companies started releasing special processors for DSP applications. The pioneers among them are
Texas Instruments and Analog Devices. The Texas Instruments has released a large variety of processors in the
family name TMS320Cxx and Analog Devices has released processors in the family name ADSPxx.
Chapter 1 - Introduction to Digital Signal Processing 1. 7
Some of the special features of digital signal processors are given below.
· Modified Harvard architecture with two or more internal buses for simultaneous access of code
and one or two data.
· Specialized addressing modes like circular addressing and bit reversed addressing suitable for
computations like convolution, correlation and FFT.
· MAC unit for performing multiply-accumulate computations involved in convolution, correlation
and FFT in single clock cycle.
· Larger size ALU and accumulators with guard bits to accommodate the overflow in computation.
· Pipelining of instructions to execute different phases of four or six instructions in parallel.
· VLIW architecture to fetch and execute multiple instructions in parallel.
· Multiprocessor architecture by integrating multiple processors on a single piece of silicon for
parallel processing.

1.10 Importance of Digital Signal Processing


The technology advancement in programmable digital signal processors, helps to implement more and
more real time applications in digital systems.
The digital processing of signal plays a vital role in almost every field of Science and Engineering. Some
of the applications of digital processing of signals in various field of Science and Engineering are listed here.
1. Biomedical
· ECG is used to predict heart diseases.
· EEG is used to study normal and abnormal behaviour of the brain.
· EMG is used to study the condition of muscles.
· X-ray images are used to predict the bone fractures and tuberculosis.
· Ultrasonic scan images of kidney and gall bladder is used to predict stones.
·. Ultrasonic scan images of foetus is used to predict abnormalities in a baby.
· MRI scan is used to study minute inner details of any part of the human body.

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.

3. Audio and Video Equipments


· The analysis of audio signals will be useful to design systems for special effects in audio systems
like stereo, woofer, karoke, equalizer, attenuator, etc.
· Music synthesis and composing using music keyboards.
· Audio and video compression for storage in DVDs.
1. 8 Digital Signal Processing
4. Communication
· The spectrum analysis of modulated signals helps to identify the information bearing frequency
component that can be used for transmission.
· The analysis of signals received from radars are used to detect flying objects and thier velocity.
· Generation and detection of DTMF signals in telephones.
· Echo and noise cancellation in transmission channels.

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.

1.11 Use of MATLAB in Digital Signal Processing


MATLAB (MATrix LABoratory) is a software developed by The MathWork Inc, USA, which can run
on any windows platform in a PC (Personal Computer). This software has a number of tools for the study of
various engineering subjects. It includes various tools for digital signal processing also. Using these tools,
a wide variety of studies can be made on discrete time signals and systems. Some of the analysis that is
relevant to this particular textbook are given below.
· Sketch or plot of discrete time signals as a function of independent variable.
· Spectrum analysis of discrete time signals.
· Solution of LTI discrete time systems.
· Perform convolution and deconvolution operations on discrete time signals.
· Perform various transforms on discrete time signals like Fourier transform, Z-transform, Fast Fourier
Transform (FFT), etc.
· Design and frequency response analysis of FIR and IIR filters.
· Decimation and interpolation of discrete time signals.
· Estimation of energy and power spectrum of discrete time signals.
Chapter 2

Discrete Time Signals


and Systems

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.7 0.7 0.7

0.6 0.6 0.6 0.55


0.5 0.5 0.5

0.4 0.4 0.4 0.35


0.3
0.3 0.3 0.3

0.2 0.2 0.2


0.1
0.1 0.1 0.1

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.

When t=0 ; x(t) = 0 When t = 4T ; x(t) = 0.55


When t = 1T ; x(t) = 0.1 When t = 5T ; x(t) = 0.8
When t = 2T ; x(t) = 0.3 When t = 6T ; x(t) = 0.8
When t = 3T ; x(t) = 0.35 When t = 7T ; x(t) = 0.9
In general, the sampling time instants can be represented as, "nT", where "n" is an integer. When we
drop the sampling time "T" , then the samples are functions of the integer variable "n" alone. Therefore, the
samples of the continuous time signal will be a discrete time signal, denoted as x(n), which is a function of
an integer variable "n" as shown below.
x(n) = { 0, 0.1, 0.3, 0.35, 0.55, 0.8, 0.8, 0.9 }
Here the discrete signal x(n) is defined for, n = 0, 1, 2, 3, 4, 5, 6, 7
2. 3 Digital Signal Processing

\ x(0) = 0 ; x(1) = 0.1 ; x(2) = 0.3 ; x(3) = 0.35 ;


x(4) = 0.55 ; x(5) = 0.8 ; x(6) = 0.8 ; x(7) = 0.9 .
The sample value lies the range of 0 to 1.
Let us choose 3-bit binary to represent the samples in binary code. Now, the possible binary codes are
23 = 8, and so the range can be divided into eight quantization levels, and each sample is assigned, one of the
quantization level as shown in the following table.
Quantization level Binary code Range represented by quantization level
(R = Range = 1) for quantization by truncation

0 × R3 = 0 × 1 = 0 000 0.000 ≤ x(n) < 0.125 ⇒ 0.000


2 8

1 × R3 = 1 × 1 = 0.125 001 0.125 ≤ x(n) < 0.250 ⇒ 0.125


2 8

2 × R3 = 2 × 1 = 0.25 010 0.250 ≤ x(n) < 0.375 ⇒ 0.250


2 8

3 × R3 = 3 × 1 = 0.375 011 0.375 ≤ x(n) < 0.500 ⇒ 0.375


2 8

4 × R3 = 4 × 1 = 0.5 100 0.500 ≤ x(n) < 0.625 ⇒ 0.500


2 8

5 × R3 = 5 × 1 = 0.625 101 0.625 ≤ x(n) < 0.75 ⇒ 0.625


2 8

6 × R3 = 6 × 1 = 0.75 110 0.750 ≤ x(n) < 0.875 ⇒ 0.750


2 8

7 × R3 = 7 × 1 = 0.875 111 0.875 ≤ x(n) ≤ 1.000 ⇒ 0.875


2 8

Let, xq(n) = Quantized discrete time signal.


xc(n) = Quantized and coded discrete time signal.
Now, xq(n) = { 0, 0, 0.25, 0.25, 0.5, 0.75, 0.75, 0.875 }
xc(n) = { 000, 000, 010, 010, 100, 110, 110, 111 }
The quantized and coded discrete time signal xc(n) is called digital signal.

2.2 Discrete Time Signals


2.2.1 Generation of Discrete Time Signals
A discrete time signal can be generated by the following three methods.
The methods 1 and 2 are independent of any time frame but Method 3 depends critically on time.
1. Generate a set of numbers and arrange them as a sequence.
Example :

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

2. Evaluation of a numerical recursion relation will generate a discrete signal.


Example :
x(n) = 0.2 x(n − 1) with initial condition x(0) = 1, gives the sequence, x(n) = 0.2n ; 0 ≤ n < ∞
When n = 0 ; x( 0) = 1 ( initial condition) = 0.20
When n = 1 ; x( 1) = 0.2 x(1 − 1) = 0.2 x(0) = 0.2 = 0.21
When n = 2 ; x(2) = 0.2 x(2 − 1) = 0.2 x(1) = 0.2 × 0.2 = 0.22
When n = 3 ; x(3) = 0.2 x(3 − 1) = 0.2 x(2) = 0.2 × 0.22 = 0.23 and so on
∴ x(n) = 0.2n ; 0 ≤ n < ∞

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}
-

2.2.3 Standard Discrete Time Signals


δ(n ) u (n )
1. Digital impulse signal or unit sample sequence
1 1
Impulse signal, δ( n) = 1 ; n = 0
=0 ; n ≠ 0 0 n 0 1 2 3 4 5 n
F ig 2.3 : D ig ita l im pu lse F ig 2.4 : U nit step sig n a l.
2. Unit step signal sig na l.
u r(n )
Unit step signal, u( n) = 1 ; n ≥ 0 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

where, w 0 = Frequency in radians/sample ; q = Phase in radians


ω0
f0 = = Frequency in cycles/sample

x (n )

−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

F ig 2 .7 b : D iscrete tim e sin u so id a l sig n a l rep re se n ted


1 2 3 4 5 6 7 b y e q u a tio n x(n ) = A sin (ω0 n ).
−5 −4 −3 −2 −1 0 n
π
3

F ig 2 .7 c : D iscrete tim e sin u so id a l sig n a l rep re se n ted b y eq u a tio n ,


x (n ) = A c o s π n + π ; ω0 = π ; θ = π
e6 j
3 6 3
F ig 2 .7 : D iscrete tim e sin u so id a l sig n a ls.
Properties of Discrete Time Sinusoid

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 :

cos[( w 0 + 2pk) n + q] = cos(w 0n + 2pnk + q) = cos[(w 0n + q) + 2pnk]

= cos(w 0n + q) cos 2pnk - sin (w 0n + q) sin 2pnk

Since n and k are integers, cos 2pnk =1 and sin 2pnk = 0

∴ cos[(w 0 + 2pk) n + q] = cos(w 0n + q), for k = 0, 1, 2, 3, .....


2. 7 Digital Signal Processing

Conclusion

1.The sequences of any two sinusoids with frequencies in the range, -p £ w o £ p


(or -1/2 £ f0 £ 1/2), are distinct.
[-p £ w £ p divide by 2π
→ -1/2 £ f £ 1/2]
2. Any discrete time sinusoid with frequency w0 > |p| (or f0 > |1/2|) will be identical to another discrete
time sinusoid with frequency w 0 < |p| (or f0 < |1/2|).
6. Discrete time complex exponential signal
The discrete time complex exponential signal is defined as,
x(n) = a n e j(ω 0 n + θ) = an [cos(w 0n + q) + j sin(w 0n + q)]
= an cos(w 0n + q) + j an sin(w 0n + q) = xr(n) + j xi(n)
where, xr(n) = Real part of x(n) = an cos(w 0n + q)
xi(n) = Imaginary part of x(n) = an sin(w 0n + q)
The real part of x(n) will give an exponentially increasing cosinusoid sequence for a > 1 and exponentially
decreasing cosinusoid sequence for 0 < a < 1.
x r (n) x r(n)
0<a<1
a>1

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

F ig 2.9a : T he d isc re te tim e seq u e nc e F ig 2.9b : T he d isc re te tim e seq u e nc e


re p rese n te d b y th e eq u a tion , re p rese n te d b y th e eq u a tion ,
x i(n ) = a n sin ω0 n for 0 < a < 1. x i(n ) = a n sin ω0 n for a > 1 .
F ig 2 .9 : Im a g in a ry p a rt of co m p lex e xp o n en tia l sig n a l.
Chapter 2 - Discrete Time Signals and Systems 2. 8

2.3 Sampling of Continuous Time (Analog) Signals


The sampling is the process of conversion of a continuous time signal into a discrete time signal.
The sampling is performed by taking samples of continuous time signal at definite intervals of time. Usually,
the time interval between two successive samples will be same and such type of sampling is called periodic
or uniform sampling.
The time interval between successive samples is called sampling time (or sampling period or sampling
interval), and it is denoted by “T”. The unit of sampling period is second (s). [The lower units are millisecond (ms)
and microsecond (ms)].
The inverse of sampling period is called sampling frequency (or sampling rate), and it is denoted by Fs.
The unit of sampling frequency is hertz (Hz). (The higher units are kHz and MHz).
Let, xa(t) = Analog / Continuous time signal.
x(n) = Discrete time signal obtained by sampling xa(t).
Mathematically, the relation between x(n) and xa(t) can be expressed as,

x(n) = xa (t) = x a (nT) = xa n


FG IJ ; for n in the range -¥ < n < ¥
t = nT Fs H K
where, T = Sampling period or interval in seconds

Fs = 1 = Sampling rate or sampling frequency in hertz


T
bg b
Example : Let, x a t = A cos Ω 0 t + θ g b
= A cos 2 πF0 t + θ g
where, W 0 = Frequency of analog signal in rad/s
Ω0
F0 = = Frequency of analog signal in Hz

1
Let xa (t) be sampled at intervals of T seconds to get x(n), where T =
Fs
∴ x(n) = x a (t) t = nT
= A cos(Ω 0 t + θ) t = nT

F 2πF n + θI = A cos b2πf n + θg = A cos bω n + θg


= A cos(Ω nT + θ) = A cos G 0
0
HF JK s
0 0

F0
where, f 0 = = Frequency of discrete sinusoid in cycles/sample
Fs
w0 = 2pf 0= Frequency of discrete sinusoid in radians/sample

2.3.1 Sampling and Aliasing


In Section 2.2, it is observed that any two sinusoid signals with frequencies in the range
-1/2 £ f £ +1/2 are distinct and a discrete sinusoid with frequency, f > |±1/2|will be identical to another
discrete sinusoid with frequency, f < |±1/2|. Therefore, we can conclude that range of frequency of
discrete time signal is -1/2 to +1/2 . But the range of frequency of analog signal is -¥ to +¥ . While sampling
analog signals, the infinite frequency range continuous time signals are mapped (or converted) to finite
frequency range discrete time signals.
The relation between frequency of analog and discrete time signal is,
F .....(2.1)
f=
Fs
2. 9 Digital Signal Processing
The range of frequency of discrete time signal is,
1 1 .....(2.2)
− ≤f ≤
2 2
On substituting for f from equation (2.1) in equation (2.2) we get,
1 F 1 .....(2.3)
− ≤ ≤
2 Fs 2
On multiplying equation (2.3) by Fs we get,
Fs F
− ≤ F≤ s .....(2.4)
2 2
From equation (2.4) we can say that when an analog signal is sampled at a frequency Fs, the highest
analog frequency that can be uniquely represented by a discrete time signal will be F s /2.
The continuous time signal with frequency above Fs/2 will be represented as a signal within the range
+ Fs/2 to - Fs/2 . Hence the signal with frequency above Fs/2 will have an identical signal with frequency
below Fs/2 in the discrete form.
Hence infinite number of high frequency continuous time signals will be represented by a single
discrete time signal. Such signals are called alias.
The phenomenon of high-frequency component getting the identity of low-frequency component
during sampling is called aliasing.
Sampling an analog signal with frequency F by choosing a sampling frequency Fs such that Fs/2 > F
will not result in alias. But sampling frequency is selected such that Fs/2 < F that the frequency above Fs/2 will
have alias with frequency below Fs/2. Hence the point of reflection is Fs/2, and the frequency Fs/2 is called
folding frequency.
The discrete time sinusoids, A sin [(2pf0 + 2pk)n], will be alias for integer values of k. It is also
observed that, a sinusoidal signal with frequency F1 will be an alias of sinusoidal signal with frequency F2 if
it is sampled at a frequency Fs = F1 - F2. In general, if the sampling frequency is any multiple of F1 - F2,
[i.e., Fs = k(F1 - F2) where k = 1, 2, 3, ........] the signal with frequency F2 will be an alias of the signal with
frequency F1.
Let, Fmax be maximum frequency of analog signal that can be uniquely represented as discrete time
signal when sampled at a frequency Fs.
Fs .....(2.5)
Now, Fmax =
2
∴Fs = 2Fmax .....(2.6)
The equation (2.6) gives a choice for selecting sampling frequency. From equation (2.6) we can say
that for unique representation of analog signal with maximum frequency Fmax, the sampling frequency should
be greater than 2Fmax.
i.e., to avoid aliasing Fs ³ 2Fmax ..... (2.7)
When sampling frequency Fs is equal to 2Fmax, the sampling rate is called Nyquist rate.
It is observed that a nonshifted sinusoidal signal when sampled at Nyquist rate, will produce zero
sample sequence (i.e., discrete sequence with all zeros), (because the sinusoidal signal is sampled at its zero
crossings, Refer example 2.3). Hence to avoid zero sampling of sinewave, the sampling frequency Fs should be
greater than 2Fmax, where Fmax is the maximum frequency in the analog signal.
Chapter 2 - Discrete Time Signals and Systems 2. 10
A discrete signal obtained by sampling can be reconstructed to an analog signal, only when it is
sampled without aliasing. The above concepts of sampling analog signals are summarized as the sampling
theorem, given below.
Sampling Theorem : A band limited continuous time signal with highest frequency (bandwidth)
Fm hertz can be uniquely recovered from its samples provided that the sampling
rate Fs is greater than or equal to 2Fm samples per second.
Note : The effects of aliasing in frequency spectrum are discussed in Chapter-4.

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.

∴ x1(n) = x1(t) n = 3 cos 2π(20t) = 3cos 2π


FG 20 × n IJ = 3 cos 4π n
t = nT =
Fs t =
n
Fs
H 50 K 5

x 2 (n) = x 2(t) n = 3 cos 2π(70t) = 3cos 2π


FG 70 × nIJ
t = nT =
Fs t =
n
Fs
H 50 K
For integer values of n
= 3cos
14π
n = 3cos 2πn +
4π FG
n = 3 cos

n
IJ
5 5 H 5 K cos(2pn + q) = cos q
From the above analysis, we observe that x1(n) and x2(n) are identical , and so x2(t) is an alias of x1 (t) when
sampled at a frequency of 50 Hz.

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

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

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

F ig 1 : S a m p lin g p o ints of th e co m po n en ts o f the sig n al x a (t).


Chapter 2 - Discrete Time Signals and Systems 2. 12
2.4 Classification of Discrete Time Signals
The discrete time signals are classified depending on their characteristics. Some ways of
classifying discrete time signals are,
1. Deterministic and nondeterministic signals
2. Periodic and aperiodic signals
3. Symmetric and antisymmetric signals
4. Energy and power signals
5. Causal and noncausal signals
2.4.1 Deterministic and Nondeterministic Signals
The signals that can be completely specified by mathematical equations are called deterministic
signals.The step, ramp, exponential and sinusoidal signals are examples of deterministic signals.
The signals whose characteristics are random in nature are called nondeterministic signals.
The noise signals from various sources are best examples of nondeterministic signals.
2.4.2 Periodic and Aperiodic Signals
When a discrete time signal x(n), satisfies the condition x(n + N) = x(n) for integer values of N, then the
discrete time signal x(n) is called periodic signal. Here N is the number of samples of a period.
i.e, if, x(n + N) = x(n), for all n, then x(n) is periodic.
The smallest value of N for which the above equation is true is called fundamental period. If there is
no value of N that satisfies the above equation, then x(n) is called aperiodic or nonperiodic signal.
When N is the fundamental period, the periodic signals will also satisfy the condition x(n + kN) = x(n),
where k is an integer. The periodic signals are power signals. The discrete time sinusoidal and complex
exponential signals are periodic signals when their fundamental frequency, f0 is a rational number.
x(n )
N=5
2 2 2 2 2 2 2 2

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

a) Given that, x(n) = cos


FG 5π n +1IJ
H9 K
Let N and M be two integers.

Now, x(n + N) = cos G


F 5π (n + N) + 1IJ = cos FG 5πn + 1 + 5π NIJ
H9 K H9 9 K

Since, cos(q + 2pM) = cos q, for periodicity N should be integral multiple of 2π.
9

Let , N = M × 2π
9
9 18M
∴ N = M × 2π × =
5π 5
Here N is an integer if, M = 5, 10, 15, 20, .......
Let, M = 5 ; \ N = 18

When N = 18 ; x(n + N) = cos


FG 5πn + 1+ 5π × 18IJ = cos FG 5πn + 1+ 10πIJ = cos FG 5πn + 1IJ = x(n)
H9 9 K H9 K H9 K
Hence x(n) is periodic with fundamental period of 18 samples.

b) Given that, x(n) = sin


FG n − πIJ
H9 K
Let N and M be two integers.

Now, xbn + Ng = sin G


F n + N − πIJ = sin FG n + N − πIJ = sin FG n − π + NIJ
H 9 K H9 9 K H9 9K
N
Since, sin(q + 2pM) = sin q, for periodicity should be equal to integral multiple of 2p.
9
N
Let, = M × 2π
9
\ N = 18 pM
Here N cannot be an integer for any integer value of M and so x(n) will not be periodic.

c) Given that, x(n) = sin


FG π n IJ
2
H8 K
π π
(n + N)2 = sin (n2 + N2 + 2nN) = sin
π 2 πN2 πNF I
∴ x(n + N) = sin
8 8 8
n +
8
+ GH
4
n JK
πN2 πN
Let , = 2πM1 Let , = 2πM2
8 4

∴ 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

Let N and M be two integers.


j7 π (n+N) j7 πn j7 πN
Now, x(n + N) = e 4 =e 4 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

FG 5πn + 5πN IJ 1 .....(1) j


FG 3πn + 3πN2 IJ .....(2)
=3eH 4 K
= 2 cos
H3 3 K 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.4.3 Symmetric (Even) and Antisymmetric (Odd) Signals


The discrete time signals may exhibit symmetry or antisymmetry with respect to n = 0. When a
discrete time signal exhibits symmetry with respect to n = 0 then it is called an even signal. Therefore, the
even signal satisfies the condition,
x(-n) = x(n)
When a discrete time signal exhibits antisymmetry with respect to n = 0, then it is called an odd signal.
Therefore the odd signal satisfies the condition,
x(-n) = -x(n)
x (n ) x (n )
3 3

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)

On replacing n by –n in equation (2.8) we get,

x(–n) = xe(–n) + xo(–n) ......(2.9)

Since xe(n) is even, xe(–n) = xe(n)

Since xo(n) is odd, xo(–n) = – xo(n)

Hence the equation (2.9) can be written as,

x(–n) = xe(n) – xo(n) ......(2.10)


Chapter 2 - Discrete Time Signals and Systems 2. 16
On adding equation (2.8) and (2.10) we get,
x(n) + x(–n) = 2 xe(n)

1
∴ x e(n) = x(n) + x(− n)
2
On subtracting equation (2.10) from equation (2.8) we get,

x(n) – x(–n) = 2 xo(n)

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

c) Given that, x(n) = {2, − 2, 6, − 2}


A
Given that, x(n) = {2, –2, 6, –2}, \ x(0) = 2 ; x(1) = –2 ; x(2) = 6 ; x(3) = –2
-
x(–n) = {–2, 6, –2, 2}, \ x(–3) = –2 ; x(–2) = 6 ; x(–1) = –2 ; x(0) = 2
-
­
2. 17 Digital Signal Processing
1 1
Even part, x e (n) = [x(n) + x( −n)] Odd part, x o (n) = [x(n) − x( −n)]
2 2

At n = – 3 ; x(n) + x(–n) = 0 + (–2) = – 2 At n = – 3 ; x(n) – x(–n) = 0 – (–2) = 2

At n = – 2 ; x(n) + x(–n) = 0 + 6 = 6 At n = – 2 ; x(n) – x(–n) = 0 – 6 =–6

At n = – 1 ; x(n) + x(–n) = 0 + (–2) = – 2 At n = – 1 ; x(n) – x(–n) = 0 – (–2) = 2

At n = 0 ; x(n) + x(–n) = 2 + 2 = 4 At n = 0 ; x(n) – x(–n) = 2–2 = 0

At n = 1 ; x(n) + x(–n) = – 2 + 0 =–2 At n = 1 ; x(n) – x(–n) = – 2 – 0 =–2

At n = 2 ; x(n) + x(–n) = 6 + 0 = 6 At n = 2 ; x(n) – x(–n) = 6–0 = 6

At n = 3 ; x(n) + x(–n) = – 2 + 0 =–2 At n = 3 ; x(n) – x(–n) = – 2 – 0 =–2

∴ x(n) + x(−n) = {−2, 6, − 2, 4, − 2, 6, − 2} \ x(n) – x(–n) = {2, –6, 2, 0, –2, 6, –2}


-
A
1 1
∴ x e (n) = [x(n) + x(−n)] ∴ x o (n) = [x(n) − x( −n)]
2 2
= {−1, 3, − 1, 2, − 1, 3, − 1} = {1, − 3, 1, 0, − 1, 3, − 1}
A -

2.4.4 Energy and Power Signals


The energy E of a discrete time signal x(n) is defined as,

2 .....(2.11)
Energy, E = ∑ x( n)
n= −∞

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.

\ For energy signal, 0 < E < ∞ and P = 0

For power signal, 0 < P < ∞ and E = ∞


Chapter 2 - Discrete Time Signals and Systems 2. 18
Example 2.6
Determine whether the following signals are energy or power signals.

a) x(n) =
FG 1IJ n
u(n) b) x(n) = sin
FG π nIJ c) x(n) = u(n)
H 4K H3 K
Solution

a) Given that, x(n) =


FG 1 IJ u(n) n

H 4K
F 1I n

Here, x(n) = G J u(n) for all n.


H 4K
F 1I
∴ x(n) = G J = 0.25 ;
n
n
n≥0
H 4K Infinite geometric series
+∞ ∞ 2 ∞ sum formula.
(0.25)n =
2
Energy, E = ∑ x(n) = ∑ ∑ (0.252 )n ∞
n 1
n = −∞ n=0 n=0 ∑ C =
1 − C
n = 0

1
= ∑ (0.0625)n = = 1.067 joules Using infinite geometric series sum formula.
n=0
1 − 0.0625

+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

1 (0.0625)N +1 − 1 Using finite geometric series sum formula.


= Lt
N→∞ 2N + 1 0.0625 − 1
Finite geometric series
1 0.0625∞ − 1 sum formula.
= × =0 N
∞ 0.0625 − 1 n CN + 1 − 1
∑ C =
C −1
n = 0
Here E is finite and P is zero and so x(n) is an energy signal.

b) Given that, x(n) = sin


FG π nIJ 1 − cos2θ
H3 K sin2θ =
2

1 − cos n
Energy, E =
+∞

∑ x(n) =
2

+∞
sin2
FG π nIJ = ∑ +∞
3
n = −∞ n = −∞
H3 K n = −∞ 2

1 F FG1 − cos 2π nIJ I = 1 F


+∞ +∞ +∞
2π 1I
=
2 GH ∑ H
n = −∞ 3 K JK 2 GH ∑ n = −∞
1n − ∑
n = −∞
cos
3 JK
n = (∞ − 0) = ∞
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

FG1 − cos 2π nIJ


∴ P = Lt
1

H N
3 K
N→∞ 2N + 1 n = −N
2

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

Since P is finite and E is infinite, x(n) is a power signal.


2π 2π
Note: The term cos n is periodic with periodicity of 3 samples. Samples of cos n for two periods are
3 3
given below. It can be observed that sum of samples of a period is zero.
2π 2π 2π
When n = 0 ; cos n = 1, When n = 1 ; cos n = −0.5, When n = 2 ; cos n = −0.5
3 3 3
2π 2π 2π
When n = 3 ; cos n = 1, When n = 4 ; cos n = −0.5, When n = 5 ; cos n = −0.5
3 3 3

c) Given that, x(n) = u(n)


+∞ +∞
E= ∑ x(n) =
2
∑ bu(n)g 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 ∞

Since P is finite and E is infinite, x(n) is a power signal.

2.4.5 Causal, Noncausal and Anticausal signals


A discrete time signal is said to be causal, if it is defined for n ³ 0. Therefore if x(n) is causal, then
x(n) = 0 for n < 0.

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

x(n) = {1, –1, 2, –2, 3, –3}

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.5 Mathematical Operations on Discrete Time Signals


Some of the mathematical operations that can be performed on discrete time signals are,

1. Scaling : Amplitude scaling and time scaling

2. Folding

3. Shifting : Right shift (or advance) and left shift (or delay)

4. Addition

5. Multiplication

2.5.1. Scaling of Discrete Time Signals

Amplitude Scaling (or Scalar 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 y(n) be amplitude scaled signal of x(n), then y(n) = A x(n)

Let, x(n) = 10 ; n=0 and A = 0.2, When n = 0 ; y(0) = A x(0) = 0.2 ´ 10 = 2.0

= 16 ; n=1 When n = 1 ; y(1) = A x(1) = 0.2 ´ 16 = 3.2

= 20 ; n=2 When n = 2 ; y(2) = A x(2) = 0.2 ´ 20 = 4.0

Time Scaling (or Downsampling and Upsampling)

There are two ways of time scaling a discrete time signal. They are downsampling and upsampling.

In a signal x(n), if n is replaced by Dn, where D is an integer, then it is called downsampling.

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

x1(n) = x(2n) will be a down sampled version of x(n) and

x2(n) = x n will be an up sampled version on x(n).


e j
2
When n = 0 ; x1(0) = x(0) = b0 When n = 0 ; x 2 (0) = x 0 = x(0) = b 0
ej
2
When n = 1 ; x1(1) = x(2) = b2 When n = 1 ; x (1) = x e 1 j = 0
2
2
When n = 2 ; x1(2) = x(4) = b4 and so on.
When n = 2 ; x (2) = x e 2 j = x(1) = b
2
1
2

When n = 3 ; x (3) = x e 3 j = 0 and so on.


2
2

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 .

2.5.2. Folding (or Reflection or Transpose) of Discrete Time Signals


The folding of a discrete time signal x(n) is performed by changing the sign of the time base n in x(n).
The folding operation produces a signal x(–n) which is a mirror image of the signal x(n) with respect to time
origin n = 0.

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

F ig 2.13a : A d isc re te tim e sig n al x (n ). F ig 2.13b : F o ld e d sig n al o f x(n ).


F ig 2.1 3 : A d iscrete tim e sign a l a n d its fo ld ed v ersio n .
Chapter 2 - Discrete Time Signals and Systems 2. 22
2.5.3. Time Shifting of Discrete Time Signals
A signal x(n) may be shifted in time by replacing the independent variable n by n – m, where m is an integer.
[i.e, x(n–m) is shifted version of x(n)]. If m is a positive integer, the time shift results in a delay by m units of time. If
m is a negative integer, the time shift results in an advance of the signal by |m| units in time. The delay results in
shifting each sample of x(n) to the right. The advance results in shifting each sample of x(n) to the left.
Example :
Let, x(n) = 3 ; n = 2
=2 ; n=3
=1 ; n=4
= 0 ; for other n
Let, x1(n) = x(n – 2), where x1(n) is delayed Let, x2(n) = x(n + 2), where x2(n) is an advanced
signal of x(n) signal of x(n)
When n = 4 ; x1(4) = x(4 – 2) = x(2) =3 When n = 0 ; x2(0) = x(0 + 2) = x(2) = 3
When n = 5 ; x1(5) = x(5 – 2) = x(3) =2 When n = 1 ; x2(1) = x(1 + 2) = x(3) = 2
When n = 6 ; x1(6) = x(6 – 2) = x(4) =1 When n = 2 ; x2(2) = x(2 + 2) = x(4) = 1
The sample x(2) is available at n = 2 in The sample x(2) is available at n = 2 in the original
the original sequence x(n), but the same sample sequence x(n), but the same sample is available at n = 0
is available at n = 4 in x1(n). Similarly every sample in x2(n). Similarly every sample of x(n) is advanced by two
of x(n) is delayed by two sampling times. sampling times. Hence the signal x2(n) is an advanced
version of x(n).
x (n )
3 x 1 (n) x1(n) = x(n−2) x 2 (n)
3
2 3
1 2 2
1 1
0 1 2 3 4 5 6 n
0 1 2 3 4 5 6 n 0 1 2 3 4 5 6 n
VI sampling time
II sampling time

Vth sampling time


Ist sampling time

III sampling time


IV sampling time
Time origin

F ig 2.14b : D e la y ed sig n a l o f x (n ). F ig 2.14c : A dv a n ce d sig n al o f x(n ).


th
nd

th
rd

F ig 2.14a : A disc re te tim e sig n a l x (n) .


F ig 2.1 4 : A d iscrete tim e sign a l a n d its sh ifted version .

Delayed Unit Impulse Signal x 3 (n)


x 3 (n) = δ(n −m )
The unit impulse signal is defined as, 1

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

2.5.4. Addition of Discrete Time Signals


The addition of two discrete time signals is performed on a sample-by-sample basis.
The sum of two signals x1(n) and x2(n) is a signal y(n), whose value at any instant is equal to the sum
of the samples of these two signals at that instant.
i.e., y(n) = x1(n) + x2(n) ; -¥ < n < ¥ .
Example :

Let, x1(n) = {2, 2, –1} and x2(n) = {–1, 1, 2}

When n = 0 ; y(0) = x1(0) + x2(0) = 2 + (–1) = 1

When n = 1 ; y(1) = x1(1) + x2(1) = 2 + 1 =3

When n = 2 ; y(2) = x1(2) + x2(2) = –1 + 2 = 1

\ y(n) = x1(n) + x2(n) = {1, 3, 1}

2.5.5. Multiplication of Discrete Time Signals


The multiplication of two discrete time signals is performed on a sample-by-sample basis.The
product of two signals x1(n) and x2(n) is a signal y(n), whose value at any instant is equal to the product of
the samples of these two signals at that instant. The product is also called modulation.
Example :

Let, x1(n) = { 2, 2, –1 } and x2(n) = { –1, 1, 2 }

When n = 0 ; y(0) = x1(0) ´ x2(0) = 2 ´ (–1) = –2

When n = 1 ; y(1) = x1(1) ´ x2(1) = 2 ´ 1 = 2

When n = 2 ; y(2) = x1(2) ´ x2(2) = –1 ´ 2 = –2

\ y(n) = x1(n) ´ x2(n) = {–2, 2, –2}

2.6 Discrete Time System


A discrete time system is a device or algorithm that operates on a discrete time signal, called the input
or excitation, according to some well-defined rule, to produce another discrete time signal called the output
or the response of the system. We can say that the input signal x(n) is transformed by the system into a
signal y(n), and the transformation can be expressed mathematically as shown in equation (2.13).The
diagrammatic representation of discrete time system is shown in fig 2.17.
Chapter 2 - Discrete Time Signals and Systems 2. 24
Response, y(n) = H{x(n)} .....(2.13)
where, H denotes the transformation (also called an operator).
D isc re te tim e
syste m
In p u t sign a l O u tp u t sign a l
x (n ) y (n )
or H or
E x cita tion R e sp o n se
F ig 2.1 7 : R ep resen tation of d iscrete tim e system .
LTI System

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).

\ Impulse Response, h(n) = H{d(n)} .....(2.14)


δ(n ) h (n )
H
F ig 2 .18 : D iscrete tim e system w ith im p u lse in p u t.

2.6.1 Mathematical Equation Governing Discrete Time System


The mathematical equation governing the discrete time system can be developed as shown below.
The response of a discrete time system at any time instant depends on the present input, past inputs
and past outputs.
Let us consider the response at n = 0. Let us assume a relaxed system and so at n = 0, there is no past
input or output. Therefore the response at n = 0, is a function of present input alone.
i.e., y(0) = F[x(0)]
Let us consider the response at n =1. Now the present input is x(1), the past input is x(0) and past
output is y(0). Therefore the response at n = 1, is a function of x(1), x(0), y(0).
i.e., y(1) = F[y(0), x(1), x(0)]
Let us consider the response at n = 2. Now the present input is x(2), the past inputs are x(1) and x(0),
and past outputs are y(1) and y(0). Therefore the response at n = 2, is a function of x(2), x(1), x(0), y(1), y(0).
i.e., y(2) = F[y(1), y(0), x(2), x(1), x(0)]
Similarly, at n = 3, y(3) = F[y(2),y(1), y(0), x(3), x(2), x(1), x(0)]
at n = 4, y(4) = F[y(3),y(2), y(1), y(0), x(4), x(3), x(2), x(1), x(0)] and so on.
In general, at any time instant n,
y(n) = F[y(n – 1), y(n – 2), y(n – 3), .....y(1), y(0), x(n), x(n – 1),
x(n – 2), x(n – 3) ..... x(1), x(0)] .....(2.15)
2. 25 Digital Signal Processing
For an LTI system, the response y(n) can be expressed as a weighted summation of dependent terms.
Therefore the equation (2.15) can be written as,
y(n) = – a1 y(n – 1) – a2 y(n – 2) – a3 y(n – 3) – ...........
+ b0 x(n) + b1 x( n – 1) + b2 x(n – 2) + b3 x(n – 3) +........ ..... (2.16)
where, a1, a2, a3, .... and b0, b1, b2, b3, ..... are constants.
Note : Negative constants are inserted for output signals, because output signals are feedback
from output to input. Positive constants are inserted for input signals, because input
signals are feed forward from input to output.
Practically, the response y(n) at any time instant n, may depend on N number of past outputs,
present input and M number of past inputs where M £ N. Hence the equation (2.16) can be written as,
y(n) = – a1 y(n – 1) – a2 y(n – 2) – a3 y(n – 3) – ........ – aN y(n – N)
+ b0 x(n) + b1 x(n – 1) + b2 x(n – 2) + b3 x(n – 3) + ....... +bM x(n – M)
N M
∴ b g ∑ a ybn − mg + ∑ b xbn − mg
y n =− m m
.....(2.17)
m=1 m=0

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

Element Block diagram Signal flow


representation graph representation

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).

x(n) 0.7 x(n) 0.7 x(n − 1) y(n) −1


x(n) 0.7 0.7 x(n) z y(n)
−1
0.7 z +
1
0.7 x(n)

F ig 1 : B lo c k d ia g ra m o f th e syste m F ig 2 : S ig n al flow grap h of th e syste m


y (n ) = 0.7 x(n ) + 0 .7 x (n − 1 ). y (n ) = 0.7 x(n ) + 0 .7 x (n − 1 ).

b) Given that, y(n) = 0.4 y(n – 1) + x(n) – 3 x(n – 2)


The individual terms of the given equation are 0.4 y(n – 1) and – 3 x(n – 2). They are represented by
basic elements as shown below.
Block diagram representation Signal flow graph representation

−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

F ig 3 : B lo c k d ia g ra m o f th e syste m F ig 4 : S ig n al flow grap h of th e syste m


describ e d b y th e e qu a tio n describ e d b y th e e qu a tio n
y(n ) = 0 .4 y (n − 1 ) + x(n ) − 3 x(n − 2 ). y(n ) = 0 .4 y (n − 1 ) + x(n ) − 3 x(n − 2 ).
Chapter 2 - Discrete Time Signals and Systems 2. 28
c) Given that, y(n) = 0.2 y(n – 1) + 0.7 x(n) + 0.9 x(n – 1)
The individual terms of the given equation are 0.2 y(n – 1), 0.7 x(n) and 0.9 x(n – 1). They are represented
by basic elements as shown below.
Block diagram representation Signal flow graph representation

x(n) 0.7 x(n) 0.7


0.7 x(n) 0.7 x(n)

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).

y(n) x(n) 1 0.7 1 1 y(n)


x(n)
0.7 + +

−1 −1 −1
z z
−1 z 0.9 0.2 z

0.9 0.2

F ig 5 : B lo c k d ia g ra m o f th e syste m d e scrib e d F ig 6 : S ig n al flow gra ph o f th e syste m d e scrib e d


b y th e eq u a tio n b y th e eq ua tio n
y (n) = 0 .2 y(n − 1 ) + 0.7 x (n )+ 0 .9 x (n − 1). y(n ) = 0 .2 y (n − 1 ) + 0 .7 x(n ) + 0.9 x (n − 1).

2.7 Response of LTI Discrete Time System in Time Domain


The general equation governing an LTI discrete time system is,
N M
bg
y n =− ∑
m=1
b
am y n − m + g ∑ b xbn − mg
m=0
m

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.

2.7.1 Zero-Input Response or Homogeneous Solution


The zero-input response is obtained from homogeneous solution yh(n) with constants evaluated
using initial condition.
∴ Zero - input response, y zi ( n) = y h ( n) with constants evaluated using 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,

y h ( n) = (C1 + C2 n + C3 n2 + ..... + C p n p − 1 ) λn1 + C p + 1 λnp + 1 + .... + C N λnN


where, C1 , C2 , C3 ,......C N are constants that can be evaluated using initial conditions.
Complex Roots
Let the characteristic polynomial has a pair of complex roots l and l* and the remaining (N – 2) roots
be distinct real roots. Now, the homogeneous solution will be in the form,
yh(n) = rn [C1 cos nq + C2 sin nq] + C3 l3n + C4 l4n + ... + CN lN n
b
where, λ = a + jb, λ∗ = a − jb, r = a 2 + b2 , θ = tan−1
a
C1, C2, C3 ... CN are constants that can be evaluated using initial conditions.
2.7.2 Particular Solution
The particular solution, yp(n) is the solution of the difference equation for specific input signal x(n)
for n ³ 0. Since the input signal may have different form, the particular solution depends on the form or type
of the input signal x(n).
If x(n) is constant, then yp(n) is also a constant.
Example :

Let, x(n) = u(n) ; now, yp(n) = K u(n)

If x(n) is exponential, then yp(n) is also an exponential.


Example :

Let, x(n) = an u(n) ; now, yp(n) = K an u(n)

If x(n) is sinusoid, then yp(n) is also a sinusoid.


Example :

Let, x(n) = A cos w 0n ; now, yp(n) = K1 cos w 0n + K2 sin w 0n

The general form of particular solution for various types of inputs are listed in table 2.2.
Table 2.2 : Particular Solution

Input signal, x(n) Particular solution, yp(n)


A K
n
AB K Bn
A nB K0 nB + K1 n(B–1) + ..... + KB
An nB An (K0 nB + K1 n(B–1) + .....+ KB )
A cos w 0n K1 cos w 0n + K2 sin w 0n
A sin w 0n K1 cos w 0n + K2 sin w 0n
2. 31 Digital Signal Processing

2.7.3 Zero-State Response


The zero-state response or forced response is obtained from the sum of homogeneous solution and
particular solution and evaluating the constants with zero initial conditions.

∴ Zero - state response, y zs ( n) = y h ( n) + y p ( n)


with constants C1 , C 2 ,.... C N evaluated with zero initial conditions

2.7.4 Total Response


The total response of discrete time system can be obtained by the following two methods.
Method-1
The total response is given by sum of homogeneous solution and particular solution.
\ Total response, y(n) = yh(n) + yp(n)
Procedure to Determine Total Response by Method-1
1. Determine the homogeneous solution yh(n) with constants C1, C2, .....CN.
2. Determine the particular solution y p(n) and evaluate the constants K for any value of
n ³ 1 so that no term of y(n) vanishes.
3. Now the total response is given by the sum of yh(n) and yp(n).
\ Total response, y(n) = yh (n) + yp(n)
4. The total response will have N number of constants C1, C2, .....CN. Evaluate the given difference
equation for n = 0, 1, 2, ....N – 1 and form one set of N number of equations. Then evaluate the total
response for n = 0, 1, 2, ..... N – 1 and form another set of N number of equations. Now
solve the constants C1, C2, .....CN using the two sets of N number of equations.
Method-2
The total response is given by sum of zero-input response and zero-state response.
\ Total response, y(n) = yzi(n) + yzs(n)
Procedure to Determine Total Response by Method-2
1. Determine the homogeneous solution yh(n) with constants C1, C2, ....CN.
2. Determine the zero-input response, which is obtained from the homogeneous solution yh(n)
and evaluating the constants C1, C2, ....CN using the initial conditions.
3. Determine the particular solution yp(n) and evaluate the constants K for any value of n ³ 1 so
that no term of y(n) vanishes.
4. Determine the zero-state response, yzs(n) which is given by sum of homogeneous solution
and particular solution and evaluating the constants C1, C2, ....CN with zero initial conditions.
5. Now, the total response is given by sum of zero input response and zero state response.

\ Total response, y(n) = yzi(n) + yzs(n)


Chapter 2 - Discrete Time Signals and Systems 2. 32
Example 2.8
Determine the response of first order discrete time system governed by the difference equation,
y(n) = – 0.8 y(n – 1) + x(n)
When the input is unit step, and with initial condition a) y(–1) = 0 b) y(–1) = 2/9.
Solution
Given that, y(n) = – 0.8 y(n – 1) + x(n)
\ y(n) + 0.8 y(n – 1) = x(n) .....(1)
Homogeneous Solution
The homogeneous equation is the solution of equation (1) when x(n) = 0.
\ y(n) + 0.8 y(n – 1) = 0 .....(2)
n
Put, y(n) = l in equation (2).
\ ln + 0.8 l(n – 1) = 0
(n – 1)
l (l + 0.8) = 0 Þ l = – 0.8
The homogeneous solution yh(n) is given by,
yh(n) = C ln = C (– 0.8)n ; for n³³
³0 .....(3)
Particular Solution
Given that the input is unit step and so the particular solution will be in the form,
y(n) = K u(n) .....(4)
On substituting for y(n) from equation (4) in equation (1) we get,
y(n) + 0.8 y(n – 1) = x(n) Þ K u(n) + 0.8 K u(n – 1) = u(n) .....(5)
In order to determine the value of K, let us evaluate equation (5) for n = 1, ( Q we have to evaluate equation
(5) for any n ³1, such that none of the term vanishes).
From equation (5) when n = 1, we get,
1 10 5
K + 0.8 K = 1 Þ 1.8 K = 1 Þ K= = =
1. 8 18 9
The particular solution yp(n) is given by,
5
yp (n) = K u(n) = u(n) ; for all n
9
5
= ; for n ≥ 0
9
Total Response
The total response y(n) of the system is given by sum of homogeneous and particular solution.
\ Response, y(n) = yh(n) + yp(n)
n5
\ y(n) = C(−0.8) + ; for n ≥ 0 .....(6)
9
When n = 0, from equation (1), we get, y(0) + 0.8 y(–1) = 1
\ y(0) = 1 – 0.8 y(–1) .....(7)
5
When n = 0, from equation (6), we get, y(0) = C + .....(8)
9
5
On equating (7) and (8) we get, C+ = 1 − 0.8 y(−1)
9
5
∴ C = 1 − 0.8 y(−1) −
9
4 .....(9)
= − 0.8 y( −1)
9
2. 33 Digital Signal Processing
On substituting for C from equation (9) in equation (6) we get,

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,

yh (n) = C1 λn1 + C 2 λn2


= C1(0.3)n + C 2( −0.1)n ; for n ≥ 0 .....(3)
Particular Solution
Given that the input is an exponential signal, 0.2n u(n) and so the particular solution will be in the form,
y(n) = K 0.2n u(n) .....(4)
On substituting for y(n) from equation (4) in equation (1) we get,
K0.2n u(n) –0.2 K 0.2(n – 1) u(n – 1) – 0.03 K 0.2(n – 2) u(n – 2) = 0.2n u(n) + 0.4 ´ 0.2(n – 1) u(n) .....(5)
In order to determine the value of K, let us evaluate equation (5) for n = 2, ( Q we have to evaluate equation
(5) for any n ³ 1, such that none of the term vanishes).
Chapter 2 - Discrete Time Signals and Systems 2. 34
From equation (5) when n = 2, we get,
K 0.22 – 0.2K ´ 0.21 – 0.03K ´ 0.20 = 0.22 + 0.4 ´ 0.21
0.04K – 0.04K – 0.03K = 0.04 + 0.08
– 0.03K = 0.12
0.12
∴ K=− = −4
0.03
The particular solution yp(n) is given by,
yp (n) = K 0.2n u(n) = (–4) 0.2n u(n)
Total Response

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

2.8 Classification of Discrete Time Systems


The discrete time systems are classified based on their characteristics. Some of the classifications of
discrete time systems are,
1. Static and dynamic systems
2. Time invariant and time variant systems
3. Linear and nonlinear systems
4. Causal and noncausal systems
5. Stable and unstable systems
6. FIR and IIR systems
7. Recursive and nonrecursive systems

2.8.1 Static and Dynamic Systems


A discrete time system is called static or memoryless system if its output at any instant n depends at
most on the input sample at the same time but not on the past or future samples of the input. In any other case,
the system is said to be dynamic or to have memory.
Example :
123

y(n) = a x(n) Static systems


y(n) = n x(n) + 6 x3(n)
123

y(n) = x(n) + 3 x(n – 1)


123

N Finite memory is required


y(n) = ∑
m= 0
x(n − m)
Dynamic systems
123


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

x (n) y (n) y d (n)


H z
−m

Input signa l R espons e for D elayed


S y stem undelay ed input D elay respons e
If, y (n − m ) = y d (n), then the sy s tem is tim e inv ariant

F ig 2.1 9 : D ia g ra m m a tic exp la n a tio n o f tim e in va ria n ce .

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

R esponse for D elayed response


S ystem undelayed input D elay

Conclusion : Here, y(n – m) = yd(n), therefore the system is time invariant.

b) Given that, y(n) = 2n x(n)


Test 1 : Response for delayed input
Let, y(n – m) = Response for delayed input.
x (n) y (n − m ) = 2(n − m ) x(n − m )
−m
x (n − m )
Input signa l
z H R espons e for
D elayed input
D elay S y stem delay ed in put
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x (n) y (n) = 2n x (n) y d (n) = 2n x(n − m )
H z
−m

Input signa l R espons e for D elayed res ponse


S y stem undelay ed input D elay

Conclusion : Here, y(n – m) ¹ yd(n), therefore the system is time variant.

c) Given that, y(n) = x(–n)


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 )
−m x (n − m )
z H
Input signa l D elayed input R espons e for
D elay S y stem delay ed in put
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x (n) y (n) = x( −n) y d (n) = x ( −n − m )
H z
−m

Input signa l R espons e for D elayed res ponse


S y stem undelay ed input D elay

Conclusion : Here, y(n – m) ¹ yd(n), therefore the system is time variant.

d) Given that, y(n) = x(n) – b x(n – 1)


Test 1 : Response for delayed input
Let, y(n – m) = Response for delayed input.
x (n) x (n − m ) y (n − m ) = x (n − m ) −b x (n − m − 1)
−m
z H
In put sign a l D elayed input R espons e for
D elay S y stem delay ed in put
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x (n ) y d (n ) = x (n − m ) − b x(n − m − 1)
y (n ) = x(n ) − b x(n − 1 )
H z
−m

In p ut sign a l R esp on s e for D elayed res p on se


S y ste m u nd elay e d inp u t D elay

Conclusion : Here, y(n – m) = yd(n), therefore the system is time invariant.

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 R espons e for D elayed res ponse


S y stem undelay ed input D elay

Conclusion : Here, y(n – m) = yd(n), therefore the system is time invariant.

b) Given that, y(n) = n x3(n)


Test 1 : Response for delayed input
Let, y(n – m) = Response for delayed input.
x (n) y (n − m ) = (n − m ) x 3 (n − m )
x (n − m )
H
−m
z
Input signa l D elayed input R espons e for
D elay S y stem delay ed in put
Test 2 : Delayed response
Let, yd(n) = Delayed response.
y d (n) = n x 3 (n − m )
x (n) y (n) = n x 3 (n)
H z
−m

Input signa l R espons e for D elayed res ponse


S y stem undelay ed input D elay

Conclusion : Here, y(n – m) ¹ yd(n), therefore the system is time variant.

c) Given that, y(n) = bx(n)


Test 1 : Response for delayed input
Let, y(n – m) = Response for delayed input.
x(n − m)
x (n) x (n − m ) y (n − m ) = b
−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

Conclusion : Here, y(n – m) = yd(n), therefore the system is time invariant.


M N
d) Given that, y(n) = ∑b
k=0
k x(n − k) − ∑
k=1
ak y(n − k)

Test 1 : Response for delayed input


Let, y(n – m) = Response for delayed input.
x (n) y (n − m )
x (n − m )
H
−m
z
Input signa l D elayed input R espons e for
D elay S y stem delay ed inp ut
M N
Response for delayed input, y(n – m) = H{x(n – m)} = ∑b
k=0
k x(n − m − k) − ∑a
k=1
k y(n − m − k)
2. 39 Digital Signal Processing
Test 2 : Delayed response
Let, yd(n) = Delayed response.
x (n) y (n) y d (n)

Input signa l
H z
−m

R espons e for D elayed res ponse


S y stem D elay
undelay ed input
M N
Response for undelayed input = H{x(n)} = y(n) = ∑
k =0
bk x(n − k) − ∑
k =1
a k y(n − k)
–m
Delayed response, yd(n) = z H{x(n)}
LM b M N OP
= z −m
MN ∑
k =0
k x(n − k) − ∑
k =1
ak y(n − k)
PQ
M N
= ∑
k =0
bk x(n − m − k) −
k =1
∑ ak y(n − m − k)

Conclusion : Here, y(n – m) = yd(n), therefore the system is time invariant.

2.8.3 Linear and Nonlinear Systems


A linear system is one that satisfies the superposition principle. The principle of superposition
requires that the response of the system to a weighted sum of the signals is equal to the corresponding
weighted sum of the responses of the system to each of the individual input signals.
Definition : A relaxed system H is linear if
H{a1 x1(n) + a2 x2(n)} = a1 H{x1(n)} + a2 H{x2(n)} .....(2.23)
for any arbitrary input sequences x1(n) and x2(n) and for any arbitrary constants a1 and a2.
If a relaxed system does not satisfy the superposition principle as given by the above definition, then
the system is nonlinear.The diagrammatic explanation of linearity is shown in fig 2.20.
x 1 (n) a 1 x 1 (n)
a1

a 1 x 1 (n) + a 2 x 2 (n) H{a 1 x 1 (n) + a 2 x 2 (n)}


+ H
x 2 (n) a 2 x 2 (n)
a2

x 1 (n) H{x 1 (n)} a 1 H{x 1 (n)}


H a1

a 1 H{x 1 (n)} + a 2 H{x 2 (n)}


+

x 2 (n) H{x 2 (n)} a 2 H{x 2 (n)}


H a2

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)}

F ig 2.2 0 : D ia g ra m m a tic exp la n a tio n o f lin ea rity.

Procedure to test for linearity


1. Let x1(n) and x2(n) be two inputs to system H, and y1(n) and y2(n) be corresponding responses.
2. Consider a signal, x3(n) = a1 x1(n) + a2 x2(n) which is a weighed sum of x1(n) and x2(n).
3. Let y3(n) be the response for x3(n).
4. Check whether y3(n) = a1 y1(n) + a2 y2(n). If they are equal then the system is linear, otherwise it is
nonlinear.
Chapter 2 - Discrete Time Signals and Systems 2. 40

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 )

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)
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)

\ a1 y1(n) + a2 y2(n) = a1 n x1(n) + a2 n x2(n) .....(1)


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 )}

\ 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.

b) Given that, y(n) = x(n2)


Let, H be the system represented by the equation, y(n) = x(n2).
The system H operates on x(n) to produce, y(n).
x(n)
y (n ) = H {x (n)} = x (n )
2
H

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)
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

\ a1 y1(n) + a2 y2(n) = a1 x1(n2) + a2 x2(n2) .....(1)


Consider a linear combination of inputs, a1 x1(n) + a2 x2(n) = x3(n).
Let, y3(n) be the response for x3(n).
2. 41 Digital Signal Processing

x 3 (n)
H y 3 (n ) = H {x 3 (n )}

\ y3(n) = H{a1 x1(n) + a2 x2(n)} = a1 x1(n2) + a2 x2(n2) .....(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.
c) Given that, y(n) = x2(n)
Let, H be the system represented by the equation, y(n) = x2(n).
The system H operates on x(n) to produce, y(n).
x(n)
y (n ) = H {x (n)} = x (n)
2
H
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)
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

\ a1 y1(n) + a2 y2(n) = a1 x12(n) + a2 x22(n) .....(1)


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 )}

\ y3(n) = H{a1 x1(n) + a2 x2(n)} = [a1 x1(n) + a2 x2(n)]2


= a12 x12 (n) + a22 x22(n) + 2 a1 a2 x1(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 nonlinear.
d) Given that, y(n) = B x(n) + C
Let, H be the system represented by the equation, y(n) = B x(n) + C.
The system H operates on x(n) to produce, y(n).
x(n)
H y (n) = H{x (n)} = B x (n) + C

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)
H y 1 (n ) = H{x 1 (n )} = B x 1 (n ) + C

x 2 (n)
H y 2 (n ) = H{x 2 (n )} = B x 2 (n ) + C

\ a1 y1(n) + a2 y2(n) = a1[B x1(n) + C] + a2[B x2(n) + C]


= B a1 x1(n) + C a1 + B a2 x2(n) + C a2 .....(1)
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 )}

\ 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.

a) y(n) = ex(n) b) y(n) = bx(n) c) y(n) = n x2(n)

Solution
a) Given that, y(n) = ex(n)

Let, H be the system represented by the equation, y(n) = ex(n).

The system H operates on x(n) to produce, y(n).


x(n) x( n)
H y (n ) = H {x (n)} = e

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) 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 )

∴ a1 y1(n) + a 2 y 2(n) = a1 ex1(n) + a 2 ex 2 (n) .....(1)

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 )}

\ 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.

b) Given that, y(n) = bx(n)


Let, H be the system represented by the equation, y(n) = bx(n).
The system H operates on x(n) to produce, y(n).
x(n)
y (n) = H {x(n)} = b
x(n)
H

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)
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

∴ a1 y1(n) + a 2 y 2(n) = a1 bx1(n) + a 2 bx 2 (n) .....(1)

Consider a linear combination of inputs, a1x1(n) + a2x2(n) = x3(n).


2. 43 Digital Signal Processing
Let, y3(n) be the response for x3(n).
x 3 (n)
H y 3 (n ) = H {x 3 (n )}

∴ y 3 (n) = H a1x1(n) + a 2x 2 (n) = b[a 1x 1(n) + a 2x 2 (n)] = b a 1x 1(n) b a 2x 2 (n)


l q .....(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.

c) Given that, y(n) = n x2(n)


Let, H be the system represented by the equation, y(n) = n x2(n).
The system H operates on x(n) to produce, y(n).
x(n) 2
H y (n) = H {x (n)} = n x (n )

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)
y 1 (n ) = H {x 1 (n )} = n x 1 (n)
2
H
x 2 (n)
y 2 (n ) = H {x 2 (n )} = n x 2 (n)
2
H
\ a1 y1(n) + a2 y2(n) = a1 n x12(n) + a2 n x22(n) .....(1)
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 )}

\ y3(n) = H{a1 x1(n) + a2 x2(n)} = n[a1 x1(n) + a2 x2(n)]2


= n a12 x12(n) + n a22 x22(n) + 2 n a1 a2 x1(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 nonlinear.

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.

b) Given that, y(n) = x(n) − 2 x(n − 1)


Let, H be the system represented by the equation, y(n) = x(n) – 2 x(n–1).
The system H operates on x(n) to produce, y(n).
x(n)
H y (n ) = H {x (n)} = x (n) −2x (n − 1)

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)
H y 1 (n ) = H {x 1 (n )} = x 1 (n ) − 2 x 1 (n − 1)

x 2 (n)
H y 2 (n ) = H {x 2 (n )} = x 2 (n ) − 2 x 2 (n − 1)

\ a1 y1(n) + a2 y2(n) = a1 x1(n) – a1 2 x1(n – 1) + a2 x2(n) – a2 2 x2(n – 1) .....(1)


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 )}

\ 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)

Let, H be the system represented by the equation,


M N
y(n) = ∑
m=0
bm x(n − m) − ∑
m =1
cm y(n − m)

The response of the system |UV = H{ x(n)} = y(n) = ∑ b M

m x(n − m) −
N

∑ cm y(n − m)
H for the input x(n) |W m=0 m=1

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.
M N
\ y1(n) = H{x1(n)} = ∑
m=0
bm x1(n − m) − ∑
m =1
cm y1(n − m)

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

Consider a linear combination of inputs, a1 x1(n) + a2 x2(n) = x3(n).


Let, y3(n) be the response for the input x3(n).
\ y3(n) = H{x3(n)} = H{a1 x1(n) + a2 x2(n)}
M N
= ∑
m =0
bm (a1 x1(n − m) + a 2 x 2 (n − m)) −
m=1
∑ cm y 3(n − m)

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

By time invariant property,


If y3(n) = H{a1 x1(n) + a2 x2(n)} then y3(n – m) = H{a1 x1(n – m) + a2 x2(n – m)}
If y2(n) = H{x2(n)} then y2(n – m) = H{x2(n – m)}
If y1(n) = H{x1(n)} then y1(n – m) = H{x1(n – m)}
\ y3(n – m) = H{a1 x1(n – m) + a2 x2(n – m)} = a1 H{x1(n – m)} + a2 H{x2(n – m)}
= a1 y1(n – m) + a2 y2(n – m)] .....(3)
Using equation (3), the equation (2) can be written as,
M M N
y3(n) = a1 ∑b
m = 0
m x1(n − m) + a 2 ∑
m = 0
bm x 2(n − m) − ∑
m = 1
cm [a1 y1(n − m) + a 2 y 2 (n − m)]

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.

2.8.4 Causal and Noncausal Systems


Definition : A system is said to be causal if the output of the system at any time n depends only on the
present input, past inputs and past outputs but does not depend on the future inputs and outputs.
If the system output at any time n depends on future inputs or outputs then the system is called
noncausal system.
The causality refers to a system that is realizable in real time. It can be shown that an LTI system is
causal if and only if the impulse response is zero for n < 0, (i.e., h(n) = 0 for n < 0).
Let, x(n) = Present input and y(n) = Present output
\ x(n - 1), x(n - 2), ......, are past inputs
y(n - 1), y(n - 2), ......, are past outputs
In mathematical terms the output of a causal system satisfies the equation of the form,
y(n) = F [x(n), x(n - 1), x(n - 2), .... , y(n - 1), y(n - 2) ....]
where, F[.] is some arbitrary function.
Chapter 2 - Discrete Time Signals and Systems 2. 46
Example 2.15
Test the causality of the following systems.
n
a) y(n) = x(n) – x(n – 2) b) y(n) = ∑ x(k) c) y(n) = b x(n) d ) y(n) = n x(n)
k = −∞
Solution
a) Given that, y(n) = x(n) – x(n – 2)
When n = 0, y(0) = x(0) – x(–2) Þ The response at n = 0, i.e., y(0) depends on the present input
x(0) and past input x(–2)
When n = 1, y(1) = x(1) – x(–1) Þ The response at n = 1, i.e., y(1) depends on the present input
x(1) and past input x(–1).
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.
n
b) Given that, y(n) = ∑ x(k)
k = −∞

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

When n = 1, y(1) = ∑ x(k)


k = −∞

= ... 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.

b) Given that, y(n) = x(n2)


When n = –1 ; y(–1) = x(1) Þ The response at n = –1, depends on the future input x(1).
When n = 0 ; y(0) = x(0) Þ Þ The response at n = 0, depends on the present input x(0).
When n = 1 ; y(1) = x(1) Þ Þ The response at n = 1, depends on the present input x(1).
When n = 2 ; y(2) = x(4) Þ Þ The response at n = 2, depends on the future input x(4).
From the above analysis we can say that the response for any value of n (except n = 0 and n = 1) depends
on future inputs. Hence the system is noncausal.
c) Given that, y(n) = x(3n)
When n = –1 ; y(–1) = x(–3) Þ Þ The response at n = –1, depends on the past input x(–3).
When n = 0 ; y(0) = x(0) Þ Þ The response at n = 0, depends on the present input x(0).
When n = 1 ; y(1) = x(3) Þ Þ The response at n = 1, depends on the future input x(3).
From the above analysis we can say that the response of the system for n > 0, depends on future inputs.
Hence the system is noncausal.
d) Given that, y(n) = x(–n)
When n = –2 ; y(–2) = x(2) Þ Þ The response at n = –2, depends on the future input x(2).
When n = –1 ; y(–1) = x(1) Þ Þ The response at n = –1, depends on the future input x(1).
When n = 0 ; y(0) = x(0) Þ Þ The response at n = 0, depends on the present input x(0).
When n = 1 ; y(1) = x(–1) Þ Þ The response at n = 1, depends on the past input x(–1).
From the above analysis we can say that the response of the system for n < 0 depends on future inputs.
Hence the system is noncausal.

2.8.5 Stable and Unstable Systems


Definition : An arbitrary relaxed system is said to be BIBO stable (Bounded Input-Bounded Output stable)
if and only if every bounded input produces a bounded output.
Let x(n) be the input of discrete time system and y(n) be the response or output for x(n).The term
bounded input refers to finite value of the input signal x(n) for any value of n. Hence if input x(n) is bounded
then there exits a constant Mx such that |x(n)| £ Mx and Mx < ¥ , for all n.
Examples of bounded input signal are step signal, decaying exponential signal and impulse signal.
Examples of unbounded input signal are ramp signal and increasing exponential signal.

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 = −∞

In the above equation, if


+∞
.....(2.25)
∑ h(n) < ∞
n = −∞

then the response y(n) is bounded.

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

The condition to be satisfied for the stability of the system is, ∑


n = −∞
|h(n)| < ∞.

Given that, h(n) = pn ; n < 0


= qn ; n ³ 0
∞ −1 ∞ ∞ ∞
∴ ∑
n = −∞
h(n) = ∑ p +∑ q
n = −∞
n

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,

a) h(n) = 0.2n u(n) b) h(n) = 0.3n u(n) + 2n u(n)


n
c) h(n) = 4 u(-n) d) h(n) = 0.2n u(-n) + 3n u(-n)

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= −∞

d) h(n) = 0.2n u(-


-n) + 3n u(-
-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.8.6 FIR and IIR Systems


In FIR system (Finite duration Impulse Response system), the impulse response consists of finite
number of samples. The convolution formula for FIR system is given by,
N −1
.....(2.26)
y( n ) = ∑ h( m) x( n − m)
m=0

where, h(n) = 0 ; for n < 0 and n ³ N


From equation (2.26) it can be concluded that the impulse response selects only N samples of the input
signal.In effect, the system acts as a window that views only the most recent N input signal samples in
forming the ouput. It neglects or simply forgets all prior input samples. Thus a FIR system requires memory
of length N. In general, a FIR system is described by the difference equation,
N −1
.....(2.27)
y( n) = ∑ bm x( n − m)
m= 0

where, bm = h(m) ; for m = 0 to N -1


2. 51 Digital Signal Processing
In IIR system (Infinite duration Impulse Response system), the impulse response has infinite number
of samples. The convolution formula for IIR systems is given by,

.....(2.28)
y( n ) = ∑ h( m) x( n − m)
m=0
Since this weighted sum involves the present and all the past input sample, we can say that the IIR
system requires infinite memory. In general, an IIR system is described by the difference equation,
N M
y( n) = − ∑ a m y( n − m) + ∑ bm x( n − m)
m =1 m= 0

2.8.7 Recursive and Nonrecursive Systems


A system whose output y(n) at time n depends on any number of past output values as well as present
and past inputs is called a recursive system. The past outputs are y(n – 1), y(n – 2), y(n – 3), etc.,.
Hence for recursive system, the output y(n) is given by,
y(n) = F [y(n - 1), y(n - 2),...y(n - N), x(n), x(n - 1),...x(n - M)]
A system whose output does not depend on past output but depends only on the present and past
input is called a nonrecursive system.
Hence for nonrecursive system, the output y(n) is given by,
y(n) = F [x(n), x(n – 1) ,....., x(n – M)]
In a recursive system, in order to compute y(n0), we need to compute all the previous values y(0),
y(1) ,......., y(n0 – 1) before calculating y(n0). Hence the output samples of a recursive system has to be
computed in order [i.e., y(0), y(1), y(2), ....]. The IIR systems are recursive systems.
In nonrecursive system, y(n 0 ) can be computed immediately without having y(n 0 - 1),
y(n0-2)..... Hence the output samples of nonrecursive system can be computed in any order [i.e. y(50), y(5),
y(2), y(100),....]. The FIR systems are nonrecursive systems.

2.9 Discrete or Linear Convolution


The Discrete or Linear convolution of two discrete time sequences x1(n) and x2(n) is defined as,
+∞ +∞
x3 ( n) = ∑
m = −∞
x1 ( m) x2 (n − m) or x 3 ( n) = ∑
m = −∞
x2 (m) x1 (n − m) .....(2.29)

where, x3(n) is the sequence obtained by convolving x1(n) and x2(n)


m is a dummy variable
The convolution relation of equation (2.29) can be symbolically expressed as,
x3(n) = x1(n) * x2(n) = x2(n) * x1(n) ..... (2.30)
where, the symbol * indicates convolution operation.
In linear convolution, the sequences x1(n) and x2(n) are nonperiodic sequences and the sequence x3(n)
obtained by convolution is also nonperiodic. Hence this convolution is also called aperiodic convolution.
Procedure For Evaluating Linear Convolution
Let, x1(n) = Discrete time sequence with N1 samples
x2(n) = Discrete time sequence with N2 samples
Now, the convolution of x1(n) and x2(n) will produce a sequence x3(n) consisting of N1+N2–1 samples.
Each sample of x3(n) can be computed using the equation (2.29). The value of x3(n) at n = q is obtained by
replacing n by q, in equation (2.29).
Chapter 2 - Discrete Time Signals and Systems 2. 52

+∞
.....(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)

2.9.1 Representation of Discrete Time Signal as Summation of Impulses


A discrete time signal can be expressed as summation of impulses and this concept will be useful to
prove that the response of discrete time LTI system can be determined using discrete convolution.
Let, x(n) = Discrete time signal
d(n) = Unit impulse signal
d(n - m) = Delayed impulse signal
2. 53 Digital Signal Processing
We know that, d(n) = 1 ; at n = 0
= 0 ; when n ¹ 0
and, d(n – m) = 1 ; at n = m
= 0 ; when n ¹ m
If we multiply the signal x(n) with the delayed impulse d(n - m) then the product is nonzero only at
n = m and zero for all other values of n. Also at n = m, the value of product signal is mth sample x(m) of the
signal x(n).
\ x(n) d(n - m) = x(m)
Each multiplication of the signal x(n) by an unit impulse at some delay m, in essence picks out the
single value x(m) of the signal x(n) at n = m, where the unit impulse is nonzero. Consequently if we repeat this
multiplication for all possible delays in the range -¥ < m < ¥ and add all the product sequences, the result will
be a sequence that is equal to the sequence x(n).
For example, x(n) d(n - (-2)) = x(-2)
x(n) d(n - (-1)) = x(-1)
x(n) d(n) = x(0)
x(n) d(n - 1) = x(1)
x(n) d(n - 2) = x(2)
From the above products we can say that each sample of x(n) can be expressed as a product of the
sample and delayed impulse, as shown below.
\ x(-2) = x(-2) d(n-(-2))
x(-1) = x(-1) d(n - (-1))
x(0) = x(0) d(n)
x(1) = x(1) d(n - 1)
x(2) = x(2) d(n - 2)
\ x(n) = ..... + x(-2) + x(-1) + x(0) + x(1) + x(2) + ...........
= ..... + x(-2) d(n - (-2)) + x(-1) d(n - (-1)) + x(0) d(n) + x (1) d(n - 1)
+ x(2) d(n - 2) + ...........
+∞
.....(2.32)
= ∑ x( m) δ( n − m)
m =−∞

In equation (2.32) each product x(m) d(n – m) is an impulse and the summation of impulses gives the
sequence x(n).

2.9.2 Response of LTI Discrete Time System Using Discrete Convolution


In an LTI system, the response y(n) of the system for an arbitrary input x(n) is given by convolution
of input x(n) with impulse response h(n) of the system. It is expressed as,
+∞
.....(2.33)
y ( n) = x ( n ) * h ( n ) = ∑ x( m) h( n − m)
m =−∞
where, the symbol * represents convolution operation.
Chapter 2 - Discrete Time Signals and Systems 2. 54
Proof :
Let y(n) be the response of system H for an input x(n)
\ y(n) = H{x(n)} .....(2.34)

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)

where, d(n – m) is the delayed unit impulse signal.


From equations (2.34) and (2.35) we get,

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.

2.9.3 Properties of Linear Convolution


The Discrete or Linear convolution will satisfy the following properties.
Commutative property : x1(n) * x2(n) = x2(n) * x1(n)
Associative property : [x1(n) * x2(n)] * x3(n) = x1(n) * [x2(n) * x3(n)]
Distributive property : x1(n) * [x2(n) + x3(n)] = [x1(n) * x2(n)] + [x1(n) * x3(n)]
Proof of Commutative Property :
Consider convolution of x1(n) and x2(n).
By commutative property we can write,
x1(n) * x2(n) = x2(n) * x1(n)
(LHS) (RHS)
LHS = x1(n) * x2(n)
+∞
= ∑
m = −∞
x1( m) x 2(n − m) .....(2.39)

where, m is a dummy variable used for convolution operation.


2. 55 Digital Signal Processing
Let, n–m=p when m = –¥ , p = n – m = n + ¥ = +¥
\ m=n–p when m = +¥ , p = n – m = n – ¥ = –¥
On replacing m by (n – p) and (n – m) by p in equation (2.39) we get,
+∞ +∞
LHS = ∑
p = −∞
x1( n − p) x2( p) = ∑
p = −∞
x 2( p) x1( n − p)

= x2 (n) * x1(n) p is a dummy variable used for convolution operation.


= RHS

Proof of Associative Property :


Consider the discrete time signals x1(n), x2(n) and x3(n).
Let, y1(n) = x1(n) * x2(n) .....(2.40)
Let us replace n by p
\ y1(p) = x1(p) * x2(p)
+∞
= ∑
m = −∞
x1( m) x 2(p − m) .....(2.41)

Let, y2(n) = x2(n) * x3(n) .....(2.42)


+∞
∴ y2( n) = ∑
q = −∞
x1( q) x 2(n − q)

+∞
∴ y2(n − m) = ∑
q = −∞
x1( q) x2(n − q − m) .....(2.43)

where p, m and q are dummy variables used for convolution operation.


By associative property we can write,
[x1 (n) * x2(n)] * x3(n) = x1(n) * [x2 (n) * x3(n)]
LHS RHS
LHS = [x1(n) * x2(n)] * x3(n)
= y1(n) * x3(n) Using equation (2.40)
+∞
= ∑
p = −∞
y1( p) x 3(n − p)

+∞ +∞
= ∑
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)

= [x1 (n) * x2(n)] + [x1(n) * x3 (n)]


= RHS

2.9.4 Interconnections of Discrete Time Systems


Smaller discrete time systems may be interconnected to form larger systems. Two possible basic ways
of interconnection are cascade connection and parallel connection. The cascade and parallel connections
of two discrete time systems with impulse responses h1(n) and h2(n) are shown in fig 2.21.
h1(n)
x(n) y1(n) y(n) x(n) y(n)
h1(n) h 2 (n) +

h 2 (n)

F ig 2.21 a : C a sca d e c on n e ctio n . F ig 2.21 b : P a ralle l co n n ec tio n.


F ig 2.2 1 : In terco n n ec tio n o f d iscrete tim e system s.
Cascade Connected Discrete Time Systems
Two cascade connected discrete time systems with impulse response h1(n) and h2(n) can be replaced
by a single equivalent discrete time system whose impulse response is given by convolution of individual
impulse responses.
x(n) y1(n) y(n) x(n) y(n)
h1(n) h 2 (n) ⇒ h1(n) ∗ h 2 (n)

F ig 2.2 2 : C a sca de c o n ne cted d iscrete tim e syste m a n d th eir e q u iv a lent.


Proof:
With reference to fig 2.22 we can write,
y1(n) = x(n) * h1(n) .....(2.45)
y(n) = y1(n) * h2(n) .....(2.46)
Using equation (2.45), the equation (2.46) can be written as,
y(n) = x(n) * h1(n) * h2(n)
= x(n) * [h1(n) * h2(n)]
= x(n) * h(n) .....(2.47)
where, h(n) = h1(n) * h2(n)
From equation (2.47) we can say that the overall impulse response of two cascaded discrete
time systems is given by convolution of individual impulse responses.
2. 57 Digital Signal Processing
Parallel Connected Discrete Time Systems
Two parallel connected discrete time systems with impulse responses h1(n) and h2(n) can be replaced
by a single equivalent discrete time system whose impulse response is given by sum of individual impulse
responses.
y 1 (n)
h 1 (n)
y (n) x (n) y (n)
x (n)
+ ⇒ h 1 (n) + h 2 (n)
y 2 (n)
h 2 (n)

F ig 2.2 3 : P a ra llel c o n ne cted d iscrete tim e syste m s an d th eir eq u iv a len t.


Proof:
With reference to fig 2.23 we can write,
y1(n) = x(n) * h1(n) .....(2.48)
y2(n) = x(n) * h2(n) .....(2.49)
y(n) = y1(n) + y2(n) .....(2.50)
On substituting for y1(n) and y2(n) from equations (2.48) and (2.49) in equation (2.50) we get,
y(n) = [ x(n) * h1(n)] + [ x(n) * h2(n)] .....(2.51)
By using distributive property of convolution, the equation (2.51) can be written as shown below,
y(n) = x(n) * [h1(n) + h2(n)]
= x(n) * h(n) .....(2.52)
where, h(n) = h1(n) + h2(n)
From equation (2.52) we can say that the overall impulse response of two parallel connected
discrete time systems is given by sum of individual impulse responses.

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)

where, m is a dummy variable used for convolution operation


m m n−m
h1(m) =
FG 2IJ ; h2 (m) =
FG 1IJ ; h2 (n − m) =
FG 1IJ
H 5K H 5K H 5K
The product h1(m) h2(n – m) will be nonzero in the range 0 £ m £ n. Therefore the summation index in the
above equation is changed to m = 0 to n.
n n m n − m n m n −m n n m
∴ h(n) = ∑ h1(m) h2 (n − m) = ∑
FG 2IJ FG 1IJ = ∑
FG 2IJ FG 1IJ FG 1IJ =
FG 1IJ ∑ FG 2IJ 5m
m= 0 m= 0
H 5K H 5K m= 0
H 5K H 5 K H 5 K H 5K H 5K
m= 0
n n m n n
=
FG 1IJ ∑
FG 2 × 5IJ = FG 1IJ ∑ 2 m
Finite geometric series
H 5K m= 0
H 5 K H 5K m= 0 sum formula
n n
F 1I F 2 − 1I = FG 1IJ (2 − 1)
n+1 N
CN + 1 − 1
=G J
H 5K GH 2 − 1 JK H 5K n+1
; for n ≥ 0 ∑
n = 0
Cn =
C −1
n
F 1I
=G J (2n + 1 − 1) u(n) ; for all n Using finite geometric series sum formula.
H 5K
Chapter 2 - Discrete Time Signals and Systems 2. 58

Example 2.21
Determine the overall impulse response of the interconnected discrete time systems shown below,
a) b)

h1(n) h1(n) h2 (n)


x(n) y(n) y(n)
+ x(n)
+
h 2 (n) + h 3 (n)
h 3 (n) h1(n)

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)

Here, h(n) = h1(n) + [(h1(n) + h2(n)) * h3(n)]


= h1(n) + [h1(n) * h3(n)] + [h2(n) * h3(n)] Using distributive property.
Let us evaluate the convolution of h1(n) and h3(n).

h1(n) ∗ h3 (n) = ∑
m = −∞
h1(m) h3 (n − m)

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

Let us evaluate the convolution of h2(n) and h3(n).


+∞
h2 (n) ∗ h3 (n) = ∑
m = −∞
h2 (m) h3(n − m)

The product of h2(m) and h3(n–m) 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,

h(n) = h1(n) + h1(n) ∗ h3(n) + h2 (n) ∗ h3 (n)


n n n n n
=
FG 1IJ u(n) + 5 FG 1IJ u(n) − 3 FG 1IJ u(n) + 5 FG 1IJ u(n) −
2 FG 1IJ u(n)
H 3K 2 H 3K 2 H 5K 3 H 2K 3 H 5K
n n n
=
FG1+ 5IJ FG 1IJ u(n) − FG 3 + 2IJ FG 1IJ u(n) + 5 FG 1IJ u(n)
H 2 K H 3K H 2 3 K H 5K 3 H 2K

=
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)

Here, h(n) = [h1(n) * h2(n)] + [h3(n) * h1(n)]

Let us evaluate the convolution of h1(n) and h2(n).



h1(n) ∗ h2 (n) = ∑
m = −∞
h1(m) h2 (n − m)


= ∑
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 a–m in the above equation will be nonzero only when m = 1.

\ h1(n) * h2(n) = an a–1 = an – 1 ; for n ³ 1

= an – 1 u(n – 1) ; for all n.

Let us evaluate the convolution of h3(n) and h1(n).



h3(n) ∗ h1(n) = ∑
m = −∞
h3(m) h1(n − m)

∞ ∞
= ∑
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 a–m in the above equation will be nonzero only when m = 2.

\ h1(n) * h2(n) = an a–2 = an – 2 ; for n ³ 2

= an – 2 u(n – 2) ; for all n

Now, the overall impulse response h(n) is given by,

h(n) = [h1(n) * h2(n)] + [h3(n) * h1(n)]

= a(n – 1) u(n – 1) + a(n – 2) u(n – 2)


2. 61 Digital Signal Processing

2.9.5 Methods of Performing Linear Convolution


Method 1: Graphical Method

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)

x 1 (0) x 1 (0) x 2 (0) x 1 (0) x 2 (1) x 1 (0) x 2 (2) x 1 (0) x 2 (3)

x 1 (1) x 1 (1) x 2 (0) x 1 (1) x 2 (1) x 1 (1) x 2 (2) x 1 (1) x 2 (3)

x 1 (2) x 1 (2) x 2 (0) x 1 (2) x 2 (1) x 1 (2) x 2 (2) x 1 (2) x 2 (3)

x 1 (3) x 1 (3) x 2 (0) x 1 (3) x 2 (1) x 1 (3) x 2 (2) x 1 (3) x 2 (3)


Chapter 2 - Discrete Time Signals and Systems 2. 62

......

x3(0) = ..... + x1(0) x2(0) + .....


x3(1) = ..... + x1(1) x2(0) + x1(0 ) x2(1) + .....
x3(2) = ..... + x1(2) x2(0) + x1(1) x2(1) + x1(0) x2(2) + .....
x3(3) = ..... + x1(3) x2(0) + x1(2) x2(1) + x1(1) x2(2) + x1(0) x2(3) + .....
......

\ x3(n) = {..... x3(0), x3(1), x3(2), x3(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)

In this example the convolution operation is performed by three methods.


The Input sequence starts at n = 0 and the impulse response sequence starts at n = –1. Therefore the
output sequence starts at n = 0 + (–1) = –1.
The input and impulse response consists of 4 samples, so the output consists of 4 + 4 – 1 = 7 samples.
Method 1 : Graphical Method
The graphical representation of x(n) and h(n) after replacing n by m are shown below. The sequence h(m)
is folded with respect to m = 0 to obtain h(–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 samples of y(n) are computed using the convolution formula,


+∞ +∞
y(n) = ∑
m = −∞
x(m) h(n − m) = ∑
m = −∞
x(m) hn (m) ; where hn (m) = h(n − m)

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.

Note : The unfilled boxes in the table are considered as zeros.

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) = h–1(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.

= 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)
=0+0+0+1+0+0+0=1
The samples of y(n) for other values of n are calculated as shown for n = –1.
3
When n = 0 ; y(0) = ∑ x(m) h0 (m) = 0 + 0 + 2 + 2 + 0 + 0 = 4
m = −2
3
When n = 1 ; y(1) = ∑ x(m) h1(m) = 0 + 1+ 4 + 0.5 + 0 = 5.5
m = −1
3
When n = 2 ; y(2) = ∑ x(m) h2(m) = −1+ 2 + 1+ 1= 3
m = 0
4
When n = 3 ; y(3) = ∑ x(m) h3 (m) = 0 − 2 + 0.5 + 2 + 0 = 0.5
m = 0
5
When n = 4 ; y(4) = ∑ x(m) h4 (m) = 0 + 0 − 0.5 + 1+ 0 + 0 = 0.5
m = 0
6
When n = 5 ; y(5) = ∑ x(m) h5 (m) = 0 + 0 + 0 − 1+ 0 + 0 + 0 = −1
m = 0

The output sequence, y(n) = l 1, 4, 5.5, 3, 0.5, 0.5, − 1q


A
Chapter 2 - Discrete Time Signals and Systems 2. 66
Method 3 : Matrix Method
The input sequence x(n) is arranged as a column and the impulse response is arranged as a row as shown
below. The elements of the two-dimensional array are obtained by multiplying the corresponding row element
with the column element. The sum of the diagonal elements gives the samples of y(n).

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)

y(–1) = 1 y(3) = 2 + 0.5 + (–2) = 0.5


y(0) = 2 + 2 = 4 y(4) = 1 + (–0.5) = 0.5 \ y(n) = {1, 4, 5.5, 3, 0.5, 0.5, –1}
-
y(1) = 0.5 + 4 + 1 = 5.5 y(5) = –1
y(2) = 1 + 1 + 2 + (–1) = 3

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

2.10 Circular Convolution


2.10.1 Circular Representation and Circular Shift of Discrete Time Signal
Consider a finite duration sequence x(n) and its periodic extension xp(n). The periodic extension of x(n)
can be expressed as xp(n) = x(n + N), where N is the periodicity. Let N = 4. The sequence x(n) and its periodic
extension are shown in fig 2.24.

Let, x(n) = 1 ; n=0


=2; n=1
=3; n=2
=4; n=3
x p (n )
x (n )
4 4 4 4

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.

x1(n) = xp(n – 2, (mod 4)) = xp((n – 2))4

\ When n = 0; x1(0) = xp((0 – 2))4 = xp((– 2))4 = x(2) = 3

When n = 1; x1(1) = xp((1 – 2))4 = xp((– 1))4 = x(3) = 4

When n = 2; x1(2) = xp((2 – 2))4 = xp((0))4 = x(0) = 1

When n = 3; x1(3) = xp((3 – 2))4 = xp((1))4 = x(1) = 2


2. 69 Digital Signal Processing
The periodic sequences xp(n) and x1(n) can be represented as points on a circle as shown in fig 2.26.
From fig 2.26 we can say that, x1(n) is simply xp(n) shifted circularly by two units in time, where the counter
clockwise (anticlockwise) direction has been arbitrarily selected for right shift or delay.
2 1 4

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).

x p (n + 3 ) x 2 (n ) x 2 (n) = x p ((n + 3)) 4

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.

2.10.2 Circular Symmetries of Discrete Time Signal


The circular representation of a sequence and the resulting periodicity gives rise to new definitions for
even symmetry, odd symmetry and the time reversal of the sequence.
An N-point sequence is called even if it is symmetric about the point zero on the circle. This implies
that,
x(N - n) = x(n) ; for 0 £ n £ N - 1 ...... (2.54)
An N-point sequence is called odd if it is antisymmetric about the point zero on the circle.
This implies that,
x(N - n) = - x(n) ; for 0 £ n £ N - 1 ...... (2.55)
The time reversal of a N-point sequence is obtained by reversing its sample about the point zero on the
circle. Thus the sequence x(–n, (mod N) ) is simply written as,
x (-n, (mod N)) = x(N - n) ; for 0 £ n £ N - 1 ...... (2.56)
This time reversal is equivalent to plotting x(n) in a clockwise direction on a circle, as shown in
fig 2.29.
x (2) x (6)

x (1) x (5) x (7)


x (3)

x (n) x (0) x ( −n)


x (4) x (4) x (0)

x (5) x (7) x (3) x (1)


x (6) x (2)
F ig 2.2 9 : C ircu la r rep rese n ta tio n o f a n 8 -p o in t seq ue n ce a n d its fo ld ed seq u en ce.
2.10.3 Definition of Circular Convolution
The circular convolution of two periodic discrete time sequences x1(n) and x2(n) with periodicity of
N samples is defined as,
N −1 N −1
.....(2.57)
x3 ( n) = ∑ x1( m) x2 (( n − m)) N or x 3 ( n) = ∑ x2 ( m) x1(( n − m)) N
m=0 m= 0

where, x3(n) is the sequence obtained by circular convolution,


x1((n – m))N represents circular shift of x1(n)
x2((n – m))N represents circular shift of x2(n)
m is a dummy variable.
2. 71 Digital Signal Processing
The output sequence x3(n) obtained by circular convolution is also a periodic sequence with periodicity
of N samples. Hence this convolution is also called periodic convolution.
The convolution relation of equation (2.57) can be symbolically expressed as
x3(n) = x1(n) * x2(n) = x2(n) * x1(n) ..... (2.58)
where, the symbol * indicates circular convolution operation.
The circular convolution is defined for periodic sequences. But circular convolution can be performed
with nonperiodic sequences by periodically extending them.The circular convolution 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 convolution.
The circular convolution of finite duration sequences can be performed only if both the sequences
consist of the same number of samples. If the sequences have different number of samples, then convert the
smaller size sequence to the length of larger size sequence by appending zeros.
Circular convolution basically involves the same four steps as that for linear convolution, namely,
folding one sequence, shifting the folded sequence, multiplying the two sequences and finally summing the
values of the product sequence. Like linear convolution, any one of the sequence is folded and rotated in
circular convolution.
The difference between the two is that in circular convolution the folding and shifting (rotating)
operations are performed in a circular fashion by computing the index of one of the sequences by modulo-N
operation. In linear convolution there is no modulo-N operation.
2.10.4 Procedure for Evaluating Circular Convolution
Let, x1(n) and x2(n) be periodic discrete time sequences with periodicity of N-samples. If x1(n) and
x2(n) are non-periodic then convert the sequences to N-sample sequences and periodically extend the sequence
x2(n) with periodicity of N-samples.
Now the circular convolution of x1(n) and x2(n) will produce a periodic sequence x3(n) with periodicity
of N-samples. The samples of one period of x3(n) can be computed using the equation (2.57). The value of
x3(n) at n = q is obtained by replacing n by q, in equation (2.57).
N −1
.....(2.59)
∴ x3 (q ) = ∑ x1( m) x2 ((q − m)) N
m=0
The evaluation of equation (2.59) 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 x1(n) and x2(n), in order to get the
sequences x1(m) and x2(m). Represent the samples of one period of the
sequences on circles.
2. Folding : Fold x2(m) about m = 0, to obtain x2(-m).
3. Rotation : Rotate x2(-m) by q times in anti-clockwise if q is positive, rotate x2(-m) by
q times in clockwise if q is negative to obtain x2((q – m))N.
4. Multiplication : Multiply x1(m) by x2((q – m))N to get a product sequence. Let the product
sequence be vq(m). Now, vq(m) = x1(m) × x2((q – m))N.
5. Summation : Sum up the samples of one period 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) in the range 0 < n < N -1. Hence the steps 3 , 4 and
5 given above must be repeated, for all possible time shifts in the range 0 < n < N - 1.
Chapter 2 - Discrete Time Signals and Systems 2. 72

2.10.5 Linear Convolution via Circular Convolution


When two numbers of N-point sequences are circularly convolved, it produces another N-point
sequence. For circular convolution, one of the sequence should be periodically extended. Also the resultant
sequence is periodic with period N.
The linear convolution of two sequences of length N1 and N2 produces an output sequence of length
N1 + N2 -1. To perform linear convolution via circular convolution both the sequences should be converted
to N 1 + N 2 - 1 point sequences by padding with zeros. Then perform circular convolution of
N1 + N2 -1 point sequences. The resultant sequence will be same as that of linear convolution of N1 and N2
point sequences.

2.10.6 Methods of Computing Circular Convolution


Method 1 : Graphical Method
In graphical method, the given sequences are converted to same size and represented on circles. In
case of periodic sequences, the samples of one period are represented on circles. One of the sequence is
folded and shifted circularly. Let x1(n) and x2(n) be the given sequences. Let x3(n) be the sequence obtained by
circular convolution of x1(n) and x2(n). The following procedure can be used to get a sample of x3(n) at n = q.
1. Change the index n in the sequences x1(n) and x2(n) to get x1(m) and x2(m) and then represent the
sequences on circles.
2. Fold one of the sequence. Let us fold x2(m) to get x2(–m).
3. Rotate (or shift) the sequence x2(–m), q times to get the sequence x2((q – m))N. If q is positive then
rotate (or shift) the sequence in anticlockwise direction and if q is negative then rotate (or shift) the
sequence in clockwise direction.
4. The sample of x3(q) at n = q is given by,
N −1 N −1
x3 ( q ) = ∑ x1 ( m) x2 (( q − m)) N = ∑ x1( m) x2,q ( m)
m=0 m= 0

where, x2, q(m) = x2((q – m))N


Determine the product sequence x1 ( m) x 2,q ( m) for one period.
5. The sum of all the samples of the product sequence gives the sample x3(q) [i.e., x3(n) at n = q].
The above procedure is repeated for all possible values of n to get the sequence x3(n).
Method 2 : Tabular Method
Let x1(n) and x2(n) be the given N-point sequences. Let x3(n) be the N-point sequence obtained by
circular convolution of x1(n) and x2(n). The following procedure can be used to obtain one sample of x3(n)
at n = q.
1. Change the index n in the sequences x1(n) and x2(n) to get x1(m) and x2(m) and then represent the
sequences as two rows of tabular array.
2. Fold one of the sequence. Let us fold x2(m) to get x2(–m).
3. Periodically extend x2(–m). Here the periodicity is N, where N is the length of the given sequences.
4. Shift the sequence x2(–m), q times to get the sequence x2((q – m))N. If q is positive then shift the
sequence to the right and if q is negative then shift the sequence to the left.
2. 73 Digital Signal Processing
N −1 N −1
5. The sample of x3(q) at n = q is given by, x3 (q) = ∑ x1 (m) x 2 ((q − m)) N = ∑ x1(m) x2,q (m)
m=0 m=0
where x2, q(m) = x2((q – m))N
Determine the product sequence x1 ( m) x 2,q ( m) for one period.
6. The sum of the samples of the product sequence gives the sample x3(q) [i.e., x3(n) at n = q].
The above procedure is repeated for all possible values of n to get the sequence x3(n).
Method 3: Matrix Method
Let x1(n) and x2(n) be the given N-point sequences. The circular convolution of x1(n) and x2(n) yields
another N-point sequence x3(n).
In this method an (N ´ N) matrix is formed using one of the sequence as shown below. Another
sequence is arranged as a column vector (column matrix) of order (N ´ 1). The product of the two matrices
gives the resultant sequence x3(n).
LMx (0) x ( N − 1)
2 2 x2 ( N − 2) ..... x 2 ( 2) x2 (1) OP LM xx ((10)) OP LM xx ((10)) OP
1 3

MMx (1) x (0)


2 2 x2 ( N − 1) ..... x 2 ( 3) x 2 ( 2) PP MM x (2) PP MM x (2) PP
1

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

x 1 (2) = 2 x 1 (m ) x 1 (0) = 2 x (2) = 3 x 2 (m ) x 2 (0) = 1 x 2 (2) = 3 x 2 ( −m ) x 2 (0) = 1


2

x 1 (3) = −1 x 2 (3) = 4 x 2 (1) = 2

F ig 1 . F ig 2 . F ig 3 .
4 1 2 3

x 2((0 − m )) 4 1 ⇒ x 2((1 − m )) 4 x 2((2 − m )) 4 x 2 ((3 − m )) 4


3 4 2 ⇒ 1 3 ⇒2 4
= x 2,0 (m ) = x 2,1 (m ) = x 2,2(m ) = x 2,3 (m )

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

F ig 8 : C o m p u ta tio n of x 3 (3 ). T h e s u m o f s a m p le s of v 3 (m ) giv es x 3 (3)


∴ x 3 (3) = 8 + 3 + 4 − 1 = 1 4
\ x3(n) = {10, 10, 6, 14}
-
2. 75 Digital Signal Processing
Method 2 : Circular Convolution Using Tabular Array

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

Note : The boldfaced numbers are samples obtained by periodic extension.


m –3 –2 –1 0 1 2 3

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

x2((1– m))4 = x2,1(m) 4 3 2 1 4 3

x2((2 – m))4 = x2,2(m) 4 3 2 1 4


x2((3 – m))4 = x2,3(m) 4 3 2 1

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

LM1 4 3 2 OP LM 2OP LM1× 2 + 4 × 1+ 3 × 2 + 2 × −1OP LM10OP


MM2 1 4 3 P MM 1PP = MM2 × 2 + 1 × 1+ 4 × 2 + 3 × −1PP = MM10PP
4P
MM34 2
3
1
2 1 PQ
P MM−21PP MMN34 ×× 22 ++ 23 ×× 1+ 1 × 2 + 4 × −1
P
1+ 2 × 2 + 1 × −1PQ
MM146PP
N N Q N Q
\ x3(n) = {10, 10, 6, 14}
- ­

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.

The shifted sequences x2,n(m) are periodically extended with a periodicity of N = 8.

Note : The boldfaced numbers are samples obtained by periodic extension

m –7 –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7

x1(m) 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6

x2(m) 0.1 0.3 0.5 0.7 0.9 1.1 1.3 1.5

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

Each sample of x3(n) is given by the equation,

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

The samples of x3(0) are calculated as shown below.


2. 77 Digital Signal Processing
7 7
When n = 0 ; x 3 (n) = ∑ x (m) x
m= 0
1 2 ((0 − m))8 = ∑ 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) + x1(5) x 2, 0 (5) + x1(6) x 2, 0 (6) + x1(7) x 2, 0 (7)
= 0.02 + 0.6 + 0.78 + 0.88 + 0.9 + 0.84 + 0.7 + 0.48 = 5.20
The samples of x3(n) for other values of n are calculated as shown for n = 0.
7 7
When n = 1; x3(1) = ∑
m=0
x1(m) x 2((1 − m))8 = ∑
m=0
x1(m) x 2,1(m) = 6.00

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.

Note : The unfilled boxes in the table are considered as zeros.


m –1 0 1 2
x(m) 1 0.5
h(m) 0.5 1
h(–m) = h0(m) 1 0.5
h(1 – m) = h1(m) 1 0.5
h(2 – m) = h2(m) 1 0.5
Chapter 2 - Discrete Time Signals and Systems 2. 78
Each sample of y(n) is given by the relation,
∞ ∞
y(n) = ∑
m = −∞
x(m) h(n − m) = ∑
m = −∞
x(m) hn (m) ; where hn (m) = h(n − m)

∞ 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

= 0 × 1 + 1 × 0.5 + 0.5 × 0 = 0 + 0.5 + 0 = 0.5


∞ 1
When n = 1 ; y(1) = ∑
m = −∞
x(m) h(1 − m) = ∑
m = 0
x(m) h1(m) = 1 + 0.25 = 125
.

∞ 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

Each sample of y(n) is given by the equation,


N − 1 N − 1
y(n) = ∑
m = 0
x(m) h((n − m))N = ∑
m = 0
x(m) hn (m); where hn (m) = h((n − m))N

N − 1 1
When n = 0 ; y(0) = ∑
m= 0
x(m) h((0 − m))2 = ∑ x(m) h (m)
m = 0
0

= x(0) h0 (0) + x(1) h0 (1) = 1 × 0.5 + 0.5 × 1 = 0.5 + 0.5 = 10


.
N − 1 1
When n = 1 ; y(1) = ∑ x(m) h((1 − m))2 = ∑ x(m) h1(m)
m= 0 m = 0
= x(0) h1(0) + x(1) h1(1) = 1 × 1 + 0.5 × 0.5 = 1 + 0.25 = 125
.
∴ y(n) = 10l
. , 1.25 q
A
Example 2.27
The input x(n) and impulse response h(n) of a LTI system are given by,
x(n) = {–1, 1, 2, –2) ; h(n) = {0.5, 1, –1, 2, 0.75}
A A ­
Determine the response of the system a) using linear convolution and b) using circular convolution.
2. 79 Digital Signal Processing
Solution
a) Response of LTI system using linear convolution
Let y(n) be the response of LTI system. By convolution sum formula,
+∞
y(n) = x(n) ∗ h(n) = ∑
m = −∞
x(m) h(n − m) ; where m is a dummy variable used for convolution.

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) = h–1(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) 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)
= 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

The response of LTI system y(n) is,


y(n) = {–0.5, –0.5, 3, –2, –2.75, 6.75, –2.5, –1.5}
- ­
b) Response of LTI System Using Circular Convolution
The response of LTI system is given by linear convolution of x(n) and h(n). Let y(n) be the response
sequence of LTI system. To get the result of linear convolution from circular convolution, both the sequences
should be converted to the size of y(n) and perform circular convolution of the converted sequences. Also the
converted sequences should start and end at the same value of n as that of y(n).
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. Therefore both
the sequences should be converted to 8-point sequences.
The x(n) starts at n = 0 and h(n) starts at n = –1. Hence y(n) will start at n = 0 + (–1) = –1. The y(n) will
end at n = [0 +(–1)] + (4 + 5 – 2) = 6. Therefore the converted sequences should start at n = –1 and end at n = 6.
\ x(n) = {0, –1, 1, 2, –2, 0, 0, 0} and h(n) = {0.5, 1, –1, 2, 0.75, 0, 0, 0}
- -
The converted sequences x(n) and h(n) are represented on the tabular array after replacing the index n by
m as shown below. The sequence h(m) is folded and shifted.
The shifted sequences hn(m) are periodically extended with a periodicity of N = 8.

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 = h–1(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)

+ x(3) h−1(3) + x(4) h−1(4) + x(5) h−1(5) + x(6) h−1(6)


= 0 + (−0.5) + 0 + 0 + 0 + 0 + 0 + 0 = −0.5

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

The response of LTI system y(n) is,


y(n) = {–0.5, –0.5, 3, –2, –2.75, 6.75, –2.5, –1.5}
-

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.

2.11 Sectioned Convolution


The response of an LTI system for any arbitrary input is given by linear convolution of the input and
the impulse response of the system. If one of the sequences (either the input sequence or impulse response
sequence) is very much larger than the other, then it is very difficult to compute the linear convolution for the
following reasons.

1. The entire sequence should be available before convolution can be carried out. This makes long
delay in getting the output.

2. Large amounts of memory is required to store the sequences.

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

Note : Samples in the shaded region are added. O v erlapped region

F ig 2 .3 0 : O ve rla p p in g of o u tp ut seq u en c e o f sec tio n ed c o n vo lution b y o v erla p a d d m eth o d .


The linear convolution of each section with smaller sequence will produce an output sequence of size
N3 + N2 –1 samples. In this method the last N2 –1 samples of each output sequence overlaps with the first
N2 –1 samples of the next section. [i.e., there will be a region of N2 –1 samples over which the output sequence
of qth convolution overlaps the output sequence of (q +1)th convolution]. While combining the output
sequences of the various sectioned convolutions, the corresponding samples of overlapped regions are
added and the samples of non-overlapped regions are retained as such.

2.11.2 Overlap Save Method


In the overlap save method, the results of linear convolution of the various sections are obtained
using circular convolution. In this method, the longer sequence is divided into smaller sequences. Each
section of the longer sequence and the smaller sequence are converted to the size of the output sequence of
sectioned convolution. The circular convolution of each section of the longer sequence and the smaller
sequence is performed. The overall output sequence is obtained by combining the outputs 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.
In the overlap save method, the results of linear convolution are obtained by circular convolution.
Hence each section of longer sequence and the smaller sequence are converted to the size of output sequence
of size N3 + N2 – 1 samples.The smaller sequence is converted to size of N3 + N2 –1 samples, by appending with
zeros.The convertion of each section of longer sequence to the size N3 + N2 –1 samples can be performed in
two different methods.
2. 83 Digital Signal Processing
Method-1
In this method, the first N2 –1 samples of a section is appended as last N2 –1 samples of the previous
section (i.e., the overlapping samples are placed at the beginning of the section). The circular convolution of
each section will produce an output sequence of size N3 + N2 –1 samples. In this output the first N2 –1 samples
are discarded and the remaining samples of the output of sectioned convolutions are saved as the overall
output 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)
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

Note : Samples in the shaded region are discarded.


O v erlapped region

F ig 2 .3 2 : O ve rla p p in g of o u tp ut seq u en c e of sec tio n ed c o n vo lution


b y m eth o d 1 o f o ve rla p sa ve m ethod .
Method-2
In this method, the last N2–1 samples of a section is appended as last N2 –1 samples of the next section
(i.e, the overlapping samples are placed at the end of the sections). The circular convolution of each section
will produce an output sequence of size N3 + N2 –1 samples. In this output the last N2 –1 samples are discarded
and the remaining samples of the output of sectioned convolutions are saved as the overall output sequence.

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

F ig 2 .3 3 : 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 2 o f o ve rlap sa ve m eth o d .
Chapter 2 - Discrete Time Signals and Systems 2. 84

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

Note : Samples in the shaded region are discarded. O v erlapped region

F ig 2 .3 4 : O ve rla p p ing of o utp ut seq u en c e o f sec tio n ed co n vo lu tio n


b y m eth o d 2 o f o verla p sa v e m eth od .

Example 2.28
Perform the linear convolution of the following sequences by a) Overlap add method, and b) Overlap
save method.

x(n) = {1, –1, 2, –2, 3, –3, 4, –4} ; h(n) = {–1, 1}

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, –1, 2, –2, 3, –3, 4, –4}


Let x(n) can be sectioned into four sequences, each consisting of two samples of x(n) as shown below.
x1(n) = 1 ; n = 0 x2(n) = 2 ; n = 2 x3(n) = 3 ; n=4 x4(n) = 4 ; n=6
= –1 ; n = 1 = –2 ; n = 3 = –3 ; n=5 = –4 ; n = 7
Let y1(n), y2(n), y3(n) and y4(n) be the output of linear convolution of x1(n), x2(n), x3(n) and x4(n) with h(n)
respectively.
Here h(n) starts at n = nh = 0
x1(n) starts at n = n1 = 0, \ y1(n) will start at n = n1 + nh = 0 + 0 = 0
x2(n) starts at n = n2 = 2, \ y2(n) will start at n = n2 + nh = 2 + 0 = 2
x3(n) starts at n = n3 = 4, \ y3(n) will start at n = n3 + nh = 4 + 0 = 4
x4(n) starts at n = n4 = 6, \ y4(n) will start at n = n4 + nh = 6 + 0 = 6

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

When n = 2 ; y (2) = ∑ x (m) h (m) = 0 − 1+ 0 = −1


1 1 2
Convolution of Section 2
+∞

m –1 0 1 2 3 4 y 2 (n) = x 2(n) ∗ h(n) = ∑


m = −∞
x 2(m) h(n − m)

x2(m) 2 –2 +∞

h(m) –1 1
= ∑ x (m) h (m)
m = −∞
2 n ; n = 2, 3, 4

where hn (m) = h(n – m)


h(–m) 1 –1
h(2 – m) = h2(m) 1 –1 When n = 2 ; y 2(2) =∑ x (m) h (m) = 0 − 2 + 0 = −2
2 2

h(3 – m) = h3(m) 1 –1 When n = 3 ; y (3) = ∑ x (m) h (m) = 2 + 2


2 = 4
2 3

h(4 – m) = h4(m) 1 –1 When n = 4 ; y (4) = ∑ x (m) h (m) = 0 − 2 + 0 = −2


2 2 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

where hn (m) = h(n – m)


When n = 4 ; y3(4) = ∑ x (m) h (m) = 0 − 3 + 0 = −3
3 4

When n = 5 ; y (5) = ∑ x (m) h (m) = 3 + 3


3 3 = 6 5

When n = 6 ; y (6) = ∑ x (m) h (m) = 0 − 3 + 0 = −3


3 3 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

where hn (m) = h(n − m)

∑ x (m) h (m) = 0 − 4 + 0 = −4
When n = 6 ; y 4 (6) = 4 6

When n = 7 ; y (7) = ∑ x (m) h (m) = 4 + 4


4 4 7 = 8
When n = 8 ; y (8) = ∑ x (m) h (m) = 0 − 4 + 0 = −4
4 4 8

To Combine the Output of 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 this method the overall output is obtained by combining the outputs of the convolution of all
sections. The overlapped portions (or samples) are added while combining the output. The output of all sections
can be represented in a table as shown below. Then the samples corresponding to same value of n are added to
get the overall output.
n 0 1 2 3 4 5 6 7 8
y1(n) –1 2 –1
y2(n) –2 4 –2
y3(n) –3 6 –3
y4(n) –4 8 –4
y(n) –1 2 –3 4 –5 6 –7 8 –4

\ y(n) = x(n) * h(n) = {–1, 2, –3, 4, –5, 6, –7, 8, –4}

b) Overlap Save Method


In this method, the longer sequence is sectioned into sequences of size equal to smaller sequence. The
number of samples that will be obtained in the output of linear convolution of each section is determined. Then
each section of longer sequence is converted to the size of output sequence using the samples of original longer
sequence. The smaller sequence is also converted to the size of output sequence by appending with zeros. Then
the circular convolution of each section is performed.
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, –1, 2, –2, 3, –3, 4, –4}
Let x(n) be sectioned into four sequences, each consisting of two samples of x(n) as shown below.
x1(n) = 1 ; n = 0 x2(n) = 2 ; n = 2 x3(n) = 3 ; n=4 x4(n) = 4 ; n=6
= –1 ; n = 1 = –2 ; n = 3 = –3 ; n=5 = –4 ; n = 7
Let y1(n), y2(n), y3(n) and y4(n) be the output of linear convolution of x1(n), x2(n), x3(n) and x4(n) with h(n)
respectively. Here linear convolution of each section will result in an output sequence consisting of
2 + 2 – 1 = 3 samples.
The sequence h(n) is converted to 3-sample sequence by appending with zero. \ h(n) = {–1, 1, 0}
Method - 1
In method 1, the overlapping samples are placed at the beginning of the sections. Each section of longer
sequence is converted to 3-sample sequences, using the samples of original longer sequence as shown below.
It can be observed that the first sample of x2(n) is placed as overlapping sample at the end of x1(n). The first sample
of x3(n) is placed as overlapping sample at the end of x2(n). The first sample of x4(n) is placed as overlapping
sample at the end of x3(n). Since there is no fifth section, the overlapping sample of x4(n) is taken as zero.
x1(n) = 1 ; n = 0 x2(n) = 2 ; n = 2 x3(n) = 3 ; n = 4 x4(n) = 4 ; n = 6
= –1 ; n = 1 = –2 ; n = 3 = –3 ; n = 5 = –4 ; n = 7
= 2; n=2 = 3 ; n=4 = 4; n=6 = 0 ;n=8
2. 87 Digital Signal Processing
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.
Here h(n) starts at n = nh = 0
x1(n) starts at n = n1 = 0, \ y1(n) will start at n = n1 + nh = 0 + 0 = 0
x2(n) starts at n = n2 = 2, \ y2(n) will start at n = n2 + nh = 2 + 0 = 2
x3(n) starts at n = n3 = 4, \ y3(n) will start at n = n3 + nh = 4 + 0 = 4
x4(n) starts at n = n4 = 6, \ y4(n) will start at n = n4 + nh = 6 + 0 = 6

Note : 1. Here N1 = 8, N2 = 2, N3 = 2. \ (N2 – 1) = 2 – 1 = 1 and (N2 + N3 – 1) = 2 + 2 – 1 = 3


2. The boldfaced numbers in the tables are obtained by periodic extension.
3. For convenience of convolution operation, the index n in x1(n), x2(n), x3(n), x4(n) and h(n)
are replaced by m.
mf
Convolution of Section 1 y1(n) = x1(n) ∗ h(n) = ∑
m = mi
x1(m) h((n − m))N
m –2 –1 0 1 2 2

x1(m) 1 –1 2 = ∑ x (m) h (m) ;


m = 0
1 n n = 0, 1, 2,

h(m) –1 1 0 where hn (m) = h((n − m))N


h((–m))3 = h0(m) 0 1 –1 0 1 When n = 0 ; y1(0) = ∑ x (m) h (m) = −1 + 0 + 2 = 1
1 0

h((1 – m))3 = h1(m) 0 1 –1 0 When n = 1 ; y (1) = ∑ x (m) h (m) = 1+ 1+ 0 = 2


1 1 1

h((2 – m))3 = h2(m) 0 1 –1 When n = 2 ; y (2) = ∑ x (m) h (m) = 0 − 1 − 2 = −3


1 1 2

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

where hn (m) = h((n − m))N


When n = 2 ; y 2(2) =∑ x (m) h (m) = −2 + 0 + 3 = 1
2 2

When n = 3 ; y (3) = ∑ x (m) h (m) = 2 + 2 + 0 = 4


2 2 3

When n = 4 ; y (4) = ∑ x (m) h (m) = 0 + −2 − 3 = −5


2 2 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

where hn (m) = h((n − m))N


Chapter 2 - Discrete Time Signals and Systems 2. 88
m –2 –1 0 1 2 3 4 5 6
x3(m) 3 –3 4
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

When n = 4 ; y3(4) = ∑ x (m) h (m) = −3 + 0 + 4 = 1


3 4

When n = 5 ; y (5) = ∑ x (m) h (m) = 3 + 3 + 0 = 6


3 3 5

When n = 6 ; y (6) = ∑ x (m) h (m) = 0 − 3 − 4 = −7


3 3 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

where hn (m) = h((n – m))N

∑ x (m) h (m) = −4 + 0 + 0 = −4
When n = 6 ; y 4 (6) = 4 6

When n = 7 ; y (7) = ∑ x (m) h (m) = 4 + 4 + 0 = 8


4 4 7

When n = 8 ; y (8) = ∑ x (m) h (m) = 0 − 4 + 0 = −4


4 4 8

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 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

y(n) = x(n) * h(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.

x1(n) = 1 ; n = 0 x2(n) = 2 ; n = 2 x3(n) = 3 ; n=4 x4(n) = 4 ; n = 6

= –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.

Here h(n) starts at n = nh = 0

x1(n) starts at n = n1 = 0, \ y1(n) will start at n = n1 + nh = 0 + 0 = 0

x2(n) starts at n = n2 = 2, \ y2(n) will start at n = n2 + nh = 2 + 0 = 2

x3(n) starts at n = n3 = 4, \ y3(n) will start at n = n3 + nh = 4 + 0 = 4

x4(n) starts at n = n4 = 6, \ y4(n) will start at n = n4 + nh = 6 + 0 = 6

Note : 1. Here N1 = 8, N2 = 2, N3 = 2. \ (N2 – 1) = 2 – 1 = 1 and (N2 + N3 – 1) = 2 + 2 – 1 = 3


2. The boldfaced numbers in the tables are obtained by periodic extension.
3. For convenience of convolution the index n is replaced by m in x1(n), x2(n), x3 (n), x4 (n) and h(n).
mf
Convolution of Section 1
y1(n) = x1(n) ∗ h(n) = ∑
m = mi
x1(m) h((n − m))N
m –2 –1 0 1 2
2
x1(m) 1 –1 0 = ∑ x (m) h (m) ;
m = 0
1 n n = 0, 1, 2
h(m) –1 1 0
where hn (m) = h((n − m))N
h((–m))3 = h0(m) 0 1 –1 0 1
When n = 0 ; y1(0) = ∑ x (m) h (m) = −1 + 0 + 0 = –1
1 0
h((1 – m))3 = h1(m) 0 1 –1 0
When n = 1 ; y (1) = ∑ x (m) h (m) = 1+ 1 + 0 = 2
1 1 1
h((2 – m))3 = h2(m) 0 1 –1
When n = 2 ; y (2) = ∑ x (m) h (m) = 0 − 1 + 0 = −1
1 1 2
Convolution of Section 2

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,

where hn (m) = h((n − m))N


When n = 2 ; y 2(2) =∑ x 2 (m) h2(m) = −2 + 0 − 1 = – 3
When n = 3 ; y (3) = ∑ x (m) h (m) =
2 2 3 2+ 2+ 0 = 4
When n = 4 ; y (4) = ∑ x (m) h (m) =
2 2 4 0 − 2 + 1 = −1

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

where hn (m) = h((n − m))N


When n = 4 ; y3(4) = ∑ x3(m) h4 (m) = −3 + 0 − 2 = –5
When n = 5 ; y (5) = ∑ x (m) h (m) =
3 3 5 3 +3+ 0 = 6
When n = 6 ; y (6) = ∑ x (m) h (m) =
3 3 6 0 − 3 + 2 = −1

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

where hn (m) = h((n – m))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 N2–1 samples.
y(n) –1 2 –3 4 –5 6 –7 8 *

\ y(n) = x(n) * h(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.

x(n) = {1, 2, 3, –1, –2, –3, 4, 5, 6} and h(n) = {2, 1, –1}

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.

x1(n) = 1 ; n = 0 x2(n) = –1 ; n = 3 x3(n) = 4 ; n = 6


=2;n=1 = –2 ; n = 4 =5;n=7
=3;n=2 = –3 ; n = 5 =6;n=8

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.

Here h(n) starts at n = nh = 0

x1(n) starts at n = n1 = 0, \ y1(n) will start at n = n1 + nh = 0 + 0 = 0


x2(n) starts at n = n2 = 3, \ y2(n) will start at n = n2 + nh = 3 + 0 = 3
x3(n) starts at n = n3 = 6, \ y3(n) will start at n = n3 + nh = 6 + 0 = 6
Here linear convolution of each section is performed between two sequences each consisting of three
samples. Hence each convolution output will consists of 3 + 3 – 1 = 5 samples. The convolution of each section
is performed by tabular method as shown below.

Note : 1.Here N1 = 9, N2 = 3, N3 = 3, \ (N2 – 1) = 3 – 1 = 2 and (N2 + N3 – 1) = 3 + 3 – 1 = 5.


2.The unfilled boxes in the table are considered as zero.
3.For convenience of convolution operation, the index n is replaced by m in x1(n), x2(n), x3(n)
and h(n).
Chapter 2 - Discrete Time Signals and Systems 2. 92
Convolution of Section 1

m –2 –1 0 1 2 3 4
+∞

x1(m) 1 2 3 y1(n) = x1(n) ∗ h(n) = ∑ x (m) h(n − m)


m = −∞
1

h(m) 2 1 –1 +∞

h(–m) = h0(m) –1 1 2
= ∑ x (m) h (m)
m = −∞
1 n

h(1 – m) = h1(m) –1 1 2 for n = 0, 1, 2, 3, 4


where hn (m) = h(n − m)
h(2 – m) = h2(m) –1 1 2
h(3 – m) = h3(m) –1 1 2
h(4 – m) = h4(m) –1 1 2

When n = 0 ; y1(0) = å x (m) h (m) = 0 + 0 + 2 + 0 + 0 = 2


1 o

When n = 1 ; y (1) = å x (m) h (m) = 0 + 1 + 4 + 0


1 1 1
= 5
When n = 2 ; y (2) = å x (m) h (m) = –1 + 2 + 6
1 1 2
= 7
When n = 3 ; y (3) = å x (m) h (m) = 0 – 2 + 3 + 0
1 1 3
= 1
When n = 4 ; y (4) = å x (m) h (m) = 0 + 0 – 3 + 0 + 0 = –3
1 1 4

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

where hn (m) = h(n − m)

∑ x (m) h (m) = 0 + 0 − 2 + 0 + 0 = –2
When n = 3 ; y 2 (3) = 2 3

When n = 4 ; y (4) = ∑ x (m) h (m) = 0 − 1 − 4 + 0


2 2 4= −5
When n = 5 ; y (5) = ∑ x (m) h (m) = 1 − 2 − 6
2 2 5= −7
When n = 6 ; y (6) = ∑ x (m) h (m) = 0 + 2 − 3 + 0
2 2 6= −1
When n = 7 ; y (7) = ∑ x (m) h (m) = 0 + 0 + 3 + 0 + 0 = 3
2 2 7
2. 93 Digital Signal Processing
Convolution of Section 3
m –2 –1 0 1 2 3 4 5 6 7 8 9 10
x3(m) 4 5 6
h(m) 2 1 –1
h(–m) = h0(m) –1 1 2
h(6 – m) = h6(m) –1 1 2
h(7 – m) = h7(m) –1 1 2
h(8 – m) = h8(m) –1 1 2
h(9 – m) = h9(m) –1 1 2
h(10 – m) = h10(m) –1 1 2
∞ ∞
y3(n) = x3(n) ∗ h(n) = ∑ x (m) h(n − m) = ∑ x (m) h (m) ;
m = –∞
3
m = –∞
3 n n = 6, 7, 8, 9, 10

where hn (m) = h(n − m)


When n = 6 ; y3 (6) =∑ x (m) h (m) = 0 + 0 + 8 + 0 + 0 = 8
3 6

When n = 7 ; y (7) = ∑ x (m) h (m) = 0 + 4 + 10 + 0


3 3 7 = 14
When n = 8 ; y (8) = ∑ x (m) h (m) = –4 + 5 + 12
3 3 8 = 13
When n = 9 ; y (9) = ∑ x (m) h (m) = 0 – 5 + 6 + 0
3 3 9 = 1
When n = 10 ; y (10) = ∑ x (m) h (m) = 0 + 0 – 6 + 0 + 0 = – 6
3 3 10

To Combine the Output of the Convolution of Each Section


It can be observed that the last N2 – 1 sample in an output sequence overlaps with the first N2 – 1 sample
of next output sequence. In this method, the overall output is obtained by combining the outputs of the convolution
of all sections. The overlapped portions (or samples) are added while combining the output.
The output of all sections can be represented in a table as shown below. Then the samples corresponding
to same value of n are added to get the overall output.
n 0 1 2 3 4 5 6 7 8 9 10
y1(n) 2 5 7 1 –3
y2(n) –2 –5 –7 –1 3
y3(n) 8 14 13 1 –6
y(n) 2 5 7 –1 –8 –7 7 17 13 1 –6

\ y(n) = x(n) * h(n) = {2, 5, 7, –1, –8, –7, 7, 17, 13, 1, – 6}


b) Overlap Save Method
In this method the longer sequence is sectioned into sequences of size equal to smaller sequence. The
number of samples that will be obtained in the output of linear convolution of each section is determined. Then
each section of longer sequence is converted to the size of output sequence using the samples of original longer
sequences. The smaller sequence is also converted to the size of output sequence by appending with zeros.
Then the circular convolution of each section is performed.
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) be sectioned into three sequences each consisting of three samples as shown below.
Let, N1 = Length of longer sequence
N2 = Length of smaller sequence
N3 = N2 = Length of each section of longer sequence.
Chapter 2 - Discrete Time Signals and Systems 2. 94
x1(n) = 1 ; n = 0 x2(n) = –1 ; n = 3 x3(n) = 4 ; n = 6
=2;n=1 = –2 ; n = 4 =5;n=7
=3;n=2 = –3 ; n = 5 =6;n=8
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.
Here linear convolution of each section will result in an output sequence consisting of 3 + 3 – 1 = 5 samples.
Hence each section of longer sequence is converted to five sample sequence, using the samples of
original longer sequence as shown below. It can be observed that the first N2 – 1 samples of x2(n) is placed as
overlapping sample at the end of x1(n). The first N2 – 1 samples of x3(n) is placed as overlapping sample at the end
of x2(n). Since there is no fourth section, the overlapping samples of x3(n) are considered as zeros.
x1(n) = 1 ; n = 0 x2(n) = –1 ; n = 3 x3(n) = 4 ; n = 6
= 2;n=1 = –2 ; n = 4 =5;n=7
= 3;n=2 = –3 ; n = 5 =6;n=8
= –1 ; n = 3 = 4; n=6 =0;n=9
= –2 ; n = 4 = 5; n=7 = 0 ; n = 10
The sequence h(n) is also converted to five sample sequence by appending with zeros.
\ h(n) = {2, 1, –1, 0, 0}
Now perform circular convolution of each section with h(n). The output sequence obtained from circular
convolution will have five samples. The circular convolution of each section is performed by tabular method as
shown below.
Here h(n) starts at n = nh = 0
x1(n) starts at n = n1 = 0, \ y1(n) will start at n = n1 + nh = 0 + 0 = 0
x2(n) starts at n = n2 = 3, \ y2(n) will start at n = n2 + nh = 3 + 0 = 3
x3(n) starts at n = n3 = 6, \ y3(n) will start at n = n3 + nh = 6 + 0 = 6

Note : 1. Here N1 = 9, N2 = 3, N3 = 3 \ (N2 – 1) = 3 – 1 = 2 and [N2 + N3 – 1] = 3 + 3 – 1 = 5 samples.


2. The boldfaced numbers in the table are obtained by periodic extension.
3. For convenience of convolution operation the index n is replaced by m in x1(n), x2(n), x3(n) and h(n).
Convolution of Section 1

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

where hn (m) = h((n − m))N


2. 95 Digital Signal Processing

When n = 0 ; y1(0) = å x (m)h (m) = 2 + 0 + 0 + 1 – 2 = 1


1 o

When n = 1 ; y (0) = å x (m)h (m) = 1 + 4 + 0 + 0 + 2 = 7


1 1 1

When n = 2 ; y (2) = å x (m)h (m) = –1 + 2 + 6 + 0 + 0 = 7


1 1 2

When n = 3 ; y (3) = å x (m)h (m) = 0 – 2 + 3 – 2 + 0 = – 1


1 1 3

When n = 4 ; y (4) = å x (m)h (m) = 0 + 0 – 3 – 1 – 4 = – 8


1 1 4

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

where hn (m) = h((n − m))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

When n = 5 ; y (5) = ∑ x (m) h (m) = 1 − 2 − 6 + 0 + 0 = − 7


2 2 5

When n = 6 ; y (6) = ∑ x (m) h (m) = 0 + 2 − 3 + 8 + 0 = 7


2 2 6

When n = 7 ; y (7) = ∑ x (m) h (m) = 0 + 0 + 3 + 4 + 10 = 17


2 2 7

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

where hn (m) = h((n − m))N


Chapter 2 - Discrete Time Signals and Systems 2. 96

When n = 6 ; y3 (6) = ∑ x (m) h (m) = 8 + 0 + 0 + 0 + 0 = 8


3 6

When n = 7 ; y (7) = ∑ x (m) h (m) = 4 + 10 + 0 + 0 + 0 = 14


3 3 7

When n = 8 ; y (8) = ∑ x (m) h (m) = – 4 + 5 + 12 + 0 + 0 = 13


3 3 8

When n = 9 ; y (9) = ∑ x (m) h (m) = 0 – 5 + 6 + 0 + 0 = 1


3 3 9

When n = 10 ; y (10) = ∑ x (m) h (m) = 0 + 0 – 6 + 0 + 0


3 3 10 = –6
To Combine the Output of Convolution of Each Section
It can be observed that the last N2–1 samples in an output sequence overlaps with the first N2–1 samples
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 N2–1 samples 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 9 10
y1(n) 1 7 7 –1 –8
y2(n) –1 10 –7 7 17
y3(n) 8 14 13 1 –6
y(n) * * 7 –1 –8 –7 7 17 13 1 –6

\ 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.

2.12 Inverse System and Deconvolution


2.12.1 Inverse System
The inverse system is used to recover the input from the response of a system. For a given system, the
inverse system exists, if distinct inputs to a system leads to distinct outputs. The inverse systems exists for
all LTI systems.
The inverse system is denoted by H–1. If x(n) is input and y(n) is the output of a system, then y(n) is
the input and x(n) is the output of its inverse system.
x (n) y (n) y (n) w (n) = x(n)
H H −1

F ig 2.3 5 a : System . F ig 2.3 5 b : In verse system .


F ig 2.3 5 : A system and its inverse system .

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)

F ig 2.3 6 : C a sca d e co n n ectio n o f a system a n d its in v erse.


2. 97 Digital Signal Processing
Now it can be proved that,
h(n) * h¢(n) = d(n) .....(2.60)
Therefore the cascade of a system and its inverse is identity system.
Proof :
With reference to fig 2.36 we can write,
y(n) = x(n) * h(n) .....(2.61)
w(n) = y(n) * h¢(n) .....(2.62)
On substituting for y(n) from equation (2.61) in equation (2.62) we get,
w(n) = x(n) * h(n) * h¢(n) .....(2.63)
In equation (2.63),
if, h(n) * h¢(n) = d(n), then, x(n) * d(n) = x(n)
In a inverse system, w(n) = x(n), and so,

h(n) * h¢(n) = d(n). Hence proved.

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.

h(0) h(1) h(2) h(3)

x(0) x(0)h(0) x(0)h(1) x(0)h(2) x(0)h(3)

x(1) x(1)h(0) x(1)h(1) x(1)h(2) x(1)h(3)

x(2) x(2)h(0) x(2)h(1) x(2)h(2) x(2)h(3)

x(3) x(3)h(0) x(3)h(1) x(3)h(2) x(3)h(3)


Chapter 2 - Discrete Time Signals and Systems 2. 98
From the above two-dimensional array we can write,

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,

y(n) − x(0) h(n) − x(1) h(n − 1) − ...... − x(n − 1) h(1)


x( n) =
h(0)
1 LM n−1 O
∴ x(n) =
h(0)
y(n) −
MN ∑ x(m) h(n − m)PP
m =0 Q
Example 2.30
n
A discrete time system is defined by the equation, y(n) = ∑
m =0
x(m) ; for n ≥ 0. Find the inverse system.

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,

From the above analysis we can write,

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,

x(n) = y(n) – y(n –1)

Therefore the inverse system is defined by the equation,

x(n) = y(n) – y(n –1)

­
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,

1 LMy(n) − x(m) h(n − m)OP


n − 1
x(n) =
h(0) MN ∑m=0 PQ
y(0) 2
When n = 0 ; x(0) = = =1
h(0) 2
1 LMy(1) − x(m) OP
When n = 1 ; x(1) =
h(0) MN ∑
m=0
h(1 − m)
PQ
1 1
= y(1) − x(0) h(1) = 5 − 1× 1 = 2
h(0) 2
1 LMy(2) − x(m) h(2 − m) OP
1
When n = 2 ; x(2) =
h(0) MN ∑
m =0 PQ
1 1
= y(2) − x(0) h(2) − x(1) h(1) = 11 − 1 × 3 − 2 × 1 = 3
h(0) 2
1 LMy(3) − x(m) h(3 − m) OP
2
When n = 3 ; x(3) =
h(0) MN ∑
m=0 PQ
1 1
= y(3) − x(0) h(3) − x(1) h(2) − x(2) h(1) = 17 − 1 × 0 − 2 × 3 − 3 × 1 = 4
h(0) 2
∴ x(n) = {x(0), x(1), x(2), x(3)} = {1, 2, 3, 4}
A

2.13 Correlation, Crosscorrelation and Autocorrelation


The correlation of two discrete time sequences x(n) and y(n) is defined as,
+∞
.....(2.65)
rxy (m) = ∑ x(n) y(n − m)
n = −∞
where rxy(m) is the correlation sequence obtained by correlation of x(n) and y(n) and m is the variable used
for time shift. The correlation of two different sequences is called crosscorrelation and the correlation of a
sequence with itself is called autocorrelation. Hence autocorrelation of a discrete time sequence is defined as,
+∞
rxx (m) = ∑ x(n) x(n − m) .....(2.66)
n = −∞
If the sequence x(n) has N1 samples and sequence y(n) has N2 samples then the crosscorrelation
sequence rxy(m) will be a finite duration sequence consisting of N1 + N2 – 1 samples.If the sequence x(n) has
N samples, then and the autocorrelation sequence rxx(m) will be a finite duration sequence consisting of
2N – 1 samples.
Chapter 2 - Discrete Time Signals and Systems 2. 100
In the equation (2.65), the sequence x(n) is unshifted and the sequence y(n) is 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 shifted opposite to that of earlier case by m units of time, hence the crosscorrelation
operation can also be expressed as,
+∞
.....(2.67)
rxy (m) = ∑ x(n + m) y(n)
n = −∞

2.13.1 Procedure for Evaluating Correlation


Let, x(n) = Discrete time sequence with N1 samples
y(n) = Discrete time sequence with N2 samples
Now the correlation of x(n) and y(n) will produce a sequence rxy(m) consisting of N1+N2–1 samples.
Each sample of rxy(m) can be computed using the equation (2.65). The value of rxy(m) at m = q is obtained by
replacing m by q, in equation (2.65).
+∞
.....(2.68)
∴ rxy (q) = ∑ x(n) y(n − q)
n = −∞

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,

rxy (m) ≤ rxx ( 0) ryy ( 0) = Ex Ey

where, Ex and Ey are energy of x(n) and y(n) respectively.


On applying the above condition to autocorrelation sequence we get,
rxx (m) ≤ rxx (0) = E x

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)

Methods of Computing Correlation


Method 1: Graphical Method
Let x(n) and y(n) be the input sequences and rxy(m) be the output sequence.
1. Sketch the graphical representation of the input sequences x(n) and y(n).
2. Shift the sequence y(n) to the left graphically so that the product of x(n) and shifted y(n) gives
only one nonzero sample. Now multiply x(n) and shifted y(n) to get a product sequence, and then
sum up the samples of product sequence, which is the first sample of output sequence.
3. To get the next sample of output sequence, shift y(n) of previous step to one position right
and multiply the shifted sequence with x(n) to get a product sequence. Now the sum of the
samples of product sequence gives the second sample of output sequence.
4. To get subsequent samples of output sequence, the step 3 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 and
shifted sequence is represented on a row in a table.
Chapter 2 - Discrete Time Signals and Systems 2. 102
Method 3: Matrix Method
Let x(n) and y(n) be the input sequences and rxy(m) be the output sequence. We know that the
convolution of x(n) and folded sequence y(-n) will generate the crosscorrelation sequence rxy(m). Hence fold
y(n) to get y(-n), and compute convolution of x(n) and y(-n) by matrix method.
In matrix method one of the sequence is represented as a row and the other as a column as shown
below.
y (0) y (−1 ) y (−2 ) y (−3 )

x (0) x (0)y(0) x (0)y( −1) x (0)y( −2) x (0)y( −3)

x (1) x (1)y(0) x (1)y( −1) x (1)y( −2) x (1)y( −3)

x (2) x (2)y(0) x (2)y( −1) x (2)y( −2) x (2)y( −3)

x (3) x (3)y(0) x (3)y( −1) x (3)y( −2) x (3)y( −3)

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 = −∞

The x(n) starts at n = 0 and has 4 samples.


2. 103 Digital Signal Processing
\ n1 = 0, N1 = 4
The y(n) starts at n = 0 and has 3 samples.
\ n2 = 0, N2 = 3
Now, rxy(m) will have N1 + N2 – 1 = 4 + 3 – 1 = 6 samples.
The initial value of m = mi = n1 – (n2 + N2 –1)
= 0 – (0 + 3 – 1) = – 2
The final value of m = mf = mi + (N1 + N2 – 2)
= –2 + (4 + 3 – 2) = 3
In this example the correlation operation is performed by three methods.
Method 1 : Graphical Method
The graphical representation of x(n) and y(n) are shown below.

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

F ig 5 : C o m p u ta tio n o f rxy (0 ). v 0 (n ) g ive s rx y (0)


∴ rx y (0) = 1 + 0 .5 + 2 + 0 = 3.5
+∞ +∞ +∞
When m = 1 ; rxy (1) = ∑
n = −∞
x(n) y(n − 1)) = ∑
n = −∞
x(n) y1(n) = ∑
n = −∞
v1(n)

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)) = y–2(n) 1 0.5 1
y(n –(–1)) = y–1(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

Note: The unfilled boxes in the table are considered as zeros.


Each sample of rxy(m) is given by,
+∞ +∞
rxy (m) = ∑
n = −∞
x(n) y(n − m) = ∑
n = −∞
x(n) y m (n) ; where ym (n) = y(n − m)

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

∴ Crosscorrelation sequence, rxy (m) = {1, 1.5, 3.5, 4, 3, 2}


A
Chapter 2 - Discrete Time Signals and Systems 2. 106
Method 3: Matrix Method
Given that, x(n) = {1, 1, 2, 2} ; y(n) = {1, 0.5, 1} ; \ y(–n) = {1, 0.5, 1}
- - -
The sequence x(n) is arranged as a column and the folded sequence y(–n) is arranged as a row as shown
below. The elements of the two-dimensional array are obtained by multiplying the corresponding row element
with column element. The sum of the diagonal elements gives the samples of the crosscorrelation sequence,
rxy(m).

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

rxy (–2) = 1 ; rxy (–1) = 1 + 0.5 = 1.5 ; rxy(0) = 2 + 0.5 + 1 = 3.5


rxy(1) = 2 + 1 + 1 = 4 ; rxy(2) = 1 + 2 = 3 ; rxy(3) = 2
\ rxy(m) = {1, 1.5, 3.5, 4, 3, 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)

The x(n) starts at n = 0 and has 4 samples.


\ nx = 0 and N = 4
Now, rxx(m) will have, 2N – 1 = 2 ´ 4 – 1 = 7 samples.
The initial value of m = mi = – (N – 1) = – (4 – 1) = –3
The final value of m = mf = mi + (2N – 2) = –3 + (2 ´ 4 – 2) = 3
The autocorrelation is computed by tabular method. Hence the sequence x(n) and the shifted sequences
of x(n) are tabulated in the following table.

n –3 –2 –1 0 1 2 3 4 5 6
x(n) 1 2 3 4
x(n –(–3)) = x–3(n) 1 2 3 4
x(n –(–2)) = x–2(n) 1 2 3 4
x(n –(–1)) = x–1(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

∴ Autocorrelation sequence, rxx (m ) = {4, 11, 20, 30, 20, 11, 4}


A
2.14 Circular Correlation
The circular correlation of two periodic discrete time sequences x(n) and y(n) with periodicity of N
samples is defined as,
N−1
rxy (m) = ∑ x(n) y* ((n − m))
n=0
N
.....(2.70)

where, rxy ( m) is the sequence obtained by circular correlation


y*((n – m))N represents circular shift of y*(n)
m is a variable used for circular time shift
The circular correlation of two different sequences is called circular crosscorrelation and the circular
correlation of a sequence with itself is called circular autocorrelation. Hence circular autocorrelation of a
discrete time sequence is defined as,
N−1
rxx ( m) = ∑ x( n) x* ((n − m))
n=0
N
.....(2.71)

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 value of rxy ( m) at m = q is obtained by replacing m by q, in equation (2.70), as shown below.


N−1
rxy (q ) = ∑ x( n) y* ((n − q))
n=0
N
.....(2.73)

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

2.14.2 Methods of Computing Circular Correlation


Method 1 : Graphical Method
In graphical method the given sequences are converted to same size and represented on circles. In
case of periodic sequences, the samples of one period are represented on circles. 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) on circles.
2. Rotate (or shift) the sequence y(n), q times to get the sequence y((n – q))N. If q is positive then
rotate (or shift) the sequence in anticlockwise direction and if q is negative then rotate (or shift)
the sequence in clockwise direction.

3. 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.

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 (2) = 2 x (n) x (0) = 1 y(2) = 1 y (n) y (0) = 2

x (3) = 1 y (3) = 1
F ig 1. F ig 2.
3 2 1 1

y ((n −0))4 y ((n −1) ) 4 y ((n −2) ) 4 y ((n −3) ) 4


1 2 ⇒ 3 1 ⇒ 2
= y 2 (n)
1 ⇒1 3
= y 0 (n) = y 1 (n) = y 3 (n)

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

T h e s um of s am ple s o f v 0 (n) giv es rxy (0 )


F ig 4 : C om p u tation o f rxy (0 ).
∴ rx y (0 ) = 2 + 3 + 2 + 1 = 8
2. 111 Digital Signal Processing
3 3 3
When m = 1 ; rxy (1) = ∑ x(n) y((n − 1))
n = 0
4 = ∑ x(n) y (n) = ∑ v (n)
n = 0
1
n = 0
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

T h e s um of s a m p le s o f v 1(n ) g ive s rx y (1)


F ig 5 : C o m p u ta tio n of rxy (1 ).
∴ rxy (1) = 1 + 2 + 6 + 1 = 10

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

2 x (n) 1 X 1 y 3 (n) 3 ⇒ 2 ×1 = 2 v 3 (n) 1 ×3 = 3

1 2 1 ×2 = 2

T h e s um of s am ple s o f v 3 (n) g iv e s rxy (3)


F ig 7 : C o m p uta tio n o f rxy (3 ).
∴ rx y (3) = 3 + 1 + 2 + 2 = 8

\ rxy (m) = {8, 10, 9, 8}


Method 2 : Circular Correlation Using Tabular Array

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

Note : The boldfaced numbers are samples obtained by periodic extension.


Chapter 2 - Discrete Time Signals and Systems 2. 112

n 0 1 2 3 4 5 6

x(n) 1 1 2 1

y(n) 2 3 1 1

y0((n – 0))4 = y0(n) 2 3 1 1 2 3 1

y1((n – 1))4 = y1(n) 1 2 3 1 1 2 3

y2((n – 2))4 = y2(n) 1 1 2 3 1 1 2

y3((n – 3))4 = y3(n) 3 1 1 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)

= x(0) y 0 (0) + x(1) y 0 (1) + x(2) y 0 (2) + x(3) y 0 (3)


= 1× 2 + 1× 3 + 2 × 1+ 1× 1 = 2 + 3 + 2 + 1 = 8

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).

LMy(0) y(1) y(2) y(3) OP LMx(0)OP LMr xy (0) OP


MMy(3) y(0) y(1) y(2)P MMx(1) PP =
MMrxy (1) P
y(1) P (2) PP
MMy(y(12)) y(3)
y(2)
y(0)
y(3) y(0)PQ
P MMx(x(32))PP MMr
xy

(3) PQ
N N Q Nr
xy

LM2 3 1 1OP LM1OP LM8 OP


MM1 2 3 1 PP MM1PP = MM10PP
MMN13 11 2
1
3
2
PPQ MMN12PPQ MMN98 PPQ
\ rxy (m) = {8, 10, 9, 8}
-
2. 113 Digital Signal Processing

2.15. Summary of Important Concepts


1. The discrete signal is a function of a discrete independent variable.
2. In a discrete time signal, the value of discrete time signal and the independent variable time are discrete.
3. The digital signal is same as discrete signal except that the magnitude of the signal is quantized.
4. A discrete time sinusoid is periodic only if its frequency is a rational number.
5. Discrete time sinusoids whose frequencies are separated by an integer multiple of 2p are identical.
6. The sampling is the process of conversion of continuous time signal into discrete time signal.
7. The time interval between successive samples is called sampling time or sampling period.
8. The inverse of sampling period is called sampling frequency.
9. The phenomenon of high frequency component getting the identity of low-frequency component during
sampling is called aliasing.
10. For analog signal with maximum frequency Fmax, the sampling frequency should be greater than 2Fmax.
11. When sampling frequency Fs is equal to 2Fmax, the sampling rate is called Nyquist rate.
12. The signals that can be completely specified by mathematical equations are called deterministic signals.
13. The signals whose characteristics are random in nature are called nondeterministic signals.
14. A signal x(n) is periodic with periodicity of N samples if x(n + N) = x(n).
15. When a signal exhibits symmetry with respect to n = 0 then it is called an even signal.
16. When a signal exhibits antisymmetry with respect to n = 0, then it is called an odd signal.
17. When the energy E of a signal is finite and nonzero, the signal is called energy signal.
18. When the power P of a signal is finite and nonzero, the signal is called power signal.
19. For energy signals, the energy will be finite and average power will be zero.
20. For power signals the average power is finite and energy will be infinite.
21. A signal is said to be causal, if it is defined for n ³ 0.
22. A signal is said to be noncausal, if it is defined for both n ≤ 0 and n > 0.
23. A signal is said to be anticausal, if it is defined for n ≤ 0.
24. A discrete time system is a device or algorithm that operates on a discrete time signal.
25. When a system satisfies the properties of linearity and time invariance, it is called an LTI system.
26. When the input to a discrete time system is unit impulse d(n), the output is called impulse response, h(n).
27. In a static or memoryless system, the output at any instant n depends on input at the same time.
28. A system is said to be time invariant if its input-output characteristics do not change with time.
29. A linear system is one that satisfies the superposition principle.
30. A system is said to be causal if the output does not depends on future inputs/outputs.
31. When a system output at any time n depends on future inputs/outputs, it is called a noncausal system.
32. System is said to be BIBO stable if and only if every bounded input produces a bounded output.
33. When a system output at any time n depends on past outputs, it is called a recursive system.
34. A system whose output does not depends on past outputs is called a nonrecursive system.
35. The convolution of N1 and N2 sample sequences produce a sequence consisting of N1+N2–1 samples.
36. In an LTI system, response for an arbitrary input is given by convolution of input with impulse response.
37. The output sequence of circular convolution is also periodic sequence with periodicity of N samples.
38. The inverse system is used to recover the input from the response of a system.
39. The process of recovering the input from the response of a system is called deconvolution.
40. The correlation of two different sequences is called crosscorrelation.
41. The correlation of a sequence with itself is called autocorrelation.
Chapter 2 - Discrete Time Signals and Systems 2. 114

2.16. Short Questions and Answers


Q2.1 Perform addition of the discrete time signals, x1(n) = {2, 2, 1, 2} and x2(n) = {–2, –1, 3, 2}.
Solution

In addition operation, the samples corresponding to same value of n are added.


When n = 0, x1(0) + x2(0) = 2 + (–2) = 0 When n = 2, x1(2) + x2(2) = 1 + 3 = 4
When n = 1, x1(1) + x2(1) = 2 + (–1) = 1 When n = 3, x1(3) + x2(3) = 2 + 2 = 4
\ x1(n) + x2(n) = {0, 1, 4, 4}

Q2.2 Perform multiplication of discrete time signals, x1(n) = {2, 2, 1, 2} and x2(n) = {–2, –1, 3, 2}.
Solution

In multiplication operation, the samples corresponding to same value of n are multiplied.


When n = 0, x1(0) × x2(0) = 2 ×(–2) = –4 When n = 2, x1(2) × x2(2) = 1 × 3 = 3
When n = 1, x1(1) × x2(1) = 2 ×(–1) = –2 When n = 3, x1(3) × x2(3) = 2 × 2 = 4
\ x1(n) × x2(n) = {–4, –2, 3, 4}

Q2.3 Express the discrete time signal x(n) as a summation of impulses.


If we multiply a signal x(n) by a delayed unit impulse d(n – m), then the product is x(m), where x(m)
is the signal sample at n = m [because d(n – m) is 1 only at n = m and zero for other values of n].
Therefore, if we repeat this multiplication over all possible delays in the range –¥ < m < ¥ and sum
all the product sequences, then the result will be a sequence that is equal to the sequence x(n).
\ x(n) = ... x(–2) d(n + 2) + x(–1) d(n + 1) + x(0) d(n) + x(1) d(n – 1) + x(2) d(n – 2) + ...
+∞
= ∑ x(m) δ(n − m)
m =−∞

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)

F ig b : C o n sta nt m ultip lier. F ig c : U nit d ela y elem en t.


F ig a : A d d er.
2 4
Q2.5 Let, x(n) = {1, 2, 3, 4}, be one period of a periodic
sequence. What is x(n – 2, mod4)?
The x(n) can be represented on the circle as shown 3 x (n) 1 1 x (n − 2 , m od4) 3
in fig Q2.5a. The x(n – 2, mod4) is circularly shifted
sequence of x(n) by two units of time as shown in
fig Q2.5b.(Here, mod 4 stands for periodicity of 4). 4 2

\ x(n – 2, mod4) = {3, 4, 1, 2} F ig Q 2.5 a . F ig Q 2.5 b .


2. 115 Digital Signal Processing
Q2.6 Why linear convolution is important in digital signal processing ?
The response or output of an LTI discrete time system for any input x(n) is given by linear
convolution of the input x(n) and the impulse response h(n) of the system. (This means that if
the impulse response of a system is known, then the response of the system for any input can
be determined by convolution operation.)
Q2.7 In y(n) = x(n)* h(n), how will you determine the start and end point of y(n)? What will be
the length of y(n)?
Let, length of x(n) be N1 and starts at n = nx. Let, length of h(n) be N2 and starts at n = nh.
Now, y(n) will start at n = nx + nh
y(n) will end at n = (nx + nh) + (N1 + N2 – 2)
The length of y(n) is N1 + N2 – 1.
Q2.8 What is zero padding? Why is it needed?
Appending zeros to a sequence in order to increase the size or length of the sequence is called
zero padding.
In circular convolution, when the two input sequences are of different size, then they are
converted to equal size by zero padding.
Q2.9 List the differences between linear convolution and circular convolution.
Linear convolution Circular convolution
1. The length of the input sequence 1. The length of the input sequences
can be different should be same.
2. Zero padding is not required. 2. If the length of the input sequences are
different, then zero padding is required.
3. The input sequences need not be 3. Atleast one of the input sequence
periodic. should be periodic or should be
periodically extended.
4. The output sequence is nonperiodic. 4. The output sequence is periodic.
The periodicity is same as that of input
sequence.
5. The length of output sequence will 5. The length of the input and output
be greater than the length of input sequences are same.
sequences.

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

\ x3(n) = x1(n) * x2(n) = {31, 31, 28}.


Chapter 2 - Discrete Time Signals and Systems 2. 116
Q2.11 Perform the linear convolution of the two sequences x1(n) = {1, 2} and x2(n) = {3, 4} via circular
convolution.
Solution
Let x3(n) be the sequence obtained from linear convolution of x1(n) and x2(n). The length of
x3(n) will be 2 + 2 – 1 = 3. Let us convert x1(n) and x2(n) into three sample sequences by padding
with zeros as shown below.
x1(n) = {1, 2, 0} and x2(n) = {3, 4, 0}
Now the circular convolution of x1(n) and x2(n) will give x3(n). The sequence x1(n) is arranged as
a column vector and using the sequence x2(n), a 3 ´3 matrix is formed as shown below. The
product of the two matrices gives the sequence x3(n).
LMx (0)
2 x 2 (2) x 2 (1) OP LMx (0)OP LMx (0)OP
1 3 LM3 0 4 OP LM1OP LM 3 OP

MMNxx (1)
2
2 (2)
x 2 (0) x 2 (2)
x 2 (1)
P Mx (1)P = MMNxx (1)
1
x (0) PQ MN x (2) PQ
2 1
3
P
(2) PQ
3
MMN40 3 0
4
P M2P = MMN108PPQ
3PQ MN0PQ

\ x3(n) = x1(n) * x2(n) = {3, 10, 8}


Q2.12 Compare the overlap add and overlap save method of sectioned convolutions.
Overlap add method Overlap save method
1. Linear convolution of each section of 1. Circular convolution of each section of
longer sequence with smaller sequence longer sequence with smaller sequence
is performed. is performed. (after converting them to
the size of output sequence).
2. Zero padding is not required. 2. Zero padding is required to convert
the input sequences to the size of
output sequence.
3. Overlapping of samples of input 3. The N2–1 samples of an input section of
sections are not required. longer sequence is overlapped with next
input section.
4. The overlapped samples in the output 4. Depending on method of overlapping
of sectioned convolutions are added input samples, either last N2–1 samples
to get the overall output. or first N2–1 samples of output sequence
of each sectioned convolution are
discarded.

Q2.13 In what way zero padding is implemented in overlap save method?


In overlap save method, the zero padding is employed to convert the smaller input sequence to
the size of the output sequence of each sectioned convolution. The zero padding is also employed
to convert either the last section or the first section of the longer input sequence to the size of the
output sequence of each sectioned convolution. (This depends on the method of overlapping
input samples).
Q2.14 List the similarities and differences in convolution and correlation of two sequences.
Similarities
1. Both convolution and correlation operation involves shifting, multiplication and summation of
product sequence.
2. Both convolution and correlation operation produce same size of output sequence.
2. 117 Digital Signal Processing
Differences
1. Correlation operation does not involve change of index and folding of one of the input
sequence.
2. The convolution operation is commutative, [i.e., x(n) * y(n) = y(n) * x(n)], whereas in correlation
operation in order to satisfy commutative property, while performing correlation of y(n) and
x(n), the shifting has to performed in opposite direction to that of performing correlation of x(n)
and y(n).
Q2.15 Let rxy(m) be the correlation sequence obtained by correlation of x(n) and y(n), how will you
determine the start and end point of rxy(m)? What will be the length of rxy(m) ?
Let, length of x(n) be N1 and starts at n = n1. Let length of y(n) be N2 and starts at n = n2.
Now, rxy(m) will start at mi = n1 – (n2 + N2 – 1)
rxy(m) will end at mf = mi + (N1 + N2 – 2)
The length of rxy(m) is N1 + N2 – 1.
Q2.16 What are the differences between crosscorrelation and autocorrelation?
1. Crosscorrelation operation is correlation of two different sequences, whereas autocorrelation
is correlation of a sequence with itself.
2. Autocorrelation operation is an even function, whereas crosscorrelation is not an even function.
Q2.17 Perform the correlation of the two sequences, x(n) = {1, 2, 3} and y(n) = {2, 4, 1}.
Solution
Given that, x(n) = {1, 2, 3 } and y(n) = {2, 4, 1}. \ y(–n) = {1, 4, 2 }
- - -
The sequence x(n) is arranged as a column and the folded sequence y(–n) is arranged as a row as
shown below. The elements of the two dimensional array are obtained by multiplying
the corresponding row element with column element. The sum of the diagonal elements gives the
samples of the crosscorrelation sequence, rxy(m).
y(−n) y(−n)
x(n) 1 4 2 x(n) 1 4 2

1 1 ×1 1 ×4 1 ×2 1 1 4 2

2 2 ×1 2 ×4 2 ×2 2 2 8 4

3 3×1 3×4 3×2 3 3 12 6

rxy (–2) = 1 ; rxy (–1) = 2 + 4 = 6 ; rxy(0) = 3 + 8 + 2 = 13 ; rxy(1) = 12 +4 = 16 ; rxy(2) = 6 ;


\ rxy(m) = {1, 6, 13, 16, 6}
-
Q2.18 Perform the circular correlation of the two sequences, x(n) = {1, 2, 3} and y(n) = {2, 4, 1}.
Solution
Let rxy (m) be the sequence obtained from circular correlation of x(n) and y(n). The sequence x(n)
can be arranged as a column vector of order 3 ´1 and using the samples of y(n) a 3 ´3 matrix is
formed as shown below. The product of two matrices gives the sequence rxy (m).

LMy(0) y(1) y(2) OP LMx(0)OP LMrxy (0)


OP LM2 4 1 OP LM1OP LM13OP

MMNy(2)
y(1)
y(0) y(1)
y(2)
P Mx(1)P = MMrr
y(0) PQ MN x(2) PQ
xy (1)
(2) PQ
P MMN41 2 4
1
P M2P = MMN1712PPQ
2PQ MN 3PQ
N xy

\ rxy (m) = {13, 17, 12}


Chapter 2 - Discrete Time Signals and Systems 2.118
Q2.19 Perform circular autocorrelation of the sequence, x(n) = {1, 2, 3, 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.

2.17 MATLAB Programs


Program 2.1
Write a MATLAB program to generate the standard discrete time signals unit
impulse, unit step and unit ramp signals.

%******************* program to plot some standard signals

n=-20 : 1 : 20; %specify the range of n

%******************* unit impulse signal


x1=1;
x2=0;
x=x1.*(n==0)+x2.*(n~=0); %generate unit impulse signal
subplot(3,1,1);stem(n,x); %plot the generated unit impulse signal
xlabel(‘n’);ylabel(‘x(n)’);title(‘unit impulse signal’);

%******************* unit step signal


x1=1;
x2=0;
x=x1.*(n>=0)+x2.*(n<0); %generate unit step signal
subplot(3,1,2);stem(n,x); %plot the generated unit step signal
xlabel(‘n’);ylabel(‘x(n)’);title(‘unit step signal’);

%******************* unit ramp signal


x1=n;
x2=0;
x=x1.*(n>=0)+x2.*(n<0); %generate unit ramp signal
subplot(3,1,3);stem(n,x); %plot the generated unit ramp signal
xlabel(‘n’);ylabel(‘x(n)’);title(‘unit ramp signal’);
OUTPUT
The output waveforms of program 2.1 are shown in fig P2.1.
2. 119 Digital Signal Processing

F ig P 2 .1 : O u tp u t w av efo rm s o f pro g ra m 2 .1. F ig P 2 .2 : O u tp u t w av efo rm s o f pro g ra m 2 .2.

Program 2.2
Write a MATLAB program to generate the standard discrete time signals exponential
and sinusoidal signals.

%******************* program to plot some standard signals

n=-20 : 1 : 20; %specify the range of n

%******************* exponential signal


A=0.95;
x=A.^n; %generate exponential signal
subplot(2,1,1);stem(n,x); %plot the generated exponential signal
xlabel(‘n’);ylabel(‘x(n)’);title(‘exponential signal’);

%******************* sinusoidal signal


N=20; %declare periodicity
f=1/20; %compute frequency
x=sin(2*pi*f*n); %generate sinusoidal signal
subplot(2,1,2);stem(n,x); %plot the generated sinusoidal signal
xlabel(‘n’);ylabel(‘x(n)’);title(‘sinusoidal signal’);

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

n= -5 :1 :5; %specify the range of n


A=0.8;
x1=A.^n; %generate the given signal
x2=A.^(-n); %generate the folded signal
Chapter 2 - Discrete Time Signals and Systems 2.120
if(x2==x1)
disp(‘“The given signal is even signal”’);
else if (x2==(-x1))
disp(‘“The given signal is odd signal”’);
else
disp(‘“The given signal is neither even nor odd signal”’);
end
end

xe=(x1+x2)/2; %compute even part


xo=(x1-x2)/2; %compute odd part

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)’);

F ig P 2 .3 : O u tp u t w av efo rm s o f pro g ra m 2 .3. F ig P 2 .4 : O u tp u t w av efo rm s o f pro g ra m 2 .4.


OUTPUT

“The given signal is neither even nor odd signal”


The output waveforms of program 2.3 are shown in fig P2.3.

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.

Program to declare the given signal as function y(n)

% declare the given signal as function y(n)

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

Program to perform amplitude scaling and time shift on y(n)

%To Perform Amplitude scaling and Time shift on signal x(n)=1+n;


%for n= 0 to 2
%include y.m file in current work directory which declare given signal as
%function y(n)

n=-5:1:5; %specify range of n

y0 =y(n); %assign the given signal as y0


y1 =1.5*y(n); %compute the amplified version of x(n)
y2 =0.5*y(n); %compute the attenuated version of x(n)
y3 =y(n-2); %compute the delayed version of x(n)
y4 =y(n+2); %compute the advanced version of x(n)

%plot the given signal and amplitude scaled signal


subplot(2,3,1);stem(n,y0);
xlabel(‘n’);ylabel(‘x(n)’);title(‘Signal x(n)’);
subplot(2,3,2);stem(n,y1);
xlabel(‘n’);ylabel(‘x1(n)’);title(‘Amplified signal 1.5x(n)’);
subplot(2,3,3);stem(n,y2);
xlabel(‘n’);ylabel(‘x2(n)’);title(‘Attenuated signal 0.5x(n)’);

%plot the given signal and time shifted signal


subplot(2,3,4);stem(n,y0);
xlabel(‘n’);ylabel(‘x(n)’);title(‘Signal x(n)’);
subplot(2,3,5);stem(n,y3);
xlabel(‘n’);ylabel(‘x3(n)’);title(‘Delayed signal x(n-2)’);
subplot(2,3,6);stem(n,y4);
xlabel(‘n’);ylabel(‘x4(n)’);title(‘Advanced signal x(n+2)’);

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

n = 0 : 1 : 15; %specify range of n

x1=1.*(n>=1 & n<=10); %generate signal x1(n)


x2=1.*(n>=2 & n<=10); %generate signal x2(n)
N1=length(x1);
N2=length(x2);
x3=conv(x1,x2); %perform convolution of signals x1(n) and x2(n)
n1=0 : 1 : N1+N2-2; %specify range of n for x3(n)
Chapter 2 - Discrete Time Signals and Systems 2.122
subplot(3,1,1);stem(n,x1);
xlabel(‘n’);ylabel(‘x1(n)’);
title(‘signal x1(n)’);

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

II. State whether the following statements are True/False


1. The discrete signals are continuous function of an independent variable.
2. In digital signal the magnitudes of the signal are unquantized.
3. A discrete time signal x(n) is defined for noninteger values of n.
4. An impulse signal has a nonzero sample only for one value of n.
5. When we multiply a discrete time signal by unit step signal, the signal is converted to one-sided signal.
6. Shifting a signal to left is called delay and shifting to right is called advance.
7. Any discrete time signal can be expressed as a summation of impulses.
8. Periodic signals are power signals.
9. When the energy of a signal is infinite, it is called energy signal.
10. The output of a system for impulse input is called impulse response.
11. A system can be realized in real time only if it is noncausal and stable.
12. Dynamic systems does not require memory but static systems require memory.
13. A system is time invariant if the response to a shifted version of the input is identical to a shifted version
of the response based on the unshifted input.
14. An LTI system is unstable if the impulse response is absolutely summable.
15. A system whose output depends only on the present and past input is called a recursive system.
16. The circular shift of an N-point sequence is equivalent to a linear shift of its periodic extension.
17. For an N-point sequence represented on a circle, the time reversal is obtained by reversing its sample
about the point zero on the circle.
18. When a nonperiodic N-point sequence is represented on a circle then it becomes periodic with
periodicity N.
19. In linear convolution the length of the input sequences should be same.
20. In circular convolution the length of the input sequences need not be same.
21. In circular correlation the length of the input and output sequences are same.
Chapter 2 - Discrete Time Signals and Systems 2. 124
∞ ∞
22. The correlation operation, rxy (m) = ∑ x(n) y(n − m) is not same as rxy (m) = ∑ x(n + m) y(n) .
n =−∞ n =−∞
23. The cross correlation sequence rxy(m) is folded version of ryx(m).
24. The inverse systems exist for all LTI systems.
25. The final value of m in autocorrelation sequence of N-point sequence is, mf = mi + (2N – 1).
Answers
1. False 6. False 11. False 16. True 21. True
2. False 7. True 12. False 17. True 22. False
3. False 8. True 13. True 18. True 23. True
4. True 9. False 14. False 19. False 24. True
5. True 10. True 15. False 20. False 25. False

III. Choose the right answer for the following questions


x(n − 1)
1. x(n) = with initial condition x(0) = –1, gives the sequence,
4

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= −∞

16. The system y(n) = sin[x(n)] is,


a) stable b) BIBO stable c) unstable d) none of the above
17. Two parallel connected discrete time systems with impulse responses h1(n) and h2(n) can be replaced
by a single equivalent discrete time system with impulse response,
a) h1(n) * h2(n) b) h1(n) + h2(n) c) h1(n) – h2(n) d) h1(n) * [h1(n) + h2(n)]
18. Sectioned convolution is performed if one of the sequence is very much larger than the other in order
to overcome,
a) long delay in getting output b) larger memory space requirment
c) both a and b d) none of the above
19. In overlap save method, the convolution of various sections are performed by,
a) zero padding b) linear convolution c) circular convolution d) both b and c
20. If x(n) is N1-point sequence,if y(n) is N 2-point sequence, if r xy(m) is the correlation sequence
starts at m = mi , then the value of m corresponding to last sample of rxy(m) is,
a) mf = mi + (N1 + N2 – 2) b) mf = mi + (2N – 2) c) mf = mi + (N1 + N2 – 1) d) mf = mi + (2N + 1)
21. For a system, y(n) = nx(n), the inverse system will be,

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=−∞

24. The evaluation of correlation involves,


a) shifting, rotating and summation b) shifting, multiplication and summation
c) change of index, folding and summation d) change of index, folding, shifting & multiplication
25. The circular correlation of N-point sequences is evaluated in the range,
a) – N < m < N b) –N<m<0 c) 0<m<N d) 0 < m < N– 1

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

IV. Answer the following questions


1. Define discrete and digital signal.
2. Explain briefly, the various methods of representing discrete time signal with examples.
3. Define sampling and aliasing.
4. What is Nyquist rate?
5. State sampling theorem.
6. Define the impulse and unit step signal.
7. Express the discrete time signal x(n) as a summation of impulses.
8. How will you classify the discrete time signals?
9. What are energy and power signals?
10. When a discrete time signal is called periodic?
11. What is discrete time system?
12. What is impulse response? Explain its significance.
13. Write the difference equation governing the Nth order LTI system.
14. Write the expression for discrete convolution.
15. List the various methods of classifying discrete time systems.
16. Define time invariant system.
17. What is linear and nonlinear systems?
18. What is the importance of causality?
19. What is BIBO stability? What is the condition to be satisfied for stability?
20. What are FIR and IIR systems?
21. Write the convolution sum formula for FIR and IIR systems.
22. What are recursive and nonrecursive systems? Give examples.
2. 127 Digital Signal Processing
23. Write the properties of linear convolution.
24. Prove the distributive property of linear convolution.
25. What are the two ways of interconnecting LTI systems?
26. Define circular convolution.
27. What is the importance of linear and circular convolution in signals and systems?
28. How will you perform linear convolution via circular convolution?
29. What is sectioned convolution? Why is it performed?
30. What are the two methods of sectioned convolution?
31. What is inverse system? What is its importance?
32. Define deconvolution.
33. Define cross correlation and autocorrelation?
34. What are the properties of correlation?
35. What is circular correlation?
V. Solve the following problems
E2.1 Determine whether the following signals are periodic or not. If periodic, find the fundamental
period.

a) x(n) = sin

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

E2.9 Test the causality of the following systems.


a) y(n) = x(n) – x(–n – 2) + x(n –1) b) y(n) = a x(2n) + x(n2)
n n 4
c) y(n) = ∑ x( m) + ∑ x(2 m)
m= −1 m= −∞
d) y(n) = (0.3)n u(n + 2) e) y(n) = ∑ x( n − k )
k= −4

E2.10 Test the stability of the following discrete time systems.


a) y(n) = x2(n) + x(n + 1) b) y(n) = nx(n –1) c) h(n) = (0.4)n u(n + 3)
d) h(n) = (8)n u(4 – n) e) y(n) = x(n – 3)
E2.11 Determine the range of values of 'a' and 'b' for the stability of an LTI system with impulse response,

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

F ig E 2 .5 b.2 : S ig n al flow grap h .


F ig E 2 .5 b.1 : B lo c k d ia g ra m .

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

Solution for Exercise Problems

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.

Fundamental period is 16 samples.

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

= 2πM ⇒ N = 6M
3
For M = 1, 2, 3, ..... N will be integer.

For M = 1, N = 6.

\ x(n) is periodic.

Fundamental period is 6 samples.


E2. 2 DSP, Chapter 2 -Discrete Time Signals and Systems

d) x(n) = cos
FG π n IJ
2
H 32 K
Solution

Given that, x(n) = cos


FG π n IJ
2
H 32 K
π
∴ x(n + N) = cos (n + N)2
32
π 2
= cos (n + N2 + 2nN)
32
Fπn 2 πN2 πN I
= cos GH 32 +
32
+
16
n JK
πN2 πN
Let, = 2πM1 Let, = 2πM2
32 16

∴ 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 .....

When M1 = 42 and M2 = 1, we get a common value for N as, N = 32.

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

= 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

Let, b9Ng = M × 2π ⇒ N=
9
M

For any integer value of M, N will not be an integer.


Hence x(n) is non periodic.

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.

Therefore, x(n) is periodic with period N, where N is LCM of N1 and N2.

The LCM of 4 and 8 is 8.

\ x(n) is periodic with fundamental period, N = 8.

E2.2. Determine the even and odd parts of the signals.

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

∴ x(n) = 2 sin 80 πt = 2 sin 80 π ×


n
= 2 sin
4 πn FG IJ
t=
n
60
60 3 H K
Now, 2 sin
FG 4π n + 2πnIJ = 2 sinFG 10πn IJ
H3 K H 3 K
F 10πn IJ is, f = 5
The frequency of 2sin G
H 3 K 3

F 5
Also, f = ⇒ F = fFs = × 60 = 100
Fs 3

Hence for Fs = 60 Hz, F = 100 Hz is an alias frequency.

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

Let the sampling frequency be, Fs = 30 – 5 = 25 Hz

∴ x1(n) = x1(t) = 4 cos 2π 30 ×


FG n IJ
t = nT =
n
Fs
H 25 K
∴ x1(n) = 4 cos
12π
n = 4 cos 2πn +
2 πnFG
= 4 cos

n
IJ
5 5 H 5 K
x 2 (n) = x 2 (t) = 4 cos 2π 5 ×
FG n IJ = 4 cos

n
t = nT =
n
Fs
H 25 K 5

c) Consider the analog signal, x(t) = 3sin40pt – sin100pt + 2cos50pt

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

⇒ F2 = 50 Hz, T2 = 0.02 sec

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

∑ x(n) = Lt 2N + 1 ∑ cos GH 4 nJK


F 3π I
2
N
2
2N + 1N→ ∞
n = −N
N→ ∞
n = −N

FG1+ cos 2 × 3π nIJ


1 H 4 K
N
1 1 L 3π O +N +N
= Lt
2N + 1

N→ ∞ 2
= Lt
n = −N 2N + 1 2 NM
M ∑ 1 + ∑ cos nP
2 PQ N→ ∞
n = −N
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.


It can be shown that cos n is periodic and sum of samples of one period of periodic cosine signal is zero.
2

cos

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

∴ 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 ∞

Since P is finite, E is infinite x(n) is power signal.


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).

Solution

B loc k D ia gra m S ign a l F lo w G ra p h


x (n )
x (n ) z
−1
z
−1
2.1 x (n −1)

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 )

B loc k D ia gra m S ign a l F lo w G ra p h


−1
x (n ) 2.1x(n −1) y (n ) x (n ) 1 z 2.1 1 1 1 y (n )
−1 2.1
z + +
)
)

−1
−2

−1 −1
(n

z
x(n

z 2
2y

0.5
0 .5

−1 −1
z 0.5 2 z

b) y(n) = 1.6x(n − 2) + 0.7 x(n) + 3y(n − 1) + 0.3 y(n − 2).

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

y (n − 1 ) 0.3 y (n −2) y (n −1)

−1
z
−1 z
0.3

0.3 y (n − 2 )
y (n −2 )
0.3

B loc k D ia gra m S ign a l F lo w G ra p h


x (n ) y (n ) y (n )
x (n ) 1 0.7 1 1
0.7 + +
−1 3 −1
−1
z z
−1
z + 3 z

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.

a) y(n) = 0.1 y(n − 1) + x(n − 1) + 0.7 x(n) ;


x(n) = 2 − n u(n) ; y( −1) = − 1

Solution

y(n) = 0.1 y(n – 1) + x(n – 1) + 0.7 x(n)

\ y(n) – 0.1 y(n –1) = 0.7 x(n) + x(n –1) .....(1)

Homogeneous solution

When the input is zero the equation (1) can be written as,

y(n) – 0.1 y(n –1) = 0 .....(2)

On substituting y(n) = ln in equation (2) we get,

ln – 0.1 l(n – 1) = 0

\ l(n – 1) (l – 0.1) = 0 Þ l = 0.1

The homogeneous solution yh(n) is given by,

yh(n) = Cln = C(0.1)n for n ³ 0 = C(0.1)n u(n) .....(3)

Particular solution

Given that, x(n) =


FG 1IJ u(n)
n
; ∴ y(n) = K
FG 1IJ u(n)
n

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

∴ Response, y(n) = yh (n) + y p (n)

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)

Given that : y(−1) = − 1 and x(n) = 2 −n u(n)


∴ x(0) = 1 and x(−1) = 0

On substituting the above values in equation (7) we get,

y(0) + 0.1 = 0.7

y(0) = 0.7 – 0.1

\ y(0) = 0.6

Put n = 0 and y(0) = 0.6 in equation (6).

y(0) = C(0.1)0 + 3 . 375 ×


FG 1IJ 0
= C + 3 . 375
H 2K
0.6 = C + 3 . 375
C = 0.6 − 3 . 375
C = −2 . 775
\ The total response is given by,
LM
y(n) = −2 . 775 (0.1)n + 3.375
FG 1IJ OP u(n)
n

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

When the input is zero, the equation(1) can be written as,

y(n) + 2.1 y(n –1) + 0.2 y(n –2) = 0 .....(2)


n
substitute y(n) = l in equation (2)

\ ln + 2.1 ln – 1 + 0.2 ln – 2 = 0

l(n –2) [l2 + 2.1 l + 0.2] = 0

The characteristic equation is,

λ2 + 2 .1 λ + 0.2 = 0 ⇒ bλ + 0.1g bλ + 2g = 0
\ The roots are, l1 = –0.1, l2= –2.

The homogenous solution yh(n) is given by,

yh (n) = C1 λn1 + C2 λn2

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

Given that , x(n) = u(n) ; \ y(n) = K u(n). .....(4)

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)

To find ‘K’ evaluate equation (5), for n = 2.

\ K u(2) + 2.1 K u(1) + 0.2 K u(0) = u(2) + 0.56 u(1)

K + 2.1 K + 0.2 K = 1 + 0.56

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)

Equation (8) ´ 2 Þ 2 C1 + 2 C2 = 13.26

Equation (9) Þ 0.1 C1 + 2 C2 = 13.22


(–) (–) (–)

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)

Here, y(n − m) = y d (n)


Hence system is time invariant.
b) y(n) = n ax(n)
Solution
Given that, y(n) = H{x(n)} = y(n) = n ax(n)
Response for Delayed Input
y(n – m) = H {x(n – m)} = (n–m) ax(n – m)
Delayed Response

l q
y d (n) = z −m H x(n) = z −m n a x(n) = n a x(n − m)

Here, y(n − m) ≠ y d (n)


Hence the system is time variant.
c) y(n) = x2(n + 2) + C
Solution
Given that, y(n) = H{x(n)} = x2(n + 2) + C
Response for Delayed Input
y(n –m) = x2(n – m + 2) + C
Delayed Response

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

Here, y(n − m) = y d (n)


Hence the systems is time invariant.
d) y(n) = (n – 1) x2(n) + C
Solution
Given that, y(n) = H{x(n)} = (n - 1)x2(n) + C
Response for Delayed Input
y(n –m) = (n – m – 1)x2(n – m) + C
Delayed Response

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.

Here, y(n − m) ≠ y d (n)


Hence the systen is time variant.

E2.8. Test the following systems for linearity.


a) y(n) = x2(n) + x3(n – 1)
Solution
Let, ‘H ’ be the system,
\ y(n) = H{x(n)} = x2(n) + x3(n – 1)
Consider two signals, x1(n) and x2(n).
E2. 12 DSP, Chapter 2 -Discrete Time Signals and Systems
Let y1(n) and y2(n) be responses of system ‘H’ for inputs x1(n) and x2(n).
\ y1(n) = H {x1(n)} = x12(n) + x13(n –1)
y2(n) = H {x2(n)} = x22(n) + x23(n –1)
\ a1 y1(n) + a2 y2(n) = a1 [x12(n) + x13(n –1)] + a2 [x22(n) + x23(n –1)] .....(1)
Consider a linear combination of inputs.
a1 x1(n) + a2 x2(n) = x3(n)
\ y3(n) = H {x3(n)} = x32(n) + x3(n – 1)
= [a1 x1(n) + a2 x2(n)]2 + [a1 x1(n – 1) + a2 x2(n – 1)]3 .....(2)
From equations (1) and (2) we can say that,
y3(n) ¹ a1 y1(n) + a2 y2(n)
Hence the system is non-linear.
b) y(n) = bx(n + 2) + n e x(n)
Solution
Let ‘H ’ be the system.
\ y(n) = H{x(n)} = b x(n + 2) + n ex(n)
Consider two signals x1(n) and x2(n).
Let y1(n) and y2(n) be their respective outputs.
l q
∴ y1(n) = H x1(n) = b x1(n + 2) + ne x1(n)

y (n) = H lx (n)q = b x (n + 2) + ne
2 2 2
x 2 ( n)

∴ a y (n) + a y (n) = a eb x (n + 2) + ne .....(1)


1 1 2 2 1j + a eb x (n + 2) + ne j
1
x1 ( n )
2 2
x 2 (n)

Consider a linear combination of inputs.

∴ a1 x1(n) + a 2 x 2 (n) = x 3 (n)

m r
∴ y 3 (n) = H x 3 (n) = b x 3 (n + 2) + ne x 3 (n)

= b a1 x1 (n + 2) + a 2 x 2 (n + 2) + ne[ a1 x1(n) + a 2 x 2 (n)]

= a1 b x1(n + 2) + a 2 b x 2 (n + 2) + nea1x1(n) ea 2 x 2 (n) .....(2)

From equations (1) and (2) we get,

y 3 (n) ≠ a1y1(n) + a 2y 2 (n)


Hence the system is non-linear system.

c) y(n) = a x(n) + b x(n)

Solution
Let ‘H ’ be the system.
l q
∴ y(n) = H x(n) = a x(n) + b x(n)

Consider two signals x1(n) and x2(n).


Let y1(n) and y2(n) be their respective outputs.

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)

∴ a1 y1(n) + a2 y2 (n) = a1 a x1(n) + b x1(n) + a2 a x2 (n) + b x2 (n) .....(1)


Consider a linear combination of inputs.

∴ a1 x1(n) + a2 x 2 (n) = x3 (n)


m r
∴ y 3 (n) = H x 3 (n) = a x 3 (n) + b x 3 (n)

= a a1 x1(n) + a 2 x 2 (n) + b a1 x1(n) + a 2 x 2 (n) .....(2)

From equations (1) and (2) we can say that,


y3(n) ¹ a1 y1(n) + a2 y2(n)
Hence the system is non-linear system.
Solution for Exercise Problems E2. 13
1
d) y(n) = x(n) +
x(n)

Solution
Let ‘H ’ be the system.

1
∴ y(n) = H x(n) = x(n) +l q x(n)

Consider two signals x1(n) and x2(n).

Let y1(n) and y2(n) be their respective outputs.


1 1
l q
∴ y1(n) = H x1(n) = x1(n) +
x1(n)
l
; y 2 (n) = H x 2 (n) = x 2 (n) + q x 2 (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)

Consider linear combination of inputs.

∴ a1x1(n) + a2 x2 (n) = x3 (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)

From equations (1) and (2) we get,

y3(n) ¹ a1 y1(n) + a2 y2(n)

Hence the system is non-linear system.

N M
e) y(n) = ∑b
m = −1
m x(n + m) + ∑c
m =0
m y(n + m)

Solution

Let, H be the system represented by the given equation.

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

Now consider linear combination of inputs

a1x1(n) + a 2 x 2 (n) = x 3 (n)


N M
∴ y 3 (n) = H x 3 (n) = m r ∑b m = −1
m x 3 (n + m) + ∑c
m=0
m y 3 (n + m)

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)

By time invariant property,

If y3(n) = H {a1 x1(n) + a2 x2(n)} ; then, y3(n + m) = H {a1 x1(n + m) + a2 x2(n + m)}

If y2(n) = H {x2(n)}, then y2(n + m) = H {x2(n + m)}


E2. 14 DSP, Chapter 2 -Discrete Time Signals and Systems
If y1(n) = H {x1(n)}, then y1(n + m) = H {x1(n + m)}

\ y3(n + m) = H {a1 x1(n + m) + a2 x2(n + m)} = a1 H {x1(n + m)} + a2 H {x2(n + m)}

= a1 y1(n + m) + a2 y2(n + m) .....(3)


Using equation (3), the equation(2) can be written as,
N N M
y 3 (n) = a1 ∑b
m = −1
m x1(n + m) + a 2 ∑b
m = −1
m x 2 (n + m) + ∑c
m=0
m a1y1(n + m) + a 2 y 2 (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)

From equations (1) and (4) we can say that,

y 3 (n) = a1 y1(n) + a 2 y2 (n)


Hence the system is linear.
E2.9. Test the causality of the following systems.
a) y(n) = x(n) – x(–n – 2) + x(n –1)
Solution
When, n = –2, y(–2) = x(–2) – x(0) + x(–3)
n = –1, y(–1) = x(–1) – x(–1) + x(–2)
n = 0, y(0) = x(0) –x(–2) + x(–1)
n = 1, y(1) = x(1) –x(–3) + x(0)
n=2, y(2) = x(2) – x(–4) + x(1)
For n £ –2, the system response depends on future input.
Hence the system is noncausal.

b) y(n) = a x(2n) + x(n2)

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 = −∞

∴ y(0) depends on present and past inputs.


1 1
n = 1, y(1) = ∑ x(m) + ∑ x(2m) ⇒ y(1) = x( −1) + x(0) + x(1) + ..... + x( −4) + x( −2) + x(0) + x(2)
m = −1 m = −∞

y(1) depends on future input x(2).

The system response depends on future input for n > 0.


Hence it is noncausal system.
Solution for Exercise Problems E2. 15
d) y(n) = (0.3)n u(n + 2) Note : For causality y(n) = 0 ; for n < 0.

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

Here y(n) ¹ 0 for n < 0. Therefore the system is noncausal.


4
e) y(n) = ∑ x(n − k)
k = −4

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)

For any value of n the system response depends on future inputs.


Hence, the system is noncausal.

E2.10. Test the stability of the following discrete time systems.


a) y(n) = x2(n) + x(n + 1)
Solution
The given system involves squaring operation and so it is nonlinear.
The operations performed by system is squaring and shifting.
A bounded input signal will remain bounded even after squaring and shifting.
Hence the system is BIBO stable.
b) y(n) = n x(n – 1)
Solution
The given system involves multiplication by n and so it is time variant system.
If x(n) doesnot tend to “0” as n tends to infinity then the system is unstable.
c) h(n) = (0.4)n u(n + 3)
Solution
Here, h(n) = 0.4n u(n + 3) = 0.4n ; For n = –3 to + ¥
+∞ ∞ −1 ∞
1
∑ h(n) = ∑ (0.4) = ∑ (0.4) n n
+ ∑ (0.4) n
= (0.4)−3 + (0.4)−2 + (0.4)−1 +
1 − 0.4
= 26.04 = Constant
n = −∞ n = −3 n = −3 n= 0

Hence it is stable system.

d) h(n) = (8)n u(4 – n)


Solution
Here, h(n) = 8n u(4 – n) = 8n ; for n = – ¥ to +4

For stability, ∑ |h(n)|
n = −∞
< ∞

+∞ 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

Hence the system is stable.


E2.11. Determine the range of values of ‘a’ and ‘b’ for the stability of LTI system with impulse response,

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 ∞

∑ h(n) = ∑ (2b)−n + ∑ (−4a)n


n = −∞ n= −∞ n= 0
−1 ∞
= ∑ |2b|−n + ∑ |4a|n
n = −∞ n= 0

∞ ∞
= ∑ |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 = −∞

∴ Condition for stability is,


1
0 < |2b| < 1 ⇒ 0 < |b| <
2
1
0 < |4a| < 1 ⇒ 0 < |a| <
4

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) = δ (n − 3)


H7 K
Solution
The impulse response of the cascade system is given by,
h(n) = h1(n) ∗ h2 (n) = h2 (n) ∗ h1(n)

= ∑ h (m) h (n − m) ;
m= −∞
2 1 'm' is dummy variable

∴ 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

F 1I will be nonzero, only when m = 3.


The product of d(m – 3) and GH JK
−m

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

G J G J − 21 FGH 91IJK = 32 FGH 31IJK − 21 FGH 91IJK for n ≥ 0.


3 F 1I F 9 I
n n n n n
=
2 H 9K H 3K

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

FG 3 IJ − 1 LM FG 3 IJ − 1OP n+1 n+1

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

Now the overall impulse response h(n) is given by,

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= −∞

Input sequence starts at n = –1

Impulse response starts at n = –2

Therefore the output sequence start at, n = –1 + (–2) = –3

The output consists of 5 + 5 –1 = 9 samples.

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 (1) = 2 x 2 (1) = 4 x2 (3) = 8

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 x 1(m) 1 x 8 x 2, 1(m ) 4 ⇒ −8 v 1(m) 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

x1(m) 0 0.6 –1 1.5 2

x2(m) –2 3 0.2 0.7 0.8

x2((–m))5 = x2,0(m) 0.8 0.7 0.2 3 –2 0.8 0.7 0.2 3

x2((1–m))5 = x2,1(m) 0.8 0.7 0.2 3 –2 0.8 0.7 0.2

x2((2–m))5 = x2,2(m) 0.8 0.7 0.2 3 –2 0.8 0.7

x2((3–m))5 = x2,3(m) 0.8 0.7 0.2 3 –2 0.8

x2((4–m))5 = x2,4(m) 0.8 0.7 0.2 3 –2

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

When n = 2 ; x (2) = (0 × 0.2) + b0.6 × 3g + b −1 × −2g + b1.5 × 0.8g + b2 × 0.7g = 6.4


3

When n = 3 ; x (3) = (0 × 0.7) + b0.6 × 0.2g + b −1 × 3g + b1.5 × −2g + b2 × 0.8g = − 4.28


3

When n = 4 ; x (4) = (0 × 0.8) + b0.6 × 0.7g + b −1 × 0.2g + b1.5 × 3g + b2 × −2g = 0.72


3

∴ x (n) = l6.08, − 0.55, 6.4, − 4 . 28, 0.72q


3

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

a) Response of LTI System Using Linear Convolution


+∞
Let, y(n) = x(n) ∗ h(n) = ∑ x(m) h(n − m)
m= −∞
+∞
= ∑ x(m) h (m) ; where h (m) = h(n − m)
n n
m= −∞

x(n) starts at n = −1 and h(n) starts at n = 0.


∴ y(n) will start at n = 0 + ( −1) = − 1

Length of x(n) is 6 and h(n) is 6.

Hence length of y(n) is 6 + 6 –1 = 11. Also y(n) ends at n = 0 + (–1) + (6 + 6 –2) = 9


E2. 22 DSP, Chapter 2 -Discrete Time Signals and Systems

The 11 samples of y(n) computed by table method as shown below.

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

h(m) –0.5 0.5 –1 0.5 –1 –2

h(–m) –2 –1 0.5 –1 0.5 –0.5

h–1(–m) –2 –1 0.5 –1 0.5 –0.5

h0(m) –2 –1 0.5 –1 0.5 –0.5

h1(m) –2 –1 0.5 –1 0.5 –0.5

h2(m) –2 –1 0.5 –1 0.5 –0.5

h3(m) –2 –1 0.5 –1 0.5 –0.5

h4(m) –2 –1 0.5 –1 0.5 –0.5

h5(m) –2 –1 0.5 –1 0.5 –0.5

h6(m) –2 –1 0.5 –1 0.5 –0.5

h7(m) –2 –1 0.5 –1 0.5 –0.5

h8(m) –2 –1 0.5 –1 0.5 –0.5

h9(m) –2 –1 0.5 –1 0.5 –0.5

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

The response of LTI system y(n) is,

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

The 11 samples of y(n) are computed by table method as shown below.

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

h(m) 0 –0.5 0.5 –1 0.5 –1 –2 0 0 0 0

h(–m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0

h–1(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0 –2 –1 0.5 –1 0.5

h0(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0 –2 –1 0.5 –1

h1(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0 –2 –1 0.5

h2(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0 –2 –1

h3(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0 –2

h4(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0

h5(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0

h6(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0

h7(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0

h8(m) 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0

h9(m) 0 0 0 –2 –1 0.5 –1 0.5 –0.5 0 0 0 0 0 –2 –1 0.5 –1 0.5 –0.5

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

The response of LTI system y(n) is,


l
y(n) = 0.5, − 1, 2, − 2.5, 3.5, − 1. 5, 1, − 0.5, − 0.5, 1, − 2 q
A
E2.16. Perform linear convolution of the following sequences by,
i) Overlap add method
ii) Overlap save method
x(n) = 1, l − 1, 2 1, − 1, 2, 1, − 1, 2 q
l
h(n) = 2, 3, − 1 q
Solution
Overlap Add Method
l
x(n) = 1, − 1, 2, 1, − 1, 2, 1, − 1, 2 q
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
l
h(n) = 2, 3, − 1 q
Let, y1(n), y2(n), y3(n) be output of linear convolution of x1(n), x2(n), x3(n) with h(n) respectively.
Here, h(n) starts at nh = 0.
x1(n) starts at, n = n1 = 0 \ y1(n) starts at, n = 0 + 0 = 0
x2(n) starts at, n = n2 = 3 \ y2(n) starts at, n = 3 + 0 = 3
x3(n) starts at, n = n3 = 6 \ y3(n) starts at, n = 6 + 0 = 6
Here, N1 = 9, N2 = 3, N3 = 3
N2 – 1 = 2
N2 + N3 – 1 = 5
Convolution output of each section will consists of 3 + 3 – 1 = 5 samples.
Convolution of Section - 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

where hn (m) = h(n − m)


When n = 0 ; y1(0) = ∑ x (m) h (m) = 0 + 0 + 2 + 0 + 0 = 2
1 0

When n = 1 ; y (1) = ∑ x (m) h (m) = 0 + 3 − 2 + 0 = 1


1 1 1

When n = 2 ; y (2) = ∑ x (m) h (m) = − 1 − 3 + 4 = 0


1 1 2

When n = 3 ; y (3) = ∑ x (m) h (m) = 0 + 1+ 6 + 0 = 7


1 1 3

When n = 4 ; y (4) = ∑ x (m) h (m) = 0 + 0 − 2 + 0 + 0 = −2


1 1 4
Solution for Exercise Problems E2. 25
∴ y1(n) = l 2, 1, 0, 7, − 2 q
An=0

Convolution of sections 2 and 3

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

h(n) = {2, 3, –1, 0, 0}


Now perform circular convolution of each section with h(n).
x1(n) starts at, n = 0 ; \ y1(n) starts at, n = 0.
x2(n) starts at, n = 3 ; \ y2 (n) starts at, n = 3.
x3(n) starts at, n = 6 ; \ y3(n) starts at, n = 6.

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

y(n) = {*, *, 0, 9, –1, 0, 9, –1, 0, 7, –2}


Hence both the results are same except the first (N2 – 1) samples.
E2.17. Perform crosscorrelation of the sequences,
l
x(n) = −1, 2, 3 − 4 q and l
y(n) = 2, − 1, − 3 q
A A
Solution
The crosscorrelation sequence rxy(m) is given by,

rxy (m) = ∑ x(n) y(n − m)
n= −∞

The x(n) starts at n = 0, and has 4 samples.


\ n1 = 0, N1 = 4
The y(n) start at, n = –1 and has 3 samples.
\ n2 = –1 , N2 = 3

Now rxy(m) will have, N1 + N2 – 1 = 4 + 3 –1 = 6 samples.

The initial value of m = mi = n1 – (n2 + N2 – 1) = 0 – (–1 + 3 – 1) = –1

The final value of m = mf = mi + (N1 + N2 – 2) = –1 + (4 + 3 –2) = 4

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

Each sample of rxy(m) is given by,


+∞ +∞
rxy (m) = ∑ x(n) y(n − m) = ∑ x(n) y
n= −∞ n= −∞
m (n) ; where ym (n) = y(n − m)

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= −∞

The x(n) starts at n = –1, and has 5 samples.


\ nx = –1, and N = 5
The rxx(m) will have, 2N –1 = 10 – 1 = 9 samples
The initial value of m = mi = – (N – 1) = – (5 – 1) = –4
The final value of m = mf = mi + (2 N – 2) = –4 + (10 – 2) = 4

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

Each sample of autocorrelation sequence rxx(m) is given by,


+∞ +∞
rxx (m) = ∑ x(n) x(n − m) = ∑ x(n) x
n= −∞ n= −∞
m (n) ; where xm (n) = x(n − m)

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

∴ rxx (m) = l 2, 3, − 11, − 9, 55, − 9, − 11, 3, 2 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

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

= x(−2) + cx(−1) + c 2 x(0)

= y(0) + y(1) − y(0) + c 2 x(0)


1
= y(1) + c 2 x(0) ⇒ x(0) = y(2) − y(1)
c2
1
Therefore, in general, x(n) = n+2
y(n + 2) − y(n + 1) ; for n ≥ −1 with initial condition x( −2) = y(0).
c

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)

N2 = Number of samples in h(n)

N3 = Number of samples in y(n)

Now, N3 = N1 + N2 – 1 Þ N1 = N3 – N2 + 1 = 7 – 3 + 1 = 5 samples

Each sample of x(n) is given by,

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).

The circular correlation is given by,


N −1 N −1
rxy (m) = ∑ x(n) y((n − m)) = ∑ x(n) y
n= 0
N
n= 0
m (n), where y m (m) = y((n − m))N

Here, N = 4, The circular correlation is performed by table method as shown below.

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 = −∞

The Z-transform of x(n) is symbolically denoted as,


Z{x(n)} ; where, Z is the operator that represents Z-transform.
+∞
∴ X( z) = Z x(n) = l q ∑ x ( n) z −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)

The inverse Z-transform of X(z) is symbolically denoted as,


Z–1 {X(z)} ; where, Z–1 is the operator that represents the inverse Z-transform

∴ x(n) = Z −1 {X( z)} =


1
2 πj z
c
X(z) z n −1 dz

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 :

Consider the definition of Z-transform of x(n),


+∞ +∞
X( z) = ∑ x(n) z −n
= ∑ x(k) z −k
Let n → k
n = −∞ k = −∞
+∞
X( z) zn −1 = ∑ x(k) z −k
zn −1 Multiply both sides by zn −1
k = −∞
Let us integrate the above equation on both sides over a closed contour "C" within the ROC of X(z) which
encloses the origin.


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.

By Cauchy integral theorem,


= 2πj
+∞


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

2. Finite geometric series sum formula.


If C is a complex constant and,

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

3.2 Region of Convergence


Since the Z-transform is an infinite power series, it exists only for those values of z for which the series
converges. The region of convergence, (ROC) of X(z) is the set of all values of z, for which X(z) attains a finite
value. The ROC for the following six types of signals are discussed here.
Case i : Finite duration, right-sided (causal) signal
Case ii : Finite duration, left-sided (anticausal) signal
Case iii : Finite duration, two-sided (noncausal) signal
Case iv : Infinite duration, right-sided (causal) signal
Case v : Infinite duration, left-sided (anticausal) signal
Case vi : Infinite duration, two-sided (noncausal) signal
Case i : Finite duration, right-sided (causal) signal
Let, x(n) be a finite duration signal with N-samples, defined in the range 0 £ n £ (N – 1).
\ x(n) = {x(0), x(1), x(2),.....x(N–1)} jv
Now, the Z-transform of x(n) is, z -p la n e
N−1
u
X( z) = ∑ x(n) z− n R O C is e ntire
z -p la n e ex c e pt
n=0
z=0
= x(0) + x(1)z −1 + x(2)z −2 + ........+ x(N − 1) z− (N −1)
F ig 3 .2 : R O C o f fin ite
x(1) x(2) x(N − 1) d u ra tio n c ausa l sig n a l.
= x(0) + + + ..........+
z z2 zN − 1
In the above summation, when z = 0, all the terms except the first term become infinite. Hence the X(z)
exists for all values of z, except z = 0. Therefore, the ROC of finite duration right-sided (or causal signal) is
entire z-plane except z = 0.
Case ii : Finite duration, left-sided (anticausal) signal
Let, x(n) be a finite duration signal with N-samples, defined in the range –(N–1) £ n £ 0.
jv
\ x(n) = {x(–(N–1)),.....,x(–2), x(–1), x(0)} z -p la n e
Now, the Z-transform of x(n) is,
R O C is en tire u
0
z -p la n e ex c ep t
X( z ) = ∑ x(n) z −n
z=∞
n = − (N −1)

= 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.

Case - iv : Infinite duration, right-sided (causal) signal


Let, x(n) = r1n ; n ³ 0 Using infinite geometric
series sum formula
Now, the Z-transform of x(n) is,

+∞ ∞ ∞ 1
X( z) = ∑ x(n) z −n
= ∑ r1n z −n
= ∑ er1 z j −1 n ∑ Cn =
1 − C
n=0
n = −∞ n= 0 n= 0

if , 0 < |C | < 1
1
If, 0 < |r1 z −1| < 1, then ∑ (r1 z −1 ) n =
1 − r1 z −1 jv
n=0
z -p la n e
1 1 1 z
∴ X(z) = −1
= = = r1
1 − r1 z r z − r z − r1
1− 1 1
z z u
Here the condition to be satisfied for the convergence of X(z) is, R O C of
0 < |r1 z–1| < 1 x (n ) = r1n ; n ≥ 0
F ig 3.5 : R O C o f infinite
| r1| d u ra tio n rig h t-sid ed sig n a l.
\ |r1 z–1| < 1 Þ < 1 ⇒ |z| > |r1|
| z|
The term |r1| represents a circle of radius r1 in z-plane as shown in fig 3.5. From the above analysis we
can say that, X(z) converges for all points external to the circle of radius r1 in z-plane. Therefore, the ROC of
X(z) is exterior of the circle of radius r1 in z-plane as shown in fig 3.5.
Case v : Infinite duration, left-sided (anticausal) signal
Let, x(n) = r2n ; n £ 0
Now, the Z-transform of x(n) is,
+∞ 0 +∞ +∞
X( z) = ∑ x(n) z − n = ∑ r2n z− n = ∑ r2− n z n = ∑ (r2−1 z) n
n = −∞ n = −∞ n= 0 n= 0

1 Using infinite geometric
If , 0 < |r2−1 z| < 1, then ∑
(r2−1 z) n =
1 − r2−1 z series sum formula
n=0
1 1 1 r2 r ∞
1
∴ X(z) = = = = = − 2
1 − r2−1 z 1−
z r2 − z r2 − z z − r2 ∑ Cn 1
=
− C
n=0
r2 r2
if , 0 < |C | < 1
Chapter 3 - Z - Transform 3. 6

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.

Case vi: Infinite duration, two-sided (noncausal) signal


Let, x(n) = r1n u(n) + r2n u(– n)
Now, the Z-transform of x(n) is,
+∞ 0 +∞ +∞ +∞
X( z) = ∑ x(n) z − n = ∑ r2n z− n + ∑ r1n z − n = ∑ r2− n z n + ∑ r1n z − n
n = −∞ n = −∞ n= 0 n= 0 n= 0
+∞ +∞ Infinite geometric series sum formula
= ∑ (r2− 1 z) n + ∑ (r1 z −1 ) n ∞
Cn =

1
if , 0 < |C | < 1
n= 0 n= 0
n=0
1 − C
1 1
= + Using infinite geometric series sum formula
1 − r2−1 z 1 − r1 z −1
if, 0 < |r2−1 z| < 1, and, 0 < |r1 z−1| < 1
∞ ∞
The term ∑ (r2− 1 z) n converges if, The term ∑ (r1 z−1 ) n converges if,
n= 0 n= 0
0 < r2− 1 z < 1 0 < r1 z− 1 < 1
z r1
∴ r2− 1 z < 1 ⇒ < 1 ⇒ |z |<|r2 | ∴ r1 z−1 < 1 ⇒ < 1 ⇒ |z | > |r1|
r2 z
The term |r2| represents a circle of radius r2 and |r1| jv z -p la n e
represents a circle of radius r1 in z-plane. If |r2| > |r1| then there will R O C of n
r2
be a region between two circles as shown in fig 3.7. Now the X(z) x (n) = r1 u(n) + r2n u( −n)
r1 if |r 2 |> |r1 |
will converge for all points in the region between two circles
(because the first term of X(z) converges for |z| < |r2| and the u
second term of X(z) converges for |z| > |r1|). Hence the ROC is the
region between two circles of radius r1 and r2 as shown in fig 3.7. F ig 3.7 : R O C o f in fin ite
Table 3.1 : Summary of ROC of Discrete Time Signals d u ra tio n tw o -sid ed sign al.

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

Signal ROC in z-plane


Finite Duration Signals
E n tire z -p la n e
x (n ) jv e xc e pt z = 0
R ig h t-side d z -p la n e
(o r c au sal)
u

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

= x(0) z0 + x(1) z −1 + x(2) z −2 + x(3) z −3 R O C is e ntire u


−1 −2 −3 z -p la n e ex c e pt
= 3 + 4z + 2z + 7z
4 2 7 z=0
= 3 + + 2 + 3
z z z
In X(z), when z = 0, except the first terms all other terms will become infinite. Hence X(z) will be finite for
all values of z, except z = 0. Therefore, the ROC is entire z-plane except z = 0.

b) Given that, x(n) = {6, 8, 9, 3}


-
i.e, x(–3) = 6 ; x(–2) = 8 ; x(–1) = 9 ; x(0) = 3 ; and x(n) = 0 for n < –3 and for n > 0.
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 = –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 = ¥.

c) Given that, x(n) = {2, 4, 6, 8, 10}


A
i.e, x(–2) = 2 ; x(–1) = 4 ; x(0) = 6 ; x(1) = 8 ; x(2) = 10 and x(n) = 0 for n < –2 and for n > 2.

By the definition of Z-transform,



Z{x(n)} = X(z) = ∑ x(n) z −n
n = −∞
3. 9 Digital Signal Processing
The given sequence is a finite duration sequence defined in the range n = –2 to +2, hence the limits of
summation is changed to n = –2 to n = 2.
2 jv
∴ X(z) = ∑
n = −2
x(n) z −n z -p la n e

= x(−2) z2 + x(−1) z1 + x(0) z0 + x(1) z −1 + x(2) z −2 R O C is e ntire u


= 2z 2
+ 4z + 6 + 8z + 10z −1 −2 z -p la n e ex c e pt
8 10 z = 0 an d z = ∞
= 2z2 + 4z + 6 + + 2
z z
In X(z), when z = 0, the terms with negative power of z will become infinite and when z = ¥, the terms with
positive power of z will become infinite. Hence X(z) will be finite for all values of z except when z = 0 and
z = ¥ .Therefore, the ROC is entire z-plane except z = 0 and 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(–n–1)
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 |=

Here the condition for convergence is, 0 < |z–1| < 1. u


1 ROC
∴ |z −1| < 1 ⇒ < 1 ⇒ |z| > 1
|z|
The term |z| = 1 represents a circle of unit radius in z-plane. Therefore, the ROC is exterior of unit circle
in z-plane.
b) Given that, x(n) = 0.3n u(n)
The u(n) is a discrete unit step signal, which is defined as,
jv
u(n) = 1 ; for n³0 |Z |= 0.3
z -p la n e
=0 ; for n<0
\ x(n) = 0.3n ; for n ³ 0
u
= 0 ; for n < 0 ROC
By the definition of Z-transform,
∞ ∞
Z{x(n)} = X(z) = ∑ x(n) z −n = ∑ 0.3 n
z −n
n = −∞ n = 0

−1 n 1 Using infinite geometric series sum formula.
= ∑ d0.3z i =
1 − 0.3z −1
n = 0
Chapter 3 - Z - Transform 3. 10
1 z
∴ X(z) = =
1 z − 0.3
1 − 0.3
z
Here the condition for convergence is, 0 < |0.3 z–1| < 1.
0.3
∴ |0.3 z−1| < 1 ⇒ < 1 ⇒ |z|> 0.3
|z|
The term |z| = 0.3 represents a circle of radius 0.3 in z-plane. Therefore, the ROC is exterior of circle with
radius 0.3 in z-plane.

c) Given that, x(n) = 0.8n u(–n –1) jv


z -p la n e
The u(–n –1) is a discrete unit step signal, which is defined as,

.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.8–1 z)0 = 1
n = 1 n = 1 n = 0

1 Using infinite geometric


= −1
−1 series sum formula.
1 − (0.8 z)
1 0.8 0.8 − 0.8 + z z z
= − 1= − 1= = =−
z 0.8 − z 0.8 − z 0.8 − z z − 0.8
1 −
0.8
Here the condition for convergence is, 0 < |0.8–1 z| < 1.
|z|
∴ |0.8 −1 z|< 1 ⇒ < 1 ⇒ |z|< 0.8
0.8
The term |z| = 0.8, represents a circle of radius 0.8 in z-plane. Therefore, the ROC is interior of the circle
of radius 0.8 in z-plane.
jv z -p la n e
d) Given that, x(n) = 0.3n u(n) + 0.8n u(–n – 1)
n n
X(z) = Z {x(n)} = Z{0.3 u(n) + 0.8 u(–n –1)}
|z| =0 .3

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

Here the condition for convergence of 0.3n u(n) is,


0 < |0.3 z–1| < 1 Þ |z| > 0.3
and the condition for convergence of 0.8n u(–n –1) is,
0 < |0.8–1 z| < 1 Þ |z| < 0.8
The term |z| = 0.8, represents a circle of radius 0.8 in z-plane and the term |z| = 0.3 represents a circle of
radius 0.3 in z-plane. Hence the common region of convergence for both the terms of x(n) is the region in
between the circles of radius |z| = 0.8 and |z| = 0.3 in the z-plane.
3. 11 Digital Signal Processing
3.3 Properties of Z-Transform
1. Linearity property
The linearity property of Z-transform states that the Z-transform of linear weighted combination of
discrete time signals is equal to similar linear weighted combination of Z-transform of individual discrete time
signals.
Let, Z{x1(n)} = X1(z) and Z{x2(n)} = X2(z) then by linearity property,
Z{a1x1(n) + a2x2(n)} = a1X1(z) + a2X2(z) ; where, a1 and a2 are constants.
Proof :
By definition of Z-transform,
+∞
X1(z) = Z{x1(n)} = ∑ x (n) z
n = −∞
1
−n
.....(3.8)

+∞
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

= a1 X1(z) + a2 X 2(z) Using equations (3.8) and (3.9).

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

= z− m X(z) Using equation (3.10).


Chapter 3 - Z - Transform 3. 12
By definition of Z-transform,
+∞
Z{x(n + m)} = ∑ x(n + m) z
n = −∞
−m
Let, n + m = p, \ n = p – m
+∞ when n ® -¥, p ® -¥
= ∑ x(p) z
p = −∞
−(p − m)
when n ® +¥, p ® +¥

+∞
= ∑ x(p) z
p = −∞
−p
zm
+∞ +∞
= zm ∑
p = −∞
x(p) z− p = zm ∑ x(n) z
n = −∞
−n
Let, p → n

= zm X(z) Using equation (3.10).

Case ii: One-sided Z-transform


Let x(n) be a discrete time signal defined in the range 0 < n < ¥ .
Let, Z{x(n)} = X(z)
Now by shifting property,
m
l q
Z x(n − m) = z − m X(z) + ∑ x( − i) z− ( m − i)
i=1
m−1
l q
Z x(n + m) = z m X(z) − ∑ x( i) z( m − i)
i=0

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

+∞ LM +∞ OP Using equation (3.21).


= ∑
n = −∞ MN ∑
m = −∞
x1(m) x 2 (n − m) z− n
PQ
+∞ +∞
Multiply by zm and z –m
= ∑ ∑ x1(m) x 2(n − m) z− n z− m zm
n = −∞ m = −∞
+∞ +∞
= ∑ x1(m) z− m ∑ x 2(n − m) z−( n − m)
Let, n – m = p
m = −∞ n = −∞
+∞ +∞ when n ® -¥, p ® -¥
= ∑ x1(m) z− m ∑ x 2(p) z− p when n ® +¥, p ® +¥
m = −∞ p = −∞

LM +∞ OP LM+∞ OP Let m = n, in first summation.


=
MN ∑
n = −∞
x1(n) z− n
PQ MN ∑
n = −∞
x 2(n) z− n
PQ Let p = n, in second summation.

= X1( z) X 2( z) Using equations (3.22) and (3.23).

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).

9. Initial value theorem

Let x(n) be an one-sided signal defined in the range 0 £ n £ ¥.

Now, if Z{x(n)} = X(z),

then the initial value of x(n) [i.e., x(0)] is given by,

x(0) = Lt X(z)
z→∞

Proof :

By definition of one-sided Z - transfrom,

+∞
X( z) = ∑ x(n) z −n

n=0

On expanding the above summation we get,

X( z) = x(0) + x(1) z−1 + x(2) z−2 + x(3) z−3 + ......


x(1) x(2) x(3)
∴ X( z) = x(0) + + 2
+ + ......
z z z3

On taking limit z ® ¥ in the above equation we get,

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

= x( −1) − Lt (1 − z−1) X(z) .....(3.28)


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 z–n
= ∑
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 ® ¥.

LM x(−1) − x(0) + x(0) − x(1) + x(1) − x(2) + ..... OP


= Lt
p→∞ MN ..... + x(p − 2) − x(p −1) + x(p −1) − x(p) PQ
= Lt x(−1) − x(p)
p→∞

= x( −1) − x(∞) .....(3.29)

On equating equation (3.29) with (3.28) we get,


x( − 1) − x(∞) = x( −1) − Lt (1 − z−1) X(z)
z→1

∴ x(∞) = Lt (1 − z−1) X(z)


z→1
Chapter 3 - Z - Transform 3. 18
11. Complex convolution theorem (or Multiplication in time domain)
Let, Z {x1(n)} = X1(z) and Z {x2(n)} = X2(z).
Now, the complex convolution theorem states that,

m
Z x1 (n) x2 (n) = r 1
2 πj z
C
X (v) X
1 2
FH vz IK v −1
dv

where, v is a dummy variable used for contour integration


Proof :

Let, Z {x1(n)} = X1(z) and Z {x2(n)} = X2(z).

Now, by definition of inverse Z-transform,

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)

Now, by definition of Z-transform,

+∞
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).

12. Parseval’s relation


If Z {x1(n)} = X1(z) and Z {x2(n)} = X2(z).

Then the Parseval’s relation states that,


+∞

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 :

Let, Z {x1(n)} = X1(z) and Z {x2(n)} = X2(z).

Now, by definition of inverse Z-transform,

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)

Now, by definition of Z-transform,


+∞
m
Z x 2( n) = r ∑ x2(n) z− n .....(3.33)
n = −∞

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).

Let us take limit z ® 1 in the above equation,


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

x(n); for n ³ 0 x(n – m) z − m X(z) + ∑ x( − i ) z − ( m − i )


i=1

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)

Time reversal x(-n) X(z-1)

Conjugation x *(n) X *(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 = −∞

Initial value x( 0) = Lt X(z)


z→∞

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
+∞

∑ x (n) x (n) = 2πj


n = −∞
1

2
1
z
C
F I
X1 ( z) X∗2 1∗ z −1 dz
H K
z
3. 21 Digital Signal Processing
Example 3.3
Find the one-sided Z-transform of the following discrete time signals.
a) x(n) = n a(n – 1) b) x(n) = n3
Solution
a) Given that, x(n) = n a(n – 1)
Let, x1(n) = an
By definition of one-sided Z-transform,
∞ ∞ ∞
−1 n 1 z
X1(z) = ∑ x1(n) z −n = ∑ a n z −n = ∑ da z i = =
1 − a z −1 z − a
Using infinite geometric
n = 0 n = 0 n = 0 series sum formula.
Let, x1(n – 1) = an – 1
By shifting property,
z 1
Z{x1(n − 1)} = z −1 X1(z) = z −1 =
z−a z−a
Given that, x(n) = n an − 1 If Z{x(n)} = X(z)
d d
Z{x(n)} = Z{n an − 1} = Z{n x1 (n − 1)} = − z X1(z) then Z{n x(n)} = −z X(z)
dz dz
d 1 −1 z
= −z = −z × =
dz z − a (z − a)2 (z − a)2
b) Given that, x(n) = n3
Let us multiply the given discrete time signal by a discrete unit step signal,
\ x(n) = n3 u(n)
e c n e u q Ne es d e d i s - a ev n os t ai t o. r ge nu il y l p i t l u M
By the property of Z-transform, we get,
m
Z {nmu(n)} =
FG −z d IJ U(z)
H dz K
z
where, U(z) = Z {u(n)} =
z − 1
u v du − u dv
∴ −z
d
U(z) = −z
LM d FG z IJ OP = −z LM z − 1 − z OP = z d =
v v 2
dz N dz H z − 1K Q N (z − 1) Q (z − 1) 2 2

F d IJ U(z) = −z d LM−z d U(z)OP = −z d LM z OP = −z FG (z − 1) − z × 2(z − 1) IJ


∴ G −z
2 2

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

∴ Znn u(n)s = G −z J U(z) =


3
H dz K bz − 1g 4
Chapter 3 - Z - Transform 3. 22
Example 3.4
Find the one-sided Z-transform of the discrete time signals generated by mathematically sampling the
following continuous time signals.
a) t2 b) sinΩo t c) cos Ωo t
Solution
a) Given that, x(t) = t2
The discrete time signal is generated by replacing t by nT, where T is the sampling time period.
\ x(n) = (nT)2 = n2 T2 = n2 g(n) m r If Z g(n) = G(z)
m
where, g(n) = T 2 F d IJ
then Znn g(n)s = G −z
m
G(z)
By the definition of one-sided Z-transform we get, H dz K
G(z) = Z {g(n)} = Z {T 2 } = ∑

T 2 z −n = T 2

∑ (z −1)n = T 2
FG 1 IJ = T z 2

n = 0 n = 0
H1 − z K z − 1−1

By the multiplication by nm property of Z-transform we get,


2 u v du − u dv
X(z) = Z{x(n)} = Z{n2 g(n)} = −z
FG IJ G(z) = −z d FG −z d G(z)IJ
d d = 2
H K dz dz H dz K v v

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

2z2 − z (ejω + e − jω ) z2 − z(e jω + e− jω ) / 2


= = 2
2
2 [z − z (e + e ) + 1] z − z (e jω + e− jω ) + 1
jω − jω

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 = e–anT 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

b) Given that, x(t) = e– a t sinΩ ot


The discrete time signal x(n) is generated by replacing t by nT, where T is the sampling time period.
\ x(n) = e– a nT sinW 0 n T = e–anT sin wn ; where w = W 0T
By the definition of one-sided Z-transform we get,
∞ ∞
Fe jωn
− e − jωn I e jθ − e − jθ
X(z) = Z {x(n)} = ∑ e− anT sin ωn z −n = ∑ e − anT GH 2j
z −n JK sinθ =
2j
n =0 n=0

1 n 1 ∞ n
=
2j
∑ de − aT
e jω z −1 i −
2j

n= 0
de − aT − jω
e z −1 i Infinite geometric
n=0
series sum formula,
1 1 1 1 ∞
1
= −
2j 1 − e− aT e jω z −1 2j 1 − e − aT e− jω z −1 ∑
n =0
Cn =
1 − C
1 1 1 1
= −
2j 1 − e jω / z eaT 2j 1 − e − jω / z eaT
1 z eaT 1 z eaT
= aT jω

2j z e − e 2j z e − e− jω
aT

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

sinΩ0 t u t bg sinΩ0 nT u(nT)


z sin ω z −1 sin ω
= sin wn u(nT) 2 |z| > 1
z − 2z cos ω + 1 1 − 2z −1 cos ω + z −2
where, w = W 0T

cosΩ0 t u t bg cosΩ0 nT u(nT)


= cos wn u(nT) z (z − cos ω) 1 − z −1 cos ω |z| > 1
2
where, w = W 0T z − 2z cos ω + 1 1 − 2z−1 cos ω + z −2

N a s tu oa c . ) e 0 r a³ )na n g(r uio asf ny gbdl i e sdn ei eif hle T


angi s ehT .2 asuac i tna era )1 – n–(u yb de i lpi t lm
u sl angi s l . )0£ n rof deni fed( s l
3. 27 Digital Signal Processing

3.4 Poles and Zeros of Rational Function of z


Let, X(z) be Z-transform of x(n). When X(z) is expressed as a ratio of two polynomials in z or z–1, then X(z)
is called a rational function of z.
Let X(z) be expressed as a ratio of two polynomials in z, as shown below.

N(z) b + b1z −1 + b2 z −2 + b 3z −3 + ..... + b M z − M .....(3.35)


X( z) = = 0
D(z) a 0 + a1z −1 + a 2 z −2 + a 3z−3 + ..... + a N z − N

where, N(z) = Numerator polynomial of X(z)


D(z) = Denominator polynomial of X(z)
In equation (3.35) let us scale the coefficients of numerator polynomial by b0 and that of denominator
polynomial by a0, and then convert the polynomials to positive power of z as shown below.

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)

The roots of quadratic, z2 – 0.8z + 0.12 = 0 are,


0.8 ± 0.82 − 4 × 0.12 0.8 ± 0.4
z = = = 0.6, 0.2
2 2
∴ z2 − 0.8z + 0.12 = (z − 0.6) (z − 0.2)

The roots of quadratic, z2 + 0.8z + 0.32 = 0 are,

−0.8 ± 0.82 − 4 × 0.32 −0.8 ± −0.64 −0.8 ± j0.8


z = = = = − 0.4 ± j0.4
2 2 2
∴ z2 + 0.8z + 0.32 = (z + 0.4 − j0.4) (z + 0.4 + j0.4)
The zeros of X(z) are roots of numerator polynomial, which
has two roots. jv
j0.8
Therefore, the zeros of X(z) are, z -p la n e
j0.6

z1 = 0.6, z2 = 0.2 p1
j0.4
j0.2
The poles of X(z) are roots of denominator polynomial, z2 z1

-0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 u


which has two roots.
-j0.2
Therefore, the poles of X(z) are, p2 -j0.4
-j0.6
p1 = – 0.4+j0.4, p2 = – 0.4 – j0.4 F ig 3.8 : P o le-zero p lo t of
X (z) o f e q ua tio n (3 .3 7). -j0.8
The pole-zero plot of X(z) is shown in fig 3.8.
3. 29 Digital Signal Processing
3.4.2 ROC of Rational Function of z
Case i: Right-sided (causal) signal
Let x(n) be a right-sided (causal) signal defined as,
x( n) = r1n u(n) + r2n u(n) + r3n u(n) ; where r1 < r2 < r3
z
Now, the Z-transform of x(n) is, Z{a n u(n)} =
z−a
z z z with ROC |z| > |a|
X( z) = + +
z − r1 z − r2 z − r3
N ( z)
=
(z − r1 ) (z − r2 ) (z − r3 )
where, N(z) = z(z – r2) (z – r3) + z(z – r1) (z – r3) + z(z – r1) (z – r2)
The poles of X(z) are, jv
R O C of x (n) z -p la n e
p1 = r1, p2 = r2, p3 = r3 r3

r2
The convergence criteria for X(z) are,
r1
r1 r 2 r3
|z| > |r1| ; |z| > |r2| ; |z| > |r3| u

Since r1 < r2 < r3, the ROC is exterior of the circle of


radius r3 in z-plane as shown in fig.3.9. In terms of poles of
X(z) we can say that the ROC is exterior of a circle, whose
radius is equal to the magnitude of outer most pole (i.e., F ig 3.9 : R O C o f x (n ) = r 1 u (n)+ r 2 u (n )
pole with largest magnitude) of X(z). + r 3 u (n ) w here r 1 < r 2 < r 3 .
Case ii: Left-sided (anticausal) signal
Let x(n) be a left-sided (anticausal) signal defined as,
x( n) = − r1n u( − n − 1) − r2n u( − n − 1) − r3n u( − n − 1) ; where r1 < r2 < r3
Now, the Z-transform of x(n) is, z
z z z Z{−a n u( − n − 1)} =
X( z ) = + + z−a
z − r1 z − r2 z − r3 with ROC |z| < |a|
N ( z)
=
(z − r1 ) (z − r2 ) (z − r3 )
where, N(z) = z(z – r2) (z – r3) + z(z – r1) (z – r3) + z(z – r1) (z – r2)
The poles of X(z) are, jv z -p la n e
p1 = r1, p2 = r2, p3 = r3
The convergence criteria for X(z) are,
|z| < |r1| ; |z| < |r2| ; |z| < |r3|
r1 r2 r 3 u
Since r1 < r2 < r3, the ROC is interior of the circle of
radius r1 in z-plane as shown in fig.3.10. In terms of poles
of X(z) we can say that the ROC is interior of a circle,
whose radius is equal to the magnitude of inner most R O C o f x (n )
F ig 3 .1 0 : R O C o f x (n ) = −r 1 u ( −n −1) −r 2 u ( −n −1)
pole (i.e., pole with smallest magnitude) of X(z).
−r 3 u( −n −1) w h ere r 1 < r 2 < r 3 .
Chapter 3 - Z - Transform 3. 30
Case iii: Two-sided (noncausal) signal
Let x(n) be two-sided signal defined as,
x( n) = r1n u(n) + r2n u(n) − r3n u( − n − 1) − r4n u( − n − 1) ; where r1 < r2 < r3 < r4
Now, the Z-transform of x(n) is,
z z z z N ( z)
X( z) = + + + =
z − r1 z − r2 z − r3 z − r4 (z − r1 ) (z − r2 ) (z − r3 ) (z − r4 )

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

3.5 Inverse Z-Transform


Let X(z) be Z-transform of the discrete time signal x(n).The inverse Z-transform is the process of
recovering the discrete time signal x(n) from its Z-transform X(z). The signal x(n) can be uniquely determined
from X(z) and its ROC.
The inverse Z-transform can be determined by the following three methods.
1. Direct evaluation by contour integration (or residue method).
2. Partial fraction expansion method.
3. Power series expansion method.

3.5.1 Inverse Z -Transform by Contour Integration or Residue Method


Let, X(z) be Z-transform of x(n).
Now by definition of inverse Z-transform,

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

Using equation (3.39) the equation (3.38) can be written as,

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.

3.5.2 Inverse Z -Transform by Partial Fraction Expansion Method


Let X(z) be Z-transform of x(n), and X(z) be a rational function of z. Now the function X(z) can be
expressed as a ratio of two polynomials in z as shown below. (Refer equation 3.35).

N(z) .....(3.44)
X( z ) =
D ( z)

where, N(z) = Numerator polynomial of X(z)


D(z) = Denominator polynomial of X(z)
Let us divide both sides of equation (3.44) by z and express equation (3.44) as shown below.
X( z) N(z)
=
z z D( z)
X( z) Q(z) .....(3.45)
∴ =
z D( z)
N(z)
where, Q(z) =
z
X(z)
Note : It is convenient, if we consider rather than X(z) for inverse Z-transform by partial
z
fraction expansion method.
3. 33 Digital Signal Processing
On factorizing the denominator polynomial of equation (3.45) we get,
X( z) Q(z) Q(z) .....(3.46)
= =
z D( z) (z − p1 ) (z − p 2 ) (z − p3 ) ..... (z − p N )
where, p1, p2, p3, .....pN are roots of denominator polynomial [as well as poles of X(z)].
The equation (3.46) can be expressed as a series of sum terms by partial fraction expansion technique
as shown below.
X( z) A1 A2 A3 AN
= + + + ..... +
z z − p1 z − p2 z − p3 z − pN
where, A1, A2, A3, ..... AN are residues.
z z z z
∴ X(z) = A1 + A2 + A3 + ..... + A N
z − p1 z − p2 z − p3 z − pN.....(3.47)
Now, the inverse Z-transform of equation (3.47) is obtained by comparing each term with standard
Z-transform pair. The two popular Z-transform pairs useful for inverse Z-transform of equation (3.47) are
given below.
If an is a causal (or right-sided) signal then,
z
o t
Z a n u(n) =
z−a
; with ROC z > a

If an is an anticausal (or left-sided) signal then,


z
o t
Z −a n u( − n − 1) =
z−a
; with ROC z < a

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

Case ii : When roots (or poles) have multiplicity


X(z)
Let one pole have a multiplicity of q (i.e., repeats q times). In this case is expressed as,
z
X( z) Q(z) Q( z)
= =
z D(z) ( z − p1 ) (z − p2 )......( z − p x ) q ......( z − p N )
A1 A2
= + + .....
( z − p1 ) ( z − p2 )
A x0 A x1 A x ( q −1) AN
+ q
+ q −1
+ ...... + + ..... +
( z − px ) ( z − px ) ( z − px ) (z − pN )

where, A x0 , A x1 , ...... A x(q-1) are residues of repeated root (or pole), z = px


The residues of distinct real roots are evaluated as explained in case i.
The residue Axr of repeated root is obtained as shown below.

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

Case iii : When roots (or poles) are complex conjugate

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.

3.5.3 Inverse Z -Transform by Power Series Expansion Method


Let X(z) be Z-transform of x(n), and X(z) be a rational function of z as shown below.
N(z) b + b1 z−1 + b 2 z −2 + b3 z −3 + ..... + b M z − M
X( z) = = 0
D(z) a 0 + a1 z−1 + a 2 z −2 + a 3 z −3 + ..... + a N z − N
On dividing the numerator polynomial N(z) by denominator polynomial D(z) we can express X(z) as a
power series of z. It is possible to express X(z) as positive power of z or as negative power of z or with both
positive and negative power of z as shown below.

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)

X(z) 0.5 6 8.5


= − +
z z z − 1 z − 2
z z
∴ X(z) = 0.5 − 6 + 8.5
z − 1 z − 2
On taking inverse Z-transform of X(z) we get,
Z{δ(n)} = 1
x(n) = 0.5 d(n) – 6 u(n) + 8.5 (2)n u(n) = 0.5 d(n) + [–6 + 8.5(2)n] u(n)
z
Z{u(n)} =
When n = 0, x(0) = 0.5 – 6 + 8.5 ´ 20 = 3 z − 1
z
When n = 1, x(1) = 0–6 + 8.5 ´ 21 = 11 Z{anu(n)} =
z − a
When n = 2, x(2) = 0–6 + 8.5 ´ 22 = 28
When n = 3, x(3) = 0–6 + 8.5 ´ 23 = 62
When n = 4, x(4) = 0 – 6 + 8.5 ´ 24 = 130

\ x(n) = {3, 11, 28, 62, 130, .....}


-
Method-3 : Power Series Expansion Method

3 + 2z −1 + z −2
Given that, X(z) =
1 − 3z −1 + 2z −2

Let us divide the numerator polynomial by denominator polynomial as shown below.


3 + 11z–1 + 28z–2 + 62z–3 + 130z–4 + ......
–1
1 – 3z + 2z –2
3 + 2z–1 + z –2
3 – 9z–1 + 6z–2
(–) (+) (–)

11z – 5z–2
–1

11z–1 – 33z–2 + 22z–3


(–) (+) (–)
28z –2 – 22z–3
28z–2 – 84z–3 + 56z–4
(–) (+) (–)
62z–3 – 56z–4
62z–3 – 186z –4 + 124z–5
(–) (+) (–)
130z –4 – 124z–5
:
:

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 = −∞

= . ....+ x(0) + x(1) z −1 + x(2) z −2 + x(3) z −3 + x(4) z −4 +...... .....(2)

On comparing equations (1) and (2) we get,


x(0) = 3
x(1) = 11
x(2) = 28
x(3) = 62
x(4) = 130 and so on.

\ x(n) = {3, 11, 28, 62, 130, .....}


-
Conclusion : It is observed that the results of all the three methods are same.
Example 3.8
Determine the inverse Z-transform of the following z-domain functions.

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.

3z2 + 2z + 1 −10z − 8 −10z − 8


X(z) = = 3+ 2 =3+ 3
z2 + 4z + 3 z + 4z + 3 (z + 1) (z + 3)
z2 + 4z + 3 3z2 + 2z + 1
A1 A2 3z2 + 12z + 9
By partial fraction expansion we get, X(z) = 3 + + (–) (–) (–)
z + 1 z + 3 –10z – 8

−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

X(z) 3z2 + 2z + 1 3( −1)2 + 2( −1) + 1


A2 = (z + 1) = (z + 1) = = −1
z z= −1 z(z + 1) (z + 3) z = −1
−1 × ( −1 + 3)
2
X(z) 3z + 2z + 1 3( −3)2 + 2( −3) + 1 22 11
A3 = (z + 3) = (z + 3) = = =
z z= −3 z(z + 1) (z + 3) z = −3
−3 × ( −3 + 1) 6 3
X(z) 1 1 1 11 1
∴ = − +
z 3 z z + 1 3 z + 3
1 z 11 z Z{δ(n)} = 1
∴ X(z) = − +
3 z + 1 3 z + 3 z
Z{an u(n)} =
1 z 11 z z − a
= − +
3 z − ( −1) 3 z − ( −3)

On taking inverse Z-transform of X(z) we get,


1 11 1 11
x(n) = d(n) – (–1)n u(n) + (–3)n u(n) = d(n) + [– (–1)n + (–3)n] u(n)
3 3 3 3
1 11
When n = 0, x(0) = –1+ = 3
3 3
11
When n = 1, x(1) = 0 + 1 + ´ –3 = – 10
3
11
When n = 2, x(2) = 0 – 1 + ´ (–3)2 = 32
3
11
When n = 3, x(3) = 0 + 1 + ´ (–3)3 = – 98
3 Note: The closed form expression of
11 x(n) in the two methods look different,
When n = 4, x(4) = 0 – 1 + ´ (–3)4 = 296 but on evaluating x(n) for various values of
3
\ x(n) = {3, –10, 32, –98, 296, .....} n we get same signal x(n).
-
Chapter 3 - Z - Transform 3. 40

z − 0.6 The roots of the quadratic


b) Given that, X(z) = 2
z + z + 2 z2 + z + 2 = 0 are,
z − 0.6 z − 0.6 −1 ± 1 − 4 × 2
X(z) = = z=
z2 + z + 2 (z + 0.5 − j1.323 (z + 0.5 + j1.323) 2
By partial fraction expansion we get, −1 ± j 7
=
2
A A* = −0.5 ± j1.323
X(z) = +
z + 0.5 − j1.323 z + 0.5 + j1.323

z − 0.6
A = (z + 0.5 − j1.323)
(z + 0.5 − j1.323) (z + 0.5 + j1.323) z = − 0.5 + j1.323

z − 0.6 −0.5 + j1.323 − 0.6


= =
(z + 0.5 + j1.323) z = − 0.5 + j1.323
−0.5 + j1.323 + 0.5 + j1.323
−1.1 + j1.323 −1.1 j1.323
= = + = 0.5 + j0.416
j2.646 j2.646 j2.646

∴ 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

= 0.65 (1.414)(n – 1) [1 Ð (0.61n – 0.4)p + 1 Ð – (0.61n – 0.4)p] u(n – 1)


= 0.65 (1.414)(n – 1) [cos ((0.61n – 0.4)p) + j sin((0.61n – 0.4)p) + cos((0.61 n – 0.4)p)
–j sin((0.61n – 0.4)p) ] u(n – 1)
= 0.65 (1.414)(n – 1) 2 cos ((0.61n – 0.4)p) u(n – 1)
= 1.3 (1.414)(n –1) cos ((0.61n – 0.4)p) u(n – 1)
3. 41 Digital Signal Processing

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)} = z–1 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

0.5 + j0.5 0.5 + j0.5


= = = − j ( j0.5 + 0.5) = 0.5 − j0.5
0.5 + j0.5 − 0.5 + j0.5 j10
.
∴ A∗ = (0.5 − j0.5)∗ = 0.5 + j0.5
X(z) 0.5 − j0.5 0.5 + j0.5
∴ = +
z z − 0.5 − j0.5 z − 0.5 + j0.5
(0.5 − j0.5) z (0.5 + j0.5) z
X(z) = +
z − (0.5 + j0.5) z − (0.5 − j0.5) z
z{an u(n)} = ;
z−a
On taking inverse Z-transform of X(z) we get,
ROC |z|>|a|
x(n) = (0.5 – j0.5) (0.5 + j0.5)n u(n) + (0.5 + j0.5) (0.5 – j0.5)n u(n)
Alternatively the above result can be expressed as shown below. π
180 o = π rad ; ∴ 1o = rad
Here, 0.5 + j0.5 = 0.707Ð 45 o
= 0.707Ð 0.25p 180
45
∴ 45o = π = 0.25π rad
0.5 – j0.5 = 0.707Ð –45o = 0.707Ð – 0.25p 180
\ x(n) = [0.707Ð – 0.25p] [0.707 Ð 0.25p]n u(n) + [0.707Ð 0.25p] [0.707Ð – 0.25p]n u(n)
= [0.707Ð –0.25p] [0.707n Ð 0.25pn] u(n) + [0.707 Ð 0.25p] [0.707n Ð –0.25pn] u(n)
= 0.707(n + 1) Ð (0.25p (n – 1)) u(n) + 0.707(n + 1) Ð (–0.25p(n – 1)) u(n)
= 0.707(n + 1) [1Ð 0.25p (n – 1) + 1Ð –0.25p(n – 1)]u(n)
= 0.707(n + 1) [cos (0.25p (n – 1)) + j sin (0.25p(n – 1)) + cos (0.25p(n – 1)) – j sin (0.25p(n – 1))] u(n)
= 0.707(n + 1) 2 cos (0.25p (n – 1)) u(n)
3. 43 Digital Signal Processing

1 + z −1 The roots of the quadratic


c) Given that, X(z) =
1 − z −1 + 0.5z −2 z2 – z + 0.5 = 0 are,
1 + z −1 z −1(z + 1) 1 ± 1 − 4 × 0.5
z=
X(z) = −1 −2
= −2 2 2
1 − z + 0.5 z z (z − z + 0.5)
= 0.5 ± j0.5
z (z + 1) z (z + 1)
= =
(z2 − z + 0.5) (z − 0.5 − j0.5) (z − 0.5 + j0.5)
By partial fraction expansion, we can write,
X(z) (z + 1) A A∗
= = +
z (z − 0.5 − j0.5) (z − 0.5 + j0.5) 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 + 1)
= (z − 0.5 − j0.5)
(z − 0.5 − j0.5) (z − 0.5 + j0.5) z = 0. 5 + j 0 . 5

0.5 + j0.5 + 1 . + j0.5


15
= = = − j( j0.5 + 15
. ) = 0.5 − j15
.
0.5 + j0.5 − 0.5 + j0.5 j1
A∗ = (0.5 − j15
. )∗ = 0.5 + j15
.
X(z) 0.5 − j15
. 0.5 + j15
.
∴ = + z
z z − 0.5 − j0.5 z − 0.5 + j0.5 Z {an u(n)} =
z−a
z z
X(z) = (0.5 − j15
. ) + (0.5 + j15
. )
z − (0.5 + j0.5) z − (0.5 − j0.5)
On taking inverse Z-transform of X(z) we get,
x(n) = (0.5 – j1.5) (0.5 + j0.5)n u(n) + (0.5 + j1.5) ( 0.5 – j0.5)n u(n)
Alternatively the above result can be expressed as shown below. π
180o = π rad ; ∴ 1o = rad
180
Here, 0.5 – j1.5 = 1.581Ð –71.6 o = 1.581Ð –0.4p .
716
. o =
∴ 716 π = 0.4 π rad
0.5 + j1.5 = 1.581Ð 71.6 o = 1.581Ð 0.4p 180
0.5 + j0.5 = 0.707Ð 45o = 0.707Ð 0.25p 45
∴ 45o = π = 0.25π rad
180
0.5 – j0.5 = 0.707Ð –45o = 0.707Ð –0.25p
\ x(n) = [1.581Ð –0.4p] [0.707Ð 0.25p]n u(n) + [1.581Ð 0.4p] [0.707Ð –0.25p]n u(n)
= [1.581Ð –0.4p] [0.707nÐ 0.25pn] u(n) + [1.581Ð 0.4p] [0.707nÐ –0.25pn] u(n)
= 1.581 (0.707)n [1Ð p(0.25n – 0.4) + 1Ð –p(0.25n – 0.4)] u(n)
= 1.581 (0.707)n [cos (p(0.25n – 0.4)) + j sin (p(0.25n – 0.4)) + cos (p(0.25n – 0.4))
– j sin (p(0.25n – 0.4))] u(n)
= 1.581 (0.707)n 2 cos (p(0.25 n – 0.4)) u(n)
= 3.162 (0.707)n cos (p(0.25n – 0.4)) u(n)

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
(−) (+) (−)

209.6875 z −4 − 208.6875 z−5


M
3. 45 Digital Signal Processing
1
∴ X(z) =
1 − 4.5 z −1 + 3.5 z−2
= 1 + 4.5 z −1 + 16.75 z −2 + 59.625 z −3 + 209.6875 z −4 + ..... .....(1)
If X(z) is Z-transform of x(n) then, by the definition of Z-transform we get,

X(z) = Z {x(n)} = ∑
n = −∞
x(n) z −n

For a causal signal,



X(z) = ∑ x(n) z −n

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)

If X(z) is Z-transform of x(n) then, by the definition of Z-transform we get,



X(z) = Z {x(n)} = ∑
n = −∞
x(n) z −n
0
For an anticausal signal, X(z) = ∑ x(n) z −n
n = −∞
On expanding the summation we get,
X(z) = ..... x(−6) z6 + x(−5) z5 + x(−4) z4 + x(−3) z3 + x(−2) z2 + x(−1) z + x(0) .....(4)
Chapter 3 - Z - Transform 3. 46
On comparing the two power series of X(z) [equations (3) and (4)], we get,
x(0) = 0 ; x( −1) = 0 ; x( −2) = 0.286 ; x( −3) = 0.368 ; x( −4) = 0.391 ;
x( −5) = 0.398 ; x(−6) = 1.4 ; .....
l
∴ x(n) = ........ , 1.4, 0.398, 0.391, 0.368, 0.286, 0, 0
Aq
Example 3.11
1
Determine the inverse Z-transform of X(z) =
1 − 0.8 z−1 + 0.12 z−2
a) if ROC is, |z| > 0.6 b) if ROC is, |z| < 0.2 c) if ROC is, 0.2 < |z| < 0.6
Solution
1 1 z2
Given that, X(z) = −1 −2
= −2 2
=
1 − 0.8 z + 0.12 z z (z − 0.8z + 0.12) (z − 0.6) (z − 0.2)
X(z) z
∴ =
z (z − 0.6) (z − 0.2) The roots of quadratic z2 − 0.8z + 0.12 = 0 are,
By partial fraction expansion technique we get,
0.8 ± 0.82 − 4 × 0.12 0.8 ± 0.4
X(z) z A1 A2 z = = = 0.6, 0.2
= = + 2 2
z (z − 0.6) (z − 0.2) z − 0.6 z − 0.2
X(z) z 0.6
A1 = (z − 0.6) = (z − 0.6) = = 1.5
z z= 0.6 (z − 0.6) (z − 0.2) z = 0.6 0.6 − 0.2
X(z) z 0.2
A2 = (z − 0.2) = (z − 0.2) = = −0.5
z z= 0.2 (z − 0.6) (z − 0.2) z = 0.2 0.2 − 0.6
X(z) 1.5 0.5
∴ = −
z z − 0.6 z − 0.2
z z
∴ X(z) = 1.5 − 0.5
z − 0.6 z − 0.2
Now, the poles of X(z) are p1 = 0.6, p2 = 0.2

a) ROC is |z| > 0.6


The specified ROC is exterior of the circle whose radius corresponds to the largest pole, hence x(n) will be
a causal (or right- sided) signal. (Refer section 3.4.2). z
\ x(n) = 1.5(0.6)n u(n) – 0.5 (0.2)n u(n) Z {an u(n)} = ; ROC |z|>|a|
z−a

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

C om bined R O C : |z| > 0.6


jv
z -p la n e
.6
=0
|z |

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

C om bined R O C : |z| < 0.2


jv
z -p la n e
2
0.
|z |=

ROC u

c) ROC is 0.2 < |z| < 0.6


The specified ROC is the region in between two circles of radius 0.2 and 0.6. Hence the term corresponds
to the pole, p1 = 0.6 will be anticausal signal (because |z| < 0.6) and the term corresponds to the pole, p2 = 0.2,
will be a causal signal (because |z| > 0.2). (Refer section 3.4.2).
\ x(n) = 1.5(–(0.6)n u(–n –1)) – 0.5 (0.2)n u(n)
= –1.5(0.6)n u(–n –1)) – 0.5 (0.2)n u(n)

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

C om bined R O C : 0.2 < |z | < 0.6


jv
z -p la n e
ROC
.2
=0
|z|
u
|z |
=0
.6
Chapter 3 - Z - Transform 3. 48
3.6 Analysis of LTI Discrete Time System Using Z-Transform
3.6.1 Transfer Function of LTI Discrete Time System
Let x(n) be the input and y(n) be the output of an LTI discrete time system. The mathematical equation
governing the input-output relation of an LTI discrete time system is given by, (refer Chapter 2, equation (2.17)).
N M
y( n) = − ∑ a m y( n − m) + ∑ bm x(n − m) .....(3.52)
m=1 m=0
The equation (3.52) is a constant coefficient difference equation and N is the order of the system.
Let us take Z-transform of equation (3.52) with zero initial conditions (i.e., y(n) = 0 for n < 0 and
x(n) = 0 for n < 0).

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

= − ∑ a Z ly( n − m)q + ∑ b Z lx( n − m)q


m m
.....(3.53)
m=1 m=0

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

On expanding the summations in the above equation we get,


Y( z) b + b1 z−1 + b 2 z −2 + b 3 z −3 + ..... + b M z − M .....(3.54)
= 0
X( z) 1 + a1 z −1 + a 2 z −2 + a 3 z−3 + ..... + a N z− N
The transfer function of a discrete time system is defined as the ratio of Z-transform of output and
Z-transform of input. Hence the equation (3.54) is the transfer function of an LTI discrete time system.
The equation (3.54) is a rational function of z–1 (i.e., ratio of two polynomials in z–1). The numerator and
denominator polynomials of equation (3.54) are converted to positive power of z and then expressed in the
factorized form as shown in equation (3.55). [Refer equation (3.36)].
Y( z) (z − z1 ) (z − z2 ) (z − z3 ) ..... (z − z N ) .....(3.55)
= G Let M = N
X( z) (z − p1 ) (z − p2 ) (z − p 3 ) ..... (z − p N )
where, z1, z2, z3, ..... zN are roots of numerator polynomial (or zeros of discrete time system)
p1, p2, p3, ..... pN are roots of denominator polynomial (or poles of discrete time system).
3. 49 Digital Signal Processing
3.6.2 Impulse Response and Transfer Function
Let, x(n) = Input of an LTI discrete time system
y(n) = Output or 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)].
+∞
∴ y(n) = x(n) ∗ h(n) = ∑ x(m) h(n − m)
m = −∞ If Z{x(n)} = X(z)
On taking Z-transform of the above equation we get, and Z{h(n)} = H(z)
Z {y(n)} = Z {x(n) * h(n)} then by convolution property,
Z{x(n) *h(n)} = X(z) H(z)
Using convolution property of Z-transform, the above equation
can be written as,
Y( z) = X(z) H(z)
Y(z) .....(3.56)
∴ H(z) =
X(z)
Y(z) (z − z1 ) (z − z2 ) (z − z3 ) ..... (z − z N )
∴ H(z) = = G Using equation (3.55).
X(z) (z − p1 ) (z − p2 ) (z − p 3 ) ..... (z − p N )
From equation (3.56) we can conclude that the transfer function of an LTI discrete time system is also
given by Z-transform of the impulse response.
Alternatively, we can say that the inverse Z-transform of transfer function is the impulse response of
the system.

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

On substituting x(n) = 0 and y(n) = yzi(n) in equation (3.57) we get,


N

∑ 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)

3.6.4 Convolution and Deconvolution Using Z-Transform


Convolution
The convolution operation is performed to find the response y(n) of an LTI discrete time system from
the input x(n) and impulse response h(n).
\ 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) .....(3.59)
\ Response, y(n) = Z–– 1{Y(z)} = Z–– 1{X(z) H(z)}
Procedure : 1. Take Z-transform of x(n) to get X(z).
2. Take Z-transform of h(n) to get H(z).
3. Get the product X(z) H(z).
4. Take inverse Z-transform of the product X(z) H(z).
3. 51 Digital Signal Processing
Deconvolution
The deconvolution operation is performed to extract the input x(n) of an LTI system from the response
y(n) of the system.
From equation (3.59) get,
Y(z)
X( z ) =
H(z)
On taking inverse Z-transform of the above equation we get,

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,
+∞

∑ h(n) < ∞ .....(3.60)


n = −∞

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 .

∑| h ( n )| < ∞; S ta ble sy ste m


n = 0

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

h (n ) = a u (n) ; a > 0 (i.e ., a is p o sitiv e) jv


U n it circ le z -p la ne
h (n ) az
H ( z) =
a z − 1
ROC is | z| > 1 1 u
pole at z = 1
+∞ ROC
n
∑| h ( n )| = ∞; U nsta b le system
n = 0 T h e p o le z = 1 lie s o n th e un it c irc le . T h e
R O C d oe s n o t c o n ta in th e u nit c irc le .

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

S inc e 0 < | −a | < 1 , th e tw o p oles at z = −a lie


in sid e th e u nit c irc le . T h e R O C c o nta ins
∞ th e u nit c ircle .
∑| h ( n )| < ∞; S tab le syste m
n = 0
Chapter 3 - Z - Transform 3. 54
Table 3.5 : Continued....
Impulse response Transfer function Location of poles in
h(n) H(z) z-plane and ROC
n
h (n ) = n a u (n) ; a > 1 U n it jv
z -p la n e
h (n ) c irc le
az
H ( z) =
(z − a) 2 a u
ROC is | z| > a
Two poles at z = a ROC
∞ S inc e a > 1 , the tw o po le s a t z = a lie ou tside
n
∑| h ( n )| = ∞; U n sta ble sy stem th e u n it c irc le . T h e R O C d oe s n o t c o ntain
n = 0 th e u n it c irc le .

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

T h e tw o p o le s a t z = −1 , lie o n th e u nit c irc le .


T h e R O C d oe s n o t c o n ta in th e u nit c irc le .

∑| 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 = −∞

Let us evaluate H(z) for z = 1.


+∞
∴ H ( z) = ∑ h(n)
n = −∞

On taking absolute value on both sides we get,


+∞ +∞
H ( z) = ∑−∞h(n) ⇒ H ( z) = ∑−∞ h(n)
n= n=

For a stable LTI discrete time system,


+∞


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 =−∞

where, x(nT) are samples of x(t) at t = nT


p (t) x (t) x p (t)

−4T −3T −2T −T 0 T 2T 3T 4T t t −4T −3T −2T −T 0 T 2T 3T 4T t


F ig 3.1 2 a : Im p u lse train . F ig 3.1 2 b : C o n tin u o us tim e sig n a l. F ig 3.1 2 c : S a m p les o f co n tin u ou s
F ig 3.1 2 : Im p u lse sa m p lin g o f co n tin u o u s tim e sig n a l. tim e sig n al.
3. 57 Digital Signal Processing
3.7.2 Transformation From Laplace Transform to Z-Transform
Let x(t) be a continuous time signal, and xp(t) be its impulse sampled version of discrete time signal.
From equation (3.62) we get,

L{d(t)} = 1
xp (t) = ∑ x(nT) δ( t − nT) If L{x(t)} = X(s) then
n =−∞ by time shifting property
On taking Laplace transform of the above equation we get, L{x(t–a)} = e–as X(s)

l q R| x(nT) δ(t − nT)U| = x(nT) Llδ(t − nT)q


∞ ∞
L x P ( t ) = X P ( s) = L S| ∑ V| ∑
T n =−∞ W n =−∞
∞ ∞
−n
∴ X p (s) = ∑ x(nT) e = ∑ x(nT) ee j
− nsT sT
..... (3.63)
n =−∞ n =−∞

where Xp(s) is Laplace transform of xp(t).


Let us take a transformation, esT = z.
On substituting, esT = z, in equation (3.63) we get,

X p (s) = ∑ x(nT) z− n . .... (3.64)
n =−∞

The Z-transform of x(nT), using the definition of Z-transform is given by,



X(z) = ∑ x(nT) z− n . .... (3.65)
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 .

z1 = e(σ1 + jΩ1 )T = e σ1T e jΩ1T ..... (3.68)


On separating the magnitude and phase of equation (3.68) we get,

|z1| = e σ1T ; ∠ z1 = jΩ1T ..... (3.69)


From equation (3.69) the following observations can be made.
1. If s1 < 0 (i.e., s1 is negative), then the point-s1 lies on Left Half (LHP) of s-plane.
In this case, |z1| < 1, hence the corresponding point-z1 will lie inside the unit circle in z-plane.
2. If s1 = 0 (i.e., real part is zero), then the point-s1 lies on imaginary axis of s-plane.
In this case, |z1| = 1, hence the corresponding point-z1 will lie on the unit circle in z-plane.
Chapter 3 - Z - Transform 3. 58
3. If s1 > 0 (i.e., s1 is positive), then the point-s1 lies on the Right Half (RHP) of s-plane.
In this case |z1| >1, hence the corresponding point-z1 will lie outside the unit circle in z-plane.
The above discussions are applicable for mapping of any point on s-plane to z-plane.
In general all points of s-plane, described by the equation,

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.

Relation Between Frequency of Continuous Time and Discrete Time Signal


Let, W = Frequency of continuous time signal in rad/sec.
w = Frequency of discrete time signal in rad/sample.
Let, z = rejw be a point on z-plane, and s = s + jW, be a corresponding point in s-plane.
Consider the transformation,
z = esT ..... (3.72)
3. 59 Digital Signal Processing
Put, z = r ejw and s = s + jW in equation (3.72)
∴ r e jω = e( σ + jΩ ) T
r e jω = eσT e jΩT ..... (3.73)
On equating the imaginary part on either side of equation (3.73) we get,
ω
w = WT or Ω = ..... (3.74)
T
When the transformation esT = z is employed, the equation (3.74) can be used to compute the
frequency of discrete time signal for a given frequency of continuous time signal and viceversa.The
frequency of discrete time signal w is unique over the range (-p, +p), and so the mapping w = W T implies
that the frequency of continuous time signal in the interval -p/T £ W £ +p/T maps into the corresponding
values of frequency of discrete time signal in the interval -p £ w £ +p.
The mapping of s-plane to z-plane, using the transformation, esT = z is not one-to-one. Therefore 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 of the frequency of continuous time signal W to the frequency of discrete
time signal w is many-to-one. This reflects the effects of aliasing due to sampling.
Example 3.12
Determine the impulse response h(n) for the system described by the second-order difference equation,
y(n) + 4y(n – 1) + 3y(n – 2) = x(n – 1).
Solution
The difference equation governing the system is,
y(n) + 4y(n – 1) + 3y(n – 2) = x(n – 1)
Let us take Z-transform of the difference equation governing the system with zero initial conditions.
\ Z{y(n) + 4y(n – 1) + 3y(n – 2)} = Z{x(n – 1)}
Z{y(n)} + 4 Z{y(n – 1)} + 3 Z{y(n – 2)} = Z{x(n – 1)}
Y(z) + 4z–1 Y(z) + 3z–2 Y(z) = z–1 X(z) If Z {x(n)} = X(z)
then by shifting property
(1 + 4z–1 + 3z–2) Y(z) = z–1 X(z) Z {x(n – m} = z–m X(z)
If Z {y(n)} = Y(z)
Y(z) z −1 then by shifting property
∴ =
X(z) 1 + 4z −1 + 3 z −2 Z {y(n – m} = z–m Y(z)

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

The impulse response h(n) is given by inverse Z-transform of H(z).

Impulse response, h(n) = Z −1 {H(z)} = Z −1


RS 0.5z − 0.5z UV = 0.5 Z RS z UV − 0.5 Z RS z UV
−1 −1
T z + 1 z + 3W T z − (−1) W T z − (−3) W
= 0.5(–1)n u(n) – 0.5 (–3)n u(n) = 0.5[(–1)n –(–3)n] u(n)

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)} = z–2 Y(z)
(Using shifting property)
Y(z) + 0.25z–2 Y(z) = X(z)

[1 + 0.25z–2] Y(z) = X(z)


Y(z) 1
∴ Transfer function, =
X(z) 1 + 0.25z−2

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)

Using partial fraction expansion technique we can write,

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

Alternatively the impulse response can be expressed as shown below.


− j0.5 = 0.5∠ − 90° = 0.5∠ − π / 2 = 0.5 ∠ − 0.5π 180o = π rad
+ j0.5 = 0.5∠90° = 0.5∠π / 2 = 0.5 ∠0.5π π
∴ 1o = rad
n
∴ h(n) = 0.5 (0.5∠ − 0.5π) + (0.5∠0.5π) u(n) n 180
π
∴ 90 o = 90 × = 0.5 π rad
= 0.5 0.5n ∠ − 0.5nπ + 0.5n ∠0.5nπ u(n) 180

= 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} = az–mX(z)
On taking Z-transform of the difference equation Z{y(n)} = Y(z) , \ Z{ay(n – m} = az–mY(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) – 4z–1 Y(z) + 4z–2 Y(z) = X(z) – 5z–3 X(z)
[1 – 4z–1 + 4z–2] Y(z) = [1 – 5z–3] 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)} = z–m Y(z)
The difference equation governing the LTI system is,
Z{x(n)} = X(z) ; \ Z{x(n – m)} = z–m X(z)
y(n) – 3y(n – 1) – 4y(n – 2) = x(n) + 2x(n – 1)
On taking Z-transform we get,
Y(z) – 3z–1Y(z) – 4 z–2Y(z) = X(z) + 2z–1 X(z)

[1 – 3z – 1 – 4z – 2] Y(z) = [1 + 2z–1] X(z)

Y(z) 1 + 2z −1 The roots of the quadratic,


∴ = z2 − 3z − 4 = 0 are,
X(z) 1 − 3z −1 − 4z−2
Y(z) 3 ± 32 + 4 × 4
We know that = H(z) z= = 4 or – 1
X(z) 2

1 + 2z−1 z −2(z2 + 2z) z2 + 2z


∴ H(z) = −1 −2
= −2 2 =
1 − 3z − 4z z (z − 3z − 4) (z − 4) (z + 1)
By partial fraction expansion technique,
H(z) z + 2 A B
= = +
z (z − 4)(z + 1) z−4 z+1

H(z) z+2 z+2 4+2 6


A = (z − 4) = (z − 4) = = = = 12
.
z z= 4 (z − 4) (z + 1) z = 4 z+1z = 4 4 +1 5

H(z) z+2 z+2 −1+ 2 1


B = (z + 1) = (z + 1) = = = = − 0.2
z z= −1 (z − 4) (z + 1) z = −1
z−4z= −1 −1 − 4 −5

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(n) = Z–1{X(z) H(z)}


3. 63 Digital Signal Processing

Given that, h(n) = (j0.8)n u(n)


n s z −z a
Z anu(n) =
z z(z − cos ω )
∴ H(z) = Z{h(n)} =
z − j 0.8 Zlcos(ωn) u(n)q = 2
z − 2z cos ω + 1

Given that, x(n) = cos(pn) u(n)


cos p = –1
z(z − cos π) z(z + 1) z(z + 1) z
∴ X(z) = Z{x(n)} = 2 = = =
z − 2z cos π + 1 z2 + 2z + 1 (z + 1)2 z + 1
z z z2
∴ Y(z) = X(z) H(z) = × =
z + 1 z − j0.8 (z + 1) (z − j0.8)

By partial fraction expansion technique we can write,

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

j0.8 1 − j0.8 j0.8 − (j0.8)2 0.64 + j0.8


= × = = = 0.39 + j0.49
1 + j0.8 1 − j0.8 12 + 0.8 2 164
.

Y(z) A B 0.61 − j0.49 0.39 + j0.49


∴ = + = +
z z + 1 z − j0.8 z + 1 z − j0.8
z z
∴ Y(z) = (0.61 − j0.49) + (0.39 + j0.49) z
z + 1 z − j0.8 Z{an u(n)} =
z−a
z z
= (0.61 − j0.49) + (0.39 + j0.49)
z − ( −1) z − j0.8

The steady state response is obtained by taking inverse Z-transform of Y(z).


\ Steady state response, y(n) = (0.61 – j0.49) (–1)n u(n) + (0.39 + j0.49) (j0.8)n u(n)

Alternatively the steady state response can be expressed as shown below.


180o = π rad
Here, 0.61 − j0.49 = 0.78 ∠ − 38.2o = 0.78 ∠ − 0.21π
π
0.39 + j0.49 = 0.63 ∠51.5o = 0.63 ∠0.29π ∴ 1o = rad
180
− 1 = 1 ∠180o = 1 ∠π 38.2
38.2o = π = 0.21π rad
j0.8 = 0.8 ∠90o = 0.8 ∠0.5π 180
∴ y(n) = 0.78 ∠ − 0.21π [1∠π]n u(n) + 0.63∠0.29π [0.8∠0.5π ]n u(n) 515.
. o =
515 π = 0.29π rad
180
= 0.78 ∠ − 0.21π 1n ∠nπ u(n) + 0.63∠0.29π 0.8n ∠0.5nπ u(n)
90
= 0.78 ∠(n − 0.21)π u(n) + 0.63 (0.8)n ∠(0.5n + 0.29)π u(n) 90o = π = 0.5π rad
180
Chapter 3 - Z - Transform 3. 64
Example 3.17
Obtain and sketch the impulse response of shift invariant system described by,
y(n) = 0.4 x(n) + x(n – 1) + 0.2 x(n – 2) + x(n – 3) + 0.6 x(n – 4).

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) + z–1X(z) + 0.2z–2X(z) + z–3X(z) + 0.6z–4X(z)

Y(z) = [0.4 + z–1 + 0.2z–2 + z–3 + 0.6z–4] X(z)

Y(z) If Z{x(n)} = X(z) then by shifting property


∴ = 0.4 + z−1 + 0.2z−2 + z−3 + 0.6z−4
X(z) Z {x(n − k)} = z −k X(z)
Y(z)
We know that, = H(z)
X(z)
∴ H(z) = 0.4 + z−1 + 0.2z−2 + z−3 + 0.6z−4 .....(1)

By the definition of one sided Z-transform we get,


+∞
H(z) = ∑ h(n)z −n h (n )
n = 0
1.0 1.0
= h(0) z0 + h(1) z–1 + h(2) z–2 + h(3) z–3 + h(4) z–4 +.... .....(2) 1.0
0.8
0.6
On comparing equations (1) and (2) we get, 0.6
h(0) = 0.4 h(3) = 1 0.4
0.2 0.2
h(1) = 1 h(4) = 0.6
0 1 2 3 4 5 6 n
h(2) = 0.2 h(n) = 0 ; for n < 0 and n > 4
\ Impulse response, h(n) = {0.4, 1.0, 0.2, 1.0, 0.6} F ig 1: G ra ph ica l rep resen tation
- o f im pu lse resp on se h (n ).
Example 3.18
Determine the response of discrete time LTI system governed by the difference equation,
y(n) = – 0.8 y(n – 1) + x(n), when the input is unit step and initial condition, a) y(–1) = 0 and b) y(–1) = 2/9.

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)} = z–1 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)

and Zly(n − 2)q = z −2


Y(z) + z −1 y(−1) + y(−2)
Chapter 3 - Z - Transform 3. 66
Given that, y(–2)= 0, y(–1) = 0.5

x(n) = 0.2n u(n) = 0.2n ; for n ≥ 0


⇒ x(–1) = 0
=0 ; for n < 0

On substituting the above initial conditions in equation (2) we get,

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

H z 2 JK H z K H z − 0.2K H z K Using equation (1).

(z − 0.3) (z + 0.1) z + 0.4 0.015 + 0.1z


Y(z) = +
z2 z − 0.2 z
(z − 0.3) (z + 0.1) z (z + 0.4) + (0.015 + 0.1z) (z − 0.2)
Y(z) =
z2 z (z − 0.2)
(z − 0.3) (z + 0.1) z2 + 0.4 z + 0.015 z − 0.003 + 0.1z2 − 0.02 z
Y(z) =
z2 z (z − 0.2)
The roots of quadratic
(z − 0.3) (z + 0.1) 1.1z2 + 0.395z − 0.003 z2 − 0.2z − 0.03 = 0 are,
Y(z) 2
=
z z(z − 0.2) 0.2 ± 0.22 − 4 × ( −0.03)
. z2 + 0.395z − 0.003
11 z2 z=
Y(z) = × 2
z(z − 0.2) (z − 0.3) (z + 0.1) 0.2 ± 0.4
= = 0.3, − 0.1
z(1.1z2 + 0.395z − 0.003) 2
=
(z − 0.2) (z − 0.3) (z + 0.1)

Y(z) 1.1z2 + 0.395z − 0.003 A B C


Let, = = + +
z (z − 0.2) (z − 0.3) (z + 0.1) z − 0.2 z − 0.3 z + 0.1

1.1z2 + 0.395z − 0.003 1.1z2 + 0.395z − 0.003


A= × (z − 0.2) =
(z − 0.2) (z − 0.3) (z + 0.1) (z − 0.3) (z + 0.1) z = 0.2
z = 0. 2

1.1 × 0.22 + 0.395 × 0.2 − 0.003


= = −4
(0.2 − 0.3) (0.2 + 0.1)
1.1z2 + 0.395z − 0.003 1.1z2 + 0.395z − 0.003
B= × (z − 0.3) =
(z − 0.2) (z − 0.3) (z + 0.1) (z − 0.2) (z + 0.1) z = 0.3
z = 0.3

1.1 × 0.32 + 0.395 × 0.3 − 0.003


= = 5.3625
(0.3 − 0.2) (0.3 + 0.1)
1.1z2 + 0.395z − 0.003 1.1z2 + 0.395z − 0.003
C= × (z + 0.1) =
(z − 0.2) (z − 0.3) (z + 0.1) (z − 0.2) (z − 0.3) z = −0.1
z = − 0 .1

1.1 × ( −0.1)2 + 0.395 × (−0.1) − 0.003


= = −0.2625
( −0.1 − 0.2) ( −0.1 − 0.3)
3. 67 Digital Signal Processing
Y(z) −4 5.3625 0.2625 z z z
∴ = + − ⇒ Y(z) = −4 + 5.3625 − 0.2625
z z − 0.2 z − 0.3 z + 0.1 z − 0.2 z − 0.3 z − (−0.1)

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 + 2z–1 + 3z–2 + 4z–3] [1 + 2z–1 – z–2 – 2z–3]
= 1 + 2z–1 – z–2 – 2z–3
+ 2z–1 + 4z–2 – 2z–3 – 4z–4
+ 3z–2 + 6z–3 – 3z–4 – 6z–5
+ 4z–3 + 8z–4 – 4z–5 – 8z–6
= 1 + 4z–1 + 6z–2 + 6z–3 + z–4 – 10z–5 – 8z–6 .....(1)
By definition of one-sided Z-transform we get,

Y(z) = ∑ y(n) z −n
n = 0
= y(0) z0 + y(1) z–1 + y(2) z–2 + y(3) z–3 + y(4) z–4 + y(5) z–5+ y(6) z–6 + ..... .....(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

= y(0) + y(1) z −1 + y(2) z −2 + y(3) z −3 + y(4) z −4 + y(5) z −5 + y(6) z −6


= 1+ 4 z −1 + 6 z −2 + 6 z −3 + z −4 − 10 z −5 − 8z −6
m
Given that, h(n) = 1, 2, −1, −2
+∞
r 3
l q ∑ h(n) z
∴ H(z) = Z h(n) = −n
= ∑ h(n) z −n
= h(0) + h(1) z −1 + h(2) z −2 + h(3) z −3
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

By the definition of Z-transform,


+∞
X(z) = Z x(n) =l q ∑ x(n) z −n

n = −∞

On expanding the above summation we get,

X(z) = ....... + x(0) + x(1) z −1 + x(2) z−2 + x(3) z −3 +....... .....(2)

On comparing equations (1) and (2) we get,


x(0) = 1 ; x(1) = 2 ; x(2) = 3 ; x(3) = 4

∴ 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.8z–1 X(z) + 0.8z–2 X(z) – 0.49z–2 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.49z–2] Y(z) = [1 + 0.8z–1 + 0.8z–2] 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

−0.8 ± 0.8 2 − 4 × 0.8 −0.8 ± −2.56 −j0.4


z= = −j0.6
2 2 −j0.7 p 2
z2
−0.8 ± j0.16 −j0.8
= = −0.4 ± j0.8
2 −j1
\ The zeros are, z1 = –0.4 + j0.8 and z2 = –0.4 – j0.8 F ig 1 : P o le-zero p lo t of LT I system .
z2 + 0.8z + 0.8 (z + 0.4 − j0.8) (z + 0.4 + j0.8)
∴ H(z) = =
z2 + 0.49 (z − j0.7) (z + j0.7)
The fig1 Shows the location of poles and zeros on the z-plane. The poles are marked as “X” and
Zeros as " ".
Example 3.23
Determine the step response of an LTI system whose impulse response h(n) is given by,
h(n) = a–n u(–n); 0 < a < 1.
Solution
Q u(−n) = 1 ; n ≤ 0
On taking Z-transform of impulse response h(n) we get,
∞ 0 ∞ ∞ =0 ; n>0
l q ∑
H(z) = Z h(n) = h(n) z−n = ∑ a −n z −n = ∑ anzn = ∑ (az)n
n = −∞ n = −∞ n=0 n=0 ....(1)
If |az| < 1, then using infinite geometric series sum formula,
1

1 − 1
a
H(z) = ∑
n=0
n
(az) =
1 − a z
=
z−
1
; ROC z <
a
a
Chapter 3 - Z - Transform 3. 70
1
Here, a z < 1 ⇒ z <
a
1 1
∴ ROC is z < . Since a < 1 , > 1, and so ROC includes unit circle.
a a
The step input, u(n) = 1 ; n ³ 0
=0 ; n<0
On taking Z-transform of unit step signal we get, Refer table 3.4
z
l q
U(z) = Z u(n) =
z − 1
; ROC |z| > 1 .....(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,

Y(z) = U(z) H(z) =


FG z IJ FG −1 a IJ
H z − 1K H z − 1 a K
By partial fraction expansion we can write,
Y(z) −1 / a A B
= = +
z (z − 1) (z − 1 / a) z − 1 z − 1 / a
Y(z) −1 / a −1 / a −1 / a −1 1
A = (z − 1) = = = = =
z z = 1 z − 1/ a 1 − 1/ a
z = 1
a − 1 a − 1 1 − a
a
Y(z) −1 / a −1 / a −1 / a −1
B = (z − 1 / a ) = = = =
z z = 1/ a z − 1 z = 1/ a 1 / a − 1 1 − a 1− a
a
Y(z) 1 1 1 1 z
∴ = − Z{ −u( −n − 1)} =
z (1 − a) (z − 1) (1 − a) (z − 1 / a) z −1
1 z 1 z z
∴ Y(z) = − Z{ −bn u( −n − 1)} =
(1 − a) (z − 1) (1 − a) (z − 1 / a) z−b

Note : Since impulse response is anticausal, the step response is also anticausal.
On taking inverse Z-transform of Y(z) we get step response.

∴ Step response, y(n) = −


1
u( −n − 1) +
1 1 FG IJ
u( −n − 1) =
n
LMFG 1IJ n
OP FG 1 IJ u(−n − 1)
−1
1− a 1− a a H K MNH a K PQ H 1 − a K
Example 3.24
Test the stability of the first-order system governed by the equation, y(n) = x(n) + b y(n – 1), where |b| < 1.
Solution Z{y(n)} = Y(z) ; Z{y(n – 1)} = z–1Y(z) ; Z{x(n)} = X(z)
Given that, y(n) = x(n) + b y(n – 1)
On taking Z-transform we get,
Y(z) = X(z) + b z–1 Y(z) Þ Y(z) – b z–1 Y(z) = X(z) Þ (1 – b z–1) Y(z) = X(z)
Y(z) 1
∴ =
X(z) 1 − b z−1
3. 71 Digital Signal Processing
We know that, Y(z)/X(z) is equal to H(z).
1 1 z
∴ H(z) = = =
1 − b z−1 z −1(z − b) z − b
z
On taking inverse Z-transform of H(z) we get the impulse response h(n). o t
Z anu(n) =
z−a
\ Impulse response,h(n) = bn u(n)

The condition to be satisfied for the stability of the system is, ∑ |h(n)|< ∞
n = −∞
∞ ∞ ∞

∑ 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

Let, rxx (m) be autocorrelation sequence.


By correlation property of Z - transform,
z 1 1 1 z
l q
Z rxx (m) = X(z) X(z −1) = ×
z − a −a z − 1 a
=−
a ( z − a ) (z − 1 a )
z A B
Let, = +
( z − a) (z − 1 a) z − a z − 1 a
z z a a a2
A= × ( z − a) z= a
= = = 2 = 2
( z − a ) (z − 1 a ) z − 1a z= a
a −1a a −1 a −1
a
z 1a z 1a 1 −1
B= × ( z − 1 a) = = = = =
( z − a ) (z − 1 a ) z =1 a 1 a − a 1 − a2
z−a z =1 a 1 − a2 a2 − 1
a

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 z–1 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} = z–m 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 cross multiplying the equation (3.75) we get,

1 + a1 z −1 + a 2 z−2 + ..... + a N z − N Y(z) = b0 + b1 z −1 + b2 z−2 + ..... + 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 −1X(z) + b2 z−2 X(z) + ..... + b M z − M X(z)
3. 73 Digital Signal Processing

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,

H(z) = b0 + b1 z −1 + b2 z−2 + ..... + b N −1 z− ( N −1)


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)
∴ 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)

On taking inverse Z-transform of the above equation we get,


y( n) = b0 x( n) + b1 x( n − 1) + b2 x( n − 2) + ..... + b N −1 x( n − ( N − 1))
N −1
∴ y( n) = ∑ bmx( n − m) .....(3.78)
m=0

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

Elements of Time domain z-domain


block diagram representation representation

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

Unit delay element x (n ) x (n −1 ) X (z )


−1
z X (z )
z −1 z −1

Unit advance element x (n ) x (n + 1 ) X (z ) z X (z )

3.9 Structures for Realization of IIR Systems


In general, the time domain representation of an Nth order IIR system is,
N M
y( n) = − ∑ a my( n − m) + ∑ b mx( n − m)
m=1 m=0

and the z-domain representation of an Nth order IIR system is,

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

3.9.1 Direct Form-I Structure of IIR System


Consider the 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)
+ 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 )

F ig 3.1 5 : D irect fo rm -I stru cture o f IIR system .

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

F ig 3.1 6 : D irect fo rm -II structure of IIR system for N = M .


Conversion of Direct Form-I Structure to Direct Form-II Structure
The direct form-I structure can be
converted to direct form-II structure by X (z) b0 + + Y (z)
considering the direct form-I structure as
cascade of two systems H1 and H2 as shown z
−1
z
−1

in fig 3.17. By linearity property the order of b1 + + −a 1


cascading can be interchanged as shown in
fig 3.18 and fig 3.19. z
−1
z
−1

In fig 3.19 we can observe that the b2 + −a 2


input to the delay elements in H1 and H2 are
same and so the output of delay elements in
H1 and H2 are same. Therefore instead of
having separate delays for H1 and H2, a −1 −1
z z
single set of delays can be used. Hence the
delays can be merged to combine the b M −1
+ + −a N −1
cascaded systems to a single system and
the resultant structure will be direct form-II z
−1
z
−1

structure as that of fig 3.16.


bM −a N
H1 H2

F ig 3.1 7 : D irec t fo rm -I struc tu re a s c a sca d e o f tw o system s.

X (z) Y (z) X (z) Y (z)


H ⇒ H1 H2

X (z) Y (z) X (z) Y (z)


H2 H1 ⇒ H

F ig 3.1 8 : C o n versio n o f D irect fo rm -I stru ctu re to D irect fo rm -II structure.


Chapter 3 - Z-Transform 3. 78

+ +
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

F ig 3.1 9 : D irec t fo rm -I stru cture a fter in terch a ng in g th e o rd er o f ca scad in g .

3.9.3 Cascade Form Realization of IIR System


The transfer function H(z) can be expressed as a product of a number of second-order or first-order
sections, as shown in equation (3.84).
Y(z) m
H ( z) = = H1 ( z) × H 2 ( z) × H 3 ( z) ..... H m ( z) = Π H i ( z) .....(3.84)
X(z) i=1

c0i + c1i z −1 + c2i z −2


where, H i ( z) = Second-order section
d 0i + d1i z −1 + d 2i z −2
c0i + c1i z −1
or, H i ( z) = First-order section
d 0i + d1i z−1
The individual second-order or first-order sections can be realized either in direct form-I or
direct form-II structures. The overall system is obtained by cascading the individual sections as shown in fig
3.20. The number of calculations and the memory requirement depends on the realization of individual sections.
X (z)
H 1 (z) H 2 (z) H m (z ) Y (z)

F ig 3.2 0 : C a sca de fo rm realiza tio n o f IIR system .

The difficulty in cascade structure are,


1. Decision of pairing poles and zeros.
2. Deciding the order of cascading the first and second-order sections.
3. Scaling multipliers should be provided between individual sections to prevent the system
variables from becoming too large or too small.
3. 79 Digital Signal Processing

3.9.4 Parallel Form Realization of IIR System


The transfer function H(z) of a discrete time system can be expressed as a sum of first and second-order
sections, using partial fraction expansion technique as shown in equation (3.85).
Y(z)
H ( z) = = C + H1 ( z) + H 2 ( z) + ..... + H m ( z) .....(3.85)
X(z)
m X (z) Y (z)
C +
= C + ∑
=
H i ( z)
i 1

c0i + c1i z −1 H 1 (z) +


where, H i ( z) =
d 0i + d1i z−1 + d 2i z −2
Second-order section H 2 (z) +
c0i
or H i ( z) =
d 0i + d1i z −1 First-order section

The individual first and second-order sections can be realized +


either in direct form-I or direct form-II structures. The overall system
is obtained by connecting the individual sections in parallel as shown H m (z )
in fig 3.21.The number of calculations and the memory requirement F ig 3.2 1 : P a ra llel fo rm realiza tio n
depends on the realization of individual sections. o f IIR system .

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

Consider equation (2).

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)

On cross multiplying equation (4) we get,

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

On cross multiplying equation (5) we get,

Y(z) = W(z) + 3z −1 W(z) + 2z −2 W(z) .....(7)

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

F ig 2 : D irec t fo rm -II rea liza tio n stru ctu re.


3. 81 Digital Signal Processing
Cascade Form
Consider equation (3).

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)

Consider the denominator polynomial of equation (8)


3
1 + z−1 −
3 −2
z −
1 −3 3
z = z−3 z3 + z2 −
3
z−
1 FG IJ
8 32 64 8 32 64 H K .....(10)
–1/8 1 3/8 –3/32 –1/64
= z −3
FG z + 1IJ FG z 2 2
+ z−
8I
J
H 8K H 8 64 K ¯ –1/8 –2/64 +1/64
1 2/8 –8/64 0
The roots of quadratic,
z = –1/8 is one of the
2 8
z2 + z − = 0 are, root of equation (10).
8 64


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+ 3z −1 + 2z−2 (1 + z−1) (1 + 2z−1)


H(z) = =
3
1 + z −1 −
3 −2
z −
1 −3
z FG 1 IJ FG
1
1 + z−1 1 + z−1 1 − z−1
1 IJ FG IJ .....(12)
8 32 64 H 8 KH
2 4 KH K
Since there are three first-order factors in the denominator of equation (12), H(z) can be expressed as a
product of 3 sections as shown in equation (13).

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)

The transfer function H2(z) can be realized in direct form-II


structure using equations (16) and (17), as shown in fig 4. Y 1 (z) W2(z) Y 2 (z)
+ +
Y2(z) W2(z) Y2 (z) 1 + 2z −1
Let , H2(z) = = = z−1
Y1(z) Y1(z) W2(z) 1 + 1 z−1

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)

The transfer function H3(z) can be realized in direct form-II Y 2 (z) + Y (z )


structure using equation (18), as shown in fig 5.
−1
z
Y(z) 1
Let , H3(z) = = 1 −1 −1

Y2(z) 1 − 1 z−1 4
z Y(z) 1
z Y (z)

4 4

1 −1 F ig 5 : D irect fo rm -II stru ctu re of H 3 (z).


∴ Y(z) − z Y(z) = Y2 (z)
4
1
Y(z) = Y2(z) + z −1 Y(z) .....(18)
4
The cascade structure of the given LTI system is obtained by connecting the individual sections shown in
fig 3, fig 4 and fig 5 in cascade as shown in fig 6.

W 1(z) Y 1 (z) W 2(z) Y 2 (z)


X (z ) + + + + + Y (z )

−1 −1
z z
z −1

1 1 1
− − 2
8 2 4

H 1(z) H 2 (z) H 3 (z)


F ig 6 : C a sca d e realiza tio n o f th e system .
3. 83 Digital Signal Processing
Parallel Form

Consider the equation (12).

H(z) =
d1+ z i d1+ 2z i−1 −1

FG1 + 1 z IJ FG1 + 1 z IJ FG1 − 1 z IJ


−1 −1 −1
H 8 KH 2 KH 4 K
By partial fraction expansion,

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 −1 8 F ig 8 : D irect fo rm -I structure of H 2 (z).


Y2(z) = − z Y2(z) + X(z) .....(20)
2 3
The transfer function H3(z) can be realized in direct form-I X (z ) 10 + Y 3 (z)
structure using equation (21) as shown in fig 9. 10 X(z)
Y3 (z) 10 z−
1
Let , H3(z) = =
X(z) 1
1 − z −1
4 1 −1 −1
z Y 3(z)
z Y3 (z) 1
On cross multiplying and rearranging we get, 4
4
1 −1
Y3(z) = z Y3(z) + 10 X(z) .....(21) F ig 9 : D irect fo rm -I stru ctu re o f H 3 (z).
4
The overall structure is obtained by connecting the individual sections shown in fig 7, fig 8 and fig 9 in
parallel as shown in fig 10.
Y 1 (z)
X (z ) + + Y (z )

−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

Y(z) 2z3 − 4z 2 + 11z − 8 2z3 − 4z2 + 11z − 8


∴ = = 3
X(z) 2
z−8 z −z+3 b gc h
z − z2 + 3z − 8 z2 + 8z − 24

=
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)

∴ Y(z) = 2X(z) − 4z−1 X(z) + 11z−2 X(z) − 8z−3 X(z)


.....(2)
+ 9z−1 Y(z) − 11z−2 Y(z) + 24z−3 Y(z)
The direct form-I structure can be obtained from equation (2) as shown in fig 1.
2X (z ) +
X (z) 2 + Y (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 )

F ig 1 : D irec t fo rm -I rea liza tio n .


Direct Form-II

From equation (1) we get,

Y(z) 2 − 4z−1 + 11z−2 − 8z−3


=
X(z) 1 − 9z−1 + 11z−2 − 24z −3

Y(z) W(z) Y(z)


Let , =
X(z) X(z) W(z)
W(z) 1
where, = .....(3)
X(z) 1 − 9z −1 + 11z −2 − 24z−3

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) – 4z–1 W(z) + 11z–2 W(z) – 8z–3 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

F ig 2 : D irec t form -II rea liza tio n .

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.3z–1 X(z) – 0.4z–2 X(z) – 0.8z–1 Y(z) + 0.7z–2 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

F ig 1 : D irect fo rm -I dig ita l n etw ork.


On rearranging equation (1) we get,
Y(z) + 0.8z–1 Y(z) – 0.7z–2 Y(z) = X(z) + 0.3z–1 X(z) – 0.4z–2 X(z)
[1+0.8z–1 – 0.7z–2] Y(z) = [1 + 0.3z–1 – 0.4z–2] X(z)

Y(z) 1 + 0.3z−1 − 0.4z −2


= .....(2)
X(z) 1 + 0.8z−1 − 0.7z−2
The equation (2) is the transfer function of the system.
3. 87 Digital Signal Processing
Y(z) W(z) Y(z) X (z ) Y (z )
Let , = W (z)
X(z) X(z) W(z) + +
W(z) 1
where, = ..... (3) z
−1

X(z) 1 + 0.8z−1 − 0.7z −2


−1
−0.8 z W (z ) −1 −1
z W (z) 0.3z W (z )
Y(z)
= 1 + 0.3z −1 − 0.4z−2 ..... (4) + −0.8 0 .3 +
W(z)
On cross multiplying equation (3) we get, z
−1

−2
W(z) + 0.8z–1 W(z) + 0.7z–2 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.8z–1 W(z) – 0.7z–2 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.3z–1 W(z) – 0.4z–2 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 z–1 Y(z) + a2 z–2 Y(z) = X(z) – a cos w 0 z–1 X(z)
\ Y(z) = X(z) – a cos w 0 z–1 X(z) + 2a cos w 0 z–1 Y(z) – a2 z–2 Y(z)
Let, a cos w 0 = b. \ Y(z) = X(z) – bz–1 X(z) + 2bz–1 Y(z) – a2 z–2 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)

F ig 2 : D irect fo rm -I stru cture a s ca scad e o f tw o system s.


Chapter 3 - Z-Transform 3. 88
In an LT1 system, by linearity property, the order of cascading can be changed. Hence the systems H1(z)
and H2(z) are interchanged and the fig 2 is redrawn as shown in fig 3.

X (z )
+
+ Y (z )
−1
z −1
z
+
2b
−b
−1
z
H 1(z)
2
−a
H 2 (z)

F ig 3 : D irec t fo rm -I stru cture w ith H 1 (z) a n d H 2 (z) interch an g e d.

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

F ig 4 : D irect fo rm -II structu re o f H (z).

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

Let , H(z) = H1(z) × H2(z)

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

+ Dz−1 − 2Dz−2 + 0.25Dz−3


1 + 0.25z −1
= ( A + C) + ( −3A + B − 2C + D) z −1
b
+ 0.2A − 3B + 0.25C − 2D z −2 g
+ b0.2B + 0.25Dgz −3
.....(8)
On equating the constants in equation (8) we get,
A + C = 1 ⇒ C = 1− A
–3
On equating the coefficients of z in equation (8) we get,
0.2
0.2B + 0.25D = 0 ∴ 0.25D = −0.2B ⇒ D=− B = −0.8B
0.25
On equating the coefficients of z–1 in equation (8) we get,
−3A + B − 2C + D = 0.25
On substituting C = 1 – A and D = –0.8B in the above equation we get,
b
−3A + B − 2(1 − A) + −0.8B = 0.25 ⇒ g − A + 0.2B = 2.25 ⇒ A = 0.2B − 2.25
–2
On equating the coefficients of z in equation (8) we get,
0.2A − 3B + 0.25C − 2D = 0
On substituting C = 1 – A, and D = –0.8B in the above equation we get,
0.2A – 3B + 0.25(1 – A) –2 (–0.8B) = 0 Þ –0.05A – 1.4B = –0.25
On substituting A = 0.2B – 2.25 in the above equation we get,

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

A + B z −1 C + D z−1 −2.2 + 0.26z−1 3.2 − 0.21z−1


∴ H(z) = −1 −2
+ −1 −2
= −1 −2
+
1 − 2z + 0.25z 1 − 3z + 0.2z 1 − 2z + 0.25z 1 − 3z −1 + 0.2z−2

−2.2 + 0.26z −1 3.2 − 0.21z−1


Let , H(z) = −1 −2
+ = H1(z) + H2(z)
1 − 2z + 0.25z 1 − 3z−1 + 0.2z −2

−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,

W1(z) − 2z−1 W1(z) + 0.25z −2 W1(z) = X(z)


∴ W1(z) = X(z) + 2z−1 W1(z) − 0.25z −2 W1(z) .....(11)
On cross multiplying equation (10) we get,

Y1(z) = −2.2W1(z) + 0.26z −1 W1(z) .....(12)

The direct form-II structure of system H1(z) can be realized using equations (11) and (12) as shown in fig 4.

+ W 1 (z) −2.2W 1 (z)


X (z ) −2.2 + Y 1 (z)

−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

F ig 4 : D irect fo rm -II structure of H 1 (z).

Realization of H2(z)

Y2 (z) 3.2 − 0.21z−1


H2(z) = =
X(z) 1 − 3z−1 + 0.2z−2
Y2 (z) W2(z) Y2(z)
Let , =
X(z) X(z) W2(z)

W2 (z) 1
where, = .....(13)
X(z) 1 − 3z−1 + 0.2z−2

Y2 (z)
= 3.2 − 0.21z –1 .....(14)
W2 (z)

On cross multiplying equation (13) we get,

W2(z) − 3z−1 W2(z) + 0.2z−2 W2(z) = X(z)


.....(15)
∴ W2 (z) = X(z) + 3z−1 W2(z) − 0.2z−2 W2(z)
On cross multiplying equation (14) we get,
Y2(z) = 3.2 W2(z) – 0.21z –1 W2(z) ..... (16)
Chapter 3 - Z-Transform 3. 92
The direct form-II structure of system H2(z) can be realized using equations (15) and (16) as shown in fig 5.

+ 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 )

F ig 5 : D irect fo rm -II structu re o f H 2 (z).


The parallel form structure of H(z) is obtained by connecting the direct form-II structure of H1(z) and H2(z)
in parallel as shown in fig 6.

+ 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)

+ W2 (z) 3.2W2 (z) Y 2 (z)


3.2 +
−1
3z W2 (z) z −1
+ z −1W2 (z)
3
−0.21z −1W2 (z)

−2 z −1
−0.2z W2 (z)

−0.2 z −2 W2 (z)
H 2 (z)

F ig 6 : P a ra llel fo rm rea liza tio n o f syste m H (z).


Example 3.31
2 + 3z −1 + 4z−2
Obtain the cascade realization of the system, H(z) =
FG 1 IJ FG
1
1 + z−1 1 − z−1 1 + z−1
1 IJ FG IJ
H 7 KH 4 9 KH K
Solution
2 + 3 z−1 + 4 z −2
Given that, H(z) = 2 + 3z −1 + 4z−2 = 2z −2(z2 + 15
. z + 2)
FG 1 IJ FG
1
1 + z −1 1 − z−1
1
1 + z−1
IJ FG IJ
H 7 KH
4 9 KH K The roots of quadratic,

On examining the roots of numerator polynomial it is found z2 + 1.5z + 2 = 0 are,


that the roots are complex conjugate. Hence H(z) can be realized as
−1.5 ± 1.52 − 4 × 2 −15
. ± j2.4
cascade of one first-order and one second-order system. z= =
2 2
3. 93 Digital Signal Processing

1 2 + 3 z −1 + 4z−2 1 2 + 3z−1 + 4z−2


∴ H(z) = × = ×
1 −1
1− z FG 1 +
1 −1
z
IJ FG
1 +
1 −1
z 1 −
1
z−1 1 + IJ
16 −1
z +
1 −2
z
4 H 7 KH 9 4 63 K 63
Let, H(z) = H1(z) ´ H2(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.

Y(z) 2 + 3z−1 + 4 z−2


Let , H2(z) = = X (z ) Y 1 (z)
Y1(z) 1 + 16 z −1 + 1 z −2 +
63 63
z −1
Y(z) W (z) Y(z)
Let , = 2
Y1(z) Y1(z) W2(z) 1 −1
z Y1(z) z −1Y1(z)
4 1
W2(z) 1 4
where, = .....(3)
Y1(z) 16 −1 1 −2
1 + z + z F ig 1 : D irect fo rm -II stru ctu re of H 1 (z).
63 63
Y(z)
= 2 + 3z −1 + 4z −2 .....(4)
W2 (z)
On cross multiplying equation (3) we get,
16 −1 1 −2
W2 (z) + z W2(z) + z W2(z) = Y1(z)
63 63
16 −1 1 −2 .....(5)
∴ W2(z) = Y1(z) − z W2(z) − z W2(z)
63 63
On cross multiplying equation (4) we get,
Y(z) = 2W2(z) + 3z–1 W2(z) + 4z–2 W2(z) ..... (6)
The direct form-II structure of H2(z) can be obtained using equations (5) and (6) as shown in fig 2.

+ 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

F ig 2 : D irect fo rm -II structu re o f H 2 (z).


Chapter 3 - Z-Transform 3. 94
The cascade realization of H(z) is obtained by connecting the direct form-II structures of H1(z) and H2(z) in
cascade as shown in fig 3.
Y 1 (z) + W 2 (z ) 2W 2 (z )
X (z ) + 2 + Y (z )
16 −1
z −1 − z W 2 (z) z −1
1 −1 63 −1
z Y1 (z) + z −1W 2 ( z ) 3z W 2 (z)
4 16

63
3 +
1 z −1 Y1 ( z )
4
1 −2 z −1
− z W 2 (z)
H 1(z) 63 −2
z −2 W 2 ( z ) 4z W 2 (z )
1
− 4
63
F ig 3 : C a sca d e realiza tio n o f H (z).
H 2(z)

Example 3.32
−1 2

The transfer function of a system is given by, H(z) =


d2 − z i d1 − z i
−1

d1 − 2z i d5 − 3z + 2z i
−1 −1 −2

Realize the system in cascade and parallel structures.


5 − 3z−1 + 2z−2 = z −2(5z2 − 3z + 2)
Solution
The roots of quadratic,
Cascade Realization
5z2 − 3z + 2 = 0 are,
−1 2

Given that , H(z) =


d2 − z i d1 − z i −1

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

Let, H(z) = H1(z) ´ H2(z)

2 − z−1 1 − 2z−1 + z−2


where, H1(z) = and H2(z) =
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(z) 1 − 2z−1 + z−2


Let , H2(z) = = .....(3)
Y1(z) 5 − 3z−1 + 2z−2
3. 95 Digital Signal Processing
On cross multiplying equation (3) we get
5Y(z) − 3z−1 Y(z) + 2z−2 Y(z) = Y1(z) − 2z−1 Y1(z) + z −2 Y1(z)
1 2 −1 1 −2 3 –1 2 −2 .....(4)
∴ Y(z) = Y1(z) − z Y1(z) + z Y1(z) + z Y(z) − z Y(z)
5 5 5 5 5
The direct form-I structure of H2(z) can be drawn using equation (4) as shown in fig 2.

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

F ig 2 : T he d irect fo rm -I stru c tu re o f H 2 (z).


The cascade realization of H(z) is obtained by connecting the direct form-I structures of H1(z) and H2(z) in
cascade as shown in fig 3.

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

F ig 3 : C a sca de realiza tio n o f H (z).


Parallel Realization
−1 2
Given that , H(z) =
e2 − z j e1 − z j −1
.....(5)
e1− 2z j e5 − 3z + 2z j −1 −1 −2

=
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 −

LM 0.2 + 0.8z + 0.6z −1 −2 OP


= 0.4 + z −1
MN e1 − 2z j e5 − 3z + 2z
−1 −1 −2
j PQ Using equation (5).
.....(6)
Chapter 3 - Z-Transform 3. 96
By partial fraction expansion we can write,
0.2 + 0.8z −1 − 0.6z −2 A B + C z −1 ..... (7)
= −1
+
e1 − 2z j e5 − 3z
−1 −1
+ 2z −2
j 1 − 2z 5 − 3z −1 + 2z −2

On cross multiplying equation (7) we get,

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)

0.2 + 0.8z −1 + 0.6z−2 = (5A + B) + ( −3A − 2B + C)z−1 + (2A − 2C)z −2

On equating constants of On equating coefficients of z–1 On equating coefficients


equation (8), of equation (8), of z–2 of equation (8),
5A + B = 0.2 –3A – 2B + C = 0.8 2A – 2C = 0.6
\ B = 0.2 – 5A Put, B = 0.2 – 5A 2A –2(1.2 – 7A) = 0.6
\ –3A – 2(0.2 – 5A) + C = 0.8 2A –2.4 + 14A = 0.6
3
–3A – 0.4 + 10A + C = 0.8 ∴ 16A = 3 ⇒ A =
16
\ C = 1.2 –7A

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

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) Y (z) Y (z)
∴ H(z) = H1(z) +H2(z) +H3(z) ⇒ = + 2 + 3
X(z) X(z) X(z) X(z)
∴ Y(z) = Y1(z) + Y2(z) + Y3(z)

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)

F ig 4 : D irect fo rm -I stru ctu re of H 1 (z).


Realization of H2(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

F ig 5 : D irect fo rm -I structure of H 2 (z).

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

F ig 6 : D irect fo rm -I stru cture o f H 3 (z).


Chapter 3 - Z-Transform 3. 98
Parallel Structure
The parallel structure of H(z) is obtained by connecting the direct form-I structure of H1(z), H2(z) and H3(z)
as shown in fig 7.
X (z ) H 1 (z) Y 1 (z) Y (z )
0.4 +

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

F ig 7 : T he p a ra llel stru cture o f H (z).


Example 3.33
1 1
An LTI System is described by the equation, y(n) − y(n − 1) − y(n − 2) = x(n) .
2 4
Determine the cascade realization structure of the system.

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

Y1(z) – 0.809z–1 Y1(z) = X(z) −1


0.809z Y 1 (z )
z −1 Y 1 (z )
–1
\ Y1(z) = X(z) + 0.809z Y1(z) ..... (2)
The direct form-I structure of H1(z) is obtained using F ig 1 : D irect fo rm -I stru ctu re o f H 1 (z).
equation (2) as shown in fig 1.
Y 1 (z) + Y (z )
Y(z) 1
Let , H2 (z) = = ..... (3)
Y1(z) 1 + 0.309z −1
z −1
On cross multiplying equation (3) we get,
−0.309 z −1Y (z) z −1Y 1 ( z)
Y(z) + 0.309 z–1 Y(z) = Y1(z)
Y(z) = Y1(z) – 0.309 z–1 Y(z) ..... (4) F ig 2 : D irect fo rm -I stru ctu re o f H 2 (z).
The direct form-I structure of H2(z) is obtained using equation (4) as shown in fig 2.The cascade structure
is obtained by connecting the direct form structures of H1(z) and H2(z) in cascade as shown in fig 3.

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.

3.10 Structures for Realization of FIR Systems


In general, the time domain representation of an Nth order FIR system is,
N−1
y ( n) = ∑ b m x( n − m) = b0 x( n) + b1 x( n − 1) + b 2 x( n − 2) +.....+ b N − 1 x( n − ( N − 1))
m= 0
and the z-domain representation of a FIR system is,
Y(z)
H(z) = = b 0 + b1 z −1 + b2 z −2 + ..... + b N −1 z − ( N −1)
X(z)

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))

On taking Z-transform of the above equation we get,


Y( z) = b0 X( z) + b1 z−1 X( z) + b2 z−2 X( z) + b 3 z−3 X( z) +
..... + b N − 2 z − ( N − 2 ) X( z) + b N −1 z − ( N −1) X( z)
..... (3.86)
The equation of Y(z) [equation (3.86)] can be directly represented by a block diagram as shown in
fig 3.22 and this structure is called direct form structure. The direct form structure provides a direct relation
between time domain and z-domain equations.
−1 −(N−1)
1
z X(z) −1 −1 z X(z)
X (z ) z− z z z
−1

+ + + + + Y (z)

F ig 3 .2 2 : D irect fo rm stru ctu re o f F IR system .


From the direct form structure it is observed that the realization of an Nth order FIR discrete time system
involves N 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.

3.10.2 Cascade Form Realization of FIR System


Consider the transfer function of a FIR system,
Y(z)
H(z) = = b0 + b1 z−1 + b 2 z −2 + ..... + b N −1 z− ( N −1)
X(z)
The transfer function of FIR system is (N–1)th order polynomial in z. This polynomial can be factorized
into first and second-order factors and the transfer function can be expressed as a product of first and
second-order factors or sections as shown in equation (3.87).
Y(z) m
H ( z) = = H1 ( z) × H 2 ( z) × H 3 ( z) ..... H m ( z) = Π H i ( z) ...(3.87)
X(z) i =1

where, H i ( z) = c0i + c1i z−1 + c2i z−2 Second-order section


or, H i ( z) = c0i + c1i z −1 First-order section

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

H 1 (z) H 2 (z) H 3 (z)

F ig 3 .2 3 : C a sca d e stru ctu re o f F IR system .

3.10.3 Linear Phase Realization of FIR System


Consider the impulse response h(n) of FIR system,
h(n) = {b0, b1, b2, ................. bN - 1}
-
In FIR system, for linear phase response the impulse response should be symmetrical.
The condition for symmetry is,
h(n) = h(N–1–n)

Proof :
Let, N =7, \ h(n) = h(6–n) Let, N =8, \ h(n) = h(7–n)
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

Case i : When N is even

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

Let, p = N–1–m, \ m = N–1–p

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 )

w here, M = N − 1 ; Y 0 = b 0 X (z) + z −(N −1) X (z ) ; YN −2


= bN −2
MMz e
− N −2
2
j X (z) + z
e2
− N +1 j X (z )P
PQ
2 2 2 N
Y1 = b 1 z −1 X (z ) + z −(N −2) X (z ) ; Y N = bN
LMz e
− N −1
2
j X (z ) + z
− N
2 X (z)
OP
2
−1
2
−1
MN PQ
F ig 1 0.2 4 : D irec t fo rm rea liza tion of a lin ea r p h ase F IR syste m w h e n N is eve n .
3. 103 Digital Signal Processing

∴ 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

Y 1 = b 1 z −1 X (z) + z −(N −2 ) X (z) ; Y N −3 = b N −3


LMz e
− N −3
2 j X (z) + z
e2
− N −1 j X (z) OP
2 2 MN PQ
F ig 3 .2 5 : D irec t fo rm rea liza tio n of a lin ea r p ha se F IR syste m w h en N is o d d .

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).

z −1X(z) z −2 X(z) z −3 X(z) z −4 X( z) z −5 X(z)


X (z ) z −1 z −1 z −1 z −1 z −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,

Impulse response, h(n) =


RS 1 , 1 3 1 1
, , ,
UV
T4 2 4 2 4 W
Here h(n) satisfies the condition h(n) = h(N – 1 – n) and so impulse response is symmetrical. Hence the
system has linear phase and can be realized with minimum number of multipliers.
Y(z) 1 1 −1 3 −2 1 −3 1 −4
Let , H(z) = = + z + z + z + z
X(z) 4 2 4 2 4
1 1 3 1 1
∴ Y(z) = X(z) + z −1 X(z) + z −2 X(z) + z −3 X(z) + z−4 X(z)
4 2 4 2 4
1 1 3 −2
= X(z) + z −4 X(z) + z−1 X(z) + z−3 X(z) + z X(z) .....(3)
4 2 4
The direct form structure of linear phase FIR system is constructed using equation (3) as shown in fig 1.
z −1X ( z ) z −2 X ( z)
X (z ) z −1 z −1

+ +
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

multipliers (i.e., linear phase + z −1


realization) is obtained using + +
−3
z X(z)
equation (4) as shown in fig 2. z −1 z −1
−5 −4
z X(z) z X(z)

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).

c) Given that, H(z) =


FG 1 + 1 z −1
+
1 −2
z
IJ FG 1 + 1 z −1
+
1 −2
z
IJ X (z ) z −1
H5 2 5 K H7 4 7 K
The given system can be realized as cascade of two +
second-order systems. Each system can be realized with minimum
number of multipliers.
1 z −1
Let, H(z) = H1(z) H2(z)
5
1 1 1 1 1 1 1
where, H1(z) = + z−1 + z −2 ; H2 (z) = + z−1 + z −2 1
X (z) + z − 2
X (z) 2
5 2 5 7 4 7 5 1 −1
z X(z)
2
Y (z) 1 1 −1 1 −2
Let , H1(z) = 1 = + z + z + Y 1 (z)
X(z) 5 2 5
F ig 3 : L in e ar p h a se rea lizatio n o f H 1 (z).
1 1 −1 1
∴ Y1(z) = X(z) + z X(z) + z −2 X(z) −1
z Y1 (z)
5 2 5 Y 1 (z)
Y 1 (z)
z −1
1 1 .....(5)
= X(z) + z −2 X(z) + z −1 X(z)
5 2 +
The linear phase realization structure of H1(z) is obtained
using equation (5) as shown in fig 3.
1 −2 z −1
Y(z) 1 1 1 z Y1 (z )
Let , H2 (z) = = + z −1 + z −2 7
Y1(z) 7 4 7 1
4
1 1 1 1 −1
∴ Y(z) = Y1(z) + z −1 Y1(z) + z −2 Y1(z) Y 1(z ) + z −2 Y 1(z ) 4
z Y (z )
1
7 4 7
+ Y (z )
1 1 .....(6)
= Y1(z) + z −2 Y1(z) + z −1 Y1(z) F ig 4 : L in e ar p h a se rea liza tio n o f H 2 (z).
7 4
The linear phase realization structure of H2(z) is obtained using equation (6) as shown in fig 4.
The linear phase structure of H(z) is obtained by connecting the linear phase realization structures of H1(z)
and H2(z) in cascade as shown in fig 5.

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.11 Summary of Important Concepts


1. The Z-transform provides a method for analysis of discrete time signals and systems in frequency domain.
2. The ROC of X(z) is a set of all values of z, for which X(z) attains a finite value.
3. Since ROC is a set of values of z, it will be a ring or disk in z-plane, with centre at origin.
4. The zeros are defined as values of z at which the function X(z) becomes zero.
5. The poles are defined as values of z at which the function X(z) becomes infinite.
6. In a realizable system, the number of zeros will be less than or equal to number of poles.
7. If x(n) is finite duration right-sided (causal) signal, then the ROC is entire z-plane except z = 0.
8. If x(n) is finite duration left-sided (anticausal) signal, then the ROC is entire z-plane except z = ¥ .
9. If x(n) is finite duration two-sided (noncausal) signal, then the ROC is entire z-plane except z = 0 and z = ¥ .
10. If x(n) is infinite duration right-sided (causal) signal, then the ROC is exterior of a circle of radius r1.
11. If x(n) is infinite duration left-sided (anticausal) signal, then the ROC is interior of a circle of radius r2.
12. 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.
13. 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).
14. If X(z) is rational, [where X(z) is Z-transform of x(n)], and if x(n) is right-sided, then ROC is exterior of a
circle whose radius corresponds to pole with largest magnitude.
15. If X(z) is rational, [where X(z) is Z-transform of x(n)], and if x(n) is left-sided, then ROC is interior of a circle
whose radius corresponds to pole with smallest magnitude.
16. If X(z) is rational, [where X(z) is Z-transform of x(n)], and if x(n) is two-sided, then ROC is region in
between two circles whose radii corresponds to pole of causal part with largest magnitude and pole of
anticausal part with smallest magnitude.
17. The inverse Z-transform is the process of recovering the discrete time signal x(n) from its Z-transform X(z).
18. The transfer function of an LTI discrete time system is defined as the ratio of Z-transform of output and
Z-transform of input.
19. The transfer function of an LTI discrete time system is also given by Z-transform of the impulse response.
20. The inverse Z-transform of transfer function is the impulse response of the system.
21. The zero-input response yzi(n) is mainly due to initial output (or initial stored energy) in the system.
22. The zero-state response yzs(n) is the response of the system due to input signal and with zero initial
output.
23. The total response y(n) is the response of the system due to input signal and initial output (or initial
stored energy).
24. The convolution operation is performed to find the response y(n) of an LTI discrete time system from the
input x(n) and impulse response h(n).
25. The deconvolution operation is performed to extract the input x(n) of an LTI system from the response
y(n) and impulse response h(n) of the system.
26. A point-s1 on left half of s-plane (LHP), will map as a point-z1 inside the unit circle in z-plane.
27. A point-s1 on imaginary axis of s-plane, will map as a point-z1 on the unit circle in z-plane.
28. A point-s1 on the right half of s-plane (RHP), will map as a point-z1 outside the unit circle in z-plane.
29. The mapping of s-plane to z-plane, using the transformation, esT = z is not one-to-one.
30. The mapping of frequency of continuous time signal W to the frequency of discrete time signal w is
many-to-one.
31. Mathematically, a discrete time system is represented by a difference equation.
Chapter 3 - Z-Transform 3. 108
32. Physically, a discrete time system is realized or implemented either as a digital hardware or as a software
running on a digital hardware.
33. The processing of the discrete time signal by the digital hardware involves mathematical operations like
addition, multiplication, and delay.
34. 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.
35. The various structures proposed for IIR and FIR systems, attempt to reduce the computational complexity,
errors in computation and the memory requirement of the system.
36. When a discrete time system is designed by considering all the infinite samples of the impulse response,
then the system is called IIR (Infinite Impulse Response) system.
37. When a discrete time system is designed by choosing only finite samples (usually N-samples) of the
impulse response, then the system is called FIR (Finite Impulse Response) system.
38. The IIR systems are recursive systems, whereas the FIR systems are nonrecursive systems.
39. The direct form-I structure of IIR system offers a direct relation between time domain and z-domain
equations.
40. Since separate delays are employed for input and output samples, realizing IIR system using direct form-I
structure require more memory.
41. The direct form-I and II structure realization of an Nth order IIR discrete time system involves M+N+1
number of multiplications and M+N number of additions.
42. The direct form-I structure realization of an Nth order IIR discrete time system involves M+N delays and
so M+N memory locations are required to store the delayed signals.
43. In a realizable Nth order IIR discrete time system, the direct form-II structure realization involves N delays
and so N memory locations are required to store the delayed signals.
44. In canonic structure, the number of delays will be equal to the order of the system.
45. The direct form-II structure of IIR system is canonic whereas the direct form-I structure is noncanonic.
46. In cascade realization of IIR system, the Nth order transfer function is divided into first and second-order
sections and they are realized in direct form-I or II structure and then connected in cascade.
47. In parallel realization of IIR system, the Nth order transfer function is divided into first and second-order
sections and they are realized in direct form-I or II structure and then connected in parallel.
48. In cascade and parallel realization of IIR systems, the number of calculations and the memory requirement
depends on the realization of individual sections.
49. Direct form structure of FIR system provides a direct relation between time domain and z-domain equations.
50. The realization of an Nth order FIR discrete time system using direct form structure and linear phase
structure involves N number of multiplications and N-1 number of additions.
51. The realization of an Nth order FIR discrete time system using direct form structure involves N-1 delays
and so N-1 memory locations are required to store the delayed signals.
52. The condition for symmetry of impulse response of FIR system is, h(n) = h(N–1–n).
53. The linear phase realization is also called realization with minimum number of multipliers.
54. In cascade realization of FIR system, the Nth order transfer function is divided into first and second-order
sections and they are realized in direct form or linear phase structure and then connected in cascade.
55. The direct form linear phase realization structure 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.
56. The direct form linear phase realization structure 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.
3. 109 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

Q3.2 Find the Z-transform of e- anT u(n).


By the definition of Z-transform,
∞ ∞
1 1 z
Z{e − anT u(n)} = ∑ e − anT z −n = ∑ (e − aT z −1)n = = =
1 − e − aT z −1 1 − e − aT / z z − e − aT
n=0 n=0

Q3.3 Find the Z-transform of x(n) defined as,


x(n) = b n ; 0 ≤ n≤ N −1
=0 ; otherwise
Finite geometric series
Solution sum formula,
By the definition of Z-transform, N −1
1 − CN
+∞ N− 1 ∑C n
=
1− C
l q ∑ x(n) z =∑ b
Z x(n) = −n n
z −n
n=0

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

Q3.4 Find the Z-transform of x(n) = a n+1 u(n+1).


Solution
Given that, x(n) = an+1 u(n + 1) = an+1 ; n ³ –1
By the definition of Z-transform,
+∞ +∞ +∞ +∞
l q ∑ x(n) z = ∑ a
Z x(n) = −n n+1
z −n = an +1 z −n
n = −1
+ ∑a n +1
z −n = a 0 z + ∑a n
a z −n
n = −∞ n = −1 n= 0 n= 0

+∞
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) = Z–1 {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} = z–m 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

z 3z z − 3z(z − 1) z − 3z2 + 3 z −3z 2 + 4 z z(4 − 3z)


= 2
− = = = =
(z − 1) z−1 (z − 1)2 (z − 1)2 (z − 1)2 (z − 1)2
Q3.8 Determine the transfer function of the LTI system defined by the equation,
y(n) − 0.5 y(n − 1) = x(n) + 0.4 x(n − 1)
Solution
Given that, y(n) − 0.5 y(n − 1) = x(n) + 0.4 x(n − 1)
On taking Z-transform we get,

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 – z–1
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) + 2 z −2 Y(z) + 0.5z −1 Y(z) = 3 z −1 X(z) + 5X(z)

Y(z) 1 + 2 z −2 + 0.5z −1 = 3 z −1 + 5 X(z)

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),

On taking Z-transform of above equation we get,

Y(z) − 0.5 z −1Y(z) + y(−1) = X(z)


z
Y(z) − 0.5 z −1Y(z) + 2 =
z−5

Y(z) − 0.5 z −1Y(z) − 1 =


z

LM
Y(z) 1 −
0.5 OP =
z
+ 1 ⇒ Y(z)
LM
z − 0.5
=
OP
z+z−5
z−5 N z Q z−5 zN Q
z−5
z(2 z − 5) Y(z) 2z − 5
∴ Y(z) = ⇒ =
(z − 0.5) (z − 5) z (z − 0.5) (z − 5)

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

Now the Z - transform of x(n T) is,


+∞ 0 ∞
m r ∑ x(n T) z
Z x(n T) = −n
= ∑ anT z−n = ∑ a −nT zn
n = −∞ n = −∞ n = 0

n 1 1 aT
= ∑ ea − T z j = −T
=
1− a z 1− z a T
= T
a −z
n= 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.

∴ Impulse response, h(n) = Z −1 H(z) = Z −1 l q RS 1 +


1 UV d
= 0.5n + 2n u(n)i
T|1 − 0.5z −1
1 − 2 z −1 W|
1. The ROC does not include unit circle. Hence the system is unstable.
2. The impulse response is right-sided signal. Hence the system is causal.

b) ROC is |z| < 0.5

When ROC is |z| < 0.5, the impulse response h(n) should be left-sided signal.

∴ Impulse response, h(n) = Z −1 H(z) = Z −1 l q RS 1 +


1 UV d i
= −0.5n − 2n u( −n − 1)
|T1 − 0.5z −1
1 − 2 z −1 |W
1. The ROC does not include unit circle. Hence the system is unstable.
2. The impulse response is left-sided sequence. Hence the system is anticausal.
3. 113 Digital Signal Processing
Q3.15 Determine the stability and causality of the system described by the transfer function,
1 1
H(z) = + for ROC : 0.25 < |z| < 2.
1 − 0.25 z −1 1 − 2 z −1
Solution
Given that, ROC is 0.25 < |z| < 2
When ROC is 0.25 < |z| < 2, the impulse response h(n) is two-sided signal. Since |z| > 0.25, the
term with pole z = 0.25 corresponds to right-sided signal. Since |z| < 2, the term with pole z = 2
corresponds to left-sided signal.

∴ Impulse response, h(n) = Z −1 H(z) = Z −1 l q RS 1 +


1 UV
= 0.25n u(n) − 2n u( −n − 1)
|T1 − 0.25 z −1
1 − 2 z −1 |W
1. The ROC includes the unit circle. Hence the system is stable.
2. The impulse response is two-sided noncausal signal. Hence the system is noncausal.
Q3.16 Using Z-transform, determine the response of the LTI system with impulse response,
l q
h(n) = 1, −1, 1 , for an input x(n) = −2, 3, 1 . l q
Solution
m
Given that, x(n) = −2, 3, 1 r
+∞ 2
l q ∑ x(n) z = ∑ x(n) z = x(0) + x(1) z + x(2) z = −2 + 3z + z
∴ X(z) = Z x(n) = −n −n −1 −2 −1 −2

n= −∞ n=0

Given that, h(n) = m1, −1, 1r


+∞ 2
∴ H(z) = Zlh(n)q = ∑ h(n) z = ∑ h(n) z = h(0) + h(1) z + h(2) z = 1 − z
−n −n −1 −2 −1
+ z −2
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(0) + y(1) z −1 + y(2) z −2 + y(3) z −3 + y(4) z −4 = −2 + 5 z −1 − 4z −2 + 2 z −3 + z −4


Chapter 3 - Z - Transform 3. 114
Given that, h(n) = 1, −1, 1 m r
+∞ 2
H(z) = Z h(n) = l q ∑ h(n) z −n
= ∑ h(n) z −n
= h(0) + h(1) z −1 + h(2) z −2 = 1 − z −1 + z −2
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

Given that, h(n) = 0.4n u(n)


z
l q n
∴ H(z) = Z h(n) = Z 0.4n u(n) = s z − 0.4
3. 115 Digital Signal Processing
Y(z)
We know that, H(z) =
X(z)
z z z2
∴Y(z) = X(z) H(z) = × =
z − 0.2 z − 0.4 (z − 0.2) (z − 0.4)
Y(z) z A B
Let, = = +
z (z − 0.2) (z − 0.4) z − 0.2 z − 0.4
z 0.2 0.2
A= × (z − 0.2) z = 0.2 = = = −1
(z − 0.2) (z − 0.4) 0.2 − 0.4 −0.2
z 0.4 0.4
B= × (z − 0.4) z = 0.4 = = =2
(z − 0.2) (z − 0.4) 0.4 − 0.2 0.2
Y(z) −1 2 z z
∴ = + ⇒ Y(z) = − +2
z z − 0.2 z − 0.4 z − 0.2 z − 0.4

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

F ig Q 3 .25 : D irec t fo rm -I stru ctu re o f seco n d -o rd e r IIR system .


3. 117 Digital Signal Processing
Q3.26 An LTI system is described by the difference equation, y(n) = a1 y(n–1) + x(n) + b1 x(n–1). Realize
it in direct form-I structure and convert to direct form-II structure.
Solution
Given that, y(n) = a1y(n–1) + x(n) + b1x(n–1).
Using the given equation the direct form-I structure is drawn as shown in fig Q3.26a.
Direct form-I structure can be considered as cascade of two systems H1 and H2 as shown in
fig Q3.26b.
By linearity property, order of cascading can be changed as shown in fig Q3.26c.
In fig Q3.26c, we can observe that the input to the delay in H1 and H2 are same and so the output of
delays will be same. Hence the delays can be combined to get direct form-II structure as shown in
fig Q3.26d.

x (n ) + y (n ) x (n ) + y (n )
+ +
−1 −1 −1
z z z z
−1

b1 a1 b1 a1

F ig Q 3 .26 a : D irect fo rm -I stru ctu re.


F ig Q 3 .26 b : D irect fo rm -I structu re a s
ca sca d e of tw o system s .
x (n ) + y (n )
+ x (n ) y (n )
+ +
−1 −1
z z −1
z

a1 b1
H2 H1 a1 b1

F ig Q 3 .26 c : D irect fo rm -I structu re a fter F ig Q 3 .2 6 d : D irect fo rm -II stru ctu re.


intercha n g ing th e o rd e r o f c asca d in g .

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

1. Impulse response need not be symmetric. 1. Impulse response should be symmetric.


2. N multiplications are involved. 2. N/2 or (N+1)/2 multiplications are involved.
3. N-1 additions and delays are involved. 3. N-1 additions and delays are involved.
4. N-1 memory locations are required. 4. N-1 memory locations are required.

Q3.30 What is the advantage in linear phase realization of FIR systems ?


The advantage in the linear phase realization structure is that it involves minimum number of
multiplications. In linear phase realization of Nth order FIR system, the number of multiplications
for even values of N will be N/2 and for odd values of N will be (N+1)/2, whereas the direct form
realization involves N multiplications.

3.13 MATLAB Programs


Program 3.1
Write a MATLAB program to find one-sided Z-transform of the following standard
causal signals.
a) n b) an c) nan d) e-anT

%Program to find the Z-transform of some standard signals

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)

%********** program to determine z-transform of given signals


clear all
syms n real; %Let n be real variable

%(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)

%***********Program to determine the inverse z-transform


syms n z

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).

%*** Program to perform convolution and deconvolution using z-transform

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.

% Program to determine poles and zeros of rational function of Z and


% to plot the poles and zeros in z-plane
clear all
syms z
num_coeff=[1 0.8 0.8]; %find the factors of z^2+0.8z+0.8
disp(‘Roots of numerator polynomial z^2+0.8z+0.8 are zeros.’);
zeros=roots(num_coeff)

den_coeff=[1 0 0.49]; %find the factors of z^2+0.49


disp(‘Roots of denominator polynomial z^2+0.49 are poles.’);
poles=roots(den_coeff)

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

F ig P 3 .6 : P o le-Z e ro plo t o f p ro g ra m 3.6 .

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).

%******* Program to find impulse response of a discrete time system


clear all
syms z n

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

stem(n,H); %sketch impulse response


xlabel(‘n’);
ylabel(‘h(n)’);
OUTPUT
Impulse response h(n) is
ans =
2^n*5^(-n)+2^n*5^(-n)*n
3. 123 Digital Signal Processing

The sketch of impulse response is shown in fig P3.3.

F ig P 3 .7 : Im p ulse resp o n se o f p ro g ra m 3.7 .

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

II. State whether the following statements are True/False


1. The Z-transform exists only for those values of z for which X(z) is finite.
2. When the input is an impulse sampled signal, the z-domain transfer function can be directly obtained
from s-domain transfer function.
3. The jW axis in s-plane maps into the unit circle of z-plane in the clockwise direction.
4. The left half of s-plane maps into the interior of the unit circle in z-plane.
5. The system is unstable if all the poles of transfer function lies inside the unit circle in z-plane.
6. The Z-transform of impulse response gives the transfer function of LTI system.
7. If X(z) and H(z) are Z-transform of input and impulse response respectively, then the response of LTI
system is given by inverse Z-transform of the product X(z) H(z).
8 . For a stable LTI continuous time system the poles should lie on the right half of s-plane.
9. For a stable LTI discrete time system the poles should lie on the unit circle.

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

1. The impulse response, h(n) = 1 ; n=0


n− 1
= −(1 − b) b ; n ≥ 1, can be represented as,
a) d(n) b) u(n) – (1–b) bn–1 u(n – 1)
n–1
c) d(n) – (1–b) b u(n – 1) d) u(n) – (1–b) bn–1 u(n)
2. The Z-transform of a–n u(– n – 1) is,
z −z
−z z c) d)
a) b) z−a z−a
z −1 a z −1 a

3. The ROC of the sequence x(n) = u(–n) is,


a) |z| > 1 b) |z| < 1 c) no ROC d) –1 < |z| <1
3
4. The inverse Z-transform of , |z| > 4 is,
z−4
a) 3(4)n u(n–1) b) 3(4)n–1 u(n) c) 3(4)n–1 u(n+1) d) 3(4)n–1 u(n–1)
5. ROC of x(n) contains,
a) poles b) zeros c) no poles d) no zeros

6. The inverse Z-transform of X(z) = e a z , z > 0 is,

−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

14. The Z-transform is a,


a) finite series b) infinite power series c) geometric series d) both a and c
n
15. If the Z-transform of x(n) is X(z), then Z-transform of (0.5) x(n) is,
a) X(0.5 z) b) X(0.5–1 z) c) X(2–1 z) d) X(2z)
16. The Z-transform of correlation of the sequences x(n) and y(n) is,
a) X*(z) Y*(z–1) b) X(z) Y( z–1) c) X( z) * Y( z) d) X(z–1) Y( z–1)
+∞
17. The parseval's relation states that if Z{x1 (n)} = X1(z) and Z{x2 (n)} = X2(z) then ∑ x (n) x (n) is,
n = −∞
1
*
2

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

IV. Answer the following questions


1. Define one-sided and two-sided Z-transform.
2. What is region of convergence (ROC)?
3. State the final value theorem with regard to Z-transform.
4. State the initial value theorem with regard to Z-transform.
5. Define Z-transform of unit step signal.
6. What are the different methods available for inverse Z-transform?
7. When the z-domain transfer function of the system can be directly obtained from s-domain transfer
function?
8. Define the transfer function of an LTI system.
9. Write the transfer function of Nth order LTI system.
10. What is impulse invariant transformation?
11. How is a point in s-plane mapped to z-plane in impulse invariant transformation?
12. Why is an impulse invariant transformation not considered to be one-to-one?
13. Give the importance of convolution and deconvolution operations using Z-transform.
14. Give the conditions for stability of an LTI discrete time system in z-plane.
15. Explain when an LTI dicrete time system will be causal.
16. Define ROC for various finite and infinite discrete time signals.
17. Explain the shifting property of a discrete time signal defined in the range 0 < n < ¥ with an example.
18. What are all the properties of ROC of a rational function of z?
19. State and prove the convolution property of Z-transform.
20. State and prove the linearity property of Z-transform.
21. What are the various issues that are addressed by realization structures?
22. What are the basic elements used to construct the realization structures of discrete time system?
23. List the different types of structures for realization of IIR systems.
3. 129 Digital Signal Processing
24. Draw the direct form-I structure of an Nth order IIR system with equal number of poles and zeros.
25. Draw the direct form-II structure of an Nth order IIR system with equal number of poles and zeros.
26. Explain the conversion of direct form-I structure to direct form-II structure with an example.
27. What are the difficulties in cascade realization?
28. Explain the realization of cascade structure of an IIR system.
29. Explain the realization of parallel structure of an IIR system.
30. What are the different types of structure for realization of FIR systems?
31. Draw the direct form structure of an Nth order FIR system.
32. What is the necessary condition for Linear phase realization of FIR system?
33. Draw the linear phase realization structure of an Nth order FIR system when 'N' is even.
34. Draw the linear phase realization structure of an Nth order FIR system when 'N' is odd.
35. Explain the realization of cascade structure of a FIR system.
V. Solve the following problems
E3.1 Determine the Z-transform and their ROC of the following discrete time signals.

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
. )

5z(z + 5) 0.55 z 4z2 − 1


E3.2 a) X(z) = b) X(z) = c) X(z) =
( z − 5) 3 ( z − 0.5) 2 z ( z − 0.5)

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

ROC : 0.5 < z < 3 ; h(n) = 2


FG 1 IJ n
u(n) − 4 (3) n u( − n − 1)
H 2K
ii) Causal system

ROC : z > 3 ;h(n) = 2


FG 1 IJ n
u(n) + 4 ( 3) n u(n)
H 2K
1
E3.12 y(n) = 1 − 49 ( −7) n u(n)
8

E3.13 y(n) = 0.056( 0.5) n − 0.444( −1) n − 0111


. ( −0.25) n u(n)

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

F ig E 3 .1 5 .1 : D irect fo rm -I structu re. F ig E 3 .1 5 .2 : D irect fo rm -II stru ctu re.

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.

F ig E 3 .1 5 .4 : P a rallel stru ctu re. X (z ) W (z) Y (z )


+ +
−1 −1
−1.5z W (z ) z
+ −1.5 z −1W (z )

−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

F ig E 3 .16 .2 : D irect fo rm -II structure.


Chapter 3 - Z - Transform 3. 134

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

F ig E 3 .1 7 .1 : D irect fo rm -I structu re. F ig E 3 .1 7 .2 : D irect fo rm -II structu re.

X (z) W1(z) Y1(z) W2 ( z) Y (z)


+ + + +
−1
z
z
−1
−1z −1W2 (z) −7 z −1W2 (z)
−1 −1
0.75z W1(z) −1z W1(z)
+ −1 7 +
0.75 −1

−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

F ig E 3 .1 7.4 : P a ra llel stru ctu re.


3. 135 Digital Signal Processing

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)

F ig E 3 .1 8 .1 : C a sca de stru ctu re.

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

0.13X (z) Y 2 (z)


+

z −1
1 −1
− z Y 2 (z )
5
−1
1 z Y 2 (z )

H 2 (z) 5

F ig E 3 .1 8 .2 : P a ra llel structu re.


E3.19 a)
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 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

0.4[z −1X(z) + z −3 X(z)] 0.6z −2 X(z)


0.2[X(z) + z −4 X(z)]
+ + Y (z )
F ig E 3 .2 0 a : L in ea r p h ase struc tu re.

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

Digital Signal Processing - A. Nagoor Kani Chapter 3 - Z-Transform

Solution for Exercise Problems

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

= 3z5 + 0 + 0 + 4z2 + 45z + 1 = 3z5 + 4z2 + 45z + 1


Here, X(z) will be finite for all values of z, except z = ¥ .
\ ROC is entire z-plane except at z = ¥.

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

\ ROC is entire z-plane except at z=0 and z = ¥.

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

\ ROC is exterior of the circle of radius 0.2 in z-plane.

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|

\ |z| > 0.9 and |z| < 1.11


\ ROC is region in between circles of radius 0.9 and 1.11 in z-plane.

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

= Z {b0.5g ubng × b0.5g } − Z {b0.5g ubn − 2g}


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

By final value theorem,


0.5
bg d i bg
x ∞ = Lt 1 − z −1 X z = Lt 1 − z −1 × d i 2
z →1 z →1
d1− z i d1+ z i −1 −1

0.5 0.5 0.5


= Lt = = =∞
z →1
d id
1 − z −1 1 + z −1 i d id
1 − 1−1 1 + 1−1 i 0×2
Solution for Exercise Problems E3. 5

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

By final value theorem,


L O 3
bg d i bg
x ∞ = Lt 1 − z −1 X z = Lt 1 − z −1 iMM bz − 1gdzz − 0.2i PP
d 2
z →1 z →1
N Q
L 3 O
= Lt z −1 bz − 1g MM bz − 1gdzz − 0.2i PP = b1−10.2g = 01.8 = 1.25
2
z →1
N Q
E3.5 Determine the inverse Z-transform of the following functions using contour integral method.

a) X( z ) =
b2z − 1g z
b z − 1g 2

Solution

Given, X( z ) =
b2z − 1g z
bz − 1g 2

x(n) = sum of residues of X(z)zn-1

= sum of residues of
b2z − 1gz z n-1

bz − 1g 2

= sum of residues of
b2z − 1gz n

bz − 1g 2

1 d L b2z − 1gz OP = d e2z n


=
1! dz M
Mb z − 1g
2 n +1
− zn j =
d
2zn +1 − zn
N bz − 1g PQ dz 2
z =1
z =1 dz z =1

= 2bn + 1gz − nz n n −1
z =1

= 2bn + 1gb1g − nb1g = 2n + 2 − n


n n −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

x(n) = sum of residues of X(z)zn-1


(1 − e − a ) z
= sum of residues of zn-1
bz − 1g ez − e j −a

= 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

∴ x bng = d1 − e i u(n) ; for n ≥ 0


− an

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

By partial fraction expansion,


b g=
Xz A1 A2 A3
z bz + 1 g + b z + 2 g + b z + 2 g 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

= −b −1g + b −2g − n b −2g ubng


n n n
Solution for Exercise Problems E3. 7
2 z2 − z
b) X( z ) =
z − 5z 2 + 8z − 4
3

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

= ubng − b2g u bng + 1. 5 n b2g u bng


n n

= u bng − b2g u bng + 1. 5 n b2g u bng


n n

. 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 = −∞

On comparing (1) and (2),

x(−4) = 31, x(−3) = 15, x( −2) = 7, x( −1) = 3, x(0) = 1


l
∴ x(n) = .....31, 15, 7, 3, 1 q
A
(b) ROC : | z | > 1
z 1 −1 3 −2 7 −3 15 −4 31 −5
X ( z) = z + z + z + z + z +......
2z2 − 3z + 1 2 4 8 16 32
1 −1 3 −2 7 −3 15 −4 31 −5 2z2 − 3z + 1 z
= z + z + z + z + z + ...... .....(3)
2 4 8 16 32 3 1
z − + z −1
2 2
By definition of Z - transform, (–) (+) (–)
3 1 −1
+∞ − z
l q ∑ x(n) z
X(z) = Z x(n) = −n
2 2
3 9 −1 3 −2
n = −∞
− z + z
= ..... + x(0) + x(1)z −1 + x(2)z −2 + x(3)z −3 2 4
(–) (+)
4
(–)
+ x(4)z −4 + x(5)z −5 + ...... .....(4) 7 −1 3 −2
z − z
4 4
On comparing (3) and (4),
7 −1 21 −2 7 −3
z − z + z
x(n) = 0,
RS 1 3 7 15 31
, , , , , .....
UV (–) 4 (+) 8 (–)8
T 2 4 8 16 32 W 15 −2 7 −3
z − z
A 8 8
15 −2 45 −3 15 −4
z − z + z
8 16 16
(–) (+) (–)
31 −3 15 −4
z − z ....
16 16
E3. 10 DSP, Chapter 3 - Z-Transform
E3.9. Determine the inverse Z-transform of the following functions using power series method.

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 = −∞

On comparing (1) and (2) we get,

x(0) = 1, x(1) = 3, x(2) = 5, x(3) = 7 and so on.


l
∴ x(n) = 1, 3, 5, 7, ..... q
A
1−
FG 1 IJ z −1 2 −1 2 −2 2 −3 2 −4
b) X( z ) =
H 3K ; ROC : z >
1 1−
3
z + z −
9 27
z + z +......
81
F 1I
1+ G J z −1 3 1 −1 1 −1
Solution
H 3K 1+ z 1− z
3 3
1
Given that , ROC : | z | > 1/3 , \ x(n) is causal. 1 + z −1
3
1 (–) (–)
1 − z −1
2 2 2 −3 2 −4 2 −1
bg
Xz = 3
1 −1
= 1− z −1 + z −2 −
3 9 27
z + z +......
81
.....(1) −
3
z
1+ z
3 2 2
− z −1 − z −2
By definition of Z - transform, 3 9
(+) (+)
+∞ 2 −2
l q ∑ x(n) z
X(z) = Z x(n) = −n
= ..... + x(0) + x(1)z −1 + x(2)z −2
9
z
n = −∞
2 −2 2 −3
+ x(3)z −3 + x(4)z −4 + ...... .....(2) z + z
9 27
(–) (–)
On comparing (1) and (2) we get,
2 −3
− z
2 2 2 2 27
x(0) = 1, x(1) = − , x(2) = , x(3) = − , x(4) = , ......
3 9 27 81 − 2 z −3 − 2 z −4
27 81
RS
∴ x(n) = 1, −
2 2
, , −
2
,
2
, .....
UV (+) (+)
TA 3 9 27 81 W 2 −4
z
81

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

d1+ 2z − 3 z i Ybzg = z Xbzg


−1 −2 −1

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

Im pulse response, h(n) = Z −1 H z m b gr = Z RST z + 2zz − 3 UVW = Z


−1 −1
R|S z U|V
2
T| bz − 1gbz + 3g W|
bg=
Hz 1 A B
Let,
z bz − 1gbz − 3g = z − 1 + z + 3
1 1 1
A = bz − 1g
bz − 1gbz + 3g = 1+ 3 = 4 z =1

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 =

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
=

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

Given that, y(n) = 0.2x(n) − 5x(n − 1) + 0.6y(n − 1) − 0.08y(n − 2)


bg b g b
∴ y n − 0.6y n − 1 + 0.08y n − 2 = 0. 2x n − 5x n − 1 g bg b g
On taking Z - transform of above equation we get,

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

−1 −1 The roots of quadratic,


0.2 − 5z z 0.2z − 5 0.2z2 − 5z
Let, Hbzg = = =
1− 0.6z + 0.08z −1 −2
z z − 0.6z + 0.08 −2 2 2
z − 0.6z + 0.08 z2 − 0 . 6z + 0. 08 are,


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

= 24.8 b0.2g − 24.6 b0.4g ubng


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

l q FGH 32 IJK ubng + 23 FGH 32 IJK ubn − 1g


n n −1
Im pulse response, h n = Z −1 H(z) =bg
E3.11. A discrete time LTI system is characterised by the transfer function,

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

Now the poles are z = 0.5, z = 3.

(i) Stable System :-


For stable system the ROC should include unit circle. Therefore, the ROC will be the region in between circles of radius 0.5 and 3.
\ ROC : 0.5 < |z| < 3
The term with pole = 0.5 will be causal and the term with pole = 3 will be anticausal.

l q FGH 21IJK u(n) − 4(3)


n
∴ h(n) = Z −1 H(z) = 2 n
u(−n − 1)

(ii) Causal :-
For causal system the ROC should be exterior of the circle corresponding to largest pole.
\ ROC : |z| > 3.

l q FGH 21IJK u(n) + 4(3)


n
∴ h(n) = Z −1 H(z) = 2 n
u(n)

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.


Solution
Given that, y(n) + 7y(n–1) = x(n) ; y(–1) = 1. Input is unit step, i.e., x(n) = u(n)
z
On taking Z-transform of above equation we get,
l q l q
∴ X(z) = Z x(n) = Z u(n) =
z −1
z
Y(z) + 7 Y(z) z −1 + y ( −1) =
z −1
z
Y(z) 1+ 7z −1 + 7y( −1) =
z −1

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

Given that, 4y(n) + 5y(n − 1) + y(n − 2) = x(n)


On taking Z - transform of above equation we get,
x(n) = 0.5n u(n)
4 Y(z) + 5 Y(z) z −1 + y( −1) + z −2 Y(z) + z −1y( −1) + y( −2) = X(z)
l q
X(z) = Z x(n)
−1 −2 −1
4 Y(z) + 5z Y(z) + z Y(z) + 5y(−1) + z y(−1) + y( −2) = X(z) = Zn0.5 u(n)s
n

Y(z) 4 + 5 z −1 + z −2 + 5(1) + z −1(1) − 2 = X(z) z


=
z z − 0.5
Y(z) 4 + 5 z −1 + z −2 + z −1 + 3 =
z − 0.5
LM 5 + 1 OP = z − z − 3
Y(z) 4 + −1
N z z Q z − 0.5 2

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

−0 . 5z 2 + 0.125z + 0 .125 −0 . 5( −1)2 + 0.125(−1) + 0 .125 −0.5


B = (z + 1) × = = = − 0.444
b g b gb
z − 0.5 z + 1 z + 0.25 g z = −1
(−1 − 0.5) ( −1+ 0.25) 1.125
2
−0 . 5z + 0.125z + 0 .125 −0 . 5( −0.25)2 + 0.125( −0.25) + 0 .125 0.0625
C = (z + 0.25) × = = = −0.111
bz − 0.5 z + 1 z + 0.25 g b gb g z = − 0.25
( −0.25 − 0.5) (−0.25 + 1) −0.5625
Y(z) 0.056 0.444 0.111
∴ = − −
z z − 0.5 z +1 z + 0.25
Solution for Exercise Problems E3. 15

z z z
∴ Y(z) = 0.056 + − 0.444 − 0.111
z − 0.5 z +1 z + 0.25

On taking inverse Z-transform,

y(n) = 0.056 (0.5)n − 0.444(−1)n − 0.111( −0.25)n 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 + 5 z–2 respectively. Determine the output of the system for input
d(n – 1).

Solution

Given that, X1(z) = 2 − 4z −1 ; X 2 (z) = 1 + 5 z−2


h(n) = x1(n − 1) ∗ x 2 (n)
By convolution property,
l q l q l
Z h(n) = Z x1(n − 1) × Z x 2 (n) q
−1
H(z) = z X1(z) X 2 (z)

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

Let, y1(n) be the response for input d(n – 1) = x(n).

Now, y1(n) = x(n) ∗ h(n)


By convolution property,
l q l q l q
Z y1(n) = Z x(n) × Z h(n)

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 = −∞

+ y1(4)z−4 + y1(5)z −5 + ...... .....(2)

On comparing (1) and (2) we get,

y1(0) = 0, y1(1) = 0, y1(2) = 2, y1(3) = −4, y1(4) = 10, y1(5) = −20


l
∴ y1(n) = 0, 0, 2, − 4, 10, − 20 q
A
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) + 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)

F ig 1 : D irect fo rm -I structu re.


Direct Form – II

Consider equation (1),

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

Consider equation (2),


Y(z) 1 + 4 z −1 + 3 z −2 z −2 z2 + 4z + 3 z (z 1)(z 3)
= H(z) = = −3 3 =
X(z) 3 1
1 + z −1 − z −2 − z −3
1 z z + 0.75 z2 − 0.5 z − 0.25 z b g (z2 0.25 z − 0.25)
4 2 4
z = −1 is one of the
z ( z + 3) 1 + 3 z −1
= = .....(5) root of equation
b
z − 0.64 (z + 0.39) g d1− 0.64 z id1+ 0.39 z i
−1 −1

z3 + 0.75z2 − 0.5z − 0.25 = 0


Let, H(z) = H1(z) H2(z) −1 1 0.75 − 0.5 − 0.25

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)

F ig 5 : C a sca d e stru c tu re.

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

z 3 1 + 1.5 z −1 + 0.74 z −2 + 0.12 z −3 −0.74z Y (z )


z −2 X (z ) + z −2 Y (z)
+ −0.74

=
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,

Y(z) + 1. 5 z −1 Y(z) + 0.74 z −2 Y(z) + 0.12 z −3 Y(z) = z −2 X(z) + 5 z −3 X(z)

\ Y(z) = –1.5z –1Y(z) –0.74z–2Y(z) –0.12z–3 Y(z) + z–2X(z) + 5z–3X(z) .....(2)

Using equation (2), the direct form-I structure is drawn as shown in fig 1.

Let us express the transfer function of equation (1) as, X (z ) W(z) Y (z )


+ +
Y(z) W(z) Y(z)
= −1
−1.5z W(z) z
−1
X(z) X(z) W(z)
+ −1.5 z −1W(z)
W(z) 1
Let, = −2
−0.74z W(z) z
−1
X(z) 1 + 1. 5 z −1 + 0.74 z −2 + 0.12 z −3
z −2 W(z)
∴ W(z) = X(z) − 1. 5 z −1 W(z) − 0.74z −2 W(z) − 0.12 z −3 W(z) .....(3) + −0.74 1 +
−3 −1
−0.12z W(z) z
Y(z) 5z −3 W(z)
Let, = z −2 + 5 z −3 ⇒ −2 −3
Y(z) = z W(z) + 5 z W(z) .....(4) −0.12
z −3 W(z) 5
W(z)

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) z3 − 8z2 + 13z − 5 z3 1 − 8z −1 + 13z −2 − 5z −3 1 − 8z −1 + 13z −2 − 5z −3


Let, H(z) = = 2
= =
3 −1 −1
X(z) (z − 0.75) (z + z − 0.25) z 1 − 0.75 z 1 + z − 0.25 z −2
1 + z − 0.25z −2 − 0.75z −1 − 0.75z −2 + 0.1875z −3
−1

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

Given that, H(z) =


z 3 − 8z2 + 13z − 5
=
b gdz − 1 z 2 − 7z + 5 i z = 1, is one of the root

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

d1− 0.75 z id1+ z − 0.25 z i


−1 −1 −2

(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.

X (z ) W1(z) Y1(z) W2 (z) Y (z)


+ + + +
−1
−1 −1 z −1
z − z W2 (z) −7 z W2 (z)
−1
0.75z −1 − z W1(z)
1(z)
+ −1 −7 +
0.75 −1

−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 z3 − 8z2 + 13z − 5


Given that, H(z) = =
bz − 0.75 g dz 2
+ z − 0.25 i z + z − 0.25z − 0.75z 2 − 0.75z + 0.1875
3 2

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

−8. 25z2 + 14z − 5.1875


∴ H1(z) = 1 +
z3 + 0. 25z2 − z + 0.1875
−8. 25z2 + 14 z − 5.1875
= 1+
bz − 0.75g dz 2
+ z − 0.25 i
−8. 25z2 + 14z − 5.1875 A Bz + C
Let, = +
bz − 0.75g dz 2
+ z − 0.25 i z − 0.75 z2 + z − 0.25

On cross multiplying we get,


–8.25z2 + 14z – 5.1875 = A(z2 + z–0.25) + (Bz + C) (z – 0.75)
–8.25z2 + 14z – 5.1875 = Az2 + Az – 0.25 A + Bz2 – 0.75 Bz + Cz – 0.75C

On equating coefficients On equating coefficients On equating constants we get,


of z2 we get, of z we get,
–5.1875 = – 0.25A –0.75C
–8.25 = A + B 14 = A –0.75B + C Put, C = 7.8125 – 1.75A
\ B = –8.25 –A Put, B = –8.25 –A \ –5.1875 = –0.25A – 0.75 (7.8125 – 1.75A)
\ 14 = A –0.75 (–8.25 –A) + C –5.1875 = –0.25A –5.8593 + 1.3125A
14 = A + 6.1875 + 0.75A + C 1.3125A –0.25A = – 5.1875 + 5.8593
\ C = 14 – 6.1875 – 1.75A 1.0625A = 0.6718
= 7.8125 –1.75A 0.6718
∴A= = 0.63
1.0625

Here, A = 0.63, \ B = – 8.25 –A


= – 8.88
\ C = 7.8125 –1.75A
= 7.8125 – 1.75 ´ 0.63 = 6.71

0.63 −8.88z + 6.71


∴ H(z) = 1+ + 2
z − 0.75 z + z − 0.25
0.63 −8.88z + 6.71 0.63z −1 −8.88z −1 + 6.71z −2
= 1+ + = 1+ +
d
z 1 − 0.75z i
-1 2
d
z 1 + z − 0.25z −1 −2
i 1 − 0.75z -1
1 + z −1 − 0.25z −2

Let, H(z) = H1(z) + H2(z) + H3(z)

0.63z −1 −8.88z −1 + 6.71z −2


where, H1(z) = 1 ; H2 (z) = ; H3 ( z) =
1 − 0.75z −1 1 + z −1 − 0.25z −2
Y1(z)
Let, H1(z) = =1
X(z)
.....(9)
∴ Y1(z) = X(z)

Using equation (9), the H1(z) is realized as shown in fig 6.

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)

Using equation (10), the H2(z) is realized as shown in fig 7.


X (z ) Y 2 (z) X (z ) W2 (z) Y 2 (z)
+ +
−1
z −1

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)

Using equation (11), the H3(z) is realized as shown in fig 8.

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

F ig 9 : P a ra llel stru ctu re.

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 )

F ig 3 : C a sca de stru ctu re.

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

Using equation (5), the H1(z) is realized as shown in fig 4. F ig 4.


Solution for Exercise Problems E3. 23
Y2 (z) 0.13 0.13 1 −1
Let, H2 (z) = = = ⇒ Y2 (z) = 013
. X(z) − z Y2 (z) .....(6)
X(z) 1 + 1 z −1 1
1 + z −1
FG IJ 5
5 5 H K
X (z ) + Y 2 (z)
Using equation (6), the H2(z) is realized as shown in fig 5.
The parallel structure is drawn by connecting H1(z) and H2(z) is parallel z −1
as shown in fig 6. 1 −1
− z Y 2 (z)
5
1

5
X (z ) Y 1 (z) Y (z ) F ig 5.
+

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

F ig 6 : P a ra llel structu re.

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

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 2 : D irect fo rm stru ctu re o f F IR system .
E3. 24 DSP, Chapter 3 - Z-Transform
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
Solution
Y(z)
Let, H(z) = = 0.2 + 0.4 z −1 + 0.6 z −2 + 0.4 z −3 + 0.2 z −4
X(z)
∴ Y(z) = 0.2 X(z) + 0.4 z −1 X(z) + 0.6 z −2 X(z) + 0.4 z −3 X(z) + 0.2 z −4 X(z)
= 0.2 X(z) +z −4 X(z) + 0.4 z −1 X(z) + z −3 X(z) + 0.6 z −2 X(z) .....(1)

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 )

0.2 0.4 0.6

0.4[z −1X(z) + z −3 X ( z)] 0.6z −2 X ( z )


0.2[X (z) + z −4 X ( z)]
+ + Y (z )
F ig 1 : L in e ar p ha se rea liza tio n o f eq u a tio n (1 ).
−1
X (z ) X (z ) z X (z )
F 1
b) H(z) = G 0.3+ z −1
+ 0.3 z −2 IJ FG0.5 − 1 z −1
+ 0.5 z −2 IJ z −1

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

Fourier Series and Fourier


Transform of Discrete
Time Signals

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


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

n=0 n=0 p=0

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

n=0 p=0 n=0

When p = k the right-hand side of the above equation reduces to ck N.


N−1 − j2πkn
Note : The sum over one period of the values of a periodic
∑ x(n) e N = ck N
complex exponential is zero, unless that complex exponential
n=0

1 N−1 − j2 πkn is a constant.


∴ ck =
N
∑ x(n) e N
N−1 j2π (p − k)n
n=0 ∴ ∑
n= 0
e N = N ; (p − k) = 0, ± N, ± 2N,.....
= 0 ; (p − k) ≠ N
4. 3 Digital Signal Processing
Difference Between Continuous Time and Discrete Time Fourier Series
1. The frequency range of continuous time signal is –¥ to +¥ , and so it has infinite frequency
spectrum.
2. The frequency range of discrete time signal is 0 to 2p (or –p to + p) and so it has finite frequency
spectrum. A discrete time signal with fundamental period N will have N frequency components whose
frequencies are,
2πk
ωk = ; for k = 0, 1, 2, ..... , N − 1
N

4.2.1 Frequency Spectrum of Periodic Discrete Time Signals


Let, x(n) be a periodic discrete time signal. Now, the Fourier series representation of x(n) is,
N −1 j2 πkn
x( n) = ∑ ck e
k 0
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

Now, the Fourier coefficient ck+N is given by,

N−1 − j2 π ( k+N) n N−1 FG − j2πk n + − j2πN n IJ


1 1
ck + N = ∑ x(n) e N = ∑ x(n) eH N N K
For integer values
N n=0 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

Phase spectrum, ∠c k = l∠c , ∠c , ∠c , ∠c ,......... ∠c q


0 1 2 3 N −1
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 4
4.2.2 Properties of Discrete Time Fourier Series
The properties of discrete time Fourier series coefficients are listed in table 4.1. The proof of these
properties are left as exercise to the readers.
Table 4.1 : Properties of Discrete Time Fourier Series Coefficients
Note : ck are Fourier series coefficients of x(n) and dk are Fourier series coefficients of y(n).

Property Discrete time periodic signal Fourier series coefficients


Linearity A x(n) + B y(n) A ck + B dk
j2 πkm
Time shifting x(n–m) ck e N

j2 πnm
Frequency shifting e N x(n) ck – m

Conjugation x*(n) c∗− k


Time reversal x(–n) c–k
n ) ; for n multiple of m
x( m 1
Time scaling ck
(periodic with period mN) m
N−1
Multiplication x(n) y(n) ∑ cm d k − m
m=0
N−1
Circular convolution ∑ x(m) y((n − m)) N N cK dK
m=0

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

Let, x(n + N) = 3 cos


π
(n + N) = 3 cos
πn
+
πN FG IJ
4 4 4 H K
πN
For periodicity should be integral multiple of 2p.
4
πN
Let,
4
= 2π × M ; where M and N are integers Þ N = 8M

Here, N is an integer for M = 1, 2, 3, .....


Let M = 1, \ N = 8
Hence x(n) is periodic, with fundamental period N = 8, and fundamental frequency, ω 0 = 2π = 2π = π .
N 8 4
Fourier Series
The Fourier coefficients ck are given by,
N − 1 − j2πkn
1
ck =
N
∑ x(n) e N ; for k = 0, 1, 2, 3, ..... , N − 1
n=0
πn
Here, N = 8 and x(n) = 3 cos
4
7 − j2πkn
1 πn
∴ ck =
8 ∑ 3 cos
4
e 8 ; for k = 0, 1, 2, 3, 4, 5, 6, 7
n=0
7 − jπkn
3 πn
=
8
∑ cos
4
e 4

n=0

LM(cos 0)e + FG cos π IJ e + FG cos 2π IJ e + FG cos 3π IJ e + FG cos 4π IJ e


0 −j
πk
4
−j
2πk
4
−j
3πk
4
−j
4 πk
4
OP
3M H 4K H 4K H 4K H 4K PP
=
8 FM
MM+G cos 5π IJ e + FG cos 6π IJ e + FG cos 7π IJ e
−j
5πk
−j
6 πk
−j
7 πk
PP
4 4 4
N H 4K H 4K H 4K Q
3L OP
πk 3πk 5πk 7 πk
1 −j 1 1−j 1 −j −j
=
8 MN
M1+
2
e 4+0−
2
e −e −
2
e 4 + 0 + − jπk

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

Test for Periodicity


j5π (n + N) FG j5πn + j5πN IJ
Let, x (n + N) = e 2 = eH 2 2 K
5πN
For periodicity should be integral multiple of 2p.
2
4. 7 Digital Signal Processing
5πN 4
Let , = 2π × M ⇒ N = M
2 5
Here, N is integer for M = 5, 10, 15, .....
Let, M = 5, \ N = 4
Here, x(n) is periodic with fundamental period N = 4, and fundamental frequency, ω 0 = 2π = 2π = π
N 4 2
Fourier Series
The Fourier coefficients ck are given by,
N − 1 − j2πkn
1
ck =
N
∑ x(n) e N ; for k = 0, 1, 2, 3, ..... , N − 1
n =0
j5πn
Here, N = 4 and 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

+ jsin
LM

+ cos 3π + jsin3π + cos

+ 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

∴ The given signal itself is in the Fourier series form.


Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 8
Example 4.2
Determine the Fourier series representation of the following discrete time signal and sketch the frequency
spectrum.
x(n) = {..... , 1, 2, –3, 1, 2, –3, 1, 2, –3, .....}
-
Solution
Given that, x(n) = {..... , 1, 2, –3, 1, 2, –3, 1, 2, –3, .....}
-
Here the three samples 1, 2, –3 repeat again and again.

­Therefore, x(n) is periodic with periodicity of N = 3, and fundamental frequency, ω 0 = 2π = 2π .


N 3
Let, x(n) = {1, 2, –3} (considering one period). Now, the Fourier coefficients ck are given by,
N − 1 − j2 πkn 2 − j2 πkn
1 1
ck =
N
∑ x(n) e N =
3
∑ x(n) e 3

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

= 1.527 e − j0.395π ej ω 0n + 1.527 e j0.395π e j 2ω 0n


4. 9 Digital Signal Processing
Frequency Spectrum

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.527 1.527 1.527 1.527 1.527 1.527


1.5

1.0 −3 −2 −1 0 1 2 3 5
4 k
0.5

−0.395 π −0.395 π −0.395 π


−0.4 π
−3 −2 −1 0 1 2 3 4 5 k
F ig 1a : M ag n itu de sp ec tru m . F ig 1b : P h a se sp ec tru m .
F ig 1 : F req u en c y sp ectru m .

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 →∞

Let ck be Fourier coefficients of ~x ( n) .


N−1 − j2 πkn N−1 − j2 πkn
1 ~ ~
∴ ck =
N ∑ x(n) e N ⇒ Nc k = ∑ x(n) e 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

Let us define Nck as a function of e jω k .


∴ X(e jω k ) = Nck .....(4.4)
Now, using equation (4.3), the equation (4.4) can be expressed as shown below.
+N
2
.....(4.5)
X( e jω k
) = ∑ ~x(n) e− jω n k

n = − N −1
e j
2

Let, N ® ¥, in equation (4.5).


Now, ~x ( n) ® x(n), wk ® w, and the summation index become - ¥ to +¥.
Therefore, the equation (4.5) can be written as shown below.
+∞
.....(4.6)
X(e jω ) = ∑ x(n) e− jωn
n = −∞
The equation (4.6) is called Fourier transform of x(n), which is used to represent nonperiodic discrete
time signal (as a function of frequency,w) in frequency domain.
Consider the Fourier series representation of ~x ( n) given below.
N−1 j2 πkn
~ bg ∑c
x n = k e N

k=0

Let us multiply and divide the above equation by N 2π .


N−1 j2 πkn N−1 j2 πkn
N 2π N 2π
~ bg
x n = ×
2π N ∑ ck e N =
2π ∑ ck e N
N 2 πk
k=0 k=0
ωk =
1 N−1 j2 πkn
2π N
=
2π ∑ Nc k e N
N Using equation (4.4).
k=0
N−1
1 2π .....(4.7)
=
2π ∑ X ( e jω k ) e j ω k n
N
k=0

Let, N ® ¥, in equation (4.7).


Now, ~x ( n) ® x(n), w k ® w, 2p / N ® dw, and summation becomes integral with limits 0 to 2p.
Therefore, the equation (4.7) can be written as shown below.

x( n) =
1
2π z
0
X(e jω ) e jωn dω .....(4.8)

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).

4.3.2 Definition of Discrete Time Fourier Transform


The Fourier transform (FT) of discrete-time signals is called Discrete Time Fourier Transform
(i.e., DTFT). But for convenience the DTFT is also referred as FT in this book.
Let, x(n) = Discrete time signal
X(ejw ) = Fourier transform of x(n)
4. 11 Digital Signal Processing
The Fourier transform of a finite energy discrete time signal, x(n) is defined as,
+∞
X( e jω ) = ∑ x(n) e− jωn
n = −∞

Symbolically the Fourier transform of x(n) is denoted as,


F{x(n)}
where, F is the operator that represents Fourier transform.
+∞
∴ X( e jω ) = F {x( n)} = ∑ x(n) e− jωn
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)| < ∞

4.3.3 Frequency Spectrum of Discrete Time Signal


The Fourier transform X(ejw ) of a signal x(n) represents the frequency content of x(n). We can say that,
by taking Fourier transform, the signal x(n) is decomposed into its frequency components.
Hence X(ejw ) is also called frequency spectrum of discrete time signal or signal spectrum.
Magnitude and Phase Spectrum
The X(ejw ) is a complex valued function of w, and so it can be expressed in rectangular form as,
X(ejw ) = Xr(ejw ) + jXi(ejw )
where, Xr(ejw ) = Real part of X(ejw )
Xi(ejw ) = Imaginary part of X(ejw )
The polar form of X(ejw ) is,
X(ejw ) = |X(ejw )| Ð X(ejw )
where, |X(ejw )| = Magnitude spectrum
ÐX(ejw ) = Phase spectrum
The magnitude spectrum is defined as,

|X(ejw )|2 = X(ejw ) X*(ejw ) or |X(e jω )| = X(e jω ) X∗ (e jω )

where, X*(ejw ) is complex conjugate of X(ejw )

Alternatively, |X(e jω )|2 = X(e jω ) X∗ (e jω )


= X r (e jω ) + jXi (e jω ) X r (e jω ) − jXi (e jω ) = X2r (e jω ) + X2i (e jω )

∴ |X(e jω )| = X2r (e jω ) + X2i (e jω )

The phase spectrum is defined as,

∠X(e jω ) = Arg[X(e jω )] = tan −1


LM X (e ) OP
i

MN X (e ) PQ
r

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


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 = −∞

= ..... + x( −2) e j2 ω + x( −1) e jω + x(0) e0


+ x(1) e− jω + x(2) e − j2 ω + ..... .....(4.10.1)
Let us express the given function of X(ejw ) as a power series of e- jw by long division as shown below.
X(e jω ) = ..... + b2 e j2 ω + b1 e jω + a 0 e0 + a1 e − jω + a 2 e− j2 ω + ..... .....(4.10.2)
On comparing the equations (4.10.1) and (4.10.2) we can say that the samples of signal x(n) are simply
the coefficients of e-jwn.

4.3.5 Comparison of Fourier Transform of Discrete and Continuous Time Signals


1. The Fourier transform of a continuous time signal consists of a spectrum with a frequency
range- ¥ to + ¥ . But the Fourier transform of a discrete time signal is unique in the frequency
range - p to + p (or equivalently 0 to 2p). Also Fourier transform of discrete time signal is
periodic with period 2p. Hence the frequency range for any discrete-time signal is limited to
-p to p (or 0 to 2p) and any frequency outside this interval has an equivalent frequency within
this interval.
4. 13 Digital Signal Processing
2. Since the continuous time signal is continuous in time the Fourier transform of continuous time
signal involves integration but the Fourier transform of discrete time signal involves summation
because the signal is discrete.

4.4 Properties of Discrete Time Fourier Transform


1. Linearity property
The linearity property of Fourier transform states that the Fourier transform of a linear weighted
combination of two or more signals is equal to the similar linear weighted combination of the Fourier transform
of the individual signals.
Let, F{x1(n)} = X1(ejw ) and F{x2(n)} = X2(ejw ) then by linearity property,
F{a1 x1(n) + a2 x2(n)} = a1 X1(ejw ) + a2 X2(ejw ) ; where a1 and a2 are constants.
Proof :
By the definition of Fourier transform,
+∞
X1(e jω ) = F {x1(n)} = ∑ x (n) e
1
− jωn
.....(4.11)
n = −∞
+∞
X 2(e jω ) = F {x 2(n)} = ∑ x (n) e 2
− jωn
.....(4.12)
n = −∞
+∞ +∞
F {a1 x1(n) + a 2 x 2(n)} = ∑ a1 x1(n)+a2 x2(n) e− jωn = ∑ a1 x1(n) e− jωn +a 2 x2 (n) e− jωn
n = −∞ n = −∞
+∞ +∞
= ∑ a1 x1(n) e− jωn + ∑a 2 x 2(n) e− jωn
n = −∞ n = −∞
+∞ +∞
= a1 ∑ x1(n) e− jωn +a2 ∑ x (n) e
2
− jω n

n = −∞ n = −∞

= a1 X1(e jω ) + a2 X 2 (e jω ) Using equations (4.11) and (4.12)

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, e–j2pmn = 1
n = −∞

3. Time shifting or Fourier transform of delayed signal


Let, F{x(n)} = X(ejw ), then F{x(n-m)} = e-jw m X(ejw )
Also, F{x(n + m)} = e jwm X(ejw )
This relation means that if a signal is shifted in time domain by m samples, its magnitude spectrum
remains unchanged. However, the phase spectrum is changed by an amount ±wm. This result can be explained
if we recall that the frequency content of a signal depends only on its shape. Mathematically, we can say that
delaying by m units in time domain is equivalent to multiplying the spectrum by e-jwm in the frequency
domain.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 14

Proof :

By the definition of Fourier transform,


+∞
X(e jω ) = F {x(n)} = ∑ x(n) e − jω n .....(4.13)
n = −∞
+∞
Let, n – m = p, \ n = p + m
∴ F {x(n − m)} = ∑ x(n − m) e
n = −∞
− jωn
when n ® -¥, p ® -¥
+∞
when n ® +¥ , p ® +¥
= ∑ x(p) e − jω(m + p)

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 = −∞

= e− jω m X(e jω ) Using equation (4.13)

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 :

By the definition of Fourier transform,


+∞
F {x(n)} = ∑ x(n) e − jωn
....(4.14)
n = −∞

+∞ +∞ 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

According to this property, multiplication of a sequence x(n) by e jω 0n


is equivalent to a frequency
translation of the spectrum X(ejw ) by w 0.
Proof :
By the definition of Fourier transform,
+∞
X(e jω ) = F {x(n)} = ∑ x(n) e − jωn
.....(4.16)
n = −∞
+∞
∴ F {e jω 0 n x(n)} = ∑e
n = −∞
jω 0 n
x(n) e− jωn

+∞
= ∑ 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)

7. Fourier transform of the product of two signals


Let, F{x1(n)} = X1(ejw )
F{x2(n)} = X2(ejw )

m
Now, F x1 (n) x2 (n) = r 1
2π z

−π
X1 (e jλ ) X2 (e j( ω − λ ) ) dλ .....(4.18)

The equation (4.18) is convolution of X1(ejw ) and X2(ejw )


This relation is the dual of time domain convolution. In other words, the Fourier transform of the
product of two discrete time signals is equivalent to the convolution of their Fourier transform. [On the other
hand, the Fourier transform of the convolution of two discrete time signals is equivalent to the product of
their Fourier transform.]
Proof :
Let, x2(n) x1(n) = x3(n)
+∞
Now , F {x 2(n) x1(n)} = F {x 3(n)} = ∑ x (n) e 3
− jωn

n = −∞
+∞
.....(4.19)
= ∑ x (n) x (n) e
2 1
− jωn

n = −∞

By the definition of inverse Fourier transform we get,


x1(n) =
1
2π z
−π
X1(e jω ) e jω n dω
Let, w = l

=
1
2π z
−π

X1(e ) e jλ n
dλ .....(4.20)

On substituting for x1(n) from equation (4.20) in equation (4.19) we get,

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

) 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λ

8. Differentiation in frequency domain


If, F{x(n)} = X(ejw )
d
m
then, F n x(n) = j r dω
X(e jω )

Proof :

By the definition of Fourier transform,


+∞
X(e jω ) = F {x(n)} = ∑ x(n) e − jωn
.....(4.21)
n = −∞
+∞
F {n x(n)} = ∑ n x(n) e − jωn

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 )
+∞

where, x1 (n) ∗ x2 (n) = ∑ x (m) x (n − m)


m = −∞
1 2
.....(4.22)

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 )
+∞

where, rxy (m) = ∑


n = −∞
x(n) y(n − m) .....(4.25)

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 Using equation (4.25)


F { rxy (m)} = ∑r xy (m) e− jωm = ∑ MN ∑ x(n) y(n − m) e− jωm
PQ
m = −∞ m = −∞ n = −∞
+∞ +∞
= ∑ ∑ x(n) y(n − m) e− jωm e− jωn e jωn Multiply by e-jwn and ejwn
m = − ∞ n = −∞
e-jwn ´ ejwn = 1
+∞ +∞
= ∑ x( n) e− jω n ∑ y( n − m) e jω( n − m)
n = −∞ m = −∞
+∞ +∞
= ∑ x( n) e− jω n ∑ y(p) e jω p Let, n – m = p \ m = n – p
when m ® -¥, p ® +¥ ,
n = −∞ p = −∞

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

11. Parseval’s relation


If, F{x1(n)} = X1(ejw ) and, F{x2(n)} = X2(ejw ),
then the Parseval’s relation states that,


+∞

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
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)

Now, by definition of inverse Fourier transform,



x 2( n) =
1

−π
z X 2(e jω ) e jωn dω .....(4.30)

Consider left-hand side of Parseval's relation [equation (4.28)],



1
2π z
−π
X1(e jω ) X 2* (e jω ) dω

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ω

-π 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

Table 4.2 : Properties of Discrete Time Fourier Transform


Note : X(ejw) = F{x(n)} ; X1(ejw) = F{x1(n)} ; X2(ejw) = F{x2(n)} ; Y(ejw) = F{y(n)}

Property Discrete time signal Fourier transform


Linearity a1 x1(n) + a2 x2(n) a1 X1(ejw ) + a2 X2(ejw )
Periodicity x(n) X(ejw + 2pm) = X(ejw )
Time shifting x(n – m) e–jw m X(ejw )
Time reversal x(–n) X(e–jw )
Conjugation x*(n) X*(e–jw )
Frequency shifting e jω 0 n x(n) X ( e j( ω − ω 0 ) )

Multiplication x1(n) x2(n)


1
2π z
−π
X1 ( e jλ ) X2 ( e j( ω − λ ) ) dλ

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ω

Parseval's relation Energy in time domain, Energy in frequency domain,


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

4.5 Discrete Time Fourier Transform of Periodic Discrete Time Signals


The Fourier transform of any periodic discrete time signal can be obtained from the knowledge of
Fourier transform of periodic discrete time signal e jω 0 n , with period N.
The Fourier transform of continuous time periodic signal is a train of impulses. Similarly, the Fourier
transform of discrete time periodic signal is also a train of impulses, but the impulse train should be periodic.
Therefore, the Fourier transform of e jω 0 n will be in the form of periodic impulse train with period 2p as shown
in equation (4.31).

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 =−∞

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 =− ∞

By the definition of inverse Fourier transform,


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

x(t) x(n) X(ejww )

with positive power of ejww with negative power of ejww

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
+∞ +∞

∑ δ( 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 = −∞

Let, F{y(n)} = Y(e ) ; jw


F{x(n)} = X(ejw ) ; F{h(n)} = H(ejw )
Now by convolution theorem of Fourier transform,
F{x(n) * h(n)} = X(ejw ) H(ejw ) .....(4.36)

Using equation (4.35), the equation (4.36) can be written as,


F{y(n)} = X(ejw ) H(ejw )
\ Y(ejw ) = X(ejw ) H(ejw )

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ω )

Now, response in frequency domain, Y(ejw ) = X(ejw ) H(ejw ) .....(4.38)

On taking inverse Fourier transform of equation (4.38) we get,


y(n) = F –1{X(ejw ) H(ejw )} .....(4.39)

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.

4.6.3 Frequency Response of LTI Discrete Time System


The output y(n) of LTI system is given by convolution of h(n) and x(n).
+∞
.....(4.40)
y(n) = x(n) ∗ h(n) = h(n) ∗ x(n) = ∑
m = −∞
h(m) x(n − m)

Consider a special class of input (sinusoidal input), Ae jωn = A ( cos ωn + j sin ωn)

x(n) = A ejwn ; –¥ < n < ¥ .....(4.41)


where, A = Amplitude
w = Arbitrary frequency in the interval -p to +p.
∴ x(n − m) = Ae jω (n − m) .....(4.42)

On substituting for x(n–m) from equation (4.42) in equation (4.40) we get,


+∞ +∞
y( n) = ∑
m = −∞
h(m) A e jω (n − m) = ∑
m = −∞
h(m) A e jωn e − jωm

+∞
= A e jωn ∑
m = −∞
h(m) e− jωm .....(4.43)

By the definition of Fourier transform, Replace n by m.


+∞ +∞
H(e jω ) = F {h(n)} = ∑
n = −∞
h( n) e − jωn = ∑
m = −∞
h( m) e− jωm .....(4.44)

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 )

∴ |H(e jω )|2 = H 2r (e jω ) + H 2i (e jω ) ⇒ |H(e jω )| = H 2r (e jω ) + H 2i (e jω )

The phase function is defined as,

∠H(e jω ) = Arg[H(e jω )] = tan −1


LM H (e ) OP
i

MN H (e ) PQ
r

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

The phase function of H(ejw ) is defined as,

∠H(e jω ) = tan −1
LM H (e
i

)OP
; where H r (e jω ) is real part and H i (e jω ) is imaginary part.
MN H (e
r

) 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.

1 1 − a e +jω 1 − a e jω 1 − a(cos ω + jsin ω )


H ( e jω ) = − jω
× + jω
= =
1 − ae 1 − ae 1 − 2a cos ω + a 2 1 − 2a cos ω + a 2
1 − a cos ω − a sin ω
= + j Using equation (4.49)
1 − 2a cos ω + a 2 1 − 2a cos ω + a 2 jω
e = cosω + jsin ω
1 − a cos ω −a sin ω
∴ H r (e jω ) = and H i (e jω ) =
1 − 2a cos ω + a 2 1 − 2a cos ω + a 2

LM H (e OP LM PQO

) − a sin ω
The phase function, ∠H(e jω ) = tan −1 i
= tan −1
MN H (e
r

) 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

a = 0.5 a = 0.8 a = –0.5 a = –0.8


w
|H(e )| Ð H(ejww )
jw
w jw
|H(e )|
w
Ð H(ejww ) |H(e )| Ð H(ejww )
jw
w jw
|H(e )| Ð
w
ÐH(ejww )
−8π
= −π 0.667 0 0.556 0 2 0 5 0
8
−7π
0.678 0.04p 0.566 0.06p 1.751 –0.11p 2.486 –0.28p
8
−6π
0.715 0.08p 0.601 0.11p 1.357 –0.16p 1.402 –0.29p
8
−5π
0.783 0.12p 0.666 0.16p 1.074 –0.17p 0.986 –0.26p
8
−4 π − π
= 0.894 0.15p 0.781 0.21p 0.894 –0.15p 0.781 –0.21p
8 2
−3π
1.074 0.17p 0.986 0.26p 0.783 –0.12p 0.666 –0.16p
8
−2π
1.357 0.16p 1.402 0.29p 0.715 –0.08p 0.601 –0.11p
8
−π
1.751 0.11p 2.486 0.28p 0.678 –0.04p 0.566 –0.06p
8
0 2 0 5 0 0.667 0 0.556 0
π
1.751 –0.11p 2.486 –0.28p 0.678 0.04p 0.566 0.06p
8

1.357 –0.16p 1.402 –0.29p 0.715 0.08p 0.601 0.11p
8

1.074 –0.17p 0.986 –0.26p 0.783 0.12p 0.666 0.16p
8
4π π
= 0.894 –0.15p 0.781 –0.21p 0.894 0.15p 0.781 0.21p
8 2

0.783 –0.12p 0.666 –0.16p 1.074 0.17p 0.986 0.26p
8

0.715 –0.08p 0.601 –0.11p 1.357 0.16p 1.402 0.29p
8

0.678 –0.04p 0.566 –0.06p 1.751 0.11p 2.486 0.28p
8

=π 0.667 0 0.556 0 2 0 5 0
8
4. 27 Digital Signal Processing

F ig 4 .1 : M a g n itu d e resp o nse of 1 st ord er d iscrete


tim e syste m w h en a= 0.5 a n d 0 .8 .
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.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

F ig 4.2 : P h a se resp o n se of 1 st o rd e r d iscrete


tim e syste m w h en a= 0.5 a n d a = 0 .8

∠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

F ig 4 .3 : M a g n itu d e resp onse of 1 st ord er d iscrete


tim e system w he n a = −0 .5 a n d a = −0.8

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

F ig 4.4 : P h a se resp o nse o f 1 st o rd e r d iscrete


tim e system w h en a = −0 .5 and a = −0 .8

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ω ) = −α e − jω Y(e jω ) − β e− j2ω Y(e jω ) + X( e jω ) + a e− jω X(e jω )


Y( e jω ) + α e − jω Y(e jω ) + β e− j2 ω Y(e jω ) = X(e jω ) + a e− jω X ( e jω )
Y( e jω ) 1 + α e − jω + β e− j2 ω = X( e jω ) 1 + a e − jω

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.

The magnitude function of H(ejw ) is defined as,

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

∴ Magnitude function, H(e jω


L
) =M
1 + a 2 + 2a cos ω OP 2

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

) OP ; where H r (e jω ) is real part and H i (e jω ) is imaginary part.
MN H (e r

) 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.

Table 4.5 : Frequency Response of Second-Order Discrete Time System

F 2 I 1/ 2

H ( e jω ) = 2 2
cos ω
GH 1 + α + β +1 +2αa(1++2aβ)cos J
ω + 2β cos2ω K

∠H (e jω ) = tan G−1F (aβ + α − a) sin ω + β sin 2ω IJ = LM 1 tan FG (aβ + α − a)sin ω + β sin 2ω IJ OP π


−1
H 1 + aα + (a + aβ + α) cosω + β cos2ω K MN π H 1 + aα + (a + aβ + α)cosω + β cos2ω K PQ
Case - i
π
r = 0.5, ω 0 =
4
∴ a = − r cos ω 0 = −0.5 cos
π
= −0.3536 FG
H ( e jω ) =
1.125 − 0.7072 cos ω IJ 1/ 2

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

∴ a = − r cos ω 0 = −0.9 cos


π
= −0.6364
H ( e jω ) = GH 3.2761 −1.405 − 1.2728 cos ω
J
4.6075 cos ω +1.62 cos2ω K
4
π
L 1 F −1.1519 sin ω + 0.81 sin2ω I OP π
) = M tan G
∠H (e jω
MN π H 1.81 − 2.4247 cosω + 0.81 cos2ω JK PQ
−1
α = −2 r cos ω 0 = −2 × 0.9 cos = −12728
.
4
β = r 2 = 0.9 2 = 0.81
4. 33 Digital Signal Processing

Table 4.5 : Continued...

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

1.41 –0.05p 5.28 –0.02p
8

1.27 –0.11p 1.58 –0.32p
8
4π π
= 1.03 –0.13p 0.92 –0.27p
8 2

0.86 –0.12p 0.7 –0.21p
8

0.76 –0.08p 0.59 –0.14p
8

0.71 –0.04p 0.55 –0.07p
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π

0.05π

−ω −π
0
π

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

4.7 Aliasing in Frequency Spectrum Due to Sampling


Let x(t) be an analog signal and X(jW ) be Fourier transform of x(t).
Now by definition of continuous time inverse Fourier transform,
+∞

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)

Expressing the integration as


=
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

Since m and n are integers
ej2pmn =1
π

=
1

+∞


m = −∞
1
T z FH e
−π
X j ω
T
+
2π m
T jIK e jωn

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)

On comparing equations (4.54) and (4.55) we can write,


+∞

∑ XFH je jIK
1 2π m .....(4.56)
X(e jω ) = ω
T
+ T
T m = −∞
+∞

∑ XFH jeΩ + jIK


1 2π m .....(4.57)
= T
T m = −∞

In equation (4.57) if X(jW ) is the original spectrum of analog signal, then X j Ω +


FG F 2π m I IJ is the
HH T KK
2π m 1
frequency shifted version of X(jW ), shifted by T . In equation (4.57) the term T will scale the amplitude
FG F
of the spectrum X j Ω +
2π m I IJ by a factor T1 .
HH T KK
4. 37 Digital Signal Processing
Therefore from equation (4.57) we can say that X(ejw ) is sum of frequency shifted and amplitude scaled
version of X(jW ). In general we can say that the frequency spectrum of a discrete time signal obtained by
sampling continuous time signal will be sum of frequency shifted and amplitude scaled spectrum of continuous
time signal. This concept is illustrated in fig 4.7.
The frequency W of a continuous time signal can be converted to frequency w of a discrete time signal
by choosing the transformation, w = WT, where T is the sampling time, 1/T = Fs is the sampling cyclic
frequency, and 2pFs= Ws is the radian sampling frequency.
In this transformation, the radian frequency w of sampled version of discrete time signal is unique in
the interval -p to +p, and the cyclic frequency f of sampled version of discrete time signal is unique in the
interval -1/2 to +1/2.
X jΩ

F ig 4.7 a : S p e ctru m o f a c o ntinu o u s tim e sign a l x (t), w ith m a xim u m frequ en c y Ωm .

e j
X e jω
Ωs
> Ωm
1 2
T

F ig 4 .7 b : S p e ctrum o f sa m p led version o f x(t), w ith Ωs /2 > Ωm

e j
X e jω
Ωs
= Ωm
1 2
T

−4π −3π −2π −ωm = −π 0 ωm = π 2π 3π 4π ω


F ig 4.7 c : S p e ctru m o f sa m p led v ersio n o f x (t), w ith Ωs /2 = Ωm .

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π

F ig 4.7 d : S p e ctru m o f sa m pled version of x(t), w ith Ωs /2 < Ωm .


F ig 4.7 : S p e ctru m o f a c o ntin uo u s tim e sig na l a n d its sa m p led v ersio n , sa m p led a t v a rio u s sa m p lin g ra tes.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 38
The maximum frequency in the spectrum shown in fig 4.7a is W m. Let w m be the corresponding
maximum frequency of the sampled version of the discrete time signal when the spectrum of fig 4.7a is
sampled at a frequency of W s /2. If W m is equal to W s /2, then the corresponding value of w m is given by,
Ωs 2 πFs π
ω m = Ωm T = T= T= T=π
2 2 T
From the above equation we can say that if Wm is less than W s /2, then corresponding w m will be less
than p and if W m is greater than W s /2 then corresponding w m will be greater than p. From fig 4.7b and fig 4.7c
it is observed that, as long as W m is less than W s /2, then corresponding w m is less than or equal to p, and so
there is no overlapping of the components of frequency spectrum.
From fig 4.7d it is observed, when W m is greater than W s /2, then corresponding w m will be greater than
p, and so the components of frequency spectrum overlaps. Due to overlap of frequency spectrum, the high
frequency components get the identity of low frequency components. This phenomenon is called aliasing.
Due to aliasing the information shifts from one band of frequency to another band of frequency.
Therefore in order to avoid aliasing, W s /2, should be greater than or equal to W m.
Since, W m = 2pFm and W s = 2pFs, to avoid aliasing, 2pFs /2 > 2pFm
\ Fs > 2Fm .....(4.58)

Therefore, in order to avoid aliasing the sampling frequency Fs should be greater than twice the
maximum frequency of continuous time signal Fm .

4.7.1 Signal Reconstruction (Recovery of Continuous Time Signal)


In the above discussion it is observed that, if the sampling frequency Fs > 2Fm, then the spectrum
X(ejw ) of the sampled continuous time signal will have aliased components of the spectrum X(jW ) of original
continuous time signal. The aliasing of spectral components prevents the recovery of original signal x(t) from
the sampled signal x(n).

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(nT) e− jωn e jΩt dΩ


n = −∞
Using the definition of Fourier
transform of discrete time signal.
4. 39 Digital Signal Processing
+π/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.

Sampling Theorem : A bandlimited continuous time signal with maximum frequency F m


hertz can be fully recovered from its samples provided that the
sampling frequency F s is greater than or equal to two times the
maximum frequency Fm , ( i.e., Fs ³ 2Fm ).

4.7.2 Sampling of Bandpass Signal


A continuous time signal is called bandpass signal if its frequency spectrum lies in a narrow band of
frequencies. Let the lower and upper value of this narrow band of frequency be F1 and F2 respectively. Now
the bandwidth, "B = F1 - F2 ". Let Fc be a frequency corresponding to centre of bandwidth. The frequency
spectrum of some of the bandpass signals are shown in fig 4.8.

x (f) x (f) x (f)

−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

x(t) x(n) X(z) X(ejww )

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,

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

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)

where, x1(n) = an ; n ≥ 0 and x 2(n) = a −n ; n < 0


=0 ; n < 0 =0 ; n ≥ 0

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

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

Find X(e jω ), if x(n) =


1 LMFG 1IJ + FG 1IJ OP u(n)
n n

2 MNH 3K H 5K QP
Solution

Given that , x(n) =


LMFG 1IJ
1 FG 1IJ OP u(n) ; for all n
n
+
n

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

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

w X(ejww ) |X(ejww )| Ð X(e jww )


in rad
0 1 + j0 = 1Ð 0 1 0

π
0.877 – j0.363 = 0.949 Ð –0.392 = 0.949 Ð –0.125p 0.949 –0.125p
8


0.569 – j0.569 = 0.805 Ð –0.785 = 0.805 Ð –0.25p 0.805 –0.25p
8


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


–0.03 – j0.072 = 0.078 Ð –1.966 = 0.078 Ð –0.625p 0.078 –0.625p
8


0.098 – j0.098 = 0.139 Ð –0.785 = 0.139 Ð –0.25p 0.139 –0.25p
8


0.261 + j0.108 = 0.282 Ð 0.392 = 0.282 Ð 0.125p 0.282 0.125p
8


=π 0.333 + j0 = 0.333 Ð 0 = 0.333 Ð 0 0.333 0
8


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 −0.75π

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

Since, x1(n) = x2(n), X2(ejw ) = X1(ejw ) = ejw + 3 +5 e–jw


Let, x(n) = x1(n) * x2(n), and X(ejw ) = F{x(n)} = F{x1(n) * x2(n)}
By convolution property of Fourier transform.
F{x1(n) * x2(n)} = X1(ejw ) X2(ejw )

∴ X(e jω ) = X1(e jω ) X 2(e jω ) = (e jω + 3 + 5 e − jω ) (e jω + 3 + 5 e − jω )

= 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 = −∞

+ x(1) e − jω + x(2) e − j2ω +...... .....(2)


jwn jw
On comparing the coefficient of e in the two equations [equations (1) and (2)] of X(e ) we get,
l
x(n) = 1, 6, 19, 30, 25 q
A
Example 4.8
1 e jθ + e − jθ
If H(e jω ) = (1+ 3cos ω), find h(n). cos θ =
5 2
Solution
1 1 3 e jω + e − jω 3 jω 1 3 − jω
Given that, H(e jω ) = (1 + 3 cos ω ) = + = e + + e
5 5 5 2 10 5 10
= 0.3ejω + 0.2 + 0.3e − jω .....(1)
Let, h(n) = Inverse Fourier transform of H(ejw ).
4. 45 Digital Signal Processing
By definition of Fourier transform we get,
+∞
.....(2)
H(e jω ) = ∑ h(n) e − jωn =......+h(–2) e j2ω + h(−1) e jω + h(0) + h(1) e − jω + h(2) e − j2ω +.....
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 e–jw )–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 e–jwn.
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) = F–1{Y1(ejw )} ; y2(n) = F–1{Y2(ejw )} ; y3(n) = F–1{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 = −∞

By comparing equations (1) and (2) we can write,


Shifting property:
y2(n) = an u(n) If F{x(n)} = X(ejw )

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 ) = e–j3w ; | 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

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 (n − 3) Note : Evaluate sin(n – 3) by keeping


x(n) =
π(n − 3) calculator in radians mode.
4. 47 Digital Signal Processing
sin( −2 − 3)
When n = −2 ; x( −2) = = −0.061
π( −2 − 3)
sin( −1 − 3)
When n = −1 ; x(−1) = = −0.06
π( −1 − 3) x (n )
C entre of sy m m etry
sin(0 − 3)
When n = 0 ; x(0) = = 0.015 0.35
π(0 − 3)
0.318
sin(1 − 3) 0.30 0.268 0.268
When n = 1 ; x(1) = = 0.145
π(1 − 3)
sin(2 − 3) 0.25
When n = 2 ; x(2) = = 0.268
π(2 − 3)
0.20
1
When n = 3 ; x(3) = = 0 . 318 = 0.318
π 0.15 0.145 0.145
sin(4 − 3)
When n = 4 ; x(4) = = 0.268 0.10
π(4 − 3)
sin(5 − 3) 0.05
When n = 5 ; x(5) = = 0.145
π(5 − 3) 0.015 0.015

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

On comparing equations (1) and (2) we get,


FG 1IJ
x(n) =
n
; for n ≥ 0
H 8K
F 1I
∴ x(n) = G J
n
u(n) ; for all n
H 8K
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 48
Example 4.13
If H(ejw ) = 1 ; |w| £ 1

= 0 ; 1< |w| £ p, Find the impulse response h(n), and plot.


Solution
The impulse response h(n) can be obtained by taking inverse Fourier transform of H(ejw ).

By definition of inverse Fourier transform,

π +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

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 n 1 sin n 1 sin θ


When n = 0 ; h(n) = Lt = Lt = Lt =1
n → 0 πn πn→ 0 n π
θ→ 0 θ
1
∴ Impulse response, h(n) = ; when n = 0
π
sin n
= ; when n ≠ 0
πn
The impulse response is an infinite duration signal and can be evaluated for all integer values of n in the
range n = –¥ to +¥ . Here h(n) is evaluated for n = –5 to +5 and plotted.

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

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) = F–1{Y(ejw )} = F–1{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 e–jw + 3 e–j2w + 4e–j3w ) (1 + 2 e–jw + 2e–j2w + e–j3w )
jw

= 1 + 2 e–jw + 2e–j2w + e–j3w


+ 2 e–jw + 4 e–j2w + 4 e–j3w + 2 e–j4w
+ 3 e–j2w + 6 e–j3w + 6 e–j4w + 3 e–j5w
+ 4e–j3w + 8 e–j4w + 8e–j5w + 4e–j6w
jw –jw –j2w
\ Y(e ) = 1+4e +9e + 15 e–j3w + 16 e–j4w + 11 e–j5w + 4e–j6w ..... (3)
By definition of Fourier transform we get,
+∞
Y(e jω ) = ∑ y(n) e − jωn
n = −∞

= ..... y(0) e0 + y(1) e–jw + y(2) e–j2w + y(3) e–j3w + y(4) e–j4w + y(5) e–j5w + y(6) e–j6w + ..... ..... (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,

H(e jω ) = H(e jω ) H∗ (e jω ) , where H∗ (e jω ) = Conjugate of H(e jω ).


1 1

∴ Magnitude function, H(e ) = M


L 1 × 1 OP
jω 2 L
=M
1 OP 2

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

The phase function, ∠H(e ) = tan M


jω L H (e ) OP
−1 i

N H (e ) Q r

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 ω

Phase function, ∠H(e jω ) = tan−1


Hi (e jω )
= tan−1
LM
−b sin ω OP
Hr (e jω ) MN
1 − b cos ω PQ
Example 4.18
The impulse response of an LTI system is given by, h(n) = 0.8 n u(n). Find the frequency response.

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 ω

The phase function is defined as,

∠H(e jω ) = tan−1
LM H (e ) OP = tan LM −0.8 sin ω OP
i

−1
Using equation (2)
N H (e ) Q
r

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 = −∞
+∞

∑ h(n) = h(−1) + h(0) + h(1) = 0.25 + 0.5 + 0.75 = 1.5


n = −∞
+∞
Since ∑ h(n) < ∞,
n = −∞
the system is BIBO stable.

b) Check for Causality


In a causal system the present output should depend only on present and past inputs or outputs, and
should not depend on future inputs or outputs. In the given system, the response h(n) depends on the future
input d(n+1). Hence the system is noncausal.
c) Frequency Response
The frequency response, H(ejw ) is given by the Fourier transform of h(n).
By definition of Fourier transform,
+∞
l q ∑ h(n) e
The frequency response, H(e jω ) = F h(n) = − jωn
= h( −1) e jω + h(0) + h(1) e − jω
n = −∞

= −0.25e jω + 0.5 − 0.75 e − jω


= −0.25(cos ω + j sin ω ) + 0.5 − 0.75(cos ω − j sin ω )
= −0.25cos ω − j 0.25 sin ω + 0.5 − 0.75 cos ω + j0.75 sin ω
= 0.5 − cos ω + j0.5 sin ω
The frequency response is complex function of w.

∴ Magnitude function, H(e jω ) = Hi2(e jω ) + Hr2(e jω ) = c0.5 − cos ωh + b0.5 sin ωg


2 2

Phase function, ∠ H(e jω ) = tan−1


LM H (e
i
jω OP
)
= tan−1
LM 0.5 sin ω OP
MN H (e
r

)PQ MN 0.5 − cos ω PQ
Example 4.20
A causal system is represented by the following difference equation.
1 1
y(n) + y(n − 1) = x(n) + x(n − 1)
4 2
Find the system transfer function H(z), the impulse response and frequency response of the system.
Solution
a) System Transfer Function
Y(z)
The system transfer function, H(z) =
X(z)
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 54
1 1
Given that, y(n) + y(n − 1) = x(n) + x(n − 1)
4 2
Let, Z {y(n)} = Y(z), \ Z{y(n – 1)} = z–1 Y(z)
Let, Z {x(n)} = X(z), \ Z{x(n – 1)} = z–1 X(z)
On taking Z-transform of the difference equation governing the system we get,
1 −1 1
Y(z) + z Y(z) = X(z) + z−1 X(z)
4 2
FG 1 IJ 1
Y(z) 1+ z −1 = X(z) 1+ z−1
FG IJ
H 4 K 2 H K
1
1+ z−1
Y(z) 2
∴ System transfer function, H(z) = =
X(z) 1 + 1 z−1
4
b) Impulse Response
The impulse response h(n) is given by inverse Z-transform of H(z).
1 −1
z
1+
2 1 1 z −1
H(z) = = +
1 1 2 1 + 1 z −1
1+ z−1 1 + z−1
4 4 4
1
=
1
+
1 z −1 n s
Z anu(n) =
1 − az−1
FG IJ
1
1 − − z −1
2 1
1 − − z −1
FG IJ
H K
4 4 H K l q
If Z x(n) = X(z) then by time shifting
On taking inverse Z-transform of H(z) we get,
l q
property Z x(n − 1) = z−1X(z)

Im pulse response, h(n) =


FG − 1IJ u(n) + 1 FG − 1IJ
n (n − 1)
u(n − 1)
H 4K 2 H 4K

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θ

+ 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 +

∴ 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 ω

∴ 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

Let, F{x(n)} = X(ejw ), F{y(n)} = Y(ejw ), \ F{y(n – k)} = e–jwk Y(ejw )


Given that, y(n) + a1 y(n – 1) + a2 y(n – 2) = x(n)
On taking Fourier transform we get,
Y(e jw ) + a1 e–jw Y(ejw ) + a2 e–j2w Y(e jw ) = X(ejw ) Þ (1 + a1 e–jw + a2 e–j2w )Y(e jw ) = X(ejw )

Y(e jω ) 1
∴ Frequency response, H(e jω ) = =
X(e jω ) 1 + a1 e − jω + a 2 e − j2ω

The magnitude function of H(ejw ) is defined as,


|H(ejw )| = [H(ejw ) H *(e jw )]1/2 ; where H*(e jw ) is conjugate of H(e jw )
1

∴ |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

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

+ 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ω

Using equation (1), the equation (2) can be written as,

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ω )
= tan–1
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)} = z–1 Y(z).
Given that, y(n) = ay(n – 1) + bx(n).
On taking Z-transform we get,
Y(z) = az–1Y(z) + b X(z) ÞÞ Y(z) – az–1Y(z) = b X(z) Þ (1 – az–1) 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).

∴ Impulse response, h(n) = Z −1 {H(z)} = Z −1


RS b UV = b Z −1
RS 1 UV = b a n
u(n) ; for all n
|T 1 − a z −1
|W |T1 − a z −1
|W
or h (n) = b an ; for n ³ 0
b) To Find Frequency Response

The frequency response H(ejw ) is obtained by evaluating H(z) at, z = ejw .


b b
∴ Frequency response, H(e jω ) = H(z) z = e jω = =
1 − az−1 z = e jω 1 − a e− jω

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

where, Hi(ejw ) and Hr(ejw ) are imaginary and real parts of H(ejw ).
N H (e ) Q ;
r

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 ω

Phase function, ∠H(ejω ) = tan−1


LM H (e ) OP = tan
i
jω LM − ab sin ω OP = tan
–1 LM −a sin ω OP
–1

MNH (e ) PQ
r

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 a = 0.7, ∠H(ejω ) = tan−1


F −a sin ω I = tan F −0.7 sin ω I –1
GH 1 − a cos ω JK GH 1 − 0.7 cos ω JK
The phase function is periodic in the range –p to +p. Hence the phase function is evaluated for various
values of w in the range –p to +p.
−4π −0.7 sin(– π)
When ω = ; ∠H(e jω ) = tan−1 = 0
4 1 − 0.7 cos (– π)

When ω =
−3π
; ∠H(e jω ) = tan−1
−0.7 sin c h = 0.32 = 0.32 × π = 0.1π rad
−3π
4

4 1 − 0.7 cos c h −3π


4
π

−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
π

−π −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)} = e–jwk Y(ejw )
Let, F{x(n)} = X(ejw ) \ F{x(n – k)} = e–jw 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 e–j2w X(ejw ) – 0.45 e–j2w Y(ejw )
Y(e jw ) + 0.45e–j2w Y(ejw ) = X(ejw ) + 0.81 e –jw X(ejw ) + 0.81 e–j2w X(e jw )
(1+ 0.45 e –j2w ) Y(ejw ) = (1+ 0.81e–jw + 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

1 + 0.81 e + 0.81 e + 0.81 e + 0.81 + 0.81 e


M P
+ 0.81 e + 0.81 P
=M − j2ω 2 − jω 2
+ 0.81 e
MM 1+ 0.45 e + 0.45 e j2ω
+ 0.45
PP
− j2ω 2
N Q
1

= 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 ω

Phase function, ∠H(e ) = tan M


jω L H (e ) OP ; where, H (e
−1 i

jw
) = Imaginary part and Hr(ejw ) = Real part

NH (e ) Q r
i

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

Phase function, ∠H(ejω ) = tan−1


LM H (e ) OP = tan LM −0.45 sin ω − 0.36 sin 2ω OP
i

−1

N H (e ) Q
r

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 ω

∴ Phase function, ∠H(ejω ) = tan−1


LM H (e ) OP = tan
i

–1
LM − sin ω + sin ωN − sin ω(N − 1) OP
N H (e ) Q
r

MN1 − cos ω − cos ωN + cos ω(N − 1) PQ
Example 4.26
Consider the analog signal, xa(t) = 2 cos 2000pt + 5 sin 4000pt + 12 cos12000pt .
a) Determine the Nyquist sampling rate.
b) If the analog signal is sampled at Fs = 5000 Hz, determine the discrete time signal obtained by sampling.
Solution
a) To Find Nyquist Sampling Rate
The given analog signal can be written as shown below.
xa(t) = 2 cos 2000pt + 5 sin 4000pt – 12 cos12000pt = 2 cos 2p F1t + 5 sin 2p F2t –12 cos 2p F3t
where, 2p F1 = 2000p Þ F1 = 1000 Hz
2p F2 = 4000p Þ F2 = 2000 Hz
2p F3 = 12000p Þ F3 = 6000 Hz
The maximum analog frequency in the given signal, Fmax is 6000 Hz. The Nyquist sampling rate is twice
that of this maximum analog frequency.1
\ Nyquist sampling rate, Fs = 2 Fmax = 2 ´ 6000 = 12000 Hz
In order to avoid aliasing the sampling frequency, Fs should be greater than or equal to Nyquist rate.
b) To Determine the Discrete Time Signal Sampled at 5000 Hz

Let xa (nT) be the discrete time signal obtained by sampling the given analog signal.

2000 πn 4000πn 12000πn


∴ x a (nT) = x a ( t ) t = nT = x a (t) n
= 2 cos + 5 sin + 12 cos
t =
Fs
Fs Fs Fs

2000 πn 4000πn 12000πn


= 2 cos + 5 sin + 12 cos
5000 5000 5000

= 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

4.9 Summary of Important Concepts


1. A periodic discrete time signal with a fundamental period N can be decomposed into N harmonically
related frequency components.
2. The Fourier series representation can be obtained only for periodic discrete time signals.
3. The Fourier transform technique can be applied to both periodic and nonperiodic discrete time signals.
4. The Fourier coefficients of periodic discrete time signal with period N is also periodic with period N.
5. The Fourier coefficient ck represents the amplitude and phase associated with the kth frequency component.
6. The frequency range of discrete time signal is 0 to 2p (or –p to + p) and so it has finite frequency
spectrum.
7. The plot of harmonic magnitude / phase of a discrete time signal versus "k" (or harmonic frequency w k)
is called Frequency spectrum.
8. The plot of harmonic magnitude versus "k" (or w k) is called magnitude spectrum.
9. The plot of harmonic phase versus "k" (or w k) is called phase spectrum.
10. The sequence |ck|2 for k = 0, 1, 2,....., (N - 1) is called the power density spectrum (or) power spectral
density of the periodic signal.
11. The Fourier transform is also called analysis of discrete time signal x(n).
12. The inverse Fourier transform is also called synthesis of discrete time signal x(n).
13. The Fourier transform exists only for the discrete time signals that are absolutely summable.
14. The Fourier transform of a signal is also called signal spectrum.
15. The Fourier transform of a discrete time signal is periodic with period 2p.
16. The Fourier transform of any periodic discrete time signal consists of train of impulses located at
harmonic frequencies of the signal.
17. The ratio of Fourier transform of output and input of an LTI discrete time system is called transfer
function of the LTI discrete time system in frequency domain.
18. The frequency domain transfer function is also given by Fourier transform of impulse response.
19. The Fourier transform of impulse response is called frequency response of the system.
20 The frequency response of discrete time system is periodic continuous function of w with period 2p.
21. The first order discrete time system behaves as either lowpass filter or highpass filter.
22. The second order discrete time system behaves as a resonant filter or bandpass filter.
23. The frequency spectrum of a discrete time signal obtained by sampling continuous time signal will be
sum of frequency shifted and amplitude scaled spectrum of continuous time signal.
24. The frequency W of a continuous time signal can be converted to frequency w of a discrete time signal by
choosing the transformation, w = WT, where T is the sampling time.
25. The overlap of frequency spectrum is called aliasing.
26. Due to aliasing the information shifts from one band of frequency to another band of frequency.
27. In order to avoid aliasing, the sampling frequency Fs should be greater than or equal to twice the
maximum frequency Fm of continuous time signal.
28. When the spectrum of sampled signal has no aliasing then it is possible to recover the original signal
from the sampled signal.
29. The bandpass signals with a bandwidth of B Hz can be sampled at a rate of 2B to 4B Hz.
30. The Fourier transform of a discrete time signal can be obtained by evaluating the Z-transform on a circle
of unit radius provided the ROC of Z-transform includes unit circle.
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 64

4.10 Short Questions and Answers


+∞
Q4.1 Find Fourier coefficients of x(n) , where x(n) = ∑ δ (n − 3k) .
k = −∞

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.

Q4.2 Determine the discrete time Fourier series of x(n) = cos 2


FG π nIJ .
H6 K
Solution

Given that, x(n) = cos 2


FG π nIJ . Let us check, whether the given signal is periodic.
H6 K
bn + Ng = FGH cosFGH π6n + π6NIJK IJK
2
π
x(n + N) = cos 2
6
πN
Since cos (θ + 2πM) = cos θ, For periodicity, should be an integral multiple of 2π.
6
πN
Let, = M × 2π, where M and N are integers. ⇒ N = 12 M, Let M = 1, ∴ N = 12.
6
2π 2π π
∴ x(n) is periodic with fundamental period, N = 12 and fundamental frequency, ω 0 = = =
N 12 6
The Fourier series of x(n) can be obtained from Euler's formula as shown below.

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 N–1. 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; a–n ejwn = 1 ∑
Cn =
1– C
n = 0

+∞ −1 ∞ ∞ ∞ n

X(e jω ) = ∑ x(n) e − jωn


= ∑ −a n
e− jωn = ∑ − a −n e jωn = 1 − ∑ a −n ejωn = 1− ∑ da −1 jω
e i
n = −∞ n= −∞ n=1 n=0 n=0

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

when |C| < 1


n=0 n=0 n=0
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 66
Now the energy density spectrum is, e jθ + e − jθ
cosθ =
2 1 1 2
X(e jω = X(ejω ) X* (e jω ) = ×
1 − a e− jω 1 − a e jω
1 1 1
= = =
1 − a e jω − a e− jω + a 2 1 − a (e jω + e− jω ) + a 2 1 − 2a cos ω + a 2

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 .

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 =

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

Q4.13 A signal x(t) whose spectrum is shown in fig Q4.13.1


is sampled at a rate of 300 samples / sec. Sketch the X (jF )
spectrum of the sampled discrete time signal. 2

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.

Q4.15 Consider the sampling of the bandpass signal X (jF )


whose frequency spectrum is shown in fig
Q4.15. Determine the minimum sampling rate
Fs to avoid aliasing.
−106 −100 −94 0 94 100 106 F
F ig Q 4.1 5.
Solution
The given signal is a bandpass signal. The bandwidth, B = 106 – 94 = 12 Hz.
Here the upper cutoff frequency (106 Hz) is not an integer multiple of bandwidth, B. Hence the minimum
sampling rate should be 4B, in order to avoid aliasing.

∴ Minimum sampling rate = 4 × B = 4 × 12 = 48Hz


4. 69 Digital Signal Processing

4.11 MATLAB Programs


Program 4.1
Write a MATLAB program to find Fourier coefficients of the discrete time signal
x(n)={1,2,-1}, and sketch the magnitude and phase spectrum.

% Program to find Fourier coefficients of x(n)={1,2,-1}


% and to sketch the magnitude and phase spectrum

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

F ig P 4 .1 : M a g n itu d e a n d p ha se sp ectru m o f p rog ra m 4 .1 .


Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 70
Ck =
Columns 1 through 7
0.6667 0.1667 - 0.8660i 0.1667 + 0.8660i 0.6667
0.1667 - 0.8660i 0.1667 + 0.8660i 0.6667

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)

% Program to sketch the magnitude and phase spectrum


% of the given discrete time systems

clear all

MagH1=[]; MagH2=[]; MagH3=[]; PhaH1=[]; PhaH2=[]; PhaH3=[]; w1=[];

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));

H1_M=abs(H1); H2_M=abs(H2); H3_M=abs(H3);


H1_P=angle(H1); H2_P=angle(H2); H3_P=angle(H3);

MagH1=[MagH1,H1_M]; %store the magnitude as an array


MagH2=[MagH2,H2_M];
MagH3=[MagH3,H3_M];

PhaH1=[PhaH1,H1_P]; %store the phase as an array


PhaH2=[PhaH2,H2_P];
PhaH3=[PhaH3,H3_P];

w1=[w1,w]; %store the frequency as an array


end

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.

F ig P 4 .2 : M a g n itu d e a n d p ha se sp ectru m o f p rog ra m 4 .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,

H(ejw )=1/(1-ae-jw ) for a=0.5 and a=-0.5.

% Program to sketch frequency response of first-order discrete %


time system

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.’);

F ig P 4 .3 : M a g n itu d e a n d p ha se sp ectru m o f first-ord er d iscrete tim e syste m .


OUTPUT
The frequency response consists of two parts : Magnitude spectrum and Phase
spectrum. The magnitude and phase spectrum of first-order discrete time system for
a=0.5 and for a=-0.5 are shown in fig P4.3.

Program 4.4
Write a MATLAB program to sketch the frequency response of the second-order discrete
time system governed by the transfer function,

H(e jw )=(1+ae -jw )/(1+ae -jw +be -j2w )

where, a=-r cos w 0; a=2a; b=r 2; r=0.9; w 0=p/2.


4. 73 Digital Signal Processing

% Program to sketch frequency response of second-order


% discrete time system

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.

F ig P 4 .4 : M a g n itu d e a n d p ha se sp ectru m o f seco nd -o rd e r d iscrete tim e system .


Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 74

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

II.State whether the following statements are True/False


1. The discrete time Fourier series exists only for periodic discrete time signal.
2. The convergence of the discrete time Fourier series is exact at every point.
3. The Fourier coefficients of a discrete time signal is nonperiodic.
4. The Fourier transform exists only for signals that are absolutely summable.
5. The Fourier transform of discrete signal is a discrete function of w.
6. Fourier transform of an even signal is purely real and Fourier transform of an odd signal is purely imaginary.
7. The frequency response is periodic with a periodicity of 2p.
8. When the impulse response is complex, the real part of frequency response is symmetric and imaginary part
is antisymmetric.
9. Convolving two signals in time domain is equivalent to multiplying their spectra in frequency domain.
10. Multiplication of a sequence x(n) by e jω 0 n is same as frequency translation of the spectrum X(ejw ) by w 0.
11. Impulse response h(n) is discrete, whereas frequency response H(ejw ) is continuous function of w.
12. The second-order system can be designed to behave as either low pass or high pass filter.
13. The spectrum of sampled version of a discrete time signal is sum of frequency shifted and amplitude scaled
version of original spectrum of continuous time signal, X(jW ).
14. If a discrete time signal is shifted in time by 'n0' samples, then its magnitude spectrum shifts by w n0 .
15. The Fourier transform can be obtained from Z-transform only if ROC of X(z) includes unit circle.
Answers
1. True 4. True 7. True 10. True 13. True
2. True 5. False 8. True 11. True 14. False
3. False 6. True 9. True 12. False 15. True
4. 75 Digital Signal Processing

III. Choose the right answer for the following questions

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

3. The Fourier coefficients of x(n) is ck , then Fourier coefficients of x*(n) is,


a) c*k b) c*–k c) c –k d) ck

4. The average power of x(n) in terms of Fourier series coefficient ck is,


∞ ∞ N −1 N −1
2 1 2 1 2 2
a) ∑ ck b)
N
∑ ck c)
N
∑ ck d) ∑ ck
k=0 k =0 k=0 k =0

5. The Fourier transform of x(n) = 1, for all 'n' is,


+∞ +∞ +∞ +∞
a) 2π ∑ δ(ω − 2π m)
m = −∞
b) π ∑ δ(ω − 2π m)
m = −∞
c) 2π ∑ δ(ω − m)
m = −∞
d) 2π ∑ δ(ω − π m)
m = −∞

6. If F{x(n)} = X(e j w ), then F { x (n – 3)} will be,


a) e–j3w X(e–jw ) b) ej3w X(e–jw ) c) e–j3w X(ejw ) d) ej3w X(ejw )

7. If a signal is folded about the origin in time then its,


a) magnitude spectrum undergoes change in sign b) phase spectrum undergoes change in sign
c) magnitude remains unchanged d) both c and b

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

11. The ideal interpolation formula is used to,


a) obtain frequency spectrum of discrete time signal b) sample continuous time signal
c) reconstruct original continuous time signal d) remove aliasing

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

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

n= −∞ z = e − jω n=0 z=e−ω n= −∞ z=ω n= − ∞


z = e jω

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ω

20. The Fourier transform of, x(n) = (0.8)n ; n = 0, ± 1, ± 2,...... is,

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

IV. Answer the following questions


1. Define Fourier series of a periodic discrete time signal.
2. Define Fourier coefficients of a periodic discrete time signal.
3. Write any two properties of Fourier series coefficients of discrete time signal.
4. Define the frequency spectrum of a periodic discrete time signal in terms of Fourier series coefficients.
5. Write the differences between Fourier series of a discrete time signal and continuous time signal.
6. Define Fourier transform of a discrete time signal.
7. State and prove any two properties of Fourier transform.
8. State and prove the time delay property of Fourier transform.
9. Give the significance of Parseval's relation.
10. Define inverse Fourier transform.
11. Write the differences between Fourier transform of discrete time signal and continuous time signal.
12. Define the frequency spectrum of a discrete time signal in terms of Fourier transform.
13. Write a short note on Fourier transform of periodic discrete time signal.
14. Write the properties of frequency response of an LTI system.
15. What is frequency response of an LTI system?
16. What is the relation between Fourier transform and Z-transform?
17. What is aliasing of frequency spectrum?
18. Explain how a bandlimited signal can be sampled without aliasing?
19. What is ideal interpolation formula? What is its significance?
20. Write a short note on sampling of bandpass signals.

V. Solve the following problems


E4.1 Determine the Fourier series representation of the following discrete time signals.

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

E4.2 Determine the Fourier transform of the following signals.

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

E4.4 Determine the inverse Fourier transform of the following functions of w .


1
b) X(e jω ) = ; a <1
a) X(e jω ) = 2 jω 2
d1 − ae i − jω

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.

b) Consider an LTI system described by, y(n) − 51 y(n − 1) = x(n) + 51 x(n − 1)

(i) Determine the frequency response H(ejw ) of the system.


(ii) Find the impulse response h(n) 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.

E4.10 A causal system is represented by the following difference equation,

y(n) − 0.2 y(n − 1) = x(n) − 0.6 x(n − 1) .

Find the system transfer function H(z), impulse response and frequency response of the system.
Also determine the magnitude and phase function.

Answers

E4.1 a) x(n) is nonperiodic. b) x(n) = 52 + 1


e − j0.248 π e jω 0 n + 21 e j2 ω 0 n + 1
e j0.248 π e j3ω 0 n ; ω 0 = π
2
2 2

− 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)

(ii) y(n) = cos c nπ


2
− π
8 h
j π−ω
e j
H (e jω ) = 2 sin ω2 e 2
; h(n) = δ (n) − δ ( n − 1)
E4.6
H (e jω ) = 2 sin di ω
2
; ∠H (e jω ) = − c h ; for ω = −π to 0
π+ω
2 ∠H (e )
0.5π

π−ω
= 2
; for ω = 0 to π
0.375π


|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π

F ig E 4 .6 .1 : M a g n itu de sp e ctru m . −0.5 π


F ig E 4 .6 .2 : P h a se sp ectr um .
Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals 4. 80

E4.7 ω
H(e jω ) = 2 cos ω e 2 ;
−j

2 e j H (e jω ) = 2 cos ch ω
2
∠H (e )

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

x(n + N) = 4 cos 8 π (n + N) = 4 cos e 8 πn + 8 πN j


For periodicity, 8 πN should be integral multiple of 2π.

Let, 8 πN = 2π × M ⇒ N= ×M

Here, N cannot be an integer, for any integer value of M. Hence x(n) will not be periodic.
So Fourier series does not exist.

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

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

. −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

5 1 − j0.248 π jω 0n 1 j2ω 0n 1 j0.248 π j3ω 0n π


= + e e + e + e e ω0 =
2 2 2 2 2
5 πn
j
c) x(n) = 9 e 2

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

+ j sin

+ 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

+ j sin

+ cos 3 π + j sin 3π + cos

+ 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

(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

LM sin 2πn FG cos 2πkn − j sin 2πkn IJ OP


4 2

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.

\ Fundamental period, N = 30.


2π 2π π
∴ ω0 = = =
N 30 15
e jθ + e − jθ
Fourier series cos θ =
2
πn πn πn πn
j −j j −j
πn πn e 3 +e 3 e 5 −e 5 1 j3 1 −j
πn
1 j 1 −j 5
πn πn πn
e jθ + e − jθ
x(n) = cos + sin = + = e + e 3 + e 5 − e .....(1) sin θ =
3 5 2 2j 2 2 2j 2j 2j
πn 5 πn 5 πn 3 πn 3
1 j3 ×
5 1 −j 3 ×
5 1 j 5 ×3 1 −j ×
= e + e −j e +j e 5 3
2 2 2 2
π π π π π π
1 j5 15 n 1 − j5 15 n −j 1 j3 n j 1 − j3 n
= e + e + e 2 e 15 + e 2 e 15
2 2 2 2 π
±j
π π e 2 = ±j
1 − j5ω 0n 1 j 1 −j 1 j5 ω 0n
= e + e 2 e − j 3 ω 0n + e 2 e j 3ω 0 n + e
2 2 2 2
π
π π ω0 =
1 1 j 1 −j 1 15
Here, c −5 = , c −3 = e 2, c 3 = e 2 , c 5 = , ck = 0 for other k.
2 2 2 2
Alternatively, the Fourier series can be expressed as shown below.
Consider equation (1). For integer n,
πn πn πn πn πn πn πn πn
1 j 1 −j 1 j 1 −j 1 j 1 −j 1 j 1 −j e j2 πn = 1
x(n) = e 3
+ e 3
+ e 5
− e 5
= e 3
+ e 3
e j2 π n − j e 5
+j e 5
e j2 π n
2 2 2j 2j 2 2 2 2
πn πn π πn π πn πn 5 πn π πn π 9 πn
1 j 3 1 −j 3 + j2 π n 1 − j 2 j 5 1 j 2 − j 5 +2 π n 1 j 3 1 j 3 1 −j 2 j 5 1 j 2 j 5
= e + e + e e + e e = e + e + e e + e e
2 2 2 2 2 2 2 2
πn 5 5 πn 5 π πn 3 π 9 πn 3
1 j 3 ×5 1 j 3
×
5 1 −j 2 j 5 ×
3 1 j2 j 5 3
×
= e + e + e e + e e
2 2 2 2
5π π π π π π − jπ jπ
1 j 15 n 1 j25 15 n 1 − j 2 j3 15 n 1 j 2 j27 15 n 1 j5 ω 0n 1 j25 ω 0n 1 1 2 j 27 ω 0n
= e + e + e e + e e = e + e + e 2 e j3ω 0n + e e
2 2 2 2 2 2 2 2
π π π
1 − j 2 j3ω 0n 1 e j5ω0n 1 j25 ω 0n 1 j 2 j27ω 0n ω0 =
= e e + e + e + e e 15
2 2 2 2
π π
1 −j 2 1 1 1 j2
Here, c 3 = e , c 5 = , c 25 = , c 27 = e , c k = 0 for other k.
2 2 2 2
Solution for Exercise Problems E4. 5
E4.2. Determine the Fourier transform of the following signals.

a) x(n) = 3 cos n
5
Solution

R 2π nUV = F R|S3 e − e U|V


2π 2π
j n −j n
5 5
X(e jω
) = F lx(n)q = F S3 cos
T 5 W |T 2 |W
3 R| U| − 3 F R|e U|
2π 2π
j n −j n
= F Se V| 2 S| V|5 5
2 |T W T W
=
3


F
2πδ G ω −
2 π I 3 ∑ 2πδ FG ω + 2π − 2πmIJ
− 2πmJ −

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

X(e ) =
e 2 e j4 ω − e − j 4 ω
=
− j8 ω
e 2 ×

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,

l q ∑ LMM0.5 FGH 0.41 IJK FG 1 IJ OP e FG 1 IJ e − 0.5 ∑ FG 1 IJ e


∞ n n ∞ n ∞ n

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

N n=0 n=0 n=0

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

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)

By definition of Fourier transform,


+∞
d i ∑ x(n) e
X e jω =
n = −∞
− jωn
= .....x( −2)e j2ω + x( −1)e jω + x(0)e0 + x(1)e − jω + x(2)e − j2ω +...... .....(2)

On comparing equations (1) and (2) we get,


x(n) = l−4, 8, − 12, − 8, − 4 q
A
l
b) x1 (n) = − 2, − 1, 0 , q l
x2 (n) = −3, 5, − 7 q
A A
Solution

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)

Using convolution property


By definition of Fourier transform,
of Fourier transform.
+∞
Xe d i = ∑ x(n) e

n = −∞
− jωn
= .....x(0)e + x(1)e 0 − jω
+ x(2)e − j 2ω
+ x(3)e − j 3ω
+...... .....(2)

On comparing equations (1) and (2) we get,


l
x(n) = 6, − 7, 9, 7 q
A
Solution for Exercise Problems E4. 7
E4.4. Determine the inverse Fourier trasnform of the following function of w .

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,

d i = d1− a1e i d1− a1e i


X e jω − jω − jω
, a <1
14444244443
X1( e jω ) X 2 ( e jω )

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 = −∞

∴ x1(n) = x 2 (n) = anu(n)

Here, d i = X de i
X e jω 1

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+

c) Y(e ) = 7
1
1 − e − jω
7
Solution

F I
Ye e 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ω

On taking inverse Fourier transform we get,


then F lx(n − 1)q = e Xee j − jω jω
F 1I 1 F 1I F 1I F 1I F 1I
n n −1 n n n
y(n) = G J u(n) +
H 7K G J
7 H 7K
u(n − 1) = G J
H 7K u(n) + G J
H 7K u(n − 1) = G J
H 7K u(n) + u(n − 1)
E4. 8 DSP, Chapter 4 - Fourier Series and Fourier Transform of Discrete Time Signals
1
d) H(e jω ) =
FG 1 − 1 e IJ FG 1 − 1 e IJ
− jω − jω
H 6 KH 5 K
Solution
Using partial fraction,

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

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

Hi (e )
= tan−1
LM
−5 sinω − sin2ω OP

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

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 = 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,

t FGH 51IJK u(n) + 51 FGH 51IJK


n n −1
Impulse response, h(n) = F −1 H(e jω ) = o u(n − 1)

iii) Response for given input

π
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 ).

By definition of inverse Fourier transform,

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

π π
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

Given, y(n) = x(n) − x(n − 1)


By taking Fourier transform,

Y(e jω ) = X(e jω ) − e − jω X(e − jω ) ⇒ Y(e jω ) = X(e jω ) 1 − e − jω


ω ω
Y(e jω ) −j −j
∴ Frequency response, H(e jω ) = jω
= 1 − e − jω = 1 − e 2 e 2 ω ω
X(e ) −j
2
j
2
e e =1

=
−j
e 2
ω
LM j
e2
ω

−j
e 2
ω
OP = −j
e 2
ω
2j sin
FG ω IJ
MN PQ H 2K

π ω
ω j −j j=e2
= 2 sin e 2 e 2
2

ω jHG
F π −ω IJ
2 K
= 2 sin e
2

ii) Impulse response

Given, y(n) = x(n) − x(n − 1)


When x(n) = δ(n) = impulse input,
y(n) = h(n) = impulse response
∴ Impulse response, h(n) = δ(n) − δ(n − 1)

iii) Magnitude and phase function

ω 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

Phase function, ∠H(e jω ) = −


FG π + ω IJ ; for ω = − π to 0
H 2 K
π−ω
= ; for ω = 0 to π
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

− 2 0 1 .0
4 0 .7 5

3π 0 .5
− 1.848 –0.125p
4
ω
2π −π π −π −π
π π π
− 1.414 –0.25p −3 0

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π


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ω)|

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 )

− 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π

0.77 – 0.375p
4 −0.375π

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

Here, h(n) is zero for n ≤ −3 and n ≥ 2, and nonzero in the interval n = −2 to + 1.


∴ Impulse response,

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= −∞
+∞

∑ h(n) = h(−2) + h( −1) + h(0) + h(1)


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ω

∴ Y(e jω ) = −4 − 6 e − jω − 8 e − j2ω − 8 e − j3ω − e − j4ω − 7 e − j5ω − 2 e − j6ω .....(1)

By definition of Fourier transform,


+∞
Y(e jω ) = ∑ y(n)(e − jωn ) = .....y(0) + y(1)e − jω + y(2)e − j2ω + y(3)e − j3ω + y(4)e − j4 ω + y(5)e − j5ω +..... .....(2)
n = −∞

On comparing equations (1) and (2) we get,


l
∴ Response, y(n) = −4, − 6, − 8, − 8, − 1, − 7, − 2 q
A
E4.10. A causal system is represented by the following difference equation,
y(n) – 0.2 y(n – 1) = x(n) – 0.6 x(n –1).
Find the system transfer function H(z), impulse response and frequency response of the system.
Also determine the magnitude and phase function.
Solution
i) System transfer function

Given that, y(n) − 0.2 y(n − 1) = x(n) − 0.6 x(n − 1)


On taking Z - transform,
Y(z) − 0.2z −1 Y(z) = X(z) − 0.6 X(z) z −1
Y(z) 1 − 0.6 z −1
Y(z) 1 − 0.2z −1 = 1 − 0.6 z −1 X(z) ⇒ =
X(z) 1 − 0.2 z −1
Y(z) 1 − 0.6 z −1
∴ System transfer function, H(z) = =
X(z) 1 − 0.2 z −1
ii) Impulse response

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)

= 0.2n u(n) − 0.6(0.2)n−1u(n − 1)


Solution for Exercise Problems E4. 15
iii) Frequency response

Frequency response, H(e jω ) = H(z)


z=e jω

− 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ω

1 − 0.6 e − jω 1 − 0.2 e jω 1 − 0.2e jω − 0.6e − jω + 012


.
Let, H(e jω ) = − jω
× jω
=
1 − 0.2 e 1 − 0.2 e 1.04 − 0.4 cos ω Using equation (1)

=
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

Discrete Fourier Transform(DFT)


and Fast Fourier Transform(FFT)

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

5.2 Discrete Fourier Transform (DFT) of Discrete Time Signal


5.2.1 Development of DFT from DTFT
The frequency domain representation of a discrete time signal obtained using discrete time Fourier
transform (DTFT) will be a continuous and periodic function of w, with periodicity of 2p. In order to obtain
discrete function of w, the DTFT can be sampled at sufficient number of frequency intervals.
Let X(ejw ) be discrete time Fourier transform of the discrete time signal x(n). The discrete Fourier
transform (DFT) of x(n) is obtained by sampling one period of the discrete time Fourier transform X(ejw ) at a
finite number of frequency points.
The frequency domain sampling is conventionally performed at N equally spaced frequency points in
the period, 0 £ w £ 2p . The sampling frequency points are denoted as w k and they are given by,
2πk
ωk = ; for k = 0, 1, 2, ..... ,N – 1
N
Now, the DFT is a sequence consisting of N-samples of DTFT. Let the samples are denoted by X(k)
for k = 0, 1, 2, ...... N-1. Therefore, the sampling of X(ejw ) is mathematically expressed as,

X(k) = X (e jω ) ; for k = 0, 1, 2, ....., N – 1 .....(5.1)


2 πk
ω=
N
The DFT sequence starts at k = 0, corresponding to w = 0 but does not include k = N, corresponding
to w = 2p, (since the sample at w = 0 is same as the sample at w = 2p). Generally, the DFT is defined along with
number of samples and is called N-point DFT. The number of samples N for a finite duration sequence x(n) of
length L should be such that, N ³ L, in order to avoid aliasing of frequency spectrum.
The sampling of Fourier transform of a sequence to get DFT is shown in example 5.1. To calculate DFT
of a sequence it is not necessary to compute Fourier transform, since the DFT can be directly computed using
the definition of DFT as given by equation (5.2).
5.2.2 Definition of Discrete Fourier Transform (DFT)
Let, x(n) = Discrete time signal of length L
X(k) = DFT of x(n)
Now, the N-point DFT of x(n), where N ³ L, is defined as,
N −1 − j2 πkn
X( k ) = ∑
n=0
x(n) e N ; for k = 0,1,2,......., N − 1 .....(5.2)

Symbolically, the N-point DFT of x(n) can be expressed as,


DFT{x(n)}
where, DFT is the operator that represents discrete Fourier transform.
N −1 − j2 πkn
∴ DFT {x(n)} = X( k ) = ∑ x(n) e N ; for k = 0, 1, 2, ..... , N − 1
n=0

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 )

∴ X(k) = X2r ( k ) + Xi2 ( k )


The Phase function (or Phase spectrum) ÐX(k) is defined as,

∠X(k) = Arg[X(k)] = tan −1


LM X (k) OP
i

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)

Symbolically the inverse DFT of x(n) can be expressed as,


DFT-1{X(k)}
where, DFT -1 is the operator that represents inverse DFT.
N −1 j2 πkn
1
DFT −1 {X(k)} = x(n) =
N ∑
k=0
X(k) e N ; for n = 0, 1, ...... , N − 1
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 4
We also refer to x(n) and X(k) as a DFT pair and this relation is expressed as,
DFT
x(n) ¬ ® X(k)
DFT - 1

5.3 Properties of DFT


1. Linearity
The linearity property of DFT states that the DFT of a linear weighted combination of two or more
signals is equal to similar linear weighted combination of the DFT of individual signals.
Let, DFT{x1(n)} = X1(k) and DFT{x2(n)} = X2(k). Then by linearity property,
DFT{a1 x1(n) + a2 x2(n)} = a1 X1(k) + a2 X2(k) , where a1 and a2 are constants.
Proof :
By definition of discrete Fourier transform,
N −1 − j2πkn
X1(k) = DFT {x1(n)} = ∑ x (n) e1
N .....(5.4)
n=0

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 LMa x (n)e − j2πkn − j2πkn OP


= ∑ MN1 1
N + a2 x 2 (n) e N
PQ
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

= a1 X1(k) + a 2 X 2 (k) Using equations (5.4) and (5.5).

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 :

By definition of DFT, the (k + N)th coefficient of X(k) is given by,


− j2πn (k + N) − j2 πn k − j2 πn N
N−1 N−1
N
X(k + N) = ∑ x(n) e = ∑ x(n) e N e N

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 :

N−1 − j2 πkn N−1 − j2 πk(p + m)

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 :

N−1 − j2πkn N−1 − j2 πk( N − m )


Let, m = N – n, \ n = N – m
m r ∑ x(N − n) e
DFT x(N − n) =
n=0
N = ∑
m=0
x(m) e N

N−1 −j2πk N j2πkm N−1 j2πkm


= ∑
m=0
x(m) e N e N = ∑
m=0
x(m) e N e − j2 π k
Since k is an integer, e- j2p k = 1.
N−1 j2πkm N−1 j2 πkm
= ∑ x(m)
m=0
e N = ∑ x(m)
m=0
e N e− j2πm Since m is an integer, e- j2p m = 1.

N−1 j2 πkm − j2 πm N N−1 − j2 πm( N − k)


= ∑
m=0
x(m) e N e N = ∑
m=0
x(m) e N

= X(N − k) Using definition of DFT.

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 e–j2pn = 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

= X(( k − m))N Using definition of DFT.

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

n=0 n=0N m=0


equation (5.6).
1
N−1 LM N−1 − j2 πkn j2 πmn OP
=
N
∑ MN ∑
X1(m) x 2(n) e N e N
PQ
Rearranging the order of summation.
m=0 n=0
Using definition of DFT.
1
N−1 L N−1 − j2 π(k − m)n OP 1 N−1
=
N ∑ X (m) MM ∑
1 x 2 (n) e N
PQ = N ∑ X1(m) X 2 ((k − m))N
m=0 N n=0 m=0

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 :

Let, x1(n) and x 2(n) be N - point sequences. Now by definition of DFT,


N−1 − j2 π n k N−1 − j2 π n k
Let, n = m
X1(k) = ∑ x1(n) e N = ∑ x1(m) e N ; k = 0, 1, 2, ..... N − 1 .....(5.7)
n=0 n=0

N−1 − j2 π n k N−1 − j2 πpk Let, n = p


X 2 (k) = ∑ x 2(n) e N = ∑ x 2(p) e N ; k = 0, 1, 2, ..... N − 1 .....(5.8)
n=0 p=0

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

1 N−1 L N−1 − j2πmk OP LM x (p) e


N−1 − j2 πpk OP e j2 πnk Using equations
= ∑ MM ∑ x1(m) e N
PQ MN ∑ 2
N
PQ
N
(5.7) and (5.8).
Nk=0 N m=0 p=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,

DFT {rxy (m)} = DFT


|RS ∑ x(n) y ((n − m))
N−1
* |UV = X(k) Y (k) *
|T
n=0
N
|W
Proof :
Let, x(n) and y(n) be N - point sequences. Now by definition of DFT,
N−1 − j2 πnk
X(k) = ∑ x(n) e N ; k = 0, 1, 2, ..... N − 1 .....(5.12)
n=0
N−1 − j2 πnk N−1 − j2 πpk Let, n = p
Y(k) = ∑ y(n) e N = ∑ y(p) e N ; k = 0, 1, 2, ..... N − 1 .....(5.13)
n=0 p=0

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

1 N−1 L N−1 − j2 πnk OP LM N−1 − j2 πpk OP* e j2 πmk


Using equations
= ∑ MM ∑ x(n) e N
PQ MN ∑ y(p) e N
PQ
N
(5.12) and (5.13).
N k=0 N n=0 p=0

N−1 N−1 N−1 j2πk(m − n + p)


1
=
N
∑ x(n) ∑ y*(p) ∑ e N .....(5.14)
n=0 p=0 k=0

N-1 j2πk(m − n + p)
Consider the summation ∑ e N in equation (5.14).
k=0

Let, m − n + p = qN, where q is an integer. Since q is an integer, e j2p q =1.


N−1 j2 πk(m − n + p) N−1 j2πkqN N−1 N−1
k
∴ ∑
k=0
e N = ∑
k=0
e N = ∑
k=0
ee jj2πq
=
k=0
∑1 k
= N .....(5.15)

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)

∴ X(k) Y * (k) = DFT rxy (m) n s Using definition of circular correlation.


5. 9 Digital Signal Processing
10. Parseval's relation
Let DFT{x1(n)} = X1(k) and DFT{x2(n)} = X2(k). Then by Parseval's relation,
N−1 N−1
1
∑ x1 (n) x*2 (n) = ∑ X1 (k) X*2 (k)
n=0
N k=0

Proof :

Let, x1(n) and x 2(n) be N - point sequences.


N−1 − j2 π n k
Now by definition of DFT, X1(k) = ∑ x1(n) e N .....(5.17)
n=0
− N 1 j2 π n k
1
Now by definition of inverse DFT, x2 (n) =
N k=0
X 2(k) e ∑ N .....(5.18)

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 ∑ X1(k) X *2 (k) = N ∑ MM ∑ x1(n) e


PQ X (k)
N
2
k=0 k=0 N n=0

N−1 L1 N−1 OP L1− j2 πnk N−1 N−1 j2 πnk OP*


= ∑ x (n) MM N ∑ X * (k) e
1
PQ2= ∑ x (n) M
MN N ∑
N
1 X 2(k) e N
PQ
n=0 N k=0 n=0 k=0
N−1
= ∑ x1(n) x2* (n) Using equation (5.18).
n=0

5.4 Relation Between DFT and Z -Transform


The Z-transform of N-point sequence x(n) is given by,
N−1
l q = X( z) = ∑ x ( n ) z
Z x( n) −n

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

By the definition of N-point DFT we get,


N−1 − j2πkn
X( k ) = ∑ x( n) e N .....(5.20)
n= 0

From equations (5.19) and (5.20) we can say that,


X( k ) = X( z ) j2πk .....(5.21)
z= e N
From equation (5.21), we can conclude that the N-point DFT of a finite duration sequence can be obtained
from the Z-transform of the sequence, by evaluating the Z-transform of the sequence at N equally spaced points
around the unit circle. Since the evaluation is performed on unit circle the ROC of X(z) should include unit circle.
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 10
Table 5.1 : Properties of Discrete Fourier Transform (DFT)
Note : X(k) = DFT {x(n)} ; X1(k) = DFT {x1(n)} ; X2(k) = DFT {x2(n)} ; Y(k) = DFT {y(n)}

Property Discrete time signal Discrete Fourier Transform


Linearity a1x1(n) + a2x2(n) a1X1(k) + a2 X2(k)

Periodicity x(n + N) = x(n) X(k + N) = X(k)


− j2 π k m
Circular time shift x((n – m))N X(k) e N

Time reversal x(N – n) X(N – k)


Conjugation x*(n) X*(N – k)
j2 π m n
Circular frequency shift x(n) e N X(( k − m )) N

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 )

Symmetry of x(n) is real and even X(k) = Xr(k) and Xi(k) = 0


real and even signal x(n) = x(N – n)
Symmetry of x(n) is real and odd X(k) = jXi(k) and Xr(k) = 0
real and odd signal x(n) = -x(N – n)
N−1 N−1
1
Parseval's relation ∑ x1(n) x∗2 (n) N ∑ X1 ( k ) X∗2 ( k )
n=0 k= 0

5.5 Analysis of LTI Discrete Time Systems Using DFT


In Chapter 4, Section 4.6, it is shown that Fourier transform is an useful tool for the analysis of discrete
time systems in frequency domain. But the drawback in Fourier transform is that it is a continuous function of
w and so it will not be useful for digital processing of signals and systems. Hence DFT is proposed, therefore
the analysis of discrete time systems in frequency domain can be conveniently performed using DFT for
digital processing of signals and systems.
Discrete Frequency Spectrum
In general the DFT of a signal gives the discrete frequency spectrum of a signal.
Let x(n) and X(k) be a DFT pair.
5. 11 Digital Signal Processing
Now, X(k) = Discrete frequency spectrum of discrete time signal.
|X(k)| = Magnitude spectrum of discrete time signal.
ÐX(k) = Phase spectrum of discrete time signal.
In particular, the DFT of impulse response, h(n) of a discrete time system gives discrete frequency
response or frequency spectrum of the discrete time system.
Let h(n) and H(k) be a DFT pair.
Now, H(k) = Discrete frequency spectrum of discrete time system.
|H(k)| = Magnitude spectrum of discrete time system.
ÐH(k) = Phase spectrum of discrete time system.
Response of LTI Discrete Time System Using DFT
The response of an LTI discrete time system is given by linear convolution of input and impulse
response of the system.
Let, x(n) = Input to an LTI system
h(n) = Impulse response of the LTI system
Now, the response or output of the system y(n) is given by,
y(n) = x(n) * h(n) = h(n) * x(n)
+∞
where, x(n) ∗ h(n) = ∑ x( m) h(n − m)
m =−∞
.....(5.22)

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

− j sin

+ 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,

X(k) = { 1∠0, 0.333∠ − 0.5π, 0.333∠0, 0.333∠0.5π } Phase angles


∴ Magnitude Function, X(k) = { 1, 0.333, 0.333, 0.333 } are in radians.
Phase Function, ∠X(k) = { 0, − 0.5π, 0, 0.5π }
5. 13 Digital Signal Processing
b) 8-point DFT (\
\ N = 8)
8 −1 − j2πkn 2 − jπkn − jπk − jπk
X(k) = ∑ x(n) e 8 = ∑ x(n) e 4 = x(0) e0 + x(1) e 4 + x(2) e 2
e±j q = cosq ± jsinq
n=0 n =0
− jπk − jπk
=
1 1
+ e 4 +
1
e 2 =
1LM
1+ cos
πk
− j sin
πk
+ cos
πk
– jsin
πk OP
3 3 3 3 N 4 4 2 2 Q
For 8-point DFT, X(k) has to be evaluated for k = 0, 1, 2, 3, 4, 5, 6, 7.
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 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

− j sin

+ cos

− 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

− j sin

+ cos

− 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

− j sin

+ cos

− 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

− j sin

+ cos

− 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

− j sin

+ cos

− 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π

\ The 8-point DFT sequence X(k) is given by,


X(k) = {1∠0, 0.803∠ − 0.25π , 0.333∠ − 0.5π, 0.139∠0.25π, 0.333∠0, 0.139∠ − 0.25π,
0.333∠0.5π, 0.803∠0.25π }
∴ Magnitude Function, X(k ) = { 1, 0.803, 0.333, 0.139, 0.333, 0.139, 0.333, 0.803 }
Phase Function, ∠X(k) = { 0, − 0.25π, − 0.5π, 0.25π, 0, − 0.25π, 0.5π, 0.25π }
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 14
The magnitude spectrum of X(k) are shown in fig 1, 2 and 3 for N = 4, N = 8, and N = 16 respectively. The
curve shown in dotted line is the sketch of magnitude function of X(ejw ) for w in the range 0 to 2p. Here it is
observed that the magnitude of DFT coefficients are samples of magnitude function of X(ejw ), (Refer example 4.6
for the magnitude function of X(ejw )).
The phase spectrum of X(k) are shown in fig 4, 5 and 6 for N = 4, N = 8, and N = 16 respectively. The
curve shown in dotted line is the sketch of phase function of X(ejw ) for w in the range 0 to 2p. Here it is observed
that the phase of the DFT coefficients are samples of phase function of X(ejw ), (Refer example 4.6 for the phase
function of X(ejw )).
X (k) ∠X ( k )
1.0 0.75 π

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

+ 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

Given that, x2(n) = { 1, 2, 1, 2}. The 4-point DFT of x2(n) is,


4−1 − j2πnk 3 − jπnk
l
DFT x 2 (n) q = X2(k) = ∑ x 2 (n) e 4 = ∑ x 2(n) e 2 ; k = 0, 1, 2, 3
n = 0 n = 0
− jπk − j3πk
= x 2(0) e0 + x 2(1) e 2 + x 2(2) e− jπk + x 2(3) e 2

− jπk − j3πk
= 1 + 2e 2 + e− jπk + 2 e 2

When k = 0 ; X2(0) = 1 + 2 e0 + e0 + 2 e0 = 1 + 2 + 1 + 2=6


− jπ − j3π
When k = 1 ; X2(1) = 1 + 2 e 2 + e− jπ + 2 e 2 = 1 − 2j − 1 + 2j = 0
− jπ − j2π − j3π
When k = 2 ; X2(2) = 1 + 2 e + e + 2e = 1 − 2 + 1 − 2 = −2
− j3π − j9 π
When k = 3 ; X2(3) = 1 + 2 e 2 + e− j3π + 2 e 2 = 1 + 2j − 1 − 2j = 0
R| 2 ; k = 0 R| 6 ; k = 0

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)

When k = 0 ; X3(0) = X1(0) ´ X2(0) = 2 ´ 6 = 12


When k = 1 ; X3(1) = X1(1) ´ X2(1) = 0 ´ 0 = 0
When k = 2 ; X3(2) = X1(2) ´ X2(2) = -2 ´ –2 = 4

When k = 3 ; X3(3) = X1(3) ´ X2(3) = 0 ´ 0 = 0

∴ 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.5–j0.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 n = 0 ; y(0) = 3 + (−0.5 − j0.866) e0 + ( −0.5 + j0.866) e0


= 3 − 0.5 − j0.866 − 0.5 + j0.866 = 2
j2π j4 π
3 3
e±jq = cosq ± jsinq
When n = 1; y(1) = 3 +(−0.5 − j0.866) e + (−0.5 + j0.866) e
= 3 + (−0.5 − j0.866) ( −0.5 + j0.866) + (−0.5 + j0.866) ( −0.5 − j0.866)
= 3 + (0.52 + 0.8662 ) + (0.52 + 0.8662 ) = 3 + 1+ 1= 5
j4 π j8 π
3 3
When n = 2; y(2) = 3 +( −0.5 − j0.866) e + (−0.5 + j0.866) e
= 3 + (−0.5 − j0.866) ( −0.5 − j0.866) + (−0.5 + j0.866) (−0.5 + j0.866)
= 3 + (−0.5 − j0.866)2 + (−0.5 + j0.866)2
= 3 − 0.5 + j0.866 − 0.5 − j0.866 = 2
∴ x(n) ∗ h(n) = y(n) = l2, 5, 2q
A
Circular Convolution by DFT
The given sequences are 2-point sequences. Hence 2-point DFT of the sequences are obtained as
follows.
The 2-point DFT of x(n) is given by,
2− 1 − j2πkn
X(k) = ∑ x(n) e 2 = x(0) e0 + x(1) e− jπk = 1 + 2 e− jπk ; for k = 0,1
n = 0
When k = 0; X(0) = 1 + 2 e0 = 1 + 2 = 3
When k = 1; X(1) = 1 + 2 e–jp = 1 – 2 = -1
∴ X(k) = l3, − 1q
-
The 2-point DFT of h(n) is given by,
2−1 − j2πkn
H(k) = ∑ h(n) e 2 = h(0) e0 + h(1) e− jπk = 2 + e− jπk ; for k = 0, 1
n = 0
5. 19 Digital Signal Processing

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
-

Let the product of X(k) and H(k) be equal to Y(k).

∴ Y(k ) = X(k ) H(k) ; for k = 0, 1

When k = 0 ; Y(0) = X(0) H(0) = 3 × 3 = 9


When k = 1 ; Y(1) = X(1) H(1) = −1 × 1 = −1
l
∴ Y(k) = 9, − 1 q
A
The sequence y(n) is obtained from inverse DFT of Y(k). By the definition of inverse DFT,
N − 1 j2πkn
1
y(n) = DFT −1{Y(k)} =
N
∑ Y(k) e N ; for n = 0, 1, 2, ..... , N − 1
k =0

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

When n = 0; y(0) = 4.5 − 0.5e0 = 4.5 − 0.5 = 4


When n = 1; y(1) = 4.5 − 0.5e jπ = 4.5 + 0.5 = 5 ejp = –1

∴ x(n) ∗ h(n) = y(n) = l4, 5q


-

5.6 Fast Fourier Transform (FFT)


The Fast Fourier Transform (FFT) is a method (or algorithm) for computing the discrete Fourier
transform (DFT) with reduced number of calculations. The computational efficiency is achieved if we adopt
a divide and conquer approach. This approach is based on the decomposition of an N-point DFT into
successively smaller DFTs. This basic approach leads to a family of an efficient computational algorithms
known collectively as FFT algorithms.
Radix-r FFT
In an N-point sequence, if N can be expressed as N = rm, then the sequence can be decimated into
r-point sequences. For each r-point sequence, r-point DFT can be computed. From the results of r-point DFT,
the r2-point DFTs are computed. From the results of r2-point DFTs, the r3-point DFTs are computed and so on,
until we get rm point DFT. This FFT algorithm is called radix-r FFT. In computing N-point DFT by this method
the number of stages of computation will be m times.
Radix-2 FFT
For radix-2 FFT, the value of N should be such that, N = 2m, so that the N-point sequence is decimated
into 2-point sequences and the 2-point DFT for each decimated sequence is computed. From the results of
2-point DFTs, the 4-point DFTs can be computed. From the results of 4-point DFTs, the 8-point DFTs can be
computed and so on, until we get N-point DFT.
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 20

Number of Calculations in N-point DFT


Let, X(k) be N-point DFT of an L-point discrete time sequence x(n), where N ³ L. Now, the N-point DFT
is a sequence consisting of N-complex numbers. Each complex number of the sequence is calculated using
the following equation (equation 5.2).
N −1 − j2 πkn
X(k) = ∑ x(n) e N ; for k = 0,1,2,......., N − 1
n=0
− j2 πk − j4 πk − j6 πk − j2(N −1) πk
= x(0) e0 + x(1) e N + x(2) e N + x(3) e N +...............+ x(N − 1) e 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

From the above equation we can say that,


The number of calculations to calculate X(k) for one value of k are,
N number of complex multiplications and
N – 1 number of complex additions.
The X(k) is a sequence consisting of N complex numbers.
Therefore, the number of calculations to calculate all the N complex numbers of the X(k) are,
N ´ N = N2 number of complex multiplications and
N ´ (N – 1) = N(N – 1) number of complex additions.
Hence, in direct computation of N-point DFT, the total number of complex additions are N(N – 1) and
total number of complex multiplications are N2.
Number of Calculations in Radix-2 FFT
In radix-2 FFT, N = 2m, and so there will be m stages of computations, where m = log2N, with each stage
having N/2 butterflies. (Refer section 5.7.2 and 5.8.2).
The number of calculations in one butterfly are,
1 number of Complex multiplication and
2 number of Complex additions.
N
There are butterflies in each stage.
2
Therefore, number of calculations in one stage are,
N N
× 1= complex multiplications and
2 2
N
× 2 = N complex additions.
2
The N-point DFT involves m stages of computations. Therefore, the number of calculations for m
stages are,
N N N
m× = log 2 N × = log 2 N complex multiplications and
2 2 2
m × N = log 2 N × N = N log 2 N complex additions.
5. 21 Digital Signal Processing
Hence, in radix-2 FFT, the total number of complex additions are reduced to Nlog2N and total number
of complex multiplications are reduced to (N/2) log2N.
The table 5.2 presents a comparison of the number of complex multiplications and additions in
radix-2 FFT and in direct computation of DFT. From the table it can be observed that for large values of N, the
percentage reduction in calculations is also very large. log22m = m log10 x
log y x =
Table 5.2 : Comparison of Number of Computation in Direct DFT and FFT log10 y

Direct Computation Radix-2 FFT


Number of
Complex Complex Complex Complex
points
additions Multiplications additions Multiplications
N
N(N–1) N2 Nlog2N (N/2)log2N

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

Phase or Twiddle Factor


By the definition of DFT, the N-point DFT is given by,
N−1 − j2πnk
X( k ) = ∑ x( n) e N ; for k = 0, 1, 2,.....,N – 1 .....(5.24)
n= 0

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)

Using equation (5.25) the equation (5.24) can be written as,


N−1
X( k ) = ∑ x( n) WNkn ; for k = 0, 1, 2,.....,N – 1 .....(5.26)
n= 0

The equation (5.26) is the definition of N-point DFT using phase factor, and this equation is popularly
used in FFT.

5.7 Decimation in Time (DIT) Radix-2 FFT


The N-point DFT of a sequence x(n) converts the time domain N-point sequence x(n) to a frequency
domain N-point sequence X(k). In Decimation In Time (DIT) algorithm, the time domain sequence x(n) is
decimated and smaller point DFTs are performed. The results of smaller point DFTs are combined to get the
result of N-point DFT.
In DIT radix-2 FFT, the time domain sequence is decimated into 2-point sequences. For each two point
sequence, the two point DFT is computed. The results of 2-point DFTs are used to compute 4-point DFTs. A
pair of 2-point DFT results are used to compute one 4-point DFT. The results of 4-point DFTs are used to
compute 8-point DFTs. A pair of 4-point DFT results are used to compute one 8-point DFT. This process is
continued until we get N-point DFT.
In general we can say that, in decimation in time algorithm, the N-point DFT can be realized from two
numbers of N/2 point DFTs, the N/2 point DFT can be realized from two numbers of N/4 point DFTs, and so on.
Let, x(n) be N-sample sequence. We can decimate x(n) into two sequences of N/2 samples. Let the two
sequences be f1(n) and f2(n). Let f1(n) consists of even numbered samples of x(n) and f2(n) consists of odd
numbered samples of x(n).

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

The phase factors in equation (5.28) can be modified as shown below.


k( 2 n ) kn

e
WNk( 2n) = e− j2π j N

k( 2n + 1)
e
= e− j2π j N/ 2

k2n
= W Nkn2
k kn k
.....(5.29)

WNk( 2n + 1) = e e− j2π j N = e e− j2π Nj e j


e− j2π N = e j e
e− j2π N 2 j
e− j2π N = WNkn2 WNk .....(5.30)

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

Using equation (5.32) in equation(5.31) we get,


k
X(k) = F1(k) + WN F2 (k) , where k = 0, 1, 2, ....., N –1

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).

∴ v11 (n) = f1 (2n) ; for n = 0, 1, 2, ....., N − 1


4
v12 (n) = f1 (2 n + 1) ; for n = 0, 1, 2, ....., N − 1
4
Let the decimated N/4 point sequences of f2(n) be v21(n) and v22(n).
∴ v 21 (n) = f2 (2n) ; for n = 0, 1, 2 , ....., N − 1
4
v 22 (n) = f2 (2n + 1) ; for n = 0, 1, 2, ....., N −1
4

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

Then like earlier analysis we can show that,

F1 (k) = V11 (k) + WNk 2 V12 (k) ; for k = 0, 1, 2, ....., N − 1 .....(5.33)


2
k
F2 (k) = V21 (k) + WN 2 V22 (k) ; for k = 0, 1, 2, ....., N −1 .....(5.34)
2
Hence the N/2 point DFTs are obtained from the results of N/4 point DFTs.
The decimation of the data sequence can be repeated again and again until the resulting sequences
are reduced to 2-point sequences.
5.7.1 8-Point DFT Using Radix-2 DIT FFT
The input sequence is 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 given 8-point sequence is decimated to 2-point sequences. For each 2-point sequence, the 2-point DFT
is computed. From the results of 2-point DFT, the 4-point
DFT can be computed. From the results of 4-point DFT, Table 5.3
the 8-point DFT can be computed. Normal order Bit reversed order
Let the given sequence be x(0), x(1), x(2), x(3), x(0) x(000) x(0) x(000)
x(4),x(5), x(6), x(7), which consists of 8 samples. The x(1) x(001) x(4) x(100)
8-samples should be decimated into sequences of
2-samples. Before decimation they are arranged in bit
reversed order, as shown in table 5.3. x(2) x(010) x(2) x(010)
x(3) x(011) x(6) x(110)
The x(n) in bit reversed order is decimated into 4
numbers of 2-point sequences as shown below.
x(4) x(100) x(1) x(001)
Sequence-1 : {x(0), x(4)} x(5) x(101) x(5) x(101)
Sequence-2 : {x(2), x(6)}
Sequence-3 : {x(1), x(5)} x(6) x(110) x(3) x(011)
x(7) x(111) x(7) x(111)
Sequence-4 : {x(3), x(7)}
Using the decimated sequences as input the 8-point DFT is computed.The fig 5.1 shows the three
stages of computation of an 8-point DFT.

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

F ig 5.1 . T h ree sta g es o f co m p u ta tio n s in 8 -p o in t D F T .


5. 25 Digital Signal Processing
Let us examine the 8-point DFT of an 8-point sequence in detail. The 8-point sequence is decimated
into 4-point sequences and 2-point sequences as shown below.

Let x(n) = 8-point sequence

f1(n), f2(n) = 4-point sequences obtained from x(n)

v11(n), v12(n) = 2-point sequences obtained from f1(n)

v21(n), v22(n) = 2-point sequences obtained from f2(n).

The relations between the samples of various sequences are given below.

v11(0) = f1(0) = x(0) v21(0) = f2(0) = x(1)

v11(1) = f1(2) = x(4) v21(1) = f2(2) = x(5)

v12(0) = f1(1) = x(2) v22(0) = f2(1) = x(3)

v12(1) = f1(3) = x(6) v22(1) = f2(3) = x(7)

First Stage Computation

In the first stage of computation the two point DFTs of the 2-point sequences are computed.

Let, V11(k) = DFT{v11(n)}.

Using equation (5.26), the 2-point DFT of v11(n) is given by,

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

Let, V12(k) = DFT{v12(n)}.

Using equation (5.26), the 2-point DFT of v12(n) is given by,

V12 (k) = ∑ v12 (n) W2nk ; for k = 0, 1


n = 0, 1

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)}.

Using equation (5.26), the 2-point DFT of v21(n) is given by,

V21 (k) = ∑ v21(n) W2nk ; for k = 0, 1


n = 0, 1

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)

Let, V22(k) = DFT{v22(n)}.

Using equation (5.26), the 2-point DFT of v22(n) is given by,

V22 (k) = ∑ v22 (n) W2nk ; for k = 0, 1.


n = 0, 1

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)

Second Stage Computation

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.

2. The complex number "b" is multiplied by a phase factor "WNk " .


k
3. The product "bWN " is added to complex number "a" to form new complex number "A".
k
4. The product "bWN " is subtracted from complex number "a" to form new complex number "B".
The above basic computation can be expressed by a signal
flow graph shown in Fig 5.2. (For detailed discussion on signal flow a
1
A = a + bW N
k

graph, refer Chapter 2, Section 2.6.2). 1

The signal flow graph is also called butterfly diagram since it k 1


WN k
resembles a butterfly. In radix-2 FFT, N/2 butterflies per stage are b B = a − bW N
k −1
bW N
required to represent the computational process. The butterfly
diagram used to compute the 8-point DFT via radix-2 DIT FFT can be F ig 5.2 : B a sic b u tterfly o r flo w grap h
arrived as shown below, using the computations shown in previous o f D IT ra d ix-2 FF T.
section.
The sequence x(n) is arranged in bit reversed order and then decimated into two sample sequences as
shown below.
x(0) x(2) x(1) x(3)
x(4) x(6) x(5) x(7)
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 28

Flow Graph or (Butterfly Diagram) for First Stage of Computation

Input of first stage


[x(n) in bit reversed order] Output of first stage

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

F ig 5 .3 : F irst sta g e o f flo w g ra p h (o r b u tterfly d ia g ra m ) fo r 8 -p o in t D F T v ia rad ix-2 D IT F F T.

Flow Graph (or Butterfly Diagram) for Second Stage of Computation

Output of first stage as


Input of second stage Output of second stage
1 1
V11(0) V11 0 + W40 V12 0 = F1 0
1
1 1 1
V11(1) V11 1 + W4 V12 1 = F1 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

F ig 5.4 : S ec o nd sta g e o f flo w g ra p h ( o r bu tterfly d iag ram ) fo r 8 -po in t D F T v ia ra dix-2 D IT F F T.


5. 29 Digital Signal Processing
Flow Graph (or Butterfly Diagram) for Third Stage of Computation

O utput of s econd stage as


O utput of third stage
Input of third s tage
[X (k)in norm al ord er]
1 1
F 1 (0) F1(0) + W 80 F 2 (0) = X (0)

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)

F ig 5 .5 : T hird sta g e o f flo w g ra p h ( o r b u tterfly d iag ra m ) for 8 -p o in t D F T v ia rad ix-2 D IT F F T.

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

F ig 5.6 : T h e flo w g ra p h (o r b u tterfly d iagra m ) fo r 8 -po in t D F T v ia ra dix-2 D IT F F T.

5.8 Decimation in Frequency (DIF) Radix-2 FFT


In decimation in frequency algorithm the frequency domain sequence X(k) is decimated, (but in
decimation in time algorithm, the time domain sequence x(n) is decimated).
In this algorithm, the N-point time domain sequence is converted to two numbers of N/2 point
sequences. Then each N/2 point sequence is converted to two numbers of N/4 point sequences.
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 30
Thus we get 4 numbers of N/4 point sequences. This process is continued until we get N/2 numbers of
2-point sequences. Finally the 2-point DFT of each 2-point sequence is computed. The 2-point DFTs of N/2
numbers of 2-point sequences will give N samples, which is the N-point DFT of the time domain
sequence.
Here the equations for forming N/2 point sequences, N/4 point sequences, etc., are obtained by
decimation of frequency domain sequences. Hence this method is called DIF. For example the N-point
frequency domain sequence X(k) can be decimated to two numbers of N/2 point frequency domain sequences
G1(k) and G2(k). The G1(k) and G2(k) defines new time domain sequences g1(n) and g2(n) respectively, whose
samples are obtained from x(n).
It can be shown that the N-point DFT of x(n) can be realized from two numbers of
N/2 point DFTs. The N/2 point DFTs can be realized from two numbers of N/4 point DFTs and so on. The
decimation continues upto 2-point DFTs.
Let x(n) and X(k) be N-point DFT pair.
Let G1(k) and G2(k) be two numbers of N/2 point sequences obtained by the decimation of X(k).
Let G1(k) be N/2 point DFT of g 1(n), and G2(k) be N/2 point DFT of g2(n).
Now, the N-point DFT X(k) can be obtained from the two numbers of N/2 point DFTs G1(k) and G2(k),
as shown below.
X(k)½k = even = G1(k)
X(k)½k = odd = G2(k)
Proof :

By definition of DFT, the N-point DFT of x(n) is,


kN 2π kN
N −j
N−1 2
−1
N−1 WN2 = e N 2 = e− jπk
X(k) = ∑
n=0
x(n) WNkn = ∑
n=0
x(n) WNkn + ∑ N
x(n) WNkn
e j = b−1g
= e− jπ
k k

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

∑ LMNx(n) W FH IK OP ∑ LMNx(n) + b−1g xFH n + N2 IK OPQ W


2 2
k
= kn
+ (−1)k x n + N WNkn = kn

n=0
N
2 Q n=0
N

Let us split X(k) into even and odd numbered samples.


X(k) k = even = X(2k) ; for k = 0, 1, 2, ...., N − 1
N
2 FH IK
g1(n) = x(n) + x n + N ; for n = 0, 1, 2,... N –1
−1 2 2
∑ LMNx(n) + (−1) FH IK OP W
2
= 2k
x n+ N 2kn
bg
G1 k is N point DFT of g1(n).
n=0
2 Q N
2
N N
−1 −1
= ∑ LMx(n) + xFH n + N IK OP W
2 2

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

X(k) k = odd = X(2k + 1) ; for k = 0, 1, 2, ....., N –1


2
N
−1

=
2

∑ LMx(n) + (−1) xFH n + N IK OP W


(2k + 1) (2k + 1)n

n=0N 2 Q N

N
−1

∑ LMNx(n) − xFH n + N2 IK OPQ W W g (n) = F x(n) − xF n + N I I W ; for n = 0, 1, 2, .....,


2
2kn n
= N N n N –1
n=0
N
H H 2 KK 2 N
2
−1

∑ LNMx(n) − xFH n + N2 IK OQP W W


2 N
n
G (k) is kn
point DFT of g (n).
= N N2 2 2
n=0
2
N N
−1 −1
2 2
= ∑ g (n) W Nkn2 = G2 (k) ∴ G2(k) = ∑ g2(n) W Nkn2 ; for k = 0, 1, 2, ....., N –1
2
n=0
2
n=0

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 :

By definition of DFT, the N/2 point DFT of G1(k) is,


N N N
−1 −1 −1
2 4 2
G1(k) = ∑ g (n)
n=0
1 W Nkn2 =
n=0
∑ g (n) 1 W Nkn2 + ∑ g (n) W
N
1
kn
N2
n=
4
N N N N
−1 −1
G F N IJ −1 −1
N

∑ 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) + (−1) g FH n + N IK OP W


4
k kn
N
n=0
1
4 Q 1 N2

Let us split G1(k) into even and odd numbered samples.


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 32

G1(k) k = even = G1(2k) ; for k = 0, 1, 2, ....., N − 1


4
d11(n) = g1(n) + g1 n + N FH IK
4
N
−1
D11(k) is N point DFT of d11(n).
∑ LMNg (n) + (−1) g FH n + N4 IK OPQ W
4
= 1
2k
1
2kn
N2
4
n=0 N
−1
N N 4
−1 −1

= ∑ 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

∑ LMg (n) + (−1) (2k +1) FH


g1 n + N IK OP W (2k +1)n N
−1
n=0 N1
4 Q N2
∴ D12(k) =
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

∑ d12(n) W Nkn4 = D12(k)


n=0 N1
4 Q
1 N/2
n=0

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

G2(k) k = odd = G2(2k + 1) ; for k = 0, 1, 2, ....., N − 1


4 D22 (k) is N point DFT of d 22 (n).
N 4
−1
4 N
= ∑d 22(n) W Nkn4 = D22(k) 4
− 1

n=0 ∴ D22 (k) = ∑d


n = 0
22 (n) W Nkn4

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

When n = 0; g2 (n) = g2 (0) = [x(0) − x(4)] W80


When n = 1; g2 (n) = g2 (1) = [x(1) − x(5)] W81
When n = 2; g2 (n) = g2 (2) = [x(2) − x(6)] W82
When n = 3; g2 (n) = g2 (3) = [x(3) − x(7)] W83
Second Stage Computation
In the second stage of computation, 2 numbers of 2-point sequences d11(n) and d12(n) are generated
from the samples of g1(n), and another 2 numbers of 2-point sequences d21(n) and d22(n) are generated from
the samples of g2(n), as shown below.

b g
d11 (n) = g1 (n) + g1 n + N 4 = g1 (n) + g1 (n + 2) ; for n = 0, 1

When n = 0; d11 (n) = d11 (0) = g1 (0) + g1 (2)


When n = 1; d11 (n) = d11 (1) = g1 (1) + g1 (3)

d12 (n) = g1 (n) − g1 (n + N 4) WNn 2 = g1 (n) − g1 (n − 2) W4n ; for n = 0, 1

When n = 0; d12 ( n) = d12 ( 0) = [g1 ( 0) − g1 ( 2)] W40


When n = 1; d12 ( n) = d12 (1) = [g1 (1) − g1 (3)] W41

d 21 (n) = g2 (n) + g 2 (n + N 4) = g2 (n) + g 2 (n + 2) ; for n = 0, 1

When n = 0; d 21 (n) = d 21(0) = [g2 (0) + g2 (2)]


When n = 1; d 21 (n) = d 21 (1) = [g2 (1) + g2 (3)]

d 22 (n) = g2 (n) − g2 (n + N 4) WNn 2 = g2 (n) − g2 (n + 2) W4n ; for n = 0, 1

When n = 0; d 22 (n) = d 22 (0) = [g 2 (0) − g 2 (2)] W40


When n = 1; d 22 (n) = d 22 (1) = [g2 (1) − g2 (3)] W41

Third Stage Computation


In the third stage of computation, 2-point DFTs of the 2-point sequences d11(n), d12(n), d21(n) and
d22(n) are computed.
The 2-point DFT of the 2-point sequence d11(n) is computed as shown below.
1
l q
DFT d11 (n) = D11 (k) = ∑ d11(n) W2kn ; for k = 0, 1
n=0
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 34
1
W20 = 1
When k = 0; D11 (0) = ∑ d11(n) W20 = d11(0) + d11(1)
n=0
1
W21 = −1 = −1 × W20
When k = 1 ; D11 (1) = ∑ d11 (n) W2n = d11 (0) W20 + d11 (1) W21
n=0

= 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

Combining the Three Stages of Computation


The final output Dij(k) gives the X(k). The relation can be obtained as shown below.
X(2k) = G1(k) ; k = 0,1,2,3 X(2k + 1) = G2(k) ; k = 0, 1, 2, 3
\ X(0) = G1(0) \ X(1) = G2(0)
X(2) = G1(1) X(3) = G2(1)
X(4) = G1(2) X(5) = G2(2)
X(6) = G1(3) X(7) = G2(3)
G1 (2k) = D11 (k) ; k = 0, 1 G1 (2k + 1) = D12 (k) ; k = 0, 1
∴ G1 (0) = D11 (0) ∴ G1 (1) = D12 (0)
G1 (2) = D11 (1) G1 (3) = D11 (1)

G 2 (2k) = D21 (k) ; k = 0, 1 G 2 (2k +1) = D22 (k) ; k = 0, 1


∴ G 2 (0) = D21 (0) bg
∴ G 2 1 = D22 0 bg
G 2 (2) = D21 (1) bg
G 2 3 = D22 1 bg
From above relations we get,
D11(0) = G1(0) = X(0) D21(0) = G2(0) = X(1)

D11(1) = G1(2) = X(4) D21(1) = G2(2) = X(5)

D12(0) = G1(1) = X(2) D22(0) = G2(1) = X(3)

D12(1) = G1(3) = X(6) D22(1) = G2(3) = X(7)


From the above we observe that the output is in bit reversed order. In radix-2 DIF FFT, the input is in
normal order the output will be in bit reversed order.
5. 35 Digital Signal Processing
5.8.2 Flow Graph For 8-point DFT using Radix-2 DIF FFT
If we observe the basic computation performed at every stage of radix-2 DIF FFT in previous section,
we can arrive at the following conclusion.

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

F ig 5.7 : B a sic b u tterfly o r flo w grap h


o f D IF ra d ix-2 FF T.
The signal flow graph is also called butterfly diagram since it resembles a butterfly. In radix-2 FFT,
N/2 butterflies per stage are required to represent the computational process. The butterfly diagram used to
compute the 8-point DFT via radix-2 DIF FFT can be arrived as shown below, using the computations shown
in previous section.
Flow Graph (or Butterfly Diagram) for First Stage of Computation

Input of first stage Output of first stage


[x(n) in normal order]

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)

F ig 5 .8 : F irst sta g e o f flo w g ra p h (o r b u tterfly d ia g ra m ) fo r 8 -p o in t D FT v ia rad ix-2 D IF F F T.


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 36
Flowgraph or Butterfly Diagram for Second Stage of Computation

Output of first stage as


Output of second stage
input of second stage.
1 1
g1(0) g1 0 + g1 2 = d11 0
1
1 1
g1(1) g1 1 + g1 3 = d11 1
1
1 0
W4 0
g1(2) [g1 0 − g1 2 ]W = d12 0
−1 4
1
1 W4 1
g1(3) [g1 1 − g1 3 ]W = d12 1
4
−1

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

F ig 5.9 : S e co n d sta g e of flow g ra ph (or b u tterfly d ia g ra m ) fo r 8 -p o in t D F T via ra d ix -2 D IF F F T.

Flow Graph( or Butterfly Diagram) for Third Stage of Computation

O utput of s econd stage as O utput o f third stage


input of third stage [X (k ) in bit rev ersed order]
1 1
d 1 1 (0) d 1 1(0) + d 11 (1) = D 11(0) = G 1(0) = X (0)
1

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 ig 5.1 0 : T hird sta ge o f flo w g ra p h (o r b u tt erfly d ia g ra m ) for 8 -p oin t D F T v ia ra dix-2 D IF F F T.


5. 37 Digital Signal Processing
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
1 1 W2
1 1 1
x(1) X(4)
1 1 −1
1 0
1 W4
1 1 1
x(2) X(2)
1 −1 1
1 1
1 0
W4 W2
x(3) 1 X(6)
1 −1 −1
1
0
W8 1 1 1
x(4) X(1)
−1 1 1
1 0
W8 1 W2
−1 1 1
x(5) X(5)
1 −1
2
1 0
W8 W4
−1 −1 1 1
x(6) X(3)
1
3 1 1 0
−1
W8 W4 1 W2
x(7) x(7)
−1 −1
F ig 5 .11 : T h e flo w g ra p h (o r b u tterfly d ia g ra m ) fo r 8-p o int D F T via rad ix-2 D IF F F T.

5.8.3 Comparison of DIT and DIF Radix-2 FFT


Differences in DIT and DIF
l In DIT the time domain sequence is decimated, whereas in DIF the frequency domain sequence
is decimated.
l In DIT the input should be in bit-reversed order and the output will be in normal order.
For DIF the reverse is true, i.e., input is normal order, while output is bit reversed.
l Considering the butterfly diagram, in DIT the complex multiplication takes place before the
add-subtract operation, whereas in DIF the complex multiplication takes place after the add-
subtract operation.
Similarities in DIT and DIF
l For both the algorithms the value of N should be such that, N = 2m, and there will be m stages
of butterfly computations, with N/2 butterfly per stage.
l Both algorithms involve same number of operations. The total number of complex additions
are Nlog2N and total number of complex multiplications are (N/2) log2N.
l Both algorithms require bit reversal at some place during computation.
5.9 Computation of Inverse DFT Using FFT
Let, x(n) and X(k) be N-point DFT pair.
Now by the definition of inverse DFT,
N−1 j2 πnk
1
x(n) =
N ∑ X(k) e N ; for n = 0, 1, 2, ....., N − 1
k=0

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

x(0) = 2 x(0) = 2 x (4) = 1 2 −1 = 1


x(1) = 1 x(4) = 1 x (2) = 2 2+ 1 = 3
x(2) = 2 x(2) = 2
x (6) = 1 2 −1= 1
x(3) = 1 x(6) = 1
x (1) = 1 1+ 2 = 3
x(4) = 1 x(1) = 1
x(5) = 2 x(5) = 2 x (5) = 2 1 −2 = −1
x(6) = 1 x(3) = 1 x (3) = 1 1+ 2 = 3
x(7) = 2 x(7) = 2
x (7) = 2 1 −2 = −1
The 8-point DFT by radix-2 FFT involve 3 stages of computation with
4-butterfly computations in each stage. The sequence rearranged in the bit F ig 1 : B u tterfly d ia gram fo r
reversed order forms the input to the first stage. For other stages of computation first sta ge o f ra d ix -2 D IT F F T.
the output of previous stage will be the input for current stage.
First stage computation
The input sequence of first stage computation = { 2, 1, 2, 1, 1, 2, 1, 2} The phase factor involved in first
The butterfly computations of first stage are shown in fig 1. stage of computation is W20 .
Since, W20 =1, it is not considered
for computation.

The output sequence of first stage of computation = { 3, 1, 3, 1, 3, –1, 3, –1 }


5. 39 Digital Signal Processing
Second stage computation
The input sequence to second stage computation = { 3, 1, 3, 1, 3, –1, 3, –1 }
The phase factors involved in second stage computation are W40 and W41 .
1 1
3 3+3=6
The butterfly computations of second stage are shown in fig 2.
1
1 1
1 1+ 1( −j)= 1 −j
1
1
0 1 -1
− j 2π × 3 3 −3 = 0
W40 = e 4 = e0 = 1 1
−j -1
1 π 1 1 −1( −j)= 1+ j
− j2π × −j ×
W41 =e 4 =e 2
1 1
3 3+3=6
F −π IJ + j sinFG −π IJ
= cosG 1 1
1
H 2K H 2K −1
1
−1+ ( −1)( −j)= −1 +j

= −j 1 1
-1 3 −3 = 0
3
1
−j -1
−1 −1 −( −1)( −j)= −1 −j

The output sequence of second


= {6, 1–j, 0, 1+j, 6, –1+j, 0, –1–j} F ig 2 : B u tterfly d iag ra m fo r
stage of computation seco n d sta g e o f ra d ix-2 D IT F F T.
Third stage computation
The input sequence to third stage computation = {6, 1–j, 0, 1+j, 6, –1+j, 0, –1–j}

The phase factors involved in third stage computation are W80 , W81 , W82 and W83.

The butterfly computations of third stage are shown in fig 3.


0
− j 2π ×
W80 = e 8 = e0 = 1
1 π
W81 = e
− j2 π ×
8 =e
−j ×
4 = cos
FG −π IJ + j sinFG −π IJ = 1 − j 1
H 4K H 4K 2 2
2 π
W82 = e
− j2 π × −j × F
= cosG
−π I F −π I
8 =e 2
H 2 JK + j sinGH 2 JK = −j
3 3π
W83 = e
− j 2π ×
8 =e
−j ×
4 F −3π IJ + j sinFG −3π IJ = − 1 − j
= cosG
1
H4K H4K 2 2

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

F ig 3 : B u tte rfly d ia gram for third sta ge o f ra d ix-2 D IT F F T o f X (k ) .


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 40
The output sequence of third |UV = { 12, 1 + j0.414, 0 , 1+ j2.414, 0, 1 − j2.414, 0, 1 − j0.414 }
stage of computation |W
The output sequence of third stage of computation is the 8-point DFT of the given sequence in normal
order.

∴ DFT {x(n)} = X(k) = { 12, 1 + j0.414, 0, 1+ j2.414, 0, 1 − j2.414, 0, 1 − j0.414 }

b) 8-point DFT by Radix-2 DIF-FFT

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.

First stage computation


The input sequence for first stage of computation = { 2, 1, 2, 1, 1, 2, 1, 2 }
The phase factors involved in first stage computation are W80 , W81 , W82 and W83.

The butterfly computations of first stage are shown in fig 4.


0
− j2π ×
W80 = e 8 =1
1 π
W81 = e
− j2π ×
8 =e
−j
4 FG π IJ + jsinFG − π IJ = 1 − j 1
= cos −
H 4K H 4K 2 2
2 π
W82 = e
− j2π ×
8 =e
−j
2 F πI F πI
= cosG − J + jsinG − J = − j
H 2K H 2K
3 3π
W83 = e
− j2π ×
8 =e
−j
4 F 3π IJ + jsinFG − 3π IJ = − 1 −
= cosG − j
1
H 4K H 4K 2 2

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

F ig 4 : B u tterfly d ia g ram fo r first sta ge o f ra d ix-2 D IF F F T.

The output sequence of first


RS 1 1 1 1UV
stage of computation = 3, 3, 3, 3, 1, − +j , − j, +j
T 2 2 2 2W
5. 41 Digital Signal Processing
Second stage computation
The input sequence for second
RS 1 1 1 1UV
stage of computation = 3, 3, 3, 3, 1, − +j , − j, +j
T 2 2 2 2W
The phase factors involved in second stage computation are W40 and W41 .
The butterfly computations of second stage are shown in fig 5.
1 1
3 3+3=6
1
0 1 1
− j 2π × 3 3+3=6
W40 = e 4 =1 1
1
1 π −1 1
− j 2π × −j × 3 3 −3 = 0
W41 = e 4 =e 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

F ig 5 : B u tte rfly d ia gra m for secon d sta g e o f ra d ix -2 D IF F F T.


The output sequence of second RS 2 2 UV
= 6, 6, 0, 0, 1 − j, j , 1+ j, j
stage of computation T 2 2W
Third stage computation
The input sequence to third RS 2 2 UV
= 6, 6, 0, 0, 1 − j, j , 1+ j, j
stage of computation T 2 2W
The butterfly computations of third stage are shown in fig 6.
6 6 + 6 = 12 = X (0)

The phase factor involved in third


6 6 − 6 = 0 = X (4)
stage of computation is W20 .
0 + 0 = 0 = X (2)
0 Since, W20 = 1, it is not
considered for computation.
0 0 − 0 = 0 = X (6)

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, 1–j2.414, 1+j2.414, 1–j0.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

\ DFT {x(n)} = X(k) = { 12, 1+ j0.414, 0, 1+ j2.414, 0, 1– j2.414, 0, 1– j0.414 }

Magnitude and phase specturm

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.

X(k) m 12, 1+ j0.414, 0, 1 + j2.414, 0, 1 − j2.414, 0, 1 − j0.414r


=
= m12∠0° , 1.08 ∠22 ° , 0∠0° , 2.61∠67 ° , 0 ∠0 °, 2.61∠− 67 ° , 0 ∠0 ° , 108
. ∠ − 22 °r
R|12∠0, 1.08 ∠22 °× π , 0∠0, 2.61∠67 ° × π , 0 ∠0, U|
= S 180 ° 180 °
|| π π
V|
2.61∠− 67 ° × , 0 ∠0, 1.08 ∠− 22 ° ×
T 180 ° 180 ° |W
= l 12∠0, 1.08 ∠0.12π , 0 ∠0, 2.61∠0.37 π , 0 ∠0, 2.61∠ − 0.37 π , 0 ∠0, 1.08 ∠ − 0.12πq
∴|X(k)| = m 12, 1.08, 0, 2 .61, 0, 2.61, 0, 1.08 r
∠X(k) = m 0, 0.12π, 0, 0.37π, 0, − 0.37π, 0, − 0.12πr

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) = 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 a 4-point sequence, we have to compute
x(n) x(n)
4-point DFT. The 4-point DFT by radix-2 FFT consists of two
stages of computations with 2-butterflies in each stage. The given Normal order Bit reversed order
sequence x(n), is first arranged in bit reversed order as shown in
x(0) = 1 x(0) = 1
table.
x(1) = 2 x(2) = 3
The sequence arranged in bit reversed order forms the
input sequence to first stage computation. x(2) = 3 x(1) = 2
First stage computation x(3) = 0 x(3) = 0

Input sequence to first stage = { 1, 3, 2, 0 }. The butterfly computations of first stage are shown in fig1.

x (0) = 1 1+3=4 The phase factor involved in first


stage of computation is W20 .
x (2) = 3 1 − 3 = −2
Since, W20 = 1, it is not
x (1) = 2 2+0=2
considered for computation.

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.

Output sequence of second stage computation = { 6, -2–2j, 2, -2+2j }


The output sequence of second stage of computation is the 4-point DFT of x(n).
\ X(k) = DFT{x(n)} = {6, -2–2j, 2, -2+2j }

Step - 2: To determine H(k)


Since h(n) is a 4-point sequence, we have to compute 4-point DFT. The 4-point DFT by radix-2 FFT
consists of two stages of computations with 2-butterflies in each
h(n) h(n)
stage. The sequence h(n) is first arranged in bit reversed order as
Normal order Bit reversed order
shown in table.
h(0) = –1 h(0) = –1
The sequence in bit reversed order forms the input sequence
to first stage computation. h(1) = –1 h(2) = 0
First stage computation h(2) = 0 h(1) = –1
Input sequence of first stage = { –1, 0, –1, 0 }. The butterfly h(3) = 0 h(3) = 0
computations of first stage are shown in fig 3.
The phase factor involved in first
h(0) = −1 −1 + 0 = −1 stage of computation is W20 .
Since, W20 = 1, it is not
h(2) = 0 −1 − 0 = −1
considered for computation.
h(1) = −1 −1 + 0 = −1

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.

Output sequence of first stage computation = { –1, –1, –1, –1 }


Second stage computation
Input sequence to second stage computation = { –1, –1, –1, –1 }
0
− j2π ×
The phase factors involved are W40 and W41 . W40 = e 4 =1
1 π
− j2π × −j ×
The butterfly computations of second stage are shown in fig 4. W41 = e 4 =e 2

= 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)

F ig 4 : B u tte rfly d ia gram for seco n d


stag e o f ra d ix-2 D IT F F T o f H (k).
Output sequence of second stage computation = { –2, –1 + j, 0, –1 –j }
The output sequence of second stage computation is the 4-point DFT of h(n).

\ H(k) = DFT{h(n)} = { –2, –1 + j, 0, –1 –j }

Step 3 : To determine the product X(k)H(k)


Let the product, X(k)H(k) = Y(k); for k = 0, 1, 2, 3.
when k = 0; Y(0) = X(0) ´ H(0) = 6 ´ (–2) = –12
when k = 1; Y(1) = X(1) ´ H(1) = (–2–2j) ´ (–1 + j) = 4
when k = 2; Y(2) = X(2) ´ H(2) = 2 ´ 0 = 0
when k = 3; Y(3) = X(3) ´ H(3) = (–2+2j)´ (–1–j) = 4
\ Y(k) = { –12, 4, 0, 4}

Step - 4: To determine inverse DFT of Y(k)


The 4-point inverse DFT of Y(k) can be computed using radix-2 DIT FFT by taking conjugate of the phase
factors and then dividing the output sequence of FFT by 4.
Y(k) = { –12, 4, 0, 4}
The 4-point inverse DFT of Y(k) using radix-2 DIT FFT involves two stages of computations with
2-butterflies in each stage. The sequence Y(k) is arranged in bit
reversed order as shown in the table. Y(k) Y(k)
Normal order Bit reversed order
The sequence arranged in bit reversed order forms the input
sequence to first stage computation. Y(0) = –12 Y(0) = –12
First stage computation Y(1) = 4 Y(2) =0
Input sequence to first stage = { –12, 0, 4, 4 }. The butterfly Y(2) =0 Y(1) =4
computations of first stage are shown in fig 5.
Y(3) =4 Y(3) =4
Y (0) = −12 −12 + 0 = −12

The phase factor involved in first


Y (2) = 0 −12 − 0 = −12 ∗

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}

Second stage computation


Input sequence to second stage computation = { – 12, – 12, 8, 0 }

The phase factors involved are (W40 )∗ and (W41)∗.


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 46
The butterfly computation of second stage is shown in fig 6. ∗ j2π ×
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

F ig 6 : B u tte rfly d ia gram for seco n d


sta g e o f in verse D F T o f Y (k).
The output sequence of second stage computation = { – 4, – 12, – 20, – 12 }
The sequence y(n) is obtained by dividing each sample of output sequence of second stage by 4.

\ The response of the LTI system, y(n) = { –1, –3, –5, –3 }

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

F ig 1 : B u tterfly d ia gram for first


stage o f ra dix-2 D IT F F T o f X (k ).
Output sequence of first stage of computation = { –2, 0, 2, 2, 2, 2, 2, 2 }

Second stage computation


The input sequence to second stage of computation = { –2, 0, 2, 2, 2, 2, 2, 2 }

Phase factors involved in second stage are W40 and W41.

The butterfly computation of second stage is shown in fig 2.


0
− j2π ×
W40 = e 4 =1
1 π
− j2π × −j ×
W41 = e 4 =e 2

= cos
FG −π IJ + jsinFG −π IJ
H 2K H 2K
= −j

Output sequence of second stage of computation = { 0, –2j, –4, 2j, 4, 2 –2 j, 0, 2 + 2j }


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 48
1 1
−2 −2 + 2 = 0
1
1 1
0 0 + 2( −j) = −2j
1
1
1 -1
2 −2 − 2 = −4
1
−j -1
2 0 − 2( −j) = 2j

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

F ig 2 : B u tte rfly d iag ra m fo r seco n d sta ge o f ra d ix-2 D IT F F T o f X (k).


Third stage computation
Input sequence to third stage computation = { 0, –2j, –4, 2j, 4, 2 – 2j, 0, 2 + 2j }.
Phase factors involved are W80 , W81, W82 and W83.
The butterfly computation of third stage is shown in fig 3.
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 −π IJ + j sinFG −π IJ = −j
= cosG
H 2K H 2K
3 3π
W83 = e
− j2π ×
8 = e
−j ×
4 = cosG
F −3π IJ + j sinFG −3π IJ = − 1 − j 1 = −0 . 707 − j0 . 707
H4K H4K 2 2

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

F ig 3 : B u tte rfly d ia gram for third sta g e o f rad ix-2 D IT F F T o f X (k ) .

Output sequence of third UV m 4,= − j4.828, − 4, − j0.828, − 4, j0.828, − 4, j4.828 r


stage of computation W
∴ DFT {x(n)} = X(k) = m 4, − j4.828, − 4, − j0.828, − 4, j0.828, − 4, j4.828 r
5. 49 Digital Signal Processing
Step 2 : To determine H(k)
Since h(n) is an 8-point sequence, we have to compute 8-point DFT. The 8-point DFT by radix-2 FFT
consists of three stages of computations with four butterflies in each stage.
The sequence h(n) is first arranged in bit reversed order as shown in the following table .

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.

First stage computation


Input sequence to first stage computation = { –1, 0, –1, 0, 1, 0, 1, 0 }
The butterfly computations of first stage is shown in fig 4.
Output sequence of first stage of computation = { –1, –1, –1, –1, 1, 1, 1, 1 }

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

F ig 4 : B u tterfly d iag ra m fo r first


sta g e o f ra dix -2 D IT F F T o f H (k).
Second stage computation
Input sequence to second stage of computation = { –1, –1, –1, –1, 1, 1, 1, 1 }

Phase factors involved in second stage are W40 and W41 .

The butterfly computations of second stage are shown in fig 5.


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 50
1 1
−1 −1 + ( −1) = −2
1 0
− j2π ×
−1
1 1
−1 + ( −1)( −j) = −1 + j W40 = e 4 =1
1
1 π
1 − j2π × −j ×
−1
1 -1
−1 − ( −1) = 0 W41 = e 4 =e 2

−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

F ig 5 : B u tte rfly d ia gra m for seco n d


sta ge o f ra d ix-2 D IT F F T o f H (k).
Output sequence of second
= { –2, –1+ j, 0, –1–j, 2, 1 – j, 0, 1 + j }
stage of computation

Third stage computation


Input sequence to third stage computation = { –2, –1+ j, 0, –1–j, 2, 1 – j, 0, 1 + j }

Phase factors involved in third stage computations are W80 , W81, W82 , and W83.

The butterfly computations of third stage are shown in fig 6.

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).

∴ DFT h(n)l q = H(k) = m0, − 1 − j0.414, 0, − 1 − j2.414, − 4, − 1 + j2.414, 0, − 1 + j0.414 r


Step 3 : To determine the product X(k)H(k)
Let the product of X(k)H(k) = Y(k); for k = 0, 1, 2, 3, 4, 5, 6, 7
\ Y(k) = X(k)H(k)
When k = 0 ; Y(0) = X(0) H(0) = 4 × 0=0
When k = 1; Y(1) = X(1) H(1) = − j4.828 × –1 − j0.414 = −2 + j4.828
When k = 2; Y(2) = X(2) H(2) = − 4 × 0 = 0
When k = 3; Y(3) = X(3) H(3) = – j0.828 × –1 − j2.414 = −2 + j0.828
When k = 4 ; Y(4) = X(4) H(4) = – 4 × – 4 = 16
When k = 5; Y(5) = X(5) H(5) = j0.828 × –1 + j2.414 = −2 − j0.828
When k = 6 ; Y(6) = X(6) H(6) = – 4 × 0 = 0
When k = 7 ; Y(7) = X(7) H(7) = j4.828 × –1 + j0.414 = −2 − j4.828

∴ Y(k) = m 0, – 2 + j4.828, 0, − 2 + j0.828, 16, − 2 − j0.828, 0, − 2 − j4.828 r


Step - 4: To determine inverse DFT of Y(k)
The 8-point inverse DFT of Y(k) can be computed using radix-2 DIT FFT by taking conjugate of the phase
factors and then dividing the output sequence of FFT by 8.
The 8-point inverse DFT of Y(k) using radix-2 DIT FFT involves three stages of computations with
4-butterflies in each stage. The sequence Y(k) is arranged in bit reversed order as shown in the following table.
The sequence arranged in bit reversed order forms the input sequence to first stage computation.

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

Input sequence of first stage =


RS 0, 16, 0, 0, – 2 + j4.828, − 2 + j0.828, UV
|T−2 + j0.828, − 2 − j4.828 |W
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 52
The butterfly computations of first stage are shown in fig 7.
The phase factor involved in first
Y(0) = 0 0 + 16 = 16 ∗
stage of computation is W20 . d i
∗ 0
Y(4) = 16 0 − 16 = −16 FH IK
Since, W2
0
=e
j2π ×
4 = e0 = 1,

Y(2) = 0 0+0=0
it is not considered for
computation.
Y(6) = 0 0 −0 = 0

Y 1 = − 2 + j 4.828 −2 + j 4.828 + −2 − j 0.828 = −4 + j4

Y 5 = − 2 + j 0.828 −2 + j 4.828 − −2 − 0.828 = j 5 .656

Y 3 = − 2 − j 0.828 −2 + j 0.828 + −2 − j 4.828 = −4 − j 4

Y 3 = − 2 − j 4.828 −2 + j 0.828 − −2 − j 4.828 = j 5 .656

F ig 7 : B u tte rfly d iag ra m fo r first sta g e o f inv erse D F T o f Y (k).


Output sequence of first stage = m 16, − 16, 0, 0, − 4 + j4, j 5.656, − 4 − j4, j5.656 r
Second stage computation

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

F ig 8 : B utterfly diagram for second stag e of inverse D F T of Y(k)


Output sequence of second |UV = m 16, − 16, 16, − 16, − 8, − 5.656 + j 5 .656 , j8, 5.656 + j 5.656 r
stage computation |W
Third stage computation

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

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)

F ig 9 : B u tte rfly d ia gra m for th ird sta g e of in v erse D F T o f Y (k ).


Output sequence of third stage computation = { 8, –24, 8, –24, 24, –8, 24, –8 }
The sequence y(n) is obtained by dividing each sample of output sequence of third stage by 8.

\ The response of the LTI system, y(n) = { 1, –3, 1, –3, 3, –1, 3, –1 }

5.10 Summary of Important Concepts


1. 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.
2. The DFT has been developed to convert a continuous function of w to a discrete function of w.
3. The DFT of a discrete time signal can be obtained by sampling the DTFT of the signal.
4. The sampling of the DTFT is conventionally performed at N equally spaced frequency points in the
period, 0 £ w £ 2p .
5. DFT sequence starts at k = 0, corresponding to w = 0 but does not include k = N, corresponding to w =2p.
6. The DFT is defined along with number of samples and is called N-point DFT.
7. The number of samples N for a finite duration sequence x(n) of length L should be such that, N ³ L, in
order to avoid aliasing of frequency spectrum.
8. The X(k) is also called discrete frequency spectrum (or signal spectrum) of the discrete time signal x(n).
9. The plot of samples of magnitude sequence versus k is called magnitude spectrum.
10. The plot of samples of phase sequence versus k is called phase spectrum.
11. The DFT sequence X(k) is periodic with periodicity of N samples.
Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 54
12. The DFT of circular convolution of two sequences is equivalent to product of their individual DFTs.
13. The N-point DFT of a finite duration sequence can be obtained from the Z-transform of the sequence, by
evaluating the Z-transform at N equally spaced points around the unit circle.
14. The DFT supports only circular convolution and so, the linear convolution using DFT has to be
computed via circular convolution.
15. The FFT is a method (or algorithm) for computing the DFT with reduced number of calculations.
16. In N-point DFT by radix-r FFT, the number of stages of computation will be "m" times, where m = logrN.
17. In direct computation of N-point DFT, the total number of complex additions are N(N–1) and total
number of complex multiplications are N2.
18. In computation of N-point DFT via radix-2 FFT, the total number of complex additions are Nlog2N and
total number of complex multiplications are (N/2) log2N.
− j 2π
19. The complex valued phase factor or twiddle factor WN is defined as, WN = e N .
20. The term W in phase factor represents a complex number 1Ð –2p.
21. The multiplication by k of the phase value –2p of W can be represented as Wk.
22. The division by N of the phase value –2p of W can be represented as WN.
23. In DIT the time domain sequence is decimated, whereas in DIF the frequency domain sequence is decimated.
24. In radix-2 FFT algorithm, the N-point DFT can be realized from two numbers of N/2 point DFTs, the N/2
point DFT can be realized from two numbers of N/4 points DFTs, and so on.
25. In radix-2 FFT, N/2 butterflies per stage are required to represent the computational process.
26. In radix-2 DIT FFT, the input should be in bit reversed order and the output will be in normal order.
27. In radix-2 DIF FFT, the input should be in normal order and the output will be in bit reversed order.
28. In butterfly computation of DIT, the multiplication of phase factor takes place before the add-subtract
operation.
29. In butterfly computation of DIF, the multiplication of phase factor takes place after the add-subtract
operation.
30. In FFT, the phase factor for computing inverse DFT will be conjugate of phase factors for computing
DFT.

5.11 Short Questions and Answers


Q5.1 Calculate the DFT of the sequence, x(n) = {1, 1, –2, –2}.

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

Since x(n) is a 4-point sequence, we can take 4-point DFT.


3 2πnk πk 3πk
−j −j −j
∴ X(k ) = ∑
n = 0
x(n)e 4 = x(0)e0 + x(1)e 2 + x(2)e − jπk + x(3)e 2

π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

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

Since x(n) is a 4-point sequence, we can take 4-point DFT.


3 2πnk πk 3πk
−j -j -j
∴ X(k) = ∑
n = 0
x(n)e 4 = x(0)e0 + x(1)e 2 + x(2)e-jπk + x(3)e 2

−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

1 − ccos 2πk − j sin 2πkh 1 − cos 2πk For interger k,


= =
F−j
πk I j
πk
πk −j
πk −j
πk
sin2pk = 0.
e GH e + e JK e 2 cos 16
16 16 16 16

π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

Q5.4 Find the inverse DFT of Y(k) = {1, 0, 1, 0}.

Solution

The inverse DFT of the sequence Y(k) of length 4 is given by,


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 56
3 2πkn
1 j
DFT −1{Y(k)} = y(n) =
4
∑ Y(k)e 4 ; for n = 0, 1, 2, 3
k = 0

∴ 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

When n = 0; y(0) = 0.25 (1 + cos 0) = 0.5


When n = 1; y(1) = 0.25 (1 + cos p) = 0
When n = 2; y(2) = 0.25 (1 + cos 2p) = 0.5
When n = 3; y(3) = 0.25 (1 + cos 3p) = 0

\ y(n) = {0.5, 0, 0.5, 0}

Q5.5 Calculate the percentage saving in calculations in a 512-point radix-2 FFT, when compared
to direct DFT.

Solution

Direct computation of DFT


Number of complex additions = N(N – 1) = 512 ´ (512 – 1) = 2,61,632
Number of complex multiplications = N2 = 5122 = 2,62,144

Radix-2 FFT

Number of complex additions = Nlog2 N = 512 ´ log2512


= 512 ´ log229 = 512 ´ 9 = 4,608

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.

The x(n) in normal order = {1, 2, 3, 4, –1, –2, –3, –4}


The x(n) in bit reversed order = {1, –1, 3, –3, 2, –2, 4, –4}
5. 57 Digital Signal Processing
Q5.7 Compare the DIT and DIF radix-2 FFT.
DIT raidx-2 FFT DIF radix-2 FFT
1. The time domain sequence is 1. The frequency domain sequence is
decimated. decimated.
2. The input should be in bit reversed 2. The input should be in normal order, the
order, the output will be in normal output will be in bit reversed order.
order.
3. In each stage of computations, the 3. In each stage of computations, the
phase factors are multiplied before phase factors are multiplied after add
add and subtract operations. and subtract operations.
4. The value of N should be expressed 4. The value of N should be expressed
m
such that N = 2 and this algorithm such that, N = 2m and this algorithm
consists of m stages of computations. consists of m stages of computations.
5. Total number of arithmetic operations 5. Total number of arithmetic operations
are Nlog2N complex additions and are Nlog2N complex additions and
(N/2)log2N complex multiplications. (N/2)log2N complex multiplications.

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.

Q5.9 Why is FFT needed?

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.

Q5.10 What is bin spacing?


Solution
The N-point DFT of x(n) is given by,
N − 1 2πnk N − 1
−j
X(k) = ∑
n = 0
x(n)e N = ∑ x(n)W
n = 0
nk
N

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, ... N–1).
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 58

5.12 MATLAB Programs


Program 5.1
Write a MATLAB program to perform circular convolution of the discrete time
sequences x1(n)={0,1,0,1} and x1(n)={1,2,1,2} using DFT.

% Program to perform Circular Convolution via DFT

clear all
clc

N = 4; % declare the value of N


x1 = [0,1,0,1]; % declare the input sequences
x2 = [1,2,1,2];

disp(‘The 4-point DFT of x1(n) is,’);


X1 = fft(x1,N) % compute 4-point DFT of x1(n)

disp(‘The 4-point DFT of x2(n) is,’);


X2 = fft(x2,N) % compute 4-point DFT of x2(n)

disp(‘The product of DFTs is,’);


X1X2 = X1.*X2 % product of DFTs

disp(‘Circular convolution of x1(n) and x2(n) is,’);


X3 = ifft(X1X2) % perform IDFT to get result of circular convolution
OUTPUT
The 4-point DFT of x1(n) is,
X1 =
2 0 –2 0

The 4-point DFT of x2(n) is,


X2 =
6 0 –2 0

The product of DFTs is,


X1X2 =
12 0 4 0

Circular convolution of x1(n) and x2(n) is,


X3 =
4 2 4 2
Note : Verify the above result with example 5.3.

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.

% program to find DFT and frequency spectrum

clear all
clc

N = 16; % specify the length of the DFT


j = sqrt(-1);

xn = zeros (1,N); % initialize input sequence as zeros


5. 59 Digital Signal Processing
xn(1) = 1/3; %let given sequence be first three samples
xn(2) = 1/3;
xn(3) = 1/3;
Xk = zeros (1,N); %initialize output sequence as zeros

for k = 0:1:N-1 % compute DFT


for n = 0:1:N-1
Xk(k+1) = Xk(k+1)+xn(n+1)*exp(-j*2*pi*k*n/N);
end
end

disp (‘The DFT sequence is,’); Xk


disp (‘The Magnitude sequence is,’);MagXk = abs(Xk)
disp (‘The Phase sequence is,’);PhaXk = angle(Xk)

Wk=0:1:N-1; %specify a discrete frequency vector

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

The Magnitude sequence is,


MagXk =
Columns 1 through 12
1.0000 0.9493 0.8047 0.5885 0.3333 0.0782 0.1381 0.2826
0.3333 0.2826 0.1381 0.0782
Columns 13 through 16
0.3333 0.5885 0.8047 0.9493

The Phase sequence is,


PhaXk =
Columns 1 through 12
0 -0.3927 -0.7854 -1.1781 -1.5708 -1.9635 0.7854 0.3927
0.0000 -0.3927 -0.7854 1.9635
Columns 13 through 16
1.5708 1.1781 0.7854 0.3927
Note : Verify the above results with example 4.6 and example 5.1.
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 60

F ig P 5 .2 : M a g n itud e an d ph a se sp e ctru m o f pro g ra m 5 .2.


The magnitude and phase spectrum of program 5.2 are shown in fig P5.2.

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.

% program to find DFT and frequency 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

for k = 0:1:N-1 % compute DFT


for n = 0:1:N-1
Xk(k+1) = Xk(k+1)+xn(n+1)*exp(-j*2*pi*k*n/N);
end
end

disp (‘The DFT sequence is,’); Xk


disp (‘The Magnitude sequence is,’);MagXk = abs(Xk)
disp (‘The Phase sequence is,’);PhaXk = angle(Xk)

Wk=0:1:N-1; % specify a discrete frequency vector


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 =
12.0000 1.0000 + 0.4142i -0.0000 - 0.0000i 1.0000 + 2.4142i
0 - 0.0000i 1.0000 - 2.4142i -0.0000 - 0.0000i 1.0000 - 0.4142i
5. 61 Digital Signal Processing
The Magnitude sequence is,
MagXk =
12.0000 1.0824 0.0000 2.6131 0.0000 2.6131 0.0000 1.0824

The Phase sequence is,


PhaXk =
0 0.3927 -2.3201 1.1781 -1.5708 -1.1781 -2.9644 -0.3927

Note : Verify the above results with example 5.5.

F ig P 5 .3 : M a g n itud e an d ph a se sp e ctru m o f pro g ra m 5 .3.


The magnitude and phase spectrum of program 5.3 are shown in fig P5.3.

Program 5.4
Write a MATLAB program to perform inverse DFT. Take the frequency domain output
sequence of program 5.3 as input.

% program to compute N-point inverse DFT

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

for n= 0:1:N-1 % compute inverse DFT


for k = 0:1:N-1
xn(n+1) = xn(n+1)+(Xk(k+1)*exp(j*2*pi*n*k/N))/N;
end
end
disp(‘The inverse DFT sequence is,’ ); xn
OUTPUT
The inverse DFT sequence is,
xn =
2.0000 + 0.0000i 1.0000 + 0.0000i 2.0000 - 0.0000i 1.0000 + 0.0000i
1.0000 + 0.0000i 2.0000 – 0.0000i 1.0000 + 0.0000i 2.0000 – 0.0000i
Chapter 5- Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 62
Program 5.5
Write a MATLAB program to perform 4-point DFT of the discrete time sequence
x(n)={1,1,2,3} using function FFT and sketch the magnitude and phase spectrum.
Also perform inverse DFT on the frequency domain sequence using function IFFT,
to extract the time domain sequence.

% program to demonstrate DFT and inverse DFT Computation using FFT

clear all
clc

N = 4; % specify the value of N


xn = [1,1,2,3]; % input Sequence

disp(‘DFT of the sequence xn is, ‘)


Xk = fft(xn,N) % compute N-point DFT of input

disp(‘The magnitude sequence is, ‘)


MagXk = abs(Xk) % compute magnitude spectrum

disp(‘The phase sequence is, ‘)


PhaXk = angle(Xk) % compute phase spectrum

disp(‘inverse DFT of the sequence Xk is, ‘)


Xn = ifft(Xk) % compute inverse DFT

n = 0:1:N-1; % declare a discrete time vector


Wk = 0:1:N-1; % declare a discrete frequency vector

subplot(2,2,1) % Plot the input sequence


stem(n,xn)
title(‘ Input sequence’)
xlabel(‘n’); ylabel(‘xn’)

subplot(2,2,2)
stem(n,Xn)
title(‘inverse DFT sequence’) % Plot the inverse DFT sequence
xlabel(‘n’); ylabel(‘Xn’)

subplot(2,2,3) % Plot the magnitude spectrum


stem(Wk,MagXk)
title(‘Magnitude spectrum’)
xlabel(‘k’); ylabel(‘MagXk’)

subplot(2,2,4) % Plot the frequency spectrum


stem(Wk,PhaXk)
title(‘Phase spectrum’)
xlabel(‘k’); ylabel(‘PhaXk’)

OUTPUT

DFT of the sequence xn is,


Xk =
7.0000 -1.0000 + 2.0000i -1.0000 -1.0000 - 2.0000i

The magnitude sequence is,


MagXk =
7.0000 2.2361 1.0000 2.2361
5. 63 Digital Signal Processing
The phase sequence is,
PhaXk =
0 2.0344 3.1416 -2.0344

inverse DFT of the sequence Xk is,


Xn =
1 1 2 3
The input sequence, inverse DFT
sequence, magnitude spectrum, and phase
spectrum of program 5.5 are shown in fig
P5.5.

F ig P 5 .5 : Iup u t seq ue n ce, M a g n itu d e sp ectru m


an d p h a se sp e ctru m o f p ro g ra m 5 .5 .

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

III. Choose the right answer for the following questions


1. In N-point DFT of L-point sequence, the value of N to avoid aliasing in frequency spectrum is,
a) N „ L b) N £ L
c) N ‡ L d) N = L

2. The inverse DFT of x(n) can be expressed as,


N j2 pkn N -1 j2 pkn
1 -
N
1 N
a) x(n) = X(k) e b) x(n) = X(k) e
N k=0
N k=0

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

3. If DFT {x(n)} = X(k), then DFT {x(n + m)N }


- j2 pkm - j2 pk
N mN
a) X(k) e b) X(k) e
j2 pkm j2 pk

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,

a) X(k)Y*(k) b) X(k) * Y(k)

c) X(k) * Y*(k) d) X(k) Y(k)

6. The N-point DFT of a finite duration sequence can be obtained as,

a) X(k) = X(z) j2p n


b) X(k) = X(z) j2 p k
z=e N z=e N

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

8. The complex valued phase factor/twiddle factor, WN can be represented as,


j2 p
-
a) e - j2 pN b) e N

c) e - j2 p d) e - j2 pkN

9. The phase factors are multiplied before the add and subtract operations in,

a) DIT radix-2 FFT b) DIF radix-2 FFT

c) inverse DFT d) both a and c

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?

V. Solve the Following Problems

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

F ig E 5.3 .1 : M a g n itu d e spe c trum . F ig E 5.3 .2 : P h ase spe c tru m .


Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) 5. 68

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

E5.6 X(k) = l14, j1.414, 0, j1.414, - 6, - j1.414, 0, - j1.414q


= l14, 1.414 — 0.5p, 0, 1.414 — 0.5p, 6—p , 1.414 — - 0.5p, 0, 1.414 — - 0.5pq
X(k) = l14, 1.414, 0, 1.414, 6, 1.414, 0, 1.414q
— X(k) = l0, 0.5p, 0, 0.5p, p, - 0.5p, 0, - 0.5pq

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

Case (i) : 4-point DFT, (\ N = 4)


3 2 πkn 3 π π 3π
−j − j kn −j k −j k
X(k) = ∑ x(n) e 4 = ∑ x(n) e 2 = x(0)e0 + x(1) e 2 + x(2)e − jπk + x(3) e 2

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

k − j sin

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

− 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

− j sin

+ cos 3π − j sin 3π + cos

− 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

− 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

− 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

− j sin

+ cos

− j sin

+ cos

− 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

− j sin

+ cos

− j sin

+ 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

− j sin

+ cos 3π − j sin 3π + cos

− 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

− j sin

+ cos

− j sin

+ 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 .

E5.3. Compute DFT of the sequence, x(n) = 1, 3, 3, 3 . l q


Sketch the magnitude and phase spectrum.
Solution
l
x(n) = 1, 3, 3, 3 q
A
By definition, the 4-point DFT is,
3 2 πkn 2 πk 4 πk 6 πk
−j −j −j −j
X(k) = ∑ x(n)e
n=0
4 = x(0) + x(1) e 4 + x(2) e 4 + x(3) e 4

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)

When k = 0 ; X 3 (0) = X1(0) × X 2 (0) = −2 × −4 = 8


When k = 1 ; X 3 (1) = X1(1) × X 2 (1) = (1 − j3 ) × 2 = 2 − j6
When k = 2 ; X 3 (2) = X1(2) × X 2 (2) = −4 × 4 = − 16
When k = 3 ; X 2 (3) = X1(3) × X 2 (3) = (1 + j3) × 2 = 2 + j6
Solution for Exercise Problems E5. 5
By convolution theorem of DFT,

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,

N−1 2 πnk 2 πnk


1 j 1 3 j
x3 (n) =
Nk = 0 ∑
X 3 (k) e N =
4k =0∑X 3 (k) e 4 ; n = 0, 1, 2, 3

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

Given that, x(n) = {1, 0.2, –1}


h(n) = {1, –1, 0.2}
The given sequences are 3-point sequences.
Therefore the length of output sequence of linear convolution will be 3 + 3 – 1 = 5.
Hence convert x(n) and h(n) to 5-point sequences by appending zero.
\ x(n) = {1, 0.2, –1, 0, 0}
h(n) = {1, –1, 0.2, 0, 0}
By definition, the 5-point DFT of x(n) is,

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.

When, k = 0 ; Y(0) = X(0) H(0) = [0.2 + j0] × [0.2 + j0] = 0.04 + j0


When, k = 1 ; Y(1) = X(1) H(1) = [1.871+ j0.398] × [0.529 + j0.834] = 0.658 + j1.771
When, k = 2 ; Y(2) = X(2) H(2) = [0.529 − j1. 069] × [1.871 + j0.778] = 1.821 − j1. 589
When, k = 3 ; Y(3) = X(3) H(3) = [0.529 + j1.069] × [1.871 − j0.778] = 1.821 + j1.589
When, k = 4 ; Y(4) = X(4) H(4) = [1.871 − j0.398] × [0.529 − j0.834] = 0.658 − j1. 771
l
∴ Y(k ) = 0.04 + j0, 0.658 + j1.771, 1.821 − j1. 589, 1.821+ j1.589, 0.658 − j1.771 q
By convolution property of DFT,

DFT {x(n) * h(n)} = X(k) H(k)

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

+ b0.364 + j0.318g bcos0 + jsin0g + b0.132 − j0.354g bcos 0 + jsin0g

= 0.504 + j0.036 + 0.496 − j 0.036


=1

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

= −0.395 + j0.706 + 0.403 − j0.706


= −0.798 ≈ −0.8

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

= −0.476 − j0.624 + 0.505 + j0.653


= −0.981+ j0.029 ≈ −1

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

= 0.524 − j0.116 + 0.516 − j0.116


= 1.04

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

= −0.096 + j0.027 + 0.104 − j0.027


= −0.2
l
∴ y(n) = x(n) ∗ h(n) = 1, − 0.8, − 1, 1.04, − 0.2 q
Circular Convolution

Given that, x(n) = {1, 0.2, –1}


The 3-point DFT of x(n) is,
3 −1 2 πnk 2 2 πnk
−j −j
X(k ) = ∑ x(n) e 3 = ∑ x(n) e 3 ; k = 0, 1, 2
n= 0 n= 0
2 πk 4 πk
−j −j
= x(0) e0 + x(1)e 3 + x(2)e 3

= 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}

The 3-point DFT of h(n) is,

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

When k = 0 ; H(0) = 1 − cos 0 − j sin 0 + 0.2 cos 0 − j 0.2 sin 0 = 0.2


2π 2π 4π 4π
When k = 1 ; H(1) = 1 − cos + j sin + 0.2 cos − j 0.2 sin = 1.4 + j1.039
3 3 3 3
4π 4π 8π 8π
When k = 2 ; H(2) = 1 − cos + j sin + 0.2 cos − j 0.2 sin = 1.4 − j1.039
3 3 3 3
l
∴ H(k) = 0.2, 1.4 + j1.039, 1.4 − j1.039 q
Let, Y(k) = X(k) H(k)

When, k = 0 ; Y(0) = X(0) H(0) = 0.2 × 0.2 = 0.04


When, k = 1 ; Y(1) = X(1) H(1) = 1.4 − j1.039 × 1.4 + j1.039 = 3.04
When, k = 2 ; Y(2) = X(2) H(2) = 1.4 + j1.039 × 1.4 − j1.039 = 3.04

By convolution property of DFT,

DFT {x(n) * h(n)} = X(k) H(k)

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

When n = 0 ; y(0) = 0.013 + 1.013 cos 0 + j1013


. sin 0 + 1013
. cos 0 + j sin 0 = 2.039 ≈ 2.04
2π 2π 4π 4π
When n = 1 ; y(1) = 0.013 + 1.013 cos + j1013
. sin + 1.013 cos + j1013
. sin = −1
3 3 3 3
4π 4π 8π 8π
When n = 2 ; y(2) = 0.013 + 1.013 cos + j1013
. sin + 1.013 cos + j1013
. sin = −1
3 3 3 3
∴ y(n) = x(n) ∗ h(n) = 2.04, − 1, − 1 l q
Solution for Exercise Problems E5. 9
E5.6. 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.


Solution
I. The 8-point DFT by radix-2 DIT FFT

The given sequence is first arranged in the bit reversed order.


Normal order Bit reversed order
x(0) = 1 x(0) = 1
x(1) = 2 x(4) = 1
x(2) = 1 x(2) = 1
x(3) = 2 x(6) = 1
x(4) = 1 x(1) = 2
x(5) = 3 x(5) = 3
x(6) = 1 x(3) = 2
x(7) = 3 x(7) = 3

First stage computation

Input = { 1, 1, 1, 1, 2, 3, 2, 3 }

x (0) = 1 1+1=2 x (1) = 2 2+3=5

x (4) = 1 1 −1 = 0 x (5) = 3 2 − 3 = −1

x (2) = 1 1+1=2 x (3) = 2 2+3=5

x (6) = 1 1 −1 = 0 x (7) = 3 2 − 3 = −1

Output of first stage computation = { 2, 0, 2, 0, 5, –1, 5, –1}.

Second stage computation

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

Output of second stage computation = {4, 0, 0, 0, 10, –1 + j, 0, –1 – j }


E5. 10 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
Third stage computation

Input = {4, 0, 0, 0, 10, –1 + j, 0, –1 – j }

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)

U|V = l14, j1.414, 0, j1.414, − 6, − j1.414, 0, − j1.414q


Output of third stage
computation |W
∴ X(k) = DFT lx(n)q = l14, j1.414, 0, j1.414, − 6, − j1. 414, 0, − j1. 414q

II. 8-point DFT by radix-2 DIF-FFT

First stage computation

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

Output of first stage computation = {2, 5, 2, 5, 0, –0.707 + j0.707, 0, 0.707 + j0.707 }


Solution for Exercise Problems E5. 11
Second stage computation
W40 = 1
Input sequence = {2, 5, 2, 5, 0, –0.707 + j0.707, 0, 0.707 + j0.707 }
W41 = − j
1 1 1 1
2 2 + 2 =4 0 0+0=0
1 1

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

Output of second stage computation = { 4, 10, 0, 0, 0, j1.414, 0, j1.414 }.


Third stage computation

Input sequence = {4, 10, 0, 0, 0, j1.414, 0, j1.414 }.

4 4 + 10 = 14 = X (0) 0 0 + j1.414 = j1.414 = X (1 )

10 4 − 10 = −6 = X (4) j1.414 0 − j1.414 = −j1.414 = X (5)

0 0 + 0 = 0 = X (2) 0 0 + j1.414 = j1.414 = X (3 )

0 0 − 0 = 0 = X (6) j1.414 0 − j1.414 = −j1.414 = X (7)

\ X(k) = { 14, j1.414, 0, j1.414, –6, –j1.414, 0, –j1.414 }.

Magnitude and Phase Spectrum


X(k ) l
= 14, j1.414, 0, j1.414, − 6, − j1.414, 0, − j1. 414 q
= n14, 1.414∠90o , 0, 1.414 ∠90o , 6 ∠180o , 1.414 ∠ − 90o , 0, 1.414 ∠ − 90o s
= 14, 1.414 ∠0.5π, 0, 1.414 ∠0.5π, 6 ∠π, 1.414 ∠ − 0.5π, 0, 1.414 ∠ − 0.5π
l
X(k) = 14, 1.414, 0, 1.414, 6, 1.414, 0, 1.414 q
∠X(k ) = l0, 0.5π, 0, 0.5π, π, − 0.5π, 0, − 0.5π q
X (k ) ∠X (k)
π
14 π

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π

F ig 1 : M a g n itu d e sp e c trum . −π F ig 2 : P h ase spe c trum .

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)

1−1=0 x(0) = 1 x(0) = 1


x(2)=1
x(1) = 2 x(2) = 1
x(1)=2 2+0=2 x(2) = 1 x(1) = 2
x(3) = 0 x(3) = 0

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

Output sequence ={4, –j2, 0, j2 }


\ X(k) = DFT{x(n)} = {4, –j2, 0, j2}
Step - 2 : Determine H(k)
First Stage

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

3 3+0= 3 h(2) = 0 h(1) = 3


h(3) = 0 h(3) = 0

0 3 −0 = 3

Output sequence ={1, 1, 3, 3}


Second Stage
1 1
1 1+3=4
1 W40 = 1
1 1 W41 = − j
1 1 + 3( −j) = 1 − j3
1
1
1 −1
3 1 − 3 = −2

1
−j
3 1 − 3( −j) = 1 + j3
−1

\ H(k) = DFT {h(n)} = {4, 1-j3, - 2, 1 + j3}


Solution for Exercise Problems E5. 13
Step - 3 : Determine Y(k)

Y(k) = X(k) H(k) = Y(k)

When k = 0 ; Y(0) = X(0) H(0) = 4 ´ 4 = 16

When k = 1 ; Y(1) = X(1) H(1) = –j2 ´ (1 – j3) = –6 – j2

When k = 2 ; Y(2) = X(2) H(2) = 0 ´ (–2) = 0

When k = 3 ; Y(3) = X(3) H(3) = j2 ´ (1 + j3) = –6 + j2

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

Output sequence ={16, 16, -12, –j4} 1 ∗


dW i = j
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

Output = {4, 20, 28, 12}

On dividing each sample of output sequence by 4 we get y(n),

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)

Given that, x(n) = 4, 4, 0, 2 l q


A
The 4-point DFT of x(n) is,
4−1 2 πnk 3 πnk
−j −j
X(k ) = ∑ x(n) e 4 = ∑ x(n) e 2 ; for k = 0, 1, 2, 3
n=0 n=0

π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

Magnitude spectrum, X(k) = l10, 4.472, 2, 4.472q

Phase spectrum, ∠ X(k) = l0, − 0.15 π, π, 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 .

II. Inverse DFT of X(k)


We know that,

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

F π × 0 + j sin π × 0 IJ − 0.5 cos π × 0 + b1+ j0.5g FG cos 3π × 0 + j sin 3π × 0 IJ = 4


When n = 0 ; x(0) = 2.5 + b1 − j0.5g G cos
H 2 2 K H 2 2 K
F π × 1 + j sin π × 1IJ − 0.5 cos π × 1 + b1+ j0.5g FG cos 3π × 1 + j sin 3π × 1IJ = 4
When n = 1 ; x(1) = 2.5 + b1 − j0.5g G cos
H 2 2 K H 2 2 K
F π × 2 + j sin π × 2 IJ − 0.5 cos π × 2 + b1+ j 0.5g FG cos 3π × 2 + j sin 3π × 2 IJ = 0
When n = 2 ; x(2) = 2.5 + b1 − j 0.5g G cos
H 2 2 K H 2 2 K
F π × 3 + j sin π × 3 IJ − 0.5 cos π × 3 + b1+ j 0.5g FG cos 3π × 3 + j sin 3π × 3 IJ = 2
When n = 3 ; x(3) = 2.5 + b1 − j 0.5g G cos
H 2 2 K H 2 2 K
∴ x(n) = l4, 4, 0, 2q
Solution for Exercise Problems E5. 15
E5. 9. Determine the response of LTI system when the input sequence x(n) = {–2, –1, –1, 0, 2} by radix-2 DIT FFT. The
impulse response of the system is h(n) = {1, –1, –1, 1}.
Solution
Response or Output, y(n) = x(n) * h(n)

Here, Length of x(n) = 5, and h(n) = 4.

\ Length of y(n) = 5 + 4 –1 = 8

Let us convert x(n) and h(n) to 8-point sequences by appending zeros.

\ x(n) = {–2, –1, –1, 0, 2, 0, 0, 0}

h(n) = {1, –1, –1, 1, 0, 0, 0, 0}

Let, DFT {x(n)} = X(k) ; DFT {h(n)} = H(k) ; DFT {y(n)} = Y(k) and Y(k) = X(k) H(k)

Now, y(n) = DFT–1{ Y(k) } = DFT–1{ X(k) H(k)}


Step - 1 : Find X(k)
First Stage

Input = {–2, 2, –1, 0, –1, 0, 0, 0} x(n) x(n)


(Normal) (Bit reversed)
x (0) = −2 −2 + 2 = 0 x (1) = −1 −1 + 0 = −1 x(0) = – 2 x(0) = –2

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 (2) = −1 −1 + 0 = −1 x (3) = 0 0+0=0 x(3) = 0 x(6) = 0

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

Output = {0, –4, –1, –1, –1, –1, 0, 0} x(7) = 0 x(7) = 0


Second Stage

Input = {0, –4, –1, –1, –1, –1, 0, 0}


1 1 W40 = 1
0 0 + ( −1) = −1
1
W41 = − j
1 1
−4 −4 + ( −1)( −j) = −4 + j
1
1
1 −1
−1 0 − (−1) = 1

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

Output = {–1, –4 + j, 1, –4 – j, –1, –1, –1, –1}


E5. 16 DSP, Chapter 5 - Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT)
Third Stage

Input = {–1, –4 + j, 1, –4 – j, –1, –1, –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

Input = {1, 0, –1, 0, –1, 0, 1, 0}


x(n) x(n)
(Normal) (Bit reversed)
h(0) = 1 1+0=1 h(1) = −1 −1 + 0 = −1
h(0) = 1 h(0) = 1
h(1) = –1 h(4) = 0
h(4) = 0 1 −0 = 1 h(5) = 0 −1 − 0 = −1
h(2) = –1 h(2) = –1

h(2) = −1 −1 + 0 = −1 h(3) = 1 1+0=1 h(3) = 1 h(6) = 0


h(4) = 0 h(1) = –1

h(6) = 0 −1 − 0 = −1 h(7) = 0 1 −0 = 1 h(5) = 0 h(5) = 0


h(6) = 0 h(3) = 1
h(7) = 0 h(7) = 0

Output = {1, 1, –1, –1, –1, –1, 1, 1}


Second Stage W40 = 1
Input = {1, 1, –1, –1, –1, –1, 1, 1} W41 = − j

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

Output = {0, 1+j, 2, 1–j, 0, –1–j, –2, –1+ j}


Solution for Exercise Problems E5. 17
Third Stage
Input = {0, 1+j, 2, 1–j, 0, –1–j, –2, –1+ j}
1 1
0 0 + 0 = 0 = H(0)

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 )

\ H(k) = {0, –0.414 + j, 2 + j2, 2.414 – j, 0, 2.414 + j, 2 – j2, –0.414 – j}


Step - 3 : To find the product X(k) H(k)
Let, Y(k) = X(k) H(k)
When k = 0 ; Y(0) = X(0) H(0) = –2 ´ 0 = 0
When k = 1 ; Y(1) = X(1) H(1) = (–4.707 + j1.707) ´ (–0.414 + j) = 0.242 –j5.414
When k = 2 ; Y(2) = X(2) H(2) = (1 + j) ´ (2 + j2) = j4
When k = 3 ; Y(3) = X(3) H(3) = (–3.293 – j0.293) ´ (2.414 –j) = –8.242 + j2.586
When k = 4 ; Y(4) = X(4) H(4) = 0 ´ 0 = 0
When k = 5 ; Y(5) = X(5) H(5) = (–3.293 + j0.293) ´ (2.414 +j) = –8.242 –j2.586
When k = 6 ; Y(6) = X(6) H(6) = (1 – j) ´ (2 –j2) = –j4
When k = 7 ; Y(7) = X(7) H(7) = (–4.707 – j1.707) ´ (–0.414–j) = 0.242 + j5.414
\ Y(k) = { 0, 0.242 – j5.414, j4, –8.242 + j2.586, 0, –8.242 –j2.586, –j4, 0.242 + j5.414}
Step - 4 : To determine inverse DFT of Y(k)
First stage computation

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

Y(3) = −8.242 + j2.586 (−8.242 + j2.586) + (0.242 + j5.414) = −8 + j8

Y(7) = 0.242 + j5.414 (−8.242 + j2.586) − (0.242 + j5.414) = −8.484 − j2.828

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

i) Choose an ideal (desired) frequency response, Hd(ejw ).


ii) Take inverse Fourier transform of Hd(ejw ) to get hd(n) or sample Hd(ejw ) at finite number of
points (N-point) to get H ( k ) .
Chapter 6 - FIR Filters 6. 2
iii) If hd(n) is determined then convert the infinite duration hd(n) to a finite duration h(n),
[usually h(n) is an N-point sequence] or if H ( k ) is determined then take N-point inverse
DFT to get h(n).
iv) Take Z-transform of h(n) to get H(z), where H(z) is the transfer function of the digital filter.
v) Choose a suitable structure and realize the filter.
vi) Verify the design. In order to verify the design, determine the actual frequency response, H(ejw )
of the filter, by letting z = ejw in H(z) and sketch the magnitude response, |H(ejw )|.
Advantages of FIR Filters
1. FIR filters with exactly linear phase can be easily designed.
2. Efficient realizations of FIR filter exist as both recursive and nonrecursive structures.
3. FIR filters realized nonrecursively, i.e., by direct convolution are always stable.
4. Roundoff noise, which is inherent in realizations with finite precision arithmetic can easily
be made small for nonrecursive realization of FIR filters.
Disadvantages of FIR Filters
1. The duration of the impulse response should be large (i.e., N should be large) to adequately
approximate sharp cutoff filter. Hence a large amount of processing is required to realize
such filters when realized via slow convolution.
2. The delay of linear phase FIR filters need not always be an integer number of samples. This
non-integral delay can lead to problems in some signal processing applications.
6.2 LTI System as Frequency Selective Filters
Let us consider a discrete time signal x(n) with frequency content in a band of frequencies w 1 < w < w 2 .
Let, X(ejw ) be Fourier transform of x(n). Now, X(ejw ) will be a bandlimited signal that is,
X(ejw ) ¹ 0 ; w 1 £ w £ w2
= 0 ; w < w1 and w > w 2.
Let, this signal is passed through an LTI system with frequency response,

H ( e jω ) = C e − jαω ; ω1 ≤ ω ≤ ω 2
.....(6.1)
= 0 ; otherwise

where, C and a are positive constants.


Let, h(n) be impulse response of the LTI system, which is obtained by inverse Fourier transform of
H(ejw ). Now, the response, y(n) of LTI system is given by,
y(n) = x(n) * h(n)
On taking Fourier transform of above equation we get,
Y(ejw ) = F{x(n) * h(n)} Y(ejw ) = F{y(n)}

\ Y(ejw ) = X(ejw ) H(ejw ) Using convolution property of


Fourier transform.
= X(ejw ) C e-ja w
Using equation (6.1).
= C X(ejw ) e-ja w
6. 3 Digital Signal Processing
On taking inverse Fourier transform of above equation we get,

y(n) = C F–1{X(ejw )e-jaw } Using shifting property of Fourier transform.


If F{x(n)} = X(ejw ), then F{x(n –a)} = X(ejw ) e–jaw
\ y(n) = C x(n - a) .....(6.2)

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.

The frequency response, H(ejw ) is a complex quantity, hence we can write,

H ( e jω ) = H(e jω ) ∠H( e jω ) = C e − jαω .....(6.3)

where, | H(ejw )| = C Magnitude

ÐH(ejw ) = -aw Phase

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.

Let, ÐH(ejw ) = q(w)

θ( ω )
Phase delay, τ p = − .....(6.4)
ω

d
Group delay, τ g = − θ( ω ) .....(6.5)

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.


|H d (e jω)| |H d (e )|

C C

−ωC2 −ωC1 +ωC1 +ωC2 −π −ωC2 −ωC1 +ωC1 +ωC2 +π ω


−π 0 ω +π 0
F ig 6.3 : M a g n itu de respo n se o f ide a l F ig 6.4 : M a g n itu de respo n se o f ide a l
b a nd p a ss filte r. b a nd sto p filte r.
The ideal filters are noncausal and hence physically unrealizable for the real time signal processing
applications. Causality implies that the frequency response characteristic H(ejw ) of the filter cannot be zero,
except at a finite set of points in frequency. In addition H(ejw ) cannot have an infinitely sharp cutoff from
passband to stopband, that is H(ejw ) cannot drop from unity to zero abruptly.

In practice it is not necessary to insist that the magnitude H ( e ) be constant in the entire passband
of the filters. A small amount of ripple in the passband is usually tolerable. Similarly it is not necessary for the

filter response H ( e ) to be zero in the stopband. A small amount of ripple in the stopband is also tolerable.
The transition of the frequency response from passband to stopband defines the transition band or
transition region of the filter. The passband edge frequency w p defines the edge of the passband, while the
stopband edge frequency w s denotes the beginning of the stopband.

|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

F ig 6 .5 : M a g n itu d e resp o nse of a p ra ctic al lo w p a ss filter.


Chapter 6 - FIR Filters 6. 6

6.4 Characteristics of FIR Filters With Linear Phase


Let h(n) be a causal finite duration sequence defined over the interval 0 £ n £ N – 1 and the samples
of h(n) be real.
The Fourier transform of h(n) is,
N−1
H (e jω ) = ∑ h( n) e− jωn .....(6.10)
n=0
which is periodic in frequency with period 2p.
\ H(ejw ) = H (ejw + 2pm) ; for m = 0, ±1, ±2, ..... .....(6.11)
With the restriction that h(n) is real, additional constraints of H(ejw ) are obtained as shown below.
Since H(ejw ) is complex it can be expressed as amplitude function, magnitude function and phase
function as shown in equation (6.12).
jω )
H ( e j ω ) = ± H ( e j ω ) e j∠H ( e = A ( ω ) e jθ ( ω ) .....(6.12)
where, A(ω ) = ± H (e jω ) = Amplitude function

θ( ω ) = ∠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

From equation (6.12) and (6.13) we get,


H ( e jω ) = ± H (e jω ) e − jαω .....(6.15)
On equating equations (6.14) and (6.15) we get,
N−1

∑= h( n) e− jωn = ± H (e jω ) e − jαω e − jθ = cos θ − j sin θ


n 0
N−1

∑= h( n) cos ωn − jsin ωn = ± H (e jω ) cos αω − jsin αω


n 0
6. 7 Digital Signal Processing
On equating the real part and imaginary part of the above equation we get,
N−1
± | H(e jω )| cos αω = ∑ h( n) cos ωn .....(6.16)
n=0
N−1
±|H(e jω )| sin αω = ∑ h( n) sin ωn .....(6.17)
n=0

On dividing equation (6.17) by equation (6.16) we get,


N−1

sin αω
∑ h( n) sin ωn
n=0
= N−1
cos αω
∑ h( n) cos ωn
n=0

On cross multiplying the above equation we get,


N−1 N−1
sin αω ∑ h( n) cos ωn = cos αω ∑ h( n) sin ωn
n=0 n= 0
N−1 N−1

∑ h( n) sin αω cos ωn = ∑ h( n) cos αω sin ωn


n=0 n= 0
N−1

∑ h( n) sin αω cos ωn − cos αω sin ωn = 0 sin(A – B) = sin A cos B – cosA sinB


n=0
N−1
.....(6.18)
∑ h( n) sin (α − n) ω = 0
n=0

One solution of equation (6.18) exists when,


N −1
α = and h(n) = h(N − 1 − n) ; for 0 ≤ n ≤ N − 1 .....(6.19)
2
Proof :

h( n) sin (α − n)ω = h( n) sin e jω


N –1
2
−n
α= N−1
2

= 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ωn–n
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

F ig 6.8 : E xa m p le of a n tisym m etry im p u lse F ig 6.9 : E xa m p le of a n tisym m etry im p u lse


resp o n se for o d d N . response for even N .
6.5 Frequency Response of Linear Phase FIR Filters
Depending on the value of N (odd or even) and the type of symmetry of the filter impulse response
sequence (symmetric or antisymmetric) there are six possible types of linear phase FIR filters.
The following are the six cases of impulse response for linear phase FIR filters.
Case (i) : Symmetric impulse response and N is odd with centre of symmetry at (N – 1)/2.
Case (ii) : Symmetric impulse response and N is even with centre of symmetry at (N – 1)/2.
Case (iii) : Antisymmetric impulse response and N is odd with centre of antisymmetry at (N – 1)/2.
Case (iv) : Antisymmetric impulse response and N is even with centre of antisymmetry at (N – 1)/2.
Case (v) : Symmetric impulse response and N is odd with centre of symmetry at n = 0.
Case (vi) : Antisymmetric impulse response and N is odd with centre of antisymmetry at n = 0.
6. 9 Digital Signal Processing
The frequency response of the filter is the Fourier transform of the impulse response. If h(n) is impulse
response of FIR filter then fourier transform of h(n) is denoted as H(ejw ), which is the frequency response of
FIR filter. The H(ejw ) is a complex function of w and so it can be expressed as, magnitude function |H(ejw )| and
phase function Ð H(ejw ).
Case (i) : Frequency response of linear phase FIR filter when impulse response is symmetric and N is odd
with centre of symmetry at (N – 1)/2

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

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

Phase function, θ(ω ) = – ωd i = –ωα ; where, α =


N −1
2
N −1
2 .....(6.25)
N −1
2

Magnitude function, H(e ) = A(ω ) = h d i + ∑ 2 hd
N −1
2
N −1
2 i
− n cos ωn
.....(6.26)
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

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 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

Phase function, θ(ω ) = − ω e j=


N −1
2
– ωα ; where, α =
N −1
2 .....(6.30)
N
2
e j
Magnitude function, H e jω = A ω bg = ∑ 2 he N2 − nj coseωen − 12 jj .....(6.31)
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

F ig 6.1 2 : S y m m etric im p u lse resp o n se , N = 8 . F ig 6.1 3 : A m p litu de fu n ctio n o f H (e jω).


Chapter 6 - FIR Filters 6. 12
Proof:

The Fourier transform of h(n) is,

+∞ 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

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

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

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

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.

Centre of antisymmetry Centre of antisymmetry

N=9
N −1
α= =4
2

F ig 6 .1 4 : A n tisym m etric im p ulse respo n se, N = 9 . F ig 6 .1 5 : A m p litu d e fu n ctio n of H (e jω).


Chapter 6 - FIR Filters 6. 14
Proof:
The Fourier transform of h(n) is,
+∞
h(n) is defined for
N−1
jω − jωn n = 0 to N – 1
H(e ) = ∑ h(n) e = ∑ h(n) e − jωn

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)

n=0 m=0 When, n = N+1


2
; m = N − 1− e j=
N+1
2
N−3
2
N−3 N−3 When n = N – 1 ; m = N – 1 – (N – 1) = 0
2 2
− jωn − jω( N − 1 − n )
= ∑ h( n) e + ∑ h(N − 1 − n) e
n=0 n=0
Put, m = n
N −3 N−3
2 2
= ∑ h( n) e− jωn + ∑ b− h(n)g e− jω(N − 1 − n) For antisymmetric
impulse response,
n=0 n=0

LM N−3
2 F FG IJ

N−1

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

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

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
N–3
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
ω
N–1
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)

Let, H(ejw ) = A(w) ejq(w) .....(6.38)


where, A(w) = Amplitude function
q(w) = Phase function
On comparing equations (6.37) and (6.38) we get,
N
2
Amplitude function, A(ω ) = ∑ 2 he N2 − nj sinFH ωFGH n − 21 IJK IK .....(6.39)
n=1

π
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.

Centre of antisymmetry Centre of symmetry

N=8
α= N − 1 = 3 .5
2

F ig 6.1 6 : A n tisym m etric im p u lse jω


resp o n se , N = 8 . F ig 6.1 7 : A m p litu de fu n ctio n o f H (e ).
Chapter 6 - FIR Filters 6. 16
Proof:
The Fourier transform of h(n) is,
h(n) is defined only
+∞ N−1 for n = 0 to N – 1
H(e jω ) = ∑ h(n) e− jωn = ∑ h(n) e− jωn
n = −∞ n=0 The impulse response is antisymmetric
N
−1
with centre of antisymmetry
2 N−1
N−1 N
lies between n = and .
= ∑ h( n) e− jωn + ∑ h(n) e− jωn 2 2

n=0 N
n=
2 Let, m = N–1– n ; \ n = N –1–m
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 = N–1 ; 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

N−1

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

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

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 N–1 IJ
2
= M ∑ h( n) 2j sin ωe F N–1
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

Let, H(ejw ) = A(w) e jq(w) .....(6.43)


where, A(w) = Amplitude function
q(w) = Phase function
On comparing equations (6.42) and (6.43) we get,
N −1
2
Amplitude function, A(ω ) = h(0) + ∑ 2 h(n) cos ωn .....(6.44)
n=1

Phase function, θ(ω ) = 0 .....(6.45)


N −1
2

Magnitude function, H(e ) = A(ω ) = h(0) + ∑ 2 h(n) cos ωn .....(6.46)
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.

Centre of symmetry Centre of symmetry

N −1 = 4
2

F ig 6.1 8 : S y m m etric im p u lse resp o n se for N = 9 . F ig 6.1 9 : A m p litu d e fu n ctio n o f H (e jω).


Chapter 6 - FIR Filters 6. 18
Proof:
The Fourier transform of h(n) is,
+∞ +N − 1 h( n) is defined only
2
jω − jωn − jωn
H(e ) = ∑ h(n) e = ∑ h(n) e for n = − N 2− 1 to + N 2− 1 .
n = −∞ n= − N - 1
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

F ig 6 .2 0 : A n tisym m etric im p u lse F ig 6 .2 1 : A m p litu d e fu n ctio n of H (e jω) .


resp o n se , N = 9 .

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

ii Symmetric Even h(N – 1 – n) = h(n) ∑


n=1
2h e j coseωe jj
N
2
–n n–
1
2

N–1
2

iii Antisymmetric Odd h(N – 1 – n) = – h(n) ∑


n=1
2he N –1
2
–n j sin ωn
N
2

iv Antisymmetric Even h(N – 1 – n) = – h(n) ∑ 2 he N2 – nj sineωen – 21 jj


n =1

N −1
2

v Symmetric Odd h(– n) = h(n)


h( 0) + ∑ 2 h( n) cosωn
n =1

N −1
2

vi Antisymmetric Odd h(– n) = –h(n) ∑ 2 h( n) sin ωn


n =1

6.6 Design Techniques for Linear Phase FIR Filters


There are three well known method of design techniques for linear phase FIR filters.
1. Fourier series method and Window method.
2. Frequency sampling method.
3. Optimal filter design methods.
6. 21 Digital Signal Processing

Design of Linear Phase FIR Filters by Fourier Series Method


The following two concepts leads to the design of FIR filters by Fourier series method.
1. The frequency response of a digital filter is periodic with period equal to 2p.
2. Any periodic function can be expressed as a linear combination of complex exponentials.
In this method the desired frequency response, Hd(ejw ) can be converted to a Fourier series representation.
Then using this expression the Fourier coefficients are evaluated which is the desired impulse response of the
filter, hd(n). On taking Z-transform of hd(n) we get Hd(z) which is the transfer function of digital filter.
The Hd(z) obtained from hd(n) will be a transfer function of unrealizable noncausal digital filter of
infinite duration. A finite duration impulse response h(n) can be obtained by truncating the infinite duration
N −1 N −1
impulse response hd(n) to N-samples. The samples of hd(n) are selected for n = − 2 to + 2 . Now take
Z-transform of h(n) to get H(z) and then multiply H(z) by z - (N - 1) / 2 to get the transfer function of realizable
causal digital filter of finite duration.
The abrupt truncation of the Fourier series results in oscillations in the passband and stopband.
These oscillations are due to slow convergence of the Fourier series, particularly near the points of
discontinuity. This effect is known as the Gibbs phenomenon. It can be shown that the undesirable oscillations
can be reduced by multiplying the desired impulse response coefficients by an appropriate window function.
This leads to the method of FIR filter design using windows.
Design of Linear Phase FIR Filters Using Windows
In this method we begin with the desired frequency response specification Hd(ejw ) and determine the
corresponding unit sample response hd(n). The hd(n) is given by inverse Fourier transform of Hd(ejw ). The
unit sample response h d(n) will be an infinite sequence and must be truncated at some point say
at n = N – 1 to yield an FIR filter of length N. The truncation is obtained by multiplying hd(n) by a window
sequence w(n). [w(n) is also called window function]. The resultant sequence will be of length N and can be
denoted by h(n).
The Fourier transform of h(n) is the frequency response of the filter to be implemented in software or
in hardware. The frequency response of the filter is denoted by H(ejw ). The Z-transform of h(n) will give the
filter transfer function H(z). The frequency response of the filter H(ejw ) depends on the frequency response
of the window function.
The desirable characteristics of the frequency response of window function are the following.
1. The width of the main-lobe should be small and it should contain as much of the total energy as possible.
2. The side-lobes should decrease in energy rapidly as w tends to p.
There have been many windows proposed, that approximates the desired characteristics. In the
following sections, the Rectangular window, Hanning window, Hamming window, Blackman window and
Kaiser window are discussed.
Design of Linear Phase FIR Filters by Frequency Sampling Method
In frequency sampling method of filter design, we begin with the desired frequency response
specification Hd(ejw ) and it is sampled at N-points to generate a sequence H(k). The N-point inverse DFT of
the sequence H(k) gives the impulse response of the filter h(n). The Fourier transform of h(n) gives the
frequency response, H(ejw ) and Z-transform of h(n) gives the transfer function H(z) of the filter.
Design of Optimum Equiripple Linear-Phase FIR Filter
The FIR filter design by window and frequency sampling method does not have precise control over the
critical frequencies such as w p (passband edge frequency) and w s (stopband edge frequency). This drawback
can be overcome by using Chebyshev approximation technique. In this method, the weighed approximation
Chapter 6 - FIR Filters 6. 22
error between the desired frequency response and the actual frequency response is spread evenly across the
passband and evenly across the stopband of the filter. This results in the reduction of maximum error. The
resulting filter have ripples in both the passband and the stopband. This concept of design is called optimum
equiripple design criterion.
6.7 Fourier Series Method of FIR Filter Design
The frequency response of a digital filter is periodic, with period equal to 2p. From Fourier series
analysis, we know that any periodic function can be expressed as a linear combination of complex exponentials.
Therefore, the desired frequency response, Hd(ejw ) of an FIR digital filter can be represented by the Fourier
series as shown in equation (6.52).
+∞
e j ∑ h ( n) e
H d e jω =
n = −∞
d
− jωn
.....(6.52)

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

Type of filter Specifications Impulse response

π +ω c

Lowpass H d ( e jω
R|1 ; for
) = S0 ; for
– ωc ≤ ω ≤ + ωc
−π ≤ ω < – ωc
h d ( n) =
1
2π z
−π

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

ω 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ω

Digital Signal Processing


−π −π − ω c1 ω c2
H d ( e jω ω c2 ≤ ω ≤ π
||0 ; for – ω c2 < ω < – ω c1 Q H d ( e jω ) = 0 in the range − ω c 2 < ω < −ω c1 and + ω c1 < ω < +ω c 2
||0 ; for
T ω c1 < ω < ω c2
Chapter 6 - FIR Filters 6. 24
The specifications of lowpass, highpass, bandpass and bandstop filters and their desired impulse
response for FIR filter design by Fourier series method are listed in table 6.3.
Procedure for digital FIR filter design by Fourier series method
1. The specifications of digital FIR filter are,
i) The desired frequency response, Hd(ejw ).
ii) The cutoff frequency w c for lowpass and highpass, and w c1 & w c2 for bandpass and bandstop
filters.
Note: If analog filter cutoff frequency Fc and sampling frequency Fs are specified, then calculate
the cutoff frequency of digital filter wc using the equation,
2πFc
ωc = .
Fs
iii) The number of samples of impulse response, N.
2. Determine the desired impulse response, hd(n) by taking inverse Fourier transform of the desired
frequency response, Hd(ejw ).
π
hd ( n) =
1
z
2π − π
e j
H d e jω e jωn dω

(For limits of integration in the above equation, refer table 6.3)


3. Calculate N samples of hd(n) for n = –(N – 1)/2 to +(N – 1)/2 and form the impulse response, h(n)
of FIR filter.

∴ Impulse response, h(n) = h d ( n)


N −1 N −1
n= − to +
2 2

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ω

2. Calculate frequency response for various values of w in the range 0 to p.


3. Calculate the magnitude response, |H(ejw )| and sketch the magnitude response to verify the design.

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

The desired frequency response Hd(ejw ) of lowpass filter is,

Hd (e jω ) = 1 ; for – ω c ≤ ω ≤ + ω c
= 0 ; for – π ≤ ω < − ω c and ωc < ω ≤ π

The desired impulse response hd(n) of the lowpass filter is,


+π +ω 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

ω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

When n = −1 ; h(−1) = h(1) = 0.3183


Using symmetry
When n = −2 ; h( −2) = h(2) = 0 condition, h(–n) = h(n).
When n = −3 ; h( −3) = h(3) = −0.1061
When n = −4 ; h( −4) = h(4) = 0
When n = −5 ; h( −5) = h(5) = 0.0637

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

+ h(3) z−3 + h(4) z −4 + h(5) z−5 ]


= z−5 [h(5) z5 + h(4) z4 + h(3) z3 + h(2) z2 + h(1) z + h(0) Using symmetry
condition, h(–n) = h(n).
+ h(1)z−1 + h(2) z−2 + h(3) z−3 + h(4) z−4 + h(5) z −5 ]

= 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

= h(0) z−5 + h(1) z −4 + z −6 + h(2) z −3 + z−7 + h(3) z −2 + z −8 + h(4) z −1 + z −9 + h(5) z0 + z −10

= 0.5 z−5 + 0.3183 z −4 + z −6 − 0.1061 z−2 + z −8 + 0.0637 1 + z−10 h(2) = 0


h(4) = 0
Structure

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)

+ 0.0637 X(z) + z −10 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.

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.0518 1.0518 16
0.1520 0.1520
1×π 10 × π
16
1.0187 1.0186 16
–0.0574 0.0574
2×π 11×π
16
0.9581 0.9581 16
–0.0866 0.0866
3×π 12× π
16
0.9457 0.9457 16
–0.0101 0.0101
4× π 13× π
16
1.0101 1.0102 16
0.0542 0.0542
5×π 14 × π
16
1.0866 1.0866 16
0.0418 0.0418
6× π 15× π
16
1.0573 1.0574 16
–0.0187 0.0187
7× π 16 × π
16
0.8480 0.8479 16
–0.0518 0.0518
8× π
16
0.5 0.5
Chapter 6 - FIR Filters 6. 28

|H (e )|
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 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ω

= 0.5e − j5ω + 0.3183 e − j4ω + e − j6ω − 01061


. e − j2ω + e − j8ω + 0.0637 1 + e − j 10ω

= 0.5 cos5ω − j sin 5ω + 0.3183 cos 4ω − j sin 4ω + cos 6ω − j sin 6ω

− 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ω ]

+ j[ −0.5 sin 5ω − 0.3183 sin 4ω − 0.3183 sin 6ω + 0.1061sin 2ω + 01061sin8


. ω − 0.0637 sin 10ω ]
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.
Table 2: H(ejww ) and |H(ejww )| for various values of w
w H(ejw ) |H(ejw )| w H(ejw ) |H(ejw )|
0× π 9×π
1.0518 + j0 1.0518 –0.1264 – j0.0844 0.1520
16 16
1× π 10 × π
0.5659 – j0.8470 1.0186 0.0530 – j0.022 0.0574
16 16
2×π 11 × π
–0.3667 – j0.8852 0.9581 0.0169 – j0.0850 0.0866
16 16
3× π 12 × π
–0.9276 – j0.1845 0.9457 –0.0071 – j0.0071 0.0100
16 16
4×π 13 × π
–0.7143 + j0.7143 1.0102 0.0532 – j0.0106 0.0542
16 16
5× π 14 × π
0.2120 + j1.0657 1.0866 0.0160 – j0.0386 0.0418
16 16
6× π 15 × π
0.9769 + j0.4046 1.0574 0.0104 + 0.0155 0.0186
16 16
7×π 16 × π
0.7050 – j0.4711 0.8479 0.0518 + j0 0.0518
16 16
8×π
0 – j0.5 0.5
16
6. 29 Digital Signal Processing
Example 6.2
Design a FIR highpass filter with cutoff frequency of 1.5 kHz and sampling frequency of 5 kHz with 7
samples using Fourier series method. Determine the frequency response and verify the design by sketching the
magnitude response.
Solution
Given that, Fc = 1.5 kHz ; Fs = 5 kHz
Ω 2πFc 2π × 1.5 × 103
ω c = Ω cT = c = = = 0.6π rad / sample
Fs Fs 5 × 103
The desired frequency response Hd(ejw ) of highpass filter is,

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

When n = 0 ; hd (n) = hd (0) = Lt


LM sin πn − sin ω n OP c
When n = 0 ; the hd(n) become
n→ 0 N πn Q 0/0, which is indeterminate.
sin πn sin ω cn
= Lt − Lt
n→ 0 πn n→ 0 πn U sin g L' Hospital rule,
1 sin πn 1 sin ω cn
= Lt − Lt sin Aθ
π n→ 0 n π n→ 0 n Lt =A
θ→ 0 θ
1 1 ω
= ×π − × ωc = 1− c
π π π
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 7 samples.

sin πn − sin ω cn sin ω cn N 1 N− 1


∴ h(n) = hd (n) = =− ; for n = − 2− to + 2
, except n = 0
πn πn
ω For any integer n,
= 1 − c ; for n = 0 sin pn = 0
π

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

When n = –1 ; h(–1) = h(1) = –0.3027


Using symmetry
When n = –2 ; h(–2) = h(2) = 0.0935 condition,
h(– n) = h(n)
When n = –3 ; h(–3) = h(3) = 0.0623

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

= 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


Using symmetry
=z −3 3 2
h(3) z + h(2) z + h(1) z + h(0) + h(1)z −1
+ h(2) z −2
+ h(3) z −3 condition,
h(– n) = h(n)
= z −3 h(0) + h(1) z + z−1 + h(2) z2 + z−2 + h(3) z3 + z−3

= h(0) z−3 + h(1) z−2 + z−4 + h(2) z −1 + z−5 + h(3) z0 + z−6

= 0.4 z−3 − 0.3027 z−2 + z−4 + 0.0935 z−1 + z −5 + 0.0623 1 + z−6


Structure

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(0) + 2 h(1) cos ω + 2 h(2) cos 2ω + 2 h(3) cos 3ω


= 0.4 + 2 × −0.3027cosω + 2 × 0.0935 cos2ω + 2 × 0.0623 cos3ω
= 0.4 − 0.6054 cosω + 0.187 cos2ω + 0.1246 cos3ω
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 ) 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
0.1062 0.1062 16
0.4145 0.4145
1×π 10 × π
16
0.0825 0.0826 16
0.6145 0.6146
2×π 11× π
16
0.0205 0.0205 16
0.7869 0.7869
3×π 12× π
16
–0.0561 0.0560 16
0.9161 0.9161
4× π 13× π
16
–0.1161 0.1161 16
0.9992 0.9991
5×π 14 × π
16
–0.1301 0.1300 16
1.0438 1.0438
6× π 15× π
16
–0.0790 0.0790 16
1.0629 1.0629
7× π 16 × π
16
0.0399 0.0399 16
1.0678 1.0678
8× π
16
0.213 0.213

|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

Alternate Method for Frequency Response

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.4e − j3ω − 0.3027 e − j2ω + e − j4ω + 0.0935 e − jω + e − j5ω + 0.0623 1 + e − j 6ω

= 0.4 cos3ω − j sin 3ω − 0.3027 cos2ω − j sin 2ω + cos 4ω − j sin 4ω

+ 0.0935 cos ω − j sin ω + cos5ω − j sin 5ω + 0.0623 1 + cos 6ω − j sin 6ω

= [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.

Table 2 : H(ejww ) and |H(ejww )| for various values of w

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
0.1062 + j0 0.1062 0.2303 + j0.3447 0.4145
16 16
1× π 10 × π
0.0687 – j0.0459 0.0826 0.5678 + j0.2352 0.6146
16 16
2×π 11 × π
0.0078 – j0.0190 0.0205 0.7718 – j0.1535 0.7869
16 16
3× π 12 × π
0.0109 – j0.0550 0.0560 0.6478 – j0.6478 0.9161
16 16
4×π 13 × π
0.0821 + j0.0821 0.1161 0.1949 – j0.9800 0.9991
16 16
5× π 14 × π
0.1276 + j0.0253 0.1300 –0.3994 – j0.9644 1.0438
16 16
6× π 15 × π
0.0730 – j0.0302 0.0790 –0.8838 + j0.5905 1.0629
16 16
7×π 16 × π
–0.0221+ j0.0331 0.0397 –1.0678 + j0 1.0678
16 16
8×π
0+ j0.213 0.213
16

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

The desired frequency response Hd(ejw ) of bandpass filter is,

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.

When n = 0 ; hd (n) = hd (0) = Lt


LM sin ω c2n − sin ω c1n OP
n→ 0 N πn Q U sin g L' Hospital rule,
=
1 LM Lt sin ω c2n
− Lt
sin ω c1n OP sin Aθ
π N n→ 0 n n→ 0 n Q θ→ 0
Lt
θ
=A
1
=
π
bω c2 − ω c1 g
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 7 samples.
sin ω c2n − sin ω c1n
∴ h(n) = hd (n) = ; for n = − N2−1 to + N−1
2
, except n = 0
πn
ω c2 − ω c1
= ; for n = 0
π
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.
ω c2 − ω c1 0.75π − 0.375π 0.375π
When n = 0 ; h(0) = = = = 0.375
π π π
sin (0.75π × 1) − sin (0.375π × 1)
When n = 1 ; h(1) = = −0.069
π ×1
sin(0.75π × 2) − sin(0.375π × 2)
When n = 2 ; h(2) = = −0.2716
π ×2
sin(0.75π × 3) − sin(0.375π × 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 FIR bandpass 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
−3
=z h( −3) z + h( −2) z + h( −1) z + h(0) z0 + h(1)z−1 + h(2) z −2 + h(3) z −3
3 2
Chapter 6 - FIR Filters 6. 34

∴ 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

= 0.375 z−3 − 0.069 z −2 + z−4 − 0.2716 z−1 + z−5 + 0.1156 1 + z −6


Structure
Y(z)
Let , H(z) = = 0.375 z −3 − 0.069 z−2 + z−4 − 0.2716 z−1 + z−5 + 0.1156 1 + z −6
X(z)
Y(z) = 0.375z −3X(z) − 0.069 z −2 X(z) + z−4X(z) − 0.2716 z−1X(z) + z−5X(z)

+ 0.1156 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 −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(0) + 2 h(1) cos ω + 2 h(2) cos 2ω + 2 h(3) cos 3ω


= 0.375 + 2 × −0.069cosω + 2 × −0.2716 cos2ω + 2 × 0.1156 cos3ω
= 0.375 − 0.138 cosω − 0.5432 cos2ω + 0.2312 cos3ω
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.
6. 35 Digital Signal Processing
w ) and |H(ejww )| for various values of w .
Table 1 : A(w
w H(ejww ) |H(ejww )| = |A(w
w )| w H(ejww ) |H(ejww )| = |A(w
w )|
0× π 9× π
16
–0.075 0.075 16
1.0322 1.0321
1×π 10 × π
16
–0.0699 0.0699 16
1.0255 1.0254
2×π 11×π
16
–0.0481 0.0481 16
0.8862 0.8862
3×π 12× π
16
0.0081 0.0081 16
0.6360 0.6359
4× π 13× π
16
0.1139 0.1138 16
0.3269 0.3269
5×π 14 × π
16
0.2794 0.2793 16
0.0299 0.0298
6× π 15× π
16
0.4926 0.4925 16
–0.1837 0.1836
7× π 16 × π
16
0.7215 0.7215 16
–0.2614 0.2614
8× π
16
0.9182 0.9182

|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.375e − j3ω − 0.069 e − j2 ω + e − j4ω − 0.2716 e − jω + e − j5ω + 01156


. 1 + e − j 6ω

= 0.375 cos3ω − j sin 3ω − 0.069 cos2ω − j sin 2ω + cos 4ω − j sin 4ω

− 0.2716 cos ω − j sin ω + cos5ω − j sin 5ω + 0.1156 1 + cos 6ω − j sin 6ω

= [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.

Table 2 : H(ejww ) and |H(ejww ) for various values of w

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
–0.075 + j0 0.075 0.5734 + j0.8582 1.0321
16 16
1× π 10 × π
–0.0581 + j0.0389 0.0699 0.9474 + j0.3924 1.0254
16 16
2×π 11 × π
–0.0184 + j0.0445 0.0481 0.8692 – j0.1729 0.8862
16 16
3× π 12 × π
–0.0041 – j0.0071 0.0081 0.4497 – j0.4497 0.6359
16 16
4×π 13 × π
–0.0806 – j0.0805 0.1138 0.0637 – j0.3207 0.3269
16 16
5× π 14 × π
–0.2740 – j0.0545 0.2793 –0.0114 – j0.0276 0.0298
16 16
6× π 15 × π
–0.4551 + j0.1885 0.4925 0.1527 + j0.1020 0.1836
16 16
7×π 16 × π
–0.4008 + j0.5999 0.7215 0.2614 + j0 0.2614
16 16
8×π
0 + j0.9182 0.9182
16

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,

Hd (ejω ) = 1 ; − π ≤ ω ≤ −ω c2 & − ω c1 ≤ ω ≤ ω c1 & + ω c2 ≤ ω ≤ π


= 0 ; otherwise
The desired impulse response hd(n) of the bandstop filter is,
π
hd (n) =
1
2π z
−π
e j
Hd e jω e jωn dω

−ω 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

When n = 0 ; hd (n) = hd (0) = Lt


LM sin πn + sin ω n − sin ω n OP
c1 c2 hd(n) become 0/0,
n→0 N πn πn πn Q which is indeterminate.
1 sin πn 1 sin ω c1n 1 sin ω c2n
= Lt + Lt − Lt
π n → 0 n π n → 0 n π n → 0 n
U sin g L' Hospital rule,
1 1 1
= × π + × ω c1 − × ω c2 sin Aθ
π π π Lt =A
θ→ 0 θ
= 1−
FG ω c2 − ω c1 IJ
H π K
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 7 samples.

sin ω c1n − sin ω c2n N−1 N−1


∴ h(n) = hd (n) = ; for n = − 2 to +
2
, except n = 0
πn

= 1−
FG ω c2 − ω c1 IJ ; for n = 0
H π K
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.

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)

= h(0) z −3 + h(1) z−2 + z−4 + h(2) z−1 + z −5 + h(3) z0 + z−6

= 0.625z−3 + 0.069 z−2 + z−4 + 0.2716 z−1 + z−5 − 0.1156 1 + z−6

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)

− 0.1156 X(z) + z−6 X(z)


The above equation can be used to draw the FIR filter structure as shown in fig 1.

−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(0) + 2 h(1) cos ω + 2 h(2) cos 2ω + 2 h(3) cos 3ω


= 0.625 + 2 × 0.069cosω + 2 × 0.2716 cos2ω + 2 × −0.1156 cos3ω
= 0.625 + 0.138 cosω + 0.5432 cos2ω − 0.2312 cos3ω
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.
6. 39 Digital Signal Processing
w ) and |H(ejww )| for various values of w .
Table 1 : A(w

w H(ejww ) |H(ejww )| = |Aw


w| w H(ejww ) |H(ejww )| = |Aw
w|
0× π 9× π
16
1.075 1.075 16
–0.0322 0.0321
1×π 10 × π
16
1.0699 0.0699 16
–0.0255 0.0255
2×π 11× π
16
1.0481 0.0481 16
0.1137 0.1136
3×π 12× π
16
0.9927 0.9926 16
0.3639 0.3638
4× π 13× π
16
0.8860 0.8841 16
0.6730 0.6729
5×π 14 × π
16
0.7205 0.7205 16
0.9700 0.9700
6× π 15× π
16
0.5073 0.5073 16
1.1837 1.1836
7× π 16 × π
16
0.2785 0.2784 16
1.2614 1.2614
8× π
16
0.0818 0.0818

|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.

Alternate Method for Frequency Response

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ω

= 0.625e − j3ω + 0.069 e − j2ω + e − j4ω + 0.2716 e − jω + e − j5ω − 01156


. 1 + e − j 6ω
Chapter 6 - FIR Filters 6. 40

e j
∴ H e jω = 0.625 cos3ω − j sin 3ω + 0.069 cos 2ω − j sin 2ω + cos 4ω − j sin 4ω

+ 0.2716 cos ω − j sin ω + cos5ω − j sin 5ω − 0.1156 1 + cos 6ω − j sin 6ω

= [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.

Table 2: H(ejww ) and |H(ejww )| for variouse values of w

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
1.075 + j0 1.075 –0.0179 – j0.0267 0.0321
16 16
1× π 10 × π
0.8896 – j0.5944 1.0699 –0.0235 – j0.0097 0.0255
16 16
2×π 11 × π
0.4010 – j0.9683 1.0480 0.1115 – j0.0221 0.1136
16 16
3× π 12 × π
–0.1936 – j0.9736 0.9926 0.2573 – j0.2573 0.3638
16 16
4×π 13 × π
–0.6265 – j0.6254 0.8841 0.1313 – j0.6600 0.6729
16 16
5× π 14 × π
–0.7067 – j0.1405 0.7205 –0.3712 – j0.8962 0.9700
16 16
6× π 15 × π
–0.4687 + j0.1941 0.5073 –0.9842 – j0.6576 1.1836
16 16
7×π 16 × π
–0.1547 + j0.2315 0.2784 –1.2614 – j0 1.2614
16 16
8×π
0 + j0.0818 0.0818
16

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

6.8.1 Rectangular Window


The N-point rectangular window, wR(n) is defined as,
−1 N−1
Rectangular window, w R (n) = 1 ; n = − N2 to + 2
=0 ; other n .....(6.56)

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

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

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

− jωN Fe jωN − jωN I


jωN − jω
e 2
GH 2 −e 2
JK
= e 2 e 2 − jω Fe jω − jω I e jθ e− jθ = 1
e 2
GH 2 − e 2
JK
jωN − jωN
ωN
e 2 – e 2 sin 2 e jθ − e− jθ
= jω − jω
= ω
sinθ =
sin 2j
e2 – e 2 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

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


|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.

F ig 6.2 2 : R ec ta n g u la r w in d ow seq ue n ce a n d its fre q uen cy respo n se (w h en N = 3 1 ).

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

6.8.2 Bartlett or Triangular Window


The triangular window have been chosen such that it has tapered sequences form the middle on either
sides. The N-point triangular window, wT(n) is defined as,

2 |n| N−1 N−1


Triangular window , w T ( n) = 1 − N−1
; for −
2
≤ n ≤ 2
.....(6.59)
=0 ; other n

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


N

F ig a : B a rtlett w in do w F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f


seq uen ce. o f B artlett w in do w. B artlett w ind o w.

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.

F ig 6.2 3 : B a rtlett w ind o w seq u en c e an d its freq u en c y resp o nse (w h e n N = 31 ).


Chapter 6 - FIR Filters 6. 44

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.

6.8.3 Raised Cosine Windows


The raised cosine windows are smoother at the ends, but closer to one at the middle. The smoother ends
and the broader middle section produces less distortion of hd(n) around n = 0. It is also called generalized
Hamming window.
The N-point raised cosine window wRC(n) is defined as,

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).


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 = –∞
N–1
2
IJ O e– jωn UUsing equation (6.62)U
= ∑ LNMa + (1 – a)cosFGH 2πn
N–1 K QP
N–1
n= –
2
L
N–1 F FG N–1 IJ I O FG N–1 IJ
= ∑ MMa + (1 – a) cosG K P
2π n – – jω n –
H 2 JJ P e H 2 K
NM
n=0 GH N–1
K PQ
6. 45 Digital Signal Processing

N–1 FG N – 1IJ
∑ LMNa + (1 – a) cose – π jO e

∴ WH (e jω ) =
2 πn – jωn H 2 K
n=0
PQ N–1
e
cos(θ – π) = – cosθ
FG IJN–1 N–1

∑ LMNa – (1 – a) cose jOPQ e



= e H K2 2πn – jωn
N–1
n=0


FG N – 1IJ N–1 jω
FG N – 1IJ N–1
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
N–1 2
n=0 n=0
F N – 1IJ
jω G
H 2 K
N–1 F N – 1IJ
jω G
H 2 K
N–1 LM j2πn − j2πn
OP
= ae ∑ e– jωn – (1– a) e ∑ MN e N–1 + eN – 1 PQ e
– jωn

n=0 n=0
2
F N – 1IJ
jω G N–1
H 2 K
= ae ∑ e– jωn
n=0
F N – 1IJ LM j2 πn − j2 πn OP
1– a jω GH
N–1 N–1
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 N–1
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
N–1 −j ω – N–1 −j ω +
–
2
e 2 K
MM ∑ GG e H N–1 KJ +
JK ∑ GG e H N–1
JK P
n=0
N H n=0 H Q

FG N – 1IJ
H 2 K 1 – e– jωN
= ae
1 – e – jω
Using finite

FG N – 1IJ LM FGH –j ω –
IJ

K N
FG 2π IJ N O
H N – 1K P
–j ω + geometric series
1– a H 2 K N–1
–
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

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 N–1 2 K GG e N–1 2 K – e H N–1 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 N–1 2 GG e N–1 2
– e N–1 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 N–1 2 K GG e N–1 2 K – e H N–1 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 N–1 2 K GG e N–1 2 K – e H N–1 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

L F N − 1IJ − jFG ω – 2π IJ N + jFG ω – IJ OP


2π 1
sin ee 2π N
j j
1– a MN jω GH 2 K H N – 1K 2 H K Q
N–1 2
ω–
N–1 2
– e
2 sinee jj
2π 1
ω–
N–1 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 N–1 2
– e
2 sinFH e j IK
2π 1
ω+
N–1 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

L jωN – jω jωN jπN jω jπ OP sine ω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


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


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.

F ig 6 .2 4 : H an n in g w in d o w seq ue n ce a n d its fre q uen cy resp on se (w h en N = 31 ).

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.

6.8.5 Hamming Window

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.


∴ 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


N

F ig a : H a m m in g w in do w F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f


seq uen ce. o f H a m m in g w in do w. H a m m in g w in do w.

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.

F ig 6.2 5 : H am m in g w in do w seq u en c e an d its freq u en c y resp o n se (w h e n N = 3 1).


6. 49 Digital Signal Processing

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.

6.8.6 Blackman Window


The Blackman window wB(n) is another type of cosine window defined by the equation,

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).


l q
∴ WB ( e ) = F w B ( n) = 0.42
sin
ωN
2
+ 0.25
sine ωN
2


N −1 j + 0.25 sin e ωN
2
+

N −1 j
ω
sin e j sin e j
ω π ω π
sin 2
− +
2 N −1 2 N −1

sin e j + 0.04 sin e j .....(6.73)


ωN 2 Nπ ωN 2 Nπ
− +
2 N −1 2 N −1
+ 0.04
sin e j sin e j
ω 2π ω 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.

F ig 6 .2 6 : B la ck m a n w in d ow seq u e nce a n d its freq u e ncy resp o n se (w h en N = 3 1 ).

6.8.7 Kaiser Window


The design of window function is basically a mathematical problem of finding a time-limited function
whose Fourier Transform best approximates a bandlimited function. The approximation should be such that the
maximum energy is confined to mainlobe for a given peak side-lobe amplitude. The prolate spheroidal functions
have this desirable property but these functions are difficult to compute. Kaiser has developed a simple
approximation to these functions in terms of zero-order modified Bessel functions of the first kind, which is
denoted by I0(x). The kaiser window function is in the form,
I 0 ( β1 ) N−1 N−1
Kaiser window function, w K ( n) = I 0 (a )
; for n = − 2
to + 2

=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

F ig a : K aiser w in do w sequen ce. F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f


o f K a iser w ind o w. K a iser 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 )|

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.

F ig 6.2 7 : K a iser w in d o w seq u en ce a nd its fre q uen cy respo n se , fo r a = 1.5 a n d N = 3 1.


Chapter 6 - FIR Filters 6. 52

N = 31 N = 31
N = 31

F ig a : K aiser w in do w sequ en ce. F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f


o f K a iser w ind ow. K a iser 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 )|

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.

F ig 6.2 8 : K a iser w in d o w seq u en ce a n d its fre q u en cy resp on se fo r a = 2 .5 a nd N = 3 1 ..

N = 31 N = 31
N = 31

F ig a : K aiser w in do w sequ en ce. F ig b : A m plitud e respo nse F ig c: M ag nitud e respo nse o f


o f K a iser w ind ow. K a iser 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ω)|

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.

F ig 6 .2 9 : K a iser w in d o w sequ en ce a n d its fre q u en cy resp on se fo r a = 4 .5 a n d N = 31 .


6. 53 Digital Signal Processing
Table 6.4 : Window Sequences for FIR Filter Design

Name of window Window sequence

− 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

where, β2 = a LMFGH N −1 IJ 2 − FG n − N −1IJ 2 O


K H 2 K PQ
0.5

N 2

N −1
a2 = a 2
Chapter 6 - FIR Filters 6. 54

6.8.8 Summary of Various Features of Windows


The main advantage of windowing is that it is reasonably straightforward to obtain the filter impulse response
with minimal computational effort. The major reasons for the relative success of windows is their simplicity and ease
of use and the fact that closed form expressions are often available for the window coefficients. The main disadvantage
of this technique is that the resulting FIR filters satisfy no known optimality criterion (such as specified attenuation
at w s and w p) hence their performance have to be considerably improved in most cases.
T riangular
R ectangular
B lac km an
H am m ing

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

Type of window Approximate Magnitude of


width of main-lobe first side-lobe
Rectangular 4p/N –13 dB
Bartlett 8p/N –25 dB
Hanning 8p/N –31 dB
Hamming 8p/N –41 dB
Blackman 12p/N –58 dB
Note : In filter specifications gain and magnitude are same and will be in negative dB.The attenuation
is inverse of gain and so it is negative of magnitude or gain in dB. Hence attenuation will be in
positive dB.

6.9 FIR Filter Design Using Windows


Method - 1 : Symmetry condition h(N – 1 – n) = h(n)
1. The specifications of digital FIR filter are,
i) The desired frequency response, Hd(ejw ) = Ce–ja w
where, C = Constant (usually, C = 1 = Normalized magnitude)
N −1
α =
2
ii) The cutoff frequency w c for lowpass and highpass, and w c1 and w c2 for bandpass and
bandstop filters
Note : If analog filter cutoff frequency Fc and sampling frequency Fs are specified, then
2 πFc
calculate the cutoff frequency of digital filter wc using the equation, ω c = .
Fs
iii) The number of samples of impulse response, N.
6. 55
Table 6.6 : The Normalized Ideal (Desired) Frequency Response and Impulse Response for FIR Filter Design Using Windows

Type of filter Ideal (desired) frequency Ideal (desired) impulse response


response

π ω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ω

||0 ; – ωc < ω <+ ωc



Q H d (e ) = 0 in the range − ω c < ω < +ω c
T
R|e − jωα +π – ω c1 ω c2

Bandpass filter H d ( e jω ) = S0
||e
|
− jωα

;
;
;
– ω c2 ≤ ω ≤ – ω c1
ωc1 ≤ ω ≤ ω c2
– π ≤ ω < –ω c2
h d ( n) =
1

−π
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ω

||0 ; − ωc1 < ω < +ω c1



Q H d (e ) = 0 in the range − π ≤ ω < −ω c2 ; − ω c1 < ω < +ω c1 and + ω c2 < ω ≤ + π
||0 ; ωc2 < ω ≤ π
T
+π –ω c2 + ω c1 π
R|e
||e
|
− jωα

− 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ω

Digital Signal Processing


Bandstop filter H d (e jω
) = Se − jωα
; ωc 2 ≤ ω ≤ π Q H d (e jω ) = 0 in the range − ω c2 < ω < −ω c1 and + ω c1 < ω < + ω c2
||0 ; − ωc2 < ω < – ω c1
||0 ; ωc1 < ω < ωc 2
T
Chapter 6 - FIR Filters 6. 56
2. Determine the desired impulse response, hd(n) by taking inverse Fourier transform of the desired
frequency response, Hd(ejw ).

h d ( n) =
1
2π z

−π
H d ( e jω ) e jωn dω

(For limits of integration in the above equation refer table 6.6).


3. Choose the desired window sequence w(n) defined for n = 0 to N – 1 from table 6.4. Multiply
hd(n) with w(n) to get the impulse response h(n) of the filter. calculate N-samples of the impulse
response, for n = 0 to N – 1.
\ Impulse response, h(n) = hd(n) ´ w(n) ; for n = 0 to N – 1
The impusle response is symmetric with centre of symmetry at (N – 1)/2 and so h(N – 1 – 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 impusle response h(n) to get the transfer function H(z) of the filter.
N −1
∴ Transfer function, H(z) = Z h(n) = l q ∑ h( n) z −n

n=0

5. Draw a suitable structure for realization of FIR filter.


Method - 2 : Symmetry condition h(–n) = h(n)
1. The specifications of digital FIR filter are,
i) The desired frequency response, Hd(ejw ) = C
where, C = Constant (usually, C = 1 = Normalized magnitude)
ii) The cutoff frequency w c for lowpass and highpass, and w c1 and w c2 for bandpass and bandstop
filters
Note : If analog filter cutoff frequency Fc and sampling frequency Fs are specified, then
2 πFc
calculate the cutoff frequency of digital filter wc using the equation, ω c = .
Fs
iii) The number of samples of impulse response, N.
2. Determine the desired impulse response, hd(n) by taking inverse Fourier transform of the desired
frequency response, Hd(ejw ).

h d ( n) =
1
2π z

−π
H d ( e jω ) e jωn dω

(For limits of integration in the above equation refer table 6.3).


N−1 N−1
3. Choose the desired window sequence w(n) defined for n = − 2 to +
2
1 from table 6.4.
Multiply hd(n) with w(n) to get the impulse response h(n) of the filter. calculate N-samples of the
N−1 N−1
impulse response, for n = − 2 to +
2
.
−1 N−1
\ Impulse response, h(n) = hd(n) ´ w(n) ; for n = − N 2 to +
2
.

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ω

2. Calculate frequency response for various values of w in the range 0 to p.


3. Calculate the magnitude response, |H(ejw )| and sketch the magnitude response to verify the design.

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
−π

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

jω (n − α )

MN j(n − α) PQ −ω c
=
1

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.

Rectangular window sequence, wR (n) = 1 ; for n = 0 to (N − 1)


= 0 ; otherwise
∴ Impulse response, h(n) = hd (n) × wR (n)
= hd (n) ; for n = 0 to N − 1
N−1 7−1
Here, N = 7 ; ω c = 0 .2π rad / sample ; α= = = 3 ; N − 1= 6
2 2
Hence, calculate h(n) for n = 0 to 6.
Since, the impulse response h(n) satisfies the symmetry condition h(N – 1 – n) = h(n), calculate h(n) for n = 0 to 3.
sin (0.2π × (0 − 3))
When n = 0 ; h(0) = = 0.1009
π × (0 − 3)
sin (0.2π × (1 − 3))
When n = 1 ; h(1) = = 0.1514
π × (1 − 3)
Note : Calculate sin q by keeping the
sin (0.2π × (2 − 3))
When n = 2 ; h(2) = = 0.1871 calculator in radian mode.
π × (2 − 3)
0.2π
When n = 3 ; h(3) = = 0.2
π
b g
When n = 4 ; h(4) = h 6 − 4 = h(2) = 0.1871
Using symmetry condition,
When n = 5 ; h(5) = hb6 − 5g = h(1) = 0.1514 h(N – 1 – n) = h(n) Þ h(6 –n) = h(n).
When n = 6 ; h(6) = hb6 − 6g = h(0) = 0.1009

The transfer function H(z) of FIR lowpass 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

= 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

= 0.1009 1 + z−6 + 0.1514 z −1 + z−5 + 0.1871 z −2 + z −4 + 0.2 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

+ + +

0.1009 0.1514 0.1871


0.2

−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(3) + 2 h(2) cos ω + 2 h(1) cos 2ω + 2 h(0) cos 3ω


= 0.2 + 2 × 0.1871cosω + 2 × 0.1514 cos2ω + 2 × 0.1009 cos3ω
= 0.2 + 0.3742 cosω + 0.3028 cos2ω + 0.2018 cos3ω
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 ) 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.0788 1.0788 16
–0.0406 0.0406
1×π 10 × π
16
1.0145 1.0145 16
0.0291 0.0291
2×π 11×π
16
0.8370 0.8370 16
0.0741 0.0741
3×π 12× π
16
0.5876 0.5876 16
0.0780 0.0780
4× π 13× π
16
0.3219 0.3219 16
0.0441 0.0441
5×π 14 × π
16
0.0940 0.0940 16
–0.0088 0.0088
6× π 15× π
16
–0.0573 0.0573 16
–0.0550 0.0550
7× π 16 × π
16
–0.1188 0.1188 16
–0.0732 0.0732
8× π
16
–0.1028 0.1028
Chapter 6 - FIR Filters 6. 60

|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.

Alternate Method for Filter Design


Let the symmetry condition be h( –n) = h(n). Therefore, the desired ideal frequency response Hd(ejw ) for FIR lowpass filter is,

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 ).

By definition of inverse Fourier transform,


+π +ω c

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

∴ Impulse response, h( n) = h d ( n) × w R (n)


N −1 N −1
= h d (n) ; for n = − 2
to + 2
6. 61 Digital Signal Processing
N −1 7 −1
Here, N = 7 ; ω c = 0 .2 π 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.

ω 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

When n = −2 ; h( −2) = hb2g = 0.1514 Using symmetry


condition h(– n) = h(n)
When n = −3 ; h( −3) = hb3g = 01009
.

The transfer function H(z) of FIR lowpass filter is given by,

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

= 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

Using symmetry condition,


= 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 h(–n) = h(n).

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

= 0.1009 1 + z −6 + 0.1514 z −1 + z −5 + 01871


. z −2 + z −4 + 0.2 z −3

It is observed that the transfer function obtained in both the methods are same.

Alternate method for Frequency Response

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ω

= 0.1009 + 0.1009 cos6ω − j sin 6ω + 0.1514 cos ω − j sin ω + cos5ω − j sin 5ω

+ 0.1871 cos 2ω − j sin 2ω + cos 4ω − j sin 4ω + 0.2 cos 3ω − j sin 3ω

= [ 0.1009 + 0.1009 cos6ω + 0.1514cos ω + 01514


. cos5ω + 01871
. cos2ω + 0.1871 cos 4ω + 0.2 cos 3ω ]

+ 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

Table 2 : H(ejww ) and |H(ejww )| for various values of w .

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
1.0788 + j0 1.0788 –0.0225 – j0.0337 0.0405
16 16
1× π 10 × π
0.8435 – j0.563 1.0141 0.0269 + j0.0114 0.0292
16 16
2×π 11 × π
0.3203 – j0.7733 0.8370 0.0727 – j0.0144 0.0741
16 16
3× π 12 × π
–0.1146 – j0.576 0.5872 0.0552 – j0.0552 0.0738
16 16
4×π 13 × π
–0.2276 – j0.2276 0.3218 0.0086 – j0.0432 0.0440
16 16
5× π 14 × π
–0.0922 – j0.0183 0.0940 0.0033 + j0.0081 0.0087
16 16
6× π 15 × π
0.0529 – j0.0219 0.0572 0.0457 + j0.0305 0.0549
16 16
7×π 16 × π
0.0660 – j0.0988 0.1188 0.0732 – j0 0.0732
16 16
8×π
0 – j0.1028 0.1028
16

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,

wH(n) = 0.54 − 0.46 cos e j


2πn
N −1
; for n = 0 to N − 1

=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

Given that, N = 7 ; ω c = 0 .8π rad / sample


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.

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.

F ω IJ LM0.54 − 0.46 cos nπ OP


= G1 − c
; for n = 3
H πKN 3Q

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)

−sin(0.8π (1 − 3)) 0.54 − 0.46 cos


LM 1× π OP
When n = 1 ; h(1) = N 3 Q = 0.0469
π × (1 − 3)

−sin(0.8π (2 − 3)) 0.54 − 0.46 cos


LM 2× π OP
When n = 2 ; h(2) = N 3 Q = −0.1441
π × (2 − 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).

When n = 6 ; h(6) = h(6 − 6) = h(0) = −0.0081


Chapter 6 - FIR Filters 6. 64
The transfer function H(z) of FIR highpass 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
Using symmetry
= 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
condition
= 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 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

= −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)

∴ Y(z) = −0.0081 X(z) + z−6 X(z) + 0.0469 z−1X(z) + z−5 X(z)

− 0.1441 z−2X(z) + z−4 X(z) + 0.2 z−3X(z)


The above equation can be used to draw the FIR filter structure as shown in fig 1.

+ + +

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(3) + 2 h(2) cos ω + 2 h(1) cos 2ω + 2 h(0) cos 3ω


= 0.2 + 2 × (−0.1441)cosω + 2 × 0.0469 cos2ω + 2 × (−0.0081) cos3ω
= 0.2 − 0.2882 cosω + 0.0938 cos2ω − 0.0162 cos3ω
Using the above equation, the amplitude function 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.
6. 65 Digital Signal Processing

|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 ) 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
–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

Alternate Method for Filter Design

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.

Hamming window sequence, w H ( n) = 0.54 + 0.46 cos FH IK ; n = −


2 πn
N −1
N −1
2
to +
N −1
2

= 0 ; otherwise

\ Impulse response, h(n) = hd(n) wH(n)


N −1
Here, N = 7 ; = 3 ; ω c = 0.8 rad / sample.
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.

∴ 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

When n = −2 ; h( −2) = h(2) = 0.0469 Using symmetry condition


h(n) = h(–n)
When n = −3 ; h( −3) = h(3) = −0.0081

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

= 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 Using symmetry condition


h(n) = h(–n)
= 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
6. 67 Digital Signal Processing

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

= −0.0081 1 + z −6 + 0.0469 z −1 + z −5 − 01441


. z −2 + z −4 + 0.2 z −3

= −0.0081 − 0.0081z −6 + 0.0469 z −1 + 0.0469 z −5 − 01441


. z −2 − 01441
. z −4 + 0.2z −3

It is observed that the transfer function obtained in both the methods are same.

Alternate Method for Frequency Response

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ω

= −0.0081 1 + e − j6ω + 0.0469 e − jω + e − j5ω − 01441


. e − j2ω + e − j4ω + 0.2 e − j3ω

= −0.0081 1 + cos6ω − j sin 6ω + 0.0469 cos ω − j sin ω + cos5ω − j sin 5ω

− 01441
. cos 2ω − j sin 2ω + cos 4ω − j sin 4ω + 0.2 cos 3ω − j sin 3ω

= [ −0.0081 − 0.0081 cos6ω + 0.0469 cos ω + 0.0469cos5ω − 01441


. cos 2ω − 0.1441cos 4ω + 0.2 cos 3ω ]

+ j[0.0081sin 6ω − 0.0469 sin ω − 0.0469 sin 5ω + 0.1441 sin 2ω + 01441


. sin 4ω − 0.2 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.

Table 2 : H(ejww ) and |H(ejww )| for various values of w .

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
–0.0106 – j0 0.0106 0.0892 + j0.1335 0.1605
16 16
1× π 10 × π
–0.0078 + j0.0052 0.0093 0.2115 + j0.0876 0.2289
16 16
2×π 11 × π
–0.0023 + j0.0056 0.0060 0.3024 – j0.0601 0.3083
16 16
3× π 12 × π
0.0001 + j0.0005 0.0005 0.2774 – j0.2774 0.3923
16 16
4×π 13 × π
–0.0054 – j0.0054 0.0076 0.0921 – j0.4632 0.4722
16 16
5× π 14 × π
–0.0194 – j0.0038 0.0197 –0.2061 – j0.4977 0.5386
16 16
6× π 15 × π
–0.0354 + j0.0146 0.0382 –0.4845 – j0.3237 0.5826
16 16
7×π 16 × π
–0.0367 + j0.0549 0.0660 –0.5982 – j0 0.5982
16 16
8×π
0 + j0.1062 0.1062
16
Chapter 6 - FIR Filters 6. 68

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 (ejω ) = e− jωα ; – ω 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,

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.

sin ω c2 (n − α ) − sin ω c1(n − α )


When n = α ; hd (n) = Lt
(n − α ) → 0 π(n − α )
U sin g L' Hospital rule
=
1 LM Lt
sin ω c2 (n − α )
− Lt
sin ω c1(n − α ) OP
π N(n − α ) → 0 (n − α ) (n − α )→ 0 (n − α ) Q sin Aθ
Lt = A
θ→0 θ
ω c2 − ω c1
=
π
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence.
The hanning window sequence wC(n) is given by,
2πn
wC (n) = 0.5 − 0.5 cos N−1
; for n = 0 to (N − 1)
=0 ; otherwise

∴ h(n) = hd (n) wC (n) =


LM sin ω c 2 (n − α ) − sin ω c1(n − α ) OP 0.5 − 0.5 cos c h
2πn
; for n ≠ α
N π(n − α ) Q N− 1

Fω −
=G c2 ω c1 IJ 0.5 − 0.5 cos c h 2πn
; for n = α
H π K N− 1

Given that N = 7 ; w c1 = 0.4p rad/sample and w c2 = 0.65p rad/sample


6. 69 Digital Signal Processing
N−1 7 −1
Here, α = = = 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.

sin ω c2(n − 3) − sin ω c1(n − 3) 0.5 − 0.5 cos


LM nπ OP
∴ h(n) = N 3 Q ; for n ≠ 3
π(n − 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

When n = 4 ; h(4) = h(6 – 4) = h(2) = –0.0143


Using symmetry condition
When n = 5 ; h(5) = h(6 – 5) = h(1) = –0.0556 h(N – 1 – n) = h(n) Þ h(6 – n) = h(n).
When n = 6 ; h(6) = h(6 – 6) = h(0) = 0

The transfer function H(z) of FIR bandpass filter is given by,

N−1 6
l q ∑ h(n) z = ∑ h(n) z
H(z) = Z h(n) = −n −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(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
Using symmetry condition,
= h(0) 1+ z −6 + h(1) z −1 + z −5 + h(2) z −2 + z −4 + h(3) z −3 h(N – 1 – n) = h(n).

= 0 × 1 + z −6 − 0.0556 z −1 + z −5 − 0.0143 z −2 + z −4 + 0.25 z −3

= −0.0556 z −1 + z −5 − 0.0143 z −2 + z −4 + 0.25 z −3

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

−0.0143[z − X(z) + z− X(z)]


−1 −5 2 4 −3
−0.0556[z X(z) + z X(z)] 0.25z X(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(3) + 2h(2) cos ω + 2h(1) cos 2ω + 2 h(0) cos 3ω


b g b
= 0.25 + 2 × −0.0143 cos ω + 2 × −0.0556 cos 2ω + 2 × 0 cos 3ω g
= 0.25 − 0.0286 cos ω − 0.1112 cos 2ω
Using the above equation, the amplitude function 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 ) 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
0.1102 0.1102 16
0.3583 0.3583
1 ×π 10 × π
16
0.1192 0.1192 16
0.3395 0.3395
2× π 11× π
16
0.1449 0.1449 16
0.3084 0.3084
3× π 12 × π
16 0.1836 0.1836 16 0.2702 0.2702
4×π 13 × π
16
0.2297 0.2297 16
0.2312 0.2312
5× π 14 × π
16
0.2766 0.2766 16
0.1977 0.1977
6×π 15 × π
16
0.3176 0.3176 16
0.1753 0.1753
7×π 16 × π
16
0.3471 0.3471 16
0.1674 0.1674
8×π
16
0.3612 0.3612
6. 71 Digital Signal Processing

|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.

Alternate Method for Filter Design


Let the symmetry condition be h(–n) = h(n). Therefore, the desired ideal frequency response Hd(ejw ) for FIR bandpass filter is,

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

sin ω c2 n − sin ω c1n


= ; for all n, except n = 0
πn When n = 0, the hd(n)
becomes 0/0 which
When n = 0 ; h d (0) = Lt
LM sin ω c 2 n − sin ω c1n
=
1 OP LM Lt sin ω c2 n
− Lt
sin ω c1n OP is indeterminate.
n→0 N πn π Q N n→0 n n→0 n Q
ω c2 − ω c1 U sin g L' Hospital rule
=
π sin Aθ
Lt = A
The impulse response h(n) of FIR filter is obtained by multiplying hd(n) by window sequence. θ→0 θ
N −1 N −1
Hanning window sequence, w C (n) = 0.5 + 0.5cos N2 π−n1 ; for n = − 2
to + 2

=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

Given that, N = 7 ; w c1 = 0.4p rad/sample ; w c2 = 0.65p rad/sample


Chapter 6 - FIR Filters 6. 72
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) = h(n), calculate h(n) for n = o to 3.

∴ 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

= −0.0556 z −1 + z −5 − 0.0143 z −2 + z −4 + 0.25 z −3


h(3) = 0
It is observed that the transfer function obtained in both the methods are same.

Alternate Method for Frequency Response

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ω

= −0.0556 ccos ω − j sin ω + cos5ω − j sin 5ω h

− 0.0143ccos 2ω − j sin 2ω + cos 4ω − j sin 4ω h + 0.25ccos 3ω − jsin 3ω h

= −0.0556cos ω − 0.0556 cos5ω − 0.0143cos 2ω − 0.0143 cos 4ω + 0.25 cos 3ω

+ j 0.0556sin ω + 0.0556 sin 5ω + 0.0143sin 2ω + 0.0143 sin 4ω − 0.25 cos 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.
6. 73 Digital Signal Processing

Table 2: H(ejww ) and |H(ejww )| for various values of w

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
0.1102 – j0 0.1102 0.1990 + j0.2979 0.3582
16 16
1× π 10 × π
0.0991 – j0.0662 0.1191 0.3137 + j0.1299 0.3395
16 16
2× π 11× π
0.0554 – j0.1339 0.1449 0.3025 – j0.0601 0.3084
16 16
3× π 12 × π
–0.0358 – j0.1801 0.1836 0.1910 – j0.1910 0.2701
16 16
4× π 13 × π
–0.1624 – j0.1624 0.2296 0.0451 – j0.2267 0.2311
16 16
5× π 14 × π
–0.2713 – j0.0539 0.2766 –0.0756 – j0.1827 0.1977
16 16
6× π 15 × π
–0.2935 + j0.1215 0.3176 –0.1457 – j0.097 0.1750
16 16
7× π 16 × π
–0.1928 + j0.2886 0.3470 –0.1674 – j0 0.1674
16 16
8× π
0 + j0.3612 0.3612
16

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

ω 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

ω 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

∴ When n = α ; When n = a, the hd(n) becomes


0/0 which is indeterminate.
sin ω c1(n − α ) + sin π(n − α) − sin ω c2 (n − α)
hd (n) = Lt
(n − α ) → 0 π(n − α )

=
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

∴ h(n) = hd (n) × wR (n) = hd (n) =


b g b g
sin ω c1 n − α + sin π n − α − sin ω c2 n − α b g ; for n ≠ α
b
πn−α g
= 1−
FG ω c2 − ω c1 IJ ; for n = α
H π K
Given that, N = 7 ; ω c1 = 0.4π rad / sample ; ω c2 = 0.65π rad / sample

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

= −0.0458 1+ z −6 + 0.2223 z −1 + z −5 + 0.0191 z −2 + z −4 + 0.75 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)

∴ Y(z) = −0.0458 X(z) + z −6 X(z) + 0.2223 z−1X(z) + z−5 X(z)

+ 0.0191 z−2X(z) + z −4 X(z) + 0.75 z −3X(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

= h(3) + 2h(2) cos ω + 2h(1) cos 2ω + 2 h(0) cos 3ω


= 0.75 + 2 × 0.0191cos ω + 2 × 0.2223 cos 2ω + 2 × −0.0458 cos 3ω b g
= 0.75 + 0.0382cos ω + 0.4446 cos 2ω − 0.0914 cos 3ω

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.

Alternate Method for Filter Design


Let the symmetry condition be h(– n) = h(n). Therefore, the desired ideal frequency response Hd(ejw ) for FIR bandstop filter is,
H d (e jω ) = 1 ; – π ≤ ω ≤ – ω c2 and – ω c1 ≤ ω ≤ + ω c1 and + ω 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,
− ω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

sin πn + sin ω c1n − sin ω c2 n


= ; for all n, except n = 0.
πn
When n = 0, the hd(n)
sin πn + sin ω c1n − sin ω c2 n becomes 0/0 which
When n = 0 ; h d ( n) = Lt
n →0 πn is indeterminate.

1 sin πn 1 sin ω c1n 1 sin ω c2 n


= Lt + Lt + Lt U sin g L' Hospital rule
π n →0 n π n →0 n π n →0 n

=
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

∴ Impulse response, h(n) = h d ( n) × w R ( n)


N −1 N −1
= h d ( n) ; for n = − 2
to +
2

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

∴ H(z) = z −3 h(3) z 3 + h(2) z 2 + h(1) z + h(0) z + 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

= −0.0457 1 + z −6 + 0.2223 z −1 + z −5 + 0.0191 z −2 + z −4 + 0.75z −3

It is observed that the transfer function obtained in both the methods are same.

Alternate Method for Frequency Response

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 1 + e − j6ω + 0.2223 e − jω + e − j5ω + 0.0191 e − j2ω + e − j4ω + 0.75 e − j3ω

= −0.0457 − 0.0457 cos6ω − j sin 6ω + 0.2223 cos ω − j sin ω + cos5ω − jsin 5ω

+ 0.0191 cos 2ω − j sin 2ω + cos 4ω − j sin 4ω + 0.75 cos 3ω − j sin 3ω

= [ −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.

Table 2: H(ejww ) and |H(ejww )| for various values of w

w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|


0× π 9×π
1.1414 – j0 1.1414 0.1561 + j0.2336 0.2809
16 16
1× π 10 × π
0.9330 + j0.6234 1.1221 0.3109 + j0.1287 0.3364
16 16
2×π 11 × π
0.4074 – j0.9836 1.0646 0.4599 – j0.0914 0.4689
16 16
3× π 12 × π
–0.1899 – j0.9511 0.9697 0.4655 – j0.4655 0.6583
16 16
4×π 13 × π
–0.5951 – j0.5951 0.8416 0.1698 – j0.8538 0.8705
16 16
5× π 14 × π
–0.6774 – j0.1347 0.6907 –0.4072 – j0.9830 1.0640
16 16
6× π 15 × π
–0.4939 + j0.2046 0.5346 –0.9971 – j0.6662 1.1991
16 16
7×π 16 × π
–0.2208 + j0.3304 0.3974 –1.2478 – j0 1.2478
16 16
8×π
0 + j0.3054 0.3054
16
6. 79 Digital Signal Processing

6.10 Design of FIR Filters by Frequency Sampling Technique


In this method the ideal (desired) frequency response is sampled at sufficient number of points (i.e., N-
points). These samples are the DFT coefficients of the impulse response of the filter. Hence the impulse
response of the filter is determined by taking inverse DFT.
Let, Hd(ejw ) = Ideal desired frequency response
H(k) = DFT sequence obtained by sampling Hd(ejw )
h(n) = Impulse response of FIR filter.
The impulse response h(n) is obtained by taking inverse DFT of H(k). For practical realizability the
samples of impulse response should be real. This can happen if all the complex terms appear in complex
conjugate pairs. It can be observed that the complex DFT coefficients exists only as conjugate pairs. This
suggest that the terms of H(k) can be matched by comparing the exponentials. The term H(k) e+j2pnk/N should be
matched by the term that has the exponential e–j2pnk/N as a factor.
Procedure for Type-1 Design
1. Choose the ideal (desired) frequency response Hd(ejw ).
2. Sample Hd(ejw ) at N-points by taking w = w k = 2pk/N where k = 0, 1, 2, 3, ....(N-1), to
generate the sequence H(k) .

∴ 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

where, "Re" stands for "real part of".


4. Take Z-transform of the impulse response h(n) to get the filter transfer function, H(z).
N−1
l q ∑ h( n) z
∴ H(z) = Z h(n) = −n

n=0

Procedure for Type-2 Design


1. Choose the ideal (desired) frequency response Hd(ejw ).
2. Sample Hd(ejw ) at N-points by taking w = w k = 2p(2k + 1)/2N, where k = 0, 1, 2, 3, .....
(N – 1), to generate the sequence H(k).

∴ 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

Impulse response, h( n) = ∑ ReMMH(k) e N


PQ
.....(6.78)
N k=0 N
When N is even,
N
2 2 L
−1
jnπ ( 2 K + 1) OP
Impulse response, h( n) =
N
×2 ∑ MM Re H(k) e N
PQ
.....(6.79)
k=0N
where "Re" stands for "real part of".
4. Take Z-transform of the impulse response h(n) to get the filter transfer function, H(z)
N−1
l q ∑ h( n) z
∴ H(z) = Z h(n) = −n

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

The samples of impulse response h(n) are given by,


Using equation(6.76).
L N − 1
L OPOP
1 M 2 j2πnk

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.

Hence, calculate h(n) for n = 0 to 14


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 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

− 0.0914 z−4 + z−10 − 0.0181 z−5 + z −9 + 0.3130 z −6 + z−8 + 0.52 z−7

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

+ 0.3130 z−6 + z −8 + 0.52 z−7

∴ 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)

+ 0.3130 z −6 X(z) + z −8 X(z) + 0.52 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 −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

= h(7) + 2h(6) cos ω + 2h(5) cos 2ω + 2h(4) cos 3ω + 2h(3) cos 4ω


+ 2h(2) cos 5ω + 2h(1) cos 6ω + 2h(0) cos 7ω
= 0.52 + 2 × 0.3130 cos ω + 2 × − 0.0181cos 2ω + 2 × − 0.0914 cos 3ω
+ 2 × 0.0122 cos 4ω + 2 × 0.04 cos 5ω
+ 2 × − 0.0019 cos 6ω + 2 × − 0.0141cos 7ω
= 0.52 + 0.626 cosω − 0.0362 cos 2ω − 0.1828 cos 3ω + 0.0244 cos 4ω
+ 0.08 cos 5ω − 0.0038 cos 6ω − 0.0282 cos 7ω

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.

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 ×π 17 × π
16
0.9994 0.9994 16
0.0014 0.0014
1× π 18 × π
16
1.0032 1.0032 16
–0.0067 0.0067
2× π 19× π
16
1.0009 1.0009 16
–0.0009 0.0009
3× π 20 × π
16
0.9856 0.9856 16
0.0020 0.0020
4× π 21 × π
16
0.9909 0.9909 16
–0.0061 0.0061
5× π 22× π
16
1.0323 1.0323 16
0.0497 0.0497
6× π 23× π
16
1.0360 1.0360 16
0.2542 0.2542
7× π 24 × π
16
0.8900 0.8900 16
0.5844 0.5844
8 ×π 25× π
16
0.5844 0.5844 16
0.8900 0.8900
9× π 26 × π
16
0.2542 0.2542 16
1.0360 1.0360
10 × π 27 × π
16
0.0497 0.0497 16
1.0323 1.0323
11× π 28 × π
16
–0.0061 0.0061 16
0.9909 0.9909
12× π 29 × π
16
0.0020 0.0020 16
0.9857 0.9857
13× π 30 × π
16
–0.0009 0.0009 16
1.0009 1.0009
14× π 31× π
16
–0.0067 0.0067 16
1.0032 1.0032
15× π 32× π
16
–0.0014 0.0014 16
0.9994 0.9994
16 × π
16
0.0094 0.0094
Chapter 6 - FIR Filters
|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 π 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
( π)

F ig 2 : M a g n itud e resp o nse of F IR .

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.0914 z −4 + z −10 − 0.0181 z −5 + z −9 + 0.3130 z −6 + z −8 + 0.52 z −7


z = e jω

− j14ω − jω − j13ω − j2 ω − j12ω


= − 0.0141 1 + e − 0.0019 e +e + 0.04 e +e + 0.0122 e − j3ω + e − j11ω

− 0.0914 e − j4ω + e − j10ω − 0.0181 e − j5ω + e − j9 ω + 0.3130 e − j6ω + e − j8ω + 0.52 e − j7 ω

= − 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.

Table 2: H(ejww ) and |H(ejww )| for various values of w


w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|
0× π 17 × π
0.9994 + j0 0.9994 –0.0002 + j0.0015 0.0015
16 16
1× π 18 × π
0.1956 – j0.9839 1.0031 –0.0062 – j0.0027 0.0067
16 16
2×π 19 × π
–0.9247 – j0.3828 1.0000 0.0006 + j0.0009 0.0010
16 16
3× π 20 × π
–0.5476 – j0.8196 0.9857 0 + j0 0
16 16
4×π 21 × π
0.7006 + j0.7006 0.9907 0.0051 – j0.0035 0.0061
16 16
5× π 22 × π
0.8582 – j0.5735 1.0321 0.0191 + j0.046 0.0498
16 16
6× π 23 × π
–0.3964 – j0.9571 1.0359 0.2495 – j0.0497 0.2544
16 16
7×π 24 × π
–0.8728 + j0.1736 0.8898 0 – j0.5844 0.5844
16 16
8×π 25 × π
0 + j0.5844 0.5844 –0.8728 – j0.1736 0.8898
16 16
9×π 26 × π
0.2495 + j0.0497 0.2544 –0.3964 + j0.9571 1.0359
16 16
10 × π 27 × π
0.0191 – j0.046 0.0498 0.8582 + j0.5735 1.0321
16 16
11 × π 28 × π
0.0051 + j0.0035 0.0061 0.7006 – j0.7006 0.9907
16 16
12 × π 29 × π
0 + j0 0 –0.5476 – j0.8196 0.9857
16 16
13 × π 30 × π
–0.0006 – j0.0009 0.0010 –0.9247 + j0.3828 1.0000
16 16
14 × π 31 × π
–0.0062 + j0.0027 0.0067 0.1956 + j0.9839 1.0031
16 16
15 × π 32 × π
–0.0002 – j0.0015 0.0015 0.9994 + j0 0.9994
16 16
16 × π
–0.0009 + j0 0.0009
16
Chapter 6 - FIR Filters 6. 86
Example 6.10
Design a linear phase FIR lowpass filter with a cutoff frequency of 0.5p
|H d (e jω)|
rad/sample by taking 11 samples of ideal frequency response.
Solution
The magnitude response of ideal lowpass filter is shown in fig 1. The
desired frequency response Hd(ejw ) of linear phase FIR lowpass filter with cutoff
frequency of 0.5p rad/sample is given by,
ω
Hd (ejω ) = e− jαω ; 0 ≤ ω ≤ 0.5π and 1.5π ≤ ω ≤ 2π 0 0.5π π 1.5π 2π

=0 ; 0.5π < ω < 1.5π


F ig 1 : Id e al m ag n itu d e
resp on se o f F IR lo w p a ss filter.
N − 1 11− 1
where, α = = =5
2 2
The DFT sequence H(k) is obtained by sampling Hd(ejw ) at 11 equidistant frequency points in a period of 2p.
The 11 frequencies for type-1 design are given by,

ω k = 2πk = 2πk ; for k = 0 to 10


N 11
2π × 0 2π × 6
When k = 0 ; ω k = = 0 When k = 6 ; ω k = = 1.09π
11 11
2π × 1 2π × 7
When k = 1 ; ω k = = 0.18π When k = 7 ; ω k = = 1.27π
11 11
2π × 2 2π × 8
When k = 2 ; ω k = = 0.36π When k = 8 ; ω k = = 1.45π
11 11
2π × 3 2π × 9
When k = 3 ; ω k = = 0.55π When k = 9 ; ω k = = 1.64π
11 11
2π × 4 2π × 10
When k = 4 ; ω k = = 0.73π When k = 10 ; ω k = = 1.82π
11 11
2π × 5
When k = 5 ; ω k = = 0.91π
11

From the above calculations the following observations can be made.

For k = 0 to 2, the samples lie in the range 0 £ w £ 0.5 p

For k = 3 to 8, the samples lie in the range 0.5p < w < 1.5 p

For k = 9 to 10, the samples lie in the range 1.5p £ w < 2p

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.


|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

The samples of impulse response, h(n) are given by,

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.

Hence calculate h(n) for n = 0 to 10.

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

When n = 7 ; h(7) = h(11 – 1 – 7) = h(3) = 0.0474 Using symmetry


condition
When n = 8 ; h(8) = h(11 – 1 – 8) = h(2) = –0.1094
h(N – 1 – n) = h(n)
When n = 9 ; h(9) = h(11 – 1 – 9) = h(1) = –0.054

When n =10 ; h(10) = h(11 – 1 – 10) = h(0) = 0.0694

The transfer function H(z) of the filter is given by Z-transform of h(n).


N − 1 10
∴ H(z) = Z h(n) = l q ∑ h(n) z −n
= ∑ h(n) z−n
n = 0 n = 0
Using symmetry
= h(0) + h(1) z −1 + h(2) z−2 + h(3) z−3 + h(4) z−4 + h(5) z−5 condition
h(N – 1 – n) = h(n)
+ h(6) z−6 + h(7) z −7 + h(8) z −8 + h(9) z−9 + h(10) z−10

= 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

+ h(4) z−4 + z−6 + h(5) z−5

= 0.0694 1+ z−10 − 0.054 z−1 + z −9 − 0.1094 z−2 + z−8 + 0.0474 z−3 + z−7

+ 0.3194 z−4 + z−6 + 0.4545 z−5

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.

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 ×π 17 ×π
16
1.0001 1.0001 16
–0.0559 0.0559
1×π 18 ×π
16
0.9874 0.9874 16
0.0682 0.0682
2×π 19×π
16
0.9748 0.9748 16
0.1294 0.1294
3× π 20 × π
16
1.0048 1.0048 16
0.0542 0.0542
4 ×π 21 ×π
16
1.0707 1.0707 16
–0.1019 0.1019
5×π 22×π
16
1.0911 1.0911 16
–0.1873 0.1873
6 ×π 23×π
16
0.9623 0.9623 16
–0.0710 0.0710
7 ×π 24 × π
16
0.6521 0.6521 16
0.2517 0.2517
8 ×π 25×π
16
0.2517 0.2517 16
0.6521 0.6521
9 ×π 26 ×π
16
–0.0710 0.0710 16
0.9623 0.9623
10 ×π 27 ×π
16
–0.1873 0.1873 16
1.0911 1.0911
11× π 28 × π
16
–0.1019 0.1019 16
1.0707 1.0707
12×π 29 × π
16
0.0542 0.0542 16
1.0048 1.0048
13×π 30 × π
16
0.1294 0.1294 16
0.9748 0.9748
14 ×π 31×π
16
0.0682 0.0682 16
0.9874 0.9874
15× π 32× π
16
–0.0559 0.0559 16
1.0001 1.0001
16 ×π
16
–0.1175 0.1175
Chapter 6 - FIR Filters
|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 π 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
( π)

F ig 2 : M a g n itud e resp o nse of F IR L o w p a ss filter.

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 1 + e − j10ω − 0.054 e − jω + e − j9ω − 01094


. e − j2 ω + e − j8ω + 0.0474 e − j3ω + e − j7 ω

+ 0.3194 e − j4 ω + e − j6ω + 0.4545 e − j5ω

= 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.3194 cos 4ω − j sin 4ω + cos 6ω − j sin 6ω + 0.4545 cos5ω − j sin 5ω

= [ 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.

Table 2: H(ejww ) and |H(ejww )| for various values of w


w H(ejww ) |H(e jww )| w H(ejww ) |H(e jww )|
0× π 17 × π
1.0001 + j0 1.0001 0.0311 – j0.0466 0.0560
16 16
1× π 18 × π
0.5486 – j0.821 0.9874 0.0261 + j0.063 0.0681
16 16
2×π 19 × π
–0.373 – j0.9006 0.9747 0.1269 + j0.0253 0.1293
16 16
3× π 20 × π
–0.9855 – j0.1959 1.0047 0.0383 – j0.0382 0.0540
16 16
4×π 21 × π
–0.757 + j0.757 1.0705 0.0199 + j0.1 0.1019
16 16
5× π 22 × π
0.2128 + j1.0701 1.0910 0.1731 + j0.0717 0.1873
16 16
6× π 23 × π
0.889 + j0.3681 0.9621 0.0591 – j0.0394 0.0710
16 16
7×π 24 × π
0.5421 – j0.3622 0.6519 0 + j0.2517 0.2517
16 16
8×π 25 × π
0 – j0.2517 0.2517 0.5421 + j0.3622 0.6519
16 16
9×π 26 × π
0.0591 + j0.0394 0.0710 0.889 – j0.3681 0.9621
16 16
10 × π 27 × π
0.1731 – j0.0717 0.1873 0.2128 – j1.0701 1.0910
16 16
11 × π 28 × π
0.0199 – j0.1 0.1019 –0.757 – j0.757 1.0705
16 16
12 × π 29 × π
0.0383 + j0.0382 0.0540 –0.9855 + j0.1959 1.0047
16 16
13 × π 30 × π
0.1269 – j0.0253 0.1293 –0.373 + j0.9006 0.9747
16 16
14 × π 31 × π
0.0261 – j0.063 0.0681 0.5486 + j0.821 0.9874
16 16
15 × π 32 × π
0.0311 + j0.0466 0.0560 1.0001 + j0 1.0001
16 16
16 × π
0.1175 + j0 0.1175
16
Chapter 6 - FIR Filters 6.92

6.11 Summary of Important Concepts


1. The filters are frequency selective devices.
2. The specification of a digital filter is the desired frequency response Hd(ejw ).
3. The desired impulse response hd(n) is obtained by taking inverse Fourier transform of Hd(ejw ).
4. The desired impulse response hd(n) is an infinite duration signal.
5. The filters designed by using finite samples of impulse response are called FIR (Finite Impulse Response)
filters.
6. The transfer function H(z) of the filter is obtained by taking Z-transform of impulse response.
7. An LTI system will behave as frequency selective device or filter.
8. The phase delay and group delay are defined to examine the linearity of phase characteristics of frequency
response of FIR filter.
9. The phase delay, tp is defined as, tp = –q(w)/w, where q(w) = Ð H(ejw ).
10. The group delay, tg is defined as, tg = –d q(w)/dw, where q(w) = Ð H(ejw ).
11. The linear phase FIR filters has a constant delay within the desired frequency range.
12. The linear phase FIR filters with constant group and phase delay will have symmetric impulse response
with symmetry condition h(N – 1 – n) = h(n) and with centre of symmetry at a, where a = (N –1)/2.
13. The linear phase FIR filters with only constant group delay will have antisymmetric impulse response with
symmetry condition h(N – 1 – n) = –h(n) and with centre of symmetry at a, where a = (N –1)/2.
14. The frequency response of a digital filter is periodic with period equal to 2p.
15. The samples of impulse response of digital filter are Fourier coefficients in the Fourier series representation
of the frequency response of the filter.
16. The abrupt truncation of impulse response results in oscillations in the passband and stopband, and this
effect is called Gibbs phenomenon.
17. The windows are finite duration sequences used to truncate and modify the impulse response of FIR filters.
18. The desirable features of a window are small width of main-lobe and side-lobes with very low magnitude (or
large attenuation), in the frequency spectrum.
19. In the frequency spectrum, the width of main-lobe and peak side-lobe magnitude are characteristic constants
of a particular window.
20. In windows, the width of the main-lobe can be reduced only by increasing the value of N.
21. In windows, except Kaiser window, there is no adjustable parameter to increase the side-lobe attenuation.
22. Kaiser has introduced a variable parameter "a" to modify the characteristics of window. With increase in
value of "a", the width of main-lobe increases and side-lobe magnitude decreases. The width of main-lobe
can be reduced by increasing the value of N.
23. In frequency sampling technique of FIR filter design, one period of ideal frequency response is sampled at
N equal frequency intervals.
24. The samples obtained by sampling ideal frequency response are DFT coefficients.
25. The complex DFT coefficients obtained by sampling frequency response always exist as conjugate pairs.
6. 93 Digital Signal Processing

6.12. Short Questions and Answers


Q6.1 How does an LTI system behave as a frequency selective filters?
Let, x(n), h(n) and y(n) are input, impulse response and output of an LTI system.
Let, F{x(n)}=X(ejw ), F{h(n)} = H(e jw ) and F{y(n)}=Y(ejw ).
By convolution property of Fourier transform, we can say that Y(e jw ) = X(ejw )H(ejw ), which implies
that the input spectrum X(ejw ) is modified by the frequency response H(ejw ) to yield the output
spectrum Y(e jw ). The H(e jw ) acts as a spectral shaping function to the different frequency
components of the input signal. Hence the LTI systems can be considered as frequency selective
filters.
Q6.2 How are phase distortion and delay distortion introduced?
The phase distortion is introduced when the phase characteristics of a filter is not linear within
the desired frequency band.
The delay distortion is introduced when the delay is not a constant within the desired frequency
range.
Q6.3 What are FIR filters?
The specifications of the desired filter will be given in terms of ideal frequency response Hd(e jw ).
The impulse response h d(n) of desired filter can be obtained by inverse Fourier transform of
H d(e jw ), which consists of infinite samples. The filters designed by selecting finite number of
samples of impulse response are called FIR filters.
Q6.4 Write the steps involved in FIR filter design.
i. Choose the desired (ideal) frequency response Hd(ejw ).
ii. Take inverse fourier transform of Hd(ejw ) to get hd(n).
iii. Convert the infinite duration hd(n) to finite duration sequence h(n).
iv. Take Z-transform of h(n) to get the transfer function H(z) of the FIR filter.
Q6.5 What are the advantages of FIR filters?
i. Linear phase FIR filters can be easily designed.
ii. Efficient realizations of FIR filter exist as both recursive and nonrecursive structures.
iii. FIR filters realized nonrecursively are always stable.
iv. The roundoff noise can be made small in nonrecursive realization of FIR filters.
Q6.6 What are the disadvantages of FIR filters?
i. The duration of impulse response should be large to realize sharp cutoff filters.
ii. The non-integral delay can lead to problems in some signal processing applications.
Q6.7 What is the necessary and sufficient condition for the linear phase characteristic of an FIR filter?
The necessary and sufficient condition for the linear phase characteristic of a FIR filter is that
the phase function should be a linear function of w , which in turn requires constant phase delay
or constant phase and group delay.
Chapter 6 - FIR Filters 6.94
Q6.8 Write the frequency response of linear phase LTI system with constant phase delay and constant
group delay.

Frequency response of LTI UV


H(e jω ) = ±| H(e jω )|e − jαω
system with constant phase delay W
where, a is a constant phase delay.

Frequency response of LTI UV


H(e jω ) = ±| H(e jω )|e j(β – αω )
system with constant group delay W
where, b is a constant group delay.
Q6.9 What are the conditions to be satisfied for constant phase delay in linear phase FIR filters ?
The conditions for constant phase delay are,

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?

Frequency response of FIR filter with UV


H(e jω ) = ±| H(e jω )|e j(β – αω )
constant group and phase delay W
The following conditions have to be satisfied to achieve constant group and phase delay.
N –1
Phase delay, α = 2
(i. e., phase delay is constant)
π
Group delay, β = ± ( i. e., group delay is constant)
2
Impulse response, h(n) = – h(N – 1 – n) (i.e., impulse response is antisymmetric)
Q6.11. The frequency response of a digital filter is, H(ejw ) = (0.7 + 0.6 cosw – 0.9 cos2w )e – j7.5w
Determine the phase delay and group delay.

Solution

Given that, H(ejw ) = (0.7 + 0.6 cos w – 0.9cos 2w) e–j7.5w .....(1)

Let , H(e jω ) = H(e jω ) ∠ H(e jω )


.....(2)
On comparing equations (1) and (2) we get,
∠ H(e jω ) = −7.5 ω
Let , ∠ H(ejω ) = θ(ω ) = −7.5 ω
θ(ω ) −7.5 ω
Phase delay, τp = − =− = 7.5
ω ω
dθ(ω ) d
Group delay, τ g = − =− (−7.5ω ) = 7.5
dω dω
6. 95 Digital Signal Processing
Q6.12. The frequency response of a digital filter is, H(ejw ) = (0.4 + 0.7 cos2w – 0.5 cos 4w )e – j(0.3p + 4w)
Determine the phase delay and group delay.

Solution

Given that, H(ejw ) = (0.4 + 0.7 cos 2w – 0.5cos 4w) e–j(0.3p + 4w) .....(1)

Let , H(e jω ) = H(ejω ) ∠ H(e jω )

On comparing equations (1) and (2) we get, .....(2)

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 = −

=−

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

Phase function, ∠H(e jω ) = θ(ω ) = – αω

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

Phase function, ∠H(e jω ) = θ(ω ) = – αω

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

Phase function, ∠H(e jω ) = θ(ω ) = β – αω


Chapter 6 - FIR Filters 6.96
Q6.17. Write the magnitude and phase function of FIR filter when impulse response is antisymmetric and
N is even.
N
2
F I
2 hFGH N − nIJK sinG ω FGH n – 1 IJK J
Magnitude function, |H(e jω )|= ∑
n =1
2 H 2 K

Phase function, ∠H(e jω ) = θ(ω ) = β – αω

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

Q6.36 Write the frequency response of Hamming window.

ω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

Q6.37 Give the equation for Hanning window function.

Hanning window , w C ( n) = 0.5 + 0.5 cos FGH 2 πn IJK ; for n = −


N −1 N −1
2
to + 2
N −1
=0 ; other n
Alternatively,
Hanning window , w C ( n) = 0.5 − 0.5 cos e j ; for n = 0 to N − 1
2 πn
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.

Rectangular window Hanning 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 –31dB.
iii. In window spectrum the side-lobe iii. In window spectrum the side-lobe
magnitude slightly decreases magnitude decreases with increasing w.
with increasing w.
iv. In FIR filter designed using iv. In FIR filter designed using Hanning
rectangular window, the minimum window, the minimum stopband
stopband attenuation is 22 dB. attenuation is 44 dB.

Q6.40 Write the equation for Hamming window function.

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.

Q6.42 List the features of Hamming window spectrum.


i. The main-lobe width is equal to 8p/N.
ii. The maximum side-lobe magnitude is –41dB.
iii. The side-lobe magnitude remains constant for increasing w.
Chapter 6 - FIR Filters 6.100
Q6.43 Compare the Hanning and Hamming window.
Hanning window Hamming window
i. The width of main-lobe in window i. The width of main-lobe in window
spectrum is 8p/N. spectrum is 8p/N.
ii. The maximum side-lobe magnitude ii. The maximum side-lobe magnitude
in window spectrum is –31dB. in window spectrum is –41dB.
iii. In window spectrum the side-lobe iii. In window spectrum the side-lobe
magnitude decreases with magnitude remains constant. Here the
increasing w. increased side-lobe attenuation is
achieved at the expense of constant
attenuation at high frequencies.
iv. In FIR filter designed using iv. In FIR filter designed using Hamming
Hanning window, the minimum window, the minimum stopband
stopband attenuation is 44 dB. attenuation is 51 dB.

Q6.44 Write the equation for Blackman window sequence.


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 n = – 2
to +
2
=0 ; other n
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
=0 ; other n
Q6.45 Compare the Hamming and Blackman window.
Hamming window Blackman window
i. The width of main-lobe in window i. The width of main-lobe in window
spectrum is 8p/N. spectrum is 12p/N.
ii. The maximum side-lobe magnitude ii. The maximum side-lobe magnitude
in window spectrum is –41dB. in window spectrum is –58dB.
iii. The higher value of side-lobe iii. The higher value of side-lobe
attenuation is achieved at the attenuation is achieved at the
expense of constant attenuation expense of increased main-lobe
at high frequencies. width.
iv. In window spectrum the side-lobe iv. In window spectrum the side-lobe
magnitude remains constant magnitude decreases rapidly with
with increasing w. increasing w.
v. In FIR filter designed using v. In FIR filter designed using Blackman
Hamming window, the minimum window, the minimum stopband
stopband attenuation is 51dB. attenuation is 78 dB.
6. 101 Digital Signal Processing
Q6.46 List the features of Blackman window spectrum.
i. The main-lobe width is 12p/N.
ii. The maximum side-lobe magnitude is –58 dB.
iii. The side-lobe magnitude decreases with increasing w.
iv. The side-lobe attenuation in Blackman window is the highest among windows, which is achieved
at the expense of increased main-lobe width. However, the main-lobe width can be reduced by
increasing the value of N.
Q6.47 What is the mathematical problem involved in the design of window function?
The mathematical problem involved in designing window function (or sequence) is that of finding a
time limited function whose Fourier transform best approximates a bandlimited function. The
approximation should be such that the maximum energy is confined to main-lobe for a given peak
side-lobe amplitude.
Q6.48 Write the expression for Kaiser window function.
I 0 ( β1 ) N−1 N−1
Kaiser window function, w K ( n) = I0 (a)
; for n = − 2
to + 2

=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

III. Choose the right answer for the following questions


1. The frequency response of a digital filter is periodic in the range
a) 0 < w < 2p b) –p < w < p
c) 0 < w < p d) 0 £ w £ 2p or –p £ w £ p
2. The characteristics of ideal linear phase FIR filter are,
a) |H(ejw )| = constant and Ð H(ejw ) = 1/w.
b) |H(ejw )| = constant and Ð H(ejw ) = –aw.
c) |H(ejw )| = –a w and Ð H(ejw ) = constant.
d) |H(ejw )| = 1/w and Ð H(ejw ) = constant.
Chapter 6 - FIR Filters 6. 116
3. If q(w ) is the phase function of FIR filter then group delay and phase delay of FIR filters are
defined respectively as,

− 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)

5. In FIR filters the Gibbs oscillations are due to


a) non-linear magnitude characteristics.
b) non-linear phase characteristics.
c) Sharp transition from pass-band to stop-band.
d) Gradual transition from pass-band to stop-band.

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,

a) -wC2 £ w £ 0 and +wC2 £ w £ p

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,

a) -wC2 £ w £ -wC1 and w C1 £ w £ w C2 and w C2 £ w £ p

b) –p £ w £ –w C2 and -wC1 £ w £ 0 and 0 £ w £ w C1


c) –w C2 £ w £ 0 and w C1 £ w £ w C2 and w C2 £ w £ p
d) –p £ w £ –w C2 and -wC1 £ w £ w C1 and w C2 £ w £ p
6. 117 Digital Signal Processing
10. Symmetric impulse response having even number of samples can be used to design
a) lowpass and highpass filters.
b) lowpass and bandpass filters.
c) lowpass and bandstop filters.
d) only lowpass filters.

11. Raised cosine windows also called generalized


a) Hamming window. b) Hanning window.
c) Rectangular window. d) Blackman window.

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

IV. Answer the following questions


1. Show that an LTI system can behave as a filter.
2. Prove that linear phase characteristics can be achieved if impulse response is symmetric with symmetry
condition h(N – 1 – n) = h(n) with centre of symmetry at a = (N – 1)/2.
3. Derive the frequency response of linear phase FIR filter when impulse response is symmetric with
centre of symmetry at (N – 1)/2 and N is odd.
4. Derive the frequency response of linear phase FIR filter when impulse response is symmetric with
centre of symmetry at (N – 1)/2 and N is even.
5. Derive the frequency response of linear phase FIR filter when impulse response is antisymmetric with
centre of antisymmetry at (N – 1)/2 and N is odd.
6. Derive the frequency response of linear phase FIR filter when impulse response is antisymmetric with
centre of antisymmetry at (N – 1)/2 and N is even.
7. Discuss the FIR filter design by Fourier series method.
8. Discuss the FIR filter design by window method.
9. Explain the characteristics of rectangular window with typical sketches.
10. Explain the characteristics of Bartlett window with typical sketches.
11. Explain the characteristics of Hamming window with typical sketches.
12. Explain the characteristics of Hanning window with typical sketches.
13. Explain the characteristics of Blackman window with typical sketches.
14. Explain the characteristics of Kaiser window with typical sketches.
15. Discuss the frequency sampling method of FIR filter design.

V. Solve the following problems


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.

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

E6.1 H(z) = 0.67 z −4 + 0.2739 z −3 + z −5 − 01394


. z −2 + z −6 + 0.0033 z−1 + z−7 + 0.0671 1 + z −8

e j
H e jω = A (ω ) = 0.67 + 0.5478 cos ω − 0.2788 cos 2ω + 0.0066 cos 3ω + 01342
. cos 4ω

E6.2 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

e j
H e jω = A (ω ) = 0.425 − 0.619 cosω + 01444
. cos 2ω + 01612
. cos 3ω − 01286
. cos 4ω

E6.3 H(z) = 0.289 z −4 − 01644


. z −3 + z −5 − 0.0767 z −2 + z −6 + 0.1971 z−1 + z −7 − 0.1254 1 + z −8

e j
H e jω = A (ω ) = 0.289 − 0.3288 cos ω − 01534
. cos 2ω + 0.3942 cos 3ω − 0.2508 cos 4ω

E6.4 H(z) = 0.711z −4 + 01644


. z −3 + z −5 + 0.0767 z −2 + z −6 − 01971
. z −1 + z −7 + 01254
. 1 + z −8

e j
H e jω = A (ω ) = = 0.711 + +0.3288cos ω + 0.1534 cos 2 ω − 0.3942 cos 3ω + 0.2508 cos 4 ω

E6.5 H ( z) = 0.35z −2 + 01531


. z −1 + z −3 + 0.0103 1 + z −4

e j
H e jω = A (ω ) = 0.35 + 0.3062cos ω + 0.0206 cos 2ω

E6.6 H ( z) = 0.52 z −2 − 0.3176 z −1 + z −3 − 0.0199 1 + z−4

e j
H e jω = A (ω ) = 0.52 − 0.6352 cosω − 0.0398cos2ω
Chapter 6 - FIR Filters 6. 120

E6.7 H ( z) = 0.13z −2 + 0.0340 z−1 + z −3 − 01088


. 1 + z −4

e j
H e jω = A (ω ) = 0.13 + 0.068 cos ω − 0.2176 cos 2ω

E6.8 H ( z) = 0.87 z −2 − 0.0340 z−1 + z −3 + 01088


. 1 + z −4

e j
H e jω = A (ω ) = 0.87 − 0.068cos ω + 0.2176 cos 2ω

E6.9 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

+ 0.2935 z−4 + z −6 + 0.6363 z −5

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ω

E6.10 H ( z) = 0.0635 1 + z −6 − 0.1781 z −1 + z −5 + 0.2574 z −2 + z −4 + 0 .7142 z −3

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".

6.13. MATLAB Programs


Program 6.1
Write a MATLAB program to determine the impulse response of FIR lowpass Filter by
Fourier series method and hence plot the frequency response.

%Program to plot frequency response of FIR lowpass filter


clear all
clc
wc=.5*pi;
N=11;
hd=zeros(1,N);

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

The magnitude response of FIR lowpass filter designed by Fourier series


method is shown in fig p6.1.

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

F ig P 6 .1 : M a g n itu de resp on se.

Note : Verify the result with example 6.1.

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.

%Program to plot frequency response of highpass filter


clear all
clc

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

F ig P 6 .2 : M a g n itu de resp on se.


Note : Verify the result with example 6.2.
6. 105 Digital Signal Processing

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.

%Program to plot frequency response of bandpass filter


clear all
clc

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

F ig P 6 .3 : M a g n itu de resp on se.

Note : Verify the result with example 6.3.

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.

%Program to plot frequency response of bandstop filter


clear all
clc

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

F ig P 6 .4 : M a g n itu de resp on se.

Note : Verify the result with example 6.4.

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.

%Program to plot frequency response of lowpass filter using


rectangular window
Chapter 6 - FIR Filters 6. 108
clear all
clc

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

F ig P 6 .5 : M a g n itu de resp on se.

Note : Verify the result with example 6.5.

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.

%Program to plot frequency response of highpass filter using Hamming


window
clear all
clc

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

F ig P 6 .6 : M a g n itu de resp on se.

Note : Verify the result with example 6.6.


6. 111 Digital Signal Processing
Program 6.7
Write a MATLAB program to determine the impulse response of FIR bandpass Filter
using Hanning window and hence plot the frequency response.

%Program to plot frequency response of bandpass filter using Hanning


window
clear all
clc

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

F ig P 6 .7 : M a g n itu de resp on se.


Note : Verify the result with example 6.7.

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.

%To plot frequency response of bandstop filter using rectangular window


clear all
clc

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

F ig P 6 .8 : M a g n itu de resp on se.

Note : Verify the result with example 6.8.


Solution for Exercise Problems E6. 1

Digital Signal Processing - A. Nagoor Kani Chapter 6 - FIR Filters

Solution for Exercise Problems

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).

= z −4 h(0) + h(1) z + z −1 + h(2) z2 + −2 + h(3) z3 + z −3 + h(4) z4 + z −4

= h(0)z −4 + h(1) z −3 + z −5 + h(2) z −2 + z −6 + h(3) z −1 + z −7 + h(4) z0 + z −8

= 0.67 z −4 + 0.2739 z −3 + z −5 − 01394


. z −2 + z −6 + 0.0033 z −1 + z −7 + 0.0671 1 + z −8

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)

∴ Y(z) = 0.67 z −4 X(z) + 0.2739 z −3 X(z) + z −5 X(z) − 01394


. z −2 X(z) + z −6 X(z) + 0.0033 z −1 X(z) + z −7 X(z)

+ 0.0671 X(z) + 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

= h(0) + 2h(1)cos ω + 2 h(2)cos 2ω + 2 h(3)cos 3ω + 2 h(4)cos 4ω


= 0.67 + 2 × 0.2739 cos ω + 2 × − 0.1394 cos2ω + 2 × 0.0033 cos 3ω + 2 × 0.0671cos 4ω
= 0.67 + 0.5478 cos ω − 0.2788 cos 2ω + 0.0066 cos 3ω + 0.1342 cos 4ω
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 ) 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.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

|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 resp o n se o f F IR low p a ss filte r.

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

Ω c 2πFc 2π × 2.3 × 103


∴ ω c = ΩcT = = = = 0.575 π rad / sample
Fs Fs 8 × 103
The desired frequency response Hd(ejw ) of highpass filter is,

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

1 When n = 0, the hd(n) becomes


= sin πn − sin ω cn ; for all n, except n = 0.
πn 0/0, which is indeterminate.

When n = 0 ; hd (n) = hd (0) = Lt


LM sin πn − sin ω n OP c
n→ 0 N πn Q U sin g L' Hospital rule,
sin πn sin ω cn sin Aθ
= Lt − Lt Lt =A
n→ 0 πn n→ 0 πn θ→ 0 θ
1 sin πn 1 sin ω cn
= Lt − Lt
π n→0 n π n→0 n
1 1 ω
= ×π − × ωc = 1− c
π π π
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 9 samples.
sin πn − sin ω cn sin ω cn N 1 N−1 For any integer n,
∴ h(n) = hd (n) = =− ; for n = − 2− to +
2
, except n = 0
πn πn sin pn = 0
ωc
= 1− ; for n = 0
π
E6. 4 DSP, Chapter 6 - FIR Filters
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.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

When n = –2 ; h(–2) = h(2) = 0.0722


Using symmetry
When n = –3 ; h(–3) = h(3) = 0.0806 condition,
When n = –4 ; h(–4) = h(4) = –0.0643 h(–n) = h(n).

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).

= z −4 h(0) + h(1) z + z −1 + h(2) z2 + z −2 + h(3) z 3 + z −3 + h(4) z4 + z −4

= h(0) z −4 + h(1) z −3 + z −5 + h(2) z −2 + z −6 + h(3) z −1 + z −7 + h(4) z0 + z −8

= 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

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)

− 0.0643 X(z) + 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)

−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

= h(0) + 2 h(1)cos ω + 2 h(2)cos 2ω + 2 h(3)cos 3ω + 2 h(4)cos 4ω


= 0.425 + 2 × − 0.3095 cos ω + 2 × 0.0722 cos 2ω + 2 × 0.0806 cos 3ω + 2 × − 0.0643 cos 4ω
= 0.425 − 0.619 cos ω + 0.1444 cos 2ω + 0.1612 cos 3ω − 0.1286 cos 4ω
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 ) 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 –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

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 ig h p a ss filte r.

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).

= z −4 h(0) + h(1) z + z −1 + h(2) z2 + z −2 + h(3) z3 + z −3 + h(4) z4 + z −4

= h(0)z −4 + h(1) z −3 + z −5 + h(2) z −2 + z −6 + h(3) z −1 + z −7 + h(4) 1 + z −8

= 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


Solution for Exercise Problems E6. 7
Structure

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)

− 0.1254 X(z) + 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)

−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

= h(0) + 2 h(1)cos ωn + 2 h(2)cos 2ω + 2 h(3)cos 3ω + 2 h(4)cos 4ω


= 0.289 + 2 × − 0.1644 cos ω + 2 × − 0.0767 cos 2ω + 2 × 0.1971cos 3ω + 2 × − 0.1254 cos 4ω
= 0.289 − 0.3288 cos ω − 0.1534 cos 2ω + 0.3942 cos 3ω − 0.2508 cos 4ω

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 ) 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 –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

|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

sin πn + sin ω c1n − sin ω c2n When n = 0, the hd(n) becomes


= ; for all n, except n = 0
πn 0/0, which is indeterminate.
When n = 0 ; hd (n) = hd (0) = Lt + −
LM
sin πn sin ω c1n sin ω c2n OP
n→0 πn πn πn N Q
1 sin πn 1 sin ω c1n 1 sin ω c 2n U sin g L' Hospital rule,
= Lt + Lt − Lt
πn→0 n πn→0 n πn→0 n sin Aθ
Lt =A
1 1 1
= × π + × ω c1 − × ω c2 = 1 −
ω c2 − ω c1 FG IJ θ→ 0 θ
π π π π H K
The impulse response h(n) of FIR filter is obtained by truncating hd(n) to 9 samples.
Solution for Exercise Problems E6. 9
sin ω c1n − sin ω c2n N−1 N−1 For any integer n,
∴ h(n) = hd (n) = ; for n = − 2 to +
2
, except n = 0
πn sin pn = 0

= 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).

= z −4 h(0) + h(1) z + z −1 + h(2) z2 + z −2 + h(3) z 3 + z −3 + h(4) z4 + z −4

= h(0)z −4 + h(1) z −3 + z −5 + h(2) z −2 + z −6 + h(3) z −1 + z −7 + h(4) z0 + z −8

= 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

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)

+ 0.1254 X(z) + 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)

−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

= h(0) + 2 h(1)cos ω + 2 h(2)cos 2ω + 2 h(3)cos 3ω + 2 h(4)cos 4ω


= 0.711+ 2 × 0.1644 cos ω + 2 × 0.0767 cos 2ω + 2 × − 0.1971cos 3ω + 2 × 0.1254 cos 4ω
= 0.711+ +0.3288 cos ω + 0.1534 cos 2 ω − 0.3942 cos 3 ω + 0.2508 cos 4 ω
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 ) 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.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.

Hamming window sequence, w H (n) = 0. 54 + 0.46 cos e j 2 πn


N −1
; for n = −
N −1
2
to +
N −1
2

=0 ; otherwise

∴ Impulse response, h(n) = hd (n) × wH (n)

Here, N = 5, N − 1 = 4 ; ω c = 0.35π rad / sample ; h(−n) = h(n)

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

= z −2 h( −2) z2 + h(−1)z + h(0) + h(1) z −1 + h(2) z −2


Using symmetry
= z −2 h(2) z2 + 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)

= z −2 h(0) + h(1) z −1 + z −3 + h(2) z0 + z −4

= 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)

∴ Y(z) = 0.35 z −2 X(z) + 0.1531 z −1X(z) + z −3 X(z) + 0.0103 X(z) + z −4 X(z)


The above equation, the linear phase FIR lowpass filter structure is drawn as shown fig 1.
−1 −2
−1
z X(z) −1
z X(z)
z 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

= h(0) + 2 h(1)cos ω + 2 h(2)cos 2ω


= 0.35 + 2 × 0.1531cos ω + 2 × 0.0103 cos 2ω
= 0.35 + 0.3062cos ω + 0.0206 cos 2ω
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 ) 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 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

ω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

= z −2 h( −2) z2 + h( −1) z + h(0) + h(1) z −1 + h(2) z −2

= z −2 h(2) z 2 + h(1) z + h(0) + h(1) z −1 + h(2) z −2


Using symmetry
= z −2 h(0) + h(1) z + z −1 + h(2) z2 + z −2 condition,
h(–n) = h(n).
= h(0)z −2 + h(1) z −1 + z −3 + h(2) 1 + z −4

= 0.52z −2 − 0.3176 z −1 + z −3 − 0.0199 1 + z −4


Structure
Y(z)
Let, H(z) = = 0.52 z −2 − 0.3176 z −1 + z −3 − 0.0199 1 + z −4
X(z)

∴ Y(z) = 0.52z −2 X(z) − 0.3176 z −1 X(z) + z −3 X(z) − 0.0199 X(z) + z −4 X(z)


The above equation can be used to draw the FIR filter structure as shown in fig 1.
−1 −2
−1
z X(z) −1 z X(z)
z z

+ +

−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

= h(0) + 2 h(1)cos ω + 2 h(2)cos 2ω


= 0.52 + 2 × ( −0.3176)cosω + 2 × ( −0.0199)cos2ω
= 0.52 − 0.6352 cosω − 0.0398cos2ω
Using the above equation, the amplitude response A(w) and magnitude function (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 ) 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 –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

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 a ss filter.

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

−π
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

∴ Impulse response, h(n) = hd (n) × wR (n)


N−1 N−1
= hd (n) ; for n = − 2
to +
2

Here, N = 5 ; w c1 = 0.35p rad/sample ; w c2 = 0.48p rad/sample ; h(–n) = h(n) ; N – 1 = 4


Hence calculate h(n) for n = –2 to 2.
Since, h(n) satisfies the symmetry condition, h(– n) = h(n), calculate h(n) for n = 0 to 2.

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).

The transfer function H(z) of FIR bandpass 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 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)

= z −2 h(0) + h(1) z −1 + z −3 + h(2) z0 + z −4

= 0.13z −2 + 0.0340 z −1 + z −3 − 0.1088 1 + z −4

Structure

Y(z)
Let, H(z) = = 0.13 z −2 + 0.0340 z –1 + z –3 − 0.1088 1 + z −4
X(z)

∴ Y(z) = 0.13 z −2 X(z) + 0.0340 z –1 X(z) + z –3 X(z) − 0.1088 X(z) + z −4 X(z)


E6. 16 DSP, Chapter 6 - FIR Filters
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.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

= h(0) + 2h(1)cos ω + 2h(2)cos2ω


= 0.13 + 2 × 0.0340 cos ω + 2 × −0.1080 cos 2ωb g
= 0.13 + 0.068 cos ω − 0.2176 cos 2ω
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 ) 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 –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

−π
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

Here, N = 5, N – 1 = 4 ; w c1 = 0.4p rad/sample ; w c2 = 0.65p rad/sample


Hence, calculate h(n) for n = –2 to 2.
Since, h(n) satisfies the symmetry condition, h(–n) = h(n), calculate h(n) for n = 0 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

= z −2 h( −2)z 2 + h( −1)z + h(0)z0 + h(1)z −1 + h(2)z −2 Using symmetry


condition,
= z −2 h(1) z + z −1 + h(2) z2 + z −2 + h(0) h(–n) = h(n).

= h(0)z −2 + h(1) z −1 + z −3 + h(2) 1 + z −4

= 0.87 z −2 − 0.0340 z −1 + z −3 + 0.1088 1 + z −4


E6. 18 DSP, Chapter 6 - FIR Filters
Structure

Y(z)
Let, H(z) = = 0.87 z −2 − 0.0340 z −1 + z −3 + 0.1088 1+ z −4
X(z)

∴ Y(z) = 0.87 z −2 X(z) − 0.0340 z −1 X(z) + z −3 X(z) + 0.1088 X(z) + 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

= h(0) + 2h(1)cos ω + 2h(2)cos2ω


= 0.87 + 2 × (−0.0340)cos ω + 2 × 0.1080 cos 2ω
= 0.87 − 0.068cos ω + 0.2176 cos 2ω

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 ) 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.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

|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

The samples of impulse response h(n) are given by,

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 )

N k = 1NM QPPQ ∴ Re[e jθ ] = cos θ


E6. 20 DSP, Chapter 6 - FIR Filters
1 LM 3
2πk O
∴ h(n) = 1 + 2
MN ∑ cos 11 (n − 5)PP
11 k = 1 Q
1 L 2π (n − 5) 4 π (n − 5) 6π (n − 5) O
11 MN 11 PQ
= 1+ 2 cos + 2cos + 2 cos
11 11
N−1
Here N = 11, \ N – 1 = 10 ; =5
2
Hence, calculate h(n) for n = 0 to 10
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 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

1 L 2π(2 − 5) 4 π(2 − 5) 6 π(2 − 5) O


11 MN 11 PQ
When n = 2 ; h(2) = 1 + 2 cos + 2cos + 2cos = −0.0338
11 11

1 L 2π(3 − 5) 4π(3 − 5) 6π(3 − 5) O


11 MN 11 PQ
When n = 3 ; h(3) = 1 + 2 cos + 2cos + 2cos = −0.1270
11 11

1 L 2π(4 − 5) 4 π(4 − 5) 6π(4 − 5) O


11 MN 11 PQ
When n = 4 ; h(4) = 1 + 2 cos + 2cos + 2cos = 0.2935
11 11

1 L 2π(5 − 5) 4π(5 − 5) 6π(5 − 5) O


11 MN 11 PQ
When n = 5 ; h(5) = 1 + 2 cos + 2cos + 2cos = 0.6363
11 11

When n = 6 ; h(6) = h(11 – 1 – 6) = h(4) = 0.2935

When n = 7 ; h(7) = h(11 – 1 – 7) = h(3) = –0.1270 Using symmetry condition


h(N – 1 – n) = h(n)
When n = 8 ; h(8) = h(11 – 1 – 8) = h(2) = –0.0338

When n = 9 ; h(9) = h(11 – 1 – 9) = h(1) = 0.0989

When n = 10 ; h(10) = h(11 – 1 – 10) = h(0) = –0.0496


The transfer function H(z) of the filter is given by Z-transform of h(n).
N−1 10
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 + h(7) z −7

+ h(8) z −8 + h(9) z −9 + h(10) z −10

= 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 Using symmetry


condition,
= h(0) 1+ z −10 + h(1) z −1 + z −9 + h(2) z −2 + z −8 + h(3) z −3 + z −7 h(N – 1 – n) = h(n)

+ h(4) z −4 + z −6 + h(5) z −5

= −0.0496 1+ z −10 + 0.0989 z −1 + z −9 − 0.0338 z −2 + z −8 − 0 .1270 z −3 + z −7

+ 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)

− 0.1270 z −3 X(z) + z −7 X(z) + 0.2935 z −4 X(z) + z −6 X(z) + 0.6363 z −5X(z)


Solution for Exercise Problems E6. 21
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)

−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

= h(5) + 2h(4)cos ω + 2h(3)cos 2ω + 2 h(2) cos 3ω + 2 h(1) cos 4ω + 2 h(0) cos 5ω


= 0.6363 + 2 × 0.2935 cos ω + 2 × ( −0.1270)cos 2ω + 2 × ( −0.0338) cos 3ω
+ 2 × 0.0989 cos 4ω + 2 × (−0.0496) cos 5ω
= 0.6363 + 0.587 cosω − 0.254 cos 2ω − 0.0676 cos 3ω + 0.1978 cos 4ω − 0.0992 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 these values the magnitude response is plotted as shown in fig 2.

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× π 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

F ig 2 : M a g n itud e resp o nse of F IR L in ea r p h a se filter.


22 π
16
21π
16
20π
16
19π
16
18 π
16
17 π
16
16 π

( π)
16
15π
16
14 π
16
13 π
16
12 π
16
11π
16
10π
16

16

16

16

16

16

16

16

16
16

|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.

H d (e jω ) = e − j3ω ; 0 ≤ ω ≤ 0.6π and 1.4π ≤ ω ≤ 2π


=0 ; 0.6π < ω < 1.4π

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,

Hd (e jω ) = e − j3ω ; 0 ≤ ω ≤ 0.6π and 1.4 π ≤ ω ≤ 2π


=0 ; 0.6 π < ω < 1.4 π

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

F ig 2 : S a m p lin g p o in ts o f H d (e jω). F ig 3 : M agnitude spectrum of H (k).

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

1 L 2π(n − 3) 4π(n − 3) O e jθ = cos θ + j sin θ


= M1 + 2 cos + 2 cos PQ
7 N 7 7 ∴ Re[e jθ ] = cos θ
E6. 24 DSP, Chapter 6 - FIR Filters
N−1
Here N = 7, \ N – 1 = 6 ; =3
2
Hence, calculate h(n) for n = 0 to 6
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 3.

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

= 0.0635 1+ z −6 − 0.1781 z −1 + z −5 + 0.2574 z −2 + z −4 + 0 .7142 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

= h(3) + 2h(2)cos ω + 2h(1)cos 2ω + 2 h(0) cos 3ω


= 0.7142 + 2 × 0.2574 cos ω + 2 × ( −0.1781)cos 2ω + 2 × 0.0635 cos 3ω
= 0.7142 + 0.5148 cos ω − 0.3562 cos 2ω + 0127
. cos 3ω
|H (e jω)|
Solution for Exercise Problems

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

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 π


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
( π)

F ig 5 : M a g n itu d e resp o nse of F IR L in e a r p h a se filte r.


Using the above equation, the magnitude response, A(w) and magnitude function |H(e )| are calculated for various values of w and
E6. 25
E6. 26 DSP, Chapter 6 - FIR Filters
jw
TABLE 1: A(w
w ) and |H(e )| for various values of w
w

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

Digital Filter Analog Filter


1. Operates on digital samples 1. Operates on analog signals
(or sampled version) of the signal. (or actual signals).
2. It is governed (or defined) by linear 2. It is governed (or defined) by linear
difference equation. differential equation.
7. 3 Digital Signal Processing
Table 7.1 : continued...
Digital Filter Analog Filter
3. It consists of adders, multipliers and 3. It consists of electrical components
delays implemented in digital logic like resistors, capacitors and inductors.
(either in hardware or software or both)
4. In digital filters the filter coefficients 4. In analog filters the approximation
are designed to satisfy the desired problem is solved to satisfy the desired
frequency response. frequency response.

7.2 Frequency Response of Analog and Digital IIR Filters


The filters are frequency selective devices and so they are designed to pass the spectral content of the
input signal in a specified band of frequencies. Hence, based on frequency response the filters are classified
into four basic types. They are lowpass, highpass, bandpass and bandstop filters.
The ideal magnitude response, |Hd(jW )| of the four basic types of analog filters are shown in fig 7.1 (a),
(b), (c) and (d). The ideal magnitude response has sudden transition from passband to stopband which is
practically not realizable. Hence the ideal response is approximated using a filter approximation function.
The approximation problem is solved to meet a specified tolerance in the passband and stopband. The
shaded areas in the fig 7.1 shows the tolerance regions of the ideal frequency response. In the passband the
magnitude is approximated to unity within an error of dp. In the stopband the magnitude is approximated to
zero within an error of ds. Here the dp and ds are the limits of the tolerance in the passband and stopband. The
dp and ds are also called ripples.
The magnitude response of practical or approximated analog filters, |H(jW )| are shown in fig 7.1 (e), (f),
(g) and (h). The frequency repsonse of practical analog filter shows edges for passband and stopband so that
the tolerances are within specified limits. Now, the specification of practical analog filter will be the following.
W p = Passband edge frequency in rad/second.
W s = Stopband edge frequency in rad/second.
Ap = Gain at passband edge frequency
As = Gain at stopband edge frequency
The ideal magnitude response, |Hd(ejw )| of the four basic types of digital IIR filters are shown in fig 7.2
(a), (b), (c) and (d). The ideal magnitude response has sudden transition from passband to stopband which is
practically not possible. The transformation of analog to digital filter will preserve the magnitude response,
and so the magnitude response of digital filter will be similar to analog filter, (but the frequency response of
digital filter is periodic with period 2p). Therefore the practical frequency response of digital IIR filters will be
similar to analog filter as shown in fig 7.2 (e), (f), (g) and (h). The magnitude response of practical digital IIR
filter shows edges for passband and stopband so that the tolerances are within specified limits. Now, the
specifications of practical digital IIR filter will be the following.
w p = Passband edge frequency in rad/sample
w s = Stopband edge frequency in rad/sample
Ap = Gain at passband edge frequency
As = Gain at stopband edge frequency
Chapter 7 - IIR Filters 7. 4
|H (j Ω)|
|H d (j Ω)|
1
δp
1 Ap
A p = 1 − δp
1 A s = δs
= 0.707
2

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

S topband P as sband S topband S topband


F ig c : N orm alized m ag n itud e respo n se o f id eal F ig g : N orm alized m ag n itud e respo n se o f p ra ctical
a na log b a nd pa ss filter. a na log b a nd pa ss filter.

|H (j Ω)|
1
|H d (j Ω)| δp
Ap
1 1
= 0.707
2

As
δs
0 Ω

0 Ωc2

Ωc1
S topband

P as sband S topband P as sband P as sband


F ig d : N orm alized m ag n itud e respo n se o f id eal F ig h : N orm alized m ag n itud e respo n se o f p ra ctical
a na log b an d sto p filter. a na log b an d sto p filter.
F ig 7.1 : N o rm a lized freq u en c y resp o nse of id ea l a n d pra ctica l a n alo g filte rs.
7. 5 Digital Signal Processing


|H d (e )| |H (e )|
1 δp
1
Ap
A p = 1 − δp
1 A s = δs
= 0.707
2

As
δs
ωp ωc ωs ω
0 ωc
ω 0

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 eal F ig e : N orm alized m ag n itud e respo n se o f p ra ctical
d igital IIR lo w p ass filter. d igital IIR lo w p ass filter.

|H d ( e )| jω
|H ( e )|
1 1
δp
Ap
1
= 0.707
2

δs
As

ω ωs ωc ωp ω
0 ωc 0

S topband P as sband S topband T ransition P as sband


band
F ig b : N orm alized m ag n itud e resp on se o f id eal F ig f : N orm alized m ag n itud e resp on se o f p ra ctica l
d igital IIR high pa ss filter. d igital IIR high pa ss filter.

|H ( e )|

1
|H d ( e )| δp
Ap
1 1
= 0.707
2

As
δs
0
ω

ωc1 ωc2
ω
0 P as sband

S topband P as sband S topband S topband


F ig c : N orm alized m ag n itud e respo n se o f id eal F ig g : N orm alized m ag n itud e respo n se o f p ractica l
d igital IIR ba n dp ass filter. d igital IIR ba n dp ass filter.


|H ( e )|
1

|H d ( e )| δp
Ap
1 1
= 0.707
2

As
δs
0
ω

0 ωc1 ωc2
ω
S topband

P as sband S topband P as sband P as sband


F ig d : N orm alized m ag n itud e respo n se o f id eal F ig h : N orm alized m ag n itud e respo n se o f p ra ctical
d igita l IIR b an dstop filter. d igita l IIR ba n dstop filter.
F ig 7.2 : N o rm a lized freq u en c y resp o n se o f id ea l a n d p ra c tica l d igital IIR filte rs.
Chapter 7 - IIR Filters 7. 6

7.3 Impulse Invariant Transformation


The objective of impulse invariant transformation is to develop an IIR filter transfer function whose
impulse response is the sampled version of the impulse response of the analog filter. The main idea behind
this technique is to preserve the frequency response characteristics of the analog filter. It can be stated that
the frequency response of digital filter will be identical with the frequency response of the corresponding
analog filter if the sampling time period T is selected sufficiently small (or the sampling frequency should be
high) to minimize (or avoid completely) the effects of aliasing.
Let, h(t) = Impulse response of analog filter
The Laplace transform of the analog impulse response h(t) gives the transfer function of analog filter.
\ Transfer function of analog filter, H(s) = L{h(t)}.
When H(s) has N number of distinct poles, it can be expressed as shown in equation (7.1) by partial
fraction expansion.
N
Ai A1 A2 AN .....(7.1)
H ( s) = ∑ s + pi
=
s + p1
+
s + p2
+ ..... +
s + pN
i=1
1
On taking inverse Laplace transform of equation (7.1) we get, o t
L e − at u( t ) =
s+a
N
h( t ) = ∑ A i e − p t u( t )
i = A1 e− p1t u( t ) + A 2 e− p 2 t u( t ) + ..... + A N e − p N t u( t ) ....(7.2)
i=1

where, u(t) = Continuous time unit step function.


Let, T = Sampling period.
h(n) = Impulse response of digital filter.
The impulse response of the digital filter is obtained by uniformly sampling the impulse response of
the analog filter.
∴ h( n) = h( t ) = h( nT)
t = nT

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)

On taking Z-transform of equation (7.3) we get, 1


o t
Z e − anT u( nT) =
1 − e − aT z −1
1 1
H( z) = Z{h( n)} = A1 + A2 + .....
1 − e − p1T z −1 1 − e − p 2 T z −1
N
1 1 .....(7.4)
+ AN
1 − e − pNT
z −1
= ∑ A i 1 − e − p T z −1
i
i=1
7. 7 Digital Signal Processing
Comparing the expression of H(s) and H(z) [i.e., equations (7.1) and (7.4)] we can say that,

1 1 .....(7.5)
(
is transformed to )
→ − p i T −1
s + pi 1 − e z

by impulse invariant transformation, where T is the sampling time period.


When a discrete time signal is obtained by sampling analog signal, the frequency spectrum of
discrete signal will be scaled by a factor 1/T (Refer section 4.7 of Chapter 4). Due to this fact, the transfer
function obtained by impulse invariant method is amplified by the factor 1/T for small values of T. If this
amplification is undesirable then the transfer function obtained by impulse invariant tranformation can be
multiplied by T to obtain magnitude normalized transfer function HN(z).
\ HN(z) = T ´ H(z) .....(7.6)
7.3.1 Relation Between Analog and Digital Filter Poles in Impulse Invariant Transformation
The analog poles are given by the roots of the term (s + pi), for i = 1, 2, 3, ....., N. The digital poles are
given by the roots of the term (1 − e− p i T z−1 ), for i = 1, 2, 3, ....., N. From equation (7.5) we can say that the
−p T
analog pole at s = –pi is transformed into a digital pole at z = e i
Consider the digital pole, zi = e− pi T ..... (7.7) jΩ s-p lan e
Put, –pi = si in equation (7.7).
LH P RHP
jΩi si
∴ zi = e − p i T = e si T ..... (7.8)

We know that, "s i" is a point on s-plane. Let the


σi
coordinates of si be si and jW i as shown in fig 7.3.
F ig 7 .3 : s-pla n e.
∴ si = σ i + jΩi ..... (7.9)

Using equation (7.9), the equation (7.8) can be written as,

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)

On separating the magnitude and phase of equation (7.10) we get,


|zi | = e σ i T and ∠z i = Ω iT ..... (7.11)

From equation (7.11) the following observations can be made.


1. If si < 0 (i.e., si is negative), then the analog pole "si" lie on Left Half (LHP) of s-plane. In this
case, |z i| < 1, hence the corresponding digital pole "z i" will lie inside the unit circle in z-plane.
2. If si = 0 (i.e., real part is zero), then the analog pole "si" lie on imaginary axis of s-plane. In this
case, |z i| = 1, hence the corresponding digital pole "z i" will lie on the unit circle in z-plane.
3. If si > 0 (i.e., si is positive), then the analog pole "si" lie on the Right Half (RHP) of s-plane. In
this case |z i| >1, hence the corresponding digital pole will lie outside the unit circle in z-plane.
Chapter 7 - IIR Filters 7. 8
The above discussions are applicable for mapping any point on s-plane to z-plane. In general the
impulse invariant transformation maps all points in the s-plane given by,
2 πk ..... (7.12)
si = σ i + jΩi + j , for k = 0, ± 1, ± 2 .....
T
into a single point in the z-plane as For integer k,
FG σi + jΩi + IJ
j2 πk
T ej2pk = 1
zi = eH T K = eσ i T e jΩi T e j2 πk = eσ i T e jΩi T ..... (7.13)
From equations (7.12) and (7.13) we can say that the strip of width 2p/T in the s-plane for values 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 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 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 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. 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 7.4. Therefore we can say that the impulse invariant mapping is many-to-one mapping (and does
not provide one-to-one mapping).

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

(s + a) 1 − e − aT (cos bT) z −1 ....(7.18)



→
(s + a ) 2 + b2 1 − 2e − aT (cos bT) z −1 + e −2 aT z−2

b e − aT (sin bT) z−1



→
(s + a ) 2 + b2 1 − 2e − aT (cos bT) z −1 + e −2 aT z−2 ....(7.19)

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.

Solution The roots of quadratic,


2 2 s 2 + 3s + 2 = 0 are,
Given that, H(s) = 2
=
s + 3s + 2 (s + 1) (s + 2)
−3 ± 32 − 4 × 2
By partial fraction expansion technique we can write, s=
2
2 A B
H(s) = = + −3 ± 1
(s + 1) (s + 2) s + 1 s + 2 = = −1, − 2
2
2 2
A= × (s + 1) = =2
(s + 1) (s + 2) s = −1 − 1 +2

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 − e–2T 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 − 0.2706z −1 − 2 + 0.7358z−1 0.4652 z−1


= −1 −1 −2
=
1 − 0.1353 z − 0.3679z + 0.0498z 1 − 0.5032z−1 + 0.0498z −2
Alternatively,
0.4652 z−1 0.4652 z−1
H(z) = −1 −2
= −2 2
1 − 0.5032 z + 0.0498 z z (z − 0.5032 z + 0.0498)
0.4652z
=
z2 − 0.5032 z + 0.0498

(b) When T = 0.1 second


2 −2
H(z) = +
1 − e−0.1 z −1 1 − e−0.2 z−1
2 −2 2(1 − 0.8187z −1) − 2(1 − 0.9048z−1)
= −1
+ −1
=
1 − 0.9048z 1 − 0.8187z (1 − 0.9048z−1) (1 − 0.8187z−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

Since, T < 1, we can compute magnitude normalized transfer function, HN(z).


0.1722 z −1 0.0172 z −1
HN(z) = T × H(z) = 0.1 × −1 −2
=
1 − 1. 7235 z + 0.7408 z 1 − 1. 7235 z −1 + 0.7408z −2

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

Method - II The roots of the quadratic


s2 + 0.2s + 9.01 = 0 are
(s + 0.1) s + 0.1
Given that, H(s) = = −0.2 ± 0.22 − 4 × 9.01
(s + 0.1)2 + 9 s 2 + 2 × 0.1 × s + 0.12 + 9 s=
2
s + 0.1 s + 0.1 −0.2 1
= = = ± −36 = −0.1 ± j3
s 2 + 0.2s + 9.01 (s + 0.1 − j3) (s + 0.1+ j3) 2 2
∴ (s 2 + 0.2s + 9.01)
By partial fraction expansion H(s) can be expressed as,
= (s − (−0.1 + j3)) (s − (− 0.1 − j3))
s + 0.1 A A∗
H(s) = = + = (s + 0.1 − j3)(s + 0.1+ j3)
(s + 0.1 − j3) (s + 0.1+ j3) s + 0.1 − j3 s + 0.1 + j3

s + 0.1 −0.1 + j3 + 0.1 j3


A= × (s + 0.1− j3) = = = 0.5
(s + 0.1− j3) (s + 0.1+ j3) s = − 0.1+ j3
−0.1 + j3 + 0.1 + j3 j6

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

0.5 (1 − e−0.1 e− j3 z−1) + 0.5(1 − e−0.1 e j3 z−1)


=
(1 − e−0.1 e j3 z−1) (1 − e−0.1 e− j3 z−1)
Chapter 7 - IIR Filters 7. 12

0.5 − 0.5 e−0.1 e− j3 z−1 + 0.5 − 0.5 e−0.1 e j3 z −1


∴ H(z) =
1 − e −0.1 e− j3 z −1 − e −0.1 e j3 z−1 + e −0.1 e j3 e−0.1 e –j3 z−2
1 − 0.5 e−0.1 z −1(e j3 + e− j3 )
=
1 − e −0.1 z−1 (e j3 + e − j3 ) + e−0.2 z−2

1 − 0.5 × (2 cos3) e−0.1 z−1


=
1 − e −0.1 z−1 (2 cos 3) + e−0.2 z−2 e jθ + e − jθ
cosθ =
2
1 − (cos 3) e−0.1 z−1
=
1 − 2(cos 3) e−0.1 z −1 + e−0.2 z −2
Note : Evalutate cos q by keeping
1+ 0.8958 z−1 calculator in radian mode.
=
1 + 17916
. z−1 + 0.8187 z−2
Alternatively,

1 + 0.8958 z −1 1 + 0.8958 z−1


H(z) = −1 −2
= −2 2
1 + 1. 7916 z + 0. 8187 z z (z + 1. 7916 z + 0. 8187)
z2 + 0.8958 z
= 2
z + 1. 7916 z + 0. 8187

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.8s 2 + 4.8s + 2.9


Given that, H(s) =
(s + 3) (s 2 + s + 0.85)
By partial fraction expansion technique H(s) can be expressed as,
2.8s 2 + 4.8s + 2.9 A Bs + C
H(s) = = +
(s + 3) (s 2 + s + 0.85) s + 3 s 2 + s + 0.85
On cross multiplying the above equation we get,
2.8s 2 + 4.8s + 2.9 = A(s 2 + s + 0.85) + (Bs + C) (s + 3)

2.8s 2 + 4.8s + 2.9 = As 2 + As + 0.85A + Bs 2 + 3Bs + Cs + 3C

On equating coefficients On equating coefficients of s we get, On equating constants we get,


2
of s we get, A + 3B + C = 4.8 0.85 A + 3C = 2.9
A + B= 2.8 Put, B = 2.8 – A Put, C = 2A – 3.6
\ B = 2.8 – A \ A + 3 (2.8 – A) + C = 4.8 \ 0.85A + 3 (2A – 3.6) = 2.9
A + 8.4 – 3A + C = 4.8 0.85A + 6A – 10.8 = 2.9
C = 4.8 –8.4 + 2A 6.85A = 2.9 + 10.8
\ C = 2A – 3.6 2.9 + 10.8
A= =2
6.85
7. 13 Digital Signal Processing
Here, A = 2
\ B = 2.8 – A = 2.8 – 2 = 0.8
C = 2A – 3.6 = 2 ´ 2 – 3.6 = 0.4
(a + b)2 = a2 + 2ab +b2
0 .4
∴ H(s) =
2 0.8s + 0.4
+ 2 =
2
+ 2
0.8 s +
0.8 e j
s + 3 s + s + 0.85 s + 3 s + (2 × 0.5) s + 0.52 − 0.52 + 0.85

2 0.8 (s + 0.5) 2 0.8(s + 0.5)


= + = +
s + 3 (s + 0.5)2 + 0.6 s + 3 (s + 0.5)2 + 0.6 2
e j
1 (s + 0.5)
= 2× + 0.8 ×
s +3 (s + 0.5)2 + 0. 77462
Using equations (7.17)
Now, using impulse invariant transformation,
and (7.18).
1 1 − e−0.5T (cos 0.7746T ) z−1
H(z) = 2 × + 0.8 ×
1 − e−3T z−1 1 − 2e −0.5T
(cos 0.7746T) z−1 + e −2 × 0.5T z−2

2 0.8 − 0.8 e −0.5 × 0.5 (cos 0.7746 × 0.5) z−1


= + Put, T = 0.5
1 − e−3 × 0.5z−1 1 − 2e−0.5 × 0.5(cos 0.7746 × 0.5) z−1 + e −2 × 0.5 × 0.5 z−2

2 0.8 − 0.5769 z−1


= −1
+
1 − 0.2231z 1 − 1.4422 z −1 + 0.6065 z−2
2 (1 − 1.4422 z−1 + 0.6065 z−2 ) + (0.8 − 0.5769 z−1) (1 − 0.2231z−1)
=
(1 − 0.2231z−1) (1 − 1.4422 z−1 + 0.6065 z−2 )

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

Since, T < 1, we can compute magnitude normalized transfer function, HN(z).


2 .8 − 3.6398 z −1 + 13417
. z −2 14
. − 18199
. z −1 + 0.6709 z −2
HN(z) = T × H(z) = 0.5 × −1 −2 −3
=
1 − 1.6653 z + 0.9283 z − 0.1353 z 1 − 1.6653 z −1 + 0.9283 z −2 − 0.1353 z −3

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

Method - II The roots of the quadratic


2 s2 + s + 0.85 = 0 are,
2.8s + 4.8s + 2 .9
Given that, H(s) =
(s + 3) (s 2 + s + 0.85) s=
−1 ± 12 − 4 × 0.85
2
2.8s 2 + 4.8s + 2 .9 −1 ± j1.5492
= =
(s + 3) (s + 0.5 − j0.7746) (s + 0.5 + j0.7746) 2
= −0.5 ± j 0.7746
Chapter 7 - IIR Filters 7. 14
By partial fraction expansion technique H(s) can be expressed as,
2.8s 2 + 4.8s + 2 .9 A B B∗
H(s) = = + +
(s + 3) (s + 0.5 − j0.7746) (s + 0.5 + j0.7746) s + 3 s + 0.5 − j0.7746 s + 0.5 + j0.7746

2.8s 2 + 4.8s + 2 .9 2.8s 2 + 4.8s + 2 .9


A= × (s + 3) =
(s + 3) (s + 0.5 − j0.7746) (s + 0.5 + j0.7746)
s =−3
s 2 + s + 0.85 s = −3

2.8 × ( −3)2 + 4.8( −3) + 2 .9


= =2
( −3)2 + (−3) + 0.85
2.8s 2 + 4.8s + 2 .9
B= × (s + 0.5 − j0.7746)
(s + 3) (s + 0.5 − j0.7746) (s + 0.5 + j0.7746)
s= −0.5+ j0.7746

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)

Using impulse invariant transformation, H(s) is transformed to H(z) as shown below.

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

2.8 − 3.6398 z−1 + 1.3417 z−2


=
1 − 1.6653 z−1 + 0.9283 z−2 − 0.1353 z−3

Alternatively,

2.8 − 3.6398 z−1 + 1.3417 z −2


H(z) =
1 − 1.6653 z−1 + 0.9283 z−2 − 0.1353 z−3

=
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

7.4 Bilinear Transformation


The bilinear transformation is a conformal mapping that transforms the imaginary axis of s-plane
into the unit circle in the z-plane only once, thus avoiding aliasing of frequency components. In this
mapping all points in the left half of s-plane are mapped inside the unit circle in the z-plane and all points in
the right half of s-plane are mapped outside the unit circle in the z-plane.
The bilinear transformation can be linked to the trapezoidal formula for numerical integration. Any
analog system is governed by a differential equation in time domain. Consider the first order differential
equation of an analog system as shown in equation (7.20).

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

From equation (7.31) the following observations can be made,


1. If si < 0 (i.e., si is negative), then the point si = si + jW i, lie on the left half of s-plane. In this
case, |zi| < 1, hence the corresponding point in z-plane will lie inside the unit circle in z-plane.
2. If si = 0 (i.e., real part is zero), then the point si = si + jW i lie on the imaginary axis in the
s-plane. In this case, |zi| = 1, hence the corresponding point in z-plane will lie on the unit circle
in z-plane.
3. If si > 0 (i.e., si is positive), then the point si = si + jW i lie on the right half of s-plane. In this
case, |zi| > 1, hence the corresponding point in z-plane will lie outside the unit circle in z-plane.
The above discussions are applicable for mapping poles and zeros from s-plane to z-plane. The
stability of the filter is associated with location of poles. We know that for a stable analog filter the poles
should lie on the left half of s-plane. In bilinear transformation, the points on left half of s-plane are mapped
as points inside unit circle in z-plane. Hence for stability of digital filter the digital poles should lie inside the
unit circle in z-plane.

jΩ jv
U n it c ircle j1

LHP RHP

σ −1 1 u

−j1

F ig 7 .5a : s-pla ne. F ig 7 .5b : z-pla ne.


F ig 7 .5 : M a p p in g o f s-p la n e in to z-p la n e in b ilin e a r tra nsform a tio n.

7.4.2 Relation Between Analog and Digital Frequency in Bilinear Transformation


Let, s = jW be points on imaginary axis and the corresponding points on the z-plane on unit circle
are given by z = ejw . For bilinear transformation,
2 1 − z −1 .....(7.32)
s=
T 1 + z −1
Put, s = jW and z = e jw in equation (7.32)

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.


|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

2 + 4z −1 + 2z−2 2 + 4z−1 + 2z−2


= =
12 − 4z−1
12 1 −
FG
4 −1
z
IJ
12 H K
2 4 −1 2 −2
+ z + z 0.1667 + 0.3333 z −1 + 0.1667 z−2
= 12 12 12 =
4 −1 1 − 0.3333 z−1
1− z
12
Alternatively,

0.1667 + 0.3333 z −1 + 0.1667 z −2 z −2(0.1667 z 2 + 0.3333 z + 0.1667)


H(z) = =
1 − 0.3333 z −1 1 − 0.3333 z −1

0.1667 z2 + 0.3333 z + 0.1667


=
z2 − 0.3333 z

(b) T = 0.1 second


2

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,

0.0043 + 0.0087 z −1 + 0.0043 z −2 z −2(0.0043z2 + 0.0087 z + 0.0043)


H(z) = =
1 − 17229
. z−1 + 0.7403 z−2 z −2(z2 − 1. 7229 z + 0.7403)
0.0043z2 + 0.0087 z + 0.0043
=
z2 − 1. 7229 z + 0.7403
7. 21 Digital Signal Processing
Example 7.5
2s
Obtain H(z) from H(s) when T = 1 second and H(s) =
s 2 + 0.2s + 1
Solution

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 − 0. 7407 z −1 0 .7407 − 0. 7407 z −1


H(z) = =
1 − 1.111z −1 + 0.8519 z −2 z (z2 − 1.111z + 0.8519)
−2

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

8 1 − 3z−1 + 3z−2 − z−3


=
21 − 18z−1 + 9z −2 − 7z −1 + 6z−2 − 3z−3
8 − 24z−1 + 24z−2 − 8z −3
=
21 − 25z−1 + 15z −2 − 3z −3
8 24 −1 24 −2 8 −3
− z + z − z
= 21 21 21 21
25 −1 15 −2 3 −3
1− z + z − z
21 21 21
0.381 − 11429
. z −1 + 11429
. z −2 − 0.381z−3
=
.
1 − 11905 z + 0.7143 z − 0.1429 z−3
−1 −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

s + 0.3 s + 0.3 s + 0.3


Given that, H(s) = = =
(s + 0.3)2 + 16 s 2 + 0.6s + 0.09 + 16 s 2 + 0.6s + 16.09

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)

2(1 − z−1) + 0.3T(1 + z −1)


T(1+ z −1)
= −1 2
. T(1 − z −1)(1 + z −1) + 16.09 T 2 (1 + z −1)2
4(1 − z ) + 12
T 2(1+ z−1)2
2(1 − z−1) + 0.3T(1 + z −1) T(1 + z−1)
=
4(1 − z −1)2 + 12
. T(1 − z−2 ) + 16.09 T 2 (1 + z−1)2

2(1 − z−1) + 0.3 × 0.5(1 + z−1) 0.5(1 + z−1) Put, T = 0.5


=
4(1 − z−1)2 + 12
. × 0.5(1 − z−2 ) + 16.09 × 0.52(1 + z−1)2
(1 − z−1)(1 + z−1) + 0.075(1 + z−1)2
=
4(1 − z−1)2 + 0.6 (1 − z−2 ) + 4.0225 (1 + z −1)2

(1 − z−2 ) + 0.075 (1 + 2z−1 + z−2 )


= −1
4(1 − 2z + z−2 ) + 0.6 (1 − z−2 ) + 4.0225 (1 + 2z−1 + z−2 )
1.075 + 0.15z−1 − 0.925 z−2
=
8.6225 + 0.045 z−1 + 7.4225 z−2
1.075 0.15 −1 0.925 −2
+ z − z 0.1247 + 0.0174 z−1 − 0.1073 z−2
= 8.6225 8.6225 8.6225 =
0.045 −1 7.4225 −2 1 + 0.0052 z−1 + 0.8608 z−2
1+ z + z
8.6225 8.6225

Alternatively,

0.1247 + 0.0174 z−1 − 0.1073 z−2


H(z) =
1 + 0.0052 z−1 + 0.8608 z−2
z−2 (0.1247 z2 + 0.0174z − 0.1073)
=
z−2(z2 + 0.0052 z + 0.8608)
0.1247 z2 + 0.0174 z − 0.1073
=
z2 + 0.0052 z + 0.8608
Chapter 7 - IIR Filters 7. 24

7.5 Specifications of Digital IIR Lowpass Filter


Let, H(ejw ) = Frequency response of IIR filter.
|H(ejw )| = Magnitude response of IIR filter.
The magnitude response, |H(ejw )| of IIR filter will have a passband, transition band and stop band. The
specification of the IIR filter can be expressed in any one of the following three different ways.
Case i : Gain at passband and stopband edge frequency
Case ii : Attenuation at passband and stopband edge frequency
Case iii : Ripple at passband and stopband edge frequency
Case i : Gain at passband and stopband edge frequency
The gain can be expressed either in normal values or in decibels (dB).
The maximum value of normalized gain is unity and so the gain at band edge frequencies will be less
than 1. Therefore, the dB-gain will be negative.
Let, w p = Passband edge digital frequency in rad/sample.
w s = Stopband edge digital frequency in rad/sample.
Ap = |H(ejw )|w = w p = Gain (or magnitude) at passband edge frequency.
As = |H(ejw )|w = w s = Gain (or magnitude) at stopband edge frequency.
Ap,dB = 20 log [|H(ejw )|w = w p] = dB-Gain (or dB-magnitude) at passband edge frequency.
As,dB = 20 log [|H(ejw )|w = w s] = dB-Gain (or dB-magnitude) at stopband edge frequency.
The gain in normal values can be converted to dB-gain or vice versa as shown below.
Ap,dB = 20 log Ap Þ Ap = 10(Ap,dB /20)
As,dB = 20 log As Þ As = 10(As,dB /20)
Example
Let, Ap = 0.8
As = 0.2
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 » –2dB
As,dB = 20 log As = 20 log 0.2 = – 13.9794 dB » –14dB
The dB-gain can be converted back to gain in normal values as shown below.
Ap = 10(Ap,dB /20) = 10(–1.9382/20) = 0.8
As = 10(As,dB /20) = 10(–13.9794/20) = 0.2
The magnitude response and log-magnitude response of a digital IIR lowpass filter are shown in fig 7.9.

A = |H (e )| ωp ωs

0 ω
A = |H (e )|
A p, dB = −2dB
1
δp
A p = 0 .8

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

a s = 10(ds,dB /20) = 10(13.9794/20) = 5

7.6 Design of Lowpass Digital Butterworth Filter


The popular methods of designing IIR digital filter involves the design of equivalent analog filter and
then converting the analog filter to digital filter. Hence to design a Butterworth IIR digital filter, first an analog
butterworth filter transfer function is determined using the given specifications. Then the analog filter transfer
function is converted to a digital filter transfer function by using either impulse invariant transformation or
bilinear transformation.
7.6.1 Analog Butterworth Filter
The analog butterworth filter is designed by approximating the ideal analog filter frequency response,
H(jW ) using an error function. The error function is selected such that the magnitude is maximally flat in the
passband and monotonically decreasing in the stopband. (Strictly saying, the magnitude is maximally flat at
the origin i.e., at W = 0, and monotonically decreasing with increasing W ).
The magnitude response of lowpass filter obtained by this approximation is given by,
2 1
H ( jΩ) = 2N ..... (7.35)
1+ e j

Ωc

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).

2. At the cutoff frequency W c the magnitude of normalized Butterworth filter is 1 2


(i.e., |H(jW )| = 1 2 = 0.707). Hence the dB magnitude at the cutoff frequency will be 3 dB
less than the maximum value.
3. The filter order N completely specifies the filter.
4. The magnitude is maximally flat at the origin.
5. The magnitude is a monotonically decreasing function of W .
6. The magnitude response approaches the ideal response as the value of N increases.
7.6.2 Poles of Butterworth Lowpass Filter
Let us equate the denominator polynomial of equation (7.38) to zero and solve the 2N poles of
Butterworth lowpass filter.

∴ 1 + ( − s2n ) N = 0 ⇒ 1 + ( −1) N s2N .....(7.39)


n =0

case i : When N is odd


When N is odd, (–1)N = –1
Hence the equation (7.39) can be written as,
1
1 − s2N
n =0 ⇒ s2N
n = 1 ⇒ sn = 1
2N

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

When k = 1 ; sn = ejπ ×1 = 1∠π = cos π + j sin π = −1 + j0 = p1

When k = 2 ; sn = e jπ × 2 = 1∠2π = cos 2π + j sin 2π = 1 + j0 = p2


The transfer function is formed using the poles lying on left half
of s-plane. The pole lying on left half of s-plane is p1. F ig 1 : L o c atio n o f p oles o n s-p lan e ,
w h en N = 1.
\ sn = p1 = –1 Þ sn – p1 = 0 Þ sn + 1 = 0
1 1
∴ Normalized transfer function, H(sn ) = =
sn − p1 s + 1

jΩ
Example 7.9 s -plane
U nit circ le

Determine the poles of lowpass Butterworth filter for p2 + j0.7 07 p1


X
X

N = 2. Sketch the location of poles on s-plane and hence


determine the normalized transfer function of lowpass filter.
3 π/4
π/4
−0.707 0.707 1 σ

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*.

\ sn = p2 = –0.707 + j0.707 Þ sn – p2 = 0 Þ (sn + 0.707 –j0.707) = 0

sn = p2* = –0.707 – j0.707 Þ sn – p2* = 0 Þ (sn + 0.707 + j0.707) = 0

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

Example 7.10 jΩ s -plane


p2
X p1
Determine the poles of lowpass Butterworth filter for
X
+ j0.8 66 U nit circ le
N = 3. Sketch the location of poles on s-plane and hence
determine the normalized transfer function of lowpass filter.
2 π/3
p3 π/3 p4
X 0.5
X σ
0.5 1

−j0.866 X
Solution
X

p ∗2 p 1∗

When N = 3, from equation (7.40), F ig 1 : L o c atio n o f p oles o n s-p lan e ,


w h en N = 3.
πk
j
sn = e 3 ; for k = 1, 2, 3, 4, 5, 6
π ×1
j
3
π π
When k = 1 ; sn = e = 1∠π / 3 = cos + j sin = 0.5 + j0. 866 = p1
3 3
π×2
j
3
2π 2π
When k = 2 ; sn = e = 1∠2π / 3 = cos + j sin = −0.5 + j0. 866 = p2
3 3
π ×3
j
3
3π 3π
When k = 3 ; sn = e = 1∠3π / 3 = cos + j sin = −1 + j0 = p3
3 3
7. 31 Digital Signal Processing
π×4
j 4π 4π
When k = 4 ; sn = e 3 = 1∠4π / 3 = cos + j sin = −0.5 − j0.866 = p∗2
3 3
π×5
j 5π 5π
When k = 5 ; sn = e 3 = 1∠5π / 3 = cos + j sin = 0.5 − j0.866 = p1∗
3 3
π ×6
j
3
6π 6π
When k = 6 ; sn = e = 1∠6π / 3 = cos + j sin = 1 + j0 = p4
3 3
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, p2* and p3.

\ sn = p2 = –0.5 + j0.866 Þ sn – p 2 = 0 Þ (sn + 0.5 –j0.866) = 0

sn = p2* = –0.5 – j0.866 Þ sn – p2* = 0 Þ (sn + 0.5 + j0.866) = 0

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

Determine the poles of lowpass Butterworth filter


X

for N = 4. Sketch the location of poles on s-plane and


hence determine the normalized transfer function of p4
X X p1
lowpass filter. 3 π/8
π/8
σ

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

sn = p3* = –0.383 – j0.924 Þ sn – p3* = 0 Þ (sn + 0.383 + j0.924) = 0


sn = p4 = –0.924 + j0.383 Þ sn – p4 = 0 Þ (sn + 0.924 – j0.383) = 0

sn = p4* = –0.924 – j0.383 Þ sn – p4* = 0 Þ (sn + 0.924 + j0.383) = 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

Determine the poles of lowpass Butterworth filter


X

for N = 5. Sketch the location of poles on s-plane and p4


hence determine the normalized transfer function of
X X p1
lowpass filter. 2 π/5
p5 p6
π/5
X 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 = p3* = –0.309 – j0.951 Þ sn – p3* = 0 Þ (sn + 0.309 + j0.951) = 0


sn = p4 = –0.809 + j0.587 Þ s n – p4 = 0 Þ (sn + 0.809 – j0.587) = 0

sn = p4* = –0.809 – j0.587 Þ sn – p4* = 0 Þ (sn + 0.809 + j0.587) = 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*.

\ sn = p4 = –0.259 + j0.966 Þ sn – p4 = 0 Þ (sn + 0.259 –j0.966) = 0

sn = p4* = –0.259 – j0.966 Þ sn – p4* = 0 Þ (sn + 0.259 + j0.966) = 0

sn = p5 = –0.707 + j0.707 Þ sn – p5 = 0 Þ (sn + 0.707 – j0.707) = 0


7. 35 Digital Signal Processing
sn = p5* = –0.707 – j0.707 Þ sn – p5* = 0 Þ (sn + 0.707 + j0.707) = 0

sn = p6 = –0.966 + j0.259 Þ s n – p6 = 0 Þ (sn + 0.966 – j0.259) = 0

sn = p6* = –0.966 – j0.259 Þ sn – p6* = 0 Þ (sn + 0.966 + j0.259) = 0

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)

7.6.3 Transfer function of Analog Butterworth 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 formed by choosing the 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 poles is real and all other poles are complex
and exist as conjugate pair. Therefore the transfer function of Butterworth filters will be a product of second
order factors. (Refer example 7.8 to example 7.13). The analog filter transfer function of normalized and
unnormalized butterworth lowpass filters are given below.
Normalized Butterworth Lowpass Filter Transfer Function
Let, N be the order of the filter.
Let, H(sn) be the normalized Butterworth lowpass filter transfer function.
When N is even,
N
2
1 .....(7.42)
H (sn ) = ∏ s2n + b k sn + 1
k=1

When N is odd,
N−1
2
1 1 .....(7.43)
H(sn ) =
sn + 1 ∏ s2n + b k sn + 1
k=1

where, b k = 2 sin ( 2 k – 1) π .....(7.44)


2N
Chapter 7 - IIR Filters 7. 36
Table 7.2 : Summary of Butterworth Lowpass Filter Normalized Transfer Function

Order, N Normalized tansfer function, H(sn)

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)

Unnormalized Butterworth 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 3-dB cutoff frequency of the lowpass filter.
Let, N be the order of the filter.
Let, H(s) be the unnormalized Butterworth lowpass filter transfer function.
When N is even, H(s) is obtained by letting sn ® s/W c in equation (7.42).
N
2
1
∴ H (s) = ∏ s2 + b k sn + 1
k=1 n
s
sn =
Ωc
N
2
Ωc2 .....(7.45)
= ∏ s2 + b k Ωcs + Ωc2
k=1
When N is odd, H(s) is obtained by letting sn ® s/W c in equation (7.43).
N−1
2
1 1
∴ H ( s) =
sn + 1 ∏ s2n + b k sn + 1
k=1
s
sn =
Ωc
N−1
Ωc 2
Ωc2
=
s + Ωc ∏ s2 + b k Ωc + Ωc2
.....(7.46)
k=1
7. 37 Digital Signal Processing
7.6.4 Frequency Response of Analog H (j Ω)
1.0
Lowpass Butterworth Filter N =10

The frequency response of Butterworth filter N =1


N =2
depends on the order N. The magnitude response 1 N =4
= 0 .707
(frequency response) for different values of N are 2
shown in fig 7.11. From fig 7.11 it can be observed
that the approximated magnitude response
Id eal
approaches the ideal response as the value of N respo nse
increases. N=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

7.6.6 Cutoff Frequency of Lowpass Butterworth Filter


The IIR filters are designed to satisfy a prescribed gain or attenuation at a passband and stopband
frequency. But practically the 3-dB cutoff frequency, W c is used to decide the useful frequency range of the
filter. Therefore, in Butterworth filter design the passband and stopband specifications are used to estimate
the order, N of the filter and Nth order normalized Butterworth lowpass filter is designed. Then the normalized
lowpass filter is unnormalized using the cutoff frequency.
The cutoff frequency of lowpass Butterworth filter can be calculated using the following equations.
Chapter 7 - IIR Filters 7. 38
Case i : When the specifications are Ap, As, w p, w s
Ωs
Cutoff frequency, Ωc = 1 ..... (7.49)
FH 1/ A s2 IK −1 2 N
Alternatively,
Ωp ..... (7.50)
Cutoff frequency, Ωc = 1
FH 1/ A 2p IK −1 2N

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

The calculation of W p and W s are same as that of case (i).


The equation(7.51) is preferable to equation (7.52), because, the cutoff frequency, W c calculated by
using equation (7.51) ensures smallest magnitude distortion (or ripple) in the passband.
7.6.7 Design Procedure for Lowpass Digital Butterworth 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 sec.
Fs
where, Fs = sampling frequency in Hz.
Ap = Gain at a passband frequency w p.
As = Gain at a stopband frequency w s.
7. 39 Digital Signal Processing
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) a p,dB and as,dB are positive dB
As = 10(–as,dB / 20)
Bd d n a b s s a p t eshnt i sdeNote-2:
emii ft iem
c 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).
Note-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,
ωp Note : If either T or Fs is not
2 .....(7.53)
Ωp = tan specified then take T= 1 second.
T 2
1
2 ω .....(7.54) If Fs is specified, then T =
Ωs = tan s Fs
T 2
For impulse invariant transformation,
ωp .....(7.55)
Ωp =
T
ωs .....(7.56)
Ω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.

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

where, b k = 2 sin ( 2 k −1) π .....(7.60)


2N
Chapter 7 - IIR Filters 7. 40
4. Calculate the analog cutoff frequency, W c.

Ω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.

7.7 Design of Lowpass Digital Chebyshev Filter


For designing a Chebyshev IIR digital filter, first an analog filter is designed using the given
specifications. Then the analog filter transfer function is transformed to digital filter transfer function by
using either impulse invariant transformation or bilinear transformation.
Analog Chebyshev Filter
The analog Chebyshev filter is designed by approximating the ideal frequency response using an
error function. The approximation function is selected such that the error is minimized over a prescribed
band of frequencies. There are two types of Chebyshev approximation. In type-1 approximation, the error
function is selected such that, the magnitude response is equiripple in the passband and monotonic in the
stopband. In type-2 approximation the error function is selected such that, the magnitude response is monotonic
in passband and equiripple in stopband. The type-2 magnitude response is also called inverse Chebyshev
response. The type-1 design is presented in this book.
7. 41 Digital Signal Processing
The magnitude response of Type-1 lowpass filter is given by,
2 1
H ( jΩ) =
1 + ∈2 C2N
FG Ω IJ ..... (7.64)
HΩ K c

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

For the normalized transfer function, let us replace s/W c by sn.


1
∴ H ( sn ) H (– sn ) = ..... (7.69)
1 + ∈2 C2N ( − jsn )
For the transfer function of equation (7.69) we can determine 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 an
ellipse in s-plane.
Properties of Chebyshev Filters (Type-1)

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.

2. The normalized magnitude response has a value of 1 1+ ∈2 at cutoff frequency W c.

3. The magnitude is monotonic outside the passband.

4. The Chebyshev Type-1 filters are all pole designs.

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

When N is odd, H(s) is obtained by letting sn ® s/W c in equation (7.71).


N −1 N −1
2 2
B0 Bk B0 Ωc Bk Ω2c
∴ H (s) =
sn + c 0 ∏ s2 + b k sn + c k
=
s + c0 Ω c ∏ 2
s + b k Ωc s + c k Ω2c ..... (7.79)
k=1 n k=1
s
sn =
Ωc

7.7.2 Order of Analog Lowpass Chebyshev Filter


In Chebyshev filters the frequency response of the filter depends on the order, N.
Hence the order 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.80) and correct it to nearest integer. Then choose N such
that N ³ 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.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

response as the value of N increases. The 1+ε


2
N =2 N =4
magnitude response of Type-1 and Type-2 Ideal N =2
Chebyshev filters are shown in fig 7.13. res ponse

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)

For even values of N, find Bk such that,


1
H(0) = 1
.....(7.95)
(1 + ∈2 ) 2

For odd values of N, find Bk such that,


H(0) = 1 .....(7.96)
(It is normal practice to take B0 = B1 = B2 ..... = Bk).
4. Determine the unnormalized analog transfer function H(s) of the lowpass filter.

H ( s) = H ( sn ) s s
n=
Ωc

Here, W c = W p = Passband edge frequency.


When the order N is even, H(s) is obtained by letting sn ® s/W c in equation (7.88).
N N
2
Bk 2
Bk Ω2c
∴ H ( s) = ∏= s2n + b k sn + c k
= ∏= s + b k Ωc s + c k Ωc2
2 .....(7.97)
k 1 k 1
s
sn =
Ωc
7. 47 Digital Signal Processing
When the order N is odd, H(s) is obtained by letting sn ® s/W c in equation (7.89).
N−1
B0 2
B B0 Ωc Bk Ω2c
∴ H (s) =
s + c0 ∏= s2n + bk ksn + ck =
s + c0 Ωc s + b k Ωcs + c k Ω2c
2
.....(7.98)
k 1
s
sn =
Ω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.

6. Realize the digital filter transfer function H(z) by a suitable structure.

7. Verify the design by sketching the frequency response H(ejw ).

H ( e jω ) = H ( z ) z = e jω

Note : The highpass, bandpass and bandstop filters are obtained from lowpass filter design by frequency
transformation.

7.8 Frequency Transformation


The four basic types of filters are lowpass, highpass, bandpass and bandstop filters.

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).

7.8.1 Analog Frequency Transformation


Using analog frequency transformation the following filters can be designed from the normalized
lowpass filter. For normalized lowpass the cutoff frequency, W c = 1 rad/second.

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 quality factor, Q.

4. Bandstop filter with center frequency, W 0 and quality factor, Q.

Ω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

Filter Type Transformation


s
Lowpass sn →
Ωc

Ω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

Filter Type Transformation Design Parameters

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

The analog transfer function is unnormalized by replacing sn by s/W c

∴ 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

∴ Digital filter |UV H(z) = 2.1115


transfer functionW| LM 2(1 − z ) OP LM 2(1 − z ) OP + 2.1115
−1 2 −1
+ 2.055
MN 1 + z ) PQ −1
MN 1 + z PQ
−1

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

2.1115(1+ 2z−1 + z−2 )


= −1
4(1 − 2z + z ) + 4.11( 1 − z−2 ) + 2.1115(1+ 2z−1 + z−2 )
−2

2.1115 + 4.223z−1 + 2.1115z−2


=
10.2215 − 3.777z−1 + 2.0015z−2

2.1115 4.223 −1 2.1115 −2


+ z + z
= 10 .2215 10.2215 10.2215
3.777 −1 2.0015 −2
1− z + z
10.2215 10.2215
0.2066 + 0.4131z −1 + 0.2066z−2
=
1 − 0.3695z−1 + 0.1958 z−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.

0.6 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.35p


jw
|H(e )| £ 0.1 ; 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 £ 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

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

Sampling time, T = 0.1second

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.1 and digital filter.
For bilinear transformation,

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

Choose order N, such that N ³ N1 and N is an integer.

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

Unnormalized transfer function, H(s) of Butterworth lowpass filter

H(s) = H sn b g s
sn =
Ωc

where, W c = Cutoff frequency.

Ωs 39.2522 Using equation (7.61).


Ωc = 1
= 1
= 12.4439 rad / sec
1/ A s2 − 1 2N
e j c h
1/ 0.12 − 1 4

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

Digital IIR lowpass filter transfer function, H(z)


For bilinear transformation,

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

154.8506 T 2 (1 + z −1)2 Put, T = 0.1


∴ H(z) =
−1 2 −1 2
e
4 1− z j e je
+ 35.1964 T 1 − z−1 1 + z−1 + 154.8506 T 2 1 + zj e j
2 −1 −2
154.8506 × 0.1 (1 + 2z +z )
=
e
4 1 − 2z −1
+z −2
j + 35.1964 × 0.1e1− z j + 154.8506 × 0.1 e1 + 2z
−2 2 −1
+ z−2 j
1.5485(1 + 2z−1 + z−2 ) (a + b) (a – b) = a2 – b2
=
e
4 1 − 2z −1
+z −2
j + 3.5196 e1 − z j + 15485
. e1 + 2z
−2 −1
+z −2
j (a + b)2 = a 2 + 2ab + b2
(a − b)2 = a 2 − 2ab − b2
1.5485 + 3.097 z−1 + 1.5485 z−2
=
9.0681 − 4.903 z−1 + 2 .0289 z−2
.
15485 3.097 −1 15485
.
+ z + z−2 0.1708 + 0.3415z−1 + 0.1708 z−2
= 9 .0681 9.0681 9 .0681 =
4.903 −1 2.0289 −2 1 − 0.5407 z −1 + 0.2237 z−2
1− z + z
9.0681 9.0681

Alternatively,

0.1708 + 0.3415 z −1 + 0.1708 z−2


H(z) =
1 − 0.5407 z −1 + 0.2237 z−2

=
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

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.1708 + 0.3415 z −1 + 0.1708 z −2


Let , H(z) = =
X(z) 1 − 0.5407 z −1 + 0.2237 z −2

On cross multiplying the above equation we get,


Y(z) – 0.5407z–1Y(z) + 0.2237z–2Y(z) = 0.1708 X(z) + 0.3415z–1X(z) + 0.1708z–2X(z)
\ Y(z) = 0.1708X(z) + 0.3415z–1X(z) + 0.1708z–2X(z) + 0.5407z–1Y(z) – 0.2237z–2Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.

X (z ) 0 .1708 X ( z ) Y (z )
0.17 08 + +
−1 −1
z z

z −1X (z) 0 .3415 z −1 X ( z) 0.5407 z −1 Y (z)


−1
z Y (z)
0.34 15 + + 0.54 07

−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

F ig 1 : D irect fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR lo w p a ss filter.


Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.1708 + 0.3415 z −1 + 0.1708 z −2


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 0.5407 z −1 + 0.2237 z −2
Chapter 7 - IIR Filters 7. 54
W(z) 1
where, = .....(2)
X(z) 1 − 0.5407 z−1 + 0.2237 z −2
Y(z)
= 0.1708 + 0.3415 z−1 + 0.1708 z −2 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) – 0.5407z–1W(z) + 0.2237z–2 W(z) = X(z)
\ W(z) = X(z) + 0.5407z–1W(z) – 0.2237z–2 W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.1708W(z) + 0.3415z–1W(z) + 0.1708z–2W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.

X (z) W (z) 0.1708 W ( z) Y (z )


+ 0.17 08
+

−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

F ig 2 : D irec t fo rm -II struc ture o f 2 n d o rd er d ig ita l IIR lo w p ass filter.

Frequency Response, H(ejw )

0.1708 + 0.3415 z−1 + 0.1708 z −2


d i
H e jω = H(z)
z = e jω
=
1 − 0.5407 z −1 + 0.2237 z−2 z = e jω

0.1708 + 0.3415 e − jω + 0.1708 e− j2ω


=
1 − 0.5407 e − jω + 0.2237 e − j2ω

=
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

Let , Hde i =

=
H de iD

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.

Note : Verify the result with MATLAB program 7.1.


7. 55 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.6831 + j0 0.683 + j0 1.0000 + j0 1.0000
1×π
16
0.6635 – j0.1320 0.6764 + j0.0199 0.9743 – j0.2238 0.9997
2×π
16
0.6071 – j0.2515 0.6586 + j0.0487 0.8887 – j0.4476 0.9951
3×π
16
0.5201 – j0.3475 0.6360 + j0.0937 0.7216 – j0.6527 0.9730
4× π
16
0.4123 – j0.4123 0.6177 + j0.1586 0.4654 – j0.7870 0.9143
5×π
16
0.2952 – j0.4417 0.6140 + j0.2429 0.1696 – j0.7865 0.8046
6× π
16
0.1807 – j0.4363 0.6349 + j0.3414 –0.0659 – j0.6518 0.6551
7× π
16
0.0796 – j0.4003 0.6878 + j0.4447 –0.1838 – j0.4632 0.4983
8× π
16
0 – j0.3415 0.7763 + j0.5407 –0.2063 – j0.2962 0.3610
9× π
16
–0.0536 – j0.2696 0.8988 + j0.6159 –0.1804 – j0.1763 0.2523
10 × π
16
–0.0807 – j0.1947 1.0487 + j0.6577 –0.1388 – j0.0986 0.1703
11×π
16
–0.0843 – j0.1261 1.2148 + j0.6562 –0.0971 – j0.0531 0.1099
12× π
16
–0.0707 – j0.0707 1.3823 + j0.6060 –0.0617 – j0.0241 0.0662
13× π
16
–0.0478 – j0.0319 1.5352 + j0.5071 –0.0343 – j0.0095 0.0355
14 × π
16
–0.0239 – j0.0099 1.6577 + j0.3651 –0.0150 – j0.0027 0.0152
15× π
16
–0.0063 – j0.0013 1.7370 + j0.1911 –0.0037 – j0.0003 0.0037
16 × π
16
0 + j0 1.7644 + j0 0 + j0 0

|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.3 = 0.35 π 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.35 π ( π/2 ) ( π)

F ig 3 : F req u en c y resp on se o f 2 n d o rd er d ig ita l B utterw o rth IIR lo w p ass filter.


Chapter 7 - IIR Filters 7. 56
Example 7.16
Design a Butterworth digital IIR highpass filter using bilinear transformation by taking T = 0.1second, to
satisfy the following specifications.
0.6 £ |H(ejw )| £ 1.0 ; for 0.7p £ w £ p
|H(ejw )| £ 0.1 ; 0 £ w £ 0.35p
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.7p rad/sample
Stopband edge frequency = 0.35p 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

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

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.1 and digital filter.
7. 57 Digital Signal Processing
For bilinear transformation,
ωp
Passband edge analog frequency, Ωp = 2
tan Using equation (7.53).
T
2
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 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

Choose order N, such that N ³ N1 and N is an integer.


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
N 2
Here, N = 2, ∴ k= 2
=
2
=1

1
∴ H sn =b g 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 Q
2× 2

1
∴ H sn =b g sn2 + 1.4142 sn + 1

Unnormalized transfer function, H(s) of Butterworth highpass filter

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

where, W c = Cutoff frequency.

Ωs 39.2522 Using equation (7.61).


Ωc = 1
= 1
= 12.4439 rad / second
e1/ A 2s j − 1 2N FH IK
1/ 0.12 −1 4

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

Direct form-I structure of digital IIR highpass filter

Y(z) 0.4411 − 0.8822 z −1 + 0.4411z −2


Let , H(z) = =
X(z) 1 − 0.5407 z −1 + 0.2237 z −2

On cross multiplying the above equation we get,


Y(z) – 0.5407z–1Y(z) + 0.2237z–2Y(z) = 0.4411X(z) – 0.8822z–1X(z) + 0.4411z–2X(z)
\ Y(z) = 0.4411X(z) – 0.8822z–1X(z) + 0.4411z–2X(z) + 0.5407z–1X(z) – 0.2237z–2X(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.

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) W(z) Y(z) 0.4411 − 0.8822 z −1 + 0.4411z −2


Let , H(z) = = × =
X(z) X(z) W( z ) 1 − 0.5407 z −1 + 0.2237 z −2
Chapter 7 - IIR Filters 7. 60
W(z) 1
where, = .....(2)
X(z) 1 − 0.5407 z−1 + 0.2237 z−2

Y(z)
= 0.4411 − 0.8822 z−1 + 0.4411z −2 .....(3)
W(z)
On cross multiplying equation (2) we get,

W(z) – 0.5407z–1W(z) + 0.2237z–2W(z) = X(z)

\ W(z) = X(z) + 0.5407z–1W(z) – 0.2237z–2W(z) .....(4)

On cross multiplying equation (3) we get,

Y(z) = 0.4411W(z) – 0.8822z–1W(z) + 0.4411z–2W(z) .....(5)

Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.

X (z) W (z) 0 . 4411W (z ) Y (z )


+ 0.44 11
+

−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.

Frequency Response, H(ejw )

0.4411 − 0.8822 z−1 + 0.4411z −2


d i
H e jω = H(z)
z = e jω
=
1 − 0.5407 z −1 + 0.2237 z−2 z = e jω
− jω − j2ω e − jθ = cos θ − j sin θ
0.4411 − 0.8822 e + 0.4411e
=
1 − 0.5407 e− jω + 0.2237 e− j2ω

=
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

Let , Hde i =

=
H de i
D

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 )

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 highpass filter is
sketched as shown in fig 3.

Note : Verify the result with MATLAB program 7.2.


7. 61 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 0.683 + j0 0 + j0 0
1×π
16
–0.0166 + j0.0033 0.6764 + j0.0199 –0.0244 + j0.0056 0.0250
2×π
16
–0.0620 + j0.0257 0.6586 + j0.0487 –0.0908 + j0.0451 0.1016
3×π
16
–0.1236 + j0.0826 0.636 + j0.0937 –0.1715 + j0.1551 0.2312
4× π
16
–0.1827 + j0.1827 0.6177 + j0.1586 –0.2062 + j0.3487 0.4051
5×π
16
–0.2178 + j0.326 0.614 + j0.2429 –0.1251 + j0.5804 0.5938
6× π
16
–0.2084 + j0.5031 0.6349 + j0.3414 0.0759 + j0.7516 0.7554
7× π
16
–0.1385 + j0.6964 0.6878 + j0.4447 0.3196 + j0.8058 0.8669
8× π
16
0 + j0.8822 0.7763 + j0.5407 0.533 + j0.7652 0.9325
9× π
16
0.2057 + j1.0341 0.8988 + j0.6159 0.6922 + j0.6762 0.9677
10 × π
16
0.4668 + j1.1270 1.0487 + j0.6577 0.8032 + j0.5709 0.9854
11× π
16
0.7624 + j1.1470 1.2148 + j0.6562 0.8786 + j0.4647 0.9939
12× π
16
1.0649 + j1.0649 1.3823 + j0.6060 0.9295 + j0.3629 0.9978
13× π
16
1.3434 + j0.8976 1.5352 + j0.5071 0.9631 + j0.2665 0.9993
14 × π
16
1.5681 + j0.6495 1.6577 + j0.3651 0.9845 + j0.175 0.9999
15× π
16
1.7139 + j0.3409 1.737 + j0.1911 0.9962 + j0.0867 1.0000
16 × π
16
1.7644 + j0 1.7644 + j0 1.0000 + j0 1.0000

|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.3 = 0.35 π 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.35 π ( π/2 ) ( π)

F ig 3 : F req u en c y resp on se o f 2 n d o rd er d ig ita l B utterw o rth IIR hig h pa ss filte r.


Chapter 7 - IIR Filters 7. 62
Example 7.17
Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.5second, to
satisfy the following specifications.

0.707 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.45p

|H(ejw )| £ 0.2 ; for 0.65p £ w £ p

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

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

Sampling time, T = 0.5second

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
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

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

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)

Calculate sin q using


When k = 1 ; bk = b1 = 2 sin LM b g OP = 1
2−1 π
calculator in radian mode.
N Q
2× 3

1
∴ H sn =b g (sn + 1) (sn2 + sn + 1)
1 1
= =
sn3 + sn2 + sn + sn2 + sn + 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

where, W c = Cutoff frequency.

Ωs 6.5274 Using equation (7.61).


Ωc = 1
= 1
= 3.8433 rad / second
e 1/ A s2 j −1 2N e1/ 0.22 j − 1 2×3

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

+ 56.7692 × 0.53 (1 + z −1)3

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 (1 + 3 z−1 + 3 z −2 + z−3 )


= −1 −2
8 (1 − 3 z + 3z − z ) + 15.3732 (1 − z−1)(1 − z−2 ) + 14.771(1 − z−2 )(1 + z−1)
−3

+ 7.0962 (1 + 3 z−1 + 3 z−2 + z −3 )

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 (1 + 3 z−1 + 3 z−2 + z−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,

0.1569 + 0.4706 z −1 + 0.4706 z−2 + 0.1569 z −3


H(z) =
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3

=
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

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.1569 + 0.4706 z −1 + 0.4706 z −2 + 0.1569 z −3


Let , H(z) = =
X(z) 1 − 0.0732 z −1 + 0.3348 z −2 − 0.0067 z −3

On cross multiplying the above equation we get,


Y(z) – 0.0732z–1Y(z) + 0.3348z–2Y(z) – 0.00677 z–3Y(z) = 0.1569X(z)
+ 0.4706z–1X(z) + 0.4706z–2X(z) + 0.1569z–3X(z)
\ Y(z) = 0.1569X(z) + 0.4706z–1X(z) + 0.4706z–2X(z) + 0.1569z–3X(z) + 0.0732z–1Y(z)
– 0.3348z–2Y(z) + 0.0067z–3Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.

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 )

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r..

Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.1569 + 0.4706 z −1 + 0.4706 z −2 + 0.1569 z −3


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 0.0732 z −1 + 0.3348 z −2 − 0.0067 z −3
W(z) 1
where, = .....(2)
X(z) 1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3
Y(z)
= 0.1569 + 0.4706 z−1 + 0.4706 z−2 + 0.1569 z−3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) – 0.0732z–1W(z) + 0.3348z–2 W(z) – 0.0067z–3W(z) = X(z)
\ W(z) = X(z) + 0.0732z–1W(z) – 0.3348z–2 W(z) + 0.0067z–3W(z) .....(4)
Chapter 7 - IIR Filters 7. 66
On cross multiplying equation (3) we get,
Y(z) = 0.1569W(z) + 0.4706z–1W(z) + 0.4706z–2W(z) + 0.1569z–3W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.

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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd er d ig ita l IIR lo w pa ss filter.


Frequency Response, H(ejw )

0.1569 + 0.4706 z−1 + 0.4706 z−2 + 0.1569 z −3


e j
H e jω = H(z)
z = e jω
=
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z −3 z = e jω

0.1569 + 0.4706 e− jω + 0.4706 e− j2ω + 0.1569 e− j3ω


=
1 − 0.0732 e− jω + 0.3348 e− j2ω − 0.0067 e− j3ω

=
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ω )

where, HN(ejw ) = (0.1569 + 0.4706cosw + 0.4706 cos2w + 0.1569 cos3w)


+ j(– 0.4706sinw - 0.4706sin2w - 0.1569sin3w)
jw
HD(e ) = (1 – 0.0732cosw + 0.3348cos2w – 0.0067cos3w)
+ j(0.0732sinw - 0.3348sin2w + 0.0067sin3w)
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.

Note : Verify the result with MATLAB program 7.3.


7. 67 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
1.255 + j0 1.2549 + j0 1 + j0 1.0000
1×π
16
1.1837 – j0.3591 1.232 – j0.1101 0.979 – j0.204 1.0000
2×π
16
0.9845 – j0.6578 1.1665 – j0.2025 0.9143 – j0.4052 1.0000
3×π
16
0.6977 – j0.8501 1.0686 – j0.2621 0.7999 – j0.5993 0.9995
4× π
16
0.3787 – j0.9143 0.953 – j0.2783 0.6243 – j0.7771 0.9968
5×π
16
0.0844 – j0.8567 0.8378 – j0.2471 0.3701 – j0.9134 0.9855
6× π
16
–0.1407 – j0.7075 0.7414 – j0.1717 0.0296 – j0.9474 0.9479
7× π
16
–0.2732 – j0.5112 0.6801 – j0.0619 –0.3306 – j0.7817 0.8488
8× π
16
–0.3137 – j0.3137 0.6652 + j0.0665 –0.5136 – j0.4202 0.6636
9× π
16
– 0.2825 – j0.1510 0.7012 + j0.1943 –0.4296 – j0.0963 0.4402
10 × π
16
– 0.211 – j0.042 0.7851 + j0.3018 –0.2521 + j0.0434 0.2558
11×π
16
– 0.1308 + j0.0129 0.906 + j0.3715 –0.1186 + j0.0629 0.1342
12× π
16
– 0.0649 + j0.0269 1.047 + j0.3913 –0.046 + j0.0429 0.0629
13× π
16
– 0.0237 + j0.0194 1.1877 + j0.3566 –0.0138 + j0.0205 0.0247
14 × π
16
– 0.0052 – j0.0077 1.3069 + j0.2709 –0.0026 + j0.0064 0.0070
15× π
16
– 0.0003 + j0.0011 1.3867 + j0.1461 –0.0001 + j0.0008 0.0007
16 × π
16
0 1.4147 + j0 0 + j0 0

|H (e )|
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. 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

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

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

Unnormalized transfer function, H(s) of Butterworth highpass filter

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

where, W c = Cutoff frequency.

Ωs 6.5274 Using equation (7.61).


Ωc = 1
= 1
= 3.8433 rad / second
e 1/ A 2j
s −1
2N c
1/ 0.22 h− 12 × 3
Chapter 7 - IIR Filters 7. 70

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

+ 29.5419 × 2 × 0.52(1 − z−1)(1 + z−1)2 + 56.7692 × 0.53(1 + z−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

+ 7.0962 (1 + 3z−1 + 3z−2 + z−3 )


8 − 24z−1 + 24z−2 − 8z−3
=
e
8 1− 3z −1
+ 3z −2
−z −3
j + 15.3732(1 − z −1
− z−2 + z−3 ) + 14.771(1 + z−1 − z−2 − z−3 )
+ 7.0962 (1 + 3z−1 + 3z−2 + z−3 )
8 − 24z + 24z −2 − 8z −3 −1
=
45.2404 − 3.3136 z−1 + 15.1444 z−2 − 0.3016 z −3
8 24 24 8
− z −1 + z −2 − z−3
= 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.1768 − 0.5305 z−1 + 0.5305 z −2 − 0.1768 z−3
=
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3
7. 71 Digital Signal Processing
Alternatively,

0.1768 − 0.5305 z−1 + 0.5305 z−2 − 0.1768 z−3


H(z) =
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z −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

Direct form-I structure of digital IIR highpass filter

Y(z) 0.1768 − 0.5305 z −1 + 0.5305 z −2 − 0.1768 z −3


Let , H(z) = =
X(z) 1 − 0.0732 z −1 + 0.3348 z −2 − 0.0067 z −3
On cross multiplying the above equation we get,
Y(z) – 0.0732z–1Y(z) + 0.3348z–2Y(z) – 0.0067z–3Y(z) = 0.1768X(z) – 0.5305z–1X(z)
+ 0.5305z–2X(z) – 0.1768z–3X(z)
\ Y(z) = 0.1768X(z) – 0.5305z X(z) + 0.5305z X(z) – 0.1768z–3X(z) + 0.0732z–1Y(z)
–1 –2

– 0.3348z–2Y(z) + 0.0067z–3Y(z) .....(1)


Using equation (1), the direct form-I structure is drawn as shown in fig 1.
0.1768X (z)
X (z) 0.17 68 + + Y (z)

−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 )

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR h ig h pa ss filte r..

Direct form-II structure of digital IIR highpass filter

Y(z) W(z) Y(z) 0.1768 − 0.5305 z −1 + 0.5305 z −2 − 0.1768 z −3


Let , H(z) = = × =
X(z) X(z) W( z ) 1 − 0.0732 z −1 + 0.3348 z −2 − 0.0067 z −3

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.0732z–1W(z) + 0.3348z–2W(z) – 0.0067z–3W(z) = X(z)
\ W(z) = X(z) + 0.0732z–1W(z) – 0.3348z–2W(z) + 0.0067z–3W(z) .....(4)
Chapter 7 - IIR Filters 7. 72
On cross multiplying equation (3) we get,
Y(z) = 0.1768W(z) – 0.5305z–1W(z) + 0.5305z–2W(z) – 0.1768z–3W(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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rder dig ita l IIR h ig h pa ss filter.


Frequency Response, H(ejw )

0.1768 − 0.5305 z−1 + 0.5305 z−2 − 0.1768 z−3


e j
H e jω = H(z)
z = e jω
=
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z −3 z = e jω

− 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

c0.1768 − 0.5305 cos ω + 0.5305 cos 2ω − 0.1768 cos 3ωh


H ee j N

+ j c0.5305 sin ω − 0.5305 sin 2ω + 0.1768 sin 3ω h
Let , Hee j =

==
H ee j D

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

where, HN(ejw ) = (0.1768 – 0.5305cosw + 0.5305cos2w - 0.1768cos3w)

+ j(0.5305sinw - 0.5305sin2w + 0.1768sin3w )


jw
HD(e ) = (1 – 0.0732cosw + 0.3348cos2w - 0.0067cos3w)
+ j(0.0732sinw - 0.3348sin2w + 0.0067sin3w)
The frequency response H(e ) and hence the magnitude response |H(ejw )| are calculated for various
jw

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

Choose order N, such that N ³ N1 and N is an integer.


Let, order, N = 2.
7. 75 Digital Signal Processing
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 2k −1 π g OP Using equation (7.60).


N 2N Q
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

Unnormalized transfer function, H(s) of Butterworth lowpass filter

H(s) = H sn b g s
sn =
Ωc

where, W c = Cutoff frequency.

Ωs 2.3562 Using equation (7.61).


Ωc = 1
= 1
.
= 10645 rad / second
e1/ As2 j − 1 2N c h
1/ 0.22 − 1 4

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)

In impulse invariant transformation,

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

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.4848 z −1
Let , H(z) = =
X(z) 1 − 0.6877 z −1 + 0.2219 z −2

On cross multiplying the above equation we get,


Y(z) – 0.6877z–1Y(z) + 0.2219z–2Y(z) = 0.4848z–1X(z)
\ Y(z) = 0.4848z–1X(z) + 0.6877z–1Y(z) – 0.2219z–2Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.

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

F ig 1 : D irect fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR lo w p ass filter.


Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.4848 z −1


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 0.6877 z −1 + 0.2219 z −2

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,

W(z) – 0.6877z–1 + 0.2219z–2 W(z) = X(z)

\ W(z) = X(z) + 0.6877z–1W(z) – 0.2219z–2 W(z) .....(4)

On cross multiplying equation (3) we get,

Y(z) = 0.4848z–1W(z) .....(5)

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

F ig 2 : D irect fo rm -II structure of 2 n d order digita l IIR lo w p ass filter.

Frequency Response, H(ejw )

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

where, HN(ejw ) = 0.4848cosw – j0.4848sinw

HD(ejw ) = (1 – 0.6877cosw + 0.2219cos2w) + j(0.6877sinw - 0.2219sin2w)

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.

Note : Verify the result with MATLAB program 7.5.


Chapter 7 - IIR Filters 7. 78
Table 1: H(ejww ) and |H(ejww )| for various values of w
w HN(ejww ) HD(ejww ) H(ejww ) H(ejww )|
0× π
16
0.4848 + j0 0.5342 + j0 0.9075 + j0 0.9075
1×π
16
0.4755 – j0.0946 0.5305 + j0.0492 0.8723 – j0.2592 0.9099
2×π
16
0.4479 – j0.1855 0.5215 + j0.1063 0.7550 – j0.5096 0.9101
3×π
16
0.4031 – j0.2693 0.5131 + j0.1770 0.5403 – j0.7112 0.8932
4× π
16
0.3428 – j0.3428 0.5137 + j0.2644 0.2560 – j0.7990 0.8390
5×π
16
0.2693 – j0.4031 0.5330 + j0.3668 –0.0103 – j0.7492 0.7493
6× π
16
0.1855 – j0.4479 0.5799 + j0.4784 –0.1888 – j0.6166 0.6449
7× π
16
0.0946 – j0.4755 0.6608 + j0.5896 –0.2778 – j0.4718 0.5475
8× π
16
0 – j0.4848 0.7781 + j0.6877 –0.3092 – j0.3498 0.4669
9× π
16
–0.0946 – j0.4755 0.9292 + j0.7594 –0.3118 – j0.2569 0.4040
10 × π
16
–0.1855 – j0.4479 1.1062 + j0.7923 –0.3025 – j0.1882 0.3563
11× π
16
–0.2693 – j0.4031 1.2971 + j0.7768 –0.2898 – j0.1372 0.3206
12× π
16
–0.3428 – j0.3428 1.4863 + j0.7082 –0.2775 – j0.0984 0.2944
13× π
16
–0.4031 – j0.2693 1.6567 + j0.5871 –0.2673 – j0.0678 0.2758
14 × π
16
–0.4479 – j0.1855 1.7923 + j0.4201 –0.2599 – j0.0426 0.2634
15× π
16
–0.4755 – j0.0946 1.8795 + j0.2191 –0.2554 – j0.0205 0.2562
16 × π
16
–0.4848 + j0 1.9096 + j0 –0.2539 + j0 0.2539

|H (e )|
1.0

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.

0.9 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.35p

|H(ejw )| £ 0.275 ; 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 £ 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

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.9
Gain in normal value at stopband edge, As = 0.275
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
and digital filter.
Gain in normal value at stopband edge, As = 0.275
For impulse invariant transformation,
ωp 0.35π
Passband edge analog frequency, Ωp = = = 10996
. rad / second Using equation (7.53).
T 1
ωs 0.7π
Stopband edge analog frequency, Ω s = = = 2.1991 rad / second Using equation (7.54).
T 1
Order of the 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
.

Choose order N, such that N ³ N1 and N is an integer.


Let, order, N = 3.
Chapter 7 - IIR Filters 7. 80
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

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

Unnormalized transfer function, H(s) of Butterworth lowpass filter

H(s) = H sn b g s
sn =
Ωc

where, W c = Cutoff frequency.

Ω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)

On equating the coefficients On equating the coefficients of s in On equating constants we get,


of s2 in equation (3) we get, equation (3) we get,
2.0993 A + 1.4489 C = 3.0417
A+B=0 1.4489 A + 1.4489 B + C = 0
Put, C = 0,
\ B= –A Put, B = – A
\ 2.0993 A = 3.0417
\ 1.4489 A + 1.4489(– A) + C = 0
3.0417
\C=0 ∴ A=
2.0993
= 1.4489
\ B = –A = –1.4489

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 − 0.7245


= − 14489
.
s + 14489
. (s + 0.7245)2 + 12548
. 2

1.4489 s + 0.7245 0.7245


= − 14489
. + 14489
.
s + 14489
. (s + 0.7245)2 + 12548
. 2
(s + 0.7245)2 + 1.25482
1.4489 s + 0.7245 14489
. × 0.7245 12548
.
= − 14489
. 2 2
+
s + 14489
. (s + 0.7245) + 12548
. 12548
. (s + 0.7245)2 + 12548
. 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

Digital IIR lowpass filter transfer function, H(z)

In impulse invariant transformation,


Using equations (7.17),
1 Ai
 
is transformed to
→ −1
(7.18) and (7.19).
s + pi 1 − e−piT z
(s + a ) 1 − e− aT (cos bT)z−1
  →
(s + a)2 + b2 is transformed to − aT
1 − 2e (cos bT )z−1 + e−2aT z−2
b e− aT (sin bT )z−1
  →
(s + a)2 + b2 is transformed to
1 − 2e (cos bT )z−1 + e−2aT z−2
− aT

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

e −0.7245 (sin 1.2548)z −1


+ 0.8366 −0.7245
1 − 2e (cos 1.2548)z −1 + e −2× 0.7245z −2
Chapter 7 - IIR Filters 7. 82

1.4489 −1.4489 + 0.2182 z−1 0.3853 z−1


∴ H(z) = −1
+ −1 −2
+
1 − 0.2348 z 1 − 0.3012 z + 0.2348 z 1 − 0.3012 z−1 + 0.2348 z−2

1.4489 −1.4489 + 0.6035 z−1


= −1
+
1 − 0.2348 z 1 − 0.3012 z −1 + 0.2348 z−2

1.4489 (1 − 0.3012 z−1 + 0.2348 z −2 ) + (−1.4489 + 0.6035z −1) (1 − 0.2348 z−1)


=
(1 − 0.2348 z−1) (1 − 0.3012 z−1 + 0.2348 z−2 )

1.4489 − 0.4364 z−1 + 0.3402 z −2 − 1.4489 + 0.3402z−1 + 0.6035z−1 − 0.1417 z−2


=
1 − 0.3012 z−1 + 0.2348 z−2 − 0.2348 z−1 + 0.0707 z −2 − 0.0551z−3

0.5073 z−1 + 0.1985 z−2


=
1 − 0.536 z−1 + 0.3055 z −2 − 0.0551z−3
Alternatively,
0.5073 z−1 + 0.1985 z−2 z−3 (0.5073 z−2 + 0.1985 z)
H(z) = =
1 − 0.536 z−1 + 0.3055 z−2 − 0.0551z−3 z−3(1 − 0.536 z2 + 0.3055 z − 0.0551)
0.5073 z−2 + 0.1985 z
=
1 − 0.536 z2 + 0.3055 z − 0.0551

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.5073 z −1 + 0.1985 z −2


Let , H(z) = =
X(z) 1 − 0.536 z −1 + 0.3055 z −2 − 0.0551z −3
On cross multiplying the above equation we get,
Y(z) – 0.536z–1Y(z) + 0.3055z–2Y(z) – 0.0551z–3Y(z) = 0.5073z–1X(z) + 0.1985z–2X(z)
\ Y(z) = 0.5073z–1X(z) + 0.1985z–2X(z) + 0.536z–1X(z) – 0.3055z–2Y(z) + 0.0551z–3Y(z) .....(5)
Using equation (5), the direct form-I structure is drawn as shown in fig 1.

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 )

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r.


Direct form-II structure of digital IIR lowpass filter
Y(z) W(z) Y(z) 0.5073 z −1 + 0.1985z −2
Let , H(z) = = × =
X(z) X(z) W(z) 1 − 0.536 z −1 + 0.3055 z −2 − 0.0551z −3
W(z) 1
where, = .....(6)
X(z) 1 − 0.536 z + 0.3055 z−2 − 0.0551z−3
−1

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.536z–1W(z) + 0.3055z–2 W(z) –0.0551 z–3W(z) = X(z)
W(z) = X(z) + 0.536z–1W(z) – 0.3055z–2 W(z) + 0.0551z–3W(z) .....(8)
On cross multiplying equation (7) we get,
Y(z) = 0.5073z–1W(z) + 0.1985z–2W(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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd er d ig ita l IIR lo w pa ss filter.

Frequency Response, H(e jw )

0.5073 z −1 + 0.1985 z−2


e j
H e jω = H(z)
z = e jω
=
1 − 0.536 z−1 + 0.3055 z−2 − 0.0551z−3 z = e jω

0.5073e− jω + 0.1985 e− j2ω


=
1 − 0.536 e− jω + 0.3055 e− j2ω − 0.0551e− j3ω
e − jθ = cos θ − j sin θ
0.5073 (cos ω − j sin ω ) + 0.1985 (cos 2ω − j sin 2ω )
=
1 − 0.536 (cos ω − j sin ω ) + 0.3055 (cos 2ω − j sin 2ω ) − 0.0551(cos 3ω − j sin 3ω )
(0.5073 cos ω + 0.1985 cos ω ) + j( −0.5073 sin ω − 0.1985 sin 2ω )
=
(1 − 0.536 cos ω + 0.3055 cos 2ω − 0.0551cos 3ω ) + j(0.536 sin ω − 0.3055 sin 2ω + 0.0551sin 3ω )

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ω )

where, HN(ejw ) = (0.5073 cosw + 0.1985 cos2w) + j(– 0.5073sinw - 0.1985sin2w)


HD(ejw ) = (1 – 0.536cosw + 0.30554cos2w -0.0551 cos3w)
+ j(0.536sinw - 0.3055sin2w + 0.0551sin3w )
The frequency response H(e ) and hence the magnitude response |H(ejw )| are calculated for various
jw

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.

Note : Verify the result with MATLAB program 7.6.


Chapter 7 - IIR Filters 7. 84
Table 1: H(ejww ) and |H(ejww )| for various values of w
w HN(ejww ) HD(ejww ) H(ejww ) |H(ejww )|
0× π
16
0.7058 + j0 0.7144 + j0 0.9880 + j0 0.9880
1×π
16
0.6809 – j0.1749 0.7107 + j0.0183 0.9511 – j0.2706 0.9888
2×π
16
0.6090 – j0.3345 0.6997 + j0.0400 0.8403 – j0.5261 0.9914
3×π
16
0.4978 – j0.4652 0.6820 + j0.0696 0.6535 – j0.7488 0.9939
4× π
16
0.3587 – j0.5572 0.6600 + j0.1125 0.3883 – j0.9104 0.9898
5×π
16
0.2059 – j0.6052 0.6393 + j0.1742 0.0597 – j0.9629 0.9648
6× π
16
0.0538 – j0.6090 0.6298 + j0.2581 –0.2662– j0.8579 0.8982
7× π
16
–0.0844 – j0.5735 0.6438 + j0.3630 –0.4806 – j0.6198 0.7843
8× π
16
–0.1985 – j0.5073 0.6945 + j0.4809 –0.5351 – j0.3500 0.6449
9× π
16
– 0.2824 – j0.4216 0.7917 + j0.5968 –0.4834 – j0.1681 0.5118
10 × π
16
– 0.3345 – j0.3283 0.9382 + j0.6901 –0.3984 – j0.0569 0.4024
11×π
16
– 0.3578 – j0.2384 1.1268 + j0.7387 –0.3191 – j0.0023 0.3191
12× π
16
– 0.3587 – j0.1602 1.3400 + j0.7235 –0.2572 – j0.0193 0.2580
13× π
16
– 0.3458 – j0.0985 1.5519 + j0.6341 –0.2132 – j0.0236 0.2145
14 × π
16
– 0.3283 – j0.0538 1.7323 + j0.4720 –0.1843 + j0.0192 0.1853
15× π
16
– 0.3142 – j0.0230 1.8538 + j0.2521 –0.1681 + j0.0104 0.1684
16 × π
16
– 0.3088 + j0 1.8966 + j0 –0.1628 + j0 0.1628

|H (e jω)|
1.0

0.9

0.8

0.707
0.7

0.6 ωc = ΩcT = 1.4489 × 1

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.

0.8 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.2p

|H(ejw )| £ 0.2 ; for 0.32p £ w £ p

Draw direct form-I and II structure of the filter.

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

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 impulse invariant transformation,
0.2π ωp
Passband edge analog frequency, Ωp = = = 0.6283 rad / second Using equation (7.55).
T 1
ω 0.32π
Stopband edge analog frequency, Ωs = s = = 1.0053 rad / second Using equation (7.56).
T 1
Order of the 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

Choose order N, such that N ³ N1 and N is an integer.


Let, order, N = 4.
Chapter 7 - IIR Filters 7. 86
Normalized transfer function, H(sn) of Butterworth lowpass filter

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

When k = 1 ; bk = b1 = 2 sin LM b g OP = 0.7654


2−1 π Calculate sinq using
N Q 2× 4 calculator in radian mode.

= 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

Unnormalized transfer function, H(s) of Butterworth lowpass filter

H(s) = H sn b g s
sn =
Ωc

where, W c = Cutoff frequency.


Ωs 1.0053
Ωc = 1
= 1
= 0.6757 rad / second
e1/ A 2
s −1 j
2N c1/ 0.22 h −18

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.

The roots of the quadratic The roots of the quadratic

s 2 + 0.5172 s + 0.4566 = 0 are, s 2 + 1.2486 s + 0.4566 = 0 are,

−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)

By partial fraction expansion H(s) can be expressed as,


A1 A1∗
H(s) = +
(s + 0.2586 − j0.6243) (s + 0.2586 + j0.6243)

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)

A1∗ = conjugate of A1 = −0.3121 − j0.1293

0.2085 × (s + 0.6243 − j0.2586)


A2 =
bs + 0.2586 − j0.6243g bs + 0.2586 + j0.6243g (s + 0.6243 − j0.2586) bs + 0.6243 + j0.2586)g s = − 0.6243+ j0.2586

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

A∗2 = conjugate of A 2 = 0.3121 + j0.7536


Chapter 7 - IIR Filters 7. 88
−0.3121 + j0.1293 −0.3121 − j0.1293
∴ H(s) = +
s + 0.2586 − j0.6243 s + 0.2586 + j0.6243
0.3121 − j0.7536 0.3121 + j0.7536
+ +
s + 0.6243 − j0.2586 s + 0.6243 + j0.2586

Digital IIR lowpass filter transfer function, H(z)

For impulse invariant transformation,

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,

−0.3121 + j0.1293 −0.3121 − j0.1293


H(z) = +
1 − e−(0.2586 − j0.6243) z−1 1 − e −(0.2586 + j0.6243) z −1
0.3121 − j0.7536 0.3121 + j0.7536 Put, T = 1
+ − ( 0.6243 − j0.2586 ) −1
+
1− e z 1 − e−(0.6243+ j0.2586 )z−1
( −0.3121 + j0.1293)(1 − e−0.2586 − j0.6243 z−1) + (−0.3121 − j0.1293)(1 − e−0.2586 + j0.6243 z−1)
=
(1 − e−0.2586 + j0.6243 z−1) (1 − e −0.2586 − j0.6243 z−1)

(0.3121 − j0.7536) (1 − e−0.6243 − j0.2586 z−1) + (0.3121 + j0.7536)(1 − e−0.6243+ j0.2586z−1)


+
(1 − e−0.6243+ j0.2586 z −1) (1 − e−0.6243 − j0.2586z −1)

−0.3121+ 0.3121e−0.2586 − j0.6243 z −1 + j0.1293 − j0.1293 e−0.2586 − j0.6243 z−1


− 0.3121+ 0.3121e −0.2586 + j0.6243 z−1 − j0.1293 + j0.1293 e−0.2586 + j0.6243 z−1
=
1 − e−0.2586 − j0.6243 z−1 − e −0.2586 + j0.6243 z −1 + e−2 × 0.2586 z−2

0.3121 − 0.3121e−0.6243 − j0.2586 z−1 − j0.7536 + j0.7536 e−0.6243 − j0.2586 z−1


0.3121 − 0.3121e−0.6243 + j0.2586 z −1 + j0.7536 − j0.7536 e−0.6243 + j0.2586 z−1
+
1 − e−0.6243 − j0.2586 z −1 − e−0.6243 + j0.2586 z−1 + e−2 × 0.6243 z −2

=
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

− 0.6242 + 0.3911z −1 − 0.1167 z−1 0.6242 − 0.3232 z−1 + 0.2065 z−1


= +
.
1 − 12530 z−1 + 0.5962 z−2 1 − 1.0357 z−1 + 0.2869 z−2

− 0.6242 + 0.2744 z −1 0.6242 − 0.1167 z −1


= −1 −2
+
1 − 1.2530 z + 0.5962 z 1 − 1.0357 z −1 + 0.2869 z −2
7. 89 Digital Signal Processing

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

0.0221z −1 + 0.055 z−2 + 0.0091z −3


=
1 − 2.2887 z−1 + 2.1808 z−2 − 0.977 z −3 + 0.171z−4
Alternatively,
0.0221z−1 + 0.055 z−2 + 0.0091z−3
H(z) =
1 − 2.2887 z−1 + 2.1808 z−2 − 0.977 z−3 + 0.171z−4
z−4 (0.0221z3 + 0.055 z2 + 0.0091z)
=
z (z − 2.2887 z3 + 2.1808 z2 − 0.977z + 0.171)
−4 4

0.0221z3 + 0.055 z2 + 0.0091


=
z − 2 .2887 z3 + 2.1808 z2 − 0.977z + 0.171
4

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.0221z −1 + 0.055 z −2 + 0.0091z −3


Let , H(z) = =
X(z) 1 − 2 .2887 z −1 + 2.1808 z −2 − 0.977 z −3 + 0.171z −4

On cross multiplying the above equation we get,


Y(z) –2.2887z–1Y(z) + 2.1808z–2Y(z) –0.977z–3Y(z) + 0.171z–4Y(z)
= 0.0221z–1X(z) + 0.055z–2X(z) + 0.0091z–3X(z)
\ Y(z) = 0.0221z–1X(z) + 0.055z–2X(z) + 0.0091z–3X(z)
+ 2.2887z–1Y(z) – 2.1808z–2Y(z) + 0.977z–3Y(z) – 0.171z–4Y(z) .....(2)
Using equation (2), the direct form-I structure is drawn as shown in fig 1.
X (z) + Y (z)

−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)

F ig 1 : D irec t fo rm -I stru ctu re o f 4 th o rd er d ig ita l IIR lo w p a ss filter.


Chapter 7 - IIR Filters 7. 90
Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.0221z −1 + 0.055 z −2 + 0.0091z −3


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 2 .2887 z −1 + 2.1808 z −2 − 0.977 z −3 + 0.171z −4

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.2887z–1W(z) + 2.1808z–2W(z) –0.977z–3W(z) + 0.171z–4W(z) = X(z)
\ W(z) = X(z) + 2.2887z–1W(z) – 2.1808z–2W(z) + 0.977z–3W(z) – 0.171z–4W(z) .....(5)
On cross multiplying equation (4) we get,
Y(z) = 0.0221z–1W(z) + 0.055z–2W(z) + 0.0091z–3W(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 ig 2 : D irec t fo rm -II stru cture o f 4 rd o rd er d ig ita l IIR lo w pa ss filter.


Note : Verify the result with MATLAB program 7.7.
Alternate method for transforming H(s) to H(z)
By partial fraction expansion H(s) can be expressed as,
0.2085
H(s) =
(s 2 + 0.5172 s + 0.4566) (s 2 + 12486
. s + 0.4566)
As + B Cs + D
= + .....(7)
(s 2 + 0.5172 s + 0.4566) (s 2 + 12486
. s + 0.4566)
On cross multiplying equation (7) we get,
0.2085 = (As + B) (s2 +1.2486s + 0.4566) + (Cs + D) (s2 + 0.5172s + 0.4566)
= As3 + 1.2486 As2 + 0.4566 As + Bs2 +1.2486 Bs + 0.4566B
+ Cs3 + 0.5172 Cs2 + 0.4566 Cs + Ds2 + 0.5172 Ds + 0.4566 D .....(8)
7. 91 Digital Signal Processing

On equating the coefficients of On equating the coefficients of s2 On equating coefficients of s in


s3 in equation (8) we get, in equation (8) we get, equation (8) we get,

A+C=0 1.2486 A + B + 0.5172 C + D = 0 0.4566 A + 1.2486B + 0.4566C


+0.5172 D = 0
\C= –A Put, C = – A
Put, C = – A
\ 1.2486 A +B – 0.5172A + D = 0
and, D = –0.7314 A –B
\ 0.7314 A + B + D = 0
0.4566 A + 1.2486 B – 0.4566 A
\ D = –0.7314 A – B
+ 0.5172 (–0.7314 A –B) = 0
–0.3783 A + 0.7314 B = 0
0.3783
∴ B= A = 0.5172A
0.7314

On equating constants of equation (8) we get,


0.4566 B + 0.4566 D = 0.2085
Put, D = –0.7314 A – B
\ 0.4566 B + 0.4566 (–0.7314 A – B) = 0.2085 Þ – 0.334A = 0.085
0.2085
∴ A=− = −0.6243
0.334
Here, A = –0.6243,
\ B = 0.5172A = 0.5172 ´ (–0.6243) = –0.3229
C = –A = 0.6243
D = –0.7314 A – B = –0.7314 (–0.6243) – (–0.3229) = 0.7795
Now, H(s) can be written as,
−0.6243s – 0.3229 0.6243s + 0.7795
H(s) = +
(s2 + 0.5172s + 0.4566) (s2 + 1.2486 s + 0.4566)
(s + a1)2 = s 2 + 2a1s + a12
F 0.3229IJ
–0.6243 G s + 0.5172
=
H 0.6243 K 2a1 = 0.5172 ⇒ a1 =
2
(s + 2 × 0.2586s + 0.2586 ) + F 0.4566 − 0.2586 I
2
2 2 2
H K = 0.2586

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,

(s + a ) 1– e –aT (cos bT) z –1 Using equations (7.18)


2 2
  →
(s + a ) + b is transformed to
1 – 2 e –aT (cos bT ) z –1 + e –2aT z –2 and (7.19).
b e–aT (sin bT) z–1
2 2
  →
(s + a ) + b is transformed to
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.

1 − e−0.2586 (cos 0.6243) z−1 Put, T = 1


∴ H(z) = –0.6243 −0.2586
1− 2 e (cos 0.6243) z −1 + e−2 × 0.2586 z −2

e−0.2586 (sin 0.6243) z −1


– 0.2586 −0.2586
1− 2 e (cos 0.6243) z −1 + e−2 × 0.2586
z −2

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(sin 0.2586) z−1


+ 15072
. −0.6243
1 − 2e (cos 0.2586) z−1 + e−2 × 0.6243
z −2

−0.6243 + 0.3911z−1 −0.1167z−1


= −1 −2
+
1 − 12530
. z + 0.5962z 1 − 12530
. z−1 + 0.5962z−2
0.6243 − 0.3233z −1 0.2065z−1
+ −1 −2
+
1 − 10357
. z + 0.2869z 1 − 1.0357z−1 + 0.2869z−2

−0.6243 + 0.2744z −1 0.6243 − 0.1168z −1


= −1 −2
+
1 − 12530
. z + 0.5962z 1 − 10357
. z−1 + 0.2869z−2

( −0.6243 + 0.2744 z−1)(1 − 10357


. z−1 + 0.2869z −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

0.022z−1 + 0.0554z2 + 0.0091z−3


H(z) =
1 − 2.2887z−1 + 2.1808z−2 − 0.977z−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.

0.707 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.2p

|H(ejw )| £ 0.08 ; 0.4p £ w £ p

Draw direct form-I and II structure of the filter.

Alternatively,

Passband ripple £ 3.0116dB

Stopband attenuation ³ 21.9382dB

Passband edge frequency = 0.2p 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 / 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

Passband edge digital frequency, w p = 0.2p rad/sample

Stopband edge digital frequency, w s = 0.4p rad/sample

Gain in normal value at passband edge, Ap = 0.707

Gain in normal value at stopband edge, As = 0.08

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.08

For bilinear transformation,

2 ωp 2 0.2π Using equation (7.53).


Passband edge analog frequency, Ω p = tan = tan
T 2 1 2
= 0.6498 rad / second

2 ω 2 0.4π Using equation (7.54).


Stopband edge analog frequency, Ω s = tan s = tan
T 2 1 2
= 1.4531 rad / second
Chapter 7 - IIR Filters 7. 94
Order of the 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

where, W c = Cutoff frequency.

Ω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

+ 1.2089 × 2T3 (1 − z−1)(1 + z−1)3 + 0.3578 × T 4 (1 + z−1)4


T 4 (1 + z−1)4
Put, T = 1
0.3578 (1 + z−1)4
=
16 (1 − z−1)2(1 − z−1)2 + 16.168 (1 − 3 z−1 + 3z−2 − z−3 )(1 + z−1) + 8.1692 (1 − z−1)2(1 + z−1)2
+ 2 .4178 (1 − z−1)(1 + 3 z−1 + 3z−2 + z−3 ) + 0.3578 (1 + z−1)2(1 + z−1)2

0.3578 (1 + 2 z−1 + z−2 )(1 + 2 z−1 + z−2 )


= −1 −2 −1
16 (1 − 2 z + z )(1 − 2 z + z−2 ) + 16.168 (1 − 3 z−1 + 3z−2 − z−3 + z−1 − 3z−2 + 3z−3 − z−4 )
+8.1692 (1 − 2 z−1 + z −2 )(1 + 2 z−1 + z−2 ) + 2.4178 (1 + 3 z−1 + 3z−2 + z−3 − z−1 − 3z −2 − 3z −3 − z−4 )
+ 0.3578 (1 + 2 z−1 + z−2 )(1 + 2 z−1 + z−2 )

0.3578 (1 + 4 z−1 + 6z−2 + 4 z−3 + z−4 )


= −1 −2 −3
16 (1 − 4 z + 6z − 4z + z−4 ) + 16.168 (1 − 2z−1 + 2 z−3 − z−4 ) + 8.1692 (1 − 2z−2 + z−4 )
+ 2.4178 (1 + 2z −1 − 2 z−3 − z−4 ) + 0.3578 (1 + 4 z−1 + 6z −2 + 4 z−3 + z−4 )
0.3578 + 14312
. z−1 + 2.1468 z−2 + 14312
. z−3 + 0.3578 z −4
=
43.1128 − 90.0388 z−1 + 818084
. z−2 − 35.0684 z−3 + 5.7412z−4
Chapter 7 - IIR Filters 7. 96
0.3578 14312
. 2.1468 −2 14312
. 0.3578 −4
+ z−1 + z + z−3 + z
∴ H(z) = 43.1128 43 .1128 43 .1128 43 .1128 43 .1128
90.0388 −1 818084 . 35.0684 −3 5.7412 −4
1− z + z−2 − z + z
43.1128 43.1128 43.1128 43.1128

0.0083 + 0.0332 z−1 + 0.0498 z−2 + 0.0332 z−3 + 0.0083 z−4


=
1 − 2.0892 z−1 + 18975
. z−2 − 0.8133 z−3 + 0.1378 z−4

Alternatively,

0.0083 + 0.0332 z−1 + 0.0498 z−2 + 0.0332 z−3 + 0.0083 z −4


H(z) =
1 − 2.0892 z−1 + 18975
. z−2 − 0.8133 z −3 + 0.1378 z−4

z−4 (0.0083z4 + 0.0332 z3 + 0.0498 z2 + 0.0332 z + 0.0083)


=
z−4 (z4 − 2.0892 z3 + 18975
. z2 − 0.8133 z + 0.1378)

0.0083z4 + 0.0332 z3 + 0.0498 z2 + 0.0332 z + 0.0083


=
z4 − 2.0892 z3 + 18975
. z2 − 0.8133 z + 0.1378

Note: Verify the result with MATLAB program 7.8.


Direct form-I structure of digital IIR lowpass filter

Y(z) 0.0083 + 0.0332 z −1 + 0.0498 z −2 + 0.0332 z −3 + 0.0083 z −4


Let , H(z) = =
X(z) 1 − 2.0892 z −1 + 18975
. z −2 − 0.8133 z −3 + 0.1378 z −4

On cross multiplying the above equation we get,


Y(z) – 2.0892z–1Y(z) + 1.8975z–2Y(z) – 0.8133 z–3Y(z) + 0.1378 z–4Y(z)
= 0.0083X(z) + 0.0332z–1X(z) + 0.0498z–2X(z) + 0.0332z–3X(z) + 0.0083z–4X(z)
\ Y(z) = 0.0083X(z) + 0.0332z–1X(z) + 0.0498z–2X(z) + 0.0332z–3X(z) + 0.0083z–4X(z)
+ 2.0892z–1Y(z) – 1.8975z–2Y(z) + 0.8133 z–3Y(z) – 0.1378 z–4Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
0.0083X (z)
X (z) 0.00 83 + + Y (z)

−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 )

F ig 1 : D irec t fo rm -I stru ctu re o f 4 th o rd er d ig ita l IIR lo w p a ss filter..


7. 97 Digital Signal Processing
Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.0083 + 0.0332 z −1 + 0.0498 z −2 + 0.0332 z −3 + 0.0083 z −4


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 2.0892 z −1 + 18975
. z −2 − 0.8133 z −3 + 0.1378 z −4

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)

On cross multiplying equation (2) we get,

W(z) – 2.0892z–1W(z) + 1.8975z–2W(z) – 0.8133 z–3W(z) + 0.1378 z–4W(z) = X(z)

\ W(z) = X(z) + 2.0892z–1W(z) – 1.8975z–2W(z) + 0.8133 z–3W(z) – 0.1378 z–4W(z) .....(4)

On cross multiplying equation (3) we get,

Y(z) = 0.0083W(z) + 0.0332z–1W(z) + 0.0498z–2W(z) + 0.0332z–3W(z) + 0.0083z–4W(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.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

F ig 2 : D irect fo rm -II structu re o f 4 th o rd er d ig ita l IIR lo w pass filter.

Example 7.23
Design a Chebyshev digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.

0.9 £ |H(ejw )| £ 1.0 ; 0 £ w £ 0.25p


jw
|H(e )| £ 0.24 ; 0.5p £ w £ p

Draw direct form-I and II structure of the filter.


Chapter 7 - IIR Filters 7. 98
Alternatively,
Passband ripple £ 0.9151dB
Stopband attenuation ³ 12.3958dB
Passband edge frequency = 0.25p rad/sample
Stopband edge frequency = 0.5p 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−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).

bk = 2 yN sin LM c 2k − 1 π h OP Using equation (7.90).


N 2N Q
When k = 1, bk = b1 = 2 × 0.5107 sin
LM (2 × 1 − 1)π OP = 0.5107
N 2×3 Q
2
ck = yN + cos 2 LM c 2k − 1 πh OP Using equation (7.91).
N 2N Q
When k = 1, ck = c1 = 0.51072 + cos 2
LM (2 × 1 − 1)π OP
N 2×3 Q
F πI
LM 1 + cos FGH IJK OP 2π
1 + cos 2θ
= 0.5107 2
+ cos G J = 0.5107 +
2 2 6 cos2 θ =
H 6K MM 2 PP 2
N Q
= 0.2608 + 0.75 = 1.0108

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

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 = = 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

where, W c = Cutoff frequency.

Here, W c = W p = 0.7854 rad/sec.

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.

By partial fraction expansion, the H(s) can be expressed as,

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

On cross multiplying the equation (1) we get

0.2501 = A(s2 + 0.4011s + 0.6235) + (Bs + C) (s + 0.4011)

0.2501 = As2 + 0.4011 As + 0.6235 A + Bs2 + 0.4011 Bs+ Cs + 0.4011 C ..... (3)

On equating the coefficients of On equating the coefficients of s in On equating constants of


s2 in equation (3) we get, equation (3) we get, equation (3) we get,

A+B=0 0.4011 A + 0.4011 B + C = 0 0.6235 A + 0.4011 C = 0.2501


Put, C = 0.
\ B = –A Put, B = – A
\ 0.6235 A = 0.2501
\ 0.4011 A – 0.4011 A + C = 0
0.2501
\C=0 ∴ A= = 0.4011
0.6235
B = − A = −0.4011

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.2006


= − 0.4011
(s + 0. 4011) ( s + 0.2006)2 + 0.76372

0.4011 s + 0.2006 0.2006


= − 0.4011 + 0.4011
(s + 0. 4011) ( s + 0.2006)2 + 0.76372 ( s + 0.2006)2 + 0.76372

0.4011 s + 0.2006
= − 0.4011
(s + 0.4011) ( s + 0.2006)2 + 0.76372

0.4011 × 0.2006 0.7637


+
0.7637 (s + 0.2006)2 + 0.76372

0.4011 s + 0.2006 07637


= − 0.4011 + 0.1054
(s + 0.4011) ( s + 0.2006)2 + 0.76372 (s + 0.2006)2 + 0.76372
Chapter 7 - IIR Filters 7. 102
Digital IIR lowpass filter transfer function, H(z)
In impulse invariant transformation,
Ai Ai Using equations (7.17),
  → (7.18) and (7.19).
s + pi is transformed to − piT z −1
1− e
(s + a ) 1 − e− aT (cos bT)z−1
  →
(s + a)2 + b2 is transformed to
1 − 2e (cos bT )z−1 + e−2aT z−2
− aT

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

e−0.2006 (sin 0.7637)z−1


+ 0.1054 −0.2006
1− 2 e (cos 0.7637)z−1 + e−2 × 0.2006 −2
z

0.4011 −0.4011 + 0.2371z−1 0.0596z−1


= −1
+ −1 −2
+
1 − 0.6696 z 1 − 1.1820z + 0.6696 z 1 − 1.1820z −1 + 0.6696 z−2

0.4011 −0.4011 + 0.2371z−1 + 0.0596z−1


= −1
+
1 − 0.6696 z 1 − 1.1820z−1 + 0.6696 z−2

0.4011 −0.4011 + 0.2967z−1


= −1
+
1 − 0.6696 z 1 − 1.1820z−1 + 0.6696 z−2

0.4011 (1 − 1.1820z−1 + 0.6696 z−2 ) + (1 − 0.6696 z −1)( −0.4011 + 0.2967z−1)


=
(1 − 0.6696 z−1) (1 − 1.1820z −1 + 0.6696 z−2 )

0.4011 − 0.4741z−1 + 0.2686z−2 − 0.4011+ 0.2961z−1 + 0.2686z−2 − 0.1988z−2 )


=
1 − 1.1820z−1 + 0.6696 z −2 − 0.6696 z−1 + 0.7915z−2 − 0.4484z−3

0.0906z−1 + 0.0698z −2
=
1 − 18516
. z−1 + 14611
. z−2 − 0.4484z−3
Alternatively,

0.0906z −1 + 0.0698z−2 z−3(0.0906z2 + 0.0698z)


H(z) = −1 −2 −2
= −3 3
− .
1 18516 z + .
14611z − 0.4484z z (z − 18516
. z2 + 14611
. z − 0.4484)
0.0906z2 + 0.0698z
=
z − 1.8516z2 + 1.4611z − 0.4484
3

Note: Verify the result with MATLAB program 7.9.


Direct form-I structure of digital IIR lowpass filter

Y(z) 0.0906z−1 + 0.0698z−2


Let , H(z) = =
X(z) 1 − 18516
. z−1 + 14611
. z−2 − 0.4484z−2

On cross multiplying the above equation we get,


Y(z) – 1.8516z–1Y(z) + 1.4611z–2Y(z) – 0.4484z–3 Y(z) = 0.0906z–1 X(z) + 0.0698z–1X(z)
\ Y(z) = 0.0906z–1X(z) + 0.0698z–2X(z) + 1.8516z–1Y(z) – 1.4611z–2Y(z)
+ 0.4484z–3Y(z) .....(4)
7. 103 Digital Signal Processing
Using equation (4), the direct form -I structure is drawn as shown in fig 1.

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 )

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r.


Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.0906z−1 + 0.0698z−2


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 18516
. z−1 + 14611
. z−2 − 0.4484z−2

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.8516z–1W(z) + 1.4611z–2W(z) – 0.4484z–3 W(z) = X(z)
\ W(z) = X(z) + 1.8516z–1W(z) – 1.4611z–2W(z) + 0.4484z–3 W(z) .....(7)
On cross multiplying equation (6) we get,
Y(z) = 0.0906z–1X(z) + 0.0698z–2W(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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd er d ig ita l IIR lo w pa ss filter.


Chapter 7 - IIR Filters 7. 104
Example 7.24
Design a Chebyshev digital IIR lowpass filter using bilinear transformation by taking T = 1second, to
satisfy the following specifications.
0.8 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.2p
jw
|H(e )| £ 0.2 ; for 0.32p £ w £ p
Draw direct form-I and II structure of the filter.
Alternatively,
Passband ripple £ 1.9dB
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 / 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).

bk = 2 yN sin LM c 2k − 1 πh OP Using equation (7.90).


N 2N Q
When k = 1, bk = b1 = 2 × 0.3744 sin
LM (2 × 1 − 1)π OP = 0.3744
N 2×3 Q
ck = yN2 + cos 2 LM c h
2k − 1 π OP Using equation (7.91).
N 2N Q
When k = 1, ck = c1 = yN2 + cos 2
LM (2 × 1 − 1)π OP
MN 2 × 3 PQ
L1 + cos FGH 2π IJ O 1 + cos 2θ
= 0.37442 + cos 2
π
= 0.3744 + M2 6 KP cos2 θ =
6 MMN 2 PPQ 2

= 0.1402 + 0.75 = 0.8902

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

To evaluate B0 and B1, let, H sn b g sn = 0


=1

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

where, W c = Cutoff frequency.


Here, Wc = Wp = 0.6498 rad/sec.

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 )


= −1 −2
8(1 − 3 z + 3z − z ) + 1.946(1 − z −1 − z−2 + z−3 ) + 0.8702(1 + z−1 − z −2 − z−3 )
−3

+ 0.0914 (1 + 3z−1 + 3z −2 + z −3 )

0.0914 + 0.2742 z−1 + 0.2742 z−2 + 0.0914z−3


=
10.9076 − 24.893z −1 + 213666
. z−2 − 6.8328z−3 (a + b)2 = a 2 + 2ab + b2
(a − b)2 = a 2 − 2ab + b 2
0.0914 0.2742 z−1 0.2742 z−2 0.0914 −3
+ + + z (a + b)3 = a3 + 3a 2b + 3ab2 + b3
= 10 .9076 10.9076 10.9076 10 .9076
24.893z −1
213666
. z −2
6.8328z −3 (a − b)3 = a3 − 3a 2b + 3ab 2 − b3
1− + −
10.9076 10.9076 10.9076
0.0083 + 0.0251z−1 + 0.0251z−2 + 0.0083z−3
=
1 − 2.2821z−1 + 19589
. z−2 − 0.6264z−3
Alternatively,

0.0083 + 0.0251z−1 + 0.0251z −2 + 0.0083 z−3


H(z) =
1 − 2.2821z −1 + 19589
. z−2 − 0.6264 z−3

z−3(0.0083 z3 + 0.0251z2 + 0.0251z + 0.0083


=
z−3(z3 − 2.2821z2 + 19589
. z − 0.6264)

0.0083 z3 + 0.0251z2 + 0.0251z + 0.0083


=
z3 − 2.2821z2 + 19589
. z − 0.6264

Note: Verify the result with MATLAB program 7.10.

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.0083 + 0.0251z −1 + 0.0251z −2 + 0.0083 z −3


Let , H(z) = =
X(z) 1 − 2.2821z −1 + 19589
. z −2 − 0.6264 z −3

On cross multiplying the above equation we get,

Y(z) – 2.2821z–1Y(z) + 1.9589z–2Y(z) – 0.6264z–3 Y(z) = 0.0083 X(z)

+ 0.0251z–1X(z) + 0.0251z–2X(z) + 0.0083z–3X(z)

\ Y(z) = 0.0083X(z) + 0.0251z–1X(z) + 0.0251z–2X(z) + 0.0083z–3X(z)

+ 2.2821z–1Y(z) – 1.9589z–2Y(z) + 0.6264z–3Y(z) .....(1)


Chapter 7 - IIR Filters 7. 108
Using equation (1), the direct form -I structure is drawn as shown in fig 1.

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 )

F ig 1 : D irec t form -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r..

Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.0083 + 0.0251z −1 + 0.0251z −2 + 0.0083 z −3


Let , H(z) = = × =
X(z) X(z) W(z) 1 − 2.2821z −1 + 1.9589 z −2 − 0.6264 z −3

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.2821z–1W(z) + 1.9589z–2 W(z) –0.6264 z–3W(z) = X(z)
W(z) = X(z) + 2.2821z–1W(z) – 1.9589z–2 W(z) + 0.6264z–3W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.0083W(z) + 0.0168z–1W(z) + 0.0168z–2W(z) + 0.0083z–3W(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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd er d ig ita l IIR lo w pa ss filter.


7. 109 Digital Signal Processing

7.9 Summary of Important Concepts


1. The filters designed by considering all the infinite samples of impulse response are called IIR filters.
2. Since IIR filter design involves processing of infinite samples, the direct design of IIR filters is not
possible.
3. The IIR filters are designed via analog filters.
4. The analog filter is designed by approximating the ideal frequency response using an error function.
5. In analog filter design the approximation problem is solved to meet a specified tolerance in the passband
and stopband.
6. The popular approximation method used for analog filter design are Butterworth and Chebyshev
approximation.
7. The popular transformation method used for transforming analog filter to digital filter are impulse invariant
transformation and bilinear transformation.
8. For stability of analog filter, the poles should lie on the left half of s-plane.
9. For stability of digital IIR filter, the poles should lie inside the unit circle in z-plane.
10. For casuality of analog and digital IIR filter the number of zeros should be less than or equal to number
of poles.
11. For realizability the transfer function of analog filter should be a rational function of "s" and the coefficients
of "s" should be real.
12. For realizability the transfer function of digital IIR filter should be a rational function of "z" and the
coefficients of "z" should be real.
13. The frequency response of a practical filter will have a passband, transition band and stopband.
14. The specifications of analog filter are gain or attenuation at a passband edge and stopband edge
frequencies.
15. The specifications of digital IIR filter are gain or attenuation at a passband edge and stopband edge
frequencies.
16. The specifications of a filter are also specified in terms of ripple or tolerance in passband or stopband.
17. In impusle invariant transformation, the impulse response of digital filter is obtained by sampling the
impulse response of the analog filter.
18. In impulse invariant transformation the analog pole at s = – pi is mapped into a digital pole at z = e–piT.
19. In impulse invariant transformation any strip of width 2p/T in the s-plane for values 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.
20. In impulse invariant transformation an analog frequency, W is transformed to a digital frequency, w = W T.
21. The bilinear transformation is a conformal mapping that transforms the imaginary axis of s-plane into the
unit circle in z-plane.
22. In bilinear transformation the mapping from s-plane to z-plane is accomplished when "s" is replaced
−1
by 2 1 − z−1 .
T 1+ z

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.

|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

Passband Transition Stopband Stopband Transition Passband


band band

F ig Q 7.8a : L o w p a ss filter. F ig Q 7.8b : H ig hp a ss filte r.

Q7.9 Define ripples in a filter.


The limits of the tolerance in the magnitude of passband and stopband are called ripples. The
tolerance in passband is denoted as dp and that in stopband is denoted as ds.
Q7.10 Write a brief note on the design of IIR filter. (or How a digital IIR filter is designed?)
For designing a digital IIR filter, first an equivalent analog filter is designed using any one of the
approximation technique and the given specifications. The result of the analog filter design will be
an analog filter transfer function H(s). The analog filter transfer function is transformed to digital
filter transfer function H(z) using either Bilinear or Impulse invariant transformation.
Q7.11. Mention any two techniques for digitizing the transfer function of an analog filter.
The bilinear transformation and the impulse invariant transformation are the two techniques
available for digitizing the analog filter transfer function.
Q7.12 Compare the digital and analog filter.
Digital Filter Analog Filter
1. Operates on digital samples 1. Operates on analog signals
(or sampled version) of the signal. (or actual signals).
2. It is governed (or defined) by linear 2. It is governed (or defined) by linear
difference equation. differential equation.
3. It consists of adders, multipliers and 3. It consists of electrical components
delays implemented in digital logic like resistors, capacitors and inductors.
(either in hardware or software or
both).
4. In digital filters the filter coefficients 4. In analog filters the approximation
are designed to satisfy the desired problem is solved to satisfy the desired
frequency response. frequency response.
Q7.13 What are the advantages and disadvantages of digital filters?
Advantages of digital filters
i. High thermal stability due to absence of resistors, inductors and capacitors.
ii. The performance characteristics like accuracy, dynamic range, stability and tolerance can be
enhanced by increasing the length of the registers.
iii. The digital filters are programmable.
iv. Multiplexing and adaptive filtering are possible.
7. 113 Digital Signal Processing
Disadvantages of digital filters
i. The bandwidth of the discrete signal is limited by the sampling frequency.
ii. The performance of the digital filter depends on the hardware used to implement the filter.
Q7.14 Mention the important features of IIR filters.
i. The physically realizable IIR filters does not have linear phase.
ii. The IIR filter specifications includes the desired characteristics for the magnitude response only.
Q7.15. What is impulse invariant transformation?
The transformation of analog filter to digital filter without modifying the impulse response of the
filter is called impulse invariant transformation (ie., in this transformation the impulse response of
the digital filter will be the sampled version of the impulse response of the analog filter).
Q7.16 What is the main objective of impulse invariant transformation?
The objective of this method is to develop an IIR filter transfer function whose impulse response
is the sampled version of the impulse response of the analog filter. Therefore the frequency
response characteristics of the analog filter is preserved.
Q7.17 How are analog poles mapped to digital poles in impulse invariant transformation (or in
bilinear transformation)?
In impulse invariant transformation (or In bilinear transformation) the mapping of analog to digital
poles are as follows,
i. The analog poles on the left half of s-plane are mapped into the interior of unit circle in z-plane.
ii. The analog poles on the imaginary axis of s-plane are mapped into the unit circle in the z-plane.
iii. The analog poles on the right half of s-plane are mapped into the exterior of unit circle in z-plane.
Q7.18. What is the importance of poles in filter design?
The stability of a filter is related to the location of the poles. For a stable analog filter the poles
should lie on the left half of s-plane. For a stable digital filter the poles should lie inside the unit
circle in the z-plane.
Q7.19. Why an impulse invariant transformation is not considered to be one-to-one?
In impulse invariant transformation any strip of width 2p/T in the s-plane for values of s in the
range (2k–1)/T £ W £ (2k+1)) p/T (where k is an integer) is mapped into the entire z-plane. 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 the figure below. Hence
the impulse invariant transformation is many-to-one.
jΩ
3 π/T
jv
LHP RHP U nit circ le
j1

π/T

σ −1 1
u
−π/T

−j1
−3 π/T

F ig Q 7.1 9a : s-p lan e . F ig Q 7.1 9b : z-p lan e .


F ig Q 7 .1 9 : M ap p in g o f s-p la n e in to z-plan e in im p u lse in v a rian t tra nsform a tion .
Chapter 7 - IIR Filters 7. 114
Q7.20. Write the impulse invariant transformation used to transform real poles with and without
multiplicity.
The impulse invariant transformation used to transform real pole (at s = –pi) without multiplicity is
1 1

→ − p i T −1
s + pi 1− e z
The impulse invariant transformation used to transform multiple real pole (at s = –pi ) is
1 ( −1) m −1 d m−1 1
m

 → m −1 − p i T −1
(s + pi ) (m − 1)! dpi 1− e z
where, m is the multiplicity.
Q7.21 Write the impulse invariant transform used to transform complex conjugate poles.

(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.5e–2t

Sampling frequency, F = 1 kHz = 1 × 103 Hz

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.368z–1 Y(z) = X(z)
\ Y(z) = X(z) + 0.368z–1 Y(z)
On taking inverse Z-transform we get,
y(n) = x(n) + 0.368y(n–1)
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

F ig Q 7.28a : s-p lan e . F ig Q 7.28b : z-p lan e .


Chapter 7 - IIR Filters 7. 116
Q7.29 What is the relation between digital and analog frequency in bilinear transformation?

In bilinear transformation the digital frequency is given by,


ΩT
Digital frequency, ω = 2 tan –1
2
where, W = Analog frequency, and T = sampling time period.
Q7.30 How is bilinear transformation performed?
2 1 − z −1
The bilinear transformation is performed by letting s = in the analog filter transfer
T 1 + z −1
function.

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

frequency response of butterworth


filter. Ideal
response
The magnitude response of
N=1
butterworth filter is shown in
fig Q7.40.,from which it can be
observed that the magnitude response N = 10
approaches the ideal response as the N=4 N=2

order of the filter is increased.


ΩC Ω
F ig Q 7.40 : M a g nitu d e re sp o n se o f bu tte rw o rth
lo w pa ss filte r fo r v ario u s v alu e s o f N .
Chapter 7 - IIR Filters 7. 118
Q7.41 Write the transfer function of unnormalized Butterworth lowpass filter.
When N is even,
Transfer function of analogUVH(s) = N/2
Ω2c
lowpass Butterworth filter W ∏s 2
+ b k Ωc s + Ωc2
k =1

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

where, b k = 2sin b 2k −1gπ


2N

N = Order of the filter


W c = Analog cutoff frequency
Q7.42 How will you choose the order N for a Butterworth filter?
Calculate a parameter N1 using the following equation and correct it to nearest integer.

log
LM e j
1/ A 2s −1 OP
N1 =
1 MN e j
1/ A 2p −1 PQ
2 logFH IK
Ωs
Ωp

Choose the order N of the filter such that N ³ N1.


Q7.43 Write the properties of Butterworth filter.
i. The Butterworth filters are all pole design.
ii. At the cutoff frequency W c, the magnitude of normalized Butterworth filter is 1 / 2 .
iii. The filter order N, completely specifies the filter and as the value of N increases the magnitude
response approaches the ideal response.
iv. The magnitude is maximally flat at the origin and monotonically decreasing with
increasing W .
Q7.44 What is Chebyshev approximation?
In Chebyshev approximation, the approximation function is selected such that the error is minimized
over a prescribed band of frequencies.
Q7.45 What is type-1 Chebyshev approximation?
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.
Q7.46 What is type-2 Chebyshev approximation?
In type-2 Chebyshev approximation, the error function is selected such that, the magnitude response
is monotonic is passband and equiripple in stopband. The type-2 magnitude response is called
inverse Chebyshev response.
7. 119 Digital Signal Processing
Q7.47 Write the magnitude function of Chebyshev lowpass filter.
The magnitude response of type-1 lowpass Chebyshev filter is given by,
1
|H(jΩ)| =
1+ ∈2 C2N
FG Ω IJ
HΩ K
c

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.

Q7.50 Sketch the magnitude response of type-2 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 .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.

Q7.51 Write the transfer function of unnormalized Chebyshev lowpass filter.


When N is even,
N
2
B Ω2
H (s) = ∏ s2 + bkΩkcs c+ ckΩ2c
k=1
Chapter 7 - IIR Filters 7. 120
When N is odd,
N −1
B0Ωc 2
Bk Ωc2
H ( s) =
s + c 0Ω c
∏ s2 + b k Ωcs + c k Ωc2
k=1

where, b k = 2y N sin e (2k −1) π


2N
j ; ck = y2N + cos2 (2k −1) π
2N
; c0 = y N

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.

Butterworth Chebyshev Type - 1


i. All pole design. i. All pole design.
ii. The poles lie on a circle in s- plane. ii. The poles lie on an ellipse in s- plane.
iii. The magnitude response is iii. The magnitude response is
maximally flat at the origin and equiripple in passband and
monotonically decreasing function monotonically decreasing in the
of W . stopband.
iv. The normalized magnitude iv. The normalized magnitude
response has a value of 1 2 at response has a value of 1 1+ ∈2 at
the cutoff frequency W c. the cutoff frequency W c.
v. Only few parameters has to be v. A large number of parameters has
calculated to determine the transfer to be calculated to determine the
function. transfer function.
7. 121 Digital Signal Processing
7.11. MATLAB Programs
Program 7.1

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.15.

%To design a Butterworth 2nd order lowpass filter using bilinear


transformation

clear all
clc

AP=0.6; %Gain at passband edge frequency


AS=0.1; %Gain at stopband edge frequency
PEF_D=0.35*pi; %Passband edge digital frequency
SEF_D=0.7*pi; %Stopband edge digital frequency
T=.1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[num,den]=bilinear(B,A,1/T); %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
154.8
—————————––––––––––––
s^2 + 17.6 s + 154.8

Digital Transfer Function is,


Transfer function:
0.1708 z^2 + 0.3415 z + 0.1708
———————————————––––––––––––––––
z^2 - 0.5407 z + 0.2237

Sampling time: 0.1

Frequency Response is,


Hw =
Columns 1 through 8
1.0000 0.9743 - 0.2237i 0.8885 - 0.4474i 0.7215 - 0.6526i
0.4654 - 0.7869i 0.1696 - 0.7865i -0.0658 - 0.6518i -0.1837 - 0.4632i

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

Magnitude Response is,


Hw_mag =
Columns 1 through 16
1.0000 0.9997 0.9948 0.9729 0.9142 0.8046 0.6551 0.4983
0.3610 0.2523 0.1703 0.1099 0.0663 0.0356 0.0153 0.0038

Column 17
0.0000

F ig P7.1 : M ag n itud e re spo n se.


7. 123 Digital Signal Processing
Program 7.2

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.16.

%To design a Butterworth 2nd order highpass filter using bilinear


transformation

clear all
clc

AP=0.6; %Gain at passband edge frequency


AS=0.1; %Gain at stopband edge frequency
PEF_D=0.35*pi; %Passband edge digital frequency
SEF_D=0.7*pi; %Stopband edge digital frequency
T=.1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’high’,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[num,den]=bilinear(B,A,1/T); %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
s^2
——————————––––––––––
s^2 + 17.6 s + 154.8

Digital Transfer Function is,


Transfer function:
0.4411 z^2 - 0.8822 z + 0.4411
——————————————–––––––––––––––––
z^2 - 0.5407 z + 0.2237

Sampling time: 0.1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P 7 .2 : M ag n itud e re spo n se.


7. 125 Digital Signal Processing
Program 7.3

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.17.

%To design a Butterworth 3rd order lowpass filter using bilinear transformation

clear all
clc

AP=0.707; %Gain at passband edge frequency


AS=0.2; %Gain at stopband edge frequency
PEF_D=0.45*pi; %Passband edge digital frequency
SEF_D=0.65*pi; %Stopband edge digital frequency
T=.5; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[num,den]=bilinear(B,A,1/T); %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Normalised Transfer Function is,


Transfer function:
1
—————————–––––––––––––
s^3 + 2 s^2 + 2 s + 1

Unnormalised Transfer Function is,


Transfer function:
56.77
———————————————–––––––––––––––––––
s^3 + 7.687 s^2 + 29.54 s + 56.77

Digital Transfer Function is,


Transfer function:
0.1569 z^3 + 0.4706 z^2 + 0.4706 z + 0.1569
————————————————————–––––––––––––––––––––––––
z^3 - 0.07324 z^2 + 0.3348 z - 0.006666

Sampling time: 0.5

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P 7 .3 : M ag n itud e re spo n se.


7. 127 Digital Signal Processing

Program 7.4

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.18.

%To design a Butterworth 3rd order highpass filter using bilinear


transformation

clear all
clc

AP=0.707; %Gain at passband edge frequency


AS=0.2; %Gain at stopband edge frequency
PEF_D=0.45*pi; %Passband edge digital frequency
SEF_D=0.65*pi; %Stopband edge digital frequency
T=.5; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’high’,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[num,den]=bilinear(B,A,1/T); %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Normalised Transfer Function is,


Transfer function:
1
——————————––––––––––––
s^3 + 2 s^2 + 2 s + 1

Unnormalised Transfer Function is,


Transfer function:
s^3
———————————————–––––––––––––––––––
s^3 + 7.687 s^2 + 29.54 s + 56.77

Digital Transfer Function is,


Transfer function:
0.1768 z^3 - 0.5305 z^2 + 0.5305 z - 0.1768
—————————————————————––––––––––––––––––––––––
z^3 - 0.07324 z^2 + 0.3348 z - 0.006666

Sampling time: 0.5

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P7.4 : M ag n itud e re spo n se.


7. 129 Digital Signal Processing
Program 7.5
Write a MATLAB program to design an IIR filter to satisfy the specifications
of example 7.19.

%To design a Butterworth 2nd order lowpass filter using impulse


invariant transformation

clear all
clc

AP=0.707; %Gain at passband edge frequency


AS=0.2; %Gain at stopband edge frequency
PEF_D=0.3*pi; %Passband edge digital frequency
SEF_D=0.75*pi; %Stopband edge digital frequency
T=1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[ n u m , d e n ] = i m p i n v a r ( B , A , 1 / T ) ; %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
1.133
——————————–––––––––––
s^2 + 1.505 s + 1.133

Digital Transfer Function is,


Transfer function:
0.4848 z
———————————–––––––––––––
z^2 - 0.6876 z + 0.2219

Sampling time: 1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P7.5 : M ag n itud e re spo n se.


7. 131 Digital Signal Processing
Program 7.6
Write a MATLAB program to design an IIR filter to satisfy the specifications
of example 7.20.

%To design a Butterworth 3rd order lowpass filter using impulse


invariant transformation

clear all
clc

AP=0.9; %Gain at passband edge frequency


AS=0.275; %Gain at stopband edge frequency
PEF_D=0.35*pi; %Passband edge digital frequency
SEF_D=0.7*pi; %Stopband edge digital frequency
T=1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[ n u m , d e n ] = i m p i n v a r ( B , A , 1 / T ) ; %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
3.042
————————————————––––––––––––––––––
s^3 + 2.898 s^2 + 4.199 s + 3.042

Digital Transfer Function is,


Transfer function:
-4.441e-016 z^3 + 0.5074 z^2 + 0.1985 z
———————————————————––––––––––––––––––––––
z^3 - 0.536 z^2 + 0.3055 z - 0.05514

Sampling time: 1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P 7 .6 : M ag n itud e re spo n se.


7. 133 Digital Signal Processing
Program 7.7

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.21.

%To design a Butterworth 4th order lowpass filter using impulse invariant
transformation

clear all
clc

AP=0.8; %Gain at passband edge frequency


AS=0.2; %Gain at stopband edge frequency
PEF_D=0.2*pi; %Passband edge digital frequency
SEF_D=0.32*pi; %Stopband edge digital frequency
T=1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[ n u m , d e n ] = i m p i n v a r ( B , A , 1 / T ) ; %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
0.2085
———————————————————————––––––––––––––––––––––––––
s^4 + 1.766 s^3 + 1.559 s^2 + 0.8063 s + 0.2085

Digital Transfer Function is,


Transfer function:
4.441e-016 z^4 + 0.02189 z^3 + 0.05529 z^2 + 0.009073 z
——————————————————————————–––––––––––––––––––––––––––––––
z^4 - 2.289 z^3 + 2.181 z^2 - 0.977 z + 0.1711

Sampling time: 1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P7.7 : M ag n itud e re spo n se.


7. 135 Digital Signal Processing
Program 7.8

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.22.

%To design a Butterworth 4th order lowpass filter using bilinear


transformation

clear all
clc

AP=0.707; %Gain at passband edge frequency


AS=0.08; %Gain at stopband edge frequency
PEF_D=0.2*pi; %Passband edge digital frequency
SEF_D=0.4*pi; %Stopband edge digital frequency
T=1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=butter(N,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=butter(N,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[ n u m , d e n ] = b i l i n e a r ( B , A , 1 / T ) ; %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
0.3578
———————————————————————–––––––––––––––––––––––––
s^4 + 2.021 s^3 + 2.042 s^2 + 1.209 s + 0.3578

Digital Transfer Function is,


Transfer function:
0.008299 z^4 + 0.0332 z^3 + 0.0498 z^2 + 0.0332 z + 0.008299
–––––––––––––––––––––––––––––––––——————————————————————————————
z^4 - 2.089 z^3 + 1.898 z^2 - 0.8134 z + 0.1378

Sampling time: 1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P 7 .8 : M ag n itud e re spo n se.


7. 137 Digital Signal Processing
Program 7.9

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.23.

%To design a Chebyshev 3rd order lowpass filter using impulse


invariant transformation

clear all
clc

AP=0.9; %Gain at passband edge frequency


AS=0.24; %Gain at stopband edge frequency
PEF_D=0.25*pi; %Passband edge digital frequency
SEF_D=0.5*pi; %Stopband edge digital frequency
T=1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=cheby1(N,alpha_P,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=cheby1(N,alpha_P,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[ n u m , d e n ] = i m p i n v a r ( B , A , 1 / T ) ; %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
0.2501
–––––––––––––––––––——————————————————
s^3 + 0.8022 s^2 + 0.7844 s + 0.2501

Digital Transfer Function is,


Transfer function:
5.551e-017 z^3 + 0.09112 z^2 + 0.06993 z
–––––––––––––––––––––————————————————————
z^3 - 1.852 z^2 + 1.461 z - 0.4484

Sampling time: 1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P7.9 : M ag n itud e re spo n se.


7. 139 Digital Signal Processing
Program 7.10

Write a MATLAB program to design an IIR filter to satisfy the specifications


of example 7.24.

%To design a Chebyshev 3rd order lowpass filter using bilinear


transformation

clear all
clc

AP=0.8; %Gain at passband edge frequency


AS=0.2; %Gain at stopband edge frequency
PEF_D=0.2*pi; %Passband edge digital frequency
SEF_D=0.32*pi; %Stopband edge digital frequency
T=1; %Sampling time
alpha_P=-20*log10(AP) %Passband attenuation in dB
alpha_S=-20*log10(AS) %stopband attenuation in dB

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

[Bn,An]=cheby1(N,alpha_P,1,’s’); %Normalised transfer function


display(‘Normalised Transfer Function is,’)
Hsn=tf(Bn,An)

[B,A]=cheby1(N,alpha_P,CF,’s’); %Unnormalised transfer function


display(‘Unnormalised Transfer Function is,’)
Hs=tf(B,A)

[ n u m , d e n ] = b i l i n e a r ( B , A , 1 / T ) ; %Digital transfer function


display(‘Digital Transfer Function is,’)
Hz=tf(num,den,T)

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

Unnormalised Transfer Function is,


Transfer function:
0.09147
——————————————————––––––––––––––––––––
s^3 + 0.4867 s^2 + 0.4351 s + 0.09147

Digital Transfer Function is,


Transfer function:
0.008386 z^3 + 0.02516 z^2 + 0.02516 z + 0.008386
———————————————————————––––––––––––––––––––––––––––
z^3 - 2.274 z^2 + 1.967 z - 0.6263

Sampling time: 1

Frequency Response is,


Hw =

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

Magnitude Response is,


Hw_mag =

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

F ig P 7 .10 : M ag n itud e re spo n se.


7. 141 Digital Signal Processing

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

III. Choose the right answer for the following questions


1. IIR filters are designed by considering all the
a) Infinite samples of frequency response
b) Finite samples of impulse response.
c) Infinite samples of impulse response.
d) None of the above.
7. 143 Digital Signal Processing
2. For the analog and digital IIR filters to be casual, the number of zeros should be
a) ³ Number of poles. b) £ Numbers of poles.
c) = Number of poles. d) Zero.
3. An analog filter has poles at s = 0, s = –2, s = –1. If impulse invariant transformation is employed then
the corresponding poles of digital filters are respectively,
−T
a) 0, e 2 , eT b) 1, e −2T , eT c) 1, e2T , e− T d) 0, e −2T , e − T

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

IV. Answer the following questions


1. Discuss the advantages and disadvantages of digital filters.
2. Sketch the ideal and practical frequency response of four basic types of analog filters and mark the
important filter specifications.
3. Sketch the ideal and practical frequency response of four basic types of digital IIR filters and mark the
important filter specifications.
4. Derive the impulse invariant transformation to transform an analog system to digital system.
5. Explain the mapping of s-plane to z-plane in impulse invariant transformation.
6. Derive the relation between analog and digital frequency in impulse invariant transformation.
7. Derive the bilinear transformation to transform an analog system to digital system.
8. Explain the mapping of s-plane to z-plane in bilinear transformation.
9. Derive the relation between analog and digital frequency in bilinear transformation.
10. Discuss the Butterworth approximation.
11. Derive the expression to determine the poles of Butterworth filter.
12. Write the procedure for design of lowpass digital Butterworth IIR filter.
13. Discuss the Chebyshev approximation.
14. Write the procedure for design of lowpass digital Chebyshev IIR filter.
15. Discuss the frequency transformation IIR filters.
Chapter 7 - IIR Filters 7. 146
V. Solve the following problems

E7.1. For the analog transfer function, H(s) =


bs + 1g
bs + 2gbs + 4g , determine H(z) using impulse invariant
transformation if (a) T = 1 second and (b) T = 0.5 second.

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

1 − 0.4842 z −1 0.5 − 0.2421z −1


b) H(z) = ; H N ( z) =
1 − 0.5032 z −1 + 0.0498 z −2 1 − 0.5032 z −1 + 0.0498z −2
1 + 0.2067 z −1
E7.2 H(z) =
1 + 0.4133 z −1 + 0. 2466 z −2
0.2017 z −1 0.1009 z −1
E7.3 H(z) = ; H N ( z) =
1 − 0.0858 z −1 + 0. 3678 z −2 1 − 0.0858z −1 + 0. 3678z −2
0.0475 + 0.0950 z −1 + 0.0475 z −2 0.0307 + 0.0613 z −1 + 0.0307 z −2
E7.4 a) H(z) = ; b) H(z) =
1 + 0.6698 z −1 + 0.6199 z −2 1 − 0 .1128 z −1 + 0.5911 z −2
0 .5333 − 0.5333 z −2
E7.5 H(z) =
1 − 0 . 2667 z −1 − 0.2 z −2
0.4990 − 1.4970z −1 + 1. 4970 z −2 − 0.4990 z −3
E7.6 H(z) =
1 − 2.6592 z −1 + 2.3272 z −2 − 0.6671 z −3
0.0943 + 0.0018 z −1 − 0.0925 z −2
E7.7 H(z) =
1 − 1.7735 z −1 + 0.9626 z −2
0. 3215 + 0.643z−1 + 0.3215 z −2
E7.8 H(z) =
.
1 + 01122 z−1 + 0.1738 z −2
0.2654 − 0.5308 z −1 + 0. 2654 z −2
E7.9 H(z) =
1 + 0.1122 z −1 + 0.1738 z −2
0.3138 + 0.9414 z−1 + 0.9414 z −2 + 0.3138 z −3
E7.10 H(z) =
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
0.0709 − 0. 2128 z −1 + 0. 2128 z −2 − 0.0709 z −3
E7.11 H(z) =
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
0.6979 z −1 0.5583 z −1
E7.12 H(z) = ; H N ( z) =
1 − 0.5379 z −1 + 0.1748 z −2 1 − 0.5379 z −1 + 0.1748z −2
0.4405 z −1 + 0.1843 z −2
E7.13 H(z) =
1 − 0.6695 z−1 + 0.3684 z−2 − 0.0685 z−3
0.0767 z −1 + 0.1567 z −2 + 0.0215 z −3
E7.14 H(z) =
1 − 1.6058 z −1 + 1.2796 z −2 − 0.4967 z −3 + 0.0777 z −4
0.0154 + 0.0617 z −1 + 0.0925 z −2 + 0.0617 z−3 + 0.0154 z −4
E7.15 H(z) =
1 − 1.7024 z −1 + 14160
. z −2 − 0.5558 z −3 + 0.0889 z −4
0.0874 z −1 + 0.0687 z −2
E7.16 H(z) =
1 − 1.8793 z−1 + 1.5215 z −2 − 0.4862 z −3
0.0219 + 0.0656z −1 + 0.0656 z −2 + 0.0219 z −3
E7.17 H(z) =
1 − 1.8444 z −1 + 1.4713 z −2 − 0.4519 z −3
Solution for Exercise Problems E7. 1

Digital Signal Processing - A. Nagoor Kani Chapter 7 - IIR Filters

Solution for Exercise Problems

E7.1 For the analog transfer function, H(s) =


bs + 1g , determine H(z) using impulse invariant transformation if
bs + 2gbs + 4g
(a) T = 1 second and (b) T = 0.5 second.
Solution
(s + 1)
Given that, H(s) =
(s + 2) (s + 4)
By partial fraction expansion technique we can write,

(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

(b) When T = 0.5 second

−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

E7.2. Convert the analog filter with system transfer function,


(s + 0.7)
H(s) =
s 2 + 1.4 s + 4.49
into a digital IIR filter by means of the impulse invariant method.
Solution
s + 0.7
Given that , H(s) = The roots of the quadratic
s 2 + 14
. s + 4.49
s2 + 1.4s + 4.49 = 0 are
By partial fraction expansion H(s) can be expressed as,

s + 0.7 A A∗ −1.4 ± 1.4 2 − 4 × 4.49


H(s) = = + s=
(s + 0.7 − j2) (s + 0.7 + j2) (s + 0.7 − j2) (s + 0.7 + j2) 2
−1.4 1
s + 0.7 = ± −16 = −0.7 ± j2
A= × (s + 0.7 − j2) 2 2
(s + 0.7 − j2) (s + 0.7 + j2) s = − 0.7 + j2
∴ (s2 + 1.4s + 4.49)
−0.7 + j2 + 0.7 j2 = (s − ( −0.7 + j2)(s − (− 0.7 − j2))
= = = 0.5
−0.7 + j2 + 0.7 + j2 j4
= (s + 0.7 − j2)(s + 0.7 + j2)
b g
A∗ = 0.5 = 0.5

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

0.5 0 .5 0.5 0.5


∴ H(z) = + = +
1 − e − (0.7 − j2)T z −1 1 − e − (0.7 + j2)T z −1 1 − e −0.7 e j2 z −1 1 − e −0.7 e − j2 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

By partial fraction expansion H(s) can be expressed as, ∴ (s2 + 2s + 10)


= (s − (−1 + j3))(s − (− 1 − j3))
1 A A∗
H(s) = = + = (s + 1 − j3)(s + 1+ j3)
(s + 1 − j3) (s + 1 + j3) s + 1 − j3 s + 1 + j3
Solution for Exercise Problems E7. 3
1 1 1
A= × (s + 1 − j3) = = = − j0.1667
(s + 1 − j3) (s + 1 + j3) s = −1+ j3
−1 + j3 + 1 + j3 j6

b
A = − j0.1667 g∗
= j 0.1667

− 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

− j 0.1667 + j0.1667 e −0.5 e − j15


.
z −1 + j0.1667 − j0.1667 e −0.5 e j15
.
z −1
= −0.5 − j15
. −1 −0.5 j15 . −1 −0.5 j15
. −0.5 − j15
. −2
1− e e z −e e z +e e e e z

=
− 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

0.2017 z −1 Note : Evalutate cosq and sinq by


=
1 − 0.0858 z −1 + 0.3678 z −2 keeping calculator in radian mode.

Alternatively,

0.2017 z −1 0.2017 z −1 0.2017 z


H(z) = −1 −2
= −2 2 =
1 − 0 .0858 z + 0.3678 z z (z − 0 . 0858 z + 0. 3678) z2 − 0 . 0858 z + 0. 3678

Since T < 1, we can compute magnitude normalized transfer function, HN(z)


0.5 × 0.2017z −1 0.1009 z −1
HN (z) = T × H(z) = −1 −2
=
1 − 0.0858z + 0.3678 z 1 − 0.0858z −1 + 0.3678z −2
Alternatively,
0.5 × 0.2017z 01009
. z
HN (z) = T × H(z) = 2
= 2
z − 0.0858z + 0.3678 z − 0.0858z + 0.3678

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

(4800 − 14400z −1 + 14400z −2 − 4800z −3 )


= −1 −2
8000 (1 − 3z + 3z − z ) + 1600 (1 − z −1 − z −2 + z −3 ) + 18 (1 + z −1 − z −2 − z −3 ) + (1 + 3z −1 + 3z −2 + z −3 )
−3

4800 14400 −1 14400 −2 4800 −3


− z + z − z
4800 − 14400z −1 + 14400 z −2 − 4800z −3 9619 9619 9619 9619
= =
−1 −2
9619 − 25579z + 22385z − 6417z −3 25579 −1 25385 −2 6417 −3
1− z + z − z
9619 9619 9619
−1
0.4990 − 14970z
. + 14970
. z −2 − 0.4990 z −3
=
1 − 2.6592 z + 2.3272z − 0.6671z −3
−1 −2

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) + 0.1T(1 + z −1)


T(1+ z −1) 2(1 − z −1) + 0.1T(1 + z −1) T(1 + z −1)
= =
4(1 − z −1)2 + 0.4T(1 − z −1)(1 + z −1) + 5.01T 2 (1 + z −1)2 4(1 − z −1)2 + 0.4T(1 − z −2 ) + 5.01T 2 (1 + z −1)2
T 2 (1+ z −1)2

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

0.404 0.008 −1 0.396 −2


+ z − z
0.404 + 0.008z −1 − 0.396 z −2 4.2804 4.2804 4.2804
= =
−1
4.2804 − 7.5992 z + 4.1204 z −2 7.5992 −1 4.1204 −2
1− z + z
4.2804 4.2804
0.0943 + 0.0018 z −1 − 0.0925 z −2
=
1 − 1.7735 z −1 + 0.9626 z −2
Alternatively,
0.0943 + 0.0018 z −1 − 0.0925 z −2 z −2 (0.0943z 2 + 0.0018 z − 0.0925) 0.0943z 2 + 0.0018 z − 0.0925
H(z) = = =
1 − 17735
. z −1 + 0.9626 z −2 z −2 (z2 − 1.7735 z + 0.9626) z2 − 17735
. z + 0.9626

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.

For bilinear transformation,

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

LM e1/ A 2s j − 1O LM e1/ 0.3 2 j − 1O


P LM
10.1111 OP
log
MN e P
j − 1PQ
log
MN e j − 1PQ
log
N1 =
1 1/ A p2
=
1 1/0.8 2
=
1 N
0. 5625 Q
= 14536
. Using equation (7.57).
2 Ωs 2 log 19.6261 2 log 19.6261
log
Ωp 7.2654 7 .2654

Choose order N, such that N ³ N1 and N is an integer.


Let, order, N = 2.
Solution for Exercise Problems E7. 7
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 b2k −1g π Using equation (7.60).


2N

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

where, W c = Cutoff frequency.


Ωs 19.6261
Ωc = 1
= 1
= 110061
. rad / sec Using equation (7.61).
e1/ A 2s j − 1 2N e1/ 0.32 j − 1 4

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

Y(z) 0.3215 + 0.643 z −1 + 0.3215 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.3215 X(z) + 0.643z–1X(z) + 0.3215z–2X(z)
\ Y(z) = 0.3215X(z) + 0.643z–1X(z) + 0.3215z–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.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)

F ig 1 : D irect fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR lo w p a ss filter.

Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.3215 + 0.643 z −1 + 0.3215 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.3215 + 0.643 z −1 + 0.3215 z −2 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) + 0.1122z–1W(z) + 0.1738z–2 W(z) = X(z)
\ W(z) = X(z) – 0.1122z–1W(z) – 0.1738z–2 W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.3215W(z) + 0.643z–1W(z) + 0.3215z–2W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.

X (z) W(z) 0.3215 W(z) Y (z )


+ 0.3215
+

−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

F ig 2 : D irec t fo rm -II struc ture o f 2 n d o rd er d ig ita l IIR lo w p ass filter.


Frequency Response, H(ejww )

0.3215 + 0.643 z −1 + 0.3215 z −2 0.3215 + 0.643 e − jω + 0.3215 e − j2ω


d i
H e jω = H(z)
z = e jω
=
1 + 0.1122 z −1 + 0.1738 z −2
=
1 + 0.1122 e − jω + 0.1738 e − j2ω
z = e jω

=
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ω

where, HN(ejw ) = (0.3215 + 0.643cosw + 0.3215 cos2w) + j(– 0.643sinw – 0.3215sin2w)


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 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(ejww )|
0 ×π
16
1.286 + j0 1.286 + j0 1 + j0 1.0000
1×π
16
1.2492 – j0.2485 1.2706 – j0.0884 0.9920 – j0.1266 1.0000
2 ×π
16
1.1429 – j0.4734 1.2265 – j0.1658 0.9664 – j0.2553 0.9995
3 ×π
16
0.9792 – j0.6543 1.1598 – j0.2229 0.9188 – j0.3878 0.9973
4 ×π
16
0.7762 – j0.7762 1.0793 – j0.2531 0.8415 – j0.5218 0.9902
5 ×π
16
0.5557 – j0.8317 0.9958 – j0.2539 0.7239 – j0.6506 0.9733
6 ×π
16
0.3402 – j0.8214 0.9200 – j0.2265 0.5559 – j0.7559 0.9384
7 ×π
16
0.1499 – j0.7537 0.8613 – j0.1765 0.3391 – j0.8056 0.8740
8 ×π
16
0 – j0.643 0.8262 – j0.1122 0.1038 – j0.7642 0.7712
9 ×π
16
–0.1009 – j0.5076 0.8175 – j0.0435 –0.0901 – j0.6257 0.6322
10 ×π
16
–0.1519 – j0.3667 0.8341 + j0.0192 –0.1921 – j0.4352 0.4757
11× π
16
–0.1588 – j0.2376 0.8712 + j0.0673 –0.2021 – j0.2571 0.3271
12 ×π
16
–0.1332 – j0.1332 0.9207 + j0.0945 –0.1578 – j0.1285 0.2035
13 ×π
16
–0.0901 – j0.0602 0.9732 + j0.0982 –0.0978 – j0.0519 0.1108
14 ×π
16
–0.0452 – j0.0187 1.0192 + j0.0799 –0.0455 – j0.0148 0.0478
15 × π
16
–0.0121 – j0.0024 1.0505 + j0.0446 –0.0116 – j0.0018 0.0117
16 ×π
16
0 + j0 1.0616 + j0 0 + j0 0

|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

F ig 3 : F req u en c y resp on se o f 2 n d o rd er d ig ita l B utterw o rth IIR lo w p ass filter.

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

Choose order N, such that N ³ N1 and N is an integer.


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 + b k sn + 1 Using equation (7.58).
k =1

where, bk = 2 sin b2k −1g π


2N Using equation (7.60).
Solution for Exercise Problems E7. 11
N 2
Here, N = 2, ∴ k = 2
= 2
=1

1
b g
∴ H sn =
sn2 + b1 sn + 1

When k = 1 ; bk = b1 = 2 sin LM b g OP = 1.4142


2 −1 π Calculate sinq using
N Q2×2 calculator in radian mode.
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
Unnormalized transfer function, H(s) of Butterworth highpass filter
The highpass filter with cutoff frequency, W c can be obtained from normalized lowpass filter using the transformation sn ® W c/s.

∴ H(s) = H sn b g Ωc
sn =
s

where, W c = Cutoff frequency.


Ωs 19.6261
Ωc = 1
= 1
= 11.0061 rad / sec
Using equation (7.61).
b g−1
1/ A 2
s
2N e1/ 0.32 j − 1 4

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.

X (z) W(z) 0. 2654 W (z) Y (z )


+ 0.2654
+

−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 z −1 + 0.2654 z −2


d i
H e jω = H(z)
z = e jω
=
1 + 0.1122 z −1 + 0.1738 z −2 z = e jω

=
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

Let, Hde i =

=
H de i
D

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

w HN(ejww ) HD(ejww ) H(ejww ) |H(e jww )|


0× π
16
0 + j0 1.286 + j0 0 + j0 0
1×π
16
–0.0100 + j0.0019 1.2706 – j0.0884 –0.0079 + j0.0009 0.0079
2 ×π
16
–0.0373 + j0.0155 1.2266 – j0.1658 –0.0315 + j0.0084 0.0326
3 ×π
16
–0.0744 + j0.0497 1.1598 – j0.2229 –0.0698 + j0.0294 0.0757
4 ×π
16
–0.1099 + j0.1099 1.0793 – j0.2531 –0.1191 + j0.0739 0.1402
5 ×π
16
–0.1310 + j0.1961 0.9958 – j0.2538 –0.1707 + j0.1534 0.2295
6× π
16
–0.1254 + j0.3027 0.9200 – j0.2265 –0.2048 + j0.2786 0.3458
7 ×π
16
–0.0834 + j0.4190 0.8613 – j0.1765 –0.1886 + j0.4478 0.4859
8 ×π
16
0 + j0.5308 0.8262 – j0.1122 –0.0857 + j0.6308 0.6366
9× π
16
0.1237 + j0.6222 0.8175 – j0.0435 0.1105 + j0.7669 0.7749
10 ×π
16
0.2809 + j0.6781 0.8341 + j0.0192 0.3553 + j0.8048 0.8797
11× π
16
0.4587 + j0.6865 0.8711 + j0.0672 0.5838 + j0.7430 0.9450
12 ×π
16
0.6407 + j0.6407 0.9206 + j0.0944 0.7593 + j0.6181 0.9791
13 ×π
16
0.8083 + j0.5401 0.9732 + j0.0982 0.8776 + j0.4664 0.9939
14 ×π
16
0.9435 + j0.3908 1.0192 + j0.0799 0.9499 + j0.3089 0.9989
15 × π
16
1.0312 + j0.2051 1.0505 + j0.0446 0.9881 + j0.1533 0.9999
16 ×π
16
1.0616 + j0 1.0616 + j0 1 + j0 1.0000

|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

F ig 3 : F req u en c y resp on se o f 2 n d o rd er d ig ita l B utterw o rth IIR hig h pa ss filte r.

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

where, bk = 2 sin b2k −1g π


2N Using equation (7.60).
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 + 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

where, W c = Cutoff frequency.


Ωs 20.5179 Using equation (7.61).
Ωc = 1
= 1
= 10.9432 rad / second
e1/ A 2
s j −1 2N e
1/ 0.15 2 j −1 6

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

Digital IIR lowpass filter transfer function, H(z)


For bilinear transformation,

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)

1310.4879 Put, T = 0.3


=
8(1− z−1)3 + 87.5456T (1+ z−1)(1− z−1)2 + 479.0144 (1− z−1) T2 (1+ z−1)2 + 1310.4876 T3 (1+ z−1)3
T3 (1+ z−1)3
1310.4879T3 (1+ z−1)3
= −1 3
8(1− z ) + 87.5456 T(1+ z )(1− z ) + 479.0144 (1− z−1) T2 (1+ z−1)2 + 1310.4876 T3 (1+ z−1)3
−1 −1 2

1310.4879 × 0.32 (1+ z−1)3


=
8(1− z ) + 87.5456 × 0.3 (1− z ) (1+ z−1) + 479.0144 × 0.32 (1− z−1)(1+ z−1)2 +1310.4876 × 0.33 (1+ z−1)3
−1 3 −1 2

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

Y(z) 0.3138 + 0.9414 z −1 + 0.9414 z −2 + 0.3138 z −3


Let, H(z) = =
X(z) 1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
On cross multiplying the above equation we get,
Y(z) + 0.8779z–1Y(z) + 0.5389z–2Y(z) + 0.0934 z–3Y(z) = 0.3138X(z) + 0.9414z–1X(z) + 0.9414z–2X(z) + 0.3138z–3X(z)
\ Y(z) = 0.3138X(z) + 0.9414z–1X(z) + 0.9414z–2X(z) + 0.3138z–3X(z) – 0.8779z–1Y(z)
– 0.5389z–2Y(z) – 0.0934z–3Y(z) .....(1)
E7. 16 DSP, Chapter 7 - IIR Filters
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
0.3138X(z)
X (z) 0.3138 + + Y (z)

−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)

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r.


Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.3138 + 0.9414 z −1 + 0.9414 z −2 + 0.3138 z −3


Let, H(z) = = × =
X(z) X(z) W(z) 1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
W(z) 1
where, = .....(2)
X(z) 1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3

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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd er d ig ita l IIR lo w pa ss filter.

Frequency Response, H(ejww )

0.3138 + 0.9414 z −1 + 0.9414 z −2 + 0.3138z −3


d i
H e jω = H(z)
z = e jω
=
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3 z = e jω

0.3138 + 0.9414 e − jω + 0.9414 e − j2ω + 0.3138 e − j3ω


=
1 + 0.8779 e − jω + 0.5389 e − j2ω + 0.0934 e − j3ω

=
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

where, HN(ejw ) = (0.3138 + 0.9414cosw + 0.9414 cos2w + 0.03138 cos3w)

+ j(–0.9414sinw – 0.9414sin2w – 0.3138sin3w)

HD(ejw ) = (1 + 0.8779cosw + 0.5389cos2w + 0.0934cos3w)

+ j(–0.8779sinw – 0.5389sin2w – 0.0934sin3w)

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

Choose order N, such that N ³ N1 and N is an integer.


Let, order, N = 3.
Solution for Exercise Problems E7. 19
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

where, bk = 2 sin b2k −1g π


2N Using equation (7.60).
N−1 3−1
Here, N = 3, ∴ k = 2
= 2
=1

1 1
∴ H sn =b g ×
sn + 1 sn2 + b1 sn + 1

W hen k = 1 ; b k = b 1 = 2 sin LM b 2 −1 πg OP = 1 Calculate sinq using


N 2 × 3 Q calculator in radian mode.
1 1 1
∴ H sn =b g = =
(sn + 1) (sn2 + sn + 1) sn3 + sn2 + sn + sn2 + sn + 1 sn3 + 2 sn2 + 2 sn + 1
Unnormalized transfer function, H(s) of Butterworth highpass filter
The highpass filter with cutoff frequency, W c can be obtained from normalized lowpass filter using the transformation, sn ® W c/s.

∴ H(s) = H sn b g Ωc
sn =
s

where, W c = Cutoff frequency.


Ωs 20.5179
Ωc = 1
= 1
= 10.9432 rad / second Using equation (7.61).
e1/ A 2s j − 1 2N e1/ 0.152 j − 1 6
1
∴ H(s) = H sn b g Ω
=
sn3 + 2sn2 + 2sn + 1 Ωc
sn = c sn =
s s
1 1 s3
= = = 3
FG Ω IJ
c
3
+2
FG Ω IJ c
2
+2
Ωc
+1
Ω 3c + 2 Ω c2s 2
+ 2 Ωc s + s 3
s + 2 Ω c s + 2 Ω 2c s + Ω 3c
2

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

GH T 1+ z −1 JK . GH T2 11−+ zz JK + 239.5073 GH T2 11−+ zz JK + 1310.4879


−1 −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

Y(z) 0.0709 − 0.2128 z −1 + 0.2128 z −2 − 0.0709 z −3


Let, H(z) = =
X(z) 1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3
On cross multiplying the above equation we get,
Y(z) + 0.8779z–1Y(z) + 0.5389z–2Y(z) + 0.0934z–3Y(z) = 0.0709X(z) – 0.2128z–1X(z) + 0.2128z–2X(z) – 0.0709z–3X(z)
\ Y(z) = 0.0709X(z) – 0.2128z–1X(z) + 0.2128z–2X(z) – 0.0709z–3X(z) – 0.8779z–1Y(z)
– 0.5389z–2Y(z) – 0.0934z–3Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.

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)

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR h ig h pa ss filte r.

Direct form-II structure of digital IIR highpass filter

Y(z) W(z) Y(z) 0.0709 − 0.2128 z −1 + 0.2128 z −2 − 0.0709 z −3


Let, H(z) = = × =
X(z) X(z) W(z) 1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3

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 )

0.0709 − 0.2128 z −1 + 0.2128 z −2 − 0.0709 z −3


d i
H e jω = H(z)
z = e jω
=
1 + 0.8779 z −1 + 0.5389 z −2 + 0.0934 z −3 z = e jω

0.0709 − 0.2128 e − jω + 0.2128 e − j2ω − 0.0709 e − j3ω


=
1 + 0.8779 e − jω + 0.5389 e − j2ω + 0.0934 e − j3ω

=
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

Let, Hde i =jω


=
H de i D b1+ 0.8779 cos ω + 0.5389 cos 2ω + 0.0934 cos 3ωg + jb−0.8779 sin ω − 0.5389 sin 2ω − 0.0934 sin 3ωg

where, HN(ejw) = (0.0709 – 0.2128cosw + 0.2128cos2w – 0.0709cos3w) + j(0.2128sinw – 0.2128sin2w + 0.0709sin3w)


HD(ejw ) = (1 + 0.8779cosw + 0.5389cos2w + 0.0934cos3w) + j(–0.8779sinw – 0.5389sin2w – 0.0934sin3w)
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.
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 2.5102 + j0 0 + j0 0
1×π
16
–0.0002 – j0.0005 2.4366 – j0.4294 –0.00004 – j0.0002 0.0002
2 ×π
16
–0.0024 – j0.0035 2.2279 – j0.8033 –0.0005 – j0.0017 0.0018
3 ×π
16
–0.0108 – j0.0088 1.9179 – j1.0772 –0.0023 – j0.0059 0.0063
4× π
16
–0.0294 – j0.0122 1.5547 – j1.2257 –0.0078 – j0.0140 0.0160
5 ×π
16
–0.0592 – j0.0058 1.1899 – j1.2460 –0.0213 – j0.0272 0.0345
6 ×π
16
–0.0956 + j0.0189 0.8686 – j1.1564 –0.0501 – j0.0450 0.0674
7× π
16
–0.1278 + j0.0683 0.6215 – j0.9896 –0.1076 – j0.0615 0.1240
8 ×π
16
–0.1419 + j0.1419 0.4611 – j0.7845 –0.2135 – j0.0554 0.2205
9 ×π
16
–0.1236 + j0.2312 0.3827 – j0.5771 –0.3769 + j0.0358 0.3786
10 ×π
16
–0.0636 + j0.3199 0.3693 – j0.3943 –0.5126 + j0.3189 0.6037
11× π
16
0.0382 + j0.3874 0.3976 – j0.2503 –0.3705 + j0.7411 0.8286
12 ×π
16
0.1712 + j0.4134 0.4453 – j0.1479 0.0685 + j0.9511 0.9536
13 ×π
16
0.3154 + j0.3844 0.4945 – j0.0815 0.4962 + j0.8591 0.9921
14 ×π
16
0.4451 + j0.2974 0.5342 – j0.0412 0.7856 + j0.6173 0.9991
15 × π
16
0.5352 + j0.1623 0.5592 – j0.0169 0.9474 + j0.3189 0.9996
16 ×π
16
0.5676 + j0 0.5676 + j0 1 + j0 1.0000
E7. 22 DSP, Chapter 7 - IIR Filters

|H (e )|
1.0

0.9

0.8

0.707
0.7 Ωc T
ω c = 2 tan −1
0.6 2

= 2 tan −1 FG 10.9432 × 0.3 IJ


0.5 H 2 K
0.4 2.0473
= 2.0473 = × π
π
0.3 = 0.65 π 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 ) ω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 h ig h p a ss filte r.

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

Passband edge digital frequency, w p = 0.3p 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.8second

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 impulse invariant transformation,

ω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

Choose order N, such that N ³ N1 and N is an integer.


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 + b k sn + 1 Using equation (7.58).
k =1

where, bk = 2 sin b2k −1g π


2N
Using equation (7.60).
N 2
Here, N = 2, ∴ k = 2
= 2
=1
1
b g
∴ H sn =
sn2 + b1 sn + 1

When k = 1 ; bk = b1 = 2 sin LM b g OP = 1.4142


2 −1 π Calculate sinq using
N Q 2×2 calculator in radian mode.

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

where, W c = Cutoff frequency.


Ωs 2.7489 Using equation (7.61).
Ωc = 1
= 1
= 1.5416 rad / second
e
1/ A 2
s j −1 2N e
1/ 0.3 2 j −1 4

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
.

Direct form-I structure of digital IIR lowpass filter


Y(z) 0.5583 z −1
Let, H(z) = =
X(z) 1 − 0.5379 z −1 + 0.1748 z −2
On cross multiplying the above equation we get,
Y(z) – 0.5379z–1Y(z) + 0.1748z–2Y(z) = 0.5583z–1X(z)
\ Y(z) = 0.5583z–1X(z) + 0.5379z–1Y(z) – 0.1748z–2Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.
X (z) + Y (z)

−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

F ig 1 : D irect fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR lo w p ass filter.


Direct form-II structure of digital IIR lowpass filter
Y(z) W(z) Y(z) 0.5583 z −1
Let, H(z) = = × =
X(z) X(z) W(z) 1 − 0.5379 z −1 + 0.1748 z −2
W(z) 1
where, = .....(2)
X(z) 1 − 0.5379 z −1 + 0.1748 z −2
Y(z)
= 0.5583 z −1 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) – 0.5379z–1W(z) + 0.1748z–2 W(z) = X(z)
\ W(z) = X(z) + 0.5379z–1W(z) – 0.1748z–2 W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.5583z–1W(z) .....(5)
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
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

F ig 2 : D irect fo rm -II structure of 2 n d order digita l IIR lo w p ass filter.


Solution for Exercise Problems E7. 25
jw
Frequency Response, H(e ) w

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

0.5583 cosω − j 0.5583 sin ω
Let, Hde i =

=
H de i b
D
1 − 0jω
.5379 cos ω + 0.1748 cos 2ω g + j b0.5379 sin ω − 0.1748 sin 2ω g

where, HN(ejw ) = 0.5583cosw – j 0.5583sinw


HD(ejw ) = (1 – 0.5379cosw + 0.1748cos2w) + j(0.5379sinw – 0.1748sin2w)
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.
TABLE 1: H(ejww ) and |H(ejww )| for various values of w .
w HN(ejww ) HD(ejww ) H(ejww ) |H(e jww )|
0× π
16
0.5583 + j0 0.6369 + j0 0.8766 + j0 0.8766
1×π
16
0.5476 – j0.1089 0.6339 + j0.0380 0.8505 – j0.2228 0.8792
2 ×π
16
0.5158 – j0.2137 0.6266 + j0.0822 0.7653 – j0.4414 0.8835
3 ×π
16
0.4642 – j0.3102 0.6196 + j0.1373 0.6084 – j0.6355 0.8797
4 ×π
16
0.3948 – j0.3948 0.6196 + j0.2056 0.3835 – j0.7644 0.8553
5 ×π
16
0.3102 – j0.4642 0.6343 + j0.2858 0.1324 – j0.7915 0.8025
6× π
16
0.2137 – j0.5158 0.6705 + j0.3734 –0.0837 – j0.7227 0.7275
7 ×π
16
0.1089 – j0.5476 0.7336 + j0.4606 –0.2297 – j0.6022 0.6446
8 ×π
16
0 – j0.5583 0.8252 + j0.5379 –0.3095 – j0.4748 0.5668
9 ×π
16
–0.1089 – j0.5476 0.9434 + j0.5944 –0.3444 – j0.3634 0.5007
10 ×π
16
–0.2137 – j0.5158 1.0822 + j0.6206 –0.3543 – j0.2735 0.4475
11× π
16
–0.3102 – j0.4642 1.2319 + j0.6087 –0.3520 – j0.2029 0.4063
12 ×π
16
–0.3948 – j0.3948 1.3804 + j0.5552 –0.3452 – j0.1472 0.3753
13 ×π
16
–0.4642 – j0.3102 1.5141 + j0.4603 –0.3377 – j0.1022 0.3528
14 ×π
16
–0.5158 – j0.2137 1.6205 + j0.3294 –0.2799 + j0.1888 0.3376
15 × π
16
–0.5476 – j0.1089 1.6891 + j0.1718 –0.3274 – j0.0312 0.3288
16 ×π
16
–0.5583 + j0 1.7127 + j0 –0.3260 + j0 0.3260

|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

where, bk = 2 sin b2k −1g π Using equation (7.60).


2N

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

where, W c = Cutoff frequency.


Ωs 2.5133
Ωc = 1
= 1
= 1.3405 rad / second Using equation (7.61).
1/ A 2
e s j −1 2N e 1/ 0.15 2 j −1 6

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,

A+B=0 1.3405A + 1.3405B + C = 0 1.7969A + 1.3405C = 2.4088

B= –A B=–A 1.7969A + 0 =2.4088


1.3405 – 1.3405A + C = 0 2.4088
A= = 13405
.
C=0 .
17969

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

Digital IIR lowpass filter transfer function, H(z)


For impulse invariant transformation,
Ai Ai
 
is transformed to
→ −1
s + pi 1 − e −p i T z
Using equation (7.17),
(s + a) 1 − e − aT (cos bT)z −1
2 2
  → (7.18) and (7.19).
(s + a) + b is transformed to
1 − 2e (cos bT)z −1 + e −2aT z −2
− aT

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

1.3405 −1.3405 + 0.2733 z −1 + 0.3631z −1


= −1
+
1 − 0.2617 z 1 − 0.4078 z −1 + 0.2617 z −2
1.3405 −1.3405 + 0.6364 z −1
= −1
+
1 − 0.2617 z 1 − 0.4078 z −1 + 0.2617 z −2
1.3405 (1 − 0.4078 z −1 + 0.2617 z −2 ) + ( −1.3405 + 0.6364z −1) (1 − 0.2617 z −1)
=
(1 − 0.2617 z −1) (1 − 0.4078 z −1 + 0.2617 z −2 )
1.3405 − 0.5467 z −1 + 0.3508 z −2 − 1.3405 + 0.6364 z −1 + 0.3508 z −1 − 0.1665z −2
=
1 − 0.4078 z −1 + 0.2617 z −2 − 0.2617 z −1 + 0.1067 z −2 − 0.06851z −3
0.4405 z −1 + 0.1843 z −2
=
1 − 0.6695 z −1 + 0.3684 z −2 − 0.0685 z −3

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.4405 z −1 + 0.1843 z −2


Let, H(z) = =
X(z) 1 − 0.6695 z −1 + 0.3684 z −2 − 0.0685 z −3
On cross multiplying the above equation we get,
Y(z) – 0.6695z–1Y(z) + 0.3684z–2Y(z) – 0.0685z–3Y(z) = 0.4405z–1X(z) + 0.1843z–2X(z)
\ Y(z) = 0.4405z–1X(z) + 0.1843z–2X(z) + 0.6695z–1Y(z) – 0.3684z–1Y(z) + 0.0685z–3Y(z) .....(3)
Using equation (3), the direct form-I structure is drawn as shown in fig 1.

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)

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r.

Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.4405 z −1 + 0.1843 z −2


Let, H(z) = = × =
X(z) X(z) W(z) 1 − 0.6695 z −1 + 0.3684 z −2 − 0.0685 z −3

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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd er d ig ita l IIR lo w pa ss filter.

Frequency Response, H(ejww )

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ω

0.4405e − jω + 0.1843 e − j2ω


=
1 − 0.6695 e − jω + 0.3684 e − j2ω − 0.0685 e − j3ω
0.4405(cos ω − j sin ω ) + 0.1843 (cos 2ω − j sin 2ω )
=
1 − 0.6695 (cos ω − j sin ω ) + 0.3684 (cos 2ω − j sin 2ω ) − 0.0685 (cos 3ω − j sin 3ω )

=
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

b0.4405 cos ω + 0.1843 cos 2ωg + jb−0.4405 sinω − 0.1843 sin 2ωg
Let, Hde i =

=
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

where, HN(ejw ) = (0.4405 cosw + 0.1843 cos2w) + j(– 0.4405sinw – 0.1843sin2w)


HD(ejw ) = (1 – 0.6695cosw + 0.3684cos2w – 0.0685 cos3w) + j(0.6695sinw – 0.3684sin2w + 0.0685sin3w)
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.
TABLE 1: H(ejww ) and |H(ejww )| for various values of w .
w HN(ejww ) HD(ejww ) H(ejww ) |H(e jww )|
0 ×π
16
0.6248 + j0 0.6304 + j0 0.9911 + j0 0.9911
1×π
16
0.6128 – j0.1219 0.6268 + j0.0276 0.9672 – j0.2371 0.9959
2 ×π
16
0.5772 – j0.2391 0.6157 + j0.0589 0.8922 – j0.4737 1.0101
3 ×π
16
0.5195 – j0.3471 0.5978 + j0.0987 0.7526 – j0.7049 1.0312
4 ×π
16
0.4418 – j0.4418 0.5750 + j0.1534 0.5259 – j0.9087 1.0499
5 ×π
16
0.3471 – j0.5195 0.5542 + j0.2296 0.2031 – j1.0215 1.0415
6 ×π
16
0.2391 – j0.5772 0.5466 + j0.3318 –0.1488 – j0.9657 0.9771
7 ×π
16
0.1219 – j0.6128 0.5671 + j0.4587 –0.3984 – j0.7583 0.8566
8 ×π
16
0 – j0.6248 0.6316 + j0.6101 –0.4943 – j0.5117 0.7115
9 ×π
16
–0.1219 – j0.6128 0.7522 + j0.7407 –0.4896 – j0.3326 0.5919
10 ×π
16
–0.2391 – j0.5772 0.9324 + j0.8528 –0.4479 – j0.2094 0.4944
11× π
16
–0.3471 – j0.5195 1.1637 + j0.9104 –0.4161 – j0.1209 0.4333
12 ×π
16
–0.4418 – j0.4418 1.4249 + j0.8902 –0.3623 – j0.0837 0.3719
13 ×π
16
–0.5195 – j0.3471 1.6842 + j0.7794 –0.3326 – j0.0522 0.3367
14 ×π
16
–0.5572 – j0.2391 1.9052 + j0.5799 –0.3026 – j0.0334 0.3045
15 × π
16
–0.6128 – j0.1219 2.0539 + j0.3096 –0.3005 – j0.0141 0.3008
16 × π
16
–0.6248 + j0 2.1064 + j0 –0.2966 + j0 0.2966
E7. 30 DSP, Chapter 7 - IIR Filters

|H (e )|
1.1

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

Choose order N, 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 ∏
H sn =
sn2 + bk sn + 1
Using equation (7.58).
k =1

where, bk = 2 sin b2k −1g π


2N Using equation (7.60).
N 4
Here, N = 4, ∴ k = 2
= 2
=2

1 1 Calculate sinq using


b g
∴ H sn = ×
sn2 + b1 sn + 1 sn2 + b 2 sn + 1 calculator in radian mode.

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

where, W c = Cutoff frequency.


Ωs 1.2507
Ωc = 1
= 1
= 0.9778 rad / second
Using equation (7.61).
e 1/ A 2
s j −1 2N e1/ 0.35 2 j −1 8
1
∴ H(s) = H sn b g =
(sn2 + 0.7654 sn + 1)(sn2 + 18478
. sn + 1)
sn = s sn = s
Ωc Ωc
1
=
Fs 2
s IF s
+ 1J G
2
s I
GH Ω 2
c
+ 0.7654
Ωc KHΩ 2
c
+ 1.8478
Ωc
+1 JK
1
=
Fs 2
+ 0.7654 Ω c s + Ω 2c IFs 2
+ 18478
. Ω c s + Ω 2c I
GH Ω 2c JK GH Ωc2 JK
Ω 4c
= 2
(s + 0.7654 Ω c s + Ω c )(s2
2
+ 18478
. Ω c s + Ω 2c )

(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)

A1* = Conjugate of A1 = –0.4516 – j0.1871

0.9141 × s + 0.9034 − j0.3741


A2 =
ds 2
ib
+ 0.7484s + 0.9561 s + 0.9034 − j0.3741 s + 0.9034s + j0.3741 gb 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.

−0.4516 + j0.1871 −0.4516 − j0.1871 0.4517 − j1.0907 0.4517 + j1.0907


H(z) = + + + Put, T = 1sec
1 − e −(0.3742 − j0.9034) z −1 1 − e −(0.3742 + j0.9034 ) z −1 1 − e −(0.9034 − j0.3741)z −1 1 − e −(0.9034 + j0.3741)z −1

=
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

−0.4516 + 0.4516 e −0.3742 e − j0.9034 z −1 + j0.1871 − j0.1871e −0.3742 e − j0.9034 z −1


− 0.4516 + 0.4516e −0.3742 e j0.9034 z −1 − j0.1871 + j0.1871e −0.3742 e j0.9034 z −1
=
1 − e −0.3742 e j0.9034 z −1 − e −0.3742 e − j0.9034 z −1 + e −0.3742 × 2 z −2
0.4517 − 0.4517 e −0.9034 e − j0.3741 z −1 − j1.0907 + j1.0907 e −0.9034e − j0.3741 z −1
0.4517 − 0.4517e −0.9034 e j0.3741 z −1 + j0.0907 − j1.0907 e −0.9034 e − j0.3741 z −1)
+
1− e −0.9034 e − j0.3741 z −1 − e −0.9034 e j0.3741 z −1 + e −2 × 0.9034 z −1
Solution for Exercise Problems E7. 33

∴ 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

−0.9032 + 0.3845 z −1 − 0.2022 z −1 0.9034 − 0.3407 z −1 + 0.323 z −1


= +
1 − 0.8515 z −1 + 0.4731z −2 1 − 0.7543 z −1 + 01642
. z −2
−0.9032 + 0.1823 z −1 0.9034 − 0.0177 z −1
= −1 −2
+
1 − 0.8515 z + 0.4731z 1 − 0.7543 z −1 + 0.1642 z −2

=
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

Direct form-I structure of digital IIR lowpass filter

Y(z) 0.0767 z −1 + 0.1567 z −2 + 0.0215 z −3


Let, H(z) = =
X(z) 1 − 1.6058 z −1 + 1.2796 z −2 − 0.4967 z −3 + 0.0777 z −4
On cross multiplying the above equation we get,
Y(z) – 1.6058z–1Y(z) + 1.2796z–2Y(z) – 0.4967z–3Y(z) + 0.0777z–4Y(z) = 0.0767z–1X(z) + 0.1567z–2X(z) + 0.0215z–3X(z)
\ Y(z) = 0.0767z–1X(z) + 0.1567z–2X(z) + 0.0215z–3X(z) + 1.6058z–1Y(z)
– 1.2796z–2Y(z) + 0.4967z–3Y(z) – 0.0777z–4Y(z) .....(1)
Using equation (1), the direct form-I structure is drawn as shown in fig 1.

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)

F ig 1 : D irec t fo rm -I stru ctu re o f 4 th ord er digital IIR low p a ss filte r.

Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.0767 z −1 + 0.1567z −2 + 0.0215 z −3


Let, H(z) = = × =
X(z) X(z) W(z) 1 − 1.6058 z −1 + 1.2796 z −2 − 0.4967 z −3 + 0.0777z −4
E7. 34 DSP, Chapter 7 - IIR Filters
W(z) 1
where, = .....(2)
X(z) 1 − 1.6058 z −1 + 1.2796 z −2 − 0.4967 z −3 + 0.0777z −4
Y( z )
= 0.0767 z −1 + 0.1567 z −2 + 0.0215 z −3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) – 1.6058z–1W(z) + 1.2796z–2 W(z) – 0.4967 z–3W(z) + 0.0777z–4W(z) = X(z)
\ W(z) = X(z) + 1.6058z–1W(z) – 1.2796z–2 W(z) + 0.4967z–3W(z) – 0.0777z–4W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.0767z–1W(z) + 0.1567z–2W(z) + 0.0215z–3W(z) .....(5)
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.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

F ig 2 : D irect fo rm -II stru ctu re o f 4th o rd er d ig ita l IIR lo w p ass filter.

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

where, W c = Cutoff frequency.


Ωs 4.2283
Ωc = = = 1.5902 rad / second
1 1 Using equation (7.61).
e1/ A 2s j − 1 2N e1/ 0.022 j − 1 8
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

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

+ 21.0164 × 0.6 3 (1 − z −1)(1 + z −1)3 + 6.3945 × 0.6 4 (1 + z −1)4


0.8287 (1 + z −1)2 (1 + z −1)2
=
16 (1 − z ) (1 − z ) + 19.9464 (1 − 3z −1 + 3z −2 − z −3 )(1 + z −1) + 12.4328 (1 − z −1)2 (1 + z −1)2
−1 2 −1 2

+ 4.5395 (1 − z −1)(1+ 3z −1 + 3z −2 + z −3 ) + 0.8287 (1 + z −1)2 (1 + z −1)2


0.8287 (1 + 2z −1 + z −2 )(1 + 2z −1 + z −2 )
=
16 (1 − 2 z + z )(1 − 2 z + z ) + 19.9464 (1 − 2 z −1 + 2z −3 − z −4 ) + 12.4328 (1 − 2z −1 + z −2 )(1 + 2z −1 + z −2 )
−1 −2 −1 −2

+ 4.5395 (1 + 2z −1 − 2z −3 − z −4 ) + 0.8287 (1 + 2z −1 + z −2 )(1 + 2z −1 + z −2 )


0.8287 (1 + 4 z −1 + 6z −2 + 4 z −3 + z −4 )
= −1 −2 −3
16 (1 − 4 z + 6z − 4z + z ) + 19.9464 (1 − 2z −1 + 2 z −3 − z −4 ) + 12.4328 (1 − 2z −2 + z −4 )
−4

+ 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)

F ig 1 : D irec t fo rm -I stru ctu re o f 4 th o rd er d ig ita l IIR lo w p a ss filter.

Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) 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) X(z) W(z) 1 − 17024
. z −1 + 14160
. z −2 − 0.5558 z −3 + 0.0889 z −4

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)

On cross multiplying equation (2) we get,

W(z) – 1.7024z–1W(z) + 1.4160z–2W(z) – 0.5558 z–3W(z) + 0.0889 z–4W(z) = X(z)

\ W(z) = X(z) + 1.7024z–1W(z) – 1.4160z–2W(z) + 0.5558z–3W(z) – 0.0889 z–4W(z) .....(4)

On cross multiplying equation (3) we get,

Y(z) = 0.0154W(z) + 0.0617z–1W(z) + 0.0925z–2W(z) + 0.0617z–3W(z) + 0.0154z–4W(z) .....(5)

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

F ig 2 : D irect fo rm -II structu re o f 4 th o rd er d ig ita l IIR lo w p ass filter.

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

|SMFG 1 + 1IJ + 1 OP − LMFG 1 + 1IJ + 1 OP ||V


1 1 −
N N
1 2 2
yN =
2 ||MMNH ∈ K ∈PPQ MMNH ∈ K ∈PPQ ||
2 2

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

where, W c = Cutoff frequency.


Here, W c = W p = 0.7854 rad/second.

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+B=0 0.3606 A + 0.3606 B + C = 0 0.5927 A + 0.3606 C = 0.2138


Put, B = –A Put, C = 0
B= –A
\ 0.3606A – 0.3606B + C = 0
\ 0.5927A = 0.2138
\C=0
0.2138
A= = 0.3607
0.5927
B = –A = –0.3607

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

Digital IIR lowpass filter transfer function, H(z)


For impulse invariant transformation,
1 1
  → Using equation (7.17),
s + pi is transformed to
1 − e − pi T z −1
(7.18) and (7.19).
s+a 1 − e − aT (cos bT) z −1
2 2
→
(s + a) + b 1 − ze (cos bT) z −1 + e −2aT z −2
− aT

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 )

0.3607 − 0.4263z −1 + 0.2515 z −2 − 0.3607 + 0.2515 z −1 + 0.2622 z −1 − 0.1828 z −2


=
1 − 11820
. z −1 + 0.6973 z −2 − 0.6973 z −1 + 0.8242 z −2 − 0.4862 z −3
0.0874 z −1 + 0.0687 z −2
=
1 − 1.8793 z −1 + 1.5215 z −2 − 0.4862 z −3
Solution for Exercise Problems E7. 41
Alternatively,

0.0874 z −1 + 0.0687 z −2 z −3 (0.0874 z2 + 0.0687z)


H(z) = −1 −2 −3
= −3 3
1 − 1.8793 z + 1.5215 z − 0.4862 z z (z − 1.8793z2 + 1.5215z − 0.4862)
0.0874z 2 + 0.0687z
=
z − 1.8793z 2 + 15215
3
. z − 0.4862
Direct form-I structure of digital IIR lowpass filter

Y(z) 0.0874 z −1 + 0.0687 z −2


Let, H(z) = =
X(z) 1 − 1.8793 z −1 + 1.5215 z −2 − 0.4862 z −3
On cross multiplying the above equation we get,
Y(z) – 1.8793z–1Y(z) + 1.5215z–2Y(z) – 0.4862z–3 Y(z) = 0.0874z–1 X(z) + 0.0687z–1X(z)
\ Y(z) = 0.0874z–1X(z) + 0.0687z–1X(z) + 1.8793z–1Y(z) – 1.5215z–2Y(z) + 0.4862z–3Y(z) .....(4)
Using equation (4), the direct form -I structure is drawn as shown in fig 1.

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)

F ig 1 : D irect form -I stru ctu re o f dig ita l IIR lo w p a ss filter.


Direct form-II structure of digital IIR lowpass filter

Y(z) W(z) Y(z) 0.0874 z −1 + 0.0687 z −2


Let, H(z) = = × =
X(z) X(z) W(z) 1 − 1.8793 z −1 + 1.5215 z −2 − 0.4862 z −3

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

F ig 2 : D irect fo rm -II structu re o f d ig ita l IIR lo w p ass filter.


E7. 42 DSP, Chapter 7 - IIR Filters
E7.17. Design a Chebyshev digital IIR lowpass filter using bilinear transformation by taking T = 0.5second, to satisfy the
following specifications.
0.9 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.25p
jw
|H(e )| £ 0.35 ; for 0.375p £ w £ p
Draw direct form-I and II structure of the filter.
Alternatively,
Passband ripple £ 0.9151 dB
Stopband attenuation ³ 9.1186 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 −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

where, W c = Cutoff frequency.


Wc = Wp = 1.6569 rad/second.

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)

For bilinear transformation,

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

2.3480 × 0.5 3 (1 + z −1)3


=
8(1− z ) + 6.7696 × 0.5 (1 − z ) (1 + z −1) + 6.9818 × 0.52 (1 − z −1)(1 + z −1)2 + 2.3480 × 0.5 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)

F ig 1 : D irec t fo rm -I stru ctu re o f 3 rd o rd e r d ig ita l IIR lo w pa ss filte r.


Solution for Exercise Problems E7. 45
Direct form-II structure of digital IIR lowpass filter
Y(z) W(z) Y(z) 0.0219 + 0.0656 z −1 + 0.0656 z −2 + 0.0219 z −3
Let, H(z) = = × =
X(z) X(z) W(z) 1 − 1.8444 z −1 + 1.4713 z −2 − 0.4519 z −3
W(z) 1
where, = .....(2)
X(z) 1 − 1.8444 z −1 + 0.4713 z −2 − 0.4519 z −3
Y ( z)
= 0.0219 + 0.0656z −1 + 0.0656 z −2 + 0.0219 z −3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) – 1.8444z–1W(z) + 1.4713z–2 W(z) – 0.4519 z–3W(z) = X(z)
\ W(z) = X(z) + 1.8444z–1W(z) – 1.4713z–2 W(z) + 0.4519z–3W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.0219W(z) + 0.0656z–1W(z) + 0.0656z–2W(z) + 0.0219z–3W(z) .....(5)
Using equation (4) and (5), the direct form-II structure is drawn as shown in fig 2.

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

F ig 2 : D irec t fo rm -II stru cture o f 3 rd o rd e r d ig ita l IIR lo w pa ss filter.


Chapter 8

Finite Word Length Effects


In Digital Filters

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.

8.2 Representation of Numbers in Digital Systems


8.2.1 Binary Codes
The binary codes are framed using the numeric symbols “0” and “1”. Each digit of the binary code is
called bit. The size of the binary code is specified in terms of number of bits. In digital system the binary
codes are used to represent any information like text, image, numbers, etc.
n
In general, using n-bits it is possible to frame 2 binary codes.
n 1 n 4
When n = 1 ; 2 =2 =2 When n = 4 ; 2 = 2 = 16
Binary codes : 0 Binary codes : 0 000
1 0 001
n 2
0 010
When n = 2 ; 2 =2 =4 0 011
Binary codes : 0 0 0 100
0 1 0 101
1 0 0 110
1 1 0 111
n 3 1 000
When n = 3 ; 2 =2 =8
1 001
Binary codes : 0 00 1 010
0 01 1 011
0 10 1 100
0 11 1 101
1 00 1 1 10
1 01 1 111
1 10
1 11
When decimal numbers are represented in binary codes, the size of the code will decide the range of
numbers that can be represented in binary. The 4-bit binary codes that can be used to represent different
types of decimal numbers are listed in table 8.1.
When 4-bit binary is used to represent unsigned decimal integers then the range is,
0 to 24 – 1 Þ 0 to 1510.
When 4-bit binary is used to represent signed decimal integers in sign-magnitude format then the
range is,
–(23 – 1) to +(23 – 1) Þ –710 to +710.
When 4-bit binary is used to represent unsigned decimal fraction in fixed point representation then
the range is,
0 to 1 − 2 −4 ⇒ 0 to 15 ⇒ 0 to 0.937510
16
8. 3 Digital Signal Processing
When 4-bit binary is used to represent signed decimal fraction in fixed point sign-magnitude format
then the range is,

− (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

Unsigned Signed Unsigned Signed


Binary Code decimal decimal decimal decimal
integer integer fraction fraction
0000 0 0 0/16 = 0 0/8 = 0
0001 1 1 1/16 = 0.0625 1/8 = 0.125
0010 2 2 2/16 = 0.1250 2/8 = 0.250
0011 3 3 3/16 = 0.1875 3/8 = 0.375
0100 4 4 4/16 = 0.2500 4/8 = 0.500
0101 5 5 5/16 = 0.3125 5/8 = 0.625
0110 6 6 6/16 = 0.3750 6/8 = 0.750
0111 7 7 7/16 = 0.4375 7/8 = 0.875
1000 8 –0 8/16 = 0.5000 –0/8 = –0
1001 9 –1 9/16 = 0.5625 –1/8 = –0.125
1010 10 –2 10/16 = 0.6250 –2/8 = –0.250
1011 11 –3 11/16 = 0.6875 –3/8 = –0.375
1100 12 –4 12/16 = 0.7500 –4/8 = –0.500
1101 13 –5 13/16 = 0.8125 –5/8 = –0.625
1110 14 –6 14/16 = 0.8750 –6/8 = –0.750
1111 15 –7 15/16 = 0.9375 –7/8 = –0.875

8.2.2 Radix Number System


In radix number representation the numbers can be represented by a summation relation as shown in
the following examples.

178 .2510 = (1 × 102 ) + ( 7 × 101 ) + (8 × 100 ) + (2 × 10–1 ) + (5 × 10–2 )


= (d –2 × 102 ) + ( d –1 × 101 ) + ( d 0 × 100 ) + (d1 × 10–1 ) + ( d 2 × 10–2 )
2
= ∑ di r −i ; where, r = 10
i = –2

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

In general any number can be represented as,


B
Number, N = ∑ di r −i .....(8.1)
i = −A

where, A = Number of integer digits


B = Number of fraction digits
r = Radix or Base
th
di = i digit of the number
In a radix number system the possible values for di will be in the range 0 £ di £ (r – 1).
Example : When r = 2, di = 0 or 1.

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

where, d0 is used to represent the sign of the number.


The two major methods of representing binary numbers are fixed point representation and floating
point representation. They are discussed in the following sections.
In fixed point representation the digits allotted for integer part and fraction part are fixed, and so the
position of binary point is fixed. Since the number of digits is fixed it is impossible to represent too large and
too small numbers by fixed point representation. Therefore the range of numbers that can be represented in
fixed point representation for a given binary word size is less when compared to floating point representation.
In floating point representation the binary point can be shifted to desired position so that number of
digits in the integer part and fraction part of a number can be varied. This leads to larger range of number that
can be represented in floating point representation.
8. 5 Digital Signal Processing
8.2.3 Fixed Point Representation
In fixed point representation there are three different formats for representing negative binary fraction
numbers. They are,
1. Sign-magnitude format
2. One’s complement format
3. Two’s complement format

In fixed point representation there is only one unique way of representing positive binary fraction
number as shown in equation (8.4).

Positive binary fraction number, N p = 0.d1d 2 ..... d B


= (0 × 20 ) + (d1 × 2 −1 ) + (d 2 × 2 −2 ) + ..... + (d B × 2 − B )

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

Binary number in fixed point representation Decimal


Sign-magnitude One’s complement Two’s complement Equivalent
0000 0000 0000 0
0001 0001 0001 1/8 = 0.125
0010 0010 0010 2/8 = 0.250
0011 0011 0011 3/8 = 0.375
0100 0100 0100 4/8 = 0.500
0101 0101 0101 5/8 = 0.625
0110 0110 0110 6/8 = 0.750
0111 0111 0111 7/8 = 0.875
1000 1111 ------- –0
1001 1110 1111 –1/8 = –0.125
1010 1101 1110 –2/8 = –0.250
1011 1100 1101 –3/8 = –0.375
1100 1011 1100 –4/8 = –0.500
1101 1010 1011 –5/8 = –0.625
1110 1001 1010 –6/8 = –0.750
1111 1000 1001 –7/8 = –0.875
1000 –8/8 = –1.000

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

Binary to decimal conversion


Remove Convert
00012  
→ + .001  
→ +.12510 Binary to decimal conversion
sign bit to decimal
+ .0012 = +(0 ´ 2–1 + 0 ´ 2–2 + 1 ´ 2–3)
Remove Convert
10012  
→ − .001  
→ −.12510 = +(0 + 0 + .125) = +.12510
sign bit to decimal
– .0012 = –(0 ´ 2–1 + 0 ´ 2–2 + 1 ´ 2–3)
\ 00012 = +0.12510 = –(0 + 0 + .125) = –.12510
10012 = –0.12510
8. 7 Digital Signal Processing
One’s Complement Format

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 one’s 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

\ 00012 = +0.12510 Refer example 8.1for binary


to decimal conversion of
11102 = –0.12510 +.0012 and –.0012

Two’s Complement Format


The positive number is same in all the formats of fixed point representation and it is given by
equation (8.5). In two’s complement format the negative of the given number is obtained by taking one’s
complement of its positive representation and then adding one to the least significant bit. Hence in equation
–B
(8.8) if we add 1´ 2 then we get two’s complement format for negative numbers.
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 8
B
∴ Negative binary fraction
N = (1 × 2 0 ) +
UV ∑ (1 − d i )2 − i + (1 × 2 − B ) .....(8.9)
number in two's complement 2 c W i=1

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 two’s 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 Add1 Append Remove


→ − .111  → 1.111  
→ − .001  → − .110  
− .12510   dot
→ 11112
to binary fraction part to LSD sign bit

Refer example 8.1


\ +0.12510 = 00012
for decimal to binary
–0.12510 = 11112 conversion of .12510

Binary to decimal conversion


Remove Convert
00012  
→ +.001  
→ +.12510
sign bit to decimal

Remove Add 1 Complement


Convert
11112   → − .111  → − .000   → − .001   → −.12510
sign bit fraction part to LSD to decimal

\ 00012 = + 0.12510 Refer example 8.1for binary


to decimal conversion of
11112 = –0.12510 +.0012 and –.0012
8. 9 Digital Signal Processing
8.2.4 Floating Point Representation
The floating point representation is employed to represent larger range of numbers in a given binary
word size. The floating point number is represented as,
E
Floating point number, Nf = M ´ 2 ..... (8.10)
In equation (8.10), M is called mantissa and it will be in binary fraction format. The value of M will be
in the range 0.5 £ M < 1. In equatioin (8.10), E is called exponent and it is either a positive or negative integer.
In floating point representation both mantissa and exponent uses one bit for representing sign. Usually the
leftmost bit in mantissa and exponent is used to represent the sign. A “1” in the leftmost bit position represents
negative sign and a “0” in the leftmost bit position represents positive sign.
The floating point representation is explained by considering a five bit mantissa and three bit exponent,
with a total data size of eight bits. In mantissa the leftmost bit is used to represent the sign and other four bits
are used to represent a binary fraction number. In exponent the leftmost bit is used to represent the sign and
the other two bits are used to represent a binary integer number.
M antis sa E x ponent

S ign bit S ign bit

–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
¯

dot sign bit

∴ + 510 = 0101 00112


Convert
Convert Add Normalize exponent
−510    → − 1012  → − 101.0 × 20   → − .1010 × 2+310 to binary
to binary exponent

Remove Append
11010 × 20112 ←    1.1010 × 20112 ←   − .1010 × 2+112
¯

dot sign bit

∴ - 510 = 1101 00112


Chapter 8 - Finite Word Length Effects in Digital Filters 8. 10
Convert
Convert Add Normalize exponent
→ +.0012  → +.001 × 20  → +.1000 × 2−210
+0.12510   to binary
to binary exponent

Remove Append
01000 × 2110 2 ←
 0.1000 × 2110 2 ← + .1000 × 2−10 2

¯
dot sign bit

∴ + 0.12510 = 0100 01102


Convert
Convert Add Normalize exponent
→ −.0012  → −.001 × 20  → −.1000 × 2−210
−0.12510   to binary
to binary exponent

Remove Append
11000 × 2110 2 ←
 1.1000 × 2110 2 ← − .1000 × 2−10 2

¯
dot sign bit

∴ − 0.12510 = 1100 01102


In various digital systems or computers, a variety of formats are employed for floating point
representation. The IEEE (Institute of Electrical and Electronic Engineers) has proposed a standard format for
floating point representation, which is widely followed in digital computers. The IEEE-754 standard format
for 32-bit single precision floating point number is shown in fig 8.1.
31 30 23 22 0

S E M

S = 1-b it field fo r s ign of num be r.


E = 8-b it field fo r ex pon ent.
M = 2 3-bit fie ld for m a ntiss a.

F ig 8.1 : IE E E -75 4 fo rm a t fo r 3 2 -b it flo a tin g p o int n u m b er.


The floating point number, N shown in fig 8.1 can be interpreted as follows.
When E = 1 to 254
s E – 127
N = (–1) ´ 1.M ´ 2 .....(8.11)
When E = 0
s
If, M = 0, then N = (–1) ´ 0
s –126
If, M ¹ 0, then N = (–1) ´ 0.M ´ 2
When E = 255
s
If, M = 0, then N = (–1) ´ ¥
If, M ¹ 0, then N is not a number.
The range of the decimal numbers that can be represented by 32-bit IEEE-754 format is from
–23 – 126
±[2 ´ 2 ] to ± [(2 – 2–23) ´ 2127] i.e., from ± 1.4 ´ 10–45 to ± 3.40 ´ 1038.
Example 8.4
Convert +2510 and – 2510 to 32-bit IEEE-754 format of binary and verify the result by converting the binary
to decimal.
Solution
Decimal to IEEE-754 binary format conversion
Convert Represent Convert exponent
→ + 110012  → 1.10012 × 2410  
+ 2510   → 1.10012 × 213110 −12710
to binary in 1.M format to E -127 format
8. 11 Digital Signal Processing
The number, N in IEEE-754 format is,
s Using equation (8.11).
N = (–1) ´ 1.M ´ 2E – 127

∴ + 2510 = ( −1)0 × 11001


. 2 ×2
13110 −12710

− 2510 = (−1)1 × 11001


. 2 ×2
13110 −12710

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

\ +2510 = 0100 0001 1100 1000 0000 0000 0000 00002

–2510 = 1100 0001 1100 1000 0000 0000 0000 00002

IEEE - 754 binary to decimal conversion

0100 0001 1100 1000 0000 0000 0000 0000 2


E
0 1000
14420011
44
3 11001 0000 0000
4444444 0000 0000 000
4244444444 3
B B B
S E M

∴ 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 0000 2


E
1 1000
14420011
44
3 11001 0000 0000
4444444 0000 0000 000
4244444444 3
B B B
S E M

∴ 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

∴ 0100 0001 1100 1000 0000 0000 0000 00002 = +2510

1100 0001 1100 1000 0000 0000 0000 00002 = −2510


Chapter 8 - Finite Word Length Effects in Digital Filters 8. 12

8.3 Types of Arithmetic in Digital Systems


The types of arithmetic in digital systems generally depends on the representation of the binary
numbers. Hence the arithmetic can also be classified into two broad classes: fixed point arithmetic and
floating point arithmetic. The fixed point number system has three types of representation for negative
numbers. Hence we have three types of fixed point arithmetic. They are sign-magnitude arithmetic, one’s
complement arithmetic and two’s complement arithmetic. The sign-magnitude arithmetic is generally avoided
in general purpose digital systems due to inherent difficulty in handling negative numbers during additions.
The fundamental arithmetic operation in digital system is addition. The subtraction is treated as
addition of positive and negative numbers. Generally the multiplication is performed in terms of successive
addition and division is performed in terms of successive subtraction except in case of special purpose
hardware.
8.3.1 One’s Complement Addition
In one’s complement addition the numbers are represented in one’s complement format and then the
addition is performed. The carry generated in addition is added to the least significant digit (LSD) to get the
actual sum. If the carry is zero after addition then the sum is negative and if the carry is one then the sum is
positive. Two examples of one’s complement addition one with positive sum and the other with negative sum
are presented here.

Example 8.5
Add +0.375 and –0.625 by one’s complement addition.

Solution
The one’s complement representation of the given numbers are shown below.
Convert to Add sign Remove
+.37510  → +.0112  
→ 0.0112  
→ 00112
binary bit dot

Convert to Add sign Complement Remove


−.62510  → −.1012  
→ 1.1012  → 1.0102  
→ 10102
binary bit fraction part dot

0011
+ 1010

Carry ® 0 1101 ¬ sum Decimal to binary conversion


.375 .625
Since the carry is zero the sum is negative. The sum can be ´2 ´2
converted to decimal as shown below. 0 .750 1 .250
Extract Complement Convert to
´2 ´2
11012  → −.1012  → −.0102  → −.2510 1 .500 0 .500
Sign bit fraction part Decimal
´2 ´2
In summary, 1 .000 1 .000
¯ ¯¯ ¯ ¯¯
.0 1 12 .1 0 12
+0.37510 Þ 00112
–0.62510 Þ 10102 Binary to decimal conversion
.0102 = (0 ´2-1) + (1 ´ 2-2) + (0´2-3)
(+0.37510) + (–0.62510) Þ 11012 Þ - .2510 = 0.2510
8. 13 Digital Signal Processing
Example 8.6
Add +0.625 and –0.375 by one’s complement addition.
Solution
The one’s complement representation of the given numbers are shown below.
Convert to Add sign Remove
+.62510  → +.1012  
→ 0.1012  
→ 01012
binary bit dot

Convert to Add sign Complement Remove


−.37510  → −.0112  
→ 1.0112  → 1.1002  
→ 11002
binary bit fraction part dot

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

8.3.2 Two’s Complement Addition


In two’s complement addition the numbers are represented in two’s complement format and then the
addition is performed. The carry generated in addition is discarded. If the carry is zero after addition then the
sum is negative and if the carry is one then the sum is positive. Two examples of two’s complement addition
one with positive sum and the other with negative sum are presented here.

Example 8.7
Add +0.375 and –0.625 by two’s complement addition.

Solution
The two’s complement representation of the given numbers are shown below.
Convert to Add sign Remove
+.37510  → +.0112  
→ 0.0112  
→ 00112
binary bit dot

Convert to Add sign Complement Add one Remove


−.62510  → − .1012  
→ 1.1012  → 1.0102  
→ 1.0112  
→ 10112
binary bit fraction part to LSD dot

00112 Refer example 8.5 for


+10112 decimal to binary conversion
of .37510 and .62510.
Carry ® 0 1110 ¬ sum
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 14
Since the carry is zero the sum is negative. The sum can be converted to decimal as shown below.
Extract Complement Add one Convert to
11102  → − .1102  → −.0012  
→ −.010 2  → −.2510
sign bit fraction part to LSD decimal

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 two’s complement addition.
Solution
The two’s complement representation of the given numbers are shown below.
Convert to Add sign Remove
+0.62510  → +.1012  
→ 0.1012  
→ 01012
binary bit dot

Convert to Add sign Complement Add one Remove


−0.37510  → − .0112  
→ 1.0112  → 1.1002  
→ 1.1012  
→ 11012
binary bit fraction part to LSD dot
01012
Refer example 8.5 for
+11012 decimal to binary conversion
Carry ® 1 0010 ¬ sum of .37510 and .62510.

Since the carry is one the sum is positive. The carry is discarded in two’s 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.

8.3.3 Floating Point Addition


For performing floating point addition the numbers are represented in the desired floating point
format. The addition can be performed only when the exponents of both the numbers are equal. Hence the
exponent of the smaller number is changed to equal the exponent of the larger number and then addition is
performed. In floating point addition if the sum is in the unnormalized form then it has to be normalized to
represent in proper (or correct) floating point format.
Example 8.9
Add +510 and +0.2510 by floating point addition. Choose 10-bit floating point format with 7-bits for
mantissa and 3-bits for exponent.
Solution
Let us convert the given numbers to floating point format. For simplicity we can use sign-magnitude
representation for exponent and mantissa. The leftmost bit in mantissa and exponent is used to represent the sign.
Convert
Convert Add Normalize exponent
→ + 1012  → + 101.000 × 20  → + .101000 × 2+310
+510   to binary
to binary exponent

Remove Append
0101000 × 20112 ←
 0.101000 × 20112 ← + .101000 × 2+112
¯

dot sign bit


8. 15 Digital Signal Processing
Convert
Convert Add Normalize exponent
→ + .012  → +.0100000 × 20   → + .100000 × 2−110
+ .2510    to binary
to binary exponent

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 × 2–1  
→ = 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

8.3.4 Floating Point Multiplication


For performing floating point multiplication the numbers are represented in the desired floating point
format. The product is obtained by multiplying the mantissa and adding the exponents. The sign bits of
mantissa should be added separately to determine the sign of product of mantissa. For multiplication of two
floating point numbers the exponents need not be same. In floating point multiplication if the product is in
unnormalized form then it has to be normalized to represent the product in proper (or correct) floating point
format.
Example 8.10
Multiply Add +510 and +0.2510 by floating point multiplication. Choose 10-bit floating point format with
7-bits for mantissa and 3-bits for exponent.

Solution
Let us convert +510 and +0.2510 to floating point format.

\ +510 = 0101000 ´ 2 = 0.101000 ´ 2


3 3 Using result of example 8.9.
–1 –1
+.2510 = 0100000 ´ 2 = 0.100000 ´ 2
The floating point multiplication is performed as shown below.
3+(–1) 2
510 ´ .2510 = (0 + 0) . (101000 ´ 100000) ´ 2 = 0.010100 ´ 2
Convert
Normalizing exponent Remove
0.010100 × 22  → 0.10100 × 21  → 0.10100 × 20012  
→ 010100 × 20012
to binary dot
001
\ 510 ´ .2510 = 010100 ´ 2 = 0101000012
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 16
The product in floating point format can be converted to decimal as shown below.
Re move
010100 × 2001  
→ +.10100 × 2+12 = +101
. 2
sign bit

. 2 = +(1 × 2 + 0 × 2−1 + 1 × 2−2 ) = 1 + 0+.25 = 1. 2510


+101 0

8.3.5 Comparison of Fixed Point and Floating Point Arithmetic


The floating point number system can accommodate a large range of numbers and so in floating point
arithmetic higher accuracy in processing can be achieved. But the hardware implementation for floating point
arithmetic is costlier and the speed of processing is low due to double calculations i.e., separate calculation
for mantissa and exponent. Therefore, the floating point arithmetic is preferred for non-real time applications
on general purpose digital systems (computers) in which the cost and speed are not significant.
In floating point arithmetic the truncation and rounding errors occur both for multiplication and
addition, whereas in fixed point arithmetic such errors occur only for multiplication.
The addition in fixed point arithmetic leads to overflow, but the overflow is a rare phenomena in
floating point arithmetic due to larger dynamic range. In general, for real time applications in DSP fixed point
arithmetic is preferred due to the reduced cost of the hardware and high speed of processing.

8.4 Quantization by Truncation and Rounding


In fixed point or floating point arithmetic the size of the result of an operation (sum or product) may be
exceeding the size of binary used in the number system. In such cases the low order bits has to be eliminated
in order to store the result. The two methods of eliminating these low order bits are truncation and rounding.
This process is also referred to as quantization via truncation and rounding. The effect of rounding and
truncation is to introduce an error whose value depends on the number of bits eliminated. The characteristics
of the errors introduced through either truncation or rounding depend on the type of number representation.

8.4.1 Quantization Steps


The decimal numbers that are encountered as filter coefficients, sum, product, etc., in DSP applications
will usually lie in the range of –1 to +1. When “B” bit binary is selected to represent the decimal numbers, then
B B
2 binary codes are possible. Hence the range of decimal numbers has to be divided into 2 steps and each
step is represented by a binary code. Each step of decimal number is also called quantization step.
R 1 − ( −1) 2 1
∴ Quantization step size, q = = = B= B
2B 2B 2 2 − 2 −1
1 1 .....(8.12)
= B − 1 = b = 2− b
2 2

Where, R = Range of decimal number


B = Size of binary including sign bit
b = B – 1 = Size of binary excluding sign bit
Therefore, the quantization steps of decimal numbers that lies in the range –1 to +1 are,
−1, ......, − 3 × 2 − b , − 2 × 2 − b , − 1 × 2 − b , 0 × 2 − b , 1 × 2 − b , 2 × 2 − b , 3 × 2 − b , ......, + 1

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
.

101 −1 × 2 −2 = −1 × 41 = −0.25 −2 × 2 −2 = −2 × 41 = −0.50 −3 × 2 −2 = −3 × 14 = −0.75


1 1 1
110 −2 × 2 −2 = −2 × 4
= −0.50 − 1 × 2 − 2 = −1 × 4
= −0.25 −2 × 2 −2 = −2 × 4
= −0.50
1 1 1
111 −3 × 2 − 2 = −3 × 4
= −0.75 − 0 × 2 − 2 = −0 × 4
= −0 − 1 × 2 − 2 = −1 × 4
= −0.25

Table 8.4 : Quantization Steps for B = 4 and b = B – 1 = 3

Binary Quantization Steps


Code
Sign-magnitude One’s complement Two’s complement
1 1 1
0000 +0 × 2 − 3 = +0 × 8 = + 0 +0 × 2 − 3 = +0 × 8 = + 0 +0 × 2 − 3 = +0 × 8 = + 0
1 1 1
0001 +1 × 2 −3 = +1 × 8 = +0.125 +1 × 2 −3 = +1 × 8 = +0.125 +1 × 2 −3 = +1 × 8 = +0.125
1 1 1
0010 +2 × 2 −3 = +2 × 8 = +0.250 +2 × 2 −3 = +2 × 8 = +0.250 +2 × 2 −3 = +2 × 8 = +0.250
1 1 1
0011 +3 × 2 −3 = +3 × 8 = +0.375 +3 × 2 −3 = +3 × 8 = +0.375 +3 × 2 − 2 = +3 × 4
= +0.75
1 1 1
0100 +4 × 2 −3 = +4 × 8 = +0.500 +4 × 2 −3 = +4 × 8 = +0.500 +4 × 2 −3 = +4 × 8 = +0.500

0101 +5 × 2 −3 = +5 × 81 = +0.625 +5 × 2 −3 = +5 × 81 = +0.625 +5 × 2 −3 = +5 × 81 = +0.625


1 1 1
0110 +6 × 2 −3 = +6 × 8 = +0.750 +6 × 2 −3 = +6 × 8 = +0.750 +6 × 2 −3 = +6 × 8 = +0.750
1 1 1
0111 +7 × 2 −3 = +7 × 8 = +0.875 +7 × 2 −3 = +7 × 8 = +0.875 +7 × 2 −3 = +7 × 8 = +0.875
1 1 1
1000 −0 × 2 − 3 = −0 × 8 = − 0 −7 × 2 −3 = −7 × 8 = −0.875 −8 × 2 −3 = −8 × 8 = −1.000
1 1 1
1001 −1 × 2 −3 = −1 × 8 = −0.125 −6 × 2 −3 = −6 × 8 = −0.750 −7 × 2 −3 = −7 × 8 = −0.875
1 1 1
1010 −2 × 2 −3 = −2 × 8 = −0.250 −5 × 2 −3 = −5 × 8 = −0.625 −6 × 2 −3 = −6 × 8 = −0.750
1 1 1
1011 −3 × 2 −3 = −3 × 8 = −0.375 −4 × 2 −3 = −4 × 8 = −0.500 −5 × 2 −3 = −5 × 8 = −0.625
1 1 1
1100 −4 × 2 −3 = −4 × 8 = −0.500 −3 × 2 −3 = −3 × 8 = −0.375 −4 × 2 −3 = −4 × 8 = −0.500
1 1 1
1101 −5 × 2 −3 = −5 × 8 = −0.625 −2 × 2 −3 = −2 × 8 = −0.250 −3 × 2 −3 = −3 × 8 = −0.375
1 1 1
1110 −6 × 2 −3 = −6 × 8 = −0.750 −1 × 2 −3 = −1 × 8 = −0.125 −2 × 2 −3 = −2 × 8 = −0.250
1 1 1
1111 −7 × 2 −3 = −7 × 8 = −0.875 −0 × 2 − 3 = −0 × 8 = − 0 −1 × 2 −3 = −1 × 8 = −0.125
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 18
8.4.2 Truncation
The truncation is the process of reducing the size of binary number (or reducing the number of bits
in a binary number) by discarding all bits less significant than the least significant bit that is retained. In the
th
truncation of a binary number to b bits, all the less significant bits beyond b bit are discarded.
Nt Nt

−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

Case ii : Sign-magnitude and one’s complement negative number


The unquantized negative number in the range,
is
( −2 × 2 − b ) < N ≤ ( −1 × 2 − b )   → N t = −1 × 2 − b
truncated to
−b
∴ Minimum error = −1 × 2 − ( −1 × 2 − b ) = 0
Maximum error = −1 × 2 − b − ( −2 × 2 − b ) = 2 − b
∴ Range of error = 0 ≤ e < 2− b
Case iii : Two’s complement negative number
The unquantized negative number in the range,
is
( −1 × 2 − b ) < N ≤ ( −2 × 2 − b )   → N t = −2 × 2 − b
truncated to
−b
∴ Minimum error = −2 × 2 − ( −1 × 2 − b ) = −2 − b
Maximum error = −2 × 2 − b − ( −2 × 2 − b ) = 0
∴ Range of error = − 2 − b < e ≤ 0
The range of errors for different types of number representation are summarized in table 8.5. The
truncation of a positive number results in a number that is smaller than the unquantized number. Hence the
truncation error is always negative when positive number is truncated.
Table 8.5 : Range of Errors in Truncation of Fixed Point Numbers

Number and its Range of error when


representation truncated to b bits
Positive number − 2− b < e ≤ 0
Sign - magnitude
negative number 0 £ e < 2– b
One’s complement
negative number 0 £ e < 2– b
Two’s complement
negative number − 2− b < e ≤ 0
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 20
For the truncation of negative numbers represented in sign magnitude and one’s complement format
the error is always positive because the truncation basically reduces the magnitude of the numbers. In the
two’s complement representation, the effect of truncation on a negative number is to increase the magnitude
of the negative number and so the truncation error is always negative.
In floating point representation the mantissa of the number alone is truncated. The truncation error in
a floating point number is proportional to the number being quantized.
Let, Nf = Unquantized floating point binary number.
Ntf = Truncated floating point binary number.
Now, Ntf = Nf + Nfet ..... (8.14)

where, et is the relative error due to truncation of a floating point number.

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

Type of representation Range of error when mantissa


p(e t )
for mantissa is truncated to b bits b
2
Two's complement
positive mantissa −2 × 2 − b < ε t ≤ 0

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

known but the probability of obtaining an error within the range


−b −b
0 2 ×2 ε
is not known. Hence it is assumed that the errors occur −2 × 2 t

F ig 8.3b : F loa tin g p oint-w h e n m a ntissa in


uniformly throughout the interval and with this assumption the tw o ’s co m p le m e nt.
probability density functions for truncation of fixed point and
floating point numbers are shown in fig 8.3.
p(e t ) p( εt )
b
2 /2 b
2 /2

−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

F ig 8 .4 : In p u t-o u tpu t c h ara cteristics o f q u a n tize r u se d fo r ro u nd in g.

1. Any positive unquantized number in the range, 1 × FH 2−b


2
IK ≤ N < FH 2 × 2− b
2
IK , will be assigned
.
the quantization step, 1 × 2–b

2. Any positive unquantized number in the range, 2 × FH 2−b


2
IK ≤ N < FH 3 × 2− b
2
IK , will be assigned
the quantization step, 2 × 2–b, and so on.

3. Any negative unquantized number in the range, −2 × FH 2− b


2
IK < N ≤ FH −1 × IK , will be assigned
2− b
2

the quantization step, –1 × 2–b.

4. Any negative unquantized number in the range, −3 × FH 2− b


2
IK < N ≤ FH −2 × IK , will be assigned
2− b
2

the quantization step, – 2 × 2–b, and so on.


Let, N = Unquantized fixed point binary number.
Nr = Fixed point binary number quantized by rounding.
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 22
The quantization error in fixed point number due to rounding is defined as,
Rounding error, er = Nr – N .....(8.16)
The range of error due to rounding for all the three formats (i.e., one’s complement, two’s complement
and sign-magnitude) of fixed point representation is same.
In fixed point representation the range of error made by rounding a number to b bits is,

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 .

8.5 Quantization of Input Data


For processing of analog signal using a digital system the analog signal has to be digitized by A/D
(Analog to Digital) converter. The A/D converter consists of sampler and quantizer. The sampler will sample
the value of analog signal at uniform intervals to produce a sequence of unquantized values of the signal.
The quantizer will quantize the analog value and produce the corresponding binary codes. The process of
assigning binary number to quantized analog value is also called coding.
The two types of errors that are produced by A/D conversion process are quantization errors and
saturation errors. The quantization error is due to representation of the sampled signal by a fixed number of
digital levels (quantization levels). The saturation error occurs when the analog signal exceed the dynamic
range of A/D converter.
8. 23 Digital Signal Processing
In analog to digital conversion, when B-bits binary code (including sign bit) is selected, we can
generate 2B different binary numbers. If the range of analog signal to be quantized is R then the quantization
step size q is given by,

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

Variance, σ 2 = E{x 2 } − E2 {x}


If the random variable x is uniform in the interval (–c, c) then E{x} = 0 i.e., mean value is zero and so
variance, s 2 = E{x2}
Let, E{e} = Expected value (or mean value) of error signal.
+q /2 +q /2
1 1LM e OP 2
∴ E{e} = q
2
FG IJ
− −
q
H K
2
z
− q /2
e de =
q MN 2 PQ − q/2

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

∴ Variance of error signal, σ 2e =


1 LMF q I 3
FG −q IJ OP =
3
1 LM q 3
q3 OP
3q MNGH 2 JK −
H 2 K PQ 3q MN 8 +
8 PQ
1 2q 3 q2
= × = .....(8.22)
3q 8 12
Using equation (8.19) in equation (8.22) we get,
2
1 R FG IJ R 2 −2 B
Variance of error signal, σ 2e = = 2 .....(8.23)
12 2 B H K 12

2 2 −2B 2 −2B
When R = 2, σ 2e = 2 = .....(8.24)
12 3

where, B = size of binary including sign bit.


The variance of error signal is also called steady state noise power due to input quantization. From
equation (8.23) we can say that the steady state noise power tends to zero as B tends to infinity. The value of
B is infinite only if A/D converter has infinite precision, which is not practically possible.
Another important point to be noted here is that the analog signals are also corrputed by some form
of noise. When a large number of bits are used to digitize such a signal, then the analog noise are well
represented on the digitized signal. Hence we can say that by increasing the number of bits in A/D converter
beyond a certain limit merely increases the accuracy by which an analog noise is represented. Therefore the
word length of an A/D converter also depends on the type of signal to be converted.
Steady State Output Noise Variance (Power) Due to the Quantization Error Signal
The quantized input signal of a digital system can be represented as a sum of unquantized signal x(n)
and error signal e(n) as shown in fig 8.6. [From equation (8.20) we get xq(n) = x(n) + e(n)].
e(n)

xq(n)
h(n) + h(n)
x(n) y(n) x(n) y ’(n)

F ig 8.6 a : LT I system w ith F ig 8.6 b : LT I system w ith


u n q ua n tize d in pu t. q u a ntized in p u t.
F ig 8.6 : R ep resen ta tio n of in p ut q u a n tiza tio n n o ise in a n LT I system .
In fig 8.6, h(n) is the impulse response of the system and y¢(n) is the response or output of the system
due to input and error signal. The response of the system is given by convolution of input and impulse
response. For linear systems using distributive property of convolution the response y¢(n) can be written as
shown in equation (8.25).
y¢(n) = xq(n) * h(n)
= [x(n) + e(n)] * h(n)
= [x(n) * h(n)] + [e(n) * h(n)] ..... (8.25)
Let, y¢(n) = y(n) + e(n) ..... (8.26)
where, y(n) = x(n) * h(n) = Output due to input signal x(n).
e(n) = e(n) * h(n) = Output due to error signal e(n).
8. 25 Digital Signal Processing
The variance of the signal e(n) is called output noise power or steady state output noise power (or
variance) due to the quantization error signal. Using autocorrelation function and the definition for variance
of a discrete time signal, the expression for output noise power shown in equation (8.27) can be derived.

Steady state output noise power UVσ
due to input quantization errors W
2
eoi = σ e2 ∑ h 2 ( n) ..... (8.27)
n= 0
2
In equation (8.27) the variance of error signal se can be evaluated using equation (8.23) or (8.24) and
2
the summation of h (n) can be evaluated using Parseval’s theorem.

1
∴ σ 2eoi = σ e2 ∑ h 2 ( n) =
n= 0
σ 2e
2 πj zc
H ( z) H ( z −1 ) z −1 dz ..... (8.28)

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.

Example 8.11 e(n)

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(z–1) z–1 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,

Output noise power U| σ 1


due to A / D process |W
V 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
= σ 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(z–1) z–1, 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.68z–1Y(z) + 0.15X(z)
Y(z) – 0.68z–1Y(z) = 0.15X(z)
Y(z) [1 – 0.68z–1] = 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(z–1) z–1 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.

Therefore, let us assume that input varies from –1 to +1.

\ Range, R = –1 to +1 = 1 – (–1) = 2

Size of binary, B = 7 bits (including sign bit).

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(z–1) z–1 are p1 = 0.72, p2 = 1.3889.

Here, p1 = 0.72 is the only pole that lies inside the unit circle in z-plane.

∴ Output noise power due U| σ 1


to input quantization
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
= σ 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

= 0.4205 × 2.0345 × 10 −5 Using equation (1).

= 8.5551 × 10 −6

8.6 Quantization of Filter Coefficients


In the realization of FIR and IIR filters in hardware or in software, the accuracy with which filter
coefficients can be specified is limited by the word length of the register used to store the coefficients.
Usually the filter coefficients are quantized to the word size of the register used to store them either by
truncation or by rounding.
The location (or the value) of poles and zeros of the digital filters directly depends on the value of filter
coefficients. The quantization of the filter coefficients will modify the value of poles and zeros, and so the
location of the poles and zeros will be shifted from the desired location. This will create deviations in the
frequency response of the system. Hence we obtain a filter having a frequency response that is different from
the frequency response of the filter with unquantized coefficients.
The sensitivity of the filter frequency response characteristics to quantization of the filter coefficients
is minimized by realizing the filter having a large number of poles and zeros as an interconnection of
second-order sections. This leads to the parallel form and cascade form realization in which the basic building
blocks are first-order and second-order sections. It is possible to prove that the coefficient quantization has
less effect in cascade realization when compared to parallel realization.

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

Case (i) : Direct form Realization

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 ´ 2–1) + (1 ´ 2–2) + (1 ´ 2–3) = .87510
Let , H(z) = =
X(z) 1 − 0.875z−1 + 0.125 z−2 .0012 = (0 ´ 2–1) + (0 ´ 2–2) + (1 ´ 2–3) = .12510

On cross multiplying the above equation we get,

Y(z) – 0.875z–1Y(z) + 0.125z–2Y(z) = X(z)

\ Y(z) = X(z) + 0.875z–1Y(z) – 0.125z–2Y(z)


Using the above equation the direct form structure is drawn as shown in fig 1.

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 )

F ig 1 : D irec t fo rm R ea liza tio n o f H (z).


The roots of the quadratic,
Let us examine the poles of the system after coefficient
quantization. z2 – 0.875z + 0.125 = 0, are given by,

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 .

∴ pd1 = 0.625 and pd2 = 0.18

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.

\ H(z) = H1(z) H2(z)

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.5z–1Y1(z) = X(z)
\ Y1(z) = X(z) + 0.5z–1Y1(z) .....(1)
Y(z) 1
Let , H2(z) = =
Y1(z) 1 − 0.375 z−1

On cross multiplying the above equation we get,


Y(z) – 0.375z–1Y(z) = Y1(z)
\ Y(z) = Y1(z) + 0.375z–1Y(z) .....(2)
Using equations (1) and (2) the cascade structure of the system is drawn as shown in fig 2.

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 )

F ig 2 : C a sca de realiza tio n o f th e system .

Let us examine the poles of the cascade system.


Let the poles of the cascade system be pc1 and pc2 which are given by the roots of the denominator
polynomials of H1(z) and H 2(z) .
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 32
1 1 z
Let , H1(z) = = =
1 − 0.5 z −1 z −1 (z − 0.5) z − 0.5
1 1 z
H2(z) = = =
1 − 0.375 z −1 z −1 (z − 0.375) z − 0.375

∴ pc1 = 0.5 and pc2 = 0.375

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.

Decimal to binary conversion Binary to decimal conversion


.7 . 12
.1011 2 =(1´2 –1 )+(0´2 –2 )+(1´2 –3 ) +(1´2 –4 )
´2 ´2
= .687510
1 .4 0 .24
´2 ´2 .0001 2 =(0´2 –1 )+(0´2 –2 )+(0´2 –3 ) +(1´2 –4 )
0 .8 0 .48 = .062510
´2 ´2
1 .6 0 .96
´2 ´2
1 .2 1 .92
´2 ´2
0 .4 1 .84
¯ ¯ ¯¯ ¯ ¯ ¯ ¯¯ ¯
.1 0 1 1 0 .0 0 0 1 1

Convert to Truncate to Convert to


. 710   → .10110 2   → .10112   → .687510
binary 4 - bits decimal

Convert to Truncate to Convert to


.1210  → .000112  → .00012  → .062510
binary 4 - bits decimal
8. 33 Digital Signal Processing
Let, H(z) be the transfer function of the IIR system after quantizing the coefficients.

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

On cross multiplying the above equation we get,

Y(z) – 0.6875z–1Y(z) + 0.0625z–2Y(z) = X(z)

\ Y(z) = X(z) + 0.6875z–1Y(z) – 0.0625z–2Y(z)

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

F ig 1 : D irec t fo rm -I rea liza tio n o f H (z).

Let us examine the poles of the system, after coefficient quantization.

1 z2
Let , H(z) = −2 2
= 2
z (z − 0.6875 z + 0.0625) z − 0.6875z + 0.0625

z2 The roots of the quadratic,


=
(z − 0.5797)(z − 0.1078)
z2 – 0.6875z + 0.0625 = 0 are,
The poles of H(z) are given by roots of the denominator 0.6875 ± 0.68752 − 4 × 0.0625
z=
polynomial of H(z). 2
0.6875 ± 0.4719
Let the poles of H(z) be pd1 and pd2 . =
2
∴ pd1 = 0.5797 and pd2 = 0.1078 = 0.5797, 0.1078

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.

Case(ii) : Cascade Realization

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.

Decimal to binary conversion Binary to decimal conversion


.4 .3
´2 .0110 2 =(0´2 –1 )+(1´2 –2 )+(1´2 –3 ) +(0´2 –4 )
´2
0 .8 = .37510
0 .6
´2 ´2 .0100 2 =(0´2–1 )+(1´2 –2 )+(0´2 –3 ) +(0´2 –4)
1 .6 1 .2 = .2510
´2 ´2
1 .2 0 .4
´2 ´2
0 .4 0 .8
´2 ´2
0 .8 1 .6
¯ ¯ ¯¯ ¯ ¯ ¯ ¯¯ ¯
.0 1 1 0 0 .0 1 0 0 1

Convert to Truncate to Convert to


.410   → .011002   → .01102   → .37510
binary 4- bits decimal

Convert to Truncate to Convert to


.310  → .010012  
→ .01002  
→ .2510
binary 4 -bits decimal

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

On cross multiplying the above equation we get,


Y1(z) – 0.375z–1Y1(z) = X(z)
\ Y1(z) = X(z) + 0.375z–1Y1(z) .....(2)
Y(z) 1
Let , H2 (z) = =
Y1(z) 1 − 0.25 z−1

On cross multiplying the above equation we get,


Y(z) – 0.25z–1Y(z) = Y1(z)
\ Y(z) = Y1(z) + 0.25z–1Y(z) .....(3)
Using equations (2) and (3) the cascade structure of the system is drawn as shown in fig 2.

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)

F ig 2 : C a sca de realiza tio n o f th e system .


8. 35 Digital Signal Processing
Let us examine the poles of the cascade system.
Let, the poles of the cascade system be pc1 and pc2 which are given by the roots of the denominator
polynomials of H1(z) and H2(z) .
1 1 z
Let , H1(z) = = =
1 − 0.375 z −1 z −1 (z − 0.375) z − 0.375
1 1 z
H2(z) = = =
1 − 0.25 z −1 z −1 (z − 0.25) z − 0.25
∴ pc1 = 0.375 and pc2 = 0.25
On comparing the poles of the cascade system with original poles we can say that both the poles are very
close to original poles of the system. Also we can observe that the deviation of poles of cascaded system is less
when compared to deviation of poles in direct form realization.

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.8301z–1Y(z) + 0.7348z–2Y(z) = z–2X(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,

Y(z) z −2 −0.8301 ± 0.83012 − 4 × 0.7348


∴ Transfer function, H(z) = = −2 2 z=
X(z) z z + 0.8301z + 0.7348 2
0.8301 ± j1.5
1 =
= 2
2
z + 0.8301z + 0.7348
= 0.415 ± j0.75
1
=
(z + 0.415 − j0.75)(z + 0.415 + j0.75)
The poles of the given system are roots of denominator polynomial of H(z).
Let the poles be p1 and p2.
\ p1 = –0.415 + j0.75
p2 = –0.415 – j0.75
Case(i) : Quantization of coefficients to 3-bits by truncation
The coefficients to be quantized are 0.830110 and 0.734810.

Decimal to binary conversion Binary to decimal conversion


.8301 .7348
. 1 1 0 2 = ( 1 ´2 –1 ) + ( 1 ´2 –2 ) + ( 0 ´2 –3 )
´2 ´2
= .7510
1 .6602 1 .4696
´2 ´2 . 1 0 1 2 = ( 1 ´2 –1 ) + ( 0 ´2 –2 ) + ( 1 ´2 –3 )
1 .3204 0 .9392 = .62510
´2 ´2
0 .6408 1 .8784
´2 ´2
1 .2816 1 .7568
´2 ´2
0 .5632 1 .5136
¯ ¯ ¯¯ ¯ ¯ ¯ ¯¯ ¯
.1 1 0 1 0 .1 0 1 1 1
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 36
Convert to Truncate to Convert to
.830110   → .11010   → .1102   → .7510
binary 3- bits decimal

Convert to Truncate to Convert to


.734810  → .10111  → .1012  → .62510
binary 3-bits decimal

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 roots of the quadratic, z2 + 0.75z + 0.625 = 0 are,

−0.75 ± 0.752 − 4 × 0.625 −0.75 ± j1.3919


z = =
2 2
= −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.

\ p13 = –0.375 + j0.696 ; p23 = –0.375 – j0.696


Case(ii) : Quantization of coefficients to 4-bits by truncation
The coefficients to be quantized are 0.830110 and 0.734810.
Convert to Truncate to Convert to
.830110   → .11010 2   → .11012   → .812510
binary 4 -bits decimal

Convert to Truncate to Convert to


.734810  → .101112  → .10112  → .687510
binary 4 -bits decimal

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´2–1)+(1´2–2)+(0´2–3) +(1´2–4)
∴ H4 (z) = 2
z + 0.8125 z + 0.6875 = .812510

1 .10112 =(1´2–1)+(0´2–2)+(1´2–3) +(1´2–4)


= = .687510
(z + 0.4063 − j0. 7228)(z + 0.4063 + j0. 7228)

The roots of the quadratic, z2 + 0.8125z + 0.6875 = 0 are,

−0.8125 ± 0.81252 − 4 × 0.6875 −0.8125 ± j 14456


.
z= =
2 2
= −0.4063 ± j 0.7228

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.

\ p14 = –0.4063 + j0.7228 ; p24 = –0.4063 – j0.7228


Conclusion
The quantization of coefficients result in deviation of pole locations. The deviation is lesser, when the
quantization is performed with higher size binary.
8. 37 Digital Signal Processing
8.7 Product Quantization Error
In realization structures of IIR system, multipliers are used to multiply the signal by constants. The
output of the multipliers i.e, the products are quantized to finite word length in order to store them in registers
and to be used in subsequent calculations. In fixed point arithmetic, the muliplication of two b-bit numbers
results in a product of length 2b-bits. If the word length of the register used to store the result is b-bits then
it is necessary to quantize the product (result) to b-bits. The error due to the quantization of the output of
multiplier is referred to as product quantization error.
In digital system the product quantization is performed by rounding due to the following desirable
characteristics of rounding.
1. In rounding the error signal is independent of the type of arithmetic employed.
2. The mean value of error signal due to rounding is zero.
3. The variance of error signal due to rounding is the least.
The analysis of product quantization error is similar to the analysis of quantization error due to A/D
process. But in product quantization error analysis it is necessary to define the noise transfer function, which
depends on the structure of the digital network.
The Noise Transfer Function (NTF) is defined as transfer function from the noise source to the filter
output (i.e., NTF is the transfer function obtained by treating the noise source as actual input).
The model of the multiplier of a digital network using fixed point arithmetic is shown in fig 8.7. The
multiplier is considered as an infinite precision multiplier. Using an adder the error signal is added to the
output of multiplier so that the output of adder is equal to the quantized product. Therefore the output of
finite word length multiplier can be expressed as,
e(n)
x (n ) a x(n)
a + Q [a x (n)] = a x (n ) + e (n)

F ig 8.7 : Sta tistica l m o d el o f fix ed po in t pro d u ct q u a ntiza tio n.

Quantized product = Q[a x(n)] = a x(n) + e(n) ..... (8.30)


where, a x(n) = Unquantized product
e(n) = Product quantization error signal
The product quantization error signal is treated as a random process with uniform probability density
function. In general the following assumptions are made regarding the statistical independence of the
various noise sources in the digital filter.
1. Any two different samples from the same noise source are uncorrelated.
2. Any two different noise sources, when considered as random processes are uncorrelated.
3. Each noise source is uncorrelated with the input sequence.
The product quantization noise models for first-order and second-order IIR systems using direct form-
I and direct form-II structures are shown in fig 8.8. The product quantization noise models for IIR systems using
cascade structures are shown in fig 8.9. In these models each finite precision multiplier is replaced by an ideal
multiplier and an additive roundoff noise. The noise signal is added to the output of ideal multiplier.
Chapter 8 - Finite Word Length Effects in Digital Filters 8. 38
In each model shown in fig 8.8 and fig 8.9 there are a number of noise sources. The output noise
variance (power) due to each source is computed separately by considering one noise source at a time. The
total output noise variance (power) is given by sum of the output noise variance (power) of all the noise
sources.

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)

F ig 8 .8 a : F irst-o rd er d irect form -I. F ig 8 .8 b : F irst-o rd er d irect form -II.

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)

F ig 8.8 c : S e co n d -o rd e r d irect fo rm -I. F ig 8.8 d : S e co n d -o rd e r d irect fo rm -II.


F ig 8.8 : P rod u c t qu a n tiza tio n n o ise m o d els o f IIR syste m s fo r direc t fo rm rea liza tio n .

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)

F ig 8 .9 a : C a sca d in g o f tw o first-o rde r sec tio ns.


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 + +

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)

F ig 8.9 b : C a sca din g o f tw o sec on d-o rd er sec tio n s.


F ig 8.9 : P rod u c t qu a n tiza tio n no ise m o d els o f IIR syste m s fo r ca sca de fo rm realiza tio n.
8. 39 Digital Signal Processing
The equations used for computing the steady state output noise variance (power) due to quantization
error in A/D conversion process can be used to compute the output noise variance due to product quantization,
because in both cases the quantization is performed by rounding. But the transfer function seen by each
noise source is different. Therefore for each noise source, the Noise Transfer Function (NTF) has to be determined
by treating the noise source as input (and the output being the output of the system). With reference to fig 8.8
and fig 8.9 some examples of Noise Transfer Functions are given below.
NTF for noise source ea1(n) in fig 8.8b = H(z)
NTF for noise source ea1(n) and ea2(n) in fig 8.8d = H(z)
NTF for noise source ea11(n) in fig 8.9a = H1(z) H2(z)
NTF for noise source eb11(n) and ea12(n) in fig 8.9b = H2(z)
Output Noise Power (Roundoff Noise Power) Due to Product Quantization
th
Let, ek(n) = Error signal from k noise source.
th
hk(n) = Impulse response for k noise source.
th
Tk(z) = Z{hk(n)}= Noise Transfer Function (NTF) for k noise source.
σ 2ek = Variance of k th noise source .
σ 2ekop = Output noise power or variance due to k th noise source. Refer equations (8.22)
and (8.24).
q2 2 –2 B
Now , Variance of k th noise source, σ 2ek = or ..... (8.31)
12 3

Now , Output noise power due to k th noise source, σ 2ekop = σ 2ek ∑ h2k ( n) ..... (8.32)
n= 0

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.

You might also like