Sei sulla pagina 1di 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 ipl (or f, > 1/2) will he identical to another discrete time sinusoid with frequency w, < tpl (or f, < H/2D, 6. Discrete time complex exponential signal ‘The diserete time complex exponential signal is defined as, x(n) = at efor) [cos(w,n +a) +) sin(wn+q)] = ar cos(.n-+ p+ jatsingw.n+ a = x,(0) +) x{0) where, x(n) =Real partofx(n) = aens(ie,n +a) x(0)= Imaginary part of x(0) = sin(w,n +4) ‘The real part of x(n) will give an exponentially increasing cosinusoid sequence for'a> | and exponemtially decreasing cosinusoid sequence for0. 1 Fig 2.8 + Real part of complex exponential signal ‘The imaginary part of x(a) will give rise 1 an exponentially increasing sinusoid sequence for a> 1 and exponentially decreasing sinusoid sequence for 0- 1 Fig 2.9 + Imaginary part of complex exponential signal Chapter 2 - Discrete Time Signals and Systems 28 2.3. Sampling of Continuous Time (Analog) Signals ‘The sampling is the process of conversion of a continuous time signal into a discrete time signal. ‘The sampling is performed hy taking samples of continuous time signal a definite intervals of time, Usually, the time interval between two successive samples will be same and such type of sampling is called periodic or uniform sampling ‘The time interval between successive samples is called sampling time (or sampling period or sampling interval), and itis denoted by "1". The unit of sampling period is second (s) [The lower units are millisecond (ms) and microsecond (ns)] ‘The inverse of sampling period is called sampling frequeney (or sampling rate), and itis denoted by F, ‘The unit of sampling frequeney is hertz (Hz). (The higher units are kHz-and MHz). Let, x,(t)= Analog / Continuous time signal. x(n) =Discrete time signal obtained by sampling x, Mathematically, the relation between x(n) and x (1) can be expressed as, {a where, T'= Sampling period or interval in seconds 2 = Sampling rate or sampling frequency in hertz 7 Sampling pling frequency Example: Lat, x(t) Aconfig'=0) ~ Aeos(2nkt=0) whore, = Frequeny of ancog signal inrod/s f, z = Frequency of analog signal in Hz Let, be sampled a intervals of seconds fo get xn, where T extn) = A og = ACO Oy = Acostaat +0 = Ace Blon . ‘| ~Acoslexied)= Acoslsgnise) Frequency of discrete susoidin cycles/somple pf = Frequency of discrete sinusoid in radions/sample 2.3.1 Sampling and Aliasing In Section 2.2, it is observed that any two sinusoid signals with frequencies in the range “12 ££ © +1/2 are distinet and a discrete sinusoid with frequency, f > £1/2 will be identical to another discrete sinusoid with frequency, f < 1/2| Therefore, we can conclude that range of frequency of discrete time signal is -1/2 to +1/2. Butthe range of frequency of analog signal is -¥ to +¥ . While sampling analog signals, the infinite frequency range continuous time signals are mapped (or converted) to finite Frequency range diserete time signals, ‘The relation between frequency of analog and discrete time signal is, tak wt) 29 Digital Signal Processing ‘The range of frequeney of discrete time signal is, ~deret (2.2) 2°)°2 On substituting for F from equation (2.1) in equation (2.2) we get, 23) On multiplying equation (2.3) by F, we get, - Esp: AA) From equation (2.4) we can say that when an analog signal is sampled at a frequeney F, the highest analog frequency that can be uniquely represented by a discrete time signal will be F,/2 ‘The continuous time signal with frequency above F2 will be represented as a signal within the range + F/2 to - F/2.. Hence the signall with frequency above F/2 will have an identical signal with frequency below F/2 in the discrete form, Hence infinite number of high frequency continuous time signals will be represented by a single discrete time signal. Such signals are called alias. ‘The phenomenon of high-frequency component getting the identity of low-frequency component uring sampling is called alfasing. ‘Sampling an analog signal with frequency F by choosing a sampling frequency F, such that F,/2.> F ‘will not result in alias. But sampling frequency is selected such that F/2. si En) 428) Ze 20) =sin = n) a » \\_xln) is periodic with fundamental period, N = 18 samples. Chapter 2- Discrete Time Signalsand Systems 2H 4) Given that, x(n) = "2" Let and M be two inteers Now, xin-+ ND Since trprodicy 22 ould be ania milf TaN te ZN ax an, 4 NeMxanx* = In Here, Nis integer when M.= 7-14.21. When M = 73 N= 8 \. xn) is periodic with fundamental period of 8 samples. aM 7 ©) Given that, xin) = 2008 70" «ge! + Lets xn) = xin) + x40) where, xyfn) = 2eoe 52% 3 xyla)=3e! ¢ san ee Consider, xn) = 205 98° Considers x60 = 34! Sains) jinn xy(n-+ Ny) = 2e08 =P alot ° = 2-04 552 a «2 3 tet, SNL 2M N= Let M/=5 7 \ Ni=6 Substitute N, = 6 in equation (1), snr = 20582. 5x6} For inter M- coslg 125M) = C084) = 2¢03 52 — yin) aD ay \ sis periodic with fundamental period, \ (0) is periodic with fundamental period, N, =6 samples N, =8 samples. Here, xn) =x (n+ (nan x, (ns periodic with period N, = 6, and x,(n)is periodic with period N, = 8. ‘Therefore, x(n) is periodie with period Nr where Nis LCM of N, and N), The LCM of 6 and 8 is 24 \ N= \ x(n) is periodic with fundamental period N= 24. 25 Digital Siguat Processing. 24.3 Symmetric (Even) and Antisymmetric (Odd) Signals The discrete time signals may exhibit symmetry or antisymmetry with respect to n = 0, When a discrete time signal exhibits symmetry with respect to n =0 then itis called an even signal. Therefore, the ‘even signal satisfies the eondition, xa ay ‘When a diserete time signal exhibits antisymmetry with respect to n =0, then its ealled.an odd signal, ‘Therefore the add signal satisfies the condition, xin) 35261) x(n) = [2.210120 Fig 2.11a + Symmetric (or even) signal Fig 2.10): Anticymmetric (0° odd) signa. Fig 2.11 : Symmetric and antisymmesric discrete time signal. A discrete time signal x(n) which is neither even nor odd can be expressed as a sum of even and odd signal, Let x(n) = x(n) +x) where, x(n) = Even part of x(a) (0) = Odd part of (a) ‘Note: If (wis aon them ts odd part willbe zero If x(n) is odd then is wzen part will be 2era Now, it can be proved that, Even part x,(0) = 4[x(n) + x(-n)] Oa part, x60) = Ffsi0)— xn) Let, x(n) = x,(0) + x(a) 28) ‘Onreplacing nby-nin equation (2.8) we get, xG-n) = x60) +x,Cn) 29) Since x,(n) is even, x.) ‘Since x,(n) is ode, x,(- Hence the equation (2.9) canbe writtenas, ACA) = (0) —x,) @.10) Chapter 2- Discrete Time Signalsand Systems ‘On adding equation (2.8) ané 2.10) we got, x(a) +n) = Bx(n) Determine the even and odd parts of the sifnals. fo) xid=3" by xlmd=3e8”—g) ale = 02, 2,6 -21 Solution ©) Given that, x(n) = 3° akon) =3" lide) satel = Lise 43 ven part, xn) = Liat)» xl = S13" 6 3" Odd parts xgln) = Hale) xC-n)l = 13-31 2 2 b) Given that, x(n) = 3 e!3” adn) =3 13" 23 cosZn4i3 sin Sn 5 axtal=3e/5" =3 cos=n—-i3 sin Zn = Nada) xn tven part xo)= Hadad xa = J [seo En asin Zn 3eos2n~ i3sin™ 275 6 pat x)=) a0 = 1[aeosn-iasin’n2c0e% a4 sin] 2265 5 5 5 ©) Given that, x(n) (2, 2,6,~ 2) Given thats x(n) =42,-2/60-2 x=? i xl 25 xad=6 a 266-22 \ xbala-2 i xl2a6 i x 207 Digital Sigual Processing Even part, x,(n) +} Ixln) + xn] Ix(nd = xn Ain 2-35 xl) — xb) = Atn=— 37 xl) 4 xbn) = 0402) foaled + xbn 046 = 6 | Atm =-25 xn) — ebm) = 0-6 =-6 5 xla) + xin) = 0402) Mena elo) — xb) = O-C2)= 2 foaled 4 xbn) 242 2 4 | Atm = 07 xn) —xbn) = 2-2 = 0 i oxln) + xn) =-240 Ain = 1 xn) — xb) =-2-0 =-2 Atn= 25 xin) + xb) = 640 6 | Ain = 25 xn) — xin = 6-0 = 6 Ain = 3.7 xln) — xbn) =-2-0 Atn= 35 xin) 6 xbn) =-240 1 adn) tx) = 1-216— 24, 2,6—21 \ adn) aba) = 121-6, 200,262) r 1 x)= 2 tan) 4 x(n 2 xgin) = 2 bx) xn 2 2 (3, 12 13 i, -3 0-03, =) + - 244 Energy and Power Signals ‘The energy E of a discrete time signal x(n) is defined as, Energy. E= Y fxinf uy The energy of a signal may be finite or infinite, and can be applied to complex valued and. real valued signals, Irenergy E ofa discrete time signal is finite and nonzero, then the discrete time signal is called an ‘energy signal. The exponential signals are examples of energy signals. ‘The average power ofa discrete time signal x(n) is defined as, 1 5 Power, P= fim iin anf 212) 88 gear 2 how If power P of a discrete time signal i finite and nonzero, then the discrete time signal is called a power signal. The periodie signals are examples of power signal. For energy signals, the energy will be finite and average power will be zero. For power signals the average power is Finite and energy will be infinite. \" For energy signal, 0 1 = ¥, 0625" = = 1.067 joules 7 2 10.0625 Usin® infinite Beometri series sum formula. Enerty, €= xin)? 1 Y was" = ¥ wasv _ > (o.2sr Inet 2 1 1 = (oasr= (o.062s" shane &, shane 2, ee 1.062591 [Usine finite Beometie series sum formula] He NEI 010625 Finite Beometrie series 1, 0.0625" —1 sum formula ) = 2 Power, P= Ut ro whan, > Ae) Here Eis finite and P is zero and so x(n) is an ener sina b) Given thet, x(n) = sin| Sn) Fo) EE oe) Na thee 2 ‘Note: Suom of infinite 1's ix infity. Sum of samples of one period of cosinusoidal signal i era 3 & sin 1S felny = 2N+T 955 MONAT 9 Powers P 219 Digital Sigual Processing a tees 1-0 No 2N412 | Nims Nii 1 Vane 11 wants No ONT 2 Since P is finite and E's infinite. x(n) isa power sina Ne Thome ie wit print of 3 saps Semple oes mfr te pris ginen below. It can be abseroed that sum of samples of a period is era When = When n= 2; en 2En=-05 Whenn= 3; cnt, Whenn=4s rE n=-05, When n= 5; ca ™an-a5 ‘¢) Given that, x(n) = u(n) c= Sa = St? 2 F ietetet cnn rage ES pine te 1S atade et fpetetenne meen 2M aa 2 MO an OR x(t) nl (Nee te AN Avot rf T2402 n[aet) 26 Nn watts = Net Since Pis finite and € is infinite, x(n) isa power sifinal 2.4.5 Causal, Noncausal and Anticausal signals A discrete time signal is said to be eausal, if iis defined for n * 0, Therefore if x(n) is causal, then xin)=Oforn<0, A diserete time signal is said to be noncausal, if itis defined for either n $0, or for both nS 0 and n> 0. Therefore if x(n) is noncausal, then x(n) #0 forn <0. A noncausal signal can be converted to causal signal by multiplying the noneausal signal by a unit step signal, u(n) ‘When a noncausal discrete time signal is defined only for n $0, itis called an anticausal signal. Chapter2- Discrete Time Signals and Systems 2.20 ‘Examples of Causol nd Noncousal Signals xin) = 0, “1,2, -2,3,-8) wel 22.2.33....9 Causal signals nl .2,-2,3,-3) inicausal signal a Ant ignals 23,9) , Noncausal signals 2.3, 4,5, 4,3, 2) xl 12,3,4,5,4,8, 2rd 2.5 Mathematical Operations on Discrete Time Signals ‘ome ofthe mathematical operations that can be performed on diserete time signals are, 1. Seating: Amplitude scaling and time sealing 2. Folding 3. Shifting : Right shift (or advance) and lft shift (or delay) 4 Addition 5. Multiplication 5.1. Scaling of Discrete Time Signals Amplitude Sealing (or Sealar Multiplication) Amplitude seating of a discrete time signal by a constant A is accomplished by multiplying the value of every signal sample by the constant A. ‘Example Let yin) be omplitude scaled signal of xin), then yin] = Axin} lel, xin) 0; n=0 and A=02, Whenn=0 ; yi0l=Ax0l=0.2°1 = 20 2-16 =32 W% pnt Whenn=1 ; yi =A xi Whenn=2 ; yi2)=Axt2)=0.2°20 = 40 ‘Time Sealing (or Downsamy pling) ‘There are two ways of time scaling a discrete time signal. They are downsampling and upsampling Ina signal x(n), ifn is replaced by Dn, where D isan integer, then it is called downsampling. Inasignl itn isveplased by, where Lisanitge he ti calledupsampling 2.21 Digital Siguat Processing. Example: xt) eben 80; 0 Fig 2.18 : Discrete time system with impulse input. 2.6.1 Mathematical Equation Governing Discrete Time System The mathema cal equation governing the discrete time system can be developed as shown below. ‘The response of a discrete time system at any time instant depends on the present input, past inputs land past outputs, Let us consider the response at n =0, Let us assume a relaxed system and so at a input or output, Therefore the response at n = 0, isa function of present input | there is no past, lone. ie. ¥O=FIXO] Let us consider the response at ‘output is y(0), Therefore the response at n ic y(1) = PLy(0), X(1), (0) Let us consider the response at n= 2. Now the present input is x(2), the past inputs ane x(1) and x(0) and past outputs re y(1) and (0). Therefore the response at n= 2, isa function of x2), x(1),x(0),y(1) YO), Ly). ¥O).x2},x(0),x00)] |= Now the present input is x(1), the past input is x(0) and past I, isa funetion of x(1),x00), (0) ienyQ) Similarly, tn=3, (3)= Fly). gC), yO), x13). 2), (1), x0) atn=4, y(4)= Fly(3).y(2), 1), 0}. x(4), (3), x12),x(1), x(O)] and soon, In general at any time instant n, yin) = Fly(a—1), y(n—2}, ln —3), -.-¥(), yO), Xfm), xk. 1), x(a 2),x(0~3) x(1),x(0)] 2.15) 2.25 Digital Signal Processing For an LT system, the Therefore the equation (2 sponse y(n) cam be expressed as.a weighted summation of dependent terms, cean be written as, yin) =—a, yn) y(n—2)—a, yin—3)— +b, xin) +b, x(n 1)+b, x2) +b, xin 3) +. oon (2.16) Where, ayia sor dnd By b,, By By se Fe constants. Note > Negative constants are inserted for oulpat signals, because oulput signals are feedback from oulput to input. Pasitice constants are inserted for input signals, because input signals are feed forward from input to output Practically, the response y(n) at any time instant n, may depend on N number of past outputs, present input and M number of past inputs where M £ N. Hence the equation (2.16) can be written a, yin) =~ a, yon= 1) a, yon 2) a, y(n 3) ay(0-N) +, x(n) +b, x(n— I) +b, xin Fb, N(M=3) tee ty XIN M) 17) ‘The equation (2.17) isa constant coetTicient difference equation, governing the input-output relation ofan LTI discrete time system. In equation (2.17) the value of "N" gives the order of the system, IN = 1, the discrete time system is called 1* order system IfN =2, the discrete time system is called der system IfN =3, the diserete time system is called 3” order system , and so on. The general difference equation governing 1* order diserete time LTT system is, yin) ‘The general difference equation governing 2* order diserete time LTI system is, =a, y(n=1)+b, x(n) +b, (n= 1) yin) =—a, y(n -2)—a, y(n 1) +b, x(n) +b, x(n 1) +b, x(n 2) 2.6.2 Block Diagram and Signal Flow Graph Representation of Discrete Time System The diserete time system can be represented diagrammatically by Block diagram or signal flow graph. These diagrammatic representations are useful for physical implementation of discrete time system in hardwate or software, ‘The basic elements employed in block diagram or signal flow graph are adder, constant multiplier, unit delay element and unitadvance element, Adder + An adder is used to tepresent addition of two diserete time signals Constant Multiplier: A constant multiplier is used to represent multiplication of a sealing factor (constant) to a discrete time signal, UnitDelayKlement + A unit delay element is used to represent the delay of samples of a diserete time signal by one sampling time, Chapter 2- Discrete Time Signalsand Systems 2.26 UnitAdvanceFlement A unit advance element is used to represent the advance of samples of a siserete time signal by one sampling time, ‘The symbolic representation ofthe basic elements of block diagram and signal flow graph are listed in table 2.1 ‘Table 2.1 : Basic Elements of Block Diagram and Signal Flow Graph Element Block diagram Signalflow representation graph representation i) ata tata) | Adder “> x(n) +2560) ay(a) a) Constant multiplier 2 xin) at) z ' Unit delay element —tr xe) ont 1) xa) Mee P Unit advance element —}— xo) enn th Example 2.7 Construct the block diaBram and sinal flow Staph of the discrete time systems whose input-output relations are described by the followin8 difference equati ©) yin) =0.7 xin) +0.7 xin 1) 4 yln—1) 4 x6n) 3x02) 4) yin) =0.2 yln—1)+ 0.7 x(n) +0.9 xl0—1) ©) Given that, y(n) = 0.7 x(n) + 0.7 x(n 1) ‘The individual terms ofthe Riven equation are 0.7 xin) and 0.7 xin ~1). They are represented by basic ‘elements as shown below. 2.27 Digital Signal Processing [Block diafiam representation Sifinal flow Braph representation xi #0 >—$$07 x) x0 + 00 in) 07 x0) af 0 rn 09 074) 0070-1) ‘The input to the system is xin) and the output of the system is y(n). The above elements are connected as shown below to Bet the output yin) 4D ? > —— Fig 1: Block diagram ofthe sytem Fg 2s Signal flow graph ofthe system 0 ata) #0. s(n) Yin) = 8.7 s(n) + 0,7 x(n—I) b) Given that, y(n) = 0.4 y(m=1) + x(n) -3x(n~2) ‘The individual terms of the Biven equation are 0.4 yin ~ 1) and 3 xln- 2). They are represented by basic elements as shown below. Block diaBram representation Sifinal low Braph representation Sina tart) si sta ny tet) xin) Lp | ‘The input to the system is x(n) and the output ofthe system is yin). The above elements are connected, as shown below to Bet the output yin) 10) > rh, yo 4 , oe Fig 3 : Block diagram of the system Pig 4 : Signal flow graph of ake system described by the equation described by the equation ya) = 04 y(n =I) + x(n) 3 x(n —2), Mn) = 04 y(n —1) + a(n) —3 afn 2), Chapter 2 - Discrete Time Signals and Systems 2.28 Given that, y(n) = 0.2 y(n=1) + 0.7 x(n) + 0.9x(0=1) ‘The individual terms of the Biven equation are 0.2 yln — 1), 0.7 x(n) and 0.9 xin —1). They are represented by basic elements as shown below. Block diaBram representation SiBinal flow Braph representation xin) ore) or x}0 +0017 (r) f sto : avin) ns sene-n 1 so that no term of y(n) vanishes. 4. Determine the zero-state response, y.(n) which is given by sum of homogeneous solution and particular solution and evaluating the constants C,,C,. ..C, with zero initial conditions, ‘5. Now, the total response is given by sum of zero input response and zero state response. \ Total response, yin)=y,(n) +y,(n) Chapter 2 - Discrete Time Signals and Systems 2.32 Example 2.8 Determine the response of first order discrete time system Boverned by the difference equation, 0.8 yln— 4x40) ‘When the input is unit step» and with initial condition a) y(t ylnl= Sol Given that, y(n) = -0.8 y(n =1) + x(n) \ yled +0.8 yin 1 =xln iO) Homogeneous Solution “The homoBeneous equation isthe solution of equation (1) when x(n) \ yin) +0.8yin—1)=0 @ Put yn) =2" in equation (2). \ 40.829 =0 x The homoBencous solution y,(n) CL08r ; forn +0 yada Particular Solution = 4 coar + 9 9” 90 9 vinl= 3 C00; forn>o iE + Boo. on | uo) Example 2.9 Determi yln) 0.2 yin 190.03 yln—2)=xln) +0.4 x(n — 1), ).2°uln) and with initial conditions yl 2) e the response yin) n + 0 of the system described by the second order difference equation, vyl-)=0.5, ‘when the input siBnal is xn) Solution Given thet, y(n) - 0.2 y(n~ 1) - 0.03 y(n ~2) x(n) + 0.4x(0=1) tion (1) when x(n) =0. “The homoteneous equations the solution of eq \ ylol-0.2y4n-1)-0.03 yln—2)=0 Put yin) = 2° in equation (2). \ 1-0.21"-'~0.031" = 0 a-(2~ 0.21 -0.03)=0 The characteristic equation is: V-021-003=0 >» G-0.3040.1) \ The roots are, 1=0.31-0.1 @ The roots of quadratic, 220.22 0.03= 0 are peer rel 0.24 oa + 40.08 ‘The homoBencous solution: y,(n) is Biven by, yale = 6, 2546, 8 (0.3 +C,4-04F 7 for n20 2) lar Solution the input is an exponential signal, 0.2° uln) and so the particular sol jon will bein the form: ol) (On substitutin8 for y(n) from equation (4) in equation (1) we & K0.2°uln) 0.2K 0.2" ula —1)-0.03 K0.2"-" uln— 2) = 0.2" ule) 40.4 “0.2% uth) ...(5) Inorderto determine the value ofK let us evaluate equation (5) for n= 2, (.: wehaveto evaluate equation (5) for any a» 1, such that none of the term vanishes) Chapter 2 - Discrete Time Signals and Systems 2.34 From equation (5) when n=2, we Bet K 0.2 0.2K “0.2! -0.03K “0.2°= 0.2" 40.4 “0.2! 0.04K - 0.04K-0.03K = 0.04 + 0.08 =0.03K =0.12 Ke 02 03 ‘The particular solution y,(o) i Biven by: y, (n= K 0.2% in) = (-40.2" un) ‘Total Response The total response y(n) of the system is Biven by sum of homoBeneous and particular solution. \. Response, yin) = yy (a) + y, (nd 0.3°+C, (0.1 4640.2"; forn*0 @ To find y(0) and y(1) When n= 0, From equation (1) we et, yo) — 0.2 y(-1)-0.08 y.-2)=x00)+ 0.44.1) Given that, y-1)=0.5,y(-2)=0 x \ xo)=0.29=1 x 2 ul), (On substi the above conditions in equ: yl0)-0.2 “0.5 -0.03 “0 +0 \ yt When From equation () we ylt) 0.2 yl0)—0.03 yt) = Weknow that yO)=1.1- y(-1)=0.5, yl-2)=0 xln)=0.2 ul \ x(0)=0.2 x(t) = 0.2! «0.2 1) 40.4 x(0) Given that, On subs y)-0.2 \. ylt)= 0.6 + 0.235 =0.835 ‘Tosolve constants. and C, Whenn =0- 1.10.03 °0.5=0.2+0.4°1 From equation (6) we Bet, YO)=€,0.3"+C, 0.1 + (40.2°=6, +€, From equations (8) and (11) we can write, Cerca \ Gre, 4 {nf the above conditions in equation (9) we Bet, “wo 2.35 Digital Signal Processing When n= 1) From equation (6) we tet y=C, “0.346, (0.104 C400. From equations (10) and (13) we can write 0.36, -0.1C, -0.8=0.835 \ 036, -0.16, = 1.635 Equation(12)-0.1 Fquation (13) =0.3C,-0.1C, 08 y(n) = [5.3625(0.3"—0.2625(-0.19+(-8)0.2"1 win) + forall n 2.8 Classification of Discrete Time Systems The discrete time systems are classified based on their characteristics, Some of the classifications of discrete time systems ae, Static and dynamic systems ‘Time invariant and time variant systems Causal and none: 1 2 3. Linear and nonlinear systems 4 al systems 5. Stable and unstable systems 6. FIR and IIR systems 2 Recursive and nonrecursive systems 8.1 Static and Dynamic Systems A discrete time system is called static or memoryless system if its output at any instant » depends at most on the input sample atthe same time but not on the pastor future samples ofthe input. In any other case, the system is said to be dymamic or to have memory Bxomple Yel = axn) ste systems Yel =x) + 620) yl =xinl + 3 xin — 1) " Finite memory is required vii = ¥ stn—m = Dynamic systems w= 5 xn-m J nomen rested Chapter 2 - Discrete Time Signals and Systems 2.36 28.2 Time Invariant and Time Variant Systems A system is said to be time invariane it is input-output characteristics do not change with ime. Definition : A relaxed sysiem His time invariant or shift invariant if and only if ‘H{x(n)) = y(n) implies that, H{x(n—m)} = yn —m) forevery input signal x(n) and every time shift m. i.e. intime invariant systems, if y(a)=Hix(n)} then y(a—m)=Hixta—m)) Alternative Definition for Time Invariance A system is time invariant ifthe response to a shifted (or delayed) version of the input is identical tw a shifted (or delayed) version of the response based on the unshifted (or undelayed) input, ie. tna time invariant system, Hata =m) =1°" fata); oral values of m 22 ‘The operator 2° represents a signal delay of m samples ‘The diagrammatic explanation of the above definition of time invariance is shown in fig 2.19. Procedure to Test for Time Invariance 1. Delay the input signal by m units of time and determine the response of the system for this, Gelayed input signal. Let this response be y(n ~ m), Delay the response of the system for undelayed input by m units of time, Let this delayed response be y(n). Check whether y (nm) = y,(n). If they are equal chen the system is time invariant, Otherwise the system is time variant npraal Danae * Fig 2.19 : Diagram atic explanation of time invariance ©) yiM=xb-n)—— d) yln)=xin)—bxln—1) Sok ©) Given that, y(n) = x(n) + x{n~1) Test 1: Response for delayed input Let yin ml = Response for delayed input. x om) vin) =Xip—m) exp) Tapa E Dalaedinpae U2 Demy Syaen Digital Signal Processing 237 ‘Test 2 : Delayed response Let y,{n) = Delayed response. Conclusion : Here, yin—m)= y(n) therefore the system is time invariant. b) Given that, y(n) = 2a x(n) ‘Test 1: Response for delayed input Let, yin =m) = Response for delayed input. - row) ve ze ee Dey Desrec nee ‘System delayed input ‘Test? : Delayed response Let y,{n) = Delayed response. xl viele 20a) is) 2040) ri a > brats Soe EU, a Deiayes response Conclusion: Here, yln—m) y(n), therefore the system istime variant ©) Given that, y(n) = x(-n) ‘Test 1: Response for delayed input Let yin -m)= Response for delayed input. we OE SE =e ‘Test 2: Delayed response Let y,(n) = Delayed response, 210) inka * Top sna Rowponee er Delos wagons Sralem —nviyae ment O0ay Conclusion: Here, yin~m) + y,(n), therefore the system is time variant 4) Given that, y(n) = x(n) =b x(n= 1) ‘Test 1: Response for delayed input Let yin —ml = Response for delayed input aie 7 wom a Gassing LAT yeah: ‘Test 2: Delayed response Let y,{n) = Delayed response. Xt He) (0m) balm th Conclusion: Here, yln—m) = y,{n)- therefore the system istime invariant. Example 2.11 ‘Test the followin8 systems for time invariance. a1deriden Hyidensted epyidanis a) yda Sm xlo-B- Fa, yew Chapter 2 - Discrete Time Signals and Systems 2.38 Sol ©) Given that, y(n) = x(n) +B b) Given that, y(n) = nx(n) ‘Test 1: Response for delayed input Let yin m) = Response for delayed input ith _ vin-m) exh) +B put _ Delayed oe Fesporee * Delay _ System delayed input fest: Delayed response Lets y,{n) = Delayed response. ene tl eee ” yater ——unelayed Input Oelay iy Conclusion : Here, yin —m) ‘Test 1: Response for delayed input (n), therefore the system is time inva tab yinwm) = Response for delayed inal ‘Test 2 : Delayed response Let y,{n) = Delayed response. of Conclusion: Here, yln—m) > y.(n), therefore the system is time variant ©) Given thet, y(n) Te jonse fordelayed input Let yin -m) = Response for delayed input. i) ar stem) mouse LI saiaesingas Tesport or ‘Test 2: Delayed response Let: y,(n) = Delayed response. 0) an vine ni) Tapia) Reape Deapedeeroace sym unde Dey Conclusion: Here yl m) = jd), therefore the system is time invariant. 1) Ohen thet, in)= $b, xing ‘Test 1: Response for delayed input Let yin—m)= Response for delayed input. 20) oom yen) fea snat LE Srge pr aspen or ‘seyesngat response for delayed input yin Html = $b xfn-m-X) ~ $a yin-m-K) 2.39 Digital Signal Processing ‘Test 2: Delayed response Let. y,(n) = Delayed response, Same Reem Bay aeayes gcse tala y= $b xo-D-$ a, yn Response for undelayed inpu Delayed response. y,{n) = 7 Hixn} hes $e $a yo-w ee ee Conclusion: Here yin—m) = y,{n), therefore the system istime invariant 2.83 Li ‘A linear system is one that satisfies the superposition principle. The principle of superposition requires that the response of the system 10 a weighted sum of the signals is equal to the corresponding. weighted sum of the responses of the system to each of the individual input signals Definition : A relaxed system His linear i ala, x0) +x 60)1 =a, Haan} +9, Hla) 223 for any arbitrary input sequences x,(n) and x,(n) and for any arbitrary consis a, and If a relaxed system does not satisfy the superposition principle as given by the above definition, then ‘the system is nonlinear The diagrammatic explanation of Finearity is shown in fig 2,20, ear and Nonlinear Systems aa.) an J x10) sinh ao oe feds sete) Hin ara 2 opr The cyte, Hie Sarita ail Ma 2(0) ea, acei =a Mela «4 Mi) Fig 2.20 : Diagrammatic explanation of linearity. totestfor linearity [Let x(n) and x,(n) be two inputs to system 4, and y,(n) and y,(n) be corresponding responses. 2. Considera signal. x(n ¥,(1) +a, x(n) which isa weighed sum of x,(n) and x,(n), 3. Let y,(n) be the response for x,(n) 4. Check whether y,(n) =a, y\(n) +a,y(n). If they are equal then the system is linear, otherwise itis nonlinear, Chapter 2 - Discrete Time Signals and Systems 2.40 Example 2.12 Test the following systems for linearity. adylad=natn) —Byyl=xw — yin) a) ind =B xl Solution @) Given that, y(n) = x(n) Let ofbe the system represented by the equation, yin) = nxln) ‘The system Hoperates on xin) to produce, yin). 2a} vn = at = 0x Consider two sifnals ,(n) and x(n). Let y\(n) and y,(n) be the response of the system 2 for inputs x(n) and x,(n) respectively. LG} re) = aint = 96m) 0) GFL + ln) = bein) © xin) a) \ ay\lad +a,y,(o) =a, nx lo) +a,nx,l0) Consider a linear combination of inputs, a, x,(n) +a, x,{n) = x,(n). Let y,(n) be the response for x(n). MGT} 1 « ix) \ yn) eg ye ¥{n) = 30x frdb= $F by xl — Jy ysln—m) 245 Digital Sigual Processing aiviibeaz viod=af $F b xln-an- ¥ eg yin md) a a ) +a 3 ba xan 3 en yaln-m) =) Consider a linear combination of inputs: a, x,(n) + a, o) Let y.{n} be the response forthe input x(n. yn) = afl = fla, x0) + a,x) BS by fay xm) + a Kn mS op ysl =a, 3 balms, F baighs—md- $F caylee on) By time invariant property, yin) = fa x(n) + a, x(n then y,(n =m) = Ala, x (nm + a, x,in—m)} Hy (a) = He (nl then y (nm) = be (nm) Hye) = Hen) then y nm) = ibe in —mb \ y(n an) = Ha, (om) + a, xml =a, bs (n= mb a, Hb nm =a\y\lo—m) + a,y,n—ml o Using equation (3), the equation (2) can be written as. viinben, $ haniocmdeay $ banlnemd= $c ngylo-m-en yl 1 ba xln-m +a, F by xin m—a, 3 Gy yin—ml—a, SY 6, yhn—md ( 3 ba xia m- Fe, vio-m| oa, 3 ba xn—m- 3 om vio a) ‘The condition to be satisfied for linearity is y,(m) =a, y,(n) + ay, From equations (1) and (4) we ean say thatthe condition for linearity is satisfied. Therefore the system is linear. 2.8.4 Causal and Noncausal Systems Definition : A system is said wo be eausal if the output of the system at any time n depends only on the present input, past inputs and past outputs but does not depend on the future inputs and outputs IF the system output at any time n depends on future inputs or outputs then the system is called noncausal system. ‘The causality refers to a system that is realizable in real time. It ean be shown that an LTI system is causal if and only if the impulse response is zero for n <0, (i.e. h(n) =0 for n<0). Let, x(n) = Present input and y(n) = Present output \ x(n = 1), x(M= 2)... ane past inputs yt = Vy yo = 2), sony te past outputs In mathematical terms the output of @ causal system satisfies the equation of the form, YO) =F [xEa), X= 1, x60 = 2). 1. (0 =2) el ‘where, F:]is some arbitrary function Chapter 2- Discrete Time Signals and Systems 2.46 Example 2.15 Test the causality of the followin ystems. €@) yln = x(n) —xln—2) by yind= J xk) Qylndebxlnd dy ylad = axl) Solution - €) Given that, y(n) = x(n) -x(n-2) Whenn=0,y(0)=x(0)-x(-2) > The response atn =0- i.e. yl) depends on the present input x(0) and past input xC2) Whenn=tylt=xitx1) > response at n = 1, ic. y(1} depends on the present input x41) and past input x1). From the above analysis we can say that for any value of ny the system output depends on present and past inputs. Hence the system is causal by Given that, yin)= xk) When n=0-y40)= 5, x = cat2)4x410440) ——-B_Theresponse at n=. yl depends onthe present input x(0) and past inputs x1, x2), = Sx 2-204 24-10 +240) +241) The response at n= 1, ie. (1) depends on the present input x(1) and past inputs x(0) xD x2). From the above analysis we can say that for any value of ny the system output depends on present and past inputs. Hence the system fs causal ©) Given that, y(n) = Bx(n) Whenn=0ryl0)=bx(0) > Theresponse at n=O i.¢. yl) depends on the present input x0). Whenn=1,y(1)=bx(1) > Theresponse at n= 1, i.e. y(1) depends on the present input x"). From the above analysis we can say that the response for any value of n depends on the present input. Hence the system is causal. 4) Given that, y(n) = n x(n) Whenn=0,y(0)=0x(0)» —_Therresponse at n=O i.e. yO} depends on the present input (0) Whenn=1y(t)=1°x41) > The response at n= 1, i.e ¥{1) depends on the present input x(1). Whenn=2,y2)=2~x(2) > Theresponseat n=2, i.e. y(2) depends on the present input x(2) From the above analysis we can say that the response for any value of n depends on the present input. Hence the system is causal. Example 2.16 Test the causality of the following systems, @) yin) =n) + 2x4n +3) by yin) xin) yin) = xn) A) yin) =x Solution {) Given that, y(n) = x(n) + 2x(n + 3) ‘When n=0,y(0)=x(0)+2x(3) The response at n=O, present input x(0) and fut v0) depends on the input x(3) 247 Digital Sigual Processing Whenn=1-y(i}=x)+2x4) The response atm = 1, i.e. y(1) depends on the present input x(1) and future input x(4). From the above analysis we can say that the response for any value of n depends on present and future inputs. Hence the system is noneausal b) Given that, y(n) = x(n") Whenn=—1 jy(D=x(1) > Theresponse at n =—1- depends on the future input x(1). When n= 0 ; yl) =x(0) > —_Theresponse at n= 0, depends on the present input x(0). Whenn= 1; yl) =x) B —_Theresponse atn= 1, depends on the present input x(1). Whenn= 27 y2)=x(4) > Theresponse at n= 2, depends on the future input x(4). From the above analysis we can say thatthe response for any value of n (except n =O and n= 1) depends ‘on future inputs. Hence the system is noncausal ©) Given that, y(n) = x(3n) Whenn=-1 i yD=xL3) The response at Whenn= 0 i yl) =x(0) —B —_—_Theresponse at n= 0 depends on the present input x(0). Whenn= 1 7 yt) =x) Theresponse atm= 1- depends on the future input x). From the above analysis we can say thatthe response of the system for n> O, depends on future inputs Hence the system isnoncausal. © Given that, yin) = xen) Whenn=-2 i yl-2)=x(2) > The response at n=-2, depends on the future input x(2) Whenn=-1 j yC-tex(t) The response at n= —1- depends on the future input x(1). Whenn= 0; yl0) =x(0) > The response at n= 0» depends on the present input x\0) Whenn= 1 yt) =x41) > —_Theresponse at 41, depends on the past input x(-3) depends on the past input x1) From the above analysis we can say that the response of the system for n [nw xin—my| |and absolute value can be interchanged. 5 ncn tn Forlinear system the order of ulipiation % [ree fat and absolute value can be interchanged. Iinputis bounded, then beqn=my) 1M, isindapentent of surwmation index m, Me 5 oy) Changeindexmton Inthosbove equation it S nca<= 228) ‘then the response y(n) ishounded. Example 2.17 ‘Test the stability ofthe following systems. cash by yle)=xL-n—3) y(n) = natn) 9} yl Solution ©) Given that, y(n) = cos b(n)] The Biven system is a nonlinear system, and so the test for stability should be performed for specific inputs. ‘The value of cos oles between ~1 to +1 for any value ofc, Therefore the output yin) is bounded for any value of input xin). Hence the Biven system is stable. bb) Given that, y(n) = x(-n-3) ‘The Biven systom isa time variant system, and so the test for stability should be performed for specific inputs. ‘The operations performed by the system on the input sinal are foldink and shiftin8. A bounded input sina will bounded even after folding and shifting. Therefore in the Biven system, the output will be bounded as long as input is bounded. Hence the Biven system is BIBO stable. 9 Given that, y(n) = nx(n) “The Biven system isa time variant system and so the test for stability should be performed for specific inputs. 2.49 Digital Signal Processing Case iz \fxin) tends to infinity or constant, as *n* tends o infinity, then yin) =n xin) will be infin tends o infinity. So the system is unstable. Caseii: Wxle)endsto 2010 a5" Sorthe system isstable, Example 2.18 Determine the range of values of *p* and "qt forthe stability of LTT system with impulse response, hind=p" i neo tends to infinity then yln) =n x(n) will be zero as fends to infinity. q’ i 20 Solution The conto o bests forthe sai ofthesysemis. 5M < Given that hin) =p i n<0 DPLEH = Dev dle] Lek JB es] ‘The summation of infinite terms in the above equation converts if 0 < /ipl-< 1 and 0 1 and iql <1 iro = Zor d Lor 3x" B (oa) ZU) 1 system is unstable. FIR and IIR Systems In FIR system (Finite duration Impulse Response system), the impulse response consists of finite number of samples, The convolution formula for FIR system is given by, y(n) = J) hom) x(n) 2.26) where, h(n)=0; forn Fig 2.22 : Cascade connected discrete time system and their eguivatent Brook ‘Withreference o fig 2.22 we can write, y4Ce) =x) +h (0) 2.48) yon) = y,(n) +0) 2.48) Using equation (2.48), the equation 2.48) canbe vrittenas, (A) = x(n) #h,(n) #h,C0) (0) = Ta) PAC) x(n) + hon) aan where h(n) =1, (a) +n) Fromequation (2.47) we can say thatthe overallimpulse response of two cascaded discrete time systemsis given by convolution of ndvidual impulse responses. 2.57 Digital Signal Processing Parallel Connected me Systems iverete ‘Two parallel connected discrete time systems with impulse responses h,(n) and h,(n) can be replaced by a single equivalent discrete time system whose impulse response is given by sum of individual impulse responses. ofa — al 1 hs) ht) }— Fig 2.23 : Parallel connected discrete time systems and their equivalent Froot With reference to fig 2.23 we canwrite, fa) =x(0) +h,(n) ¥, G2) = x(2) 0 yen) =.) + 9,00) @.50) ‘On substituting for ya) andy, (a) from equations (2.48) and (2.48) in equation (2.80) we get, yee) = [Ce) #0] + 2G) 9b, 281) By using distributive property of convolution, the equation (2.81) can be written as shown below, (n) (h,(o) +h,oo)) (a) « h(a) (2.82) sehore, h(a) =h,(n) +h,(=) From equation (2.52) we can say that the overall impulse response of two parallel connected) Aiscrote time systems is givon by sum of individual impulse responses. Example 2.20 Determine the impulse response for the cascade of two LT systems havin8 impulse responses, (Zf ato and h(n (g) um 5 3 Solution Let hin) be the impulse response of eascade system. Now h(n) is iven by convolution of h,(n) and h(n ho \ Wendy) =F nl fom) wheres lye dor onlin apeaton ii -(2)" + id= (2) 2 foom-(2) ‘The product h,(m)h,(n — mv) will be nonzero in the rane 0 € ote F nioniem= SEE = SATAY YS 5) lS 5 5) n, Therefore the summation index in the (ayo g f2xs\" 1v Som Beometric series. 3) 2, RY -G) 32 funbrmda ote Na(f etn: wrnze yo 3) Car} ay [ort nao 5 orate RENCE era) Chapter 2 - Discrete Time Signals and Systems 2.58 Example 2.21 Determine the overall impulse response ofthe interconnected discrete time systems shown below °) ») a] of fran} xt é 10 | am 0) be) pe fia] fa) riod = (2) vio ngi= (2) lens | ad= area) = nfi)= ala i hyd an 2 1) TheBiven system can be redrawn as shown below. The above system can be reduced to sinBle equivalent system as shown below. vo ‘ xo) ofa te nev mt = v ofr} +f] Hl sino Hoos Here: hin) = (n+ Ih od + ln) + Tho) © 1+ thylnd + (od Using distributive property Let us evaluate the convolution af h(n) and h(n). hod ad= Sal feed ‘The product of h, fm) h (nm) will be nonzero inthe rane Om d= Sah yl In this example the convolution oper ion is performed by three methods. ‘The Input sequence starts at n = 0 and the impulse response sequence starts at n =—1. Therefore the: ‘output sequence starts atn =0-+(-1)=—1. ‘The input and impulse response consists of 4 samples. so th Method 1: Graphical Method ‘The Braphical representation of x(n) and hia) after replacing n by m are shown below. The sequence hm) is folded with respect to m= 0 to obtain hm). output consists of 4 4.4—1=7 samples. xm) bina Pig 1: Input sequence. Fig 2: Impatse response, Pig 3 : Folded impulse response. ‘The samples of yin) a computed usin8 the convolution formula, yin) $ adm) hin 3 ai nd + where yn) = Hn “The computation of each sample usin8 the above eq ‘raphical representation of output sequence is shown in fi 11 tion are Braph ally shown in f8 4 to 8 10. The 2.63 Digital Signal Processing When n=—1; yl) > slim) htm) = SS xl hlm)= Yvon) The sum of product sequence vm) ) J Fig 4: Computation of (1). aves when 20 5 yd Fed lo-md =F ai tyind = Sv The sum of product sequence va(m) 4 Fig § : Computation of v0), Hig S:Competailowel vil gives y(0), « y(a)=2+2=4 When n=1i yit)= 3 xl) htm)= 3 xlm) him) = vilemd bumpa, xm) via. The sum of product sequence v(m) gives y(t). s ylt= 186405255 Fig 6 : Computation of (1) When n=2i yl2= F xb) 2- m= SF xlmd tyimd =F vite) bat) xm) The sum of product sequence vsim) Fig 7: Computation of 12). gives ya). = yl 142eibted Chapter 2- Discrete Time Signalsand Systems 2.64 when n=37 y3l= 3. xm) h—m)= Sxl) hytm = YS vim) yim) xi) 4 vstm) Fig 8: Computation of 13). the cum of product sequence vslm) alves (2h. yl0) When n=4: yla)= 3 xim) hla—m)= 5 xl) hylm)= 5 vat) hatin) xin) 405+ 5 The sum of product sequence v,(m) Fig 9 : Computation of y(t ig 9: Comp JME Gives ya). o. ¥et)= 0541-05 When n=Si y(5l= ¥ xlm WS—m)= 5 xindhgimd= veld 2 x = th. 1 lyr, a Fig 10: Compatation of ¥(5) The sum of product sequence vs(m) gives y{5). 2. y(8) = 1 he output sequencer yin) = [le 41 5.5 3+ 0.5 05» i} Fig 11 : Graphical representasion af x(a). 2.65 Digital Signal Processing Method Tabular Method The fiven sequences and the shifted sequences can be represented in the tabular array as shown below. ‘Note: The unfilled boxes in the table ave considered as zer0s m a3 -2i/aloli|2|3lals leo atm) a] 2/os| 4 him) rf2l{afa him) altiteti ht-mehim a) 2 | 110 —m) = hm) afifeti it =m) = hm) ajoleta 12 —m) = hm) afafeta nS —m) = hm) afafata ha —m) = hm) aftfett 115 —m) = hm) a [ifeia Each sample of y(a) is computed usin§ the convolution formula, yi) = xl Maem) = xb) hylls where hylen) = lnm) ‘To determine a sample of yln) at n= q, muliply the sequence x(m) and h,(m) to Set a product sequence {ies multiply the coresponding clement ofthe rw en) and yn). The sum of al he sample ofthe prot soaonnon Bes) When F ylt= Sxl) hind The product is valid only form =—3 10 +3. = xa) h 3) 4 x2h 24 xh 1) + x0) h (0) 4000 0) ++ x12) h_(2) 4x63) h,) =0404041404040=1 ‘The samples of yin) for other values of n are calculated as shown forn = 1. When =0 + yl= J xin) hylm)=040+2+2+0+0=4 When n=1 5 xlin) hylmd =0-414440540=5.5 Y xd gl) = 14 2414123 When n=2 7 y(2 Whenn=3 5 y=. xlm)hylm)=0-240.542+0=05 When n=4 i yld)= S) xlen) hylm) =0+0-0.54140+0=0.5 When n=5 7 y(5)= 35 xl hylm)=04040-14040+0—-1 Theo soien yO) = (1 $880 08:0 =} Chapter 2- Discrete Time Signalsand Systems 2.66 Method 3: Matrix Method he input sequence x(n) is arranted as a column and the impulse response is arranteed as a row as shown below. The elements ofthe two-dimensional array are obtained by multiplyin8 the corresponding row element the column element. The sum of the diaBonal elements Bives the samples of yn. hind» pf td rez net 1xtn 2) 2x1 2%2 2x1 2a = 05] 0.5%1 05x205x1 05xC) vfaxt rz ner axe yen yG)=2405+62)=0.5 yO=2+ yid=1460.5=05 | \ 30505} y= 054441255. - yolate14241e3 Example 2.23 Determine the output yin) of a relaxed LT system with impulse response, hin) ‘When input isa unitstep sequence, ie. xin) = un). Solution “The Braphical representation of xin) and hin) after ceplacin n by m ate shown below. Also the sequence xl) is folded to Bet xm), 'uln) + where lal <1 and fe eee him) Fig 1 : Impulse response. Fig 2: Impulse sequence. Fig 3 + Folded input sequence. Here both him) and xm) are infinite duration sequences starting at n=0. Hence the output sequence yin) «will also be an infinite duration sequence starting at 9 By convolution formula, yla)= J im) xla—m= 3° Wem) xm) i where x, (em) = xin—m) “The computation of some samples of y(n) usin the above equation are Braphically shown below. 2.67 Digital Signal Processing When n=0 i ylol= J him) xdo-m)= 3, im) xalm)= 3° vel) wt ond) te x = tes ® Sa Te Fig 4 : Computation of 0) wos When m=1 + ylt)= SS bm) x(t mn) = Sind had = $d in)» xia) 4 (ay | “ x = i Fig 5 : Computation of x(1) When n=2 7 yl2)= 5 Nim) x2—m)= Shim) xslm)= Svs tm) sm) Fig 6 : Compatasion of ¥(2) WE) nt ones Solvint similarly for other values of n, we can write yn) for any value of n as shown below. yO=teatats.utats 3a? 5 forn20 Fig 7 : Graphical representation of y(n). Chapter 2- Discrete Time Signalsand Systems 2.68 2.10 Circular Convolution 2.10.1 Circular Representation and Circular Shift of Di rete Time Signal Consider a finite duration sequence x(n) and its periodic extension x,(n). The periodic extension of x(n) ccan be expressed as ,(n) = xin-+N), where Nis the periodicity. Let N=4. The sequence x(n) and its periodic extension are shown {n fig 2.24 Let, xin)= 15 0 =0 1 3 s(n), Fig 2.24a:: Finite duration sequence x(n), Fig 2.24b : Periodic extension of x(n) Fig 2.24 :A finite duration sequence and its periodic extension Let us delay the periodic sequence x,(n) by two units of time as shown in fig 2.25(a), (For delay the sequence is shifted right), Let us denote one period of this delayed sequence by x,(n). One period of the delayed sequence is shown in fig 2.25(b). Ne) +302, Fig 2.250: x,(0) delayed by two units of time. Fig 2.256: One period of x{ Pig 2.25: Delayed version of x,(n) 2). ‘The sequence x,(n) can be represented by x,(n-2, (mod 4)), or x((n~2)},, where mod 4 indicates that the sequence repeats after 4 samples. The relation between the original sequence x(n) and one period of the delayed sequence x,(n) are shown below. (0. 2, (mod 4))= x (0-2), \ When n=0; x(0)=3,(0-2), When n= 1; x,(1)=x((1-2) =a), Whean x (2-20, {(0)), = 0) When n=3; 3,()=%(3-2) 40), =80) 20 Digital Signal Processing ‘The periodie sequences x,(n) and x,(n) can he represented as points on a citele as shown in fig 2.26. From fig 2.26 we ean say that, x(n) is simply x,(n) shifted circularly by two units in time, where the counter clockwise (anticlockwise) direction has been arbitrarily selected for right shift or delay. SOOO 7 ABR. on ea wal? Fig 2.26a: Circular representation of x(a), Fig 2.26b: Circular cepresemtation of xn) Fig 2.26: Circular representation of a signal and its delayed version. Letusadvance the periodic sequence x,(n) by three units of time as shown in fig 2.27(a). Letus denote ‘one period of this advanced sequence by x,(n). One period of the advanced sequence is shown in fig 2.27(b). x,(0-43) x00) Hid =mllo Fae Fig 2.274: 5,01) advanced by three units of time. Fig 2.276: One period of 1043). Pig 2.27: Advanced version of x1) The sequence x,(n) can be represented by x,(n-+3,(mod 4)) orx,((n43)), where mod 4 indicates thatthe sequence repeats after 4 samples. The relation hewween the original sequence x(n) and one period of the advanced sequence x,(n) are shown below. x(n) =x,(n+3, (mod 4))=2,((043)), \ Whenn=0; x(0}=%,((043), =%,(G)),=x)=4 When: x1) =4,(143)),2%,(4)),=x10)= 1 2; x2)=3,(2+3)),=%,(5)),=x(1)=2 Whenn=3; x,8)=4,(343),=4((6),=32)=3 When: ‘The periodie sequences x,(n) and x(n) can be represented as points on a citcle as shown in fig 2.28. From fig 2.28 we ean say that x,¢n) is simply x,(0) shifted circularly by three units in time where clockwise direction has been selected for left shift or advance. OOOO wee 8-8 Pig 2.284: Circalar representation of x(a). Fig 2.280: Circular representation of fa). Fig 2.28: Circular representation of a signal and its advanced version Chapter 2- Discrete Time Signals and Systems 2.70 Thus we conclude that a circular shift of an N-point sequence is equivalent to a linear shift of its periodic extension and viceversa. Ifa nonperiodie N-point sequence is represented on the circumference of circle then it beeames a periodic sequence of periodicity N. When the sequence is shifted circularly, the samples repeat afterN shifts. This is similar to modulo-N operation. Hence, in general, the circular shift may be represented by the index mod-N. Let x(n) be an N-point sequence represented on a cirele and xn) be its circularly shifted sequence by m units of time Now, xén)=x(a—m,mod N) * x(n-m)), (253) ‘When m is positive, the equation (2.53) represents delayed sequence and when m is negative, the equation (2.53) represents advanced sequence. 2.10.2 Circular Symmetries of Discrete Time ignal “The citcular representation of asequence and the resulting periodicity gives tse 1o new definitions for ‘even symmetry, odd symmetry and the time reversal of the sequence. ‘An N-point sequence is called even if it is symmetric about the point zero on the cirele, This implies that, x(N-n) = x(n) (254) ‘An N-point sequence is called odd if it is antisymmerrie about the point zero on the circle. This implies that, x(N-n) =~ x(n) ; for OfmEN- for OfnEN-1 (2.55) ‘The time reversal of a N-point sequence is obtained by reversing its sample about the point zero on the Circle. Thus the sequence x(-n, (mod N) is simply written as, x(n,(mod N)= x(N-n) 5 for O€n€N-I sve (2.56) This time reversal is equivalent to plotting x(n) in a clockwise direction on a circle, as shown in fig 229. wr tr Pig 2.29: Circular representation of an 8-point sequence and its folded sequence 2.10.3 Definition of Circular Convolution The circular convolution of two periodic diserste time sequences x,(n) and x(n) with periodicity of N samples is defined as, J sym) ss(=m)g) oF | stn 1m) xy((n=m))y 257) xin) where, x,(n) is the sequence obtained by circular convolution, 4,((n-m))y represents circular shiftofx,(n) x4{(n-m)), represents circular shift of xn) misadummy variable, 271 Digital Signal Processing ‘The oucput sequence x (n) obtained by circular convolution isalso a periodie sequence with periodicity of N samples. Hence this convolution is also ealled periodie convolution The convolution relation of equation (2.57) can be symbolically expressed as x) = KIO) = Ox) where, the symbol@ indicates circular convolution operation, ‘The circular convolution is defined for periodic sequences. But circular convolution can be performed with nonperiodic sequences by periodically extending them.The citeular convolution of two sequences requires that, atleast one of the sequences should be periodic. Hence itis sufficient if one of the sequences. is periodically extended in order to perform circular convolution, ‘The circular convolution of finite duration sequences can be performed only if both the sequences. consist of the same number of samples. Ifthe sequences have different number of samples, then convert the sinaller size sequence to the length of larger size sequence by appending zeros, Circular convolution basically involves the same four steps as that for linear convolution, namely, folding one sequence, shifting the folded sequence, multiplying the two sequences and finally summing the values of the product sequence, Like linear convolution, any one of the sequence is folded and rotated in circular convolution ‘The difference hetween the two is that in circular convolution the folding and shifting (rotating) ‘operations are performed in 4 circular fashion by computing the index of one ofthe sequences by modulo-N operation. In linear convolution there is no modulo-N operation. 2.10.4 Procedure for Evaluating Circular Convolution Let, x\(n) and x,(n) be periodic diserete ime sequences with periodicity of N-samples. If x(n) and ,(n) are non-periodie then convert the sequences to N-sample Sequences and periodically extend the sequence (0) with periodicity of N-samples. Now the circular convolution of x(n) and x,(n) will produce aperiodic sequence x(n) with periodicity ‘of N-samples. The samples af one period of a,(0) ean be computed using the equation (2.57). The value of X,(n) at n= q is obtained by replacing n by q. in equation (2.57), 1 xs) = Ym) x(a )y 259) The evaluation of equation (256) determine the value of x,(n)at=q involves the following five steps. L.Changeotindex. Change the index nin the sequences x\(n) and x0) in order to get the Sequences (m) and x). Represent the samples of one period ofthe 2.Folding £ Pold.x,(m) about m=0, o obtain x,(-m. 3.Rotation Rotate x,(-m) by q times in anti-clockwise ifq is positive, rotate x,(-m) by agtimes in clockwise ifg is negative to obtain x,((q~m)),. 4.Multiplication Multiply xm) by x,((q~m)), to get a product sequence. Let the product, sequence be v,(m), Now, v,(i) = x,(m) x x,(q~10). 5.Summation + Sum up the simples of one period of the product sequence v,(m) to obtain the value of x(n) atn= 4 fie. x) ‘The above procedure will give the value of x,(n) ata single time instant say n=, In general we are {interested in evaluating the values of the sequence x,(n) in therange O ° N=2) %Q(N=3) XQ(N=4) oe (OD XG(N=D) x(N-2] | xn xN-} | x¢N-0. R(N=1) (N=2) (N39) ae QM) (0) Example 2.24 Perform circular convolution of the two sequences, x(n) = (2,12 2,—thand x(nd= (1213-41 Solution ‘Method 1:Graphical Method of Computing Circular Convolution 1ed by circular convolution of x,(n) and x(n The circular convolution of x,(n) and x,(n) is Biven by, xsl) x, (la ml), Let x,(n) be the sequence obt where x,,(em) = x,((n—mm))y and m is the dummy variable used for convolution ‘The index n in the Riven sequences are chanted to m and each sequence is represented as points on a circle as shown below. The folded sequence x,(-m) and cireulatly shifted sequences x,0-m) are ako represented ‘onthe circle. nielen 10)=2 10) ~1) 2) 29) (0) =1 Fit Fig? fies Nien Circularly shifted C uacteretlare Chapter 2- Discrete Time Signals and Systems 2.74 ‘The Biven sequences are 4-point sequences. \ N= 4. Each sample of x(n) Is Biven by sum of the samples of product sequence defined by the equation, yl) = 3 xl) xzalind= J vali) 5 where vlon = Cm) x _C) Usin8 the above equation (1) Braphical method of computing each sample of, (n) are shown in 85 to f8 8. ) When n= 0 x,(0)= Dy yl) x,0~ m)), = 2 fr x, om) = x volo) When n=1 5 x(i)= 3 yl) ,(C1— my = Dx selon x, = vile . The sum of samples of vim) gives x31) Fig 6: Computation of 6(1). .. yy(s) =4-4148-9 =10 Fan) xf(2=m, =F nls l= 3 wld When n= 2; x,(2) The sum of samples of v-(m) gives x,(2) Fig 7: Computation of (2). -. x,(2)=8 +2 +2-4=8 When n= 34) So xlm (B= mm, = Sx ltnx,slmd= $F vylmd The sum of samples of va(m) gives x3(3) Fig 8: Computation of (3), xy(3)=8 43 44-1214 \ (0) = (10, 10,6141 275 ‘Method 2: Circular Convolution Using Tabular Array Digital Signal Processing ‘The index nin the Biven sequences are chanted to m and then, the Biven sequences can be represented in the tabular array as shown below. Here the shifted sequences x, ,(m) are periodically extended with a periodicity of N = 4. Letx,(n) be the sequence obtained by convolution af x,(n) and x,(n). Each sample ofx fn) is Even by the equation, 1660) =F fed x4 Dy = xl) gals where xpqlm) = x,(9— Vy [Note:The boldfaced numbers are samples obtained by periodic extension. m 3] aT °], 1] 2] 3 xin) 2/1] 2 [a xm) 1f2[3]4 (Cen) a[3j2[1[4]s3]2 xem), aja; 2[1)/a4fa x(Q—m) | a/3]2 ,4|4 (C= mi), =, fm) af3a],2|a To determine a sample of x,{n) at n = qr mult ly the sequence, xm) and x,.,im):to Bet a product jence %;{rm) xm). li.c.r multiply the corresponding c the samples ofthe product sequence fives x(q). sments of the row x,(m) and x, ml. The sum of all When n= 07 x00) = 3) xf) xa) = (0) x30) + (1 xyol1) + x02) x29(2) +x) 26) = Dx TE 1x4 2x34 CDX2=24446-2=10 ‘The samples of x,(n) for other values of n are calculated as shown forn = 0. When n=1i xs(0)= 3) elm) x,,(m)=44 148-3210 Bed gd = 64.24 2- When 0235 xj0)= 3) alin) x,sfm)= 84364 xo) = [10-10 6 14} When n = 2; x,() ‘Method 3 Circular Convolution Using Matrices ‘The sequence x(n) can be arraned asa column vector of order N ~ 1 and usin the samples of (7) the IN Nmatrixis formed as shown below. The product ofthe two matsices Bives the sequence x(n). x00) x) x2) x) flo] fx, (09 x x0), | [x0] |x %2 x0 x0) x00] |x,02)| * |x,(20 x8 x x x 0) [x31] [xy Chapter 2- Discrete Time Signals and Systems 2.76 14 3 BLA) paxaeaxteaxae2xt) 10 2 1 4 alla] _ axaetxteaxaesxa]_ 10 32 1 4 [a] ~ |ax2e2xreix2eax-1]" | 6 432 alba] [aezesxteaxzerxa} [ra \ x{n) = 110, 10, 6,181 Example 2.25 Perform the circular convolution of the two sequences x(n) and x(n) where, xylo)= {0.21 0.4 0.6 0.8, 1.0, 1.2, 1.4, 1.6) x(n) = [0.1 0.3, 0.5 0.7, 0.9, 1.1, 1.3 1.5} Let (m) be the result of the circular convolution of x(n) and x (n). The Biven sequences consists of ei8ht samples. Then x,(n) will also have 8 samples. “The sequences are represented in the tabular array as shown below after replacing m by m. The sequence. x {m) is folded and shifted. The shifted sequences x, ,'m) are periodically extended with a periodicity of N Note : The boldfaced numbers are samples obtained by periodic extension [4 [3 al ol 1[2]3 [4] 5]6 |? 0.2) 0.4) 0.6/0.8 |1.0/ 1.2/1.4 1.6 0.1] 0.3] 0.5/0.7 [0.9 | 1.1/1.3 [1.5 1.1]o9 [0.7 Jos |os| 0.1) 15] 1.3/1.1 |o9/ 07/05 03 1alts [oo for |os| os) 0.1] 1.5/1.3 [11/09/07 |os 15]13 | 1.1 [09 |o7| 0.5] 0.3) 0.1/1.5 |13/ 11/09 |o7 15 | 1.3 [1.1 [09] 07) 05/03/01 [15 [13/14 [09 1s |13 | 14] 09/ 07) o5]os for] 1.5/1.3 |1.1 15 [13] 1.1] 09/07/05 [osloalis [13 15] 1.3) 11/09/07 [05 /os|o1 [15 18] 13| 11Jo9 |o7 | oslo for Each sample of is ven by he equation, ssf) = J, nd x =m, = J 6m) pn) > where x, fn) = (9m, ‘The samples of x (0) are calculated as shown below. 277 Digital Signal Processing When n= 0; x,ln)= Y, xen) x,((0—ml)y = J. xm) x, 96m) 5 ¥(0) (0) + 41) 91) #402) 929+ 48) 5 0) (4) x 94 +05) 2,95) +06) 9 (6) + x47) x, (7 = 0.02 +0.6-+0.78 40.88 +0.9 + 0.84 +0.7 40.48 =5.20 “The samples of x,(n) for other values of n are calculated as shown forn = 0. 00 When n= 25 x= J xem x,((2-m), = J alm x, afm) = 648 When n= 35 x50)= Sxl) «(3 m)y = Salm) sli = 6.64 When n=4) (4) = J, xl) x,(4—mily = SS xm) x, ln) = 6.48 When nedt Gm Fld lm Sil eld When n= 67 x06) = Y. x(n) x,(6— ml), = 3) xilm) x, l= 20 When 27: x)0)= $n = $l fd = 408 xl0)= (520 6.00, 6.4 6.64% 48 6.00, 5.20, 4.08) Example 2.26 Find the linear and circular convolution of the sequences: xin) = (1 0.5} and hin) (05) a) Sok Linear Convolution by Tabular Array Let yad=fn)-Nn)= 5 xn) Wn where mis my vara for conekon Since both x(n) and hi) starts at n=0- the output sequence y(n) will also start at n = 0. 3 Since the lenfith of x(n) and hinds 2, the lenBih of yinbis 2 +2 Let us chan the index n to m in x(n) and hin). The sequences xl) and him) are represented in the {tabular array as shown below. ‘Note : The wnfitled baxes in the table are considered as zeus. ™ = a T 2 x) 1 oo im) 05, 1 hem af 05 hm 1 os h2—m)= hl) | 1 | os Chapter 2- Discrete Time Signals and Systems 2.78 ach sample of yin is Biven by the relation od = 5) abn hina xo yl) where hen) = har) em) fl) = x1 hy -19 x0) lO) +x hl = Os 15105+0570-0+05+0-05 When nat yD = 35 xl) Hm) =. xt) hyim) = 19 0.2 xen) Med = Sale byl When F yl0)= Y. xl) Wm) When n=27 yl yin) = (0.5, 1.25, 0.5} Circular Convolution by Tabular Array Let ya) =x40) @hind= "Fwd Mom), 5 where m sa dummy variable for convolution, “The index inthe sequences are chanfed tom and the sequences are represented in the tabular array as shown below. The shifled sequence hy inl is periodically extended with periodicity N= 2 ‘Note: The boldfaced number is the sample obtained ly periadic extension m a [oe]? xm) 1 | os nd os [1 hm), 1 [os [a Gm), = 1 | os Each sample of yin) is Biven by the equation. 60) = xn) hn — my = "Sx yl: where hy) = ila — my When n=07 yl0)= Sx) H(O-m)), = > xm) helen) = M0) hy (0) +x(1) hyl)= 150.54 0.5 «1=0.5 + 04 When mt y6t)= "SS" slam C1 m= Sxl) byl) = x(0) h(0) + x(0) ht) = 1514 0.50.5 = 14 0.25 = 125, 2 yla) = {1.0, 1.25} . Example 2.27 1 x(n) and impulse response h(a) of a LT system are Biven by, adn) = 14,1, 2-2) shin) = 10.5, t 1 12,075) Determine the response of the system a 1sinf linear convolution and_b) usin circular convolution. 2.79 Digital Signal Processing Sol a) Response of LT! system using linear convolution Let y(n) be the response of LTI system. By convolution sum formula, slo) =xbn) bind = $ alm) lnm) + where m ie dummy variable used for convolution. ‘The sequence x(n) starts at n= 0 and ha) starts at n= 1. Hence yin) will start atin = 0.4 (1) = 1, ‘The lenfth of x(a) is 4 and the lonth of hin) is 5. Hence the lenfth of yln) is (4 4.51) = 8. Also yin) ends at n=04 44 45-2)=6, Let us chan8e the index n to m in x(n) and hin). The sequences x(m) and him) are represented on the tabular array as shown below. Let us fold h(m) to Bet h(-m) and shift h(-m) to perform convolution operation. Vote: The unfilled baxes in the table are considered as zeros. ™ —4[3/2[4]o|/1]/2[3]4|s][e|7 a 1[2[2 1 | -1| 2 [ors lo7s| 2 | 1 0s 075 os 1 [os a] a jos 075] 2 [1 1 [os L Jars) 2) aft os Each sample of y(n is iven by summation of the product sequence, x(m) hin ~ ml. To determine a sample of y(n) at n = q, multiply the sequence xm) and h,(mn) to Bot a product sequence li.e., multiply the ccorrespondin8 elements of the row x(m) and b,(m)|. The sum of all the samples ofthe product sequence Bives ¥ nd hind = YF adm) lm) ken yin When m= 17 9-1 ade bd = MCAD CAD XC) 3) x62 24 xD 1) + x0) h 0) se x(1) (1) x02) (2) ex) 3) = 0+04040+60.5) +040+0=-05 ‘The samples of yin) for other values of m are calculated as shown for n =~1 When n=0; y(0)= J, xm) holm) =0+04046-114054040=-05 When» i ylt)= Y xl fon) O10 8141416003 When n=2: y2)= J xm hylmd=0 4-2) 4-1062 41 Chapter 2-Diserete Time Signals and Systems 2.80 When m3 5 y3)= S xlen) hyn) = 0.7542 6620462406275 + yla)= J aden hylm) =0+0.754442404 When» When n (= 3) xl) hylmn) 04041544 40404 When 9 § yl6)= Yl) byl) =0404046-15)4040404 ‘The response of LTH system yln) is: (0.5105, 3,-2,-2.75,6.75,-2.5+1.5) yn) b) Response of LTI System Using Circular Convolution ‘The response of LT systom is Biven by linear convolution of xin) and hin). Let yin) be the response sequence of LTI system. To Bet the esul of linear convolution from circular convolution, both the sequences should be converted tothe size of yln) and perform circular convolution ofthe converted sequences. Also the Converted sequences should start and end atthe same value of nas that of yin). ‘The lenéth of x( is 4 and the length of has 5. Hence the enkth of yin) is (4 +51) = 8. Therefore both the sequences should be converted to 8-point sequences. ‘The xln) starts at n = Oand hin) startsat n = —1. Hence yin) will start at n=0-+ C1) = —1. The yl wil (0-+L101+(4+5~2)=6, Therefore the converted sequences should stat at n =—1 and end at n= 6. \ xl) end at (0,1, 2+=2,0,0, 0) and hin) = (0.5, 1/1, 2,0.75,0, 0,0), ‘The converted sequences xin) and hin) are represented on the tabular array after replacin® the index n by mas shown below. The sequence him) is folded and shifted “The shifted sequences h, mm) ate periodically extended with a periodicity of N=8. (Note: The boldfaced mumbers are samples obtained by periodic extension of the sequences. 7m ey] 4] > TPO] 1] 2] 3] 4] 5] 6]7 xi) of-t[t[2/2 im os] t 075] em) o| 0 o7s|2/a[1 WC — ml, =h im] 0 0 o7s 2 [1] 1 fos|o (0.75 2 [-1| 1 (Omi), =n) 0 | 0 (o7s| 2 |-1[ 1 fos) @| 0 | 0 lors 2 |-1 h(t —m), = ln) 0 0 os| 0/0 | 0 |o.75| hm), =m) olo 1 [os 0 [ozs hG—m)), =m) 0 =/1foslol|o hm), = hen) 2/41] 1 [05/0 1G —m)), =n) of oo prs 2 [| 1 os MG—m),=hfm) [o [0 |o.75 2 1 fos] o]o/o ors) 2-1] 1 los Let yin) be the sequence obtained by circular convolution of x(n) and hin) Now, each sample of yin) is iven by, ylod =) xem lnm), = 3) xe hyn) 5 where hylm) = hin), 281 Digital Signal Processing ‘To determine a sample of yin) at len) byl) Fis. mult product sequence | uliply the sequence xin) and hy(m to Bel a product sequence th carespondn elements he ow xian. Te sual he samples ofthe csylal. Whom m= 12 y= SS xl had = Dh EA + 6 (0) +340) bx) 4 (3) (3)-4 x04) (4) 4 265) 68) + 46) (6 =0+60.5)+0+04040+0+0=-05 ‘The samples of yln) for other values of n are calculated as shown for n When n=0; ylo)= ¥) xm) hym=0+(-1)40.5+040+0+0+0=-05 ‘When bytt)= xm) hyn 3 ylad= 3 alm) hym =0+C-2) 414 24-140 404 D41414140404040 ‘When When 0.4-075)4.2462)46-2)404040=-2.75 ‘When 0+040.75444240404 6.75 When 0404041544) 404040 ‘When 04040404-1.9)40+040 “The response of LTH system yin) is: yin) = 0.50.5 BeBe -2.75 6.751 —2.51 1.5) ‘Note: 7, Since circular consolation is periodic, the convolution ts performed for any one period. 2, Itcan be observed thatthe results of both the methods are same, 2.11 Sectioned Convolution ‘The response of'an LTI system for any arbitrary input is given by linear convolution of the input and the impulse response of the sysiem. Ione of the sequences (either the Input sequence or impulse response sequence) is very much larger than the other, then itis very difficult fo compute the linear convolution for the following reasons, LL The entite sequence should be available before convolution ean be carried out. This makes long delay in getting the output. 2. Large amounts of memory is required to store the sequences, The above problems can be overcome in the sectioned convolutions. In this technique the larger sequence is sectioned (or splitied) into the size of smaller sequence. Then the linear convolution of each section of longer sequence and the smaller sequence is performed. The output sequences obtained fom the cconvolutions of all the sections are combined to get the overall output sequence. There are two methods of sectioned convolutions. They are overlap add method and overlap save method. image not available image not available image not available 2.85 Convolution of Section 1 A Digital Signal Processing end Hol $ led Nom) = Sl hyd sm = yt? where hal) = hom) When n= 0; ys(0)= 3 xilm) hylmd = 0-140— 1 When n=1; ys(t)= 5 fin) hylen) = 141 When n= 27 y\(2)= 5 xin) h(n) = -140 yildared a= Said Mm 4 = Yl hyn) in = 20304 where byl) = bln — mm) When n= 2 y,(2)=, xslm hy(m) =0-2+0=-2 When n= 37 y,()= 5 xl) him) =242 = 4 Ty] When n= 43 y(4) = ¥) xsl) hylm) = 0-2+0=-2 2[3 |4]5]6 33 tia ria 1 [4 yale) = x,l0) © nd When n=4; y,(4)= 3, xsl) hylim) =0- 3+ When n= 5 ys()= 5) x(n byl) = 3.43 When n= 6: ys(6) <3. xylm) hylen) = 0-3 Convolution of Section 4 ¥ xsl bn md 5.6 EF sul him) where hy) = hom) 3 ™ ape[1][?,;3[4|[s|,*e*|7]8 xin) 4[a nd 1 hm) 1 NN6—m) = him) tia 1 [a image not available image not available image not available 2.89 Digital Signal Processing Method 2 In method 2, the overlapping samples are placed at the end of the section. Each section of longer sequence is converted to 3-sample sequence usin8 the samples of ori8inal lonBer sequence as shown below. {i can be observed that the last sample of x,(n) is placed as overlappin8 sample at the end of xn. The last sample of x {n) is placed as overlappin8 sample at the end of x.(n). The last sample of x,(n) is placed as ‘overlappinB sample at the end of x(n}. Since there is no previous section for x,(n), the overlapping sample of x(n) is taken as 2010. xinl= 17 n=O) xlnb= 25 9 1 xin)= 3) naa [xinl= 4; n=6 tin ain Ain 7 0; n=2 =2in Si a Now perform circular convolution of each section with h(n). The output sequence obtained from circular convolution will have three samples. The circular convolution of each section is performed by tabular method as. shown below. Here hin) starts at n=n, =0 x(n) starts at n \ y\(n) will stant ata =a, +n, x(n) startsatn= \ y,Cn) willstanata=a, 49, x(n) starsat n \ y,(0) will stan ata x,(n) starsat n \ yn) will tart atn =n, 49, Note: 1 Here N,=8,N,=2,Nj=2\ (N,-W)=2—1=1 and (N,+N,-1)=2*2-1=3] 2. The boldfaced numbers inthe tables are otained by periodic extension 4. For convenienes of coobaton the index nis replaced by m in x(n), x(n) x,(n), (nm) and Kn) omrliionf Son 1 Video ita: F ake ial, m 2] ]e]1]2 oem Pc) 1 0 ¥ nil yim)? n=O, 1, 2 Med ifo Sener hd = Mla [Aicachlont_[0: | 3 © 11 | when n= 07 ys0) = 5, xlm) helm) =-1+ 0+0= HGsmijshin|| | o_| © When =17 y=, mlm) himd= 14140= 2 N2-m) ol When n= 2: y2)=¥. x(n) hylm)= 0-1 0 = a 2a ff 2 fs fa “xia 2 [2 ind 1 10 Nem) oa 12 =m, hl) on ° HG =m, hn) 0/1 [ae Hilal), shin) | | Dope fa image not available image not available image not available 2.93 Digital Signal Processing Convolution of Section 3 ™ 77°] ']2)3]4)]5 7]*®]9)]© xin) a|[s[e rd fafa jay hem=hm || a | 2 6 —m) = hind ali[2 N7—m) = hyn) 2 Na—m) =h(m) 1[2 9 —m) = lind afi [2 h10—m) =, (m) | | afar l2 Vilas Made Sexi em = Fale) Rid? 0267.8 9410 —_ whore fyi) = Hin m) yi6) =¥ wad him)=0+048+0+0 = 8 yal7) =, sm) hymn) = 0444 10-40 yi8) = 3, 6) hyd V9) = Emin) hind=0-5+640 = 1 07 yit0)= 5, xen hylmd=0+0-6+ 0+ ‘When n ‘When a When n 45412 When n When a To. Combi the Output of the Convalution of Each Se« It can be observed that the last N, ~ 1 sample in an output sequence overlaps with the first N, —1 sample ‘of next output sequence. In this method, the overall output is obtained by combining the outputs of the convolution ofall sections. The overlapped portions (or samples) are added while combinin8 the output. ‘The output ofall sections can be represented in a table as shown below. Then the samples corresponding to same value ofn are added to Bet the overall output eo], 2] 3 25 ya) ya) yc) vlad a] 9 | 10 2 \ yled = xn) + Ala) = (2,5, 7) 1p 81-7, 7-17-13, 1-6) b) Overlap Save Method In this method the longer sequence is sectioned into sequences of size equal to smaller sequence. The ‘number of samples that will be obtained in the output of linear convolution of each section is determined. Then ‘each section of lonfer sequence is converted to the size of output sequence using the samples of original lonBer sequences. The smaller sequence is also converted to the size of output sequence by appendin8 with zeros. “Then the circular convolution of each section is performed. 7 Here x(n) isa longer sequence when compared to hin). Hence x(n) is sectioned into sequences of size ‘equal to hin). Given that xin) = 1, 23,1, -2--3e 4, 5,61 Let xin) be sectioned into three sequences each consistin8 of three samples as shown below. Let N, = Lenfth of lonfer sequence N, = Length of smaller sequence N, =N, = Length of each section of longer sequence. image not available image not available image not available 2.97 Digital Signal Processing Now it can be proved that, hin) * han) = ain) v2.60) ‘Therefore the cascade of a system and its inverse is identity system. Proot: ‘With reference tofig 2.98 we can write, yn) = x(n) + hay 28) en) = ym) “hae (262) ‘Onsubstituting for y(n) from equation (2.61) in equation 2.62) we get, em) = x(n) “hea +e) (2.83) Inequation 2.63), if, ngs) hea) = a), thom, x(n) afm) =2(=) Ina inverse system, w(n) = x(n),andso, 1x) sha) = afm). Hence proved. 2.12.2 Deconvolution In an LTI system the response y(n) is given by convolution of input x(n) and impulse response h(n), ie, yom) =xin) + hen) The process of recovering the input from the response ofa system is called deconvolution. (or the process of recovering x(n) from x(n) * h(n) is called deconvolution}. ‘When the response y(n) and impulse response h(n) are available, then the input x(n) can be computed using the equation (2.68). x(n) = [yay — xe yn =m on(.64) 0) 5 [20 ~ 3 xem bom Proot: ‘Lot x(a) and h(n) be finite duration sequences starting from n= 0, Consider the matrix method ‘ef convolution ofx(n) and h(a) shown below. a) 1 image not available image not available image not available 2.101 Digital Signal Processing Properties of Correlation L. The erosscorrelation sequence +,,(m) is simply a folded version of , (mm), ie fom -m) Similarly for autocorrelation sequence, 1.4m) = 4,.(-m) Hence autocorrelation is an even function, 2. The erosscorrelation sequence satisfies the condition, frst < YRC my = where, E, and are energy of x(n) and y(n) respectively, On applying the above condition to autocorrelation Sequence we pet, froin] $0), From the above equations we infer that the crosscorrelation sequence and autocorrelation sequences attain their respective maximum values zer0 shiftvlag. 3. Using the maximum value of crosscorrelation sequence, the normalized crosscorrelation sequence is defined as, Pai) < eo Yu, O Using the maximum value of autocorrelation sequence, the normalized autocorrelation sequence is defined as, ‘Methods of Computing Correlation Method 1: Graphical Method Let x(n) and yin) be the input sequences and ¢,,(m) be the output sequence, etch the graphical representation of the input sequences x(n) and y(n). 2. Shift the sequence y(n) to the left graphically so that the product of x(n) and shifted y(n) gives only one nonzero sample. Now multiply x(n) and shifted y(n) to get a product sequence, and then sum up the samples of product sequence, which is the first sample of output sequence. 3. To get the next sample of output sequence, shift y(n) of previous step to one position right and multiply the shifted sequence with x(n) to get a product sequence, Now the sum of the samples of product sequence gives the second sample of output sequence. 4. To get subsequent samples of output sequence, the step 3 is repeated until we get a nonzero product sequence. ‘Method 2: Tabular Method The tabular method is same as that of graphical method, except thatthe tabular representation of the sequences are employed instead of graphical representation. In tabular method, every input sequence and shifted sequence is represented on a row in a table, image not available image not available image not available 2. 105 Digital Signal Processing (11.5, 3.514-3,2) ‘The crosscorrelation sequences, im) ILL, Fig 9 : Graphical representation of rm) Method 2: Tabular Method. ‘The Biven sequences and the shifted sequences can be represented in the tabular array as shown below. ® 2 ofi[2[sa]ajs xin) ya 2 yo) 1 los yn-aayin) | 1 [05) 1 yn =y nd 1 [os[ 1 yin) =y,00) 1/05] 4 yin =y fa) 1 fos| a yln—2)=y.hn) 1 fos} 4 yn) =y fad 1 fos| a ‘Note: The unfilled boxes in the table are considered as zeras. ach sample ofr, (m) is Biven by, tli = 5 x(n) nm) = xin yun where yal) = yom) Fo determine asnmple of.) at m= multiply the sequence xl) and {nto Bla product sequence lice multiply the corresponding lements ofthe rows) and yl. The sum oF the samples ofthe product. sequance Bives, When m=-2 5 ryC-2)= ¥ xln)y fo)=0404110+0+0=1 When m ¥ xy inl=ovosete040 =15 Whonm=0 7 400) = So xinyeln) 14054240 =35. Whenm=1 5 fy(t) = xlndyiia) <0414142 =4 Whenm=2 7 4,00) = ¥ xinysln) -0+0424160 Whenm=3 7 4,0) = ¥ xindyin) =0+0+042+0+0 44 2h Crosscarrelation sequencer fy{m) =, 1.50 3. image not available image not available image not available 2. 109 Digital Signal Processing 2.14.2, Methods of Computing Circular Correlation Method 1: Graphical Method In geaphical method the given sequences are converted to same size and represented on circles. In case of periodic sequences, the samples of one period are represented on citcles. Let x(n) and y(n) be the given real sequences, Let F,,(m) be the sequence obtained by circular correlation of x(n) and y(n). The following procedure ean be used to get a sample of F,,(m) at m=4. 1. Repres the sequences x(n) and y(n) on citeles. 2. Rolate (or shift) the sequence y(n), q times to get the sequence y((n~ q))y- If q is positive then rotate (or shift) the sequence in anticlockwise direction and if q is negative then rotate (or shift) the sequence in clockwise direction, 3. The sample of Fy,(q) at m=qiis given by, 4y(a)= J, xin) yay = Y xl) yl) where, y(n) = ylin—q))x Determine the product sequence x(n)y (0) for one period, 44. The sum ofall the samples ofthe product sequence gives the sample, (@) lise fy (0M) atm =a) ‘The above procedure is repeated for all possible values of m to get the sequence fy, (m). Method 2: Using Tabular Array Let xin) and y(n) be the given real sequences. Let iy(m) be the sequence obtained correlation of x(n) and y(n). The following procedure can be used 10 get a sample of Fay(m) at m Represent the sequences x(n) and y(n) as two rows of tabular array. 2. Periodically extend y(n). Here the periodicity is N, where N is the length of the given sequences. 4. Shift the sequence y(n), q times to get the sequence y((n~ q)),. If q is positive then shift the sequence to the right and if q is negative then shift the sequence to the left. 4. The sample of Ty,(q) atm =q is given by Sc yn-ay= S40) where, y(n) = y((n=4)) Fy(@ Determine the product sequence x(n)y,(n) for one period, 5. The sum of all the samples of the product sequence gives the sample iyy(q) [i.e Fyytm) atm=d), ‘The ahove procedure is repeated for all possible values of m to get the sequence F (m) Method 3: Using Matrices Let x(n) and y(n) be the given N-point sequences, The circular correlation of x(n) and y(n) yields another N-point sequence (1) image not available image not available image not available 213 Digital Signal Processing 2.15. Summary of Important Concepts The diserete signal is a function of a diserete independent variable. ime are discrete quantized. 1 2. Ina discrete time signal, the value of discrete time signal and the independent variabl 3. The digital signal is same as discrete signal except that the magnitude of the signal 4. A discrete time sinusoid is periodic only if its frequet 5. Discrete time sinusoids whose frequencies are separated by an integer multiple of 2p are identical, isa rational number 6. The sampling is the process of conversion of continuous time signal into discrete time signal. .¢ samples is called sampling time or sampling period, 8, The inverse of sampling period is called sampling frequency, 7. The time interval between succ 9, ‘The phenomenon of high frequency component getting, the identity of low-frequency component during sampling. called aliasing, 10, For analog signal with maximum frequency F,.,, the sampling frequency should be greater than 2 11, When sampling frequency F, is equal to 2F,,,, the sampling rate is called Nyquist rate 12, The signals that ean be completely specified by mathematical equations are called deterministic signals. 13. The signals whose characteristies are random in nature are called nondeterministic signals, 14. A signal x(n) is periodic with periodicity of N samples if xin +N) = xin). 15, When a signal exhibits symmetry with respect to = 0 then itis called an even signal, 16, When a signal exhibits antisymmetry with respect to n = 0, then itis called un odd signal 17. When the energy E of a signal is finite and nonzero, the signal is called energy signal. 18, When the power P of a signal is finite and nonzero, the signal is called power signal. 19. For energy signals, the energy will be finite and average power will be zero 20, For power signals the average power is finite and energy will be infinite. 21. A signal is said 10 be causal, i it is defined for n > 0. 22. A signal is said to be noncausal, if it is defined for both n < O and m > 0. 23. A signal is said to be anticausal, if itis defined for a < 0, 24. A discrete time system is « device or algorithm that operates on a diserete time signal. 25. When a system satisfies the properties of linearity and time invariance, itis called an LTT system, 26 When the input to diserete time system is unit impulse a(n), the output is called impulse response, h(n). 27. In a static oF memoryless 28. A system is said to be time invariant if its input-output characteristics do not change with time. system, the output at any instant n depends on input at the same time. 29. A linear system is one that satisfies the superposition principle 30, A system is said fo be causal if the output does not depends on future inputs/outputs. 31. When a system output at any time n depends on future inputs/outputs, itis ealled a noncausal system. 22. System is said to be BIBO stable if and only if every bounded input produces a bounded output. 33, When a system output at any time m depends on past outputs, itis called a recursive system. 34. A system Whose output does not depends on past outputs is called a nonrecursive system. 35, The convolution of N, and N, sample sequences produce a sequence consisting of Nj+N. 1 samples. 36, In an LTI system, response for an arbitrary input is given by convolution of input with impulse response. 37. The output sequence of circular convolution is also periodic sequence with periodicity of N samples. 38. The inverse system is used 0 recover the input from the response of a system, 39, The process of recovering the input from the response of a system is called deconvolution 40, The correlation of two diferent sequences is called crosscorrelation. AL. The correlation of a sequence with itself is ealled autocorrelation. image not available image not available image not available 2407 Digital Signal Processing Differences 1. Correlation operation does not involve change of index and folding of one of the input sequence. 2. The convolution operation is commutative, fie. x(n)» y(n) = y(n) « x(n) whereas in correlation operation in order to satisfy commutative property, while performing correlation of y(n) and 1), the shilling has t9 performed in opposite direction to that of performing correlation of xin) and y(n) @2.15 Let rm) be the correlation sequence obtained by correlation of x(n) and y(n), how will you determine the start and end point of r,(m)? What will be the length of r(m) ? Let, length of x(n) be N, and starts at n= n,. Let length of yin) be N, and stats at n = n, Now, —ry(m) will start at m,=n,—(n, +N,~ 1) ¥, an) willed at m, =m, + (N, +N, The length of r,(m) is N, +N, — 02.16 What are the differences between crosscorrelation and autocorrelation? 1. Crosseorrelation operation is correlation of two different sequences, whereas autocorrelation is comrelation of a sequence with itself 2. Autocorrelation operation isan even function, whereas crosscorreltion is not an even function. Q2.17 Perform the correlation of the two sequences, x(n) = (1, 2,3) and y(n) = (2,4, I) Solution Given that, x(n) (1.2.3 } and yin)= (2.4.0 \ yen=th4.24 The sequence x(n) is arranged as # column and the folded sequence y(-n) is arranged asa row as shown below, The elements of the two dimensional array are obtained by multiplying the corresponding row element with column element. The sum of the diagonal elements gives the samples of the erosscorrelation sequence, r,.(m). yale " ‘el 6 5 12) =65 16,13, 16.6} Q2.18 Perform the circular correlation of the two sequences, x(n) = (1, 2, 3) and y(n) = 2, 4 1} Solution Let iig{tm) be the sequence obtained from citeular correlation of x(n) and y(n). The sequence x(n) ccan be arranged as a column veetor of order 31 and using the samples of y(n) a 3 “3 matrix is formed as shown below. The product of two matrices gives the sequence Fy (I), yO yh ya] [Mo] [Ryo 24 afi] fig yar yo yen] fay] =fayen) fa 2 a) f2f= faz yw yey yo} xe} [21 s1aj}la} Le \ Bgm) = (13,1712) image not available image not available image not available 2121 Digital Signal Processing Note: The above program should be stored as a separate file in the current working directory Program to perform amplitude scaling and time shift on ¥(n) To perform Amplitude scaling and Time shift on signal x(n: xfor n= 0 to 2 Minclude y.m file in current work directory which declare given signal as xfunction y(n) specify range of 1 yO =¥¢n); assign the given signal as v0 YL =1.57¥¢a) compute the amplified version of x(n) y2 =0.5¢¥¢n) compute the attenuated version of x¢n) 3B e¥Gn-2); Siconpute the delayed version of x(n) ya a¥(ns2): compute the advanced version of x(n) Xplot the given signal and amplitude sealed signal subplot (2,3,1) stem (n,¥0); xTabe1 ('n") ;ylabe1C*x(n) ")ititlec'signal x¢n)"); subplot (2,3,2):stem(n,y1); xlabel(*n");ylabel (‘x1 (a) "DstitleC*amplified signal 1.5x¢n)"); subplot (2,3,3) :ste(n,y2); xlabel('n');ylabel('2(n)");title(*attenuated signal 0.5x(n)"); Aplot the given signal and time shifted signal subplot(2,3,4):stem(n,¥0); xTabel ('n") ;¥labeT Cx Cn) ")stitTec'signal xCn)")s subplot (2,3,5);stem(n,¥3); xTabeT('n");yTabel ('x3¢n) "Ds titTeC Delayed signal x(n-2)"); subplot (2,3,6);stem(n,y4); xlabel('n');¥label ('x4(n)"DstitleC*Advanced signal x(n+2)"): ourPur The input and outout waveforms of program 2.4 are shown in fig P2.4. Prog ram 2.5 time write a MATLAB program to perform convolution of the following two discrete signals x1(n)=1; 1en

Potrebbero piacerti anche