You are on page 1of 751
er ce NODERN DIGITAL SIGNAL PROCESSING V. Udayashankara Modern Digital Signal Processing Includes Signals and Systems and Digital Signal Processing with MATLAB Programs DSP Architecture with Assembly and C Programs THIRD EDITION V.UDAYASHANKARA Professor and Head Department of Electronics and Instrumentation Engineering Sri Jayachamarajendra College of Engineering (SICE) Mysore PHI Learning 2 vette Miiitied Delhi-1 10092 2016 MODERN DIGITAL SIGNAL PROCESSING: Includeee Sicnalee ande Syetemee and Dicitale Sienale Prococcinoe withe MATLABe Procrame,e DSPo Architecture withe Accombly ande CeProerame,eThirde edition V. Udayashankara © 2016 by PHI Learning Private Limited, Delhi. All rights reserved. No part of this book may be reproduced in any form, by mimeagraph or any other means, without permission in writing from the publisher. ISBN-978-81-203-5167-7 The export rights of this book are vesied solely with the publisher. Third Printing (Third Edition). i & November, 2015 Published by Asoke K. Ghosh, PHI Learning Private Limited, Rimjhim House, 111, Patparganj Industrial Estate, Delhi-110032 and Printed by Mohan Makhijeni at Rekha Printers Private Limited, New Delhi-1 10020, Contents Preface xxi Acknowledgements aii 1 Introduction ... ween Introduction Signal Classification 121 Continuous Time Signal 2 12.2 Discrete Time Signal ze 123 Digital Signal 3 1.3 Signal Processing Systems 3 131 Analog Signal Processing System 13.2 Digital Signal Processing System 1.4 Commercial Digital Signal Processors 1.5. Overview of Application Areas of DSP 16 Summary 6 1 1 Exercises 6 Multiple Choice Questions 6 Review Questions 7 Continuous Time Sicnacs ano Systems 8-68 21 Introduction 8 2.2 Standard Continuous Time Signals. 9 221 Impulse Signal 9 222 Step Signal 9 223 Ramp Signal 10 224 Parabolic Signal 10 22.5 Sinusoidal Signal 226 Cosinusoidal Signal 7 22.7 Exponential Signal 1 228 Unit Pulse Signal 13 22.9 Triangular Pulse Signal 13 22.10 Signum Signal 13 vil Cowrewrs, 3 2211 Sine Signal 14 2212 Gaussian Signal 14 2.3. Classification of Continuous Time Signals I+ 23.1 Deterministic and Non-deterministie Signal 15 23.2 Periodic and Non-periodic Signals. 15 233 Symmetric (Even) and Anti-symmetric (Odd) Signal 20 234 Orthogonal and Non-orthogonal Signals 24 23S Energy and Power Signals 25 236 Causal and Non-causal Signals 30 2.4 Basic Operations on Continuous Signals 30 5 Continuous System 33 2.6 Classification of Continuous Time Systems 261 Linear and Non-linear Systems 33 262 ‘Time Invariant and ‘Time Variant Systems 34 263 Causal and Non-causal 36 264 36 265 Stable and Unstable System 37 266 Feedback and Non-feedback System 37 2.7 Linear Time Invariant Continuous System 39 27.1 Properties of Convolution 39 23.2 Connection of LTT Systems 47 2.8 Inverse System and Deconvolution Process 42 2.9 Differential Equation Representation for LTI Systems 50 29.1 Block Diagram and Signal Flow Graph Representation 57 29.2 Solution of Differential Equation 53 210 Summary 65 ereises 66 Multiple Choice Questions 66 Review Questions 67 Problems 68 Discrete Time Signals and Systems... Introduction 69 Sampling Theorem 69 Frequeney Concepts in Signals 7 Standard Discrete ‘Time Signals 73 34.1 Impulse Sequence or Unit Sample Sequences 7: 3.4.2 Unit Step Sequence v4 343 Unit Ramp Sequence 74 3.4.4 Exponential Sequ Classification of Discrete Signals 77 3.5.1 Periodic and Non-periodie Signals 7 35.2 Symmetric and Anti-symmetric Signals 78 35.3 Energy and Power Signals 79 3.6 Basic Operation on Discrete Signals 80 361 Multiplication by a Constant 80 69-98 Oe & we 75 Comenrs ix 362 Addition and Subtraction Operation 80 363 Multiplication Operation 87 394 Shifling Operation 81 365 Time Reversal or Folding 81 3.7 Discrete Time Systems 84 37.1 Linear and Non-linear Systems 84 3.7.2. Time Invariant and Variant Systems 85 37.3 Causal and Non-eausal System 86 37.4 Static and Dynamic 37.5 Stable and Unstable Sy 3.8 Summary 90 MATLAB Programs OL Exercises 9S Multiple Choice Questions — 95 Review Questions 97 Problems 97 4 Discrete Time Linear Time-Invariant System .. 99-142 4.1 Introduction 99 4.2. Linear Time Invariant Systems 99 12.1 Properties of Convolution 101 4.2.2 Connection of LTT Systems: 102 4.3 Classification of Discrete time LT! Systems 103 43.1 Causal and Non-causal System 104 43.2 Stable and Unstable Systems 105 13.3 Static or Dynamic System 106 434 FIR and [IR Sysiem 106 435. Steps to Compnte Output for Finite Duration Sequences 107 4.4 Deconvolution — 1/7 4.5 Difference Equation Representation for LTI System 120 .6 Solution of Difference Equation 123 4.7 Summary 135 MATLAB Programs 136 Exercises 137 Multiple Choice Questions 137 Review Questions 140 Problems 141 5 Correlation - 143-158 S.1 Introduction 143 5.2. Correlations of Continuous Time Signals 143 5.3. Correlations of Discrete Time Signals 1-44 53.1 Cross-correlation of Discrete Time Signals 144 53.2 Auto-correlation of Diserete Time Signals 145 533. Properties of Correlation Sequences 145 Cowrewrs 4 3 Correlation Coefficient 150 Summary 153 MATLAB Programs 153 Exercises 156 Multiple Choice Questions 156 Review Questions 158 Problems 158 Fourier Series and Fourier Transform of Continuous Time Signals - 159-220 6.1 Introduction 159 6.2 Frequency Domain Representation ofa Sinusoid Signal 160 6.3 Fourier Series Representation of Continuous Time Periodic Signals 161 63.1 Complex Exponential Fourier Series 161 63.2 Sine-cosine or Trigonometrie Form of the Fourier Series 162 633 Evenand Odd Symmetnes 162 634 Relation between Trigonometrie and Complex Exponential Fourier Series 163 64 Properties of Continuous Time Fourier Series 182 641 Linearity 182 642 Time Shit 182 643 Frequeney Shit 183 644 Multiplication or Modulation 84 G45 Time Reversal 184 646 ‘Time Scaling 185 647 Time Differentiation 186 648 Time Integration 186 649 Symmetry 186 64.10 Periodic Convolution — 189 GALL Parseval’s Relation — 190 6412 Hermitian Symmetry 190 6.5 Fourier Transform Representation of Continuous Time Non-periodic Signals 192 6.6 Properties of Fourier Transform 1.93 661 Linearity 193 662 Time Shi 194 663 Frequeney Shifling 194 6.64 — Time Multiplication or Frecuency Convolution or Modulation — 194 665 Time Reversal 195 666 Time Sealing 195 667 Time Differentiation 196 668 Time Integration 197 669 Differentiation in the Frequency Domain 197 66.10 Convolution 198 65.11 Symmetry — 198 6612 Conjugation 201 6613 Duality 207 66.14 Parseval’s Relation 202 6.7 Fourier Transform for Periodic Signals 210 Comenrs xi 6.8 Analysis of LTI Continuous Time System Using Fourier Transform 6.9 Summary 2/5 Exercises 216 Multiple Choice Questions 216 Review Questions 218 Problems 218 Fourier Series and Fourier Transform of Discrete Time Signals . 7.1 Introduction — 22/ 7.2 Fourier Series for Discrete Time Periodic Signals. 221 7.3. Properties of Discrete Time Fourier Series 227 TR Linearity 227 732 ‘Time Shift 228 733. Frequency Shift 228 734 Multiplication or Modulation 735 Time Reversil 230 736 Time Scaling 230 737 ‘Time Differentiation 237 738 Periodic Convolution 237 739 Symmetry 232 73.10 Conjugate Property 235 7311 Duality 235 73.12 Parseval’s Relation — 236 Fourier Transform of Discrete Time Non-periodic Signal 238 Properties of Discrete Time Fourier Transform 253 75.1 Linearity 253 752 Time Shifting 253 753 Frequency Shifting 254 754 — Time Multiplication or Frequency Convolution or Modulation 75.5 Time Reversal 255 736 Time Sealing 236 75.7 Differentiation in Time Domain 256 758 Differentiation in the Frequency Domain 257 75.9 Convolution 257 7510 Symmeuy 258 7511 Conjugation 260 75.12 Duality 261 75.13. Parseval’s Relation 267 7.6 Discrete Time Fourier Transform of Periodic Signals 266 7.7 Analysis of LTI Discrete Time System Using Discrete Time Fourier Transform 267 78 Summary 274 Exercises 75 Multiple Choice Questions 275 Review: Questions Problems 277 76 au 221-278 Conrenis, 8 ZTransforms - 279-331 8.1 Introduction 279 8.2. Z-transform 280 8.3. Properties of Zransform 280 83.1 Linearity 280 832 Time Shit 280 833 Time Advance 28/ 83.4 Multiplication by an Exponential Sequence 28) 83.5 Time Reversal 287 836 Linear Convolution 282 837 Differentiation 282 83.8 Correlation 282 83.9 Initial-value Theorem 282 83.10 Finakvalue Theorem 283 8.4 Pole-Zero Model 294 85 Region of Convergence 295 85.1 Right-sided Signals 295 85.2 Left-sided Signals: 296 853 Two-sided Signals 297 854 Finite Duration Signals 297 8.6 Inverse Z-transforms 303 8.6.1 Partial Fraction Expansion Method 304 862 Inversion Integral Method 307 8.6.3 Long Division or Power Series Method 31 8.7. Analysis of LTI Discrete ‘Time System Using Z-transform 316 87.1 Causality and Stability 317 872 Stability of a Causal LTI System — 317 8.8 Unilateral Z-transform — 32/ 8.9 Inverse System 325 8.10 Summary 327 Exercises. 327 Multiple Choice Questions 327 Review Questions 330 Problems 330 9 Realization of Digital System .. - 332-370 9.1 Introduction 332 9.2 Realization of Digital System 332 92.1 Basic Building Block 33 922 ‘Iypes of Digital System 333 9.3. Basic Structures for IIR System 334 93.1 Direct Form | 93.2 Direct Form I 933 Cascade Form 934 — Parallel Form Conteurs xii 10 9.4 Basic Structures for FIR System 346 941 Direct Form 346 942 Cascade Form 348 9.5 Transposed Structure 350 9.6 Lattice Structure 35/ 96.1 Lattice Structure of IR System 352 962 Lattice Structure of FIR 358 9.7 Polyphase Structures 362 ©8 Summary 365 MATLAB Programs 365 Exercises 367 Multiple Choice Questions 367 Review Questions 368 Problems 368 Discrete Fourier Transform: Its Properties and Its Applications ... 10.1 Introduction 371 10.2 Discrete Fourier Transform 372 10.3 Matrix Relation for Computing DFT and [DFT 373 10.4 Properties of Discrete Fourier Transform 379 1041 Linearity 379 10.4.2 Periodicity 379 10.43 Circular Shift and Circular Symmetry of a Sequence 380 1044 Symmetry Property 383 10.45 Symmetry Property for Real Valued s(n) 386 10.46 Muluplication of Two DFTs and Circular Convolution 387 104.7 Time Reversal of a Sequence 388 1048 Circular Time Shift of a Sequence 389 10.4.9 Circular Frequency Shift or Multiplication by Exponentials 104.10 Complex Conjugate Properties. 397 104.11 Circular Correlation 397 104.12. Multiplication of Two Sequences 10.413 Parseval's Theorem 393 10.5. Relationship between DFT and Zransform 393 10.6 Comparison between Linear Convolution and Circular Convolution 106.1 Circular Convolution from Linear Convolution 426 106.2 Linear Convolution from Circular Convolution 427 10.7. Applications of DFT 428 107.1 Linear Filtering Using DFT 428 10.72 DPT for Linear Filtering of Long Duration Sequences 429 107.3. Spectrum Analysis Using DFT 432 10.8 Summary 433 MATLAB Programs 435 392 Exercises 436 Multiple Choice Questions 436 Review Questions 437 Problems 438 371-439 425 xiv Coutewis 11 Fast Fourier Transform .... 11.1 Introduction 440 11.2. Radix-2 Fast Fourier Transform Algorithm 440 11.2.1 Decimation in Time FFT Algorithm — 44 11.2.2 Decimation in Frequency FFT Algorithm 451 123° Butterfly Computation 460 1124 Differences ed Similarities between DIT and DIF Algorithms 461 11.3 Radix-2 Inverse Fast Fourier Transform — 461 11.4 Computing DFT using Linear Filtering 474 14.1 Chirp-Z wansform (CZT) 474 1142 Goerizel algorithm 475 440-496 11.5. Composite Radix Fast Fourier Transform 477 11.6 Summary 489 MATLAB Programs 489 Exercises 493 Multiple Choice Questions — 493 Review Questions 496 Problems 496 12. Discrete Cosine Transform .. 497-516 12.1 Introduction 497 12,2 Discrete Cosine Transform 497 122.1 Features of DCT 498 12.2.2 Advantages of DCT IOS 12.3. Discrete Cosine Transform—2 (DCT-2) 499 12.4 Properties of DCT 505 124.1 Normalization 593 1242 nergy Compaction 505 12.5 DCT-2 Signal Flow diagrams 505 12.6 Applications of DCT — 512 12.7 Summary 5/2 MATLAB Programs 513 EXERCISES ‘Sid Multiple Choice Questions 514 Review Questions. 515 Problems 515 13. ‘FIR Filters ... 13.1 Introduction — 5/7 13.2 Digital Filters 5/7 132.1 Classification of Digital Filters 518 13.22 FIR Filter Specifications 519 13.3 FIR Filters 521 1331 Advantages 52 133.2 Disadvantage: 517-592 Cowrenis xv 4 15 13.4 Linear Phase in FIR filters 522 13.5. Linear Phase FIR Filterdesign 528 135.1 Design of Linear Phase FIR Filters Using Windows 528 1332 n of Linear Phase FIR Filter Using Frequency Sampling Method 558 13.53 Design of FIR Filters Using Fourier Series Method 562 133.4 Optimal FIR Filter Design Method 569 13.6 FIR Differentiators 573 13.7 Hilbert Transforms 375 13.8 Summary 578 MATLAB Programs 578 Exercises 587 Multiple Choice Questions 387 Review Questions. 591 Problems 591 IIR Filters... - 593-667 14.1 Introduction 593 14.2 Design of IIR Filters from Analog Filters. 593 142.1 Impulse Invariant Transformation Method 594 142.2 Bilinear Transformation Method 596 1423 Matched Z-transform 598 142.4 Approximation of Derivatives 599. 142.5 Analog Butterworth and Chebyshev Filters 609 14.3 Design of Digital Low Pass Butterworth Filter 602 14.4 Design of Digital Low Pass Chebyshev Filter 620 14.5 Elliptic Filters 627 14.6 Bessel Filters 628 14.7. Design of Low Pass, High Pass, Band Pass and Band Reject IIR Filters from Normalized Low Pass IIR Filter 629 147.1 Frequeney Transformation in the Analog Domain 629 14.7.2. Frequency Transformation in the Digital Domain 630 14.8 Design of Specialized Digital Filters by Pole-zero Placements 651 148.1 Notch Filter 652 1482 Comb Filter 63 14.9 Summary MATLAB Programs 654 Exercises. 663 Multiple Choice Questions 663 Review Questions 666 Problems 667 Multirate Digital Signal Processing and Filter Bank: Fundamentals ...... 668— 685 15.1 Introduction 668 15.2 Decimation Process 668 15.3. Interpolation Process 670 xvi Coutewis 15.4 Digital Filter Bank 673 15.5 DFT Filter Banks 674 15.6 Quadrature Mirror Filter Banks 675 15.7 Polyphase Structure for Decimator 676 15.8 Polyphase Structure for Interpolation 678 15.9 Summary 680 MATLAB Programs 680 Exercises 682 Multiple Choice Questions 682 Review Questions — 685 16 Adaptive Filters RnnNIPR NTR 8 - 686-701 16.1 Introduction 686 16.2 AdaptiveFilters 686 16,3 LMSAdaptive Algorithm G88 16.4 Recursive Least Square (RLS) Algorithm 699 16.5 Applications 695 165.1 Noise Reduction for the Hearing Impaired 695 16.5.2. Fetal ECG from Abdominal ECG 695 16.5.3. Adaptive Filtering of EMG and ERG from Human EEG 695 165.4 Feho Cancellation 695 16.6 Summary 696 MATLAB Programs 696 Exercises. 701 Multiple Choice Questions 701 Review Questions 701 17 Data Formats, Arithmetic Operations and Errors in Digital Signal Processors . a 702-720 17.1 Introduction 702 17.2. Fixed and Floating Point DSP 702 17.3 Data Formats 703 17.4 Fixed and Floating point Arithmetic Operations 707 1741 Fixed Point Arithmetic Operations 707 1742 Floating Point Arithmetic Operations 709 17.5 Dynamic Range, Resolution and Precision 710 17.6 Sources of Errors in DSP Til 1761 A/D Conversion Error 711 1762 DSP Computational Errors 775 1163 D/A Cowersion Error 716 17.7: SUMMARY 717 Exercises 718 Multiple Choice Questions — 718 Review Questions 720 Problems 720 Comrewis xvii 18 19 Introduction to Digital Signal Processing Devices .. - 721-740 18.1 Introduction 721 18.2 Architectural Features of DSP 72/ 18.3 Bus Architecture 722 18.3.1 Harvard Architecture 722 1832 SHARC Architecture 722 18.4 DSP Computational Building Blocks Ta, 1841 Multiplier 724 184.2 Arithmetic Logic Unit 729 1843 Muluply and Accumulate Unit, 729 18.5 On-chip Memory 734 18.6 Special Function Instructions 734 18.7. Special Addressing Modes 735 187.1 Circular Addressing Mede 187.2 Bit Reversal Addressing Mode 736 1873 Address Generation Unit 736 18,8 Parallel Move Supportand Pipelining 737 18.9 Summary — 738 Exercises. 739 Multiple Choice Questions 739 Review Questions 740 Architecture of TMS 320C54XX Digital Signal Processor .. - 741-760 19.1 Introduction 747 19.2 Features of TMS 320CS4XX Processor 741 19.3. Architecture of TMS 320CS4XX Processor 742 193.1 Accumulators Aand B 742 193.2 Auxiliary Registers (ARO-AR7) 744 193.3 ‘Temporary Register (T) 744 193.4 Circular Butfer Size Register (BK) 744 193.5 Stack Pointer Register (SP) 744 19.36 ‘Transition Register (TRN) 744 193.7 Status Register (STO and ST1) 744 1938 40-bit ALU 746 193.9 Multiplier/Adder Unit 746 193.10 Program and Data Address Generation Logic Unit 747 193.11 Barrel Shifter 748 193.12. Compare, Select and Store Unit (CSSU) 749 193.13 Exponent Encoder Unit 750 19.4 Interrupts of C54X Processor 750. 19.5 Internal Memory Organization 757 195.1 On-chip ROM 2 1952 On-chip Dual Access RAM 193.3 On-chip Singl 33 RAM 19.54 Memory Mapped Registers xviii Cowtenis 19.6 On-chip Peripherals 753 196.1 Clock Generator 754 196.2 Serial YO Port 754 1963 Hardware Timer 755 1964 Host Port Interface 756 196.5 Direct Memory Access-controller (DMA) 757 19.7 Summary 758 Exercises 758 Multiple Choice Questions 758 Review Questions 760 20 Addressing Modes and Instruction Set of TMS 320C54Xx DSP ... 20.1 Introduction 761 20.2 Addressing Modes 761 202.1 Immediate Addressing 767 202.2 Direct Addressing 761 202.3 Accumulator Addressing 762 20.24 Indirect Addressing 762 202.5 Circular or Modulo Addressing 20.2.6 Bit Reversed Addressing 765 2027 Dual Operand Addressing 766 2028 Absolute Addressing 766 202.9 Stack Addressing 767 20.3. Instruction Set of TMS 320C54XX 767 203.1 Load and Store Instruction 768 761-784 2032 Arithmetic Instruction 770 203.3 Logical Instruction 773 203.4 Program-controlied Instruction 774 20, Parallel Move Support Instructions 777 203.6 Move Instructions 779 203.7 Application Specific Instructions 780 20.4 Summary — 787 Exercises 781 Multiple Choice Questions 781 Review Questions. 783 21 TMS 320VC5416 Assembly Language Programming .. - 785-828 1,1 Introduction 74 1.2 DSP Sysiem Design Kit 785 1,3. TMS320CS4XX Assembly Language Programming 786 213.1 Assembler Directives 786 213.2 Algorithm for the Execution of Assembly Language Programs in Real Time on TMS 320VC516 DSK Board 788 2133 Assembly Language Programming Examples 789 2134 Assembly Language Program to Implement Linear Convolution 799

You might also like