100% found this document useful (1 vote)
101 views19 pages

Book DSP Preview

Preview of the DSP book with MATLAB use

Uploaded by

Vishnu Satya
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 (1 vote)
101 views19 pages

Book DSP Preview

Preview of the DSP book with MATLAB use

Uploaded by

Vishnu Satya
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/ 19

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/346680479

Digital Signal Processing Using MATLAB

Book · April 2019

CITATION READS
1 2,967

2 authors, including:

Ahmed Youssef
University of Victoria
8 PUBLICATIONS   23 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

UWB Radar for high precision localization View project

Design and implement a Dsp algorithm for high precision classification of small RCS objects. View project

All content following this page was uploaded by Ahmed Youssef on 07 December 2020.

The user has requested enhancement of the downloaded file.


ii
Digital
Signal
Processing
Using MATLABr

Fayez Gebali and Ahmed Youssef

Version 2019-04-17
Fayez Gebali and Ahmed Youssef

Department of Electrical and Computer Engineering

University of Victoria

Victoria, BC, Canada

Copyright c 2019, Dr. Fayez Gebali

All rights reserved. No part of this publication may be reproduced, stored in a database or retrieval system, distributed,

or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without

the prior written permission of Dr. Gebali.


Contents

List of Abbreviations xiii

Useful MATLAB Functions xv

1 Signals 1

1.1 Signals as Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Applications of Digital Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Discrete Versus Continuous Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4 Analog-to-Digital and Digital-to-Analog Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.5 Time Shifting a Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.6 Special Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.6.1 Sinusoidal Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.6.2 Relating the Phase to the Time Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.6.3 Unit Step Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.6.4 Unit Pulse Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.6.5 Dirac Delta Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 Sinusoidal Signals 17

2.1 Cosine Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.2 Sinusoidal Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

iii
iv CONTENTS

2.2.1 Relating the Phase to Time Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.3 Euler’s Formula & Inverse Euler’s Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.4 Expressing A Sinusoid as Real Part of a Complex Exponential . . . . . . . . . . . . . . . . . . . . . 22

2.5 Phasor Representation of a Sinusoidal Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.6 Two-Sided Spectrum of a Sinusoid: Inverse Euler’s Formula . . . . . . . . . . . . . . . . . . . . . . 24

2.7 More Complex Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.7.1 Product of Two Sinusoidal Signals: Amplitude Modulation . . . . . . . . . . . . . . . . . . . 27

2.7.2 Sine Squared Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.8 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 Sampling and Aliasing 35

3.1 Sampling of Analog Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.2 Sampling a Sinusoidal Signal: Normalized Radian Frequency . . . . . . . . . . . . . . . . . . . . . . 36

3.3 Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.4 Range of Normalized Radian Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.4.1 Spectrum of a Discrete-Time Sinusoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.5 The Sampling Theorem (Nyquist Rate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

3.6 Converting Continuous-Time to Discrete-Time Signals and Vice Versa . . . . . . . . . . . . . . . . . 43

3.7 Effects of the Sampling Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3.7.1 Oversampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3.7.2 Undersampling with Folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3.8 Undersampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

3.9 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

4 Discrete-Time Systems 53

4.1 Special Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.1.1 Unit Impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.1.2 Unit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54


CONTENTS v

4.1.3 Rectangular Pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4.1.4 Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

4.1.5 Complex Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

4.1.6 Linear Frequency-Modulated (LFM) Chirp Signal . . . . . . . . . . . . . . . . . . . . . . . 57

4.2 Signal Energy and Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

4.2.1 Average Power of a Periodic Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

4.3 System Example: Digital Moving Average (MA) Filter . . . . . . . . . . . . . . . . . . . . . . . . . 61

4.4 Causal and Noncausal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

4.5 Linear and Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

4.6 Time-Invariant and Time-Variant Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

4.7 Recursive and Nonrecursive Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

4.8 Expressing a Discrete-Time Signal as a Sequence of Delayed Impulses . . . . . . . . . . . . . . . . . 68

4.9 The Impulse Response of Nonrecursive Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

4.10 Impulse Response of Recursive Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4.11 FIR Filter Equation and Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

4.11.1 Computing Output of Convolution Using MATLAB . . . . . . . . . . . . . . . . . . . . . . 73

4.12 Convolution Operation Dependance Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

4.12.1 Length of the Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

4.12.2 Commutative Property of Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

4.12.3 Distributive Property of Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

4.12.4 Associative Property of Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

4.12.5 Extracting Impulse Response Using Convolution . . . . . . . . . . . . . . . . . . . . . . . . 77

4.13 Cascaded LTI Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

4.14 Correlation Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

4.14.1 Correlation Operation Dependance Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

4.14.2 Range of the Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

4.15 Matched Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85


vi CONTENTS

4.15.1 Matched Filter Dependence Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

4.15.2 Application of Correlation in Radars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

4.15.3 MATLAB Implementation of Correlation Operation . . . . . . . . . . . . . . . . . . . . . . 87

4.16 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

5 Discrete-Time Fourier Transform (DTFT) 93

5.1 The Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

5.1.1 Fourier Series: Synthesis Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

5.1.2 Fourier Series: Analysis Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

5.2 The Fourier Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

5.2.1 Similarity to the Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

5.3 The Forward Discrete-Time Fourier Transform (DTFT) . . . . . . . . . . . . . . . . . . . . . . . . . 96

5.4 DTFT of Some Simple Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

5.4.1 DTFT of Unit Impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

5.4.2 DTFT of Length-L Pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

5.4.3 DTFT of Decaying Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

5.4.4 DTFT of Decaying Complex Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . 99

5.5 Properties of the DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

5.5.1 Linearity Property of DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

5.5.2 Time Shift Property of DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

5.5.3 Periodicity Property of DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

5.5.4 Frequency Shift Property of DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

5.5.5 Conjugate Symmetry Property of DTFT for Real Signals . . . . . . . . . . . . . . . . . . . . 105

5.5.6 Time Shift Property of DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

5.6 Relationship Between DTFT and Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

5.6.1 The Convolution Theorem: Convolution in the Frequency Domain . . . . . . . . . . . . . . . 107

5.7 The Inverse DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108


CONTENTS vii

5.7.1 Inverse DTFT of a Constant in the Frequency Domain . . . . . . . . . . . . . . . . . . . . . 108

5.7.2 Inverse DTFT of a Complex Exponential in the Frequency Domain . . . . . . . . . . . . . . 109

5.7.3 DTFT of the Unit Step Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

5.7.4 DTFT of the Complex Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

5.8 DTFT of the FIR Filter: The Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

5.9 DTFT of the IIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

5.10 DTFT of Some Ideal Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

5.10.1 Frequency Response of Ideal Lowpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 114

5.10.2 Frequency Response of Ideal Highpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 115

5.10.3 Frequency Response of Ideal Bandpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 117

5.10.4 Frequency Response of Ideal Bandstop Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 119

5.11 Parseval’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

5.12 Gibbs Phenomenon in the Time Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

5.13 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

6 Discrete Fourier Transform (DFT) 131

6.1 The Forward DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.1.1 The Range of k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.2 DFT of Some Simple Periodic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

6.2.1 DFT of Periodic Unit Impulse Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

6.2.2 DFT of Delayed Periodic Unit Impulse Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 134

6.2.3 DFT of Periodic Length-L Pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

6.2.4 DFT of Periodic Length-N Pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

6.2.5 DFT of Periodic Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

6.2.6 DFT of Periodic Complex Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 136

6.2.7 DFT of a Periodic Complex Exponential Sequence . . . . . . . . . . . . . . . . . . . . . . . 136

6.3 DFT of Periodic Cosine Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137


viii CONTENTS

6.4 Relation Between DTFT and DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

6.5 Properties of the DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

6.5.1 Linearity Property of DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

6.5.2 Time Shift Property of DFT: Circular Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

6.5.3 Periodicity Property of DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

6.5.4 Frequency Shift Property of DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

6.5.5 Conjugate Symmetry of DFT for Real Signals . . . . . . . . . . . . . . . . . . . . . . . . . . 143

6.6 Calculating DFT Using MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

6.6.1 Centering the Spectrum Around 0 Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

6.7 The Inverse DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

6.7.1 Inverse DFT of Impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

6.8 Relationship Between DFT and Convolution: Circular Convolution . . . . . . . . . . . . . . . . . . . 147

6.8.1 Calculating Circular Convolution Using MATLAB . . . . . . . . . . . . . . . . . . . . . . . 148

6.9 Parseval’s Theorem for the DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

6.10 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

7 z-Transform 155

7.1 The z-Transform Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

7.2 The Region of Convergence (ROC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

7.3 Relating z-Transform to Laurent Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

7.4 z-Transform of Simple Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

7.4.1 z-Transform of Impulse Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

7.4.2 z-Transform of Delayed Impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.4.3 z-Transform of Unit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.4.4 z-Transform of Delayed Unit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.4.5 z-Transform of Length-L Pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7.4.6 z-Transform of Decaying Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 161


CONTENTS ix

7.4.7 z-Transform of Decaying Complex Exponential Signal . . . . . . . . . . . . . . . . . . . . . 161

7.4.8 z-Transform of Complex Exponential Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 162

7.5 Properties of the z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

7.5.1 Linearity Property of the z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

7.5.2 Time Shift Property of the z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

7.5.3 Initial Value Theorem of z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

7.6 Convolution and the z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

7.7 FIR System Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

7.8 IIR System Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

7.9 Poles and Zeros of the System Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

7.10 Relation Between the z-Transform, DTFT and DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

7.11 Inverse z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

7.11.1 Inverse z-Transform by Power Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

7.11.2 Case N = 0: Inverse z-Transform by Inspection . . . . . . . . . . . . . . . . . . . . . . . . . 175

7.11.3 Case M < N: Inverse z-Transform Using Polynomial Division . . . . . . . . . . . . . . . . . 176

7.11.4 Case M < N: Inverse z-Transform Using Partial Fraction Expansion . . . . . . . . . . . . . . 178

7.11.5 Case M = N: Inverse z-Transform Using Polynomial Division . . . . . . . . . . . . . . . . . 186

7.11.6 Case M = N: Inverse z-Transform Using Partial Fraction Expansion of H(z)/z . . . . . . . . . 189

7.11.7 Case M > N: Inverse z-Transform Using Polynomial Division . . . . . . . . . . . . . . . . . 192

7.11.8 General Expression for Inverse z-Transform Using Complex Analysis . . . . . . . . . . . . . 193

7.12 Relation Between the z-Transform and the Laplace Transform . . . . . . . . . . . . . . . . . . . . . 195

7.13 Finding z-Transform Using MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

7.13.1 Plotting the Locations of Poles and Zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

7.14 Transient & Steady State Response of an FIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

7.15 Transient, Steady State Response and Stability of an IIR Filter . . . . . . . . . . . . . . . . . . . . . 199

7.15.1 IIR Filter Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

7.15.2 IIR Transient Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200


x CONTENTS

7.15.3 IIR Steady State Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

7.16 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8 Digital Filters 207

8.1 Bode Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

8.1.1 Bode Diagrams Using MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

8.2 Filter Design Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.2.1 The Passband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.2.2 The Stopband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.2.3 The Transition Band . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.3 Phase Delay of a System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.4 Group Delay of a System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.5 Linear Phase Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

8.6 Allpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

8.6.1 Allpass Filter Realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

8.7 Moving Average Filter (Resonator Filter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.8 Resonator Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.9 Notch Filter (Two-Zero Filter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.10 Single-Pole Recursive Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

8.11 First-Order Differentiator Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.12 Practical Implementation of the Ideal Lowpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.13 Practical Implementation of the Ideal Highpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 229

8.14 Practical Implementation of the Ideal Bandpass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 233

8.15 Practical Implementation of the Ideal Bandstop Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.16 Gibbs Phenomenon In the Frequency Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.17 Brief Introduction to Digital Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

8.17.1 Design of Finite Impulse Response (FIR) Filter . . . . . . . . . . . . . . . . . . . . . . . . . 244


CONTENTS xi

8.17.2 Design of Infinite Impulse Response (IIR) Filter . . . . . . . . . . . . . . . . . . . . . . . . 244

8.17.3 Comparison Between FIR and IIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

8.18 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

9 The Fast Fourier Transform (FFT) Algorithm 251

9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

9.2 Decimation-in-Time (DIT) FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

9.2.1 Bit Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

9.3 Decimation-in-Frequency (DIF) FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

9.4 Complexity of FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

9.5 MATLAB Implementation of the FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

9.6 Fourier Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

9.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

10 Discrete-Time Systems Analysis 273

10.1 Block Diagram and Signal Flow Graph Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . 273

10.1.1 FIR Filter Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

10.1.2 IIR Filter Signal Flow Graph Representation . . . . . . . . . . . . . . . . . . . . . . . . . . 278

10.2 Analysis of Discrete-Time Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

10.3 Cascading LTI Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

10.4 Using MATLAB for Discrete-Time System Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 290

10.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

A Laurent Series 297

A.1 Brief Review of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

A.1.1 Arithmetic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298

A.1.2 De Moivre’s Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299

A.1.3 Roots of a Complex Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300


xii CONTENTS

A.2 Complex Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

A.3 Complex Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

A.3.1 Continuous Complex Function: The Limit of a Complex Function . . . . . . . . . . . . . . . 303

A.3.2 Differentiable Complex Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303

A.3.3 Analytic Complex Function: Cauchy-Riemann Equations . . . . . . . . . . . . . . . . . . . . 303

A.4 Complex Integration: Line Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

A.4.1 Complex Line Integral: Special Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

A.5 Cauchy Integral Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

A.6 Cauchy Integral Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

A.7 Derivatives of Analytic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

A.8 Geometric Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

A.9 Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

A.10 Maclaurin Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

A.11 Laurent Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

A.11.1 Important Observation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

A.12 Isolated Singular Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

A.13 Residues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310


List of Abbreviations

1-D One-dimension

2-D Two-dimension

3-D Three-dimension

ADC Analog-to-Digital Converter

AM Amplitude Modulation

BPF Bandpass Filter

BSF Bandstop Filter

DAC Ditital-to-Analog Converter

DFT Discrete Fourier Transform

DIF Decimation-in-Frequency

DIT Decimation-in-Time

DSP Digital Signal Processing

DTFT Discrete-Time Fourier Transform

FD Fourier Descriptors

FFT Fast Fourier Transform

FIR Finite-Impulse Response

GCD Greatest Common Divisor

HPF Highpass Filter

IIR Infinte Impulse Response

LCM Least Common Multiple

LFM Linear Frequency-Modulated chirp

LPF Lowpass Filter

LTI Linear Time-Invariant

MA Moving Average

MAC Multiplier Accumulator

SFG Signal Flow Graph

xiii
xiv LIST OF ABBREVIATIONS

SNR Signal-to-Noise Ratio


Useful MATLAB Functions

abs Find magnitude of a complex number

acos Inverse cosine

angle Find angle of a complex number

asin Inverse sine

atan Inverse tan

bode Plot frequency response of a system’s magnitude (in dB) and phase (degrees)

cos Cosine of an angle that is specified in radians

fft Perform DFT

imag Find the imaginary part of a complex number

log Natural logarithm ln

log2 Base 2 logarithm lg

log10 Base 10 logarithm log

ones Define an all ones vector

plot Plot a line through several points

poly Return a polynomial whose roots are specified as a vector

rand Generate random numbers following the uniform distribution

randn Generate random numbers following the Gaussian distribution

real Find the real part of a complex number

residuez Find the residues and roots of two polynomials B(z)/A(z)

roots Find roots of a polynomial p(z)

sqrt Square root

stem Draw a stem plot of several points

sin Sine of an angle that is specified in radians

tan tan of an angle when specified in radians

zeros Define an all zeros vector

zplane Plot a filter’s zeros and poles

xv
xvi USEFUL MATLAB FUNCTIONS

ztrans Obtain the z-tranform of a function

View publication stats

You might also like