Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 236 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
236
Dung lượng
1,03 MB
Nội dung
1
Contents
Preface vii
1 Discrete-Time Signals in the Time Domain 1
1.1 Introduction 1
1.2 Getting Started 1
1.3 Background Review 2
1.4 MATLAB Commands Used 5
1.5 Generation of Sequences 5
1.6 Simple Operations on Sequences 10
1.7 Workspace Information 13
1.8 Other Types of Signals (Optional) 13
1.9 Background Reading 14
2 Discrete-Time Systems in the Time Domain 15
2.1 Introduction 15
2.2 Background Review 15
2.3 MATLAB Commands Used 17
2.4 Simulation of Discrete-Time Systems 19
2.5 Linear Time-Invariant Discrete-Time Systems 24
2.6 Background Reading 30
3 Discrete-Time Signals in the Frequency
Domain 33
i
ii
3.1 Introduction 33
3.2 Background Review 33
3.3 MATLAB Commands Used 37
3.4 Discrete-Time Fourier Transform 39
3.5 Discrete Fourier Transform 45
3.6 z-Transform 50
3.7 Background Reading 52
4 LTI Discrete-Time Systems in the Frequency
Domain 55
4.1 Introduction 55
4.2 Background Review 55
4.3 MATLAB Commands Used 61
4.4 Transfer Function and Frequency Response 62
4.5 Types of Transfer Functions 64
4.6 Stability Test 70
4.7 Background Reading 71
5 DigitalProcessing of Continuous-Time
Signals 73
5.1 Introduction 73
5.2 Background Review 73
5.3 MATLAB Commands Used 80
5.4 The Sampling Process in the Time Domain 81
5.5 Effect of Sampling in the Frequency Domain 83
5.6 Analog Lowpass Filters 84
5.7 A/D and D/A Conversions 86
iii
5.8 Background Reading 89
6 Digital Filter Structures 91
6.1 Introduction 91
6.2 Background Review 91
6.3 MATLAB Commands Used 101
6.4 Realization of FIR Transfer Functions 102
6.5 Realization of IIR Transfer Functions 103
6.6 Background Reading 107
7 Digital Filter Design 109
7.1 Introduction 109
7.2 Background Review 109
7.3 MATLAB Commands Used 116
7.4 IIR Filter Design 117
7.5 FIR Filter Design 120
7.6 Background Reading 127
8 Digital Filter Implementation 129
8.1 Introduction 129
8.2 Background Review 129
8.3 MATLAB Commands Used 134
8.4 Simulation of IIR Digital Filters 135
8.5 Simulation of FIR Digital Filters 141
8.6 Design of Tunable Digital Filters 142
8.7 Function Approximation 144
8.8 Background Reading 145
iv
9 Analysis of Finite
Word-Length Effects 147
9.1 Introduction 147
9.2 Background Review 147
9.3 MATLAB Commands Used 155
9.4 Generation and Quantization of Binary Numbers 156
9.5 Coefficient Quantization Effects 158
9.6 A/D Conversion Noise Analysis 161
9.7 Analysis of Arithmetic Roundoff Errors 163
9.8 Low-Sensitivity Digital Filters 166
9.9 Limit Cycles 167
9.10 Background Reading 168
10 Multirate DigitalSignalProcessing 171
10.1 Introduction 171
10.2 Background Review 171
10.3 MATLAB Commands Used 178
10.4 Basic Sampling Rate Alteration Devices 179
10.5 Decimator and Interpolator Design
and Implementation 182
10.6 Design of Filter Banks 185
10.7 Design of Nyquist Filters 186
10.8 Background Reading 187
11 Advanced Projects 189
11.1 Introduction 189
11.2 Discrete Transforms 189
v
11.3 FIR Filter Design and Implementation 194
11.4 Filter Bank Applications 198
11.5 Modulation and Demodulation 200
11.6 Digital Data Transmission 202
A Introduction to MATLAB 205
A.1 Number and Data Representation 205
A.2 Arithmetic Operations 208
A.3 Relational Operators 210
A.4 Logical Operators 211
A.5 Control Flow 211
A.6 Special Characters and Variables 213
A.7 Output Data Format 214
A.8 Graphics 214
A.9 M-Files: Scripts and Functions 214
A.10 MAT-Files 216
A.11 Printing 216
A.12 Diagnostics and Help Facility 217
A.13 Remarks 218
B A Summary of MATLAB Commands Used 219
References 223
vi
Preface
Digital signalprocessing (DSP) is concerned with the representation of signals as a sequence
of numbers and the algorithmic operations carried out on the signals to extract specific
information contained in them. In barely 40 years the field of digitalsignalprocessing has
matured considerably due to the phenomenal growth in both research and applications, and
almost every university is now offering at least one or more courses at the upper division
and/or first-year graduate level on this subject. With the increasing availability of powerful
personal computers and workstations at affordable prices, it has become easier to provide
the student with a practical environment to verify the concepts and the algorithms learned
in a lecture course.
This book is for a computer-based DSP laboratory course that supplements a lecture course
on the subject. It includes 11 laboratory exercises with each exercise containing a number
of projects to be carried out on a computer. The total number of projects may be more than
what can be completed in a quarter- or a semester-long course assuming a three-hour per
week laboratory. It is suggested that the instructor select pertinent projects that are more
relevant to the lecture course he/she is teaching. If the computer laboratory is open for
longer hours, it is recommended that the student be encouraged to come to the laboratory
for longer periods of time to enable him/her to complete all projects.
The programming language used in this book is MATLAB,
1
widely used for high-perfor-
mance numerical computation and visualization. The book assumes that the reader has no
background in MATLAB and teaches him/her through tested programs in the first half of the
book the basics of this powerful language in solving important problems in signal processing.
In the second half of the book the student is asked to write the necessary MATLAB programs
to carry out the projects. I believe students learn the intricacies of problem solving with
MATLAB faster by using tested, complete programs and later writing simple programs to
solve specific problems. A short review of the key concepts and features of MATLAB is
provided in Appendix A.
Altogether there are 75 MATLAB programs in the text that have been tested under version
7.0 of MATLAB and version 6.3 of the SignalProcessing Toolbox. The programs listed in
this book are not necessarily the fastest with regard to their execution speeds, nor are they
the shortest. They have been written for maximum clarity without detailed explanations.
This book includes a CD containing all MATLAB programs for the PC running Windows
1
MATLAB is a registered trademark of The Mathworks, Inc., 3 Apple Hill Dr., Natick, MA 01760, phone:
508-647-7000, http://www.mathworks.com.
vii
viii
XP, the /pagebreak Macintosh computers running Mac OS X and UNIX workstations. All
programs are also available from the Internet site ftp://iplserv.ece.ucsb.edu in the directory
/pub/mitra/Labs.
Each laboratory exercise contains a number of projects for the students to implement on
their computers. Each project is followed by a series of questions the students must answer
before embarking on the following project. These questions are designed to teach the student
the fundamentals of MATLAB and also the key concepts of DSP. For the latter part, each
exercise includes a section summarizing the materials necessary for a quick review of DSP
materials necessary to carry out the projects included in the exercise. For further details
and explanations, each exercise includes at the end a list of DSP texts with specific chapter
and/or section numbers. Each exercise also includes a section summarizing the MATLAB
commands used to enable the student to find out more about one or more of these commands,
if necessary, through the help command. A brief explanation of all MATLAB functions
used in this book is given in Appendix B.
A novel feature of this book contains is the inclusion of partially written report documents
for each of the first 10 laboratory exercises in the CD provided. These reports are written
in Microsoft Word. The students fill in the space provided for answers to the questions as
they proceed through the projects. This feature permits the students to complete more work
in a specified amount of time than would have been possible without it. The answers of
the students should appear in a different font to make it easier for the laboratory instructor
to evaluate the student’s work. The completed report also can serve as a guide for writing
reports in other laboratory courses.
This book has evolved from teaching a laboratory component to an upper-division course
on digitalsignalprocessing at the University of California, Santa Barbara, for the last 10
years. I thank my former students Drs. Stefan Thurnhofer and Ing-Song Lin for their
assistance in developing the preliminary version of the laboratory course materials. I also
thank the students who took the upper division course and provided valuable comments that
have improved the contents and style of the laboratory portion of the course. The complete
manuscript of this book has been reviewed by Professor Hrvoje Babic of the University
of Zagreb, Zagreb, Croatia; Professor Tamal Bose of the Utah State University, Logan,
Utah; Professor Ulrich Heute of the University of Kiel, Kiel, Germany; Professor Ottar
Johnsen of the Ecole d’Ing´enieurs de Friboug, Friboug, Switzerland; Professor Abul N.
Khondker of the Clarkson University, Potsdam, New York; Professor V. John Mathews of
the University of Utah, Salt Lake City, Utah and Professor Yao Wang of the Polytechnic
University, Brooklyn, New York. I thank them for their valuable comments. I thank my
former students, Drs. Rajeev Gandhi, Michael Moore and Debargha Mukherjee, for their
assistance in proofreading the manuscript and checking all the programs included in the first
version of this book. I also thank my students John Berger and Yang Zhang for updating
all programs in the present version. I acknowledge with gratitude the support of the Office
of Instructional Development at the University of California, Santa Barbara, for providing
me with two instructional improvement grants to develop the laboratory course. Finally, I
thank my son Goutam for the cover design of my book.
Every attempt has been made to ensure the accuracy of all materials in this book, including
the MATLAB programs. I would, however, appreciate readers bringing to my attention any
ix
errors that may have appeared in the printed version for reasons beyond my control and
that of the publisher. These errors and any other comments can be communicated to me by
e-mail addressed to: mitra@ece.ucsb.edu.
Santa Barbara Sanjit K. Mitra
[...]... Discrete-Time Signals in the Time Domain 1.1 1 Introduction Digitalsignalprocessing is concerned with the processing of a discrete-time signal, called the input signal, to develop another discrete-time signal, called the output signal, with more desirable properties In certain applications, it may be necessary to extract some key properties of the original signalusing specific digitalsignal processing. .. J G Lucas, and W S Hodgkiss DigitalSignal Processing: A System Design Approach Wiley, New York NY, 1988 Secs 2.1.2–2.1.4 [3] L B Jackson Digital Filters and SignalProcessing Kluwer, Boston MA, third edition, 1996 Secs 2.2–2.3 [4] R Kuc Introduction to Digital SignalProcessing McGraw-Hill, New York NY, 1988 Secs 2-2 , 2-4 [5] L C Ludeman Fundamentals of DigitalSignalProcessing Harper & Row, New... Mitra Digital Signal Processing: A Computer-Based Approach McGraw-Hill, New York NY, third edition, 2005 Secs 2.1–2.2 [7] A V Oppenheim, R W Schafer, and J R Buck Discrete-Time SignalProcessing Prentice-Hall, Upper Saddle River NJ, second edition, 1998 Sec 2.1 [8] B Porat A Course in Digital SignalProcessing Wiley, New York NY, 1996 Secs 2.7–2.8 [9] J G Proakis and D G Manolakis Digital Signal Processing: ... Principles, Algorithms, and Applications Prentice-Hall, Upper Saddle River NJ, third edition, 1996 Secs 2.2–2.4 [10] R A Roberts and C T Mullis Digital Signal Processing, Addison-Wesley Reading MA, 1987 Sec 2.2 Discrete-Time Systems in the Time Domain 2.1 2 Introduction A discrete-time system processes an input signal in the time-domain to generate an output signal with more desirable properties by applying... types shown in Figures A.1 and 1.2 Using these programs, generate and plot the sequences Chapter 1 • Discrete-Time Signals in the Time Domain 14 1 Amplitude 2 1 Amplitude 2 0 -1 -2 0 -1 0 10 20 30 Time index n 40 50 -2 0 10 (a) 40 50 (b) Figure 1.2 1.9 20 30 Time index n Sawtooth wave sequences Background Reading [1] E Cunningham Digital Filtering: An Introduction Houghton-Mifflin, Boston MA, 1992 Secs... discrete-time system by observing the output signals for specific input signals It is thus important to learn first how to generate in the time domain some basic discrete-time signals in MATLAB and perform elementary operations on them, which are the main objectives of this first exercise A secondary objective is to learn the application of some basic MATLAB commands and how to apply them in simple digital signal. .. Project 1.4 Random Signals A random signal of length N with samples uniformly distributed in the interval (0,1) can be generated by using the MATLAB command x = rand(1,N); Likewise, a random signal x[n] of length N with samples normally distributed with zero mean and unity variance can be generated by using the following MATLAB command x = randn(1,N); 10 Chapter 1 • Discrete-Time Signals in the Time... the noise-corrupted signal? If not, why not? Q1.32 What are the relations between the signals x1, x2, and x3, and the signal x? Q1.33 What is the purpose of the legend command? Project 1.6 Generation of Complex Signals More complex signals can be generated by performing the basic opertations on simple signals For example, an amplitude modulated signal can be generated by modulating a high-frequency... x with zero initial conditions, that is, y [-1 ] y [-2 ] = = y[-N] = 0 The output can also be computed using y = filter(num,den,x,ic) where ic = [y [-1 ], y [-2 ], , y[-N]] is the vector of initial conditions Access to final conditions is obtained using [y,fc] filter(num,den,x, ic) Project 2.1 The Moving Average System Examination of Eq (1.21) reveals that the three-point smoothing filter considered here is... title(’Output signal ); Questions: Q2.5 Use sinusoidal signals with different frequencies as the input signals and compute the output signal for each input How do the output signals depend on the frequencies of the input signal? Can you verify your observation mathematically? 22 Chapter 2 • Discrete-Time Systems in the Time Domain Q2.6 Use sinusoidal signals of the form x[n] sin(ωo n)+K as the input signal . concerned with the processing of a discrete-time signal, called
the input signal, to develop another discrete-time signal, called the output signal, with
more. by
e-mail addressed to: mitra@ece.ucsb.edu.
Santa Barbara Sanjit K. Mitra
x
Discrete-Time Signals
in the Time Domain
1
1.1 Introduction
Digital signal processing