A PPLIED S IGNAL P ROCESSING S ADASIVAN P UTHUSSERYPADY Published, sold and distributed by: now Publishers Inc. PO Box 1024 Hanover, MA 02339 United States Tel. +1-781-985-4510 www.nowpublishers.com sales@nowpublishers.com Outside North America: now Publishers Inc. PO Box 179 2600 AD Delft The Netherlands Tel. +31-6-51115274 ISBN: 978-1-68083-978-4 E-ISBN: 978-1-68083-979-1 DOI: 10.1561/9781680839791 Copyright © 2021 Sadasivan Puthusserypady Suggested citation: Sadasivan Puthusserypady. (2021). Applied Signal Processing . Boston–Delft: Now Publishers The work will be available online open access and governed by the Creative Commons “Attribution-Non Commercial” License (CC BY-NC), according to https://creativecommons.org/ licenses/by-nc/4.0/ Table of Contents Preface xv Acknowledgements xvii Notations, Symbols xix Glossary xxv Chapter 1 Introduction 1 1.1 What is a Signal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Classification of Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 Analog or Digital Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 Periodic and Aperiodic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.3 Deterministic and Random Signals . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2.4 Real and Complex Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Typical Real World Biomedical Signals . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3.1 Electroencephalogram (EEG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3.2 Electrocardiogram (ECG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.3.3 Electrooculogram (EOG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.3.4 Electroretinogram (ERG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3.5 Electromyogram (EMG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Chapter 2 Power and Energy 17 2.1 Power and Energy of Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 Energy Signals and Power Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.1 Single Real Sinusoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.2 Single Complex Sinusoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 iii iv Table of Contents 2.2.3 Sum of Complex Sinusoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.2.4 Sum of Real Sinusoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.3 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Chapter 3 Fourier Series 27 3.1 Introduction to Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2 Why Fourier Series? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.3 Fourier Series: Definition and Interpretation . . . . . . . . . . . . . . . . . . . 31 3.4 Properties of Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.4.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.4.2 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.4.3 Frequency Shifting or Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.4.4 Time Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.4.5 Even-Symmetric Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.4.6 Odd-Symmetric Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.4.7 Real Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.5 Real Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.6 Examples of Fourier Series Evaluation. . . . . . . . . . . . . . . . . . . . . . . . . 40 3.7 Limitations of Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.7.1 Gibbs Phenomenon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.7.2 Dirichlet Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.8 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Chapter 4 Fourier Transform 51 4.1 Introduction to Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.2 Fourier Transform: Development and Interpretation . . . . . . . . . . . . 53 4.3 Properties of Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.3.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.3.2 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.3.3 Frequency Shifting or Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.3.4 Time Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.3.5 Time Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.3.6 Time Scaling and Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.3.7 Time Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.3.8 Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.3.9 Symmetric Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.4 Fourier Transform of Periodic Signals . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.4.1 Difficulty with Sinusoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.4.2 Impulse Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.4.3 Properties of Impulse Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Table of Contents v 4.4.4 Fourier Transform of Sinusoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4.4.5 Fourier Transform of Periodic Signals . . . . . . . . . . . . . . . . . . . . . . . 71 4.5 Dirichlet Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.6 Fourier Transform Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.7 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Chapter 5 Complex Signals 83 5.1 Introduction to Complex Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.1.1 Some Useful Rules and Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.1.2 Phasors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.2 Spectrum of Complex Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 5.2.1 Properties of the Fourier Transform of Complex Signals . . . . . . . 88 5.3 Linear Processing of Complex Signals . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.4 Hilbert Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 5.4.1 Hilbert Transform as a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.4.2 Properties of Hilbert Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.5 Analytic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5.5.1 Analytic Analog Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5.5.2 Analytic Discrete-time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.6 Instantaneous Amplitude and Frequency . . . . . . . . . . . . . . . . . . . . . . 97 5.7 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Chapter 6 Analog Systems 103 6.1 Classification of Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.1.1 Continuous-Time or Discrete-Time Systems . . . . . . . . . . . . . . . . . 104 6.1.2 Time-Invariant Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.1.3 Causal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.1.4 Linear or Non-linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.2 Description of a System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.2.1 Input-Output Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.2.2 Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.2.3 Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.3 Why Study of Systems is Important? . . . . . . . . . . . . . . . . . . . . . . . . . . 106 6.3.1 System Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 6.3.2 Output Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.3.3 Input Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.4 Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.5 Sinusoidal Input to Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 6.5.1 Generalization to Multiple Sinusoids . . . . . . . . . . . . . . . . . . . . . . . 111 6.6 Partial Fraction Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 vi Table of Contents 6.7 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 6.7.1 Convolution Explained . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 6.8 Shifting Property of Impulse Function . . . . . . . . . . . . . . . . . . . . . . . . 116 6.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Chapter 7 Sampling and Digital Signals 123 7.1 Sampling of Analog Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 7.2 Signal Reconstruction from Samples . . . . . . . . . . . . . . . . . . . . . . . . . . 127 7.2.1 Perfect Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 7.2.2 Spectral Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 7.2.3 Anti-Aliasing Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7.2.4 Choice of Sampling Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 7.3 Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 7.3.1 Quantization of Continuous-Amplitude Signals . . . . . . . . . . . . . . 131 7.3.2 Analysis of Quantization Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 7.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Chapter 8 z -Transform of Discrete Time Signals 141 8.1 z -Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 8.2 Discrete-time Signal Types and z -Transforms . . . . . . . . . . . . . . . . . . 144 8.2.1 Right-Sided Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 8.2.2 Left-Sided Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 8.2.3 Two-Sided Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 8.2.4 Finite Duration Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 8.3 Properties of ROC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 8.4 Relationship to Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 8.4.1 Common z -Transforms and Properties of z -Transform . . . . . . . . 147 8.5 Inverse z -Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 8.5.1 Inverse z -Transform by Contour Integration . . . . . . . . . . . . . . . . . 149 8.5.2 Inverse z -Transform by Partial Fraction Expansion . . . . . . . . . . . . 150 8.5.3 Inverse z -Transform by Power Series Expansion . . . . . . . . . . . . . . 151 8.6 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Chapter 9 Fourier Spectra of Discrete-Time Signals 155 9.1 Spectra of Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 9.1.1 Discrete-Time Fourier Transform (DTFT) . . . . . . . . . . . . . . . . . . 156 9.1.2 Inverse DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 9.2 Normalized Frequency Representation . . . . . . . . . . . . . . . . . . . . . . . . 157 9.3 Effect of Sampling Frequencies on the Spectrum . . . . . . . . . . . . . . . 158 9.4 Frequency-Domain and Time-Domain Signal Properties . . . . . . . . 159 9.5 Analysis of Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 9.5.1 Common Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Table of Contents vii 9.5.2 Elementary Manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 9.5.3 Laplace Transform and z -Transform . . . . . . . . . . . . . . . . . . . . . . . . 162 9.5.4 z -Transform and DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 9.5.4.1 Region of Convergence (ROC) of ZT . . . . . . . . . . . . . . 164 9.5.4.2 Properties of ZT and DTFT . . . . . . . . . . . . . . . . . . . . . . 164 9.6 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Chapter 10 Digital Systems 173 10.1 Input-Output Description of Systems . . . . . . . . . . . . . . . . . . . . . . . . 176 10.2 Block Diagram Representation of Discrete-Time Systems . . . . . . . . 177 10.3 Classification of Digital Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 10.3.1 Static and Dynamic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 10.3.2 Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 10.3.3 Time-Invariant Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 10.3.4 Causal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 10.3.5 Stable Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 10.3.6 Physically Realizable Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 10.3.7 Linear Time-Invariant (LTI) Systems . . . . . . . . . . . . . . . . . . . . . . . 180 10.4 Outputs of LTI Systems (Convolution) . . . . . . . . . . . . . . . . . . . . . . . 181 10.5 Interconnection of Digital Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 10.6 Properties of Convolution and Interconnection of LTI Systems . . . 185 10.6.1 Identity and Shifting Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 10.6.2 Associative Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 10.6.3 Distributive Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 10.7 Characterizing Digital Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 10.7.1 Difference Equations and Block Diagram . . . . . . . . . . . . . . . . . . . 187 10.7.2 Recursive and Non-recursive Digital Systems . . . . . . . . . . . . . . . . 188 10.7.3 Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 10.7.4 Poles and Zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 10.7.5 Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 10.7.6 Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 10.7.7 Systems with Finite-Duration and Infinite-Duration Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 10.8 Determination of System Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 10.8.1 Transfer Function Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 10.8.2 Convolution Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 10.8.3 Difference Between Linear and Circular Convolutions . . . . . . . . 195 10.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Chapter 11 Implementation of Digital Systems 211 11.1 Structures for the Realization of Discrete-Time Systems . . . . . . . . . 211 viii Table of Contents 11.2 Structures for FIR Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 11.2.1 Direct-Form Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 11.2.2 Cascade-Form Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 11.2.3 Frequency-Sampling Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 11.2.4 Lattice Structure for FIR Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 218 11.3 Structure for IIR Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 11.3.1 Direct-Form Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 11.3.2 Cascade-Form Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 11.3.3 Parallel-Form Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 11.3.4 Lattice Structure for IIR Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 11.4 Signal Flow Graphs and Transposed Structures . . . . . . . . . . . . . . . . . 234 11.4.1 Transposed Structure of IIR Systems . . . . . . . . . . . . . . . . . . . . . . . . 235 11.4.2 Transposed Structure of FIR Systems . . . . . . . . . . . . . . . . . . . . . . . 237 11.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Chapter 12 Discrete Fourier Transform 251 12.1 Practical Aspects of Spectrum Computation . . . . . . . . . . . . . . . . . . . 252 12.1.1 Spectra of Windowed Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 12.1.2 Sampling in Frequency-Domain: Derivation of DFT . . . . . . . . . 253 12.2 Discrete Fourier Series (DFS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 12.2.1 Derivation of DFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 12.2.2 Periodicity and Circular Shift of DFT . . . . . . . . . . . . . . . . . . . . . . . 258 12.3 Properties of DFT and DFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 12.3.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 12.3.2 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 12.3.3 Time Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 12.3.4 Frequency Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 12.3.5 Circular Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 12.3.6 Real Symmetric Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 12.4 DFT of Sinusoidal Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 12.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Chapter 13 Fast Fourier Transform 269 13.1 Fast Fourier Transform (FFT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 13.1.1 Direct Computation of DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 13.1.2 Divide-and-Conquer Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 13.2 Radix-2 FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 13.2.1 Applications of FFT Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 13.3 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Chapter 14 Design of Digital Filters 283 14.1 Characteristics of Practical Frequency-Selective Filters . . . . . . . . . . . 284 Table of Contents ix 14.2 Design of FIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 14.2.1 Symmetric and Anti-symmetric FIR Filters . . . . . . . . . . . . . . . . . . 286 14.2.2 Design of Linear-Phase FIR Digital Filters Using Windowing . . 289 14.2.3 Design of Linear-Phase FIR Filters by the Frequency Sampling Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 14.2.4 Design of Optimum Equiripple Linear-Phase FIR Filters . . . . . . 299 14.3 Design of IIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 14.3.1 Design of IIR Filters From Analog Filters . . . . . . . . . . . . . . . . . . . . 309 14.3.2 IIR Filter Design by Approximation of Derivatives . . . . . . . . . . . 311 14.3.3 IIR Filter Design by Impulse Invariance . . . . . . . . . . . . . . . . . . . . . 314 14.3.3.1 Design Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 14.3.4 IIR Filter Design by the Bilinear Transformation . . . . . . . . . . . . . 319 14.3.4.1 Characteristics of the bilinear transformation . . . . . . . . 320 14.3.4.2 Consequences of Frequency Warping . . . . . . . . . . . . . . . 321 14.3.4.3 Design Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 14.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 Chapter 15 Random Signals 327 15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 15.2 Stochastic Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 15.2.1 Continuous Stochastic Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 15.2.2 Discrete-Time Processes (Continuous Random Sequences) . . . . 331 15.2.3 Discrete Stochastic Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 15.2.4 Discrete Random Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 15.3 Deterministic Function vs Stochastic Process . . . . . . . . . . . . . . . . . . 334 15.4 Probability, Cumulative Distribution Function and Probability Density Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 15.5 Description of Random Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 15.6 Stationary Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 15.6.1 First-Order Stationary Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 15.6.2 Second-Order Stationary Processes . . . . . . . . . . . . . . . . . . . . . . . . . 338 15.6.3 N th -Order Stationary Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 15.6.4 Wide-Sense Stationary (WSS) Processes . . . . . . . . . . . . . . . . . . . . . 339 15.6.5 Jointly WSS Random Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 15.6.6 Properties of γ x x (τ ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 15.6.7 Properties of γ x y (τ ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 15.6.8 Independent, Uncorrelated, and Orthogonal Processes . . . . . . . . 344 15.6.9 Covariance Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 15.7 Physical Interpretation of Process Parameters . . . . . . . . . . . . . . . . . . 345 15.8 Gaussian Random Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 15.8.1 Properties of Gaussian Random Processes . . . . . . . . . . . . . . . . . . . 347 x Table of Contents 15.9 Complex Stochastic Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 15.10 Ergodic Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 15.10.1 Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 15.10.2 Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 15.10.3 Variance and Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 15.11 Power Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 15.12 Linear Filtering of Random Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 15.13 White Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 15.14 Properties of ACF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 15.15 Properties of CCF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 15.16 Properties of Power Spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 15.17 Properties of Cross-Power Spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 15.18 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Chapter 16 Modulation 373 16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 16.1.1 Base-Band and Pass-Band Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . 374 16.1.2 Why Modulation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 16.1.3 Choice of Modulation Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 16.2 Amplitude Modulation (AM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 16.2.1 Conventional AM (Conv-AM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 16.2.1.1 Demodulation by Envelope Detection . . . . . . . . . . . . . . 377 16.2.1.2 Spectra of Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 16.2.1.3 Summary of Conv-AM . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 16.2.2 AM with Suppressed Carrier (AM-SC) . . . . . . . . . . . . . . . . . . . . . . 380 16.2.2.1 Coherent Demodulation . . . . . . . . . . . . . . . . . . . . . . . . . . 381 16.2.2.2 Compromise Approaches . . . . . . . . . . . . . . . . . . . . . . . . . 381 16.2.2.3 Summary of AM-SC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 16.2.3 Single Side-Band AM (SSB-AM) . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 16.2.3.1 Summary of SSB-AM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 16.2.4 Quadrature AM (QAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 16.2.4.1 QAM Demodulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 16.2.4.2 Complex Representation of QAM . . . . . . . . . . . . . . . . . 384 16.2.4.3 How about the Demodulation . . . . . . . . . . . . . . . . . . . . . 385 16.2.4.4 Summary of QAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 16.3 Frequency Modulation (FM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 16.3.1 Bandwidth in FM Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 16.3.2 Narrow-Band and Wide-Band FM . . . . . . . . . . . . . . . . . . . . . . . . . 387 16.4 Detection (demodulation) by Matched Filter . . . . . . . . . . . . . . . . . . 388 16.5 Detection of Binary Signals in Noise . . . . . . . . . . . . . . . . . . . . . . . . . . 390 Table of Contents xi 16.6 Digital Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 16.6.1 Amplitude Shift Keying (ASK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 16.6.2 Frequency Shift Keying (FSK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 16.6.3 Phase Shift Keying (PSK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 16.7 2-Bit Quadrature Amplitude Modulation (QAM) . . . . . . . . . . . . . . 402 16.8 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Chapter 17 Power Spectrum Estimation 407 17.1 Estimation of Spectra from Finite Data . . . . . . . . . . . . . . . . . . . . . . . 408 17.1.1 Computation of the ESD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 17.2 Estimation of the Autocorrelation and Power Spectrum of Random Signals: The Periodogram . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 17.2.1 Summary of the Periodogram based PSD Estimation . . . . . . . . . 418 17.2.2 Use of DFT in Power Spectrum Estimation . . . . . . . . . . . . . . . . . . 418 17.3 Non-parametric Methods for Power Spectrum Estimation . . . . . . . 421 17.3.1 The Bartlett Method: Averaging the Periodograms . . . . . . . . . . . . 421 17.3.2 The Welch Method: Averaging Modified Periodogram . . . . . . . . 423 17.3.3 The Blackman and Tukey Method: Smoothing the Periodogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 17.3.4 Performance Characteristics of Non-parametric Power Spectrum Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 17.4 Parametric Methods for Power Spectrum Estimation . . . . . . . . . . . . 429 17.4.1 Relationships Between the Autocorrelation and the Model Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 17.4.2 AR Method of Power Spectrum Estimation . . . . . . . . . . . . . . . . . . 433 17.4.2.1 Yule-Walker Method of AR Power Spectrum Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 17.4.2.2 The Burg Method of AR Power Spectrum Estimation 433 17.4.2.3 Selection of AR Model Order ( p ) . . . . . . . . . . . . . . . . . . 435 17.4.3 MA Model for Power Spectrum Estimation . . . . . . . . . . . . . . . . . . 436 17.4.4 ARMA Model for Power Spectrum Estimation . . . . . . . . . . . . . . . 437 17.5 Discrete-Time White Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 17.6 DFT for Spectrum Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 17.7 Windows and Spectrum Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . 441 17.7.1 Periodicity Assumption of DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 17.7.2 Spectral Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 17.7.3 Spectral Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 17.7.4 Windowing for Steady Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 17.8 Time and Frequency Resolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 17.9 Spectral Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 17.10 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 xii Table of Contents Appendix A: Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 A.1 Hilbert Transform Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 Appendix B: Formula Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 B.1 Trigonometric Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 B.1.1 Right-angle Triangle Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 B.1.2 Unit Circle Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 B.1.3 Domains of the Trigonometric Functions . . . . . . . . . . . . . . . . . . . 460 B.1.4 Ranges of the Trigonometric Functions . . . . . . . . . . . . . . . . . . . . . 460 B.2 Identities and Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 B.2.1 Tangent and Cotangent Identities . . . . . . . . . . . . . . . . . . . . . . . . . . 460 B.2.2 Reciprocal Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 B.2.3 Pythagorean Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 B.2.4 Even and Odd Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 B.2.5 Periodic Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 B.2.6 Double Angle Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 B.2.7 Degrees to Radians Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 B.2.8 Half-Angle Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 B.2.9 Sum and Difference Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 B.2.10 Product to Sum Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 B.2.11 Sum to Product Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 B.2.12 Co-function Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 B.3 Unit Circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 B.4 Inverse Trigonometric Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 B.4.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 B.4.2 Domain and Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 B.4.3 Inverse Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 B.4.4 Other Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 B.5 Laws of Sines, Cosines, and Tangents . . . . . . . . . . . . . . . . . . . . . . . . . 465 B.6 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 B.7 Sin, Cosine, and Tangent Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 465 B.8 Signal-to-noise Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 B.9 z -Transform Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 B.10 Common z -Transform Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 B.11 Fourier Transform Theorems and Properties . . . . . . . . . . . . . . . . . . . 469 B.12 Continuous Time Fourier Series: Properties . . . . . . . . . . . . . . . . . . . 470 B.13 Discrete Time Fourier Series: Properties . . . . . . . . . . . . . . . . . . . . . . . 471 B.14 Uniform Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 B.15 Normal (Gaussian) Random Variables . . . . . . . . . . . . . . . . . . . . . . . . 473 B.16 Central Limit Theorem (CLT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 Dedication I dedicate this book to my mother, Thanka Kumaran and (late) father, Kumaran Puthusserypady. I hope that my achievements have made you proud. xiii Preface “Applied Signal Processing” is a textbook mainly for students, who are studying in the Medicine and Technology, Electrical Engineering, Electronics Engineering, Computer Engineering and Biomedical Engineering Disciplines. The main objec- tive of this book is to provide the students with a solid basis for the analysis and pro- cessing of analog and digital signals emanating from either deterministic or stochas- tic systems. This book is the outcome of more than two decades of my experience in teaching signal processing. For more than ten years, I have been teaching ‘Applied Signal Processing’ course to Medicine and Technology students at the Technical University of Denmark (Department of Health Technology). It introduces the basic concepts, definitions, analysis and implementation of signal processing techniques as well as signal processing systems. Since the digital signal processing techniques have evolved from its analog counterpart, the book begins by explaining the con- cepts in analog signal processing first and then moves towards digital signal pro- cessing. This will help the students to gain a general overview of the whole subject and establish links between the various concepts. In addition, understanding the classical analog signal processing techniques would certainly make it easy for the students to understand the digital signal processing counterpart. The book uses a number of good illustrations to explain the fundamental concepts in both analog and digital signal processing along with examples and numerous exercise problems. The book is divided into seventeen chapters that covers the fundamentals of most signal processing concepts. In the introduction chapter, some basic signals as well as descriptions of some of the most commonly referred types of biomedical signals, such as the electroencephalogram (EEG), electrocardiogram (ECG), electromyo- gram (EMG), etc., are provided. In Chapter 2, the fundamental concepts of power xv xvi Preface and energy as well as their evaluations for different types (periodic/aperiodic) of sig- nals is provided. Fourier series representation of periodic signals as well as its impor- tant properties are provided in Chapter 3. In Chapter 4, the Fourier representation of aperiodic analog signals, that is, the Fourier transform is explained. The deriva- tion of Fourier transform and its important properties are also explained here. As complex signals are the building blocks for the synthesis of different types of signals, the fundamentals of complex signals is dealt with in Chapter 5. This chapter also introduces the concept of Hilbert transform and analytic signals. The fundamentals of analog systems, especially that of linear time invariant (LTI) systems is provided in Chapter 6. The process of generating digital signals from analog signals by sam- pling and quantization techniques are introduced in the next Chapter. In Chapter 8, the fundamentals of the z -transform are introduced for the analysis of discrete- time signals. Discrete-time Fourier transform (DTFT) as well as its relationships to Laplace transform and z -transform are explained in Chapter 9. The fundamentals of digital systems are described in detail in Chapter 10. Some of the most impor- tant implementation schemes for the digital systems (both finite impulse response (FIR) systems as