Preface ...................................................... xiii
About the Author ............................................. xvii
1 Introduction to Digital Signal Processing .................... 1
1.1 Basic Concepts of Digital Signal Processing ............. 1
1.2 Basic Digital Signal Processing Examples in Block
Diagrams ................................................ 3
1.2.1 Digital Filtering ................................ 3
1.2.2 Signal Frequency (Spectrum) Analysis ............. 4
1.3 Overview of Typical Digital Signal Processing in
Real-World Applications ................................. 6
1.3.1 Digital Crossover Audio System ................... 6
1.3.2 Interference Cancellation in
Electrocardiography .............................. 7
1.3.3 Speech Coding and Compression .................... 7
1.3.4 Compact-Disc Recording System .................... 9
1.3.5 Digital Photo Image Enhancement ................. 10
1.4 Digital Signal Processing Applications ................. 11
1.5 Summary ................................................ 12
2 Signal Sampling and Quantization ............................ 13
2.1 Sampling of Continuous Signal .......................... 13
2.2 Signal Reconstruction .................................. 20
2.2.1 Practical Considerations for Signal Sampling:
Anti-Aliasing Filtering ......................... 25
2.2.2 Practical Considerations for Signal
Reconstruction: Anti-Image Filter and
Equalizer ....................................... 29
2.3 Analog-to-Digital Conversion, Digital-to-Analog
Conversion, and Quantization ........................... 35
2.4 Summary ................................................ 49
2.5 MATLAB Programs ........................................ 50
2.6 Problems ............................................... 51
3 Digital Signals and Systems ................................. 57
3.1 Digital Signals ........................................ 57
3.1.1 Common Digital Sequences ........................ 58
3.1.2 Generation of Digital Signals ................... 62
3.2 Linear Time-Invariant, Causal Systems .................. 64
3.2.1 Linearity ....................................... 64
3.2.2 Time Invariance ................................. 65
3.2.3 Causality ....................................... 67
3.3 Difference Equations and Impulse Responses ............. 68
3.3.1 Format of Difference Equation ................... 68
3.3.2 System Representation Using Its Impulse
Response ........................................ 69
3.4 Bounded-in-and-Bounded-out Stability ................... 72
3.5 Digital Convolution .................................... 74
3.6 Summary ................................................ 82
3.7 Problems ............................................... 83
4 Discrete Fourier Transform and Signal Spectrum .............. 87
4.1 Discrete Fourier Transform ............................. 87
4.1.1 Fourier Series Coefficients of Periodic
Digital Signals ................................. 88
4.1.2 Discrete Fourier Transform Formulas ............. 92
4.2 Amplitude Spectrum and Power Spectrum .................. 98
4.3 Spectral Estimation Using Window Functions ............ 110
4.4 Application to Speech Spectral Estimation ............. 117
4.5 Fast Fourier Transform ................................ 120
4.5.1 Method of Decimation-in-Frequency .............. 121
4.5.2 Method of Decimation-in-Time ................... 127
4.6 Summary ............................................... 131
4.7 Problems .............................................. 131
5 The z-Transform ............................................ 135
5.1 Definition ............................................ 135
5.2 Properties of the z-Transform ......................... 139
5.3 Inverse z-Transform ................................... 142
5.3.1 Partial Fraction Expansion Using MATLAB ........ 148
5.4 Solution of Difference Equations Using the
z-Transform ........................................... 151
5.5 Summary ............................................... 155
5.6 Problems .............................................. 156
6 Digital Signal Processing Systems, Basic Filtering Types,
and Digital Filter Realizations ............................ 159
6.1 The Difference Equation and Digital Filtering ......... 159
6.2 Difference Equation and Transfer Function ............. 165
6.2.1 Impulse Response, Step Response, and System
Response ....................................... 169
6.3 The z-Plane Pole-Zero Plot and Stability .............. 171
6.4 Digital Filter Frequency Response ..................... 179
6.5 Basic Types of Filtering .............................. 188
6.6 Realization of Digital Filters ........................ 195
6.6.1 Direct-Form I Realization ...................... 195
6.6.2 Direct-Form II Realization ..................... 196
6.6.3 Cascade (Series) Realization ................... 197
6.6.4 Parallel Realization ........................... 198
6.7 Application: Speech Enhancement and Filtering ......... 202
6.7.1 Pre-Emphasis of Speech ......................... 202
6.7.2 Bandpass Filtering of Speech ................... 205
6.8 Summary ............................................... 208
6.9 Problems .............................................. 209
7 Finite Impulse Response Filter Design ...................... 215
7.1 Finite Impulse Response Filter Format ................. 215
7.2 Fourier Transform Design .............................. 217
7.3 Window Method ......................................... 229
7.4 Applications: Noise Reduction and Two-Band Digital
Crossover ............................................. 253
7.4.1 Noise Reduction ................................ 253
7.4.2 Speech Noise Reduction ......................... 255
7.4.3 Two-Band Digital Crossover ..................... 256
7.5 Frequency Sampling Design Method ...................... 260
7.6 Optimal Design Method ................................. 268
7.7 Realization Structures of Finite Impulse Response
Filters ............................................... 280
7.7.1 Transversal Form ............................... 280
7.7.2 Linear Phase Form .............................. 282
7.8 Coefficient Accuracy Effects on Finite Impulse
Response Filters ...................................... 283
7.9 Summary of Finite Impulse Response (FIR) Design
Procedures and Selection of FIR Filter Design
Methods in Practice ................................... 287
7.10 Summary ............................................... 290
7.11 MATLAB Programs ....................................... 291
7.12 Problems .............................................. 294
8 Infinite Impulse Response Filter Design .................... 303
8.1 Infinite Impulse Response Filter Format ............... 303
8.2 Bilinear Transformation Design Method ................. 305
8.2.1 Analog Filters Using Lowpass Prototype
Transformation ................................. 306
8.2.2 Bilinear Transformation and Frequency
Warping ........................................ 310
8.2.3 Bilinear Transformation Design Procedure ....... 317
8.3 Digital Butterworth and Chebyshev Filter Designs ...... 322
8.3.1 Lowpass Prototype Function and Its Order ....... 322
8.3.2 Lowpass and Highpass Filter Design Examples .... 326
8.3.3 Bandpass and Bandstop Filter Design Examples ... 336
8.4 Higher-Order Infinite Impulse Response Filter Design
Using the Cascade Method .............................. 343
8.5 Application: Digital Audio Equalizer .................. 346
8.6 Impulse Invariant Design Method ....................... 350
8.7 Polo-Zero Placement Method for Simple Infinite
Impulse Response Filters .............................. 358
8.7.1 Second-Order Bandpass Filter Design ............ 359
8.7.2 Second-Order Bandstop (Notch) Filter Design .... 360
8.7.3 First-Order Lowpass Filter Design .............. 362
8.7.4 First-Order Highpass Filter Design ............. 364
8.8 Realization Structures of Infinite Impulse Response
Filters ............................................... 365
8.8.1 Realization of Infinite Impulse Response
Filters in Direct-Form I and Direct-Form II .... 366
8.8.2 Realization of Higher-Order Infinite Impulse
Response Filters via the Cascade Form .......... 368
8.9 Application: 60-Hz Hum Eliminator and Heart Rate
Detection Using Electrocardiography ................... 370
8.10 Coefficient Accuracy Effects on Infinite Impulse
Response Filters ...................................... 377
8.11 Application: Generation and Detection of Dual-Tone
Multifrequency Tones Using Goertzel Algorithm ......... 381
8.11.1 Single-Tone Generator .......................... 382
8.11.2 Dual-Tone Multifrequency Tone Generator ........ 384
8.11.3 Goertzel Algorithm ............................. 386
8.11.4 Dual-Tone Multifrequency Tone Detection Using
the Modified Goertzel Algorithm ................ 391
8.12 Summary of Infinite Impulse Response (IIR) Design
Procedures and Selection of the IIR Filter Design
Methods in Practice ................................... 396
8.13 Summary ............................................... 401
8.14 Problems .............................................. 402
9 Hardware and Software for Digital Signal Processors ........ 413
9.1 Digital Signal Processor Architecture ................. 413
9.2 Digital Signal Processor Hardware Units ............... 416
9.2.1 Multiplier and Accumulator ..................... 416
9.2.2 Shifters ....................................... 417
9.2.3 Address Generators ............................. 418
9.3 Digital Signal Processors and Manufactures ............ 419
9.4 Fixed-Point and Floating-Point Formats ................ 420
9.4.1 Fixed-Point Format ............................. 420
9.4.2 Floating-Point Format .......................... 429
9.4.3 IEEE Floating-Point Formats .................... 434
9.4.5 Fixed-Point Digital Signal Processors .......... 437
9.4.6 Floating-Point Processors ...................... 439
9.5 Finite Impulse Response and Infinite Impulse
Response Filter Implementation in Fixed-Point
Systems ............................................... 441
9.6 Digital Signal Processing Programming Examples ........ 447
9.6.1 Overview of TMS320C67x DSK ..................... 447
9.6.2 Concept of Real-Time Processing ................ 451
9.6.3 Linear Buffering ............................... 452
9.6.4 Sample С Programs .............................. 455
9.7 Summary ............................................... 460
9.8 Problems .............................................. 461
10 Adaptive Filters and Applications .......................... 463
10.1 Introduction to Least Mean Square Adaptive Finite
Impulse Response Filters .............................. 463
10.2 Basic Wiener Filter Theory and Least Mean Square
Algorithm ............................................. 467
10.3 Applications: Noise Cancellation, System Modeling,
and Line Enhancement .................................. 473
10.3.1 Noise Cancellation ............................. 473
10.3.2 System Modeling ................................ 479
10.3.3 Line Enhancement Using Linear Prediction ....... 484
10.4 Other Application Examples ............................ 486
10.4.1 Canceling Periodic Interferences Using Linear
Prediction ..................................... 487
10.4.2 Electrocardiography Interference
Cancellation ................................... 488
10.4.3 Echo Cancellation in Long-Distance Telephone
Circuits ....................................... 489
10.5 Summary ............................................... 491
10.6 Problems .............................................. 491
11 Waveform Quantization and Compression ...................... 497
11.1 Linear Midtread Quantization .......................... 497
11.2 μ-law Companding ...................................... 501
11.2.1 Analog μ-Law Companding ........................ 501
11.2.2 Digital μ-Law Companding ....................... 506
11.3 Examples of Differential Pulse Code Modulation (DPCM),
Delta Modulation, and Adaptive DPCM G.721 ............. 510
11.3.1 Examples of Differential Pulse Code
Modulation and Delta Modulation ................ 510
11.3.2 Adaptive Differential Pulse Code Modulation
G.721 .......................................... 515
11.4 Discrete Cosine Transform, Modified Discrete Cosine
Transform, and Transform Coding in MPEG Audio ......... 522
11.4.1 Discrete Cosine Transform ...................... 522
11.4.2 Modified Discrete Cosine Transform ............. 525
11.4.3 Transform Coding in MPEG Audio ................. 530
11.5 Summary ............................................... 533
11.6 MATLAB Programs ....................................... 534
11.7 Problems .............................................. 550
12 Multirate Digital Signal Processing, Oversampling of
Analog-to-Digital Conversion, and Undersampling of
Bandpass Signals ........................................... 557
12.1 Multirate Digital Signal Processing Basics ............ 557
12.1.1 Sampling Rate Reduction by an Integer Factor ... 558
12.1.2 Sampling Rate Increase by an Integer Factor .... 564
12.1.3 Changing Sampling Rate by a Non-Integer
Factor L/M ..................................... 570
12.1.4 Application: CD Audio Player ................... 575
12.1.5 Multistage Decimation .......................... 578
12.2 Polyphase Filter Structure and Implementation ......... 583
12.3 Oversampling of Analog-to-Digital Conversion .......... 589
12.3.1 Oversampling and Analog-to-Digital
Conversion Resolution .......................... 590
12.3.2 Sigma-Delta Modulation Analog-to-Digital
Conversion ..................................... 593
12.4 Application Example: CD Player ........................ 599
12.5 Undersampling of Bandpass Signals ..................... 601
12.6 Summary ............................................... 609
12.7 Problems .............................................. 610
13 Image Processing Basics .................................... 617
13.1 Image Processing Notation and Data Formats ............ 617
13.1.1 8-Bit Gray Level Images ........................ 618
13.1.2 24-Bit Color Images ............................ 619
13.1.3 8-Bit Color Images ............................. 620
13.1.4 Intensity Images ............................... 621
13.1.5 Red, Green, Blue Components and Grayscale
Conversion ..................................... 622
13.1.6 MATLAB Functions for Format Conversion ......... 624
13.2 Image Histogram and Equalization ...................... 625
13.2.1 Grayscale Histogram and Equalization ........... 625
13.2.2 24-Bit Color Image Equalization ................ 632
13.2.3 8-Bit Indexed Color Image Equalization ......... 633
13.2.4 MATLAB Functions for Equalization .............. 636
13.3 Image Level Adjustment and Contrast ................... 637
13.3.1 Linear Level Adjustment ........................ 638
13.3.2 Adjusting the Level for Display ................ 641
13.3.3 Matlab Functions for Image Level Adjustment .... 642
13.4 Image Filtering Enhancement ........................... 642
13.4.1 Lowpass Noise Filtering ........................ 643
13.4.2 Median Filtering ............................... 646
13.4.3 Edge Detection ................................. 651
13.4.4 MATLAB Functions for Image Filtering ........... 655
13.5 Image Pseudo-Color Generation and Detection ........... 657
13.6 Image Spectra ......................................... 661
13.7 Image Compression by Discrete Cosine Transform ........ 664
13.7.1 Two-Dimensional Discrete Cosine Transform ...... 666
13.7.2 Two-Dimensional JPEG Grayscale Image
Compression Example ............................ 669
13.7.3 JPEG Color Image Compression ................... 671
13.8 Creating a Video Sequence by Mixing Two Images ........ 677
13.9 Video Signal Basics ................................... 677
13.9.1 Analog Video ................................... 678
13.9.2 Digital Video 685 Motion Estimation in Video ... 687
Summary .................................................... 690
Problems ................................................... 692
Appendix A Introduction to the MATLAB Environment ............. 699
A.1 Basic Commands and Syntax ............................. 699
A.2 MATLAB Array and Indexing ............................. 703
A.3 Plot Utilities: Subplot, Plot, Stem, and Stair ........ 704
A.4 MATLAB Script Files ................................... 704
A.5 MATLAB Functions ...................................... 705
Appendix В Review of Analog Signal Processing Basics .......... 709
B.l Fourier Series and Fourier Transform .................. 709
B.l.l Sine-Cosine Form ............................... 709
B.l.2 Amplitude-Phase Form ........................... 710
B.1.3 Complex Exponential Form ....................... 711
B.l.4 Spectral Plots ................................. 714
B.1.5 Fourier Transform .............................. 721
B.2 Laplace Transform ..................................... 726
B.2.1 Laplace Transform and Its Table ................ 726
B.2.2 Solving Differential Equations Using Laplace
Transform ...................................... 727
B.2.3 Transfer Function .............................. 730
B.3 Poles, Zeros, Stability, Convolution, and Sinusoidal
Steady-State Response ................................. 731
B.3.1 Poles, Zeros, and Stability .................... 731
B.3.2 Convolution .................................... 733
B.3.3 Sinusoidal Steady-State Response ............... 735
B.4 Problems .............................................. 736
Appendix С Normalized Butterworth and Chebyshev Fucntions ..... 741
C.l Normalized Butterworth Function ....................... 741
C.2 Normalized Chebyshev Function ......................... 744
Appendix D Sinusoidal Steady-State Response of Digital
Filters .................................................... 749
D.l Sinusoidal Steady-State Response ...................... 749
D.2 Properties of the Sinusoidal Steady-State Response .... 751
Appendix E Finite Impulse Response Filter Design Equations
by the Frequency Sampling Design Method .................... 753
Appendix F Some Useful Mathematical Formulas .................. 757
Bibliography .................................................. 761
Answers to Selected Problems .................................. 765
Index ......................................................... 791
|