GNALS AND
SPST
I USING MATLAB"
-I.: +-F;r
. -
*JOHN R. BUCK
MICHAEL M. DANIEL'
ANDREW C. SINGER
Lomputer Explorations in
SIGNALS AND SYSTEMS
Alan V. Oppenheim, Series Editor
Two Dimensional Imaging
Signal Processing
EDS. Advanced Topics in Signal Processing
& RABINER Multirate Digital Signal Processing
ANDREWS & HUNT Digital 11nage Restoration
BRACEWELL
BRIGHAM The Fast Fourier Transform and Its Applications
BUCK, DANIEL, SINGER Computer Explorations in Signals and Systerns Using MATLAB
BURDIC Underwater Acoustic System Analysis 2/E
CASTLEMAN Digital Image Processing
COHEN Time-Frequency Analysis
CROCHIERE
DUDGEON & MERSEREAU Multidernensional Digital Signal Processing
HAYKIN Advances in Spectrum A~?alysis and Array Processing. Vol. I, I/ & 111
HAYKIN, ED Array Signal Processing
JOHNSON & DUDGEON Array Signal Processing
KAY Fundamentals of Statistical Signal Processing
KAY Modern Spectral Estimation
KINO Acoustic Waves: Devices, Imaging, and Analog Signal Processing
LIM Two-Dimensional Signal and Image Processing
LIM, ED. Speech Enhancement
LIM & OPPENHEIM,
MARPLE Digital Spectral Analysis with Applications
MCCLELLAN & RADER Number Theory in Digital Signal Processing
MENDEL Lessons in Estir~lation Theory for Signal Processing Cor~zrn~inications and Control 2/E
NIKIAS & PETROPULU Higher Order Spectra Analysis
OPPENHEIM & NAWAB Symbolic and Knowledge-Based Signal Processing
OPPENHEIM & WILLSKY, WITH NAWAB Signals and Systenzs 2/E
OPPENHEIM & SCHAFER Digital Signal Processing
OPPENHEIM & SCHAFER Discrete-Time Signal Processing
ORFAN~D~S
PHILLIPS & NAGLE Digital Control Systems Analysis and Design, 3/E
PICINBONO Randonz Signals and S.ystems
RABINER & GOLD Theory and Applications of Digital Signal Processing
RAB~NER & SCHAFER Digital Processing of Speech Signals
RABINER & JUANG Fundamentals of Speech Recognition
ROBINSON & TREITEL Geophysical Signal Analysis
STEARNS & DAVID Signal Processing Algorithms in Fortran and C
STEARNS & DAVID Signal Processing Algorithms in MATLAB
TEKALP Digital Video Processing
THERRIEN Discrete Random Signals and Statistical Signal Processing
TRIBOLET Seismic Applications of Homonlorphic Signal Processing
VETTERLI & KOVACEVIC Wavelets and Subband Coding
VIADYANATHAN
Multirate Systems and Filter Banks
WIDROW & STEARNS Adaptive Signal Processing
Acquisition Editor: Alice Dworkin
Production Editor: Carole Suraci
Special Projects Manager: Barbara A. Murray
Production Coordinator: Donna Sullivan
Supplement Cover Manager: Paul Gourhan
O 1997 by Prentice-Hall, Inc.
Simon & Schuster I A Viacom Company
Upper Saddle River, NJ 07458
All r~ghts reserved. No part of t h ~ s book may be
reproduced, In any form or by any means,
~ o ~ - p e ~ m ~ s s ? ~ r ~ t ~ n ~
from the publ~sher.
I
. -- -
I
Printed in the United States of America
'C---
ISBN 0-13-732868-0
Prentice-Hall International (UK) Limited, London
Prentice-Hall of Australia Pty. Limited, Sydney
Prentice-Hall Canada, Inc., Toronto
Prentice-Hall Hispanoamericana, S.A., Mexico
Prentice-Hall of India Private Limited, New Delhi
Prentice-Hall of Japan, Inc., Tokyo
Simon & Schuster Asia Pte. Ltd., Singapore
Editora Prentice-Hall do Brasil, Ltda., Rio de Janeiro
Contents
1 Signals and Systems
. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
1
2
1.1 Tutorial: Basic MATLAB Functions for Representing Signals
1.2 Discrete-Time Sinusoidal Signals
7
1.3 Transformations of the Time Index for Discrete-Time Signals . . . . . . . . 8
10
1.4 Properties of Discrete-Time Systems
1.5 Implementing a First-Order Difference Equation
11
1.6 Continuous-Time Complex Exponential Signals @
12
1.7 Transformations of the Time Index for Continuous-Time Signals @ . . . . . 14
1.8 Energy and Power for Continuous-Time Signals @
16
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
2 Linear Time-Invariant Systems
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
20
2.1 Tutorial: conv
2.2 Tutorial: f i l t e r
22
2.3 Tutorial: l s i m with Differential Equations . . . . . . . . . . . . . . . . . . . 26
2.4 Properties of Discrete-Time LTI Systems . . . . . . . . . . . . . . . . . . . . 29
. . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5 Linearity and Time-Invariance
. . . . . . . . . . 34
2.6 Noncausal Finite Impulse Response Filters . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . 36
2.7 Discrete-Time Convolution
. . . . . . . . . 38
2.8 Numerical Approximations of Continuous-Time
2.9 The Pulse Response of Continuous-Time LTI Systems . . . . . . . . . . . . 41
. . . . . . . . . . . . . . . . . . . . 44
2.10 Echo Cancellation via Inverse Filtering
3 Fourier Series Representation of Periodic Signals
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
3.1 Tutorial: Computing the Discrete-Time Fourier Series with f f t . . . . . . . 47
3.2 Tutorial: freqz
51
3.3 Tutorial: l s i m with System Functions . . . . . . . . . . . . . . . . . . . . . 52
3.4 Eigenfunctions of Discrete-Time LTI Systems . . . . . . . . . . . . . . . . . 53
. . . . . . . . . 55
3.5 Synthesizing Signals with the Discrete-Time Fourier Series
3.6 Properties of the Continuous-Time Fourier Series . . . . . . . . . . . . . . . 57
3.7 Energy Relations in the Continuous-Time Fourier Series . . . . . . . . . . . 58
3.8 First-Order Recursive Discrete-Time Filters . . . . . . . . . . . . . . . . . . 59
3.9 Frequency Response of a Continuous-Time System . . . . . . . . . . . . . . 60
3.10 Computing the Discrete-Time Fourier Series . . . . . . . . . . . . . . . . . . 62
3.11 Synthesizing Continuous-Time Signals with the Fourier Series @
3.12 The Fourier Representation of Square and Triangle Waves @
3.13 Continuous-Time Filtering @
. . . . . .
. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
64
66
69
CONTENTS
4 The Continuous-Time Fourier Transform
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
71
71
4.1 Tutorial: freqs
. . . 74
4.2 Numerical Approximation to the Continuous-Time Fourier Transform
76
4.3 Properties of the Continuous-Time Fourier Transform
79
4.4 Time- and Frequency-Domain Characterizations of Systems
81
4.5
4.6 Amplitude Modulation and the Continuous-Time Fourier Transform . . . . 83
4.7 Symbolic Computation of the Continuous-Time Fourier Transform @ . . . 86
Impulse Responses of Differential Equations by Partial Fraction Expansion
. . . . . . . . . . . .
. . . . . . . . .
5 The Discrete-Time Fourier Transform
5.1 Computing Samples of the DTFT
5.2 TelephoneTouch-Tone
5.3 Discrete-Time All-Pass Systems
5.4 Frequency Sampling: DTFT-Based Filter Design
5.5 System Identification
5.6 Partial Fraction Expansion for Discrete-Time Systems
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . .
6 Time and Frequency Analysis of Signals and Systems
Image Processing with One-Dimensional Filters
6.1 A Second-Order Shock Absorber
6.2
6.3 Filter Design by Transformation
6.4 Phase Effects for Lowpass Filters
6.5 Frequency Division Multiple-Access
6.6 Linear Prediction on the Stock Market
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
89
90
93
96
97
99
101
105
106
110
114
117
118
121
125
126
128
131
134
136
138
143
144
147
149
152
156
7 Sampling
7.1 Aliasing due to Undersampling
7.2 Signal Reconstruction from Samples
7.3 Upsampling and Downsampling
7.4 Bandpass Sampling
7.5 Half-Sample Delay
7.6 Discrete-Time Differentiation
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
8 Communications Systems
8.1 The Hilbert Transform and Single-Sideband AM
8.2 Vector Analysis of Amplitude Modulation with Carrier
8.3 Amplitude Demodulation and Receiver Synchronization
8.4
8.5 Frequency Modulation
. . . . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Intersymbol Interference in PAM Systems
9 The Laplace Transform
159
9.1 Tutorial: Making Continuous-Time Pole-Zero Diagrams . . . . . . . . . . . 159
CONTENTS
9.2 Pole Locations for Second-Order Systems
9.3 Butterworth Filters
9.4 Surface Plots of Laplace Transforms
9.5
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
Implementing Noncausal Continuous-Time Filters
162
164
165
168
10 The z-Transform
173
174
10.1 Tutorial: Making Discrete-Time Pole-Zero Diagrams
176
10.2 Geometric Interpretation of the Discrete-Time F'requency Response
10.3 Quantization Effects in Discrete-Time Filter Structures
179
10.4 Designing Discrete-Time Filters with Euler Approximations . . . . . . . . . 183
10.5 Discrete-Time Butterworth Filter Design Using the Bilinear Transformation 186
. . . . . . . . . . . . .
. . . . .
. . . . . . . . . . .
11 Feedback Systems
11.1 Feedback Stabilization: Stick Balancing
11.2 Stabilization of Unstable Systems
11.3 Using Feedback to Increase the Bandwidth of an Amplifier
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
191
191
194
197
Preface
This book provides computer exercises for an undergraduate course on signals and linear
systems. Such a course or sequence of courses forms an important part of most engineering
curricula. This book was primarily designed as a companion to the second edition of Signals
and Systems by Oppenheim and Willsky with Nawab. While the sequence of chapter topics
and the notation of this book match that of Signals and Systems, this book of exercises is
self-contained and the coverage of fundamental theory and applications is sufficiently broad
to make it an ideal companion to any introductory signals and systems text or course.
We believe that assignments of computer exercises in parallel with traditional written
problems can help readers to develop a stronger intuition and a deeper understanding of
linear systems and signals. To this end, the exercises require the readers to compare the an-
swers they compute in MATLAB@ with results and predictions made based on their analytic
understanding of the material. We believe this approach actively challenges and involves the
reader, providing more benefit than a passive computer demonstration. Wherever possible,
the exercises have been divided into Basic, Intermediate, and Advanced Problems. In work-
ing the problems, the reader progresses from fundamental theory to real applications such
as speech processing, financial market analysis and designing mechanical or communication
systems. Basic Problems provide detailed instructions for readers, guiding them through
the issues explored, but still requiring a justification of their results. Intermediate Problems
examine more sophisticated concepts, and demand more initiative from the readers in their
use of MATLAB. Finally, Advanced Problems challenge the readers' understanding of the
more subtle or complicated issues, often requiring open-ended work, writing functions, or
processing real data. Some of the Advanced Problems in this category are appropriate for
advanced undergraduate coursework on signals and systems.
Care has been taken to ensure that almost all the exercises in this book can be completed
within the limitations of the Student Edition of MATLAB 4.0, except for a few Advanced
Problems which allow open-ended exploration if the user has access to a professional version
of MATLAB. To assist readers, a list of MATLAB functions used in the text can be found in
the index, which notes the exercise or page number in which they are explained. Throughout
this book, MATLAB functions, commands, and variables will be indicated by typewriter
f o n t . The @ symbol following the title of an exercise indicates that the exercise requires
the Symbolic Math Toolbox.
A number of exercises refer to functions or data files the reader will need. These are
in the Computer Explorations Toolbox which is available from The Mathworks via The