Springer Topics in Signal Processing Orhan Gazi Understanding Digital Signal Processing Springer Topics in Signal Processing Volume 13 Series editors Jacob Benesty, Montreal, Canada Walter Kellermann, Erlangen, Germany More information about this series at http://www.springer.com/series/8109 Orhan Gazi Understanding Digital Signal Processing 123 Orhan Gazi ElectronicsandCommunicationEngineering Department Çankaya University Etimesgut/Ankara Turkey ISSN 1866-2609 ISSN 1866-2617 (electronic) SpringerTopics inSignal Processing ISBN978-981-10-4961-3 ISBN978-981-10-4962-0 (eBook) DOI 10.1007/978-981-10-4962-0 LibraryofCongressControlNumber:2017940604 ©SpringerNatureSingaporePteLtd.2018 Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpart of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission orinformationstorageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilar methodologynowknownorhereafterdeveloped. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publicationdoesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfrom therelevantprotectivelawsandregulationsandthereforefreeforgeneraluse. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authorsortheeditorsgiveawarranty,expressorimplied,withrespecttothematerialcontainedhereinor for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictionalclaimsinpublishedmapsandinstitutionalaffiliations. Printedonacid-freepaper ThisSpringerimprintispublishedbySpringerNature TheregisteredcompanyisSpringerNatureSingaporePteLtd. Theregisteredcompanyaddressis:152BeachRoad,#21-01/04GatewayEast,Singapore189721,Singapore Preface In this book, we tried to explain digital signal processing topics in detail. We paid attentiontothesimplicityoftheexplanationlanguage.Andweprovidedexamples with increasing difficulty. The reader of this book should have some background about signals. If it is possible, the reader should learn fundamental concepts on signals and systems since, in this book, more attention is paid on digital signal processing concepts rather than continuous time signal processing topics. Hence, weassumethatthereaderhasfundamentalknowledgeaboutalltypesofsignalsand transforms. All the topics in this book are presented in an orderly manner. We tried to simplifythelanguageofthisbookaspossibleaswecan.Wealsoprovidedoriginal examples explaining the aim of the subjects studied in this book. Numerical examples are provided for the comprehension of the subjects. Unnecessary abun- dance of mathematical details is omitted for the simplicity of the presentation language. In addition, to indicate both continuous and digital time frequencies, we preferredtousethesameparameter.Wethoughtthatusingtwodifferentparameters mixes the students’ mind and it is not necessarily needed. This book includes four different chapters. And in these chapters, sampling of continuoustimesignals,multiratesignalprocessing,discreteFouriertransform,and filter design concepts are covered. In sampling of continuous time signals and multirate signal processing chapters, we provided some original practical tech- niques to draw the spectrum of aliased signals. In discrete time Fourier transform chapter, well-designed numerical examples are provided to illustrate the operation of the fast Fourier transform algorithm. In filter design chapter, both analog and digitalfilterdesigntechniquesareexplainedindetail.Fortheanalogfilters,wealso provided analog filter circuit design methods for the designed analog filter transfer function. Maltepe/Ankara, Turkey Orhan Gazi November 2016 v Contents 1 Sampling of Continuous Time Signals.... .... .... .... ..... .... 1 1.1 Sampling Operation for Continuous Time Signals .... ..... .... 2 1.1.1 Sampling Frequency . .... .... .... .... .... ..... .... 4 1.1.2 Mathematical Characterization of the Sampling Operation .... ..... .... .... .... .... .... ..... .... 5 1.2 Sampling Operation .. ..... .... .... .... .... .... ..... .... 6 1.2.1 The Fourier Transform of the Product Signal .. ..... .... 7 1.3 How to Draw Fourier Transforms of Product Signal and Digital Signal.... ..... .... .... .... .... .... ..... .... 11 1.3.1 Drawing the Fourier Transform of Digital Signal .... .... 25 1.4 Aliasing (Spectral Overlapping) .. .... .... .... .... ..... .... 30 1.4.1 The Meaning of the Aliasing (Overlapping) ... ..... .... 33 1.4.2 Drawing the Frequency Response of Digital Signal in Case of Aliasing (Practical Method)... .... ..... .... 39 1.5 Reconstruction of an Analog Signal from Its Samples . ..... .... 45 1.5.1 Approximation of the Reconstruction Filter ... ..... .... 51 1.6 Discrete Time Processing of Continuous Time Signals. ..... .... 55 1.7 Continuous Time Processing of Digital Signals .. .... ..... .... 61 1.8 Problems... .... .... ..... .... .... .... .... .... ..... .... 68 2 Multirate Signal Processing .... .... .... .... .... .... ..... .... 71 2.1 Sampling Rate Reduction by an Integer Factor (Downsampling, Compression) ... .... ..... .... .... .... .... .... ..... .... 72 2.1.1 Fourier Transform of the Downsampled Signal. ..... .... 75 2.1.2 How to Draw the Frequency Response of Downsampled Signal ... .... ..... .... .... .... .... .... ..... .... 78 2.1.3 Aliasing in Downsampling .... .... .... .... ..... .... 80 2.1.4 Interpretation of the Downsampling in Terms of the Sampling Period... .... .... .... .... ..... .... 83 vii viii Contents 2.1.5 Drawing the Fourier Transform of Downsampled Signal in Case of Aliasing (Practical Method)... .... ..... .... 92 2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor. .... .... .... ..... .... .... .... .... .... ..... .... 97 2.2.1 Upsampling (Expansion).. .... .... .... .... ..... .... 97 2.2.2 Mathematical Formulization of Upsampling ... ..... .... 98 2.2.3 Frequency Domain Analysis of Upsampling... ..... .... 99 2.2.4 Interpolation .. ..... .... .... .... .... .... ..... .... 103 2.2.5 Mathematical Analysis of Interpolation... .... ..... .... 107 2.2.6 Approximation of the Ideal Interpolation Filter. ..... .... 111 2.2.7 Anti-aliasing Filter .. .... .... .... .... .... ..... .... 126 2.3 Practical Implementations of C/D and D/C Converters. ..... .... 128 2.3.1 C/D Conversion .... .... .... .... .... .... ..... .... 129 2.3.2 Sample and Hold ... .... .... .... .... .... ..... .... 130 2.3.3 Quantization and Coding.. .... .... .... .... ..... .... 134 2.3.4 D/C Converter. ..... .... .... .... .... .... ..... .... 136 2.4 Problems... .... .... ..... .... .... .... .... .... ..... .... 139 3 Discrete Fourier Transform .... .... .... .... .... .... ..... .... 145 3.1 Manipulation of Digital Signals .. .... .... .... .... ..... .... 146 3.1.1 Manipulation of Periodic Digital Signals.. .... ..... .... 149 3.1.2 Shifting of Periodic Digital Signals.. .... .... ..... .... 149 3.1.3 Some Well Known Digital Signals.. .... .... ..... .... 156 3.2 Review of Signal Types.... .... .... .... .... .... ..... .... 158 3.3 Convolution of Periodic Digital Signals.... .... .... ..... .... 165 3.3.1 Alternative Method to Compute the Periodic Convolution .. ..... .... .... .... .... .... ..... .... 166 3.4 Sampling of Fourier Transform .. .... .... .... .... ..... .... 170 3.5 Discrete Fourier Transform.. .... .... .... .... .... ..... .... 172 3.5.1 Aliasing in Time Domain . .... .... .... .... ..... .... 182 3.5.2 Matrix Representation of DFT and Inverse DFT..... .... 184 3.5.3 Properties of the Discrete Fourier Transform... ..... .... 185 3.5.4 Circular Convolution. .... .... .... .... .... ..... .... 188 3.6 Practical Calculation of the Linear Convolution.. .... ..... .... 198 3.6.1 Evaluation of Convolution Using Overlap-Add Method ... 199 3.6.2 Overlap-Save Method.... .... .... .... .... ..... .... 204 3.7 Computation of the Discrete Fourier Transform.. .... ..... .... 207 3.7.1 Fast Fourier Transform (FFT) Algorithms. .... ..... .... 207 3.7.2 Decimation in Time FFT Algorithm. .... .... ..... .... 207 3.7.3 Decimation in Frequency FFT Algorithm. .... ..... .... 217 3.8 Total Computation Amount of the FFT Algorithm.... ..... .... 225 3.9 Problems... .... .... ..... .... .... .... .... .... ..... .... 230 Contents ix 4 Analog and Digital Filter Design .... .... .... .... .... ..... .... 233 4.1 Review of Systems... ..... .... .... .... .... .... ..... .... 233 4.1.1 Z-Transform .. ..... .... .... .... .... .... ..... .... 236 4.1.2 Laplace Transform .. .... .... .... .... .... ..... .... 239 4.2 Transformation Between Continuous and Discrete Time Systems... .... ..... .... .... .... .... .... ..... .... 240 4.2.1 Conversion of Transfer Functions of LTI Systems ... .... 245 4.2.2 Forward Difference Transformation Method ... ..... .... 246 4.2.3 Bilinear Transformation... .... .... .... .... ..... .... 248 4.3 Analogue Filter Design..... .... .... .... .... .... ..... .... 253 4.3.1 Ideal Filters... ..... .... .... .... .... .... ..... .... 254 4.3.2 Practical Analog Filter Design . .... .... .... ..... .... 258 4.3.3 Practical Filter Design Methods .... .... .... ..... .... 260 4.3.4 Analog Frequency Transformations.. .... .... ..... .... 272 4.4 Implementation of Analog Filters. .... .... .... .... ..... .... 273 4.4.1 Low Pass Filter Circuits .. .... .... .... .... ..... .... 273 4.4.2 Analog High-Pass Filter Circuit Design .. .... ..... .... 279 4.4.3 Analog Bandpass Active Filter Circuits .. .... ..... .... 282 4.4.4 Analog Bandstop Active Filter Circuits... .... ..... .... 282 4.5 Infinite Impulse Response (IIR) Digital Filter Design (Low Pass). .... .... ..... .... .... .... .... .... ..... .... 283 4.5.1 Generalized Linear Phase Systems .. .... .... ..... .... 289 4.6 Finite Impulse Response (FIR) Digital Filter Design .. ..... .... 290 4.6.1 FIR Filter Design Techniques.. .... .... .... ..... .... 291 4.7 Problems... .... .... ..... .... .... .... .... .... ..... .... 297 Bibliography .. .... .... .... ..... .... .... .... .... .... ..... .... 299 Index .... .... .... .... .... ..... .... .... .... .... .... ..... .... 301 Chapter 1 Sampling of Continuous Time Signals Signal is a physical phenomenon that carries information. This physical phe- nomenon is described by mathematical functions, and usually the signal and its mathematical function are used for one another, i.e., synonymous. For instance, when we talk about a sinusoidal signal, we use the sinusoidal function, a mathe- matical function,tocharacterizethesignal,andthenamesinusoidalisusedforthe signal.Signalsareusuallydepictedingraphstoobservetheirbehaviorandanalyze them. Sinusoidal signals are the main signals and all the other signals can be considered as being made up of sinusoidal signals with different frequencies and amplitudes. That is to say, any continuous time signal can be written as sum of sinusoidal signals with different frequencies and amplitudes. Rectangular signal, squarepulsesignal,impulsetrainsignal,trianglesignalcanbegivenasexamplesof continuous time signals. Digital signals are obtained from continuous time signals via sampling opera- tion.Digitalsignalsarerepresentedasmathematicalsequences,andtheelementsof these sequences are nothing but the amplitude values taken from continuous time signalsateverymultipleofthesamplingperiod.Sinceinthelastseveraldecadesa huge improvement is achieved at the development of the digital devices, it has becomealmostamustespeciallyforelectricalengineerstohaveagoodknowledge of digital signals. Digital signals are almost available in every part of our life. Computers,TVs,speakers,mobilephones,houseequipment,andmostoftheother electronic devices process digital signals. In this chapter, we discuss the con- struction of digital signals via sampling operation, their spectral analyses, the case of aliasing, and reconstruction of a continuous time signal from its samples. ©SpringerNatureSingaporePteLtd.2018 1 O.Gazi,UnderstandingDigitalSignalProcessing,SpringerTopics inSignalProcessing13,DOI10.1007/978-981-10-4962-0_1