Download as pdf
Download as pdf
You are on page 1of 817
DIGITAL SIGNAL PROCESSING A. Nagoor Kani Be Dra @ 1500+ Solved Examples and Exercise Problems @ 50+ MATLAB Problems DIGITAL SIGNAL PROCESSING Second Kdition A. Nagoor Kani Founder, RBA Educational Group Chennai INA NA Tata McGraw Hill Education Private Limited NEW DELHI McGraw-Hil Offices New Delhi New York St Louis San Francisco Auckland Bogota Caracas Kuala Lumpur Lisbon London Madrid Mexico City Milan Montreal San Juan Santiago Singapore Sydney Tokyo Toronto M LS Tata McGraw-Hill Published by the Tata MeGrav Hil Education Private Limite, 7 West Patel Nagar, New Delhi 110 008 ‘Copyright © 2012, by Tata MeGraw Hill Education Private Limited, [No pat of this publication may be reproduced or distibuted in any form or by aay’ means, elceteonie, mechanical Photocopying, eeording, oF otherwise or stored ina database or retrieval system without the prior written pemmission of ‘the publishers. The program listings (ifany) may be entered, stored and executed in a computer system, but they may not he reproduced for publication, This edition can be exported from India unly bythe publishers, Tata McCray Hl Education Private Limited ISBN-13: 9780070086654 ISBN-10: 0070086656 Vice President and Managing Director— Ajay Shukla Head-—Higher Education Publishing and Marketing: Vibha Maayan Publishing Manager—SEM & Tech Fd: Shalini Jha Senior Eaitorial Researcher: Koyed Ghost Executive—Editoial Services: Shin Mutherice Senior Production Manager: Sander § Baveja Asst Produetion Manager: Amal Razdan Marketing Manager—Higher Bd: Vijay Sarath Senior Product Specialist: Tina Jajoriva Graphic Designer: Meemt Raghav ‘General Manager—Production: ajender P Ghansela Produetion Manager: Refi Kumar Information contained in this work has beea obtained by Tata Met fiom sourees believed to be reliable i nor its authors. guarantes published herein, and neither Tata MeGraw-Hill nor is authors shall he responsible for any erors, omissions, or damages arising out af use of his information. This work is published with the understanding that Tata MeGrass-Hi and its authors are supplying information but arco attempting to render engincering or other professional services. stich serves are requied, the assistance of an appropriate professional should be sought. ‘or completeness of any information Typeset at Taj Composers, WZ-391, Maula, New Delhi 110063, and printed at Rajkamal Electric Press, Pot No, 2 Phase IV, HSHDC, Kundli, Sonepat, Haryana 131 028 ‘Cover printed at Rajkamal ear laend Contents Preface ‘Acknoulengement List of Symbols and Abbreviations. Chapter 1. Introduction to Digital Signal Processing 4A eduction 42 Sgral 43° Discrete Time System 44 Anayssof Discrete Time Sytem 45 Fiters nt és 7 18 Finite Word Length Efects 47 MuttateDsP 418 Energy and Power Speceum 19 Dglal Signal Proessors 4.40 importance of Dgta Signal Processing At Useof MATLAB nDgtal Signal Processing Chapter 2: Discrete Time Signals and Systems 24 Invoducton 22 Disorete Time Signals, 224 Generalon of Discrete Time Signals, 222 Representaton of Discrete Tine Signals. 223° Standard Discrete Tme Signals 23 Sampling of Contruous Time (Anaiog) Signals. 234 Sampling and lasing 24 Cassiicaion of Discele Tine Sgnas 241 Deterinisicand Nondetermiiste Signals, 242 Periodic and Apericie Signals 243 Symmetfe (Even) and Antsymmatc (Ode) Signals 244 Energy and Power Signals. - - 245 Causal, Noncausal and Antcausal Signal, 25 Mathematical Operatons on Discrete Tine Signals 254 Scaling of Discrete Tine Signals 252 Foicing(orRefectionor Transpose) of Dscete Tine Signal 253. Time Shing of Disorte Time Signals 254 Adiion of Discrete Time Signas. ws - 255. Muttpicaton of Discrete Time Signals. 26 Discrete Time System, 284 Mathematcal Ecuaion Govering Discrete Time System, 262 Block Diagram an Signa Flom Graph Representation of Discrete Tine System. ry 12 4.2 13 15 45 16 46 16 47 18 ar 28 29 210 att 2 218 2 215 216 aan 218 Response of LT! Diserete Tme System in Tine Domain 274 Zerolnput Response or Homogeneous Solution. 272. Parvular Soution 273. ZeroStata Response. 274 Total Response Cass fcation of Disctete Tine Systems 284 Static and Dynamic Systems 282 Time Invariant and Time Variant Systems, 283 Linear and Nonlinear Systems, 284 Causal and Noncausal Systams, 285 Stable and Usable Systems. 288. FIR and IIR Systems. 287 Recursive and Nonrecursive Systems. Discrete or Linear Convolution, 294 Representaton of Discrete Time Signal as Summation of Impulse. 292 Response of TI Discrete Tine System using Discrete Convo, 293 Properties of Liar Convolution. 294 —Inercannectons of iscete Time Systems. 295 Methods of Petfoming Linear Convolution. Creular Convoiuten. 2404 Circular Representation and Circular Shit of Discrete Tine Signa, 2102. Groular Syrmets of Discrete Tine Signa 2403 Detinton of Creulr Convoluton. 2104 Procedure for Evaluating Cielar Convolution 2405 Linear Convolution via Creuar Convolution 2106 Methocs of Computing Creuiar Convolution. Seetioned Comluton 2A1A Ovetiap Add Method 22 Ovetigp Save Method Inverse System and Deconvolution... 2124 Inverse System 2122 Deconvoiston Correlation, Cressoorelaton and Autocorelaton 218 Procedure for Evaluating Coneation, Giouar Coreaion 24K Procecurefor Evaluating CrelarCarelation, 2.142 Methods of Computng Giclee Coreaton, ‘Surmary of Important Concepts. ‘Short Questons and Answers. MATLAB Progam Exercises, 2.28 2.28 230 20 23 2.35 235 2.36 8 4 a 50 st 51 82 53 4 56 ot 66 66 70 10 70 2 n a 2 8 98 96 97 PEER REDE R EP PE SP PP PP PE 2.100, 2.107 2.108 2.109 203 2114 208 2422 Chapter 3_: Z- Transform 31 ntroduction, 32. Region of Convergence 33 Properties of 2-Transform, 34 Polos and Zeros of Ratonal Function of 2 ot ot 341 Representation of Poles and Zeros in zane 842 ROC of Rational Function of 2 343 Properties of ROC. 88° Ierse 2 Transform, {A54__ Inverse 2-Transfom by Contour integration or Rescue Methoc 43452 _ Inverse 2-Transiorn by Partial Fraction Expansion Method fe talk aie aids Ga sw eb 4353 Inverse z-Tranform by Power Series Expansion Method. 38 86 AralysisoFLTIDseete Time Sytem Using 2Tansform. “& 361 Transfer Functon of LTI Discrete Time System. 348 1262 Impulse Response and Transfer Function 349 1363 Response of TI Discrete Time System Using 2Transfom, - 349 5364 Convolsion and Deconvauton Using #Transform 3. 50 465 Stabity in Domain ast 37 Relation between Lapiace Transform and 2-Transfom. 3.56 ATA Impulse Train Samaling of Continous Time Signa. 3. 56 472. Teansfomaton Fam Lap'ace Transform to 2-Tansfom. a7 ‘MI3 Relation Betwoen sPlane and 2-Pane. 3.57 ‘38 Sucres for Reaizaton of LT Discrete Tme Systems in 2-Domain 37 39° Structures for Realzaton of IR Systers. 3.74 394. Direct form! Stuture of IR System, 3.75 382 Died! forrll Sucre of UR System 3.76 483 Cascade form realzaton of I System. 378 394 Paralel fom Realzaon of IR System, . 3.79 310 Structues for Realization of FIR Systems, 3. 9 ADA Direct form Realization of FIR Systor, 3.100 48102 Cascade form Realzation of FIR System, 3.100 L103 Linear Phase Realization of FIR System 3.401 Mt Summary of Important Concepts 3.107 442 Short Questions and Answers, 3.108 MATLAB Programs. 3.118 Exercises, 3.123 4 : Fourier Series and Fourier Transform of Discrete Time Signals 41° Inroduction at 42 Feuer Series of Dserete Tine Signa (Diseete Time Faure Seres} a2 a 4a 45 45 ar 48 49 440 an 4n 424 Frequency Spectrum of Periodc Discrete Time Signals. 422 Properties of Discrete Time Fouier Sees. Fourier Transform of Discrete Time Signals (Discrete Te Fourier Transforn, 434 Development of Discrete Tire Fourier Transform fom Disoret Time Fourier Seres. 432 Detiiion of Discrete Time Fourer Transform. 433 Frequency Spectrum of Discrete Time Signa, 434 Inverse Discrete Time Fourer Trantor, 435° Comparison of Fourier Transfam of Dsrete and Corsini Tene Signals Propertes of Discrete Time Fouter Transform Discrete Time Fourier Transform of Perodic Discrete Tine Signals, ‘Analysis of TI Discrete Time System Using Discrete Time Fourier Transom. 484 Tiansfer Funcion of TI Dscrete Time Systam in Frequency Domain... 482 Response of TI Discete Time Syster Using Discrete Te Fourier Transform, 483 Frequency Response of LT! Discrete Tine System. 484 Frequency Response of Fest Order Disorete Time System 485. Frequency Response of Second Order Discrete Tine System. Alasing in Frequency Specrum Ove to Samoing ATA Signal Reconstruction ( Recovery of Continuous Tine Signal) 47.2. Sampling of Bandpass signal Raton Betwaen 2-Tansfarm and Diseret Time Four Transform, ‘Summary of important Concepts. ‘Short Questions and Answers. MATLAB Programs Exercises 43 44 49 49 410 4 4 An an 2 2 2 2 B 2% u % x 8 63 64 69 ™ ee Chapter 5 : Discrete Fourier Transform (DFT) and Fast Fourier Transform 51 52 53 54 55 58 s7 (FFT) ‘reduction Discrete Fourr Transform (DFT) of Discrete Tine Signal 524 Development of DFT FromDTFT. 522 _Deintinof Discrete Fouter Transform (OFT). 523. FrequeneySpectumusngDFT 524 InverseDFT Properties of OFT Rolaicn Between DFT and 2-Transform ‘Analysis of TI Discrete Tme Systems using DFT Fast Foutier Transform (FFT) i si Decimation in Te (IT) Raine? FFT STA BPointDFT using Rage? DIT FFT canoes ti 57.2 Flow Geaphior®-PontOFT usingRatix-2DIT FFT Decimation In Frequency DIF) Rach? FFT 584. 8PointDFT using Rad? DIF FFT 5.32 582 Flow Geopnfor®-PontDFT usingRaix-2DIF FFT 5.35 583 Comparison o DIT ant DIF Rada-2 FFT 5.7 59° ConputatonofinverseOFT Using FFT 8.7 510 Summary of mportane Concepts 5.53 511 Shor Questions ansAnavers 5.54 512 MATLAB Programs 5.88 513 Exerises 5.63 Chapter 6 : FIR Filters 64 bsteducton 64 62 LTiaysteras Frequency Selective Fier 82 63. IéealFrequency Response of Linear Phase FIRF ters a4 64 Characteristics of FIRFiter wih near Phase 86 65 Frequency Response ofLinea PhasoFIR er a8 65 Design TectnquesforLinearPrase FIRFters 6.20 67 FouriorSeries Method of FIRFiter Design 6.2 68 Winows 6.40 1 Rectangiar Window 641 68.2 Batter Triangular Window 6.43 683. Ralset Cosine Winiow 64 684 HanningWindow 6.46 685 Hamming Window, oar 688 BlackanWindow 649 687 KaiserWindow 6.50 688 SummayofVaiousFeatues cf Windows... - 6. 54 69 FiRFiterDesgnUsng Windows 6.54 640 DesignofFIRFitersby Frequency Sampling Technique 6.79 611 Summary of mpotant Concepts 6.85 642 Shot QuesionsandAnswers 6.86 612 MATLAB Progtams 6.95 64 Brarcses - - 6.107 Chapter 7: IIR Filters TA eduction na 72 Freqency response of andlogand dgtallR Fle... — 13 73. Impulseinatartransfomaton 16 1134 Relationbetweenarlog and gta ter pres inimpulseinvaantransomation LT 4 18 18 W 18 19 740 rat 2 1.32 Relatenbetween anaogard dtl fecuencyinimpuseivarantrnsfomraton 733 Usoulimpuseivarantuanstomaton a near transformation TAA Rolatenbetwean analog an gta er poles brea ansiormaton TA2__ Relatenbetween andogand dgial fequencyinbineartarsfrmation Specfcationsofcigtl IR lowpass iter Design olowpass¢igtal Buiter te. 7.64 Analog Buteworth er 1.82 PolesofButteworh loupass fer 1.63 TransfcTuneionofanalog Buterwoth nypass iter 1184 Frequency response ofanaig lowpass Butrwoth iter st 185 Orderofthe ioupass Buterwoth filer 7.85 Cuof recveney of lowpass Butterworth iter 1.87 Design procesue forowpasscgta Butterworh IR fter Designctlowassdigtal Chebyshev filer TTA Transfer functon of enaig Chebyshev iowpass iter 12 Orderofanaioglowgass Chebyshev iter - 123° Cutt tequency of analog lowpass Chebyshev fer TTA Frequency response anaiog Chebysey passer ~ LS Design procedure forlonpasscigtl Chebyshev IR iter Frequency transformation 784 Anaogteqvencytenstrmaton 782 Digi Fequency tansfomaton ‘Summary of Important Concepts ‘hart Questions andAswers MATLAB Programs Exercises SSHREREASHSHHEERNNRSSaee 7.108 Tt aa Tat at 33 Chapter 8 : Finite Word Length Effects in Digital Filters eduction Represenaionof NumbersinDigta System 824 BinaryCoces 822 Radix Number System 823 Fed Point Represertation 824 FloatngFortRepresertation ‘Types of Arthet in Digal Systems 834 One's Complement Adon 832, Two's ComplementAddion 833. FloatngPortAddtion 834 Floating point Muitplication 2 8 “ 15 835. ComparsonofFied Point and Posing Point Actrrete 316 84 Quentzatonty Truneatonant Rounding 816 841 Quantization ieps 346 842 Truncation 2 = 3.18 843 Roirdig 82 85 QuantzatondlinputData a2 85 GuantzatonofFiter offen. 32 87, Product Quantization Err 837 88 LimtGyes inRecursve Systems 253 881 ZeroinutLinit Cycle a - 353 882 Overfow Lim Cycle 86 83 Scaling foPrevert Overton - 3.82 89 Summaryof important Concepts a7 840 Short QuesionsandAnswers 37 BM Bxerises 38 Chapter 9 : Multirate DSP 94 bsteducton 84 92 DounsamplngorDacmaton) 92 924 Spectnmofdounsamper 94 922 AntalisingFiter 97 93 Upsarainaforireroltion) 8.16 93.4 Spectrum of Upsamler 9.19 932 Aniemaging iter 9. 20 94 SampingRte Conversion 824 941 SpoctumofSampingRate Convertor by Rational Facto 1D 9.25 95 Mulisage irleentaton of Sarin Rate Conversion 9. 26 96 WeniferinMuitiateD gta Signal Processing... zs es 97 Implementation of Samping Rate Conversion nFIR Fiters. 92 874 Implementation of Sampling Rate Conversion sing DecmatrinFIRFiters 92 9.72 Implementaton of Sampling Rate Conversion using terpodtorin FIR Fiters 938 98 PoyphaseDecorposton 034 981 Polyphase Deconpastion of FIRF ters 934 982 Poiychase StucueofDecimator te . 9.37 983 Poyphase Sructurecflrerplaor 9.38 984 Poiychase Decampostionof IRF ers . 9.40 99 AppleatonsofMuitate DSP. 946 994 DigtalFiterdanks 9.46 992 Sub-band Cocing of Speech Sgnais : i 9. 46 993 Quadrature MiorFiter(QMF} Bank 9.47 98.40 Summaryefimpatant Concepts 9.48 2M Shan QuestonsancAnevers 24 82 NATLABPrgans as 90 Breises 8.60 Chapter 10: Energy and Power Spectrum Estimation 104 bctuctn - co ‘04 402 Energy Spectrum o Drea Tire Sgral 10.4 403 Rom sgn and Rancom Process 04 104 Power Specrum of Random Process 05 105. Prixtagam 105 406 UseofDFTFFTin Power Spectun Eston 106 4107 Norparameticetats of Power Speccum Esimaton oe 107 4071 Bare Nethod of Power Spectun Estimation ‘07 4022 Welch MetoeofPovetSpectum Estmaton 108 4023 Backnan-TukeyMetho of Poser SpecumEstmaton 10.10 108 Pesorrance Characters oNonparamtic ethos of Power Spectum Estinaton 0.2 4081 Poforrancs Characteristics of Peradogran Paver Specrum Esimaton 10.2 1082 Pafomarce Charaesics of Batt Power Specrum Esimaion 10.28 4083 Pefornarce Charcesstes of WelchPaveSpectum Esimaton 10.28 4084 Peforrance Characestcs of ackan Tukey Powe SpecumEsiraton 10.2 109 Sunray of mportantCorepis 10.33 1040 Shot Quesions and Answers 10.34 1011 MATLAB Prograss 10.6 1012 Exoses 104s Chapter 11. : Digital Signal Processors 111 eduction a) 112 Special Festus of Dial Sgr Processor a M121 FastDaaAcess 3 122. FastComptaten ns 1123 Numerca Feit 7 1124 Fost Exenuton Cont ne 113 TWSI2065cFai of Digi Signal Proessos 8 M131 Pr Diagram of THS2OCSKProcessors 11.40 1132 _Achtedue of AS32005 Poessons 14 1133 FunctonalUntsin CPU of THS2005 Processors 1145 1134 On-ChpMemoryinTUS@2nGS«Pecesors 1.49 1135 Onche Peepers THSIZICSxProcessrs 1119 1138 AdesingNoces of THS32005« Proceso: 4.21 ‘1137 _Instuctonpeinrg in THS220C5x Processors 12 1128 Inston of TUSI2065x Processors 24 1139. Ascemty Language PogarsnTMS4200 Processor. 1135 ua TS220C64«Fanlya gl Sra Proceso tae A1At PnDagan o TUSSZICSIx Proceso a $142 Acted of THSS24CS4x Processors 1. ‘143 FunctonalUnis CPU TS20CSEx Processors co ist S144 on-Cnphenoy nTMS2Z005b Process 11.58 1145. On ChpPerpterds of TUSIZ0C5Hx Processors ws M146 AcressingModeso!TUS20CS4 Passos 1860 ‘1147 nsiucionPpsining in THSSZGCStx Process 1183 1148 inscons of THSI200S4xPrecesers 183 1449 Assam Language Progra in TMSSZICS4e PESO ann tn 115 SimaryotinparantCooeps 1176 118 Shot Qustonsandénsves 1178 147 Berises 192 Shapter 12 : Applications of DSP 24 boduton 7 at 122 SpeechPrcessng a2 1224 SpeechCacngandDscosng 22 4222 Speedhrecognton a4 12.2.3 Speech Synthesis 12.5 1224. Dghaoaner as 123 Msi Sound Pcesing - a6 4234. Dit Mscsyness ar 1212 Musod Sons Poss For SOO en ar 124 DgtalRado ne 125 DpialTeevson ne 128 OTM nTeepteneDang ne 127 RADAR 2.10 128 Blonedel Srl Pressing att ‘Appendix 1. Important Mathermatical Relations: At ‘Appendix 2. MATLAB Commands anc Functions me ce AS Appendix 3. Summary of Verious Standard Transform Pairs. AM ‘Appendix 4 Summary of Properties of Various Transforms. Ad ‘Appendix 5 Summayol Important Equations or FIRFFiterDesign Ate ‘Aopendix 8 Sunearyot pont evaonstr IRF Desgn An ‘Appendix 7 Summary ofPropartesfPoner Spectum Eater Am INDEX 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 suitably crafted and designed to meet student’s requirements. Considering the highly mathematical nature of this subject, more emphasis has been ssiven 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 by 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 Organiza In this book, the concepts of discrete time signals and their transforms are organized in four chapters and two chapters are devoted to 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 tziven in each chapter. This will be of great assistance t 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 topies of digital signal processing like FIR filters, IR 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 diserete 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, 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-transforms and solutions of difference equations deseribing 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 form the basics for frequency domain analysis of discrete time signals and systems. In the first half ofthis chapter, the discrete time Fourier series and the frequency spectrum using discrete time Fourier series are discussed with relevant examples. ‘The second half ofthe chapter details the development of discrete time Fourier transform from diserete time Fourier series, frequency specirum, 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 2-transform of discrete time signals is also discussed in the chapter. Chapter § extends the understanding of the concepts of Diserete 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 frequeney response of FIR filters and characteristics of 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 processes, The various nonparametric methods, power spectrum estimation and their performance characterstis 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, TMS320CSx and TMS320CS4x processors Chapter 12 provides 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 hopes that the teaching and student community will welcome the book. The readers can feel free to pvsni.com for further improvement of the book. A.Nagoor Kani convey their criticism and suggestions to ka Acknowledgements | express my heartful thanks to my wife, Ms.C. Gnanaparanjothi Nagoor Kani, and my sons, 1N. Bharath Raj alias Chandrakani Allaudeen and N. Vikram Raj, forthe 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. Paritha for type setting and preparing the layout of the book. My sincere thanks to all reviewers for their valuable suggestions and comments which helpsed me explore the subject to a greater depth. Prateek Kumar Maharana Pratap Engineering College Kanpur, Uttar Pradesh. Ashish Suri Shri Mata Vaishno Devi University Jammnu, Jammu and Kashmie S.8 Prasad "National Institute of Technology (NIT) Jamshedpur, Jharkhand Harpal Theti Kalinga Institute of Industrial Technology, Bhubaneswar, Orissa Kishor Kinage DJ 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 Svi Venkateswara Insitute of Seience and Technology, Kadapa, Andhra Pradesh. P. Biswagar RV College of Engineering, Bangalore, Kamatake I am also grateful to Ms.Vibha Mahajan, Mr. Ebi John, Ms. Koyel Ghosh, and Ms, Sohini Mukherjee of Tata MeGraw Hill Education for their concern and care in publishing this work. My special thanks to Ms. Koyel Ghosh of MeGraw Hill Edueation for her care in bringing out this work at the right time. [thank all my office s tivities, (for their cooperation in carrying out my day-to-d Finally, a special note of appreciation is due to ters, 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 A, xz 2 Number of integer digit Gain at stopband edge frequency Gain at passband edge frequency Bandwidthin Hz Size of binary excluding sign bit jents of exponential form of Fourier series of x(t) Sampling rate reduetion factor Energy of a signal Relative error due to rounding Relative error due to truncation Rounding error Frequency of discrete time signal (or digital frequency) in cycles/sample Frequency of conti uous time signal (or analog frequeney) in Hz Fundamental frequency of discrete time signal in eyclesisample Fundamental frequency of continuous time signal in Hz, Maximum frequeney of continuous time signal in Hz Sampling frequency of continuous time signal in Hz Sampling rate mulitplication factor complex operator, J] Number of segments Figure of merit Mantissa Z222 7 P PL PAO rr Pe) Py 4 Q Fundamental period Order of the Iter Floating point binary number Truncated floating point number Power of a signal Pole Power spectrum Bartlett power spectrum estimate Blackman-Tukey power spectrum estimate Periodogram power spectrum estimate Welch power spectrum estimate (Quantization step size Quality factor Range of decimal number Radix or base Sign bit Energy spectrum Time in seconds Time period in seconds Variabittiy Phase factor or Twiddle factor Discrete time signal or Ergodic random process Random process Complex variable (2 = u + jv) Unit advance operator or Zero Unit delay operator Attenuation costant J j a Angular frequency of continuous time signal in rad/see Center frequency Stop band edge analog frequency in rad/sec Pass band edge analog frequency in rad/sec Angular frequency of discrete time signal in rad/sample Sampling frequency point Pass band edge digital frequency in rad/sample Stop band edge digital frequency in rad/sample Variance Steady state output noise power due to input quantization error Attenuation at a pass band frequeney Altenuation at a stop band frequency ‘Convolution operator Circular convolution operator Integration operator Differentiation operator Standard/Input/Output Signals Aw), hin) hin) ° hyo) #(m) Fm) rm) ym) Magnitude funetion Impulse response of discrete time system Impulse response of inverse system Desired impulse response Crosscorrelation sequence of x(n) and y(n) Autocorrelation sequence of discrete time signal Autocorrelation sequence of random process with finite data Autocorrelation sequence of random process with infinite data FC) Fm) un) wyln) wn) wen) wn) wn) wn) x(n) xin) xn) x0) xem) x((a-m)), x(n) xnfl) x,(n) yen) yam) y(n) om) y(n) ya) 3m) a(n m) ci tular autocorrelation sequence of x(n) Circular crosscorrelation sequence of x(n) and y(n) Discrete time unit step signal Rectangular window sequence Bartlett of triangular window sequence Hanning window sequence Hamming window sequence Blackman window sequence Kaiser window sequence Diserete time signal Input of discrete time system Odd part of diserete time signal x(n) Even part of discrete time signal x(n) Delayed or linearly shifted x(n) by m units fe ularly shifted x(n) by m units, where N is period Down sampled version of x(n) Upsampled version of x(n) Periodic extension of x(n) Output / Response of discrete time system Delayed output / Response of discrete time system Particular soultion of discrete e system Homogenous solution of diserete time system Zero state response of discrete time system Ze10 input response of diserete time time system Diserete time impulse signal Delayed impulse signal () Phase delay Group delay Phase function Transform Operators and Functions DFT DFT EX} F e we -! He) He") Hye) Hye”) Qu x(e" xe") xe") xa) x(k) Xk) X() X@) z Zz Discrete Fourier transform (DFT) Inverse DFT Expected value of random variable = Fourier transform Inverse Fourier transform System operator Inverse system operator Transfer function Frequency response of the digital filter Normalized transfer function Desired or ideal frequency response Quantization operations Discrete time Fourier transform of x(n) Real part of X(e) Imaginary part of Xe") Fourier transform of x(t) Discrete Fourier transform of x(n) Real part of X(k) Imaginary part of X(k) z-transform of x(a) Z-transform Inverse Z-transform Chapter 1 Introduction to Digital Signal Processing oY LL 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, Barlier, DSP systems were limited non-real-time seiemtitie neral purpose 1 husiness 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. inall fields of engineering and technology. ‘The basic components of a DS ‘system are shown in fig 1.1. The DSP system involves conversion of analog signal to digital signal, then processing ofthe digital signal by a digital system and then conv of the processed digital signal back to analog signal, ig Sau lone Lo Pig 1.1 : Basic components of a DSP system The real-world signals are analog, and only for processing by digital systems, the signals are converted (0 digital, For conversion of signals from analog 0 di al, an ADC (Analog to Digital Converter) is employed, ‘The various steps in analog to digital conversion process are sampling and quantization of analog signals, he quantized samples to suitable binary codes. The digital signals in the form of and then converting {codes are fed to digital system for processing, and afier processing, it generates an output digital si the form of binary codes. The output analog signal is constructed from the output binary codes using a DAC Wigital wo Analog Converter). ‘The processing of ‘components of a signal and yy spectrum analysis co determine the vatious frequency ltering the signal to extract the required frequency component ofthe signal 12 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 he 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 magnet media so that they are transportable and ean he processed in non-real-time orof-ine 1.2. Signal Any physical phenomenon that conveys or earries some information can be ealled a signal, The c., are examples of signals that we normally encounter music, speech, motion pictures tll photos, heartbeat, inday-to-day life When a signal is defined continuously for any value ofan independent variable, itis 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 s time, itis called a continuous time signal and itis denoted as"xi0, When a signal is defined for discrete intervals of an independent variable, it is called a diserete signal. When the depencient variable of adiserete signal is time, its called discrete time signal and itis denoted by ‘x{n)”, Most of the diserete signals are either sampled versions of analog signals for processing by digital systems oF output of digital systems. ‘The quantized and coded version of the diserete 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 diserete time signal to digital signal involves quantization and coding, Normally for hinary representation, a standard size of binary is chosen. In m-bit binary representation, we cam have 2” binary codes, The possible range of values of the discrete time signals are usually divided into 2” steps called quantization levels, and a binary code is attached to each quantization level. The values of the diserece time signals are approximated by rounding of truncation inorder to match the nearest quantization 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 devives or software f algorithm. A system which can process a discrete time signal is called a discrete time system, and so the input time signals. and output signals ofa discrete time system are discret Chapter 1- Introduction to Digital Signal Processing 13 ‘A discrete time system is denoted hy the leer #2 The input of discrete time vysem is denoted as “x(ny" and the output of discrete time system is denoted as “y(n. The diagrammati representation ofa Lliserete time system is shown in fig 1.2. wo en i on aa Fig 1.2 : Representation of discrete time system: ‘The operation performed by a diserete time system on input to produce output or response can be expressed as, Hix) , {denotes the system operation (also called system operator. Response, y(n) whe ‘When a discrete time system satisfies the properties of linearity and time invariance then it is called LT1 (Linear Time Invariant) discrete time system The input-output relation of an LTT diserete time system is represented by constant eoerieient difference equation shown below. yom) + 5 by, x(n) ya) wher nd MEN, N= Order of the systen The solution of the above difference equation is the response y(n) of the discrete time system, for the input xi. 1.4 Analysis of Discrete Time System ‘Mostly, the diserete time systems are designed for analysis of diserete time signals, Physieally, the discrete time systems are realized in ime 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 ofa solution and then solving the constants using initial conditions, In order to simplify the task of analysis, the diserete 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-ransform.The Z-transform, will ansform a funetion of diserete time “n” into a funetion of complex variable “2”, where 210" Therefore, Ztransform of adiserete time signal will transform the time domain signal imo z-domain signal (On taking Z transform of the difference equation governing the discrete time system, it becomes. * and the solution of algebraic equation will give the response of the system as a algebraic equation in funetion of “2” and i is called z-dommain response. The inyerse 2 -transform of the z-domain response, will give the time domain response of the discrete time system. Also, the stability analysis of the diserete systems are much easier in z-domain. 14 Digital Signal Processing ‘The ratioof 2 transform of output and input is called eransfer function of the discrete time system. ‘The inverse Z -transform ofthe 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 frequeney, and for most of the applications the Irequeney content of the signal isan important criteria, The frequency range of some of the signals are listed intable Is] and 1.2 ‘Table 1.1 : Frequency Range of Some Electromagnetic Signals, Type of signal Wavelength (m) Frequency range (112) Radio broadcast Wt 1 3710" to 3710" Shortwave radio signals 10 to 10° 3710" to 3710" Radar/ Space communications | 1 to 10° 3710" to 3710 Commoncariermicrowave | 1 to 102 3°10" 3710" Infrared 10* to 10° “10% to 3710" Visible tight 39°10? t 817107 | 37-10% 10 7.7710" Ultraviolet 107 to 10% 37108 © 3710" Gamma rays and x-rays 107 to 10" 3710" 0 3710" ‘Table 1.2: Frequency Range of Some Biological and Seismic Signals, Type of Signal Frequency Range (7) leciroretinogram ow ® lectronystagmogram 0 wo » Pheumogram 0 oo Electrocaniogram (ECG) 0 to m0 Electroencephallogram (EEG) 0 to 10 Electromyogram 0 t Sphygmomanogram 0 to 20 Speech 10) 1 4000 Wind noise 100 10 1000 Seismic exploration signals 0 0 1 Earthquake and nuclear explosion signals | 0.01 1010 Seismic noise Ow I ‘The frequency contents of a discrete time signal can be studied by taking Fourier transform of the liserete time signal. The Fourier transform of discrete time signal isa particular class of Z-transform in which =e ,where “w” is the frequency of the discrete time signals, Chapter 1- Introduction to Digital Signal Processing 1s "The Fourier transform, will ransform a function of diserete time “a” into a function of frequeney ‘a, Therefore, Fourier transform ofa diserete time signa will transform the diserete ime signal into frequeney domain signal. The Fourier transform of the diserete time signal, is also called frequeney spectrum of the discrete time signal, The Fourier transform of the impulse response ofa system is called frequeney response of the system, The frequeney spectrum is complex function of “w" and so can be expressed as magnitude speetrum 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 bea 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 ean also be directly computed using DFT ( Diserete Fourier Transform ). The computation of DFT involves a large number of ealeulations, 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 wil he desired frequency response, The inverse Fourier transform of the frequeney 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 ate called HAR filters, ‘Since, an FIR filter is designed from the finite samples of impluse response, the dreet design of FIR filter is possible in which the transfer funetion ofthe filter is obtained by taking 2 -iransform of impulse response. jote : Mathematically, the filtor design is design of transfer function of th filter. ‘Since, an IIR filter is designed by considering / preserving the infinite samples of impulse response, the direct design of HIR filter is not possible, Therefore, the IIR filter is designed via analog filter. For designing IR filter, fest the specifications of IR 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 ot word length” for number representation. This Finite word size for number representation leads to erors in input signals, intermediate signals in computations and in the final output signals. In general, he various effects due o 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, 16 Digital Signal Processing + Errors due 10 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 ean play CDs recorded in different standards, ete ‘The processing of discrete time signals at different sampling rates in different pars of a system is called multirate DSP. In digital systems, the sampling tate 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 eockpit of an airplane corrupted by engine noise, ete. When the signals are corrupted by noise, hen the energy or power spectrum will he useful to identify the signal from “The energy spectrum can be computed for deterministic signals, and itis given by square of magnitude of Fourier transform of the signal. Altematively, the energy spectrum is given by Fourier transform of the autocorrelation sequence of the signal. ‘The power spectrum can be estimated for nondeterministc signals or random process/signals, The power spectrum estimation methods can be broatly classified into two groups, namnely, ponparametric methods and parametcie 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 randam process. In parametric methods. first an appropriate model is selected for the given random process, then the parameters of the mode! 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 ate specially designed microprocessors/microcontiollers 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 TMS320Cx and Analog Devices has released processors in the family name ADSPxx. Chapler 1- Introduction to Digital Signal Processing 17 ‘Some ofthe 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-aceumulate computations involved in convolution, correlation ‘and FFT in single clock eycle, Larger size ALU and accumulators with guard bits to accommodate the overflow in computation Pipelining of instructions to exeeute different phases of four or six instructions in paallel + 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 playsa vital le in almostevery field of Science and Engineering. Some of the applications of digital processing of signals in various field of Science and Engineering are listed hei 1. Biomedical + ECG is used to predict heart diseases, EG is used to study normal and sbnonmnal behaviour ofthe brain, EMG is used to study the condition of museles. + X-ray images are used to predict the bone fractures and twherculosis, + Ultrasone sean images of kidney and gall bladder is used wo predict stones, +. Ultrasonic sean images of foetus is used to predict abnormalities in a baby. + MRI scan is used to study minute inner d ils 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 fo effective use of transmission channels + Speech recognization for voice operated systems and voice hased secutity 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 effeets in audio systems like stereo, woofer, karoke, equalizer, attenuator, et. + Musie synthesis and composing using music keyboards + Audio and video compression for storage in DVDs. 18 Digital Signal Processing 4. Communic + The spectrum analysis of modulated signals helps to identify the information bearing frequency component that ean 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 welephones. + Echo and noise cancellation in transmission channels, 5. Power electronics The spectrum analysis of the output of coverters and inverters will reveal the harmonies present in the output, which in turn helps to design suitable iter to eliminate the harmonies + 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 secuity systems. + Filtering operations on images o extraet the features or hidden information 7. Geology + The seismic signals are used to determine the magnitude of earthquakes and voleanie 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 sta + 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) isa software developed by The MathWork Ine, USA, whieh ean run ‘on any windows platform in a PC (Personal Computer). This sofware has a number of tools forthe study of various engineering subjects. IL 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. ketch or plot of discrete time signals as a function of independent variable + Spectrum analysis of discrete time signals + Solution of LT! diserete time systems, + Perform convolution and deconvolution operations on diserete time signals. + Perform various transforms on discrete time signals like Fourier transform, Z-transform, Fast Fourier ‘Transform (FFT), te, + Design and frequeney response analysis of FIR and IIR filters. + Decimation and interpolation of diserete 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 ean 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. Inthe 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 diserete signal is defined for every integer value ofthe 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 ean he represented by a one-dimensional array as shown in the following 2.4,-1,3,3,4) Hete the discrete signal xin is defined fer, n= 0,1,2,3,4,5 \ Mo= 2; xt=4; XQ)=-1; wdal=3; wlah=o; xdSI=4 ‘When the independent variable is time t, the diserete signal is called diserete time signal. In discrete time signal, the time is divided uniformly using the relation t=nT, where Tis the sampling time period. (The sampling ime period isthe inverse of sampling frequency). The discrete time signal is denoted by x(n) oF x(nT). Chapter 2- Diserete Time Signats.and Systems 22 Since the discrete signals have a sequence of numbers (or values) defined for integer values of the ‘independent variable, the diserete signals are also known as discrete sequence. In this book, the term sequence ‘and signal are used synonymously. Also inthis book, the discrete signal is referred as discrete time 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 ina set of quantized values. Here quantization is necessary to represent the signal in binary codes, ‘The generation of adiscrete 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)= 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.la and fig 2.1b respectively. The samples of the continuous time signal as a function of sampling time instants are shown in fig 2.1e. (In fig 2.1e, 1T, 27, 3, ete. fepresents sampling time instants and the value of the samples are functions of this sampling time instants). | xan) fs : ! Fig 2a. Fig 2.16, Fig Qe. Pig 2.1 : Sampling a continuous time signal to generate diserese time si When t=; x)=0 When (=4T ; x()=059 When (21T; x()=0.1 When (=5T ; x)=08 When (=2T; xt)=03, When (=6T ; (208 When (237; x(=0.35 When t=7T ; x)=09 In general, the sampling time instants can be represented as, "nT", where "n" isan 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 diserete time signal, denoted as x(n), which is a funetion of an integer variable "n” as shown below. 0, 0.1, 03, 0.35, 0.55, 08, 0.8, 0.9) xin) ere the dserete signal x(n) is defined for, n=0,1,2,3,4,5,6,7 23 Digital Signal Processing \ x)= x) =0.55; x2)=035 x(6)=0, ‘The sample valuc lies the range of 0 0 Lets choose 3-bit binary to represent the samples in binary code. Now, the possible binary codes are 2° 8, andso the range can be divided into eight quantization levels, and each sample is assigned, one of the ‘quantization level as shown in the following able ‘Quantization level Binary code: ‘Range represented by quantization level (R=Range = 1) for quantization by truncation ox Keon deo 0 0000 xin) < 0128 > 0.000 ix Ratx dons oon 0128 sx) < 0250 > 0128 ax Roan b= os on 0289S xim) < 0378 > 0280 axBesxd-oms| on os7s 0375 ax Roan bnos 100 01300 < xin) < 0628 > 0.500 sx R=sx1 = 065 101 0.625 < x(n} < 0.75 => 0.625 Reasx} =o s 2 f= 07s 0 0750 x < 0875 > 0780 4 = oss m1 ON? < xin) < 1000 0875 Let, x,(0) = Quantized discrete time signal x{n) = Quantized and coded diserete time signal, (0, 0, 0.25, 0.25, 0.5, 0.75, 0.75, 0.875 } Now, x) x(n (000, 000, 010, 010, 100, 110, 110, 111) “The quantized and coded diserete time signal x,(n) i ealled digital signal 2.2 Discrete Time Signals 2.2.1 Generation of Discrete Time Signals A discrete time signal can be generated hy the following three methods, ‘The methods 1 and 2 are independent of any time frame but Method 3 depends critically on time. |. Generate a set of numbers and arrange them as a sequence. fxample: ‘The numbers 0,2, 4... 2N form a sequence of even numbers and can be expressod as, xo) Chapter 2- Discrete Time Signals and Systems 24 2. Evaluation of a numerical recursion relation will generates discrete signa ‘Sample: x(n) = 02x1n—11 with inal conation x0] = 1, gles the sequence, x(n) = 02; 0

You might also like