【原书作者】: Michael Weeks
【译者】:
【ISBN 】: 0-9778582-0-0
【页数 】:478
【开本 】 :16
【出版社】 :Infinity Science Press LLC
【出版日期】:2007
【文件格式】:pdf
【封面附图】:

【摘要或目录】:
Contents
Preface xxi
1 Introduction 1
1.1 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Why Do We Use a Base 10 Number System? . . . . . . . . . 2
1.1.2 Why Do Computers Use Binary? . . . . . . . . . . . . . . . 2
1.1.3 Why Do Programmers Sometimes Use Base 16
(Hexadecimal)? . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.4 Other Number Concepts . . . . . . . . . . . . . . . . . . . . . 4
1.1.5 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 What Is a Signal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Analog Versus Digital . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 What Is a System? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 What Is a Transform? . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6 Why Do We Study Sinusoids? . . . . . . . . . . . . . . . . . . . . . . 22
1.7 Sinusoids and Frequency Plots . . . . . . . . . . . . . . . . . . . . . 24
1.8 Summations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.10 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2 MATLAB 29
2.1 Working with Variables . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.2 Getting Help and Writing Comments . . . . . . . . . . . . . . . . . 31
2.3 MATLAB Programming Basics . . . . . . . . . . . . . . . . . . . . . 32
2.3.1 Scalars, Vectors, and Matrices . . . . . . . . . . . . . . . . . 33
2.3.2 Number Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.3.3 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.3.4 Conditional Statements (if) . . . . . . . . . . . . . . . . . . . 36
2.3.5 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.3.6 Continuing a Line . . . . . . . . . . . . . . . . . . . . . . . . 39
2.4 Arithmetic Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.5 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.6 How NOT to Plot a Sinusoid . . . . . . . . . . . . . . . . . . . . . . 53
2.7 Plotting a Sinusoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.8 Plotting Sinusoids a Little at a Time . . . . . . . . . . . . . . . . . 60
2.9 Calculating Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.10 Sometimes 0 Is Not Exactly 0 . . . . . . . . . . . . . . . . . . . . . . 64
2.10.1 Comparing Numbers with a Tolerance . . . . . . . . . . . . . 65
2.10.2 Rounding and Truncating . . . . . . . . . . . . . . . . . . . . 69
2.11 MATLAB Programming Tips . . . . . . . . . . . . . . . . . . . . . . 70
2.12 MATLAB Programming Exercises . . . . . . . . . . . . . . . . . . . 71
2.13 Other Useful MATLAB Commands . . . . . . . . . . . . . . . . . . . 81
2.14 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.15 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3 Filters 85
3.1 Parts of a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.2 FIR Filter Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.3 Causality, Linearity, and Time-Invariance . . . . . . . . . . . . . . . 98
3.4 Multiply Accumulate Cells . . . . . . . . . . . . . . . . . . . . . . . . 103
3.5 Frequency Response of Filters . . . . . . . . . . . . . . . . . . . . . . 104
3.6 IIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
3.7 Trends of a Simple IIR Filter . . . . . . . . . . . . . . . . . . . . . . 113
3.8 Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
3.10 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4 Sinusoids 133
4.1 Review of Geometry and Trigonometry . . . . . . . . . . . . . . . . . 133
4.2 The Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
4.3 Unit Circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.4 Principal Value of the Phase Shift . . . . . . . . . . . . . . . . . . . 138
4.5 Amplitudes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
4.6 Harmonic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
4.7 Representing a Digital Signal as a Sum of
Sinusoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
4.8 Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
4.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.10 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
5 Sampling 159
5.1 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
5.2 Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
5.3 Sampling and High-Frequency Noise . . . . . . . . . . . . . . . . . . 162
5.4 Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
5.4.1 Aliasing Example . . . . . . . . . . . . . . . . . . . . . . . . . 165
5.4.2 Folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
5.4.3 Locations of Replications After Sampling . . . . . . . . . . . 171
5.5 Nyquist Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
5.6 Bandpass Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
5.8 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
6 The Fourier Transform 187
6.1 Fast Fourier Transform Versus the Discrete Fourier Transform . . . . 190
6.2 The Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . 191
6.3 Plotting the Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . 196
6.4 Zero Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
6.5 DFT Shifting Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
6.6 The Inverse Discrete Fourier Transform . . . . . . . . . . . . . . . . 204
6.7 Forward and Inverse DFT . . . . . . . . . . . . . . . . . . . . . . . . 207
6.8 Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
6.9 Harmonics and Fourier Transform . . . . . . . . . . . . . . . . . . . 214
6.10 Sampling Frequency and the Spectrum . . . . . . . . . . . . . . . . . 219
6.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
6.12 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
7 The Number e 225
7.1 Reviewing Complex Numbers . . . . . . . . . . . . . . . . . . . . . . 225
7.2 Some Interesting Properties of j . . . . . . . . . . . . . . . . . . . . 228
7.2.1 Rotating Counterclockwise . . . . . . . . . . . . . . . . . . . 228
7.2.2 Rotating Clockwise . . . . . . . . . . . . . . . . . . . . . . . . 229
7.2.3 Removing j from p􀀀a . . . . . . . . . . . . . . . . . . . . . . 230
7.3 Where Does e Come from? . . . . . . . . . . . . . . . . . . . . . . . 230
7.4 Euler's Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
7.5 Alternate Form of Euler's Equation . . . . . . . . . . . . . . . . . . . 235
7.6 Euler's Inverse Formula . . . . . . . . . . . . . . . . . . . . . . . . . 236
7.7 Manipulating Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . 238
7.7.1 Adding Two Vectors . . . . . . . . . . . . . . . . . . . . . . . 238
7.7.2 Adding Vectors in General . . . . . . . . . . . . . . . . . . . . 239
7.7.3 Adding Rotating Phasors . . . . . . . . . . . . . . . . . . . . 240
7.7.4 Adding Sinusoids of the Same Frequency . . . . . . . . . . . 240
7.7.5 Multiplying Complex Numbers . . . . . . . . . . . . . . . . . 240
7.8 Adding Rotating Phasors: an Example . . . . . . . . . . . . . . . . . 243
7.9 Multiplying Phasors . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
7.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
7.11 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
8 The z-Transform 253
8.1 The z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
8.2 Replacing Two FIR Filters in Series . . . . . . . . . . . . . . . . . . 255
8.3 Revisiting Sequential Filter Combination with z . . . . . . . . . . . . 257
8.4 Why Is z􀀀1 the Same as a Delay by One Unit? . . . . . . . . . . . . 259
8.5 What Is z? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
8.6 How the z-Transform Reduces to the Fourier
Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
8.7 Powers of 􀀀z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
8.8 Showing that x[n] h[n] $ X(z)H(z) . . . . . . . . . . . . . . . . . 262
8.9 Frequency Response of Filters . . . . . . . . . . . . . . . . . . . . . . 263
8.10 Trends of a Simple IIR Filter, Part II . . . . . . . . . . . . . . . . . 271
8.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
8.12 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
9 The Wavelet Transform 275
9.1 The Two-Channel Filter Bank . . . . . . . . . . . . . . . . . . . . . . 277
9.2 Quadrature Mirror Filters and Conjugate
Quadrature Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
9.3 How the Haar Transform Is a 45-Degree Rotation . . . . . . . . . . . 280
9.3.1 How The Haar Transform A ects a Point's Radius . . . . . . 281
9.3.2 How The Haar Transform A ects a Point's Angle . . . . . . . 282
9.4 Daubechies Four-Coecient Wavelet . . . . . . . . . . . . . . . . . . 284
9.5 Down-Sampling and Up-Sampling . . . . . . . . . . . . . . . . . . . 288
9.5.1 Example Using Down/Up-Samplers . . . . . . . . . . . . . . 288
9.5.2 Down-Sampling and Up-Sampling with 2 Coecients . . . . . 290
9.5.3 Down-Sampling and Up-Sampling with Daubechies 4 . . . . . 292
9.6 Breaking a Signal Into Waves . . . . . . . . . . . . . . . . . . . . . . 295
9.7 Wavelet Filter Design|Filters with Four
Coecients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
9.8 Orthonormal Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
9.9 Multiresolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
9.10 Biorthogonal Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . . 320
9.11 Wavelet Transform Theory . . . . . . . . . . . . . . . . . . . . . . . 324
9.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
9.13 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
10 Applications 339
10.1 Examples Working with Sound . . . . . . . . . . . . . . . . . . . . . 339
10.2 Examples Working with Images . . . . . . . . . . . . . . . . . . . . . 342
10.3 Performing the 2D Discrete Wavelet Transform on an Image . . . . . 344
10.3.1 2D DWT of a Grayscale Image . . . . . . . . . . . . . . . . . 347
10.3.2 2D DWT of a Color Image . . . . . . . . . . . . . . . . . . . 348
10.4 The Plus/Minus Transform . . . . . . . . . . . . . . . . . . . . . . . 350
10.5 Doing and Undoing the Discrete Wavelet
Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
10.6 Wavelet Transform with Matrices . . . . . . . . . . . . . . . . . . . . 357
10.7 Recursively Solving a Su Doku Puzzle . . . . . . . . . . . . . . . . . 361
10.8 Converting Decimal to Binary . . . . . . . . . . . . . . . . . . . . . . 369
10.9 Frequency Magnitude Response of Sound . . . . . . . . . . . . . . . 373
10.10 Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
10.10.1 Windowing Methods . . . . . . . . . . . . . . . . . . . . . . 376
10.10.2 Designing an FIR Filter . . . . . . . . . . . . . . . . . . . . . 380
10.11 Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
10.11.1 Experimenting with Compression . . . . . . . . . . . . . . . 387
10.11.2 Compressing an Image Ourselves . . . . . . . . . . . . . . . 393
10.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
10.13 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
A Constants and Variables Used in This Book 399
A.1 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
A.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
A.3 Symbols Common in DSP Literature . . . . . . . . . . . . . . . . . . 401
B Equations 403
B.1 Euler's Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
B.2 Trigonometric Identities and Other Math Notes . . . . . . . . . . . . 404
B.3 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
B.4 Fourier Transform (FT) . . . . . . . . . . . . . . . . . . . . . . . . . 405
B.5 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
B.6 Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
B.7 Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
B.8 z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
C DSP Project Ideas 411
D About the CD-ROM 415
E Answers to Selected Review Questions 417
F Glossary 439
Bibliography 445
Index 449