Essentials of Digital Signal Processing (2014)
Essentials of Digital Signal Processing (2014)
Essentials of Digital Signal Processing (2014)
This textbook offers a fresh approach to digital signal processing (DSP) that combines heuristic
reasoning and physical appreciation with sound mathematical methods to illuminate DSP concepts
and practices. It uses metaphors, analogies, and creative explanations along with carefully selected
examples and exercises to provide deep and intuitive insights into DSP concepts.
Practical DSP requires hybrid systems including both discrete- and continuous-time components. This book follows a holistic approach and presents discrete-time processing as a seamless
continuation of continuous-time signals and systems, beginning with a review of continuous-time signals and systems, frequency response, and filtering. The synergistic combination of continuous-time
and discrete-time perspectives leads to a deeper appreciation and understanding of DSP concepts
and practices.
Notable Features
1. Written for upper-level undergraduates
2. Provides an intuitive understanding and physical appreciation of essential DSP concepts without sacrificing mathematical rigor
3. Illustrates concepts with 500 high-quality figures, more than 170 fully worked examples, and
hundreds of end-of-chapter problems
4. Encourages student learning with more than 150 drill exercises, including complete and detailed
solutions
5. Maintains strong ties to continuous-time signals and systems concepts, with immediate access
to background material with a notationally consistent format, helping readers build on their
previous knowledge
6. Seamlessly integrates MATLAB throughout the text to enhance learning
7. Develops MATLAB code from a basic level to reinforce connections to underlying theory and
sound DSP practice
B. P. Lathi holds a PhD in Electrical Engineering from Stanford University and was previously a
Professor of Electrical Engineering at California State University, Sacramento. He is the author of
eight books, including Signal Processing and Linear Systems (second ed., 2004) and, with Zhi Ding,
Modern Digital and Analog Communications Systems (fourth ed., 2009).
Roger Green is an Associate Professor of Electrical and Computer Engineering at North Dakota State
University. He holds a PhD from the University of Wyoming. He is co-author, with B. P. Lathi, on
the second edition of Signal Processing and Linear Systems.
Essentials of Digital
Signal Processing
Bhagawandas P. Lathi and Roger Green
Sacramento State University,
North Dakota State University
Contents
Preface
vii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
3
4
4
5
5
6
7
7
8
8
9
12
13
15
15
16
18
21
21
25
25
26
27
28
29
29
30
30
33
34
37
41
45
50
51
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
52
52
53
54
59
59
61
66
68
70
72
73
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
85
85
89
92
94
97
100
104
104
106
109
109
112
113
115
116
117
118
120
120
129
139
144
147
149
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
155
155
161
164
168
173
176
181
185
189
194
196
199
ii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
212
214
214
215
216
219
219
220
222
231
231
232
232
233
236
238
245
246
248
248
248
250
252
254
256
256
257
257
261
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
270
270
275
277
282
284
285
288
291
294
300
303
304
305
306
306
311
311
312
iii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
314
314
315
315
317
322
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
331
331
337
338
340
343
343
343
343
344
345
350
351
354
355
359
362
364
370
371
373
379
380
383
387
391
394
395
397
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
410
410
410
416
419
425
427
427
427
428
428
432
433
433
435
iv
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7.4
7.5
7.6
7.7
7.8
7.9
. . . . . .
Function
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
436
439
445
447
451
453
457
462
469
469
472
474
476
8 Digital Filters
8.1 Innite Impulse Response Filters . . . . . . . . . . . . . . . . . . .
8.1.1 The Impulse Invariance Method Revisited . . . . . . . . . .
8.1.2 The Bilinear Transform . . . . . . . . . . . . . . . . . . . .
8.1.3 The Bilinear Transform with Prewarping . . . . . . . . . .
8.1.4 Highpass, Bandpass, and Bandstop Filters . . . . . . . . . .
8.1.5 Realization of IIR Filters . . . . . . . . . . . . . . . . . . .
8.2 Finite Impulse Response Filters . . . . . . . . . . . . . . . . . . . .
8.2.1 Linear Phase FIR Filters . . . . . . . . . . . . . . . . . . .
8.2.2 Realization of FIR Filters . . . . . . . . . . . . . . . . . . .
8.2.3 Windowing in FIR Filters . . . . . . . . . . . . . . . . . . .
8.2.4 Time-Domain Methods of FIR Filter Design . . . . . . . . .
8.2.5 Window Method FIR Filter Design for Given Specications
8.2.6 Frequency-Domain Methods of FIR Filter Design . . . . . .
8.2.7 Frequency-Weighted Least-Squares FIR Filter Design . . .
8.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
485
485
486
491
497
501
508
511
511
515
517
521
529
537
544
552
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
559
560
563
565
567
569
572
573
579
579
579
580
580
580
581
582
583
585
588
590
593
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9.6
9.7
9.8
9.9
Goertzels Algorithm . . . . . . . . . . . . .
The Fast Fourier Transform . . . . . . . . .
9.7.1 Decimation-in-Time Algorithm . . .
9.7.2 Decimation-in-Frequency Algorithm
The Discrete-Time Fourier Series . . . . . .
Summary . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
600
603
604
609
612
617
A MATLAB
625
B Useful Tables
640
C Drill Solutions
646
Index
731
vi
Preface
Since its emergence as a eld of importance in the 1970s, digital signal processing (DSP) has grown
in exponential lockstep with advances in digital hardware. Todays digital age requires that undergraduate students master material that was, until recently, taught primarily at the graduate level.
Many DSP textbooks remain rooted in this graduate-level foundation and cover an exhaustive (and
exhausting!) number of topics. This book provides an alternative. Rather than cover the broadest
range of topics possible, we instead emphasize a narrower set of core digital signal processing concepts. Rather than rely solely on mathematics, derivations, and proofs, we instead balance necessary
mathematics with a physical appreciation of subjects through heuristic reasoning, careful examples,
metaphors, analogies, and creative explanations. Throughout, our underlying goal is to make digital
signal processing as accessible as possible and to foster an intuitive understanding of the material.
Practical DSP requires hybrid systems that include both discrete-time and continuous-time components. Thus, it is somewhat curious that most DSP textbooks focus almost exclusively on discretetime signals and systems. This book takes a more holistic approach and begins with a review of
continuous-time signals and systems, frequency response, and ltering. This material, while likely
familiar to most readers, sets the stage for sampling and reconstruction, digital ltering, and other
aspects of complete digital signal processing systems. The synergistic combination of continuoustime and discrete-time perspectives leads to a deeper and more complete understanding of digital
signal processing than is possible with a purely discrete-time viewpoint. A strong foundation of
continuous-time concepts naturally leads to a stronger understanding of discrete-time concepts.
Notable Features
Some notable features of this book include the following:
1. This text is written for an upper-level undergraduate audience, and topic treatment is appropriately geared to the junior and senior levels. This allows a suciently detailed mathematical
treatment to obtain a solid foundation and competence in DSP without losing sight of the
basics.
2. An underlying philosophy of this textbook is to provide a simple and intuitive understanding
of essential DSP concepts without sacricing mathematical rigor. Much attention has been
paid to provide clear, friendly, and enjoyable writing. A physical appreciation of the topics
is attained through a balance of intuitive explanations and necessary mathematics. Concepts
are illustrated using nearly 500 high-quality gures and over 170 fully worked examples. Further reinforcement is provided through over 150 drill exercises, complete detailed solutions of
which are provided as an appendix to the book. Hundreds of end-of-chapter problems provide
students with additional opportunities to learn and practice.
3. Unlike most DSP textbooks, this book maintains strong ties to continuous-time signals and
systems concepts, which helps readers to better understand complete DSP systems. Further,
by leveraging o a solid background of continuous-time concepts, discrete-time concepts are
more easily and completely understood. Since the continuous-time background material is
vii
included, readers have immediate access to as much or little background material as necessary,
all in a notationally-consistent format.
4. MATLAB is eectively utilized throughout the text to enhance learning. This MATLAB material is tightly and seamlessly integrated into the text so as to seem a natural part of the
material and problem solutions rather than an added afterthought. Unlike many DSP texts,
this book does not have specic MATLAB Examples or MATLAB Problems any more
than it has Calculator Examples or Calculator Problems. Modern DSP has evolved to
the point that sophisticated computer packages (such as MATLAB) should be used every bit
as naturally as calculus and calculators, and it is this philosophy that guides the manner that
MATLAB is incorporated into the book.
Many DSP books rely on canned MATLAB functions to solve various digital signal processing
problems. While this produces results quickly and with little eort, students often miss how
problem solutions are coded or how theory is translated into practice. This book specically
avoids high-level canned functions and develops code from a more basic level; this approach
reinforces connections to the underlying theory and develops sound skills in the practice of
DSP. Every piece of MATLAB code precisely conforms with book concepts, equations, and
notations.
Acknowledgments
We would like to oer our sincere gratitude to the many people who have generously given their
time and talents to the creation, improvement, and renement of this book. Books, particularly
sizable ones such as this, involve a seemingly innite number of details, and it takes the combined
eorts of a good number of good people to successfully focus these details into a quality result.
During the six years spent preparing this book, we have been fortunate to receive valuable feedback
and recommendations from numerous reviewers, colleagues, and students. We are grateful for the
reviews provided by Profs. Zekeriya Aliyazicioglu of California State Polytechnic University-Pomona,
Mehmet Celenk of Ohio University, Liang Dong of Western Michigan University, Jake Gunther of
Utah State University, Joseph P. Hobeck of the University of Portland, Jianhua Liu of EmbryRiddle Aeronautical University, Peter Mathys of the University of Colorado, Phillip A. Mlsna of
Northern Arizona University, S. Hossein Mousavinezhad of Idaho State University, Kalyan Mondal
of Fairleigh Dickinson University, Anant Sahai of UC Berkeley, Jose Sanchez of Bradley University,
and Xiaomu Song of Widener University. We also oer our heartfelt thanks for the thoughtful
comments and suggestions provided by the many anonymous reviewers, who outnumbered the other
reviewers more than two-to-one. We wish that we could oer a more direct form of recognition
to these reviewers. Some of the most thoughtful and useful comments came from students taking
the Applied Digital Signal Processing and Filtering course at North Dakota State University. Two
students in particular Kyle Kraning and Michael Boyko went above the call of duty, providing
over one hundred corrections and comments. For their creative contributions of cartoon ideas, we
also give thanks to NDSU students Stephanie Rosen (Chs. 1, 4, and 5) and Tanner Voss (Ch. 2).
Book writing is a time-consuming activity, and one that inevitably causes hardship to those who are
close to an author. Thus, we oer our nal thanks to our families for their sacrice, support, and
love.
B. P. Lathi
R. A. Green
ix
Chapter 1
Review of Continuous-Time
Signals and Systems
This chapter reviews the basics of continuous-time (CT) signals and systems. Although the reader is
expected to have studied this background as a prerequisite for this course, a thorough yet abbreviated
review is both justied and wise since a solid understanding of continuous-time concepts is crucial
to the study of digital signal processing.
Why Review Continuous-Time Concepts?
It is natural to question how continuous-time signals and systems concepts are relevant to digital
signal processing. To answer this question, it is helpful to rst consider elementary signals and
systems structures.
In the most simplistic sense, the study of signals and systems is described by the block diagram
shown in Fig. 1.1a. An input signal is fed into a system to produce an output signal. Understanding
this block diagram in a completely general sense is quite dicult, if not impossible. A few well-chosen
and reasonable restrictions, however, allow us to fully understand and mathematically quantify the
character and behavior of the input, the system, and the output.
input
system
output
(a)
x(t)
continuous-time system
y(t)
(b)
x[n]
discrete-time system
y[n]
(c)
Figure 1.1: Elementary block diagrams of (a) general, (b) continuous-time, and (c) discrete-time
signals and systems.
Introductory textbooks on signals and systems often begin by restricting the input, the system,
and the output to be continuous-time quantities, as shown in Fig. 1.1b. This diagram captures the
basic structure of continuous-time signals and systems, the details of which are reviewed later in this
chapter and the next. Restricting the input, the system, and the output to be discrete-time (DT)
quantities, as shown in Fig. 1.1c, leads to the topic of discrete-time signals and systems.
Typical digital signal processing (DSP) systems are hybrids of continuous-time and discrete-time
systems. Ordinarily, DSP systems begin and end with continuous-time signals, but they process
1
signals using a digital signal processor of some sort. Specialized hardware is required to bridge
the continuous-time and discrete-time worlds. As the block diagram of Fig. 1.2 shows, general DSP
systems are more complex than either Figs. 1.1b or 1.1c allow; both CT and DT concepts are needed
to understand complete DSP systems.
x(t)
continuous
to discrete
x[n]
discrete-time
system
y[n]
discrete to
continuous
y(t)
1.1
A signal is a set of data or information. Examples include telephone and television signals, monthly
sales of a corporation, and the daily closing prices of a stock market (e.g., the Dow Jones averages).
In all of these examples, the signals are functions of the independent variable time. This is not
always the case, however. When an electrical charge is distributed over a body, for instance, the
signal is the charge density, a function of space rather than time. In this book we deal almost
exclusively with signals that are functions of time. The discussion, however, applies equally well to
other independent variables.
Signals are categorized as either continuous-time or discrete-time and as either analog or digital.
These fundamental signal categories, to be described next, facilitate the systematic and ecient
analysis and design of signals and systems.
As we shall later see, the continuous-to-discrete block is typically comprised of a signal conditioning circuit
followed by a CT-to-DT converter and an analog-to-digital converter (ADC). Similarly, the discrete-to-continuous
block is typically comprised of a digital-to-analog converter (DAC) followed by a DT-to-CT converter and nally
another conditioning circuit.
1.1.1
A signal that is specied for every value of time t is a continuous-time signal. Since the signal is
known for every value of time, precise event localization is possible. The tidal height data displayed
in Fig. 1.3a is an example of a continuous-time signal, and signal features such as daily tides as well
as the eects of a massive tsunami are easy to locate.
tidal height [cm], Syowa Station, Antarctica, UTC+3, 2004
tsunami event
1350
1150
Source: Hydrographic and Oceanographic Dept., Japan Coast Guard
Dec. 26
Dec. 27
Dec. 28
(a)
Dec. 29
Dec. 30
4000
September 2001
3000
2000
1000
0
1998
2000
2002
(b)
2004
2006
1.1.2
The concept of continuous-time is often confused with that of analog. The two are not the same.
The same is true of the concepts of discrete-time and digital. A signal whose amplitude can take on
any value in a continuous range is an analog signal. This means that an analog signal amplitude can
take on an innite number of values. A digital signal, on the other hand, is one whose amplitude
can take on only a nite number of values. Signals associated with typical digital devices take on
only two values (binary signals). A digital signal whose amplitudes can take on L values is an L-ary
signal of which binary (L = 2) is a special case.
The terms continuous-time and discrete-time qualify the nature of a signal along the time
(horizontal) axis. The terms analog and digital, on the other hand, qualify the nature of
the signal amplitude (vertical axis). Using a sinusoidal signal, Fig. 1.4 demonstrates the various
dierences. It is clear that analog is not necessarily continuous-time and that digital need not be
discrete-time. Figure 1.4c shows, for example, an analog, discrete-time signal. We shall discuss later
a systematic procedure for A/D conversion, which involves quantization (rounding o), as explained
in Sec. 3.6.
analog
digital
continuous-time
x(t)
x(t)
(a)
(b)
x[n]
discrete-time
x[n]
(c)
(d)
Figure 1.4: Examples of (a) analog, continuous-time, (b) digital, continuous-time, (c) analog,
discrete-time, and (d) digital, discrete-time sinusoids.
Signals in the physical world tend to be analog and continuous-time in nature (Fig. 1.4a). Digital,
continuous-time signals (Fig. 1.4b) are not common in typical engineering systems. As a result, when
we refer to a continuous-time signal, an analog continuous-time signal is implied.
Computers operate almost exclusively with digital, discrete-time data (Fig. 1.4d). Digital representations can be dicult to mathematically analyze, so we often treat computer signals as if they
were analog rather than digital (Fig. 1.4c). Such approximations are mathematically tractable and
provide needed insights into the behavior of DSP systems and signals.
1.2
We shall review three useful operations that act on the independent variable of a CT signal: shifting,
scaling, and reversal. Since they act on the independent variable, these operations do not change the
shape of the underlying signal. Detailed derivations of these operations can be found in [1]. Although
the independent variable in our signal description is time, the discussion is valid for functions having
continuous independent variables other than time (e.g., frequency or distance).
1.2.1
CT Time Shifting
A signal x(t) (Fig. 1.5a) delayed by b > 0 seconds (Fig. 1.5b) is represented by x(t b). Similarly,
the signal x(t) advanced by b > 0 seconds (Fig. 1.5c) is represented by x(t + b). Thus, to time shift a
signal x(t) by b seconds, we replace t with t b everywhere in the expression for x(t). If b is positive,
the shift represents a time delay; if b is negative, the shift represents a time advance by |b|. This
is consistent with the fact that a time delay of b seconds can be viewed as a time advance of b
seconds.
Notice that the time-shifting operation is on the independent variable t; the function itself remains
unchanged. In Fig. 1.5, the function x() starts when its argument equals T1 . Thus, x(t b) starts
x(t)
(a)
0
T1
x(t b)
(b)
T1 + b
x(t + b)
(c)
T1 b
Figure 1.5: Time shifting a CT signal: (a) original signal, (b) delay by b, and (c) advance by b.
when its argument t b equals T1 , or t = T1 + b. Similarly, x(t + b) starts when t + b = T1 , or
t = T1 b.
1.2.2
CT Time Scaling
A signal x(t), when time compressed by factor a > 1, is represented by x(at). Similarly, a signal time
expanded by factor a > 1 is represented by x(t/a). Figure 1.6a shows a signal x(t). Its factor-2 timecompressed version is x(2t) (Fig. 1.6b), and its factor-2 time-expanded version is x(t/2) (Fig. 1.6c).
In general, to time scale a signal x(t) by factor a, we replace t with at everywhere in the expression
for x(t). If a > 1, the scaling represents time compression (by factor a), and if 0 < a < 1, the scaling
represents time expansion (by factor 1/a). This is consistent with the fact that time compression
by factor a can be viewed as time expansion by factor 1/a.
As in the case of time shifting, time scaling operates on the independent variable and does
not change the underlying function. In Fig. 1.6, the function x() has a maximum value when its
argument equals T1 . Thus, x(2t) has a maximum value when its argument 2t equals T1 , or t = T1 /2.
Similarly, x(t/2) has a maximum when t/2 = T1 , or t = 2T1 .
Show that the time compression of a sinusoid by a factor a (a > 1) results in a sinusoid of the same
amplitude and phase, but with the frequency increased a-fold. Similarly, show that the time expansion
of a sinusoid by a factor a (a > 1) results in a sinusoid of the same amplitude and phase, but with the
frequency reduced by a factor a. Verify your conclusions by sketching the sinusoid sin(2t) and the same
sinusoid compressed by a factor 3 and expanded by a factor 2.
1.2.3
CT Time Reversal
Consider the signal x(t) in Fig. 1.7a. We can view x(t) as a rigid wire frame hinged at the vertical
axis. To time reverse x(t), we rotate this frame 180 about the vertical axis. This time reversal, or
reection of x(t) about the vertical axis, gives us the signal x(t) (Fig. 1.7b); whatever happens in
Fig. 1.7a at some instant t also happens in Fig. 1.7b at the instant t. Thus, the mirror image of
x(t)
1
(a)
0
T1
T2
x(2t)
1
(b)
0
T1
2
T2
2
x(t/2)
1
(c)
0
2T1
2T2
Figure 1.6: Time scaling a CT signal: (a) original signal, (b) compress by 2, and (c) expand by 2.
x(t) about the vertical axis is x(t). Notice that time reversal is a special case of the time-scaling
operation x(at) where a = 1.
x(t)
x(t)
T1
T1
0
(a)
T2
T2
(b)
Figure 1.7: Time reversing a CT signal: (a) original signal and (b) its time reverse.
1.2.4
Many circumstances require simultaneous use of more than one of the previous operations. The
most general case is x(at b), which is realized in two possible sequences of operations:
1. Time shift x(t) by b to obtain x(t b). Now time scale the shifted signal x(t b) by a (i.e.,
replace t with at) to obtain x(at b).
2. Time scale x(t) by a to obtain x(at). Now time shift x(at) by
obtain x a[t ab ] = x(at b).
b
a
For instance, the signal x(2t 6) can be obtained in two ways. First, delay x(t) by 6 to obtain
x(t 6) and then time compress this signal by factor 2 (replace t with 2t) to obtain x(2t 6).
Alternately, we rst time compress x(t) by factor 2 to obtain x(2t); next, replace t with t 3 to
delay this signal and produce x(2t 6).
When a is negative, x(at) involves time scaling as well as time reversal. The procedure, however,
remains the same. Consider the case of a signal x(2t + 3) where a = 2. This signal can
be generated by advancing the signal x(t) by 3 seconds to obtain x(t + 3). Next, compress and
reverse this signal by replacing t with 2t to obtain x(2t + 3). Alternately, we may compress and
reverse x(t) to obtain x(2t); next, replace t with t 3/2 to delay this signal by 3/2 and produce
x(2[t 3/2]) = x(2t + 3).
Using the signal x(t) shown in Fig. 1.6a, sketch the signal y(t) = x(3t 4). Verify that y(t) has a
1 +4
.
maximum value at t = T3
1.3
CT Signal Models
In the area of signals and systems, the unit step, the unit gate, the unit triangle, the unit impulse,
the exponential, and the interpolation functions are very useful. They not only serve as a basis for
representing other signals, but their use benets many aspects of our study of signals and systems.
We shall briey review descriptions of these models.
1.3.1
In much of our discussion, signals and processes begin at t = 0. Such signals can be conveniently
described in terms of unit step function u(t) shown in Fig. 1.8a. This function is dened by
1 t>0
1
u(t) =
t=0 .
(1.1)
2
0 t<0
cos(2t)u(t)
u(t)
1
0
1
(a)
1
(b)
its own advantages, u(0) = 1/2 is particularly appropriate from a theoretical signals and systems
perspective. For real-world signals applications, however, it makes no practical dierence how the
point u(0) is dened as long as the value is nite. A single point, u(0) or otherwise, is just one among
an uncountably innite set of peers. Lost in the masses, any single, nite-valued point simply does
not matter; its individual existence is meaningless.
Further, notice that since it is everlasting, a true unit step cannot be generated in practice. One
might conclude, given that u(t) is physically unrealizable and that individual points are inconsequential, that the whole of u(t) is meaningless. This conclusion is false. Collectively the points of
u(t) are well behaved and dutifully carry out the desired function, which is greatly needed in the
mathematics of signals and systems.
1.3.2
We dene a unit gate function (x) as a gate pulse of unit height and unit width, centered at the
origin, as illustrated in Fig. 1.9a. Mathematically,
1 |t| < 2
1
(t) =
|t| = 12 .
(1.2)
2
1
0 |t| > 2
The gate pulse in Fig. 1.9b is the unit gate pulse (t) expanded by a factor and therefore can
be expressed as (t/ ). Observe that , the denominator of the argument of (t/ ), indicates the
width of the pulse.
(t/ )
(t)
1
12
1
2
(a)
(b)
The unit gate function (t) can be represented in terms of time-shifted unit step functions. Determine
the value b that ensures u(t + b) u(t b) is equal to (t). Next, represent (t) using only time-shifted
and reected unit step functions.
1.3.3
We dene a unit triangle function (t) as a triangular pulse of unit height and unit width, centered
at the origin, as shown in Fig. 1.10a. Mathematically,
1 2|t| |t| 12
(t) =
.
(1.3)
0
|t| > 12
At |t| = 1 , we desire (t) = 0.5 because the inverse Fourier transform of a discontinuous signal converges to the
2
mean of the two values at either side of the discontinuity. As in the case of the unit step, the particular value assigned
to a point of discontinuity, while perhaps theoretically convenient, has little practical signicance.
The pulse in Fig. 1.10b is (t/ ). Observe that here, as for the gate pulse, the denominator of
the argument of (t/ ) indicates the pulse width.
(t)
(t/ )
1
12
1
2
(a)
(b)
1.3.4
The CT unit impulse function (t) is one of the most important functions in the study of signals
and systems. Often called the Dirac delta function, (t) was rst dened by P. A. M. Dirac as
(t) = 0 for t = 0
and
(1.4)
(t) dt = 1.
We can visualize this impulse as a tall, narrow rectangular pulse of unit area, as illustrated in
Fig. 1.11b. The width of this rectangular pulse is a very small value , and its height is a very large
value 1/. In the limit 0, this rectangular pulse has innitesimally small width, innitely large
height, and unit area, thereby conforming exactly to the denition of (t) given in Eq. (1.4). Notice
that (t) = 0 everywhere except at t = 0, where it is undened. For this reason a unit impulse is
represented by the spear-like symbol in Fig. 1.11a.
(t)
1
0
0
2
(a)
(b)
2
2
1 et /(2 )
2
1
0
2
0
(c)
0
0
(d)
Figure 1.11: (a) CT unit impulse (t) and (b)(d) visualizing (t) using various functions in the
limit 0.
Other pulses, such as the triangle pulse shown in Fig. 1.11c or the Gaussian pulse shown in
Fig. 1.11d, may also be used to develop the unit impulse function. The important feature of (t)
10
is not its shape but the fact that its eective duration (pulse width) approaches zero while its area
remains at unity. Both the triangle pulse (Fig. 1.11c) and the Gaussian pulse (Fig. 1.11d) become
taller and narrower as becomes smaller. In the limit as 0, the pulse height , and its width
or duration 0. Yet, the area under each pulse is unity regardless of the value of .
From Eq. (1.4), it follows that the function k(t) = 0 for all t = 0, and its area is k. Thus, k(t)
is an impulse function whose area is k (in contrast to the unit impulse function, whose area is 1).
Graphically, we represent k(t) by either scaling our representation of (t) by k or by placing a k
next to the impulse.
Properties of the CT Impulse Function
Without going into the proofs, we shall enumerate properties of the unit impulse function. The
proofs may be found in the literature (see, for example, [1]).
1. Multiplication by a CT Impulse: If a function (t) is continuous at t = 0, then
(t)(t) = (0)(t).
Generalizing, if (t) is continuous at t = b, then
(t)(t b) = (b)(t b).
(1.5)
2. The Sampling Property: If (t) is continuous at t = 0, then Eqs. (1.4) and (1.5) yield
(t)(t) dt = (0)
(t) dt = (0).
(t)(t b) dt = (b).
(1.6)
Equation (1.6) states that the area under the product of a function with a unit impulse is equal
to the value of that function at the instant where the impulse is located. This property is very
important and useful and is known as the sampling or sifting property of the unit impulse.
3. Relationships between (t) and u(t): Since the area of the impulse is concentrated at
one point t = 0, it follows that the area under (t) from to 0 is zero, and the area is
unity once we pass t = 0. The symmetry of (t), evident in Fig. 1.11, suggests the area is 1/2
at t = 0. Hence,
t
0 t<0
1
t=0 .
(1.7)
( ) d = u(t) =
2
1 t>0
From Eq. (1.7) it follows that
(t) =
d
u(t).
dt
(1.8)
11
impulse function is zero everywhere except at t = 0, and at this only interesting part of its range it
is undened. These diculties are resolved by dening the impulse as a generalized function rather
than an ordinary function. A generalized function is dened by its eect on other functions instead
of by its value at every instant of time.
In this approach, the impulse function is dened by the sampling property of Eq. (1.6). We say
nothing about what the impulse function is or what it looks like. Instead, the impulse function is
dened in terms of its eect on a test function (t). We dene a unit impulse as a function for
which the area under its product with a function (t) is equal to the value of the function (t) at
the instant where the impulse is located. Thus, we can view the sampling property of Eq. (1.6) as
a consequence of the classical (Dirac) denition of the unit impulse in Eq. (1.4) or as the denition
of the impulse function in the generalized function approach.
A House Made of Bricks
In addition to serving as a denition of the unit impulse, Eq. (1.6) provides an insightful and useful
way to view an arbitrary function. Just as a house can be made of straw, sticks, or bricks, a
function can be made of dierent building materials such as polynomials, sinusoids, and, in the case
of Eq. (1.6), Dirac delta functions.
To begin, let us consider Fig. 1.12b, where an input x(t) is shown as a sum of narrow rectangular
strips. As shown in Fig. 1.12a, let us dene a basic strip of unit height and width as p(t) =
(t/ ). The rectangular pulse centered at n in Fig. 1.12b has a height x(n ) and can be
expressed as x(n )p(t n ). As 0 (and n ), x(t) is the sum of all such pulses.
Hence,
p(t n )
x(n )p(t n ) = lim
x(n )
x(t) = lim
.
0
0
n=
n=
x(t)
p(t) = (t/ )
1
x(n )
(a)
x(n )p(t n )
(b)
x(t) = lim
x(n )(t n ) =
x( ) (t ) d.
0
n=
scaled
shifted
sum
impulses
(1.9)
Equation (1.9), known as the sifting property, tells us that an arbitrary function x(t) can be
represented as a sum (integral) of scaled (by x( )) and shifted (by ) delta functions. Recognizing
Actually,
12
that (t ) = ( t), we also see that Eq. (1.9) is obtained from Eq. (1.6) by substituting for t,
t for b, and x() for (). As we shall see in Sec. 1.5, Eq. (1.9) is very much a house of bricks, more
than able to withstand the big bad wolf of linear, time-invariant systems.
Show that
(a)
(b)
(c)
e2t (t + 1) = e2 (t + 1)
( 2) cos
d = 0
4
(d)
(e)
(f )
(t) sin t2 2 = (t)
( )ej d = 1
2(t )
e
(2 ) d = e2(t2)
1.3.5
One of the most important functions in the area of signals and systems is the exponential signal est ,
where s is complex in general and given by
s = + j.
Therefore,
est = e(+j)t = et ejt = et [cos(t) + j sin(t)] .
(1.10)
The nal step in Eq. (1.10) is a substitution based on Eulers familiar formula,
ejt = cos(t) + j sin(t).
(1.11)
A comparison of Eq. (1.10) with Eq. (1.11) suggests that est is a generalization of the function ejt ,
where the frequency variable j is generalized to a complex variable s = + j. For this reason we
designate the variable s as the complex frequency.
For all = 0, est is complex valued. Taking just the real portion of Eq. (1.10) yields
Re est = et cos(t).
(1.12)
From Eqs. (1.10) and (1.12) it follows that the function est encompasses a large class of functions.
The following functions are special cases of est :
1. a constant k = ke0t (where s = 0 + j0),
2. a monotonic exponential et (where s = + j0),
3. a sinusoid cos(t) = Re ejt (where s = 0 + j), and
4. an exponentially varying sinusoid et cos(t) = Re e(+j)t (where s = + j).
Figure 1.13 shows these functions as well as the corresponding restrictions on the complex frequency
variable s. The absolute value of the imaginary part of s is || (the radian frequency), which indicates
the frequency of oscillation of est ; the real part (the neper frequency) gives information about the
rate of increase or decrease of the amplitude of est . For signals whose complex frequencies lie on
the real axis (-axis, where = 0), the frequency of oscillation is zero. Consequently these signals
are constants ( = 0), monotonically increasing exponentials ( > 0), or monotonically decreasing
exponentials ( < 0). For signals whose frequencies lie on the imaginary axis (-axis, where = 0),
et = 1. Therefore, these signals are conventional sinusoids with constant amplitude.
Figure 1.14 shows the demarcation of the s-plane into the left half-plane (LHP), which corresponds to exponentially decaying signals ( < 0), and the right half-plane (RHP), which corresponds
to exponentially growing signals ( > 0). The imaginary axis separates the two regions and corresponds to signals of constant amplitude.
13
e(+j0)t = et
<0
=0
t
(c)
(b)
(a)
Re est = et cos(t)
>0
(d)
(e)
(f)
imaginary axis
real axis
1.3.6
The sine over argument function, or sinc function, plays an important role in signal processing.
It is also known as the ltering or interpolating function. We dene
sinc(t) =
sin(t)
.
t
sin(t)
.
t
(1.13)
14
1. The sinc function is symmetric about the vertical axis (an even function).
2. Except at t = 0 where it appears indeterminate, sinc(t) = 0 when sin(t) = 0. This means
that sinc(t) = 0 for t = 1, 2, 3, . . ..
3. Using LH
opitals rule, we nd sinc(0) = 1 .
4. Since it is the product of the oscillating signal sin(t) and the decreasing function 1/(t),
sinc(t) exhibits sinusoidal oscillations with amplitude rapidly decreasing as 1/(t).
Figure 1.15a shows sinc(t). Observe that sinc(t) = 0 for integer values of t. Figure 1.15b shows
sinc (2t/3). The argument 2t/3 = 1 when t = 3/2. Therefore, the rst zero of this function for t > 0
occurs at t = 3/2.
1
sinc(t)
1
2
(a)
1
t
2
0
1
1
t
1 sinc(2t/3)
1
2
(b)
62
32
6
2
3
2
t+3
3
This problem involves several concepts, including exponential and unit step functions and operations on the independent variable t. The causal decaying exponential
et u(t)
is itself easy
t+3 x(t) =
3
t1
and
. The compox
to sketch
by
hand,
and
so
too
are
the
individual
components
x
3
4
2
t+3
t+3
is a left-sided signal with jump discontinuity at 3 = 0 or t = 3. The component
nent x
3
34 x (t 1) is a right-sided signal with jump discontinuity at t 1 = 0 or t = 1. The combination
y(t) = x t+3
34 x (t 1), due to the overlap region between (1 t 3), is dicult to accurately
3
plot by hand. MATLAB, however, makes accurate plots easy to generate.
01
02
03
u = @(t) 1.0*(t>0)+0.5*(t==0);
x = @(t) exp(-t).*u(t); y = @(t) x((-t+3)/3)-3/4*x(t-1);
t = (-1.5:.0001:4.5); plot(t,y(t)); xlabel(t); ylabel(y(t));
In line 01, the unit step function is created as an anonymous function using relational operators.
Anonymous functions provide a convenient way to quickly specify and manipulate simple functions.
Furthermore, anonymous functions can be used in the denition of other anonymous functions,
which is a convenience that we use in line 02 when dening x(t) and y(t). In line 03, an appropriate
15
time vector is created, and the plots are generated. It is important that the time vector t is created
with suciently ne resolution to adequately represent the jump discontinuities
present in y(t).
3
and
Figure 1.16 shows the result including the individual components x t+3
3
4 x (t 1) added
for clarity.
y(t)
x
t+3
3
0
4
t
34
34 x (t 1)
t+3
3
(b)
(e)
xb (t) = (t)
xe (t) = sinc 2t
(c)
xc (t) = (t/10)
(f )
xf (t) = sinc(t)(t/4)
1.4
CT Signal Classications
There are many possible signal classications that are useful to better understand and properly
analyze a signal. In addition to the continuous-time/discrete-time and the analog/digital signal
classications already discussed, we will also investigate the following classications, which are suitable for the scope of this book:
1. causal, noncausal, and anti-causal signals,
2. real and imaginary signals,
3. even and odd signals,
4. periodic and aperiodic signals,
5. energy and power signals, and
6. deterministic and probabilistic signals.
1.4.1
A causal signal x(t) extends to the right, beginning no earlier than t = 0. Mathematically, x(t) is
causal if
x(t) = 0 for t < 0.
(1.14)
16
The signals shown in Fig. 1.8 are causal. Any signal that is not causal is said to be noncausal.
Examples of noncausal signals are shown in Figs. 1.6 and 1.7. An anti-causal signal x(t) extends to
the left of t = 0. Mathematically, x(t) is anti-causal if
x(t) = 0
for t 0.
(1.15)
Notice that any signal x(t) can be decomposed into a causal component plus an anti-causal component.
A right-sided signal extends to the right, beginning at some point T1 . In other words, x(t) is
right-sided if x(t) = 0 for t < T1 . The signals shown in Fig. 1.5 are examples of right-sided signals.
Similarly, a left-sided signal extends to the left of some point T1 . Mathematically, x(t) is left-sided
if x(t) = 0 for t T1 . If we time invert a right-sided signal, then we obtain a left-sided signal.
Conversely, the time reversal of a left-sided signal produces a right-sided signal. A causal signal is
a right-sided signal with T1 0, and an anti-causal signal is a left-sided signal with T1 0. Notice,
however, that right-sided signals are not necessarily causal, and left-sided signals are not necessarily
anti-causal. Signals that stretch indenitely in both directions are termed two-sided or everlasting
signals. The signals in Figs. 1.13 and 1.15 provide examples of two-sided signals.
Comment
We postulate and study everlasting signals despite the fact that, for obvious reasons, a true everlasting signal cannot be generated in practice. Still, as we show later, many two-sided signal models,
such as everlasting sinusoids, do serve a very useful purpose in the study of signals and systems.
1.4.2
A signal x(t) is real if, for all time, it equals its own complex conjugate,
x(t) = x (t).
(1.16)
A signal x(t) is imaginary if, for all time, it equals the negative of its own complex conjugate,
x(t) = x (t).
(1.17)
The real portion of a complex signal x(t) is found by averaging the signal with its complex
conjugate,
x(t) + x (t)
Re {x(t)} =
.
(1.18)
2
The imaginary portion of a complex signal x(t) is found in a similar manner,
Im {x(t)} =
x(t) x (t)
.
2j
(1.19)
Notice that Im {x(t)} is a real signal. Further, notice that Eq. (1.18) obeys Eq. (1.16) and j times
Eq. (1.19) obeys Eq. (1.17), as expected.
Adding Eq. (1.18) and j times Eq. (1.19), we see that any complex signal x(t) can be decomposed
into a real portion plus (j times) an imaginary portion,
Re {x(t)} + jIm {x(t)} =
x(t) x (t)
x(t) + x (t)
+j
= x(t)
2
2j
or just
x(t) = Re {x(t)} + jIm {x(t)} .
This representation is the familiar rectangular form.
(1.20)
17
Using Eulers formula ejt = cos(t) + j sin(t) and Eqs. (1.18) and (1.19), show that
(a)
cos(t) =
ejt +ejt
2
(b)
sin(t) =
ejt ejt
2j
Whats in a name?
18
Determine the imaginary portions of (a) 1 + j and (b) j. Hint: Neither answer is j!
1.4.3
A signal x(t) is even if, for all time, it equals its own reection,
x(t) = x(t).
(1.21)
A signal x(t) is odd if, for all time, it equals the negative of its own reection,
x(t) = x(t).
(1.22)
As shown in Figs. 1.17a and 1.17b, respectively, an even signal is symmetrical about the vertical
axis while an odd signal is antisymmetrical about the vertical axis.
xe (t)
xo (t)
T1
T1
T1
(a)
T1
(b)
Figure 1.17: Even and odd symmetries: (a) an even signal xe (t) and (b) an odd signal xo (t).
The even portion of a signal x(t) is found by averaging the signal with its reection,
xe (t) =
x(t) + x(t)
.
2
(1.23)
As required by Eq. (1.21) for evenness, notice that xe (t) = xe (t). The odd portion of a signal x(t)
is found in a similar manner,
x(t) x(t)
.
(1.24)
xo (t) =
2
As required by Eq. (1.22) for oddness, xo (t) = xo (t).
Adding Eqs. (1.23) and (1.24), we see that any signal x(t) can be decomposed into an even
portion plus an odd portion,
xe (t) + xo (t) =
or just
x(t) = xe (t) + xo (t).
(1.25)
Notice that Eqs. (1.23), (1.24), and (1.25) are remarkably similar to Eqs. (1.18), (1.19), and (1.20),
respectively.
Because xe (t) is symmetrical about the vertical axis, it follows from Fig. 1.17a that
T1
T1
xe (t) dt = 2
xe (t) dt.
T1
19
T1
T1
xo (t) dt = 0.
These results can also be proved formally by using the denitions in Eqs. (1.21) and (1.22).
Determine and plot the even and odd components of x(t) = eat u(t), where a is real and > 0.
Using Eq. (1.23), we compute the even portion of x(t) to be
xe (t) =
Figures 1.18a, 1.18b, and 1.18c show the resulting plots of x(t), xe (t), and xo (t), respectively.
x(t)
1
eat
1
2
(a)
12
xe (t)
(b)
1 at
e
2
1
2
12
1 at
e
2
xo (t)
1 at
e
2
1
2
(c)
12 eat
0
12
Figure 1.18: Finding the even and odd components of x(t) = eat u(t).
Setting a = 1 for convenience, these plots are easily generated using MATLAB.
01
02
03
04
05
Example 1.2
20
Show that the even and the odd components of x(t) = ejt are xe (t) = cos(t) and xo (t) = j sin(t),
respectively.
(1.26)
A conjugate-symmetric signal is even in its real portion and odd in its imaginary portion. Thus, a
signal that is both conjugate symmetric and real is also an even signal.
A signal x(t) is conjugate antisymmetric, or skew Hermitian, if
x(t) = x (t).
(1.27)
A conjugate-antisymmetric signal is odd in its real portion and even in its imaginary portion. Thus,
a signal that is both conjugate antisymmetric and real is also an odd signal.
The conjugate-symmetric portion of a signal x(t) is given by
xcs (t) =
x(t) + x (t)
.
2
(1.28)
As required by Eq. (1.26), we nd that xcs (t) = xcs (t). The conjugate-antisymmetric portion of a
signal x(t) is given by
x(t) x (t)
xca (t) =
.
(1.29)
2
As required by Eq. (1.27), notice that xca (t) = xca (t).
Adding Eqs. (1.28) and (1.29), we see that any signal x(t) can be decomposed into a conjugatesymmetric portion plus a conjugate-antisymmetric portion,
xcs (t) + xca (t) =
or just
x(t) = xcs (t) + xca (t).
(1.30)
1.4.4
21
(1.31)
The smallest value of T that satises the periodicity condition of Eq. (1.31) is the fundamental
period T0 of x(t). The signal in Fig. 1.19 is a T0 -periodic signal. A signal is aperiodic if it is not
x(t)
T0
T0
2T0
t
1.4.5
The size of any entity is a number that indicates the largeness or strength of that entity. Generally
speaking, signal amplitude varies with time. How can a signal that exists over time with varying
amplitude be measured by a single number that will indicate the signal size or signal strength? Such
a measure must consider not only the signal amplitude but also its duration.
Signal Energy
By dening signal size as the area under x2 (t), which is always positive for real x(t), both signal
amplitude and duration are properly acknowledged. We call this measure the signal energy Ex ,
dened (for a real signal) as
Ex =
x2 (t) dt.
Ex =
|x(t)|2 dt =
x(t)x (t) dt.
(1.32)
22
x(t)
13
11
(a)
x(t)
12
12
(b)
Figure 1.20: Generation of the (T0 = 6)-periodic signal x(t) by periodic replication using (a) the
segment (1 t < 5) and (b) the segment (0 t < 6).
There are also other possible measures of signal size, such as the area under |x(t)|. The energy
measure, however, is not only more tractable mathematically but is also more meaningful (as shown
later) in the sense that it is indicative of the energy that can be extracted from the signal.
Signal energy must be nite for it to be a meaningful measure of the signal size. A necessary
condition for the energy to be nite is that the signal amplitude 0 as |t| (Fig. 1.21a).
Otherwise the integral in Eq. (1.32) will not converge. A signal with nite energy is classied as an
energy signal.
x(t)
x(t)
0
0
t
(b)
(a)
Figure 1.21: Examples of (a) nite energy and (b) nite power signals.
xa (t) = 2(t/2)
(a)
In this particular case, direct integration is simple. Using Eq. (1.32), we nd that
1
1
Exa =
(2)2 dt = 4t|1 = 8.
1
(b)
In this case, the direct integration of sinc2 (t) is quite dicult. Although Parsevals theorem, to be
23
discussed in Sec. 1.9.8, makes it easy to determine that the energy is Exb = 1, it is instructive to try
and obtain this answer by estimating the integral in Eq. (1.32). We begin by plotting x2b (t) = sinc2 (t)
since energy is simply the area under this curve. As shown in Fig. 1.22, sinc2 (t) decays very quickly
and is close to zero for |t| > 5.
x2b (t)
5 t
x2b (nt)t.
n=N
Here, t must be chosen suciently small to capture the detail of x2b , and N must be chosen
suciently large so that the interval (N t t N t) includes most of the energy. Using our
interval of (5 t 5), MATLAB computes Exb with about 2% error.
01
The same result is also obtained by using MATLABs built-in numerical integration function quad,
which is more robust than the simple rectangular approximation.
02
Example 1.3
Sketch the signal x(t) = sin(2t)(t 1/2), and show that its energy is Ex = 1/2.
Signal Power
In some cases, for instance when the amplitude of x(t) does not 0 as |t| (Fig. 1.21b), signal
energy is innite. A more meaningful measure of the signal size in such a case is time-normalized
energy, if it exists. This measure is called the power of the signal. For a real signal x(t), we dene
its power Px as
T /2
1
Px = lim
x2 (t) dt.
T T
T /2
24
T /2
T /2
1
1
Px = lim
|x(t)|2 dt = lim
x(t)x (t) dt.
T T
T
T
T /2
T /2
(1.33)
Generally, the mean of an entity averaged over a large time interval approaching innity exists
if the entity is either periodic or exhibits statistical regularity with time. If such conditions are
not satised, the average may not exist. For instance, a causal ramp signal x(t) = tu(t) increases
indenitely as t , and neither the energy nor the power exists for this signal. However, the unit
step function, which is not periodic nor has statistical regularity, does have a nite power. A signal
with nite and nonzero power is termed a power signal.
Observe that the signal power Px is the time average (mean) of the signal amplitude squared,
that is, the mean square value of x(t). Indeed, the square root of Px is the familiar rms (root mean
square) value of x(t). Thought of another way, power is just energy normalized by an innitely large
time window. Thus, a signal with nite energy has zero power, and a signal with nite power has
innite energy. A signal cannot both be an energy and a power signal.
When x(t) is periodic, |x(t)|2 is also periodic. Hence, the power of x(t) can be computed from
Eq. (1.33) by averaging |x(t)|2 over one period T0 ,
1
1
2
|x(t)| dt =
x(t)x (t) dt.
(1.34)
Px =
T0 T0
T0 T0
The notation T0 represents integration over an interval of T0 seconds starting at any instant.
Show that
(a)
(b)
(c)
(d)
(e)
|C|2
2
2|
xe (t) = C1 cos(1 t + 1 ) + C2 cos(2 t + 2 ) has Pxe = |C1 | +|C
if 0 = 1 = 2 = 0
2
and has Pxe = 12 |C1 |2 + (C1 C2 + C1 C2 ) cos(1 2 ) + |C2 |2 if 1 = 2 = 0
Show that an everlasting exponential x(t) = eat is neither an energy nor a power signal for any real and
nonzero value of a.
25
power Px has units of V 2 (volts squared). If x(t) is a current signal, these units are A2 s (amperes
squared-seconds) and A2 (amperes squared), respectively.
More fundamentally, signal energy and power are but convenient indicators of signal size, which
prove useful in many applications. For instance, if we approximate a signal x(t) by another signal
x
(t), the error in the approximation is e(t) = x(t) x
(t). The energy (or power) of e(t) is a
convenient indicator of the goodness of the approximation. It provides us with a quantitative
measure to determine the closeness of the approximation. In communication systems, message
signals are corrupted by unwanted signals (noise) during transmission over a channel. The quality
of the received signal is judged by the relative sizes of the desired signal and the unwanted noise. In
this case, the ratio of the message signal and noise signal powers (signal to noise power ratio) is a
good indication of the received signal quality.
All practical signals have nite energies and are therefore energy signals. A power signal must
necessarily have innite duration; otherwise its power will not approach a nonzero limit. Clearly, it
is impossible to generate a true power signal in practice because such a signal has innite duration
and innite energy. Still, as in the case of everlasting signals, power signal models serve a useful
purpose in the study of signals and systems.
1.4.6
A signal whose physical description is known completely, either in a mathematical form or a graphical
form, is a deterministic signal. A signal whose values cannot be predicted precisely but are known
only in terms of probabilistic description, such as mean value, mean square value, and so on, is
a probabilistic or random signal. In this book we shall deal almost exclusively with deterministic
signals. Random signals are beyond the general scope of this study.
1.5
Signals are processed by systems, which may modify them or extract additional information from
them. Thus, a system is an entity that processes a set of signals (inputs) to yield another set of
signals (outputs). A system may be made up of physical components, as in electrical, mechanical,
or hydraulic systems (hardware realization), or it may be an algorithm that computes an output
from an input signal (software realization). A system that operates on continuous-time signals is
naturally called a continuous-time system. By using the operator H to represent the system function,
the system output y(t) is conveniently represented in terms of the input x(t) as
y(t) = H {x(t)} .
Using a system operator H to represent an integrator, for example, implies that y(t) = H {x(t)} =
t
x( ) d . Figure 1.23 illustrates the general concept.
input
x(t)
output
y(t) = H {x(t)}
26
1.5.1
Linearity
We shall consider the linearity concept rst. A system whose output is proportional to its input is
an example of a linear system. But linearity implies more than this; it also implies the additivity
property, meaning that if several causes (inputs) are acting on a system, then the total eect on
the system due to all these inputs can be determined by considering each input separately while
assuming all the other inputs to be zero. The total output is then the sum of all the component
outputs. This property may be expressed as follows: for a linear system, if input x1 (t) acting
alone produces output y1 (t) = H {x1 (t)}, and if another input x2 (t), also acting alone, produces
output y2 (t) = H {x2 (t)}, then, with both inputs acting on the system, the combined output will
be H {x1 (t) + x2 (t)} = y1 (t) + y2 (t).
In addition to additivity, a linear system must satisfy the homogeneity or scaling property, which
states that for an arbitrary number c, if a cause is increased c-fold, then the eect also increases
c-fold. That is, if H {x(t)} = y(t), then H {cx(t)} = cy(t) for all real or complex c.
Thus, linearity requires two properties: homogeneity (scaling) and additivity. Both these properties can be combined into the superposition property, which states that if
y1 (t) = H {x1 (t)}
(1.35)
y2 (t)
As Fig. 1.24 helps to illustrate, the linearity property is satised if a sum of scaled inputs applied
to a system (Fig. 1.24a) produces the same result as summing and scaling the individual outputs
of each input (Fig. 1.24b). Thought of another way, linearity implies that a system operator H
commutes with the operations of summing and scaling. With a linear system, it does not matter
whether summing and scaling precede the system or vice versa. This apparently trivial observation
has profound implications for analyzing linear systems, as shown in Sec. 1.5.3.
c1
x1 (t)
c2
x2 (t)
(a)
x1 (t)
y1 (t)
c1
x2 (t)
y2 (t)
c1 y1 (t) + c2 y2 (t)
c2
(b)
Figure 1.24: Visualizing linearity: (a) summing and scaling precede the system and (b) the system
precedes summing and scaling.
A linear system must also satisfy the additional condition of smoothness, where small changes in the systems
inputs must result in small changes in its outputs [3].
27
It may appear that additivity implies homogeneity, but this is not the case. Show that a system with the
input x(t) and the output y(t) = Re {x(t)} satises the additivity property but violates the homogeneity
property. Hence, such a system is not linear. Hint: Show that Eq. (1.35) is not satised when c is complex.
(1.36)
This property of linear systems, which permits the separation of an output into components resulting
from the initial conditions and from the input, is called the decomposition property.
Equation (1.36) follows directly from the superposition principle of Eq. (1.35) if the causes xn (t)
are generalized to include both external inputs and internal conditions. Thus, linearity implies
that both the zero-input and zero-state components must obey the principle of superposition with
respect to each of their respective causes. For example, if we increase the initial condition k-fold,
the zero-input component must also increase k-fold. Similarly, if we increase the input k-fold, the
zero-state component must also increase k-fold.
In this review of CT systems, we shall deal primarily with the zero-state response. When all the
appropriate initial conditions are zero, the system is said to be in zero state. The system output is
zero when the input is zero only if the system is in zero state.
Comments on Linear and Nonlinear Systems
Almost all CT systems observed in practice become nonlinear when large enough signals are applied
to them. The analysis of nonlinear systems is generally dicult. Nonlinearities can arise in so
many ways that describing them with a common mathematical form is impossible. Not only is each
system a category in itself, but even for a given system, changes in the initial conditions or input
amplitudes may change the nature of the problem. On the other hand, the superposition property
is a powerful unifying principle that greatly simplies the analysis of linear systems and allows for
a general solution. It is therefore fortunate that many practical engineering systems exhibit linear
behavior, at least for small signals.
1.5.2
Time Invariance
Systems whose parameters do not change with time are time-invariant (also constant-parameter)
systems. For such a system, if the input is delayed by b seconds, the output is the same as before
but delayed by b (assuming identical initial conditions). In other words, if the response of a timeinvariant system to an input (cause) x(t) is y(t), then the response of the same system to an input
x(t b) is y(t b).
For
a discussion of why it is desirable to place the initial conditions at t = 0 (rather than, say, t = 0 or t = 0+ ),
refer to [1].
28
dK y
dK1 y
dy
dL x
dL1 x
dx
+
a
+ b0 x
+
a
+
+
a
y
=
b
+
b
+ + b1
K1
1
0
L
L1
dtK
dtK1
dt
dtL
dtL1
dt
dl
dk
y(t)
=
bl l x(t).
dtk
dt
L
ak
k=0
(1.37)
l=0
Often, Eq. (1.37) is normalized so that aK = 1. The coecients ak and bl in this equation can be
constants or functions of time. If these coecients are constants, then the system is linear and time
invariant (LTI). If they are functions of time, the system is linear and time variant.
As Fig. 1.25 helps to illustrate, the time-invariance property is satised if a system acting on a
delayed input (Fig. 1.25a) produces the same result as delaying the output of the system in response
to the original input (Fig. 1.25b). Thought of another way, time invariance implies that a system
operator H commutes with the time-shifting operation Hdelay . With a time-invariant system, the
ordering of delay operator and system does not matter. Coupled with linearity, the time-invariance
property proves extremely useful to mathematically characterize a systems output, as shown next.
x(t)
x(t T )
delay T
H {x(t T )}
(a)
x(t)
y(t)
y(t T )
delay T
(b)
Figure 1.25: Visualizing time invariance: (a) a CT system acting on a delayed input and (b) the
delayed output of a CT system.
1.5.3
We shall use the superposition and time-invariance properties to facilitate nding a systems zerostate response to an arbitrary input x(t). To begin, recall that Eq. (1.9) provides us with a convenient
representation of x(t),
(1.38)
x(t) =
x( ) (t ) d.
input
shifted
sum scaled impulses
The output y(t) of an LTIC system H is thus
y(t) = H {x(t)} = H
x( )(t ) d
(1.39)
Using the property of linearity, we know that summing (integration) and scaling commute with the
system operation. Thus, Eq. (1.39) becomes
y(t) =
x( )H {(t )} d.
(1.40)
29
Designating h(t) as the response of an LTIC system to a unit impulse (t), the time-invariance
property allows us to write Eq. (1.40) as
(1.41)
y(t) =
x( ) h(t ) d.
output
sum scaled shifted
impulse
responses
where h(t) = H {(t)}. Notice the similar structures of Eqs. (1.38) and (1.41). The integral in
Eq. (1.41) is known as the convolution integral, expressed symbolically as x(t) h(t). One can readily
show that convolution is commutative [1]. Hence, an LTIC system response can be expressed as
x( )h(t ) d =
h( )x(t ) d = h(t) x(t).
(1.42)
y(t) = x(t) h(t) =
1.5.4
Causality
A system is causal if the response does not start before the input. Alternately stated, a system
is causal if the output at instant t = t0 depends on the values of the input for t t0 . A system
that violates this condition is a noncausal system. A noncausal system response begins even before
the input is applied. Clearly, all practical systems are causal since noncausal systems are physically
unrealizable.
Because (t) starts at t = 0, a system whose impulse response h(t) = 0 for t < 0 is a causal
system. If h(t) starts before t = 0, the system is noncausal. When a causal input x(t) is applied to
a causal system, Eq. (1.42) simplies to
t
y(t) = x(t) h(t) =
x( )h(t ) d =
h( )x(t ) d = h(t) x(t).
(1.43)
0
1.5.5
Stability
System stability is an important and complex topic. Because of the great variety of possible system
behaviors, there are several denitions of stability. Roughly speaking, a system is stable if small or
bounded input or initial conditions yield bounded output. Here, we shall introduce what is known as
external stability, which is also known as bounded-input bounded-output (BIBO) stability. A system
is BIBO stable if and only if every bounded input x(t) results in bounded output y(t). More formally,
BIBO system stability requires that, for all t,
|y(t)| Ky < for all x(t) with |x(t)| Kx < ,
(1.44)
This statement is true only for temporal systems, where the independent variable is time. For nontemporal
systems, such as those where the independent variable is distance, the response can precede the input. In such cases,
noncausal systems are physically realizable. The study of noncausal systems is valuable even for temporal systems
[1].
30
where Kx and Ky are some constants. It is important to stress again that for a system to be BIBO
stable, the stability condition of Eq. (1.44) must hold for every possible input. If the system violates
this condition for even one input, it is unstable.
Internal stability, also known as asymptotic stability, is dened in a similar way except that the
test involves bounded initial conditions rather than bounded inputs. For asymptotic stability, we
demand bounded output for bounded initial conditions. If bounded initial conditions (with zero
input) can result in an unbounded response, the system is unstable. If the response is neither
unbounded, nor decays to zero, the system is marginally stable. In practice, with few exceptions,
external stability and internal stability are equivalent [1].
Show that an LTIC system is BIBO stable if its impulse response h(t) is absolutely integrable, that is,
|h( )| d Kh < ,
where Kh is some constant. Hint: Substitute Eq. (1.41) into Eq. (1.44) and simplify the result.
1.6
The convolution method, where an LTIC system input is expressed as a sum of impulses and the
response is found as the sum of the systems responses to all the impulse components, is a timedomain method of analysis. We now introduce another equally fruitful approach, the frequencydomain method, where the input is expressed as a sum of sinusoids (or exponentials), and the
system response is obtained by adding the systems responses to all the sinusoidal (or exponential)
components of the input. Such a method is attractive only if the response of an LTIC system to a
sinusoid (or exponential) is simple and easy to obtain. This is precisely the case, as the following
analysis shows.
1.6.1
We now show that an LTIC system response to an everlasting exponential input est is, within a
multiplicative constant, the same exponential. That is, in the case of an exponential input, the
shape of the output matches the shape of the input. Observe that here we are considering an
everlasting exponential starting at t = , in contrast to a causal exponential est u(t) starting at
t = 0. The system response to an everlasting exponential est is
st
s(t )
st
h( )e
d = e
h( )es d.
y(t) = h(t) e =
The integral on the right-hand side, being a function of s but a constant with respect to t, will be
denoted by H(s). Thus,
y(t) = H(s)est = H(s)x(t)|x(t)=est ,
(1.45)
where
H(s) =
h( )es d.
(1.46)
For causal h(t), the integral on the right-hand side would range from the limits 0 to . For an
everlasting exponential input, the output is the same as the input within the multiplicative constant
This
result
only for the values of s lying in the region of convergence (or existence) of H(s), that is, where
is valid s
the integral
h( )e
d exists (converges). Region of convergence is further explained later in Sec. 1.10.
31
H(s), called the transfer function of the system. No other input has this property. As we shall see
in Sec. 1.10, Eq. (1.46) states that a systems transfer function H(s) is the Laplace transform of its
impulse response h(t).
For the input x(t) = est (and only for est ), the output is y(t) = H(s)est = H(s)x(t). Thus, a
rearrangement of Eq. (1.45) may be considered an alternate denition of the transfer function H(s)
of an LTIC system:
y(t)
output signal
=
.
(1.47)
H(s) =
input signal input = everlasting exponential
x(t) x(t)=est
es(tT )
= esT .
est
(1.48)
and
dk
dk
dk st
st
y(t)
=
H(s)e
=
H(s)
e = sk H(s)est .
dtk
dtk
dtk
B(s)
B(s)
bL sL + bL1 sL1 + + b1 s + b0
.
=
aK sK + aK1 sK1 + + a1 s + a0
A(s)
system.
(1.51)
(1.52)
function with such property is called the eigenfunction, and the constant H(s) is called the eigenvalue of the
32
Because H(s)|s=zl = 0 for (l = 1, 2, . . . , L), z1 , z2 , . . . , zL are known as the zeros of H(s). Similarly,
p1 , p2 , . . . , pK are known as the poles of H(s) because H(s)|s=pk = for (k = 1, 2, . . . , K). The
poles are also called the characteristic roots of the system. Systems with only LHP poles and zeros
are termed minimum phase systems.
The poles and zeros of a system help provide us with an intuitive understanding of system
behavior. When an everlasting exponential input x(t) = est has complex frequency s that is close
to a system zero, H(s) is small, and so is the corresponding output. Conversely, if the frequency
s is close to a system pole, both H(s) and the corresponding output become large. In fact, when
an inputs frequency matches a system pole, resonance occurs, and new modes (dierent from the
original input) are possible at the output. At rst, it may seem that a resonant mode violates
our previous conclusion that the output of an LTIC system to an everlasting exponential is the
same everlasting exponential modied only in gain and phase. However, as cautioned earlier, such
behavior is guaranteed only if the input is in the region of convergence of H(s). In the case of
resonance, the input is not in the region of convergence of H(s). In summary, system zeros tend to
suppress the system response, and system poles tend to amplify it. Further, as we shall see next, a
systems poles are directly linked to system stability.
Stability Revisited
In Sec. 1.5.5, we introduced the notions of external (BIBO) stability and internal (asymptotic)
stability. We can show that if all the poles (characteristic roots) of H(s) lie in the LHP (have
negative real parts), the system is BIBO stable [1]. Otherwise, it is BIBO unstable.
Similarly, we can, almost always, reliably establish asymptotic stability based on H(s) as follows.
If the poles of H(s) lie in the LHP, the system is asymptotically stable. The system is asymptotically
unstable if some poles (even one) lie in the RHP or if repeated poles lie on the imaginary axis. If
some simple poles lie on the imaginary axis and all the remaining poles lie in the LHP, the system
is marginally stable.
Example 1.4
(a) Determine the impulse response h(t) of an ideal delay of T seconds and then use this result in Eq. (1.46)
to determine the corresponding system transfer function.
(b) Find the dierential equation of the form in Eq. (1.37) for an ideal dierentiator and for an ideal
integrator. From these dierential equations, nd their transfer functions using the result in Eq. (1.51).
The Jackpot
The importance of Eq. (1.45) cannot be stressed enough. It states that when the input to an LTIC
system is an everlasting exponential est , then, within the multiplicative constant H(s), the output
is identical to the input. Only everlasting exponentials possess this amazing property where the
shape of the input is preserved at the systems output. The basis for frequency-domain analysis
rests solidly on Eq. (1.45).
Given that Eq. (1.45) makes it so very simple to nd the LTIC system response to an everlasting
exponential, would it not be nice if all the inputs in the world were everlasting exponentials (or
sinusoids)? But reality being what it is, the next best thing is to hope that every signal in practice
Since H(s) is an external description of a system, examining its poles may not indicate internal instabilities unless
the system is both controllable and observable. Fortunately, practical systems are, almost always, both controllable
and observable [1].
33
can be expressed as a sum of such exponentials (or sinusoids). Here we hit the jackpot. It is
known that every signal that can be generated in practice can be expressed as a sum of everlasting
exponentials (or sinusoids) [1]. The sum may be discrete or over a continuum of frequencies. This
is true even for most signals that cannot be generated in practice but are of theoretical signicance,
such as a unit step, an impulse, or an exponentially growing signal.
We can show (see [1]) that a periodic signal x(t) can be expressed as a sum of exponentials as
x(t) =
Xk esk t .
(1.53)
The response y(t) of an LTIC system with transfer function H(s) to this input x(t) is
y(t) =
Yk esk t ,
(1.54)
1
x(t) =
X(s)est ds,
(1.55)
j2 Sx
and the corresponding output is given by
1
y(t) =
j2
1
H(s)X(s)e ds =
j2
Sy
st
Y (s)est ds,
(1.56)
Sy
1.7
Much as Eq. (1.9) represents a signal x(t) in terms of delta functions, the Fourier series tells us that
we can represent a periodic signal x(t) in terms of everlasting complex exponentials or, equivalently,
in terms of everlasting sinusoids. Given the simplicity of system analysis for exponential inputs, as
seen in Sec. 1.6, such a representation holds much appeal.
There are two primary forms of the Fourier series: the exponential form and the trigonometric
form. In the case of real signals, the trigonometric form also leads to a compact trigonometric form.
Each form carries identical information. We prefer the exponential form because, when compared
with the trigonometric forms, it is very compact. Furthermore, an LTIC system response to exponential signals is also simpler (more compact) than the system response to sinusoids. Moreover,
mathematical manipulation and handling of the exponential form (which simplies multiplication,
division, dierentiation, and integration) prove much easier than the trigonometric forms.
A minor disadvantage of the exponential form is that it, being a complex signal, is less easy to
visualize than a construction based on sinusoids. Fortunately, this diculty can be readily overcome
because of the close connection between exponential and trigonometric coecients and spectra. For
the purpose of mathematical analysis, we shall use exponential signals and spectra, but to promote
an intuitive or qualitative understanding, we shall speak in terms of a sinusoidal decomposition.
Thus, although most of our future mathematical manipulations will be in terms of exponential
spectra, we shall speak of exponentials and sinusoids interchangeably. This is an important point;
readers should make extra eort in familiarizing themselves with the three forms of spectra, their
relationships, and their convertibility.
34
1.7.1
A periodic signal x(t) with fundamental period T0 (fundamental frequency f0 = 1/T0 ) can be
expressed as a sum of a complex exponential of period T0 and its harmonics:
x(t) =
Xk ejk0 t .
(1.57)
k=
Here, 0 = 2f0 = 2/T0 is the fundamental (radian) frequency. Often, Eq. (1.57) is referred to the
Fourier series synthesis equation.
The coecients Xk are complex, in general, and are given by
1
Xk =
x(t)ejk0 t dt.
(1.58)
T0 T0
Often, Eq. (1.58) is referred to the Fourier series analysis equation. A discussion of basic Fourier series
properties is delayed to Sec. 1.8, where they are presented alongside the corresponding properties
of the Fourier transform. To denote the Fourier series relation between x(t) and Xk , we adopt the
compact notation of
x(t) Xk .
For obvious reasons, the Fourier series coecients for an arbitrary signal are labeled in a manner
that is consistent with the time-domain function; that is, Yk are the Fourier series coecients of
signal y(t), Zk for z(t), and so forth.
The alert reader will note that Eq. (1.57) is just a special case of Eq. (1.53) where sk = jk0 .
Thus, the output of an LTIC system H(s) to a periodic input can, given minor conditions on H(s),
be readily computed knowing the inputs Fourier series and using Eq. (1.54) with sk = jk0 . In
understanding the output of an LTIC system in response to a periodic input, we just hit the jackpot.
The Fourier Series Spectrum
The exponential Fourier series in Eq. (1.57) indicates that a periodic signal x(t) can be expressed
as a weighted sum of harmonically related complex exponentials ejk0 t . The weights Xk constitute
what is known as the frequency spectrum of x(t). To plot the complex coecients Xk as a function
of k or, more informatively, as a function of radian frequency k0 , we need two plots: the real and
the imaginary parts of Xk or the magnitude and the angle of Xk . We prefer the latter because it is
more intuitive and informative.
The magnitude spectrum |Xk | tells us the strength of each exponential component ejk0 t , and
the phase spectrum Xk tells us the phase of each exponential component. To facilitate plotting the
magnitude and phase spectra, the coecients Xk should be expressed in polar form as |Xk |ejXk .
More intuitively, these spectra show at a glance the magnitudes and the phases of the sinusoids
that make up the composition of the signal x(t). Knowing these spectra, we can reconstruct or
synthesize the signal x(t) according to Eq. (1.57). Therefore, frequency spectra, which provide an
alternative way of describing a periodic signal x(t), are in every way equivalent to the plot of x(t) as
a function of t. In contrast to the time-domain description x(t), the frequency spectra |Xk | and Xk
constitute the frequency-domain description of the signal. Signals, therefore, have dual identities:
the time-domain identity and the frequency-domain identity. The two identities complement each
other; taken together, they provide a better understanding of a signal.
In the special case of k = 0, notice that X0 is just the average value of x(t) taken over one period.
This dc component of the signal can often be determined by inspection of x(t). Moreover, Eq. (1.58)
(1.59)
35
In other words, a real signal x(t) has an even magnitude spectrum |Xk | and an odd phase spectrum
Xk .
Find the exponential Fourier series for the periodic signal x(t) shown in Fig. 1.26. Sketch the
magnitude and phase spectra for x(t).
x(t)
1
et/2
Figure 1.26: A -periodic signal x(t) with x(t) = et/2 over (0 t < ).
In this case T0 = s, 0 = 2/T0 = 2 rad/s, and x(t) =
Xk =
1
T0
x(t)ej2kt dt =
T0
et/2 ej2kt dt =
k=
Xk ej2kt , where
1 e/2
1 + j4k
0.504
.
1 + j4k
(1.60)
Using Eq. (1.60), the magnitude and phase spectra are conveniently plotted using MATLAB.
01
02
03
The results are shown in Fig. 1.27. Observe that the signal has signicant dc content and that
the coecients Xk are complex. Moreover, Xk and Xk are conjugates, as expected coming from
a real signal. Thus, the magnitude spectrum is an even function, and the angle spectrum is an odd
function. This conrms the observation in Eq. (1.59).
Xk
|Xk |
/2
0.504
2
10
10
k0
0.122
0.0625
10
k0
2
(a)
10
/2
(b)
Figure 1.27: Spectra for -periodic signal x(t) = et/2 over (0 t < ): (a) |Xk | and (b) Xk .
Example 1.5
36
An interesting aspect of Fourier series is that whenever there is a jump discontinuity in x(t), the
series at the point of discontinuity converges to an average of the left-hand and right-hand limits
of x(t) at the instant of discontinuity, a behavior that is dictated by the minimizing mean square
error property of the Fourier series [1]. In Ex. 1.5, for instance, x(t) is discontinuous at t = 0
with x(0+ ) = 1 and x(0 ) = e/2 = 0.2079. The corresponding Fourier series converges to
a value
(1+0.2079)/2 = 0.6039 at t = 0. This is easily veried by noting from Eq. (1.57) that x(0) = k Xk ,
which MATLAB readily computes.
01
37
Figure 1.28 also provides insight into why negative frequencies are required in most Fourier series.
It would be impossible, for example, to generate a purely real signal using only positive-frequency
components. Real signals require a carefully choreographed conjugate-symmetric dance between
positive and negative frequencies where the imaginary component of ejk0 t can only be countered
by its negative-frequency mirror ejk0 t .
Finality Property of the Fourier Series
One of the important properties of the Fourier
the nality property. Consider a signal x(t)
series is jk
0t
. If we approximate x(t) by a truncated
and its Fourier series representation x(t) =
k= Xk e
(nite number of terms) Fourier series as
x(t) xK (t) =
Xk ejk0 t ,
(1.61)
k=K
then according to the nality property, this approximation is the optimum for a given K. Thought
of another way, the coecients Xk are themselves optimal, and each coecient is independent of
the others. There is no choice for Xk other than the Fourier coecients that will improve the
approximation. The optimum here is in the sense of minimizing the energy over one cycle of the
error x(t) xK (t).
1.7.2
(1.62)
k=1
where
1
x(t) dt,
T0 T0
2
x(t) cos(k0 t) dt,
ak =
T0 T0
2
and bk =
x(t) sin(k0 t) dt.
T0 T0
a0 =
(1.63)
Equation (1.62) tells us what we already know: we can decompose a periodic signal into a sum of
sines and cosines. Noting the equivalence of the exponential and trigonometric forms, it takes little
eort to demonstrate that
ak = Xk + Xk ,
X 0 = a0 ,
bk = j (Xk Xk ) ,
(1.64)
The results derived so far are general and apply whether x(t) is a real or a complex function
of t. However, when x(t) is real, coecients ak and bk are real for all k, and using trigonometric
identities, we can express the Fourier series in Eq. (1.62) in the compact trigonometric form as
x(t) = C0 +
k=1
Ck cos (k0 t + k ) ,
(1.65)
38
where
C0 = a0 = X0 ,
Ck = + ak 2 + bk 2 = 2|Xk |,
bk
and k = tan1
= Xk .
ak
(1.66)
Notice that the coecients Ck are always positive, although C0 may be positive or negative. Further,
k should always be computed using a two-argument arc-tangent function. For example, if ak = 1
and bk = 1, k lies in the third quadrant, and
1
k = tan1
= 3/4 = tan1 (1) = /4.
1
Find the trigonometric and compact trigonometric Fourier series for the periodic signal x(t) shown
in Fig. 1.29. Plot the corresponding spectra.
x(t)
1
x(t) = a0 +
ak cos(kt) + bk sin(kt),
k=1
where
1
2
x(t) dt =
1
2
/2
1
,
2
/2
k
k
2
2
sin
(1) cos(kt) dt =
ak =
= sinc
2 /2
k
2
2
k even
0
2
k = 1, 5, 9, 13, . . . ,
=
k
2
k
k = 3, 7, 11, 15, . . .
/2
1
and bk =
(1) sin(kt) dt = 0.
/2
a0 =
(1) dt =
/2
(1.67)
Therefore,
x(t) =
2
1
+
2
1
1
1
cos(t) cos(3t) + cos(5t) cos(7t) + .
3
5
7
(1.68)
39
Observe that since bk = 0, only the cosine terms appear in the trigonometric series and complete
spectral information is contained in the plot of ak , as shown in Fig. 1.30a. As expected, the amplitudes of the nonzero harmonics alternate sign. MATLAB makes plotting Fig. 1.30a simple.
01
02
ak
1
1
2
10
k0
10
k0
10
k0
(a)
Ck
1
1
2
4
(b)
4
(c)
Figure 1.30: Trigonometric spectra for dc-oset square wave x(t): (a) ak , (b) Ck , and (c) k .
The absolute values of amplitudes are the magnitudes. A negative amplitude can be converted
to a positive amplitude by adjusting the phase by rads using the trigonometric identity
cos(x) = cos(x + ).
Using this fact, we can express the series in Eq. (1.68) as
1
2
1
1
1
x(t) = +
cos(t) + cos(3t + ) + cos(5t) + cos(7t + ) + .
2
3
5
7
(1.69)
All the amplitudes are rendered positive. Equation (1.69) is precisely the compact trigonometric
Fourier series; by inspection, the magnitude and phase spectra are
C0 = 0.5,
0
Ck =
2
and k =
Because
k even
k odd
cos(x ) = cos(x), we could have chosen the phase or . In fact, cos(x m) = cos(x) for any
odd integral value of m. Therefore, the phase can be chosen as m where m is any convenient odd integer.
40
The magnitude and phase spectra are shown in Figs. 1.30b and 1.30c, respectively. Observe that
magnitude spectrum in Fig. 1.30b is the rectied version of the amplitude spectrum in Fig. 1.30a.
Figures 1.30b and 1.30c are obtained by continuing our MATLAB code.
03
04
05
Notice that the .*(abs(ak)>1e-10) portion at the end of line 03 is used to eliminate tiny ak (which
should be zero) that result from computer round-o; if not removed, MATLAB diligently computes
phase values that are misleading and meaningless.
From Eq. (1.68), we observe that the series converges to 0.5 at all discontinuities. For example,
at t = /2, all the terms in the series except a0 vanish, which yields x( 2 ) = 0.5. This is the average
of the values of x(t) on either side of the discontinuity because, for a small , x( 2 ) = 1 and
x( 2 + ) = 0.
Example 1.6
Find the exponential Fourier series and sketch the corresponding spectra for the T0 -periodic unit
shown in Fig 1.31. From this result, sketch the corresponding compact
impulse train x(t) = (t)
trigonometric spectrum and write the compact trigonometric Fourier series.
x(t)
2T0
T0
T0
2T0
3T0
=
(t)
Xk ejk0 t =
Xk ej2kt/T0 ,
(1.70)
k=
k=
where
1
T0
Xk =
0
Choosing the interval of integration as ( T
2 ,
Xk =
1
T0
jk0 t
(t)e
dt.
T0
T0
2 )
T0 /2
= (t),
and recognizing that over this interval (t)
(t)ejk0 t dt =
T0 /2
1
.
T0
Substitution of this value into Eq. (1.70) yields the desired exponential Fourier series,
1 j2kt/T0
= 1
(t)
ejk0 t =
e
.
T0
T0
k=
k=
(1.71)
41
Equation (1.71) shows that the exponential spectrum is uniform (Xk = 1/T0 ) for all frequencies k0 .
The spectrum, being real and positive, requires only the magnitude plot |Xk |, shown in Fig. 1.32a,
or Ck , shown in Fig. 1.32b. All phases (Xk and k ) are zero.
|Xk |
1
T0
30
20
0
(a)
20
30
k0
40
Ck
2
T0
1
T0
0
(b)
20
30
k0
40
(k = 1, 2, 3, . . .),
and k = 0.
Figure 1.32b shows the compact trigonometric Fourier spectrum. From this spectrum we can express
using the compact trigonometric form as
(t)
= 1 + 2 (cos(0 t) + cos(20 t) + cos(30 t) + ) ,
(t)
T0
T0
where 0 =
2
.
T0
Example 1.7
1.7.3
Convergence of a Series
The key to many puzzles of the Fourier series lies in the nature of the convergence of the Fourier series.
Convergence of innite series is a challenging problem. It took mathematicians several decades to
understand the convergence aspect of the Fourier series. We shall barely touch the surface here.
In any practical application, we can use only a nite number of terms in a series. If, using a
xed number of terms, the series guarantees convergence within an arbitrarily small error at every
value of t over some interval T1 t T2 , such a series is highly desirable and is called a uniformly
convergent series over the interval T1 t T2 . If a series converges at every value of t over the
interval T1 t T2 , but to guarantee convergence within a given error requires dierent number of
terms at dierent t, then the series is still convergent but is less desirable. It goes under the name
point-wise convergent series.
Finally, we have the case of a series which refuses to converge at some t, no matter how many
terms are added. But the series may converge in the mean, that is, the energy of the dierence
between x(t) and the corresponding nite term series approaches zero as the number of terms
approaches innity. To explain this concept, let us consider representation of a function x(t) by an
The
reason for calling this convergence in the mean is that minimizing the error energy over a certain interval
is equivalent to minimizing the mean square value of the error over the same interval.
42
innite series
x(t) =
zk (t).
k=
Let the partial sum of the middle 2K + 1 terms of the series on the right-hand side be denoted by
xK (t), that is,
K
xK (t) =
zk (t),
k=K
which we recognize as being identical in form to the truncated Fourier series in Eq. (1.61). If we
approximate x(t) by xK (t), the error in the approximation is the dierence x(t) xK (t). The series
converges in the mean to x(t) in the interval (0, T0 ) if
T0
|x(t) xK (t)|2 dt 0 as K .
0
That is, the energy of the error x(t) xK (t) approaches zero as K . This form of convergence
does not require that the series be equal to x(t) for all t. It just requires the energy of the dierence
(area under |x(t) xK (t)|2 ) to vanish as K . Supercially it may appear that if the energy
of a signal over an interval is zero, the signal (error) must be zero everywhere. This is not true.
Signal energy can be zero even if it has nonzero values at a nite number of isolated points. This
is because although the signal is nonzero at a point (and zero everywhere else), the area under its
square is still zero. Thus, a series that converges in the mean to x(t) need not converge to x(t) at
a nite number of points. This is precisely what happens to the Fourier series when x(t) has jump
discontinuities. This is also what makes the Fourier series convergence compatible with the Gibbs
phenomenon, which is discussed later in this section.
There is a simple criterion for ensuring that a periodic signal x(t) has a Fourier series that
converges in the mean. The Fourier series for x(t) converges to x(t) in the mean if x(t) has a nite
energy over one period, that is,
|x(t)|2 dt < .
(1.72)
T0
In all the examples discussed so far, the condition of Eq. (1.72) is satised, and hence the corresponding Fourier series converge in the mean. Condition (1.72) also guarantees that the Fourier
coecients are nite.
We shall now discuss an alternate set of criteria due to Dirichlet for convergence of the Fourier
series.
Dirichlet Conditions
Dirichlet has shown that if x(t) satises certain conditions, its Fourier series is guaranteed to converge
point-wise at all points where x(t) is continuous. Moreover, at points of discontinuity, x(t) converges
to the value midway between the two values of x(t) on either side of the discontinuity. The Dirichlet
conditions are
1. x(t) is absolutely integrable over one period, that is,
|x(t)| dt < ,
(1.73)
T0
43
K
k=1
sinc(k/2) cos(kt).
k=1
We start the synthesis with only the rst term in the series, a0 = 0.5 (K = 0). This term is
a constant (dc). Approximating x(t) with just the dc term is a gross approximation of the square
wave, as shown in Fig. 1.33a. In the next step, we add the rst harmonic (fundamental) to the
dc component, which results in a signal shown in Fig. 1.33b. Observe that this synthesized signal
x1 (t) somewhat resembles x(t). It is a smoothed-out version of x(t). The sharp corners in x(t) are
not reproduced in this signal because sharp corners indicate rapid changes, and their reproduction
requires rapidly varying (i.e., higher frequency) components, which are yet to be included. Figure 1.33c shows the sum of dc and the rst and third harmonics (in this case, even harmonics have
zero magnitudes). As we increase the number of harmonics progressively, as illustrated in Fig. 1.33d
(sum up to the fth harmonic, K = 5) and Fig. 1.33e (sum up to the nineteenth harmonic, K = 19),
the edges of the pulses become sharper, and xK (t) resembles x(t) more closely.
The plot of the truncated series approximates closely the function x(t) as K increases, and we
expect that the series will converge exactly to x(t) as the number of terms K . The curious fact,
as seen from Fig. 1.33, is that even for large K, the truncated series exhibits an oscillatory behavior
and an overshoot with a peak value of about 9% in the vicinity of the discontinuity. Regardless of
the value of K, the overshoot remains at about 9%. This strange behavior appears to contradict
our expectation that xK (t) approaches x(t) as K . In fact, this apparent contradiction puzzled
many people at the turn of the century. Josiah Willard Gibbs gave a mathematical explanation of
this behavior, which is now called the Gibbs phenomenon.
We can reconcile the two conicting notions as follows. If f0 is the fundamental frequency of the
series, the highest frequency of oscillation of the synthesized signal xK (t) is Kf0 ; thus, the spikes
(oscillations) with 9% overshoot have a width of approximately 1/Kf0 and are spaced approximately
1/2Kf0 to either side of each discontinuity. For the case in Fig. 1.33, the fundamental frequency is
f0 = 1/2, the spike width is about 2/K, and the 9% peaks occur at /K from each discontinuity.
As we increase the number of terms K, the frequency of oscillation increases, spike width 1/Kf0
diminishes, and spikes move closer toward their discontinuities. As K , the error energy 0
because the error consists mostly of the spikes, whose widths 0. Therefore, as K , the
corresponding Fourier series diers from x(t) by about 9% at the immediate left and right of the
points of discontinuity, and yet the error energy 0. Thus the series converges in the mean. Where
x(t) is continuous, the series also converges point-wise. This is because at any instant, no matter
how close to the discontinuity, we can increase K to push the 9% spike closer to the discontinuity.
The ramications and the cure for Gibbs phenomenon are discussed in Sec. 2.4.
Gibbs phenomenon is present when there is a jump discontinuity in x(t). When a continuous
function x(t) is synthesized using the rst K terms of the Fourier series, the synthesized function
approaches x(t) for all t as K . No Gibbs phenomenon appears.
In optics, the oscillations are called diraction fringes and appear at every point for which the object shows large
variations in illumination.
44
x0 (t)
1
3
2
3
2
(a)
x1 (t)
1
3
2
3
2
(b)
x3 (t)
1
3
2
3
2
(c)
x5 (t)
1
3
2
3
2
(d)
x19 (t)
1
3
2
3
2
(e)
Figure 1.33: Synthesis xK (t) of a square-pulse periodic signal by successive addition of its harmonics:
(a) K = 0, (b) K = 1, (c) K = 3, (d) K = 5, and (e) K = 19.
Use Eq. (1.61) to synthesize K = 5 and K = 20 truncated Fourier series approximations of the
signal x(t) shown in Fig. 1.26. Plot the results over (1.5 t 1.5).
Using the analysis results of Ex. 1.5, MATLAB provides a direct means to compute and plot x5 (t).
01
02
03
04
05
06
45
omega0 = 2; K = 5; t = linspace(-2.5*pi,2.5*pi,10001);
Xk = @(k) (2/pi)*(1-exp(-pi/2))./(1+1j*4*k); xK = zeros(size(t));
for k = -K:K,
xK = xK+Xk(k)*exp(11j*k*omega0*t);
end
plot(t,xK); xlabel(t); ylabel(x_{5}(t));
The x20 (t) case is readily obtained by changing K = 5 to K = 20 in line 01. Figure 1.34 presents
the results along with the original signal x(t) for comparison (shaded). Regardless whether K is
large or small, notice the persistent presence of the Gibbs phenomenon at all points of discontinuity.
x20 (t)
x5 (t)
1
(a)
(b)
Figure 1.34: Synthesis of x(t) using the truncated Fourier series: (a) x5 (t) and (b) x20 (t).
Example 1.8
1.8
A Fourier series represents a periodic signal as a sum of everlasting exponentials (or sinusoids).
By applying a limiting process, we now extend this spectral representation to express an aperiodic
signal as a continuous sum (integral) of everlasting exponentials (or sinusoids). This can be done
by considering an aperiodic signal x(t) as a periodic signal with period T0 . Since x(t) repeats
at innite intervals (T0 ), its fundamental frequency 0 = 2
T0 0, and the spectrum becomes
continuous. The innite sum, the Fourier series, reduces to an integral, the Fourier integral. Thus,
we can show (see [1]) that an aperiodic signal x(t) can be expressed as a Fourier integral (rather
than a Fourier series) as
1
x(t) =
X()ejt d,
(1.74)
2
where
X() =
x(t)ejt dt.
(1.75)
The equality in Eq. (1.74) is not in the ordinary sense but in the mean square sense. Thus, the righthand side converges to x(t) in the mean. Equation (1.74), which is just Eq. (1.55) with s = j, is
the Fourier transform synthesis equation, and Eq. (1.75) is the Fourier transform analysis equation.
Note that the transform X() is the frequency-domain specication of x(t).
We call X() the direct Fourier transform of x(t), or just the Fourier transform of x(t), while
x(t) is the inverse Fourier transform of X(). Symbolically, these statements are expressed as
X() = F {x(t)}
This
implies that
2
W
jt
dt = 0.
x(t) 1
X()e
d
2 W
lim
46
The transform relationship between x(t) and X() is represented in pair-wise form as
x(t) X().
It is helpful to keep in mind that the Fourier integral in Eq. (1.74) is basically a Fourier series with
fundamental frequency approaching zero. Therefore, most of the discussion and properties of
the Fourier series apply to the Fourier transform and vice versa.
Magnitude and Phase Spectra
The spectrum X() is generally complex and is represented in polar form as
X() = |X()|ejX() .
(1.76)
In Eq. (1.76), the quantities |X()| and X() are both real functions of and represent the
magnitude spectrum and the phase spectrum, respectively.
Equation (1.75) shows that for real x(t), X() is conjugate symmetric, that is, X() = X ().
Thus, for real x(t),
|X()| = |X()| and X() = X().
(1.77)
In other words, a real signal x(t) has an even magnitude spectrum |X()| and an odd phase spectrum
X(). Unsurprisingly, the result in Eq. (1.77) is identical to that for the Fourier series, as seen in
Eq. (1.59).
Assuming a is real, nd the Fourier transform of the causal exponential x(t) = eat u(t), an example
of which is shown in Fig. 1.35, and plot the corresponding magnitude and phase spectra.
x(t)
1
eat u(t)
0
X() =
at
u(t)e
jt
dt =
(a+j)t
1 (a+j)t
e
dt =
.
a + j
0
1
a + j
if a > 0.
1
Expressing a + j in polar form as a2 + 2 ej tan ( a ) , we obtain, for a > 0,
1
1
ej tan ( a ) .
X() =
a2 + 2
47
Consequently,
|X()| =
1
a2 + 2
a
The magnitude spectrum |X()| and the phase spectrum X() are depicted in Fig. 1.36. Observe
that |X()| is an even function of , and X() is an odd function of , as expected.
Setting a = 1 for convenience, these plots are conrmed using MATLAB.
01
02
03
1
a
X()
|X()|
0
2
(a)
(b)
Figure 1.36: Fourier spectra for x(t) = eat u(t) with a > 0: (a) |X()| and (b) X().
Example 1.9
|x(t)|2 dt < ,
(1.78)
|x(t)| dt < .
(1.79)
Taking the absolute value of Eq. (1.75), it follows that the existence of X() is guaranteed
(|X()| < ) if Eq. (1.79) is satised because |ejt | = 1.
For a convergent Fourier transform, in addition to Eq. (1.79), the function x(t) must also satisfy the
following conditions:
2. It may have only a nite number of maxima and minima over any nite interval.
3. It may have only a nite number of discontinuities over any nite interval, and each of these
discontinuities must be nite.
48
x(t)
X()
1.
et u(t)
1
j
Re {} < 0
2.
et u(t)
1
j
Re {} > 0
2
2 +2
Re {} < 0
Re {} < 0
|t|
3.
4.
tk et u(t)
k!
(j)k+1
5.
6.
10.
a+j
(a+j)2 +02
0
(a+j)2 +02
sinc 2
11.
et
12.
(t)
13.
2()
14.
u(t)
() +
15.
sgn(t)
2
j
16.
ej0 t
2( 0 )
17.
cos(0 t)
[( 0 ) + ( + 0 )]
18.
sin(0 t)
[( 0 ) ( + 0 )]
19.
cos(0 t)u(t)
[( 0 ) + ( + 0 )] +
20.
sin(0 t)u(t)
k= (t kT )
[( 0 ) ( + 0 )]
0 k= ( k0 )
7.
8.
9.
21.
/2
2B
2 sinc
a>0
a>0
>0
B>0
2
2B
>0
2 2
2e /2
2j
B>0
>0
1
j
j
02 2
0
+ 2
2
0
0 =
2
T
49
that a physical existence criterion will ensure that any signal of our interest has a Fourier transform.
Unfortunately, this conclusion is incorrect. Engineers rely heavily on many signals that are physically
unrealizable but mathematically useful, such as the previously discussed sinc(t) function, which has a
Fourier transform, and the unit step function, which has a Fourier transform only in the generalized
sense. Table 1.1 gives a short table of selected Fourier transform pairs. Pairs 111 involve ordinary
Fourier transforms, while pairs 1221 require the use of generalized functions.
Use direct integration to determine the Fourier transform of x(t) = (t/ ), which is illustrated in
Fig. 1.9b. Plot the magnitude and phase spectra.
By denition,
X() =
1 j /2
e
ej /2
j
/2
sin
2 sin 2
= sinc
= 2
.
=
2
2
/2
X() =
ejt dt =
Therefore,
(t/ ) sinc
2
(a)
X()
(b)
Figure 1.37: Fourier spectra for x(t) = (t/ ): (a) |X()| and (b) X().
Although X() is real in this case and can be plotted using a single graph (a simple sinc function),
it is good habit to plot the magnitude andphase
Recall that sinc(k) = 0 for all
spectra separately.
2k
nonzero, integer k. Hence, X() = sinc
2 = 0 when 2 = k or = , as depicted in the
Fig. 1.37a plot of the magnitude spectrum. Since X() is real, these zero-crossings reect when the
50
amplitude sign changes (from positive to negative and vice versa); thus the zero-crossings indicate
when the phase transitions between 0 and , which is veried in the Fig. 1.37b plot of the phase
spectrum.
Bandwidth of (t/ )
The spectrum X() in Fig. 1.37a peaks at = 0 and decays at higher frequencies. Therefore,
(t/ ) is a lowpass signal with most of the signal energy in lower frequency components. Strictly
speaking, because the spectrum extends from 0 to , the bandwidth is . However, much of the
spectrum is concentrated within the rst lobe of the sinc function, from = 0 to = 2
. Therefore,
a rough estimate of the bandwidth of a rectangular pulse of width seconds is 2
rad/s,
or 1 Hz.
To compute bandwidth, we must consider the spectrum only for positive values of frequency [1].
Note the reciprocal relationship of the pulse width with its bandwidth (spectral width). We shall
observe later that this result is true in general.
Example 1.10
1.9
We now cover the important properties of the Fourier transform and their implications as well
as applications. The proofs can be found in any text on the Fourier transform (e.g., see [1]). The
properties of the Fourier transform are useful not only in deriving the direct and inverse transforms of
many functions but also in obtaining several valuable results in signal processing. Before embarking
on this topic, however, it is illuminating to observe one very interesting and pervasive aspect of the
Fourier transform: time-frequency duality.
Equations (1.74) and (1.75) show an interesting fact: the direct and the inverse transform operations are remarkably similar. These operations, required to go from x(t) to X() and then from
X() to x(t), are depicted graphically in Fig. 1.38. There are only two minor dierences in these
x(t)ejt dt
x(t)
X()
1
2
X()ejt d
Figure 1.38: A near symmetry between the direct and inverse Fourier transforms.
operations: the factor 1/2 appears only in the inverse operator, and the exponential indices in the
two operations have opposite signs. Otherwise the two operations are symmetrical. This obser The phase spectrum, which is required in this case to be an odd function of , may be drawn in several other
ways since a negative sign can be represented using phases of + 2k for all integer k. All such representations are
equivalent.
Of the two dierences, the former can be eliminated by a change of variable from (in radians per second) to f
(in hertz). In this case,
= 2f and d = 2 df.
Therefore, the direct and the inverse transforms are given by
X(f ) =
x(t)ej2f t dt and x(t) =
X(f )ej2f t df.
This leaves only one signicant dierence, that of sign change in the exponential index. Otherwise the two operations
are symmetrical.
51
vation has far-reaching consequences in the study of the Fourier transform. It is the basis of the
so-called duality of time and frequency. The duality principle may be compared with a photograph
and its negative. A photograph can be obtained from its negative, and by using an identical procedure,
the negative can be obtained from the photograph. For any result or relationship between x(t) and
X(), there exists a dual result or relationship that is obtained by interchanging the roles of x(t)
and X(). Consider, for example, transform 12 in Table 1.1:
(t) 1.
The dual of this transform states that
1 2(),
which is just pair 13 in Table 1.1. Observe the role reversal of time and frequency in these two
equations (as well as the 2 factor that results from choosing the radian frequency rather than
the hertzian frequency f ). The value of the duality principle lies in the fact that whenever we derive
any result, we can be sure that it has a dual. This possibility can give valuable insights about many
unsuspected properties and results in signal processing.
The reader should not fail to observe the ever-present duality in the upcoming discussions. We
shall observe that for every property of the Fourier transform, there is a dual property.
1.9.1
Duality Property
(1.80)
Observe that these two relationships are the dual of each other. From this equation, it follows that
because
t
sinc
,
(1.81)
2
X()
x(t)
t
.
2
= 2
sinc
2
then
X(t)
(1.82)
2x()
Equations (1.81) and (1.82) are found in Table 1.1 as pairs 7 and 8 (with = 2B). With the duality
property, knowing either pair ensures that we know the other. Figure 1.39 shows these dual pairs
graphically.
The last step in Eq. (1.82) follows since () is an even function. This evenness results in a
near-perfect symmetry between time and frequency, except for the minor factor of 2. When such
1
is not the case, the symmetry is not so perfect. For example, et u(t) j
(Table 1.1, pair
1
Apply the duality property to pairs 3 and 17 in Table 1.1 to show that
(a)
2
t2 +2
2e||
(b)
(t t0 ) + (t + t0 ) 2 cos(t0 )
52
X()
x(t)
(a)
2
X(t)
2x()
(b)
4
Figure 1.39: Illustrating duality with (a) x(t) = (t/ ) X() = sinc( /2) and (b) its dual
X(t) = sinc( t/2) 2x() = 2(/ ).
1.9.2
Linearity Property
(1.83)
The proof is trivial and follows directly from Eq. (1.75). This result can be extended to any nite
number of terms. Interestingly, applying duality to the linearity property is somewhat anticlimactic:
the same property results (that a sum of scaled signals transforms into a sum of scaled signals).
This will not be the case for many of the upcoming properties.
1.9.3
Complex-Conjugation Property
(1.84)
As with the linearity property, the proof is trivial and follows directly from Eq. (1.75).
More interesting are some of the observations that arise from the complex-conjugation property:
1. If x(t) is real, then X() is conjugate symmetric. That is, if x(t) = x (t), then X() =
X ().
2. If x(t) is imaginary, then X() is conjugate antisymmetric. That is, if x(t) = x (t), then
X() = X ().
3. If y(t) is the real part of some signal x(t), then its transform Y () is the conjugate-symmetric
portion of X(). That is, if y(t) = Re {x(t)} = 12 x(t) + 12 x (t), then Y () = Xcs () =
1
1
2 X() + 2 X ().
4. If y(t) is the imaginary part of some signal x(t) (recall that the imaginary portion of a complex
signal is a real quantity), then its transform Y () is 1/j times the conjugate-antisymmetric
1
1
x(t) 2j
x (t), then Y () = 1j Xca () =
portion of X(). That is, if y(t) = Im {x(t)} = 2j
1
1
2j X() 2j X ().
53
These observations provide us better understanding of signals and their transforms. Knowing that
a signal is real, for example, provides the powerful observation that the Fourier transform possesses
conjugate symmetry; this symmetry, in turn, allows us to completely specify the transform using
just half of the total frequencies (such as > 0).
1.9.4
Scaling Property
1
X
.
|a|
a
(1.85)
The function x(at) represents the function x(t) compressed in time by a factor a. Similarly, the
function X( a ) represents the function X() expanded in frequency by the same factor a. The
scaling property states that the time compression of a signal results in spectral expansion and that
the time expansion of a signal results in spectral compression. Intuitively, compression in time by a
factor a means that the signal is varying more rapidly by factor a. To synthesize such a signal, the
frequencies of its sinusoidal components must be increased by the same factor a, implying that its
frequency spectrum is expanded by the factor a. Similarly, a signal expanded in time varies more
slowly; hence the frequencies of its components are lowered, implying that its frequency spectrum is
compressed. For instance, the signal cos(20 t) is the same as the signal cos(0 t) time compressed
by a factor of 2. Clearly, the spectrum of the former (impulses at 20 ) is an expanded version
of the spectrum of the latter (impulses at 0 ). The eect of scaling is demonstrated by another
example in Fig. 1.40. Note the time-frequency duality implicit in this property. More discussion of
this interesting topic may be found in the literature [4].
X()
x(t)
1
(a)
2X(2)
x(t/2)
2
1
(b)
Figure 1.40: Illustrating the scaling property with (a) x(t) = (t/ ) X() = sinc( /2) and
(b) its scale x(t/2) = (t/2 ) 2X(2) = 2 sinc( /).
Time-Reversal Property
By letting a = 1 in Eq. (1.85), we obtain the time-reversal property:
if x(t) X(), then x(t) X () .
(1.86)
As Eq. (1.86) makes clear, the time-reversal property also serves as a frequency-reversal property.
54
As with the complex-conjugation property, the time-reversal property leads to some interesting
observations:
1. If x(t) is even, then X() is even. That is, if x(t) = x(t), then X() = X().
2. If x(t) is odd, then X() is odd. That is, if x(t) = x(t), then X() = X().
3. If y(t) is the even part of some signal x(t), then its transform Y () is the even portion of
X(). That is, if y(t) = xe (t) = 12 x(t) + 12 x(t), then Y () = Xe () = 12 X() + 12 X().
4. If y(t) is the odd part of some signal x(t), then its transform Y () is the odd portion of X().
That is, if y(t) = xo (t) = 12 x(t) 12 x(t), then Y () = Xo () = 12 X() 12 X().
Use the combined properties of complex conjugation and time reversal to show the following duals of the
complex-conjugation properties:
(a) If x(t) is conjugate symmetric, then X() is real.
(b) If x(t) is conjugate antisymmetric, then X() is imaginary.
(c) If y(t) is the conjugate-symmetric portion of x(t), then Y () is the real portion of X().
(d) If y(t) is the conjugate-antisymmetric portion of x(t), then Y () = jIm {X()}.
1.9.5
Time-Shifting Property
(1.87)
This result shows that delaying a signal by t0 seconds does not change its magnitude spectrum. The
phase spectrum, however, is changed by t0 .
Using real a > 0, nd the Fourier transform of x(t) = ea|tt0 | , shown in Fig. 1.41. Using a = 2
and t0 = 1, sketch the corresponding magnitude and phase spectra.
x(t)
1
t0
01
02
03
55
|X()|
X()
t0
2
2
(b)
(a)
Figure 1.42: Spectra for x(t) = ea|tt0 | using a = 2 and t0 = 1: (a) |X()| and (b) X().
The spectrum of ea|tt0 | , shown in Fig. 1.42, is the same as that of ea|t| except for an added
linear phase shift t0 that results as a direct consequence of the time delay t0 . As with most
computer-calculated phases, the phase spectrum (solid line) in Fig. 1.42b assumes the principal
value of the angle rather than simply t0 (dashed line). The principal value diers from the actual
value by 2k radians (integer k) in such a way as to ensure that the principal value remains within
the range . Thus, the principal value exhibits jump discontinuities of 2 whenever the original
phase goes beyond the range . The two representations, however, are completely equivalent. As
Ex. 1.12 will show, however, principal value plots are not always the most illuminating.
Example 1.11
t
3
4
, shown in Fig. 1.43. Plot
x(t)
1
3
4
5
4
t
3
4
.
The
pulse x(t) is the gate pulse (t/ ) in Fig. 1.9b delayed by t0 = 3 /4 seconds, that is, x(t) =
. Hence, according to Eq. (1.87), its Fourier transform is the Fourier transform of (t/ )
t0.75
3
multiplied by ej( 4 ) . Therefore,
3
ej 4 .
X() = sinc
2
The magnitude spectrum | sinc 2 |, shown in Fig. 1.44a, is identical to the magnitude spectrum
56
for the unshifted rectangular pulse, as shown in Fig. 1.37a. Figure 1.44b shows the phase using
principal values. Setting = 1 for convenience, MATLAB easily computes and plots these spectra.
01
02
03
|X()|
(a)
8
X()
(b)
X()
3
2
(c)
8
t
3
4
3
2
: (a) |X()|, (b) X(), and (c) unwrapped X().
Although the phase plot of Fig. 1.44b appears as the aimless frolick of a playful child, its madness
has a method. The jumps of at = 2k/ (integer k) occur due to the sign alternations of
the sinc function at those frequencies. The remaining jumps of 2 occur to keep the phase in the
principal value range of .
Figure 1.44c shows a more informative presentation of the phase spectrum that is obtained by
unwrapping the phase response found in Fig. 1.44b. The unwrapping process essentially removes
the jumps of 2 used to keep angle values in the principal range. Now, the linear component of
phase that is due to the time shift is clearly visible, only to be broken by occasional jumps of
resulting from alternations in sign of the sinc function. The time delay itself is easily ascertained
3
by computing the slope near the origin as t0 = 4/
= 3
4 . MATLABs built-in unwrap command
simplies the unwrapping process.
04
05
06
Xunwrapang = unwrap(angle(X),1.5*pi);
Xunwrapang = Xunwrapang-(Xunwrapang(1)+Xunwrapang(end))/2;
subplot(313); plot(omega,Xunwrapang); xlabel(\omega); ylabel(\angle X(\omega));
Line 05, while not absolutely necessary, compensates for the fact that MATLAB unwraps vectors
from one side to the other, rather than from the middle out, and ensures that our phase plot has
the desired odd symmetry.
Example 1.12
57
t0
(a)
t0
(b)
Figure 1.45: Illustrating linear phase: (a) the phase shift in sin ([t t0 ]) caused by delay t0 is half
as large as (b) the phase shift in sin (2[t t0 ]) caused by the same delay t0 .
Using the time-shifting property and pair 8 in Table 1.1, show that
1
sinc (0 [t t0 ])
ejt0 .
0
20
Sketch the corresponding magnitude and phase spectra.
Frequency-Shifting Property
The frequency-shifting property, which is the dual of time-shifting property, states that
if x(t) X(), then x(t)ej0 t X( 0 ).
(1.88)
58
According to this property, the multiplication of a signal by a factor ej0 t shifts the spectrum of
that signal by 0 . Changing 0 to 0 in Eq. (1.88) yields
x(t)ej0 t X( + 0 ).
(1.89)
In most CT systems, frequency shifting is not achieved by multiplying signal x(t) by the complex
signal ej0 t (or ej0 t ). Rather, x(t) is typically multiplied by a real sinusoid as
1
x(t)ej0 t + x(t)ej0 t .
2
x(t) cos (0 t) =
From Eqs. (1.88) and (1.89), it follows that
1
[X( 0 ) + X( + 0 )] .
2
x(t) cos (0 t)
(1.90)
This result, known as the modulation property, shows that the multiplication of a signal x(t) by a
sinusoid of frequency 0 shifts the spectrum X() by 0 , as depicted in Fig. 1.46.
X()
X(0)
x(t)
(a)
0
x(t) cos(0 t)
x(t)
1
X(
2
+ 0 )
1
X(
2
X(0)
2
0 )
(b)
t
0 B
0 +B
0 B
0 +B
x(t)
Figure 1.46: Multiplication by a sinusoid causes spectral shifting: (a) x(t) X() and (b)
x(t) cos(0 t) 12 [X( 0 ) + X( + 0 )].
Multiplication of a sinusoid cos(0 t) by x(t) amounts to modulating the sinusoids amplitude.
This type of modulation is known as amplitude modulation. As long as 0 is suciently large, as is
normally the case, notice that x(t) serves as the envelope of the sinusoid cos(0 t). The sinusoid,
in this case cos(0 t), is called the carrier, the signal x(t) is the modulating signal, and the signal
x(t) cos(0 t) is the modulated signal. Figure 1.46 shows that the signal x(t) has bandwidth B, but
the bandwidth of the modulated signal is 2B. Thus, modulation doubles the bandwidth.
Eecting a Constant Phase Shift in a Modulated Spectrum
From Eqs. (1.88) and (1.89), it follows that
x(t)ej(0 t+) X( 0 )ej
59
1
X( 0 )ej + X( + 0 )ej .
2
(1.91)
Comparison of Eq. (1.91) with Eq. (1.90) shows that merely by shifting the carrier phase by a
constant , we can shift the phase of the entire modulated spectrum by . The right-hand side of
Eq. (1.91) shows that the entire spectrum X( 0 ) (centered at 0 ) acquires a constant phase
. Similarly, the entire spectrum X( + 0 ) (centered at 0 ) acquires a constant phase . We
shall later see how this principle allows us to relax the condition for linear phase characteristics in
bandpass systems.
t
Sketch the signal x(t) = 4
and the corresponding modulated signal x(t) cos(5t). Show that
t
1.9.6
d
x(t) jX().
dt
dk
x(t) (j)k X().
dtk
t
X()
if x(t) X(), then
+ X(0)().
x( )d
j
(1.92)
(1.93)
1.9.7
d
x(t)
dt
exists.
60
then
x(t) y(t) X()Y ().
(1.95)
Use pair 14 in Table 1.1, the convolution property of Eq. (1.95), and the fact that x(t) u(t) =
to prove the time-integration property given in Eq. (1.93).
t
x( ) d
Using the time-domain convolution property, show that for Re {1 } < 0 and Re {2 } < 0,
e1 t u(t) e2 t u(t) =
e1 t e2 t
u(t).
1 2
Hint: Use the convolution property of Eq. (1.95) to nd the Fourier transform of e1 t u(t) e2 t u(t), and
then use a partial fraction expansion to nd its inverse Fourier transform.
1
X() Y ().
2
(1.96)
Notice that the factor of 1/2 occurs as a result of using the radian frequency variable . If the
transforms are expressed using the hertzian frequency variable f , then the property simplies to
x(t)y(t) X(f ) Y (f ). Referencing the time-domain side of the relationship, Eq. (1.96) is
sometimes called the multiplication property of the Fourier transform.
sinc(1 )/2
sinc(1 ) sinc(2 ) =
sinc(2 )/1
1 < 2
.
1 > 2
1.9.8
61
x,y ( ) =
x(t + )y (t) dt.
(1.97)
Correlation provides a measure of similarity between two signals as a function of the time lag
between them. The more similar two signals are at a particular shift , the larger the corresponding
correlation value becomes. Correlation nds common use in engineering systems. For example,
global positioning system (GPS) receivers utilize correlation. The receiver correlates known GPS
satellite codes stored in memory with the signal received by the receivers antenna. Large correlation
values indicate that a particular satellite is in the receivers eld of view; the corresponding lag values
for each detected satellite are used to triangulate the receivers position using known satellite almanac
data.
When the signals x(t) and y(t) are distinct from one another, the correlation function x,y ( ) is
often termed the cross-correlation function between x(t) and y(t). If y(t) = x(t), then the correlation
function x,x ( ) is termed the autocorrelation function.
If the correlation function in Eq. (1.97) looks familiar, it should. It is nearly identical to the
convolution operation given in Eq. (1.41). Only a little eort is required to demonstrate that
x,y ( ) = x( ) y ( ).
(1.98)
Equation (1.98) tells us that correlation is no more dicult, and no more easy, than convolution.
Applying the complex-conjugation, time-reversal, and convolution properties yields the correlation
property
(1.99)
x,y ( ) = x( ) y ( ) X()Y ().
Verify that the order of variables is important in the cross-correlation function by showing that
x,y ( ) = y,x ( ) = y,x ( ).
x,x (0) =
x(t)x (t) dt =
|x(t)|2 dt = Ex .
(1.100)
In other words, the autocorrelation function indicates strength of similarity in a manner consistent
with the way we measure signal strength, namely, signal energy. Much like a correlation coecient,
the correlation function is often normalized by signal energy.
Additional insight is obtained by noting that since x,x ( ) has Fourier transform X()X (), it
can be synthesized using Eq. (1.74) as
1
1
j
x,x ( ) =
X()X ()e
d =
|X()|2 ej d.
2
2
For
further discussion of the physical signicance of correlation and intuition on why it serves as a measure of
similarity between signals, refer to [2].
62
1
Ex =
|x(t)|2 dt =
|X()|2 d.
2
(1.101)
This statement is the well-known Parsevals theorem for the Fourier transform. This result allows
us to determine the signal energy from either the time-domain specication x(t) or the frequencydomain specication X() of the same signal.
Equation (1.101) can be interpreted to mean that the energy of a signal x(t) results from energies
contributed by all the spectral components of the signal x(t). The total signal energy is the area
under |X()|2 (divided by 2). Similar to the approach shown in Fig. 1.12, it is helpful to consider
this area as the innite sum
1
|X(k)|2 .
Ex = lim
0 2
k=
|X()|2
|X(k)|2
2
1
Ex =
|X()|2 d.
(1.102)
2 1
For real signals, X() and X() are conjugates, and |X()|2 = X()X () = X()X() is
an even function of . Therefore, Eq. (1.101) can be expressed as
1
Ex =
|X()|2 d.
(1.103)
0
For real signals, the band of negative frequencies also contributes an equal amount of energy. Hence, for real
signals, the energy contributed by a band f Hz at is 2|X()|2 f . See Eq. (1.103).
This assumes that X() does not contain an impulse at = 0. If such an impulse exists, it should be integrated
separately with a multiplying factor of 1/2 rather than 1/.
63
For real signals, the signal energy Ex , which results from contributions from all the frequency
components from = to , is given by (1/ times) the area under |X()|2 from = 0 to .
For real signals, it is common to specify frequency bands using just positive frequencies; the implicit
assumption is that positive- and negative-frequency components are both included.
Use Parsevals theorem to show that the energy of the signal y(t) =
Find Y () using pair 3 from Table 1.1 and the duality property.
2a
t2 +a2
2
.
a
Hint:
Using real a > 0, nd the energy of signal x(t) = eat u(t). Using a 95% energy criterion, determine
the essential bandwidth B of the signal. How does B change if a 99% energy criterion is used?
We have
Ex =
|x(t)|2 dt =
e2at dt =
1
.
2a
We can verify this result by Parsevals theorem. Using pair 1 in Table 1.1, the signal spectrum is
X() =
1
.
j + a
Since x(t) is real, we use the Eq. (1.103) form of Parsevals theorem to determine the signal energy
as
1
1
1
1
1
1
Ex =
tan
.
|X()|2 d =
d
=
=
0
0 2 + a2
a
a 0
2a
The band (B B) contains 95% of the signal energy, that is, 0.95/2a. Using Eq. (1.102), we
obtain
B
0.95
B
1
d
1 B d
1
1
1
1
=
tan
tan
=
=
=
,
2a
2 B 2 + a2
0 2 + a2
a
a 0
a
a
or
B = a tan
For
0.95
2
= 12.706a rad/s.
lowpass signals, the essential bandwidth may also be dened as a frequency at which the value of the magnitude
spectrum is a small fraction (about 1%) of its peak value.
64
This result indicates that the spectral components of x(t) in the band from 0 (dc) to 12.706a rad/s
(2.02a Hz) contribute 95% of the total signal energy; all the remaining spectral components in the
band from 2.02a Hz to contribute only 5% of the signal energy.
Following the same procedure, the 99% energy bandwidth is computed as
0.99
B = a tan
= 63.657a rad/s.
2
Increasing the energy criterion from 95% to 99% results in a ve-fold increase in essential bandwidth.
Example 1.13
Find the energy of the unit-duration pulse x(t) = (t). Using a 95% energy criterion, determine
the essential bandwidth B of the signal.
It is most convenient to nd the energy of x(t) in the time domain as
0.5
Ex =
(1)2 dt = 1.
0.5
B
1
1
Ex = .95Ex = 0.95 =
|X()|2 d =
sinc2 (/2) d.
2 B
2 B
(1.104)
This is a dicult equation to solve and requires numerical integration techniques. To better understand how a solution is obtained, we rewrite Eq. (1.104) as
B
1
2
(1.105)
sinc (/2) d = 0.
0.95
2 B
The left-hand side of Eq. (1.105) is minimized (zero) when B is the correct 95% essential bandwidth.
Thus, our problem becomes one of minimizing the left-hand side of Eq. (1.105) with respect to B. In
the context of such a minimization problem, the left-hand side of Eq. (1.105) is called the objective
function for the minimization.
Once again, MATLAB possesses built-in functions that help solve the problem.
01
02
03
Lines 01 and 02 dene the integrand and integral of Eq. (1.104), respectively. Notice that line 02
computes the integral numerically using MATLABs quad function. Line 03 denes our objective
function and uses the MATLAB command fminsearch to minimize this function beginning with an
initial guess of 1. The result tells us that the 95% eective bandwidth of x(t) is B = 13.0245 rad/s.
To verify this result, we numerically evaluate the right-hand side of Eq. (1.104) and verify the result
is 0.95.
04
DeltaEx(B)
ans = 0.9500
Example 1.14
65
1 T /2
1
ExT
2
Px = lim
.
(1.106)
|x(t)| dt = lim
|xT (t)|2 dt = lim
T T T /2
T T
T T
Here, xT (t) is the signal x(t) truncated outside |t| > T2 , that is, xT (t) = x(t) Tt and ExT is the
energy of this truncated signal xT (t). Using Eq. (1.101) in Eq. (1.106) yields
1
1
|XT ()|2
d =
Px = lim
Sx () d.
(1.107)
T 2
T
2
Here, Sx (), the power spectral density of x(t), is dened as
|XT ()|2
.
T
T
Sx () = lim
(1.108)
The power spectral density has similar physical interpretation as the energy spectral density. Analogous to Eq. (1.102), the power Px contained in some nonzero range of frequencies is obtained
by integrating the power spectral density over those frequencies as
1
Sx () d.
(1.109)
Px =
2
Using Properties to Reduce Tedious Computations
For many signals, it can be quite tedious to directly compute the Fourier transform using Eq. (1.75).
Properties often oer a simpler way, particularly for piecewise polynomial signals. As the next
example shows, we can readily compute the Fourier transform of a piecewise polynomial signal
without any integration by using the time-dierentiation and time-shifting properties.
Using
only properties and the fact that (t) 1, determine the Fourier transform of x(t) =
t2
2 .
To begin, notice that we can express x(t) as
x(t) = (t 1)u(t 1) 2(t 2)u(t 2) + (t 3)u(t 3).
Thus,
d
x(t) = u(t 1) 2u(t 2) + u(t 3)
dt
and
d2
x(t) = (t 1) 2(t 2) + (t 3).
(1.110)
dt2
The signal x(t) and its rst two derivatives are shown in Fig. 1.48.
Using the time-dierentiation and time-shifting properties, the Fourier transform of Eq. (1.110)
is given as
2 X() = ej 2ej2 + ej3 = 2ej2 (cos() 1) ,
which is easily solved for X() as long as = 0. For = 0, we determine, by inspection, that
X(0) = 1. Thus,
j2
2e
[1 cos()] = 0
2
.
X() =
1
=0
66
x(t)
1
d
x(t)
dt
d2
x(t)
dt2
3
0
1
2
(c)
(b)
(a)
1.9.9
Fourier analysis comes in many avors, including the Fourier transform and the Fourier series. The
similarities between these varieties greatly exceed their dierences. It is little surprise, therefore, that
most of the properties of the Fourier transform extend, if not exactly then at least in spirit, to the
Fourier series. In a general sense, for example, both transforms share basic symmetry relations, as
shown in Table 1.2. Notice that each symmetry relation possesses an equivalent dual. For example,
this duality ensures that a real time-domain or a real frequency-domain signal has a conjugatesymmetric transform and vice versa.
Time (or Frequency)
Real
Imaginary
Conjugate symmetric
Conjugate antisymmetric
Even
Odd
Even
Odd
Table 1.2: Symmetries shared by the Fourier transform and the Fourier series.
Table 1.3 summarizes the Fourier transform properties already discussed and provides a side-byside comparison with the corresponding properties, when they exist, of the Fourier series. When
67
talking about the Fourier series and its properties, it is implicit that the underlying signals are
periodic with common fundamental frequency 0 . As Table 1.3 makes clear, the Fourier transform
Fourier Transform
x(t) =
Fourier Series
Synthesis:
X()ejt d
Synthesis:
x(t) = Xk ejk0 t
1
2
Analysis:
X() = x(t)ejt dt
Xk =
Analysis:
jk0 t
dt
T0 x(t)e
1
T0
Duality:
if x(t) X(), then X(t) 2x()
Duality:
Linearity:
ax(t) + by(t) aX() + bY ()
Linearity:
ax(t) + by(t) aXk + bYk
Complex Conjugation:
x (t) X ()
Complex Conjugation:
x (t) Xk
Shifting:
x(t t0 ) X()ejt0
x(t)ej0 t X( 0 )
Shifting:
x(t t0 ) Xk ejk0 t0
x(t)ejk0 0 t Xkk0
x(t) Xk
Dierentiation:
jX()
d
jtx(t) d
X()
Dierentiation:
jk0 Xk
d
dt x(t)
d
dt x(t)
Time Integration:
x(
)d X()
j + X(0)()
Time Integration:
Convolution:
x(t) y(t) X()Y ()
1
x(t)y(t) 2
X() Y ()
Correlation:
x,y ( ) = x( ) y ( ) X()Y ()
Ex =
Parsevals:
1
2
|x(t)|
dt = 2
|X()|2 d
Convolution:
Xk Yk
x(t)y(t) Xk Yk
T0 x(t)y(t)
Correlation:
1
( )
T0 x( )y
x,y ( ) =
Px =
1
T0
Xk Yk
Parsevals:
2
2
|x(t)|
dt =
k= |Xk |
T0
68
x( )y(t ) d.
(1.111)
x(t)y(t)
=
T0
Compared with ordinary convolution, circular convolution integrates only over a single period T0
(rather than from to ). This dierence should look familiar. Within the scale factor 1/T0 , it
is precisely the same dierence found between the Eq. (1.32) expression for signal energy and the
Eq. (1.34) power expression for periodic signals. Parsevals theorem, which follows from correlation,
shares these same changes in going from the Fourier transform to the Fourier series. In the Fourier
series, the quantity |Xk |2 serves much the same role as the power spectral density function Sx ()
of Eq. (1.108) discussed previously. Lastly, notice that the product rule (convolution in frequency)
of the Fourier series involves a traditional convolution of two discrete sequences, which is a topic
discussed in depth in Ch. 5.
Beyond the Fourier Transform and Fourier Series
Table 1.4 provides additional insight into Fourier analysis. We know a periodic continuous-time
signal is analyzed with the Fourier series, which is discrete in frequency. Thus, being periodic in
time leads to being discrete in frequency. Further, an aperiodic CT signal is analyzed with the
Fourier transform, which is continuous in frequency. Thus, being aperiodic in time leads to being
continuous in frequency. Although we delay rigorous proofs for later, duality also applies here. Thus,
being continuous in time leads to being aperiodic in frequency, and being discrete in time leads to
being periodic in frequency. Thus, we see that the spectra produced by the Fourier series or the
Fourier transform, which both operate on continuous-time signals, must result in aperiodic spectra.
Further, we learn the fundamental characteristics that exist in the Fourier analysis of discrete-time
signals. An aperiodic DT sequence is analyzed with the discrete-time Fourier transform (DTFT),
which is necessarily periodic and continuous in frequency. A periodic DT sequence is analyzed with
the discrete-time Fourier series (DTFS), which is necessarily periodic and discrete in frequency.
Periodic DT sequences are often analyzed with a variant of the DTFS called the discrete Fourier
transform (DFT), of which the fast Fourier transform (FFT) is a computationally ecient version.
Later chapters fully treat the DTFT, the DTFS, the DFT, and the FFT.
Time (or Frequency)
Periodic
Discrete
Aperiodic
Continuous
1.10
The Fourier transform is a tool that allows us to represent a signal x(t) as a continuous sum of
exponentials of the form ejt , whose frequencies are restricted to the imaginary axis in the complex
plane (s = j). Such a representation is quite valuable in the analysis and processing of signals. In
69
the area of system analysis, however, the use of the Fourier transform leaves much to be desired.
First, the Fourier transform exists only for a restricted class of signals and, therefore, cannot be
used for inputs such as growing exponentials. Second, the Fourier transform cannot be used easily
to analyze unstable or even marginally stable systems.
The basic reason for both these diculties is that for some signals, such as eat u(t) (a > 0),
the Fourier transform does not exist. This is because ordinary exponentials of the form ejt , on
account of their constant amplitudes, are incapable of synthesizing exponentially growing signals.
This problem could be resolved if it were possible to use basis signals of the form est rather than
ejt , where the complex frequency s is not restricted to just the imaginary axis as it is in the Fourier
transform. This is precisely what is done in the bilateral Laplace transform, which generalizes the
frequency variable s = j to s = +j. Such generalization permits us to use exponentially growing
sinusoids to synthesize a signal x(t). The (bilateral) Laplace transform of x(t) is given by (see [1])
X(s) =
x(t)est dt,
(1.112)
1
2j
+j
X(s)est ds.
(1.113)
The bilateral Laplace transform and its inverse are denoted symbolically as
X(s) = L {x(t)}
or simply as
L
x(t) X(s).
When computing Eq. (1.112), it is necessary to specify where the transform converges in the
s-plane. The region of convergence (ROC) Rx , sometimes called the region of existence, is a function of the variable s and describes the area in the complex plane where X(s) converges (exists).
Conveniently, left-sided signals have left-sided ROCs, right-sided signals have right-sided ROCs, and
signals with both left- and right-sided components have ROCs that are the union of the individual
left- and right-sided ROCs, normally a strip in the s-plane. The ROCs for nite-duration signals
include the entire s-plane (except perhaps s = 0 and |s| = ).
Due to the complex (versus real) integration required, it is dicult to evaluate Eq. (1.113) directly. Rather, inverse Laplace transforms are typically performed by table look-up. If a particular
transform X(s) is not available in a table, partial fraction expansions and Laplace transform properties are normally helpful. See [1] for greater details on ROCs and computing inverse Laplace
transforms.
The Unilateral Laplace Transform
In practice, we deal most often with causal signals. When we observe this restriction, the Laplace
transform is called the unilateral Laplace transform. Mathematically, the unilateral Laplace transform of causal signal x(t) is
X(s) =
x(t)est dt.
(1.114)
70
or simply as
L
u
x(t)
X(s).
Since the unilateral Laplace transform is only used with causal signals, its region of convergence can
be inferred and is thus typically not specied. The inverse of the unilateral Laplace transform does
not dier from that of the bilateral Laplace transform and is thus represented by Eq. (1.113).
As comparing Eqs. (1.112) and (1.114) makes clear, the unilateral Laplace transform is just
a special case of the bilateral transform where all signals are restricted to be causal. Since the
bilateral Laplace transform is more general than the unilateral case, it is natural to question why
the restrictive unilateral Laplace transform is ever considered. There are two primary reasons. First,
the unilateral Laplace transform can be more convenient than the bilateral case, particularly since
there is no need to specify any ROCs. Second, and perhaps more important, the unilateral transform
better facilitates the analysis of linear constant-coecient dierential equations that possess nonzero
initial conditions. This will become more clear in Sec. 1.10.2 when Laplace transform properties are
reviewed.
Table 1.5 gives a short table of selected bilateral Laplace transform pairs, including their ROCs.
Entries 110, which involve causal signals x(t), double as a table of unilateral transforms, in which
case specication of the ROC is unnecessary. Entries 1119 involve anti-causal signals and therefore
do not possess a unilateral Laplace transform.
1.10.1
According to Eq. (1.112), the general (bilateral) Laplace transform of a signal x(t) is
X(s) =
x(t)est dt.
X(j) =
x(t)ejt dt,
where X(j) = X(s)|s=j . Observe that the right-hand-side integral denes X(), the Fourier
transform of x(t). Does this mean that the Fourier transform can be obtained from the corresponding
Laplace transform by setting s = j? In other words, is it true that X(j) = X()? Well, yes and
no. Yes, it is true in most cases. For example, when x(t) = et u(t) and Re {} < 0, its Laplace
transform is 1/(s ), and X(j) = 1/(j ), which is equal to its Fourier transform X()
(assuming Re {} < 0). However, for the unit step function u(t), the Laplace transform is
L
u(t)
1
,
s
1
+ ().
j
71
x(t)
X(s)
ROC
1.
(t)
All s
2.
u(t)
1
s
3.
t u(t)
4.
et u(t)
Re {s} > 0
Re {s} > 0
k!
sk+1
1
s
Re {s} > Re {}
Re {s} > Re {}
5.
t e u(t)
k!
(s)k+1
6.
cos(0 t)u(t)
7.
sin(0 t)u(t)
8.
s
s2 +02
0
s2 +02
s+a
(s+a)2 +02
0
(s+a)2 +02
9.
10.
k t
at
sin(0 t)u(t)
Re {s} > 0
Re {s} > 0
Re {s} > a
Re {s} > a
0.5e
s+aj0
Re {s} > a
0.5e
s+a+j0
11.
u(t)
1s
Re {s} < 0
12.
tk u(t)
k!
sk+1
Re {s} < 0
Re {s} < Re {}
Re {s} < Re {}
13.
e u(t)
1
s
14.
tk et u(t)
k!
(s)
k+1
15.
cos(0 t)u(t)
16.
sin(0 t)u(t)
s
s2 +
2
0
0
s2 +2
0
s+a
(s+a)
2 + 2
0
0
(s+a)2 +2
0
at
17.
cos(0 t)u(t)
18.
19.
Re {s} < 0
Re {s} < 0
Re {s} < a
Re {s} < a
cos()0 sin()
cos()s+a
s2 +2as+(a2 +02 )
j
0.5e
= s+aj
+
0
Re {s} < a
0.5e
s+a+j0
When a signals ROC includes the -axis, both the Laplace and Fourier transforms can synthesize
the signal with the same spectrum and X(s)|s=j = X(). Absolutely integrable signals fall into
this category. However, when a signals ROC does not include the -axis, such as when a signal
is not absolutely integrable, the Laplace spectrum will necessarily fail to properly synthesize the
signal using only frequencies s = j, which are outside its region of convergence. In such cases,
X(j) = X().
Notice that the Fourier transform is able to do something the Laplace transform cannot: it
can synthesize certain signals such as u(t) that are not absolutely integrable using the restricted
frequencies s = j. Fourier can also accommodate periodic signals, a task the Laplace transform
cannot manage with any choice of frequencies s. Before we feel too sorry for the poor Laplace
transform, however, notice that the Laplace transform easily handles growing exponentials, which is
something the Fourier transform cannot tolerate. This discussion shows that although the Fourier
transform may be considered as a special case of the Laplace transform, we need to circumscribe
72
such a view.
1.10.2
Because it is a generalization of the Fourier transform, the properties of the bilateral Laplace transform are similar to those of the Fourier transform. Table 1.6 summarizes the important properties
of the bilateral Laplace transform. Table 1.6 also provides a side-by-side comparison with the corresponding properties, when they exist, of the unilateral Laplace transform. When talking about the
unilateral Laplace transform and its properties, it is assumed that the underlying signals are causal.
x(t) =
X(s) =
Synthesis:
+j
X(s)est ds
j
1
2j
Analysis:
st
dt, ROC: Rx
x(t)e
x(t) =
Synthesis:
+j
X(s)est ds
j
1
2j
Analysis:
X(s) = 0 x(t)est dt
Linearity:
Linearity:
u
ax(t) + by(t)
aX(s) + bY (s)
Complex Conjugation:
Complex Conjugation:
x (t) X (s ), ROC: Rx
u
x (t)
X (s )
x(t t0 ) X(s)e
Shifting:
st0
, ROC: Rx
tx(t)
d
ds X(s),
ROC: Rx
Time Integration:
x( )d
1
s X(s),
u
If t0 > 0: x(t t0 )
X(s)est0
Lu
x(t)es0 t X(s s0 )
Dierentiation:
Lu
d
dt x(t)
sX(s) x(0 )
(general case shown below)
L
u
tx(t)
d
ds X(s)
Time Integration:
t
Lu 1
x( )d
s X(s)
0
Convolution:
Convolution:
u
x(t) y(t)
X(s)Y (s)
1.11. Summary
73
the majority of the properties between the two are identical. Only a few dierences are to be found.
First, note that an ROC need not be specied for the unilateral case. The scaling and shifting
properties possess restrictions for the unilateral transform to ensure causal results, as required.
Similarly, the time-reversal property nds no place among the unilateral Laplace transform properties
since it always transforms a causal signal into a noncausal signal. The most interesting dierence, as
alluded to previously, is found in the dierentiation property; initial conditions are explicitly visible
for the unilateral Laplace transform. For additional details, refer to [1].
Find the response y(t) of a causal LTIC system with transfer function H(s) = 1/(s + 5) if the
input is x(t) = u(t). Locate the system poles and zeros and determine whether or not the system
is stable.
The output of an LTIC system is y(t) = x(t) h(t). Applying the convolution property of the
unilateral Laplace transform (Table 1.6) yields
Y (s) = X(s)H(s).
L
u
X(s) = 1/s. Hence,
From Table 1.5, we nd that x(t) = u(t)
1 1
1
1
=
Y (s) =
.
s(s + 5)
5 s s+5
1
1 e5t u(t).
5
By inspection, this system has a single nite pole at s = 5. This system does not have a nite
zero, but since every pole is paired with a zero (and vice versa), we can establish that there is a
system zero at |s| = .
Since the only pole of H(s) is LHP, the system is BIBO stable. Further, as long as the system
is observable and controllable (see the footnote on page 32), we can also state the system is asymptotically stable.
Example 1.16
1.11
Summary
This chapter provides a review of fundamental continuous-time (CT) signals and systems concepts.
Despite apparent dierences, CT concepts are highly relevant to the study of digital signal processing.
Varieties of operators, signal models, and signal classications assist in the characterization and
manipulation of CT signals and systems. The CT time-shifting operation relocates a signal in time,
while the time-scaling operation allows for signal compression, expansion, and reection. The unit
step, unit gate, unit triangle, and unit impulse functions are all useful CT signal models, as are
the exponential and interpolation (sinc) functions. Exponential and unit impulse functions are both
commonly used as building blocks (basis functions) to construct more complicated waveforms and
are invaluable in the frequency-domain and time-domain analysis of LTIC systems, respectively.
Signal classications, such as those based on signal symmetries, provide helpful insights into signal
character and behavior. Such classications also identify which techniques are most appropriate for
signal analysis.
It is dicult to mathematically characterize the behavior of a CT system in the most general case.
By restricting our attention to CT systems that are linear and time-invariant (LTIC), however, the
74
mathematics are tractable, and the system output to an arbitrary input is given by the convolution
of the input x(t) with the systems unit impulse response h(t), denoted by x(t) h(t). The impulse
response provides a time-domain characterization of an LTIC system, and convolution provides a
time-domain expression of system output.
The response of an LTIC system with transfer function H(s) to an everlasting sinusoid of frequency is also an everlasting sinusoid of the same frequency. The output magnitude is |H(j)|
times the input magnitude, and the output sinusoid is shifted in phase with respect to the input sinusoid by H(j) radians. This unique behavior provides the foundation for frequencyand transform-domain analysis. In this context, three transforms are particularly appropriate: the
Fourier series, the Fourier transform, and the Laplace transform.
A periodic signal of period T0 can be represented by a sum of exponentials (or sinusoids) of
frequencies 0 = 2/T0 and all its harmonics. Such a representation is called the Fourier series. We
can express a periodic signal using either the exponential or trigonometric form; the two forms are
equivalent. A truncated Fourier series generally provides a good approximation of a signal, although
Gibbs phenomenon will occur at any points of discontinuity.
An aperiodic signal can be expressed as a Fourier integral (instead of a Fourier series). The
existence of the Fourier transform is guaranteed for signals that are absolutely integrable or those
with nite energy. The Fourier transform of an exponentially growing signals does not exist. Moreover, the Fourier transform cannot be used to analyze unstable (or even marginally stable) systems.
The Fourier transform exhibits a strong time-frequency duality. Both the Fourier transform and the
Fourier series share similar properties that simplify frequency-domain operations.
Extension of the Fourier transform, where the frequency variable j is generalized to the variable
+ j, is called the Laplace transform. Because of this generalization, the Laplace transform exists
for a much wider variety of signals. The Laplace transform can handle all types of linear systems:
stable, unstable, or marginally stable.
Armed with these concepts, we are prepared to tackle both the analysis and design of systems
from a frequency-domain or ltering perspective. This is the focus of the next chapter.
References
1. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
2. Lathi, B. P., Signal Processing and Linear Systems, Oxford University Press, New York, 1998.
3. Kailath, T., Linear Systems, Prentice-Hall, Englewood Clis, NJ, 1980.
4. Bracewell, R. N., Fourier Transform and Its Applications, Revised 2nd Ed., McGraw-Hill, New
York, 1986.
Problems
75
Problems
x(at + b)
1
Figure P1.2-4
x(t)
x(2t/3)
(b) x(t + 5)
(d) x(2 t/2)
x(t)
1
Figure P1.2-1
xa (t)
x(t)
x(t)
2
1
t
xb (t)
1
2
xc (t)
1
1
1
32
3
2
2 t
Figure P1.2-2
xd (t)
xe (t)
1
2
13
2 1
2
1
2
2 t
Figure P1.2-6
76
x(at + b)
ax(t + b)
(b)
(d)
x(at) + b
ax(t) + b
1.3-10 Using the signal x(t) shown in Fig. P1.310, nd and sketch
(a) xa (t) =
(b) xb (t) =
d
dt x(t)
d2
dt2 x(t)
x(t)
1
Figure P1.3-10
1.3-11 Using x(t) illustrated in Fig. P1.3-11,
t
nd and sketch y(t) = x( ) d .
x(t)
1
Figure P1.3-11
1.3-12 Using x(t) illustrated in Fig. P1.3-12,
t
nd and sketch y(t) = x( ) d .
x(t)
2
1
2
1
Figure P1.3-12
1.3-13 Sketch cos(1 t) sin(2 t) when 1 2 .
What changes if 1 2 ? What happens
if 1 and 2 are close in value?
1.3-14 Dene x(t) = (t/3) + (t/4). Sketch
3
y(t) =
k=3 x(t + 6k) over a suitable
range of t.
1.3-15
x(t) = (t/2). Sketch y(t) =
Dene
k
k= (1) x(3t+k) over a suitable range
of t.
Problems
77
K
1
jkt
1.3-16 Dene x(t) = 2K+1
. Usk=K e
ing K = 20, plot x(t) over (2 t
2). Compare x(t) to a plot of sinc(Kt/).
What might be a good use of x(t)?
1
(b)
(d)
(f )
xb (t)
xa (t)
2
0 1
xd (t)
xc (t)
2
e3t cos(2t)
2e3t
3
0 1
2 t
1
t
Figure P1.4-4
(a) ya (t) = Re {fcs (t)}
xb (t)
xa (t)
2
2
3
0
xd (t)
xc (t)
1
4
t
0 1
3
0
x(t)
t
8
t3
Figure P1.4-2
0
t3
Figure P1.4-8
78
1
Ex .
1.4-14 Show that the energy of x(at) is |a|
That is, time scaling a signal by a reciprocally scales the original signal energy Ex by
1.4-17 Consider three signals: xa (t) = cos(t),
1
|a| .
xb (t) = sin(t), and xc (t) = xa (t) + xb (t).
1.4-15 The signal shown in Fig. P1.4-15 is de(a) For signal xa (t), determine its fundaned as
(b) For signal xb (t), determine its funda0.5 + 0.5 cos(2t) 1 t < 2
x(t) =
.
mental period Tb as well as its power.
3
t
2
t
<
3
0
otherwise
(c) Show that signal xc (t) is not periodic.
Determine the power of xc (t).
The energy of x(t) is Ex 1.0417.
Problems
79
Im {w(t)}
1.4-18 Figure P1.4-18 plots a complex signal 1.5-3 A system is specied by its input-output
w(t) in the complex plane over the time
relationship as
range (0 t 1). The time t = 0 corre d
x(t) .
y(t) = x2 (t) dt
sponds with the origin, while the time t = 1
corresponds with the point (2,1). In the
Show that the system satises the homocomplex plane, plot w(t) over (1 t 1)
geneity property but not the additivity
if
property.
(a) w(t) is an even signal
1.5-4 Suppose a certain LTIC system with input
(b) w(t) is an odd signal
x(t), output y(t), and two initial conditions
x1 (0) and x2 (0) produces the following ob(c) w(t) is a conjugate-symmetric signal
servations:
(d) w(t) is a conjugate-antisymmetric signal
y(t)
x(t) x1 (0) x2 (0)
0
0
u(t)
Re {w(t)}
Figure P1.4-18
+ 3y(t) = x2 (t)
(b)
d
dt y(t)
d
dt y(t)
(d)
d
dt y(t)
+ y 2 (t) = x(t)
(g)
d
dt x(t)
d
x(t) dt
x(t)
+ sin(t)y(t) =
+ 2x(t)
+ 2y(t) =
t
(h) y(t) = x( ) d
Figure P1.5-4
x(t)
1
+ 2ty(t) = t2 x(t)
d
2
(c) 2y(t) + dt
y(t) = 4x(t)
(f )
et u(t)
et (3t + 2)u(t)
2u(t)
Determine y(t) when both the initial conditions are zero and the input x(t) is as shown
in Fig. P1.5-4.
1
1
1
1
2
1
u(t)
e2t u(t)
(b)
(d)
et u(t)
sin(3t)u(t)
80
x(t)
A
t
2
A
Figure P1.7-1
(b) sin(2t)
(d) cos(100t)
(f ) cos(t + )
1.7-2 Repeat Prob. 1.7-1 for the -periodic signal x(t) shown in Fig. P1.7-2.
d
dt x(t
1).
x(t)
1
et/2
Figure P1.7-2
(c) 10 cos(3t + 40 )
Using these results, nd the exponential
1.6-3 Consider a system with transfer function
Fourier series for the periodic signals shown
H(s) = (s10)
in Fig. P1.7-3.
s+10 . Determine the system
Problems
81
xa (t)
1
4 2
4
0
8 6
1.7-10 A certain
periodic signal is given by
x(t) =
3
+
3 cos(2t) + sin(2t) + sin(3t)
1
cos
5t
+
2
3 .
xb (t)
1
et/3
Figure P1.7-3
1.7-4 Determine the complex Fourier series coecients Xk for the complex signal x(t) =
ej2t + ej3t . What is the fundamental period 1.7-11 Consider the 2-periodic signal x(t) deT0 and fundamental frequency 0 of x(t)?
ned as
t/A
0t<A
1.7-5 The exponential Fourier series of a certain
1
periodic function is given as x(t) = (2 +
At<
.
x(t) =
j2)ej3t + j2ejt + 3 j2ejt + (2 j2)ej3t .
0
t < 2
x(t + 2) t
(a) Sketch the exponential Fourier spectra.
For small A, x(t) looks like a square wave;
(b) By inspection of the spectra in
as A , x(t) resembles a type of sawpart (a), sketch the trigonometric
tooth wave.
Fourier spectra for x(t) .
(a) Determine the Fourier series Xk for
(c) Find the compact trigonometric
signal x(t). Sketch the corresponding
Fourier series from the spectra found
magnitude
and phase spectra.
in either part (a) or part (b).
(d) Determine the bandwidth of x(t).
1.7-6 Show that
=1
=
=
1
1
5 7 +
cos(1) 13 cos(3) + 15 cos(5)
sin(1) + 13 sin(3) + 15 sin(5) +
1
3
1.7-9 Show that if a periodic signal x(t) is an 1.8-2 Using the denition of Eq. (1.74), nd the
inverse Fourier transforms of the spectra in
even function of t, then all the sine terms
Fig. P1.8-2.
in its trigonometric Fourier series vanish,
82
3
2
xb (t)
xa (t)
X() =
1
Figure P1.8-1
Xa ()
2
0
Xb ()
xb (t)
xa (t)
1
1
1
+ jej 1).
1
j
2 (e
sin(t)
t
Figure P1.8-2
1.8-3 Using the denition of Eq. (1.74), show
that
Fourier transform of
inverse j10t
the
is
sinc(t)e
10
.
2
cos(t)
xd (t)
xc (t)
1
/2
eat
0
Figure P1.9-2
1.8-4 Using the spectra shown in Fig. P1.8-4,
nd the inverse Fourier transform of Xa ()
and Xb (). This problem illustrates how 1.9-3 The signals in Fig. P1.9-3 are modulated
just a dierence in phase spectra can prosignals with carrier cos(10t). Find the
duce entirely dierent time-domain signals.
Fourier transforms of these signals using
the appropriate properties of the Fourier
transform and Table 1.1. Sketch the magnitude and phase spectra.
Xa ()
|Xa ()|
Xb ()
|Xb ()|
xa (t)
(ta)2
2
xc (t)
1
1
Figure P1.9-3
dt = 1.
xb (t)
Figure P1.8-4
1
2
Problems
83
sinc2 (kx) dx = k1 .
1
2
(b) (t + T ) + (t T ) 2 cos(T )
(f ) xf (t) = et cos(10t)u(t)
(c) (t + T ) (t T ) 2j sin(T )
.
Use
the
2
2
1.10-3 Using the denition, determine the bilatfrequency-shifting property and Table 1.1
eral Laplace transforms, including ROCs,
to determine x(t) = F 1 {X()}.
of the following complex-valued functions:
1.9-8 Consider a signal
x(t)
with
Fourier
trans
(a) xa (t) = (j + ejt )u(t)
3
. Use the
form X() = +3
2
2
(b) xb (t) = j cosh(t)u(t)
frequency-shifting property and Table 1.1
at
u(t),
99%
90%
(b)
(d)
95%
75%
84
1
s2
es+3 (s+1)(s+2) .
Chapter 2
2.1
As discovered in the previous chapter, the impulse response h(t) of an LTIC system completely
characterizes its zero-state behavior. Applying the Laplace transform to the impulse response yields
the system transfer function H(s) = L {h(t)}. Clearly, the system transfer function shares a close
kinship with the unit impulse response, and together they form a unique transform pair. Knowing
one ensures the other is known as well.
From Eq. (1.47), we know that we can nd H(s) as the time-domain ratio of system output to
input as long as the input is an everlasting exponential est . Consequently, H(s) is fundamentally
linked to sinusoidal (exponential) steady-state (everlasting) analysis. Section 1.6 demonstrates that
the LTIC system response to an everlasting exponential input x(t) = est is also an everlasting
exponential, H(s)est . We represent this input-output pair using an arrow directed from the input
to the output as
(2.1)
est = H(s)est .
Setting s = j in this relationship yields
ejt = H(j)ejt
(2.2)
(2.3)
The results that follow, where we have let s = j, are valid for asymptotically stable systems where the region of
convergence of H(s) includes the -axis, although useful insights are possible for marginally stable systems as well.
A system is called real if real-valued inputs always generate real-valued outputs. Real systems have real-valued
impulse responses and, therefore, conjugate-symmetric frequency responses.
85
86
This equation also follows from a property of real linear systems that
then Re {x(t)} = Re {y(t)} .
In the present case, ejt = H(j)ejt , so cos(t) = Re ejt = Re H(j)ejt .
We can express H(j) in the polar form as
if x(t) = y(t),
(2.4)
(2.5)
Equation (2.5) shows that a sinusoid of radian frequency input to a real system yields a sinusoid of
the same frequency . The magnitude of the output sinusoid is |H(j)| times the input magnitude,
and the phase of the output sinusoid is shifted by H(j) with respect to the input phase. For
instance, if a certain system has |H(j10)| = 3 and H(j10) = /6, then the system amplies
a sinusoid of frequency = 10 by a factor of 3 and shifts its phase by /6 radians. The system
response to an input 4 cos(10t + /4) is 3 4 cos(10t + /4 /6) = 12 cos(10t + /12).
Clearly, |H(j)| is the system gain, and a plot of |H(j)| versus shows the system gain as
a function of frequency . This function is known as the magnitude response and is frequently
expressed in a decibel scale as 20 log10 |H(j)|. Similarly, H(j) is the phase response, and a plot
of H(j) versus shows how the system modies or changes the phase of an input sinusoid. These
two plots together, as functions of , are called the frequency response of the system. Observe that
H(j) has the information of both |H(j)| and H(j). For this reason, H(j) is also called the
frequency response of the system. Frequency response plots show at a glance how a system responds
to sinusoids of various frequencies. Thus, the frequency response of a system portrays the systems
ltering characteristics.
Needless to say, this discussion also applies to H(), the Fourier transform of a systems impulse
response h(t). If h(t) is absolutely integrable, then the ROC for H(s) contains the -axis, the system
is BIBO stable, and
H() = H(s)|s=j = H(j).
In other words, H(j) and the Fourier transform H() are equally suited to serve as the frequency
response of a system. When units of hertz are preferred, frequency response is expressed as H(f ) =
H()|=2f . In any case, modern computing technologies make it simple to generate accurate
magnitude and phase response plots.
The Better Orator?
Since h(t) and H(f ) form a unique transform pair, we know that either is fully qualied to speak
on behalf of a system. It is therefore natural to ask which, if either, is the better orator. To develop
insight into this question, we consider the familiar topic of human hearing.
If we model a persons hearing as an LTIC system, the corresponding impulse response and
frequency response functions both characterize how input sound is heard. One is a time-domain
characterization, and the other is a frequency-domain characterization. Which function, h(t) or
H(f ), provides the most intuitive understanding of the persons hearing?
Figure 2.1 illustrates two possible impulse responses ha (t) and hb (t) that describe the respective
hearing of two people named, for convenience, Abe and Beatrice. Each response plot is at the same
scale over approximately 2 ms. Although ha (t) and hb (t) completely characterize the hearing of Abe
and Beatrice, neither provides a particularly intuitive description. Still, some useful information is
87
ha (t)
hb (t)
(a)
(b)
Figure 2.1: Hearing impulse responses: (a) ha (t) and (b) hb (t).
present. Since ha (t) = hb (t), we know Abe and Beatrice will hear the same input dierently. Neither
possesses perfect hearing, which would require h(t) = (t). We might surmise that the person with
the most delta-like impulse response has the best hearing, but it is not obvious from Fig. 2.1 which
response is most like (t). Figure 2.1 simply does not make clear which person hears the best.
Using a logarithmic frequency scale, Fig. 2.2 displays the magnitude responses |Ha (f )| and
|Hb (f )| for Abe and Beatrice, respectively. Once again, we can quickly establish that Abe and
Beatrice hear dierently (since |Ha (f )| = |Hb (f )|), and neither possesses perfect hearing (since
neither |Ha (f )| nor |Hb (f )| equals 1). Many additional characteristics, however, are also easy to
establish. In the case of Abe, we see that his hearing range spans from 20 Hz to 20 kHz, although
he has signicant hearing loss between 200 Hz and 4 kHz. This loss is particularly important since
it overlaps the primary frequencies that constitute human speech. When you speak to Abe, hes not
going to hear you well. Beatrice, on the other hand, hears over a smaller range from about 100 Hz
to 10 kHz, but she does not suer from signicant hearing loss in the frequency range of human
speech. When you speak, Beatrice will hear you much better than Abe. Clearly in this case, the
frequency response description provides a more intuitive understanding of system behavior than the
impulse response description. Put another way, H(f ) is a better orator than h(t). This observation
holds true for most systems in general.
(a)
10000
20000
1000
2000
4000
100
200
400
20
40
10000
20000
1000
2000
4000
|Hb (f )|
100
200
400
20
40
|Ha (f )|
(b)
Figure 2.2: Hearing magnitude responses: (a) |Ha (f )| and (b) |Hb (f )|.
Determine and plot the frequency responses (magnitude and phase) for
(a)
(c)
88
Therefore, H(j) = ejT . The corresponding magnitude and phase responses are
|H(j)| = 1 and H(j) = T.
(2.6)
Plots of the magnitude and phase responses are shown in Fig. 2.3. The magnitude response is
constant (unity) for all frequencies, and the phase response increases linearly with frequency with a
slope of T (linear phase shift).
|H(j)|
H(j)
0
0
(a)
(b)
Figure 2.3: An ideal T -second delay: (a) magnitude response and (b) phase response.
An ideal time delay of T seconds is a distortionless system, which merely delays the input signal
by T seconds. The magnitude spectrum of the output of this device is identical to that of the input,
but the phase spectrum of the output has an additional term T . This added phase is a linear
function of with slope T (the negative of the delay). This result is consistent with the timeshifting property of Eq. (1.87), which shows that delaying a signal by T seconds leaves its magnitude
spectrum unaltered but changes its phase spectrum by T .
(b) An Ideal Dierentiator
As shown in Ex. 1.4, the transfer function of an ideal dierentiator is H(s) = s. Therefore,
H(j) = j = ej/2 . Consequently,
|H(j)| = || and H(j) =
sgn().
2
(2.7)
The magnitude and phase responses are shown in Fig. 2.4. The magnitude response increases
linearly with frequency, and the phase response is a constant /2 for all positive frequencies (/2 for
negative frequencies). This result can be explained physically by recognizingthat if a sinusoid cos(t)
is passed through an ideal dierentiator, the output is sin(t) = cos t + 2 . Therefore, the
output sinusoid amplitude is times the input amplitude; that is, the magnitude response (gain)
increases linearly with frequency . Moreover, the output sinusoid undergoes a constant phase shift
2 with respect to the input cos(t). Therefore, the phase response is a constant (/2) for 0.
H(j)
|H(j)|
0
0
(a)
(b)
Figure 2.4: An ideal dierentiator: (a) magnitude response and (b) phase response.
In an ideal dierentiator, the magnitude response (gain) is proportional to frequency (|H(j)| =
||) so that the higher-frequency components are enhanced (see Fig. 2.4). Practical signals are
contaminated with noise, which, by its nature, is a broad-band (rapidly varying) signal containing
89
components of very high frequencies. A dierentiator therefore amplies higher frequency components strongly, which can increase the noise disproportionately to the point of drowning out the
desired signal. This is the reason why ideal dierentiators are typically avoided in practice.
(c) An Ideal Integrator
As shown in Ex. 1.4, the transfer function of an ideal integrator is H(s) = 1/s.
1
1 j/2
= j
. Correspondingly,
H(j) = j
= e
|H(j)| =
1
||
Therefore,
(2.8)
The magnitude and phase responses are illustrated in Fig. 2.5. The magnitude response is inversely
proportional to frequency, and the phase shift is a constant /2 for all positive frequencies (/2
for negative frequencies). This result can be explained physically by recognizing
thatif a sinusoid
cos(t) is passed through an ideal integrator, the output is 1 sin(t) = 1 cos t 2 . Therefore,
the magnitude response is inversely proportional to , and the phase response is constant (/2)
for 0.
H(j)
|H(j)|
0
0
(a)
(b)
Figure 2.5: An ideal integrator: (a) magnitude response and (b) phase response.
Because its gain is 1/||, the ideal integrator suppresses higher-frequency components but enhances lower-frequency components with < 1. Consequently, noise signals (if they do not contain
an appreciable amount of very low-frequency components) are suppressed (smoothed out) by an
integrator.
Example 2.1
2.1.1
Pole-Zero Plots
Although frequency response plots provide an excellent snapshot of system behavior, the transfer
function itself provides additional insight into system behavior and character. Consider the somewhat restricted case where an LTIC system is described by the constant-coecient linear dierential
equation
aK
dK y
dK1 y
dy
dL x
dL1 x
dx
+ a0 y = bL L + bL1 L1 + + b1
+ b0 x.
+ aK1 K1 + + a1
K
dt
dt
dt
dt
dt
dt
As shown in Ex. 1.4 on page 31, the transfer function H(s) follows directly from the dierential
equation as
H(s) =
Although
bL sL + bL1 sL1 + + b1 s + b0
B(s)
=
=
A(s)
aK sK + aK1 sK1 + + a1 s + a0
bL
aK
L
l=1 (s
zl )
k=1 (s
pk )
K
(2.9)
restricted in the sense that not all LTIC systems are described by constant-coecient linear dierential
equations, this model still accommodates a very broad range of practical systems.
90
Here, zl (the system zeros) are the roots of the polynomial (bL sL + bL1 sL1 + + b1 s + b0 ), and
pk (the system poles) are the roots of the polynomial (aK sK + aK1 sK1 + + a1 s + a0 ).
As Eq. (2.9) makes clear, the frequency response H() = H(s)|s=j is suppressed at frequencies
near a system zero where (j zl ) is small. Conversely, the frequency response H() is amplied
at frequencies near a system pole where (j pk ) is small and 1/(j pk ) is large. A pole-zero
plot locates a systems poles and zeros in the complex s-plane using (traditionally) xs and os,
respectively. Such plots help establish the relative location, impact, and importance of each pole
and zero on overall system behavior. Further, as we shall learn later, pole-zero plots are quite useful
in guiding proper decisions for system implementation.
s2
2s
.
+ 2s + 5
Determine and plot the poles and zeros of H(s), and use the pole-zero information to predict
overall system behavior. Conrm this predicted behavior by computing and graphing the systems
frequency response (magnitude and phase). Lastly, nd and plot the system response y(t) for the
inputs
(a) xa (t) = cos(2t)
(b) xb (t) = 2 sin(4t /3)
By inspection, we note that there is a single nite zero at s = 0 (and a second zero at ). Although
the system poles can be determined using the quadratic formula, MATLAB determines the system
poles with less eort.
01
z = 0; p = roots([1 2 5])
p = -1+2i -1-2i
The pole-zero plot, shown in Fig. 2.6a, is readily constructed using MATLAB.
02
03
subplot(131); plot(real(z),imag(z),o,real(p),imag(p),x);
xlabel(Re(s)); ylabel(Im(s));
1
|H(j)| =
and H(j) = sgn() tan
.
(2.10)
2
5 2
(5 2 )2 + (2)2
MATLAB plots of the magnitude and phase responses are shown in Figs. 2.6b and 2.6c.
04
05
06
07
08
As expected, the frequency response conrms the behavior predicted from the pole-zero plot.
Specically, in Fig. 2.6b we see bandpass behavior with a peak gain near || = 2 (where the poles
are closest) and a gain of zero at = 0 and || (where the zeros are present). Taken together,
91
|H(j)|
Im{s}
0.97
0.59
0
(b)
Re{s}
1
1
H(j)
0.25
0.94
2
(c)
(a)
2s
s2 +2s+5 :
the magnitude and phase plots of Figs. 2.6b and 2.6c furnish complete information about the response of the system to sinusoidal inputs. The pole-zero plot is nearly as complete in its description
of system behavior, failing only to capture the overall gain of the system.
(a) Response to xa (t) = cos(2t)
In this case, the input frequency is = 2, and
4
4
0.2450.
1
Of course, it is also possible to attain these values directly from the magnitude and phase response
plots shown in Figs. 2.6a and 2.6b, respectively. This result means that for a sinusoidal input with
frequency = 2, the magnitude gain of the system is 0.9701, and the phase shift is 0.2450 radians.
In other words, the output magnitude is 0.9701 times the input magnitude, and the phase of the
output is shifted with respect to that of the input by 0.2450 radians. Using Eq. (2.5), the response
to xa (t) = cos(2t) is thus
ya (t) = 0.9701 cos(2t + 0.2450).
Figure 2.7a plots the response ya (t) along with the input xa (t) for reference. In this case, the output
is nearly identical to the input.
09
10
|H(j4)| =
0.5882 and H(j4) = tan1
2
185
8
11
0.9420.
92
yb (t)
xa (t)
ya (t)
xb (t)
1
2
(a)
(b)
Figure 2.7: H(s) sinusoidal responses: (a) xa (t) = ya (t) and (b) xb (t) = yb (t).
11
12
xb = 2*sin(4*t-pi/3); yb = abs(H(1j*4))*2*sin(4*t-pi/3+angle(H(1j*4)));
subplot(122); plot(t,yb,t,xb); xlabel(t); ylabel(y_b(t));
Example 2.2
s + 2j
.
s2 + (2 4j)s + (3 4j)
Determine and plot the poles and zeros of the system, and use the pole-zero information to predict overall
system behavior. Conrm this predicted behavior by computing and graphing the systems frequency
response (magnitude and phase). Lastly, determine the system output y(t) in response to the real input
x(t) = 10 sin(2t + /4).
2.2
As seen in Eq. (1.42), an LTIC systems output is related to its impulse response and input through
convolution as
y(t) = x(t) h(t).
Assuming that both x(t) and h(t) are Fourier transformable, the time-domain convolution property
yields
Y () = X()H().
(2.11)
93
Here, the cumbersome time-domain convolution operation is transformed into a simple frequencydomain multiplication. Figure 2.8 summarizes these equivalent relationships and emphasizes that,
except for unstable systems, H() serves every bit as well as h(t) to characterize system behavior.
y(t) = x(t) h(t)
Y () = X()H()
h(t)
x(t)
X()
H()
For input x(t) = et u(t), nd the zero-state response of the stable LTIC system with frequency
response
1
H() =
.
j + 2
In this case,
x(t)ejt dt =
X() =
et(j+1) dt =
1
.
j + 1
Therefore,
Y () = X()H() =
1
.
(j + 1)(j + 2)
1
1
.
j + 1 j + 2
1
),
j+2
94
(2.12)
2.2.1
Distortionless Transmission
(2.13)
and H() = tg .
(2.14)
Thus, distortionless transmission requires that the magnitude response |H()| is constant and that
the phase response H() is a linear function of with slope tg , where tg is the delay of the
output with respect to input. Figure 2.9 illustrates these characteristics for positive delay tg . Recall
from Ex. 2.1 that these are also the characteristics of an ideal delay of tg seconds with gain a.
For
simplicity, Eq. (2.14) assumes that a is real and positive. If this is not the case, minor adjustments of
|H()| = |a| H() = tg + a are required.
95
|H()|
H()
tg
1
1
tg
(a)
(b)
Figure 2.9: Distortionless transmission: (a) magnitude response and (b) phase response.
Measure of Delay Variation
For distortionless transmission, we require that the system possess linear phase characteristics. For
real systems, the phase is not only a linear function of but also passes through the origin (or
if a is negative) at = 0 . In practice, many systems have phase characteristics that are only
approximately linear. A convenient way of judging phase linearity is to plot the slope of H() as
a function of frequency. This slope, which is a constant for an ideal linear phase (ILP) system but
a function of in the general case, is expressed as
tg () =
d
H().
d
(2.15)
If tg () is constant, then all the components are delayed by the same amount. If the slope is not
constant, however, the time delay tg varies with frequency. This variation means that dierent
frequency components undergo dierent amounts of time delay, and consequently, the output waveform will not be a replica of the input waveform. Referred to as group delay or envelope delay, we
shall soon see that tg () plays an important role in bandpass systems.
It is often thought (erroneously) that a system with a at magnitude response (an allpass system)
is distortionless. However, as the next example demonstrates, a system with a at magnitude
response may signicantly distort a signal if the phase response is not linear (tg () not constant).
Example 2.4 (Flat Magnitude Response Does Not Imply a Distortionless System)
Hilbert transformers are LTIC systems that, among other things, are useful in the study of communication systems. Ideally, a Hilbert transformer is described by
h(t) =
1
H() = jsgn().
t
(2.16)
Compute and plot the magnitude response |H()|, the phase response H(), and the group delay
tg () of a Hilbert transformer. Compute and plot the output y(t) of this system in response to
the pulse input x(t) = (t), and comment on the results.
By inspection, we establish
96
As shown in Fig. 2.10, the behavior of a Hilbert transformer looks simple: the magnitude response
is unity across frequency, the phase response exhibits a single jump discontinuity at = 0 where
it transitions from /2 to /2, and the group delay is zero everywhere except at = 0. Such
boring frequency characteristics might lead us to underestimate the impact of this system on an
input signal. Our conditions for distortionless transmission, for example, are largely violated due to
a single point = 0.
H()
|H()|
tg ()
0
0
(a)
(c)
(b)
Figure 2.10: Hilbert transformer: (a) |H()|, (b) H(), and (c) tg ().
The output y(t) is computed using time-domain convolution,
y(t) =
t+1/2
h( )x(t ) d =
t1/2
t+1/2
1 |t + 1/2|
1
1
= ln
d = ln | |
.
( )
|t 1/2|
t1/2
Figure 2.11 illustrates the severe distortion that occurs when input x(t) = (t) is passed through
a Hilbert transformer. As this example demonstrates, a at magnitude response is by no means
a guarantee of distortionless transmission. Although x(t) and y(t) have radically dierent appearances, both are unity-energy signals with the same magnitude spectra.
x(t)
1
y(t)
1
0
97
distortion [2]. As a result, the manufacturers of audio equipment make available only |H()|, the
magnitude response characteristic of their systems.
For video signals, in contrast, the situation is exactly the opposite. A human eye is sensitive
to phase distortion but is relatively insensitive to amplitude distortion. Amplitude distortion in
television signals appears as a partial destruction of the relative half-tone values of the picture, which
is not readily apparent to the human eye. Phase distortion (nonlinear phase), on the other hand,
causes dierent time delays in dierent picture elements. The result is a smeared picture, which is
readily perceived by the human eye. Phase distortion is also very important in digital communication
systems because the nonlinear phase characteristic of a channel causes pulse dispersion (spreading),
which, in turn, causes pulses to interfere with neighboring pulses. This interference can cause errors
at the receiver: a logic one may read as a logic zero and vice versa.
2.2.2
The distortionless transmission conditions of Eq. (2.14) can be relaxed slightly for real bandpass
systems, which are commonly encountered in engineering. For real lowpass systems to be distortionless, the phase characteristics should be not only linear over the band of interest but should
also pass through the origin (or for a negative dc gain). For real bandpass systems, the phase
characteristics should also be linear over the band of interest, but it need not pass through the origin.
Consider an LTIC system with magnitude and phase characteristics as shown in Fig. 2.12, where
the magnitude spectrum is a constant |a| and the phase is 0 tg over a band 2B centered at
frequency c . The phase is linear but does not pass through the origin. Over the bands of interest,
we thus describe H() as
|a|ej(0 tg )
c B c + B
H() =
.
(2.17)
|a|ej(0 tg ) c B c + B
Most practical systems satisfy the conditions of Eq. (2.17), at least over a small band. Such systems
are said to have generalized linear phase (GLP) in contrast to the ideal linear phase (ILP) characteristics in Fig. 2.9. For distortionless transmission of bandpass signals, the system need satisfy
Eq. (2.17) only over the bandwidth of the bandpass signal (see Ex. 2.5).
98
H()
|H()|
c + B
c B
c B
c + B
c B
c + B
(a)
c + B
c B
|a|
(b)
Figure 2.12: Generalized linear phase characteristics: (a) |H()| and (b) H().
To understand how the system shown in Fig. 2.12 qualies as a distortionless system, consider
a modulated input signal xbp (t) = x(t) cos(c t). Now, xbp (t) is a bandpass signal whose spectrum
is centered at = c . The signal cos c t is the carrier, and the signal x(t), which is a real lowpass
signal of bandwidth B, is the time-domain envelope of xbp (t) (see Fig. 1.46). We shall now show
that the transmission of xbp (t) through H() results in distortionless transmission of the envelope
x(t) while the carrier phase changes by 0 relative to this envelope.
To simplify our discussion, we rst write xbp (t) as
xbp (t) = Re x(t)ejc t .
Since the system is real, the output is given by Eq. (2.4) as
ybp (t) = Re H x(t)ejc t .
To nd ybp (t), we only need to determine H x(t)ejc t . Using the frequency-shifting property of
Eq. (1.88), the Fourier transform yields
H x(t)ejc t H()X( c ).
Because X( c ) is zero for < 0, we express this result using Eq. (2.17) as
H()X( c ) = |a|ej(0 tg ) X( c ).
Using both the time-shifting and frequency-shifting properties of Eqs. (1.87) and (1.88), the inverse
Fourier transform yields
|a|ej0 X( c )ejtg |a|ej0 x(t tg )ejc (ttg ) .
Taking the real portion, the bandpass output ybp (t) is thus
ybp (t) = |a|x(t tg ) cos [c (t tg ) + 0 ] .
(2.18)
As Eq. (2.18) makes clear, the envelope and carrier are both delayed by tg , although the carrier
acquires an additional phase shift of 0 . The delay tg is termed the group (or envelope) delay and
The envelope of a bandpass signal is well dened only when the bandwidth of the envelope is well below the
carrier c (B c ).
A general bandpass signal with spectrum centered at = can be represented as x (t) = x(t) cos[ t + (t)],
c
c
bp
where x(t) is the envelope of the signal and (t) is a time-varying phase. When this signal is passed through the
system in Eq. (2.17), the system output is given by (see Prob. 2.2-4) ybp (t) = |a|x(t tg ) cos[c (t tg )+ 0 + (t tg )].
99
is the negative slope of H() at c . Observe that the output ybp (t) is basically the delayed input
xbp (t tg ), except that the the output carrier acquires an extra phase 0 .
In order to better understand the relaxed condition for distortionless transmission of bandpass
signals through a GLP system, remember that a bandpass signal is basically a modulated signal
with carrier frequency c , which is the center frequency of the band. The phase response of a GLP
system, as shown in Fig. 2.12b, is composed of a linear phase component tg and a constant phase
component 0 . When a bandpass signal is passed through this system, the constant phase component
causes the entire spectrum of the output signal to acquire a phase 0 . We know from Eq. (1.91)
that such a constant phase can also be acquired by using the same bandpass input with a carrier
having a constant phase 0 . Thus, the output of a GLP system for bandpass input x(t) cos(c t) is
identical to the output of an ideal linear phase (ILP) system for input x(t) cos(c t + 0 ). Since an
ILP system merely delays by tg , the output (within a gain constant) is x(t tg ) cos[c (t tg ) + 0 ].
Clearly, a GLP system simply delays x(t) without distortion.
Consider the real bandpass input xbp (t) = x(t) cos(c t) transmitted through the bandpass system
of Ex. 2.2, H(s) = 2s/(s2 + 2s + 5). Determine a suitable c that helps maximize the bandwidth
of GLP behavior and distortionless transmission. Compute the corresponding group delay tg and
carrier phase oset 0 .
To achieve GLP behavior, we require a at magnitude response and linear phase response. As
seen from Fig. 2.13, the magnitude response is most at over the widest range of frequencies near its
2
peak. From Eq. (2.10)
we see that this magnitude peak occurs when the denominator term (5 )
is zero, or at = 5 (the phase is relatively linear in this region as well). Thus,
c = 5.
The slope of the phase response is
2
d
d
1
H() =
tan
=
d
d
5 2
1+
1
2
5 2
2
!
2(5 2 ) + 4 2
4 2 + 2(5 2 )
.
=
(5 2 )2
4 2 + (5 2 )2
d
Setting = c = 5, we see that H( 5) = 0 and d
H( 5) = 1. A straight-line approximation
to the phase response is thus
H() 5 = 0 tg .
Correspondingly,
tg = 1
and 0 =
|H()|
5.
H()
(a)
(b)
2s
s2 +2s+5 :
100
2.3
A lter is a device or rule that allows selective output. A coee lter, for example, is a mechanical
lter that blocks large particulate matter (the coee grounds). In a signal processing context, a lter selectively passes or blocks the frequency (complex exponential) components of an input signal.
Ideal lters allow distortionless transmission over a certain band (or bands) of frequencies, the passband (or passbands), and suppress the remaining band (or bands) of frequencies, the stopband (or
stopbands). Since lters are frequency-selective devices, lter behavior is conveniently summarized
using magnitude and phase response plots.
Figure 2.14a, for example, shows the magnitude response of an ideal real continuous-time lowpass
lter. Frequencies below || = 1 rad/s are passed, while those above || = 1 are suppressed.
Here, 1 identies the lters cuto (or corner) frequency. Figure 2.14 also displays the magnitude
responses of three other common real lters: the bandpass lter, the highpass lter, and the bandstop
lter. Each lter has unit gain in its passband(s) and zero gain in its stopband(s). By combining
the four basic lter types, various multi-band lters are also possible.
|Hbp ()|
|Hlp ()|
1
(a)
(c)
|Hbs ()|
1
(b)
|Hhp ()|
(d)
Figure 2.14: Filter magnitude responses: (a) lowpass, (b) bandpass, (c) highpass, and (d) bandstop.
As we shall see later in this chapter, it is a simple matter to transform a lowpass lter to any
of the other three basic types. Thus, for the time being, we shall concentrate solely on lowpass
lters. Most of our subsequent discussions and observations about lowpass lters apply to highpass,
bandpass, and bandstop lters as well.
Using Fig. 2.14a, identify the magnitude response features that correspond to a lter that is (a) ideal, (b)
real, (c) continuous-time, and (d) lowpass.
101
h(t)
6
B
(a)
3
B
0
3
B
6
B
(b)
Figure 2.15: Ideal lowpass lter with zero output delay: (a) H() and (b) h(t).
Recall that h(t) is the system response to an impulse input (t), which is applied at t = 0.
Figure 2.15b shows a curious fact: the response h(t) begins even before the input is applied. Clearly,
the system is noncausal because it anticipates the input. It is impossible to build such a prophetic
system in practice. So this lter is physically unrealizable. Similarly, one can show that other
ideal lters (highpass, bandpass, and bandstop lters depicted in Fig. 2.14) are also noncausal and
therefore physically unrealizable.
For a physically realizable system, the system must be causal; that is, h(t) must be causal
(h(t) = 0 for t < 0). In the frequency domain, this condition is equivalent to the well-known PaleyWiener criterion, which states that a necessary and sucient condition for the magnitude response
|H()| to be realizable is
| ln |H()| |
d < .
(2.19)
1 + 2
If H() does not satisfy this condition, it is unrealizable. Note that if |H()| = 0 over any nite
band, | ln |H()| | = over that band, and the condition of Eq. (2.19) is violated. If, however,
H() = 0 at a single frequency (or a set of discrete frequencies), the integral in Eq. (2.19) may still
be nite even though the integrand is innite. Therefore, for a physically realizable system, H()
may be zero at some discrete frequencies, but it cannot be zero over any nite band. According
to this criterion, ideal lter characteristics (Fig. 2.14) are clearly unrealizable. The holy grail of
lowpass lters is beyond our grasp.
One method to make the lter causal (and therefore realizable) is to simply multiply h(t) by u(t)
(Fig. 2.16a). Cut down the middle, however, a cup cannot hold water, and as shown in Fig. 2.16b,
our causal lters magnitude response only poorly approximates the desired ideal (shaded). To
further understand this poor performance, notice that "
h(t) = h(t)u(t) only has half the energy of
Bt
"
.
Consequently,
the
frequency
response
H()
has only half the energy of the
sinc
h(t) = B
Figure 2.15a is just Fig. 2.14a with = B and zero phase. In the case of a lowpass lter, the cuto frequency is
1
equal to the bandwidth of the lter.
|H()| is assumed to be square-integrable, that is,
|H()|2 d
is nite. Note that the Paley-Wiener criterion is a test for the realizability of the magnitude response |H()|. If
|H()| satises the Paley-Wiener criterion, it does not follow that h(t) is causal. All it says is that a suitable phase
function can be assigned to |H()| so that the resulting function has a causal h(t).
102
"
desired response H(). It is of little surprise that H()
cannot attain the lofty ideals of H().
While causality is a necessary condition for our lter to be realizable, it is not sucient to ensure
good lter behavior.
|H()|
h(t)
B
0
3
B
6
B
(a)
(b)
B
sinc
Bt
"
u(t) and (b) |H()|.
jt
d
. Although the phase response is now linear
e
The corresponding frequency response is 2B
(with slope td ), the magnitude response remains as shown in Fig. 2.14a.
The utility of allowing a delay td in our output becomes apparent when we force, as realizable
lters require, the response to be causal,
!
B(t td )
B
"
h(t) = h(t td )u(t) = sinc
u(t).
As the delay td increases, ever-increasing amounts of the original h(t) are likewise preserved, which
provides an ever-increasing improvement in the lters behavior. Figure 2.17 illustrates the idea for
various choices of td .
Theoretically, a delay td = is needed to realize ideal characteristics. As shown in Fig. 2.17a,
103
a ()|
|H
ha (t)
(a)
0
2B
13
2B
7
2B
hb (t)
b ()|
|H
(b)
0
t
2
B
8
B
5
B
c ()|
|H
hc (t)
(c)
0
t
6
B
9
B
2B ,
(b) td =
B
2
B ,
and (c) td =
6
B .
(realizable) lter characteristics are gradual, without jump discontinuities in the magnitude response.
In Sec. 2.7, we shall study families of causal lters, such as Butterworth and Chebyshev lters, that
approach ideal characteristics and are also readily realized with physical circuits.
Determine a suitable output delay td for a practical audio lter designed to pass frequencies audible
to humans.
A basic audio lter is lowpass in nature and rejects frequencies out of the audible band (20 kHz).
yields
Thus, B = 40000 rad/s. Taking td to be four times B
td =
1
4
sec =
sec = 0.1 ms.
40000
10000
This delay is quite small compared with phoneme lengths, which are typically in the tens to hundreds
of milliseconds.
Example 2.6
104
Assuming that is real and positive, show that a lter with Gaussian transfer function H() = e
is unrealizable. Demonstrate this fact in two ways by showing (a) that its impulse response is noncausal
and (b) that |H()| violates the Paley-Wiener criterion.
2.4
We often need to truncate data in diverse situations from numerical computations to lter design.
For example, if we need to compute numerically the Fourier transform of some signal, say, et u(t),
on a computer, we will have to truncate the signal et u(t) for t > T (T is typically four to ve
time constants and above). The reason is that in numerical computations we can deal with data
of nite duration only. Similarly, the impulse response h(t) of an ideal lowpass lter is noncausal
and has innite duration. For a practical design, we may want to truncate h(t) to make h(t) causal
with nite duration. To eliminate aliasing during signal sampling, we need to truncate, using an
anti-aliasing lter, the signal spectrum beyond the half sampling frequency s /2 (see Sec. 3.3). Or
we may want to synthesize a periodic signal by adding the rst n harmonics and truncating all the
higher harmonics. These examples show that data truncation can occur in the time domain as well
as the frequency domain. On the surface, truncation appears to be a simple problem of cutting
o the data at a point where it is deemed to be suciently small. Unfortunately, this is not the
case. Simple truncation in the time domain can cause some unsuspected problems in the frequency
domain and vice versa.
Data truncation produces either a nite-duration result, such as when a signal is multiplied by
a rectangular window (t/ ), or a semi-innite-duration result, such as when a signal is multiplied
by the unit step u(t). The former case is generally categorized as a window operation, and we often
speak of such operations as data windowing. Although the remainder of this section concentrates
on window operations where the results of truncation are nite in duration, our observations and
conclusions also apply to cases where the truncation results are semi-innite in duration, such as
those shown in Fig. 2.17.
2.4.1
Let us start with time-domain windowing. Similar conclusions hold for frequency-domain windowing.
A time-domain window operation may be regarded as multiplying a signal x(t) of large (possibly
innite) width by a window function w(t)
smaller (nite) width. Simple truncation amounts to
of
using a rectangular window wrec (t) = Tt (Fig. 2.18a) in which we assign unit weight to all the
data within the window width (|t| < T2 ) and assign zero weight to all the data lying outside the
window (|t| > T2 ). It is also possible to use a window in which the weight
to the data within
assigned
the window may not be constant. In a triangular window wtri (t) = Tt , for example, the weight
assigned to the data decreases linearly over the window width (Fig. 2.18b).
Consider a signal x(t) and a window function w(t). The windowed signal xw (t) is
xw (t) = x(t)w(t).
(2.20)
W (),
the Fourier transform of the window function w(t), is called the Dirichlet kernel of the window.
105
to spread out by Bw , the bandwidth of the window function w(t). Clearly, windowing a signal
causes distortion in the form of its spectrum spreading out (or smearing) by Bw . Recall that signal
bandwidth is inversely proportional to signal duration (width). Hence, wider windows possess smaller
bandwidths Bw and produce less spectral spreading. This result is expected because a wider window
allows more data (closer approximation), which produces smaller distortion (less spectral spreading).
A narrow window width accommodates less data (poorer approximation), which produces more
distortion (greater spectral spreading).
Spectral spreading by Bw would be the only impairment caused by truncation if w(t) were truly
bandlimited to Bw . Unfortunately, w(t), being timelimited, cannot be strictly bandlimited. Its
spectrum approaches zero asymptotically at a rate depending on the smoothness of the window.
Smoother (more rounded) windows provide faster decay rates. The rectangular window, because of
its jump discontinuities, has poor behavior, with its spectrum decaying slowly at a rate proportional
to 1/. Because of Eq. (2.21), the behavior of a window spectrum is directly mirrored in the behavior
of Xw (). Thus, if X() is bandlimited to Bx , the truncated signal spectrum will spread out at the
edges by Bw . Beyond this band of Bx + Bw , the spectrum does not vanish but lingers on, decaying
asymptotically at the same rate as that of the window spectrum. While the eective bandwidth
of a window produces an eect of spectral spreading, the tails of a window spectrum produce the
eect of spectral leakage. Spectral leakage decays asymptotically in the stopband and can produce
undesired ripples in the passband. We have, therefore, two impairments from window operations:
spectral smearing and spectral leakage. These twin eects will soon be claried by an example of a
lowpass lter design.
Rectangular and Triangular Windows
Before investigating an example that highlights the impairments of windowing, let us examine the
behavior of two windows: the rectangular window wrec (t) and the triangular (or Bartlett) window
wtri (t). As shown in Fig. 2.18a, the width (duration) of either of the windows is T seconds. The
spectra of these windows, shown in Fig. 2.18b, are each dominated by a single main lobe (shaded).
Figure 2.18c shows the normalized spectra of these windows using a decibel (dB) scale. The logarithmic plots of Fig. 2.18c visually exaggerate small amplitudes because a gain approaching zero
approaches on a logarithmic (dB) scale. Such an exaggeration helps to emphasize the behavior
of the side lobes (unshaded), whose amplitudes are generally small.
The main spectral lobe (shaded), which provides an approximation of a windows eective bandwidth, causes spectral smearing. The main lobe of wrec (t) is 4/T rad/s (2/T Hz) wide, and the
main lobe of wtri (t) is twice as wide (8/T rad/s or 4/T Hz). Windows with narrow main lobes
are preferred to reduce the eects of spectral spreading. Ideally, a window should have a main
lobe with zero width (and no side lobes). Only the impulse spectrum satises this ideal condition,
whose inverse transform is a rectangular window of innite width. This is a trivial result because
an innite-width window leads to no distortion. Unfortunately, innite width is precisely what we
want to avoid. In other words, practical windows always have a main lobe of nonzero width (as well
as side lobes).
A windows side lobes (unshaded) cause spectral leakage. To minimize leakage, side lobes with
small amplitudes (compared with the main lobe) and fast decay rates are desired. For convenience,
we show the reference level of the main lobe peak at 0 dB (unity gain). For the rectangular window,
the peak side lobe level is 13.3 dB, and that for the triangular window is 26.5 dB. The asymptotic
decay of Wrec () is slower (proportional to 1/) than that of Wtri () (proportional to 1/ 2 ). This
is expected because the latter is a smoother function with no discontinuities. In contrast, the former
has jump discontinuities requiring larger amounts of high-frequency components for its synthesis
(spectrum decays more slowly). The rectangular windows rate of spectral decay is 20 dB/decade
This follows from the property that a signal cannot be simultaneously timelimited and bandlimited. If it is
timelimited, it is not bandlimited, and if it is bandlimited, it cannot be timelimited. It can, however, be simultaneously
non-bandlimited and non-timelimited [1].
106
wrec (t)
wtri (t)
(a)
T2
T
2
T2
|Wrec ()|
(b)
rollo
T
2
|Wtri ()|
rollo
6
T
2
T
2
T
6
T
20 log10 T1 Wrec ()
8
T
4
T
8
T
20 log10 T42 Wtri ()
20 dB/dec rollo
13.3
4
T
1
2
40 dB/dec rollo
(c)
26.5
2
T
4
T
6
T
8
T
2
T
4
T
6
T
8
T
Figure 2.18: Rectangular and triangular windows: (a) functions, (b) spectra, and (c) normalized
spectra in dB.
(6 dB/octave), and that for the triangular window is 40 dB/decade (12 dB/octave).
From the viewpoint of the spectral leakage, a triangular window is superior (small side lobes
with fast decay) to a rectangular window. However, the tradeo is that the main lobe width of a
triangular window is twice that of the corresponding rectangular window. From the perspective of
spectral spreading, a rectangular window is preferable to a triangular window. As we shall later
see, such quandaries in window choice are typical: windows with desirable main lobe characteristics
tend to suer undesirable side lobe characteristics and vice versa. We must try to nd the best
compromise to suit our particular needs.
2.4.2
Let us next use window functions to assist us in the construction of a realizable lter. Consider
(see
an ideal lowpass lter of bandwidth B rad/s, which has transfer function H() = 2B
Recall that decay as 1/ reduces the amplitude by a ratio of 1/10 over one decade of frequency. The ratio 1/10
corresponds to 20 dB. Similarly, decay at 1/ 2 reduces the amplitude by a ratio 1/100 over a decade of frequency.
Thus, the amplitude decays at 40 dB/decade.
107
Bt
Fig. 2.15a). As shown in Fig. 2.15b, its impulse response h(t) = B
is noncausal with
sinc
innite duration. To realize a practical design, we truncate h(t) with a width-T window so that
the impulse response has nite duration. Such a truncation, due to smearing and leakage eects,
distorts the realized response from our desired ideal. We shall use a rectangular window wrec (t) and
a triangular window wtri (t) to truncate h(t) and then examine the resulting lters. The truncated
impulse responses are given as
hrec (t) = h(t)wrec (t)
H()Wrec ( ) d
Hrec () = H() Wrec () =
H()Wtri ( ) d.
and Htri () = H() Wtri () =
(2.22)
(2.23)
Since wrec (t) = Tt and wtri (t) = Tt , we know Wrec () = T sinc T2 and Wtri () =
2 T
T
2 sinc
4 .
Figure 2.19 illustrates the idea using T = 7
B . The truncations of Eq. (2.22) are shown in
Fig. 2.19a, and the results of the convolutions of Eq. (2.23) are shown in Fig. 2.19b. Both lter
responses are approximations of the ideal lowpass lter (shaded). The lower portion of Fig. 2.19b
displays the window spectra from Eq. (2.23) aligned at the transition frequency = B; these curves
emphasize the relation between the width of the windows main lobe and the resulting spectral
spread in the lters frequency response. Figure 2.19c presents the lter magnitude responses using
a decibel scale.
From the plots in Fig. 2.19, we make the following observations:
1. Windowed (practical) lters show spectral spreading at the edges. Instead of a sudden transition, practical lters exhibit a gradual transition from passband to stopband. As a rough
but intuitive estimate, the width of this transition band is equal to half the width of the main
lobe of the window (see [3] for more accurate estimates). From a somewhat simplied perspective, the factor half occurs because the spectral spread (main lobe width) is divided over two
transition frequencies ( = B). Using a rectangular window, each transition band is 2/T
rad/s (1/T Hz), for a total spectral spread equal to the window spectrums main lobe width
(4/T rad/s). Using a triangular window, each transition band is 4/T rad/s (2/T Hz), which
is twice that of the rectangular window case. Since we prefer spectral spreading (main lobe
width) to be as small as possible, rectangular windows provide superior behavior to triangular
windows in terms of the spectral spread at band edges.
2. Although H() is bandlimited with a distinct passband and stopband, the windowed lters
are not bandlimited. The gain of Hrec () in the stopband is not zero but goes to zero asymptotically as 1/ (20 dB/dec). Similarly, the stopband gain of Htri () decreases as 1/ 2 (40
dB/dec). This stopband rollo, as well as portions of the passband ripple, is a consequence
of spectral leakage. Stopband oscillations (leakage) have higher amplitudes for the rectangular case than for the triangular case. Thus, the stopband behavior for the triangular case is
superior to the rectangular case.
Plots of 20 log10 |Hrec ()| and 20 log10 |Htri ()|, as depicted in Fig. 2.19c, show stopband ripple
(side lobe) behavior that is consistent with the side lobes shown in Fig. 2.18c. That is, a
window spectrums rollo rates and peak side lobe levels directly impact a windowed lters
spectral characteristics. For example, a large peak side lobe, such as the 13.3-dB peak of
To be truly realizable, we also need to delay the truncated function by T in order to render it causal. However,
2
this time delay only adds a linear phase component to the spectrum without changing the magnitude spectrum. For
this reason, we shall ignore the delay in order to simplify our discussion.
108
hrec (t)
htri (t)
(a)
T2
T
2
T2
Hrec ()
T
2
Htri ()
(b)
Wrec (B )
Wtri (B )
(c)
20
20
40
40
B
2B
3B
2B
Figure 2.19: Lowpass lter design using rectangular and triangular windows (T =
impulse responses, (b) frequency responses, and (c) magnitude responses in dB.
3B
7
B ):
(a) truncated
109
spectral components diering in frequency by less than about 1/T Hz, then the two spectral components smear together and become indistinguishable. Similarly, triangular windowing causes signal
components separated by less than about 2/T Hz to become indistinguishable. Thus, windowing
x(t) results in a loss of spectral resolution, an aspect critical in spectral analysis applications. Furthermore, so far we have discussed time-domain truncation and its eect on a signals spectrum.
Because of time-frequency duality, spectral (frequency-domain) truncation has a similar eect on
the time-domain signal shape.
2.4.3
For better results, we must try to minimize truncations twin side eects of spectral spreading (main
lobe width) and leakage (side lobe levels and rollo). Let us consider each of these ills.
1. The spectral spread (main lobe width) of a truncated signal is equal to the bandwidth of
the window function w(t). We know that signal bandwidth is inversely proportional to signal
width (duration). Hence, to reduce the spectral spread (main lobe width), we need to increase
the window width.
2. To improve leakage behavior, we must search for the cause of slow side lobe decay. It can be
shown (see [1]) that the Fourier spectrum decays as 1/ for a signal with a jump discontinuity
(such as a rectangular window), decays as 1/ 2 for a continuous signal whose rst derivative
is discontinuous (such as a triangular window), decays as 1/ 3 for a continuous signal with
continuous rst derivative but with discontinuous second derivative, and so on. The smoothness
of a signal is measured by the number of continuous derivatives it possesses. The smoother the
signal, the faster is the decay of its spectrum. Thus, we can achieve a given leakage behavior
by selecting a suitably smooth window.
For a given window width, the remedies for the two eects conict. If we try to improve one, the
other deteriorates. For instance, among all the windows of a given width, the rectangular window
has the smallest spectral spread (main lobe width) but has high level side lobes that decay slowly.
A tapered (smooth) window of the same width has smaller and faster decaying side lobes but has
a wider main lobe, which increases the spectral spread [1]. We can, however, compensate for the
increased spectral spread (main lobe width) by widening the window. Thus, we can remedy both
the side eects of truncation by selecting a suitably smooth window of wider width.
2.4.4
As Fig. 2.18 demonstrates, the tapered triangular window provides better leakage performance than
the rectangular window, although at a cost of increased spectral spread. This increased spectral
spread, however, can be reduced by increasing the duration of the window. As a result, tapered
window functions are often preferred to rectangular (non tapered) windows. There are, however,
countless ways to taper data, and dierent tapers produce dierent results.
In addition to the triangular window, there are many commonly used and well-known tapered
window functions such as the Hann (von Hann), Hamming, Blackman, and Kaiser windows. Table 2.1 summarizes the most common windows and their characteristics [3,4]. Notice that the Kaiser
window is expressed in terms of I0 (), a 0th-order modied Bessel function of the rst kind with
(real) argument . Upcoming Ex. 2.7 investigates the Kaiser window in more detail.
Excluding the rectangular window, each of the windows in Table 2.1 truncates data gradually,
although they oer dierent tradeos with respect to spectral spread (main lobe width), peak side
lobe amplitude, and side lobe rollo rate. Figure 2.20, for example, illustrates the popular Hann and
Hamming windows; both of these windows possess the gradual taper that is necessary to achieve
desirable leakage characteristics.
Further, all the window functions in Table 2.1 are symmetrical about the origin and are thus
even functions of t. Due to this even symmetry, W () is a real function of , and W () is either
110
1.
2.
3.
4.
5.
6.
Window w(t)
Main
Lobe
Width
Rollo
Rate
[dB/dec]
Peak Side
Lobe Level
[dB]
Rectangular:
Tt
4
T
20
13.3
Triangular
(Bartlett):
Tt
8
T
40
26.5
Hann:
2t t
1
T
2 1 + cos T
8
T
60
31.5
Hamming:
t
0.54 + 0.46 cos 2t
T
T
8
T
20
42.7
Blackman:
t
0.42 + 0.5 cos 2t
+ 0.08 cos 4t
T
T
T
12
T
60
58.1
varies
with
20
varies
with
Kaiser:
I0 14( Tt
)2
I0 ()
t
T
wham (t)
whan (t)
1
T2
0
(a)
T
2
T2
0
(b)
T
2
Figure 2.20: Two popular window functions: (a) Hann and (b) Hamming.
0 or . Hence, the phase of the truncated signal has a minimal amount of distortion. If a window
is shifted, as is sometimes necessary, an additional linear phase component is present that, like the
case of distortionless transmission, is relatively unimportant. Although we specify the independent
variable as t, we can easily change t to to accommodate applications that require windowing in
the frequency domain.
Window choice depends on the particular application at hand. The rectangular window has the
narrowest main lobe. The triangular (Bartlett) window (also called the Fejer or Cesaro) is inferior
in nearly all respects to the Hann window. For this reason, it is rarely used in practice except for
situations where the computational simplicity of the triangular window is required. A Hann window
is preferred over a Hamming window in spectral analysis because it has faster side lobe decay. For
ltering applications, on the other hand, the Hamming window is the better choice because it has
the smallest side lobe amplitude for a given main lobe width. The Hamming window is the most
widely used general purpose window. The Kaiser window is more versatile and adjustable. The
parameter controls the main lobe and side lobe tradeo, and its proper selection allows a designer
to tailor the window to suit a particular application.
111
Compute and plot the Kaiser window for (a) = 0, (b) = 5.4414, and (c) = 8.885. Compare
these cases with the rectangular, Hamming, and Blackman windows, respectively. What is the
general eect of increasing the parameter ?
Using the expressions given in Table 2.1, the required window functions are created in MATLAB
along with a suitably wide time vector (normalized by T ).
01
02
03
04
05
tbyT
wrec
wham
wbla
wkai
=
=
=
=
=
linspace(-.75,.75,2000);
@(tbyT) 1.0*(abs(tbyT)<=0.5);
@(tbyT) (0.54+0.46*cos(2*pi*tbyT)).*wrec(tbyT);
@(tbyT) (0.42+0.5*cos(2*pi*tbyT)+0.08*cos(4*pi*tbyT)).*wrec(tbyT);
@(tbyT,alpha) besseli(0,alpha*sqrt(1-4*tbyT.^2))/besseli(0,alpha).*wrec(tbyT);
Plots of the Kaiser windows, their respective comparison windows, and the absolute dierences
between each pair follow directly.
06
07
08
09
10
11
12
13
14
subplot(331);
subplot(332);
subplot(333);
subplot(334);
subplot(335);
subplot(336);
subplot(337);
subplot(338);
subplot(339);
plot(tbyT,wkai(tbyT,0));
plot(tbyT,wrec(tbyT));
plot(tbyT,abs(wkai(tbyT,0)-wrec(tbyT)));
plot(tbyT,wkai(tbyT,5.4414));
plot(tbyT,wham(tbyT));
plot(tbyT,abs(wkai(tbyT,5.4414)-wham(tbyT)));
plot(tbyT,wkai(tbyT,8.885));
plot(tbyT,wbla(tbyT));
plot(tbyT,abs(wkai(tbyT,8.885)-wbla(tbyT)));
The resulting plots, following axis labeling and scaling, are shown in Fig. 2.21.
wa (t)
wrec (t)
1
10
(a)
T2
T
2
T2
wb (t)
T
2
T2
T
2
wham (t)
1
10
(b)
T2
T
2
T2
wc (t)
T
2
T2
T
2
wbla (t)
1
10
(c)
T2
T
2
T2
T
2
T2
T
2
Figure 2.21: Kaiser windows and comparisons: (a) = 0 vs. rectangular, (b) = 5.4414 vs.
Hamming, and (c) = 8.885 vs. Blackman.
As Fig 2.21a makes clear, a Kaiser window with = 0 is identical to the rectangular window.
112
Further, a Kaiser window with = 5.4414 closely approximates the Hamming window (Fig. 2.21b),
and a Kaiser window with = 8.885 is nearly identical to the Blackman window (Fig. 2.21c).
Figure 2.21 also emphasizes the versatility that parameter aords to the Kaiser window. Increasing has two primary eects. First, it tends to make the window smoother. Second, it tends
to reduce the eective width of the window. In terms of the Kaiser windows spectrum, this means
that, as increases, the side lobe levels decrease and the main lobe width increases.
Example 2.7
Compute and plot the Kaiser window for equal to 0, 1, 2, 3, 5, 10, and 20. Using a 95% energy criterion,
determine the eective window width W for each case of .
2.5
Section 2.3 introduces ideal lter characteristics and explains why such lters cannot be realized
in practice. In this section, we introduce the specication of practical lters. As will be seen in
Sec. 2.7, such specications provide a foundation for the design of all common analog lters.
For ideal lters everything is black and white; the gains are either zero or unity over certain
bands. As we saw earlier, real life does not permit such a world view. Things have to be gray or
shades of gray. In practice, we can only hope to realize lters that approach ideal characteristics.
An ideal lter instantaneously jumps from passband (unity gain) to stopband (zero gain). There
is no transition band between the two. Practical lters, on the other hand, transition from passband
to stopband (or vice versa) gradually over a nite transition band of frequencies. Moreover, for
realizable lters, the gain cannot be zero over a nite band (Paley-Wiener condition). As a result,
practical lters have no true stopband. We therefore dene a stopband as a frequency band over
which the gain is below some small number s (the stopband ripple parameter), as illustrated in
Fig. 2.22 for the four basic (real) lter types. Similarly, we dene a passband as a frequency band
over which the gain is between 1 p and 1, also shown in Fig. 2.22.
Practical lters require specication of passband edges (p ), passband ripple (p ), stopband edges
(s ), and stopband ripple (s ). As shown in Fig. 2.22 by the shaded regions, these specications
dene the out-of-bounds zones for a particular design. If a candidate lters magnitude response
enters an out-of-bounds area, however briey, then the lter fails to meet specications, and a
better lter is required. Each of the four lters shown in Fig. 2.22 touches, but does not cross, the
out-of-bounds regions and therefore meets (just barely) the given specications.
Ripple requirements are sometimes expressed as minimum passband gain (1 p ) and maximum
stopband gain (s ). Some design methods, such as those of Ch. 8, oset the passband gain boundaries
to 1 12 p and 1 + 12 p ; when dening the passband, just about any oset is acceptable. For the
bandpass and bandstop lters shown in Fig. 2.22, the lower transition bands (bounded by s1 and
p1 ) are shown narrower than the upper transition bands (bounded by s2 and p2 ). This behavior,
while not required, is typical for common CT lter families.
Frequently, it is more convenient to work with lter attenuation rather than lter gain. Filter
attenuation, expressed in dB, is the
of lter gain, also expressed in dB. The half-power
negative
gain of 12 , for example, is 20 log10 12 3.01 dB, which corresponds to 3.01 dB of attenuation.
Figure 2.23 represents Fig. 2.22 in terms of attenuation rather than gain. The maximum passband
attenuation (p ) and the minimum stopband attenuation (s ) are expressed in terms of the minimum
While
Fig. 2.22 considers real lters, complex lters are treated in an analogous manner.
113
|Hlp ()|
|Hbp ()|
1 p
1 p
s1
p 1
p 2
(a)
p 2
(b)
|Hbs ()|
|Hhp ()|
1
1 p
1 p
s2
p 1
s1
(c)
s2
(d)
Figure 2.22: Practical lter specications: (a) lowpass, (b) bandpass, (c) highpass, and (d) bandstop
lters.
passband gain and maximum stopband gain as
p = 20 log10 (1 p )
2.6
and s = 20 log10 (s ) .
(2.24)
The four basic lter types shown in Fig. 2.14 share remarkably similar characteristics: each is comprised of passband and stopband regions. Not surprisingly, it is relatively simple to transform from
one type to another. The utility of such transformations is clear: they simplify the design process
114
s1
p 1
p 2
(a)
(c)
p 2
(b)
s2
p 1
s1
s2
(d)
Figure 2.23: Practical lter specications using attenuation: (a) lowpass, (b) bandpass, (c) highpass,
and (d) bandstop lters.
by separating lter type (lowpass, highpass, bandpass, or bandstop) from lter family (Butterworth,
Chebyshev, inverse Chebyshev, etc.). Consequently, we concentrate our design eorts on a prototype
lter (usually lowpass) and then transform it to the nal desired lter type.
In this section, we present four common analog lter transformations. Commonly referred to as
frequency transformations, each begins with a lowpass response to produce, respectively, a lowpass,
highpass, bandpass, or bandstop response. The latter three transforms ensure that a good lowpass
lter design (prototype lter) automatically provides good highpass, bandpass, and bandstop lter
designs. The lowpass-to-lowpass transform encourages the use of a normalized lowpass prototype
lter, where a critical frequency parameter, such as p or s , is set to unity. Each transformation
involves a simple substitution for s or in the prototypes system function Hp (s) or frequency
115
response Hp (). Design examples that utilize frequency transformations are presented in this section
and later in Sec. 2.7.
2.6.1
Lowpass-to-Lowpass Transformation
The lowpass-to-lowpass transformation is the most direct and simple and is given by
s
0
s
1
or
0
.
1
(2.25)
0
Equation (2.25) scales (see Sec. 1.2.2) the original response by a factor
1 . Consequently, the
lowpass-to-lowpass transformation is sometimes simply referred to as frequency scaling. By scaling
frequencies, Eq. (2.25) maps the prototypes response at 0 to a new frequency 1 . Thus, a new
lowpass response with critical frequency 1 is obtained from a prototype lowpass response with
critical frequency 0 according to
0
0
s
or Hlp () = Hp ()| 0 = Hp
.
(2.26)
Hlp (s) = Hp (s)|s 0 s = Hp
1
1
1
1
Figure 2.24 illustrates the lowpass-to-lowpass transformation graphically. The prototype response |Hp ()|2 (note the reverse orientation of the vertical axis) is shown in the lower right, the
transformation rule is shown in the upper right, and the transformed response |Hlp ()|2 is shown in
the upper left. Dotted lines show how the prototypes frequency 0 , in this case set to the half-power
point, maps to the new frequency 1 . Since the transformed lter in Eq. (2.26) equals, except in
argument, the original prototype lter, the transformed lter retains the essential nature and character of the prototype; the smooth prototype lter shown in Fig. 2.24 must transform into a similar
smooth lter.
1
2
|Hlp ()|2
1
2
1
|Hp ()|2
116
2
A lowpass prototype lter is given as Hp (s) = s+2
. Determine the lowpass-to-lowpass transformation rule
to produce a lowpass lter Hlp (s) with a half-power (3 dB) frequency of 1 = 3 rad/s. Plot the magnitude
response of the resulting lowpass lter.
2.6.2
Lowpass-to-Highpass Transformation
or
0 1
.
(2.27)
As with the lowpass-to-lowpass transformation, Eq. (2.27) maps the prototypes response at 0 to
new frequencies 1 . Further, the reciprocal nature of the transformation causes high frequencies to
exchange roles with low frequencies and vice versa. Thus, a highpass response with critical frequency
1 is obtained from a prototype lowpass response with critical frequency 0 according to
0 1
0 1
or Hhp () = Hp
Hhp (s) = Hp
.
(2.28)
s
Omitting, for convenience, the sign reversal in the transformation rule, Fig. 2.25 illustrates the
lowpass-to-highpass transformation graphically. As Eq. (2.27) requires, the transformed highpass
lter retains the essential character of the lowpass prototype.
0 1
1
2
|Hhp ()|2
1
2
1
|Hp ()|2
The
sign reversal is unimportant for real lters; care should be taken, however, if the prototype is a complex lter.
See Prob. 2.6-3.
117
2
to the lowpass prototype Hp () =
Apply the lowpass-to-highpass transformation
Plot the magnitude response, and determine the 3-dB frequency of the resulting lter.
1
j+1 .
1
j 2
+1
.
j2
0 1
2
,
Figure 2.26, generated using MATLAB, shows the resulting highpass magnitude response and
conrms that the 3-dB frequency 1 is equal to 2 rad/s.
01
02
03
|Hhp ()|
1
1
2
Figure 2.26: A plot of |Hhp ()| = j2
.
Example 2.8
2.6.3
Lowpass-to-Bandpass Transformation
The lowpass-to-bandpass transformation utilizes a one-to-two mapping: each point of the original
lowpass response maps to two points of the bandpass response. In this way, the lowpass lters
single cuto frequency becomes both the upper and lower cuto frequencies required of the bandpass
response. Mathematically, the lowpass-to-bandpass transformation is given by
s 0
s2 + 1 2
s (2 1 )
or 0
2 1 2
,
(2 1 )
(2.29)
118
Again omitting any sign reversals in the transformation rule, Fig. 2.27 graphically illustrates
the lowpass-to-bandpass transformation (see footnote on page 116). As Eq. (2.29) requires, the
transformed bandpass lter retains the essential features, such as smoothness and ripple levels, of
the lowpass prototype.
1 2
0 (
)
1
1
2
|Hbp ()|2
1
2
1
|Hp ()|2
2
A lowpass prototype lter is given as Hp (s) = s+2
. Determine the lowpass-to-bandpass transformation
rule to produce a bandpass lter Hbp (s) with half-power (3 dB) cuto frequencies 1 = 1 rad/s and 2 = 3
rad/s. Plot the magnitude response of the resulting bandpass lter.
2.6.4
Lowpass-to-Bandstop Transformation
Much as the lowpass-to-highpass transformation reciprocally relates to the lowpass-to-lowpass transformation, the lowpass-to-bandstop transformation reciprocally relates to the lowpass-to-bandpass
transformation. Mathematically, the lowpass-to-bandstop transformation is thus given by
s 0
s (2 1 )
s2 + 1 2
or 0
(2 1 )
,
2 + 1 2
(2.31)
where it is generally assumed that 2 > 1 . Aside from the 0 term, the left-hand expression in
Eq. (2.31) is indeed the mathematical reciprocal of the corresponding expression in Eq. (2.29).
As with the lowpass-to-bandpass transformation, the nature of Eq. (2.31) ensures that the order
of the bandstop lter is double that of the prototype and that the response of the prototype at
frequencies 0 maps to the frequencies 1 and 2 . A bandstop response with critical frequencies 1 and 2 is therefore obtained from a prototype lowpass response with critical frequency 0
119
according to
Hbs (s) = Hp
s (2 1 )
0 2
s + 1 2
(2 1 )
or Hbs () = Hp 0
.
2 + 1 2
(2.32)
Again omitting any sign reversals in the transformation rule, Fig. 2.28 graphically illustrates
the lowpass-to-bandstop transformation (see footnote on page 116). As Eq. (2.31) requires, the
transformed bandpass lter retains the essential features, such as smoothness and ripple levels, of
the lowpass prototype.
(2 1 )
0
2 +
1
2
|Hbs ()|2
1
2
1
|Hp ()|2
2s
s (3 1)
= 2
.
2
s + 1(3)
s +3
2s
s2 +3
=
2
2
s +3
1
=
.
2
4 + 2 2s3 + 10s2 + 6 2s + 9
s
2s
2s
+ 2 s2 +3 + 1
s2 +3
For higher-order systems, it is often more simple to perform the substitution of Eq. (2.31) using the
factored form of the transfer function as given, for example, in Eq. (1.52).
120
The corresponding frequency response is easily obtained by evaluating Hbs (s) for s = j. Figure 2.29, generated using MATLAB, shows the resulting bandstop magnitude response and conrms
that the 3-dB frequencies are 1and 3 rad/s. Notice that |Hbs (j)| = 0 at the geometric mean of
|Hbs (j)|
1
1
2
(s2 +3)2
.
s=j
Example 2.9
2.7
While various truncations of the impulse response can render a lter theoretically realizable, such
methods do not provide a clear path to implement a continuous-time lter in hardware. The
truncations of Secs. 2.3 and 2.4, for example, do not produce a rational transfer function H(s).
A rational transfer function is desirable as it corresponds directly to a constant-coecient linear
dierential equation (see Eq. (1.37) on page 28), and such equations are readily realized with electric
circuits.
Fortunately, there are several families of practical lters that are realizable (causal) and that
possess rational transfer functions, including Butterworth, Chebyshev, and inverse Chebyshev lters.
This section covers these three families of lters, providing a variety of design examples along the
way, and briey introduces the elliptic and Bessel-Thomson lter families as well. For each lter
family, a lowpass prototype is presented; highpass, bandpass, and bandstop responses are obtained
by applying the transformations of Sec. 2.6. The discussion here is not comprehensive but is basically
a summary of the design techniques. More discussion can be found elsewhere in the literature [5].
We begin with Butterworth lters.
2.7.1
Butterworth Filters
The magnitude response |H(j)| of an Kth-order Butterworth lowpass lter, depicted in Fig. 2.30
for various orders, is given by
1
|H(j)| = #
(2.33)
2K .
1 + c
Although
window-based lter design is not particularly useful for continuous-time lters, it is, as we shall see in
Ch. 8, very useful for the design of discrete-time nite-impulse response lters.
121
Observe that at = 0, the gain |H(j0)| is unity. At = c , the gain |H(jc )| = 1/ 2 or 3 dB.
Thus, the Butterworth design parameter c corresponds to the lters half-power cuto frequency,
also called the 3-dB cuto frequency. For large K, the Butterworth magnitude response approaches
the ideal characteristic (shaded).
|H(j)|
1
K=1
2
4
10
0
H(s)H(s) =
1+
1
s
jc
2K .
cK
k=1
(s pk )
(2.34)
where pk designate the system poles. Fortunately, the poles of a Butterworth lowpass lter are quite
simple to nd.
The poles of H(s)H(s) satisfy
2K
s2K = (jc )
2K
= ej(2k1) (jc )
pk = jc e 2K (2k1)
k = 1, 2, 3, . . . , 2K.
In words, the 2K poles of H(s)H(s) are spaced equally by /K radians around a circle of radius
c centered at the origin in the complex plane, as shown in Fig. 2.31 for even (K = 4) and odd
(K = 5) cases.
Butterworth
122
Im {s}
Im {s}
Re {s}
Re {s}
(b)
(a)
Figure 2.31: Butterworth poles and mirrors: (a) even order (K = 4) and (b) odd order (K = 5).
Of the 2K poles of H(s)H(s), K belong to our desired lter H(s) and K belong to H(s), what
we might consider the evil twin of H(s). Since our desired lter is constrained to be both causal and
stable, the poles of H(s) must be the K left half-plane poles of H(s)H(s), such as those shown in
the shaded regions of Fig. 2.31. The remaining K right half-plane poles (unshaded regions) belong
to H(s), which forces this twin lter to be either noncausal (unrealizable) or unstable (unbounded
output behavior). The virtuous H(s) can do no wrong, while the wicked H(s) can do no right.
Conveniently, the K left half-plane poles corresponding to H(s) are given by
j
pk = jc e 2K (2k1)
= c sin
!
!
(2k 1)
(2k 1)
+ jc cos
2K
2K
k = 1, 2, 3, . . . , K.
(2.35)
When the poles of Eq. (2.35) are inserted into Eq. (2.34) for the normalized case of c = 1,
the resulting denominator is a normalized Butterworth polynomial. Analog lter design books,
particularly older ones, almost always include tables of normalized Butterworth polynomials such
as those given in Tables 2.2 and 2.3.
K
2
3
4
5
6
7
8
a7
5.125831
a6
4.493959
13.137071
a5
3.863703
10.097835
21.846151
a4
3.236068
7.464102
14.591794
25.688356
a3
a2
a1
2.613126
5.236068
9.141620
14.591794
21.846151
2.000000
3.414214
5.236068
7.464102
10.097835
13.137071
1.414214
2.000000
2.613126
3.236068
3.863703
4.493959
5.125831
123
1
2
3
4
5
6
7
8
s+1
s2 + 1.414214s + 1
(s + 1)(s2 + s + 1)
(s2 + 0.765367s + 1)(s2 + 1.847759s + 1)
(s + 1)(s2 + 0.618034s + 1)(s2 + 1.618034s + 1)
(s2 + 0.517638s + 1)(s2 + 1.414214s + 1)(s2 + 1.931852s + 1)
(s + 1)(s2 + 0.445042s + 1)(s2 + 1.246980s + 1)(s2 + 1.801938s + 1)
(s2 + 0.390181s + 1)(s2 + 1.111140s + 1)(s2 + 1.662939s + 1)(s2 + 1.961571s + 1)
Table 2.3: Normalized Butterworth polynomials in factored form.
Find the transfer function H(s) of a fourth-order lowpass Butterworth lter with a 3-dB cuto frequency c = 10 by (a) frequency scaling the appropriate Table 2.2 entry and (b) direct calculation.
Plot the magnitude response to verify lter characteristics.
(a) Butterworth Design Using Tables and Frequency Scaling
Using the K = 4 entry of Table 2.2, the transfer function of the fourth-order normalized (c = 1)
Butterworth lowpass prototype lter is
Hp (s) =
1
.
s4 + 2.613126s3 + 3.414214s2 + 2.613126s + 1
s
10 ,
104
.
s4 + 26.13126s3 + 341.4214s2 + 2613.126s + 104
-3.8268-9.2388i
A = poly(p)
A = 1.0000 26.1313
341.4214
2613.1259
10000.0000
Substituting these polynomial coecients into Eq. (2.34) yields the desired transfer function
H(s) =
s4
26.1313s3
104
.
+ 341.4214s2 + 2613.1259s + 104
124
|H(j)|
1
1
2
10
20
30
$
s = 20 log10 |H(js )| = 10 log10 1 +
s
c
2K %
.
Combining Eqs. (2.36) and (2.37) and solving for integer K yield
*
/10
/10
+
s
p
log
10s /10 1 / 10p /10 1
log
10
1
/
10
1
=
.
K=
log(s /p )
2 log(s /p )
(2.37)
(2.38)
In Eq. (2.38), the ceiling function ensures that an integer value is returned for K, as required.
Since K is (almost always) rounded up, the resulting lter will (almost always) exceed design requirements. Exactly how the lter exceeds specications depends on our choice of c . Solving Eq. (2.36)
for c yields
p
c =
1/2K .
/10
1
10 p
In this case, the lter will exactly meet passband specications and will exceed stopband specications. Alternatively, solving Eq. (2.37) for c yields
s
c =
1/2K .
/10
10 s
1
Equation
(2.38) provides the smallest integer K that ensures lter specications are met. Although larger values
of K can also be used, the added complexity is not usually justied.
125
With this choice, the lter will exactly meet stopband specications and will exceed passband
specications. Any choice of c between these two extremes will work. Thus, assuming p < s ,
the half-power frequency c must satisfy
p
s
1/2K c
1/2K .
/10
/10
p
s
10
10
1
1
(2.39)
A One-Bumper Car?
If c is chosen at either extreme, either the passband or the stopband specications are met exactly
with no margin for error. This is somewhat akin to driving a car with only one bumper. As long
as nothing goes wrong, you never notice the missing bumper. However, if an accident occurs on the
side without a bumper, youre bound to encounter some damage. We prefer cars with both bumpers.
The buer zones created by choosing c at some convenient middle point of Eq. (2.39) serve as our
lters bumpers. With a buer on either side, we help protect our lter from the damage of minor
accidents, such as component variations or coecient truncations. The next example claries these
ideas.
Design the lowest-order Butterworth lowpass lter that meets the specications p 10 rad/s,
p 2 dB, s 30 rad/s, and s 20 dB. Plot the corresponding magnitude response to verify
that design requirements are met.
Step 1: Determine Order K
Using p = 10 rad/s, p = 2 dB, s = 30 rad/s, and s = 20 dB, MATLAB evaluation of Eq. (2.38)
yields the necessary order K.
01
02
omegac = [omegap/(10^(alphap/10)-1).^(1/(2*K)),omegas/(10^(alphas/10)-1).^(1/(2*K))]
omegac = 10.9350 13.9481
Choosing c = 10.9350 rad/s, which exactly meets passband specications and exceeds stopband
specications, provides no margin for error on the passband side. Similarly, choosing c = 13.9481
rad/s, which just meets stopband requirements and surpasses passband requirements, provides no
margin for error on the stopband side. A buer zone is provided on both the passband and stopband
sides by choosing some convenient middle value, such as
c = 12.5 rad/s.
Step 3: Determine Transfer Function H(s)
Similar to Ex. 2.10, MATLAB conveniently computes the desired transfer function coecients.
04
126
1953.125
.
s3 + 25s2 + 312.5s + 1953.125
The corresponding magnitude response, plotted using MATLAB, is shown in Fig. 2.33.
06
07
|H(j)|
1
0.7943
0.7071
c = 13.9481
c = 10.9350
0.1
0
10
12.5
30
Design the lowest-order Butterworth bandpass lter that meets the specications p1 10 rad/s,
p2 20 rad/s, p 2 dB, s1 5 rad/s, s2 35 rad/s, and s 20 dB. Plot the corresponding
magnitude response to verify that design requirements are met.
The solution to this problem is executed in two steps. In the rst step and similar to Ex. 2.11, we
determine a suitable lowpass prototype. In the second step, a lowpass-to-bandpass transformation is
applied to the lowpass prototype to obtain the desired Butterworth bandpass lter transfer function.
Step 1: Determine the Lowpass Prototype
Before we can determine the order K of the lowpass prototype, we need to determine how the bandpass characteristics relate to the lowpass prototypes stopband-to-passband ratio s /p . To this
end, we normalize the passband frequency p = 1 and then use Eq. (2.29) to solve for the stopband
127
frequency, s . Since there are two transition bands in the bandpass lter, two candidate values of
s are computed.
01
02
03
These two values demonstrate an interesting fact: even though the bandpass lters lower transition
band is physically narrower than its upper transition band (5-rad/s width versus 15-rad/s width),
it is the upper transition band that is most restrictive to the design. That is, the upper transition
band in this particular example maps to a narrower interval for the lowpass prototype than does the
lower transition band.
Since both transition bands need to be satised, the smallest (most restrictive) value is selected,
s = 2.9286. Substituting this value into Eq. (2.38) yields the necessary order of the prototype lter.
04
05
omegac = [omegap/(10^(alphap/10)-1).^(1/(2*K)),omegas/(10^(alphas/10)-1).^(1/(2*K))]
omegac = 1.0935 1.3616
Setting c to the middle of these values, the coecients of the lowpass prototype are next computed.
07
08
1.849782
.
s3 + 2.455106s2 + 3.013772s + 1.849782
(2.40)
s pk
1
s2 +200
10s
pk
10s
.
s2 10pk s + 200
Thus, our single pole becomes a pair of poles along with the addition of one zero at s = 0.
Designating
as2 + bs + c = s2 pk (p2 p1 )s + p1 p2 = s2 10pk s + 200, the quadratic formula
2
(b b 4ac)/(2a) allows us to compute the two poles that result from the transformation of
each pole pk . The roots for both numerator and denominator are then expanded into polynomial
form.
128
09
10
11
a = 1; b = -pk*(omegap2-omegap1); c = omegap1*omegap2;
pk = [(-b+sqrt(b.^2-4*a*c))./(2*a),(-b-sqrt(b.^2-4*a*c))./(2*a)];
B = (omegac^K)*((omegap2-omegap1)^K)*poly(zeros(K,1)), A = poly(pk)
B = 1849.7824 0.0000 0.0000 0.0000
A = 1.0000 24.5511 901.3772 11670.2056 180275.4443 982042.3150
8000000.0000
H(s) =
The lters magnitude response, plotted using MATLAB, is shown in Fig. 2.34.
12
13
|H(j)|
1
K=8
0.7943
K=4
0.1
0
10
20
35
129
Determine the order K of a lowpass Butterworth lter to meet the specications p 100 rad/s, p 0.05,
s 200 rad/s, and s 0.01.
Determine the order K of a bandpass Butterworth lter to meet the specications p1 100 rad/s,
p2 200 rad/s, p 0.5 dB, s1 50 rad/s, s2 250 rad/s, and s 40 dB.
2.7.2
Chebyshev Filters
In this section, we cover Chebyshev lters, also called Chebyshev type 1 lters, in sucient detail to
allow competent design. Deeper treatments of this fascinating family of lters are available, such as
those provided in [5] and [6].
The magnitude response of a Chebyshev lowpass lter is given by
1
|H(j)| = #
,
2
2
1 + CK p
where CK (x), the Kth-order Chebyshev polynomial, is given by
CK (x) = cos K cos1 (x)
or CK (x) = cosh K cosh1 (x) .
(2.41)
(2.42)
Traditionally, the cosine form of Eq. (2.42) is used for |x| 1, and the hyperbolic cosine form is
used for |x| > 1. With modern computing devices that support complex arithmetic, however, either
form can be used without restriction. Since CK (x) oscillates back and forth between 1 and 1 over
1 x 1, Chebyshev polynomials are known as equiripple functions.
While Eq. (2.42) oers a compact form suitable for computation, the polynomial nature of CK (x),
needed to produce a rational (realizable) system function H(s), is not at all clear. As it turns out
(see Prob. 2.7-8), CK (x) satises the recursion relation
CK (x) = 2xCK1 (x) CK2 (x)
for K > 1.
(2.43)
Noting from Eq. (2.42) that C0 (x) = 1 and C1 (x) = x, which are zeroth-order and rst-order
polynomials, respectively, it follows from Eq. (2.43) that CK (x) must be a Kth-order polynomial.
For example, C2 (x) = 2xC1 (x) C0 (x) = 2x2 1, C3 (x) = 2xC2 (x) C1 (x) = 4x3 3x, and so on.
From Eq. (2.42), it follows that CK (0) is either 1 (even K) or 0 (odd K) and that CK (1) = 1 for
all K. Use of these results in Eq. (2.41) leads to the conclusions that
1
K odd
1
and |H(jp )| =
|H(j0)| =
.
(2.44)
1
K
even
2
1 + 2
1+
Using Eq. (2.41), the Chebyshev lowpass magnitude response is depicted in Fig. 2.35 for K = 6
and K = 7. Notice the dierent dc gain between the even- and odd-order cases. The Chebyshev
magnitude response has ripples in the passband (0 p ) and is smooth (monotonic) outside
the passband ( > p ). As consequence of the equiripple nature of CK (/p ), the K maxima
and minima over
the passband are of equal height, oscillating between a maximum of unity and a
minimum of 1/ 1 + 2 .
130
|H(j)|
|H(j)|
1
1+2
1
1+2
(a)
(b)
1 + 2 = 10 log10 (1 + 2 ).
Consequently, the Chebyshev parameter in Eq. (2.41) controls the height of the lters passband
ripple and is given by
(2.45)
2 = 10p /10 1.
Larger leads to greater ripple and vice versa.
Comparing Chebyshev and Butterworth Responses
The Chebyshev lter has a sharper cuto (smaller transition band) than the same-order Butterworth
lter, but this is achieved at the expense of inferior passband behavior (rippling instead of maximally
at). Alternatively, as Ex. 2.13 demonstrates, Chebyshev lters typically require lower order K
than Butterworth lters to meet a given set of specications.
A subtle but important dierence also exists in how Chebyshev and Butterworth lters are
normalized: a normalized Butterworth lter has a half-power frequency of unity (c = 1), while a
normalized Chebyshev lter has a unity passband cuto frequency (p = 1). Since c is rarely equal
to p , it follows that a transformation that is applied to a normalized Butterworth lter is not the
same as that needed for a normalized Chebyshev lter.
Determination of Chebyshev Filter Order, Pole Locations, and Transfer Function
To determine Chebyshev lter order, we proceed in much the same way as we did for the Butterworth
case. Expressing the minimum stopband attenuation s , in dB, in terms of the Chebyshev response
We can show (see [7]) that, at higher frequencies in the stopband, the Chebyshev lter gain is smaller than the
comparable Butterworth lter gain by about 6(K 1) dB. This fact, however, is of little consequence as long as the
lter satises stopband requirements.
131
s
p
!
.
Substituting Eqs. (2.42) and (2.45) into this result and solving for integer K yield
10s /10 1 / 10p /10 1
cosh1
.
K=
cosh1 (s /p )
(2.46)
Comparing Eq. (2.46) with Eq. (2.38), we see that computing Chebyshev lter order is identical to
the Butterworth case except that logarithms are replaced with inverse hyperbolic cosines. As we
shall see next in determining Chebyshev pole locations, there are signicant connections between
Chebyshev and Butterworth lters.
As done in the Butterworth case, the Chebyshev lter poles, and thus its transfer function, are
found by squaring the magnitude response of Eq. (2.41), substituting = s/j to yield H(s)H(s),
and then selecting the left half-plane denominator roots. The procedure is relatively straightforward
but tedious to complete analytically. The end result, however, is elegant. Similar to how Butterworth poles lie on a semicircle, the poles of a Chebyshev lowpass lter lie on a semi-ellipse [7,5].
Mathematically, the Chebyshev poles are
!
!
1
1
(2k 1)
sinh1
pk = p sinh
sin
+
K
2K
!
!
1
1
(2k 1)
sinh1
cos
k = 1, 2, . . . , K.
(2.47)
jp cosh
K
2K
In scaling our poles by the passband frequency p , our Chebyshev design will exactly meet passband
requirements and, due to rounding up the order K, will exceed stopband requirements. As shown in
upcoming Ex. 2.13, however, it is a simple matter to scale p to provide, if desired, both passband
and stopband buer zones.
Careful comparison of Eq. (2.47) with Eq. (2.35) conrms a close relationship between pole locations on a Chebyshev ellipse and those on Butterworth circles: the real part of the
poles
1 Chebyshev
sinh1 1
, and
coincide with those of an equivalent-order Butterworth lter with radius p sinh K
the imaginary
part
1
of
the Chebyshev poles are equal to those of a Butterworth lter with radius
p cosh K
sinh1 1
. Figure 2.36 displays the poles of a third-order Chebyshev lter, which lie on
a semi-ellipse, and emphasizes the relationship of these poles to the appropriately scaled Butterworth
poles, which lie on semicircles.
The transfer function H(s) of a Kth-order lowpass Chebyshev lter is
,
(1)K p1 p2 pK
= |H(j0)|
(s p1 )(s p2 ) (s pK )
K
H(s) = |H(j0)|
k=1
pk
s pk
(2.48)
Here, |H(j0)| ensures the proper dc gain and is determined according to Eq. (2.44).
As with Butterworth lters, the design procedure for Chebyshev lters can be achieved through
the use of ready-made tables. Table 2.4, for example, provides the coecients of the denominator
polynomial for normalized (p = 1) Chebyshev lters with various passband ripple levels. Since
separate tables are needed for each value of p and modern computer technologies easily compute
Chebyshev lter parameters, the popularity of such tables has waned signicantly in recent years.
It is not recommended to perform this procedure numerically. Even with modern calculators or computers, it is
2 (s/j ),
dicult and sometimes impossible to determine with sucient accuracy the roots of the polynomial 1 + 2 CK
p
particularly for large K.
132
Im {s}
Re {s}
p sinh
p cosh
1
K
sinh1
1
1
K
sinh1
1
Figure 2.36: Third-order Chebyshev lter pole locations and relationship to Butterworth poles.
Using p 0.5 dB and s 20 dB, determine and compare the order K for both Chebyshev and
Butterworth lowpass lters for s /p = 1.01, 1.1, 2, 5, and 10.
Using Butterworth poles as in Fig. 2.36, determine and plot the poles for normalized (p = 1) K = 3
Chebyshev lters with (a) p = 3 dB, (b) p = 0.3 dB, and (c) p = 0.03 dB. What is the general eect
of passband ripple on a Chebyshev lters pole locations?
K
1
2
3
4
5
6
7
1
2
3
4
5
6
7
1
2
3
4
5
6
7
1
2
3
4
5
6
7
1
2
3
4
5
6
7
a6
a5
133
a4
a3
a2
a1
a0
1.938811
2.626798
2.396959
2.047841
1.482934
2.372356
2.629495
2.025501
1.435558
0.901760
0.561786
6.552203
3.314037
1.638051
0.828509
0.409513
0.207127
0.102378
1.252913
1.716866
1.309575
1.171861
0.755651
1.425625
1.534895
1.025455
0.752518
0.432367
0.282072
2.862775
1.516203
0.715694
0.379051
0.178923
0.094763
0.044731
0.988341
1.453925
0.974396
0.939346
0.548620
1.097734
1.238409
0.742619
0.580534
0.307081
0.213671
1.965227
1.102510
0.491307
0.275628
0.122827
0.068907
0.030707
0.737822
1.256482
0.693477
0.771462
0.382638
0.803816
1.022190
0.516798
0.459349
0.210271
0.166126
1.307560
0.823060
0.326890
0.205765
0.081723
0.051441
0.020431
0.597240
1.169118
0.548937
0.699098
0.300017
0.644900
0.928348
0.404768
0.407966
0.163430
0.146153
1.002377
0.707948
0.250594
0.176987
0.062649
0.044247
0.015662
0.1 dB of ripple
(p = 0.1)
1.693224
1.712166
3.183504
1.743963
2.965756
3.169246
1.803773
2.770704
2.779050
2.705144
0.5 dB of ripple
(p = 0.5)
1.151218
1.159176
2.412651
1.172491
2.171845
1.869408
1.197386
1.937367
1.589764
1.647903
1 dB of ripple
(p = 1)
0.923123
0.928251
2.176078
0.936820
1.930825
1.428794
0.952811
1.688816
1.202140
1.357545
2 dB of ripple
(p = 2)
0.698091
0.701226
1.993665
0.706461
1.745859
1.039546
0.716215
1.499543
0.867015
1.144597
3 dB of ripple
(p = 3)
0.568420
0.570698
1.911551
0.574500
1.662848
0.831441
0.581580
1.415025
0.690610
1.051845
Design the lowest-order Chebyshev lowpass lter that meets the specications p 10 rad/s,
p 2 dB, s 30 rad/s, and s 20 dB. Plot the corresponding magnitude response to verify
that design requirements are met.
Although the specications are the same as those in Ex. 2.11, we shall nd that the Chebyshev
lter requires a lower order than the corresponding Butterworth lter.
134
Observe that the Chebyshev lter requires lower order (K = 2) than the Butterworth lter (K = 3).
The passband behavior of the Butterworth lter, however, is superior (maximally at at = 0)
compared with that of the Chebyshev, which has rippled passband characteristics.
Step 2: Determine Passband Cuto Frequency p
Although, as is commonly done, we can simply set the passband frequency to the smallest permissible value (p = 10), this will result in exactly meeting passband specications with no buer zone
and exceeding stopband specications. Rather, we seek to set p to a value that provides both
passband and stopband buer zones.
The choice p = 10 represents one extreme. The other is found setting s = 30 and solving
Eq. (2.46) for p .
03
omegap = [omegap,omegas/cosh(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/K)]
omegap = 10.0000 11.3349
omegap = mean(omegap)
omegap = 10.6674
Alternatively, the lowpass-to-lowpass transformation s s/p = s/10.6674 applied to the appropriate coecients of Table 2.4 yields the same denominator.
10
Thus,
74.3963
.
+ 8.5747s + 93.6594
The corresponding magnitude response, plotted using MATLAB, is shown in Fig. 2.37.
H(s) =
11
12
s2
Exactly as in Ex. 2.11, the dB attenuation parameters are converted to facilitate lter verication.
For comparison purposes, the gure shows the Chebyshev responses corresponding to the limiting
values of p as computed in line 03. As predicted, the p = 10 curve exactly meets passband
requirements and exceeds stopband requirements. Similarly, the p = 11.3349 curve exactly meets
135
|H(j)|
1
p = 11.3349
0.7943
p = 10
0.1
0
10
30
Design the lowest-order Chebyshev bandstop lter that meets the specications p1 5 rad/s,
p2 35 rad/s, p 2 dB, s1 10 rad/s, s2 20 rad/s, and s 20 dB. Plot the corresponding
magnitude response to verify that design requirements are met.
As in Ex. 2.12, the solution to this problem is executed in two steps. In the rst step, we determine a suitable lowpass prototype. In the second step, a lowpass-to-bandstop transformation is
applied to the lowpass prototype to obtain the desired Chebyshev bandstop lter transfer function.
Step 1: Determine the Lowpass Prototype
Before we can determine the order K of the lowpass prototype, we need to determine how the
bandstop characteristics relate to the lowpass prototypes stopband-to-passband ratio s /p . We
normalize s = 1 and then use Eq. (2.31) to solve for the other frequency, p . Since there are two
transition bands in the bandstop lter, two candidate values of p are computed.
01
02
03
As in Ex. 2.12, it is the upper transition band that is most restrictive. Thus, to ensure that both
transition bands are satised, we substitute p = 0.3415 into Eq. (2.46) and compute the prototype
lter order.
04
05
Similar to Ex. 2.13, the prototype stopband frequency is adjusted to provide both passband and
stopband buer zones.
06
07
omegas = mean([omegas,...
omegap*cosh(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/K)])
omegas = 0.9519
136
omegap = omegas/cosh(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/K);
epsilon = sqrt(10^(alphap/10)-1); k = 1:K;
pk = -omegap*sinh(asinh(1/epsilon)/K)*sin(pi*(2*k-1)/(2*K))+...
1j*omegap*cosh(asinh(1/epsilon)/K)*cos(pi*(2*k-1)/(2*K));
H0 = mod(K,2)+mod(K+1,2)/sqrt(1+epsilon^2); B = H0*prod(-pk), A = poly(pk)
B = 0.0846
A = 1.0000 0.2891 0.1065
s2
0.0846
.
+ 0.2891s + 0.1065
(2.49)
s pk
1
10s
s2 +200
pk
s2 + 200
pk s2
10
pk s
.
+ 200
Thus, our
single pole becomes a pair of poles along with the addition of a pair of conjugate zeros at
s = j 200.
Designating as2 + bs + c = s2 s2pk s1 s + s1 s2 = s2 p10k s + 200, the quadratic formula
(b b2 4ac)/(2a) allows us to compute the two poles that result from the transformation of
each pole pk . The roots for both numerator and denominator are then expanded into polynomial
form.
13
14
15
a
B
B
A
A
=
=
=
=
=
1; b = -(omegas2-omegas1)./pk; c = omegas1*omegas2;
B/prod(-pk)*poly([1j*sqrt(c)*ones(K,1);-1j*sqrt(c)*ones(K,1)])
0.7943 0.0000 317.7313 0.0000 31773.1293
poly([(-b+sqrt(b.^2-4*a.*c))./(2*a),(-b-sqrt(b.^2-4*a.*c))./(2*a)])
1.0000 27.1550 1339.3288 5431.0003 40000.0000
Using these results, the transfer function of our order-4 bandstop lter is thus
H(s) =
s4
The lters magnitude response, plotted using MATLAB, is shown in Fig. 2.38.
16
17
137
|H(j)|
1
0.7943
0.1
0
10
20
35
Using balanced buer zones in both the upper and lower transition bands, design the lowest-order
Chebyshev bandstop lter that meets the specications p1 5 rad/s, p2 50 rad/s, p 2
dB, s1 10 rad/s, s2 20 rad/s, and s 20 dB. Plot the corresponding magnitude response
to verify that design requirements are met.
Given the nearly identical specications, an initial design is readily achieved with simple modication of the code in Ex. 2.14. Changing p2 from 35 to 50 in line 01 and re-executing lines 0117
result in the fourth-order bandstop response shown in Fig. 2.39. In this case, it is now the lower
transition band that is most restrictive.
|H(j)|
1
0.7943
0.1
0
10
20
25
Figure 2.39: Order-4 Chebyshev bandstop lter with unbalanced buer zones.
Although the lter shown in Fig. 2.39 meets specications, the buer zones in the upper transition
138
band are not balanced. By adjusting the stopband cuto s of the lowpass prototype (lines 0607),
the code of Ex. 2.14 provides balanced buer zones in the more restrictive lower transition band.
This adjustment is too small to balance the upper transition band. Further decreasing s improves
the upper transition band performance but degrades the lower transition region.
To develop one of the many possible solutions to this dilemma, it is worth understanding why the
upper transition in Fig. 2.39 is crowded toward the stopband rather than the passband. The reason
is that the lowpass-to-bandstop transformation is written in terms of the stopband parameters s1
and s2 . Thus, the lowpass prototype stopband cuto s , adjusted to deliver appropriately small
buers for the restrictive upper transition band, is mapped (crowded) toward s2 . By adjusting s2
in our lowpass-to-bandstop transformation rule, we can better balance the upper transition bands
buer zones.
We know that s2 = 20 rad/s causes our response to crowd toward the stopband side. The value
s2 that crowds our response toward the passband side at = p2 = 50 rad/s is determined by
solving Eq. (2.31) for s2 ,
2 p + s1
502 (0.3318) + 500
s2 =
= 24.9341.
=
s p +
10(0.3318) + 50
1
=p2
0.1
0
10
20
25
Figure 2.40: Order-8 Chebyshev bandstop lter with balanced buer zones.
One caution is in order. It is possible to ask more than a particular lter can deliver. While adjusting parameters (s2 in this case) may improve one transition region, the other transition region
will also be impacted, sometimes to the point that specications are no longer met. It is crucial,
therefore, to always check the nal design to verify lter behavior.
Example 2.15
Design a sixth-order Chebyshev lowpass lter for the specications p 10 rad/s, p 0.1, s 30 rad/s,
and s 0.01. Plot the corresponding magnitude response to verify whether design requirements are met.
2.7.3
139
The passband behavior of a Chebyshev lter exhibits ripples, and the stopband is smooth. Generally, passband behavior is more important, and we would prefer that the passband have a smooth
response. However, ripples can be tolerated in the stopband as long as they meet s , the minimum
allowable stopband attenuation. The inverse Chebyshev lter, also called a Chebyshev type 2 lter,
does both: its magnitude response exhibits a maximally at passband and an equiripple stopband.
While Butterworth and Chebyshev type 1 lters have nite poles and no nite zeros, the inverse
Chebyshev has both nite poles and zeros.
The inverse Chebyshev response can be obtained from a Chebyshev response in two steps. To
begin, let |Hc ()| be a lowpass Chebyshev magnitude response with passband edge p and ripple
parameter , as shown in Fig. 2.41a. In the rst step, we subtract |Hc ()|2 from 1 to obtain the
response shown in Fig. 2.41b. Although highpass, the desired characteristics of stopband ripple and
smooth passband are present. In the second step, we interchange the stopband and passband with
the lowpass-to-highpass transformation of Eq. (2.27), which serves equally well as a highpass-tolowpass transformation. Noting that frequency p corresponds to our stopband frequency s , the
substitution p s / yields the inverse Chebyshev response, shown in Fig. 2.41c.
|Hc (j)|
1/ 1 + 2
(a)
1 |Hc (j)|2
|H(j)|
/ 1 + 2
/ 1 + 2
p
(b)
s
(c)
Figure 2.41: Obtaining an inverse Chebyshev response: (a) Chebyshev response |Hc (j)|, (b)
1 Hc2 (j), and (c) inverse Chebyshev response |H(j)|.
140
(2.51)
where CK () are the Kth-order Chebyshev polynomials in Eq. (2.42). In Eq. (2.51), the negative
sign in the lowpass-to-highpass transformation rule is eliminated since |H(j)| is an even function
of .
Much like the Chebyshev response, the inverse Chebyshev response requires three parameters:
order K, ripple parameter , and stopband edge s . Following the same procedure as in the Chebyshev case, the required order for an inverse Chebyshev lter is
10s /10 1 / 10p /10 1
cosh1
,
K=
(2.52)
cosh1 (s /p )
which isexactly the same as for the Chebyshev type 1 case. Relating the inverse Chebyshev stopband
gain / 1 + 2 to s and solving for 2 yield
2 =
1
.
10s /10 1
(2.53)
Comparing Eqs. (2.53) and (2.45) highlights that the ripple parameter is computed dierently for
Chebyshev type 1 and type 2 lters. Another dierence is that the inverse Chebyshev response is
expressed in terms of stopband edge s rather than passband edge p , as in the Chebyshev case.
Consequently, a normalized inverse Chebyshev lter has s = 1.
The transfer function H(s) of a Kth-order lowpass inverse Chebyshev lter is
K
H(s) =
k=1
(pk /zk ) K
k=1 (s zk )
,
K
k=1 (s pk )
(2.54)
p s
,
pk
(2.55)
where pk are the poles, as given in Eq. (2.47), of a Chebyshev lter with passband edge p and
ripple parameter 2 set using Eq. (2.53), as required for the inverse Chebyshev response. Solving
where the numerator of Eq. (2.51) equals zero, the inverse Chebyshev zeros zk are computed as (see
Prob. 2.7-16)
(2k 1)
zk = js sec
k = 1, 2, . . . , K.
(2.56)
2K
Figure 2.42 shows the pole-zero plots of a sixth-order normalized (s = 1) inverse Chebyshev lter
for three choices of s . Although the exact pole and zero locations vary for dierent parameters K,
s , and s , the plots represent general inverse Chebyshev character.
Inverse Chebyshev lters are preferable to the Chebyshev lters in many ways. In particular, the
passband behavior, especially for small , is better for the inverse Chebyshev than for the Chebyshev
or even for the Butterworth lter of the same order. The inverse Chebyshev also has the smallest
transition band of the three lters. Moreover, the phase function (or time-delay) characteristic of
the inverse Chebyshev lter is better than that of the Chebyshev lter [5]. Although Chebyshev
Im {s}
141
Im {s}
Re {s}
(a)
Im {s}
Re {s}
(b)
Re {s}
(c)
Figure 2.42: Pole-zero plots of a normalized K = 6 inverse Chebyshev lowpass lter: (a) s = 20,
(b) s = 30, and (c) s = 40.
and inverse Chebyshev lters require the same order K to meet a given set of specications, the
inverse Chebyshev realization requires more elements and thus is less economical than the Chebyshev
lter. Compared with a comparable performance Butterworth lter, however, the inverse Chebyshev
typically requires fewer elements.
Design the lowest-order inverse Chebyshev lowpass lter that meets the specications p 10
rad/s, p 2 dB, s 20 rad/s, and s 20 dB. Plot the corresponding magnitude response to
verify that design requirements are met.
Step 1: Determine Order K
Using p = 10 rad/s, p = 2 dB, s = 20 rad/s, and s = 20 dB, MATLAB evaluation of Eq. (2.52)
yields the necessary order K.
01
02
omegas = [omegap*cosh(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/K),omegas]
omegas = 16.4972 20.0000
142
omegas = mean(omegas)
omegas = 18.2486
Next, we use Eqs. (2.55) and (2.56) to determine the pole and zero locations of our lter.
08
pk = omegap*omegas./pk; zk = 1j*omegas.*sec(pi*(2*k-1)/(2*K));
Expanding these polynomials and using Eq. (2.48) to determine the numerators scaling constant,
we obtain the desired transfer function coecients.
09
B = prod(pk./zk)*poly(zk), A = poly(pk)
B = -0.0000 5.5022 -0.0000 2443.0336
A = 1.0000 25.6463 313.7283 2443.0336
Thus,
H(s) =
5.5022s2 + 2443.0336
.
s3 + 25.6463s2 + 313.7283s + 2443.0336
The corresponding magnitude response, plotted using MATLAB, is shown in Fig. 2.43.
10
11
|H(j)|
1
s = 20
0.7943
0.1
0
s = 16.5
10
20
Figure 2.43: Lowpass inverse Chebyshev magnitude response with K = 3 and s = 18.2486.
For comparison purposes, Fig. 2.43 also shows the inverse Chebyshev responses corresponding
to the limiting values of s as computed in line 03. As predicted, the s = 20 curve exactly meets
stopband requirements and exceeds passband requirements. Similarly, the s = 16.4972 curve exactly meets passband requirements and exceeds stopband requirements.
Example 2.16
143
Design a sixth-order inverse Chebyshev highpass lter with p = 10 rad/s, p 2 dB, and s 40
dB. Determine the lters stopband frequency s , and plot the magnitude response to verify that
design requirements are met.
In the rst step, we determine a suitable lowpass prototype. In the second step, a lowpass-tohighpass transformation is applied to the lowpass prototype to obtain the desired inverse Chebyshev
highpass lter transfer function.
Step 1: Determine the Lowpass Prototype
In this design, the lter order is specied. To simplify our later lowpass-to-highpass transformation,
we normalize our prototypes passband frequency p = 1 and solve for the corresponding stopband
frequency s .
01
02
Next, we use Eqs. (2.53) and (2.47) to determine the pole locations of an appropriate Chebyshev
lter. Then, we use Eqs. (2.55) and (2.56) to determine the pole and zero locations of our inverse
Chebyshev lowpass prototype.
03
04
05
06
07
Thus, the transfer function of our inverse Chebyshev lowpass prototype is given as
Hlp (s) =
s6
4.4107s5
p
)
k
k=1
k=1 (s 10/pk )
In other words, the zeros and poles of the lowpass prototype reciprocate and scale according to
zk 10/zk and pk 10/pk . The resulting lter coecients as well as the nal stopband frequency
s are computed with MATLAB.
08
The lters magnitude response, plotted in dB using MATLAB, is shown in Fig. 2.44.
09
10
144
20 log10 |H(j)|
0
2
40
6.8394
10
Since the stopband attenuation is a signicant 1/100 (40 dB), a dB plot is preferred to clearly view
the stopband characteristics.
Example 2.17
2.7.4
Elliptic Filters
As we saw with inverse Chebyshev lters, placing a zero on the imaginary axis at s = j results in
|H(j)| = 0 (innite attenuation). We can realize a sharper cuto characteristic by placing a zero, or
zeros, near = s . While Butterworth and Chebyshev lters do not make use of such zeros in H(s),
both inverse Chebyshev and elliptic lters do. This is part of the reason for their superior response
characteristics. In compensation, because of zeros in the numerator of H(s), inverse Chebyshev and
elliptic lter responses decay for > s at a slower rate than equivalent Butterworth or Chebyshev
type 1 lters. For odd orders, inverse Chebyshev and elliptic lters decay at 20 dB/decade at very
high frequencies; the responses do not decay to zero at all in the even-order cases. Butterworth
and Chebyshev type 1 lters of order K, on the other hand, have stopband decay rates of 20K
dB/decade. The presence of zeros in the numerator of H(s) in an elliptic lter causes the response
to decay at a slower rate at very high frequencies since the eective rate of decay of a lter response
at high frequencies is 20(K L) dB/decade, where (K L) is the dierence between the number of
poles K and number of zeros L. Usually, however, the magnitude response decay rate is unimportant
as long as we meet our stopband attenuation specication of s .
Chebyshev lters have a smaller transition bands compared with that of a Butterworth lter
because Chebyshev lters allow rippling in either the passband or stopband. If we allow ripple in
both the passband and the stopband, we can achieve a further reduction in the transition band.
Such is the case with elliptic, also called Cauer, lters. For a given transition band, an elliptic lter
provides the largest ratio of the passband gain to stopband gain, or for a given ratio of passband
to stopband gain, it requires the smallest transition band. The equiripple passband and stopband
characteristics of an elliptic lter help it achieve the minimum order possible for given specications.
The magnitude response of an elliptic lter is given by
1
.
|H(j)| =
1 + 2 RK 2 (/p , )
(2.57)
145
In Eq. (2.57), RK (/p , ) is a Kth-order elliptic rational function with discrimination factor .
Using the properties
of RK (see [5]), we see that an elliptic lters equiripple passband has magnitude
limits of 1 and 1/ 1 + 2 . The parameter controls the passband ripple, and
the gain at p is
2
1/ 1 + . Similarly, the lters equiripple stopband has magnitude limits of 1/ 1 + 2 2 and 0.
Thus, the discrimination factor is directly related to the lters maximum stopband gain. Like
Chebyshev type 1 lters, elliptic lters are normalized in terms of the passband edge p . Using
K = 3 and K = 4, Fig. 2.45 illustrates the equiripple passband and stopband character, as well as
the narrow transition band, typical of elliptic lters.
|H(j)|
|H(j)|
1
1+2
1
1+2 2
1
1+2
1
1+2 2
(a)
(b)
H(s) = |H(j0)|
k=1
s zk
s pk
(2.58)
where |H(j0)| is 1 or 1/ 1 + 2 for the odd- and even-order cases, respectively. Using expanded
rather than factored form, the transfer function is equivalently expressed as H(s) = B(s)/A(s),
where numerator polynomial B(s) and denominator polynomial A(s) are both Kth order and follow
the form of Eq. (1.51).
Calculation of pole and zero locations of elliptic lters is much more complicated than that for
Butterworth or even Chebyshev lters and is not covered here. Fortunately, elliptic lter design, including the determination of system poles and zeros, is greatly simplied by computer programs and
extensive ready-made design tables available in the literature. As the next example demonstrates,
elliptic lter design is nearly eortless using functions from MATLABs Signal Processing Toolbox.
Conveniently, the Signal Processing Toolbox also includes functions for Butterworth, Chebyshev,
and other lter families.
Using functions from MATLABs Signal Processing Toolbox, design an elliptic bandstop lter that
meets the specications p1 5 rad/s, p2 25 rad/s, p 2 dB, s1 10 rad/s, s2 20 rad/s,
and s 20 dB. Plot the corresponding magnitude response to verify that design requirements
are met.
The specications for this lter are identical to those for the Chebyshev lter of Ex. 2.15. The
Elliptic rational functions are sometimes referred to as Chebyshev rational functions, a name also given to an
entirely dierent class of functions as well. We use the former convention to minimize potential confusion. Additionally,
some sources express RK in terms of a selectivity factor rather than the discrimination factor ; the discrimination
factor provides more insight for lter design applications.
146
MATLAB functions ellipord and ellip are used to determine the needed order K and lter coefcients, respectively. Although used to construct a bandstop lter in this case, these functions are
general and support each of the four basic lter types. Function syntax is detailed in MATLABs
help facilities.
To begin, we determine the necessary order.
01
02
In line 02, the designation s species the design as analog rather than digital. Not surprisingly, the
computed lter order is smaller for the elliptic lter (K = 3) than for the corresponding Chebyshev
lter (K = 4).
Next, the coecients of the transfer function are computed, the frequency response is calculated,
and the magnitude response plot is generated.
03
04
05
[B,A] = ellip(K,alphap,alphas,omegap,stop,s);
omega = linspace(0,100,1001); H = polyval(B,1j*omega)./polyval(A,1j*omega);
plot(omega,abs(H));
The resulting magnitude response plot of Fig. 2.46 conrms that design specications are met.
|H(j)|
1
0.7943
0.1
0
10
20
25
147
|H(j)|
1
0.7943
0.1
0
10
20
25
Figure 2.47: Order-3 elliptic bandstop lter with balanced buer zones.
|H(j)|
1
0.7943
0.1
0
10
20
25
Figure 2.48: Order-3 elliptic bandstop lter with passband, stopband, and ripple buer zones.
On a nal note, it is worth pointing out that buer zones, while sensible for almost any lter
design, are usually most pronounced for low-order lters. Higher-order, stringent designs tend to
have less wiggle room than low-order designs. Further, buer zones are more important for analog
lters, which are often low order, than digital lters, which are often higher order. The primary
reason is that analog lters suer from component variations that degrade system performance in
unpredictable ways; degradations in digital lter performance, caused, for example, by coecient
truncations, are more controllable and predictable. As a result, the extra eort to create buer
zones is often not taken for digital or high-order lter designs.
Example 2.18
2.7.5
Bessel-Thomson Filters
Unlike the previous lters, where we approximate the magnitude response without paying attention
to the phase response, the Bessel-Thomson lter is designed for maximally at time delay over a
bandwidth of interest. This means that the phase response is designed to be as linear as possible
over a given bandwidth. Recall from Eq. (2.15) that time delay tg () acquired by a signal during its
d
transmission through an LTI system is d
H(). We showed that an ideal delay system (at or
constant delay) with unit gain has a transfer function H(s) = estg . Over the bandwidth of interest,
148
Bessel-Thomson lters approximate this transfer function with a rational function in s so that the
resulting frequency response has a maximally at delay. The resulting transfer function coecients
are closely related to Bessel polynomials, and Thomson was one of the rst to use them for this
approximation. The Kth-order Bessel-Thomson lter transfer function is given by
H(s) =
BK (0)
,
BK (s/1 )
(2.59)
where 1 , essentially functioning as a lowpass-to-lowpass transformation, simply scales the normalized response by an amount 1 . In Eq. (2.59), the Kth-order reverse Bessel polynomials BK (s) can
be expressed by the recursion formula
Bk (s) = (2k 1)Bk1 (s) + s2 Bk2 (s).
(2.60)
Knowing B0 (s) = 1 and B1 (s) = s + 1, we can determine BK (s) for any value of K. For example,
B2 (s) = 3B1 (s) + s2 B0 (s) = 3(s + 1) + s2 (1) = s2 + 3s + 3, and so on. For modest values of K, the
K + 1 coecients of the reverse Bessel polynomial BK (s) = sK + bK1 sK1 + + b1 s + b0 can also
be found directly using the formula
bk =
(2K k)!
.
k!(K k)!2Kk
(2.61)
b8
45
b7
36
990
b6
28
630
13860
b5
21
378
6930
135135
b4
15
210
3150
51975
945945
b3
10
105
1260
17325
270270
4729725
b2
b1
b0
6
45
420
4725
62370
945945
16216200
3
15
105
945
10395
135135
2027025
34459425
1
3
15
105
945
10395
135135
2027025
34459425
Table 2.5: Coecients of normalized reverse Bessel polynomials BK (s) = sK + bK1 sK1 + +
b1 s + b0 .
Bessel-Thomson lters are superior to the lters discussed so far in terms of the phase linearity
or atness of the time delay. However, they do not fair so well in terms of the atness of the
magnitude response. The Bessel-Thompson magnitude response, while lowpass, is inferior even to
the Butterworth lter of the same order. For low frequencies, the group delay of a Bessel-Thomson
lter is nearly constant and equals 1/1 . Thus, a normalized (1 = 1) Bessel-Thomson lter
delivers a constant group delay of tg = 1 s, at least for low frequencies. As the order K is increased,
the bandwidth with constant group delay increases, as does the passband edge. As large order
analog lters are dicult to realize, it is also possible to increase the passband and constant-delay
bandwidths by increasing 1 . Notice, however, that increasing 1 produces the corollary eect of
reducing the delay by a factor 1/1 . These characteristics are illustrated in Fig. 2.49. To design
Bessel lters, we use plots for magnitude and delay response to determine the lter order K to meet
given specications. The details can be found in the literature [5,7].
2.8. Summary
149
|H(j)|
1
(a)
K=1
21
31
10
61
91
d
d
H(j)
1
1
10
6
(b)
3
K=1
0
21
31
61
91
Figure 2.49: Normalized Bessel-Thomson lters: (a) magnitude response and (b) delay response.
Design a fth-order Bessel-Thomson lter that provides low-frequency delay of 100 s. Plot the lters
magnitude response, and identify the lters 3-dB cuto frequency. Plot the lters delay response, and
determine the bandwidth for which this delay is approximately constant.
2.8
Summary
Using the material reviewed in Ch. 1, this chapter introduces and develops the analysis and design of
continuous-time systems from a frequency-domain or ltering perspective. The key to a frequencybased perspective is the crucial concept of frequency response H(). In general, frequency response
is complex valued. Thus, H() is typically presented in terms of the magnitude response |H()|
and the phase response H().
A sinusoidal input to a LTIC system produces an identical frequency sinusoid output, and the
system frequency response dictates how the magnitude and phase of the input sinusoid change. A
plot of |H(j)| versus indicates the magnitude gain for input sinusoids of various frequencies. A
plot of H(j) versus indicates the phase shift for input sinusoids of various frequencies. Together,
the magnitude and phase responses completely capture a systems ltering characteristics.
Frequency response is intimately connected to the locations in the complex plane of the poles and
zeros of the system transfer function. Placing a pole (a zero) near a frequency j0 in the complex
plane enhances (suppresses) the frequency response at the frequency = 0 . A proper combination
of poles and zeros at suitable locations yields desired and predictable lter characteristics. Thus,
pole-zero plots are useful to both the system analysis and design.
Signal transmission through an LTIC system is conveniently represented as the product of the
input signal spectrum with the system frequency response, Y () = X()H(). For a distortionless
150
transmission of signals through an LTIC system, the magnitude response must be constant, and the
phase response must be linear with over the band of interest. The negative of the slope of the
phase response (with respect to ) is the system time or group delay, also called envelope delay in
the context of bandpass signals.
Standard lters are classied as lowpass, highpass, bandpass, or bandstop. Ideal lters, with
innitely sharp transition bands and no delay (zero phase response), possess noncausal impulse
responses and are thus unrealizable. Proper delay and truncation of the impulse response produce a
causal, and thus realizable, lter that closely approximates the desired ideal. Delay and truncation
can produce near distortionless transmission over the lter passband. Time-domain truncations,
including those caused by windowing operations, result in the impairments of spectral spreading
and leakage. Wide windows that taper gradually toward zero produce the smallest spreading and
leakage. Dual problems arise for data truncations in the frequency domain.
Practical lters are typically specied in terms of passband and stopband frequencies (p and s )
and either passband and stopband ripple (p and s ) or maximum passband and minimum stopband
attenuation (p and s ). Transformation rules convert a lowpass prototype lter to a highpass,
bandpass, bandstop, or another lowpass response. Filter transformations simplify the design process
by allowing us to concentrate our design eorts on a single type of lter, typically lowpass.
To facilitate the design of practical and realizable continuous-time analog lters, several lter
families are considered: Butterworth, Chebyshev, inverse Chebyshev, elliptic, and Bessel-Thomson.
A Butterworth lter has a maximally at magnitude response over the passband. A Chebyshev
lter has equiripple passband magnitude response and monotonic stopband response; the inverse
Chebyshev response reverses these roles and provides monotonic passband and equiripple stopband.
An elliptic lter provides both passband and stopband ripple. Bessel-Thomson lters, unlike the
others, strive to provide a at delay response (constant group delay) over the passband.
As we shall see in the upcoming chapters, all the topics of this chapter are relevant to the study
of digital signal processing. To see how, we need rst understand the process of sampling, which is
the focus of the next chapter.
References
1. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
2. Guillemin, E. A., Theory of Linear Physical Systems, Wiley, New York, 1963.
3. Mitra, S. K., and Kaiser, J. F., Handbook for Digital Signal Processing, Wiley, New York, 1993.
4. Harris, F. J., On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform, Proc. IEEE, Vol. 66, No. 1, January 1978, pp. 5183.
5. Van Valkenburg, M. E., Analog Filter Design, Holt, Rinehart, and Winston, New York, 1982.
6. Porat, B., A Course In Digital Signal Processing, Wiley, New York, 1997.
7. Chen, W. K., Passive and Active Filters, Wiley, New York, 1986.
Problems
151
Problems
2.1-1 Find the response of an LTIC system with
3s
transfer function H(s) = s2 +2s+2
to the
following everlasting sinusoidal inputs:
(a) 3 sin(t + /5)
(b) 7 cos(2t /3)
(c) 10 sin(3t 80 )
(t)
is
a
distorted
version
of x(t) with
lasting input x(t) = e cos(2t). Is such
Fourier
transform
given
by
X()
=
an input physically practical? Why or why
j0 sgn()
.
X()e
not.
2.1-4 Unlike H(s), a pole-zero plot is an incomplete description of an LTIC system. Explain why.
2.1-5 For each of the following transfer functions, determine and plot the poles and zeros of H(s), and use the pole and zero information to predict overall system behavior. Conrm your predictions by graphing the systems frequency response (mag- 2.3-1 Show that a lter with frequency response
nitude and phase).
5
) jt0
H() = 2(10
2 +1010 e
(a) H(s) =
is unrealizable. Can this lter be made aps3
proximately realizable by choosing a sus3 +20s2 +200s+1000
ciently large t0 ? Use your own (reasonable)
(b) H(s) =
criterion of approximate realizability to determine t0 .
0.1s4 +1.4s2 +0.9
s4 +1.2s3 +6.8s2 +3.6s+9
(c) H(s) =
0.03s4 +1.76s2 +15.22
s4 +2.32s3 +9.79s2 +13.11s+17.08
(d) H(s) =
0.94s4 +11.33s2 +33.99
s4 +0.94s3 +12.66s2 +5.64s+36
152
R
x(t)
+
y(t)
Figure P2.3-3
(a) Find the system transfer function.
2.5-2 Develop a magnitude response description for a typical coee lter. Determine
the type of response (lowpass, highpass,
(c) Show that a lowpass signal x(t) with
bandpass, or bandstop) that is appropriate,
6
bandwidth W 10 will be transand provide suitable values (such as p and
mitted practically without distortion.
s ) to specify the response.
Determine the output.
(d) Determine the approximate output if 2.6-1 Determine the lter H(s) that results by
applying the following transformations on
a bandpass signal x(t) = g(t) cos(c t)
a lowpass prototype lter given as Hp (s) =
is passed through this lter. Assume
1
that c = 3 106 and that the enves3 +2s2 +2s+1 . Plot the corresponding magnitude response. In each case, designate 0
lope g(t) has a very narrow band, on
as the prototypes 1-dB cuto frequency.
the order of 50 Hz.
2.4-2 An ideal
Bt LPF impulse response h(t) =
B
is windowed using a rectangular
sinc
(d) A lowpass-to-bandstop transforma
Problems
153
154
Chapter 3
3.1
Generally, sampling is considered as any process that records a signal at discrete instances. In this
chapter, we restrict our attention to uniform sampling. In uniform sampling, sample values are
equally spaced from one another by a xed sampling interval T . Although we focus on temporal
sampling where the independent variable is time, our results apply equally well to other cases such
as spatial sampling. The reciprocal of the sampling interval is called the sampling frequency (or
sampling rate) Fs = T1 , which has units of hertz.
There are two common views of sampling: point sampling and impulse sampling. Figure 3.1
illustrates both. Point sampling, as shown in Fig. 3.1b, oers an intuitive and practical representation
of the original signal shown in Fig. 3.1a. Point sampling produces a sequence of (usually) nitevalued numbers. Mathematically, we designate point sampling as
x[n] = x(nT ).
(3.1)
Following common convention, we use square brackets to emphasize that point sampling results in
a discrete-time sequence that is only dened for integer values of the argument. Chapter 4 fully
covers discrete-time signals, which include point-sampled signals.
Impulse sampling, as shown in Fig. 3.1c, looks similar to point sampling but is constructed
of scaled Dirac delta functions. Although the physically unrealizable and unbounded amplitudes
of the impulses somewhat diminish the intuition of this view, impulse sampling is often easier to
155
156
x(t)
t
(a)
x(t)
x[n]
2T
3T
4T
5T
(c)
(b)
Figure 3.1: Views of sampling: (a) original signal, (b) point sampling, and (c) impulse sampling.
mathematically analyze. Further, impulse sampling oers advantages to better understand multirate systems as well as mixed systems with both continuous-time and discrete-time components.
Unlike point sampling, which produces a truly discrete-time sequence, impulse sampling produces
a continuous-time signal, although it is zero almost everywhere. Mathematically, we designate an
impulse-sampled signal as x(t). Here and elsewhere, the tilde designates a periodic replication;
is a periodic replication of Dirac delta functions (t).
thus, (t)
Despite the very dierent constructions of x[n] and x(t), point sampling and impulse sampling
provide entirely equivalent information. Intuitively, we expect nothing less given the similarities in
Figs. 3.1b and 3.1c. This equivalence is further conrmed in the frequency domain. As we shall see
in Ch. 6, the Fourier spectra of point-sampled and impulse-sampled signals are identical. For the
remainder of this chapter, we deal primarily with impulse sampling. This is particularly appropriate
given the foundations laid in previous chapters for continuous-time signals and systems.
The sampling theorem, also called the Nyquist sampling theorem or the Nyquist criterion, states
that a real signal whose spectrum is bandlimited to B Hz can be reconstructed exactly, without any
error, from its samples taken uniformly at a rate Fs > 2B samples per second. In other words, the
minimum sampling frequency just exceeds twice the hertzian bandwidth. Stated mathematically for
the lowpass case where X() = 0 for || > 2B,
lossless sampling requires Fs > 2B.
(3.2)
157
should use Eq. (3.2) and sample at a rate above Nyquist. In practice, where lters are not ideal,
sampling rates are usually chosen modestly above the Nyquist rate; a rate 20% greater is common.
To prove, and more importantly to understand, the sampling theorem, it is helpful to investigate
the sampling operation in both the time and frequency domains. Consider a signal x(t) (Fig. 3.2a)
whose spectrum is bandlimited to B Hz (Fig. 3.2d). Although the spectra in Fig. 3.2 are shown as
real, our arguments are valid for the complex case as well. For convenience, spectra are shown as
, or Hz.
functions of 2
x(t)
X(0)
X()
(a)
(d)
(t)
()
2
T
3T
5T
2Fs
Fs
Fs
(b)
X(0)
T
3T
2Fs
(e)
x(t)
5T
X()
2Fs
Fs
(c)
Fs
2Fs
(f)
Figure 3.2: Impulse sampling: (a)(c) time domain and (d)(f) frequency domain.
Impulse sampling signal x(t) at a rate of Fs Hz (Fs samples per second) is accomplished by
= x(t)
x(t) = x(t)(t)
n=
(t nT ) =
x(nT )(t nT ).
(3.3)
n=
(3.5)
158
To nd X(), the Fourier transform of x(t), we take the Fourier transform of the right-hand side
of Eq. (3.5), term by term. The transform of the rst term in the brackets is X(). The transform
of the second term, 2x(t) cos(s t), is X( s ) + X( + s ) (see Eq. (1.90)). This represents
spectrum X() shifted to s and s . Similarly, the transform of the third term, 2x(t) cos(2s t),
is X( 2s ) + X( + 2s ), which represents the spectrum X() shifted to 2s and 2s , and so
on to innity. These results mean that the spectrum X() consists of X() repeating periodically
1
with period s = 2
T rad/s, or Fs = T Hz, as depicted in Fig. 3.2f. Thus, including the scale factor
1/T found in Eq. (3.5),
1
X( ks ).
(3.6)
X() =
T
k=
If we are to reconstruct x(t) from x(t), we should be able to recover X() from X(). Error-free
recovery is possible if there is no overlap between adjacent edges of the successive replicates in X().
Figure 3.2f indicates that this requires
Fs > 2B
or T <
1
.
2B
impulse sampler
(t)
x(t)
X()
ideal LPF
x(t)
X()
H()
T
x
(t)
X()
An Elegant Alternative
To provide deeper understanding of sampling and the sampling theorem, we now present an elegant
alternative to nding X(). Starting with Eq. (3.4) and taking its Fourier transform yield
1
()
= [2() + 2 [( s ) + ( + s )] + 2 [( 2s ) + ( + 2s )] + ] .
T
More compactly, we see that
=
(t)
(t nT ) ()
=
( ks ).
T
n=
(3.7)
k=
159
The spectrum X() of our impulse-sampled signal is now simple to obtain. Since x(t) is a
1
1
) d
X() () =
X() =
X()(
2
2
2
1
X()
( ks ) d
=
2
T
k=
1
=
X()( ks ) d
T
X() =
1
T
k=
X( ks )
(3.8)
k=
Thus, the spectrum of an impulse-sampled signal is a scaled and periodic replication of the original
spectrum, where each copy is spaced s rad/s (or Fs Hz) apart. Equation (3.8) conrms, as stated
in Table 1.4, that the transform of a discrete (sampled) signal is necessarily periodic.
The sampling theorem demonstrated here uses samples taken at uniform intervals. This condition
is not necessary. Samples can be taken arbitrarily at any instants as long as the sampling times are
recorded and there are, on average, 2B samples per second [2]. The essence of the sampling theorem
has been known to mathematicians for a long time in the form of the interpolation formula, which
we present later as Eq. (3.13). The origin of the sampling theorem was attributed by H. S. Black
to Cauchy in 1841. The essential idea of the sampling theorem was rediscovered in the 1920s by
Carson, Nyquist, and Hartley.
Using signal x(t) = sinc2 (5t) (Fig. 3.4a) with spectrum X() = 0.2( 20
) (Fig. 3.4b), plot the
impulse-sampled signals and spectra when sampling is at the Nyquist rate, at half the Nyquist
rate (undersampling), and at twice the Nyquist rate (oversampling).
X()
x(t)
0.2
0.2
0
(a)
0.2
(b)
Figure 3.4: (a) x(t) = sinc2 (5t) and (b) X() = 0.2( 20
)
The bandwidth of x(t) is 5 Hz (10 rad/s). Consequently, the Nyquist rate is 10 Hz, and the Nyquist
1
interval is T = 2B
= 0.1 seconds. The spectrum X() of the sampled signal x(t) consists of
1
160
since they occur where x(t) equals zero. The spectrum X(), shown in Fig. 3.5d, consists of
overlapping repetitions of T1 X() spaced every 5 Hz. Not surprisingly, since the time-domain signal
is a single impulse function, these overlapping spectra add to a constant. Due to the overlapping
spectral components, X() is not recoverable from X(), and x(t) cannot be reconstructed from
the samples x(t).
In the nal case, the sampling rate is 20 Hz, which represents an oversampling condition. The
impulses of x(t) are spaced more closely together, as shown in Fig. 3.5e. Consequently, the repetitions of T1 X() are spaced more widely apart, as shown in Fig. 3.5f, leaving large gaps between
copies. Hence, X() can be recovered from X() using a lter with constant gain for frequencies
below 5 Hz and zero gain beyond 10 Hz. These lter specications, while technically unrealizable,
can be closely satised by practical, realizable lters.
Sampling Frequency Fs
Sampling Interval T
10
0.1
5
20
0.2
0.05
1
T
X()
Comments
2( 20
)
( 20 )
4( 20
)
Nyquist sampling
Undersampling
Oversampling
X()
x(t)
0.2
0.2
20
10 5
(a)
10
20
(b)
X()
x(t)
0.2
0.2
20
10 5
(c)
x(t)
0.2
0.2
(e)
10
20
(d)
X()
20
10 5
10
20
(f)
Figure 3.5: Investigating dierent sampling rates: (a)(b) Nyquist sampling, (c)(d) undersampling,
and (e)(f) oversampling.
Example 3.1
161
Drill 3.1 (Determining the Nyquist Rate and the Nyquist Interval)
Determine the Nyquist rate and the Nyquist interval for the signals
(a)
xa (t) = sinc(100t)
(b)
(c)
(d)
3.1.1
Practical Sampling
In proving the sampling theorem, we assumed ideal samples obtained by multiplying a signal x(t) by
an impulse train that is physically unrealizable. In practice, we multiply a signal x(t) by a T -periodic
train p(t) (Fig. 3.6b) that is comprised of component pulses p(t). Mathematically, p(t) is a periodic
replication of p(t) constructed as
p(t nT ).
(3.9)
p(t) =
n=
Although the component pulses p(t) typically possess nite duration that is smaller than T , this
condition is not necessary.
The pulse-sampled signal xp(t), which equals the product p(t)x(t), is illustrated in Fig. 3.6c. Is
it possible, we might wonder, to recover or reconstruct x(t) from xp(t)? Perhaps surprisingly, the
answer is armative, provided that the sampling rate is not below the Nyquist rate. The signal x(t)
can be recovered by lowpass ltering xp(t) as if it were sampled by an impulse train.
The plausibility of this result becomes apparent when we consider the fact that reconstruction
of x(t) requires knowledge of the impulse-sampled values. This information is available or built
into the sampled signal xp(t) because the nth sampled pulse strength is x(nT ). To prove the result
analytically, we observe that the pulse train p(t) depicted in Fig. 3.6b, being a periodic signal, has
a Fourier series given by
Pk ejks t ,
p(t) =
k=
where s = 2Fs . As shown in Fig. 3.6e, the spectrum P () of pulse train p(t) is an impulse train
weighted by the scaled Fourier series coecients 2 Pk . The pulse-sampled signal xp(t) is therefore
represented as
Pk ejks t x(t),
xp(t) = p(t)x(t) =
k=
162
x(t)
X(0)
X()
(a)
(d)
p(t)
2 P1
3T
5T
P ()
2 P0
2 P1
2 P2
2 P2
2Fs
Fs
(b)
Fs
2Fs
Fs
2Fs
(e)
xp(t)
Xp()
P0 X(0)
3T
5T
2Fs
Fs
(c)
B
(f)
Figure 3.6: Practical pulse sampling: (a)(c) time domain and (d)(f) frequency domain.
and using the frequency-shifting property, its spectrum is
Xp() =
Pk X( ks ).
k=
As shown in Fig. 3.6f, Xp() is comprised of copies of X(), each separated by Fs and weighted by
the appropriate Fourier series coecient Pk . As long as Fs > 2B, a lowpass lter with gain 1/P0
is all that is necessary to recover x(t) from xp(t). The block diagram representation of the pulse
is replaced with p(t).
sampling and recovery process shown in Fig. 3.7 follows from Fig. 3.3 if (t)
pulse sampler
x(t)
X()
p(t)
ideal LPF
xp(t)
Xp()
1
0
P
H()
x
(t)
X()
163
t0.1n
Consider the signal x(t) = sinc2 (5t) and the pulse train p(t) =
n= ( 0.025 ). Plot the pulsesampled signal xp(t) = p(t)x(t) and its spectrum Xp(). Is xp(t) sampled above, below, or at the
Nyquist rate? If xp(t) is applied to a unit-gain ideal lowpass lter with a bandwidth of 5 Hz, what
is the output signal y(t)?
), shown
From Ex. 3.1, we know that x(t), shown in Fig. 3.8a, has spectrum X() = 0.2( 20
in Fig. 3.8d. The bandwidth of x(t) is 5 Hz.
X()
x(t)
1
0.2
0.2
0.2
(a)
(d)
p(t)
1
2 P1
2 P0
P ()
2 P1
2 P2
0.2
0.2
2 P2
10
20
(b)
xp(t)
20
10
20
(e)
0.2P0
10
Xp()
0.2
0.2
10 5
20
(c)
5
(f)
Figure 3.8: Rectangular pulse sampling: (a)(c) time domain and (d)(f) frequency domain.
As shown in Fig. 3.8b, p(t) is a 25% duty-cycle rectangular pulse sequence with period T = 0.1 s.
Using Eqs. (1.57) and (1.58), the corresponding Fourier series is
p(t) =
Pk ejks t =
k=
where s =
2
T
1
sinc(k/4)ejks t ,
4
k=
2 Pk ( ks ) =
k=
2
sinc(k/4)( ks ),
4
k=
1
T
164
As shown in Fig. 3.8c, the pulse-sampled signal xp(t) is the product of x(t) and p(t). Using
the multiplication property of Eq. (1.96), the spectrum Xp() is the convolution of X() and P ()
1
scaled by 2
, as shown in Fig. 3.8f. When xp(t) is passed through a unit-gain ideal lowpass lter,
the output y(t) is just x(t) scaled by P0 = 14 . Thus,
y(t) =
1
x(t).
4
Example 3.2
Drill 3.2 (Not All Pulses Are Appropriate for Pulse Sampling)
Show that the pulse p(t) used to construct the sampling pulse train p(t) in Eq. (3.9) cannot have zero area
if we wish to reconstruct a lowpass signal x(t) by lowpass ltering the sampled signal.
3.2
Signal Reconstruction
The process of reconstructing a continuous-time signal x(t) from its samples is also known as interpolation. In Sec. 3.1, we saw that a signal x(t) bandlimited to B Hz can be reconstructed (interpolated)
exactly from its samples x(t) if the sampling frequency Fs > 2B Hz or, equivalently, the sampling
interval T < 1/2B. This reconstruction is accomplished by passing the sampled signal through an
ideal lowpass lter with gain T and bandwidth between B and Fs B Hz, as shown in Fig. 3.3.
From a practical viewpoint, a good bandwidth choice is the middle value Fs /2 Hz. This value allows
for small deviations in the ideal lter characteristics on either side of the cuto frequency. With this
choice of cuto frequency and gain T , the ideal lowpass lter required for signal reconstruction (or
interpolation) is
T
H() = T
=T
,
(3.10)
2Fs
2
and signal reconstruction is described as
X()
= X()H().
(3.11)
(3.12)
This impulse response, depicted in Fig. 3.9b, corresponds to the special but most-common case when
the lter bandwidth is set to Fs /2. Observe the interesting fact that h(t) = 0 at all sample instants
t = nT except t = 0. When the sampled signal x(t) is applied at the input of this ideal lter, the
output is x
(t), a reconstruction of the original signal x(t).
To determine x
(t), rst notice that each sample in x(t), being an impulse, generates a sinc pulse
of height equal to the strength of the sample, as illustrated in Fig. 3.9c. Adding all the sinc pulses
165
generated by the samples results in x(t). More formally, the nth sample of the input x(t) is the
impulse x(nT )(t nT ), and the lter output of this impulse is x(nT )h(t nT ). Summing over all
impulses that comprise x(t), the lter output is thus
x
(t) =
=
x(nT )h(t nT )
n=
t nT
x(nT )sinc
.
T
n=
(3.13)
In other words, we can view the reconstruction of x(t) as a sum of weighted, shifted sinc functions,
as illustrated in Fig. 3.9c. This construction is similar to others we have seen, where signals are
constructed of weighted sums of shifted functions such as impulses or complex exponentials. Considering Eq. (3.13) another way, each sample in x(t), being an impulse, generates a sinc pulse of
height equal to the strength of the sample. Addition of the sinc pulses generated by all the samples
results in x
(t).
H()
h(t)
F2s
0
(a)
Fs
2
2T
0
(b)
2T
x
(t)
(c)
Figure 3.9: Ideal interpolation with an Fs /2 reconstruction lter: (a) frequency response, (b) impulse
response, and (c) signal reconstruction.
Equation (3.13) is the interpolation formula. Since h(t) = 0 at all sample instants t = nT
except t = 0, this formula returns values x(nT ) without much work; only one term in the sum is
nonzero. For all times that are not sample instants (t = nT ), however, the formula requires every
sample value from to in order to produce x
(t). You can never sample a signal long enough
to perform ideal reconstruction. Consequently, more practical measures are required for real-world
signal interpolation.
166
There is one and only one signal that satises the conditions of this problem, and it is determined using the interpolation formula of Eq. (3.13). Since all but one of the samples are zero, only
one term (corresponding to n = 0) in the summation on the right-hand side of Eq. (3.13) survives.
Further, since x(t) is bandlimited to Fs /2 Hz, the reconstruction x(t) equals x(t) exactly. Thus,
x(t) = sinc(t/T ) = x(t).
This signal is identical to that shown in Fig. 3.9b.
Example 3.3
Consider the 0.25-Hz sinusoid cos(t/2) sampled at a rate Fs = 1 Hz. Reconstruct this signal from
its samples over 2 t 2 (one period) using a suitable truncation of the ideal interpolation
formula. Compute the resulting RMS error of the truncated approximation x
N (t).
Although the interpolation formula requires samples from all time to exactly reconstruct a signal, a truncated reconstruction x
N (t) that is nearly error-free over an interval is possible using a
nite set of samples. Since samples weight sinc functions that asymptotically decay, the impact of
each sample is primarily local in nature. Thus, we need only include a limited number of samples
outside the desired interval of reconstruction.
In the current case, the reconstruction interval contains 5 samples. We extend this number by
10 in both directions to obtain our approximation, which is computed in MATLAB.
01
02
03
04
05
06
Line 01 denes the original signal, creates a time vector for the reconstruction, initializes the estimate to zero, and sets the sampling interval. The loop of lines 0204 evaluates the sum of Eq. (3.13)
truncated to 10 + 5 + 10 = 25 terms. Notice that the samples x(nT ) only take on values of 1, 0,
or 1; the CT nature of our reconstruction comes from the sinc functions. The result, plotted in
line 05 and shown in Fig. 3.10, is nearly indistinguishable from the original sinusoid cos(t/2). The
RMS error of the interpolation, computed in line 06, is less that 1% of the peak signal value. By
increasing the number of terms (line 02), the reconstruction is improved to any desired level.
x
N (t)
167
1
x(nT ) =
0
|n| N
.
otherwise
Use Eq. (3.13) to interpolate these samples for the N = 5 case. Plot the result. Is the interpolation x
(t) a
continuous-time rectangular pulse? Explain.
h(t)
1
ideal
T2
T
2
2Fs
(a)
Fs Fs
2
Fs
2
Fs
2Fs
(b)
x
zoh (t)
(c)
Figure 3.11: ZOH interpolation: (a) impulse response, (b) magnitude response, and (c) signal
reconstruction.
The sampled signal x(t) consists of an impulse train where the nth impulse at t = nT has
strength x(nT ). When passed through a ZOH, each sample in x(t), being an impulse, produces at
For
convenience, Fig. 3.11a presents a noncausal, and therefore unrealizable, impulse response. A simple delay of
T /2 renders h(t) causal at a cost of a T /2 delay in the lter output.
168
the output a gate pulse of height equal to the strength of the sample. Summed together, the lter
output x
zoh (t) is a staircase approximation of x(t), as shown in Fig. 3.11c. More generally, when an
impulse-sampled signal is passed through a lter, the output is a weighted sum of shifted impulse
response functions. In the case of ideal interpolation, the output is a superposition of sinc functions.
For ZOH interpolation, the output is a superposition of nonoverlapping but adjacent rectangular
pulses.
We can improve on the ZOH lter by using a rst-order hold lter, which results in a straightline (linear), rather than staircase, approximation. The linear interpolation lter, whose impulse
t
), results in an interpolation in which successive sample tops are
response is the triangle pulse ( 2T
connected by straight-line segments (see Prob. 3.2-4).
3.3
Consider the signal sampling and reconstruction procedure, illustrated in Fig. 3.3. If x(t) is sampled
at the Nyquist rate Fs = 2B Hz, the spectrum X() consists of repetitions of X() without any
gap between successive cycles, as depicted in Fig. 3.12a. To recover x(t) from x(t), we need to pass
the sampled signal x(t) through an ideal lowpass lter, shown shaded in Fig. 3.11b. As seen in
Sec. 2.3, such a lter is unrealizable; it can be approximated with ever-decreasing error only with
ever-increasing time delay in the response. In other words, we require innite time delay to recover
the signal x(t) from its samples. A practical solution to this problem is to sample the signal at a rate
higher than the Nyquist rate (Fs > 2B). The resulting spectrum X() consists of repetitions of
X() that are spaced with a nite gap between successive cycles, as illustrated in Fig. 3.12b. Thanks
to the spectral gaps, we can now recover X() from X() using a lowpass lter with a gradual
transition between passband and stopband. But even in this case, the lter gain must be zero for
frequencies above Fs B in order to suppress unwanted spectrum. According to the Paley-Wiener
criterion (Eq. (2.19)), it is impossible to realize even this lter. The only advantage in this case
is that the required lter can be closely approximated with a smaller time delay. All this means
that it is impossible in practice to recover a bandlimited signal x(t) exactly from its samples, even
if the sampling rate is higher than the Nyquist rate. However, as the sampling rate increases, the
recovered signal approaches the desired signal more closely.
X()
3Fs
2Fs
Fs B
2Fs
Fs
3Fs
(a)
X()
2Fs
Fs
Fs
2Fs
(b)
Figure 3.12: Sampled signal spectra: (a) Nyquist rate and (b) above Nyquist rate.
169
X()
F2s
(a)
Fs
2
F2s
X()
Xaa,()
Fs
F2s
(b)
Fs
2
(d)
Fs
Fs
F2s
X()
(e)
Fs
2
Fs
aa ()
X
reconstructed
reconstructed
original
F2s
Fs
2
(c)
Fs
2
original
F2s
(f)
Fs
2
Figure 3.13: Frequency-domain demonstration of the aliasing eect: (a)(c) original signal, sampled,
and reconstructed, and (d)(f) ltered signal, sampled, and reconstructed.
Because of the innite bandwidth of X(), spectral overlap in X() is unavoidable, regardless
of the sampling rate. Sampling at a higher rate reduces but does not eliminate the overlap between
repeating spectral cycles. Figure 3.13b shows a somewhat simplied picture where from the innite
number of repeating cycles, only the neighboring spectral cycles signicantly overlap. All practical
spectra must decay at higher frequencies, so such a situation is not uncommon. When broader
overlap exists that produces interference from cycles other than immediate neighbors, the picture is
a little more complicated. We treat this situation later with a discussion of multiple folding.
Because of the overlapping tails, X() no longer has complete information about X(), and it
is no longer possible, even theoretically, to recover x(t) exactly from the sampled signal x(t). If the
sampled signal is passed through an ideal lowpass reconstruction lter with cuto frequency Fs /2
170
ideal lowpass
anti-aliasing lter
xaa (t)
Xaa ()
impulse
sampler
xaa,(t)
Xaa,()
171
is to rst use a low-order anti-aliasing lter with relatively poor performance, next oversample the
signal, and then apply a highly selective digital lter prior to further processing; these ideas are
developed in later chapters.
By plotting the appropriate spectra, verify that samples of x(t) = cos[(s /2 + 1 )t], where 0 1 < s /2,
are equivalent to samples of y(t) = cos[(s /2 1 )t]. Is the result also true for 1 > s /2? Explain.
X() is bandlimited to Fs /2 Hz. Hence, the samples x(t), which are sub-Nyquist samples of x(t),
are Nyquist samples for the signal x
(t). In other words, sampling a non-bandlimited signal x(t) at
a rate Fs Hz makes the samples appear as if they are the Nyquist samples of a bandlimited signal
x
(t) with bandwidth Fs /2 Hz. A similar conclusion also applies if x(t) is bandlimited but sampled
at a sub-Nyquist rate. The frequency band from Fs /2 to Fs /2 is called the fundamental band.
Endless Curses of Aliasing: Multiple Overlap, Multiple Folding
The picture in Fig. 3.13b does not fully illustrate the woes caused by aliasing. We deliberately
simplied the picture to avoid confusion. Figure 3.15 provides a more accurate picture. As Eq. (3.6)
requires, the sampled signals spectrum X() (light solid line) is a sum of the scaled original
signals spectrum T1 X() replicated every Fs Hz (light dashed lines). Because the original signal
is non-bandlimited, each replication of X() overlaps with every other. In this case, however, the
sampling rate is signicantly sub-Nyquist, which results in signicant and extended overlap between
the replicated spectra. Unlike Fig. 3.13b, at any given frequency, more than two overlapping pieces
are signicant to X(). To appreciate the true dimensions of the aliasing problem, we need to
take account of multiple overlap. The curse of aliasing is a kind of mini eternal damnation for the
original sin of undersampling or not using an anti-aliasing lter. Had we used an anti-aliasing lter,
we would have been saved.
When sampling time-domain signals that are real, there is another way to picture how the
spectrum X() is constructed. In such cases, rst note that we only need to know X() over the
positive fundamental band, shown shaded in Fig. 3.15. Everything else is known due to required
symmetry and periodicity. Over this interval, we obtain X() from a single copy of T1 X(), folded
repeatedly at intervals of Fs /2. To visualize the process, consider T1 X() printed for 0 on
a transparent piece of paper. Next, we fold this paper accordion style along the frequency axis,
making folds every Fs /2. The rst aliased segment follows the rst fold, the second aliased segment
follows the second fold, and so forth. Because T1 X(), as well as all practical spectra, extends to
innity, the process continues ad innitum, repeatedly folding every Fs /2. The end result is shown
in the shaded region of Fig. 3.15 using a heavy solid line. To obtain X(), we add together all the
segments.
The multiple folding process of Fig. 3.15 is clumsier than using Eq. (3.6) to compute X().
Primarily, it provides a useful way to conceptualize and visualize aliasing. The folding analogy
shown in Fig. 3.15, it should be stressed, does not work properly on the spectra of complex timedomain signals, which lack the necessary frequency-domain symmetry; such cases are better treated
using the standard superposition of overlapping replications. Further, Fig. 3.15 gives a simplied
treatment of multiple folding on the assumption that, in addition to x(t), the spectrum X() is
172
X()
1
T
1
T
X( + s )
1
T
X()
X( s )
1
T
X( 2s )
fold 1
fold 2
Fs
F2s
Fs
2
Fs
3Fs
2
2Fs
observers will notice that these segments correspond to the shaded bands of Fig. 3.17c.
173
aliasing can have serious consequences, even when the interfering noise is small. It is therefore
crucial to use an anti-aliasing lter, which, by cutting o the tail beyond Fs /2, wipes out the entire
gang of outlaws.
Although we cannot stop the imposters completely, we can, with proper choice of sampling
rate and use of anti-aliasing lters, render the damage they do inconsequential. When proper
precautions are taken, most practical cases involve little or no signicant aliasing eects. As we
shall see in Sec. 3.5, the problem of spectral aliasing has a time-domain dual, which results when
spectral sampling is performed at an inadequate rate.
Ideally, an anti-aliasing lter has a sharp transition at Fs /2. For anti-aliasing applications, explain why,
despite superior transition band characteristics, an elliptic lter, particularly one with even order, may be
inferior to a Butterworth lter of the same order.
3.3.1
Aliasing in Sinusoids
Let us now focus our attention on aliasing in sinusoids. Figure 3.16 shows how, when sampled at
the same rate, sinusoids of two dierent frequencies can generate identical sets of samples. Both
sinusoids are sampled at a rate Fs = 10 Hz (T = 0.1 s). The frequencies of the two sinusoids, 1 Hz
(period 1 s) and 11 Hz (period 1/11 s), dier by Fs = 10 Hz. In fact, a frequency dierence equal
to any integer multiple of Fs produces a similar result.
The root cause of aliasing, as illustrated in Fig. 3.16, is the sampling rate, which is adequate for
the lower frequency sinusoid but is clearly inadequate for the higher frequency sinusoid. The gure
visibly shows that between the successive samples of the higher frequency sinusoid, entire cycles are
bypassed or ignored, which is an unmistakable indication that the sampling rate is sub-Nyquist (too
low). Clearly, the samples do not properly represent the 11-Hz signal. The apparent frequency of
the samples, which always lies in the fundamental band, is equal to 1 Hz in this example. If these
samples are used to reconstruct a signal using a lowpass lter of bandwidth Fs /2, we shall obtain a
sinusoid of frequency 1 Hz.
1 Hz
11 Hz
A Fascinating Picture
We have seen earlier that sampling any signal at frequency Fs Hz causes it to appear as a signal that
is bandlimited to Fs /2 Hz. This means that if we sample a sinusoid of frequency f0 Hz at a rate Fs
Hz, then the resulting samples will appear as samples of a sinusoid with frequency no greater than
Fs /2 Hz. What happens if we increase the frequency f0 continuously without limit? Regardless how
174
high f0 becomes, the resulting sampled sinusoid cannot have frequency greater than Fs /2 Hz. As we
shall see, the sampling process produces a rather fascinating picture as we increase f0 continuously
without limit.
Keeping Up Appearances
The fundamental band is like an exclusive VIP club for signals, and sampled sinusoids are intent on
keeping up appearances that they belong. Regardless of the underlying CT signals true frequency,
the apparent frequency of any sampled sinusoid is always within the fundamental band. Let us now
demonstrate this fact. To begin, we show that samples of a sinusoid of frequency f0 Hz are identical
to those of a sinusoid of frequency f0 + mFs Hz (integer m). The samples of cos[2(f0 + mFs )t + ]
are
cos[2(f0 + mFs )nT + ] = cos(2f0 nT + + 2mn) = cos(2f0 nT + ).
The result follows because mn is an integer and Fs T = 1. Thus, sinusoids of frequencies that dier
by an integer multiple of Fs result in the same set of samples. Conversely, the samples of sinusoids
in any frequency band of width Fs Hz are unique; that is, no two sinusoids in that band have the
same samples (when sampled at a rate Fs Hz). For instance, frequencies in the fundamental band
from Fs /2 to Fs /2 have unique samples.
From the preceding discussion, we conclude that if a continuous-time sinusoid of frequency f0
Hz is sampled at a rate of Fs Hz, then aliasing causes the resulting samples to appear as samples of
a continuous-time sinusoid with apparent frequency fa that is in the fundamental band (Fs /2
fa Fs /2). While apparent frequency can be found by adding or subtracting integer multiples of Fs
to f0 until the fundamental band is reached, it is easier to compute fa according to (see Prob. 3.2-10)
fa = f0 + Fs /2Fs Fs /2,
(3.14)
where ab is the modulo operation a modulo b. Figure 3.17a plots apparent frequency fa versus the
actual frequency f0 of the input sinusoid.
Especially for real signals, the dierence between positive and negative frequencies is often unimportant. For example, a sinusoid of frequency f0 oscillates at the same rate as a sinusoid of frequency
f0 ; they both appear to have frequency f0 . Thus, apparent frequency is most often reported as
|fa |, computed by taking the absolute value of Eq. (3.14). A plot of |fa | versus sinusoid frequency
f0 is shown in Fig. 3.17b.
In fact, as is commonly done, it is possible to express real sinusoids exclusively in terms of positive
apparent frequency |fa | with a possible phase reversal. This is because cos(0 t + ) = cos(0 t ).
The sign of changes if fa is negative. Consider, for example, the sinusoid cos(28000t+) sampled
at a rate Fs = 3000 Hz. Using Eq. (3.14), we obtain fa = 8000 + 15003000 1500 = 1000. Hence,
|fa | = 1000, and the samples appear as if they come from cos(21000t ). Observe the sign change
of the phase because fa is negative. The frequency intervals where such phase changes occur are
shown shaded in Fig. 3.17b.
In light of our discussions of apparent frequency, let us consider a sampled sinusoid of frequency
f0 = Fs /2 + f1 , where 0 f1 < Fs /2. According to Eq. (3.14),
fa = Fs /2 + f1 + Fs /2Fs Fs /2 = f1 Fs /2.
Since f1 < Fs /2, the absolute apparent frequency is |fa | = Fs /2 f1 , which conrms our earlier
observations of frequency folding. Notice, however, the phase of the sinusoid will change sign because
fa is negative.
There is one exception. Consider cos(t+ ) and cos(t+ ), where || < . Although the frequencies and
are dierent, the samples are identical if is zero. In the more general case that is nonzero, however, the samples
are dierent, as expected of two distinct frequencies.
See Drill 3.7 for additional insights about this rule.
175
fa
f
3Fs
Fs
2
f0
2Fs
Fs
5Fs
2
f0
2Fs
F2s
(a)
3Fs
2
|fa |
Fs
2
Fs
Fs
2
Fs
3Fs
2
2Fs
Fs
2
f0
|fa |
0
(b)
(c)
Figure 3.17: Apparent frequency of a sampled sinusoid of frequency f0 : (a) fa , (b) |fa |, and (c)
multiple folding to obtain |fa |.
Show that samples of 90-Hz and 110-Hz sinusoids of the form cos(2f0 t) are identical when sampled at a
rate of 200 Hz. Are the samples identical if the sinusoids are of the more general form cos(2f0 t + )?
For fa < 0, the apparent sinusoid of signal cos(2f0 t + ) is cos(2|fa |t ), which includes a sign change
of the phase term . If instead the form of our sinusoidal signal is sin(2f0 t + ), show that when fa < 0,
the apparent sinusoid is sin(2|fa |t ), which includes a sign change in amplitude as well as phase.
176
A sinusoid of frequency f0 Hz is sampled at a rate of Fs = 100 Hz. Determine the apparent frequency fa
as well as |fa | of the samples if f0 is (a) 40 Hz, (b) 60 Hz, (c) 140 Hz, and (d) 160 Hz.
3.4
A typical bandpass signal spectrum X() is shown in Fig. 3.18a, where the negative-frequency
177
we feel we are overpaying the price. The actual signal bandwidth is only B Hz. Hence, should we
not expect the minimum sampling rate to be 2B rather than 2f2 Hz?
X()
f2
f1
f1
f2
(a)
X()
k =0
f2
k = 3 k = 1
k = 2 k = 2
k = 1
f1
k =3
k =0
f1
f2
(b)
X()
k =0
f2
k =1
k = 1
f1
f1 Fs
f2 Fs
Fs f2
k =0
Fs f1
f1
f2
(c)
X()
k =0
f2
k =1
k = 2
Fs f2
f1
k = 1
k =2
f2 Fs
f1
k =0
f2
(d)
X()
k = (K +1)
k =0
f2
f1
k =K
k = K
k =0
f1
f2
k = K +1
KFs
(K +1)Fs
(e)
Figure 3.18: Sampling a bandwidth B bandpass signal: (a) original spectrum, (b) f2 = 4B and
Fs = 2B, (c) f2 = 4B and Fs = 4.75B, (d) f2 = 4B and Fs = 3.25B, and (e) general sampling case.
Our hunch is correct. We can show that it is possible to reconstruct a bandpass signal x(t) from
its samples taken at a rate 2B Hz [1,2]. However, such a scheme involves more complex second-order
sampling that uses two interlaced sampling trains, each at a rate of B samples per second. The
sampling is taken in pairs, and consequently, the samples are nonuniformly spaced. However, even
178
using our usual uniform sampling, termed rst-order sampling, we shall show that it is possible to
get by with a rate equal to or slightly higher than 2B Hz. In fact, if f2 is an integral multiple of B,
then we need a sampling rate of Fs = 2B Hz exactly.
When uniform samples are taken at a rate Fs Hz, the sampled spectrum consists of the original
spectrum (scaled by 1/T ) replicated every Fs Hz, as given in Eq. (3.6). We can treat this replication
process separately for the positive- and negative-frequency portions of X(). We replicate the
positive-frequency portion (unshaded) rst, spacing each copy at intervals Fs from the original. In a
similar way, we then replicate the negative-frequency portion (shaded). Consistent with Eq. (3.6), we
use k to identify the replicates: k = 0 designates the original-position spectrum, k = 1 corresponds
to copies closest to the original (Fs away), and so forth.
In order to gain intuitive understanding of the process, let us rst consider a special (and simpler)
case where f2 is an integer multiple of the bandwidth B. Let f2 = 4B. If we choose the sampling
rate Fs = 2B, then within the frequency interval f2 to f2 , the sampled spectrum X() shows
eight alternating back to back segments without any overlap and without any idle bands, as shown in
Fig. 3.18b. Just as night must follow day, Eq. (3.6) ensures that negative-frequency copies (shaded)
alternate with positive-frequency copies (unshaded). With Fs = 2B there is no overlap between
repetitions, and the original bandpass signal x(t) can be reconstructed by passing the sampled
signal through a bandpass lter with a B-Hz passband centered between f1 and f2 .
We can t fewer than eight segments by choosing a higher repetition (sampling) frequency Fs .
In such cases, there will be idle bands, and the repetitions will not be back to back. The case
f2 = 4B and Fs = 4.75B, shown in Fig. 3.18c, results in four nonoverlapping pieces. Since there is
no overlap, the original bandpass signal x(t) can be recovered, more easily, in fact, than the case of
Fig. 3.18b, where there are no idle bands to allow practical lter characteristics. The case f2 = 4B
and Fs = 3.25B, shown in Fig. 3.18d, causes overlap, and the original bandpass signal x(t) cannot
be recovered.
As Fig. 3.18 illustrates, dierent sub-Nyquist sampling rates can produce quite dierent results. We see for this f2 = 4B case, for example, that increasing the sampling rate from Fs = 2B
(Fig. 3.18b) to Fs = 3.25B (Fig. 3.18d) actually reduces performance and makes recovery of x(t)
impossible. By further increasing the sampling rate to Fs = 4.75B, we can once again recover x(t).
We would like to better understand this behavior.
Figure 3.18e shows a portion of the spectrum of X() for the general case where f2 is not required
to be an integer multiple of B. In this general case, we cannot typically t an integer number of
repetitions that are back to back. There are necessarily idle bands, and replicates may or may not
overlap. If there is no overlap between segments, as shown in Fig. 3.18e, then we can reconstruct
the signal x(t) from its samples. Counting each shaded and unshaded pair as one replicate of X(),
K represents the number of replicates found within the band from f1 to f1 . Including the original
copy (k = 0), there are K + 1 copies within the band from f2 to f2 . From Fig. 3.18e, it follows
that to be able to reconstruct x(t), that is, to avoid spectral overlap, we must have
KFs < 2f1
(3.15)
Equation (3.15) species the upper and lower bounds of the sampling frequency Fs for a given value
of the integer K. Clearly, the maximum value of K + 1 is the largest integer less than f2 /B. Thus,
. /
f2
Kmax =
1.
(3.16)
B
If
179
Using Eq. (3.15), Fig. 3.19 plots the upper and lower bounds of Fs /B versus f2 /B for various K.
The shaded area is a forbidden region that, if entered, causes spectral overlap and makes recovery
of x(t) impossible. Conversely, the unshaded regions satisfy both inequalities in Eq. (3.15). If the
sampling rate is chosen to lie in an unshaded region, then overlap is avoided, and x(t) is recoverable
from its samples. The K = 0 region, which has no replicates in the band 0 to f2 other than the
original spectrum, corresponds to sampling frequencies that are greater than the Nyquist rate of
2f2 . All other unshaded regions, such as the K = 1 and K = 2 regions, correspond to sub-Nyquist
sampling rates where recovery of x(t) is still possible. To realize the lowest possible sampling rate,
we must select K as large as possible. Notice that the sampling rate can never fall below the
minimum rate of Fs = 2B, which is represented by the horizontal line Fs /B = 2. This minimum
rate is achievable only when f2 is an integer multiple of B. In all other cases, the sampling rate is
higher than this minimum rate 2B Hz. As f2 /B becomes large, however, our minimum achievable
sampling rate tends toward the minimum of 2B.
Fs
B
K=0
K=1
5
K=2
4
K=3
3
8
3
K=4
2
1
f2
B
180
choice would be Fs = 3.05B, which is about 13% above the lowest permissible rate of 2.7B Hz and
about 44% below the Nyquist rate of 5.4B Hz. For the lowest rate of 2.7B Hz, any small downward
drift in the sampling rate would cause spectral overlap, making signal recovery impossible.
Determine the permissible range of the uniform sampling rate for a bandpass signal with f1 = 15
kHz and f2 = 25 kHz.
In this case, B = 2515 = 10 kHz, and f2 /B = 25/10 = 2.5. Using Eq. (3.16), Kmax = 2.51 = 1.
Thus, there are two permissible ranges, corresponding to K = 1 and K = 0.
Using K = 1, the permitted range of the normalized sampling rate Fs /B, as found from Eq. (3.15)
or Fig. 3.19, is 2.5 < Fs /B < 3 or, equivalently, 25 Fs 30 kHz. It is also possible, although
wasteful, to occupy the K = 0 region and set Fs > 2f2 = 50 kHz. Thus, we can sample at any rate
between 25 and 30 kHz and beyond 50 kHz. We cannot, however, sample at a rate between 30 and
50 kHz. The minimum sampling rate is 25 kHz. It appears rather paradoxical that sampling at a
rate 25 kHz is permitted, but 49 kHz is not. Below Nyquist, we enter a marshland of aliasing where
some ground is solid and some is not. As Kmax increases, additional care is required to sidestep the
ever-increasing pockets of unstable (forbidden) ground.
Example 3.6
181
(empty) for bandpass signals. Aliasing deftly uses this empty band to allow sub-Nyquist sampling
rates.
To further understand how aliasing accomplishes this role and satises, in some sense, the Nyquist
criterion, again consider the spectrum X() in Fig. 3.18b, where f2 happens to be an integer
multiple of B (f2 = 4B), and the sampling rate is sub-Nyquist at Fs = 2B < 2f2 . Let us consider
the spectrum within the band B to B. This is a lowpass spectrum of bandwidth B, which we
denote as Xlp (). The entire spectrum X() can be interpreted as Xlp () repeating periodically at
intervals of Fs = 2B Hz. Thus, X() also represents the signal xlp (t) sampled uniformly at a rate
of 2B Hz. The samples of the bandpass signal x(t) are identical to the samples of the lowpass signal
xlp (t), both sets of samples being taken at a uniform rate of Fs = 2B Hz. Moreover, the samples of
xlp (t) contain the complete information of x(t).
Observe that the sampling rate of 2B Hz is the Nyquist rate for xlp (t). Thus, by its nature of
making high frequencies look like low frequencies, aliasing succeeds in making the bandpass signal
x(t) appear as a lowpass signal xlp (t). We are able to sample the bandpass signal at a lower rate,
that is, one that satises the Nyquist criterion for xlp (t), and still be able to reconstruct x(t) from
these samples. Although we explain this behavior of aliasing for a special case where f2 is an integer
multiple of B, a similar argument applies to the general case.
For a bandpass signal with f1 = 5 kHz, f2 = 7 kHz, show that the minimum sampling rate is bound by
14/3 kHz. Furthermore, to recover the signal from its samples, show that the sampling rate may take any
value in the ranges 14/3 < Fs < 5, 7 < Fs < 10, or Fs > 14 kHz.
Consider a complex bandpass signal x(t) with spectrum X() = 1
2
. Sketch X(), calculate
2
2
its spectral width, and determine the sampling rates Fs that allow x(t) to be recovered from its samples.
What is the Nyquist rate for this signal?
3.5
As in other cases, the sampling theorem has a dual. In Sec. 3.1, we discussed the time-sampling
theorem, where we showed that a signal bandlimited to B Hz can be reconstructed from its samples
taken at a rate Fs > 2B samples/s. Note that the signal spectrum exists over the frequency range
B to B Hz. Therefore, 2B is the spectral width (not the bandwidth, which is B) of the signal.
This fact means that a bandlimited signal x(t) can be reconstructed from samples taken at a rate
Fs that exceeds 2B, the spectral width of X().
The spectral sampling theorem states that the spectrum X() of a signal x(t) timelimited to a
duration of seconds can be reconstructed from the samples of X() taken at a rate R samples/Hz,
where R > (the signal width or duration) is in seconds. To understand and develop this theorem,
we rst relate spectral sampling to the periodic replication of a signal in time.
Periodic Replication in Time Produces Spectral Sampling
(t) = n= x(t nT0 ).
To begin, we dene the T0 -periodic replication of an energy signal x(t) as x
Conceptually, we obtain x
(t) (Fig. 3.20c) from the convolution of x(t) (Fig. 3.20a) and a T0 -periodic
182
x(t nT0 ).
(3.17)
n=
Although we omit the details here, Eq. (3.17) is developed in the same straightforward manner as
Eq. (3.6).
X()
x(t)
X(0)
t
(d)
(a)
(t)
T0
T0
2T0
3f0 2f0 f0
x
(t)
2
X(0)
T0
f0
2f0
3f0
2f0
3f0
(e)
(b)
T0
()
2
T0
T0
2T0
X()
3f0 2f0 f0
(c)
f0
(f)
Figure 3.20: Periodic replication in time produces spectral sampling: (a)(c) time domain and
(d)(f) frequency domain.
With the help of the convolution property, the Fourier transform of Eq. (3.17) yields
X()
= X()()
=
2
X(k0 )( k0 ),
T0
(3.18)
k=
X() (Fig. 3.20d) and the impulse train () (Fig. 3.20e). Further, notice that Fig. 3.20 is just
the dual of Fig. 3.2. Equation (3.18) tells us that the spectrum X()
is just a scaled, impulsesampled version of the original spectrum X(). In other words, periodic replication in the timedomain produces sampling in the frequency domain. Much like the temporal sampling rate Fs is the
Expressing
the spectrum of x
(t) using a Fourier series produces a somewhat simpler-looking result that is equivalent
to Eq. (3.18). See Prob. 3.4-4.
183
reciprocal of the time spacing T , the spectral sampling rate R, which has units of samples/Hz, is the
reciprocal of the frequency spacing f0 ,
R=
1
= T0 .
f0
(3.19)
With these results, we are well equipped to understand the spectral sampling theorem.
Understanding the Spectral Sampling Theorem
Just as the sampling theorem of Sec. 3.1 species the conditions necessary to recover a time-domain
signal from its samples, the spectral sampling theorem tells us the conditions necessary to recover
a spectrum from its samples. And just as we cannot recover a time-domain signal that is nonbandlimited from its samples, we also cannot use spectral samples to recover the spectrum of a
non-timelimited signal.
Figure 3.20 helps illustrate the problem with non-timelimited signals. A non-timelimited signal
(Fig. 3.20a), when periodically replicated, has overlap that distorts the underlying time-domain
signal (Fig. 3.20c). There is no way to undo the distortion of x
(t) to recover x(t), and thus, there
c
(Fig. 3.21b).
tiplying its periodic extension x
(t) (Fig. 3.21a) with a time-domain window tT
T0
Mathematically,
t Tc
x(t) = x
(t)
.
(3.21)
T0
As we shall see next, this recovery implies indirectly that X() can, through spectral interpolation,
be reconstructed from its samples, provided that Eq. (3.20) is satised.
Spectral Interpolation
Again consider a timelimited signal x(t) with width < T0 and midpoint Tc , an example of which
is shown in Fig. 3.21c. Similar to the interpolation formula of Eq. (3.13), the spectral interpolation
formula
the spectrum X() of signal x(t) from the samples X(k0 ). Us allows
us to reconstruct
T jT
c
0
c
ing tT
sinc
and the frequency-domain convolution property, the Fourier
T
e
0
T0
2
transform of Eq. (3.21) yields
T0
1
X() T0 sinc
ejTc .
X() =
2
2
Using Eq. (3.18), we obtain
X() =
k=
X(k0 )( k0 ) sinc
T0
2
ejTc .
184
x
(t)
Tc T0
Tc
Tc
Tc +
Tc + T0
(a)
Tc
T0
2
Tc
Tc +
tTc
T0
T0
2
(b)
x(t)
Tc
Tc
Tc +
(c)
k=
T0
k ej(k0 )Tc .
X(k0 )sinc
2
(3.22)
If the pulse x(t) is centered at the origin, then Tc = 0, and the exponential term in Eq. (3.22)
vanishes. In such a case, Eq. (3.22) is the exact dual of Eq. (3.13). Notice that both interpolation
formulas base reconstruction on weighted sinc functions.
Find the unit duration signal x(t), centered at the origin, whose spectrum X(), when sampled at
intervals of f0 = 1 Hz (the Nyquist rate), is
1
k=0
.
X(k2f0 ) =
0 otherwise
We use Eq. (3.22) with Tc = 0 to construct X() from its samples. Since all but one of the
Nyquist samples are zero, only the k = 0 term in the summation survives. Thus, with X(0) = 1 and
T0 = = 1, we obtain
X() = sinc
and x(t) = (t).
2
For a signal of unit duration, this is the only spectrum with the sample values X(0) = 1 and
X(2k) = 0 (k = 0). No other spectrum satises these conditions.
Example 3.7
3.6
185
Analog-to-Digital Conversion
An analog signal is characterized by the fact that its amplitude can take on any value over a
continuous range. Hence, an analog signal amplitude can take on an innite number of values. In
contrast, a digital signal amplitude can take on only a nite number of values. Although digital
signals are either continuous- or discrete-time, practical digital signals are almost exclusively the
latter. Thus, unless stated otherwise, when we refer to digital signals, we mean signals that are both
digital and discrete-time.
Sampling a continuous-time analog signal alone does not yield a digital signal. As discussed
earlier, sampling records a signal at discrete instants (continuous-time to discrete-time conversion).
The recorded values still take on any value in a continuous range. To complete the conversion to
a digital signal, samples must undergo a quantization process. Quantization uses one of various
rules to round a samples amplitude to a permissible value, or quantization level. Quantization is
accomplished through analog-to-digital (A/D) conversion. As we shall soon see, there are many
dierent types of analog-to-digital converters. Since the sampling and quantization processes almost
always occur together, analog-to-digital converters often perform both operations.
Figure 3.22 illustrates one possible quantization scheme. The amplitudes of the original analog
signal x(t) lie in the range (Vref , Vref ). This range is partitioned into L = 8 subintervals, each of
width = 2Vref /L. Next, each sample amplitude x(nT ) is approximated by the midpoint of the
subinterval in which the sample falls. It is clear that each quantized sample xq [n] is approximated
by one of L possible values or states. This is an L-ary digital signal (see Sec. 1.1.2).
xq [n]
Vref
x(t)
5
1
10
11
Vref
186
binary digits. For example, L = 8 requires B = log2 8 = 3 bits to represent each of the eight levels.
Alternately, we can say that B binary symbols can form 2B = L distinct combinations, each one
representing one level.
To transmit or digitally process this binary data, we need to assign a distinct electrical pulse to
each of the two binary states. One possible way is to assign a negative pulse to a binary 0 and a
positive pulse to a binary 1 so that each sample is now represented by a group of B binary pulses
(pulse code). In communications jargon, this is known as pulse-code modulation (PCM).
Figure 3.23 illustrates these ideas for the L = 8 case. Each of the eight levels, numbered from 0
to 7, is assigned one binary code word of three digits. Although in this case we use the natural binary
code (NBC), which is formed by the standard binary representation of the numbers 0 to L 1, other
binary codes, such as Gray codes (described later), are also possible. Figure 3.23 shows a pulse-code
waveform for each code as well. Notice that if the strategy of Fig. 3.23 is used to encode the data
of Fig. 3.22, the number of symbols transmitted per second, or baud rate (Bd), must exceed the
sampling rate Fs = 1/T by a factor of B, the number of digits (or symbols) per sample. Thus, in
this case, data transmission occurs at a rate of 3Fs Bd.
Level
111
110
101
100
011
010
001
000
rate is commonly, and incorrectly, referred to as bit rate. Baud rate is equivalent to bit rate only in the
special case when the symbols are binary.
187
identify symbols even when pulses are distorted by system eects or contaminated by noise. An
analogous L-ary system would have smaller margins between its L-level pulses, making the system
more susceptible to distortion and noise eects.
English, Chinese, and Beyond
To further highlight the advantages of small symbol sets, let us consider a simple analogy. English
is comprised of 26 letters (symbols). Assuming an average of ve letters per word, it takes 250000
symbols to represent a typical 50000-word book. Chinese, on the other hand, represents each word
with a single Hanzi character (symbol). In Chinese, the same 50000-word book now requires just
50000 symbols a vefold reduction compared with English. To read a book in Chinese, however,
one must be familiar with hundreds or thousands of Hanzi symbols rather than just 26 English
letters. Clearly, there is a tradeo between the number of symbols in a language and the length
needed to represent information. This is a basic principle of information theory.
In an extreme case, we can imagine some super language with enough unique symbols to represent
every possible book in the world. Any book, including this textbook, could be written as a single
symbol. There is a certain appeal to such an approach: you could read any book in one sitting
without ever turning a single page! The practical problems of such an approach, however, are
severe. To distinguish every book, each symbol becomes impossibly intricate. Further, one would
have to prepare a dictionary that gives the meaning of each symbol. Anyone literate in this language
would have to master this massive dictionary! Just to recognize a symbol requires you to know every
symbol available, something akin to having pre-read every book. Further, consider what happens
if there is even a single error in the printing of the book. In English, you might recognize this as
a misspelled word. In Chinese, an entire word might change. With our super language, however,
an error means that you read an entirely dierent book altogether. Imagine your disappointment
when, having wanted to read a book on digital signal processing, you nd instead that you actually
read a book on grammar and punctuation.
Digitizing Voice and Audio
The human ear is sensitive to about 20 kHz. Subjective tests, however, show that voice intelligibility
is not aected if components above 3400 Hz and below 300 Hz are suppressed [3]. Since the objective
in voice communications is intelligibility rather than high delity, the components above 3400 Hz
are typically eliminated by a lowpass lter. Consequently, sampling rates of 8 kHz are completely
adequate for voice communication applications, such as digital telephony. Rates are intentionally
kept higher than the Nyquist sampling rate of 6.8 kHz to ensure practical lters, which are required
for signal reconstruction. In traditional phone systems, each sample is quantized using 7 or 8 bits
per sample, which results in 128 or 256 levels to represent each sample (27 = 128 and 28 = 256).
Such a digitized telephone signal consists of 7 8000 = 56000 or 8 8000 = 64000 bits/s (56 or 64
kbps) for data transmission.
The compact disc (CD) is another relatively recent application of A/D conversion. Intended
for high-delity audio applications, CDs require the full 20-kHz audio bandwidth. Although the
Nyquist sampling rate is only 40 kHz, an actual sampling rate of 44.1 kHz allows realizable lters,
as discussed earlier. To reduce quantization noise and improve dynamic range, CD signals are
quantized using 16 bits, which provides a rather large number of levels (L = 65536). For a stereo
signal, then, CDs produce over 1.4 Mbps (1.4 million bits per second) of data.
For
simplicity, we ignore that some words require two or (rarely) more Hanzi characters.
sophisticated voice coders, such as those used with CDMA and GSM digital wireless phone systems,
compress voice signals to remove redundant data and produce excellent voice quality with bit rates as low as 4 kbps.
Such approaches, however, come at a substantial increase in processing complexity.
The seemingly strange specic rate choice of 44.1 kHz originates from an early desire to t digital audio onto
video tape designed for 3 samples (colors) of 490/2 lines at a 60-Hz refresh rate (3 245 60 = 44100).
Modern
188
A Historical Note
The ancient Indian writer Pingala developed advanced mathematical concepts for describing prosody
and in doing so presented the rst known description of a binary numeral system, possible as early
as the 8th century BCE. Gottfried Wilhelm Leibnitz (16461716) was the rst mathematician in
the West to work out systematically the binary representation (using 1s and 0s) for any number.
He felt a spiritual signicance in this discovery, believing that 1, representing unity, was clearly a
symbol for God, while 0 represented nothingness. He reasoned that if all numbers can be represented
merely by the use of 1 and 0, this surely proves that God created the universe out of nothing!
Example 3.8 (Computing Sampling Rate, Number of Bits, and Baud Rate)
A signal x(t) bandlimited to 3 kHz is sampled at a rate 33 31 % higher than the Nyquist rate. The
maximum acceptable error in the sample amplitude (the maximum error due to quantization) is
0.5% of the peak amplitude Vref . The quantized samples are binary coded. Find the required
sampling rate, the number of bits required to encode each sample, and the bit rate of the resulting
PCM signal.
The Nyquist sampling rate is FNyq = 2 3000 = 6000 Hz. The actual sampling rate is
Fs = 6000
4
= 8000 Hz.
3
The quantization step is , and using a quantization strategy such as shown in Fig. 3.22, the
maximum quantization error is /2, where = 2Vref /L. The maximum error due to quantization,
/2, should be no greater than 0.5% of the peak amplitude Vref . Therefore
Vref
0.5
=
=
Vref
2
L
100
L = 200.
For binary coding, L must be a power of 2. Hence, the next higher value of L that is a power of 2
is L = 256. Because log2 256 = 8, we need 8 bits to encode each sample. Therefore, the bit rate of
the PCM signal is
8 8000 = 64000 bits/s.
Example 3.8
The American Standard Code for Information Interchange (ASCII) has 128 characters that are binary
coded. Suppose that a certain computer generates 100000 such characters per second. Determine the
number of bits required to encode each character as well as the baud rate necessary to transmit the
computer output.
Consider a case of M -ary symbols (symbols that can take M distinct values). Show that to represent L
levels, the required number of M -ary digits is at least logM (L) . Find the the minimum number of M -ary
digits needed to encode L = 64 levels when M = 2, 3, 4, 5, 6, 7, and 8. Remember that the number of
digits in a code must always be an integer.
See
3.6.1
189
For a binary scheme using a B-bit code, an ADC divides the input signal range into L = 2B equal
steps (quantization levels), and every signal amplitude is approximated by one of 2B amplitudes.
Upper and lower references dene the converters input operating range. Unipolar ADCs typically
set one reference to zero, while bipolar converters commonly set the lower reference equal to the
negative of the upper reference. Although we focus our attention on bipolar converters, unipolar
ADCs are treated in a nearly identical manner.
Using 3-bit quantization, Fig. 3.24 shows the input-output or transfer characteristics of four
common types of bipolar ADCs. In each case, the ADC input references are set to Vref , which is
typically equal to or slightly larger than the peak amplitude of the input signal x. The output xq
is quantized to 23 = 8 levels, uniformly separated in steps of . We stress that the quantization
process is both nonlinear and nonreversible. Once a signal x is quantized, it can never be recovered
from xq , although the error between the two can be made arbitrarily small by increasing the number
of bits B. The dierence between x and xq for |x| Vref is termed quantization error (light gray),
while the error that occurs for |x| > Vref is called saturation error (dark gray). With proper signal
conditioning and reference voltage selection, saturation error is easily avoided. Quantization error,
on the other hand, is unavoidable.
Asymmetric converters, such as shown in Figs. 3.24a and 3.24b, include zero as a quantization
level and consequently have more quantization levels either below or above zero. Both Figs. 3.24a
and 3.24b, for example, have four levels below zero and three levels above. Asymmetry is inevitable
in any scheme with an even number of steps if we maintain zero as a quantization level. Alternately, symmetric converters, such as those shown in Figs. 3.24c and 3.24d, do not include zero as a
quantization level and consequently have the same number of quantization levels above and below
zero. Except possibly near peak input amplitudes, the quantization error of rounding converters
(Figs. 3.24a and 3.24c) is between /2 and /2, while that of truncating converters (Figs. 3.24b
and 3.24d) is skewed between and 0. Mathematically, the quantized output is given as
.
/
x B1 1
Vref
2
+
(rounding, asymmetric),
2B1 Vref
2
.
/
x B1
Vref
(truncating, asymmetric),
2
xq = B1
2
Vref
.
/
x B1
Vref
1
xq = B1
2
+
(rounding, symmetric),
2
Vref
2
.
/
x B1 1
Vref
1
2
xq = B1
+
(truncating, symmetric).
2
Vref
2
2
xq =
or
(3.23)
When |x| nears or exceeds Vref , Eq. (3.23) may return values outside the L allowable levels. In such
cases, the values should be clamped to the nearest permitted level.
Once a signal is quantized, each sample is assigned a code, typically binary. The transfer characteristic in Fig. 3.24a, for example, has eight quantization levels and requires a three-bit code word.
Code word assignments can be done in many dierent ways, and each assignment has its advantages
and drawbacks. Figure 3.24a shows four common coding methods: twos complement, oset binary,
and two of many possible Gray codes. Although these code assignments are shown next to the
asymmetric rounding converter, they apply equally well to Figs. 3.24b, 3.24c, and 3.24d.
To interpret the value of a binary code requires that the transfer characteristic be known. For
asymmetric converters, such as shown in Figs. 3.24a and 3.24b, the value xq corresponding to a
twos complement code word cB1 cB2 c1 c0 is computed as
xq = Vref cB1 20 + cB2 21 + + c1 2(B2) + c0 2(B1) .
(3.24)
190
xq
Vref
Vref
Twos
Complement
Oset
Binary
011
111
100
010
010
110
101
011
001
101
111
001
000
100
110
000
111
011
010
100
110
010
011
101
101
001
001
111
100
000
000
110
Vref
Vref
Gray
Code
Gray
Code
(a)
xq
xq
Vref
Vref
Vref
Vref
Vref
Vref
Vref
Vref
(c)
(b)
xq
Vref
Vref
Vref
Vref
(d)
Figure 3.24: Bipolar ADC transfer characteristics: (a) rounding asymmetric, (b) truncating asymmetric, (c) rounding symmetric, and (d) truncating symmetric.
Oset binary requires a minor adjustment and is, for asymmetric converters, given as
xq = Vref 1 + cB1 20 + cB2 21 + + c1 2(B2) + c0 2(B1) .
(3.25)
Equations (3.24) and (3.25) are adjusted for symmetric converters by simply adding /2. It is more
dicult to compute the value xq corresponding to a Gray code. Typically, a Gray code is converted
191
to another type, such as twos complement, which allows simple interpretation and processing.
Unipolar converters are treated in a similar manner. For example, the code word of a unipolar
converter using natural binary code is
xq = Vref cB1 21 + cB2 22 + + c1 2(B1) + c0 2B .
(3.26)
In twos complement, the most signicant bit cB1 can be interpreted as a sign digit. Due to
the existence of simple and ecient arithmetic rules, twos complement is generally preferred over
oset binary and Gray code in digital processing. Every commercial microprocessor and digital
signal processor, for example, has instructions to add or subtract twos complement numbers. Few
processors oer native support for oset binary or Gray code. Gray codes have the advantage,
however, that the codes assigned to adjacent quantization levels dier by one digit only. Hence, if
a digit is read wrong due to noise or other interfering signals, there is a minimum error in reading
its value. In communications applications, where signals are transmitted over long distances using
imperfect or distortion-causing transmission media, there is a nite probability of error in reading
received digits. The use of Gray codes results in the least damage to the received signal.
Assuming a 3-bit asymmetric converter is used, determine the value xq that corresponds to the
twos complement code word 110. What is the value if the code word is oset binary? How do the
values change if the converter is instead a symmetric converter?
Using Eq. (3.24), the twos complement code 110 corresponds to
xq = Vref 1 20 + 1 21 + 0 22 = Vref /2.
If the number is oset binary, Eq. (3.25) yields a value
xq = Vref 1 + 1 20 + 1 21 + 0 22 = Vref /2.
If the converter is symmetric rather than asymmetric, the values require an oset of /2 = Vref /8.
Thus, the twos complement 110 corresponds to Vref /2 + Vref /8 = 3Vref /8, and the oset binary
110 corresponds to Vref /2+Vref /8 = 5Vref /8. Each of these values is easily conrmed with Fig. 3.24.
Example 3.9
Identify the quantization method used in Fig. 3.22 as symmetric or asymmetric, rounding or truncating,
and linear or nonlinear.
A Gray code g
B1 g1 g0 can be constructed from a twos complement of oset binary code cB1 c1 c0 using
the rule
gB1 = cB1
and
gb = cb cb+1 ,
where designates the exclusive-or operation. Using this rule, the oset binary in Fig. 3.24a converts to the rst
column of Gray code, and the twos complement converts to the second column of Gray code. We can recover
cB1 c1 c0 from gB1 g1 g0 according to
cB1 = gB1
and
cb = gb cb+1 .
192
Consider the signal x(t) = cos(2t/25). Using sampling interval T = 1 s, reference Vref = 1,
and B = 2 bits, plot the quantized signal xq [n] over one period of x(t) using each of the four
quantization methods of Eq. (3.23).
MATLAB is well equipped to solve this problem. First, basic parameters are established.
01
Next, we compute and plot the quantized output for a rounding, asymmetric converter using
Eq. (3.23). Line 03 clamps any values computed outside the permitted L levels.
02
03
04
xqra = (Vref/2^(B-1))*floor(x(n*T)/Vref*2^(B-1)+1/2);
xqra(xqra>Vref-Delta) = Vref-Delta; xqra(xqra<-Vref) = -Vref;
subplot(221); stem(n,xqra);
xq [n]
xq [n]
Vref
Vref
25 n
1 3 5
Vref
Vref
(a)
(b)
xq [n]
xq [n]
Vref
Vref
25 n
1 3 5
25 n
1 3 5
Vref
25 n
1 3 5
Vref
(c)
(d)
Figure 3.25: Quantization of x(t) = cos(2t/25): (a) rounding asymmetric, (b) truncating asymmetric, (c) rounding symmetric, and (d) truncating symmetric.
Following a similar procedure, lines 0204 are adapted for the other three methods. As shown
in Fig. 3.25, the four results, while similar, are not identical. Still, each quantized signal conveys
the basic character of x(t). Notice that some of the waveforms appear bottom-heavy with a seeming
negative oset. Although undesirable, such characteristics become negligible with large B.
Example 3.10
Consider the common situation where a signal x(t) becomes 0 for an extended period of time. Explain
why an asymmetric, rounding converter is better than an asymmetric, truncating converter in the case
where low-level noise corrupts x(t). Which symmetric converter is best, rounding or truncating? Explain.
193
Nonlinear Quantization
So far we have discussed linear quantization, which uses a constant quantization step . In linear
quantization, the quantization boundaries are equally spaced from one another, whether the input
value is large or small. Such a scheme oers an unfair deal to smaller signal amplitudes, however,
since linear quantization causes more relative damage to lower amplitude levels than to higher
amplitude levels. A rounding symmetric converter, for example, has a maximum quantization error
of /2. If such a converter has = 0.002, the maximum quantization error is 0.001. For a high
input amplitude near 1, the maximum quantization error is only 0.1% of the signal amplitude. At
a low amplitude such as 0.002, however, the maximum quantization error is 50%.
The relative damage can be equalized if the quantization step is not xed but becomes progressively larger for higher amplitudes, as shown in Fig. 3.26a. Such a strategy is termed nonlinear
quantization. Nonlinear quantization is widely used in communications applications where it allows us to compress useful signal information and reduce data rates. For example, telephone-grade
audio using linear quantization requires 12-bit codes to match the perceived quality of nonlinear
quantization using only 8-bit codes. In other words, linear quantization requires 50% more bits over
nonlinear quantization for comparable quality.
xq [n]
xq [n]
Vref
Vref
Vref
Vref
(a)
(b)
194
xq
x
Vref
Vref
Vref
Vref
Vref
Vref
Vref
(a)
(b)
Vref
Figure 3.27: Nonlinear quantization transfer characteristics: (a) -law compression with rounding,
symmetric quantization and (b) expansion to nal quantized signal.
following the expansion step. Expansion clearly restores the underlying linear relationship between
input and quantized output but necessarily forces a nonlinear spacing of the quantization levels.
Data compression and expansion increase processor load and hardware costs, but the reduced
data rates are often well worth the price. The decaying sinusoid in Fig. 3.26a highlights how nonlinear
quantization eectively tracks even small signals. The linear quantization of Fig. 3.26b, on the other
hand, struggles to capture the detail of small signals, although it is less coarse for large amplitudes
than the nonlinear case.
3.6.2
We know that analog-to-digital conversion produces quantization and saturation errors. These
errors, while undesirable, are fundamental and indeed inevitable to the quantization process. Unfortunately, other errors can also occur that further degrade xq . These errors, which reect hardware
imperfections and limitations, are typically classied as either static or dynamic. In broad terms,
static errors relate to dc performance, while dynamic errors involve time dependencies such as input
frequency or sampling clock rates. Unlike quantization and saturation errors, however, it is possible
to correct or compensate some, although not all, types of static and dynamic errors.
We begin with a 3-bit unipolar rounding converter. Figure 3.28 illustrates how the four basic
types of static errors aect this converter. These plots take the form of the transfer characteristic
plots of Fig. 3.24, but they also assume that the input x is a dc signal.
An oset error shifts the ADC transfer characteristic either right or left. The right shift in
Fig. 3.28a, for example, shifts the waveform xq downward. Except for those parts shifted below 0
(or above Vref for a left shift), which are forever lost by the clamping action of the converter, an
oset error is easily corrected by subtracting the oset.
A gain error, such as shown in Fig. 3.28b, is also relatively easy to characterize and correct. A
gain error changes the slope of the transfer characteristic, causing xq to appear larger or smaller than
x. With a slope greater than 1, such as in Fig. 3.28b, xq appears larger, or magnied, compared with
x. Values pushed beyond the reference are clamped, causing irrecoverable signal loss and distortion.
When the slope is less than 1, xq appears smaller than x. In this case, the basic waveform shape
Fully characterizing an analog-to-digital converter is quite complex, so we do not attempt a comprehensive treatment here. IEEE Standard 1057, for example, deals with this topic and is nearly 100 pages long. Instead, we overview
the most important static errors and comment on dynamic errors to provide a sense of what can and does go wrong
during analog-to-digital conversion.
195
xq
xq
Vref
Vref
(a)
Vref
x
(b)
xq
Vref
xq
Vref
Vref
(c)
Vref
x
(d)
Vref
Figure 3.28: Static ADC errors: (a) oset, (b) gain, (c) nonlinearity, and (d) missing codes.
remains intact, although the relative quantization error increases ( seems bigger when we shrink
our signal). By applying a reciprocal gain factor to xq , gain errors are largely compensated.
The eects of nonlinearity errors, depicted in Fig. 3.28c, are not as systematic as those of
gain or oset errors. In some sense, we can think of nonlinearity errors as being the static error
beyond a converters gain and oset errors. It is usually not simple to either characterize or correct
nonlinearity errors. Missing codes occur when a converter is unable to produce, regardless of input,
certain quantization levels. Figure 3.28d illustrates this last static error, where three of the eight
codes are missing. It is not possible to correct missing code errors. Using the same exact transfer
characteristics as Fig. 3.28, Fig. 3.29 illustrates the various eects of static errors while sampling a
sinusoid.
Dynamic errors are more involved than static errors. Dynamic errors might cause two input
sinusoids, which only dier in frequency, to convert with entirely dierent gains. Variations in the
sampling clock, also called clock jitter or timing jitter, cause signal conversions to occur at entirely
dierent times than anticipated. Frequency-dependent interactions further complicate the picture.
Typical transfer characteristic curves, such as those in Fig. 3.28, are woefully inadequate to describe
dynamic errors. We do not pursue the details of dynamic errors here. Suce it to say that dynamic
errors further erode converted signal quality.
A Pack of Wolves
No more than a shepherd desires to see a wolf among his ock, we do not care to see any particular
type of error aect our A/D conversions. Unfortunately, a lone wolf is not the least of our worries.
Just as wolves hunt in packs, dierent converter errors attack our signal together, and they can
inict signicant combined damage. Still, we need not cry wolf just because an A/D converter has
errors. It is wise to rst determine the nature of the pack that hunts us. The eective number of bits
(ENOB) is a number, expressed in bits, that helps quantify the combined impact of various errors on
analog-to-digital converter performance. Often found in a converters data sheets, ENOB provides
an indication of ADC accuracy under real-world conditions. Any practical converters ENOB is less
196
xq
xq
Vref
Vref
25 n
1 3 5
25 n
1 3 5
(a)
(b)
xq
xq
Vref
Vref
25 n
1 3 5
25 n
1 3 5
(c)
(d)
Figure 3.29: Sampling a sinusoid with static ADC errors: (a) oset, (b) gain, (c) nonlinearity, and
(d) missing codes.
than its actual number of bits B. High-quality 16-bit converters, for example, typically have ENOBs
of 12 to 13.5, which means that 3.5 to 4 bits of accuracy are being lost to converter errors.
Determine the reduction in dynamic range, in dB, of a 16-bit analog-to-digital converter that has an ENOB
equal to 12.25 when compared with an ideal (ENOB = 16).
3.6.3
Analog-to-digital conversion involves reading sample values and assigning the proper binary code
words. Figure 3.30a shows a simplied block representation of a practical A/D converter.
In practice, the process of coding involves a sequence of comparisons and hence is not instantaneous. To give the coder time to perform its job, we sample the signal and hold this value until the
next sample. Conceptually, this so-called sample-and-hold (S/H) operation rst impulse samples
the signal x(t) to yield the impulse sequence x(t). Next, the hold operation produces a rectangular pulse of width T for each impulse. The impulse response h(t) of the hold operation, shown in
Fig. 3.30b, is identical to the impulse response of the ideal zero-order hold (Fig. 3.11a) except for
a delay of T /2 seconds, which is needed to ensure that the converter is causal and realizable. The
sample-and-hold output xsh (t), shown in Fig. 3.30c, has an apparent, and unavoidable, delay of T /2
when compared with the original input x(t). During each hold period T , the coder assigns a code
word to the sample according to some desired transfer characteristic rule, such as one of those shown
in Fig. 3.24. Timing for the entire process is typically driven by an external clock.
Irrespective of transfer characteristic, there are many dierent strategies to implement the coder
of an ADC. The coder details, in fact, largely determine the nature of the A/D converter itself.
Thus, coder type becomes synonymous with ADC type. Each type of coder (converter) has its own
advantages and disadvantages, making some appropriate for certain applications and not others.
197
clock
x(t)
x(t)
sampler
xsh (t)
hold
coder
xq [n]
sample-and-hold
(a)
h(t)
1
xsh (t)
x(t)
t
T
n+1
(c)
(b)
Figure 3.30: A practical A/D converter: (a) block representation, (b) hold operation impulse response, and (c) output of the sample-and-hold circuit.
Counting Converters
Counting converters are among the simplest to understand. As shown in the block diagram of
Fig. 3.31, a counting converter centers on a simple binary counter. Starting from zero, the counter
steps until its output, which is converted using a digital-to-analog converter (DAC), reaches the S/H
value xsh (t). This comparison triggers the counter to stop, at which time the counter value is the
code of sample xq [n].
clock
xsh (t)
stop
counter
xq [n]
D/A converter
198
not the sample is in the upper or lower half of the allowed range. The most signicant digit of the
output is set to 1 or 0 accordingly. The next most signicant digit is set according to whether the
sample is in the upper or lower half of the previous subinterval. This process continues a total of B
times until the last digit in the code is generated.
clock
xsh (t)
successive
approximation
register
xq [n]
D/A converter
R1
+
clock
RL
R2
coding logic
Vref
xq [n]
199
its conversion in just two steps. Oversampling converters, such as sigma-delta (-) converters,
are also quite popular. These converters initially sample much faster than Fs but at a resolution
much less than B bits (commonly at just 1-bit resolution). Following some signal processing, they
output a B-bit signal at the desired rate Fs . Certain specialized applications utilize rather exotic
converters, such as multistage noise shaping (MASH) converters, bandpass - modulators, clockless
architectures, and others.
If an asymmetric bipolar ash converter, such as shown in Fig. 3.33, has R1 = R2 = = RL , is the
converter rounding or truncating? Leaving all other resistors as R, what happens if R1 is changed to 32 R
and RL is changed to 12 R?
3.7
Digital-to-Analog Conversion
Digital-to-analog (D/A) conversion essentially follows the steps in A/D conversion in reverse order,
producing a continuous-time analog signal from a stream of digital samples. A block representation
of the D/A conversion process is shown in Fig. 3.34. To begin, we decode the quantized samples
xq [n], each of which is most commonly represented by a B-bit code word. Conceptually, this step
produces an impulse train x
(t), which is an estimate of the original nonquantized impulse-sampled
signal x(t). As long as the number of bits B is large (quantization error is small), x(t) and x(t) will
be nearly equivalent (as shown in Fig. 3.34). The impulses x
(t) are next applied to a ZOH circuit
that holds the sample value until the next sample arrives. The impulse response of a practical ZOH
circuit is shown in Fig. 3.30b. The output of the hold circuit x
zoh (t) is a staircase approximation
of the analog signal x(t). This output is identical to that in Fig. 3.30c, except that in this case the
samples are quantized, while those in Fig. 3.30c are the actual sample values. In addition to any
error caused by quantization, the sharp edges of the staircase approximation represent distortion as
well. Fortunately, much of this latter distortion can be corrected by a reconstruction or anti-imaging
lter. With a reasonably large number of bits B and a good reconstruction lter, the nal output
x
(t) closely approximates (within a delay T /2) the original signal x(t). In such cases, it is common
to write the output of a D/A converter as x(t) rather than x
(t).
xq [n]
decoder
x
(t)
hold
x
zoh (t)
reconstruction
lter
x
(t)
200
B1
b=0
cb
i
2Bb
2R = Vref
B1
cb 2bB .
(3.28)
b=0
2R
i
iB1
cB1
2R
iB2
cB2
i1
2R
i0
2R
2R
isum
c1
c0
2R
xzoh (t)
3.7.1
As shown in Sec. 3.2, to reconstruct a lowpass signal x(t) of bandwidth B < Fs /2 Hz from its
samples, we need to pass the samples through an ideal lowpass lter with bandwidth between B
and Fs /2 Hz. As we have seen, however, practical D/A decoders use zero-order hold circuits rather
than ideal lowpass lters, which are not realizable. Consequently, two types of distortion impact
the reconstruction of signal x(t) from its quantized samples. The rst error is due to the use of
quantized samples instead of the actual samples. This quantization error can be reduced as much
as desired by increasing the number of quantization levels. The second source of error or distortion
stems from the use of a hold circuit rather than an ideal lowpass lter. We note here that a hold
circuit is also a lowpass lter, albeit not the ideal lowpass lter that is required for perfect signal
reconstruction. The distortion due to a hold circuit, known as aperture eect, can be corrected by
using a proper reconstruction lter with a frequency response that is the reciprocal of the frequency
response of the hold circuit. We shall analyze each of these errors.
The Aperture Eect: Distortion from the Zero-Order Hold
As explained earlier, the Fig. 3.11 construction discussed in Sec. 3.2 is a noncausal version of a ZOH.
By delaying this impulse response by T /2 (T = 1/Fs ), we obtain the causal (and realizable) response
used in A/D and D/A operations (Figs. 3.30a and 3.34). The delay adds a factor ejT /2 to the
frequency response in Eq. (3.10). Hence, the realizable ZOH transfer function Hzoh () is given by
T
Hzoh () = T sinc
2
ejT /2 .
(3.29)
We now place a reconstruction lter H() in cascade with the ZOH circuit in an attempt to make the
201
The factor ejT /2 in the numerator represents a time advance by T /2, which is unrealizable. We
ignore this factor and accept a time delay of T /2 in the nal output. The resulting reconstruction
lter transfer function H() is given by
T /2
T
|/2| < Fs /2
2
sin(T /2)
T =
H() =
.
(3.30)
sinc 2
0
|/2| > Fs /2
As shown in Fig. 3.36, H() is the inverse of sinc(T /2) over the band 0 to 1/2T = Fs /2 Hz, and
is 0 outside this band.
H()
1
sinc(T /2)
Fs
Fs /2
Fs
Fs /2
/2
/2
e2q deq =
2
.
12
Those who are familiar with the theory of probability can derive this result directly by noting that because
the area under a probability density function must be unity, the probability density of the quantization error eq is
f (eq ) = 1/ over the range |eq | /2 and is zero elsewhere. Hence,
Eq =
/2
/2
e2q f (eq ) deq =
/2
/2
e2q
deq =
2
.
12
202
Given a suciently large number of samples, Eq represents the energy (power) of the quantization
noise. Noting that = 2Vref /L and L = 2B , the mean square quantization noise is thus
Eq =
2
2
/3
Vref
Vref
=
.
2
B
3L
4
(3.31)
Clearly, the quantization noise can be reduced as much as needed by suitably increasing the number
of bits B, which also increases the number of quantization levels L.
A periodic sinusoidal signal x(t) of amplitude 12 volts is quantized and binary coded. Assuming
the signal-to-quantization noise ratio must exceed 20000, determine the smallest number of bits B
needed to encode each sample.
Using Eq. (3.31), the quantization noise power is
Eq =
2
/3
Vref
.
4B
To minimize quantization errors, the converter reference should be set equal to the maximum signal
V2
amplitude, or Vref = 12. Thus, the sinusoidal signal x(t) has power Px = ref
2 , and the signal-toquantization noise ratio requirement is
Px /Eq =
2
Vref
/2
2
Vref 4B /3
3 B
4 20000.
2
3.8
Summary
This chapter details the process of converting a continuous-time signal to a discrete-time signal
(sampling) and the reverse (reconstruction). Ideal sampling records a signal at discrete instants and,
in the frequency domain, causes a periodic replication of the original signal spectrum. A primary
goal in proper sampling is to preserve signal information. To this end, the sampling theorem states
that a signal bandlimited to B Hz can be reconstructed exactly from its samples if the sampling
rate Fs > 2B Hz (Nyquist criterion).
In the frequency domain, the sampling theorem requires that the spectral replicates be nonoverlapping. In such cases, signal reconstruction is accomplished by applying a lter to select, among
all replicates, the original spectrum. Such a reconstruction, although possible theoretically, poses
practical problems such as the need for ideal lters, which are unrealizable. In practice, therefore,
there is always some error in reconstructing a signal from its samples.
Practical signals, being timelimited, are not bandlimited. When sampled, the spectral replicates
overlap and display aliasing, where high-frequency components appear lower in frequency. Samples
of a real sinusoid of frequency Fs /2 + f1 Hz appear as samples of a sinusoid of lower frequency
Fs /2 f1 Hz. Aliasing errors are largely eliminated by bandlimiting a signal to half the sampling
frequency, Fs /2 Hz. Such bandlimiting, done prior to sampling, is accomplished with an anti-aliasing
lter. On occasion, such as the sampling of bandpass signals, aliasing is used to the advantage of
the system.
3.8. Summary
203
The sampling theorem is important in signal analysis, processing, and transmission because it
allows us to replace a continuous-time signal with a discrete sequence of numbers. It becomes
possible, and often advantageous, to process continuous-time signals using discrete-time systems,
including digital lters. In the communications eld, the transmission of a continuous-time message
reduces to the transmission of a sequence of numbers. This opens the door to modern techniques of
communicating continuous-time signals by pulse trains.
The dual of the sampling theorem states that for a signal timelimited to seconds, its spectrum
X() can be reconstructed from the samples of X() taken at uniform intervals no greater than 1/
Hz. In other words, the spectrum should be sampled at a rate not less than samples/Hz.
As the name implies, analog-to-digital converters not only sample but also quantize a signal.
Quantization is a necessary step to allow practical digital signal processing, which would otherwise
require an innite number of bits just to represent a single sample. Although there are many
quantization strategies, most converters perform linear quantization and encode each sample using
B binary digits. Dierent A/D converter architectures are available, each with advantages and
disadvantages, although all A/D converters are susceptible to errors, such as static and dynamic
errors. Digital-to-analog conversion is the reverse process of A/D conversion. Distortions during
D/A conversion, including quantization and aperture eects, are largely controllable through proper
choice of bit resolution, sampling rate, and reconstruction lter.
With a solid understanding of sampling principles, we are now ready to undertake the general
topic of discrete-time signals and systems, which is the subject of the next chapter.
References
1. Linden, D. A., A Discussion of Sampling Theorems, Proc. IRE, Vol. 47, July 1959, pp.
12191226.
2. Siebert, W. M., Circuits, Signals, and Systems, MIT/McGraw-Hill, New York, 1986.
3. Bennett, W. R., Introduction to Signal Transmission, McGraw-Hill, New York, 1970.
4. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, NY, 2005.
204
Problems
0
0
2
6104 2
4104
its energy is concentrated in a small band.
Determine a reasonable minimum sampling
Figure P3.1-2
rate that allows reconstruction of this signal with a small error. Carefully justify
what you consider negligible or small error.
3.1-3 Determine the Nyquist sampling rate and
the Nyquist sampling interval for
3.1-8 Consider the signal x(t) = cos(20t) +
5sinc2 (5t).
(c) Repeat part (a) for the sampling fre(a) Sketch X(), the spectrum of x(t).
quency Fs = 21 Hz.
Determine the minimum sampling
rate required to be able to reconstruct 3.1-9 Refer to Fig. P3.1-9 for plots of the bandx(t) from these samples.
pass spectra X() and Y ().
(b) Does the minimum sampling rate of
part (a) change if = 0? Explain.
(c) Sketch the spectrum of the sampled
signal when the sampling rate is 25%
above the Nyquist rate (show the
Problems
205
X()
1
-30
-20
20
30
Y ()
-18
18
28
p(t) =
-28
of the pulse is not important. We are interested in knowing only the amplitude represented by the pulse. In binary communications where pulse amplitudes are taken
as 1 or 1, each pulse represents one piece
of information. Consider one independent
amplitude value (not necessarily binary) as
one piece of information. Show that 2B independent pieces of information per second
can be transmitted correctly (assuming no
noise) over a channel of bandwidth B Hz.
Prove also the converse that a channel of
bandwidth B Hz can transmit at most 2B
independent pieces of information per second correctly (assuming no noise). This important principle in communication theory
states that 1 Hz of bandwidth can transmit
two independent pieces of information per
second.
Figure P3.1-9
3.1-10 A signal x(t) with spectrum X() is
shown in Fig. P3.1-10. By inspection
of X(), determine all the sample values
x(nT ) when Fs = 1/T = f1 + f2 Hz.
p(t 125n).
n=
X()
4 ms
f2
f1
f1
f2
4 ms
8 ms
Figure P3.1-12
Figure P3.1-10
3.2-1 (a) Show that the signal x(t) reconstructed from its samples x(nT ) using
3.1-11 In digital communications, it is imporEq. (3.13) has a bandwidth B 1/2T
tant to know the upper theoretical limit on
Hz.
the rate of digital pulses that can be transmitted over a channel of bandwidth B Hz.
(b) Show that x(t) is the smallest bandIn digital transmission, the relative shape
width signal that passes through sam-
206
1 + t/T 0 t < T
and (3.12) into the inverse Fourier transh(t) =
1 t/T T t < 2T ,
form of Eq. (3.11) and simplify the result
0
otherwise
ing expression.
3.2-3 Show that the block diagram in Fig. P3.23 represents a realization of a causal ZOH
operation. You can do this by showing that
the unit impulse response h(t) of this sys/2
.
tem is tT
T
input
delay T
output
Figure P3.2-3
(a) Show that the signal x(t) can be recovered from at-top samples if the sampling rate is no less than the Nyquist
rate.
Problems
207
xp(t)
0.2
0.2
Figure P3.2-7
3.2-8 A sinusoid of frequency f0 Hz is sampled
at a rate fs = 20 Hz. Find the apparent
frequency of the sampled signal if f0 is
(a) 8 Hz
(c) 20 Hz
(e) 22 Hz
(b)
(d)
(f )
12 Hz
21 Hz
32 Hz
0 to 30 Hz
60 to 90 Hz
(b) 30 to 60 Hz
(d) 90 to 120 Hz
208
1
0
n=0
,
n = 0
P ()
1
R
1
2R
R
2
Figure P3.2-14
Problems
(a)
(b)
(c)
(d)
(e)
209
f1
f1
f2
f1
f1
0
2
3103
5103
so that the original signal can be recovered
from its samples. Redo the problem if the
Figure P3.3-4
frequencies outside the band from 18 to 22
kHz have been corrupted by excessive noise
3.3-5 A sinusoid cos(0 t) is a bandpass signal
to the point that the information contained
with zero bandwidth. This implies that the
in those frequencies is nonrecoverable. Desampling rate that will allow reconstruction
termine the minimum sampling frequency
of this signal from its samples can be arso that the uncorrupted portion of the band
bitrarily small. Show that this is indeed
can be recovered. If we lter out the corthe case. Describe a system that will perrupted spectrum prior to sampling, determit reconstruction (within a constant facmine the minimum sampling rate.
tor) of this sinusoid from its samples taken
3.3-3 Let x(t) be a signal whose Fourier transuniformly at a sampling rate approaching
form X() is nonzero only over 3 || 9.
zero.
Further, only frequencies 5 || 7 contain useful information (the other frequen- 3.4-1 The Fourier transform of a signal x(t),
bandlimited to B Hz, is X(). The signal
cies can be considered to contain noise or
x(t) is repeated periodically at intervals T ,
dierent channel information).
where T = 1.25/B. The resulting signal
(a) What is the smallest sampling rate
x
(t) is
that will enable exact reconstruction
x
(t) = n= x(t nT ).
of the useful signal if we do not perform any ltering on x(t) before sampling?
(b) How will the answer of part (a) change
if it is permitted to pass x(t) through
a lter before sampling? Explain.
3.3-4 The spectrum X() for a real bandpass
signal x(t) is shown in Fig. P3.3-4.
Show that x
(t) can be expressed as
x(t) = C0 + C1 cos(1.6Bt + ),
where
1
X(0),
T
2
C1 = |X (2/T )| ,
T
and = X (2/T ) .
C0 =
210
Show that
X() =
sinc(
2 )
1
2
3.4-3 A real signal x(t) is constructed as a T0 periodic replication of signal x(t). For >
0, the spectrum of x
(t) is
X()
= 100
k=0 (1 /10)( 0.1k).
(a) Determine the sampling rate if the signal is to be sampled at a rate 20%
above the Nyquist rate.
(b) If the samples are quantized into 1024
levels, determine the number of binary
pulses required to encode each sample.
(c) Determine the binary pulse rate
(bits/s) of the binary coded signal.
x
(t) =
n=
x(t nT0 ).
1
T0
k=
X(k0 )ejk0 t ,
(b) To represent a given number of quantization levels L, if we require a minimum of BM digits for an M -ary code,
show that the ratio of the number of
digits in a binary code to the number
of digits in a quaternary (4-ary) code
is 2, that is, B2 /B4 = 2.
where 0 = 2/T0 . This formula, called 3.5-4 Five telemetry signals, each of bandwidth
the Poisson sum formula, tells us that the
1 kHz, are quantized and binary coded.
Fourier series of x
(t) is a scaled and samThese signals are time division multiplexed
pled version of the Fourier transform of
(signal bits interleaved). Determine the
x(t).
number of quantization levels L so that
the maximum error in sample amplitudes
3.5-1 A compact disc (CD) records audio signals
is 0.2% of the peak signal amplitude. Asdigitally using a binary code. Assume that
suming the signals must be sampled at least
the audio signal bandwidth is 15 kHz.
20% above the Nyquist rate, determine the
data rate (bits per second) of the multi(a) What is the Nyquist rate?
plexed signal.
(b) If the Nyquist samples are quantized
into L = 65536 levels and then binary 3.5-5 An application requires a bipolar ADC to
coded, what number of binary digits
help detect a very short duration event.
is required to encode a sample.
(a) Which type of ADC is likely the most
(c) Determine the number of binary digappropriate for the job: counting,
its/s (bits/s) required to encode the
ash, half-ash, successive approxiaudio signal.
mation, or other? Explain.
(d) For practical reasons discussed in the
(b) An ADC can be asymmetric or symtext, signals are sampled at a rate well
metric and rounding or truncating.
above the Nyquist rate. Practical CDs
Which type is most appropriate for
use 44100 samples/s. If L = 65536,
this application? Explain.
determine the number of pulses/s re3.5-6 A digital communication channel is capaquired to encode the signal.
ble of transmitting 56600 bits per second,
about the rate of a high-speed dial-up mo3.5-2 A TV signal (video and audio) has a banddem at the turn of the century. We want to
width of 4.5 MHz. This signal is sampled,
use this channel to transmit a single analog
quantized, and binary coded.
Problems
211
signal x(t) with lowpass content. The signal magnitude is limited to |x(t)| xmax .
System specications require that the error
between the digitized signal and x(t) must
not exceed 103 xmax .
(a) What is the required number of bits
B of the ADC?
1 x(t)
Figure P3.6-2
(b) What is the maximum bandwidth of 3.6-3 A signal x(t) is converted to a 10-bit
the analog input for which the channel
(B = 10) binary signal. The signal-tocan be reliably used without aliasing
quantization-noise ratio (SQNR) is found
errors?
to be 30 dB. The desired SQNR is 42 dB.
It is decided to increase the SQNR to the
(c) Suppose that our desired message x(t)
desired value by increasing the number of
is streamed audio, which has a maxquantization levels L. Determine the new
imum frequency content of around
values of L and B.
3500 Hz. Will the system work? If
yes, justify how. If not, explain what
you might do to best accommodate
this particular message signal so that
the channel can be used.
3.5-7 Assuming an input |x(t)| 1, sketch the
transfer characteristic for a 2-bit symmetric rounding converter. If, due to gain
and oset errors, the input x(t) appears as
2
3 x(t) + 0.25, sketch the resulting transfer
characteristic.
3.5-8 Repeat Prob. 3.5-7 for a 2-bit asymmetric
truncating converter.
3.5-9 Show that a hold circuit is not necessary
for a bipolar ADC when sampling a signal
whose frequency satises
f Fs 2(B+1) /.
Hint: Assume that the input is a sinusoid
x(t) = Vref sin(2f t). For a hold to be unnecessary, the signal should not change by
more than 1/2 a quantization level during
any sample period.
3.6-1 A signal x(t) is converted to a binary signal. If the signal-to-quantization-noise ratio (SQNR) is required to be at least 47 dB,
determine the minimum number of quantization levels L required, assuming that x(t)
is a sinusoid. Determine the actual SQNR
obtained with this minimum L.
3.6-2 Repeat Prob. 3.6-1 for the signal x(t)
shown in Fig. P3.6-2.
Chapter 4
8T
x(nT )
x[n]
4T
4T
8T
(b)
(a)
Figure 4.1: Representations of a discrete-time signal e0.1n : (a) x(nT ) and (b) x[n].
Systems whose inputs and outputs are discrete-time signals are called discrete-time systems. A
digital computer is a familiar example of this type of system. We shall concentrate on single-input,
single-output (SISO) systems, where a DT system processes a single input sequence x[n] to produce
212
213
a single output sequence y[n]. More complex cases, such as multiple-input, single-output (MISO),
single-input, multiple-output (SIMO), and multiple-input, multiple-output (MIMO) systems, share
the same foundations as SISO systems.
In many applications such as digital ltering, continuous-time signals are processed by discretetime systems using appropriate interfaces at the input and the output, as illustrated in Fig. 4.2. A
continuous-time signal x(t) is rst sampled to convert it into a discrete-time signal x[n], which is
then processed by a discrete-time system to yield the output y[n]. A continuous-time signal y(t) is
nally constructed from y[n]. We use the notations C/D and D/C to designate the conversions from
continuous-time to discrete-time and from discrete-time to continuous-time, respectively. As we
shall see later in our discussion, discrete-time systems have several advantages over continuous-time
systems. For this reason, there is an accelerating trend toward processing continuous-time signals
with discrete-time systems. Operating together, the three blocks in Fig. 4.2 often perform better
than a purely continuous-time system.
x(t)
continuous
to discrete
x[n]
discrete-time
system
y[n]
discrete to
continuous
y(t)
(4.1)
In contrast, a D/C converter ideally converts a digital output y[n] into an analog output y(t) using
the interpolation formula
t nT
y[n] sinc
y(t) =
.
(4.2)
T
n=
This expression is equivalent to the ideal interpolation formula of Eq. (3.13). In fact, the C/D and
D/C operations of Fig. 4.2 are basically identical to the sampling and D/A operations discussed in
Ch. 3 except that quantization eects are absent. As noted previously, it is mathematically dicult,
not to mention inconvenient, to rigorously account for quantization. Further, quantization more
often causes distractions than insights during the development of discrete-time signals and systems
concepts. Therefore, unless stated otherwise, our treatment of discrete-time signals assumes that
no quantization is present. Since most practical applications quantize signals with a relatively large
number of quantization levels, this assumption is usually well justied.
Reducing Packaging Costs
An observant reader will note a strikingly close kinship of a discrete-time signal to an impulsesampled continuous-time signal. The information inherent in the two is identical; only the packaging
is dierent. A discrete-time signal is packaged in a very simple and spartan form: a sequence of
numbers. In contrast, an impulse-sampled signal is wrapped in an exquisite package of impulses,
the strengths of which follow the same sequence of numbers. Such an elegant packaging has its cost.
The CT techniques used for impulse-sampled signals are often more complex than needed to handle
the spartan form. For this reason, we develop a parallel set of techniques to handle discrete-time
signals, techniques that are closely connected to continuous-time techniques. These discrete-time
techniques are in form that is simpler to handle. The sampling theorem, aliasing, and other concepts
discussed in Ch. 3 have direct relevance and application to discrete-time signals.
214
4.1
The time-shifting, time-reversal, and time-scaling operations discussed for continuous-time systems
also apply to discrete-time systems with some modication. In general, discrete-time expansions,
compressions, and shifts are restricted to integer factors. The DT time-scaling operation is particularly interesting, and we provide separate treatments for compression and expansion.
4.1.1
DT Time Shifting
Consider a signal x[n] (Fig. 4.3a) and the same signal right shifted (delayed) by 5 units (Fig. 4.3b),
which we shall denote by y[n]. Whatever occurs in x[n] at some instant n also occurs in y[n] ve
units later at the instant n + 5. Therefore,
and y[n] = x[n 5].
y[n + 5] = x[n]
In other words, the signal x[n 5] in Fig. 4.3b, being the signal in Fig. 4.3a delayed by 5 units, is
the same as x[n] with n replaced by n 5. Now,
over 3 n 10.
x[n] = (0.9)n
Therefore,
y[n] = x[n 5] = (0.9)n5
over 3 n 5 10 or 8 n 15.
Figure 4.3c illustrates a shift that results in a time advance rather than a time delay.
x[n]
1
(0.9)n
(a)
10
15
20
10
15
20
10
15
20
10
y[n] = x[n 5]
1
(0.9)n5
(b)
10
x[n + 10]
(0.9)n+10
(c)
10
7 5
Figure 4.3: Time shifting a DT signal: (a) original signal, (b) delay by 5, and (c) advance by 10.
In general, then, to shift a sequence x[n] by m units (m integer), we replace n with n m as
x[n] x[n m].
(4.3)
If m is positive, the shift is to the right and corresponds to a delay, such as the m = 5 case of
Fig. 4.3b. If m is negative, such as the m = 10 case shown in Fig. 4.3c, the shift is to the left and
215
corresponds to an advance. We emphasize that the DT time shift of Eq. (4.3) requires an integer
shift value m.
Show that x[n] in Fig. 4.3a left shifted by 3 units can be expressed as y[n] = 0.729(0.9)n for 0 n 7
and is zero otherwise. Sketch the shifted signal y[n].
4.1.2
DT Time Reversal
To invert x[n] in Fig. 4.4a, imagine x[n] as a rigid wire frame. Rotating this frame 180 about the
vertical axis results in the desired inverted signal y[n] shown in Fig. 4.4b. Whatever happens in
Fig. 4.4a at some instant n also happens in Fig. 4.4b at the instant n so that
y[n] = x[n]
The expression for y[n] is the same as that for x[n] with n replaced by n. For the case shown
in Fig. 4.4b, x[n] = (0.9)n over 3 n 10 and y[n] = x[n] = (0.9)n over 3 n 10 or,
equivalently, over 3 n 10.
x[n]
1
(0.9)n
(a)
10
10
15
20
10
15
20
20
y[n] = x[n]
(0.9)n
(b)
10
5 3
5
x[20 n]
(0.9)20n
(c)
10
10
15
17
Figure 4.4: Time reversing a DT signal: (a) original signal, (b) reversal, and (c) reversal and shift
by 20.
In general, then, to reverse a sequence x[n], we replace n with n as
x[n] x[n].
(4.4)
The origin n = 0 is the anchor point, which remains unchanged during time reversal because at
n = 0, x[n] = x[n] = x[0]. Note that while the reversal of x[n] about the vertical axis is x[n], the
reversal of x[n] about the horizontal axis is x[n].
The
terms delay and advance are meaningful when the independent variable is time. For other independent
variables, such as frequency or distance, it is often more appropriate to use the terms right shift and left shift.
216
As in the continuous-time case, care must be taken while performing combined operations on
the independent variable. Time reversal and time shifting, for example, are jointly encountered as
x[m n] in discrete-time convolution, discussed later. Two steps yield x[m n] from x[n]. First,
we time reverse the signal x[n] to obtain x[n]. Second, we shift x[n] by m. Recall that a
time shift of m is accomplished by replacing n with n m. Hence, shifting x[n] by m units is
x[(n m)] = x[m n]. To illustrate, consider using x[n] in Fig. 4.4a to produce x[20 n]. We
rst time reverse x[n] to obtain x[n], as shown in Fig. 4.4b. Next, we right shift x[n] by m = 20
to obtain x[m n] = x[20 n], as shown in Fig. 4.4c. It is also possible to produce the same
result in a reversed order of operations. Repeating our example, we rst left shift x[n] to obtain
x[n + 20]. Subsequent time reversal yields the desired result of x[20 n]. The reader is encouraged
to graphically verify that this alternate procedure produces the same Fig. 4.4c result.
Sketch the signal x[n], which equals e0.5n for 3 n 2 and is zero otherwise. Determine and sketch
the time-reversed signal y[n] = x[n].
Show that x[n m] can be obtained from x[n] by rst right shifting x[n] by m units and then time
reversing this shifted signal.
4.1.3
As with the continuous-time case, the time-scaling operation either compresses or expands a discretetime signal. A compressed DT signal has fewer points than the original, while an expanded DT
signal increases the number of points from the original, usually by inserting zeros. If desired, an
interpolation lter lls in the gaps of zeros caused by expansion. Using the original signal of Fig. 4.5a,
Fig. 4.5b shows compression by 2, Fig. 4.5c shows expansion by 2, and Fig. 4.5d shows interpolation
of Fig. 4.5c. When applied to a signal sampled at some rate Fs , a DT time scaling operation alters the
sampling rate. Compression decreases the sampling rate, while expansion increases it. Systems that
operate with dierent sampling rates, called multirate systems, are becoming increasingly important
in modern digital signal processing applications.
Compression, Downsampling, and Decimation
Replacing n with M n in x[n] compresses the signal by factor M to produce
x [n] = x[M n].
(4.5)
Because of the restriction that discrete-time signals are dened only for integer values of the argument, M must be an integer. The value of x[M n] at n = 0 is x[0], at n = 1 is x[M ], at n = 2
is x[2M ], and so on. This means that x[M n] selects every M th sample of x[n] and deletes all the
samples in between. Since compression reduces the number of samples by factor M , a signal x[n]
at rate Fs produces a signal x[M n] at reduced rate Fs /M . For this reason, the DT compression
operation is also called downsampling. To help illustrate, Fig. 4.5a shows a signal x[n], and Fig. 4.5b
shows the downsampled signal x [n] = x[2n], which is obtained by deleting odd-numbered samples
of x[n].
In the continuous-time case, time compression merely speeds up the signal without loss of any
data. In contrast, compression of x[n] causes a loss of samples, although, as we shall soon see, not
217
x[n]
(a)
10 12 14 16 18 20 n
10 n
10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 n
10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 n
x [n]
(b)
2
x [n]
(c)
2
xi [n]
(d)
Figure 4.5: Time scaling a DT signal: (a) original signal, (b) compression by 2, (c) expansion by 2,
and (d) expansion by 2 followed by interpolation.
necessarily a loss of information. If x[n] is the result of oversampling some CT signal x(t) by a factor
M or greater, then clearly x[M n] still satises Nyquist and retains complete information about x[n].
Since reducing the sampling rate of a signal can cause aliasing, downsampling is sometimes preceded
by a digital anti-aliasing lter, also called a decimation lter. We shall discuss in Ch. 6 the nature of
the appropriate decimation lter for accomplishing the desired objective of conservation (or at least
limiting the loss) of the original data. The combined operation of ltering followed by compression
is referred to as decimation.
Consider the signal x[n] = cos(2n/4), which are samples of the signal cos(2t) taken at Fs =
(twice the Nyquist rate). Sketch x[n], x[2n], and x[4n]. Comment on the results.
1
T
=4
The original sinusoid signal x[n], being sampled at twice the Nyquist rate, displays four samples
per cycle (twice the minimum), as shown in Fig. 4.6a. When compressed by a factor of 2, half the
samples are eliminated, and the sampling rate is eectively cut in half. In other words, the sampling
rate goes from twice Nyquist to exactly Nyquist. Figure 4.6b conrms this result and shows that
x[2n] has two samples per cycle, the bare minimum needed to represent the sinusoid. Since x[n] is
218
oversampled by a factor of 2, the compressed signal x[2n] still retains complete information about
the original signal, even though half the samples of x[n] are thrown away.
Continuing the downsampling process, it is not surprising that when x[n] is compressed by a factor of 4 to produce x[4n], as shown in Fig. 4.6c, the result displays the classic symptoms of aliasing.
The sampling rate is essentially cut to half the Nyquist rate, causing higher frequencies to impersonate lower frequencies. Such aliasing typically causes an irrecoverable loss of signal information
and is thus undesirable.
x[n]
(a)
12
16
20
x[2n]
(b)
10
x[4n]
(c)
Figure 4.6: Downsampling a sinusoid: (a) x[n] = cos(2n/4), (b) x[2n], and (c) x[4n].
Example 4.1
As shown in Fig. 4.5, x[2n] represents a compression by 2 that preserves the even-numbered samples of the
original signal x[n]. Show that x[2n + 1] also compresses x[n] by a factor of 2, but in doing so preserves
the odd-numbered samples.
x[n/L] n = 0, L, 2L, . . .
.
0
otherwise
(4.6)
To understand this expression, consider a simple case of expanding x[n] by a factor L = 2. The
expanded signal is x [n] = x[n/2] for even n. Hence, x [0] = x[0], x [2] = x[1], x [4] = x[2], and so
on. Since a discrete-time signal is not dened for non-integer arguments, Eq. (4.6) denes x [n] as
zero whenever n/L is a fractional value. Continuing our L = 2 example, the odd-numbered samples
x [1], x [3], x [5], . . . are thus all zero. Figure 4.5c illustrates this case.
219
A signal x[n] = sin(2n/4) is expanded by L = 2 to produce x [n]. Next, this signal is interpolated
according to xi [n] = 12 x [n 1] + x [n] + 12 x [n + 1]. Sketch x[n], x [n], and xi [n], and comment on the
overall quality of the signal interpolation.
4.2
DT Signal Models
We now discuss some important discrete-time signal models that are encountered frequently in the
study of discrete-time signals and systems.
4.2.1
The discrete-time counterpart of the unit step function u(t) is u[n], which is shown in Fig. 4.7a and
dened as
1 n0
u[n] =
.
(4.7)
0 n<0
If we want a signal to start at n = 0 (so that it has a zero value for all n < 0), we need only multiply
the signal with u[n].
Combinations of the unit step and its shift allow us to specify a particular region of time. The
signal u[n] u[n 10], for example, is 1 for 0 n 9 and 0 otherwise, as shown in Fig. 4.7b. Unlike
220
u[n]
1
(a)
(b)
Figure 4.7: (a) The unit step u[n] and (b) the combination u[n] u[n 10].
the continuous-time signal u(t) u(t 10), which remains 1 until t = 10, notice that u[n] u[n 10]
lasts only until n = 9. This subtle but important point is easy to understand: the signal turns on
(becomes 1) at n = 0 due to the u[n] component and turns o (becomes 0) at n = 10 due to the
u[n 10] component. Upcoming Ex. 4.2 illustrates the ecacy of the step function in describing
piecewise signals, which have dierent descriptions over dierent ranges of n.
4.2.2
The discrete-time counterpart of the continuous-time impulse function (t) is the Kronecker delta
function [n], dened as
1 n=0
[n] =
.
(4.8)
0 n = 0
This function, also called the unit impulse sequence, is shown in Fig. 4.8a. The shifted impulse
sequence [n m] is depicted in Fig. 4.8b. Unlike its continuous-time counterpart (t) (the Dirac
delta function), the Kronecker delta function [n] is a very simple function that can physically exist
and that requires no special esoteric knowledge of distribution theory.
[n m]
[n]
1
m
(b)
(a)
Figure 4.8: Discrete-time impulse functions: (a) [n] and (b) [n m].
Similar to the Dirac delta function, several useful properties accompany the DT unit impulse
function.
1. Multiplication by a DT Impulse: If a DT function x[n] is multiplied by a shifted Kronecker
delta function, only the signal value that coincides with the impulse survives:
x[n][n m] = x[m][n m].
(4.9)
x[m][n m].
(4.10)
x[n] =
m=
221
Basically, Eq. (4.10) provides the rather obvious result that any discrete-time signal can be
represented as a weighted sum of all its samples (shifted, scaled impulse functions).
3. Relationships between [n] and u[n]:
elsewhere, it follows that
u[n] =
[m]
(4.11)
m=
and
[n] = u[n] u[n 1].
(4.12)
These relationships between u[n] and [n] are the discrete-time analogues to the integral and
dierential relationships between u(t) and (t).
Example 4.2 (Signal Representation through Unit Impulse and Step Functions)
Describe the signal x[n] shown in Fig. 4.9 by a single expression, valid for all n, comprised of unit
impulse and step functions.
x[n]
4
2
10
Figure 4.9: Signal representation through unit impulse and step functions.
There are many dierent ways of viewing x[n]. Although each view yields a dierent expression,
they are all equivalent. We shall consider here just one possible expression.
The signal x[n] can be broken into three components: (1) a ramp component x1 [n] from n = 0
to 4, (2) a step component x2 [n] from n = 5 to 10, and (3) an impulse component x3 [n] represented
by the negative spike at n = 8. Let us consider each one separately.
We express x1 [n] = n (u[n] u[n 5]) to account for the signal from n = 0 to 4. Assuming that
the spike at n = 8 does not exist, we let x2 [n] = 4(u[n 5] u[n 11]) account for the signal from
n = 5 to 10. Once these two components are added, the only part that is unaccounted for is a spike
of amplitude 2 at n = 8, which can be represented by x3 [n] = 2[n 8]. Hence
x[n] = x1 [n] + x2 [n] + x3 [n]
= n (u[n] u[n 5]) + 4 (u[n 5] u[n 11]) 2[n 8].
We stress again that the expression is valid for all values of n. There are many other equivalent
expressions for x[n]. For example, one may consider a step function from n = 0 to 10, subtract a
ramp over the range n = 0 to 3, and subtract a spike at n = 8.
Example 4.2
222
Show that the expansion of signal x[n] by factor L, dened by Eq. (4.6), can be expressed using Kronecker
delta functions as
x[m][n Lm].
(4.13)
x [n] =
m=
Using this representation, nd and plot the L = 4 expansion of x[n] = u[n + 4] u[n 5].
4.2.3
DT Exponential Function z n
Chapter 1 details the versatile continuous-time exponential function est , which, depending on the
value of the complex frequency s, can behave as a constant, a monotonic exponential, a sinusoid,
an exponentially decaying sinusoid, and others. This generalized exponential function is intimately
connected to the Laplace transform, which is useful in the analysis of continuous-time signals and
systems. As might be expected, a generalized discrete-time exponential serves similar roles in the
study of DT signals and systems. Connecting the DT exponential to the CT exponential provides
much insight and is well worth the investment in time and eort.
Let us sample a CT exponential est in the usual way by letting t = nT . The resulting DT
exponential is
1
(4.14)
where z = esT and s = ln(z).
esT n = z n ,
T
The two forms esT n and z n are just alternate expressions of the same DT exponential. The form
esT n helps emphasize the connection to CT exponentials, while the form z n is convenient to the
study of DT signals and systems. It is straightforward to convert between the two forms. For
example, en = (e1 )n = (0.3679)n. Similarly, 2n = eln(2)n = e0.6931n . In the rst case, sT = 1
and z = esT = 0.3679. In the second case, z = 2 and sT = ln(z) = 0.6931. Notice that while we
typically use z with DT signals, the variable z itself is complex and continuous.
Given its direct connection to the CT exponential, we expect that the DT exponential z n can
behave as a DT constant, monotonic exponential, sinusoid, exponentially decaying sinusoid, and
others. This turns out to be true. Letting r = |z| and = z so that z = rej , the following
functions are special cases of z n :
1. a constant k = k1n (where z = 1ej0 ),
2. a monotonic exponential rn (where z = rej0 ),
3. a sinusoid cos(n) = Re ejn (where z = 1ej ), and
4. an exponentially varying sinusoid rn cos(n) = Re rn ejn (where z = rej ).
Figure 4.10 shows various examples of these DT exponential functions.
While these cases may seem essentially identical to those for the CT exponential, there are
important distinctions between the continuous-time and discrete-time cases. Before detailing these
dierences, however, it is helpful to better connect the complex variable s (used with CT signals) to
the complex variable z (used with DT signals).
Relating s and z
The signal est grows exponentially with s if Re {s} > 0 (s in RHP) and decays exponentially if
Re {s} < 0 (s in LHP). It is constant or oscillates with constant amplitude if Re {s} = 0 (s on
the imaginary axis). As indicated in Fig. 4.11a, the location of s in the complex plane indicates
whether the signal est grows exponentially (unshaded region), decays exponentially (shaded region),
or oscillates with constant frequency (imaginary axis). By investigating the relationship between s
223
|z| = 1
n
z n = rej0 = r n
|z| < 1
|z| > 1
n
(c)
(b)
Re {z n } = r n cos(n)
(a)
(d)
(e)
(f)
Im {z}
3
T
exponentially
increasing
exponentially
increasing
exponentially
decreasing
2
T
Re {s}
exponentially
decreasing
Re {z}
2
T
3
T
z-plane
s-plane
(a)
(b)
Figure 4.11: Relating complex planes: (a) s-plane and (b) z-plane.
In simple terms, Eq. (4.14) tells us that s and z are related by z = esT or, equivalently, s =
ln(z). Let us begin with the imaginary axis in Fig. 4.11a, which corresponds to non-decaying CT
exponentials. Here, s = 0 + j and z = esT = ejT . In this case, |z| = |ejT | = 1, and we conclude
that the s-plane imaginary axis becomes the z-plane unit circle |z| = 1. Similarly, the negative
half-plane in Fig. 4.11a, which has s = + j and < 0, becomes z = esT = e(+j)T . In this case,
|z| = |e(+j)T | = eT . However, since < 0 (LHP), we see that |z| < 1. In other words, the left
half of the s-plane, shown shaded in Fig. 4.11a, maps to the interior of the unit circle in the z-plane,
shown shaded in Fig. 4.11b. Conversely, the right half-plane in Fig. 4.11a (unshaded) maps to the
1
T
224
exterior of the unit circle in Fig. 4.11b (also unshaded). Thus, |z| < 1 corresponds to decaying
exponentials, |z| = 1 corresponds to constant-envelope exponentials, and |z| > 1 corresponds to
growing exponentials, examples of which are shown in Fig. 4.10.
Let us study the relation z = esT more carefully. The equation z = esT is a rule, or mapping,
that tells us how to go from one location to another. There are many types of mapping functions.
The familiar equation y = x is a linear mapping where every point x maps directly to its own
corresponding point y (a one-to-one mapping). The equation y = x3 is also a mapping, but one
where multiple points x can map to a single point y. The expression z = esT is a mapping that tells
us how to get from s to z (and, to some extent, vice versa). It, like y = x3 , is a many-to-one mapping.
In fact, an innite number of points s map to any single point z (of which there are innitely many).
Realizing that sampling is used to travel from s to z, we recognize that the many-to-one nature of
this mapping is just a disguise of aliasing.
To help further understand this many-to-one behavior, let us consider a simple case where s =
j 2
T k (k integer). These points, shown as heavy dots along the imaginary axis in Fig. 4.11a, map to
the single value z = esT = ej2k = 1, shown with a similar heavy dot in Fig. 4.11b. Just as all roads
lead to Rome, we see that all points s = j 2
T k lead to z = 1. This case corresponds to an earlier
observation that all sinusoids whose frequencies are integer multiples of the sampling rate Fs = 1/T
alias to DC. By extension, any segment of length 2/T along the imaginary axis in Fig. 4.11a maps
in a one-to-one fashion to the unit circle in Fig. 4.11b. In fact, by further extension, any s-plane strip
of height 2/T maps to cover the entire z-plane. Not surprisingly, the strip /T < Im {s} < /T
corresponds to the fundamental band, discussed in Ch. 3 (pg. 171). Struck again by the curse of
aliasing, any signal outside this region will look, following the mapping by z = esT , as if it came
from the fundamental band.
Consider the DT exponential Re {z n } obtained from sampling the signal Re {est } with T = 1.
Using z = esT , plot Re {z n }, as well as Re {est } for reference, over 5 n 5 for the cases
s = 0.1 and s = 0.1 + j2. Comment on the results.
The desired signal plots, generated with MATLAB, are shown in Fig. 4.12.
01
02
03
04
05
t = linspace(-5.5,5.5,1001); n = (-5:5); T = 1;
s = -0.1+1j*0; z = exp(s*T);
subplot(121); stem(n,real(z.^n)); line(t/T,real(exp(s*t)));
s = -0.1+1j*2*pi; z = exp(s*T);
subplot(122); stem(n,real(z.^n)); line(t/T,real(exp(s*t)));
Re {z n }
1
Re {z n }
1
(a)
(b)
Figure 4.12: Plotting Re {z n } = Re {est }|t=nT for (a) s = 0.1 (b) s = 0.1 + j2.
The case s = 0.1 is in the fundamental band, so the DT exponential closely follows the CT exponential, as shown in Fig. 4.12a. The case s = 0.1 + j2, however, is not in the fundamental
band. In this case, aliasing occurs, and the DT exponential cannot closely follow the original CT
exponential, as shown in Fig. 4.12b. Further, since s = 0.1 diers from s = 0.1 + j2 by an
integer factor of j 2
T , the DT exponentials in Figs. 4.12a and 4.12b are identical. As this example
225
demonstrates, aliasing aects all types of exponentials, not just simple (non-decaying) sinusoids, as
considered earlier in Ch. 3.
Example 4.3
Determine and sketch the DT exponentials z n that result from sampling (T = 1) the following CT exponentials est :
0.6931 t
(a) e0t = 1
(b) et
(c) e0.6931t
(d)
e
(e)
2t
(f )
2t
(g)
et/4
(h)
ejt
For each case, locate the value z in the complex plane and verify that z n is exponentially decaying,
exponentially growing, or non-decaying depending on whether z is inside, outside, or on the unit circle.
Im
n=3
||
n=2
||
||
n=1
1
n=0
1
Re
||
||
||
n=0
Re
n=1
n=2
n=3
(b)
(a)
226
We know from Eulers formula that ejn = cos(n) + j sin(n), so DT sinusoids are directly
connected to complex exponentials. For example, Fig. 4.14a plots cos(n/5), which can be obtained
from taking the real part of the complex exponential ejn/5 . Bound by such a close relationship,
sinusoids and complex exponentials share similar properties and peculiarities. We examine one
peculiarity of DT sinusoids next.
cos(n/5 /2)
cos(n/5)
1
10
20
10
20 n
1
(a)
(b)
where = T .
(4.15)
With a casual glance at Eq. (4.15), it may appear that DT sinusoids are cousins of CT sinusoids in
striped suits. Things, however, are not quite that straightforward. In the CT case, the waveform
cos(t+ ) is identical to cos(t) except for a time shift of /. In the DT case, however, cos(n+ )
is not generally a simple shift of cos(n). Figure 4.14 illustrates the point. In Fig. 4.14a we nd
the DT sinusoid cos(n/5), which has frequency = /5. As shown in the Fig. 4.14b plot of
cos(n/5 /2), however, a phase oset of /2 produces more than a simple shift in the waveform.
Entirely dierent values are produced. For example, the peak value of cos(n) is 1, while the peak
value of cos(n/5 /2) is slightly less at 0.9511. Similarly, cos(n) is never 0 yet cos(n/5 /2)
is frequently 0.
The two CT sinusoids cos(t) and cos(t + ) are identical in shape and information; their only
dierence is a simple time shift. Now, an important question is whether the two corresponding DT
sinusoids also contain identical information despite their dierent sample values? Yes, they do! How
so? The signal cos(n + ) is just a sampled version of cos(t + ). As long as the signal is not
undersampled, cos(t + ) can be recovered exactly from cos(n + ) regardless of .
Apparent Frequency and the Nonuniqueness of DT Exponentials
A continuous-time sinusoid cos(t) has a unique waveform for every value of in the range 0 to
. Increasing results in a sinusoid of ever-increasing frequency. Such is not the case for DT
sinusoids or, more generally, DT exponentials. The culprit is the same phenomenon of frequency
folding (aliasing) presented in Ch. 3, which itself is connected to the many-to-one nature of the
mapping z = esT discussed earlier. Moreover, inasmuch as DT sinusoids can be obtained by sampling
CT sinusoids, we expect DT sinusoids to follow the fascinating behavior of sampled CT sinusoids
observed in Sec. 3.3.1. We saw that when a CT sinusoid of frequency f0 is sampled at a rate Fs
Hz, the frequency of the resulting sampled sinusoid never exceeds Fs /2 Hz. In fact, the results of
Sec. 3.3.1 can be directly applied to DT sinusoids. The implication is that a DT sinusoid frequency
can never exceed a certain frequency, which, we shall see, is .
227
and
(4.16)
(a)
3
|a |
|a |
0
(b)
(c)
Figure 4.15: Apparent frequency of a DT exponential with frequency : (a) a , (b) |a |, and (c)
multiple folding to obtain |a |.
As in the CT case, the distinction between positive and negative frequencies is often unimportant.
For example, since cos(n + ) = cos(n ), we see that frequencies both produce the same
rate of oscillation. Thus, apparent frequency is often expressed as |a |, as shown in Fig. 4.15b.
Although less ecient than using Eq. (4.17), we can also determine the apparent frequency |a |
using multiple folding, as shown in Fig. 4.15c. To do so, we mark a narrow strip of paper tapemeasure style using radians per sample, the units of . Folding the tape accordion fashion every
integer multiple of , the frequency |a | is just the projection of onto the (0, ) segment, as shown
using a dotted line in Fig. 4.15c.
Figure 4.15 also claries the frequency reversal eect, where increasing frequency can actually
decrease the apparent frequency a and reverse its direction (sign). This reversal eect is behind
the amusing scenes in some western movies where wheels appear to rotate backward and slow down,
even though the wagon is moving forward and speeding up.
228
cos( 8 n) = cos( 15
n) =
8
12
16
12
16
1
(a)
(b)
cos(n) = cos(3n) =
cos( 2 n) = cos( 3
n) =
2
1
12
16
12
16
1
(c)
(d)
Figure 4.16: DT sinusoids of various frequencies: (a) lowest rate = 0 to (d) highest rate = .
Figure 4.15 shows that discrete-time frequencies are bandlimited to || = . All frequencies
outside this range alias into the fundamental band, which ranges from to radians/sample.
Any discrete-time sinusoid of frequency beyond the fundamental band, when plotted, appears and
behaves, in every way, as some sinusoid of frequency in the fundamental band. It is impossible to
distinguish between the two signals. Thus, in a basic sense, discrete-time frequencies beyond || =
do not exist. Yet, in a mathematical sense, we must admit the existence of sinusoids of frequencies
beyond || = . What does this mean?
A Man Named Robert
To give an analogy, consider a ctitious person Mr. Robert Thompson. His mother calls him
Robby, his acquaintances call him Bob, his close friends call him by his nickname, Shorty.
Yet, Robert, Robby, Bob, and Shorty are one and the same person. However, we cannot say that
only Mr. Robert Thompson exists, or only Robby exists, or only Shorty exists, or only Bob exists.
All these four persons exist, although they are one and the same person. In the same way, we cannot
say that the frequency /2 exists and that the frequency 5/2 does not exist; they are both the
same entity, called by dierent names.
It is in this sense that we have to admit the existence of frequencies beyond the fundamental
band. Indeed, as we shall see later, mathematical expressions in the frequency domain automatically
When
advantageous, we sometimes use other contiguous ranges of width 2 in place of the range to . The
range 0 to 2, for instance, is used in many applications.
229
cater to this need by their built-in periodic nature. For this reason, discrete-time signal spectra are
2-periodic.
Admitting the existence of frequencies with || > also serves mathematical and computational
convenience in digital signal processing applications. Values of frequencies beyond also originate
naturally in the process of sampling continuous-time sinusoids. Because there is no upper limit on
the value of , there is no upper limit on the value of the resulting discrete-time frequency = T ,
although aliasing reduces the apparent frequency to |a | < if || > .
The Apparent Laziness of DT Exponentials
To provide additional insight regarding apparent frequency, we next use a discrete-time exponential
rather than a sinusoid. As shown in Fig. 4.13, a discrete-time complex exponential ejn can be viewed
as a phasor rotating at a uniform angular speed of || rad/sample, where the direction of rotation
depends on whether is positive (counterclockwise rotation) or negative (clockwise rotation). For
|| < , angular speed increases with ||, as is natural. When || increases beyond , however,
something interesting happens. Let = + x and x < . Figures 4.17a, 4.17b, and 4.17c show ejn
as n progresses from 0 1, 1 2, and 2 3, respectively. Since = + x > 0, we can rightly
view this progression as angular steps of size + x rad/sample in the counterclockwise direction
(solid arcs). However, we may also interpret the phasor motion as being clockwise at the lower
speed of x rad/sample (dotted arcs). Either of these interpretations describes the phasor motion
correctly. If this motion is seen by a human eye, which is a lowpass lter, it will automatically
interpret the speed as x, the lower of the two speeds. This interpretation is precisely |a |, which
equals x in this case. This is the genesis of why, as increases beyond , the frequency displays a
counterintuitive behavior and appears to slow down. Apparent frequency views all DT exponentials
as incredibly lazy, only traveling the smallest possible angle to move from one sample to the next.
Im
n=3
Im
+x
+x
n=0
Re
x
x
Re
n=2
+x
n=2
n=1
(a)
Im
Re
n=1
(c)
(b)
Figure 4.17: Progression of ej(+x)n for n from (a) 0 1, (b) 1 2, and (c) 2 3.
cos(0.5n + )
(d) cos(2.3n + )
(b) cos(1.6n + )
(c) sin(1.6n + )
(e) cos(34.6991n + )
(f ) sin(2.3n + )
(a)
As conrmed by Fig. 4.15, = 0.5 is in the fundamental range already. There is no phase reversal,
and the apparent sinusoid is
cos(0.5n + ).
(b)
Here, a = 1.6 + 2 = 0.4. Since a is negative, a sign change in is required to express
230
+ ). In part (b) we
) = sin(0.4n ).
2
In this case, both the phase and the amplitude change signs.
(d)
In this case, a = 2.3 + 2 = 0.3. Hence, the apparent sinusoid is
cos(0.3n + ).
(e)
Using Eq. (4.17) and MATLAB, we compute the apparent frequency as
01
mod(34.6991+pi,2*pi)-pi
ans = -3.0000
Show that a real sinusoid of frequency equal to 2, 3, 5, 3.2, 22.1327, and + 2 can be expressed
as a sinusoid of frequency 0, , , 0.8, 3, and 2, respectively. In which cases does the phase change
sign?
Accurately sketch the exponentially varying sinusoids xa [n] = (0.9)n cos( 6 n 3 ) and xb [n] =
n 3 ). For both xa [n] and xb [n], determine their apparent frequencies, and locate the
(1.1)n cos( 49
6
values z of their corresponding DT exponentials z n in the complex plane.
4.3
231
DT Signal Classications
Discrete-time signals are classied in much the same way as continuous-time signals. Of particular
interest to our study, we consider the following DT signal classications:
1. causal, noncausal, and anti-causal signals,
2. real and imaginary signals,
3. even and odd signals,
4. periodic and aperiodic signals, and
5. energy and power signals.
The rst three DT signal classications are nearly identical to the corresponding CT cases, so we
treat them only briey. Deeper discussion on these classications is found in Sec. 1.4. The DT
classications of periodic or aperiodic and energy or power, which are substantively dierent than
the CT cases, are treated in more depth.
4.3.1
Exactly as in continuous-time, a causal DT signal x[n] extends to the right, beginning no earlier
than n = 0. Mathematically, x[n] is causal if
x[n] = 0
for n < 0.
(4.18)
for n 0.
(4.19)
Any signal x[n] can be decomposed into a causal component plus an anti-causal component.
A right-sided signal is nonzero only to the right of some nite time n = N , while a left-sided
signal extends to the left of some nite point. Causal signals are right-sided, and anti-causal signals
are left-sided. The converse, however, is not necessarily true. Discrete-time signals that stretch in
either direction indenitely are called two-sided or everlasting signals.
A Cause to Pause
Let us use our knowledge of causality to consider a subtlety of notation. Either explicitly or implicitly,
all causal signals involve the unit step function. Recall that Eq. (1.1) denes the CT unit step
function u(t) to have a value 1/2 at t = 0. This assignment of u(0) = 1/2 is preferable from the
context of Fourier analysis, among others. In the DT case, however, we dene u[0] as 1 rather than
1/2, a choice that is preferable from many, although not all, perspectives. One disadvantage of this
choice is that sampling a CT unit step does not exactly produce a DT unit step. That is, according
to our notation, u(nT ) =
u[n]. The two functions dier at time 0 by a value of 1/2. It is impossible
to sample exactly at t = 0 (just as it is impossible to generate a CT unit step), so the dierence
between the two models is mostly irrelevant in practice. Thus, we are well justied to consider u(0)
as whatever value is convenient and appropriate to the situation.
Mathematically, a CT function is undened at points of discontinuity, and we can, without serious consequence,
call such points whatever value suits our purpose. In the case of the unit step, the choices u(0) = 1/2, u(0) = 1, and
u(0) = 0 all nd common practical application.
232
4.3.2
As in continuous-time, a DT signal x[n] is real if, for all time, it equals its own complex conjugate,
x[n] = x [n].
(4.20)
A signal x[n] is imaginary if, for all time, it equals the negative of its own complex conjugate,
x[n] = x [n].
(4.21)
Any signal x[n] can be represented in rectangular form using its real and imaginary portions as
x[n] x [n]
x[n] + x [n]
x[n] =
+j
.
(4.22)
2
2j
Re{x[n]}
Im{x[n]}
Recall that the imaginary portion of a signal, DT or otherwise, is always real.
4.3.3
(4.23)
A signal x(t) is odd if, for all time, it equals the negative of its own reection,
x[n] = x[n].
(4.24)
Any signal x[n] can be decomposed into an even portion plus an odd portion,
x[n] =
xo [n]
(4.25)
233
Conjugate Symmetries
Complex signals are commonly decomposed using conjugate symmetries rather than even and odd
decompositions. A signal x[n] is conjugate symmetric, or Hermitian, if
x[n] = x [n].
(4.26)
(4.27)
Any DT signal x[n] can be decomposed into a conjugate-symmetric portion plus a conjugateantisymmetric portion,
x[n] + x [n] x[n] x [n]
x[n] =
+
.
(4.28)
2
2
xcs [n]
4.3.4
xca [n]
A discrete-time signal x[n] is said to be N -periodic if, for some positive integer N ,
x[n] = x[n N ] for all n.
(4.29)
The smallest value of N that satises the periodicity condition of Eq. (4.29) is the fundamental
period N0 . Figure 4.18 shows an example of a periodic signal with N0 = 6. By denition, a periodic
signal must be an everlasting signal that stretches from n = to . A signal that does not
satisfy Eq. (4.29) is aperiodic.
x[n]
12
12
234
of the limitation that the period N0 must be an integer. Further, as we shall see, the frequency F
of a periodic DT sinusoid need not equal the fundamental frequency F0 of that very same sinusoid.
Ignoring phase for convenience, consider a DT sinusoid cos(2F n). Using Eq. (4.29), this signal
is N0 -periodic if
cos(2F n) = cos[2F (n + N0 )]
= cos(2F n + 2F N0 ).
This result is possible only if F N0 is an integer. This integer, which we call m, should be as small
as possible since N0 is the fundamental period. Thus, a DT sinusoid is periodic if
F=
m
N0
or = 2
m
.
N0
(4.31)
Equation (4.31) tells us that a DT sinusoid is periodic only if F is a rational number (or is a
rational multiple of 2). Further, Eq. (4.31) conrms that unless m = 1, a DT sinusoids frequency
F = m/N0 is not equal to the signals fundamental frequency F0 = 1/N0 . The fundamental period
of a DT sinusoid is easily determined by writing F in the reduced form of Eq. (4.31), where the
numerator and denominator are coprime. The next example claries these ideas.
3
1
1
Sketch the DT sinusoid cos(2F n) for the three cases (a) F = 15
, (b) F = 1.7
, and (c) F = 5.5
.
In each case, determine whether or not the signal is periodic. If it is, determine the fundamental
period N0 , and state whether the fundamental frequency equals the sinusoids frequency F .
Plots of the three DT sinusoids, generated using MATLAB, are shown in Fig. 4.19.
01
02
03
For reference, Fig. 4.19 also shows the CT sinusoids cos(2F t) that, when sampled using T = 1,
result in the DT sinusoids cos(2F n) of interest.
(a)
3
is clearly rational, so the DT sinusoid is periodic. However,
In the rst case, the frequency F = 15
3
is
not
in
reduced
form
since
the
greatest
common divisor of the numerator and denominator is 3
15
and not 1. Dividing numerator and denominator by this factor yields F = 15 = Nm0 . The fundamental
period is thus N0 = 5, which is easily veried using Fig. 4.19a. Since the fundamental frequency
F0 = N10 = 15 equals the sinusoids frequency F = 15 (i.e., m = 1), we see that N0 samples of the
DT sinusoid contain exactly one cycle of the underlying CT sinusoid cos(2F t).
(b)
1
is not rational. Thus, the DT
Due to the factor in the denominator, the frequency F = 1.7
1
1
n) contains complete inforsinusoid cos(2 1.7 n) is not periodic. Although the sequence cos(2 1.7
1
mation of the underlying CT sinusoid, the DT sequence never repeats. Notice that cos(2 1.7
n)
averages 1.7 samples (an irrational number) per cycle, and no period N0 can thus contain an integer
number of cycles of the CT sinusoid cos(2F t).
As shown in Fig. 4.19b, we see that the sample at n = 0 equals 1, the sinusoids peak. No other
sample value, from to , ever reaches this peak value. In fact, all samples are unique in this
respect. Each sample value is seen once and only once.
DT
complex exponentials ejn have identical periodicity conditions to DT sinusoids. See Prob. 4.3-4.
integers are coprime if their greatest common divisor is 1.
Two
235
(c)
1
In the third case, the frequency F equals 5.5
. Multiplying both numerator and denominator by 2
2
yields F = 11 , which is clearly rational. Thus, the DT sinusoid is periodic. Since 2 and 11 are
coprime, the numerator and denominator establish m = 2 and N0 = 11, respectively. Since m = 1,
1
1
does not equal the sinusoids frequency F = 5.5
. This is simply
the fundamental frequency F0 = 11
a reection that the DT sinusoid only repeats after m = 2 oscillations of the underlying CT sinusoid
cos(2F t), as claried in Fig. 4.19c. As this case suggests, the frequency of a periodic DT sinusoid
is always an integer multiple of the signals fundamental frequency, F = mF0 .
1
(a)
3
cos(2 15
n)
10
10
1
cos(2 1.7
n)
(b)
10
10
1
n)
cos(2 5.5
(c)
10
10
1
3
1
1
Figure 4.19: DT sinusoids: (a) cos(2 15
n), (b) cos(2 1.7
n), and (c) cos(2 5.5
n).
Example 4.5
Intuition Makes the Profound Look Trivial: Connections to the Sampling Theorem
A sampled CT sinusoid of frequency f results in a DT sinusoid of frequency F = f T . To avoid aliasing, Eq. (3.2) requires that |f | < Fs /2 = 1/2T or, equivalently, |F | < 0.5. As shown in Fig. 4.15, this
is equivalent to our earlier observation that all DT sinusoids are inherently bandlimited. Frequencies
F separated by integer numbers are, as a consequence of aliasing, identical. For instance, discretetime sinusoids with frequencies F = 0.3, 1.3, 2.3, . . . cycles/sample are all identical. Clearly, there
is a strong connection between the sampling theorem, aliasing, and the bandlimiting phenomenon.
When we see the restriction |F | < 0.5 on discrete-time frequencies, some unsettling questions
come to mind. Why are discrete-time frequencies restricted when their continuous-time sisters have
the freedom to take on any value? Does this restriction make discrete-time systems second-class
citizens, who are forced to service only low-frequency signals?
To answer the rst question, rst notice that CT signals can have a period as large or as small
as we can imagine. For DT signals, however, the period cannot be less that one sample (N0 1).
But a periodic signal with period of one sample results in a constant (F = 0). Hence, the next best
In
236
choice is N0 = 2. This is the minimum period (maximum frequency) that is possible. Thus, the
highest possible discrete-time frequency has a period of 2 and a maximum frequency Fmax = 0.5
cycles/sample. This profound result (F < Fmax = 0.5), which basically restates the venerable
sampling theorem, is just an intuitively trivial fact. Intuition often makes profound results look
trivial.
Coming back to the second question, the answer is an emphatic No! The limitation F < 0.5 has
no detrimental eect on the ability of discrete-time systems to process high-frequency continuoustime signals. Since F = f T , we can decrease T enough to ensure that F < 0.5 no matter how high
is f , the frequency to be processed. In summary, a discrete-time system has a limit as to how high
a frequency f it can process for a given value of the sampling interval T . However, we can process
a continuous-time signal of any frequency, no matter how high, by decreasing T suciently.
State with reasons whether the following sinusoids are periodic. If periodic, nd the fundamental period
N0 , and determine whether the fundamental frequency is equal to the sinusoids frequency.
n)
(b) cos( 10
n)
(c) cos( n)
(a) cos( 3
(d) sin(2.35n + 1)
7
7
4.3.5
Arguing along the lines similar to those used for continuous-time signals, the size of a discrete-time
signal x[n] is measured by its energy Ex or its power Px . The energy of DT signal x[n] is dened as
Ex =
|x[n]|2 .
(4.32)
n=
This denition is valid for real or complex x[n]. For this measure to be meaningful, the energy of a
signal must be nite. A necessary condition for the energy to be nite is that the signal amplitude
must 0 as |n| . Otherwise the sum in Eq. (4.32) will not converge. If Ex is nite, the signal
is called an energy signal.
In some cases, such as when the amplitude of x[n] does not 0 as |n| , signal energy is
innite. In such cases, a more meaningful measure of size is signal power Px (if it exists), which is
dened as the time average of energy and is given by
Px = lim
N
1
|x[n]|2 .
2N + 1
(4.33)
n=N
In this equation, the sum is divided by 2N + 1 because there are 2N + 1 samples within the interval
from N to N . For an N0 -periodic signal, the time averaging need be performed only over one
period, such as
N0 1
1
Px =
|x[n]|2 .
(4.34)
N0 n=0
If Px is nite and nonzero, the signal is called a power signal. As in the continuous-time case, a
discrete-time signal can be either an energy signal or a power signal but cannot be both at the same
time. Some signals are neither energy nor power signals.
The
sum limits in Eq. (4.34) can use any contiguous set of N0 points, not just the ones from 0 to N0 1.
237
Figure 4.20 shows a signal x[n] as well as two periodic signals created by periodic extension of x[n],
x
1 [n] =
k=
x[n + 7k].
k=
Determine the energy and power for each of these three DT signals.
x[n]
5
(a)
10
15
x
1 [n]
5
(b)
10
15
x
2 [n]
5
(c)
10
15
n2 = 12 + 22 + 32 + 42 + 52 = 55.
n=0
5
1 2
1
55
9.1667.
n = Ex =
6 n=0
6
6
The signal x
2 [n] is also a periodic replication of x[n] but has period 7. As with x
1 [n], the energy
of x
2 [n] is innite, Ex2 = . The power of x
2 [n] is found using Eq. (4.34) as
Px2
5
1 2
1
55
7.8571.
=
n = Ex =
7 n=0
7
7
Example 4.6
238
1
Show that the signal x[n] = z n u[n] is an energy signal of energy Ex = 1|z|
2 if |z| < 1, that it is a power
signal of power Px = 0.5 if |z| = 1, and that it is neither an energy signal nor a power signal if |z| > 1.
4.4
Systems whose inputs and outputs are discrete-time signals are called discrete-time systems. In other
words, discrete-time systems process discrete-time signals (inputs) to yield another set of discretetime signals (outputs). By using the operator H to represent the system function, the system output
y[n] is compactly represented in terms of the input x[n] as
y[n] = H {x[n]} .
Figure 4.21 illustrates this general relationship between input, output, and system operator.
input
x[n]
output
y[n] = H {x[n]}
y[n] =
K
a
xk [n]
x[n]
y[n] = ax[n]
k=1
xK [n]
(a)
x[n]
(b)
y[n] = x[n m]
z m
x[n]
x[n]
x[n]
(c)
(d)
Figure 4.22: Elementary DT blocks: (a) adder, (b) scalar multiplier, (c) delay, and (d) branch.
239
Determine the nonrecursive and recursive input-output equations of a cash register, where the
input x[n] is the price of the nth item and the output y[n] is the total value of all n items entered
in the register. Provide a block diagram representation of the system.
A cash registers input and output are both DT signals. We can express the output y[n] as
y[n] =
x[k]
n = 1, 2, 3, . . . .
(4.35)
k=1
n1
x[k] +x[n]
k=1
y[n1]
= y[n 1] + x[n]
n = 1, 2, 3, . . . .
We can obtain this equation directly by observing that the output y[n] is a sum of y[n 1] (total
price of previous n 1 items) and x[n], the price of the nth item. Grouping input and output terms
on separate sides of the equation yields
y[n] y[n 1] = x[n]
n = 1, 2, 3, . . . .
(4.36)
Equation (4.36) is an example of a dierence equation that, because the largest delay is 1, is rstorder. To be complete, Eq. (4.36) also requires knowledge of the initial condition y[0] = 0. We treat
system order and initial conditions more thoroughly later on.
Recursive and Nonrecursive Forms
The cash register representation of Eq. (4.36) is a recursive form, and Eq. (4.35) is a nonrecursive
form. Since both expressions properly model the system, what is the dierence between the two?
Which form is preferable? To answer these questions, let us examine how each computes its output.
In Eq. (4.35), the output y[n] at any instant n is computed by adding the current and all past
input values. As n increases, so do the number of terms being summed. In contrast, Eq. (4.36),
written as y[n] = y[n 1] + x[n], computes the output y[n] as the addition of only two values:
the previous output value y[n 1] and the present input value x[n]. The computations are done
recursively using the previous output values. For example, if the input starts at n = 1, we rst
compute y[1]. Once y[1] is computed, we compute y[2] using the value y[1]. Knowing y[2], we
compute y[3], and so on.
The computational burden of the nonrecursive form increases with n. For the recursive form,
however, the computational burden remains xed for all time. Thus, although both forms describe a
cash registers output in terms of its input, the recursive form is more ecient than the nonrecursive
form.
Figure 4.23 shows the block diagram representation (implementation) of Eq. (4.36), the preferred
recursive form. Clearly, the output y[n] is just the sum of the input x[n] and the previous output
value y[n 1].
240
x[n]
y[n]
z 1
y[n 1]
n = 0, 1, 2, . . . .
(4.37)
Since it uses advance operations, the dierence equation in Eq. (4.37) is said to be in advance form.
Similarly, Eq. (4.36), which uses delay operations, is said to be in delay form. Delay form is more
natural because delay operations are causal and hence realizable. In contrast, advance form, being
noncausal, is unrealizable. Still, advance form is useful since it results in discrete-time equations
that are identical in form to those for CT systems.
The Accumulator
The cash register represented by Eqs. (4.35) and (4.36) is a special case of an accumulator system
with a causal input. The general equation of an accumulator is
y[n] =
x[k].
k=
(4.38)
A person makes a deposit (the input) in a bank regularly at an interval of T = 1 month. The
bank pays a certain interest on the account balance during the period T and mails out a periodic
statement of the account balance (the output) to the depositor. Find the equation relating the
output y[n] (the balance) to the input x[n] (the deposit). Assuming that a person invests $100
monthly starting at n = 1 and earns a 0.5% monthly interest rate, how much money is earned at
n = 100? Provide a block diagram representation of the system.
In this case, the signals are inherently discrete-time. Let
x[n] = the nth deposit
y[n] = the month-n account balance, including the nth deposit
r = interest rate per period T
241
The balance y[n] is the sum of the previous balance y[n 1], the interest on y[n 1] during the
period T , and the deposit x[n], or
y[n] = y[n 1] + ry[n 1] + x[n]
= (1 + r)y[n 1] + x[n]
Letting a1 = (1 + r), the savings account is represented in standard delay form as
y[n] + a1 y[n 1] = x[n].
(4.39)
Simple recursion, computed in MATLAB, oers one way to determine the money earned by
investing $100 monthly at 0.5% interest per month for 100 months.
01
02
03
Thus, on an investment of 100 $100 = $10,000, $2,933.37 is earned in interest. The annual percent
yield (APY) of this account is computed as (1.005)12 1 = 0.0617, or 6.17%. As a note of caution,
although in this case the month n complies with MATLABs index requirements (positive integers
starting at 1), this is not always the case; more often than not, the DT time variable n cannot serve
(directly) as a MATLAB vector index.
Figure 4.24 illustrates the block representation of Eq. (4.39). The origin of the negative sign
attached to the scale factor a1 is easily seen by rewriting Eq. (4.39) as
y[n] = a1 y[n 1] + x[n].
x[n]
y[n]
z 1
a1
y[n 1]
Design a discrete-time system like the one in Fig. 4.2 to dierentiate continuous-time signals.
Construct a block diagram representation of the system, and investigate its response to a ramp
input x(t) = tu(t). Suggest an appropriate sampling interval if this is used in an audio system
where the input signal bandwidth is below 20 kHz.
In this case, the output y(t) is required to be the derivative of the input x(t). The discrete-time
system processes the samples of x(t) to produce the discrete-time output y[n], which is used to
242
construct y(t). Let x[n] and y[n] represent the uniform samples of signals x(t) and y(t), respectively.
If T is the sampling interval, then
x[n] = x(nT ) and y[n] = y(nT ).
The signals x[n] and y[n] are the input and output for the DT system. Now, we require that
y(t) =
d
x(t).
dt
T 0
x[n] x[n 1]
.
T
This is the input-output relationship needed to achieve our objective. In practice, the sampling
interval T cannot be zero. Assuming that T is suciently small, however, the system is approximated
as
1
1
y[n] = x[n] x[n 1].
(4.40)
T
T
This approximation improves as T approaches 0. Figure 4.25 represents the system in block form.
DT system
x(t)
C/D
1
T
x[n]
z 1
y[n]
D/C
y(t)
T1
x[n 1]
1
1
= 25 s.
=
2fmax
40000
However, the lower limit T = 25 s, which is the Nyquist rate, does not deliver good dierentiator
performance except at relatively low frequencies. Later, once we have covered the frequency-domain
analysis of DT signals and systems, we shall be able to improve our choice of sampling interval.
243
x[n]
x(t)
5T
y(t)
y[n]
1
5T
5T
(a)
0 T
(c)
(b)
5T
(d)
Figure 4.26: Digital dierentiator operation: (a) CT input x(t) = tu(t), (b) DT input x[n], (c) DT
output y[n], and (d) CT output y(t).
Backward and Forward Dierence Systems
The digital dierentiator in Fig. 4.25 is an example of what is known as a backward dierence system.
The reason for this naming is obvious from Eq. (4.40). To compute the derivative of y(t), we use the
dierence between the present sample value and the previous (backward) sample value. The forward
dierence form of the digital dierentiator, found using the dierence between the next (forward)
sample x[n + 1] and the present sample x[n], is given as
y[n] =
1
1
x[n + 1] x[n].
T
T
(4.41)
Clearly, the digital dierentiator described by Eq. (4.40) is just the rst-order backward dierence
scaled by 1/T . Similarly, the rst-order forward dierence is specied by the equation
y[n] = x[n + 1] x[n].
(4.42)
The forward and backward dierence systems each perform a function that is analogous to that of
a DT dierentiator. The backward dierence system is causal and therefore physically realizable,
while the forward dierence system is not.
Example 4.9
Design discrete-time systems like the one in Fig. 4.2 to integrate continuous-time signals using (a)
a backward-staircase approximation, (b) a forward-staircase approximation, and (c) a trapezoidal
approximation. Construct a block diagram representation for each system.
t
A CT integrator operates as y(t) = x( ) d . Much like the digital dierentiator of Ex. 4.9,
it is possible to approximate a CT integrator with simple DT systems. Figure 4.27 illustrates the
idea behind three dierent approximations. The rst two methods use staircase approximations,
with each stair extending either backward (Fig. 4.27a) or forward (Fig. 4.27b) from the sample
points x[n]. The third method uses a trapezoidal approximation, where each trapezoid is formed
using adjacent pairs of input samples.
(a) Backward Staircase Approximation
To begin, we approximate the input x(t) by a staircase, where each stair extends backward of the
respective input samples x(nT ). To approximate y(t), the area of x(t) from to t, we simply
244
x(t)
nT
x(t)
nT
(a)
x(t)
nT
(c)
(b)
Figure 4.27: Digital integrator methods: (a) backward staircase, (b) forward staircase, and (c)
trapezoidal.
add the areas of the rectangular strips that lie to the left of x(nT ) (shown shaded in Fig. 4.27a). As
T 0, the area under the staircase approaches the exact area under x(t). Thus,
y(nT ) = lim
T 0
T x(kT ).
k=
Assuming that T is small enough to justify the assumption T 0, this equation can be expressed
in terms of our DT samples as
n
x[k].
(4.43)
y[n] = T
k=
Clearly, this model of the digital integrator is basically an accumulator. Equation (4.43) represents
the nonrecursive form of the digital integrator. We can also express it in a recursive form as
y[n] y[n 1] = T x[n].
(4.44)
Equations (4.43) and (4.44) are equivalent; one can be derived from the other.
(b) Forward Staircase Approximation
In this case, we also approximate the input x(t) by a staircase, but each stair extends forward rather
than backward. Adding the rectangular strips to the left of x(nT ) (shown shaded in Fig. 4.27b)
yields the model
n
T x([k 1]T )
y(nT ) = lim
T 0
k=
Paralleling the development in part (a), the recursive form of this system is
y[n] y[n 1] = T x[n 1].
(4.45)
Notice that Eq. (4.45) is identical to Eq. (4.44) except that the input is delayed by one unit.
(c) Trapezoidal Approximation
These two staircase methods (Eqs. (4.44) and (4.45)) approximate the desired integral and improve
as T 0. Depending on whether the slope of x(t) is positive or negative, however, one approximation tends to overstate the value, while the other tends to understate it. For a better result,
would it not be preferable to take the average value of these two approximations? The trapezoidal
approximation does precisely that.
To begin, we approximate the input x(t) by trapezoids, as shown in Fig. 4.27c. As T 0, the
area under the under trapezoids approaches the exact area under x(t). Using Fig. 4.27c, it follows
that
n
T
x(kT ) + x([k 1]T ) .
y(nT ) = lim
T 0
2
k=
245
Clearly, the trapezoidal approximation is the average of the previous two staircase approximations.
Again assuming that T is small enough to justify T 0, this equation leads to
T
(x[n] + x[n 1]) .
(4.46)
2
This recursive form is well suited for system realization.
As Fig. 4.28 demonstrates, a generalized rst-order DT system can realize each of our three
digital integrators. The three cases dier only in the values of the scaling coecients. In fact, the
structure in Fig. 4.28 is also appropriate for the accumulator and cash register models of Ex. 4.7,
the savings account model of Ex. 4.8, the digital dierentiator models of Ex. 4.9, and many others.
An amazing variety of tasks can be accomplished using very simple, low-order DT models.
y[n] y[n 1] =
a1
b0
b1
Backward staircase
Forward staircase
1
1
T
0
0
T
Trapezoidal
T
2
T
2
DT system
x(t)
C/D
b0
x[n]
y[n]
z 1
D/C
y(t)
z 1
a1
b1
x[n 1]
y[n 1]
4.4.1
Equations (4.38), (4.39), (4.40), and (4.46) are all examples of simple, rst-order dierence equations.
Just as the highest-order derivative (or integral) of the input or output represents the order of a
dierential (or integral) equation, the highest-order dierence of the input or output represents the
order of a dierence equation. Order is reective of system complexity. For CT systems, order
indicates the number of energy storage elements, such as capacitors and inductors, required for
implementation. For DT systems, order indicates the required amount of memory.
In advance form, a general-order dierence equation is expressed as
a0 y[n + K] + a1 y[n + K 1] + + aK1 y[n + 1] + aK y[n] =
b0 x[n + L] + b1 x[n + L 1] + + bL1 x[n + 1] + bL x[n]
or, more compactly, as
K
k=0
ak y[n + K k] =
bl x[n + L l].
l=0
(4.47)
246
4.4.2
As the two previous examples demonstrate, dierence equations ably serve as dierentiators and
integrators. We now show that a digitized version of a dierential equation results in a dierence
equation. Let us consider a simple rst-order dierential equation
d
y(t) + cy(t) = x(t).
(4.48)
dt
Consider uniform samples of x(t) at intervals of T seconds. As usual, we use the notation x[n] to
denote x(nT ), the nth sample of x(t). Similarly, y[n] denotes y(nT ), the nth sample of y(t). From
the basic denition of a derivative, we can express Eq. (4.48) at t = nT as
y[n] y[n 1]
+ cy[n] = x[n].
T
Clearing the fractions and rearranging the terms yield (assuming nonzero but very small T )
lim
T 0
(4.49)
where
T
1
and =
.
1 + cT
1 + cT
We can also express Eq. (4.49) in advance form as
=
(4.50)
Clearly, the dierential equation of Eq. (4.48) can be approximated by a dierence equation of the
same order.
By extension, we can approximate a dierential equation of Kth order by a dierence equation
of Kth order. For example, we can approximate a second derivative by observing that
0
1
d
d
d2
1
y(t)
y(t)
= lim
y(t)
T 0 T
dt2
dt
dt
t=nT
t=nT
t=(n1)T
1 y[n] y[n 1] y[n 1] y[n 2]
T
T
T
1
(4.51)
= 2 (y[n] 2y[n 1] + y[n 2]) .
T
Similarly, we can show that a Kth-order derivative can be approximated by
K
1
dK
k K
y(t)
K
(1)
y[n k].
(4.52)
k
dtK
T
t=nT
k=0
Software packages often model and solve dierential equations using such approximations, which
only require the simple operations of addition, multiplication, and delay. Results can be made
as close to the exact answer as required by choosing a suciently small value for T . To perform
well across all input frequencies, approximations such as Eq. (4.52) normally require T to be much
smaller than Nyquist demands. Later chapters treat the selection of T in greater depth and also
provide simpler procedures, such as the impulse invariance and bilinear transform methods, to nd
a discrete-time system to realize a Kth-order LTIC system.
Assuming a sampling interval T = 0.1, determine a dierence equation model for the dierential
equation
y(t) + 4y(t)
+ 3y(t) = 100x(t)
with initial conditions y(0) = 0 and y(0)
= 10.
247
dt
T
0.1
t=0
Assuming that T is suciently small to justify Eq. (4.52), this leads to y[1] = 1. Following
normalization of the coecient for y[n], the dierential equation is therefore modeled as
y[n]
240
100
100
y[n 1] +
y[n 2] =
x[n]
143
143
143
Following the same approach used to derive Eq. (4.51), nd an approximation for
dierences. How does this result compare with Eq. (4.51)?
d2
y(t)
dt2
using forward
Find a causal dierence equation and initial conditions that approximates the behavior of the second-order
dierential equation
d
d2
y(t) + 3 y(t) + 2y(t) = 1000x(t)
dt2
dt
with initial conditions y(0) = 0 and y(0)
248
4.4.3
There are many advantages of digital signal processing over its continuous-time, analog counterpart.
We consider here some of the most important advantages.
1. Digital systems can tolerate considerable variation in signal values and, hence, are less sensitive
to changes in the component parameter values caused by temperature variations, aging, and
other factors. This results in a greater degree of precision and stability. Digital systems are
easily duplicated in volume without having to worry about precise component values. Unlike
analog systems, units do not require individual factory calibration or adjustment.
2. Digital systems are extremely exible and easy to implement. Digital lter function is easily
altered by simply changing the program. Additionally, more sophisticated algorithms are
available for digital signal processing than for analog signal processing. It is quite dicult, for
example, to realize and tune analog lters with double-digit orders, but triple-digit orders are
readily achieved with digital lters.
3. Even in the presence of noise, reproduction with digital messages is extremely reliable, often
without any deterioration whatsoever. Analog messages such as photocopies and lms, on the
other hand, lose quality at each successive stage of reproduction. Further, digital signals can
be coded to yield extremely low error rates, high delity, error correction capabilities, and
privacy.
4. Digital signals are easily and inexpensively stored electronically, without any loss of signal
quality. Further, electronic storage permits ecient search, selection, and delivery of data.
5. Digital lters can be easily time shared and therefore can serve a number of inputs simultaneously. Compared with analog signals, it is easier and more ecient to multiplex several digital
signals on a single channel.
6. Digital implementation permits the use of a wide variety of hardware options, including computers and microprocessors, DSPs (digital signal processors) and FPGAs (eld programmable
gate arrays), digital switching, and others. Digital systems can be fully integrated, and even
highly complex systems can be placed on a single chip using VLSI (very large scale integrated)
circuits. Being binary circuits, accuracy can be increased by increasing word length, subject
to cost and complexity limitations.
Of course, one must weigh these advantages against the disadvantages of digital signal processing,
such as increased system complexity due to A/D and D/A interfaces, limited range of frequencies
available in practice (hundreds of megahertz to gigahertz), and greater power use than passive analog
circuits (digital systems use power-consuming active devices).
4.5
DT System Properties
The properties that describe continuous-time systems are, with minor modications, useful to describe discrete-time systems. Once again, we shall nd that linearity and time invariance are the
cornerstone properties of DT systems. Together, linearity and time invariance provide a direct path
to characterize the response of discrete-time systems. Other important system properties include
causality, stability, memory, and invertibility. Similar to our CT conventions, we shall sometimes
use the notation x[n] = y[n] to indicate that y[n] is the response of a given system to the input
x[n], that is, y[n] = H {x[n]}.
4.5.1
Time Invariance
x[n m] = y[n m]
(4.53)
249
for every input x[n] and every shift m, assuming that the initial conditions are zero. This condition
is satised if the system parameters do not change with the independent variable n. If the system
parameters change with n, then Eq. (4.53) is not satised, and the system is time variant.
As Fig. 4.29 helps to illustrate, the time-invariance property is satised if a system acting on a
delayed input (Fig. 4.29a) produces the same result as delaying the output of the system in response
to the original input (Fig. 4.29b). As in the CT case, time invariance implies that a system operator
H commutes with the time-shifting operation z m .
x[n]
x[n m]
z m
H {x[n m]}
(a)
x[n]
y[n]
z m
y[n m]
(b)
Figure 4.29: Visualizing time invariance: (a) a DT system acting on a delayed input and (b) the
delayed output of a DT system.
To provide a brief example, consider a system described by
y[n] = en x[n].
Delaying this output by m yields (Fig. 4.29b)
y[n m] = e(nm) x[n m].
Following Fig. 4.29a, the output of a delayed input x[n m] is
H {x[n m])} = en x[n m].
Since y[n m] = e(nm) x[n m] = en x[n m] = H {x[n m]}, the system is time variant.
In several probability applications and combinatorial analysis, we need to compute N
n , which
represents the number of combinations of N items taken n at a time. This term, called the
binomial coecient, is given by
N
N!
for n = 0, 1, 2, . . . , N .
=
n
n!(N n)!
Even for moderate values of N , direct computation of N
n for n = 0, 1, 2, . . . , N requires a large
number of multiplications. To help address this diculty, derive a recursive dierence equation to
solve for the binomial coecients. Show that the system is time variant.
Although most systems considered in this book are time invariant, this example demonstrates a
useful system that is time variant. To begin, consider a system whose output y[n] is the binomial
coecient. In this case,
N!
for n = 0, 1, 2, . . . , N
n!(N n)!
N!
y[n 1] =
for n = 1, 2, 3, . . . , N + 1
(n 1)!(N n + 1)!
y[n] =
250
N n+1
.
n
This is a rst-order dierence equation with time-varying parameter a. Because a system parameter
varies with n, the system fails to satisfy the
time-invariance condition of Eq. (4.53).
We can compute binomial coecients N
nding the output of this system iteratively using
n by
N
zero input and the initial condition y[0] = 0 = 1. This proves to be much more economical in
terms of the number of multiplications and divisions required. To compute the entire set of coecients for n = 0, 1, 2, . . . , N , we need only N 1 divisions and N 1 multiplications. Contrast this
with the total of 2N 2 9N + 10 multiplications and N 2 divisions needed by the direct method [2].
Example 4.12
a=
4.5.2
Linearity
For discrete-time systems, the denition of linearity is identical to that for continuous-time systems,
as given in Eq. (1.35). Consequently, there is little need to duplicate all the detailed discussions
of Sec. 1.5.1. Rather, we highlight the most important aspects of linearity from a DT system
perspective.
Linearity is dened by superposition, which includes the additivity and homogeneity properties
discussed in Ch. 1. Briey, the homogeneity (or scaling) property states that if x[n] = y[n],
then cx[n] = cy[n] for all real or imaginary constant c. The additivity property states that if
x1 [n] = y1 [n] and x2 [n] = y2 [n], then x1 [n] + x2 [n] = y1 [n] + y2 [n], assuming that y1 [n] and
y2 [n] are zero-state responses. Taken together, linearity states that for all possible constants c1 and
c2 and all possible inputs x1 [n] and x2 [n],
c1 x1 [n] + c2 x2 [n] = c1 y1 [n] + c2 y2 [n]
or, equivalently, that
H {c1 x1 [n] + c2 x2 [n]} = c1 H {x1 [n]} +c2 H {x2 [n]} .
y1 [n]
(4.54)
y2 [n]
As in the CT case, linearity implies that a system operator H commutes with the operations of
summing and scaling. When a system is linear, any sum of scaled inputs applied to the system
(Fig. 4.30a) produces the same result as summing and scaling the individual outputs of each input
(Fig. 4.30b). A system that does not satisfy Eq. (4.54) is a nonlinear system.
The Total Response of a Linear DT System
Just like the CT case explained in Ch. 1, a DT systems output for n 0 is the result of two
independent causes: the initial conditions of the system (system state) at n = 0 and the input x[n]
for n 0. The zero-input response (ZIR) is the output due to initial conditions with the input set to
zero. The zero-state response (ZSR) is the response due to the input x[n] for n 0 with the initial
conditions set to zero. When all the appropriate initial conditions are zero, the system is said to be
in zero state. The system output is zero when the input is zero only if the system is in zero state.
Initial conditions are expressed dierently for CT and DT systems. The initial conditions of a CT system at
t = 0 normally involve the output y(t) and its derivatives at t = 0 . Since derivatives are meaningless for DT signals,
however, the appropriate initial conditions of a DT system at n = 0 involve the output y[n] at times n < 0.
251
c1
x1 [n]
c2
x2 [n]
(a)
x1 [n]
y1 [n]
c1
x2 [n]
y2 [n]
c1 y1 [n] + c2 y2 [n]
c2
(b)
Figure 4.30: Visualizing linearity: (a) summing and scaling precede the DT system and (b) the DT
system precedes summing and scaling.
If a system is linear, the total output must be the sum of the ZSR and the ZIR, that is,
total response = zero-state response + zero-input response = ZSR + ZIR.
(4.55)
In addition to this property, known as the decomposition property, linearity implies that both the
zero-input and zero-state components must obey the principle of superposition with respect to
each of their respective causes. For example, if we increase the initial condition k-fold, the zeroinput component must also increase k-fold. Similarly, if we increase the input k-fold, the zero-state
component must also increase k-fold.
Comments on Linear and Nonlinear Systems
The superposition (linearity) property greatly simplies system analysis. Because of the decomposition property, we can evaluate separately the zero-input and zero-state responses. Moreover, if we
express an input x[n] as a sum of simpler functions,
x[n] = x1 [n] + x2 [n] + + xm [n],
then, by virtue of linearity, the (zero-state) response y[n] is given by the sum of the simpler individual
responses,
y[n] = y1 [n] + y2 [n] + + ym [n].
As we shall soon see, this apparently trivial observation makes nding the response of an LTID
system easy.
As in the case of CT systems, all practical DT systems can exhibit nonlinear behavior. Finite
word lengths and quantization eects can both cause an otherwise linear system to become nonlinear.
Fortunately, with a little eort, such factors can be reduced or eliminated, thereby leaving system
linearity intact.
252
If the zero-state responses of this system to inputs x1 [n] and x2 [n] are y1 [n] and y2 [n], respectively,
then
y1 [n + 1] + a1 y1 [n] = b0 x1 [n + 1] + b1 x1 [n]
and
y2 [n + 1] + a1 y2 [n] = b0 x2 [n + 1] + b1 x2 [n].
Multiplying these two equations by c1 and c2 , respectively, and then adding yields
(c1 y1 [n + 1] + c2 y2 [n + 1]) + a1 (c1 y1 [n] + c2 y2 [n]) =
b0 (c1 x1 [n + 1] + c2 x2 [n + 1]) + b1 (c1 x1 [n] + c2 x2 [n]) .
This equation shows that the response to input c1 x1 [n] + c2 x2 [n] is c1 y1 [n] + c2 y2 [n] regardless of
whether the parameters a1 , b0 , and b1 are constants or functions of n. Hence, the system is linear.
Following the same procedure, we can readily extend our results and show that the general-order
dierence equation of Eq. (4.47) is also linear. If the coecients ak and bl in that equation are
constants, then the DT system is linear and time invariant (LTID). If the coecients ak and bl are
functions of time, then the system is linear and time variant.
Example 4.13
Show that the accumulator of Eq. (4.38), the rst-order backward dierence of Eq. (4.41), and the rstorder forward dierence of Eq. (4.42) are linear and time invariant.
To illustrate that discrete-time systems that are linear need not be time invariant and vice versa, show
that (a) the discrete-time system specied by equation y[n] = nx[n] is linear but not time invariant and
(b) the system specied by y[n] = |x[n]|2 is time invariant but not linear.
4.5.3
The zero-state response of a LTID system is analogous to the LTIC case, discussed in Sec. 1.5.3.
The result is so important, however, that we repeat the development in its entirety.
Using the DT sampling property of Eq. (4.10), we rst represent our input using a sum of scaled
and shifted Kronecker delta functions,
x[n] =
x[m] [n m] .
m=
input scaled shifted
sum
impulses
(4.56)
m=
2
x[m][n m] .
(4.57)
253
Using the property of linearity, we know that summing and scaling commute with the system operation. Thus, Eq. (4.57) becomes
y[n] =
(4.58)
m=
Designating h[n] as the impulse response of an LTID system, h[n] = H {[n]}, the time-invariance
property allows us to write Eq. (4.58) as
y[n] =
x[m] h[n m] .
m=
output scaled shifted
sum
impulse
responses
(4.59)
Equation (4.59) is known as the convolution sum, expressed symbolically as x[n] h[n]. The next
chapter fully treats the time-domain solution of dierence equations, including evaluation of the
convolution sum.
Consider an LTID system that has an impulse response h[n] = 2n u[n]. Using the input x[n] =
u[n] u[n 10], determine and sketch the zero-state response of this system over 10 n 20.
The signal x[n] = u[n] u[n 10] is 1 for 0 n 9 and is 0 elsewhere. Using Eq. (4.56), we
can therefore represent the input as
x[n] =
[n m].
m=0
h[n m] =
m=0
m=0
MATLAB easily computes and plots the output y[n], as shown in Fig. 4.31.
01
02
03
04
05
y[n]
2
1
10
10
15
9
m=0 2
20
mn
u[n m].
Although the input has nite duration, the output, like the impulse response functions h[n m]
that comprise it, has innite duration.
Example 4.14
254
Digital DNA
The impulse response h[n] = H {[n]} acts as a sort of digital DNA for LTID systems: it contains
all the information needed to describe an LTID systems zero-state responses to the entirety of all
possible inputs. Since it is an external description, the impulse response may not, however, be
sucient to determine a systems zero-input response. Put another way, systems with identical h[n]
can dier internally and produce unique zero-input responses.
4.5.4
Causality
A causal (also known as a physical or non-anticipative) system is one for which the output at any
instant n = n0 depends only on the value of the input x[n] for n n0 . In other words, the value
of the output at the present instant depends only on the past and present values of the input x[n],
not on its future values. In contrast, the response of a noncausal system begins before the input is
applied. Clearly, noncausal systems are physically unrealizable.
As we learned in the preceding section, the impulse response h[n] completely characterizes the
zero-state behavior of a linear and time-invariant system. As such, we can determine the causality
of such systems based purely on h[n]. Because [n] starts at n = 0, the unit impulse response h[n]
of a causal system must be zero for n < 0, that is,
h[n] = 0 for n < 0.
(4.60)
Alternately, an LTID system is noncausal if its impulse response h[n] starts before n = 0.
Turning our attention to Eq. (4.47), let us determine the conditions that ensure the causality
of dierence equations. The left-hand side of Eq. (4.47) consists of the output at instants n + K,
n + K 1, n + K 2, and so on. The right-hand side of Eq. (4.47) consists of the input at instants
n + L, n + L 1, n + L 2, and so on. For a causal system, the output cannot depend on future
input values. Thus, the system described by the dierence equation of Eq. (4.47) is causal if and
only if L K.
A Preferred Form for Dierence Equations
Practical systems that are functions of time are causal and require L K. Setting L = K, which
may require setting some coecients equal to zero, we can express Eq. (4.47) in the more convenient
form of
a0 y[n + K] + a1 y[n + K 1] + + aK1 y[n + 1] + aK y[n] =
b0 x[n + K] + b1 x[n + K 1] + + bK1 x[n + 1] + bK x[n].
This expression is valid for all values of n. Therefore, the equation is still valid if we replace n by
n K throughout the equation. Such replacement yields the delay form of
a0 y[n] + a1 y[n 1] + + aK1 y[n (K 1)] + aK y[n K] =
b0 x[n] + b1 x[n 1] + + bK1 x[n (K 1)] + bK x[n K].
Written in compact form, the general causal dierence equation is thus
K
k=0
This
ak y[n k] =
bl x[n l].
l=0
statement is true only when the independent variable is time. See the footnote on page 29.
(4.61)
255
Without loss of generality, the coecient a0 can be assumed to be unity. If a0 = 1, we can divide
the equation through by a0 to render the coecient a0 unity. Thus, we can also express Eq. (4.61)
in an alternate form as
K
K
ak y[n k] +
bl x[n l].
(4.62)
y[n] =
k=1
l=0
Observe the recursive nature of this equation. This form of dierence equation, favored in the
literature and by signal processing practitioners the world over, represents a general Kth-order
causal LTI discrete-time (causal LTID) system.
If the coecients ak = 0 (k = 1, . . . , K), Eq. (4.62) reduces to
y[n] =
bl x[n l].
l=0
In this case, the output is computed exclusively in terms of the input terms, and the system is
nonrecursive. To reiterate, a system represented by Eq. (4.62) is nonrecursive if ak = 0 for k =
1, 2, 3, . . . , K. However, even if one of the ak coecients is nonzero, the system is recursive.
Figure 4.32 shows a block representation of a general dierence equation system based on
Eq. (4.62). This particular representation, called direct form I (DFI), is just one of many ways
to realize the system. Alternate realizations are treated later in Ch. 7.
b0
x[n]
y[n]
z 1
x[n 1]
z 1
a1
b1
..
.
..
.
bK1
aK1
z 1
x[n (K 1)]
z 1
x[n K]
y[n 1]
z 1
y[n (K 1)]
z 1
bK
aK
y[n K]
Show that the backward dierence of Eq. (4.41) is causal, whereas the forward dierence of Eq. (4.42) is
noncausal. Both systems are linear and time invariant, as shown in Drill 4.14.
Coecient normalization is not possible for the case a = 0. This case, however, is of little practical interest since
0
it does not occur for causal systems where the output is generated in response to current and past values of input and
output.
256
Show that a time-reversal system, specied by equation y[n] = x[n], is linear but noncausal.
4.5.5
Stability
We shall consider here two of several dierent denitions of stability. Input-output stability, also
known as external stability, requires that, for all n, bounded inputs x[n] yield bounded outputs y[n].
This stability is also known as bounded-input, bounded-output (BIBO) stability. Mathematically,
BIBO stability requires
|y[n]| Ky < if
|x[n]| Kx < ,
(4.63)
where Kx and Ky are some nite constants. For a system to be BIBO stable, the stability condition
of Eq. (4.63) must hold for every possible input. If the system violates this condition just for one
input, it is unstable.
Internal stability, also known as asymptotic stability, is dened in a similar way but in terms of
the initial conditions rather than the input. If the response to bounded initial conditions (with or
without input) is unbounded, then the system is unstable. If the response decays with time to zero,
then the system is asymptotically stable. If the response is neither unbounded nor decays to zero,
then the system is marginally stable.
Asymptotically stable systems are BIBO stable. However, BIBO stability does not necessarily make a system asymptotically stable. Fortunately, in practice, external and internal stabilities
are, with few exceptions, equivalent. Although systematic procedures to test stability are not presented until the next chapter, common sense and reasoning are often sucient to establish stability.
Consider, for example, the cash register system of Ex. 4.7. If the input is x[n] = u[n], then from
Eq. (4.35) it follows that the output y[n] as n . Clearly, the system is BIBO unstable.
Show that the digital dierentiator of Ex. 4.9 is BIBO stable. Is a CT dierentiator BIBO stable? Consider
how both systems respond to unit step inputs.
4.5.6
Memory
If the output of a discrete-time system depends on input values other than the present one, then
the system has memory. Systems with memory are also called dynamic systems. A system without
memory is called a memoryless, instantaneous, or static system. The response of a memoryless system
at any instant n depends at most on the input at the same instant n. For example, y[n] = sin(n)
is an example of an instantaneous system, and y[n] y[n 1] = x[n] is an example of a system
with memory (dynamic). To realize systems with memory, we need to use delay elements. All the
examples discussed in Sec. 4.4 are cases of dynamic systems because the outputs at any instant
depend in some way on the previous values of the inputs.
257
Determine whether the following systems are static or dynamic. Which of the systems are causal?
(a)
y[n + 1] = x[n]
(b)
y[n] = (n + 1)x[n]
(c)
y[n + 1] = x[n + 1]
(d)
y[n 1] = x[n]
4.5.7
Invertibility
A discrete-time system H is invertible if an inverse system Hi exists such that the cascade of H and
Hi results in an identity system. An identity system is dened as one whose output is identical to
the input. In other words, the input of an invertible system can be uniquely determined from the
corresponding output. There is no loss of information when a signal is processed by an invertible
system, and every input produces a unique output.
The compression y[n] = x[M n] is not invertible because this operation discards M 1 of every
M input samples; these lost input values cannot be recovered by any means or system. Similarly,
2
operations such as y[n] = cos(x[n]) and y[n] = |x[n]| are not invertible. In contrast, a cascade
of a unit delay with a unit advance results in an identity system because its output is identical
to the input. Clearly, the inverse of an ideal unit delay is an ideal unit advance, although this
inverse is a noncausal system. Such an example highlights one diculty of invertibility: practical DT
systems that employ delay operations can have inverses that require unrealizable advance operations.
Consequently, the denition of invertibility is often relaxed to allow an overall delay. That is, if the
cascade of H and Hi produces an output x[n m] for some m 0, then Hi is still considered a
suitable and useful (although not ideal) inverse.
4.6
Digital Resampling
Section 4.1 introduces the ideas of expansion and compression for DT signals. Let us now investigate
these ideas further. Combined with appropriate ltering, expansion and compression are the backbone operations for multirate systems. Properly used, these operations provide an eective means
to digitally alter the sampling rate of a DT signal, even by non-integer factors. As we shall see,
however, care must be taken to ensure proper results. For now, we investigate resampling from a
time-domain perspective. In Ch. 6, we shall revisit these ideas using a frequency-domain perspective.
Block Representations of Operations on the DT Independent Variable
Let us consider the block representations of systems that perform basic time-scaling operations.
The downsampling operation, represented as M , is implemented using a compressor, as shown
in Fig. 4.33a. To avoid aliasing, such as found in Ex. 4.1, a compressor is often preceded with a
decimation lter Hd , as shown in Fig. 4.33b. We shall show later that a decimation lter is typically
a digital lowpass anti-aliasing lter with a cuto frequency of Fs /2M , where Fs is the sampling
rate of the original signal x[n]. The combination of decimation lter and compressor is called a
decimator.
As shown in Fig. 4.33c, the expansion (upsampling) operation, represented as L, is implemented
using an expander. An expander followed with an interpolation lter Hi , as shown in Fig. 4.33d,
functions as an interpolator. We shall show later that an interpolation lter is preferably an ideal
digital lowpass lter that operates at a rate LFs and has cuto frequency Fs /2.
258
x[n]
Fs
x [n]
Fs /M
x[n]
Fs
x
[n]
Fs
Hd
(a)
x[n]
Fs
xd [n]
Fs /M
Hi
xi [n]
LFs
(b)
x [n]
LFs
x[n]
Fs
x [n]
LFs
(c)
(d)
Figure 4.33: Block representations of DT time scaling including sampling rates: (a) compressor, (b)
decimator, (c) expander, and (d) interpolator.
M
(a)
L
(b)
Figure 4.34: Expander and compressor ordering: (a) L precedes M and (b) M precedes L.
Unfortunately, the operations of compression and expansion do not, in general, commute. In
other words, expansion followed by compression (Fig. 4.34a) does not necessarily lead to the same
result as compression followed by expansion (Fig. 4.34b). Let us proceed with an example to investigate these dierences.
Consider the signal x[n] = cos(n), whose frequency is the highest possible without aliasing.
Determine the output when this signal is applied to the following systems:
(a) An upsample by L = 4 operation followed by a downsample by M = 2 operation.
(b) A downsample by M = 2 operation followed by an upsample by L = 4 operation.
(c) An upsample by L = 3 operation followed by a downsample by M = 2 operation.
(d) A downsample by M = 2 operation followed by an upsample by L = 3 operation.
As shown in Fig. 4.35, notice that x[n] alternates between the values 1 and 1 as [. . . , 1, 1, 1, 1, . . .].
(a) 4, 2
This case corresponds to the ordering shown in Fig. 4.34a. Upsampling x[n] by L = 4 requires that
we insert L 1 = 3 zeros between each sample,
[. . . , 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, . . .].
259
1 x[n] = cos(n)
(a)
n
1
1
(b)
n
1
Figure 4.36: Signal x[n] = cos(n) (a) expanded by L = 4 and then (b) compressed by M = 2.
(b) 2, 4
This case corresponds to the ordering shown in Fig. 4.34b. Downsampling x[n] by M = 2 produces
[. . . , 1, 1, 1, . . .].
Next, upsampling by L = 4 produces
[. . . , 1, 0, 0, 0, 1, 0, 0, 0, 1, . . .].
Even though the expansion and compression factors match those used in part (a), the result is
dierent (Fig. 4.37). In this case, the order of compression and expansion is clearly important to
the nal result.
(c) 3, 2
Upsampling x[n] by L = 3 requires that we insert L 1 = 2 zeros between each sample,
[. . . , 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, . . .].
Next, downsampling by M = 2 produces
[. . . , 1, 0, 0, 1, 0, 0, 1, . . .].
These steps are shown in Fig. 4.38. As in part (a), the nal result is sensible. A factor M/L = 2/3
suggests that values originally located at integer multiples of M = 2 (spacing of 2) are subsequently
260
(a)
n
1
1
(b)
n
1
Figure 4.37: Signal x[n] = cos(n) (a) compressed by M = 2 and then (b) expanded by L = 4.
1
(a)
n
1
1
(b)
n
1
Figure 4.38: Signal x[n] = cos(n) (a) expanded by L = 3 and then (b) compressed by M = 2.
located at integer multiples of L = 3 (spacing of 3). The signal x[n] has values 1 spaced every 2
time units, and the nal result has those same values spaced every 3 time units.
(d) 2, 3
Downsampling x[n] by M = 2 produces
[. . . , 1, 1, 1, . . .].
Next, upsampling by L = 3 produces
[. . . , 1, 0, 0, 1, 0, 0, 1, . . .].
This result matches the case of part (c) and suggests, for this case at least, that the order of expansion
and compression does not matter.
Discussion
When comparing parts (a) and (b), the order of expansion and compression clearly matters. In other
words, the operations of expansion and compression do not, in general, commute. There are cases,
as illustrated by parts (c) and (d), where expansion and compression do commute. Fortunately,
there is a simple test to determine when the order of operations matters: if L and M are coprime,
which is to say they have no common factors other than 1, then the operations of expansion and
compression commute [3]. In other words, if L and M are coprime, then Fig. 4.34a and Fig. 4.34b
are equivalent. In resampling, we are most often interested in the ratio M/L, so choosing M and L
to be coprime is relatively simple.
4.7. Summary
261
(a)
n
1
1
(b)
n
1
Figure 4.39: Signal x[n] = cos(n) (a) compressed by M = 2 and then (b) expanded by L = 3.
Even if operation order does not matter mathematically, it may matter for other reasons. Placing
an expander before a compressor, for example, requires that both components operate at faster rates
than if placed in the reverse order, a notable disadvantage in many applications (see Prob. 4.6-2).
Placing expansion prior to compression, however, can reduce aliasing errors. In the case of interpolation and decimation, as shown in Figs. 4.33b and 4.33d, placing the expander before the compressor
allows the interpolation and decimation lters to be combined into a single lter. Just as a miserly
person never throws anything away until the last possible moment, expansion before compression
ensures that samples are not discarded until the end.
Example 4.15
Consider the signal x[n] = cos(n), where = 4/30. Determine an expansion factor L and compression
factor M that reduce the inputs sample rating Fs by 40% to 0.6Fs . Plot the resulting signal at each stage
of an implementation that follows Fig. 4.34a.
4.7
Summary
Discrete-time signals are sequences of numbers specied only at discrete instants. Some signals are
inherently discrete-time in nature, and others become discrete-time following a sampling process.
Commonly, a CT signal x(t) is uniformly sampled at instants t = nT to produce the DT signal
x[n] = x(nT ). Varieties of operations, models, and classications assist in the characterization and
manipulation of DT signals.
Time shifting, reversal, and scaling are three useful operations on the independent DT variable.
A signal x[n] delayed (right shifted) by m time units is given by x[n m]. On the other hand, x[n]
advanced (left shifted) by m time units is given by x[n + m]. The time reversal of signal x[n] is given
by x[n]. These operations are the same as those for the continuous-time case. The time-scaling
operation, however, is somewhat dierent because of the discrete nature of the variable n. Unlike
the continuous-time case, where time compression results in the same data at a higher speed, time
compression in the discrete-time case eliminates part of the data. Consequently, this operation is
called downsampling. An anti-aliasing lter followed by downsampling is called decimation. Time
expansion, or upsampling, increases the data by inserting zeros between samples. A lter often
follows the upsampling process to perform interpolation, a process that replaces the inserted zeros
with more appropriate values. Compression ( M ) and expansion ( L) are constrained to integer
262
factors M and L.
The DT unit step, unit impulse, and exponential functions are similar to their CT counterparts,
with a few noteworthy dierences. The DT unit step u[n] is basically identical to the CT unit
step u(t), except that u[0] = 1 and u(0) = 1/2. Unlike the Dirac delta function (t), which is
not physically realizable, the DT unit impulse [n] is easily generated in practice. Continuous-time
exponentials are usually represented using the natural base as est , where s is a complex constant.
Discrete-time exponentials, by contrast, are more appropriately represented in the form z n , where z
is also a complex constant. The function z n grows exponentially with n if |z| > 1 (z outside the unit
circle), decays exponentially if |z| < 1 (z within the unit circle), and has constant envelope if |z| = 1
(z lies on the unit circle). When a CT exponential est is sampled uniformly every T seconds, the
resulting DT exponential z n requires z = esT ; the many-to-one nature of this mapping is reective
of the aliasing phenomenon.
Sampling a continuous-time sinusoid cos(t+) every T seconds results in a discrete-time sinusoid
cos(n+), where = T . Discrete-time sinusoids whose frequencies dier by an integer multiple
of 2 are identical. Consequently, a DT sinusoid with || > has a lower apparent frequency a
in the fundamental band of frequencies from to . The highest rate of oscillation in a discretetime sinusoid occurs when its apparent frequency is . The nonuniqueness of DT sinusoids, where
dierent frequencies produce the same waveforms, is again a consequence of aliasing and has
profound implications in the study of discrete-time signals and systems.
A number of signal classications, such as those involving causality, realness, and symmetry, are
the same for discrete-time signals as for continuous-time signals. Other signal classications are more
substantially dierent. Discrete-time periodicity requires an integer-valued period, for example, and
is more restrictive than the continuous-time case. To illustrate further, the CT sinusoid cos(t + )
is always periodic, yet the DT sinusoid cos(n + ) is periodic only if is a rational multiple of
. Discrete-time energy and power, while conceptually similar to the CT cases, utilize sums rather
than integrals.
A system whose inputs and outputs are discrete-time signals is a discrete-time system. Many
DT systems are characterized by dierence equations, so the operations of summation, scalar multiplication, and delay are fundamental to most DT system realizations. More basically, an input
x[n] applied to a system H to produce output y[n] is represented as y[n] = H {x[n]}. Discrete-time
systems may be used to process discrete-time signals, or if using appropriate interfaces at the input
and output, discrete-time systems may be used to process continuous-time signals. In the latter
case, a continuous-time input signal is rst converted into a discrete-time signal through sampling.
The resulting discrete-time signal is then processed by a discrete-time system to yield a discretetime output, which is then converted into a continuous-time output. Assuming a suciently high
sampling rate, any CT system modeled by a general constant-coecient linear dierential equation
can be implemented as a DT system using a constant-coecient linear dierence equation. Given
the many advantages of digital signal processing, many CT systems are best implemented digitally.
As with CT systems, time invariance requires that the parameters of a DT system do not change
with time. To be linear, the principle of superposition must hold for a DT system. Taken together,
the properties of linearity and time invariance allow the response of a DT system to be conveniently
represented using the convolution sum, which only requires knowledge of the systems impulse response h[n] and input x[n]. Other DT system properties, such as causality, stability, memory, and
invertibility, follow the same spirit as their CT counterparts.
The sampling rate of a DT signal can be increased through expansion and can be reduced through
compression. Expansion by factor L inserts L 1 zeros between each sample, and compression by
factor M removes M 1 out of every M samples. A decimator is just a compressor that is preceded
by a digital lowpass anti-aliasing, or decimation, lter. An interpolator is just an expander that is
followed by a digital lowpass smoothing, or interpolation, lter. Fractional sampling rate alteration
is accomplished by cascading an expander with a compressor. The same result is also obtained by a
compressor followed by an expander, as long as the expansion factor L and the compression factor
M are coprime. If factors M and L are not coprime, M and L do no commute.
4.7. Summary
263
References
1. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
2. Cadzow, J. A., Discrete-Time Systems, Prentice-Hall, Englewood Clis, NJ, 1973.
3. Vaidyanathan, P. P., Multirate Systems and Filter Banks, Prentice-Hall, Englewood Clis, NJ,
1993.
264
Problems
(e) (n2)(u[n2]u[n6])+(8n)(u[n
6] u[n 9])
x[n]
x[n 6]
x[3n]
x n3
(b)
(d)
(e)
(g)
x[n + 6]
x[3 n]
x[1 2n]
x n+1
4
12
Figure P4.1-1
xa [n]
xb [n]
x[3 n]
4
3
4
12
n
xc [n]
xd [n]
Figure P4.1-2
3
3
Figure P4.2-4
2]
(d)
y[n + 4][n]
pulse.
(e) y[n]u[n 2]
(f ) y[n]u[4 n]
4.2-2 Sketch the signals
(a) u[n 2] u[n 6]
(b) n(u[n] u[n 7])
(c) (n 2)(u[n 2] u[n 6])
(d) (8 n)(u[n 6] u[n 9])
(b)
(d)
e0.5n
ejn
Problems
265
In each case, show the locations of and 4.2-11 A continuous-time sinusoid cos(0 t) is
in the complex plane. Verify that the
sampled at a rate Fs = 100 Hz. The samexponential is growing if lies outside the
pled signal is found to be cos(0.6n). If
unit circle ( in the RHP), is decaying if
there is more than one possible value for
lies within the unit circle ( in the LHP),
0 , nd the general expression for 0 , and
determine the three smallest values of |0 |.
and has a constant envelope if lies on the
unit circle ( on the imaginary axis).
4.2-12 Samples of a continuous-time sinusoid
4.2-7 Repeat Prob. 4.2-6 for the exponentials
cos(100t) are found to be cos(n). Find
Explain
the sampling frequency Fs .
(b) e(1j)n
(a) e(1+j)n
whether there is only one possible value for
(c) e(1+j)n
(d) e(1j)n
Fs . If there is more than one possible value,
(1+j 3 )n
(1j
)n
3
nd
the general expression for the sampling
(e) e
(f ) e
frequency, and determine the three largest
possible values.
4.2-8 Show that cos(0.6n+ 6 )+ 3 cos(1.4n+
3 ) = 2 cos(0.6n 6 ).
4.2-13 Express the following exponentials in the
form ej(n+) , where < :
4.2-9 Express the following signals in terms of
apparent frequencies:
(a) ej(8.2n+)
(b) ej4n
(a) cos(0.8n + )
(c) ej1.95n
(d) ej10.7n
(b) sin(1.2n + )
Repeat the problem if is required to be
(c) cos(6.9n + )
in the range 0 < 2.
(d) cos(2.8n + ) + 2 sin(3.7n + )
(e) sinc(n/2)
(f ) sinc(3n/2)
(g) sinc(2n)
)
and
5
cos(29t
)
are
sampled
using a
6
6
be assigned from either region.
sampling interval of T = 0.1 s. Express the
resulting discrete-time sinusoids in terms of
(a) Show that Eq. (4.17) computes the aptheir apparent frequencies.
parent frequency of this sinusoid as
a = , which corresponds to the
shaded region of Fig. 4.15b. Express 4.2-16
Consider a signal x(t) = 10 cos(2000t)+
2 sin(3000t) + 2 cos(5000t + 4 ).
the sinusoid in terms of this apparent
frequency.
(a) Assuming that x(t) is sampled at
(b) Assuming that = k is assigned
a rate of 4000 Hz, nd the resultto the unshaded region, determine the
ing sampled signal x[n], expressed in
apparent frequency a , and express
terms of apparent frequencies. Does
the sinusoid in terms of this apparent
this sampling rate cause any aliasing?
frequency.
Explain.
(c) Letting = 11 and = /3, eval(b) Determine the maximum sampling inuate the two apparent sinusoids from
terval T that can be used to sample
parts (a) and (b). Comment on the
the
signal in part (a) without aliasing.
results.
266
(b)
(d)
(f )
4.3-1 Find and sketch the odd and the even components of
(a)
(c)
(e)
(g)
(h)
u[n]
(b)
n
sin( 4 )
(d)
n
sin( 4 ) u[n]
(f )
n
cos( 4 + 4 )
u[n+5] u[n5]
Using a period of N = 6, periodically replicate the signals shown in Fig. P4.2-4. For
each case, sketch the signal, and determine
its power.
4.3-10 Find the powers of the signals depicted
in Fig. P4.3-10.
xa [n]
10
10
n
10
xb [n]
3
10
Figure P4.3-10
22
7 n
cos(0.5n+0.2)
(b)
ej
sin(0.5n+ 3 )
(d)
e(1+j 3 )n
(f )
6ej 7 n
(c)
xe [n]xo [n] = 0.
n=
(a)
x[n mN ].
m=
nu[n]
cos( n
4 )
n
cos( 4 ) u[n]
x[n] =
4.3-12 Designating the power of a periodic signal x[n] as Px , nd the powers of x[n],
4.3-4 Prove that a discrete-time exponential
jn
x[n],
x[n m], and cx[n].
is periodic only if 2 is a rational nume
ber.
4.3-13 Determine whether the following signals
are energy signals, power signals, or nei4.3-5 Repeat Prob. 4.3-3 for the signals
ther. In each case, compute both the en(a) cos(0.6n + 0.3) + 3 sin(0.5n + 0.4)
ergy and the power.
(b) cos(1.6n + 0.3) + 3 sin(1.5n + 0.4) +
(a) [n]
(b) 1n u[n]
8 cos(1.8n 3 )
(c) cos(0n)
(d) cos(2n)
(c) cos(0.7n + 0.3) + 3 sin(0.5n + 0.4)
4.3-6 Find the energies of the signals depicted
in Fig. P4.2-4.
Problems
267
N
0 1
Xk ejk0 n
k=0
is
Px =
N
0 1
|Xk |2 ,
where 0 =
2
N0 .
k=0
e
j(km)0 n
N0
0
k=m
.
otherwise
4.4-3 (a) In the same manner as used to obtain Eq. (4.51), derive an approximation of d3 y(t)/dt3 in terms of nite differences. Use Eq. (4.52) to verify but
not obtain your result.
(b) Find a dierence equation, including
initial conditions, that approximates
the behavior of the second-order difference equation
dy(t)
d2 y(t)
+ 2y(t) = x(t),
+3
2
dt
dt
where y(0) = 0 and y(0)
= 3. Take
the sampling interval as T = 0.05.
4.4-4 A variable, such as a stock market average, may uctuate (up and down) daily,
masking its long-term trend. We can discern such long-term trends by smoothing or
averaging the past N values of the variable.
For the stock market average, we may consider a 5-day moving average y[n] to be the
mean of the past ve days market closing
values x[n], x[n 1], . . . , x[n 4].
(a) Write the nonrecursive representation
of this system.
(b) Determine a block realization of this
system.
4.4-5 (a) Find the recursive representation of
the 5-day moving-average system described in Prob. 4.4-4.
(b) Determine a block realization of this
recursive system.
4.4-1 Let p[n] be the population of a certain 4.4-6 For the resistive ladder shown in Fig. P4.4country at the beginning of the nth year.
6, the voltage at the nth node is v[n] (n =
The birth and death rates of the popula0, 1, 2, . . . , N ). By inspection, we see that
tion during any year are 3.3% and 1.3%,
v[0] = V and v[N ] = 0. Show that the voltrespectively. If i[n] is the total number of
age at all other nodes satises the secondimmigrants entering the country during the
order dierence equation
nth year, write the dierence equation re1
lating p[n+1], p[n], and i[n], assuming that
v[n + 1] Av[n] + v[n 1] = 0 A = 2 + .
a
the immigrants enter the country throughout the year at a uniform rate.
4.4-2 For the three digital integrators in 4.4-7 Consider the classical problem of supply
and demand of some commodity. At time
Ex. 4.10, derive the outputs y[n] and y(t)
n, let
for the analog input x(t) = u(t). Use
u(0) = 1, and let the D/C converter be a
d[n] = demand,
simple zero-order hold. How do the outputs
s[n] = supply,
compare with the output of a continuousand p[n] = prevailing price.
time integrator?
268
v[1]
aR
v[n]
v[N 1] R
aR
v[N ]
aR
Figure P4.4-6
The demand d[n], which is a function of the
price p[n], is given by
d[n] = d0 ap[n].
x[n]
y[n1]
Problems
269
4.5-4 State with reason(s) whether the follow- 4.6-1 Consider the signal x[n] = cos(n), where
ing systems are (1) time invariant or time
= 4/31.
variant, (2) linear or nonlinear, (3) causal
(a) Determine an expansion factor L and
or noncausal, (4) stable or unstable, (5)
compression factor M that result in a
static or dynamic, and (6) invertible or nonsignal that reduces the sampling rate
invertible.
Fs of x[n] by 40% to 0.6Fs . Choose M
and L to be coprime.
(a) y[n] = x[n 1] (ideal unit delay)
(b) y[n] = x[n + 1] (ideal unit advance)
(c) y[n] = n x[n 1]
2
K2
1
x[n k]
K2 K1 +1
k=K1
k=
x[k]
Chapter 5
Time-Domain Analysis of
Discrete-Time Systems
In this chapter, we develop time-domain methods for nding the response of LTID systems. Although transform-domain techniques found in later chapters are often more powerful for systems
analysis, time-domain methods remain the most common form of systems implementation. To begin
our study, we consider hand calculations using iteration (or recursion). Although the technique is
extremely simple and applies to all discrete-time systems, it generally does not provide a closedform solution. Closed-form expressions for the zero-input response (ZIR) and zero-state response
(ZSR) are possible using a systems characteristic equation and impulse response, respectively. The
zero-state response further requires discrete-time convolution, and several views of this important
technique are presented. The chapter concludes with a discussion of stability, insights into system
behavior, and a peek at the classical solution to linear dierence equations.
5.1
Let us consider the solution of a causal LTID system represented by a general Kth-order dierence
equation. We shall consider the delay form, as given by Eq. (4.62) and rewritten as
y[n] = a1 y[n 1] aK1 y[n (K 1)] aK y[n K]+
b0 x[n] + b1 x[n 1] + + bK1 x[n (K 1)] + bK x[n K].
(5.1)
Thus, y[n], the output at the nth instant, is computed from 2K + 1 pieces of information. These
are the past K output values y[n 1], y[n 2], . . . , y[n K], the past K input values x[n
1], x[n 2], . . . , x[n K], and the present input value x[n]. We can readily compute iteratively
or recursively the output values y[0], y[1], y[2], y[3], . . .. For instance, to nd y[0] we set n = 0 in
Eq. (5.1). The left-hand side is y[0], and the right-hand side contains terms y[1], y[2], . . . , y[K]
and the inputs x[0], x[1], x[2], . . . , x[K]. To begin this recursion, therefore, we must know the
K initial conditions y[1], y[2], . . . , y[K]. Knowing these conditions and the input x[n], we
can iteratively nd the values y[0], y[1], y[2], and so on. As we shall see in the following examples,
iterative techniques are well suited to both hand and computer calculation.
Using initial condition y[1] = 6 and causal input x[n] = cos(n/2)u[n], iteratively solve the
rst-order system given by
y[n] 0.5y[n 1] = x[n] 0.5x[n 1].
270
271
(5.2)
To begin, we set n = 0 in this equation and use y[1] = 6, x[0] = cos(0) = 1, and x[1] =
cos(/2)u[1] = 0 to obtain
y[0] = 0.5y[1] + x[0] 0.5x[1]
= 0.5(6) + 1 0.5(0) = 4.
Next, we set n = 1 in Eq. (5.2) and use the values y[0] = 4 (computed in the n = 0 step),
x[1] = cos(/2) = 0, and x[0] = 1 to obtain
y[1] = 0.5(4) + 0 0.5(1) = 1.5.
Continuing, we set n = 2 in Eq. (5.2) and use the values y[1] = 1.5 (computed in the previous step),
x[2] = cos(2/2) = 1, and x[1] = 0 to obtain
y[2] = 0.5(1.5) 1 0.5(0) = 0.25.
Proceeding in this way iteratively, we obtain
y[3] = 0.5(0.25) + 0 0.5(1) = 0.3750
y[4] = 0.5(0.3750) + 1 0.5(0) = 1.1875
y[5] = 0.5(1.1875) + 0 0.5(1) = 0.0938
y[6] = 0.5(0.0938) 1 0.5(0) = 0.9531
..
..
Computer programs, such as MATLAB, are well adapted to this repetitive process and produce
identical results.
01
02
03
04
05
06
n = (-1:12); x = cos(pi*n/2).*(n>=0);
y = zeros(size(n)); y(n==-1) = 6;
for ind = find(n>=0),
y(ind) = 0.5*y(ind-1)+x(ind)-0.5*x(ind-1);
end
stem(n,y)
In this case, notice that the variable n does not comply with MATLABs indexing requirements, so
the variable ind serves to index the vectors x and y. The output y[n] is depicted in Fig. 5.1a.
y[n]
y[n]
y[n]
4
2
4
(a)
12 n
4
(b)
12 n
12 n
(c)
Figure 5.1: Iterative solution to y[n] 0.5y[n 1] = x[n] 0.5x(n 1) using y[1] = 6 and
x[n] = cos(n/2)u[n]: (a) total response (b) ZIR, and (c) ZSR.
The iterative procedure is also suitable to calculate the zero-input and zero-state responses of
the system. The ZIR, shown in Fig. 5.1b, is obtained by changing line 01 to force a zero input.
272
01
n = (-1:12); x = 0.*n;
Similarly, the ZSR, shown in Fig. 5.1c, is obtained by changing line 02 to force zero state.
02
y = zeros(size(n));
The total output (Fig. 5.1a) is just the sum of the ZIR (Fig. 5.1b) and the ZSR (Fig. 5.1c) (see
Eq. (4.55)).
Example 5.1
The iterative method can be applied to a dierence equation in delay or advance form. In Ex. 5.1,
we considered the former. Let us now apply the iterative method to a second-order equation in
advance form.
Using causal input x[n] = nu[n] and initial conditions y[1] = 2 and y[2] = 1, iteratively solve
the second-order system given by
y[n + 2] y[n + 1] + 0.24y[n] = x[n + 2] 2x[n + 1].
Again following Eq. (5.1), the system is expressed as
y[n + 2] = y[n + 1] 0.24y[n] + x[n + 2] 2x[n + 1].
(5.3)
n = (-2:4); x = n.*(n>=0);
y = zeros(size(n)); y(n<0) = [1,2];
for ind = find(n>=0),
y(ind) = y(ind-1)-0.24*y(ind-2)+x(ind)-2*x(ind-1);
end
y(n>=0)
y = 1.76 2.28 1.86 0.31 -2.14
Example 5.2
273
(5.4)
This is a nonrecursive equation. In this form, determination of the present output y[n] does not
require the past values y[n 1], y[n 2], . . . , y[n K], and the output is not computed recursively.
Instead, the output is computed directly from the input, as the next example demonstrates.
1
(x[n] x[n 1]) .
T
(5.5)
Determine the response of this system to (a) x[n] = u[n] and (b) x[n] = nT u[n].
This example requires no recursion or iteration. The output at any instant is determined only
by the input values. Since the system is nonrecursive, there is no need for initial conditions. Further, since the system and inputs are causal, the outputs are 0 for n < 0. Assuming uniform sampling
at t = nT , the discrete-time inputs u[n] and nT u[n] would result from sampling the continuous-time
signals u(t) and tu(t), respectively.
(a) Response to x[n] = u[n]
Substituting x[n] = u[n] into Eq. (5.5) directly produces the result,
y[n] =
1
1
(u[n] u[n 1]) = [n].
T
T
Physical systems, however, do not produce outputs in this all-at-once manner. Rather, hardware
tends to compute the output point by point as the input is acquired. To demonstrate, we start at
n = 0 and substitute x[0] = 1 and x[1] = 0 into Eq. (5.5) to obtain
y[0] =
1
1
(1 0) = .
T
T
1
(1 1) = 0.
T
In a similar way, we obtain y[2] = y[3] = y[4] = = 0. Taken together, the output is identical to
our earlier result, y[n] = T1 [n].
(b) Response to x[n] = nT u[n]
Substituting x[n] = nT u[n] into Eq. (5.5) produces the result
y[n] =
1
(nT u[n] (n 1)T u[n 1]) = u[n 1].
T
274
This result is also obtained in sequence as follows. Setting n = 0 and substituting x[0] = 0 and
x[1] = 0, we obtain
y[0] = 0.
Setting n = 1 in Eq. (5.5) and substituting x[1] = T and x[0] = 0, we obtain
1
(T 0) = 1.
T
Setting n = 2 in Eq. (5.5) and substituting x[1] = 2T and x[0] = T , we obtain
y[1] =
1
(2T T ) = 1.
T
Continuing on, we nd that y[3] = y[4] = y[5] = = 1. Taken together, the output is thus
y[n] = u[n 1], which matches our earlier result.
When y[n] is passed through a D/C converter, the continuous-time output is a fairly close approximation to a unit step, which is the true derivative of a ramp input. As T 0, the output
approaches the ideal. See Fig. 4.26.
Example 5.3
y[2] =
Consider a ve-point sum, where the current output is simply a sum of the ve most recent input
values. Express this system using both nonrecursive and recursive forms, and compare the two
implementations.
This system is somewhat unusual in that it can be easily expressed in either a recursive or nonrecursive form. In nonrecursive form, the input and output are related by
y[n] = x[n] + x[n 1] + x[n 2] + x[n 3] + x[n 4].
We can nd y[n 1] by replacing n with n 1 in this equation. Then, subtracting y[n 1] from
y[n], we obtain the recursive form as
y[n] y[n 1] = x[n] x[n 5].
Clearly, both equations represent the same system. It is easy to see that computation of each value of
y[n] from the nonrecursive form requires four additions, whereas the same computation by iteration
using the recursive form requires only two additions. The computational economy of the recursive
form over the nonrecursive form is signicant, an observation that holds true in general. In fact,
recursive equations are most often dramatically more ecient than their nonrecursive counterparts.
Example 5.4
Iterative methods are useful to solve dierence equations, particularly from the perspective of
hardware realization. Despite this fact, a closed-form solution is far more useful in the study of
system behavior and its dependence on the input and various system parameters. For this reason,
we next develop a systematic procedure to analyze discrete-time systems that is similar to analysis
techniques for continuous-time systems.
275
1
(x[n + 2] + x[n + 1] + x[n] + x[n 1] + x[n 2]).
5
5.2
Operator Notation
For the sake of compactness and ease of manipulation, it is convenient to represent equations using
operator notation. Continuous-time dierential equations, for example, can be represented in terms
of the operator D, which denotes the operation of dierentiation. For discrete-time dierence equations, we shall use the operator E to denote the operation of advancing a sequence by one unit. By
extension, an advance-by-two operation is represented as E(E) = E 2 , and so forth. Thus,
E {x[n]} x[n + 1]
E 2 {x[n]} x[n + 2]
..
.
E K {x[n]} x[n + K].
(5.6)
1
(x[n + 1] x[n]).
T
1
1
(E {x[n]} x[n]) = (E 1) {x[n]} .
T
T
Similarly, the general Kth-order dierence equation of Eq. (5.1) is expressed in advance form as
y[n + K] + a1 y[n + (K 1)] + + aK1 y[n + 1] + aK y[n] =
b0 x[n + K] + b1 x[n + (K 1)] + + bK1 x[n + 1] + bK x[n].
(5.7)
(5.8)
276
Since delay form is easily and directly converted to advance form and vice versa, the operator
notation of Eq. (5.8) is valid for either the advance form of Eq. (5.7) or the delay form of Eq. (5.1).
To provide an example, consider a second-order system described in delay form as
y[n] 2y[n 1] 7y[n 2] = x[n] + 3x[n 1].
Replacing n with n + 2 yields the advance form,
y[n + 2] 2y[n + 1] 7y[n] = x[n + 2] + 3x[n + 1].
In advance-operator form, the system is thus described as
(E 2 2E 7) {y[n]} = (E 2 + 3E) {x[n]} .
Deceptive Appearances
Equation (5.8) is Eq. (5.7) (or Eq. (5.1)) expressed in a compact form using operator notation.
Despite its deceptive appearance, Eq. (5.8) is not an algebraic equation and should never be treated
as such. In other words, A(E) {y[n]} does not mean that a polynomial A(E) multiplies y[n]. It
should be understood in the sense that A(E) operates on y[n]. It is dangerous to apply the rules of
algebra indiscriminately to equations written in operator form. To highlight these dangers, consider
the system of Ex. 5.1 described in advance-operator notation as
(E 0.5) {y[n]} = (E 0.5) {x[n]} .
This is a rst-order system that can support initial conditions, as the ZIR of Fig. 5.1b demonstrates.
Algebraic rules, which would allow us to divide both sides of the equation by E 0.5, incorrectly
suggest that this system is equivalent to y[n] = x[n], a 0th-order system whose ZIR is always zero.
Clearly, the two systems cannot be equivalent. Although operator notation is a convenient and
compact way of manipulating dierence equations, it is not algebraic in nature.
Response of a Linear Discrete-Time System
We have seen earlier that Eq. (5.7) is a linear equation. From the decomposition property, we have
also seen that the general solution of a linear equation is the sum of its zero-input and zero-state
responses. Let us revisit these ideas using operator notation.
Recall that Eq. (5.8) represents Eq. (5.7) in operator form. To demonstrate that it is linear,
let the inputs x1 [n] and x2 [n] generate the outputs y1 [n] and y2 [n], respectively. From Eq. (5.8) it
follows that
A(E) {y1 [n]} = B(E) {x1 [n]}
5.3
277
The zero-input response y[n] is the system response to the internal conditions (initial conditions)
when the input is zero. Thus, y[n] is the solution of Eq. (5.8) with x[n] = 0; that is,
A(E) {y[n]} = 0
(5.9)
or
(E K + a1 E K1 + + aK1 E + aK ) {y[n]} = 0,
which means that
y[n + K] + a1 y[n + K 1] + + aK1 y[n + 1] + aK y[n] = 0.
Although we can solve this equation systematically, even a cursory examination points to its solution. This equation states that a linear combination of y[n] and its shifted versions y[n + k]
(k = 1, 2, . . . , K) is zero not for some values of n but for all n. Such a situation is possible if and
only if y[n] and its shifted versions y[n + k] are of the same form. Only an exponential function n
has this property. To see how, notice that
E k { n } = n+k = k n .
This equation shows that the shifted exponential n+k is just a constant times n . Clearly, n+k
and n are of the same form. Therefore, a solution of Eq. (5.9) is of the form
y[n] = c n .
(5.10)
(5.11)
Our solution c n (Eq. (5.10)) is correct, provided that satises Eq. (5.11).
Since A() is a Kth-order polynomial, it has K roots. Assuming that these roots are distinct,
Eq. (5.11) can be expressed in factored form as
( 1 )( 2 ) ( K ) = A() = 0.
(5.12)
Clearly, Eq. (5.12) has K solutions 1 , 2 , . . . , K , and therefore, Eq. (5.9) also has K solutions
n
, where c1 , c2 , . . . , cK are constants. We can ready1 [n] = c1 1n , y2 [n] = c2 2n , . . . , yK [n] = cK K
ily show that the general solution y[n] is given by the sum of these K solutions. Briey, since
y1 [n], y2 [n], . . . , yK [n] are all solutions of Eq. (5.9), we know that
A(E) {y1 [n]} = 0
A(E) {y2 [n]} = 0
..
.
A(E) {yK [n]} = 0.
To
help avoid confusion, we sometimes subscript the zero-input response as yzir [n].
278
(5.13)
where 1 , 2 , . . . , K are the roots of Eq. (5.12), and c1 , c2 , . . . , cK are constants determined from
K auxiliary conditions, generally given in the form of initial conditions.
The polynomial A() is called the characteristic polynomial of the system, and A() = 0 is
the characteristic equation of the system. Moreover, 1 , 2 , . . . , K , the roots of the characteristic
equation, are called characteristic roots, characteristic values, or eigenvalues of the system. The
exponentials kn (k = 1, 2, . . . , K) are the characteristic modes or natural modes of the system.
A characteristic mode corresponds to each characteristic root of the system, and the zero-input
response is a linear combination of the characteristic modes of the system.
The characteristic polynomial and characteristic roots reect the internal structure of a system.
In a sense, they also predestine a systems output. A system is not free to behave in arbitrary ways
but is bound by its characteristic polynomial to very particular and restricted behaviors. Unable
to escape its inner character, a system has no choice to respond to initial conditions except with a
combination of its natural modes.
25
4 ,
279
Repeated Roots
So far we have assumed the system to have K distinct characteristic roots 1 , 2 , . . . , K with corn
responding characteristic modes 1n , 2n , . . . , K
. If two or more roots coincide (repeated roots), it
is not enough to simply repeat the characteristic mode multiple times. Rather, additional characteristic modes are produced. Direct substitution shows that if a root has multiplicity r (repeats
r times), then the characteristic modes corresponding to this root are n , n n , n2 n , . . . , nr1 n .
Thus, if the characteristic equation of a system is
A() = ( 1 )r ( r+1 )( r+2 ) ( K ),
then the zero-input response of the system is
n
n
n
+ cr+2 r+2
+ + c K K
.
y[n] = (c1 + c2 n + c3 n2 + + cr nr1 )1n + cr+1 r+1
(5.14)
Although Eq. (5.14) shows the zero-input response for a system with one root repeated r times and
the remaining K r roots all distinct, the result is easily extended to any combination of distinct
and repeated roots.
Using initial conditions y[1] = 31 and y[2] = 29 , determine the zero-input response of an
LTID system described by the equation
(E 2 + 6E + 9) {y[n]} = (2E 2 + 6E) {x[n]} .
In this case, the characteristic polynomial is 2 + 6 + 9 = ( + 3)2 , and the system has a repeated characteristic root at = 3. The characteristic modes are (3)n and n(3)n . Hence, the
zero-input response is
y[n] = (c1 + c2 n)(3)n .
Similar to Ex. 5.5, we next set n = 1 and 2 into this equation and use the initial conditions
y[1] = 31 and y[2] = 92 to obtain the matrix representation
$
%
!
!
(3)1 (1)(3)1
c1
31
=
.
2
c2
(3)2 (1)(3)2
9
The coecients c1 and c2 are found using MATLAB.
01
280
Using initial conditions y[1] = 2 and y[2] = 1, determine and plot the zero-input response of a
real LTID system described by the equation
(E 2 1.5588E + 0.81) {y[n]} = (E + 3) {x[n]} .
The characteristic polynomial of this system is ( 2 1.5588 + 0.81). Although the roots can
be found using the quadratic formula, it is simpler to use MATLAB.
01
In factored form, the characteristic polynomial is thus ( 0.78 j0.45)( 0.78 + j0.45). The
characteristic roots are 1 = 0.78 + j0.45 and 2 = 0.78 j0.45 = 1 .
Next, we compute the zero-input response in two ways. First, we follow the standard form of
Eq. (5.13). Since the roots are complex, this requires us to work with complex numbers. Second,
we compute the zero-input response using the real form of Eq. (5.15).
Standard Form
Using Eq. (5.13), the zero-input response is
y[n] = c1 (0.78 + j0.45)n + c2 (0.78 j0.45)n .
1
Next, we set n = 1 and 2 in this equation and express the results in matrix form as
$
%
!
!
11 21
c1
y[1]
=
.
c2
y[2]
12 22
281
Substituting y[1] = 2 and y[2] = 1, we use MATLAB to compute the constants c1 and c2 .
02
Although the response should be real, computer rounding causes MATLAB to produce a tiny imaginary portion to y[n], which is eliminated in line 03 using the real command.
y[n]
2
1
6
18
0
1
12
Figure 5.2: ZIR of (E 2 1.5588E + 0.81) {y[n]} = (E + 3) {x[n]} using y[1] = 2 and y[2] = 1.
Real Form
When expressed in polar form, the characteristic roots 0.78 j0.45 are 0.9ej 6 . Thus, || = 0.9
and = /6, and the zero-input response, according to Eq. (5.15), is given by
y[n] = c(0.9)n cos n + .
6
To determine the constants c and , we set n = 1 and 2 in this equation and substitute the initial
conditions y[1] = 2 and y[2] = 1 to obtain
3
4
c
c
3
1
2 = 0.9
cos 6 + = 0.9
cos()
+
sin()
2 3
2
4
c
c
1
and 1 = (0.9)2 cos 3 + = 0.81 2 cos() + 23 sin()
or
3
1
1.8 c cos() + 1.8 c sin()
1
3
1.62 c cos() + 1.62 c sin()
= 2
= 1
$
=
3
1.8
1
1.62
1
1.8
3
1.62
%
c cos()
c sin()
!
=
2
1
!
.
These are two simultaneous equations in two unknowns c cos() and c sin(). Solving these equations
yields
c cos() = 2.308 and c sin() = 0.397.
Dividing c sin() by c cos() yields
tan() =
Thus,
0.397
0.172
=
.
2.308
1
282
Find and sketch the zero-input response for each of the following systems. Verify each solution by iteratively
computing the rst three terms.
(a) y[n + 1] 0.8y[n] = 3x[n + 1] with y[1] = 10
(b) y[n + 1] + 0.8y[n] = 3x[n + 1] with y[1] = 10
(c) y[n] + 0.3y[n 1] 0.1y[n 2] = x[n] + 2x[n 1] with y[1] = 1 and y[2] = 33
1
(d) y[n] + 4y[n 2] = 2x[n] with y[1] = 2
and y[2] =
2
4 2
5.3.1
By denition, the zero-input response is the system response to its internal conditions, assuming
that its input is zero. Understanding this phenomenon provides interesting insight into system
behavior. If a system is disturbed momentarily from its rest position (implying that there is no
outside disturbance after that moment), the system will not come back to rest instantaneously. In
general, it will come back to rest over a period of time and only through a special type of motion
that is characteristic of the system.
For example, if we press on an automobile fender momentarily and then release it at t = 0, there
is, ignoring gravity, no external force on the automobile for t > 0. Still, the auto body eventually
comes back to its rest (equilibrium) position, but not through any arbitrary motion. It must do
so using only a form of response that is sustainable by the system on its own without any external
source because the input is zero. Only characteristic modes satisfy this condition. The system uses
a combination of characteristic modes to come back to the rest position while satisfying appropriate
boundary (or initial) conditions. If the shock absorbers of the automobile are in good condition (high
damping coecient), the characteristic modes will be monotonically decaying exponentials, and the
auto body will come to rest rapidly with little or no oscillation. In contrast, for poor shock absorbers
(low damping coecients), the characteristic modes will be exponentially decaying sinusoids, and
the body will come to rest through oscillatory motion.
To provide another example, when a series RC circuit with an initial charge on the capacitor is
shorted, the capacitor will start to discharge exponentially through the resistor. This response of the
RC circuit is caused entirely by its internal conditions and is sustained by this system without the
aid of any external input. The exponential current waveform is therefore the characteristic mode of
this RC circuit. Although we give here two continuous-time examples, the same observations hold
for discrete-time systems as well.
This
assumes that the system will eventually come back to its original rest (or equilibrium) position.
283
Mathematically, we know that any combination of characteristic modes can be sustained by the
system alone without requiring an external input. Let us demonstrate this fact with a rst-order
system represented by the equation
(E 0.5) {y[n]} = x[n].
This system has a single characteristic root 1 = 0.5, and the characteristic mode is (0.5)n u[n]. We
now verify that the response y[n] = c(0.5)n can be sustained by this system without any input (zero
input). The input x[n] required to generate the response y[n] = (0.5)n is given by
x[n] = y[n + 1] 0.5y[n]
= c(0.5)n+1 0.5c(0.5)n
= 0.5c(0.5)n 0.5c(0.5)n
= 0.
Clearly, the characteristic mode y[n] = c(0.5)n is sustained by this DT system on its own, without
the necessity of an external input.
284
5.4
In this section, we develop time-domain methods to determine the response of an LTID system to
the unit impulse input [n]. The unit impulse response of an LTID system is very important because
every input can be expressed as a sum of impulses of the form [n m] (see Eq. (4.10)). Hence, a
knowledge of the unit impulse response enables us to compute the response of an LTID system to
any arbitrary input. Although the time-domain methods of this section are relatively simple, the
next chapter presents another, much simpler method that utilizes the z-transform.
Consider a Kth-order system specied like Eq. (5.8) as
A(E) {y[n]} = B(E) {x[n]} .
The unit impulse response h[n] is the solution of this equation for the input [n] with all the initial
conditions zero; that is,
A(E) {h[n]} = B(E) {[n]}
(5.16)
subject to initial conditions
h[1] = h[2] = = h[K] = 0.
To determine h[n], Eq. (5.16) can be solved iteratively or in a closed form. The following example
demonstrates the iterative approach.
Iteratively nd and then plot the unit impulse response h[n] of a system described by the equation
y[n] 0.6y[n 1] 0.16y[n 2] = 5x[n].
To determine the unit impulse response, we let input x[n] = [n] and output y[n] = h[n] to obtain
h[n] 0.6h[n 1] 0.16h[n 2] = 5[n],
subject to zero initial state h[1] = h[2] = 0.
Setting n = 0 in this equation yields
h[0] 0.6(0) 0.16(0) = 5(1)
h[0] = 5.
h[1] = 3.
h[2] = 2.6.
Continuing this way, we can determine any number of terms of h[n]. MATLAB performs these
iterative calculations eciently, the results of which are presented in Fig. 5.3.
01
02
03
04
05
Unfortunately, the iterative approach does not yield a closed-form expression for h[n]. Nevertheless, determining a few values of h[n] can be useful in determining the closed-form solution, as the
following development shows.
285
h[n]
5
3
1
0
10
15
5.4.1
Recall that h[n] is the system response to input [n], which is 0 for n > 0. We know that when
the input is 0, only the characteristic modes can be sustained by the system. Therefore, h[n] must
be made up of characteristic modes for n > 0. Due to the [n] input, the response may have some
nonzero value at n = 0 so that h[n] can be expressed as
h[n] = A0 [n] + yc [n]u[n],
where yc [n] is a linear combination of the characteristic modes. Substituting this expression into
Eq. (5.8) yields A(E) {A0 [n] + yc [n]u[n]} = B(E) {[n]}. Since yc [n] is made up of characteristic
modes, A(E) {yc [n]u[n]} = 0 (n 0), and we are left with A(E) {A0 [n]} = B(E) {[n]}, or
A0 ([n + K] + a1 [n + (K 1)] + + aK [n]) = b0 [n + K] + + bK [n].
Setting n = 0 into this equation and recognizing that [K] = 0 for all K = 0, we nd that
A0 aK = bK
Therefore, as long as aK = 0,
h[n] =
A0 =
bK
.
aK
bK
[n] + yc [n]u[n],
aK
(5.17)
We discuss the special case when aK = 0 later in this section. The K unknown coecients in
yc [n] are determined from K values of h[n] (n 0). Fortunately, it is a straightforward task to
determine K values of h[n] iteratively, as demonstrated in Ex. 5.8. Once, we compute the K values
h[0], h[1], h[2], . . . , h[K 1] iteratively, we set n = 0, 1, 2, . . . , K 1 in Eq. (5.17) to determine the
K unknowns in yc [n]. The following example claries the process.
Determine a closed-form representation of the unit impulse response h[n] for the system in Ex. 5.8,
which is specied by the equation
y[n] 0.6y[n 1] 0.16y[n 2] = 5x[n].
Since h[n] consists of characteristic modes only for n > 0, the characteristic mode terms in h[n] start at n = 1.
To reect this behavior, they are naturally expressed in terms of u[n 1]. But because u[n 1] = u[n] [n], we use
the more convenient u[n] and let the impulse A0 [n] absorb the dierence.
286
In the advance form, the system is y[n + 2] 0.6y[n + 1] 0.16y[n] = 5x[n + 2], which leads to
the operator notation of
(E 2 0.6E 0.16) {y[n]} = 5E 2 {x[n]} .
The characteristic polynomial is
2 0.6 0.16 = ( + 0.2)( 0.8),
and the characteristic modes are (0.2)n and (0.8)n . Therefore,
yc [n] = c1 (0.2)n + c2 (0.8)n .
Since aK = 0.16 and bK = 0, A0 = 0, and according to Eq. (5.17), the impulse response is
h[n] = (c1 (0.2)n + c2 (0.8)n )u[n].
(5.18)
To determine c1 and c2 , we need to nd two values of h[n] iteratively. Example 5.8 performs this
step and establishes h[0] = 5 and h[1] = 3. Using these values and setting n = 0 and 1 in Eq. (5.18),
we obtain
$
%
!
!
1
1
c1
5
c1 + c2 = 5
=
=
.
c2
3
0.2c1 + 0.8c2 = 3
0.2 0.8
Using the matrix representation, MATLAB computes the constants c1 and c2 .
01
Therefore,
h[n] = [(0.2)n + 4(0.8)n ] u[n].
The plot of this expression is identical to Fig. 5.3.
Example 5.9
Accommodating Systems with aK = 0
The impulse response h[n] is represented with Eq. (5.17) only when aK = 0. When aK = 0, the
form of h[n] changes slightly. Let R designate the number of consecutive coecients including aK
that are 0; that is, aK = aK1 = = aK(R1) = 0 and aKR = 0. In this case, A(E) can be
and using x[n] = [n] and y[n] = h[n], Eq. (5.8) becomes
expressed as E R A(E),
E R A(E)
{h[n]} = B(E) {[n]} = B(E) E R [n R] = E R B(E) {[n R]} .
Hence,
A(E)
{h[n]} = B(E) {[n R]} .
In this case, the input vanishes not for n > 0 but for n > R. Therefore, the response consists not
only of the zero-input term but also impulses at n = 0, 1, . . . , R. In general, even for aK = 0,
h[n] = A0 [n] + A1 [n 1] + + AR [n R] + yc [n]u[n].
(5.19)
Basically, we get an extra impulse function (besides A0 [n]) for every characteristic root that is 0.
We can determine the unknowns A0 , A1 , . . . , AR and the K R coecients in yc [n] from the K + 1
initial values h[0], h[1], . . . , h[K], determined as usual from the iterative solution of the equation
A(E) {h[n]} = B(E) {[n]}. The reason that yc [n] has K R rather than K coecients is that R
of the modes are necessarily 0. The next example demonstrates the procedure.
287
(5.20)
1 0
0 1
0 0
0
using n = 0, 1,
0 (1)0
0 (1)1
2
1 (1)
0 (1)3
2, and 3 yields
A0
0
0
A1
=
A2 0
c1
1
Therefore,
h[n] = [n] [n 1] + [n 2] (1)n u[n].
Example 5.10
Impulse Response of a Nonrecursive System
Although Eq. (5.20) can be used to determine the impulse response of a nonrecursive system, there
is a much simpler and more direct method. Because a1 = = aK = 0 for nonrecursive systems,
the general delay form of the system equation is, according to Eq. (5.4),
y[n] = b0 x[n] + b1 x[n 1] + + bK x[n K].
Letting x[n] = [n] and y[n] = h[n] in this equation, the impulse response is therefore
h[n] = b0 [n] + b1 [n 1] + + bK [n K] =
bk [n k].
(5.21)
k=0
Such a nonrecursive system has no natural modes, and thus its impulse response has no yc [n] term.
288
Find the impulse response of a nonrecursive LTID system described by the equation
y[n] = x[n] + x[n 1] + x[n 2] + x[n 3] + x[n 4].
Following Eq. (5.21), we obtain the answer instantly as
h[n] = [n] + [n 1] + [n 2] + [n 3] + [n 4].
Example 5.11
Find the impulse response h[n] of the LTID systems specied by the following equations:
(a) y[n + 2] 5y[n + 1] + 6y[n] = 8x[n + 1] 19x[n]
(b) y[n + 2] 4y[n + 1] + 4y[n] = 2x[n + 2] 2x[n + 1]
(c) y[n] = x[n] 2x[n 1]
5.5
The zero-state response y[n] is the system response to an input x[n] when the system is in zero
state. In this section, we shall assume that systems are in zero state unless mentioned otherwise, so
the zero-state response will be the total response of the system. Here we follow a procedure parallel
to that used in the continuous-time case by expressing an arbitrary input x[n] as a sum of impulse
components.
Any DT signal x[n] can be represented as a sum of weighted impulse functions. The signal
x[n] shown in Fig. 5.4a, for example, is comprised of weighted impulse components including those
depicted in Figs. 5.4b through 5.4f. The component of x[n] at n = m is x[m][n m], and x[n] is
289
x[m][n m].
m=
2
x[2][n + 2]
(b)
2
2
x[1][n + 1]
(c)
2
0
x[0][n]
(d)
2
x[1][n 1]
(e)
2
2
x[2][n 2]
(f)
2
290
x[m][n m] =
m=
m=
x[n]
x[m]h[n m] .
y[n]
From the DT sampling property, we recognize the left-hand side of this equation as x[n]. The
right-hand side, therefore, is the system response y[n] to input x[n]. Therefore,
y[n] =
x[m]h[n m].
(5.22)
m=
Referring to Eq. (4.59), we recognize the summation on the right-hand side of Eq. (5.22) as the
convolution sum of x[n] and h[n], which is represented symbolically by x[n] h[n].
In deriving Eq. (5.22), we only assume the system to be linear and time invariant. There are no
other restrictions on either the input signal or the system. In our applications, almost all the input
signals are causal, and a majority of the systems are also causal. These restrictions further simplify
the limits of the sum in Eq. (5.22). If the input x[n] is causal, x[m] = 0 for m < 0. Similarly, if the
system is causal (i.e., if h[n] is causal), then h[n m] = 0 when n m < 0 or m > n. Therefore,
if x[n] and h[n] are both causal, the product x[m]h[n m] = 0 for m < 0 and for m > n, and
Eq. (5.22) simplies to
n
x[m]h[n m].
(5.23)
y[n] =
m=0
We shall evaluate the convolution sum rst by an analytical method and later with graphical aids.
Table 5.1 provides a selection of sums that are commonly encountered in convolution calculations
[1].
1.
2.
3.
4.
5.
n
m=p
n
r p r n+1
1r
rm =
m=0
m=
m=0
m2 =
m=0
mrm =
n
n
n
m=0
r = 1
n(n+1)
2
n(n+1)(2n+1)
6
r+[n(r1)1]r n+1
(r1)2
m2 r m =
r = 1
r = 1
y[n] =
x[m]h[n, m].
m=
291
We have
y[n] =
x[m]h[n m].
m=
Note that
x[m] = (0.8)m u[m] and h[n m] = (0.3)nm u[n m].
Both x[n] and h[n] are causal. Therefore, according to Eq. (5.23),
y[n] =
=
x[m]h[n m]
m=0
n
m=0
In the preceding summation, m lies between 0 and n (0 m n). Therefore, if n 0, then both
m and n m 0, so u[m] = u[n m] = 1. If n < 0, m is negative, and u[m] = 0. Therefore, the
preceding equation becomes
n
m
nm
n0
m=0 (0.8) (0.3)
y[n] =
0
n<0
or, more compactly,
y[n] = (0.3)n
m
n
0.8
u[n].
0.3
m=0
This is a geometric progression with common ratio (0.8/0.3). Using entry 1 of Table 5.1,
1 (0.8/0.3)n+1
u[n]
y[n] = (0.3)n
(1 0.8/0.3)
= 2 (0.8)n+1 (0.3)n+1 u[n].
Example 5.12
Analytically determine the DT convolution y[n] = x[n] h[n] for x[n] = (0.8)n u[n] and h[n] = u[n]. How
does y[n] change if h[n] = u[n 1] rather than u[n]?
5.5.1
A number of useful properties accompany the convolution sum, which is similar in structure to the
convolution integral. Not surprisingly, the properties of the convolution sum are similar to those of
the convolution integral. We enumerate the most important properties here without proofs, which
are straightforward in most cases (see Prob. 5.5-1).
1. Commutative Property:
x[n] h[n] = h[n] x[n].
292
2. Distributive Property:
x[n] (h1 [n] + h2 [n]) = x[n] h1 [n] + x[n] h2 [n].
3. Associative Property:
x[n] (h1 [n] h2 [n]) = (x[n] h1 [n]) h2 [n].
4. Shifting Property:
If
x[n] h[n] = y[n],
then
x[n m] h[n p] = y[n m p].
The shifting property highlights a deciency of the compact notation y[n] = x[n]h[n]: shifting
signal y[n] by m, which involves replacing n with n m, would seem to imply that y[n m] =
x[n m] h[n m], but this is not so! To overcome this deciency, convolution is sometimes
represented in an alternate and arguably more correct form (x h)[n].
5. Convolution with an Impulse:
x[n] [n] = x[n].
6. Width and Length Properties:
If x[n] and h[n] have nite widths of Wx and Wh units, respectively, then the width of x[n]h[n]
is Wx +Wh units. Alternately, the width property may be stated in terms of lengths. If x[n] and
h[n] have nite lengths of Lx and Lh , respectively, then the length of x[n] h[n] is Lx + Lh 1
elements. Notice that the width of a DT signal is dened as one less than its length (number
of elements). For instance, the signal u[n] u[n 10] has 10 elements (length of 10) but has
a width of only 9 units. The unit impulse [n] has a length of 1 and a width of 0.
Certain convolution sums occur frequently. Tables of convolution sums, such as Table 5.2, eliminate the need for boring and repetitive calculations; desired results are simply read directly from
the table. For example, the convolution in Ex. 5.12 can be read directly from entry 8 of Table 5.2 as
(0.8)n u[n] (0.3)n u[n] =
(0.8)n+1 (0.3)n+1
u[n] = 2[(0.8)n+1 (0.3)n+1 ]u[n].
0.8 0.3
As the next example demonstrates, a combination of properties and tables allows an extended class
of convolution problems to be solved with reduced eort.
For the input x[n] = 4n u[n], nd the zero-state response y[n] of an LTID system described by
the equation
y[n + 2] 0.6y[n + 1] 0.16y[n] = 5x[n + 2].
The input can be expressed as x[n] = 4n u[n] = (1/4)n u[n] = (0.25)n u[n]. The unit impulse
response of this system, obtained in Ex. 5.9, is
h[n] = [(0.2)n + 4(0.8)n ] u[n].
Therefore,
y[n] = x[n] h[n] = (0.25)n u[n] [(0.2)n u[n] + 4(0.8)n u[n]] .
293
x[n]
h[n]
x[n] h[n]
1.
x[n]
[n k]
x[n k]
2.
u[n]
u[n]
(n + 1)u[n]
3.
u[n]
n u[n]
n(n+1)
u[n]
2
4.
nu[n]
nu[n]
n(n1)(n+1)
u[n]
6
5.
u[n]
n u[n]
6.
nu[n]
n u[n]
1 n+1
1
u[n]
( n 1)+n(1)
(1)2
u[n]
7.
u[n]
u[n]
8.
1n u[n]
2n u[n]
9.
1n u[n]
n2n u[n]
(n + 1) u[n]
n+1 n+1
1 2
u[n]
1 = 2
1 2
1 2
2 1
n
n
n
u[n]
+
n
2
2
2
1
(1 2 )
1
10.
1n u[n]
2n u[n
1
n
2 1 1 u[n]
11.
|1 |n u[n]
|2 |n cos(n + )u[n]
1]
2
n
2 1 2 u[n
1]
1 = 2
|2 | > |1 |
|2 |n+1 cos[(n+1)+] |1 |n+1 cos() u[n]
R = |1 |2 2|1 ||2 | cos() + |2 |2
3
4
2 | sin()
= tan1 |2|
| cos()|1 |
1
R
294
then
xr [n] = yr [n] and xi [n] = yi [n].
(5.24)
From this perspective, the response to complex inputs is just a special case of the response to multiple
inputs.
Use Table 5.2 and the properties of the convolution sum to compute the following:
(a) (0.8)n+1 u[n] u[n]
(b) n3n u[n] (0.2)n u[n 1]
(c) (en u[n] j[n + 1]) 2n u[n]
5.5.2
Depending on the signals involved, it can be dicult to solve the convolution sum using a purely
analytic approach. Followed systematically, a graphical approach claries convolution through visual
means. Recall that the convolution of signals x[n] and h[n] is given by
y[n] = x[n] h[n] =
x[m]h[n m].
m=
Following this expression, the graphical method rst plots x[m] and h[n m] as functions of m (not
n). For each value of n, the product x[m]h[n m] is formed and then summed over m to obtain
y[n]. Procedurally, the convolution operation can be performed as follows:
1. Plot x[m] and h[n m] as functions of m. To obtain h[n m], rst invert h[m] about the
vertical axis (m = 0) to obtain h[m]. Next, shift h[m] by n to obtain h[n m].
2. Starting with n large and negative, multiply x[n] and h[nm], and add all the products, either
manually or analytically, to obtain y[n].
3. Repeat the procedure for each value of n over the range to . Observe and exploit
structures that enable simultaneous computation over entire regions of n.
Since x[n] h[n] = h[n] x[n], the roles of x[n] and h[n] are easily reversed. In other words, we can
invert and shift either x[n] or h[n], whichever is most convenient.
295
We shall demonstrate by an example the graphical procedure for nding the convolution sum.
Although both the functions in this example are causal, the procedure is applicable to the general
case.
Using the graphical approach, repeat Ex. 5.12 and determine the DT convolution y[n] = x[n] h[n]
for
x[n] = (0.8)n u[n] and h[n] = (0.3)n u[n].
To begin, we plot both x[m] and h[m], as shown in Figs. 5.5a and 5.5b. These plots are identical to plots of x[n] and h[n] except that m replaces n. In this case, there is no particular dierence
in complexity between the two signals, and we arbitrarily choose to follow the procedure using x[m]
and h[n m]. To obtain h[n m], we rst reect h[m] to obtain h[m], as shown in Fig. 5.5c. Next,
we shift h[m] by n to obtain h[n m], as shown in Fig. 5.5d. Expressed mathematically, we see
that
x[m] = (0.8)m u[m] and h[n m] = (0.3)nm u[n m].
x[m]
h[m]
(0.8)m
1
0
(0.3)m
(a)
(b)
h[m]
h[n m]
(0.3)m
(0.3)nm
(c)
(d)
h[n m]
x[m]
(n < 0)
n
0
(e)
h[n m]
x[m]
(n 0)
0
(f)
y[n]
1
10
10
(g)
Figure 5.5: Graphical procedure for the convolution y[n] = x[n] h[n].
296
For n < 0, there is no overlap between x[m] and h[n m], as shown in Fig. 5.5e. Thus,
y[n] = 0 for n < 0.
Figure 5.5f shows the general situation for n 0. The two functions x[m] and h[n m] overlap over
the interval 0 m n. Therefore, for n 0,
y[n] =
=
x[m]h[n m]
m=0
n
(0.8)m (0.3)nm
m=0
= (0.3)n
m
n
0.8
.
0.3
m=0
for n 0.
For x[n] = (0.8)n u[n 1] and h[n] = u[n + 3], determine x[n] h[n] using the graphical procedure, and
then plot the result.
Using the sliding-tape approach, determine the DT convolution y[n] = x[n] h[n] using the signals
x[n] = n(u[n + 2] u[n 4]) and h[n] = u[n], which are both shown in Fig. 5.6.
We begin by representing x[m] and h[m] as number sequences on tapes, as shown in Figs. 5.7a and
5.7b. Since the variable m does not appear on these tapes, it is important to identify a reference
point (usually m = 0, shown shaded). Without such a reference point, the result y[n] may incorrectly
shift to one side or the other.
297
x[n]
h[n]
3
1
3
(a)
(b)
Figure 5.6: Signals x[n] = n(u[n + 2] u[n 4]) and h[n] = u[n].
m=0
x[m] 2 1 0 1
(a)
m=0
2
(b)
h[m] 1 1
m=n
(c)
1 1
1 1
(d)
1 h[m]
(e)
2 1 0 1
1 1 n = 3
(f)
1 1
2 1 0 1 2
1 n = 2
(g)
1 1
(h)
1 1
1 1
1 h[n m]
(i)
2 1 0 1 2 3
y[1] = 2
1 1 1 1 n=1
y[2] = 2
(j)
2 1 0 1
1 1 1 1
2 3
y[2] = 0
1 n=2
2 1 0 1 2 3
1 1 n = 1
y[1] = 3
(k)
2 1 0 1
1 1 1 1
2 3
y[3] = 3
1 1 n=3
2 1 0 1 2 3
1 1 1 n=0
y[0] = 3
(l)
2 1 0 1
1 1 1 1
2 3
y[4] = 3
1 1 1 n=4
y[3] = 0
y[n]
3
(m)
10
10
Figure 5.7: Sliding-tape method for the convolution y[n] = x[n] h[n].
The h[m] tape of Fig. 5.7c is obtained by inverting the h[m] tape about the origin (m = 0).
Shifting the inverted tape by n slots yields h[nm], as shown in Fig. 5.7d. Figures 5.7a through 5.7d
are analogous to Figs. 5.5a through 5.5d of the graphical approach.
To obtain y[n] = x[n] h[n], we slide the h[n m] tape along the x[m] tape, multiply the values
of adjacent slots, and add all the products. For n 3, the x[m] and h[n m] tapes do not overlap,
and y[n] is therefore 0. Figure 5.7e illustrates the n = 3 case, just before the h[n m] tape begins
to overlap the x[m] tape. At n = 2, the two tapes begin to overlap (Fig. 5.7f). In this case,
y[2] = (21) = 2.
At n = 1 (Fig. 5.7g), two slots overlap, and
y[1] = (21) + (11) = 3.
298
For x[n] = (3 |n|)(u[n + 3] u[n 4]) and h[n] = u[n + 4] u[n 2], use the sliding-tape procedure
of Ex. 5.15 to determine and plot y[n] = x[n] h[n]. Verify the convolution width property.
Computer-Based Convolution
Various computer software packages support discrete-time convolution. Some are capable of generating closed-form analytic solutions, and others, like MATLAB, simply convolve particular sequences.
While convenient from a computational viewpoint, computer-based convolution generally fails to give
a proper understanding of the convolution mechanism. As the next example shows, computer-based
solutions are particularly eective when convolving two nite-length sequences, although certain
other cases are also possible.
Consider the signals x[n] = n(u[n + 2] u[n 4]) and h[n] = u[n], which are both shown in Fig. 5.6.
Use MATLAB to compute x[n] x[n] and x[n] h[n].
The signal x[n], whose region of support is 2 n 3, is a nite-duration signal of length
Lx = 6. To compute x[n] x[n], we dene a length-6 vector x and then use the conv command,
which convolves two nite-duration DT signals.
01
x = [-2,-1,0,1,2,3]; conv(x,x)
ans = 4 4 1 -4 -10 -16 -5
10
12
The length-11 result accurately represents the shape of x[n] x[n] and is readily veried using the
sliding-tape method. What is missing, however, is the region of support for this signal, a detail that
MATLABs conv command does not provide. Fortunately, the starting point of the result is easy to
determine: simply add the starting points of each signal being convolved (see Prob. 5.5-18). Since
x[n] starts at n = 2, x[n] x[n] starts at n = 4. Figure 5.8a shows the result.
02
n = (-4:-4+length(x)-1+length(x)-1); stem(n,conv(x,x));
The convolution x[n]h[n] involves an innite-duration signal h[n] = u[n]. In general, MATLABs
conv command cannot properly convolve innite-duration signals. This is not too surprising since
computers themselves cannot store the innite-length vector needed to represent such signals. For
special cases, such as the convolution of right-sided signals, conv can correctly compute a portion of
the convolution. To see how, let us represent h[n] with its rst 10 values and then plot the resulting
convolution. Remember, since x[n] starts at n = 2 and h[n] starts at n = 0, the result starts at
n = 2.
03
299
The result is shown in Fig. 5.8b. Compared with the true result of Fig. 5.7m, we see that the rst
10 values are correct, while the remaining values (n 8, shown shaded) are not. The accuracy of
the result is limited by the 10-value accuracy with which we represent h[n].
15
conv(x,h)
conv(x,x)
6
2
12 n
15
(b)
(a)
Figure 5.8: Computer convolutions involving x[n] = n(u[n + 2] u[n 4]) and h[n] = u[n].
Example 5.16
Expand (x2 + 2x + 1)(3x + 4) by hand and by using DT convolution. What is the expansion of
(x + 2 + x1 )(3x4 + 4x3 )?
By hand calculation, the desired polynomial expansion is
(x2 + 2x + 1)(3x + 4) = 3x3 + 6x2 + 3x + 4x2 + 8x + 4
= 3x3 + 10x2 + 11x + 4.
Next, we use MATLAB to compute the convolution [1, 2, 1] [3, 4].
01
The vector of coecients produced through convolution clearly matches the coecients of the original
polynomial expansion, which conrms that (x2 + 2x + 1)(3x + 4) = 3x3 + 10x2 + 11x + 4.
300
The expansion of (x + 2 + x1 )(3x4 + 4x3 ) can be obtained by the same convolution. To see how,
notice that (x + 2 + x1 )(3x4 + 4x3 ) = x2 (x2 + 2x + 1)(3x + 4). Thus,
(x + 2 + x1 )(3x4 + 4x3 ) = x2 (3x3 + 10x2 + 11x + 4)
= 3x5 + 10x4 + 11x3 + 4x2 .
Since (x2 + 2x + 1)(3x + 4) and (x + 2 + x1 )(3x4 + 4x3 ) share the same coecient vectors, so do
their respective expansions; it is only the powers of the polynomials that dier.
Example 5.17
(5.25)
Example 5.4 shows that this system can also be represented in recursive form as
y[n] y[n 1] = x[n] x[n 5].
The impulse response h[n] for this system can be found either from the nonrecursive form or from
the recursive form. However, nding h[n] from the nonrecursive form is much simpler, as seen from
Eq. (5.21) and also found in Ex. 5.11 as
h[n] = [n] + [n 1] + [n 2] + [n 3] + [n 4].
The system response to an arbitrary input x[n] is given by
y[n] = x[n] h[n]
= x[n] ([n] + [n 1] + [n 3] + [n 4] + [n 5])
= x[n] + x[n 1] + x[n 2] + x[n 3] + x[n 4].
But this is precisely the nonrecursive form of system representation, as seen from Eq. (5.25). To
reiterate, the convolution sum may be viewed as a nonrecursive representation of the system.
5.5.3
Interconnected Systems
It is common practice to build complex systems from combinations of simpler systems. Two forms
of interconnection are common: parallel connections (Fig. 5.9a) and cascade connections (Fig. 5.9b).
Let us investigate how these interconnections impact overall system function.
The
301
Hp
H1
h1 [n]
[n]
H2
h2 [n]
(a)
Hc
[n]
H1
h1 [n]
H2
H1
h2 [n] h1 [n]
(b)
[n]
H2
h2 [n]
(c)
Figure 5.9: System interconnections: (a) parallel, (b) cascade, and (c) reverse-order cascade.
To begin, consider two LTID systems H1 and H2 with impulse responses h1 [n] and h2 [n], respectively. Further, let us assume that interconnecting these systems, as shown in Fig. 5.9, does not
load them. This means that the impulse response of either H1 or H2 remains unchanged whether
observed when these systems are unconnected or when they are interconnected.
Figure 5.9a shows these two systems connected in parallel. Applying an impulse as the input,
each system responds with its own impulse response, which are then added. Thus, the composite
parallel system Hp has an impulse response hp [n] = h1 [n] + h2 [n]. This result also follows from the
distributive property of the convolution sum.
If systems H1 and H2 are connected in cascade, as shown in Fig. 5.9b, we see that the impulse
response of the composite cascade system Hc is hc [n] = h1 [n] h2 [n]. This result also follows from
the associate property of the convolution sum. Moreover, because of the commutative property,
h1 [n] h2 [n] = h2 [n] h1 [n], and the systems commute. In other words, the order of the systems
in the cascade is not important, at least theoretically. Thus, the cascade of H2 followed by H1
(Fig. 5.9c) behaves identically to the cascade of H1 followed by H2 (Fig. 5.9b).
Inverse Systems
Suppose that an LTID system with impulse response h[n] is connected in cascade with its inverse,
which has an impulse response hi [n]. The impulse response of the cascade system is h[n] hi [n]. We
also know that the cascade of a system with its inverse is an identity system whose output is the
same as the input. In other words, the unit impulse response of the cascade is a unit impulse [n].
Consequently,
(5.26)
h[n] hi [n] = [n].
Because order is unimportant to convolution, we also see that h[n] is the inverse of hi [n]. That is,
h[n] and hi [n] are inverses of each other.
Show that the inverse of a discrete-time accumulator is a rst-order backward dierence system.
Because
of physical limitations, sensitivities, and imperfections such as quantization, cascade order can aect
performance in real-world implementations. See Ch. 8.
302
y[n] =
x[k].
k=
It is easy to see from this equation that the impulse response of an accumulator is given by
h[n] =
[k] = u[n].
k=
System Response to
x[k]
k=
Figure 5.10a shows a cascade of two LTID systems: a system H with impulse response h[n], followed
by an accumulator. Figure 5.10b shows a cascade of the same two systems in reverse order: an
accumulator followed by H. In Fig.
n 5.10a, if the input x[n] to H results in the output y[n], then
the output
of
the
accumulator
is
accumulator is the
k= y[k]. In Fig. 5.10b, the output of the
sum nk= x[k], and using the linearity property, the output of system H is nk= y[k], which
is identical to the output in Fig. 5.10a. Hence, it follows that
if x[n] = y[n],
then
x[k] =
k=
y[k].
(5.27)
k=
If we let x[n] = [n] in Eq. (5.27), then y[n] = h[n]. Now using the fact that nk= [k] = u[n],
we obtain s[n], the unit step response of an LTID system with impulse response h[n], given by
s[n] =
h[k].
(5.28)
k=
(5.29)
x[n]
303
n
y[n]
n
k=
y[k]
k=
(a)
n
x[n]
n
x[k]
n
k=
k=
y[k]
k=
(b)
5.5.4
Everlasting exponentials are very special functions for linear, time-invariant systems. In Sec. 1.6.1,
we showed that there exists one signal for which the response of an LTIC system is the same as the
input within a multiplicative constant. The response of an LTIC system to an everlasting exponential
input est is H(s)est , where H(s) is the system transfer function. We now show that for an LTID
system, the same role is played by an everlasting exponential z n . The system response y[n] in this
case is given by
y[n] = h[n] z n
=
h[m]z nm
m=
h[m]z m .
=z
m=
For
the right-hand sum limits would range from 0 to . In any case, the sum
causal h[n],
m
is a function of z and not n. Let us denote this sum, when it converges, by
m= h[m]z
H(z). Thus,
(5.30)
y[n] = H(z)z n = H(z)x[n]x[n]=zn ,
where
H(z) =
h[m]z m .
(5.31)
m=
Equation (5.30) is valid only for those values of z for which the sum on the right-hand side of
Eq. (5.31) exists (converges). For a given z, notice that H(z) is a constant. Thus, the input and the
output are the same (within a multiplicative constant) when the input is an everlasting exponential
z n.
The function H(z) is called the transfer function of the system, and it is a function of the complex
variable z. A rearrangement of Eq. (5.30) leads to an alternative denition of the transfer function
as
y[n]
output signal
=
.
(5.32)
H(z) =
input signal input = everlasting exponential
x[n] x[n]=zn
The transfer function is dened for, and is meaningful to, LTID systems only. It does not exist for
nonlinear or time-varying systems in general.
For a system specied by Eq. (5.8), the transfer function is given by
H(z) =
B(z)
.
A(z)
(5.33)
304
This follows readily by considering an everlasting input x[n] = z n . According to Eq. (5.32), the
output is y[n] = H(z)z n . Substitution of this x[n] and y[n] into Eq. (5.8) yields
A(E) {H(z)z n } = H(z) A(E) {z n } = B(E) {z n } .
Moreover,
E k {z n } = z n+k = z k z n .
Hence,
A(E) {z n } = A(z)z n
Consequently,
H(z)A(z)z n = B(z)z n ,
and
B(z)
.
A(z)
We stress again that in this discussion we are talking about the everlasting exponential, which
starts at n = , not the causal exponential z n u[n], which starts at n = 0.
H(z) =
H(ej ) =
h[m]ejm .
(5.35)
m=
Later in Ch. 6 we shall see that Eq. (5.35) is the discrete-time Fourier transform (DTFT) of the
impulse response and that H(ej ) is the frequency response of the system.
1
T
(x[n + 1] x[n])
5.6
Total Response
From the decomposition property of Eq. 4.55, we know that the total response y[n] of an LTID
system is the sum of the zero-input response yzir [n] and the zero-state response yzsr [n]. The zeroinput response is a linear combination of the characteristic modes, which are determined from the
characteristics roots of the system equation. From the system equation, we also determine the
impulse response h[n]. Knowing h[n] and the input x[n], we nd the zero-state response as the
convolution of x[n] and h[n]. For a dierence equation such as Eq. (5.1) with unique roots k , the
total response is thus
y[n]
=
total response
K
k=1
ck kn
zero-input response
.
x[n] h[n]
zero-state response
305
The constants c1 , c2 , . . . , cK in the zero-input response are determined from the K initial conditions
of the system.
n
Using the initial conditions y[1] = 0 and y[2] = 25
u[n], determine
4 and the input x[n] = 4
and sketch the total response y[n] of an LTID system described by the equation
25
4
is
y = @(n) (-1.26*(4).^(-n)+0.644*(-0.2).^n+6.62*(0.8).^n).*(n>=0);
n = (0:20); stem (n,y(n));
y[n]
6
4
2
0
10
15
20
Figure 5.11: Total response of y[n + 2] 0.6y[n + 1] 0.16y[n] = 5x[n + 2] using input x[n] = 4n u[n]
and initial conditions y[1] = 0 and y[2] = 25
4 .
Example 5.19
5.7
System Stability
Chapter 4 introduces the concepts of external (BIBO) stability and internal (asymptotic) stability for
discrete-time systems. In this section, we introduce simple criteria to assess both types of stability.
306
5.7.1
External stability is based on how a system responds to external inputs. For LTID systems, the
system response to an input x[n] is given by the zero-state response
y[n] = h[n] x[n]
=
h[m]x[n m].
m=
m=
For a system that is BIBO stable, any bounded input produces a bounded output. If x[n] is bounded,
then |x[n m]| < Kx < , and
|y[n]| Kx
|h[m]| .
m=
Clearly, the output is bounded if the summation on the right-hand side is bounded or, equivalently,
if
|h[n]| < Ky < .
(5.36)
n=
Therefore, an LTID system is BIBO stable if its impulse response h[n] is absolutely summable.
Otherwise, it is unstable. This is a sucient condition for BIBO stability. We can show that this is
also a necessary condition (see Prob. 5.7-5).
5.7.2
For LTID systems, as in the case of LTIC systems, internal stability is dened in terms of the zeroinput response of the system. Also known as asymptotic stability, zero-input stability, and stability
in the Lyapunov sense, internal stability reects the internal structure of a system and is more
informative and powerful than external stability.
For an LTID system specied by a dierence equation in the form of Eq. (5.7) (or Eq. (5.8)), the
zero-input response consists of the characteristic modes of the system. It is the behavior of these
modes that determines the systems internal stability. The mode corresponding to a non-repeated
characteristic root is n . To be more general, let be complex so that
= ||ej
Since the magnitude of ejn is always unity regardless of the value of n, the magnitude of n is ||n .
Therefore,
if || < 1, then n 0 as n ;
if || > 1, then n as n ;
and if || = 1, then | n | = 1 for all n.
These results can be grasped more eectively in terms of the location of characteristic roots in the
complex plane. Figure 5.12 shows a circle of unit radius centered at the origin in a complex plane.
307
Im
marginally stable
unstable
||
Re
stable
308
n
2
a characteristic root k is inside the unit circle, then the corresponding mode kn is absolutely summable for
n 0. This conclusion follows for |k | < 1 from the fact that (see entry 1 of Table 5.1)
n=
|kn |u[n] =
n=0
|k |n =
1
.
1 |k |
In contrast, if k lies on or outside the unit circle, then kn is not absolutely summable. These conclusions are valid
also for modes of the form nr kn .
309
is not always true. The stability picture portrayed by the external description is inferior to the
internal description of stability. As the following example shows, BIBO (external) stability does not
guarantee internal (asymptotic) stability.
Two rst-order LTID systems H1 and H2 are connected in a non-loading cascade, as shown in
Fig. 5.14. The impulse responses of these systems are h1 [n] and h2 [n], respectively, given by
h1 [n] = 4[n] 3(0.5)n u[n] and h2 [n] = 2n u[n].
Determine the internal and external stability of the composite cascade system Hc .
Hc
x[n]
H1
H2
y[n]
310
controllable and observable. In such cases, the internal and external descriptions of systems are
equivalent.
Determine the internal and external stabilities of the systems specied by the following equations.
In each case, plot the characteristic roots in the complex plane. Each system is both controllable
and observable.
(a) y[n + 2] + 2.5y[n + 1] + y[n] = x[n + 1] 2x[n]
(b) y[n] y[n 1] + 0.21y[n 2] = 2x[n 1] + 3x[n 2]
(c) y[n + 3] + 2y[n + 2] + 32 y[n + 1] + 12 y[n] = x[n + 1]
(d) (E 2 E + 1)2 {y[n]} = (3E + 1) {x[n]}
(a) The characteristic polynomial is
2 + 2.5 + 1 = ( + 0.5)( + 2).
The characteristic roots are 0.5 and 2, as shown in Fig. 5.15a. Because | 2| > 1, the root 2
lies outside the unit circle, and the system is asymptotically unstable and BIBO unstable.
1
Im
Im
0.3
2
Re
0.5
(a)
0.7
Re
(b)
Im
Im
2
0.5
1
0.5
Re
0.5
0.5
Re
(c)
(d)
311
The three characteristic roots are 1 and 0.5 j0.5 (Fig. 5.15c). One of the characteristic roots
is on the unit circle, and the remaining two roots are inside the unit circle. The system is BIBO
unstable but marginally stable.
(d) The characteristic polynomial is
0
( + 1) =
2
12 0
12
3
3
1
1
j
.
+j
2
2
2
2
The characteristic roots are 12 j 23 = 1ej 3 repeated twice, and they lie on the unit circle
(Fig. 5.15d). The system is BIBO unstable and asymptotically unstable.
Example 5.21
Determine the internal and external stabilities of the systems specied by the following equations. In each
case, plot the characteristic roots in the complex plane. Each system is both controllable and observable.
(a) (E + 1)(E 2 + 4E + 5) {y[n]} = 3E {x[n]}
(b) (E 2 2E + 1)(E + 0.5) {y[n]} = (E 2 + 2E + 3) {x[n]}
5.8
This section attempts to provide an understanding of what determines system behavior. Because
of its intuitive nature, the following discussion is more or less qualitative. We show that the most
important attributes of a system are its characteristic roots or characteristic modes because they
determine not only the zero-input response but also the entire behavior of the system.
5.8.1
Recall that the zero-input response of a system consists of the systems characteristic modes. For a
stable system, these characteristic modes decay exponentially and eventually vanish. This behavior
may give the impression that these modes do not substantially aect system behavior in general
and system response in particular. This impression is totally wrong! We shall now see that the
systems characteristic modes leave their imprint on every aspect of the system behavior. We may
compare the systems characteristic modes (or roots) to a seed that eventually dissolves in the ground;
however, the plant that springs from it is totally determined by the seed. The imprint of the seed
exists on every cell of the plant.
In order to understand this interesting phenomenon, recall that the characteristic modes of a
system are very special to that system because it can sustain these signals without the application
of an external input. In other words, the system oers a free ride and ready access to these signals.
Now imagine what happens if we actually drive the system with an input having the form of a
characteristic mode. We expect the system to respond strongly (the resonance phenomenon). If the
input is not exactly a characteristic mode but is close to such a mode, we still expect the system
response to be strong. However, if the input is very dierent from any of the characteristic modes,
we expect the system to respond poorly. We now show that these intuitive deductions are indeed
true.
Although correlation oers a formal measure of similarity between signals, we shall take a simpler
approach here. Let us restrict the systems inputs to exponentials of the form z n , where z is generally
312
a complex number. The similarity of two exponential signals z n and n is established by the closeness
of z and . If the dierence |z | is small, then the signals are similar; if |z | is large, then the
signals are dissimilar.
Now consider a rst-order system with a single characteristic mode n and the input z n . The
impulse response of this system is then given by c n , where the exact value of the constant c is not
important for this qualitative discussion. The system response y[n] is given by
y[n] = h[n] x[n]
= c n u[n] z n u[n].
From Table 5.2, we obtain
y[n] =
c [z n n ]
u[n].
z
(5.37)
Clearly, if the input z n is similar to n , z is small, and the system response is large. The closer
the input x[n] is to the characteristic mode, the stronger the system response becomes. In contrast,
if the input is very dierent from the natural mode, z is large, and the system responds poorly.
This is precisely what we set out to prove.
We have proved the preceding assertion for a single-mode (rst-order) system. It can be generalized to a Kth-order system, which has K characteristic modes. The impulse response h[n] of such a
system is a linear combination of its K modes. Therefore, if x[n] is similar to any one of the modes,
the corresponding response will be high; if it is similar to none of the modes, the response will be
small. Clearly, the characteristic modes are very inuential in determining the system response to a
given input.
It would be tempting to conclude on the basis of Eq. (5.37) that if the input is identical to the
characteristic mode, so that z = , then the response goes to innity. Remember, however, that
if z = , the numerator on the right-hand side of Eq. (5.37) also goes to 0. We shall study this
complex behavior, or resonance phenomenon, later in this section.
We shall now show that mere inspection of the impulse response h[n] (which is composed of
characteristic modes) reveals a great deal about the system behavior.
5.8.2
Like human beings, systems have a certain response time. In other words, when an input (stimulus)
is applied to a system, a certain amount of time elapses before the system fully responds to that
input. This time lag or response time is called the system time constant. As we shall see, a systems
time constant (in samples) is equal to Wh , the width of its impulse response h[n].
An input [n] to a system has a width of zero (W = 0). The response of a system to an input
[n] is the impulse response h[n], which has some width Wh . Clearly, the system requires a time
equivalent of Wh samples to respond fully to input [n], and we are justied in viewing Wh as the
systems response time or time constant. We arrive at the same conclusion via another argument.
The system output is a convolution of the input with h[n]. If an input is a pulse of width Wx , then,
according to the width property of convolution, the output pulse width is Wx + Wh . This conclusion
shows that the system requires a time equivalent of the width Wh to respond fully to any input.
The system time constant indicates how fast a system responds. A system with a relatively small
time constant is a fast system that responds quickly to an input. A system with a relatively large
time constant is a sluggish system that cannot respond well to rapidly varying signals.
For systems represented by recursive dierence equations, the width of the impulse response h[n]
is because the characteristic modes approach 0 asymptotically as n . However, beyond some
value of n, h[n] becomes negligible. It is therefore necessary to use some suitable measure of the
impulse responses eective (or equivalent) width.
There
may also be an impulse at the origin. We shall ignore this term because its presence merely results in an
additional output component that is of the form of the input. This term will not aect the comparison of the outputs.
313
There is no single satisfactory denition of equivalent signal width applicable to every situation.
For the situation depicted in Fig. 5.16, a reasonable denition of the equivalent width of h[n] may be
pulse h[n], which can be called as an eective impulse response, is formed such that the sum of all
its elements is as close as possible to the sum of all the elements of h[n]. The height of h[n]
is chosen
to be equal to that of h[n] at some suitable instant n = m. In Fig. 5.16, m is chosen as the instant
at which h[n] is maximum. Noting that the number of elements in a DT signal exceeds its width by
1, the eective width satises
(Wh + 1)h[m] =
h[n].
n=
n=
h[n]
h[m]
1.
(5.38)
The time constant for a lowpass innite impulse response (IIR) system is normally well approximated
by Wh .
h[n]
h[m]
h[n]
Wh
1 n
1
1=
.
c 1 =
c n=0
1
1
For the multimode case, h[n] is a weighted sum of the systems characteristic modes, and Wh is a
weighted average of the time constants associated with the K modes of the system.
A Subtle Dilemma
The width of a physical DT sequence is always an integer value. However, Eq. (5.38) rarely produces
an integer result for Wh , and a subtle dilemma arises. Do we keep the non-integer width, or do we
round the result to a nearby integer? In truth, it doesnt really matter. The system time constant
is an imperfect measure to begin with, and it is primarily useful for approximate and qualitative
denition is satisfactory when h[n] is a single, mostly positive (or mostly negative) pulse. Such systems are
lowpass systems. This denition should not be applied indiscriminately to all systems.
314
5.8.3
The system time constant may also be viewed from a dierent perspective. The unit step response
s[n] of a system is the convolution of u[n] with h[n]. Let the impulse response h[n] be a rectangular
pulse of width Wh = 3, as shown in Fig. 5.17. This assumption simplies the discussion yet gives
satisfactory results for a qualitative discussion. The operation u[n] h[n] = s[n] is illustrated in
Fig. 5.17. Note that the output does not rise from 0 to the nal value instantaneously as the input
does; instead, the output takes Wh = 3 samples to accomplish this. Hence, Wr , the system rise time
(in samples), is equal to the system time constant. That is,
Wr = Wh .
(5.39)
This result and Fig. 5.17 show clearly that a system generally does not respond to an input instantaneously. Instead, it takes time equivalent of Wh samples for the system to respond fully.
u[n]
s[n]
h[n]
5.8.4
A larger time constant implies a sluggish system because the system takes a longer time to respond
fully to an input. Such a system cannot respond eectively to rapid variations in the input. In
contrast, a smaller time constant indicates that a system is capable of responding to rapid variations
in the input. Thus, there is a direct connection between a systems time constant and its ltering
properties.
A system with a large time constant does not respond well to high-frequency inputs, implying
that it suppresses rapidly varying (high-frequency) sinusoids and therefore acts as a lowpass lter.
We shall now show that the cuto frequency c of a lowpass lter has an inverse relationship to its
time constant Wh .
To demonstrate this inverse relationship, let us determine the system response to a sinusoidal
input x[n] by convolving this input with a rectangular impulse response h[n], which is depicted in
Fig. 5.18a. The time constant of this system is given by Wh , the width of the impulse response.
Figures 5.18b and 5.18c show the process of convolving h[n] with sinusoidal inputs of two dierent
frequencies. The sinusoid in Fig. 5.18b has a relatively high frequency, while the frequency of the
sinusoid in Fig. 5.18c is low. Recall that the convolution of x[n] and h[n] is equal to the sum of the
product x[m]h[n m]. The regions of summation are shown shaded in Figs. 5.18b and 5.18c for the
two cases. For the high-frequency sinusoid (Fig. 5.18b), it is clear that the sum of x[m]h[n m]
is very small because its positive and negative samples nearly cancel each other out. In this case
the output y[n] remains periodic but has a rather small amplitude. This happens when the period
of the input sinusoid is much smaller than the system time constant Wh . In contrast, for the lowfrequency sinusoid, the period of the sinusoid is larger than Wh , and the cancellations in the sum
Because
of varying denitions of rise time, the reader may nd dierent results in the literature. The qualitative
and intuitive nature of this discussion should always be kept in mind.
315
of x[m]h[n m] are less eective. Consequently, the output y[n] is much larger, as depicted in
Fig. 5.18c.
h[n]
Wh
(a)
h[n k]
x[k]
y[n]
k
(b)
h[n k]
y[n]
x[k]
(c)
responses h[n]
that are rectangular.
5.8.5
In general, the transmission of a pulse through an LTID system causes pulse dispersion (or spreading). Therefore, the output pulse is generally wider than the input pulse. Earlier we saw that if an
input x[n] is a pulse of width Wx , then Wy , the width of the output y[n], is
Wy = Wx + Wh .
(5.40)
This result shows that an input pulse spreads out (disperses) as it passes through a system. Since
Wh is also the systems time constant or rise time, the amount of spread in the pulse is equal to the
time constant (or rise time) of the system.
This discussion (Secs. 5.8.2 through 5.8.5) shows that the system time constant determines much
of a systems behavior: its ltering characteristics, rise time, pulse dispersion, and so on. In turn,
the time constant is determined by the systems characteristic roots. Clearly, the characteristic roots
and their relative amounts in the impulse response h[n] determine the behavior of a system.
5.8.6
Finally, we come to the fascinating phenomenon of resonance. As we have mentioned earlier, this
phenomenon is observed when the input signal is identical or very similar to a characteristic mode
316
of the system. For the sake of simplicity and clarity, we consider a rst-order system that has only
a single mode, n . Let the impulse response of this system be
h[n] = c n u[n],
and let the input be
x[n] = ( )n u[n].
The system response y[n] is then given by
y[n] = c n u[n] ( )n u[n].
From Table 5.2, we obtain
c n+1 ( )n+1
u[n].
(5.41)
y[n] =
Now, as 0, both the numerator and the denominator of Eq. (5.41) approach 0. Applying
LHopitals rule yields
lim y[n] = c(n + 1) n u[n].
(5.42)
Clearly, the response does not go to innity as 0, but it acquires a factor n+1, which approaches
as n . If is inside the unit circle, n decays faster than n + 1, and y[n] 0 as n .
The resonance phenomenon in this case is present, but its manifestation is aborted by the signals
own exponential decay.
This discussion shows that resonance is a cumulative phenomenon, not instantaneous. It builds
up linearly with n. When the mode decays exponentially, the signal decays at a rate too fast for
resonance to counteract the decay; as a result, the signal vanishes before resonance has a chance to
build it up. However, if the mode decays at a rate less than 1/(n + 1), we should see the resonance
phenomenon clearly. This specic condition is possible when || = 1 ( lies on the unit circle). In
this case,
= ej ,
and Eq. (5.42) becomes
y[n] = c(n + 1)ejn u[n].
(5.43)
j
For a real system, if = ej is a root,
must also be a root, and the impulse
then = e
jn
jn
u[n] = 2|c| cos(n + )u[n]. The response of this system
response is of the form ce
+c e
to input cos(n)u[n] is 2|c| cos(n + )u[n] cos(n)u[n]. The reader can show that this convolution
contains a term of the form (n + 1) cos(n)u[n]. The resonance phenomenon is clearly visible.
The component n cos(n)u[n] of the response increases linearly with n, eventually reaching , as
indicated in Fig. 5.19.
the characteristic root in question repeats r times, the resonance eect increases as nr1 . As long as is within
the unit circle, even nr1 n 0 as n for any value of r.
317
Recall that when = ej , the system is marginally stable. As we have indicated, the full eect
of resonance cannot be seen for an asymptotically stable system; only in a marginally stable system
does the resonance phenomenon boost the systems response to innity when the systems input
is a characteristic mode. But even in an asymptotically stable system, we see a manifestation of
resonance if its characteristic roots are close to the unit circle, such as when = (1 )ej and is
very small positive number. In such cases, we can show that the system response to the input ejn
or the sinusoid cos(n) is very large. The response drops o rapidly as the input signal frequency
moves away from or if becomes larger. This frequency-selective behavior can be studied more
protably using frequency-domain analysis. For this reason, we postpone full discussion of this
subject until the next chapter.
Importance of the Resonance Phenomenon
The resonance phenomenon is important because it allows us to design frequency-selective systems
by choosing their characteristic roots properly. Lowpass, bandpass, highpass, and bandstop lters
are all examples of frequency-selective networks. In mechanical systems, the inadvertent presence
of resonance can cause signals of such tremendous magnitudes that the system may fall apart. A
musical note (periodic vibrations) of proper frequency can shatter a glass if the frequency is matched
to a characteristic root of the glass, which acts as a mechanical system. Similarly, a company of
soldiers marching in step across a bridge amounts to applying a periodic force to the bridge. If the
frequency of this input force happens to be near a characteristic root of the bridge, the bridge may
respond (vibrate) violently and collapse, even though it would have been strong enough to carry
many soldiers marching out of step. A case in point is the Tacoma Narrows Bridge failure of 1940.
This bridge, nicknamed Galloping Gertie due to the motions of its center span in even light winds,
collapsed in a mild gale on November 7, 1940, less than four months after opening. The collapse
occurred not because of the winds brute force but because the frequency of wind-generated vortices,
which matched the natural frequencies (characteristic roots) of the bridge, caused resonance.
Because of the great damage that may occur, mechanical resonance is generally something to be
avoided, especially in structures or vibrating mechanisms. If an engine with periodic force (such as
piston motion) is mounted on a platform, the platform with its mass and springs should be designed
so that their characteristic roots are not close to the engines frequency of vibration. Proper design
of this platform not only helps avoid resonance but also attenuates vibrations if the system roots
are placed far away from the frequency of vibration.
5.9
As we have seen, the sum of the zero-input and zero-state responses is the solution to a linear
dierence equation. The classical method obtains the same solution from the sum of the natural
and forced components.
The ZIR and ZSR both include characteristic modes of the system, and the ZSR includes additional terms that reect the input to the system. When all the characteristic mode terms in the total
response are lumped together, the resulting component is the natural response. The forced response
is made up of the remaining non-characteristic modes. If yc [n] and y [n] denote the natural and the
forced response, respectively, then the total response y[n] is given by
y[n] = yc [n] +
y [n] .
modes non-modes
This
(5.44)
318
Example 5.22 (Natural and Forced Responses from ZIR and ZSR)
n
u[n], determine
Using the initial conditions y[1] = 0 and y[2] = 25
4 and the input x[n] = 4
the forced and natural responses of an LTID system described by the equation
(n 0).
Example 5.22
(5.45)
(5.46)
Just like the ZIR, the natural response must be a linear combination of characteristic modes. The
constants ck that weight each mode are determined from suitable auxiliary conditions usually given
as y[0], y[1], . . . , y[K 1].
Let us clarify the reason that we use auxiliary conditions y[0], y[1], . . ., y[K 1] rather than the
initial conditions y[1], y[2], . . ., y[K]. As we have seen, the initial conditions y[1], y[2], . . .,
y[K] yield the ZIR, not the natural response (which also includes mode terms produced by the
input). At n = 1, 2, . . ., K, only the zero-input component exists, and these initial conditions
can be applied to the zero-input component only. In the classical method, the zero-input and zerostate components cannot be separated. Consequently, the initial conditions must be applied to the
total response, which begins at n = 0. Hence, we need auxiliary conditions for n 0, the rst K
of which are y[0], y[1], . . ., y[K 1]. If we are given the initial conditions y[1], y[2], . . ., y[K],
we can derive the auxiliary conditions y[0], y[1], . . ., y[K 1] using the iterative procedure.
We now turn our attention to the forced response. Substitution of Eq. (5.46) into Eq. (5.45)
yields
(5.47)
A(E) {y [n]} = B(E) {x[n]} .
The forced response y [n] satises this equation and, by denition, contains only non-mode terms.
To determine the forced response, we shall use the method of undetermined coecients, where we
assume that the input (forcing function) follows one of the forms given in Table 5.3. The unknown
coecients can be determined by substituting y [n] into Eq. (5.47) and equating coecients of
similar terms. We shall illustrate the classical method using several examples.
Minor
modications are required for inputs that start at times other than n = 0.
make them causal, the inputs and outputs in Table 5.3 should technically include u[n] terms . However, since
we are only interested in the output for n 0, the inclusion of u[n] multipliers makes no dierence and would only
serve as a distraction.
To
319
Input x[n]
1.
b n
2.
cos(n + )
M
m
n
n
m
m=0
b cos(n + )
M
m
n
b
n
m
m=0
3.
Note: Entries 13 assume that the input terms do not match any characteristic modes of the
system. Should any input term match a characteristic mode, the forced response (which cannot
contain characteristic modes) must be multiplied by ni , where i is the smallest integer that will
prevent y [n] from having a characteristic mode term. For example, when an input n happens to
match an unrepeated natural mode of the system, the correct form of the forced response is bn n .
4.
bn n
and y [n + 2] = b1 (n + 2) + b0 .
Also, for n 0,
x[n] = 3n + 5 and x[n + 1] = 3(n + 1) + 5.
Substitution of these results in Eq. (5.47) yields
b1 (n + 2) + b0 5 (b1 (n + 1) + b0 ) + 6 (b1 n + b0 ) = 3(n + 1) + 5 5 (3n + 5)
or
2b1 n + 2b0 3b1 = 12n 17.
Comparison of similar terms on the two sides yields
b = 6
2b1 = 12
.
= 1
2b0 3b1 = 17
b0 = 35
2
Therefore,
y [n] = 6n
35
.
2
320
35
.
2
To determine c1 and c2 , we set n = 0 and 1 and substitute y[0] = 4 and y[1] = 13 to obtain
2
c1 + c2 35
c = 28
2 = 4
.
= 1
c2 = 13
2c1 + 3c2 47
=
13
2
2
Therefore,
13
35
.
y[n] = 28(2)n (3)n + 6n
2
2
yc [n]
y [n]
Example 5.23
n
m=0
m2 .)
m2 .
(5.48)
m=0
To begin, we nd an appropriate dierence equation that has y[n] as the response. From Eq. (5.48),
we observe that y[n + 1] = y[n] + (n + 1)2 . Hence,
y[n + 1] y[n] = (n + 1)2 .
(5.49)
This is the equation we seek. For this rst-order dierence equation, we need one auxiliary condition,
the value of y[n] at n = 0. From Eq. (5.48), it follows that y[0] = 0. Thus, we seek the solution of
Eq. (5.49) subject to the auxiliary condition y[0] = 0.
The characteristic equation of Eq. (5.49) is 1 = 0, the characteristic root is = 1, and the
characteristic mode is c(1)n u[n] = cu[n]. For n 0, the natural response is clearly the constant c.
Using pair 3 of Table 5.3 with = 1 and M = 2, we see that an input x[n] = (n+1)2 = n2 +2n+1
normally produces the forced response b2 n2 + b1 n + b0 . However, since the constant b0 matches the
characteristic mode of this system, the correct form of the forced response is
y [n] = b2 n3 + b1 n2 + b0 n.
Using this result,
E {y [n]} = y [n + 1] = b2 (n + 1)3 + b1 (n + 1)2 + b0 (n + 1).
From Eq. (5.47), we obtain
(E 1) {y [n]} = n2 + 2n + 1
or
b2 (n + 1)3 + b1 (n + 1)2 + b0 (n + 1) b2 n3 + b1 n2 + b0 n = n2 + 2n + 1.
1
,
6
b1 =
1
,
2
and b2 =
1
.
3
321
Hence
2n3 + 3n2 + n
n(n + 1)(2n + 1)
=c+
.
6
6
Setting n = 0 in this equation and using the auxiliary condition y[0] = 0, we nd that c = 0. Thus,
y[n] = c +
y[n] =
m2 =
m=0
n(n + 1)(2n + 1)
.
6
Checking our result, we see that this result correctly matches pair 3 of Table 5.1.
Example 5.24
B()
.
A()
(5.50)
Thus,
B(E) {x[n]} = B() n
B(ej ) jn
e .
A(ej )
(5.51)
For the input x[n] = (3)n u[n], determine the forced response y [n] of a system specied by the
equation
(E 2 3E + 2) {y[n]} = (E + 2) {x[n]} .
322
In this case,
H() =
B()
+2
= 2
.
A()
3 + 2
Since = 3 is not a characteristic root of the system, the forced response to input (3)n u[n] is
y [n] = H(3)(3)n u[n] =
(3)2
3+2
5
(3)n u[n] = (3)n u[n].
3(3) + 2
2
Example 5.25
For the input x[n] = cos(2n + /3)u[n], determine the forced response y [n] of a system specied by the
equation
(E 2 E + 0.16) {y[n]} = (E + 0.32) {x[n]} .
5.10
Summary
This chapter discusses the time-domain analysis of LTID (linear, time-invariant, discrete-time) systems. This analysis parallels that of LTIC systems, with minor dierences. Discrete-time systems
are commonly described by dierence equations, which are conveniently expressed using operator
notation as A(E) {y[n]} = B(E) {x[n]}. For a Kth-order system, K initial conditions must be
specied for a unique solution to an input starting at n = 0. The iterative approach is a conceptually simple approach to analyze LTID systems, both recursive and nonrecursive, although it rarely
delivers a closed-form solution.
A closed-form solution is possible by summing the zero-input and zero-state responses of a system.
The zero-input response (ZIR) is how the system responds to internal conditions when the input
is 0. The zero-input response is comprised of the characteristic modes of the system, which are
determined from the roots of the characteristic equation A() = 0. An unrepeated root produces
a characteristic mode n , while a root repeated r times has r characteristic modes: n , n n , . . .,
nr1 n . The coecients that weight the K modes of the ZIR are determined from the K initial
conditions of the system.
The duration of the unit impulse [n] is one sample at n = 0. For almost all time, an input of
[n] is like having no input at all. Consequently, the unit impulse response h[n] of an LTID system
to input [n] is comprised primarily of the systems characteristic modes. Based on the duration of
5.10. Summary
323
h[n], discrete-time systems are commonly classied as either innite impulse response (IIR) or nite
impulse response (FIR) systems.
The zero-state response (ZSR) is how a system responds to an external input with zero initial
conditions (zero state). Since any DT input can be represented as a sum of weighted impulse
functions, the ZSR of a LTID system is a sum of weighted impulse response functions. This sum,
called the convolution sum, is similar in structure and properties to the convolution integral used
in the study of LTIC systems. For an arbitrary input x[n], the impulse response h[n] of an LTID
system allows us to determine the ZSR as the convolution x[n] h[n].
Complex systems are often constructed from interconnections of simpler systems. Assisted by
the properties of DT convolution, the behaviors of parallel and cascade connections of LTID systems
are easily established. The convolution sum also helps demonstrate that the response of an LTID
system to an everlasting exponential input z n is, within a multiplicative constant, the same signal.
Thus, the response of an LTID system to z n is H(z)z n , where H(z) is the transfer function of the
system.
Stability greatly inuences system behavior. A system is externally, or bounded-input boundedoutput (BIBO), stable if and only if every bounded input produces a bounded output. Otherwise,
the system is BIBO unstable. Internal stability is determined based on the locations of a systems
characteristic roots. An asymptotically stable system has all roots inside the unit circle. An asymptotically unstable system has at least one root outside the unit circle, repeated roots on the unit
circle, or both. A marginally stable system, which is neither asymptotically stable nor unstable, has
unrepeated roots on the unit circle and possibly other roots inside the unit circle. An asymptotically
stable system is always BIBO stable. The converse is not necessarily true.
Characteristic roots not only determine internal stability, but they also dictate every aspect
of system behavior. Response and rise times, ltering characteristics, and pulse dispersion are all
related to a systems characteristic roots. A system responds strongly to inputs that are close to its
characteristic roots. If an input matches a characteristic root, resonance occurs, and a new (possibly
unstable) mode appears.
Dierence equations of LTID systems can also be solved by the classical method, where the
response is obtained as a sum of the natural and forced components. These are not the same as
the zero-input and zero-state components, although they satisfy the same equations, respectively.
Although simple, this method is applicable to a restricted class of input signals and cannot provide
the separate zero-input and zero-state responses. These limitations diminish its value considerably
in the theoretical study of systems.
Reference
1. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
324
Problems
5.1-7 A time-varying parameter system to generate binomial coecients (see Ex. 4.12) is,
5.1-1 A realization of a digital integrator that
for n = 1, 2, . . . , N , characterized by the
uses a backward dierence approximation
rst-order dierence equation
is represented as
N n+1
y[n 1] = 0.
y[n]
y[n] y[n 1] = T x[n],
n
where T is the sampling interval. Assuming
Using y[0] = N0 = 1, iteratively solve this
zero initial condition y[1] = 0, solve this
equation.
equation iteratively when the input x[n] is
5.2-1 Express the systems of Prob. 5.1-3 using
(a) [n]
(b) u[n]
operator notation. In each case, clearly
identify both A(E) and B(E).
5.1-2 A digital integrator that uses a trapezoidal
approximation is characterized by the difference equation
y[n] y[n 1] =
T
x[n] + x[n 1] ,
2
5.1-4 Using y[1] = 25 and y[2] = 0, itera- 5.3-3 Using y[1] = 0 and y[2] = 1, solve
tively solve (rst three terms only)
y[n + 2] + 3y[n + 1] + 2y[n] = 0.
y[n] 0.6y[n 1] 0.16y[n 2] = 0.
5.1-5 Using x[n] = (3)n u[n], y[1] = 3, and
y[2] = 2, iteratively determine (rst three
terms only) the total response, ZIR, and
ZSR for
y[n + 2] + 3y[n + 1] + 2y[n] =
x[n + 2] + 3x[n + 1] + 3x[n].
5.1-6 Using x[n] = (3)n u[n], y[1] = 2, and 5.3-6 Find v[n], the voltage at the N th node of
the resistive ladder depicted in Fig. P4.4-6
y[2] = 3, iteratively determine (rst three
(page 267), if V = 100 volts and a = 2.
terms only) the total response, ZIR, and
The dierence equation for v[n] is given in
ZSR for
Prob. 4.4-6, and the auxiliary conditions
y[n] + 2y[n 1] + y[n 2] = 2x[n] x[n 1].
are v[0] = 100 and v[N ] = 0.
Problems
325
y[n] =
x[k]
k=
digital
integrator
in
1
x[n] x[n 1] ,
T
K2
1
x[n k]
K2 K1 +1
k=K1
(c) T nu[n]
(d) T 2 n2 u[n]
326
u[n]
(c)
[n]
(d) T nu[n]
5.5-10 Repeat Prob. 5.5-9 for the digital integrator of Prob. 5.1-2.
5.5-11 For an LTID system with impulse re5.5-15 (a) Prove Eq. (5.29).
sponse h[n] = (0.5)n u[n], nd the zero(b) Show that
state response y[n] for the following inputs:
(a)
(c)
2n u[n]
2n u[n]
x[n] =
x[m] x[m1] u[n m].
m=
y[n]
H2
(a)
Hc
x[n]
H1
H2
y[n]
(b)
Figure P5.5-12
5.5-13 Repeat Prob. 5.5-12 if the impulse responses of the two systems are h1 [n] =
en (u[n] u[n 5]) and h2 [n] = en (u[n]
u[n 5]).
5.5-14 Two subsystems H1 and H2 are connected in parallel and cascade, as shown
Problems
327
where
x[n]
y=
y[0]
y[1]
..
.
x=
x[0]
x[1]
..
.
x[n]
y[n]
h[n]
and
Figure P5.5-20
H=
h[0]
h[1]
..
.
0
h[0]
..
.
..
.
h[n] h[n1]
x[n]
5
10
10 n
0
0
..
.
h[0]
h[n]
5
10
10 n
Figure P5.5-21
5.5-21 Repeat Prob. 5.5-20 for the signals shown
in Fig. P5.5-21.
5.5-22 Repeat Prob. 5.5-20 for the signals depicted in Fig. P5.5-22. Compare this result
with the result obtained if x[n] = h[n] =
u[n + 3] u[n 4].
x[n]
1
10
10 n
h[n]
1
10
10 n
Figure P5.5-22
5.5-23 The convolution sum in Eq. (5.23) can be
expressed in a matrix form as
y = Hx,
This operation is the reverse of the convolution and is known as deconvolution. Moreover, knowing x[n] and y[n], we can determine h[n]. This can be done by expressing
the matrix equation as n + 1 simultaneous
equations in terms of n + 1 unknowns h[0],
h[1], . . . , h[n]. These equations can readily
be solved iteratively. Thus, we can synthesize a system that yields a certain output
y[n] for a given input x[n].
(a) Design a system (i.e., determine h[n])
that will yield the output sequence (8,
12, 14, 15, 15.5, . . .) for the input sequence (1, 1, 1, 1, 1, . . .).
(b) For a system with the impulse response sequence (1, 2, 4, . . .), the output sequence is (1, 7/3, 43/9, . . .). Determine the input sequence.
5.5-24 The sliding-tape method is conceptually
quite valuable in understanding the convolution mechanism. With it, we can verify
that DT convolution of Eq. (5.23) can be
performed from an array using the sets x[0],
x[1], x[2], . . . and h[0], h[1], h[2], . . ., as
depicted in Fig. P5.5-24. The (i, j)th element (element in the ith row and jth column) is given by x[i]h[j]. We add the elements of the array along diagonals to produce y[n] = x[n] h[n]. For example, if we
sum the elements corresponding to the rst
328
y[1]
y[2]
h[0]
h[1]
h[2]
h[3]
x[0]
x[0]h[0]
x[0]h[1]
x[0]h[2]
x[0]h[3]
x[1]
x[1]h[0]
x[1]h[1]
x[1]h[2]
x[1]h[3]
x[2]
x[2]h[0]
x[2]h[1]
x[2]h[2]
x[2]h[3]
x[3]
x[3]h[0]
x[3]h[1]
x[3]h[2]
x[3]h[3]
..
.
..
.
..
.
..
.
..
.
..
Figure P5.5-24
diagonal of the array, we obtain y[0]. Simi- 5.5-27 Find the transfer function H(z) for a
larly, if we sum along the second diagonal,
moving-average system specied by the
we obtain y[1], and so on. Draw the array
input-output relationship
for the signals x[n] and h[n] in Ex. 5.15,
6
and nd x[n] h[n].
1
x[n k].
y[n] =
7
k=0
5.5-25 Find the transfer function H(z) for the
systems described by the following input5.5-28 Find the transfer function H(z) for an
output relationships:
accumulator system specied by a general
input-output relationship
(a) y[n] = 2y[n 1] y[n 2] + 2x[n]
n
x[n 1] + 3x[n 2]
y[n] =
x[n].
(b) y[n + 2] + 0.5y[n + 1] 0.8y[n] = x[n +
k=
1] 3x[n]
(c) y[n] = x[n] + x[n 1] + x[n 2] + x[n 5.6-1 Using y[1] = 10 and input x[n] =
3] + x[n 4]
en u[n], nd the total response of a system specied by the equation
(d) y[n + 1] y[n] = x[n + 1] x[n 4]
Are the transfer functions in parts (c) and
(d) related? Explain.
5.5-26 Find the transfer function H(z) for the
systems described by the following impulse
response functions:
rM
,
1 (1 + r)N
Hint: Let the monthly payments of P dollars start at n = 1. Then, consider the loan
as the initial condition y0 [0] = M and the
input as x[n] = P u[n 1]. The loan balance is the sum of the zero-input component (due to the initial condition) and the
Problems
329
330
Chapter 6
6.1
The continuous-time Fourier transform (CTFT), sometimes simply called the Fourier transform
(FT), is a tool to represent an aperiodic continuous-time signal in terms of its frequency components, thereby providing a spectral representation of the signal. We now develop a similar tool, the
discrete-time Fourier transform (DTFT), to represent an aperiodic discrete-time signal in terms of
its frequency components, which also leads to a spectral representation of the signal. The principal
dierence between the two types of transforms is that the former represents signals with continuoustime sinusoids or exponentials, while the latter uses discrete-time sinusoids or exponentials.
One possible way to develop the continuous-time Fourier transform is to start with the Fourier
series representation of periodic signals and then, letting the period go to innity, extend the results
to aperiodic signals. This approach, considered in Sec. 1.8 of Ch. 1 for CT signals, is intuitive and
provides a physical appreciation of the spectral representation. Although we could follow the same
intuitive treatment to develop the DTFT, we shall avoid this redundancy and instead take a direct
approach to derive the DTFT. Later, we show that the discrete-time Fourier series, which is used
to analyze periodic discrete-time signals, is a special case of the DTFT.
We dene X(), the discrete-time Fourier transform of x[n], as
X() =
x[n]ejn .
(6.1)
n=
This analysis equation of the DTFT identies the spectral components of x[n]. It provides a
frequency-domain description of x[n]. Since X() is constructed exclusively from 2-periodic functions ejn , it too is a 2-periodic function of . Often, X() is referred to as the spectrum of
x[n].
To nd the inverse relationship, or inverse DTFT, we change the dummy variable n to m in
331
332
Eq. (6.1), multiply both sides by ejn /2, and then integrate over the interval < as
1
1
1
X()ejn d =
x[m]ejm ejn d
2
2 m=
1
=
x[m]
ej(nm) d .
2
m=
Using the identity
1
2
X()ejn d =
x[m][n m].
m=
According to the sampling property of the impulse (Eq. (4.10)), the right-hand side is x[n], and we
obtain the desired inverse relationship we seek,
1
x[n] =
X()ejn d.
(6.2)
2
This synthesis equation of the DTFT represents a signal x[n] as a continuous sum (integral) of
complex exponentials, each of which is weighted by the signal spectrum X().
Equations (6.1) and (6.2) dene the DTFT pair. We call X() the (direct) discrete-time Fourier
transform (DTFT) of x[n]. Conversely, x[n] is the inverse discrete-time Fourier transform (IDTFT)
of X(). This can be represented as
X() = DTFT{x[n]} and x[n] = IDTFT{X()}
or, more compactly, as
x[n] X().
Physical Appreciation of the Discrete-Time Fourier Transform
The physical interpretation of X(), the DTFT of x[n], is very similar to that of X(), the
continuous-time Fourier transform of a signal x(t). Referring to Eq. (6.2) for the DTFT and
Eq. (1.74) for the CTFT, we see that the two synthesis equations are essentially identical, which
means that the spectra X() and X() serve equivalent roles.
In understanding any aspect of the Fourier transform, we should remember that the Fourier
representation is a way of expressing a signal x[n] as a sum of everlasting discrete-time exponentials
(or sinusoids). The Fourier spectrum of a signal indicates the relative magnitudes and phases of the
discrete-time exponentials (or sinusoids) required to synthesize x[n]. We can reinforce these ideas
by expressing Eq. (6.2) as
j(k)n
x[n] = lim
X(k)
e
0
2
= lim
k=
(X(k)F ) ej(k)n .
k=
To
prove this identity, let k = n m so that k = 0 when n = m and k is a nonzero integer when n = m. For
integer k, we thus have
1
1 jk
1
ejk
ejk d =
=
ejk = sinc(k) = [k].
e
2
j2k
j2k
The last step follows from the fact that sinc(k) =
sin k
= 1 when k = 0 (m = n).
k
sin(k)
k
333
Thus, the Fourier integral appearing on the right-hand side of Eq. (6.2) can be interpreted as a sum
of exponentials of the form ej(k)n . The amplitude of the exponential ej(k)n is X(k)F ,
and we sum all these discrete-time exponentials over the frequency band from to to synthesize
x[n]. We are basically expressing an arbitrary signal x[n] as a sum of its exponential (or sinusoidal)
components. Thus, the function X() found in Eq. (6.1) acts as a spectral function, which indicates
the relative amounts of the various exponential (or sinusoidal) components of x[n].
Determine the DTFT X() of a discrete-time rectangular pulse with odd length Lx ,
x[n] = u[n + (Lx 1)/2] u[n (Lx + 1)/2].
Sketch x[n] and X() for Lx = 9.
The pulse x[n], illustrated in Fig. 6.1a for Lx = 9, is an Lx -point rectangular window function.
Using Eq. (6.1),
X() =
x[n]e
jn
Lx 1
2
(ej )n .
n= Lx21
n=
This is a geometric progression with a common ratio ej , and according to entry 1 of Table 5.1,
X() =
=
Lx 1
2
Lx +1
ej 2
1 ej
L
Lx
x
ej/2 ej 2 ej 2
ej
(6.3)
Observe that X() is a 2-periodic function. Figure 6.1b shows the result for Lx = 9, X() =
sin(4.5)/ sin(0.5). As the plot of X() makes clear, x[n] is comprised primarily of relatively
low-frequency components.
x[n]
X()
8 4
(a)
(b)
Figure 6.1: (a) Length-9 rectangular pulse x[n] and (b) its DTFT X().
Example 6.1
Determine the IDTFT x[n] of the 2-periodic rectangular pulse train described over the funda
mental band || by X() = ( 2B
), where B . Sketch X() and x[n] for B = /4.
334
Using B = /4, the pulse train X() is illustrated in Fig. 6.2a. Notice that the width of each
pulse is 2B. Further, using Eq. (6.2), the IDTFT is
1
x[n] =
X()ejn d
2
B
1
ejn d
=
2 B
B
1 jn
=
e
j2n
B
sin(Bn)
n
Bn
B
= sinc
.
(6.4)
Figure 6.2b depicts the signal x[n] for the case B = /4.
X()
x[n]
0.25
16
16
n
(a)
(b)
Figure 6.2: (a) Width /2 rectangular pulse train X() and (b) its IDTFT x[n].
Example 6.2
(6.5)
In Eq. (6.5), the quantities |X()| and X() are both real functions of and represent the
magnitude spectrum and the phase spectrum, respectively.
As in the continuous-time case, a real signal x[n] has a conjugate symmetric spectrum; that is,
X() = X (). This can be readily proved from Eq. (6.1). Thus, for real x[n],
|X()|ejX() = |X()|ejX() ,
X()
X ()
(6.6)
In other words, a real signal x[n] has an even magnitude spectrum |X()| and an odd phase spectrum
X(). The Fourier transform and the Fourier series both exhibit these exact same symmetries.
335
|x[n]| < .
(6.7)
n=
The absolute summability of x[n] is a sucient, although not necessary, condition for the existence
of the DTFT representation. This condition also guarantees uniform convergence.
Much like the CTFT, the DTFT exists for a broader class of signals beyond those that are absolutely summable. This is fortunate since a number of useful DT signals do not satisfy Eq. (6.7), such
as sinc functions and sinusoids. In such cases, however, the DTFT may exist in only a generalized
sense or with weaker-than-uniform convergence. A signal with nite energy, for example, has
Ex =
0
|x[n]|
2
n=
12
|x[n]|
< .
(6.8)
n=
Clearly, nite energy is a weaker condition than absolute summability. In other words, not all niteenergy signals are absolutely summable. Still, one can show that the DTFT of nite-energy signals
is guaranteed to exist, although it converges in the mean rather than uniformly. For example, the
sinc function x[n] = sinc[n] is not absolutely summable, thus violating Eq. (6.7), but it has nite
energy, thus satisfying Eq. (6.8). Consequently, the DTFT of sinc[n] exists, although it converges in
the mean and not uniformly.
If generalized functions such as () are permitted, then we can even nd the DTFT of some
signals that violate both Eq. (6.7) and Eq. (6.8). Bounded-amplitude power signals, for example,
are neither nite energy nor absolutely summable, yet they have DTFTs, at least in a generalized
sense. To provide two examples, the DTFT of x[n] = 1 is X() = 2() over the fundamental
band || , and the DTFT of ej0 n is 2( 0 ) over the same band (see Ex. 6.5).
Despite our best hopes and eorts, however, some signals remain forever intransigent and refuse
to be characterized by the DTFT. For example, an exponentially growing signal n u[n], where
|| > 1, violates both Eq. (6.7) and Eq. (6.8) and does not have a DTFT, even in a generalized
sense. That the DTFT does not exist for such signals simply indicates that it takes more than a
sum of sinusoids to represent the signal. To analyze such signals requires a more powerful transform,
such as the z-transform discussed in the next chapter.
Determine the magnitude and phase spectra of the causal exponential x[n] = n u[n].
From Eq. (6.1), we see that
X() =
n=0
Convergence
n ejn =
(ej )n .
n=0
lim
A note of caution: the continuous-time () (a generalized function) should not be confused with the discrete-time
[] (an ordinary function). The former has a unit area concentrated at one point, the origin, whereas the latter has
a unit value at the origin.
336
This is an innite geometric series with a common ratio ej . As long as |ej | = || < 1, the
sum converges to (see Table 5.1)
X() =
1
1
.
=
1 ej
1 cos() + j sin()
1 + 2 2 cos()
sin()
1 cos()
15
10
10
15
(a)
5
|X()|
X()
0.927
(c)
(b)
Figure 6.3: Causal exponential and its spectra: (a) x[n] = (0.8)n u[n], (b) |X()|, and (c) X().
Example 6.3
Determine the magnitude and phase spectra of the anti-causal exponential y[n] = n u[n 1].
1
, is really just
The anti-causal exponential y[n] = n u[n 1], shown in Fig. 6.4 for = 0.8
n
a left-sided version of the causal exponential x[n] = u[n], shown in Fig. 6.3a for = 0.8. Given
the strong resemblance between these two signals, we expect to nd similarity in their spectra as
well.
From Eq. (6.1), we see that
Y () =
1
n=
n ejn =
(ej )n .
n=
This is an innite geometric series with a common ratio ej , just like in Ex. 6.3. Unlike Ex. 6.3,
however, which had sum limits from 0 to , this sum has limits of to 1. Only when |ej | =
15
10
337
y[n]
10
15
01
1
.
=
1 ej
1 cos() + j sin()
1
1 + 2 2 cos()
and Y () = tan1
sin()
1 cos()
By direct calculation, determine the DTFT of the two-sided exponential x[n] = |n| . Using = 0.8, sketch
the resulting spectrum X().
6.1.1
We now discuss several important features of the discrete-time Fourier transform and the spectra
associated with it.
Fourier Spectra are Continuous Functions of
Those who are visiting for the rst time the brave new world of discrete-time often think that
everything here must be discrete. This is not true. Although x[n] is a discrete-time signal, its
DTFT X() is a continuous function of for the simple reason that is a continuous variable,
which can take any value over a continuous interval from to .
Fourier Spectra are 2-Periodic Functions of
We have observed earlier that a DTFT X() is a periodic spectrum with period 2. We now show
this formally. From Eq. (6.1), it follows that
X( + 2) =
n=
x[n]ej(+2)n =
n=
x[n]ejn ej2n
= X().
1
338
Clearly, the spectrum X() is a continuous and periodic function of with period 2. Nothing can
deprive the DTFT of its 2-periodicity, a feature that is built into the very denition of the DTFT.
How do we explain this intuitively? Recall from Ch. 4 that discrete-time frequency is bandlimited to
frequencies in the range < (fundamental band). Indeed, this is the reason that Eq. (6.2)
synthesizes x[n] by integrating only over the fundamental band. Frequencies outside this band can
be viewed merely as the frequencies in the fundamental band called by other names. The same
frequency repeats at an interval of 2. Hence, the spectrum must repeat periodically with period
2. Because discrete-time signals are, in a real sense, bandlimited to the fundamental range, it is not
necessary to represent or display signal spectra beyond the fundamental range, although we often
do so.
Generalized Limits of Integration for the DTFT Synthesis Equation
We know the spectrum X() is 2-periodic. Moreover, ejn is also 2-periodic because ejn =
ej(+2)n . Hence, the integrand X()ejn of the DTFT synthesis equation (Eq. (6.2)) is also 2periodic. Now, the area under a periodic function over one period is always the same no matter
where we start integrating. In other words, the integral on the right-hand side of Eq. (6.2) over the
range q < q + 2 is the same regardless of the value of q. Thus, Eq. (6.2) can be generalized as
1
X()ejn d,
(6.9)
x[n] =
2 2
where the symbol 2 indicates integral over a range of 2 starting at any value. We may use a
range 0 to 2, to 3, or any other interval that is 2 in width.
6.1.2
We have already noted the similarity of the CTFT and DTFT synthesis equations, and we now
make an observation that allows us to derive a DTFT pair from a CTFT pair. A comparison of
Eq. (6.2) with Eq. (1.74) shows that the two Fourier integrals are identical when the CTFT X() is
bandlimited, either naturally or following frequency scaling, to || . Thus, when x(t) X(),
where X() is bandlimited to || , the same pair is also a DTFT pair if we substitute n for
t in x(t) and for in X(). This gives the DTFT in the fundamental band || . To nd
the DTFT for all , we repeat this spectrum periodically with period 2. The following example
claries this idea.
For each of the following signals, determine the DTFT from the CTFT.
Bn
(a) x[n] = B
(b) x[n] = 1
sinc
(c) x[n] = ej0 n
(d) x[n] = cos(0 n)
(a) We examine the CTFT Table 1.1 to see if any pair has a bandlimited X() with the corresponding x(t) in the form of sinc(Bt/). Fortunately, pair 8 makes our day. This pair is given
by
Bt
B
sinc
.
2B
The CTFT in this pair is bandlimited to || B. If we choose 0 < B , then X() is bandlimited
to || . Now, x[n] is obtained by letting t = n in x(t) and = in X(). Hence, for 0 < B ,
we have the DTFT pair in the fundamental band as
Bn
B
sinc
,
|| .
2B
339
To nd the DTFT for all , we repeat the spectrum periodically with period 2 to obtain
Bn
B
2k
sinc
,
0 < B .
2B
k=
|| .
This describes X() in the fundamental band only. The DTFT over all is given by
1 2
( 2k).
(6.10)
k=
(c) Pair 16 from CTFT Table 1.1 shows that x(t) = ej0 t has a spectrum X() that is bandlimited
to if 0 . This pair is given by
ej0 t 2 ( 0 ).
We obtain the desired pair by letting t = n in x(t) and = in X(). As long as |0 | < , this
results in the DTFT pair
|| .
ej0 n 2 ( 0 ),
This describes X() in the fundamental band only. Over the entire range of , the DTFT pair is
given by
ej0 n 2
( 0 2k).
(6.11)
k=
(d) Pair 17 from CTFT Table 1.1 shows that x(t) = cos(0 t) has a spectrum X() that is bandlimited to if |0 | . This pair is given by
cos(0 t) [( 0 ) + ( + 0 )].
We obtain the desired pair by letting t = n in x(t) and = in X(). Assuming |0 | < , this
results in
|| .
cos(0 n) [( 0 ) + ( + 0 )],
This describes X() in the fundamental band only. The DTFT over all is given by
cos(0 n)
( 0 2k) + ( + 0 2k).
k=
Example 6.5
Verify the DTFT pair of Eq. (6.10) by taking the inverse DTFT of X() to obtain x[n]. In the same way,
verify the DTFT pair of Eq. (6.11).
340
Show that
cos(0 n + )
( 0 2k)ej + ( + 0 2k)ej .
k=
6.1.3
Table 6.1 gives a selection of commonly encountered DTFT pairs. As its nature requires, each DTFT
in this table is 2-periodic. The DTFTs in pairs 17 have periodicity built into the expression X().
The remaining pairs, however, require periodic replication in the form of an innite sum to achieve
periodicity. These innite sums make the DTFTs appear dreadfully complex compared with the
gentle CTFTs of Table 1.1. Such complexity diminishes the intuitive nature of the spectra. Further,
it is inconvenient to deal with such unwieldy expressions. How many of us would be enthused about
convolving two periodic spectra?
1.
2.
3.
4.
5.
x[n]
X()
[n k]
ejk
Integer k
|| < 1
e
ej
n u[n]
n u[n 1]
|| > 1
e
ej
2
|n|
|| < 1
1
12 cos()+ 2
j
|| < 1
e
(ej )2
n n u[n]
[e cos()|| cos(0 )]
ej2 2|| cos(0 )ej +||2
6.
7.
u[n] u[n Lx ]
Bn
B
sinc
2 Bn
B
2 sinc
2
k=
2B
2 k= (2k)
8.
9.
|| < 1
10.
11.
u[n]
12.
ej0 n
13.
cos(0 n)
14.
sin(0 n)
ej
k= (2k)
ej 1 +
2 k= (0 2k)
k= (0 2k) + (+0 2k)
k= (0 2k) (+0 2k)
j
15.
cos(0 n) u[n]
ej2 ej cos(0 )
ej2 2 cos(0 )ej +1
16.
sin(0 n) u[n]
ej sin(0 )
ej2 2 cos(0 )ej +1
2j
k=
k=
341
1.
2.
3.
4.
5.
x[n]
[n k]
ejk
Integer k
|| < 1
e
ej
n u[n]
n u[n 1]
|| > 1
e
ej
2
|n|
n n u[n]
[e cos()|| cos(0 )]
ej2 2|| cos(0 )ej +||2
7.
u[n] u[n Lx ]
Bn
B
sinc
2 Bn
B
2 sinc
2
sin(Lx /2)
sin(/2)
2B
2B
10.
2()
11.
u[n]
ej
ej 1
9.
|| < 1
ej(Lx 1)/2
0<B
0<B
+ ()
2(0 )
|0 | <
cos(0 n)
[(0 ) + (+0 )]
|0 | <
sin(0 n)
[(0) (+0 )]
|0 | <
12.
13.
14.
|| < 1
e
(ej )2
6.
8.
|| < 1
1
12 cos()+ 2
j0 n
j2
15.
cos(0 n) u[n]
e
e cos(0 )
ej2 2 cos(0 )ej +1
16.
sin(0 n) u[n]
ej sin(0 )
ej2 2 cos(0 )ej +1
2j
[(0 ) + (+0 )]
|0 | <
[(0 ) (+0 )]
|0 | <
342
the overlapping portions of the spectrum. This procedure is quite straightforward and avoids the
operation under question being carried out using clumsy periodic expressions. Alternatively, we can
fold the spilled spectrum back at to take care of aliasing. This frequency folding procedure,
however, may not be so convenient in the case of complex spectra. We shall explain both these
procedures and the benets of using fundamental-band expressions by several examples in the next
section.
DTFT of Finite-Duration Signals
Consider a nite-duration signal x[n] that begins at time n = n1 and ends at time n = n2 . In this
case, the DTFT is determined through a nite sum
n2
X() =
x[n]ejn .
(6.12)
n=n1
As the next example shows, this form is particularly advantageous for computer-based computation
of the DTFT.
The resulting magnitude and phase spectra are shown in Figs. 6.5a and 6.5b, respectively.
|X()|
X()
10
(a)
2
(b)
n2
x[n]ej(n2 n)
ejn2 n=n
1
j(n2 n1 )
= x[n1 ]e
+ + x[n2 1]ej + x[n2 ] /ejn2 .
X() =
Here, the DTFT is computed using a weighted sum of descending powers of ej , which is exactly
the form required of the polyval command.
Example 6.6
6.2
343
Just as in the case of the CTFT, DTFT properties provide many useful insights and simplify the
analysis of discrete-time signals and systems. We have already seen a close connection between the
CTFT and the DTFT, a connection that is explored in greater depth in Sec. 6.4. For this reason, the
properties of the DTFT are very similar to those for the CTFT, as the following discussion shows.
6.2.1
Duality
The DTFT does not possess a formal duality property like Eq. (1.80) for the CTFT. The reason
is easy to explain: the roles of x[n] and X() cannot be interchanged since one is a function of a
discrete variable and the other is a function of a continuous variable. Still, the essence of duality is
often found in the DTFT. For example, time shifting a DT signal x[n] results in multiplying X()
by a complex exponential. The dual is also true, that shifting X() causes multiplication of x[n] by
a complex exponential. We shall see other examples, such as a multiplication-convolution duality,
as we proceed through the DTFT properties.
6.2.2
Linearity Property
(6.13)
The proof is trivial, and this result can be extended to any nite sum.
6.2.3
Complex-Conjugation Property
DTFT{x [n]} =
n=
x [n]e
jn
1
x[n]e
jn
= X ().
n=
(6.14)
Like the CTFT case, several interesting observations arise from the complex-conjugation property:
1. If x[n] is real, then X() is conjugate symmetric. That is, if x[n] = x [n], then X() =
X (), which also ensures that |X()| is even and X() is odd.
2. If x[n] is imaginary, then X() is conjugate antisymmetric. That is, if x[n] = x [n], then
X() = X (), which also ensures that |X()| is odd and X() is even.
3. If y[n] is the real part of some signal x[n], then its transform Y () is the conjugate-symmetric
portion of X(). That is, if y[n] = Re {x[n]} = 12 x[n] + 12 x [n], then Y () = Xcs () =
1
1
2 X() + 2 X ().
4. If y[n] is the imaginary part of some signal x[n], then its transform Y () is 1/j times the
1
1
x[n] 2j
x [n],
conjugate-antisymmetric portion of X(). That is, if y[n] = Im {x[n]} = 2j
1
1
1
344
6.2.4
Unlike the CT case, it is a somewhat tricky business to time scale a DT signal. As we saw in Ch. 4,
the operations of upsampling and downsampling constitute forms of time scaling for DT signals,
although both are restricted to integer scale factors. Beyond these restrictions, upsampling and
downsampling can produce distinctly dierent results depending on the nature of the DT signal
and the details of any lters (interpolation or decimation) that are used. For example, although
downsampling always causes a loss of data samples, it does not always produce a loss or distortion
of information. To give another example, ideal interpolation lters produce dierent results than
practical interpolation lters. Given all these factors, it is just not possible to establish a simple timescaling property for DT signals. Later in Sec. 6.6, when we have developed a set of suitable tools,
we explore several important cases of digital resampling (time scaling) from a frequency-domain
perspective.
Despite the complexities of general scaling, a simple DTFT property does exist for the special
case of reversal. This property states that
if x[n] X(), then x[n] X () .
(6.15)
This equation serves as both the time-reversal property and the frequency-reversal property. As
with the complex-conjugation property, Eq. (6.15) leads to some interesting observations:
1. If x[n] is even, then X() is even. That is, if x[n] = x[n], then X() = X().
2. If x[n] is odd, then X() is odd. That is, if x[n] = x[n], then X() = X().
3. If y[n] is the even part of some signal x[n], then its transform Y () is the even portion of
X(). That is, if y[n] = xe [n] = 12 x[n] + 12 x[n], then Y () = Xe () = 12 X() + 12 X().
4. If y[n] is the odd part of some signal x[n], then its transform Y () is the odd portion of X().
That is, if y[n] = xo [n] = 12 x[n] 12 x[n], then Y () = Xo () = 12 X() 12 X().
In Table 6.1, derive pair 4 using pair 2 and the time-reversal property of Eq. (6.15).
Pair 2 of Table 6.1 states that
n u[n]
ej
,
ej
|| < 1.
ej
,
ej
|| < 1.
Moreover, summing n u[n] and n u[n] nearly yields |n| , except for an extra impulse at n = 0.
Hence,
|n| = n u[n] + n u[n] [n].
Invoking the linearity property and substituting the DTFT of each piece yield pair 4 of Table 6.1,
DTFT{ |n| } =
ej
1 2
ej
+
1
=
,
ej
ej
1 2 cos() + 2
|| < 1.
Example 6.7
345
In Table 6.2, derive pair 13 using pair 15 and the time-reversal property of Eq. (6.15).
6.2.5
Time-Shifting Property
(6.16)
To prove this property, we directly substitute x[n m] into Eq. (6.1) to obtain
x[n m]
x[nm]ejn =
n=
x[k]ej[k+m] = ejm
k=
k=
This result shows that delaying a signal by m samples does not change its magnitude spectrum. The
phase spectrum, however, is changed by m. This added phase is a linear function of with slope
m. We emphasize that the time-shifting property of Eq. (6.16) applies only for integer values of
m. Still, as we shall later see, the spectrum X()ejm has an intriguing and useful interpretation
for non-integer m as well.
A Physical Explanation of Linear Phase
Time delay in a signal causes a linear phase shift in its spectrum. The heuristic explanation of this
result is exactly parallel to that for continuous-time signals given in Sec. 1.9.5 (see Fig. 1.45 on
page 57).
n2
.
4
As shown in Fig. 6.6a, x[n] is a sinc function that is right shifted by 2 units from the origin. Thus,
its spectrum should only dier from the non-shifted sinc by an additional linear phase component
of 2.
To determine the DTFT X(), we substitute B = /4 into pair 8 of Table 6.1 to obtain
n
2k
1
sinc
.
4
4
/2
k=
n2
2k
1
sinc
ej2 .
4
4
/2
(6.17)
k=
The resulting magnitude and phase spectra are shown in Figs. 6.6b and 6.6c, respectively. Compared
with the spectrum of the unshifted sinc (Fig. 6.2), the only dierence is an added phase component
of 2.
To demonstrate an alternate technique, we now solve the problem in the fundamental band and
periodically repeat the results to satisfy the mathematical requirement that discrete-time signals
have periodic spectra. To begin, we substitute B = /4 into pair 8 of Table 6.2 to obtain
n
1
sinc
,
|| .
4
4
/2
346
x[n]
0.25
12
(a)
|X()|
X()
1
4
(c)
(b)
Figure 6.6: The eects of time shifting: (a) x[n], (b) |X()|, and (c) X().
Applying the time-shifting property of Eq. (6.16) with a shift of m = 2 yields
n2
1
sinc
|| .
ej2 ,
4
4
/2
Repeating the spectrum periodically with period 2 yields
1
n2
2k
sinc
ej2(2k) .
4
4
/2
k=
This result is identical to Eq. (6.17) because ej2k = 1 for all integer values of k. Hence, the term
representing the phase in the nal result is equal to ej2 .
Example 6.8
Use pair 7 of Table 6.1 and the time-shifting property to verify the result in Eq. (6.3).
Frequency-Shifting Property
The frequency-shifting property states that
if x[n] X(), then x[n]ej0 n X( 0 ).
This property is the dual of the time-shifting property, and it follows directly from Eq. (6.1):
x[n]ej0 n
n=
x[n]ej0 n ejn =
x[n]ej(0 )n = X( 0 ).
n=
(6.18)
347
1
X( 0 ) + X( + 0 ) .
2
(6.19)
This is the modulation property. Under normal use, modulation is used to spectrally shift a signal.
Note that if the bandwidth of X() is B, then the bandwidth of the modulated signal x[n] cos(0 n)
is not necessarily 2B because of the possibility of aliasing, as illustrated in upcoming Ex. 6.9.
Multiplying both sides of Eq. (6.18) by ej , we obtain
x[n]ej(0 n+) X( 0 )ej .
Using this pair, we can generalize the modulation property as
x[n] cos(0 n + )
1
X( 0 )ej + X( + 0 )ej .
2
(6.20)
A signal x[n] = sinc(n/4) modulates a carrier cos(0 n). Using the periodic expression for X()
from Table 6.1, nd and sketch the spectrum of the modulated signal x[n] cos(0 n) for
(a) 0 =
(b)
0 = 0.85
(a) For x[n] = sinc(n/4), we nd its DTFT X() from pair 8 of Table 6.1 as
X() = 4
k=
2k
.
0.5
Figure 6.7a depicts X(). From the modulation property of Eq. (6.19), we obtain
x[n] cos(n/2) 2
k=
/2 2k
+ /2 2k
+
.
0.5
0.5
Figure 6.7b shows X() shifted by /2, and Fig. 6.7c shows X() shifted by /2. The spectrum
of the modulated signal is obtained by adding these two shifted spectra and multiplying by half, as
shown in Fig. 6.7d. In this case, the bandwidth of x[n] cos(n/2) is twice that of x[n], no aliasing
occurs, and the original shape of X() remains intact. The modulation operation achieves the desired goal of spectral shifting without distortion of the underlying signal. Hence, we can reconstruct
the signal x[n] from the modulated signal x[n] cos(n/2).
(b) Figure 6.8a shows X(), which is the same as that in Fig. 6.7a. For 0 = 0.85, the modulation
property of Eq. (6.19) yields
x[n] cos(0.85n) 2
k=
0.85 2k
+ 0.85 2k
+
.
0.5
0.5
Figures 6.8b and 6.8c show X() shifted by 0.85. The spectrum of the modulated signal is
obtained by adding these two shifted (and overlapping) spectra and multiplying by half, as shown
in Fig. 6.8d.
In this case, shifting by 0.85 causes the original baseband spectrum to spill outside the fundamental band, and aliasing occurs. The original shape of X() does not remain intact, and it is
not possible to reconstruct the signal x[n] from the modulated signal x[n] cos(0.85n). Because of
348
X()
4
(a)
4
2 7
4
5
4
X( /2)
3
4
(b)
X( + /2)
4
3
4
4
2
3
5
4
4
5
4
(c)
2 7
4
7
4
3
4
(d)
5
4
7
4
(a)
4
14
10
9
10
X( 0.85)
(b)
6
10
11
10
X( + 0.85)
4
11
10
6
10
14
10
6
10
9
10
(c)
4
2
14
10
(d)
6
10
9
10
11
10
14
10
aliasing, the modulation operation does not achieve the desired purpose of spectra shifting, and the
0.4 bandwidth of x[n] cos(0.85n) is less than twice the /4 bandwidth of x[n]. In this example,
349
Solve Ex. 6.9 in the fundamental band by using the expression for X() from Table 6.2 and then
applying a 2-periodic extension of the nal spectra.
(a) For x[n] = sinc(n/4), we nd its DTFT X() from pair 8 of Table 6.2 as
X() = 4
,
0.5
|| .
Figure 6.9a shows X() over the fundamental band. From the modulation property of Eq. (6.19),
we obtain
!
/2
+ /2
x[n] cos(n/2) 2
+
,
|| .
0.5
0.5
Here, the spectrum 0.5X() is shifted by /2, as shown in Fig. 6.9b. Observe that these shifted
components are still in the fundamental band. To represent the spectrum valid for all , we periodically repeat this spectrum with period 2, the result of which is identical to that in Fig. 6.7d.
X()
4
(a)
4
3
4
6
10
6
10
(c)
4
2
3
4
(b)
4
11
10
6
10
11
10
(d)
6
10
|| .
350
The spectrum 0.5X() is now shifted by 0.85, as shown in Fig. 6.9c. As shown with dark shading,
observe that this spectrum spills outside the fundamental band , indicating aliasing. How do we
handle this situation, knowing that spectrum outside the fundamental band is not permitted? Two
approaches are common: we can repeat the spectrum in Fig. 6.9c periodically with period 2, adding
the spectra where they overlap, or we can fold any spilled spectrum back inside the fundamental
band. In this case, the spectrum is real, and it is easiest to fold the spilled spectrum (dark gray)
back into the fundamental band, as shown in Fig. 6.9d. To obtain the spectrum valid for all , we
just repeat the spectrum in Fig. 6.9d with period 2, the result of which is identical to Fig. 6.8d.
We obtain the same result if we repeat the spectrum in Fig. 6.9c periodically with period 2 and
add the spectra where they overlap.
This example illustrates the simplicity of dealing with spectra in the fundamental band rather
than using the expressions for the entire range of . The fundamental band can oer a more intuitive
approach to problems. Diculties occur only when an operation leads to aliasing. In such cases,
we can still operate in the fundamental band by using periodic replication or frequency folding. Although the folding approach is relatively easy to visualize and perform graphically, especially when
the spectra are real, it may not be simple or appropriate for complex spectra or spectra that lack
conjugate symmetry. In such cases, we can always apply the standard approach of repeating the
spectrum periodically and adding the overlapping portions.
Example 6.10
In Table 6.1, derive pairs 12 and 13 using pair 10 and the frequency-shifting property.
6.2.6
Frequency-Dierentiation Property
Since x[n] is a discrete-time signal, there are no time-domain integration or dierentiation properties
for the DTFT. However, since X() is a function of the continuous variable , there is a frequencydierentiation property that states
if x[n] X(), then jnx[n]
dX()
.
d
(6.21)
This property follows immediately by dierentiating both sides of Eq. (6.1) with respect to .
In Table 6.1, derive pair 5 using pair 2 and the frequency-dierentiation property of Eq. (6.21).
Pair 2 states that
n u[n]
ej
,
ej
|| < 1.
d
d
ej
j
e
=
ej
,
)2
(ej
|| < 1.
6.2.7
351
x[n] y[n] =
(6.22)
m=
Using this property, a simple frequency-domain multiplication replaces the cumbersome time-domain
convolution operation. This elegant result forms the basis for the frequency-domain analysis of LTID
systems.
The dual of the time-domain convolution property is the frequency-domain convolution property,
which states that
1
1
X()Y
() =
x[n]y[n]
X()Y ( ) d.
(6.23)
2
2 2
Recall from Ch. 1 (page 68) that the symbol
denotes circular (or periodic) convolution. Circular
convolution is more sensible than linear convolution in Eq. (6.23) since both X() and Y () are
2-periodic functions.
Both convolution properties are readily proven. To prove the frequency-domain convolution
property, for instance, we observe that
!
1
x[n]y[n]ejn =
y[n]
X()ejn d ejn .
x[n]y[n]
2 2
n=
n=
Interchanging the order of summation and integration, we obtain Eq. (6.23) as
$
%
1
1
j()n
x[n]y[n]
X()
y[n]e
X()Y ( ) d.
d =
2 2
2 2
n=
x[k] X()
k=
ej
+
X(0)
( 2k).
ej 1
k=
x[k] =
m=
Hence, from the time-domain convolution property of Eq. (6.22) and pair 11 of Table 6.1, it follows
that
0
1
n
ej
+
x[k] = x[n] u[n] X()
( 2k) ,
|| .
ej 1
k=
k=
x[k] X()
ej
+
X(0)
( 2k).
ej 1
k=
352
Because of the simple nature of this example, we solved it directly using the periodic expression for
the DTFT of u[n] instead of the fundamental-band expression. The reader is encouraged to solve
the problem in the fundamental band and then use a 2-periodic extension of the result.
Example 6.12
(b)
<B
As usual, this example can be solved directly using the spectrum X() for the entire range of
, or it can be solved in the fundamental band and the result then extended periodically. We shall
use the latter approach and demonstrate the ease of solving this problem in the fundamental band.
From pair 8 of Table 6.2, we have, assuming B ,
Bn
B
sinc
,
|| .
2B
To nd the DTFT of x2 [n], we shall convolve (/2B) with itself, multiply by 1/2, and then
extend the result periodically.
X()
=
.
2B
We now convolve this spectrum with itself. Choosing the interval of integration from to , we
obtain
X(
) d.
X()
X() X() =
), as shown in
about the vertical axis, X()
= X().
Now shift X()
by to obtain X(
) is 2B + (linearly
Fig. 6.10b. For 2B < 0, the area under the product of X()
and X(
increasing with ), as shown in Fig. 6.10c. For 0 2B, the area is 2B (linearly decreasing
with ), as shown in Fig. 6.10d. Taken together, the resulting convolution is a triangle function
given as
= 2B
X()
X()
.
4B
(a) For 0 < B /2, the triangle function (/4B) is entirely within the fundamental band. There
is no aliasing to complicate the picture. As shown in Fig.6.10e, the desired spectrum is thus
B
X() X()
=
,
|| .
x2 [n]
2
4B
The spectral expression valid for all is obtained by 2-periodic extension of this result, as
y[n] = x2 [n] Y () =
2k
B
4B
k=
(b) Let us now consider the case where /2 < B . Procedurally, this case remains the same as
that in part (a). The only dierence is that because /2 < B , the convolved spectrum spills
outside the fundamental band, as shown in Fig. 6.10f. This spectral spill, which indicates aliasing,
353
requires repair. In this case, a simple repair is to fold the spilled spectrum about = , as indicated
in Fig. 6.10g, and then repeat the resulting spectrum periodically with period 2. Another method
is to apply a 2-periodic repetition of the spectrum in Fig. 6.10f (without folding) and add the
overlapping portions of the spectrum. This, of course, results in the same spectrum as in Fig. 6.10g.
X(
)
X()
1
(a)
(b)
X()
X(
) for 2B < 0
X()
X(
) for 0 2B
+B
+B
(c)
+B
(d)
Y () for 0 < B
2B
2B
(e)
2B
Y () for
2B
(f)
Y () for
2B 2
22B
(g)
354
fundamental-band spectrum is necessary. The periodic extension of the result automatically takes
care of any aliasing, if it exists. The caveats for complex signals are mentioned in the concluding
remarks of Ex. 6.10.
Width of Periodic Spectra
We know that all DT signals have periodic spectra. As a result of this periodicity, the widths of
these spectra are technically innite. More usefully, however, we can speak of the width of a DT
signals spectrum by restricting our attention to the fundamental band. With such a perspective
and assuming no aliasing, the width of the spectrum resulting from the (periodic) convolution of two
spectra is the sum of their individual widths, a property we have seen before with linear convolution
(both CT and DT). Should aliasing occur, however, this width property is no longer guaranteed to
hold. The reader may verify these behaviors for the cases in Ex. 6.13.
In Table 6.1, use the frequency-domain convolution property to derive pair 15 from pairs 11 and 13,
assuming |0 | < .
6.2.8
Quite similar to the correlation between CT functions presented in Sec. 1.9.8, the correlation between
DT functions x[] and y[] is dened as
x,y [l] =
(6.24)
n=
The correlation function of Eq. (6.24) provides a measure of similarity between two DT signals
as a function of the time lag l between them. When the signals x[n] and y[n] are distinct from
one another, x,y [l] is termed the cross-correlation function between x[n] and y[n]. If y[n] = x[n],
then the correlation function x,x [l] is termed the autocorrelation function. The correlation function
x,y [l] is easily expressed in terms of DT convolution as
x,y [l] = x[l] y [l].
(6.25)
Applying the complex-conjugation, time-reversal, and time-domain convolution properties yields the
correlation property
x,y [l] = x[l] y [l] X()Y ().
(6.26)
As in the CT case, we stress that correlation order is important. That is, x,y [l] does not generally
equal y,x [l].
A Frequency-Domain Representation of Signal Energy
Setting x[n] = y[n] and l = 0 in Eq. (6.24) yields signal energy
x,x [0] =
n=
x[n]x [n] =
|x[n]|2 = Ex .
n=
Since x,x [l] has DTFT X()X (), it can be synthesized using Eq. (6.2) as
1
1
X()X ()ejl d =
|X()|2 ejl d.
x,x [l] =
2 2
2 2
(6.27)
355
1
Ex =
|x[n]| =
2
n=
|X()|2 d.
(6.28)
Equation (6.28) is Parsevals theorem for the discrete-time Fourier transform, and it shows that
|X()|2 serves as the energy spectral density of x[n].
sinc
,
|| .
B
2B
From Parsevals theorem in Eq. (6.28), we have
Ex =
1
2
!2
2
d.
B2
2B
Recognizing that (/2B) = 1 over || B and is 0 otherwise, the preceding integral yields
2
Ex =
(2B) = .
2 B 2
B
Example 6.14
Table 6.3 summarizes the discrete-time Fourier transform properties just discussed and provides
a side-by-side comparison with the corresponding properties of the Fourier transform. In most cases,
the properties of the DTFT and the FT are nearly identical.
6.3
From Ch. 4, we know that the (zero-state) output y[n] of a linear, time-invariant, discrete-time
(LTID) system is the convolution of its impulse response h[n] and the input x[n],
y[n] = x[n] h[n].
Here, convolution provides a time-domain characterization of a systems input-output behavior.
Letting x[n] X(), y[n] Y (), and h[n] H(), it follows from the convolution
property of Eq. (6.22) that
Y () = X()H().
(6.29)
Similar to continuous-time systems, this frequency-domain characterization of a systems inputoutput behavior is often preferred to the time-domain characterization since it replaces convolution
with multiplication. Figure 6.11 summarizes these input-output relationships and emphasizes that,
in most cases, H() serves every bit as well as h[n] to characterize LTID system behavior.
For Eq. (6.29) to hold, y[n], x[n], and h[n] must be (discrete-time) Fourier transformable, which is
to say that Y (), X(), and H() must all exist. Thus, Eq. (6.29) does not apply to (asymptotically)
unstable systems, but it does apply to BIBO stable and, with one exception, marginally stable
systems. For marginally stable systems, if the input x[n] contains a nite-amplitude sinusoid of the
356
Fourier Transform
Synthesis:
1
jn
d
2 2 X()e
X() =
x(t) =
Analysis:
jn
n= x[n]e
Synthesis:
jt
d
X()e
1
2
Analysis:
X() = x(t)ejt dt
Duality:
Duality:
if x(t) X(), then X(t) 2x()
Linearity:
ax[n] + by[n] aX() + bY ()
Linearity:
ax(t) + by(t) aX() + bY ()
Complex Conjugation:
x [n] X ()
Complex Conjugation:
x (t) X ()
Shifting:
x[n m] X()ejm
x[n]ej0 n X( 0 )
Shifting:
x(t t0 ) X()ejt0
x(t)ej0 t X( 0 )
Dierentiation:
Dierentiation:
jX()
d
jtx(t) d
X()
jnx[n]
d
dt x(t)
d
d X()
Time Integration:
Time Integration:
x(
)d X()
j + X(0)()
Convolution:
x[n] y[n] X()Y ()
1
x[n]y[n] 2
X()Y
()
Convolution:
x(t) y(t) X()Y ()
1
x(t)y(t) 2
X() Y ()
Correlation:
x,y [l] = x[l] y [l] X()Y ()
Correlation:
x,y ( ) = x( ) y ( ) X()Y ()
Ex =
Parsevals:
1
2
|x[n]|
= 2
|X()|2 d
n=
2
Ex =
Parsevals:
1
2
|x(t)|
dt = 2
|X()|2 d
h[n]
H()
357
that the output signal frequency spectrum is the product of the input signal frequency spectrum
and the frequency response of the system. Alternatively, this equation is expressed as
|Y ()| = |X()| |H()| and Y () = X() + H().
(6.30)
Here, |H()| is called the magnitude response and H() is the phase response of the system.
Equation (6.30) shows that the output magnitude spectrum is the product of the input magnitude
spectrum and the magnitude response of the system. The output phase spectrum is the sum of the
input phase spectrum and the phase response of the system.
The multiplicative nature of the frequency-domain relationship of Eq. (6.29) conveys a ltering
perspective of system behavior. The spectrum X() represents the amplitudes and phases of various
exponential (sinusoidal) components of the input. When transmitted through an LTID system, each
component is individually scaled by the frequency response H() and then combined to produce
the output Y (). To better understand this concept, we see from Eq. (5.34) that an LTID system
response to an everlasting exponential ejn is H(ej )ejn , where H(ej ), as seen in Eq. (5.35), is
really the DTFT of h[n], that is, H(). Hence, the response of an LTID system to an everlasting
input ejn is represented using a directed arrow notation as
ejn = H()ejn .
(6.31)
Using the DTFT synthesis equation to generalize the input and then invoking the linearity property,
we obtain
1
1
x[n] =
X()ejn d =
X()H()ejn d = y[n].
2 2
2 2
In other words, the output y[n] is a scaled sum of the responses to all the component frequencies
of the input. Just as in Eq. (6.29), X() is the input spectrum, and Y () is the output spectrum,
given by X()H().
Y ()
1
ej
=
.
=
X()
1 0.5ej
ej 0.5
(ej
ej
ej 0.8
(ej )2
1
=
.
0.8)(ej 0.5)
(1 0.8ej )(1 0.5ej )
To invert Y (), we rst use MATLAB to perform the needed partial fraction expansion. Either of
the MATLAB commands residue (for positive powers of ej ) or residuez (for negative powers of
ej ) will work, although the latter is more convenient for this case.
358
01
[r,p,k] = residuez(1,poly([0.8,0.5]))
r = 2.6667 -1.6667
p = 0.8000
0.5000
k = []
Thus,
5ej /3
5/3
8ej /3
8/3
+ j
.
(6.32)
+
= j
j
j
1 0.8e
1 0.5e
e 0.8 e 0.5
Of course, this partial fraction can also be computed manually. Using a modied partial fraction
expansion, we have
Y () =
Y ()
8/3
5/3
ej
= j
+
.
=
ej
(ej 0.8)(ej 0.5)
e 0.8 ej 0.5
Multiplying both sides by ej produces the result of Eq. (6.32). A complete treatment of partial
fraction expansions can be found in [1].
Using Table 6.1, the inverse DTFT of Eq. (6.32) is thus
!
8
5
n
n
y[n] =
(0.8) (0.5) u[n].
3
3
The analysis of LTID systems using the DTFT is similar to the analysis of LTIC systems using
the CTFT. As explained earlier, this method does not work for unstable systems or for marginally
stable systems where the input causes unbounded resonance. We shall not belabor this method
further because it is clumsier and more restrictive than the z-transform method discussed in Ch. 7.
Example 6.15
ak y[n k] =
k=0
bl x[n l].
(6.33)
l=0
Let the DTFTs of x[n] and y[n] be X() and Y (), respectively. From the time-shifting property,
we obtain x[n m] X()ejm and y[n k] Y ()ejk . Using these facts, we can take
the DTFT of the preceding dierence equation to obtain
K
ak Y ()ejk =
k=0
or
bl X()ejl
l=0
1
ak e
jk
k=0
0
Y () =
1
bl e
jl
X().
l=0
(6.34)
359
Determine the zero-state response y[n] to input x[n] = cos(3n/10) of an LTID system described
by the dierence equation
y[n] 1.2728y[n 1] + 0.81y[n 2] =
1
(x[n] + 2x[n 1] + 2x[n 2] + 2x[n 3] + x[n 4]) .
40
Since the input is a sinusoid of frequency = 3/10, the output is also a sinusoid of the same frequency, modied in gain and phase according to the frequency response H(). Following Eq. (6.34),
MATLAB readily computes the gain and phase.
01
02
03
For line 02 to properly compute H(), the coecient vectors A and B must be the same length,
which is why line 01 pads vector A with two zeros (see Prob. 6.3-19). Using these results, the system
output is thus
y[n] = 0.3598 cos(3n/10 + 2.8335).
Example 6.16
6.3.1
Distortionless Transmission
In several applications where digital signals are passed through LTID systems, we require that the
output waveform be a replica of the input waveform. As in the continuous-time case, transmission
is said to be distortionless if the input x[n] and the output y[n] satisfy the condition
y[n] = |a|x[n ng ].
(6.35)
Here, the delay ng (in samples) is assumed to be an integer, and the scale factor |a| is forced real
and positive for convenience. The discrete-time Fourier transform of Eq. (6.35) yields
Y () = |a|X()ejng .
Since Y () = X()H(), the frequency response of a distortionless system is therefore
H() = |a|ejng .
(6.36)
(6.37)
Thus, for distortionless transmission, the magnitude response |H()| must be constant, and the
phase response H() must be a linear function of with slope ng , as shown in Fig. 6.12. Similar
to the CT case, Eqs. (6.36) and (6.37) describe an ideal linear phase (ILP) frequency response.
Observe that an ideal delay of ng samples has ILP characteristics with gain |a| = 1 (see Eq. (6.16)).
If n is not an integer, the function H() = |a|ejng is not 2-periodic in and, therefore, is not a valid
g
frequency response for any DT system. It is possible, however, to dene H() = |a|ejng over the fundamental
band || < and then periodically replicate the result. When ng is not an integer, such a system can produce an
output that is quite dierent looking than the input, although the input and output spectra are basically equivalent.
Such a system seems distortionless in the frequency domain but not the time domain. Additional insights into this
case are provided by the Sec. 6.4 discussion of non-integer shifts.
360
|a|
|H()|
ng
H()
(a)
ng
(b)
Figure 6.12: Distortionless transmission: (a) magnitude response and (b) phase response.
Measure of Delay Variation
It is often thought (erroneously) that atness of magnitude response |H()| alone can guarantee
signal quality. However, a system may have a at magnitude response and yet distort a signal
beyond recognition if the phase response is not linear (ng not constant over the band of interest).
Example 2.4 on page 95 details one such example.
Thus, in addition to a constant magnitude response, distortionless transmission requires that the
system possess linear phase characteristics. In practice, many systems have phase characteristics
that are only approximately linear. A convenient way of judging phase linearity is to plot the
negative of the slope of H() as a function of frequency. This slope, which is a constant for an
ideal linear phase system but a function of in the general case, is expressed as
d
H().
(6.38)
d
Termed group delay or envelope delay, ng () plays an important role in bandpass signal transmission, as the following discussion shows.
ng () =
in the CT case, the envelope of xbp [n] is well dened only when B, the bandwidth of the envelope, is much
smaller than the carrier c .
361
H()
|a|
c B
c + B
c B
c + B
0
c B
c + B
0
0
(a)
c B
c + B
|H()|
(b)
Figure 6.13: Generalized linear phase characteristics for || : (a) |H()| and (b) H().
We shall now show that the transmission of xbp [n] through H() results in distortionless transmission of the envelope x[n] while the carrier phase changes by 0 relative to this envelope. To
simplify our discussion, we rst write xbp [n] as
xbp [n] = Re x[n]ejc n .
Since the system is real, Eq. (5.24) ensures that the output is given as
ybp [n] = Re H x[n]ejc n .
To nd ybp [n], we only need to determine H x[n]ejc n , the system response to x[n]ejc n . The
frequency-shifting property of Eq. (6.18) yields the DTFT of x[n]ejc n as X(c ), and the system
response to this input is H()X( c ). Because X( c ) is 0 for < < 0, we express this
result in the fundamental band using Eq. (6.39) as
H()X( c ) = |a|ej(0 ng ) X( c ).
Using both the time-shifting and frequency-shifting properties of Eqs. (6.16) and (6.18), the inverse
discrete-time Fourier transform yields
|a|ej0 X( c )ejng |a|ej0 x[n ng ]ejc (nng ) .
Taking the real portion, the bandpass output ybp (t) is thus
ybp [n] = |a|x[n ng ] cos [c (n ng ) + 0 ] .
(6.40)
Here, ng , the envelope (or group) delay, is the negative slope of H() at c . The output envelope
x[n ng ] is a delayed version of the input envelope x[n], and its shape is not aected by extra phase
0 of the carrier. Observe that the output y[n] is basically the input x[n] delayed by ng , except that
the output carrier acquires an extra phase 0 . Equation (6.40) is also expressed in alternate form as
ybp [n] = |a|x[n ng ] cos [c (n np )] ,
where np = H(c )/c is called the phase delay. In physical systems, the quantities ng , 0 , and
np are generally functions of .
A more general bandpass signal with spectrum centered at = can be represented as x [n] = x[n] cos( n +
c
c
bp
[n]), where x[n] is the envelope of the signal, and [n] is a time-varying phase. When this signal is passed through
the system in Eq. (6.39), the system output is given by (see Prob. 6.3-17) ybp [n] = |a|x[n ng ] cos(c (n ng ) + 0 +
[n ng ]).
362
A Caution
Recall that the phase response associated with the magnitude response may have jump discontinuities
when the frequency response changes sign. Jump discontinuities also arise because of the use of
principal value for phase. In computing the group delay (Eq. (6.38)), we generally ignore these jump
discontinuities.
6.3.2
Ideal DT lters allow distortionless transmission of a certain band of frequencies (passband) and
suppress all the remaining frequencies (stopband). Figure 6.14 displays the magnitude responses of
ideal lowpass, highpass, bandpass, and bandstop lters. At rst glace, these responses may seem
dierent from their CT counterparts of Fig. 2.14. These dierences arise from the 2-periodicity
that is implicit in all DT systems. However, when viewed over the fundamental band, which is the
only band that really matters, the DT responses of Fig. 6.14 look identical to the CT responses of
Fig. 2.14. As in the CT case, it is a simple matter to transform a lowpass DT lter to any of the
other three basic types. Thus, for the time being, we shall concentrate solely on lowpass lters. Most
of our subsequent discussions and observations about lowpass lters apply to highpass, bandpass,
and bandstop lters as well.
|Hlp ()|
(a)
|Hhp ()|
1
(b)
|Hbp ()|
1
(c)
1
|Hbs ()|
(d)
Figure 6.14: Ideal DT lter magnitude responses: (a) lowpass, (b) highpass, (c) bandpass, and (d)
bandstop.
In a perfect world, an ideal lter passes desired input frequencies without delay, which is to say
that the lter has a zero phase response. As discussed in Sec. 2.3, the causality requirement of realizable lters makes such expectations impractical. Some delay in the output is inevitable to achieve
acceptable response characteristics while also meeting the constraint of causality (realizability). The
linear phase characteristics of distortionless transmission provide a xed amount of delay over all
363
frequencies of interest, an acceptable compromise for most DT lter applications. Ideal DT lters
therefore permit linear phase, and although some delay is acquired, the output is still classied as
distortionless.
Figures 6.15a and 6.15b illustrate the magnitude and phase characteristics of an ideal lowpass
lter. The phase response is linear over the passband of interest and has a slope of ng , which
results in a delay of ng samples for all its input components of frequencies below 1 rad/sample.
Therefore, if the input is a signal x[n] bandlimited to 1 , then the output y[n] is x[n] delayed by
ng ; that is, if x[n] bandlimited to 1 , then y[n] = x[n ng ] .
Over the fundamental band, this lters frequency response can be expressed as (/21 ) ejng .
Hence, H() valid for all is
H() =
k=
2k
ejng .
21
The unit impulse response h[n] of this lter, obtained using pair 8 of Table 6.1 and the time-shifting
property, is
!
1 (n ng )
1
sinc
h[n] =
.
(6.41)
Figure 6.15c shows h[n] for 1 = /3 and ng = 12. By denition, the impulse response is the
output in response to [n], an input that begins (and ends) at n = 0. Because the sinc function
has innite duration, we see that regardless of how large the delay ng is, h[n] cannot be rendered
causal (realizable). Thus, despite the assistance of linear phase and the delay it provides, it is
not possible to realize an ideal lowpass frequency response. The same conclusion is true for ideal
highpass, bandpass, and bandstop lters as well.
|H()|
H()
1 n g
1
1
(a)
(b)
h[n]
1
ng
(c)
Figure 6.15: Ideal LPF (1 = /3 and ng = 12): (a) |H()|, (b) H(), and (c) h[n] .
To obtain a realizable lter, we must approximate the ideal impulse response h[n] with some
h[n] = h[n]
.
(6.42)
2n+
g
Since
We
kng is an integer, we write ej(2k)ng in the simpler and equivalent form of ejng .
use n+
g in Eq. (6.42) to ensure that () is 1 at n = 0 and 2ng rather than 0.5.
364
Removing the tails of h[n] renders it causal, but it also distorts the desired ideal frequency response.
To illustrate, let us apply Eq. (6.42) to the impulse response of Fig. 6.15c (1 = /3 and ng = 12).
MATLAB is next used to perform the necessary calculations.
01
02
03
04
05
06
H()
(Fig. 6.16c) remains linear. As the delay ng is increased, the frequency response H()
more
closely approximates the ideal. The price of accuracy is increased delay. Chapter 8 details this and
many other digital lter design methods.
h[n]
1
ng
2ng
(a)
1
|H()|
H()
1 n g
1
(b)
(c)
Using a delay of ng = 5 and a cuto frequency of 1 = 2/3, use Eqs. (6.41) and (6.42) to design a
6.4
Chapter 3 presents procedures to travel between the continuous-time and discrete-time worlds.
Sampling generates a discrete-time signal from a continuous-time signal (a CT-to-DT process),
and ideal interpolation (Eq. (3.13)) reconstructs a continuous-time signal from its sample values
(a DT-to-CT process). Such conversions between the continuous-time and discrete-time domains
can be extremely useful, even for purely digital systems that never once produce a continuous-time
signal. The connection between the CT and DT domains aids in the analysis of A/D and D/A
conversion and also in the digital processing of analog signals. It provides insights into the spectra
of downsampled, upsampled, and interpolated signals. It allows us to compute the Fourier transform
365
of continuous-time signals numerically using digital methods such as the DTFT and the ecient fast
Fourier transform (FFT). In addition, it allows us to interpret the meaning of a non-integer shift of
a DT signal. Let us now connect the DTFT and the CTFT to further explore these ideas.
Before proceeding, we rst address a possible source of confusion. Like many engineering texts,
we represent the CTFT of x(t) and the DTFT of x[n] both using the same notation X(). Normally,
the two utilize dierent variables and do not occur together, so there is no ambiguity in meaning. In
this section, however, the CTFT and the DTFT both occur in the same equations, and we cannot
rely on the argument variables to distinguish transform type. To help avoid confusion, in this section
we shall subscript all CTFT pairs with a c. Thus, X(T ) is a DTFT and Xc (/T ) is a CTFT,
despite that the former is written in terms of and the latter in terms of .
Consider a continuous-time signal xc (t) that has sample values x[n] spaced every T seconds. In
this way, the nth sample of xc (t) at t = nT is equal to x[n], or
xc (nT ) = x[n].
Figure 6.17a shows one such signal xc (t), and Fig. 6.17b shows its spectrum Xc (). For simplicity,
xc (t) is shown to be bandlimited with a bandwidth B /T rad/s (1/2T Hz).
xc (t)
Xc ()
Xc (0)
(a)
(b)
xc,(t)
Xc,()
Xc (0)
T
3T
5T
2
T
(c)
2
T
X()
Xc (0)
T
(d)
x[n]
BT
BT
(f)
(e)
x[n](t nT ).
xc,(t) =
n=
Because (t nT ) e
jnT
n=
x[n]ejnT .
366
In Sec. 3.1, we have shown that Xc,() is T1 Xc () repeating periodically with period s = 2/T ,
as illustrated in Fig. 6.17d. Notice that the right-hand side of the equation for Xc,() is just X(),
the DTFT of x[n], with replaced by T . Thus,
= Xc,(/T ).
(6.43)
Xc,() = X()|=T = X(T ) and X() = Xc,()
=/T
Equation (6.43) conrms the equivalence of impulse sampling and point sampling.
Within a
frequency scale factor of T , the CTFT of an impulse-sampled signal (Fig. 6.17d) is identical to
the DTFT of the signals point samples (Fig. 6.17f). Since equals T , = 2/T in Fig. 6.17d
corresponds to = 2 in Fig. 6.17f. Further noting that s = 2/T , we combine Eq. (6.43) with
Eq. (3.6) from Ch. 3 to obtain
2k
1
1
X(T ) =
Xc ( ks ) and X() =
Xc
.
(6.44)
T
T
T
k=
k=
This is the relationship that we seek. From Eq. (6.44), which connects the DTFT to the CTFT, we
see that the DTFT of a sequence x[n] equals a scaled periodic replication of the CTFT of any CT
signal xc (t) that has samples xc (nT ) = x[n]. Shown graphically, we see that the DTFT of Fig. 6.17f
is a scaled and periodic replication of the CTFT of Fig. 6.17b.
Using the CT signal xc (t) = sinc(t), sketch the corresponding sampled signal x[n] and its spectrum
X() using sampling intervals of (a) T = 1/2, (b) T = 1, and (c) T = 3/2.
From pair 8 of Table
1.1, we know that the spectrum of xc (t) = sinc(t) is the simple gate func, which has radian bandwidth B = rad/s. Both xc (t) and Xc () are shown
tion Xc () = 2
in Fig. 6.18.
Xc ()
xc (t)
1
367
in destructive aliasing.
(c) T = 3/2
As shown in Fig. 6.19c, a sampling interval of T = 3/2 produces a DT signal x[n] that is an undersampled version of xc (t). In this case, the sampling interval is so wide that important information
about xc (t) is lost. The spectrum X(), again found using Eq. (6.44), is comprised of overlapping replicates. This overlap (aliasing) distorts the spectrum X() and makes recovery of xc (t)
impossible.
X()
x[n]
1
(a)
9 n
X()
x[n]
1
(b)
X()
x[n]
1
(c)
4
3
3 n
Figure 6.19: Sampled signal x[n] and its spectrum X() for (a) T = 1/2, (b) T = 1, and (c) T = 3/2.
Example 6.17
It may seem impossibly strange that Eq. (6.44) holds for an innite number of signals xc (t). To
understand this apparent mystery, remember that xc (t) must satisfy xc (nT ) = x[n], which is to say
must match x[n]. Thus, although each
that although many choices of xc (t) exist, only their
samples
possible xc (t) has a unique CTFT Xc (), the sum k= Xc ( ks ) never changes; each spectral
copy in the periodic replication overlaps in a very special way so that the sum remains unchanged.
Of the innite choices for xc (t), the bandlimited interpolation of x[n] is arguably the most useful.
Let us see what makes this choice so special.
Bandlimited Interpolation of x[n]
The bandlimited interpolation of x[n] is constructed according to Eq. (3.13) as
xc (t) =
n=
x[n] sinc
t nT
T
(6.45)
368
As seen in Ch. 3, this construction results in a bandlimited signal with bandwidth no greater than
1/2T Hz or /T rad/s. For a given T , the signal xc (t), as dened in Eq. (6.45), is the smallest
bandwidth signal whose samples are x[n].
Equation (6.44) represents a 2-periodic repetition of the spectrum Xc (), as shown in Fig. 6.17f.
Now, if xc (t) is a bandlimited interpolation of x[n], it is bandlimited to || /T . Hence, Xc (/T )
is bandlimited to || (fundamental band), and the replications in Eq. (6.44) do not overlap.
Over the fundamental band, we therefore have
1
|| = |T | .
(6.46)
X() = Xc
and Xc () = T X(T ),
T
T
Equation (6.46) shows that when xc (t) is the bandlimited interpolation of x[n], then, in the fundamental band, the DTFT and CTFT are (within a scale factor) frequency-scaled versions of one
another. Because = T , frequencies and are related by a scaling factor T . Hence, the bandwidth of x[n] (in cycles/sample) is T times the bandwidth of xc (t) (in Hz). In fact, Eq. (6.46) is the
underlying basis of Sec. 6.1.2, where we nd the DTFT from the CTFT.
We shall now consider some applications of Eqs. (6.44) and (6.46).
|| < 50
.
otherwise
For T = 0.01, determine the DTFT X() of x[n] = xc (nT ). Discuss what happens if instead
T = 0.1.
For T = 0.01, the radian folding frequency is s /2 = /T = 100. Since the 50 bandwidth of
xc (t) is less than the 100 folding frequency,
no aliasing occurs, and we can write the DTFT X()
directly using Eq. (6.46) as X() = T1 Xc T . Thus, over the fundamental band ,
1
|| < /2
2 +1
X() =
.
0
otherwise
By changing T from 0.01 to 0.1, the radian folding frequency decreases tenfold to 10. Thus,
although xc (t) is bandlimited, it is not suciently bandlimited to prevent aliasing. To obtain the
X(), the DTFT of the now aliased signal, we must instead use Eq. (6.44), which, due to the multiple overlapping spectra, is substantially more complex.
Example 6.18
Non-Integer Shift
The shifting property of Eq. (6.16) is applicable, and meaningful, only for integer values of the shift
m because the sequence x[n] can be shifted only by an integer number of samples. What, then, is
the inverse DTFT of the fundamental band expression X()ejm when m is non-integer? This
question can be readily resolved by considering the continuous-time signal xc (t), which we take as
the bandlimited interpolation of x[n]. Let
Y () = X()ejm ,
To
|| .
xc (t)
(6.47)
xc (nT )
369
|T | .
Applying the time-shifting property of Eq. (1.87) for continuous-time signals, we have
yc (t) = xc (t mT ).
This shows that yc (t) is the signal xc (t) delayed by mT seconds. Therefore, y[n] can be interpreted
as samples of the delayed signal xc (t mT ). To illustrate graphically, Fig. 6.20a shows a DT
signal x[n] and its bandlimited interpolation xc (t). Using Eq. (6.47) and m = 1.5, Fig. 6.20b
shows the corresponding DT signal y[n], which is just samples of the bandlimited interpolation
yc (t) = xc (t 1.5T ).
x[n]
y[n]
xc (t)
yc (t)
(a)
(b)
(6.48)
where xc (t) and yc (t) are the bandlimited interpolations of x[n] and y[n], respectively.
Given a signal x[n] = [n] with spectrum X() = 1, determine y[n] if Y () = X()ejm for
|| . Here, m is any real number, not necessarily an integer.
Using the denition of the IDTFT (Eq. (6.2)), we have
1
y[n] =
X()ejm ejn d
2
1 ej(nm) ej(nm)
=
2
j(n m)
= sinc(n m).
The same result, however, can be obtained more simply. Using Eq. (6.45) to recognize that xc (t) =
sinc(t/T ) is the bandlimited interpolation of x[n] = [n], we know from Eq. (6.48) that
y[n] = xc (nT mT ) = sinc(n m).
370
In fact, this result demonstrates that a DT system H() = ejm for || has an impulse
response h[n] = sinc(n m).
Example 6.19
6.5
Many, if not most, books on discrete-time systems adopt a rather loose terminology so that analog
is taken to mean continuous-time and digital is taken to mean discrete-time. As explained
in Sec. 1.1, strictly speaking, they are not the same things. In practice, however, continuous-time
systems are most likely to be analog, and discrete-time systems are most likely to be digital. In
keeping with such conventions, we take digital processing of analog signals to mean the processing
of continuous-time signals using discrete-time systems.
Continuous-time signals can be processed by discrete-time systems as shown in Fig. 6.21a. This
system requires two interfaces: a continuous-to-discrete (C/D) converter and a discrete-to-continuous
(D/C) converter. The C/D converter samples a continuous-time (analog) input signal xc (t) to
convert it into a discrete-time (digital) signal x[n], which is applied to an LTI discrete-time system
with frequency response H(). The discrete-time output y[n] of H() is converted into a continuous c () in Fig. 6.21a is
time signal yc (t) by the D/C converter. In this manner, the overall system H
equivalent to (or closely approximates) the LTI continuous-time system Hc () shown in Fig. 6.21b.
The sampling rates in both the C/D and D/C converters in Fig. 6.21a are assumed to be identical,
although it is not necessary.
An Implicit Assumption: Bandlimited Signals Sampled above Nyquist
When an analog signal is processed through its samples, it is important to remember that the signal
must be bandlimited, and the sampling rate must be no less than the Nyquist rate. If these conditions
are not satised, then the samples do not convey the full information about the signal, and the system
in Fig. 6.21a cannot be equivalent to the LTIC system in Fig. 6.21b. Thus, unless otherwise stated,
There are exceptions. For example, if the signal processing requires suppression of the higher end of its spectrum,
we can tolerate distortion in this portion of the spectrum (which will be suppressed anyway). Hence, sub-Nyquist
sampling can be tolerated in such cases. See Ex. 6.22.
371
c ()
H
xc (t)
continuous
to discrete
x[n]
DT system
H()
y[n]
discrete to
continuous
yc (t)
(a)
xc (t)
CT system
Hc ()
yc (t)
(b)
6.5.1
A Mathematical Representation
We shall now characterize, in both the time and frequency domains, the input-output relationships
of the ideal C/D and D/C converters shown in Fig. 6.21a. These interfaces may also be referred to
as A/D and D/A converters, respectively, for the reasons explained earlier. Using these characterizations, we then develop a mathematical representation of the digital processing of analog signals
depicted in Fig. 6.21.
Time-Domain Characterization of Ideal C/D and D/C Converters
A C/D converter samples a bandlimited input xc (t) at intervals of T seconds. Its output is the
discrete-time signal x[n] whose nth sample value is identical to the nth sample of xc (t), that is,
x[n] = xc (nT ).
This is the time-domain characterization (relating output to input) of an ideal C/D converter.
The discrete-time signal x[n] acts as the input to the discrete-time lter H(). The output y[n]
of H() is then converted by a D/C converter to a continuous-time signal yc (t), which, using the
interpolation formula of Eq. (3.13), is given as
t nT
y[n] sinc
yc (t) =
.
T
n=
This is the time-domain characterization (relating output to input) of an ideal D/C converter. As
shown in Ch. 3, the D/C converter functions as an ideal lowpass lter, and its output yc (t) is the
bandlimited interpolation of y[n] (see Sec. 6.4).
Frequency-Domain Characterization of Ideal C/D and D/C Converters
Let the Fourier transform of xc (t) be Xc () and the DTFT of x[n] be X(). Because of our implicit
assumption (bandlimited signals sampled above Nyquist), xc (t) is the bandlimited interpolation of
x[n] = xc (nT ), and Eq. (6.46) yields
1
X() = Xc
,
|| .
(6.50)
T
T
372
This is the frequency-domain characterization (relating output to input) of an ideal C/D converter.
As for the D/C case, because yc (t) is the bandlimited interpolation of y[n], it follows that
y[n] = yc (nT ), and according to Eq. (6.46),
Yc () = T Y (T ),
|T | .
(6.51)
This is the frequency-domain characterization (relating output to input) of an ideal D/C converter.
c (), and H()
Relating Hc (), H
c (). Typically, our goal is for that
The system in Fig. 6.21a acts as a bandlimited analog system H
system to equal, as closely as possible, some CT system Hc (), as shown in Fig. 6.21b. That is, we
seek
c () Hc ().
H
c () is inherently bandlimited, we know this approximation cannot result in equality whenSince H
ever the desired CT system Hc () is non-bandlimited.
c () and H(). From Fig. 6.21a, we know that
We now relate the responses H
Y () = X()H().
Substituting Eq. (6.50) and setting = T , we obtain
Y (T ) =
1
Xc ()H(T ).
T
Xc ()H(T ) |T |
.
0
otherwise
c (). Hence,
Moreover, as seen from Fig. 6.21a, Yc () = Xc ()H
H(T ) |T |
Hc () =
.
0
otherwise
(6.52)
Conversely,
c (/T ),
H() = H
|| .
(6.53)
These are quite satisfying results. Besides the frequency scaling implicit in = T , the overall CT
response of Fig. 6.21a identically matches the DT system response, at least for || = |T | . By
c () equals (or closely matches) some desired CT system Hc (), then, within
further extension, if H
a frequency scaling factor, the DT response H() also equals (or closely matches) the desired CT
response, at least in the fundamental band.
At this point, we might wonder whether or not the restriction |T | means that digital
processing is restricted to processing only low-frequency analog signals. Certainly not! Although
the bandwidth over which the signals can be processed is restricted, by adequately increasing the
sampling rate (reducing the sampling interval T ), we can achieve any processing bandwidth we
desire. We must remember, however, that Eqs. (6.52) and (6.53) are derived assuming that the
input analog signal is bandlimited and the sampling rate is no less than the Nyquist rate.
What happens if the input xc (t) to the system in Fig. 6.21a is not a bandlimited signal or if
the sampling rate is below the Nyquist rate? It suers the same fate as that of any undersampled
373
signal. The sampling process inherently bandlimits a signal to = /T rad/s (Fs /2 Hz) by folding
its spectrum at Fs /2 Hz (half the sampling frequency). Such folding distorts the spectrum because
of overlapping spectral components (aliasing), as shown in Fig. 3.13. For example, if a signal of
bandwidth 550 Hz is sampled at a rate 1000 Hz, then sampling bandlimits the signal to Fs /2 = 500
Hz by folding any components from 500 to 550 Hz into the 450- to 500-Hz range. Instead of the
original spectrum, it is this distorted spectrum, bandlimited to 500 Hz (/T rad/s), that is now
processed by the digital lter in Fig. 6.21a.
The time domain, the frequency domain, and the confused domain.
6.5.2
|| .
(6.54)
This is a frequency-domain criterion for designing a digital system H() (or composite system
c ()) to imitate a CT system Hc (). Let us translate this result to the time domain and obtain
H
an equivalent design criterion in terms of impulse response functions.
c () and Hc () is possible only
c () is necessarily bandlimited, equivalence between H
Since H
for bandlimited Hc (). Thus, we proceed assuming that the desired system Hc () is bandlimited,
in which case the system impulse response hc (t) is given by
hc (t) =
1
2
/T
/T
Hc ()ejt d.
c () = H(T )
If the system in Fig. 6.21b is equivalent to the system in Fig. 6.21a, then Hc () = H
over the band || /T , and the preceding equation becomes
hc (t) =
It
1
2
/T
H(T )ejt d.
/T
374
The nth sample of hc (t) is hc (nT ), which can be found by setting t = nT in this equation. In
addition, we change the variable of integration according to = T to obtain
1
1
hc (nT ) =
H()ejn d = h[n],
2T
T
where h[n] is the unit impulse response of the digital system H(). Therefore, we can design the
impulse response of our digital system using the impulse response of our desired CT system according
to
(6.55)
h[n] = T hc (nT ).
This strategy, known as the impulse invariance method, is the time-domain equivalent of Eq. (6.54).
We stress again that this relationship is eective only if Hc () is bandlimited and the sampling interval T is no greater than the Nyquist interval. The impulse invariance method is not an appropriate
design technique to implement CT systems that are not at least approximately bandlimited, such
as true highpass and bandstop lters.
Comments
Based on the preceding results, we make the following series of observations:
1. When we let h[n] = T hc (nT ), the spectrum H() is identical to the spectrum of the sampled
2k
H() =
Hc
.
T
k=
This is just like Eq. (6.44) and can also be seen from Figs. 6.17d and 6.17f.
c () of the
2. Combining the rst observation with Eq. (6.52), the CT frequency response H
system in Fig. 6.21a is the same as the spectrum Hc () repeating periodically with period Fs
Hz (as shown in Fig. 6.17d) and then lowpass ltered with cuto frequency Fs /2 Hz.
c () exactly equals
3. If Hc () is bandlimited to frequency Fs /2, then the frequency response H
Hc (), as desired.
What happens if Hc () is not bandlimited to Fs /2 Hz? This is a question of great interest
because all practical Hc () are non-bandlimited. Although we shall leave the details of this topic for
a later chapter, we can readily appreciate a qualitative answer: if Hc () is not bandlimited, then the
c ().
samples T hc (nT ) result in aliasing, which, in turn, distorts the realized frequency response H
Using the minimum possible sampling frequency, design a DT system for Fig. 6.21a that delays a
bandlimited (B 10 kHz) CT input xc (t) by = 250 s. Sketch the frequency responses H()
c (). Explain how closely the system compares with an ideal analog delay = 250 s. Using
and H
a hypothetical bandlimited (B 10 kHz) signal xc (t) and its spectrum Xc (), sketch the signals
and spectra at the input of the C/D converter, the input of H(), the output of H(), and the
output of the D/C converter.
Because the input signal bandwidth B 10 kHz, Nyquist requires a sampling interval T 1/2B =
50 s. To achieve a DT system with minimum sampling frequency, we choose T = 50 s, which
corresponds to a sampling frequency of Fs = 20 kHz. The required delay of 250 s is thus = 5T .
As seen from Eq. (2.6), this delay is produced by a CT system with frequency response
Hc () = ej = ej5T .
375
|| .
(6.56)
Hc () =
.
0
otherwise
Substituting T = 50 106 , we obtain, for || 20000,
c () = ej/4000 ,
H
c ()| = 1,
|H
c () = /4000.
and H
Over the range 20000 < 20000, the magnitude response is constant, and the phase response
is a linear function of with slope 1/4000, as shown in Fig. 6.22b. The frequency response is zero
c () functions as an ideal bandlimited analog delay of 250 s. Over the
beyond this range. Thus, H
bandwidth of interest, there is no dierence between this response and an ideal analog delay of 250
s.
To understand how a signal progresses through this system (Fig. 6.21a), let us consider a hypothetical input signal xc (t) and its 10-kHz bandlimited spectrum Xc (), as shown in Fig. 6.22c. In the
interest of simplicity and clarity, we have set the phase spectrum to 0. A nonzero phase function is
accommodated by simply adding it to the resulting phase spectrum at each stage. The signal at the
output of the C/D converter is a discrete-time signal x[n] = xc (nT ) with periodic spectrum X(),
as shown in Fig. 6.22d. Since Xc () is bandlimited, the DTFT of x[n] is, according to Eq. (6.50),
X() =
1
Xc (/T ),
T
|| .
This spectrum is identical to Xc ()/T , frequency-compressed by factor 1/T = 20000 to ensure that
the original bandwidth reduces to a width (no aliasing).
Using Eq. (6.56), the DT lter output spectrum is
Y () = X()H() = X() ej5 .
Applying the time-shifting property of Eq. (6.16), we nd
y[n] = x[n 5].
Both y[n] and Y () are depicted in Fig. 6.22e (magnitude response solid, phase response dotted).
To nd the continuous-time output yc (t), we rst obtain Yc () from Eq. (6.51) as
T Y (T ) = Xc () ej5T |T |
Yc () =
.
0
otherwise
376
|H()|
H()
1
(a)
c ()|
|H
c ()
H
(b)
104
104
104
104
xc (t)
Xc ()
Xc (0)
(c)
104
x[n]
104
1
T
X()
Xc (0)
(d)
5
10
y[n]
Y ()
(e)
5
10
yc (t)
Yc ()
(f)
104
250 s
104
Yc () = Xc () ej5T .
377
An alternate and perhaps easier way to nd Yc () is from the fact that the overall system transfer
function, as found from Eq. (6.52), is
H(T ) = ej5T |T |
Hc () =
.
0
otherwise
Using Yc () = Hc ()Xc (), we again obtain Yc () = Xc ()ej5T . In either case,
yc (t) = xc (t 5T ) = xc (t ),
= 250 s.
Both yc (t) and Yc () are shown in Fig. 6.22f (magnitude response solid, phase response dotted).
Example 6.20
Using digital processing of analog signals, as shown in Fig. 6.21a, design an ideal dierentiator for
bandlimited input signals.
To solve this problem, we need to design an appropriate DT system for Fig. 6.21a. The desired
frequency response of an ideal bandlimited dierentiator is
j |T |
Hc () =
.
(6.57)
0 otherwise
By selecting a proper value for T , we can accommodate input signals of any bandwidth. Since the
frequency range of interest is bandlimited, the DT system in Fig. 6.21a can, in theory, exactly meet
the desired response. Using Eq. (6.54), we obtain
H() = Hc (/T ) =
j
,
T
|| .
(6.58)
Thus,
|H()|
H()
(b)
(a)
Figure 6.23: Digital realization of an ideal bandlimited dierentiator: (a) |H()| and (b) H().
We can also solve this problem in the time domain using the impulse invariance method of
Eq. (6.55). The impulse response hc (t) of the analog lter in Eq. (6.57) is the inverse Fourier
transform of Hc (), given by
/T
1
hc (t) =
jejt d.
2 /T
Following some work, Eq. (6.55) yields
T
h[n] = T hc (nT ) =
2
/T
jejnT d =
/T
cos(n)
nT
n = 0
n=0
378
This result is also the IDTFT of Eq. (6.58), as expected. Notice, however, that this h[n] is noncausal,
which makes the system, as designed, impractical to implement. Using some suitable delay ng , the
shift and truncation method of Eq. (6.42) yields a causal (realizable) solution h[n]
that will only
approximate ideal bandlimited dierentiator behavior.
Example 6.21
Using Fig. 6.21a and the minimum possible sampling frequency, design an ideal lowpass DT lter
with 10-kHz cuto frequency, assuming the CT input xc (t) is bandlimited to 40 kHz.
Given our input bandwidth of 40 kHz, Nyquist requires that our system sample at 80 kHz to avoid
aliasing. However, our desired DT system lowpass lters the sampled input with a cuto frequency
of 10 kHz, eectively removing all signal content from 10 to 40 kHz. There is really no reason to
perfectly preserve the components from 10 to 40 kHz only to see that content removed by the DT
lter operation. Rather, let us sample at a lower rate that preserves the desired lower-frequency
content (below 10 kHz) but for which some high-frequency distortion (aliasing) may occur. Such
distortion is irrelevant since the DT lowpass lter removes those signal components.
To determine a suitable sampling frequency, we notice that we can tolerate folding the highestfrequency content at 40 kHz down to 10 kHz, the upper frequency of our desired signal. This implies
a folding frequency of (40 + 10)/2 = 25 kHz and a sampling frequency of Fs = 50 kHz. Although
this sampling frequency is sub-Nyquist for our input signal (50 kHz < 80 kHz), we encounter no
detrimental eects since our desired frequency band remains intact, and aliased content is ltered
away. An immediate advantage of this approach is that our sub-Nyquist system operates over onethird slower than the Nyquist system. Slower systems consume less power and cost less than their
high-speed counterparts.
The desired lowpass lter cuto frequency is f1 = 10 kHz or 1 = 20000. Since Fs = 1/T = 50
kHz, 1 T = 2/5. The frequency response Hc () for an ideal (zero delay) lowpass lter of cuto
frequency 1 is
Hc () =
.
21
According to Eq. (6.54),
H() =
=
,
21 T
4/5
|| .
This frequency response, shown in Fig. 6.24a, is the frequency-domain description of an ideal lowpass
DT lter with cuto frequency 1 = 2/5. Had we used Nyquist sampling (Fs = 80 kHz), the
resulting DT lter would have had a smaller cuto frequency 1 = 1 /80000 = /4. As we shall see
in Ch. 8, DT lters can become progressively more dicult to implement as their passbands narrow.
In this respect, we once again see that our sub-Nyquist solution is superior to the Nyquist solution.
To obtain the time-domain description of our DT system, we use pair 8 of Table 6.2 to obtain
2
sinc(2n/5).
5
This impulse response, shown in Fig. 6.24b, is also obtained by taking the inverse Fourier transform
of Hc () and then applying the impulse-invariance criterion of Eq. (6.55). In any case, h[n] is noncausal and of innite duration, so a practical realization would require us to appropriately truncate
and shift h[n].
h[n] =
379
H()
h[n]
2
5
2
5
2
5
12
(a)
12
(b)
Figure 6.24: Digital lowpass lter for sub-Nyquist system: (a) H() and (b) h[n].
Example 6.22
Discuss what changes occur in Ex. 6.20 if the desired delay is increased to 275 s.
6.6
Sections 4.1.3 and 4.6 briey discuss the operations of downsampling, decimation, upsampling, and
interpolation. To promote an intuitive understanding of these topics, we now investigate these operations from a frequency-domain perspective. Before embarking on this frequency-domain journey,
let us quickly review each of these four operations, which Fig. 6.25 depicts in block form.
x[n]
X()
x [n]
X ()
x[n]
X()
Hd
(a)
x[n]
X()
x
[n]
X()
xd [n]
Xd ()
Hi
xi [n]
Xi ()
(b)
x [n]
X ()
x[n]
X()
(c)
x [n]
X ()
(d)
Figure 6.25: Block representations of DT time-scaling operations: (a) downsampling, (b) decimation,
(c) upsampling, and (d) interpolation.
Compressing a DT signal x[n] by integer factor M (Fig. 6.25a) is represented mathematically as
x [n] = x[M n].
(6.59)
When n = 0, x [n] = x[0]; when n = 1, x [n] = x[M ]; when n = 2, x [n] = x[2M ]; and so on.
This means that x [n] selects every M th sample of x[n] and deletes the rest of them. If x[n] has
sampling frequency Fs , then the downsampled signal x [n] has reduced sampling frequency Fs /M .
Downsamping by factor M is easily accomplished: retain every M th sample of x[n], and discard the
remaining samples to obtain x [n].
The downsampling operation may or may not result in loss of information depending on the
nature of x[n]. For example, if x[n] is obtained by oversampling some continuous-time signal, downsampling x[n] may not cause loss of information. In other cases, aliasing during downsampling causes
380
a loss or distortion of information. To minimize the adverse eects of aliasing, downsampling is often
preceded by a decimation (anti-aliasing) lter Hd . A decimation lter followed by downsampling
results in decimation (Fig. 6.25b). The decimation xd [n] of signal x[n] clearly depends on the scale
factor M as well as the nature of the decimation lter Hd .
Expanding a DT signal x[n] by integer factor L (Fig. 6.25c) is represented mathematically as
x[n/L] n = 0, L, 2L, . . .
x [n] =
x[k][n Lk] =
.
(6.60)
0
otherwise
k=
Clearly, x [0] = x[0], x [L] = x[1], x [2L] = x[2], x [3L] = x[3], and so on. Moreover, x [n] = 0
for all n = kL (k integer). Thus, expansion amounts to interleaving L 1 zeros between successive
samples of x[n]. In this way, upsampling increases the eective sampling rate by a factor L.
Unlike downsampling, the upsampling operation never results in a loss of information. The
inserted zeros, however, serve as a poor representation of the underlying signal. Thus, upsampling is
often followed by an interpolation lter Hi , a process referred to simply as interpolation (Fig. 6.25d).
The interpolation xi [n] of signal x[n] clearly depends on the scale factor L as well as the nature of
the lter Hi . As we shall see, ideal interpolation preserves the spectral shape of the original signal,
which is to say that the spectrum Xi () should be a frequency-scaled version of X().
Why Resample?
In practice, resampling is often necessary. We nd one application of resampling in Ch. 3 in connection with D/A conversion: increasing the sampling rate before samples pass through a D/A converter
simplies the design and implementation of the reconstruction lter (see page 201). Resampling is
necessary when input and output processes are naturally at dierent rates. For example, compact
disc (CD) and digital audio tape (DAT) sampling rates are 44.1 and 48 kHz, respectively. If we wish
to transfer a CD signal to DAT, we need resampling. Resampling is frequently used with portable
MP3 players to balance sound quality with song size. In telecommunications, we need conversion
between dierent signal code formats, such as conversion from delta modulation to pulse-code modulation, which operate at dierent sampling rates. In telecommunication systems, we also receive
and transmit dierent types of signals, such as teletype, facsimile, speech, video, etc., at dierent
rates. Resampling is also used to minimize computations by reducing the sampling rate when the
signal bandwidth has been reduced because of lowpass ltering. This is often done with signals
that have unused bandwidth. In medical image processing, digital resampling is necessary for image
enhancement, image scale change, and image rotation [2].
6.6.1
To develop a frequency-domain perspective of digital resampling, it proves very useful to use xc (t),
which we take as the bandlimited interpolation of x[n], as an intermediary. Although direct methods
exist to derive the desired results, xc (t) provides a more intuitive understanding of the results.
Recall that the samples of xc (t) at T -second intervals represent x[n], that is,
x[n] = xc (nT ).
Although the choice of parameter T is arbitrary in this development, our investigation of resampling
is greatly simplied if we choose T = 1. Thus, the bandwidth of xc (t), the bandlimited interpolation
2
of x[n], is B 2T
= rad/s or 0.5 Hz. Since = T , the choice T = 1 also allows us to conveniently
interchange and as circumstances warrant. Using T = 1, we now have
x[n] = xc (n).
Actually, it is not necessary that x (t) be the bandlimited interpolation of x[n]. All we need is that x (nT ) = x[n].
c
c
The bandlimited interpolation of x[n] is a particularly convenient choice because its spectrum is just a frequency-scaled
version of X() over the fundamental band.
381
Figures 6.26a and 6.26c depict x[n] and the corresponding bandlimited interpolation xc (t) for T = 1,
respectively. Interestingly, when T = 1, we recognize from Eq. (6.44) that
X() =
Xc ( 2k).
k=
Since xc (t) is the bandlimited interpolation of x[n], this further simplies (Eq. (6.46)) to
X() = Xc (),
|| .
|| .
(6.61)
To nd the spectrum of x [n], let us consider the spectrum of the closely related signal xc (M t).
According to the scaling property of Eq. (1.85),
1
Xc
.
(6.62)
xc (M t)
M
M
The spectrum Xc (/M ) is the spectrum Xc () expanded by factor M . Hence, although the bandwidth of Xc () is , the bandwidth of xc (M t) can be greater than , causing aliasing and folding
in X (). Consequently, downsampling can result in a loss of information. If, however, M is small
enough to ensure that the spectrum Xc (/M ) does not spill beyond , the spectral shape is preserved, and downsampling causes no loss of information. Using Xc () from Fig. 6.26d, we sketch
1
M Xc (/M ) in Fig. 6.26f for M = 2. As shown in Fig. 6.26h, the spectrum X () of the sampled
1
signal x [n] = xc (M n) is just a 2-periodic replication of the spectrum M
Xc (/M ).
In a similar way, we have from Eq. (1.85)
xc (t/L) L Xc (L).
(6.63)
The spectrum Xc (L) is the spectrum Xc () compressed by factor L. Because the bandwidth
of Xc () is B , the bandwidth of Xc (L) is always below . Moreover, since xc (t) is the
Since x (M t) yields the downsampled signal x [n], it is natural to wonder why x (t/L) yields the interpolated
c
c
signal xi [n] rather than the upsampled signal x [n]. The reason is that the ideal lowpass lter implicit in the generation
of the bandlimited interpolation xc (t) also functions as the ideal lowpass lter needed for DT interpolation.
In Fig. 6.26f, we have shown the spectrum X (/M ) to be bandlimited to , although this restriction is not
c
necessary. When the spectrum Xc (/M ) is not bandlimited to , Fig. 6.26h consists of overlapping repetitions of
1
the spectrum M Xc (/M ). In such a case, xc (M t) is not a bandlimited interpolation of x [n], which indicates that
aliasing distortion occurs during the downsampling process.
382
X()
x[n]
X(0)
(a)
2B
Xc ()
X(0)
(c)
B
(d)
1
X
2 c 2
xc (2t)
X(0)
2
(e)
(f)
X ()
x [n]
(b)
xc (t)
X(0)
2
(g)
2B
(h)
2X(0) 2Xc (2)
xc (t/2)
(i)
2X(0) Xi ()
(j)
xi [n]
B
2
3
(k)
B
2
(l)
Figure 6.26: Signals x[n], x [n], and xi [n] and their spectra obtained from the corresponding bandlimited interpolations xc (t), xc (2t), and xc (t/2) and their spectra.
(ideal) bandlimited CT interpolation of x[n], the signal xi [n] = xc (n/L) is the ideal (factor-L) DT
interpolation of x[n]. That is, the spectral shape of the interpolated signal is preserved, as required
for optimum (ideal) interpolation. Using Xc () from Fig. 6.26d, we sketch LXc (L) in Fig. 6.26j
383
for L = 2. As shown in Fig. 6.26l, the spectrum Xi () of the sampled signal xi [n] = xc (n/L) is just
a 2-periodic replication of the spectrum LXc (L).
The next problem is to nd expressions for the 2-periodic signals X () and Xi () in Figs. 6.26h
and 6.26l. To shift a spectrum by 2, we replace with 2. Hence, to produce a 2-periodic
repetition, we replace with 2k and sum over all (integer) k. Thus, with an eye on Fig. 6.26
and Eqs. (6.61), (6.62), and (6.63), we express X(), X (), and Xi () in terms of Xc () as
X() =
Xc ( 2k),
k=
1
X () =
M
and Xi () = L
Xc
k=
2k
M
(6.64)
,
(6.65)
Xc (L[ 2k]).
(6.66)
k=
Equations (6.65) and (6.66) represent X () and Xi () in terms of Xc (). We really want to express
X () and Xi () in terms of X(), not Xc (). Additionally, we hope to obtain frequency-domain
expressions for decimation and upsampling. This is what we shall now do.
6.6.2
To express X () (Fig. 6.26h) in terms of X() (Fig. 6.26b), we observe that the spectrum X ()
appears somewhat like frequency-expanded version of X(). The frequency-expanded version of
1
X(/M ) and see how it compares to the spectrum in
X() is X(/M ). Let us closely examine M
1
X () in Fig. 6.26h. From Eq. (6.64), we nd M
X(/M ) as
2M k
1
1
1
X
2k =
Xc
Xc
=
.
M
M
M
M
M
M
k=
(6.67)
k=
The right-hand side of this equation is almost identical to X () in Eq. (6.65), except that the
repetition period is 2M instead of 2. The frequency expansion of the spectrum not only expands
the spectrum in each cycle but also expands the period by the factor M , as depicted in Fig. 6.27
using M = 2 and X() from Fig. 6.26b. Can we relate this spectrum to the spectrum X () shown
in Fig. 6.26h? Very simple. In Fig. 6.27, if we just add 12 X(/2) (shown solid) and a 2-shifted
version of the same spectrum (shown dotted), then we get the Fig. 6.26h spectrum X ().
1
X
2
2
2
X(0)
2
1
X
2
2B
384
to add
1
M X(/M )
2
2(M 1)
X
+X
+ + X
M
M
M
M1
2m
1
X
=
.
M m=0
M
1
X () =
M
(6.68)
B
.
(6.69)
M
To avoid loss of data, downsampling of x[n] by factor M should be performed only if x[n] satises
Eq. (6.69) or has sucient built-in redundancy.
If, for whatever reason, we have to downsample when Eq. (6.69) is not satised, then a decimation
(lowpass anti-aliasing) lter should be used to eliminate all spectral components of x[n] beyond
frequency /M to obtain its approximation x
[n] that is bandlimited to /M . Referring to Fig. 6.25b,
remember that a decimation lter must come before the downsampling operation. Letting 1 = /M
in Fig. 6.14a, the frequency response of an ideal lowpass decimation lter is
Hd () =
k=
2k
2/M
A decimation lter eliminates all signal components above the frequency /M , which saves spectral
components below /M from being corrupted by the folding of components above /M . Still, when
components above /M are removed, x
[n] = x[n] and xd [n] = x[M n]. That is, decimation is not
the same as simple downsampling unless x[n] is bandlimited to /M rad/sample, which ensures
that x
[n] = x[n]. Since x [n] = x[M n], a downsampler can eliminate, but never change, its input
samples. A decimator, on the other hand, not only eliminates samples but can also change them.
Supercially, it might therefore seem that downsampling causes less distortion that decimation. As
we shall very soon see, however, this conclusion is entirely false.
(6.70)
Downsampling Foolishness
There is an old adage that it is better to remain silent and be thought a fool than to open your
mouth and remove all doubt. A downsampler speaks its mind, even when it cannot know the answer,
and looks the fool in the process. A decimator, on the other hand, is more guarded in its responses:
it answers truthfully when it can but otherwise remains silent. In most cases, it is wiser and safer to
use a decimator than a downsampler. To illustrate, consider the signal x[n] = cos(n), which varies
between 1 and 1. Downsampling by a factor M = 2 yields the constant x [n] = 1. This certainly
seems to be a foolish result, since we expect compression to produce a signal of higher, not lower,
frequency. Of course, this odd behavior is a consequence of the aliasing implicit in the downsampling
operation. A decimator, on the other hand, whose anti-aliasing lter completely removes cos(n),
outputs xd [n] = 0. Rather than produce a nonsensical output, the decimator is wisely silent in its
response.
385
The frequency-domain perspectives of Eqs. (6.68) and (6.70) provide even more insight into
the distortion in downsampling and decimation when the condition of Eq. (6.69) is not satised.
Figure 6.28a shows X(), the spectrum of some signal x[n]. Because Eq. (6.69) is not satised
in this case, downsampling results in aliasing, as depicted in Fig. 6.28b for M = 2. A decimator,
on the other hand, rst applies an anti-aliasing lter to produce a signal x
[n] with bandlimited
spectrum X(),
shown in Fig. 6.28c. Downsampling x
[n] produces the decimator output xd [n]. As
Fig. 6.28d shows, although Xd () is missing the spectral tails of X() (causing distortion), the tails
do not reappear through aliasing (folding) to cause additional distortion, as is the case in simple
downsampling. In general, decimation causes less distortion than downsampling.
X()
X()
Xd ()
X ()
(c)
(a)
2B
(b)
(d)
Figure 6.28: Distortion from downsampling and decimation using M = 2: (a) X(), (b) X (), (c)
X(),
and (d) Xd ().
Figure 6.29a shows the DTFT of a signal x[n]. Using M = 3, determine the DTFTs of the
downsampled signal x [n] and the decimated signal xd [n]. Assume that the decimator uses an
ideal lowpass lter.
From Eq. (6.68), the spectrum of the M = 3 downsampled signal is given as
2
2m
1
X
X () =
.
3 m=0
3
Hence, the spectrum X () is obtained by multiplying the spectrum X() in Fig. 6.29a by 1/3,
frequency expanding it by a factor of 3, and adding shifted replicates to achieve 2-periodicity, as
shown in Fig. 6.29b. Expansion by M = 3 triples the bandwidth from /2 to 3/2, which causes
signicant aliasing distortion because the repeating spectra overlap. Such aliasing is to be expected
since the condition of Eq. (6.69) is not satised (B = /2 > /3 = /M ).
In decimation, we rst produce an estimate of our signal x
[n] that is bandlimited to /3, the
spectrum of which is shown in Fig. 6.29c. This is achieved by passing x[n] through an ideal lowpass
lter with a cuto frequency of /3. Once ltered, x
[n] is downsampled by M = 3 to produce
the decimator output xd [n]. The decimator output spectrum Xd (), shown in Fig. 6.29d, produces
much less distortion than a simple downsampler (Fig. 6.29b).
386
X()
X()
6
X ()
Xd ()
(c)
(a)
3
2
(b)
(d)
Figure 6.29: Downsampling and decimation using M = 3: (a) X(), (b) X (), (c) X(),
and (d)
Xd ().
Example 6.23
A signal x[n] = n u[n], where || < 1, is downsampled by factor M = 2. Determine the resulting
downsampled signal x [n] = x[2n] and its spectrum X ().
From Table 6.1 or Eq. (6.1), we know that
x[n] = n u[n]
1
ej
=
= X().
j
e
1 ej
Also,
x [n] = x[M n] = x[2n] = 2n u[2n] = 2n u[n].
Although we can determine X () directly using Table 6.1 or Eq. (6.1), it is instructive to derive
the result using Eq. (6.68).
From Eq. (6.68), we have
!
2
1
X () =
X
+X
2
2
2
!
=
X
+X
2
2
2
1
1
=
+
2(1 ej/2 ) 2(1 + ej/2 )
1
.
=
1 2 ej
Example 6.24
387
Using the realizable lter of Fig. 6.16, sketch the M = 3 decimation of the signal x[n] = u[n]
u[n 20].
With MATLAB, solving this problem is nearly eortless. Referring to Fig. 6.16a, we rst dene
the impulse response of our decimation lter.
01
As shown in Fig. 6.16b, the cuto frequency of this lter is /3, which is an appropriate value for
an M = 3 decimator.
The decimation lter output x[n] is the convolution of the nite-duration impulse response of the
decimation lter and the input x[n], which is a duration-20 pulse with unit amplitude. Since both
x[n] and hd [n] are of nite duration, MATLABs conv command is able to compute the convolution.
This lter output is then downsampled by M = 3 to produce the decimator output xd [n].
02
03
As shown in Fig. 6.30a, the output of the decimation lter is a smoothed (ltered) pulse that
has an eective duration slightly greater than the input duration of 20. This pulse, bandlimited
to approximately /3, is delayed by ng = 12 due to the inherent time delay needed to render the
decimation lter causal (practical). The decimator output, shown in Fig. 6.30b, has an eective
duration of around 7, which is about one-third the original pulse duration. This is sensible, given
the M = 3 decimation factor. Unlike simple downsampling, we see that xd [n] changes the samples
of the original input, which were either 0 or 1 in amplitude.
xd [n]
x
[n]
1
ng
(a)
10
(b)
Example 6.25
A signal x[n] = cos(0 n) downsampled by factor 2 is x [n] = x[2n] = cos(20 n). Show this fact in the
frequency domain using Eq. (6.68). What happens if |0 | > /2? Hint: (ax) = (x)/|a|.
6.6.3
388
that X(L) is obtained by replacing with L in the expression for X(). Hence, from Eq. (6.64),
we nd L X(L) as
L X(L) = L
Xc (L 2k) = L
k=
k=
Xc
2k
L
L
!
.
(6.71)
Using L = 2, Fig. 6.31a shows the spectrum LX(L) as obtained on the right-hand side of Eq. (6.71).
This spectrum repeats at intervals 2/L instead of 2, as in Fig. 6.26l. The frequency compression
of spectrum X() by factor L not only compresses each cycle but also compresses the period by the
same factor L.
2X(2)
2X(0)
B
2
(a)
Hi ()
L
(b)
2X(0)
Xi ()
B
2
(c)
Figure 6.31: Obtaining Xi () from X() for L = 2: (a) LX(L), (b) Hi (), and (c) Xi () =
X(L)Hi ().
The spectrum LX(L) in Eq. (6.71) is almost identical to Xi () in Eq. (6.66) except that the
repetition period is 2/L instead of 2. In each period 2, LX(L) contains L repeating cycles.
The additional (unwanted) repeating spectra are called images of the input spectrum. There are
L 1 images. We can readily obtain the desired spectrum in Fig. 6.26l by passing the spectrum
L X(L) (Fig. 6.31a) through an ideal lowpass lter of bandwidth /L, which is the same as passing
the spectrum X(L) through an ideal lowpass lter of gain L and bandwidth /L, as shown in
Fig. 6.31b. This lter suppresses the unwanted L 1 images. Thus,
Xi () = X(L)Hi (),
(6.72)
389
Hi () = L
k=
2k
.
2/L
(6.73)
The output of the lter is the desired spectrum Xi (), depicted in Fig. 6.31c. The interpolating
lter in Eq. (6.73), being an ideal lter, is unrealizable. In practice, we must compromise and use
some realizable approximation.
Equation (6.72) shows that xi [n] can be obtained by lowpass ltering the spectrum X(L). But
what is X(L)? How do we generate it? We now show that the DTFT of the upsampled signal
x [n] is X(L). Using Eq. (6.60), we obtain
X () =
x [n]ejn =
x[n/L]ejn .
n=
x[k]ejLk = X(L).
(6.74)
k=
In other words, upsampling a signal by factor L results in a simple compression of its spectrum by
the same factor L.
Substituting Eq. (6.74) into Eq. (6.72), it follows that
Xi () = X ()Hi ().
(6.75)
This development shows that the interpolated signal xi [n] is generated by lowpass ltering the
upsampled signal x [n], exactly as shown in Fig. 6.25d. We emphasize that the interpolating lter
Hi is placed after the expander. The interpolation lter essentially lls in the gaps (zeros) created
during the upsampling operation.
Consider a signal x[n] = 2n u[n], where || < 1. Using L = 2, determine the spectra of the
upsampled signal x [n] and the ideally interpolated signal xi [n].
In Ex. 6.24, we found that downsampling the signal n u[n] by a factor of 2 results in the signal
2n u[n]. Thus, we might expect that upsampling or interpolating the signal 2n u[n] by a factor of
2 results in n u[n]. Let us see.
We have x[n] = 2n u[n] = ( 2 )n u[n]. From Table 6.1, we obtain X() = 1/(1 2 ej ).
Figure 6.32a shows the magnitude of X(). For convenience, we shall display only the magnitude
spectra in this problem.
According to Eq. (6.74), the expanded signal spectrum for L = 2 is
X () = X(2) =
1
.
1 2 ej2
Clearly, X () is the spectrum X() frequency-compressed by a factor of 2. Figure 6.32b shows the
magnitude response |X ()|, which is just Fig. 6.32a compressed by 2.
To obtain the spectrum Xi () for the upsampled signal xi [n], we pass the spectrum X ()
2
Xi () = X ()Hi () =
,
|| .
1 2 ej2
390
|X()|
1
1 2
(a)
|X ()|
1
1 2
(b)
2
1 2
|Xi ()|
(c)
Figure 6.32: Upsampling and interpolation of x[n] = 2n u[n] by factor L = 2: (a) |X()|, (b)
|X ()|, and (c) |Xi ()|.
The magnitude of the resulting spectrum Xi () is shown in Fig. 6.32c.
Both X () and Xi () are quite dierent from 1/(1 ej ), the spectrum for n u[n], shown in
Fig. 6.3. Clearly, upsampling or interpolating 2n u[n] does not yield n u[n]. How could this be? We
note that the signal n u[n], having a full bandwidth of , does not satisfy the condition of Eq. (6.69).
Hence, in this case, downsampling leads to aliasing, causing loss of data. In contrast, upsampling
and ideal interpolation never cause a loss of data. Hence, unless there is no aliasing in downsampling, we should not generally expect that upsampling or interpolation will restore a downsampled
signal to its original form. In contrast, a signal upsampled or ideally interpolated by factor L and
then downsampled by the same factor always yields the original signal. This is because upsampling
and ideal interpolation do not cause loss of data but create redundancies that are eliminated by the
subsequent downsampling, thus yielding the original signal. The reader is encouraged to verify that
the upsampled or interpolated signals in this example, when downsampled by M = L = 2, yield
the original signal 2n u[n]. These observations conrm the conclusions of Ch. 4 that the order of
operations is important when compressing and expanding DT signals.
Example 6.26
391
A signal x[n] = cos(0 n) downsampled by factor M = 2 is x [n] = x[2n] = cos(20 n) (see Drill 6.10).
Now show that cos(20 n) interpolated by factor L = 2 is cos(0 n). Show this in the frequency domain
using Eq. (6.74) and then lowpass ltering the unwanted image spectrum (Eq. (6.75)).
6.6.4
Time-Domain Characterizations
While the frequency domain is very intuitive, resampling itself most often occurs using time-domain
expressions. For this reason, we must not lose sight of our time-domain perspectives of resampling. Both upsampling and downsampling are easily represented in the time domain, as shown in
Eqs. (6.60) and (6.59). Basically, upsampling stus L 1 zeros between each sample, and downsampling throws out M 1 out of every M samples. Time-domain characterizations of interpolation
and decimation are not quite so simple.
To express xi [n] directly in terms of x[n], we take the inverse of Eq. (6.75) to obtain
x [m]hi [n m].
m=
m=
k=
x[k][m kL] hi [n m]
k=
x[k]
1
hi [n m][m kL]
m=
x[k]hi [n kL].
k=
Using entry 8 of Table 6.1, the impulse response of the ideal interpolator of Eq. (6.73) is
hi [n] = sinc(n/L).
(6.76)
x[k] sinc
k=
n
L
k .
(6.77)
Following a similar procedure (see Prob. 6.6-12), we nd that the impulse response of an ideal
decimation lter is
1
hd [n] =
sinc(n/M ),
(6.78)
M
and the output of an ideal decimator is
xd [n] =
1
k
x[k] sinc n
.
M
M
(6.79)
k=
Remember that an interpolator outputs samples xi [n] at a rate L times faster than its input samples,
while a decimator outputs samples xd [n] at a rate M times slower. Even with this dierence, the
392
similarity between Eqs. (6.77) and (6.79) is striking, although not altogether surprising, given that
both rely on lowpass lters that are nearly identical in form. Since both involve ideal lowpass lters,
neither Eq. (6.77) nor Eq. (6.79) is in realizable form.
In practice, interpolators and decimators require some realizable approximation of their ideal
lters. To provide one example, let us consider linear interpolation, which is a popular and realizable
approximation of ideal interpolation. This method approximates the main lobe of hi [n] in Eq. (6.76)
with an inscribed triangle and discards all side lobes, as shown for L = 4 in Fig. 6.33.
hi [n]
hi [n]
4
12 8
12 n
12
(a)
12 n
(b)
Figure 6.33: L = 4 interpolator impulse responses: (a) ideal and (b) linear approximation.
Thus, the impulse response of a linear interpolator is
i [n] = n .
h
2L
(6.80)
i [n] causal (realFor convenience, Eq. (6.80) ignores the delay of L 1 samples needed to render h
izable). By incorporating such a delay, the only eect is a corresponding delay of L 1 samples in
the output.
Using the L = 4 linear interpolator of Fig. 6.33b and an input of x[n] = sin(2n/7)(u[n] u[n 7]),
determine and sketch the interpolator output xi [n].
Figure 6.34a shows the signal x[n], which consists of a single cycle of a sine wave. To upsample
by factor L = 4, three zeros are inserted between each sample of x[n] to produce x [n], as shown in
Fig. 6.34b.
As per Eq. (6.80), the impulse response of the linear interpolating lter is given by
n
.
hi [n] =
8
This response is shown in Fig. 6.33b. The interpolator output xi [n] can be found as the convolution
i [n]. In this particular example, however, it is simpler to nd the output directly by
of x [n] and h
observing that each nonzero sample of x [n] is an impulse and hence generates (n/8) centered at
that sample and with a height equal to that of the sample, as shown in Fig. 6.34c. The interpolator
output xi [n], shown in Fig. 6.34d, is the sum of all these scaled and shifted triangle functions.
Clearly, linear interpolation expands x[n] using straight-line approximations between samples.
i [n] have nite duration, the results of Figs. 6.34a, 6.34b, and 6.34d are
Since both x[n] and h
easily conrmed using MATLAB.
01
02
03
04
05
06
393
x[n]
1
(a)
4
2
1
6
8 n
x [n]
1
(b)
16
8
20
24
28
32 n
12
1
(c)
16
8
20
24
28
12
32
32
xi [n]
1
(d)
16
8
12
20
24
28
Figure 6.34: L = 4 linear interpolation: (a) x[n], (b) x [n], (c) constructing xi [n], and (d) xi [n].
The term (mod(n,1)==0) in line 01 ensures that the upsampling in line 03 correctly inserts zeros for
non-integer arguments of x[n]. This particular MATLAB code is just one of many possible coding
strategies to solve this problem.
Example 6.27
394
Time-Frequency Duality
Since xc (t) is constructed to be a bandlimited interpolation of x[n] using T = 1, we recognize that
Xc () = X(),
|| .
Assuming that Eq. (6.69) is satised and downsampling does not cause aliasing, it follows that
xd [n] = x [n] and, from Eqs. (6.65) and (6.66), that
Xd () = X () =
1
X(/M ) and Xi () = LX(L),
M
|| .
(6.81)
Observe the time-frequency duality. Time compression of x[n] by a factor M results in spectral
expansion by M , while time expansion of x[n] by a factor L results in spectral compression by factor
L. These relations governing time scaling are identical to that for continuous-time signal scaling
in Eq. (1.85). However, we should keep in mind that for discrete-time signals, the time-frequency
duality applies to spectra in the fundamental band only. It is not the same situation when we try
to apply it to the entire frequency range, as seen earlier.
Show that the frequency response of the linear interpolation lter of Eq. (6.80) is
2
i () = 1 sin(L/2) .
H
L sin(/2)
Using L = 4, sketch this frequency response, and compare it with the frequency response needed for ideal
interpolation.
Repeat Ex. 6.27 using the signal x[n] = cos(2n/7)(u[n] u[n 7]) rather than x[n] = sin(2n/7)(u[n]
u[n 7]). Comment on the results.
6.6.5
Section 4.6 discusses cascading upsamplers and downsamplers to achieve fractional changes in sampling rate. Unless the upsampling and downsampling factors L and M are coprime, the order of
operations is important. Further, it is typically preferable to perform upsampling prior to downsampling. Upsampling by L followed by downsampling by M changes the overall sampling rate by
a fractional amount L/M .
To minimize aliasing and image problems, interpolation and decimation are generally preferable
to upsampling and downsampling. Thus, it is most common to realize fractional sampling rate
changes through an interpolator/decimator cascade. Since interpolators and decimators utilize upsamplers and downsamplers, order of operation is almost always important. Figure 6.35a shows
the most common structure, which places the interpolator before the decimator. This structure
resamples input x[n] to produce output xr [n] at L/M of the original sampling rate Fs .
But in the fundamental sense, this result is valid for all discrete-time frequencies. Ultimately, all discrete-time
signals are bandlimited to a band || , and in the real sense, frequencies beyond do not exist. Hence, the
conclusion applicable to the fundamental band is a general conclusion. But since we admit discrete frequencies higher
than , we have to make concessions for a general result that is valid for all frequencies. This is accomplished by
nding more general expressions for Xd () and Xi () that also satisfy 2-periodicity.
x[n]
Fs
LFs
Hd
Hi
395
LFs
xr [n]
L
F
M s
xr [n]
L
F
M s
(a)
x[n]
Fs
LFs
Hi if L > M
Hd if L < M
LFs
(b)
6.7
In this chapter, we have seen that LTID systems can be analyzed using the DTFT. The DTFT
approach, however, has signicant limitations.
1. Existence of the DTFT is guaranteed only for absolutely summable signals. The DTFT does
not exist for exponentially growing signals. This means that DTFT analysis applies only for
a limited class of inputs.
2. The DTFT method can be applied only to asymptotically stable systems. It cannot be used
for unstable or even marginally stable systems.
These are serious limitations in LTID system analysis. Actually, it is the rst limitation that is also
the cause of the second limitation. Because the DTFT is incapable of handling growing signals, it
is incapable of handling unstable or marginally stable systems. Our goal is therefore to extend the
concept of the DTFT so that it can handle exponentially growing signals.
What causes this limitation so that the DTFT is incapable of handling exponentially growing
signals? Recall that in the DTFT, we are synthesizing an arbitrary signal x[n] using sinusoids or
complex exponentials of the form ejn . These signals oscillate but do not grow (or decay) with
time. Thus, they are incapable of synthesizing exponentially growing signals no matter how many
Recall
that the output of an unstable system grows exponentially, as does the output of a marginally stable system
in response to inputs that contain unit-circle modes of the system.
396
such components we add. Our hope, therefore, lies in trying to synthesize x[n] using exponentially
growing sinusoids or exponentials. This goal can be accomplished by generalizing the frequency
variable j to + j, that is, by using exponentials of the form e(+j)n instead of exponentials
ejn . The procedure is almost identical to that used in extending the Fourier transform to the
Laplace transform.
X(j)
ejn d.
X(j)
=
x[n] ejn and x[n] =
2
n=
Now, the DTFT of x[n] en , where is real, is given as
DTFT x[n] en =
x[n] en ejn
n=
x[n] e(+j)n
n=
+ j).
= X(
+ j) is x[n] en . Therefore,
Clearly, the inverse DTFT of X(
1
n
+ j) ejn d.
x[n] e
X(
=
2
Multiplying both sides of this equation by en yields
1
+ j) e(+j)n d.
X(
x[n] =
2
Let us dene a new variable z as
z = e+j
so that
1
dz = j d.
z
Because z = e+j is complex, we can express it as z = rej , where r = e . In the complex plane, z
lies on a circle of radius r = e , and as varies from to , z circumambulates along this circle,
completing exactly one rotation in a counterclockwise direction, as illustrated in Fig. 6.36. Much
like s, we interpret variable z as complex frequency.
ln(z) = + j
and
Im{z}
path of integration
Re{z}
X(ln[z])
=
n=
x[n] z n
and x[n] =
1
2j
X(ln[z])
z n1 dz,
(6.82)
6.8. Summary
397
8
where the integral indicates a contour integral in the complex plane around a circle of radius r in
counterclockwise direction.
Equation (6.82) is the DTFT extension we desire. The expressions are, however, in a clumsy
form. For the sake of convenience, we make another notational change by observing that X(ln[z])
is a function of z. Let us denote it by a simpler notation X(z). Using this notation, we obtain
X(z) =
x[n] z n
(6.83)
X(z) z n1 dz.
(6.84)
n=
and
x[n] =
1
2j
These are the analysis and synthesis equations of the (bilateral) z-transform, which is detailed in
the next chapter. The synthesis equation (Eq. (6.84)) expresses x[n] as a sum of exponentials of the
form z n = e(+j)n = rn ejn over a continuum of . By selecting a proper value for r (or ), we
can make the exponential grow (or decay) at any exponential rate we desire, thereby accommodating
all manner of signals, including exponentially growing ones.
If we let = 0, we have z = ej , and
= X(j)
= X().
X(z)z=ej = X(ln[z])
z=ej
Thus, the familiar DTFT is just a special case of the z-transform X(z) obtained by letting z = ej
and assuming that the sum on the right-hand side of the analysis equation (Eq. (6.83)) converges
when z = ej . In other words, we can obtain the DTFT from the z-transform if the region of
convergence (ROC) for X(z) includes the unit circle.
6.8
Summary
This chapter deals with the frequency-domain analysis of discrete-time signals and systems. The
discrete-time Fourier transform (DTFT) is very similar to its continuous-time counterpart, and in
fact, it is possible to derive a DTFT pair from a corresponding CTFT pair. Further, most of
the properties of DTFT spectra are similar to their continuous-time counterparts. Thus, many
frequency-domain analysis concepts apply to both CT and DT signals. Unlike CTFT spectra, which
are aperiodic, all DTFT spectra are 2-periodic and completely dened using the fundamental band
|| . This dierence in frequency-domain periodicity leads to several subtle but important
dierences between the CTFT and the DTFT.
If H() is the DTFT of an LTID systems impulse response h[n], then |H()| is the magnitude
response and H() is the phase response of the system. Moreover, if X() and Y () are the DTFTs
of the input x[n] and the corresponding output y[n], then Y () = H()X(). Therefore, the output
spectrum is the product of the input spectrum and the systems frequency response. Like continuoustime systems, distortionless transmission conditions for discrete-time systems require constancy of
magnitude response and linearity of phase response. Phase linearity corresponds to simple delay.
Even with delay, however, ideal lters, being noncausal, are realizable only approximately through
suitable impulse-response truncation.
A continuous-time signal xc (t) is said to be a bandlimited interpolation of x[n] if xc (nT ) = x[n]
and its bandwidth is 1/2T Hz. Although the parameter T is arbitrary and can be selected to
suit the needs of the application, x[n] are the Nyquist samples of xc (t) if T is chosen so that the
Once again, we nd ourselves using the notation X() to denote several distinct things: the CTFT, the Laplace
transform, the DTFT, and now the z-transform. This is the price we must pay to avoid overly cluttered notation.
Fortunately, the desired form is almost always easily discerned by inspection of the functions argument: for the
CTFT, s for the Laplace transform, for the DTFT, and z for the z-transform.
398
bandwidth of xc (t) equals 1/2T Hz. In any case, the relationship between x[n] and the bandlimited
interpolation xc (t) is useful in several applications, such as nding the continuous-time Fourier transform using discrete-time techniques, processing continuous-time signals using discrete-time systems,
digital resampling, and so on.
Digital resampling produces a change in sampling rate and is useful or necessary in many applications. Decimation and downsampling reduce the sampling rate, while interpolation and upsampling
increase it. Downsampling a signal x[n] by factor M retains every M th sample and deletes the
remaining samples, a process that expands the signals fundamental-band spectrum and may cause
a loss of information through aliasing. Such a loss is avoided only if B, the radian bandwidth of x[n],
is smaller than /M . If this condition is not satised, we should use a decimator, which precedes
downsampling with a DT lowpass lter to eliminate frequency folding and reduce distortion during
downsampling. Upsamping a signal x[n] by factor L involves interleaving L 1 zeros between successive samples, a process that compresses the signals fundamental-band spectrum and produces
L 1 images in that band. Interpolation removes these images by following upsampling with a
DT lowpass lter. Fractional sampling rate conversion is normally achieved through a cascade of
interpolation followed by decimation.
The discrete-time Fourier transform is guaranteed only for absolutely summable signals. Moreover, the DTFT can be used only in the analysis of asymptotically stable systems. These limitations
can be overcome by generalizing the frequency variable from to + j. This allows us to use exponentially growing and decaying sinusoids and leads to the z-transform. The z-transform overcomes
the limitations of the DTFT and can be used to analyze stable and unstable systems with even
exponentially growing input signals. The relationship of the DTFT to the z-transform is similar to
that of the Fourier transform to the Laplace transform. Whereas the z-transform is superior to the
DTFT in the analysis of LTID systems, the DTFT is preferable in most signal analysis.
References
1. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
2. Lyons, R. G., Understanding Digital Signal Processing, 2nd Ed., Prentice-Hall, Englewood
Clis, NJ, 2004.
Problems
399
Problems
(b) xb [n] = [n k]
1
x[n] =
|X()| cos[n + X()] d.
0
This is the trigonometric form of the
DTFT.
xa [n]
6.1-6 Using the denition of Eq. (6.2), determine the IDTFTs of the (real) spectra
shown in Fig. P6.1-6.
6.1-3 Using the denition of Eq. (6.1), determine the DTFTs of the signals shown in
Fig. P6.1-3.
Xa ()
2
0
3
4
xa [n]
N0
Figure P6.1-5
xo [n] j Im {X()} .
3
4
(0 < < 1)
N0
Xb ()
n
1
xb [n]
N0
and
xb [n]
xe [n] Re {X()}
n ( > 1)
2
1
Figure P6.1-6
1
0
N0
Figure P6.1-3
6.1-4 For the following signals, assume || < 1
and nd the DTFT directly using Eq. (6.1).
For each case, plot the signal and its magnitude and phase spectra (when needed, use
= 0.8).
(a) xa [n] = [n]
400
(f ) Xf () = [( 0 ) + ( + 0 )]
Hint: Use the fact that in the sense of generalized functions,
ejxy dx = 2(y).
6.1-8 Using the denition of Eq. (6.2), determine the IDTFTs of the (real) spectra
shown in Fig. P6.1-8.
1 Xa ()
cos()
0
Xb ()
Figure P6.1-8
1 |X()|
xc [n]
xd [n]
4
1
2
Figure P6.1-14
6.1-15 Determine whether the following
frequency-domain signals are valid DTFTs.
Justify your answer.
6
3
X()
xb [n]
(a) Xa () = +
2
(b) Xb () = j +
(c) Xc () = sin(10)
Figure P6.1-9
(d) Xd () = sin(/10)
(e) Xe () = ()
Problems
401
nm
(c) xc [n] = a
(d) xd [n] =
u[n m]
n3
nm
u[n]
(a) xa = (n + 1) n u[n]
(b) xb = n2 n u[n]
(f ) xf [n] = (n m) nm u[n m]
(c) xc = (n k) 2n u[n m]
2n
6.2-3 Using only pair 2 from Table 6.1 and properties of the DTFT, nd the DTFTs of the
following signals, assuming that || < 1 and
0 < :
u[n m]
X() =
4 xa [n]
x[n]
4
xb [n]
xc [n]
1 xb [n]
cos(n/20)
4ej6 5ej5 + ej
.
(ej 1)2
10
sin(n/10)
10
xc [n]
(0.85)n
5
10
Figure P6.2-4
6.2-5 For the signal x[n] = 0.5 sinc2 (n/4),
nd and sketch its DTFT. This signal
modulates a carrier cos(c n). Find and
sketch the DTFT of the modulated signal
x[n] cos(c n) if c is (a) /2, (b) 3/4,
and (c) .
6.2-6 Using time-shifting property, show that
x[n + k] x[n k] 2jX() sin(k).
xd [n]
Figure P6.2-2
402
x[n]
1
4
8
8
n
Figure P6.2-6
xa [n]
1
xb [n]
4
12
12
Figure P6.2-7
6.2-8 Suppose that X() is a spectrum bandlimited to /2 rad/sample. Find the spectrum of the signal dened by
x[n] n even
y[n] =
.
0
n odd
Using some hypothetical (bandlimited)
spectrum X(), sketch the spectrum Y ().
6.2-9 Derive the DTFT of sin(20 n) using the
frequency-convolution property and pairs
13 and 14 in Table 6.1 or 6.2. Consider two
cases: 0 < 0 < /2 and /2 < 0 < .
X() = ej /(ej )2 .
6.2-15 Let 0 < 1 < and 0 < 2 < /2. From
the denition and properties of the DTFT,
show that
(a)
n= sinc(1 n/) = 1
n
(b)
n= (1) sinc(1 n) = 0
2
(c)
n= sinc (2 n/) = 2
2
n
(d)
n= (1) sinc (2 n) = 0
4
(e)
n= |sinc(2 n)| = 2/32
(f ) sin(M/2)
sin(/2) d = 2, M odd
6.3-1 Using the DTFT method, nd the zerostate response y[n] of a causal system with
frequency response
H() =
(ej
ej 0.5
+ 0.5)(ej 1)
and input
x[n] = 3(n+1) u[n].
=
X()
if
2
Y () =
convolution
sin(5/2) j2
e
sin(/2)
and
X() =
cn ejn ,
and input
x[n] = u[n].
6.3-3 Repeat Prob. 6.3-1 using frequency response
ej
H() = j
e 0.5
and input
n=0
Problems
403
6.3-8 Repeat Prob. 6.3-7 for an analog integrator that is realized using the trapezoidal apFind the system output y[n] for the followproximation (see Ex. 4.10)
ing inputs:
T
y[n] y[n 1] = (x[n] + x[n 1]) .
(a) xa [n] = sinc(n/2)
2
(b) xb [n] = sinc(n)
6.3-9 Determine and sketch the magnitude and
(c) xc [n] = sinc(9n/4)
phase responses for an LTID system specied by the equation
(d) xd [n] = sinc2 (n/4)
(e) xe [n] = sinc2 (n/2)
6.3-5 Find and sketch the magnitude and phase
responses for an accumulator system described as
y[n] y[n 1] = x[n].
Determine the responses of this system to
the following input sinusoids:
(a) xa [n] = cos(0.1n)
(b) xb [n] = sin(n/2)
(c) xc (t) = cos(106 t) sampled at rate
Fs = 1.25 MHz
6.3-6 Find and sketch the magnitude and phase
responses of a (noncausal) 5-point movingaverage system specied by the equation
y[n] =
2
1
x[n k].
5
k=2
H2 :
and
1
1
x[n] x[n 1].
T
T
404
x[n]
(1)n
H0 ()
H()
y[n]
Figure P6.3-14
6.3-15 Consider the signals x[n] and y[n] =
[1+(1)n]x[n], where x[n] is assumed to be
bandlimited to || /2. For the sake of
illustration, you may take x[n] = sinc(n/6).
(a) Sketch the signals x[n] and y[n].
(b) Sketch the spectra X() and Y ().
Problems
405
1 n = 4, 2, 0, 2, 4
then show that the quadrature system
2 n = 3, 1, 1, 3 .
x[n] =
H() represents a bandpass lter of
0
otherwise
bandwidth 2B centered at c .
2 cos(c n)
6.4-7 Repeat Prob. 6.4-6 if the signal x(t) is instead sampled at 50 kHz.
H0 ()
x[n]
y[n]
H0 ()
2 sin(c n)
cos(c n)
sin(c n)
Figure P6.3-18
6.3-19 Verify that the MATLAB code in
Ex. 6.16 correctly computes the system frequency response H(). Why does this code
require the coecient vectors A and B to
have equal length?
6.4-1 Show that the power of a signal x[n] and
the power of its bandlimited interpolation
xc (t) (dened in Eq. (6.45)) are identical.
Hint: Use the fact that certain sinc functions are orthogonal; that is,
0 m = n
sinc(tm)sinc(tn) dt =
.
1
m=n
406
(c) xc [n] = [n 8]
(d) xd [n] = cos n
3
(f ) xf [n] = 1
Recall that downsampling can be considered lossless if a signal x[n] can be recovered from the downsampled signal x[M n]
through ideal interpolation by factor M .
x[n]
H(M )
Figure P6.6-5
y[n]
Problems
407
6.6-6 The cascade system of Fig. P6.6-6 consists 6.6-10 Find the output y[n] for the system
of an ideal interpolator followed by a downshown in Fig. P6.6-10. Do the problem in
sampler, both of factor L. Show that this
the time domain and the frequency domain.
system is an identity system, which is to
say that the output is identical to the input (y[n] = x[n]). Prove this in the time
2
2
z 1
domain and also in the frequency domain.
x[n]
y[n]
Consider a typical signal x[n] and its spectrum X(). Sketch the signals and the cor2
2
z 1
responding spectra at the output of the expander, the output of the interpolating lFigure P6.6-10
ter Hi (), and the output of the compressor.
6.6-11 Equation (6.80) describes the impulse rex[n]
y[n]
sponse for a linear interpolation lter. An
L
Hi ()
L
X()
Y ()
even simpler method is zero-order hold inFigure P6.6-6
terpolation, which is characterized by the
impulse response
6.6-7 Find the frequency response of the system
illustrated in Fig. P6.6-7.
x[n]
X()
H()
y[n]
Y ()
Figure P6.6-7
x[n]
X()
y[n]
Y ()
Figure P6.6-8
6.6-9 A system consists of a sampling-rate compressor of factor M followed by an ideal interpolator of factor M . Relate the output
spectrum Y () of this system to the input
spectrum X(). Under what condition will
this be an identity system? Consider a typical signal spectrum X(). Sketch spectra
at the output of the compressor and the
output of the interpolator.
1
sinc(n/M ).
M
408
(a)
xb [n]
Xb ()
Hb ()
yb [n]
Yb ()
yc [n]
Yc ()
(b)
xc [n]
Xc ()
Hc ()
(c)
Problems
6.6-19 (a) Show that, in general, the operations of upsampling and downsampling do not commute.
(b) Show that upsampling and downsampling do commute when upsampling
factor L and downsampling factor M
are coprime, that is, have a greatest
common divisor of 1.
6.6-20 A signal x[n] = cos(n/6) is decimated
by factor 3 using the same system of
Ex. 6.25. Sketch the decimator output
xd [n].
409
Chapter 7
The z-Transform
7.1
Much like the Laplace transform, the z-transform comes in two avors: bilateral and unilateral. We
begin with the bilateral case and then treat the unilateral case second.
7.1.1
Just as the Laplace transform can be derived from the Fourier transform by generalizing the frequency variable from j to + j, the z-transform can be obtained from the discrete-time Fourier
transform by generalizing the frequency variable from j to +j. In this way, as shown in Sec. 6.7,
the bilateral z-transform and its inverse are given as
X(z) =
x[n] z n
(7.1)
X(z) z n1 dz.
(7.2)
n=
and
x[n] =
In
1
2j
Eq. (7.2), the contour of integration must be chosen in the ROC of X(z).
410
411
8
Here, z = e+j is the complex frequency variable, and indicates integration in a counterclockwise
direction around a closed path in the complex plane (see Fig. 6.36). As in the case of the Laplace
transform, we need not worry about this integral at this point because the inverse z-transforms
of many signals of engineering interest are readily found using z-transform tables. The direct and
inverse z-transforms can be expressed symbolically as
X(z) = Z {x[n]}
x[n] = Z 1 {X(z)}
and
or simply as
Z
x[n] X(z).
Further, note that
Z 1 {Z{x[n]}} = x[n]
Z Z 1 {X(z)} = X(z).
and
To foster greater intuition, it is important to keep in mind the stories that Eqs. (7.1) and (7.2)
tell us about the signal x[n]. In short, Eq. (7.2) suggests that a signal x[n] can be constructed
(synthesized) from a sum (integral) of everlasting complex exponentials z n , each weighted by some
complex scale factor X(z). Equation (7.1) compares (analyzes) the signal x[n] with the exponentials
z n to determine the scale factors X(z). Using this perspective, Eqs. (7.1) and (7.2) are often referred
as the analysis and synthesis equations of the bilateral z-transform. Similar to the Laplace transform,
the limits of summation are from to for the bilateral case and from 0 to for the unilateral
case, to be discussed later.
The Region of Convergence
The sum in Eq. (7.1) dening the direct z-transform X(z) may not converge (exist) for all values
of z. The values of z (the region in the complex plane) for which the sum in Eq. (7.1) converges
(or exists) is called the region of existence or, more commonly, the region of convergence (ROC) for
X(z). This concept will become clear in the following example.
Find the z-transform and the corresponding ROC for the causal signal x[n] = n u[n].
By denition
X(z) =
x[n]z n .
n=
n
The signal x[n] = u[n] is a causal exponential, as depicted in Fig. 7.1a for the case = 0.85. Since
u[n] = 1 for all n 0,
X(z) =
n
n=0
=1+
z
2
z
3
z
+ .
(7.3)
It is helpful to remember the following well-known geometric progression and its sum:
1 + r + r2 + r3 + =
1
1r
if
|r| < 1.
1
1
z
,
z
ROC:
1
X(z).
2jz
<1
z
(7.4)
412
Observe that X(z) exists only for |z| > ||. For |z| < ||, the sum in Eq. (7.3) does not converge but
rather goes to innity. Therefore, the ROC of X(z) is the region in the z-plane outside the circle of
radius || centered at the origin, as shown shaded in Fig. 7.1b. Since z = is the sole pole of X(z),
it is not particularly surprising that |z| = || forms the boundary for the region of convergence.
By their very nature, poles cause nonconvergent behavior. In fact, poles are never found within the
region of convergence.
In Ex. 7.2, we show that the z-transform of the signal n u[n 1] is z/(z ) just like X(z),
although the ROC is |z| < || rather than |z| > ||. Clearly, it is not possible to determine the
original time-domain function unless the ROC is specied. It is necessary to specify the ROC to
avoid ambiguity and to ensure unique z-transform pairs.
x[n]
Im{z}
region of
convergence
||
Re{z}
(b)
(a)
Figure 7.1: (a) x[n] = n u[n] and (b) the region of convergence |z| > || for X(z).
Example 7.1
Find the z-transform and the corresponding ROC for the anti-causal signal y[n] = n u[n 1].
The signal y[n] = n u[n 1] is an anti-causal exponential, as depicted in Fig. 7.2a for the
case = 0.85. Since u[n 1] = 1 for all n 1, Eq. (7.1) yields
1
Y (z) =
n
z
2
3
z
z
z
=
%
$
2
3
z
z
z
+
+ .
=1 1+
+
n=
1
1
z
,
z
ROC:
z
<1
(7.5)
Comparing Y (z) to X(z) from Ex. 7.1, we see that the z-transforms of n u[n] and n u[n 1]
both equal z/(z ). The regions of convergence, however, are dierent. In the former case, X(z)
413
converges for |z| > ||; in the latter, Y (z) converges for |z| < || (see Fig. 7.2b). To be complete
and allow a unique inverse transform, the z-transform must specify the ROC.
y[n]
8
Im{z}
4
n
||
Re{z}
region of
convergence
(b)
(a)
Figure 7.2: (a) y[n] = n u[n 1] and (b) the region of convergence |z| < || for Y (z).
Example 7.2
x[n]z n =
n=0
x[n]
.
zn
n=0
In this case, the existence of the z-transform is guaranteed if, for some |z|,
|X(z)|
|x[n]|
< .
|z|n
n=0
Any signal x[n] that grows no faster than an exponential signal rn , for some real and positive r,
satises this condition. Thus, if
|x[n]| rn
then
n
r
1
=
|X(z)|
r <
|z|
1
|z|
n=0
414
That is, X(z) exists since we are guaranteed a region of convergence that includes |z| > r.
Similar arguments hold for anti-causal and other innite-duration signals. The important point
is that for the z-transform to exist in these cases, a signal cannot grow at a rate faster than some
exponential signal rn . Almost all practical signals satisfy this requirement and are therefore z2
transformable. Some signal models (e.g., n ) grow faster than any choice of exponential signal rn
and are therefore not z-transformable. Fortunately, such signals are of little practical or theoretical
interest. Still, as we shall next see, even such signals are z-transformable when restricted to having
nite duration (length), which is generally the case in practice.
Region of Convergence for Finite-Length Sequences
A nite-length sequence x[n] is a sequence that is zero outside some interval N1 n N2 , where
both N1 and N2 are nite integers. For a nite-length sequence with bounded amplitude, the ROC
is the entire z-plane, except possibly z = 0 or . In other words, the z-transform of such a sequence
converges for any value of z except possibly z = 0 or . If x[n] is nonzero for some negative n, then
|x[n]|/|z n | for z = . In contrast, if x[n] is nonzero for some positive n, then |x[n]|/|z n |
for z = 0. Except these two values of z, |x[n]|/|z|n is nite for any value of z.
Linearity of the Bilateral z-Transform
Although Sec. 7.3 covers the properties of the z-transform in detail, we shall need to make use of
one property, the linearity property, to complete our discussion of the region of convergence. Like
the Laplace transform, the z-transform is a linear operator. Thus, if
Z
and
(7.6)
The proof is trivial and follows from the denition of the z-transform. This result can be extended
to nite sums.
Further Observations of the Region of Convergence
K
Extending the linearity property, if x[n] = k=1 xk [n], then the ROC for X(z) is (at least) the
intersection of the ROCs (region common to all ROCs) for the transforms X1 (z), X2 (z), . . ., XK (z).
This result leads to the conclusion similar to that for the Laplace transform that the ROC for a causal
sequence extends outward from the origin-centered circle that lies on the largest nite-magnitude
pole of X(z). The ROC for an anti-causal sequence extends inward from the origin-centered circle
that lies on the smallest nonzero-magnitude pole of X(z).
These conclusions are readily generalized to right- and left-sided sequences. A right-sided sequence, which is zero for n < N1 for some nite integer N1 , can be expressed as a sum of a causal
sequence and a nite-length sequence. Thus, the ROC for a right-sided sequence begins outside
the origin-centered circle that lies on the largest nite-magnitude pole of X(z) and extends to, but
possibly excludes, z = . Only if x[n] is nonzero for some negative n is z = excluded.
Similarly, a left-sided sequence, which is zero for n > N2 for some nite integer N2 , can be
expressed as a sum of an anti-causal sequence and a nite-length sequence. The ROC for a leftsided sequence begins inside the origin-centered circle that lies on the smallest nonzero-magnitude
pole of X(z) and extends to, but possibly excludes, z = 0. Only if x[n] is nonzero for some positive
n is z = 0 excluded.
A two-sided sequence that is of innite duration in both directions can be expressed as a sum of
a right-sided sequence and a left-sided sequence. If there is overlap between the individual ROCs
of these two pieces, the ROC of the two-sided sequence will take an annular shape. Even if the
415
z-transforms of two component pieces exist, the z-transform of the combined two-sided sequence
does not exist if there is no overlap between the individual ROCs.
y[n]
z
with ROC |z| > 0.9
z 0.9
Y (z) =
z
with ROC |z| < 1.2.
z 1.2
and
The common region where both X(z) and Y (z) converge is 0.9 < |z| < 1.2. Hence,
W (z) = X(z) + Y (z)
z
z
=
+
z 0.9 z 1.2
0.3z
,
=
(z 0.9)(z 1.2)
Figure 7.3 depicts the sequence w[n] and the annular ROC of W (z).
w[n]
Im{z}
0.9
1.2
Re{z}
4
(a)
n
(b)
Figure 7.3: (a) w[n] = (0.9)n u[n] + (1.2)n u[n 1] and (b) the ROC 0.9 < |z| < 1.2 for W (z).
When x[n] = 2n u[n] rather than (0.9)n u[n], the ROC of X(z) becomes |z| > 2. In this case,
Rx Ry = , and the z-transform of w[n] does not exist.
Example 7.3
416
7.1.2
Whether it is discrete-time or continuous-time, we most often deal with causal signals in practice.
When we observe the restriction of causality, the z-transform is called the unilateral z-transform
and is given as
x[n] z n .
(7.7)
X(z) =
n=0
The only dierence between Eq. (7.7) and bilateral case of Eq. (7.1) is the lower limit of summation.
Quite simply, the unilateral z-transform is just a special case of the bilateral z-transform. Although
the type of z-transform is normally easy to infer, to help avoid ambiguity, the unilateral z-transform
is sometimes denoted symbolically as
X(z) = Zu {x[n]}
or simply as
Z
u
x[n]
X(z).
Since the unilateral z-transform is only used with causal signals, its region of convergence can
be inferred and thus need not be specied. The inverse of the unilateral z-transform does not dier
from that of the bilateral case and is thus represented by Eq. (7.2). As in the case of the unilateral
Laplace transform, there are two primary reasons to use the unilateral z-transform. First, the
unilateral z-transform can be more convenient than the bilateral case, particularly since there is no
need to specify any ROCs. Second, the unilateral transform better facilitates the analysis of linear
constant-coecient dierence equations that possess nonzero initial conditions. This will become
more clear in Sec. 7.3, which covers the properties of the z-transform.
Using the denition of Eq. (7.7), determine the unilateral z-transforms of (a) xa [n] = [n], (b)
xb [n] = u[n], (c) xc [n] = cos(n)u[n], and (d) xd [n] = u[n] u[n 5].
From Eq. (7.7),
X(z) =
x[n]z n = x[0] +
n=0
(a)
For xa [n] = [n], xa [0] = 1 and xa [2] = xa [3] = xa [4] = = 0. Therefore,
Z
u
Xa (z) = 1,
xa [n] = [n]
ROC: all z.
(b)
For xb [n] = u[n], x[0] = x[1] = x[2] = = 1. Therefore,
Xb (z) = 1 +
1
1
1
+ 2 + 3 + .
z
z
z
1
z
z
,
=
z1
ROC:
1
< 1 or |z| > 1.
z
(c)
Recall that cos(n) = ejn + ejn /2. Moreover, as demonstrated in Ex. (7.1),
Z
ejn u[n]
z
,
z ej
(7.8)
417
Therefore,
z
z
+
z ej
z ej
z[z cos()]
,
ROC: |z| > 1.
= 2
z 2 cos()z + 1
1
Xc (z) =
2
(d)
Here, xd [0] = xd [1] = xd [2] = xd [3] = xd [4] = 1 and xd [5] = xd [6] = = 0. Therefore,
1
1
1
1
+ 2+ 3+ 4
z
z
z
z
z4 + z3 + z2 + z + 1
=
,
ROC: all z = 0.
z4
We can also express this result in a more compact form by utilizing the geometric progression
sum. Using entry 1 of Table 5.1 on page 290, we obtain
Xd (z) = 1 +
Xd (z) =
( 1z )0 ( 1z )5
z
(1 z 5 ),
=
z1
1 z1
ROC: all z = 0.
Example 7.4
Table 7.1 gives a short table of selected bilateral z-transform pairs, including their ROCs. Entries
111, which involve causal signals x[n], double as a table of unilateral transforms, in which case
specication of the ROC is unnecessary. Entry 12 is either causal or anti-causal depending on k.
Entries 1315 involve anti-causal signals and therefore do not possess a unilateral z-transform. Most
practical applications involve only causal signals and can therefore be treated with the unilateral
z-transform, entries 111 (no ROC needed), and entry 12 with k > 0.
(a) Determine the z-transform of the signal xa [n] = u[n 4] u[n 10] shown in Fig. 7.4.
(b) Use linearity and pair 10 of Table 7.1 to determine the z transform of
n 1.415 u[n].
xb [n] = 20.65( 2)n cos
4
xa [n]
1
12
h[n]z n .
(7.9)
H(z) =
n=
418
x[n]
X(z)
ROC
1.
[n]
All z
2.
u[n]
z
z1
|z| > 1
3.
u[n]
z
z
|z| > ||
4.
n1 u[n 1]
|z| > ||
5.
n u[n]
1
z
z
(z)2
6.
n2 n u[n]
z(z+)
(z)3
|z| > ||
7.
n!
nm
u[n]
(nm)!m!
z
(z)m+1
|z| > ||
8.
|| cos(n)u[n]
z[z|| cos()]
z 2 2|| cos()z+||2
|z| > ||
9.
||n sin(n)u[n]
z|| sin()
z 2 2|| cos()z+||2
|z| > ||
10.
|z| > ||
(0.5e )z
z||ej
|z| > ||
(0.5e
)z
z||ej
z(az+b)
z 2 +2cz+||2
12.
[n k]
z k
13.
u[n 1]
z
z1
|z| < 1
14.
n u[n 1]
15.
n u[n 1]
z
z
z
(z)2
11.
|z| > ||
|| c
|z| < ||
|z| < ||
(7.10)
This important result relates the time-domain specication h[n] of a system to the transform-domain
specication H(z). The result is parallel to that for LTIC systems.
Connection between the DTFT and the z-Transform
Since we use the same notation X() for both the z-transform and the DTFT, in this subsection
we shall subscript all z-transforms with a z to help avoid confusion between the two. Thus, the
419
DTFT of signal x[n] is denoted X(), and following Eq. (7.1), the z-transform is written as
Xz (z) =
x[n]z n .
n=
x[n]ejn .
(7.11)
n=
As we can see by referring to Eq. (6.1), the right-hand-side sum of Eq. (7.11) denes X(), the
DTFT of x[n]. Does this mean that the DTFT can be obtained from the corresponding z-transform
by setting z = ej ? In other words, is it true that Xz (ej ) = X()? In most cases, the answer is
yes. For example, when x[n] = n u[n], its z-transform is z/(z ), and Xz (ej ) = ej /(ej ),
which is equal to X() (assuming || < 1). However, for the unit step function u[n], the z-transform
is z/(z 1), and Xz (ej ) = ej /(ej 1). As seen from pair 11 of Table 6.1 (page 340), this is not
equal to the DTFT of u[n].
We obtain Xz (ej ) by setting z = ej in Eq. (7.11). This implies that the sum on the right-hand
side of Eq. (7.11) converges for z = ej , which means the unit circle (characterized by z = ej ) lies
in the ROC for Xz (z). Hence, setting z = ej in Xz (z) yields the DTFT X() only when the ROC
for X(z) includes the unit circle. This condition holds for all x[n] that are absolutely summable. If
the ROC of Xz (z) excludes the unit circle, Xz (ej ) = X(). This applies to all non-decaying x[n].
The reason for this peculiar behavior has something to do with the nature of convergence of the
z-transform and the DTFT.
The connection between the z-transform and the DTFT also applies to system functions Hz (ej )
and H(). Recall that for a BIBO or asymptotically stable LTID system, the impulse response h[n]
is absolutely summable. Hence, for a BIBO stable system, the DTFT of h[n] is identical to the
systems transfer function Hz (z) with z = ej , which is to say that
Hz (ej ) = H() for BIBO or asymptotically stable systems.
7.2
The ROC, either explicitly stated as in the case of the bilateral z-transform or possibly inferred as
in the case of the unilateral z-transform, is required to determine x[n] from X(z). For example,
the integral in Eq. (7.2) is a contour integral whose path of integration is counterclockwise along a
closed path that lies within the ROC. Without an ROC, it is not possible to locate a suitable path
of integration to evaluate Eq. (7.2).
As it requires a background in complex variable theory, we often avoid the integration of Eq. (7.2)
and determine inverse z-transforms through the use of tables, such as Table 7.1. Take, for example,
X(z) = z/(z 1). If the ROC is |z| > 1, then the inverse is x[n] = u[n] (entry 2). If, however, the
ROC is |z| < 1, then the inverse is x[n] = u[n 1] (entry 13). Without an ROC, however, it is
impossible to know whether the inverse is u[n] or u[n 1]. The ROC ensures that x[n] and X(z)
form a unique transform pair.
To further explain this point, consider the unit step function u[n] and its transforms. Both the z-transform and
the DTFT synthesize x[n] using everlasting exponentials of the form z n . For the z-transform, the value of z has the
freedom to be anywhere outside the unit circle (|z| > 1), but it is restricted to the unit circle (z = ej ) in the case of
the DTFT. This restriction necessitates a more complex DTFT spectrum (extra terms) to synthesize u[n] than does
the relatively simple z-transform spectrum X(z) = z/(z 1). In contrast, when x[n] is absolutely summable, the
region of convergence for the z-transform includes the unit circle, and both transforms can synthesize x[n] by using z
along the unit circle. This leads to Xz (ej ) = X().
Typically, the path is chosen as a circle that is centered at the origin. However, a closed path of arbitrary shape,
as long as it is counterclockwise and fully contained within the ROC, yields the same result, namely, x[n].
420
Many of the transforms X(z) of practical interest are rational functions (ratios of polynomials
in z), which can be expressed as a sum of partial fractions, whose inverse transforms can be readily
found using even short tables of transform pairs. Basic methods for computing partial fraction
expansions, such as the method of clearing fractions and the method of residues, are covered in most
introductory signals texts, such as [1], and are not covered in detail here. Rather, we demonstrate
the approach through a series of examples.
Using partial fraction expansions and Table 7.1, determine the inverse unilateral z-transforms of
(a) Xa (z) =
8z19
(z2)(z3)
(b) Xb (z) =
z(2z 2 11z+12)
(z1)(z2)3
(c)
Xc (z) =
2z(3z+17)
(z1)(z 2 6z+25)
Here, the poly command converts the roots at z = 2 and z = 3 into the expanded polynomial
coecient vector required by the residue command. Vector r provides the residues (fraction coecients), vector p provides the roots, and k provides the direct terms, if any. Thus, the partial
fraction expansion of Xa (z) is
5
3
+
.
Xa (z) =
z2 z3
Since X(z) is a unilateral z-transform, the ROC is implied as outside the circle |z| > 3. From pair
4 of Table 7.1, we obtain
xa [n] = 3(2)n1 + 5(3)n1 u[n 1].
(7.12)
Notice that when we expand a rational (unilateral) transform X(z) into partial fractions directly,
we shall always obtain an answer that is multiplied by u[n 1]. Such a form is rather unnatural
as well as inconvenient. We prefer a form that contains u[n] rather than u[n 1]. A glance at
Table 7.1 shows that the z-transform of every signal that is multiplied by u[n] has a factor z in the
numerator. This observation suggests that we expand X(z) into modied partial fractions, where
each term has a factor z in the numerator. This goal can be accomplished by expanding X(z)/z
into partial fractions and then multiplying both sides by z. To demonstrate, we rst use MATLAB
8z19
to expand Xa (z)/z = z(z2)(z3)
.
02
Thus,
Xa (z)
(19/6) (3/2) (5/3)
=
+
+
.
z
z
z2
z3
Multiplying both sides by z yields the modied partial fraction expansion of
z
z
19 3
5
Xa (z) = +
+
.
6
2 z2
3 z3
From pairs 1 and 3 in Table 7.1, it follows that
xa [n] =
!
3
19
5
[n] + (2)n + (3)n u[n].
6
2
3
421
The reader can verify that this answer is equivalent to that in Eq. (7.12) by computing x[n] in both
cases for n = 0, 1, 2, 3, . . . and then comparing the results.
(b) Repeated Poles
To provide some review, we compute the modied partial fraction expansion by hand and then later
verify the result using MATLAB. In this case,
Xb (z) =
and
Xb (z)
2z 2 11z + 12
a0
k
a1
a2
=
+
.
=
+
+
z
(z 1)(z 2)3
z 1 (z 2)3
(z 2)2
(z 2)
Using the Heaviside cover-up method, we obtain
2
2z 11z + 12
k=
= 3
(z 1) (z 2)3
z=1
2z 11z + 12
a0 =
(z 1) (z 2)3
and
= 2.
z=2
Therefore,
Xb (z)
3
2
a1
a2
=
.
(7.13)
+
+
z
z 1 (z 2)3
(z 2)2
(z 2)
We can determine a1 and a2 by the method of residues, clearing fractions, or we may employ any of
various short cuts. For example, to determine a2 , we multiply both sides of Eq. (7.13) by z and let
z . This yields
0 = 3 0 + 0 + a2 = a2 = 3.
This result leaves only one unknown, a1 , which is readily determined by letting z take any convenient
value, say, z = 0, on both sides of Eq. (7.13). This step yields
1 a1
3
12
=3+ +
= a1 = 1.
8
4
4
2
MATLAB conrms these results with substantially less eort.
03
+
z
z 1 (z 2)3
(z 2)2
z2
and
z
z
z
z
2
.
+3
z1
(z 2)3
(z 2)2
z2
Recognizing that the result must be causal, pairs 3 and 7 of Table 7.1 yield
!
n(n 1) n n n
xb [n] = 3 2
(2) (2) + 3(2)n u[n]
8
2
!
1 2
= 3 + (n + n 12)2n u[n].
4
Xb (z) = 3
422
Thus,
Xc (z) =
2z(3z + 17)
2z(3z + 17)
=
.
(z 1)(z 2 6z + 25)
(z 1)(z 3 j4)(z 3 + j4)
The poles of Xc (z) are 1, 3 + j4, and 3 j4. Whenever there are complex-conjugate poles, the
problem can be worked out in two ways. In the rst method, we expand Xc (z) into (modied)
rst-order partial fractions. In the second method, rather than obtain one factor corresponding to
each complex-conjugate pole, we obtain quadratic factors corresponding to each pair of complexconjugate poles. These two approaches are considered in turn.
Method of First-Order Factors
Note that
2(3z + 17)
k1
k2
k2
Xc (z)
=
=
+
+
.
z
(z 1)(z 3 j4)(z 3 + j4)
z 1 z 3 j4 z 3 + j4
Next, we use MATLAB to determine the partial fraction expansion of Xc (z)/z. It is likewise possible
to perform the expansion by hand using the Heaviside cover-up method or other techniques.
05
Xc (z)
2
1 j1.25 1 + j1.25
=
+
+
z
z1
z 3 j4
z 3 + j4
and
Xc (z) =
(1 j1.25)z (1 + j1.25)z
2z
+
+
.
z1
z 3 j4
z 3 + j4
Since the result must be causal, the inverse transform of the rst term on the right-hand side is
2u[n]. The inverse transform of the remaining two terms (complex-conjugate poles) can be obtained
by scaling pair 10 (Table 7.1) by r = 2| 1 j1.25| = 3.2016 and identifying || = |3 + j4| = 5,
= (3 + j4) = 0.9273, and = (1 j1.25) = 2.2455. Therefore,
xc [n] = [2 + 3.2016(5)n cos(0.9273n 2.2455)] u[n].
(7.14)
2(3z + 17)
2
2z + B
Xc (z)
=
=
+
.
z
(z 1)(z 2 6z + 25)
z 1 z 2 6z + 25
423
Xc (z)
2
2z + 16
=
+ 2
z
z 1 z 6z + 25
and
Xc (z) =
2z
z(2z + 16)
+
.
z 1 z 2 6z + 25
=
tan
r = 100+256192
=
3.2016,
=
cos
259
5
8
As expected, these values produce a result that is identical to Eq. (7.14),
xc [n] = [2 + 3.2016(5)n cos(0.9273n 2.2455)] u[n].
Example 7.5
Using partial fraction expansions and Table 7.1, determine the inverse bilateral z-transform of
X(z) =
z(z + 0.4)
(z 0.8)(z 2)
if the ROC is (a) |z| > 2, (b) |z| < 0.8, and (c) 0.8 < |z| < 2.
Using MATLAB, we rst expand X(z) into modied partial fractions.
01
Thus,
X(z)
(z + 0.4)
1
2
=
=
z
(z 0.8)(z 2)
z 0.8 z 2
and
X(z) =
z
z
2
.
z 0.8
z2
424
10
xa [n]
10
10
xb [n]
10
n
2000
10
(a)
(b)
xc [n]
1
10
10 n
(c)
Figure 7.5: Inverse transforms of X(z) given ROCs: (a) |z| > 2, (b) |z| < 0.8, and (c) 0.8 < |z| < 2.
Example 7.6
Xa (z) =
Xc (z) =
z(2z1)
(z1)(z+0.5)
9
(z+2)(z0.5)2
(b)
(d)
Xb (z) =
Xd (z) =
1
(z1)(z+0.5)
5z(z1)
z 2 1.6z+0.8
425
By using Eq. (5.33) and taking the inverse z-transform of H(z), nd the impulse response h[n] of the
following causal LTID systems from Drill 5.4:
(a) y[n + 2] 5y[n + 1] + 6y[n] = 8x[n + 1] 19x[n]
(b) y[n + 2] 4y[n + 1] + 4y[n] = 2x[n + 2] 2x[n + 1]
(c) y[n] = x[n] 2x[n 1]
z
z 2 + 56 z +
1
6
ROC:
1
1
< |z| < .
3
2
7.2.1
Although most transforms of interest are rational functions and thus eciently inverted using partial
fraction expansion techniques, it is also possible to invert the transforms of causal and anti-causal
sequences using power series expansions. This technique is particularly useful in cases where the
transform X(z) is not a rational function or if only the rst few terms of x[n] are needed.
Let us consider a causal signal x[n] = x[n]u[n] rst. By denition,
X(z) =
x[n]z n
n=0
= x[0] +
This result is a power series in z 1 . Therefore, if we can expand the transform X(z) of a causal signal
x[n] into a power series in z 1 , the coecients of this power series can be identied as x[0], x[1], x[2],
x[3], and so on. In many cases, a suitable expansion is obtained using a Taylor or Maclaurin series
of X(z). Further, a rational X(z) can be expanded into a power series in z 1 through polynomial
long division. For example, consider a causal signal with transform given by
X(z) =
7z 3 2z 2
z 2 (7z 2)
= 3
.
(z 0.2)(z 0.5)(z 1)
z 1.7z 2 + 0.8z 0.1
426
Thus,
X(z) =
z 2 (7z 2)
= 7 + 9.9z 1 + 11.23z 2 + 11.87z 3 +
(z 0.2)(z 0.5)(z 1)
and
x[0] = 7, x[1] = 9.9, x[2] = 11.23, x[3] = 11.87, . . . .
Although this procedure yields x[n] directly, it suers from the disadvantage that it generally does
not produce a simple closed-form solution.
The treatment of an anti-causal signal x[n] = x[n]u[n 1] is similar. By denition,
1
X(z) =
x[n]z n
n=
Using a power series expansion, determine the anti-causal signal x[n] that has z-transform
ROC: |z| < .
X(z) = zez ,
Recall that the Taylor series of function f (x) using expansion point a is given as
f (x) =
f (k) (a)
k!
k=0
(x a)k ,
(7.15)
where f (k) (a) denotes the kth derivative of f (x) evaluated at x = a. A Maclaurin series is a special
case of a Taylor series with a = 0.
To expand X(z), we rst compute the Maclaurin series of ez . Since all derivatives of ez evaluated
at z = 0 are 1, the Maclaurin series is
z
e =
zk
k=0
Thus,
X(z) = zez =
k!
=1+
z k+1
k=0
k!
z
z2
z3
+
+
+ .
1!
2!
3!
=z+
z2
z3
z4
+
+
+ .
1!
2!
3!
[n + k + 1]
k=0
k!
= [n + 1] +
[n + 2] [n + 3] [n + 4]
+
+
+ .
1!
2!
3!
As shown in Fig. 7.6, the rapid decay of x[n] makes it eectively timelimited, which helps explain
why the ROC of X(z) includes the entire z-plane except |z| = .
427
x[n]
1
Figure 7.6: Anti-causal signal x[n] obtained from Maclaurin series expansion of X(z) = zez .
Example 7.7
Using polynomial long division, determine the inverse z-transform of X(z) = z/(z 0.5) if the ROC is (a)
|z| > 0.5 and (b) |z| < 0.5.
7.3
A variety of properties are useful in the derivation and computation of many z-transforms and in
the solution of linear dierence equations with constant coecients. Here we consider a selection of
the most important properties of both the bilateral and unilateral z-transforms.
In our discussion, the variable n appearing in signals, such as x[n], y[n], etc., may or may not
stand for time. However, in most applications of our interest, n is proportional to time. For this
reason, we shall loosely refer to variable n as time.
7.3.1
Linearity Property
As shown in Sec. 7.1.1 with Eq. (7.6), the bilateral z-transform is a linear operator. This result also
holds for the unilateral z-transform, although the ROC need not be specied. Thus, if
Z
u
X(z)
x[n]
then
and
u
y[n]
Y (z),
u
aX(z) + bY (z).
ax[n] + by[n]
(7.16)
The proof is again trivial and follows directly from the denition of the unilateral z-transform.
7.3.2
Complex-Conjugation Property
n
n
x [n]z
=
x[n](z )
= X (z ).
Z {x [n]} =
n=
n=
(7.17)
428
7.3.3
Much as we saw with the DTFT in Sec. 6.2.4, it is tricky to represent a general time-scaling property
for the z-transform. The primary reason for this diculty is that a DT time-scaling operation almost
always alters the fundamental nature of the time-domain signal. It follows that the transform of
such a radically altered signal will signicantly dier from the original signals transform. Two
exceptions, however, are the cases of simple upsampling and time reversal.
If a signal x[n] is upsampled by factor L (meaning that L 1 zeros are inserted between each
sample of x[n]), then the z-transform of the upsampled signal x [n] can be represented as a simple
function of X(z), the z-transform of x[n]. Specically,
Z
(7.18)
This result applies to both the unilateral and bilateral cases of the z-transform, although the ROC
in the bilateral case must be modied by changing z to z L . We have already derived this result for
the DTFT (see Eq. (6.74)), and the Prob. 7.3-2 proof of Eq. (7.18) is similar.
For the bilateral z-transform, the time-reversal property states that
Z
if x[n] X(z) with ROC Rx , then x[n] X(1/z) with ROC 1/Rx .
(7.19)
The inverted region of convergence 1/Rx is obtained from Rx by replacing z with 1/z. For example,
if Rx is |1 | < |z| < |2 |, then 1/Rx is given by |1 | < |1/z| < |2 | or, more simply, by 1/|2 | < |z| <
1/|1 |. To prove this property, note that
Z {x[n]} =
x[n]z n .
n=
x[k]z =
k=
x[k](1/z)k = X(1/z).
k=
Using the time-reversal property and pair 2 in Table 7.1, show that
Z
u[n]
1
with ROC |z| < 1.
z1
7.3.4
Time-Shifting Property
In the following discussion of the time-shifting property, we deal with various forms of shifting, such
as x[n m], x[n m]u[n m], and x[n m]u[n]. Unless we physically understand the meaning of
such shifts, an understanding of the shifting property remains mechanical rather than intuitive or
heuristic. For this reason, Fig. 7.7 illustrates these various shifts for a hypothetical signal x[n] and
m = 1.
We
only need to consider the bilateral case of the z-transform since time reversal changes a causal signal into a
noncausal signal, which is unsuited to the unilateral z-transform.
429
x[n]u[n]
x[n]
5
(a)
(d)
x[n 1]u[n 1]
x[n 1]
5
(b)
(e)
x[n 1]u[n]
5
(f)
x[n (1)]
x[n (1)]u[n]
(c)
(g)
if x[n] X(z) with ROC Rx , then x[n m] z m X(z) with ROC almost Rx .
(7.20)
The new ROC is identical to Rx except for the possible addition or deletion of z = 0 or |z| =
caused by the factor z m . Using the intermediate change of variable k = n m, the proof of this
property is given as
Z {x[n m]} =
n=
x[n m]z n =
k=
430
u
x[n]u[n]
X(z),
then
u
z 1 X(z).
x[n 1]u[n 1]
This result is similar to that for the bilateral z-transform since the signal x[n 1]u[n 1] (Fig. 7.7e)
relocates, but does not change, the original signal x[n]u[n] (Fig. 7.7d). More generally,
Z
u
z m X(z), (m > 0).
x[n m]u[n m]
(7.21)
A more interesting case occurs when we look at x[n 1]u[n], which has
Z
u
x[n 1]u[n]
z 1 X(z) + x[1].
In this case, x[n 1]u[n] (Fig. 7.7f) is just x[n 1]u[n 1] (Fig. 7.7e) plus an extra term x[1][n].
It is this extra term that produces the extra term x[1] in the transform. Thought of another way,
x[n 1]u[n] (Fig. 7.7f) not only relocates but also changes the original signal x[n]u[n] (Fig. 7.7d).
Repeating this step yields
Zu
z 1 z 1 X(z) + x[1] + x[2]
x[n 2]u[n]
= z 2 X(z) + z 1 x[1] + x[2].
In general,
Z
u
x[n m]u[n]
z m X(z) + z m
(7.22)
n=1
Notice that a right shift produces the same number of extra terms in both the time domain and the
transform domain.
To prove Eq. (7.21), note that
Zu {x[n m]u[n m]} =
n=0
Since m > 0 and x[n m]u[n m] = 0 for n < m, the limits of summation can be taken from n = m
to . Therefore,
Zu {x[n m]u[n m]} =
x[n m]z n .
n=m
k=0
n=0
x[k]z (k+m)
k=m
= z m
k=0
x[k]z k +
1
x[k]z k
k=m
Recognizing the rst sum as X(z) and letting n = k in the second sum, Eq. (7.22) directly follows.
431
u
x[n (1)]u[n]
zX(z) zx[0].
Here, x[n (1)]u[n] (Fig. 7.7g) is a left shift of the original signal x[n]u[n] (Fig. 7.7d) minus the
term x[0][n 1]. This lost term produces the term zx[0] in the transform. Repeating this step
yields
Zu
x[n (2)]u[n]
z (zX(z) zx[0]) zx[1] = z 2 X(z) z 2 x[0] zx[1].
In general,
Z
u
x[n m]u[n]
z m X(z) z m
m1
(7.23)
n=0
n=0
x[k]z (k+m)
k=m
= z m
x[k]z k
k=0
m1
1
x[k]z k
k=0
Recognizing the rst sum as X(z) and replacing the second sum variable k with n, Eq. (7.23) directly
follows.
x[n]
5
Figure 7.8: Signal x[n] = n(u[n] u[n 6]) for Ex. 7.8.
The signal x[n] can be expressed as a product of n and the gate pulse u[n] u[n 6]. Therefore,
x[n] = n(u[n] u[n 6]) = nu[n] nu[n 6].
432
We cannot nd the z-transform of nu[n6] directly by using the right-shifting property of Eq. (7.21).
Thus, we express x[n] in terms of (n 6)u[n 6] as
x[n] = nu[n] {(n 6)u[n 6] + 6u[n 6]} .
We can now nd the z-transform of the bracketed term by using the right-shifting property of
Zu
z
Eq. (7.21). Because u[n]
z1 ,
Z
u
u[n 6]
u
Also, because nu[n]
1
1 z
= 5
.
z6 z 1
z (z 1)
z
(z1)2 ,
Z
u
(n 6)u[n 6]
z
1
1
= 5
.
6
2
z (z 1)
z (z 1)2
Therefore,
X(z) =
z
1
6
z 6 6z + 5
.
=
(z 1)2
z 5 (z 1)2
z 5 (z 1)
z 5 (z 1)2
Example 7.8
u
Using only the fact that u[n]
of the signal xa [n] in Fig. 7.4.
z
z1
7.3.5
then
(7.24)
n=
x[n]z
n
z
z
=
x[n]
=X
.
n=
If a point z is in the ROC Rx of X(z), then the point ||z is in the ROC of X(z/). Put another
way, scaling the z variable predictably requires the ROC to be scaled by the same amount.
Using Eq. (7.24), derive pairs 3 and 14 in Table 7.1 from pairs 2 and 13, respectively.
7.3.6
433
If
nx[n] z
d
X(z) with ROC Rx .
dz
(7.25)
d
d
X(z) =
x[n]z n =
nx[n]z n1 .
dz
dz n=
n=
d
n1
z X(z) = z
nx[n]z
=
nx[n]z n = Z {nx[n]} .
dz
n=
n=
Using Eq. (7.25), derive pairs 5 and 6 in Table 7.1 from pair 3. What is the z-transform of x[n] = n3 u[n]?
7.3.7
(7.26)
By moving to the transform domain, the simple operation of multiplication replaces the cumbersome
and often dicult time-domain operation of convolution.
To prove Eq. (7.26), we begin with
Z {x[n] y[n]} = Z
2
x[m]y[n m]
m=
n=
1
x[m]y[n m] z n .
m=
m=
There
x[m]
y[n m]z n .
n=
This property requires an understanding of complex contour integration and is outside the scope of this book.
434
Z {x[n] y[n]} =
=
m=
x[m]
y[k]z (k+m)
k=
x[m]z m
m=
k=
Since the transforms X(z) and Y (z) must both simultaneously exist, the ROC of X(z)Y (z) generally
equals Rx Ry , although certain pole cancellations may increase the ROC. Table 7.2 summarizes
the most important properties of the z-transform.
Bilateral z-Transform
x[n] =
X(z) =
Synthesis:
8
1
X(z) z n1 dz
2j
Analysis:n
, ROC: Rx
n= x[n] z
Linearity:
x[n] =
Synthesis:
8
1
X(z) z n1 dz
2j
Analysis:
X(z) = n=0 x[n] z n
Linearity:
Unilateral z-Transform
u
ax[n]+by[n]
aX(z)+bY (z)
Complex Conjugation:
Z
x [n] X (z ), ROC: Rx
u
x [n]
X (z )
Time Reversal:
Time Reversal:
x[n m] z
Time Shifting:
Z
u
If m > 0: x[n m]u[n m]
z m X(z)
(general case given below)
z-Domain Scaling:
z-Domain Scaling:
u
n x[n]
X(z/)
z-Domain Dierentiation:
z-Domain Dierentiation:
nx[n]
d
z dz
X(z),
ROC: Rx
u
d
nx[n]
z dz
X(z)
Time Convolution:
Time Convolution:
u
x[n] y[n]
X(z)Y (z)
435
(7.27)
Further, as long as Y (z) exists, which is to say it has a non-empty ROC, then the zero-state response
y[n] is given as
y[n] = Z 1 {X(z)H(z)} .
(7.28)
Often, it is easier to compute y[n] using Eq. (7.28) rather than the time-domain convolution operation
x[n] h[n]. Section 7.4 develops these ideas further and provides several examples.
Using the (time-domain) convolution property of Eq. (7.26) and appropriate pairs in Table 7.1, show that
u[n] u[n 1] = nu[n].
7.3.8
While generally not as useful as the properties already discussed, the initial value and nal value
theorems provide simple and quick means to relate the initial and nal values of a causal signal x[n]
to its transform X(z). These relations can serve as a partial check on the correctness of a computed
z-transform.
Restricting our attention to a causal signal x[n], the initial value theorem states that
x[0] = lim X(z).
z
(7.29)
z1
436
u
x[n] x[n 1]
1
(z 1)X(z)
1
X(z) =
z
z
and
(z 1)X(z) = lim
z1
z1
= lim
lim
N
N
n=0
1
(x[n] x[n 1])z
n+1
n=0
n=0
= lim x[N ].
N
7.4
The time-shifting property sets the stage for solving linear dierence equations with constant coecients. As in the case of the Laplace transform with dierential equations, the z-transform converts
dierence equations into algebraic equations that are readily solved to nd the solution in the zdomain. Taking the inverse z-transform of the z-domain solution yields the desired time-domain
solution. When initial conditions are present, the unilateral z-transform is generally the appropriate analysis tool. When only the zero-state response is required, either the bilateral or unilateral
z-transform may be appropriate. The following examples demonstrate these cases.
37
Given input x[n] = (0.5)n u[n] and initial conditions y[1] = 11
6 and y[2] = 36 , use the unilateral
z-transform to solve the second-order (K = 2) constant-coecient linear dierence equation
(7.31)
As we shall see, dierence equations can be solved by using the right-shifting property or the leftshifting property. Because the system of Eq. (7.31) is in advance form, the use of the left-shifting
property may seem appropriate for its solution. Unfortunately, as seen from Eq. (7.23), the leftshifting property requires a knowledge of the auxiliary conditions y[0], y[1], . . . , y[K 1] rather than
of the initial conditions y[1], y[2], . . . , y[K], which are generally given. This diculty can be
overcome by expressing Eq. (7.31) in delay form (obtained by replacing n with n 2) and then using
the right-shifting property. Expressed in delay form, Eq. (7.31) is
y[n] 5y[n 1] + 6y[n 2] = 3x[n 1] + 5x[n 2].
(7.32)
We now use the right-shifting property to take the (unilateral) z-transform of this equation. But
before proceeding, we must be clear about the meaning here of a term such as y[n 1]. Does it
mean y[n 1]u[n 1] or y[n 1]u[n]? Since a unilateral z-transform is being used, multiplication
Another
approach is to nd y[0], y[1], y[2], . . . , y[K 1] from y[1], y[2], . . . , y[K] iteratively, as in Sec. 5.1,
and then apply the left-shifting property.
437
by the unit step u[n] is implied. Thought of another way, any equation with initial conditions has
some time reference (usually n = 0), and every term is referenced from this instant. Hence, y[n 1]
means y[n 1]u[n]. Remember also that although we are considering the solution for n 0, y[n] is
present even before n = 0 (in the form of initial conditions).
Applied to the output terms, the right-shifting property of Eq. (7.22) yields
Z
u
Y (z),
y[n]u[n]
u
z 1 Y (z) + y[1] = z 1 Y (z) +
y[n 1]u[n]
11
,
6
u
and y[n 2]u[n]
z 2 Y (z) + z 1 y[1] + y[2] = z 2 Y (z) +
11 1 37
z + .
6
36
u
z m X(z), (m > 0).
x[n m]u[n] = x[n m]u[n m]
u
x[n]u[n]
X(z) =
1 5z 1 + 6z 2 Y (z) 3 11z 1 =
5
3
+
,
z 0.5 z(z 0.5)
(7.33)
2
z 3z 2 9.5z + 10.5
z 5z + 6 Y (z) =
(z 0.5)
and
Y (z)
(3z 2 9.5z + 10.5)
=
.
z
(z 0.5)(z 2 5z + 6)
Next, we expand this result using MATLAB. As shown in Sec. 5.5.2 (page 299), the DT convolution
conv([1 -.5],[1 -5 6]) computes the coecients of the expansion (z 0.5)(z 2 5z + 6) = z 3
5.5z 2 + 8.5z 3, which is the format required by the residue command.
01
Thus,
Y (z)
(26/15) (7/3) (18/5)
=
+
z
z 0.5
z2
z3
and
Y (z) =
26
15
z
z 0.5
7
3
z
z2
18
5
z
z3
438
(7.34)
This example demonstrates the ease with which linear dierence equations with constant coecients
can be solved by z-transform. This method is general; it can be used to solve a single dierence
equation or a set of simultaneous dierence equations of any order as long as the equations are linear
with constant coecients.
Example 7.9
Given input x[n] = u[n] and initial conditions y[1] = 2 and y[2] = 0, use the unilateral z-transform to
solve the second-order (K = 2) constant-coecient linear dierence equation
y[n + 2]
1
5
y[n + 1] + y[n] = 5x[n + 1] x[n].
6
6
Drill 7.12 (z-Transform Solution Using Initial Conditions y[0], y[1], . . ., y[K 1])
Given input x[n] = u[n] and initial conditions y[0] = 1 and y[1] = 2, use the unilateral z-transform to solve
the second-order (K = 2) constant-coecient linear dierence equation
y[n] + 3y[n 1] + 2y[n 2] = x[n 1] + 3x[n 2].
439
z(3z 11)
z(3z + 5)
.
+
z 2 5z + 6 (z 0.5)(z 2 5z + 6)
ZIR
ZSR
+
z2
z3
15 z 0.5
3 z2
5 z3
ZIR
ZSR
Inverting, we obtain
!
26
22
28
y[n] = [5(2)n 2(3)n ] u[n] +
(0.5)n (2)n + (3)n u[n]
15
3
5
ZIR
ZSR
!
26
7 n 18 n
n
(0.5) (2) + (3) u[n],
=
15
3
5
which agrees with the result in Eq. (7.34).
Given input x[n] = u[n] and initial conditions y[1] = 2 and y[2] = 0, use the unilateral z-transform to
determine the ZIR and ZSR of
y[n + 2]
5
1
y[n + 1] + y[n] = 5x[n + 1] x[n].
6
6
7.4.1
(7.35)
Recall from Sec. 5.2 that Eq. (7.35) is expressed in operator notation as
A(E) {y[n]} = B(E) {x[n]} ,
where A(E) and B(E) are the Kth-order polynomial operators
A(E) = E K + a1 E K1 + + aK1 E + aK
and B(E) = b0 E K + b1 E K1 + + bK1 E + bK .
We now derive a general expression for the zero-state response, that is, the system response to
input x[n] when all initial conditions, such as y[1] = y[2] = = y[K] = 0, are zero (zero
440
state). Without initial conditions to contend with, we proceed using the bilateral z-transform and
its simplied shifting property.
Expressed in delay form, Eq. (7.35) is
y[n] + a1 y[n 1] + + aK1 y[n (K 1)] + aK y[n K] =
b0 x[n] + b1 x[n 1] + + bK1 x[n (K 1)] + bK x[n K].
(7.36)
Y (z) =
b0 z K + b1 z K1 + + bK1 z + bK
z K + a1 z K1 + + aK1 z + aK
X(z) =
B(z)
X(z).
A(z)
(7.37)
We have shown in Eq. (7.27) that Y (z) = X(z)H(z). Hence, it follows that
H(z) =
b0 z K + b1 z K1 + + bK1 z + bK
B(z)
= K
.
A(z)
z + a1 z K1 + + aK1 z + aK
(7.38)
As in the case of LTIC systems, this result leads to an alternative denition of the LTID system
transfer function as a ratio of (zero-state) output Y (z) to input X(z),
H(z) =
Z {zero-state response}
Y (z)
=
.
X(z)
Z {input}
(7.39)
Because Y (z), the z-transform of the zero-state response y[n], is the product of X(z) and H(z), we
can represent an LTID system in the transform domain by a block diagram, as illustrated in Fig. 7.9.
x[n]
Z {}
views x[n] as a
continuous sum of
everlasting exponentials
X(z)
Y (z) = X(z)H(z)
H(z)
Z 1 {}
y[n]
system response to
exponential component
X(z)z n is X(z)H(z)z n
(a)
X(z)
H(z)
Y (z) = X(z)H(z)
(b)
avoid unnecessary distraction, we do not include ROCs throughout most of this discussion.
441
their transfer functions. The result Y (z) = X(z)H(z) greatly facilitates derivation of the systems
zero-state response to a given input. We shall demonstrate these concepts with several examples.
Show that the transfer function of a system that time shifts its input by k units is H(z) = z k .
As depicted in Fig. 7.10, if the input to the time-shifting system is x[n], then its output is given by
y[n] = x[n k]. Using Eq. (7.20), the z-transform of this input-output equation is
Y (z) = z k X(z).
From Eq. (7.27), we know that Y (z) = H(z)X(z), so it follows that the transfer function of a
time-shifting system is
H(z) = z k .
(7.40)
x[n]
X(z)
y[n] = x[n k]
Y (z) = z k X(z)
z k
Given input x[n] = (2)n u[n], use the z-transform to determine the zero-state response y[n] of a
causal LTID system described by the dierence equation
y[n + 2] + y[n + 1] + 0.16y[n] = x[n + 1] + 0.32x[n]
(7.41)
or
(E 2 + E + 0.16) {y[n]} = (E + 0.32) {x[n]} .
Since the system and input are both causal, the output y[n] is also causal, and we are content
to use the unilateral z-transform for our analysis. Using Eq. (7.41), we nd that
H(z) =
B(z)
z + 0.32
= 2
.
A(z)
z + z + 0.16
z
z + 0.5
and
Y (z) = X(z)H(z) =
z(z + 0.32)
.
(z 2 + z + 0.16)(z + 0.5)
Using MATLAB, the modied partial fractions are determined by expanding Y (z)/z.
01
442
Therefore,
Y (z)
2/3
2
8/3
=
+
z
z + 0.2 z + 0.5 z + 0.8
and
2
Y (z) =
3
Inverting, we obtain
z
z + 0.2
z
z + 0.8
+2
z
z + 0.5
!
2
8
(0.2)n (0.8)n + 2(0.5)n u[n].
3
3
y[n] =
Example 7.11
Given two-sided input x[n] = (0.8)n u[n] + 2(2)n u[n 1], use the z-transform to determine the
zero-state response y[n] of a causal LTID system described by the transfer function
H(z) =
z
.
z 0.5
(7.42)
In this case, the input is composed of a causal component (0.8)n u[n] and an anti-causal component 2(2)n u[n 1]. Taking the z-transform of these pieces yields
Z {(0.8)n u[n]} =
z
with ROC |z| > 0.8
z 0.8
and
Z {2(2)n u[n 1]} =
2z
with ROC |z| < 2.
z2
z(z + 0.4)
,
(z 0.8)(z 2)
Since the system is causal, the ROC of H(z) is |z| > 0.5. The ROC of X(z) is 0.8 < |z| < 2. The
common region of convergence for X(z) and H(z) is 0.8 < |z| < 2. Therefore,
Y (z) = X(z)H(z) =
z 2 (z + 0.4)
,
(z 0.5)(z 0.8)(z 2)
Using MATLAB, the modied partial fractions are determined by expanding Y (z)/z.
01
Therefore,
Y (z)
1
8/3
8/3
=
+
and
Y (z) =
z
z 0.5
8
3
z
z 0.8
8
3
z
z2
with ROC 0.8 < |z| < 2.
443
Since the ROC extends outward from the pole at 0.8, the poles at 0.5 and 0.8 correspond to causal
sequences. The ROC extends inward from the pole at 2. Hence, the pole at 2 corresponds to an
anti-causal sequence. Therefore,
!
8
8
n
n
y[n] = (0.5) + (0.8) u[n] + (2)n u[n 1].
3
3
Example 7.12
For the system in Ex. 7.12, nd the zero-state response to the input
x[n] = (0.8)n u[n] + (0.6)n u[n 1] .
x1 [n]
x2 [n]
The z-transforms of the causal and anti-causal components x1 [n] and x2 [n] are
X1 (z) =
z
with ROC |z| > 0.8
z 0.8
and
z
with ROC |z| < 0.6.
z 0.6
Observe that a common ROC for X1 (z) and X2 (z) does not exist. Therefore, X(z) does not exist. In
such cases, we can apply the superposition principle and nd y1 [n] and y2 [n], the system responses
to x1 [n] and x2 [n], separately. The desired response y[n] is the sum of y1 [n] and y2 [n]. Now,
X2 (z) =
z
with ROC |z| > 0.5,
z 0.5
z2
Y1 (z) = X1 (z)H(z) =
with ROC |z| > 0.8,
(z 0.5)(z 0.8)
z 2
with ROC 0.5 < |z| < 0.6.
and Y2 (z) = X2 (z)H(z) =
(z 0.5)(z 0.6)
H(z) =
!
10
8
(0.5)n + (0.8)n u[n] + 6(0.6)n u[n 1].
3
3
Example 7.13
444
Consider a causal DT system that is both controllable and observable with transfer function
H(z) =
z 0.5
.
(z + 0.5)(z 1)
(a) Find the zero-state response y[n] to input x[n] = 3(n+1) u[n].
(b) Write the dierence equation that relates the system output y[n] to input x[n].
Consider a discrete-time system with transfer function H(z) = z/(z 0.5) and input signal
n
1
x[n] =
u[n] + 5(3)n u[n 1].
4
(a) Find the zero-state response ya [n] if the system is causal.
(b) Find the zero-state response yb [n] if the system is anti-causal.
on H(z) alone, where A(z) and B(z) are not explicitly known, asymptotic stability cannot be determined
since it is impossible to determine if common factors exist between A(z) and B(z).
445
3. A causal LTID system is unstable if and only if at least one root is outside the unit circle,
there are repeated roots on the unit circle, or both.
For systems that do not have common factors between A(z) and B(z), these conditions generalize
to
1. An LTID system is asymptotically stable if and only if the ROC of H(z) includes the unit
circle.
2. An LTID system is marginally stable if and only if the ROC of H(z) contacts (but does not
include) the unit circle and there are non-repeated roots on the unit circle.
3. An LTID system is unstable if and only if the ROC of H(z) does not include or contact the
unit circle, there are repeated roots on the unit circle, or both.
This generalization allows us to assess internal stability for most systems, including noncausal systems.
7.5
Large systems may consist of an enormous number of components or elements, and analyzing such
systems all at once can be next to impossible. Generally, it is more convenient to represent systems
using suitably interconnected subsystems, each of which can be readily analyzed.
As shown in Figs. 7.11a and 7.11b, subsystems may be connected in two elementary ways: parallel
and cascade. When two transfer functions appear in parallel, the overall transfer function is given
by H1 (z) + H2 (z), the sum of the two transfer functions. The proof is trivial, and the result can
be extended to any number of systems in parallel. Similarly, when two transfer functions H1 (z)
and H2 (z) appear in cascade, the transfer function of the overall system is the product of the two
transfer functions H1 (z)H2 (z). This conclusion follows from the fact that in Fig. 7.11b,
Y (z)
W (z) Y (z)
=
= H1 (z)H2 (z).
X(z)
X(z) W (z)
This result can be extended to any number of transfer functions in cascade.
A Word of Caution
For block representations such as those found in Fig. 7.11, there is an implicit assumption that there
is no loading between subsystems. Basically, this means that the behavior (transfer function) of any
subsystem must be unaected by any connections to it. For example, the transfer function H1 (z)
in Fig. 7.11 should not change whether or not H2 (z) is connected (and vice versa). Only when this
assumption is true is the equivalent transfer function of a cascade or parallel connection given as a
simple product or sum. If loading does occur between blocks, the equivalent transfer function is not
so easily obtained. Fortunately, most common DT system implementations meet this requirement.
446
H1 (z)
X(z)
Y (z)
X(z)
H1 (z) + H2 (z)
Y (z)
H2 (z)
(a)
X(z)
H1 (z)
W (z)
H2 (z)
Y (z)
X(z)
H1 (z) H2 (z)
Y (z)
(b)
Figure 7.11: Elementary connections and their equivalents: (a) parallel and (b) cascade.
Verify the transfer function equivalent of the feedback system shown in Fig. 7.12.
X(z)
E(z)
Y (z)
G(z)
X(z)
G(z)
1 + H(z)G(z)
Y (z)
H(z)
(7.43)
This the transfer function equivalent of the feedback system shown in Fig. 7.12.
Example 7.14
Inverse Systems
When connected in cascade, a system H(z) and its inverse Hi (z) form an identity system, where
the nal output exactly equals the original input. For this to occur, the transfer function of the
composite system must be unity, which is to say that H(z)Hi (z) = 1. Using this simple fact, we see
447
that the transfer function of an inverse system is simply the reciprocal of the transfer function of
the original system,
1
Hi (z) =
.
(7.44)
H(z)
For example, an accumulator, whose transfer function is H(z) = z/(z 1), and a backward dierence
system, whose transfer function is Hi (z) = (z 1)/z, are inverses of each other.
z+2
.
z 0.5
Determine the transfer function Hi (z) of the inverse system. Explain why the inverse system Hi (z) is not
well behaved like H(z).
7.5.1
We now develop a systematic method for realization (or simulation) of an arbitrary Kth-order
transfer function. Consider an LTID system with a transfer function
H(z) =
b0 z L + b1 z L1 + + bL1 z + bL
.
z K + a1 z K1 + + aK1 z + aK
For causal systems, we must have L K. With this restriction, the most general case is K = L
with transfer function given by Eq. (7.38). Multiplying the numerator and denominator by z K ,
the transfer function is expressed in terms of z 1 as
H(z) =
b0 + b1 z 1 + + bK1 z (K1) + bK z K
.
1 + a1 z 1 + + aK1 z (K1) + aK z K
(7.45)
A transfer function of this form can be realized by using adders, scalar multipliers, and delays.
Since realization is basically a synthesis problem, there is no unique way of realizing a system.
A given transfer function can be realized in many dierent ways. To begin, we present the two
forms of direct realization, so called because it is possible to go directly from the transfer function
(or the corresponding dierence equation) to the block diagram with no further manipulations. The
coecients in the dierence equations (or the transfer function) appear as multiplier coecients in
these realizations. Later, we shall study some indirect forms of realization. Further, each of the
direct and indirect forms can be employed in both parallel and cascade structures.
Rather than immediately realize the general system described by Eq. (7.45), we begin with
the second-order case and then extend the results to the Kth-order case. Second-order systems
are particularly important to study since high-order designs are most often implemented using
combinations of second-order systems. In the second-order case, the transfer function is given as
H(z) =
b0 + b1 z 1 + b2 z 2
.
1 + a1 z 1 + a2 z 2
(7.46)
Keep in mind that we express H(z) in terms of z 1 to produce a practical realization that uses
time-delay elements rather than time-advance elements. Next, we express this transfer function as
1
H(z) = b0 + b1 z 1 + b2 z 2
.
(7.47)
1 + a1 z 1 + a2 z 2
H1 (z)
H2 (z)
448
We can realize H(z) as a cascade of transfer function H1 (z) followed by H2 (z), as depicted in
Fig. 7.13a, where the output of H1 (z) is denoted by W (z). From Eq. (7.47), the transfer function
H1 (z) implements the zeros of the system, whereas H2 (z) implements the poles of the system.
Because of the commutative property of LTI system transfer functions in cascade, we can also realize
H(z) as a cascade of H2 (z) followed by H1 (z), as illustrated in Fig. 7.13b, where the (intermediate)
output of H2 (z) is denoted by V (z).
X(z)
H1 (z)
W (z)
H2 (z)
Y (z)
X(z)
H2 (z)
(a)
V (z)
H1 (z)
Y (z)
(b)
Direct Form I
We now develop a realization of H(z) based on Fig. 7.13a. In this case, the output of H1 (z) is given
by W (z) = H1 (z)X(z). Hence,
W (z) = b0 + b1 z 1 + b2 z 2 X(z).
(7.48)
Further, the output of H2 (z) in Fig. 7.13a is given by Y (z) = H2 (z)W (z). Hence,
1 + a1 z 1 + a2 z 2 Y (z) = W (z).
(7.49)
We shall rst realize Eq. (7.48), which shows that the output W (z) can be synthesized by adding
the input b0 X(z) to b1 z 1 X(z) and b2 z 2 X(z). Because the transfer function of a unit delay is z 1 ,
the signals z 1 X(z) and z 2 X(z) represent successive delays of the input x[n]. The left-half section
of Fig. 7.14, which represents a realization of H1 (z), shows how W (z) can be synthesized from X(z)
using adder, scalar multiplier, and delay elements.
To complete the picture, we next realize H2 (z). First, we rearrange Eq. (7.49) as
Y (z) = W (z) a1 z 1 + a2 z 2 Y (z).
(7.50)
Hence, to obtain Y (z), we subtract a1 z 1 Y (z) and a2 z 2 Y (z) from W (z). We have already obtained
W (z) as the output of H1 (z). To obtain signals z 1 Y (z) and z 2 Y (z), we assume that we already
have the desired output Y (z). Successive delay of y[n] (i.e., successive multiplication of Y (z) by
z 1 ) yields the needed signals. The right-half section of Fig. 7.14, which represents a realization of
H2 (z), shows how we synthesize the nal output Y (z) from W (z) according to Eq. (7.50).
Figure 7.14 depicts the so-called direct form I (DFI) realization of a second-order LTID system.
In DFI, system zeros precede system poles, and the number of delay elements is double the order of
the system. The number of delay elements is an important consideration because each delay block
in a particular realization corresponds to physical memory. Thus, the second-order DFI structure
of Fig. 7.14 requires four memory locations In our next realization, direct form II, we shall realize
the exact same system using half the number of delay elements, thereby reducing our memory
requirements by half.
It may seem odd that we rst assume the existence of the output y[n], delay it successively, and then in turn
generate y[n] from w[n] and the successive delays of signal y[n]. This procedure poses a dilemma similar to Which
came rst, the chicken or egg? Such is the nature of recursion. The problem is satisfactorily resolved by writing the
expression for Y (z) at the output of the top adder of H2 (z) in Fig. 7.14 and verifying that this expression is indeed
the same as Eq. (7.50).
b0
X(z)
449
W (z)
Y (z)
z 1
z 1
a1
b1
z 1 X(z)
z 1 Y (z)
z 1
z 1
a2
b2
z 2 X(z)
H1 (z)
z 2 Y (z)
H2 (z)
Y (z) = b0 + b1 z 1 + b2 z 2 V (z)
so that, as desired,
Y (z)
b0 + b1 z 1 + b2 z 2
=
= H(z).
X(z)
1 + a1 z 1 + a2 z 2
X(z)
b0
V (z)
Y (z)
z 1
a1
z 1 V (z)
z 1
a2
H2 (z)
z 2 V (z)
z 1
b1
z 1 V (z)
z 1
z 2 V (z)
b2
H1 (z)
450
V (z)
b0
Y (z)
z 1
a1
b1
z 1
a2
b2
It is a simple task to generalize the DFI and DFII realizations for an arbitrary Kth-order system:
simply extend the delay-scale-sum chain to match the order of the system. The general DFII
structure, for example, is shown in Fig. 7.17, and the Kth-order DFI structure is shown in Fig. 4.32
(page 255).
X(z)
V (z)
b0
Y (z)
z 1
a1
b1
..
.
..
.
..
.
z 1
aK1
bK1
z 1
aK
bK
A Kth-order dierence equation has the property that its implementation requires a minimum
of K delays. A realization is canonic if the number of delays used in the realization is equal to the
order of the transfer function realized. Thus, a canonical realization has no redundant delays. The
DFII form in Fig. 7.17 is a canonical realization and is also called the canonical direct form. Note
that DFI realizations are non-canonic.
Although DFII is canonic and DFI is not, DFII is not automatically preferred over DFI. Both
realizations result in the same transfer function, but they generally behave dierently from the
viewpoint of sensitivity to parameter variations. These and other factors need to be considered when
choosing a particular system realization. For instance, DFI orders zeros before poles, a strategy that
tends to reduce the likelihood of certain overow errors. Would it not be nice to nd a realization
that is canonic and also orders zeros before poles? As we shall see next, the transposed direct form
II realization achieves both these goals.
7.5.2
451
Transposed Realizations
The direct form II structure in Fig. 7.15 lends itself readily to elimination of half the delays, which
results in the canonical direct form in Fig. 7.16. The direct form I structure in Fig. 7.14 does not
permit such straightaway elimination. With a little reorganization of Fig. 7.14, however, we can
eliminate the unnecessary delays and produce another canonical form.
We start with Fig. 7.14, which rst realizes H1 (z) followed by H2 (z) with intermediate output
W (z). In this arrangement, the delay blocks precede the scalar multipliers bk and ak . Let us
reverse these sequences and order scalar multiplication before delay, as shown in Fig. 7.18. This
slight change does not alter the overall transfer function, but it allows for the elimination of half the
delay elements.
b0
X(z)
W (z)
Y (z)
z 1
z 1
z 1
z 1
a1
b1
a2
b2
X(z)
Y (z)
z 1
a1
b1
..
.
..
.
..
.
z 1
aK1
bK1
z 1
aK
bK
452
Transpose Operation
We can obtain the transpose of a block diagram by the following operations:
1. Reverse the directions of all paths.
2. Replace summing nodes with pick-o nodes and pick-o nodes with summing nodes.
3. Interchange the input x[n] and the output y[n].
The transpose operation does not aect the transfer function of a system, meaning that a system
and its transpose have identical transfer functions. This observation applies to any realization, direct
or not, canonic or not. The reader is encouraged to show that Fig. 7.19 is the transpose of the DFII
form in Fig. 7.17, and vice versa. Also observe that the transpose of the transpose results in the
original form, which is to say that the transpose operation is its own inverse.
Find the DFII and TDFII realizations of an LTID system with transfer function
H(z) =
2z 3
.
4z 2 1
1
3
2z 4
z 2 14
1
4
and
b0 = 0, b1 =
1
3
, and b2 = .
2
4
To obtain the DFII and TDFII realizations, it is simply a matter of substituting these coecient
values into the structures of Figs. 7.17 and 7.19, respectively. Figure 7.20 shows the results. Notice
that because some coecients are zero, certain paths, summing nodes, and multiplier elements are
not needed.
X(z)
Y (z)
X(z)
Y (z)
z 1
z 1
1
2
1
2
z 1
z 1
34
1
4
34
1
4
(a)
(b)
2z3
4z 2 1 :
Example 7.15
453
Find the DFII and TDFII realizations of an LTID system with transfer function
H(z) =
z
.
16z 2 24z + 18
Apply the transpose operation to Fig. 7.14 to obtain the transposed direct form I (TDFI) realization of a
second-order system. Provide at least two reasons why TDFI is not a popular realization choice.
7.5.3
Usually, a Kth-order transfer function H(z) can be expressed as a product or a sum of K rst-order
transfer functions. Accordingly, we can also realize H(z) as a cascade (series) or parallel form of
these K rst-order transfer functions. Consider, for instance, the transfer function of Ex. 7.15,
H(z) =
2z 3
.
4z 2 1
1
2
z+ 1
2
z 32
.
z 12
H1 (z)
(7.51)
H2 (z)
Even in this simple case, there are an innite number of ways to represent H(z) as a cascade of two
rst-order systems. For example, we could also choose
H(z) =
1
z
34
z + 12
2z
1
2
Later, we discuss strategies to choose eective combinations. We can also express H(z) as a sum of
partial fractions as
1
3
21
1
2 z
4
=
+
.
(7.52)
H(z) =
z + 12 z 12
z+1 z1
2 2
H3 (z)
H4 (z)
Equation (7.51) lets us realize H(z) as a cascade of H1 (z) and H2 (z), as shown in Fig. 7.21a, whereas
Eq. (7.52) leads to a parallel realization of H3 (z) and H4 (z), as depicted in Fig. 7.21b. Each of the
rst-order transfer functions in Fig. 7.21 can be realized by using any form desired. For example, we
can realize H1 (z) and H2 (z) as DFII, H3 (z) as DFI, and H4 (z) as TDFII, or we can use any other
combination imaginable.
In the preceding example of cascade and parallel realizations, we separated H(z) into rst-order
factors. For higher orders, we can separate H(z) into factors, not all of which are necessarily of the
rst order. For example, we can realize a third-order transfer function H(z) as a cascade or parallel
combination of a rst-order factor and a second-order factor. As we shall see next, second-order
factors are particularly convenient for systems that possess complex roots.
454
1
z+ 1
2
X(z)
1
2
z 3
2
z+ 1
2
Y (z)
X(z)
Y (z)
z 1
2
1
2
z 1
2
(a)
(b)
2z3
4z 2 1 :
z3 + z
.
16z 3 28z 2 + 20z 6
To realize this system, we might separate H(z) into a product or sum of rst-order factors as
H(z) =
=
1
16 z
z 34
z
5
16 z
+
z 34
z
z+j
( 12 + j 12 )
zj
z ( 12 j 12 )
81 z
18 z
+
.
( 12 + j 12 ) z ( 12 j 12 )
(7.53)
Written in this way as a product or a sum, the resulting realization is either a cascade or a parallel combination of three rst-order subsystems. Although digital systems are exible enough to
accommodate such realizations, the presence of complex-valued scale factors greatly complicates the
implementation. Even though the overall system is real (meaning that real inputs always generate
real outputs), these implementations require complex signal paths, complex adders, and complex
multipliers. This, in turn, can double the memory requirements and computational burden of the
implementation. It is generally better practice to combine complex-conjugate roots and thereby
eliminate the need for complex-valued signals and operations. In the present case, we can express
H(z) as
1
5
41 z 2 + 18 z
z2 + 1
16 z
16 z
+
.
=
H(z) =
z 34
z 2 z + 12
z 34
z 2 z + 12
The resulting cascade and parallel realizations involve only real signals and operations.
Realization of Repeated Poles
When repeated poles occur, the procedure for a cascade realization is exactly the same as discussed
earlier. For a parallel realization, however, the procedure requires a special precaution, as explained
in the following example.
(z
3
2
16 (z + 1)
.
+ 12 )(z 12 )2
First, we expand H(z) into partial fractions using the residue command in MATLAB.
01
455
Thus,
H(z) =
3
15
15
64
64
64
+
+
.
z 12
(z 12 )2
z + 12
This third-order transfer function should require no more than three delays. Realizing each of the
three partial fractions separately, however, requires four delays because one of the terms is second
3
order. This diculty can be avoided by sharing the z641 term with two paths, as shown in Fig. 7.22.
2
Each of the three rst-order transfer functions in Fig. 7.22 may now be realized using whatever
desired form, such as DFII or TDFII.
15
64
z+ 1
2
X(z)
Y (z)
3
64
z 1
2
5
z 1
2
2
3
16 (z +1)
.
(z+ 12 )(z 12 )2
Example 7.16
Using direct, transposed direct, and cascade forms, realize the FIR lter with transfer function
H(z) =
1 3
2z
+ 14 z 2 + 18 z +
z3
1
16
1 1 1 1 2
1
+ z + z + z 3 .
2 4
8
16
From the transfer function H(z), we recognize that ak = 0 for all k = 0 and that b0 = 12 , b1 = 14 ,
1
b2 = 18 , and b3 = 16
. Substituting these values into either of the two direct form structures (DFI or
DFII) produces the same direct form realization, as shown in Fig. 7.23a. This gure emphasizes that
an FIR lter is basically a tapped delay line, which is why this structure is also known as a tapped
delay line or transversal lter. Figure 7.23b shows the corresponding transposed implementation,
which is nearly identical to the direct form.
456
X(z)
z 1
z 1
1
2
z 1
1
4
1
8
1
16
Y (z)
(a)
X(z)
1
16
1
8
z 1
1
4
z 1
1
2
z 1
Y (z)
(b)
X(z)
z 1
z 1
1
2
z 1
1
4
1
4
Y (z)
(c)
1
2
+ 14 z 1 + 18 z 2 +
1 3
:
16 z
To obtain a cascade form of this lter, we rst express the transfer function as
1
H(z) =
2z
+
z
1
4
z2 +
z2
1
4
We use a second-order factor rather than two rst-order factors to accommodate the systems
complex-conjugate roots without using complex multipliers, complex adders, or complex signal
paths. Figure 7.23c shows the resulting realization, where the two cascaded subsystems are each
implemented in direct form. For this particular system H(z), notice that the cascade form oers a
computational advantage over the direct or transposed direct forms: the required number of multiplies and additions are each reduced by one. Although such savings are not guaranteed in general,
it can be worthwhile to seek them out.
Example 7.17
Explain why there is no practical way to realize the LTID system that has the transfer function
H(z) =
z2 +
z
1
4
.
457
7.6
In Sec. 5.5.4, we showed that an LTID system response to an (everlasting) exponential z n is also an
(everlasting) exponential H(z)z n . This result is valid only for those values of z for which H(z), as
dened in Eq. (7.9), exists (converges). As usual, we represent this input-output relationship by a
458
and
(7.54)
(7.55)
(7.56)
(7.57)
This result is valid only for BIBO stable or asymptotically stable systems since only in these cases
does the region of convergence for H(z) include z = ej . For BIBO unstable systems, which include
marginally stable and asymptotically unstable systems, the ROC for H(z) does not include the unit
circle where z = ej . In other words, H(ej ) is meaningless if z = ej is not in the ROC of H(z).
Equation (7.57) demonstrates an important idea: the response of a real and asymptotically or
BIBO stable LTID system to a sinusoidal input is a sinusoid of identical frequency, modied only in
gain and phase. Only exponentials of the form z n , of which sinusoids are a special case, have this
amazing and guaranteed ability to pass through an LTID system undistorted in their underlying
shape. The magnitude of the output sinusoid is |H(ej )| times the input magnitude, and a plot of
|H(ej )| versus is the magnitude response of the discrete-time system. Similarly, H(ej ) tells
how the system modies or shifts the phase of an input sinusoid, and a plot of H(ej ) versus is
the phase response of the discrete-time system. As shown by Eq. (7.56), H(ej ) incorporates both
the magnitude response and the phase response and therefore is called the frequency response of the
system.
Steady-State Response to Causal Sinusoidal Inputs
As in the case of continuous-time systems, we can show that the response of an LTID system to a
causal sinusoidal input cos(n+)u[n] is the output in Eq. (7.57) plus a natural component consisting
of the characteristic modes (see Prob. 7.6-1). For a stable system, all the modes decay exponentially,
and only the sinusoidal component of Eq. (7.57) persists. For this reason, this component is called
the sinusoidal steady-state response of the system. Thus, yss [n], the steady-state response of a system
to a causal sinusoidal input cos(n + )u[n], is
yss [n] = H(ej ) cos n + + H(ej ) u[n].
System Response to Sampled Continuous-Time Sinusoids
So far we have considered the response of a discrete-time system to a discrete-time sinusoid cos(n)
(or exponential ejn ). In practice, the input may be sampled from a continuous-time sinusoid cos(t)
(or exponential ejt ). When a sinusoid cos(t) is sampled with sampling interval T , the resulting
459
signal is a discrete-time sinusoid cos(nT ), obtained by setting t = nT in cos(t). Therefore, all the
results developed in this section apply if we substitute T for , that is,
= T.
(7.58)
From Eq. (7.58), we see that DT frequency is just CT frequency scaled by the sampling interval
T . We have seen this relationship several times before in Ch. 4 (see Eq. (4.15)) as well as Ch. 6.
Determine the frequency response H(ej ) of the system specied by the equation
y[n + 1] 0.8y[n] = x[n + 1].
Using H(ej ), determine the system responses to the inputs (a) xa [n] = 1n = 1, (b) xb [n] =
cos( 6 n 0.2), and (c) xc (t) = cos(1500t) sampled using sampling interval T = 0.001.
In advance-operator form, the system equation is expressed as
(E 0.8) {y[n]} = E {x[n]} .
Therefore, the transfer function of the system is
H(z) =
z
1
=
.
z 0.8
1 0.8z 1
1
1
,
=
1 0.8ej
1 0.8 cos() + j0.8 sin()
(7.59)
0.8 sin()
1 0.8 cos()
(7.60)
MATLAB easily computes and graphs the magnitude and phase responses, which are shown in
Figs. 7.24a and 7.24b, respectively.
01
02
H(ej )
|H(ej )|
5
0.927
(a)
(b)
Figure 7.24: Frequency response of y[n + 1] 0.8y[n] = x[n + 1]: (a) |H(ej )| and (b) H(ej ).
460
We now use |H(ej )| and H(ej ) to compute the system responses to the given inputs.
(a) Since 1n = (ej )n with = 0, the response to xa [n] = 1n = 1 is found using H(ej0 ). From
Eq. (7.59), we obtain
1
1
=
= 5 = 50.
H(ej0 ) =
0.04
1.64 1.6 cos(0)
Therefore,
|H(ej0 )| = 5
H(ej0 ) = 0.
and
These values also can be read directly from Figs. 7.24a and 7.24b, respectively. Using Eq. (7.54),
the system response to input xa [n] = 1n = 1 is therefore
ya [n] = 5(1n ) = 5.
(b) The frequency of xb [n] = cos( 6 n 0.2) is =
6.
1
|H(ej/6 )| =
= 1.9828
1.64 1.6 cos( 6 )
and
H(e
j/6
) = tan
0.8 sin( 6 )
1 0.8 cos( 6 )
= 0.9159.
Figures 7.24a and 7.24b conrm these calculations. Using Eq. (7.57), the system response to input
xb [n] = cos( 6 n 0.2) is therefore
yb [n] = 1.9828 cos
n 0.2 0.9159 = 1.9828 cos
n 1.1159 .
6
6
(c) The sinusoid xc = cos(1500t) sampled every T seconds (t = nT ) results in the discrete-time
sinusoid
xc [n] = cos(1500nT ).
For T = 0.001, the DT system input is therefore
xc [n] = cos(1.5n).
In this case, = 1.5. According to Eq. (7.60),
1
|H(ej1.5 )| =
= 0.8093
1.64 1.6 cos(1.5)
and
H(ej1.5 ) = tan1
0.8 sin(1.5)
1 0.8 cos(1.5)
= 0.7021.
Again, Figs. 7.24a and 7.24b conrm these calculations. Using Eq. (7.57), the system response to
input xc [n] = cos(1.5n) is therefore
yc [n] = 0.8093 cos(1.5n 0.7021).
461
2
yb [n]
xb [n]
10
14
26
Figure 7.25: Real LTID systems modify sinusoidal inputs only in gain and phase.
Determine and plot the magnitude response |H(ej )| and phase response H(ej ) of the system specied
by the equation
y[n + 1] 0.5y[n] = x[n].
Determine the system response to the sinusoidal input x(t) = cos(1000t
)
3
462
7.6.1
The frequency response of a system is determined by the pole and zero locations of the transfer
function H(z). It is possible to determine quickly the magnitude and phase responses and to obtain
physical insight into the lter characteristics of a discrete-time system by using a graphical technique.
The general Kth-order transfer function H(z) in Eq. (7.38) can be expressed in factored form as
K
(z zl )
(z z1 )(z z2 ) (z zK )
= b0 Kl=1
H(z) = b0
.
(z p1 )(z p2 ) (z pK )
k=1 (z pk )
(7.61)
To see how Eq. (7.61) helps us determine a systems frequency response, we must develop a graphical
understanding of terms in the form (z ). As shown in Fig. 7.26a, the directed line segment from
to z in the complex plane represents the complex number (z ). The length of this segment is
|z |, and its angle with the horizontal axis is (z ).
Im
ej
Im
rl
dk
zl
1 Re
k
z
pk
z
0
Re
(a)
(b)
Figure 7.26: Vector representations of (a) complex numbers and (b) factors of H(z).
To compute the frequency response H(ej ), we evaluate H(z) at z = ej . For z = ej , |z| = 1
and z = so that z = ej represents a point on the unit circle at an angle with the horizontal.
We now connect all zeros (z1 , z2 , . . ., zK ) and all poles (p1 , p2 , . . ., pK ) to the point ej , as indicated
in Fig. 7.26b. Let r1 , r2 , . . ., rK be the lengths and 1 , 2 , . . ., K be the angles, respectively, of
463
H(e ) = H(z)|z=ej
K
jl
(r1 ej1 )(r2 ej2 ) (rK ejK )
l=1 rl e
=
b
= b0
0
K
jk
(d1 ej1 )(d2 ej2 ) (dK ejK )
k=1 dk e
r1 r2 rK j[(1 +2 ++K )(1 +2 ++K )]
= b0
e
.
d1 d2 dK
K
rl
r1 r2 rK
= |b0 | Kl=1
d1 d2 dK
k=1 dk
product of the distances of zeros to ej
,
product of the distances of poles to ej
(7.62)
K
l=1
j
k=1
(7.63)
In this manner, we can compute the frequency response H(ej ) for any value of . To obtain a
complete picture of a systems frequency response, we repeat the calculations of Eqs. (7.62) and (7.63)
for all values of over a suitable 2 interval, such as to .
Controlling Gain by Placement of Poles and Zeros
With minor dierences, the nature of the inuence of pole and zero locations on frequency response
is similar to that observed in continuous-time systems. In place of the imaginary axis for continuoustime systems, we have the unit circle in the discrete-time case. The nearer a pole (or zero) is to the
point ej , the more inuence that pole (or zero) wields on the magnitude response at the frequency
because the length of the vector joining that pole (or zero) to the point ej is small. The proximity
of a pole (or zero) has a similar eect on the phase response.
From Eq. (7.62), it is clear that to enhance the magnitude response at a frequency , we should
place a pole close to the point ej . Of course, the closest we can place a pole is on the unit circle
at the point representing . Although this leads to maximum (innite) gain, it also renders the
system marginally stable (BIBO unstable) and should be avoided. By similar logic, to suppress the
magnitude response at a frequency , we should place a zero close to the point ej . Unlike poles,
there is no particular disadvantage to placing zeros on (or outside) the unit circle. In fact, total
suppression of signal transmission at a given frequency can only be achieved by placing a zero at
the corresponding point on the unit circle. This is the underlying principle of a notch (bandstop)
lter. Repeating poles or zeros further enhances their inuence. Notice that a pole at a point has
the opposite (reciprocal) eect of a zero at that point. Placing a zero close to a pole tends to cancel
the eect of that pole on the frequency response (and vice versa).
Placing a pole or a zero at the origin does not inuence the magnitude response because the
length of the vector connecting the origin to any point on the unit circle is unity. However, a pole
(or zero) at the origin adds angle (or ) to the phase response H(ej ). As seen in Drill 7.22,
a linear phase response corresponds to a pure time delay (or time advance) of T seconds. Therefore,
a pole (or zero) at the origin causes a time delay (or advance) of T seconds in the response.
Additionally,
the closer a pole is to the unit circle, the more sensitive is the system gain to parameter variations.
464
For a stable system, all the poles must be located inside the unit circle. The zeros may lie
anywhere. Also, for a physically realizable system, H(z) must be a proper fraction; that is, K L.
If, to achieve a certain magnitude response, we require L > K, we can still make the system realizable
by placing a sucient number of poles at the origin. This will not change the magnitude response,
but it will increase the time delay of the response.
Let us consider these ideas by investigating the examples shown in Fig. 7.27. Keep in mind that
although it is possible to eectively design low-order lters using a graphical placement of poles and
zeros, high-order designs are basically impossible using this ad hoc method. Chapter 8 introduces
systematic and formal methods to design quality lters of arbitrary order.
|Ha (ej )|
Ha (ej )
(a)
|Hb (ej )|
Hc (ej )
|Hc (ej )|
(c)
|Hd (ej )|
3
2
ideal
Hd (ej )
3
2
ideal
He (ej )
3
2
|He (ej )|
(e)
Hb (ej )
(b)
(d)
3
2
Figure 7.27: Various pole-zero congurations with corresponding magnitude and phase responses.
465
Lowpass Filters
A lowpass lter generally has a maximum gain at or near = 0, which corresponds to point ej0 = 1
on the unit circle. Clearly, placing a pole inside the unit circle near the point z = 1 encourages a
lowpass response. Figure 7.27a shows a simple case of a single pole at z = 23 and the corresponding
magnitude and phase responses. For small values of , the point ej (a point on the unit circle at
an angle ) is close to the pole, and consequently, the gain is high. As increases, the distance
of the point ej from the pole increases. Consequently, the gain decreases, resulting in a lowpass
characteristic.
Placing a zero at the origin does not change the magnitude response, but it does modify the
phase response, as illustrated in Fig. 7.27b. Placing a zero at z = 1, however, changes both the
magnitude and phase responses (Fig. 7.27c). The point z = 1 corresponds to frequency =
(z = ej = ej = 1). Consequently, the magnitude response now becomes more attenuated at
higher frequencies, with a zero gain at = .
We can better approach ideal lowpass characteristics by using more poles clustered near z = 1
(but within the unit circle). Ideal lowpass behavior requires enhanced gain at every frequency in
the band (0 || c ). Conceptually, this can be achieved by placing a continuous wall of poles
(requiring an innite number of poles) in proximity to this band. Practical designs, however, are
restricted to a nite number of poles. Figure 7.27d shows an example third-order lowpass lter
with three poles near z = 1 and a third-order zero at z = 1 with corresponding magnitude and
phase responses. Increasing the number of poles improves the approximation but at the expense of
increasing lter complexity.
Highpass Filters
A highpass lter has a small gain at lower frequencies and a high gain at higher frequencies. Such
a characteristic can be realized by placing a pole or poles near z = 1 because we want the gain at
= to be the highest. Placing a zero at z = 1 further suppresses the gain at lower frequencies.
Figure 7.27e shows a pole-zero conguration for a third-order highpass lter with corresponding
magnitude and phase responses. Notice that the pole-zero plot of this highpass lter is just a
reection of the pole-zero plot of the lowpass lter of Fig. 7.27d. This is no coincidence since the
region of highest digital frequency (ej = 1) is just a reection of the region of lowest digital
frequency (ej0 = 1). In fact, any lowpass digital lter can be transformed into a highpass lter (and
vice versa) by reecting all the poles and zeros of the system.
Bandpass and Bandstop Filters
In the following two examples, we shall realize continuous-time (analog) bandpass and bandstop lters using discrete-time systems and suitable interface devices (C/D and D/C), as shown in Fig. 7.28
or, more completely, in Fig. 4.2. The C/D device samples the continuous-time input x(t) to yield a
discrete-time signal x[n], which serves as the input to the DT system H(z). The output y[n] of H(z)
is then converted to a continuous-time signal y(t) by a D/C device. As we learned from Eq. (7.58),
a continuous-time sinusoid of frequency , when sampled, results in a discrete-time sinusoid of frequency = T . We use this relationship to ensure that the DT frequency responses map to the
desired CT frequencies.
x(t)
C/D
x[n]
H(z)
y[n]
D/C
y(t)
466
Following the structure of Fig. 7.28, use trial and error to design a tuned (bandpass) analog lter
with zero transmission at 0 Hz and also at the highest frequency fmax = 500 Hz. The resonant
frequency is required to be 125 Hz.
1
1
Because fmax = 500 Hz, the sampling theorem requires that T < 2fmax
= 1000
s. Let us select
3
the sampling interval as T = 10 . Recall that the analog frequencies = 2f correspond to
digital frequencies = T = 2f T . Hence, analog frequencies f = 0 and 500 Hz correspond to
= 0 and , respectively. Since the system gain is required to be zero at these frequencies, we need
to place zeros at z = ej for = 0 and = . Hence, there must be zeros at z = ej0 = 1 and
z = ej = 1. Moreover, we need enhanced response at the resonant frequency f = 125 Hz, which
corresponds to = /4. We therefore place a pole in the vicinity of z = ej = ej/4 . Because this
is a complex pole, we also need its conjugate near ej/4 , as indicated in Fig. 7.29a. Let us choose
these two poles as
and
p2 = ||ej/4 ,
p1 = ||ej/4
where || < 1 for stability. The closer the value of || is to the unit circle, the more sharply peaked
is the response around f = 125 Hz.
|H(ej )|
Im
|| = 1
ej/4
||
|| = 0.85
|| = 0.7
1 Re
500
(a)
125
125
500
2T
(b)
(z 1)(z + 1)
z2 1
=
K
.
(z ||ej/4 )(z ||ej/4 )
z 2 2||z + ||2
ej2 1
.
ej2 2||ej + ||2
To demonstrate lter behavior, we use MATLAB to compute and plot the system magnitude response
for || = 0.7, 0.85, and 1.
Strictly speaking, we need T < 0.001. However, if the input does not contain a nite-amplitude component of
500 Hz, T = 0.001 avoids aliasing. In practice, almost all practical signals with fmax = 500 Hz satisfy this condition.
Either way, it does not matter in this case since the system has 0 gain at 500 Hz.
01
02
03
467
H = @(z,gamma) (z.^2-1)./(z.^2-sqrt(2)*abs(gamma)*z+(abs(gamma))^2);
T = 10^(-3); Omega = linspace(-pi,pi,1001); f = Omega/(2*pi*T); z = exp(j*Omega);
plot(f,abs(H(z,0.7)),f,abs(H(z,0.85)),f,abs(H(z,1))); axis([-500 500 -1 10]);
As shown in Fig. 7.29b, while we compute |H(ej )| over ( ), we plot the response
against /2T so as to view frequencies in the more natural units of hertz. As expected, the gain
is zero at f = 0 and at 500 Hz ( = 0 and ). The gain peaks at about 125 Hz ( = /4).
The resonance (peaking) becomes pronounced as || approaches 1. Figure 7.30 shows a canonic
realization of H(z).
x[n]
y[n]
z 1
2||
||2
z 1
1
Figure 7.30: DFII realization of second-order BPF with resonant frequency at = /4.
Example 7.19
Following the structure of Fig. 7.28, design a second-order notch lter with zero transmission at
250 Hz and a sharp recovery of gain to unity on both sides of 250 Hz. The highest signicant
frequency to be processed is fmax = 400 Hz.
1
In this case, T < 2fmax
= 1.25 103 . Let us choose T = 103 . For the frequency 250 Hz,
= 2(250)T = /2. Thus, the frequency 250 Hz is represented by the point ej = ej/2 = j on
the unit circle, as depicted in Fig. 7.31a. Since we need zero transmission at this frequency, we must
place a zero at both z = ej/2 = j and its conjugate z = ej/2 = j. We also require a sharp
recovery of gain on both sides of frequency 250 Hz. To accomplish this goal, we place two poles
close to the two zeros in order to cancel out the eect of the two zeros as we move away from the
point j (corresponding to frequency 250 Hz). For this reason, let us use poles at j|| with || < 1
for stability. The closer the poles are to zeros (the closer || is to 1), the faster is the gain recovery
on either side of 250 Hz. The resulting transfer function is
H(z) = K
z2 + 1
(z j)(z + j)
=K 2
.
(z j||)(z + j||)
z + ||2
2
.
1 + ||2
1 + ||2
2
1+||2
.
2
z2 + 1
.
+ ||2
z2
468
To demonstrate lter behavior, we again use MATLAB to compute and plot the system magnitude
response, this time for || = 0.3, 0.7, and 0.95.
01
02
03
H = @(z,gamma) (1+(abs(gamma)).^2)/2*(z.^2+1)./(z.^2+(abs(gamma))^2);
T = 10^(-3); Omega = linspace(-pi,pi,1001); f = Omega/(2*pi*T); z = exp(1j*Omega);
plot(f,abs(H(z,0.30)),f,abs(H(z,0.7)),f,abs(H(z,0.95))); axis([-500 500 -1 10]);
As shown in Fig. 7.31b, the lters notch is correctly located at f = 250 Hz ( = /2). As ||
approaches 1, the gain more rapidly recovers to unity. Figure 7.31c shows a canonic realization of
H(z).
|H(ej )|
Im
|| = 0.95
||
|| = 0.7
1 Re
|| = 0.3
||
500
250
250
(a)
500
2T
(b)
x[n]
y[n]
1+||
2
z 1
||2
z 1
(c)
Example 7.20
zj
2z
acts as a complex notch lter. Accurately plot the magnitude and phase responses of this lter. Determine
the lter output y[n] in response to the real input x[n] = cos(n/2).
7.7
469
Although most of our development of DT signals and systems assumes that signals are represented
with innite precision, practical systems necessarily use some form of quantization and represent
numbers using nite word lengths. Finite word-length eects have the potential to severely and
negatively impact system behavior. To begin to understand how, consider a simple digital wire
represented as
y[n] = x[n].
As discussed in Sec. 3.6, analog-to-digital conversion quantizes the input x[n] to a nite word length.
Digital-to-analog conversion requires the same of output y[n]. Thus, even without any digital processing, quantization causes irreversible (and nonlinear) distortion of both input and output.
The situation only worsens when DT processing is put into play. Let us extend our example to
a general rst-order DT system represented as
y[n] = b0 x[n] + b1 x[n 1] a1 y[n 1].
We know that nite word lengths render x[n] and y[n] as imperfect versions of the system input and
output. Similarly, nite word lengths render the coecients b0 , b1 , and a1 as imperfect versions of
the original DT system parameters. Consequently, coecient quantization causes the systems pole
and zero to move from their desired locations and degrades the systems frequency response. Later
in this section we explore both of these adverse eects in greater detail.
Unfortunately, the problems of nite word lengths extend even further. The product a1 y[n 1],
for example, requires a word size that is the sum of the word sizes of a1 and y[n 1]. The recursive
nature of the system thus suggests an ever-increasing word size, which is impractical. Therefore,
the computed products b0 x[n], b1 x[n 1], and a1 y[n 1] are further quantized, which introduces
additional errors into the system realization. Furthermore, summing the terms b0 x[n], b1 x[n 1],
and a1 y[n 1] can cause overow when assigned to the xed word size of y[n]. Dealing with the
potential for overow can be a real conundrum. While overow can be avoided by scaling the input
smaller, doing so undesirably reduces the eective word length (resolution) of the input.
An Imperfect World
When it comes to real-world digital signal processing, it is an imperfect world. As we have seen, nite
word lengths produce imperfect systems that imperfectly operate on imperfect data. Furthermore,
the nonlinear nature of the quantization process makes these problems dicult, if not impossible,
to analyze or quantify. Still, such imperfections need not imply poor system performance. On
the contrary, digital signal processing systems are, when properly designed and realized, capable of
reliable and accurate operation. There are many available options that help minimize the adverse
eects of nite word lengths.
As discussed in Sec. 7.5.3, dierent system realizations possess dierent numerical properties.
Some realizations better cope with nite word-length eects. For example, cascade and parallel
realizations comprised of low-order sections tend to perform better than single-section direct form
realizations. Additionally, word lengths can be increased, usually at modest cost, to meet accuracy
demands. Floating-point representations, which are generally less sensitive to nite word-length
eects, can be adopted over xed-point representations. Performance can be sometimes improved
by over-designing systems or utilizing alternate design methodologies. Simply understanding the
nature of nite word-length eects allows for more competent design. To this end, let us next turn
our attention to the eects of nite word lengths on poles, zeros, and frequency response.
7.7.1
To demonstrate how nite word lengths can impact a systems poles and zeros, let us focus our
attention on a second-order system with complex-conjugate poles at z = rej = r cos() jr sin().
470
1
1
=
.
(1 rej z 1 )(1 rej z 1 )
1 2r cos()z 1 + r2 z 2
Comparing this expression with Eq. (7.46), we see that b0 = 1, b1 = 0, b2 = 0, a1 = 2r cos(), and
a2 = r2 . Figure 7.32 shows the system realized in direct form.
X(z)
Y (z)
z 1
2r cos()
z 1
r 2
Im
(a)
Re
Re
(b)
Figure 7.33: Pole locations for the direct form system of Fig. 7.32: (a) 4-bit and (b) 6-bit coecients.
There are several interesting items to note from Fig. 7.33. To begin, we observe that quantization
prevents the free placement of system poles in the z-plane. For a particular word length B, there
The
system of Fig. 7.32 can also realize a set of real-valued poles that are not complex-conjugate pairs. For clarity
of discussion, Fig. 7.33 does not display these non-conjugate poles.
471
are only a nite number of xed pole locations available. Thus, it is virtually certain that the actual
(quantized) system poles will dier from the desired design locations. Furthermore, notice that the
possible pole locations are not uniformly distributed within the unit circle. In particular, there are
relatively few pole locations found along the real axis. This means that the direct form realization
of Fig. 7.32 will have diculty implementing narrow-band lowpass and highpass lters, which tend
to have concentrations of poles near z = 1 and z = 1, respectively. Increasing the number of bits
B tends to reduce, but does not eliminate, the problems associated with quantization.
There exist other ways besides increasing the number of quantization bits to improve system
performance. We previously noted that cascade and parallel realizations comprised of low-order
sections tend to perform better than single-section direct form realizations. Additionally, specialized structures can oer improved performance as well. Consider, for example, the coupled form
realization of complex-conjugate poles rej that is shown in Fig. 7.34 [3].
X(z)
Y (z)
z 1
r cos()
z 1
r sin()
r cos()
r sin()
Im
(a)
Re
Re
(b)
Figure 7.35: Pole locations for the coupled form system of Fig. 7.34: (a) 4-bit and (b) 6-bit coecients.
From Fig. 7.35, we see that the pole locations of the coupled form realization (Fig. 7.34) are
uniformly distributed inside the unit circle. Unlike the direct form realization pole locations shown
472
in Fig. 7.33, there are no gaps along the real axis. Thus, a coupled form realization may be more
eective than a direct form realization, particularly in situations where short word lengths are
necessary or system poles are found concentrated along the real axis.
It is worth pointing out, however, that although the pole locations of the coupled form may
appear generally better than those of the direct form, there is no guarantee that a coupled form
realization will be better than a direct form (or other) realization. It is possible that the poles
of a particular system just happen to better match the available pole locations of a direct form
realization. Further, comparing Fig. 7.32 and Fig. 7.34, we see that the coupled form requires twice
as many multiply operations as does the direct form, which makes its implementation more costly.
The point of our discussion is not to endorse one realization over another but rather to demonstrate
the general nature of nite word-length eects. It is the responsibility of the DSP engineer to select
an appropriate realization for a given design and to verify, generally through computer simulation,
proper system operation.
7.7.2
As shown in Sec. 7.6.1, frequency response depends directly on the poles and zeros of a system.
When coecient quantization alters a systems poles and zeros, the systems frequency response
also changes, usually for the worse. Since we commonly use frequency response to describe and
assess system behavior, it is generally more useful and natural to investigate nite word-length
eects using frequency response rather than pole and zero information. Let us demonstrate with an
example.
A digital Chebyshev lowpass lter, which has all its zeros at z = 1, can be implemented as a
cascade of second-order direct form sections, each with transfer function of the form
H(z) =
b0 (1 + 2z 1 + z 2 )
.
1 + a1 z 1 + a2 z 2
b0
0.03273793724
0.01799913516
0.00399530100
a1
-1.81915463768
-1.80572713311
-1.82139792759
a2
0.95522952077
.
0.88054034430
0.83800435313
To begin, let us rst consider the system without nite word-length eects. Figure 7.36 plots the
system magnitude response using the original (unquantized) coecients. The lter exhibits 1 dB of
passband ripple to the passband frequency p = 12 rad/s and achieves at least 20 dB of stopband
attenuation beyond the stopband frequency s = 15 rad/s. Since the passband and stopband frequencies are both well below the folding frequency of 100 rad/s, the lter is relatively narrowband,
and all system poles are concentrated near z = 1. As a result, we expect direct form realizations of
the system to be somewhat more susceptible than normal to nite word-length eects.
Next, we quantize the lter coecients. For this particular lter, coecient quantization does
not aect the system zeros since they are all located at z = 1. Instead, coecient quantization
aects the system poles and the overall system gain. Designating the number of quantization bits as
B, each coecient needs to be represented by an integer in the range 2B1 to 2B1 1. The idea is
to choose the integer within this range that, when scaled by an appropriate power of two, is closest to
the original coecient value. The power-of-two scaling, which is easily accomplished on nearly any
473
|H(ej )|
1
100
1215
Figure 7.36: Magnitude response of a 6th-order Chebyshev lowpass lter with unquantized coecients.
hardware platform, can vary as needed between stages and between the a and b coecients. To help
simplify programming, however, the same power-of-two scale factor is often used within coecient
groups. We follow this strategy in this example, which is why any sections coecient pair a1 and
a2 share the same power-of-two scale factor. Table 7.3 presents the quantized coecients using 12-,
10-, 8-, and 6-bit word lengths.
Quantization
12-bit
10-bit
8-bit
6-bit
Section
1
2
3
1
2
3
1
2
3
1
2
3
b0
1073 215
1180 216
1047 218
268 213
295 214
262 216
67 211
74 212
65 214
17 29
18 210
16 212
a1
1863 210
1849 210
1865 210
466 28
462 28
466 28
116 26
116 26
117 26
29 24
29 24
29 24
a2
978 210
902 210
858 210
245 28
225 28
215 28
61 26
56 26
54 26
15 24
14 24
13 24
474
response is unbounded at dc, as shown in Fig. 7.37d. Rather than two complex-conjugate poles
contained within the unit circle, the quantized coecients a1 and a2 of the third section of this lter
produce real poles at z = 0.8125 and z = 1. The pole at z = 1 is particularly problematic and is
the reason the magnitude response becomes unbounded. This system, which is now only marginally
stable, is nearly guaranteed not to operate properly. Problem 7.7-2 revisits this problem using a
single-section implementation rather than a cascade of second-order sections.
|H12 (ej )|
|H10 (ej )|
12
15
(a)
12
15
12
15
(b)
|H8 (ej )|
|H6 (ej )|
12
15
(c)
(d)
Figure 7.37: Magnitude responses of a 6th-order Chebyshev lowpass lter using (a) 12-, (b) 10-, (c)
8-, and (d) 6-bit coecients.
Example 7.21
7.8
We now show that discrete-time systems also can be analyzed using the Laplace transform. In fact,
we shall see that the z-transform is the Laplace transform in disguise and that discrete-time systems
can be analyzed as if they were continuous-time systems.
So far we have considered discrete-time signals as sequences of numbers and not as an electrical
signal (voltage or current). Similarly, we considered a discrete-time system as a mechanism that
processes a sequence of numbers (input) to yield another sequence of numbers (output). The system
is built by using delays, adders, and multipliers that operate on sequences of numbers. A digital
computer is a perfect example: every signal is a sequence of numbers, and the signal processing
involves delaying the number sequences, along with addition and multiplication.
Now suppose that we have a discrete-time system with transfer function H(z) and input x[n].
Consider a continuous-time signal x(t) such that its nth sample value is x[n], as shown in Fig. 7.38.
We
can construct such x(t) from the sample values x[n], as explained in Ch. 3.
475
Let the impulse-sampled signal be x(t), consisting of impulses spaced T seconds apart with the nth
impulse of strength x[n]. Thus, similar to Eq. (3.3),
x(t) =
x[n](t nT ).
n=
x[n]
y[n]
n
x[n]
n
H(z)
y[n]
(a)
x(t)
y(t)
x(t)
T
x(t)
T
Hc (s) = H(esT )
y(t)
(b)
476
Therefore, if y[n] is the output of the discrete-time system in Fig. 7.38a, then y(t), the output of the
continuous-time system in Fig. 7.38b, would be a sequence of impulses whose nth impulse strength
is y[n]. Thus,
y[n](t nT ).
y(t) =
n=
The system in Fig. 7.38b, being a continuous-time system, can be analyzed via the Laplace transform.
If
L
L
x(t) X(s) and y(t) Y(s),
then
Y(s) = H(esT )X(s).
Also,
X(s) = L
(7.64)
2
x[n](t nT )
and Y(s) = L
n=
y[n](t nT ) .
n=
X(s) =
x[n]esnT
and Y(s) =
n=
y[n]esnT .
(7.65)
n=
y[n]e
snT
= H(e
sT
n=
x[n]e
snT
n=
y[n]z n = H(z)
n=
x[n]z n
n=
or
Y (z) = H(z)X(z),
where
X(z) =
n=
x[n]z n
and Y (z) =
y[n]z n .
n=
It is clear from this discussion that the z-transform can be considered as the Laplace transform
with a change of variable z = esT or s = ln(z)/T . Note that the transformation z = esT maps the
imaginary axis in the s-plane (s = j) into a unit circle in the z-plane (z = esT = ejT , or |z| = 1).
The LHP and RHP in the s-plane map into the inside and the outside, respectively, of the unit circle
in the z-plane. A more comprehensive discussion of this mapping is found in Ch. 4 beginning on
page 222.
7.9
Summary
In this chapter, we discuss the analysis of linear time-invariant discrete-time (LTID) systems by
means of the z-transform. The z-transform changes the dierence equations of LTID systems into
algebraic equations. Therefore, solving these dierence equations reduces to solving algebraic equations. Furthermore, the z-transform provides valuable insight into system realization and behavior.
When it exists (converges), the z-transform represents a signal as a sum of everlasting exponentials of the form z n , where the variable z can be viewed as generalized frequency. Thus, the
7.9. Summary
477
z-transform provides a frequency-domain view of a signal. Much like the Laplace transform, there
are both unilateral and bilateral z-transforms. The unilateral z-transform provides a convenient
mechanism to solve systems with initial conditions, but it is restricted to causal signals and systems.
The bilateral z-transform accommodates noncausal signals and systems but does not handle initial
conditions in such a convenient manner as does the unilateral z-transform. To ensure a unique transform pair, the bilateral z-transform must include a region of convergence; the region of convergence
is implied for the unilateral case since causal signals are assumed.
The z-transform can be obtained by direct calculation or by using tables. The inverse z-transform,
on the other hand, involves complex contour integration and is therefore normally computed using
partial fraction expansions and tables. In some cases, power series expansions can also be used. A
variety of z-transform properties are useful in computing the z-transform and its inverse, as well as
giving insight into the nature of signals and systems.
By using the z-transform and its properties, constant-coecient linear dierence equations are
solved algebraically. To this end, the transfer function is particularly useful. The transfer function
H(z) of an LTID system is equal to the ratio of the z-transform of the output to the z-transform of
the input when all initial conditions are zero. Therefore, if X(z) is the z-transform of the input x[n]
and Y (z) is the z-transform of the corresponding zero-state output y[n], then Y (z) = H(z)X(z).
For a system specied by the dierence equation A(E) {y[n]} = B(E) {x[n]}, the transfer function
H(z) = B(z)/A(z). It follows that the BIBO stability of a system can be determined from the poles
of H(z). Moreover, H(z) is the z-transform of the system impulse response h[n], and the transfer
function provides the system response to an everlasting exponential z n as H(z)z n .
Many LTID systems, such as those described by constant-coecient linear dierence equations,
can be realized by adders, scalar multipliers, and time delays. A given transfer function can be
synthesized in many dierent ways. Canonic, transposed canonic, cascade, and parallel forms of
realization are discussed. The realization procedure is identical to that for continuous-time systems
with 1/s (integrator) replaced by 1/z (unit delay).
For BIBO stable DT systems, the frequency response is obtained from the system transfer function H(z) by letting z = ej . Frequency response provides a systems ltering characteristics. The
magnitude and phase of an input sinusoid of frequency are changed according to the magnitude
response |H(ej )| and the phase response H(ej ), respectively. Magnitude and phase response
plots are easily obtained from a systems pole and zero locations. By proper placement of poles and
zeros, it is possible to design basic lowpass, highpass, bandpass, and bandstop lters.
In Sec. 7.8, we showed that discrete-time systems can be analyzed by the Laplace transform as if
they were continuous-time systems. In fact, we showed that the z-transform is the Laplace transform
with a change in variable. Thus, CT and DT systems are inherently connected, and understanding
one necessarily helps in the understanding of the other.
References
1. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
2. Lyons, R. G., Understanding Digital Signal Processing, Addison-Wesley, Reading, MA, 1996.
3. Rader, C. M., and Gold, B., Eects of Parameter Quantization on the Poles of a Digital
Filter, Proc. of the IEEE, Vol. 55, May 1967, pp. 688689.
478
Problems
k(n 2k + 1).
k=0
(e2 2)z
(z e2 )(z 2)
z(z+1)
(z.5)(z+2)
(b) Xb (z) =
(z+1)(z1)
(z 2 +1)
(c) Xc (z) =
z(z+1)
(z.5)2 (z+2)
(a) Xa (z) =
z(z4)
z 2 5z+6
(b) Xb (z) =
z4
z 2 5z+6
(c) Xc (z) =
(e2 2)z
(ze2 )(z2)
(d) Xd (z) =
(z1)2
z3
(e) Xe (z) =
z(2z+3)
(z1)(z 2 5z+6)
(f ) Xf (z) =
z(5z+22)
(z+1)(z2)2
(g) Xg (z) =
z(1.4z+0.08)
(z0.2)(z0.8)2
(h) Xh (z) =
z(z2)
z 2 z+1
n
u[n]
n! n1
(k) xk [n] = 2
(l) xl [n] =
(2)n1 u[n]
(ln )n
n! u[n]
(i) Xi (z) =
2z 2 0.3z+0.25
z 2 +0.6z+0.25
(j) Xj (z) =
2z(3z23)
(z1)(z 2 6z+25)
(k) Xk (z) =
z(3.83z+11.34)
(z2)(z 2 5z+25)
(l) Xl (z) =
z 2 (2z 2 +8z7)
(z1)(z2)3
2z 3 + 13z 2 + z
.
z 3 + 7z 2 + 2z + 1
Problems
479
7.2-5 Extend the procedure used in Prob. 7.2-4 7.3-4 Find the z-transform of the signal illusto nd the rst four terms of x[n] if
trated in Fig. P7.3-4. Solve this problem
in two ways: (a) as in Ex. 7.4d and (b) as
2z 4 + 16z 3 + 17z 2 + 3z
in Ex. 7.8. Verify that the two answers are
.
X(z) =
z 3 + 7z 2 + 2z + 1
equivalent.
7.2-6 Let
X(z) =
z
.
(z )2
x[n]
4
Figure P7.3-4
1 z m
, Rx : all z.
1 z 1
7.3-7 Using pair 2 in Table 7.1 and appropriate properties of the z-transform, determine the z-transform of x[n] = n3 u[n].
7.3-8 Using pairs 1 and 9 in Table 7.1 and
appropriate properties of the z-transform,
determine the z-transform of x[n] =
cos(n/4)u[n].
Find your answer by two methods: (a) using the denition in Eq. (7.1) and (b) using
Table 7.1 and an appropriate z-transform
property.
7.3-9 Apply the time-reversal property to pair 4
Z
to show that n u[n 1] z/(z )
x[n]
with ROC given by |z| < ||.
1
u
7.3-10 Let x[n]
X(z).
m1
Figure P7.3-3
u
(a) Show that (1)n x[n]
X(z).
u
()n u[n]
z/(z + ).
480
2z + 3
.
(z 2)(z 3)
Problems
481
6(5z 1)
,
6z 2 5z + 1
(d) xd = (4)
u[n 2]
2z 1
.
z 2 1.6z + 0.8
z
(z + 0.2)(z 0.8)
z2
5z + 2.2
+ z + 0.16
3.8z 1.1
.
(z 0.2)(z 2 0.6z + 0.25)
z(3z 1.8)
.
z 2 z + 0.16
H(z) =
H(z) =
z(1.6z 1.8)
.
(z 0.2)(z 2 + z + 0.5)
2z 4 + z 3 + 0.8z 2 + 2z + 8
.
z4
nz n .
n=0
482
7.5-9 Consider an LTID system with transfer 7.6-3 Determine the frequency response of the
function
5-point moving-average system given by
z 0.5
.
H(z) =
4
1
z + 0.5
x[n k].
y[n] =
5
k=0
(a) Determine the DFII realization of this
system.
7.6-4 Sketch the magnitude responses of the four
(b) Determine the TDFII realization of
lters depicted by the pole-zero plots shown
this system.
in Fig. P7.6-4.
(c) Show that this system can be realized
as a parallel combination of an iden1
.
tity system and z+0.5
2
7.6-1 For an asymptotically stable LTID system, show that the steady-state response
to input ejn u[n] is H(ej )ejn u[n]. The
steady-state response is that part of the response which does not decay with time and
persists forever.
(a)
(b)
(c)
y[n]
(d)
Figure P7.6-4
z 1
0.4
(a)
x[n]
y[n]
x[n] 3
z 1
z 1
y[n]
Figure P7.6-5
0.4
(b)
3
x[n]
z 1
y[n]
z 1
1.8
z 1
0.16
(c)
Figure P7.6-2
Problems
483
(b) If the highest frequency to be processed is 50 kHz, determine the minimum value of the sampling frequency
Fs that can be used.
transfer function
H(z) = K
z+1
,
z
484
x[n]
z 1
z 1
z 1
0.5
z 1
z 1
0.5
y[n]
(a)
x[n]
z 1
z 1
z 1
0.5
z 1
z 1
0.5
1
y[n]
(b)
Figure P7.6-8
response |H(ej )| is constant with frequency.
(b) Generalize this result to describe how
to construct a Kth-order allpass lter.
7.6-16 Let the impulse responses of two LTID
system be related as
h2 [n] = (1)n h1 [n].
(a) Show that
H2 (z) = H1 (ej z).
How does the frequency response
H2 (ej ) relate to H1 (ej )?
(b) If H1 (z) represents an ideal lowpass
lter with cuto frequency c , sketch
H2 (ej ). What type of lter is H2 (z)?
7.7-1 (a) Determine the transfer function
Hdirect (z) of the direct form secondorder IIR system given in Fig. 7.32.
(b) Determine the transfer function
Hcoupled(z) of the coupled form
second-order IIR system given in
Fig. 7.34.
(c) Compare Hdirect (z) and Hcoupled (z).
How are these two systems the same?
How are they dierent?
7.7-2 The 6th-order lowpass Chebyshev lter of
Ex. 7.21 can be realized as a single-section
100
.
Chapter 8
Digital Filters
Chapter 2 presents techniques for the systematic design of analog lters. Chapters 4, 5, 6, and
7 introduce various aspects of digital lters, primarily from a qualitative perspective. In this
chapter, we discuss techniques for the systematic design of digital lters to meet quantitative design
specications.
Digital lters are classied as either innite impulse response (IIR) or nite impulse response
(FIR). As discussed in Ch. 4, a typical Kth-order LTID system is described by the dierence equation
y[n] = a1 y[n 1] aK1 y[n (K 1)] aK y[n K]+
b0 x[n] + b1 x[n 1] + + bL1 x[n (L 1)] + bL x[n L].
(8.1)
If the feedback coecients ak = 0 for k = 1, 2, . . ., K, then the system is FIR. If even one of these
feedback coecients is nonzero, however, then the system is IIR.
For a given set of specications, IIR lters tend to be much lower order than FIR lters, which
can make them much more ecient to implement. On the other hand, it is often simpler to design
FIR lters with arbitrary frequency response characteristics. Unlike IIR lters, FIR lters are also
guaranteed stable and can be made to have linear phase, both desirable characteristics. In any case,
IIR and FIR lters require dierent design methods. In this chapter, we shall begin with the design
of IIR lters and then conclude with the design of FIR lters.
8.1
Most commonly, IIR lters are designed to follow the dierence equation form of Eq. (8.1). In this
case, there are K + L + 1 unknowns: L + 1 feedforward coecients (bl ) and K feedback coecients
(ak ). Equivalently, IIR lter design requires locating L zeros and K poles and setting the overall
lter gain. Particularly for high-order designs, systematic procedures are necessary to successfully
design systems to meet given specications.
From Ch. 2, we know how to design a good selection of analog IIR lters, including Butterworth,
Chebyshev, inverse Chebyshev, and others. We can capitalize on this knowledge in the design
of digital IIR lters. Through transformation, we can convert an analog IIR lter into digital
form. Notice, however, that the periodic frequency response of a digital lter is necessarily an
approximation of the aperiodic frequency response of an analog lter. Dierent criteria lead to
dierent approximations and, therefore, dierent transformation rules. We present here several
popular methods to convert analog IIR lters into digital IIR lters.
Following
common terminology, we use analog and digital lters to refer to what are more accurately termed
continuous-time and discrete-time lters.
485
486
8.1.1
In Sec. 6.5.2, we studied the impulse invariance method to realize analog lters using digital systems,
as depicted in Fig. 8.1. For bandlimited responses, the impulse invariance method yields exact
results. Unfortunately, all practical systems are non-bandlimited. What happens if the impulse
invariance method is used for any practical design? The resulting design will be an approximation
of what we want. We shall now consider the nature of this approximation and the error in the
resulting design. This will enable us to nd a procedure that will result in a design within given
error specications.
c (s)
H
xc (t)
Hc (s)
yc (t)
xc (t)
C/D
x[n]
(a)
y[n]
H(z)
yc (t)
D/C
(b)
Figure 8.1: Realization of (a) a desired CT lter using (b) a DT lter and interfaces.
h[n]
Tc
Tc
2
t
(a)
(b)
Figure 8.2: Impulse invariance lter design: (a) CT impulse response and (b) DT impulse response.
At this point, it is reasonable to ask whether the term T2c [n] in Eq. (8.2) is really needed.
Looking at Fig. 8.2, this term makes h[0] half as large as we might intuitively expect. In fact, most
Any
practical CT system is causal, which is to say that hc (t) = hc (t)u(t). The abrupt transition u(t) implicit in
hc (t) ensures that the frequency response Hc (j) is non-bandlimited.
487
signal processing references follow this logic and do not include T2c [n]. Unfortunately, intuition
steers us wrong in this case. When using the impulse invariance method, we should always use the
midpoint when sampling any point of discontinuity. As we shall see in Ex. 8.1, such a strategy
generates superior results [1,4].
With the help of Table 7.1, the z-transform of the impulse response of Eq. (8.2) is
T c z + eT
.
(8.3)
H(z) =
2 z eT
This result is readily extended to higher-order systems. First, we express a Kth-order CT transfer
function Hc (s) as a sum of partial fractions as
Hc (s) =
K
k=1
ck
.
s k
(8.4)
(8.5)
k=1
This transfer function can be readily realized, as explained in Sec. 7.5. Table 8.1 lists several pairs
of Hc (s) and their corresponding H(z), including cases involving repeated poles. Notice that the
T2c [n] term occurs in h[n] only when hc (t) contains a discontinuity (pairs 1 and 4). Furthermore,
as T becomes small, T2c [n] has diminishing impact, and good results can be obtained even if the
term is omitted. Regardless, the responses Hc (j) in Eq. (8.4) and Table 8.1 are not bandlimited,
which causes distortion in the corresponding DT lter responses H(ej ). Our next task is to better
understand the nature of this distortion.
Hc (s)
hc (t)
h[n]
H(z)
1.
1
s
u(t)
T u[n]
2.
1
s2
tu(t)
nT 2 u[n]
T 2z
(z1)2
3.
1
s3
t2
2 u(t)
n2 T 3
2 u[n]
T 3 z(z+1)
2(z1)3
4.
1
s
et u(t)
T (eT )n u[n]
5.
1
(s)2
tet u(t)
nT 2 (eT )n u[n]
T 2 zeT
(zeT )2
6.
1
(s)3
t2 t
2 e u(t)
n2 T 3 T n
) u[n]
2 (e
T 3 zeT (z+eT )
2(zeT )3
T
2 [n]
T
2
T
2 [n]
T
2
z+1
z1
z+eT
zeT
(8.4) assumes that Hc (s) has only simple poles. For repeated poles, the form changes accordingly, such
as shown in Table 8.1.
488
Let us see how this time-domain equivalence holds up in the frequency domain.
Consider a hypothetical frequency response Hc (j) (Fig. 8.3a) that we wish to realize using a
digital lter. From the discussion in Secs. 6.4 and 6.5, we know that the spectrum H(ej ) is the
frequency-scaled spectrum Hc (j) repeating periodically with period 2/T , as shown in Fig. 8.3b.
Because all practical lters are non-bandlimited, the overlap among various cycles and the consequent
c (j) that we realize is a distorted
aliasing cannot be avoided. Thus, the frequency response H
version of Hc (j) (Fig. 8.3c). The distortion occurs because of two factors. First, there is a loss of
the spectral tail consisting of the components of Hc (j) beyond /T (light shading), and second,
this very tail folds back at the folding frequency and reappears through aliasing to distort frequencies
below /T (dark shading).
Hc (j)
Fs
F2s
(a)
Fs
2
Fs
H(ej )
Fs
F2s
(b)
Fs
2
Fs
2T
c (j)
H
F2s
(c)
Fs
2
Figure 8.3: Aliasing in digital lters: (a) desired CT lter Hc (j), (b) DT lter H(ej ) with aliasing,
c (j) with distortion.
and (c) realized CT lter H
c (j), aliasing must be minimized by choosing
To reduce the distortions in H(ej ) as well as H
a suciently small sampling interval T . As a rule of thumb, we choose T such that the spectrum
|Hc (j)| at the folding frequency Fs /2 becomes a negligible fraction, such as 1% of the peak value
of |Hc (j)|. For a lowpass lter with peak amplitude at = 0, for example, a 1% criterion suggests
that we select T such that
|H(j/T )| 0.01H(j0).
If Hc (j) is bandlimited to B Hz, there is no spectral overlap and, of course, no aliasing, provided
that we choose T such that B 1/2T . The realized lter matches the desired response Hc (j)
without error, as proven in Sec. 6.5.2. For some lters, such as highpass and bandstop lters, no
value of T , no matter how small, can be found to avoid aliasing. As a result, the impulse invariance
method cannot be used in these cases.
We should also give due consideration to the rate at which the spectrum |Hc (j)| decays with
frequency. If K and L represent the orders of the denominator and numerator polynomials of
Hc (s), then, generally, this rate of decay at higher frequencies is 6(K L) dB/octave or 20(K L)
We
can see this fact in the time domain as well. Highpass and bandstop lters have a (t) term in their impulse
responses that, regardless of T , cannot be properly sampled using the impulse invariance criterion of h[n] = T hc (nT ).
489
dB/decade. Thus, higher values of K L can tolerate higher values of |Hc (j/T )|, and we can get
by with somewhat larger T .
Limitations of the Impulse Invariance Method
The impulse invariance method is handicapped by aliasing. Consequently, this method can be used
to design lters where Hc (j) becomes negligible beyond some frequency B Hz. This condition
restricts the procedure to lowpass and bandpass lters. The impulse invariance method cannot be
used for highpass or bandstop lters. Moreover, to reduce aliasing eects, the sampling rate has
to be very high, which makes its implementation costly. In applications where the sampling rate
is xed, aliasing may produce unacceptable levels of distortion. In general, the frequency-domain
method discussed in the next section is superior to the impulse invariance method.
Using the impulse invariance method, design a digital lter to realize a rst-order Butterworth
lowpass lter with 3-dB cuto frequency c = 105 rad/s.
From Ch. 2, the transfer function of a rst-order Butterworth lowpass lter with 3-dB cuto frequency c is
c
.
Hc (s) =
s + c
According to Eq. (8.3) (or pair 4 in Table 8.1), the transfer function H(z) of the corresponding
digital lter is
c T z + ec T
.
(8.6)
H(z) =
2
z ec T
Typically, we would next select the value of T according to the criterion where the gain at = /T
drops to 1% of the maximum lter gain. However, this choice results in such a good design that
aliasing is nearly imperceptible. The resulting magnitude response is so close to the desired response
that we can hardly notice the aliasing eect in our plot. For the sake of demonstrating the aliasing
eect, we shall deliberately select a 10% criterion instead of a 1% criterion.
Setting s = j in Hc (s), we have
c
.
|Hc (j)| =
2
+ c2
In this case, the maximum value of |Hc (j)| is 1, which occurs at = 0. Applying a 10% criterion
leads to |Hc (j/T )| = 0.1. Observe that
|Hc (j)|
Hence,
|Hc (j/T )|
c
= 0.1
/T
for c .
/T = 10c = 106 .
Thus, a 10% criterion yields T = 106 (a 1% criterion yields T = 107 , which increases the
sampling frequency Fs = 1/T by one full order of magnitude). Substitution of T = 106 in
Eq. (8.6) yields
z + 0.7304
0.1571z + 0.1147
.
=
H(z) = 0.1571
z 0.7304
z 0.7304
A canonical TDFII realization of this lter is shown in Fig. 8.4.
To conrm proper lter behavior, the frequency responses of the digital and analog lters are
compared using MATLAB. As Fig. 8.5 makes clear, the digital lter (solid line) does a respectable
job in behaving like the analog lter (dashed line), although aliasing distortions are apparent, particularly at higher frequencies (near Fs /2).
490
x[n]
y[n]
z 1
0.1147
0.7304
0.1571z+0.1147
.
z0.7304
|H(ej )|
Fs
2
H(ej )
2T
Hc (j)
2
|Hc (j)|
Fs
2
2T
(a)
(b)
Figure 8.5: Impulse invariance method: digital (solid) and analog (dashed) lters (a) magnitude
and (b) phase responses.
Before concluding this example, we wish to again stress the importance of using the midpoint
when sampling discontinuities in hc (t). Consider what happens in the present example if we assign
u(0) = 1 (as done in most signal processing texts) or, alternatively, if we assign the left limit u(0) = 0.
As Fig. 8.6 demonstrates, the responses of the resulting digital lters (u(0) = 1 case dashed, u(0) = 0
case dotted) are signicantly degraded from the u(0) = 0.5 case (solid). As the magnitude response
plots show, these degradations are not just limited to high frequencies but also can signicantly
impact lter behavior at low frequencies.
|H(ej )|
Fs
2
H(ej )
2T
Fs
2
(a)
2T
(b)
Figure 8.6: Frequency responses for impulse invariance method with u(0) = 0.5 (solid), u(0) = 1
(dashed), and u(0) = 0 (dotted).
Example 8.1
491
Using a 10% rule, design a DT system to implement a Butterworth lowpass lter with a 3-dB cuto
frequency of 250 Hz. The DT system must operate at a sampling frequency Fs 10000 Hz. What is the
eect of using a 1% rule on the resulting digital lter?
8.1.2
z1
1 z 1
=
.
T
Tz
(8.7)
Although not considered here, the so-called matched z-transform relies on the relationship z = esT to convert
the poles and zeros of Hc (s) to a corresponding digital design H(z), so this relationship does nd relevance to digital
lter design.
For most functions y(t), the approximation improves toward equality in the limit,
y[n] y[n 1]
d
y(t) = lim
.
T 0
dt
T
492
From Eq. (4.51), we observe that the second derivative can be approximated as
d2
1
y(t)
y[n]
2y[n
1]
+
y[n
2]
.
dt2
T2
Consistent with Eq. (8.7), this leads to the transformation
2
1 z 1
1 2z 1 + z 2
2
=
.
s =
T2
T
Similarly, we can verify from Eq. (4.52) that, for any integer k, the transformation for sk is
k
1 z 1
sk =
.
T
Thus, to realize a rational function Hc (s), we apply the backward dierence transform of Eq. (8.7)
to obtain a DT system transfer function H(z) as
H(z) = Hc (s)|s= 1 (1z1 ) .
T
(8.8)
The digital realizations of an analog dierentiator and integrator found in Exs. 4.9 and 4.10, respectively, conform with this transformation: the analog dierentiator Hc (s) = s is realized with
H(z) = (1 z 1 )/T , and the analog integrator Hc (s) = 1/s is realized with H(z) = T /(1 z 1 ).
Although the backward dierence transform of Eq. (8.7) works reasonably well for low frequencies
(lowpass and bandpass lters), it has a drawback in that it maps the s-plane -axis (representing CT
sinusoids) not onto the z-plane unit circle (representing DT sinusoids) but onto the unit-diameter
circle centered at z = 0.5. For this reason, Eq. (8.7) is ineective for highpass and bandstop lters.
Further, even lowpass and bandpass lters may require higher-than-desired sampling rates. Put
bluntly, the backward dierence transform is rather crude and not very desirable in practice.
Trapezoidal Rule: The Bilinear Transform
To improve the performance of the backward dierence transform, we look for a better approximation
to the derivative operation. This is obtained by considering the trapezoidal rule for integration found
in Ex. 4.10 (Eq. (4.46)) as
T
x[n] + x[n 1] .
y[n] y[n 1] =
2
The z-transform of this equation yields
Y (z)
T
=
X(z)
2
z+1
z1
This expression corresponds to an analog integrator Hc (s) = 1/s and suggests using the transformation
2 z1
s=
.
(8.9)
T z+1
To
Observing that (x 0.5)2 + y 2 = (0.5)2 conrms that s = j produces values z that lie on a circle with radius 0.5
centered at the point (0.5, 0).
The transformation of Eq. (8.9) is a conformal, or angle-preserving, mapping, a topic that requires some background in the theory of complex variables. For our purposes, we need not worry about the details.
493
1+
1
sT
2
sT
2
(8.10)
From these relationships, we see that the bilinear transform is a one-to-one mapping between the sand z-planes.
Unlike the backward dierence transform, the bilinear transform maps the s-plane -axis onto
the z-plane unit circle, which allows it to handle highpass and bandstop lters. Furthermore, it maps
the left-half s-plane inside the z-plane unit circle and the right-half s-plane outside the z-plane unit
circle. As a consequence, the bilinear transform maps a stable CT lter to a stable DT lter. To
show these mapping properties, we use Eq. (8.10) with s = + j to obtain
z=
2 + T + jT
.
2 T jT
(8.11)
From this expression, we see that |z| is greater than unity if > 0 and is less than unity if < 0.
This means that the left and right halves of the s-plane, respectively, map into the inside and outside
of the z-plane. When s = j (implying that = 0), Eq. (8.11) shows that |z| = 1, implying that
the -axis in the s-plane maps onto the unit circle in the z-plane.
To nd the relationship between analog frequency and the corresponding digital frequency ,
let us consider Eq. (8.9) with s = j and z = ej , that is,
2 ej 1
2 j sin(/2)
2 ej/2 ej/2
2
j =
tan
=
=
=
j
.
T ej + 1
T ej/2 + ej/2
T
cos(/2)
T
2
In other words, the bilinear transform causes
2
= tan
and
T
2
= 2 tan1
T
2
(8.12)
As varies from 0 to , varies from 0 to . Since every value one-to-one maps to a corresponding
value , the bilinear transform does not suer from the aliasing problems that plague the impulse
invariance method.
Like the backward dierence transform, the bilateral transform
starts with a known analog lter
yields the desired digital lters
transfer function Hc (s). Applying the substitution s = T2 z1
z+1
transfer function as
H(z) = Hc (s)|s= 2 ( z1 ) .
(8.13)
T
z+1
Let us consider the impact of this transform on a rational Hc (s) with L zeros zl and K poles pk ,
written in factored form as (see Eq. (1.52))
Hc (s) =
bL
aK
L
l=1 (s
zl )
k=1 (s
pk )
K
Applying the bilinear transform and simplifying the result yield (see Prob. 8.1-26)
1 L
0
1+zl T /2
L
l=1 z 1zl T /2
bL l=1 ( T2 zl )
(z + 1)KL .
H(z) =
K
2
1+pk T /2
aK K
(
p
)
k
k=1 T
k=1 z 1pk T /2
From Eq. (8.15), we see that the bilinear transform maps the CT zeros zl to DT zeros
the CT poles pk to DT poles
1+pk T /2
1pk T /2 .
(8.14)
(8.15)
1+zl T /2
1zl T /2
and
494
to z = 1. Each pole or zero of the CT lter independently maps to a corresponding pole or zero
of the DT lter; only the overall gain term of the DT lter depends on a combined interaction of
terms.
The frequency response of the digital lter of Eq. (8.13) is obtained by setting z = ej . Using
the result in Eq. (8.12), we obtain
!
2
H(e ) = Hc j tan
.
T
2
j
(8.16)
We observed earlier that as varies from 0 to , varies from 0 to . Hence, as varies from 0
to , H(ej ) takes on exactly the same values as that of Hc (j) as varies from 0 to . Thus,
the analog lter frequency response over the entire frequency range of 0 < is compressed to
the range 0 < for the digital lter frequency response. This frequency warping is the basic
dierence between the bilateral transform and the impulse invariance technique. In the latter, the
mapping from analog to digital frequency is linear, and therefore, aliasing occurs for all frequencies
that map beyond = . Conversely, the bilinear transform, while beset with frequency warping,
is not tormented by aliasing. Furthermore, the distortions caused by warping are tolerable in many
applications. For example, frequency warping can be compensated in lter applications that require
ideal piecewise-constant magnitude responses.
Impact of the Sampling Interval T on the Bilinear Transform
The absence of aliasing in the bilinear transform is not a license to use an arbitrarily large sampling
interval T (or low sampling frequency Fs ). We still must ensure that the input is sampled at a
rate that avoids aliasing. If the highest frequency to be processed is fmax Hz, then to avoid signal
aliasing, we must use
1
T
.
(8.17)
2fmax
Further, the value of T impacts the way that frequencies are warped, as suggested by Eq. (8.12).
Let us clarify all these ideas with an example. Later, we shall learn how to better remedy the ills of
frequency warping.
Using the bilinear transform, design a digital lter to realize a rst-order Butterworth lowpass
lter with 3-dB cuto frequency c = 105 rad/s.
Example 8.1 solves this problem using the impulse invariance method. Here, we shall use the
bilinear transform and then compare the results of the two methods.
As shown in Ex. 8.1, the transfer function of a rst-order Butterworth lowpass lter with 3-dB
cuto frequency c is Hc (s) = c /(s + c ). This transfer function is already in the factored form of
Eq. (8.14). Noting that bL /aK = c , L = 0, K = 1, and p1 = c , we use Eq. (8.15) to obtain
H(z) =
2
T
c
+ c
z+1
z
1c T /2
1+c T /2
Normally, we should use Eq. (8.17) to select a suitable value for T based on the highest input
frequency fmax . However, to facilitate comparison with the impulse invariance method, we choose
z+1
z 0.7285
495
0.1358
y[n]
z 1
0.7285
z+1
Figure 8.7: Canonical TDFII-like realization of H(z) = 0.1358 z0.7285
.
A canonical TDFII-like realization of this lter is shown in Fig. 8.7. Compared with Fig. 8.4, we
see in this case that the bilinear transform produces a solution that is very similar to the solution
of the impulse invariance method.
To verify lter behavior, the frequency responses of the digital and analog lters are compared
using MATLAB. The following code, while somewhat bulky for this simple rst-order example, easily
accommodates higher-order cases. This code also readily veries the numerator and denominator
coecients of H(z) computed earlier.
01
02
03
04
05
06
07
08
As Fig. 8.8 makes clear, the bilinear transform produces a digital lter (solid line) that closely
matches the analog lter (dashed line), although distortions from frequency warping are apparent at
higher frequencies. In this example, both the bilinear transform (Fig. 8.8) and the impulse invariance
method (Fig. 8.5) produce satisfactory approximations of the analog lter characteristics. Generally,
as the phase responses illustrate in this case, the bilinear transform tends to outperform the impulse
invariance method.
|H(ej )|
Fs
2
H(ej )
2T
Hc (j)
2
|Hc (j)|
Fs
2
(a)
2T
(b)
Figure 8.8: Bilinear transform: digital (solid) and analog (dashed) lters (a) magnitude and (b)
phase responses.
Example 8.2
496
To better understand this warping behavior, consider Fig. 8.9, which illustrates the bilinear transform
graphically. The desired analog response |Hc (j)|2 (note the reverse orientation of the vertical axis)
is shown in the lower right, the transformation rule is shown in the upper right, and the resulting
digital response |H(ej )|2 is shown in the upper left.
2 3
= T
T
2
1
2
|H(ej )|2
= 2 tan1
1
2
1
|Hc (j)|2
497
such applications, the impulse invariance method is more appropriate since it produces a linear
mapping from analog to digital frequency ( = T ). The bilinear transform is better suited for
lters where compression can be accepted, as in the case of lters approximating an ideal piecewiseconstant magnitude response.
There are two common ways to combat frequency warping. The rst is to reduce T (increase the
sampling rate) so that the signal bandwidth is kept small enough that T 2 tan1 (T /2) over the
desired frequency band. This step is easy to execute, but it requires a higher sampling rate (lower
T ) than necessary. The second approach, known as prewarping, solves the problem without unduly
reducing T .
8.1.3
With prewarping, we start not with the desired Hc (s) but with a prewarped version Hc (s). The
idea is to prewarp the analog lter response in such a way as to exactly cancel the distortion caused
by the bilinear transform. The idea is similar to the one used in prestressed concrete, in which a
concrete beam is precompressed initially. The beams built-in compression compensates for tension
that occurs when the beam is loaded.
Usually, prewarping is done at certain critical frequencies rather than over the entire band.
The nal lter behavior exactly equals the desired behavior at these selected frequencies. Such
an approach is suitable for the design of lters approximating ideal piecewise-constant magnitude
responses, provided that the critical frequencies are properly chosen. If we require a digital lter to
have particular response characteristics at critical frequencies 1 , 2 , . . ., M , then we must start
with an analog lter Hc (s) with the same response characteristics at frequencies 1 , 2 , . . ., M ,
where
m T
2
,
m = 1, 2, . . . , M.
(8.18)
m = tan
T
2
This results in the prewarped lter Hc (s). Applying the bilinear transform to this lter (Eq. (8.13))
yields a digital lter H(z) with the desired response features at the correct frequencies m = m T .
This is because, according to Eq. (8.12), the critical frequencies m of the analog lter map to the
digital frequencies
!
m T
m T
T 2
tan
m = 2 tan1
= 2 tan1
= m T.
2
2 T
2
In other words, the prewarping of Eq. (8.18) exactly cancels the warping of Eq. (8.12) that is inherent
to the bilinear transform. We clarify these ideas with an example of a Butterworth lowpass lter.
Using the bilinear transform with prewarping, design a digital lter to realize a Butterworth lowpass
lter with unity gain at = 0, p = 2 dB of maximum passband attenuation over 0 8,
and s = 11 dB of minimum stopband attenuation over 15. The maximum frequency to be
processed is max = 30 rad/s.
The highest frequency max = 30 yields T /30. Let us use T = /35. The Butterworth
lter specications for this design are p = 8, s = 15, p = 2 dB (p = 0.2057), and s = 11
dB (s = 0.2818). To begin, we prewarp the critical frequencies p and s according to Eq. (8.18),
which yields
2
p T
70
4
p = tan
=
tan
= 8.3625
T
2
35
and
s =
s T
15
2
70
tan
tan
=
= 17.7691.
T
2
70
498
Next, we use the techniques of Ch. 2 to design a Butterworth lter with critical frequencies p and
s . Using Eq. (2.38), the minimum lter order K is computed as
*
+ *
+
log 10s /10 1 / 10p /10 1
log 1011/10 1 / 102/10 1
K=
=
= 1.9811 = 2.
2 log(s /p )
2 log(17.7691/8.3625)
Using Eq. (2.39), the half-power frequency c must therefore satisfy
p
s
1/2K = 9.5624 c 9.6305 =
1/2K .
10p /10 1
10s /10 1
To ensure that both passband and stopband specications are comfortably met, we choose a convenient middle value c = 9.5965.
MATLAB simplies the remaining computations of the design. First, we dene a few basic
parameters.
01
Next, we use Eqs. (2.34) and (2.35) to determine the zeros, poles, and gain of our prewarped analog
lter Hc (s).
02
03
Z = []; P = [1j*omegacp*exp(1j*pi*(2*k-1)/(2*K))];
bL = omegacp^K; aK = 1; L = length(Z); K = length(P);
We next apply the bilinear transform and expand the result of Eq. (8.15) to obtain the coecients
of H(z) = B(z)/A(z).
04
05
B
B
A
A
=
=
=
=
bL/aK*prod(2/T-Z)/prod(2/T-P)*poly([(1+Z*T/2)./(1-Z*T/2),-ones(1,K-L)])
0.1034 0.2067 0.1034
poly((1+P*T/2)./(1-P*T/2))
1.0000 -0.9077 0.3212
Using these results, the desired digital lter has a transfer function
H(z) =
0.1034(z 2 + 2z + 1)
.
z 2 0.9077z + 0.3212
To verify that lter requirements are met, Fig. 8.10 plots the magnitude response versus /T = .
06
07
08
|H(ej )|
1
0.7943
0.2818
0
15
35
0.1034(z 2 +2z+1)
z 2 0.9077z+0.3212 .
Example 8.3
499
A Simplied Procedure
In the bilinear transform with prewarping,
all the critical frequencies m are transformed (pre
warped) by the equation m
= T2 tan m2 T (Eq. (8.18)). These prewarped frequencies
are used to
nd the prewarped CT lter transfer function Hc (s). Finally, we substitute s =
in
Hc (s)
2
T
z1
z+1
(Eq. (8.9))
l=1
(1
z
)
1z
bL L
l
l
l=1
(z + 1)KL ,
(8.20)
H(z) =
K
K
1+pk
aK k=1 (1 pk )
z
k=1
1pk
where zl , pk , and bL /aK are the zeros, poles, and gain factor of the prewarped lter Hc (s).
Example 8.4 (Simplied Procedure for the Bilinear Transform with Prewarping)
Repeat Ex. 8.3 using the simplied procedure for the bilinear transform with prewarping.
To begin, we prewarp the critical frequencies p and s according to Eq. (8.19), which yields
p T
s T
4
15
p = tan
= tan
= 0.3753
and
s = tan
= tan
= 0.7975.
2
35
2
70
The ratio of s /p is unchanged, so calculation of the minimum lter order remains K = 2. Again
using Eq. (2.39), the half-power frequency c must satisfy
p
s
1/2K = 0.4292 c 0.4322 =
1/2K .
10p /10 1
10s /10 1
From this range, we select the middle value c = 0.4307.
Given the low order and simplied transform, we complete the design using tables and hand
calculations rather than MATLAB.
From Table 2.2, a K = 2 normalized Butterworth lter has
transfer function 1/(s2 + 2s + 1). To shift the 3-dB cuto from 1 to c = 0.4307, we apply the
lowpass-to-lowpass transformation s s/0.4307 (Eq. (2.25)) to obtain
Hc (s) =
2
s
0.4307
0.1855
1
.
= 2
s
s
+
0.6091s
+ 0.1855
+ 2 0.4307 + 1
Finally, we obtain H(z) from Hc (s) using the simplied bilinear transform s = (z 1)/(z + 1)
(Eq. (8.19)), which yields
0.1855
0.1034(z + 1)2
.
= 2
H(z) = Hc (s)|s= z1 = 2
z+1
s + 0.6091s + 0.1855 s= z1
z 0.9077z + 0.3212
z+1
500
Using the bilinear transform with prewarping, design a digital Butterworth lowpass lter with
unity gain at = 0, p = 2 dB of maximum passband attenuation over 0 2 , and s = 11
dB of minimum stopband attenuation over 3
4 .
The Butterworth lter specications for this design are p = 2 , s = 3
4 , p = 2 dB (p = 0.2057),
and s = 11 dB (s = 0.2818). To begin, we use Eq. (8.21) to map our digital critical frequencies
p and s to their corresponding prewarped analog critical frequencies
p
s
3
= 1.0000
and
s = tan
p = tan
= tan
= tan
= 2.4142.
2
4
2
8
Next, we use the techniques of Ch. 2 to design a Butterworth lter with critical frequencies p and
s . Using Eq. (2.38), the minimum lter order K is computed as
*
+ *
+
log 1011/10 1 / 102/10 1
log 10s /10 1 / 10p /10 1
=
= 1.6942 = 2.
K=
2 log(s /p )
2 log(2.4142)
Using Eq. (2.39), the half-power frequency c must therefore satisfy
p
s
1/2K = 1.1435 c 1.3085 =
1/2K .
/10
/10
10 p
10 s
1
1
Once again, we choose the middle value c = 1.2260.
From Table 2.2, we nd the normalized Butterworth polynomial for K = 2 and replace s with
s/c to nd Hc (s) as
Hc (s) =
s
( 1.2260
)2
1.5030
1
.
= 2
s
s + 1.7338s + 1.5030
+ 2( 1.2260 ) + 1
Finally, we obtain H(z) from Hc (s) using the substitution s = (z 1)/(z + 1) (Eq. (8.21)), which
yields
1.5030
0.3548(z + 1)2
.
= 2
H(z) = Hc (s)|s= z1 = 2
z+1
s + 1.7338s + 1.5030 s= z1
z + 0.2375z + 0.1816
z+1
501
To verify that specications are met, Fig. 8.11 plots the lters magnitude response |H(ej )|. This
magnitude response is xed, regardless of the operational sampling rate Fs = 1/T . In this case, the
sampling interval T is completely irrelevant to the design of H(z).
|H(ej )|
1
0.7943
0.2818
0
3
4
0.3548(z+1)2
z 2 +0.2375z+0.1816 .
Example 8.5
Using the bilinear transform with prewarping, design a second-order digital Chebyshev lowpass lter with
a maximum passband ripple of p = 1 dB for 0 /3.
8.1.4
The same bilinear transform procedures to design digital lowpass lters also work to design digital
highpass, bandpass, and bandstop lters. The main diculty that arises is the sheer number of
transformations that need to be taken. First, critical frequencies are prewarped, yielding critical
frequencies of the analog highpass, bandpass, or bandstop lter. These critical frequencies are then
related to the critical frequencies of an appropriate lowpass lter, which is then designed to meet
these specications. The lowpass prototype is transformed to an analog highpass, bandpass, or
bandstop lter, which is then further transformed into a digital lter.
So many transformations can be a daunting task, particularly for high-order lters. The process
can be streamlined, however, if we use the simplied form of the bilinear transform, combine certain
transformations, use normalized analog lowpass prototype lters, and operate on the factored form
of the lter transfer function. We next summarize these ideas and provide several design examples.
z+1
.
z1
(8.22)
502
Applied to the factored form of the lowpass prototype transfer function Hc (s) (see Eq. (8.14)), the
desired highpass digital lter is thus
0
1 L
zl +1
L
z
l=1
zl 1
bL l=1 (1 zl )
(z 1)KL .
(8.23)
H(z) =
K
K
pk +1
aK k=1 (1 pk )
z
k=1
pk
1
As Eq. (8.23) shows, the lowpass prototypes zeros zl and poles pk map to the zeros
pk +1
pk 1
zl +1
zl 1
and poles
of the digital highpass lter. Further, the K L zeros at map to zeros at z = 1. These
mappings are relatively easy to compute, by calculator or computer, regardless of the lter order.
Using the bilinear transform with prewarping, design a digital lter to realize a Chebyshev highpass
lter with p = 1 dB of maximum passband ripple (p = 0.1087) for 20 rad/s and s = 20
dB of minimum stopband attenuation (s = 0.1) over 0 15. The maximum frequency to be
processed is max = 80 rad/s.
In order to avoid aliasing, Eq. (8.17) requires that the sampling interval T be chosen less than
/max = /80. Let us choose T = /100. Due to the complexity of this problem, we shall use
MATLAB for most of the computations.
To begin, the critical frequencies s = 15 and p = 20 are prewarped using Eq. (8.19).
01
02
Thus, the analog highpass lters prewarped critical frequencies are s = 0.2401 and p = 0.3249.
To determine the order K of the lowpass prototype, we need to determine how the analog highpass
lters critical frequencies map to the lowpass lters stopband-to-passband ratio lp,s /lp,p. Using
Eq. (2.27), this ratio is
lp,s
=
lp,p
0 1
s
0 1
p
p
.
s
The order of the lowpass prototype is computed according to (see Eq. (2.46))
10s /10 1 / 10p /10 1
cosh1
.
K=
03
K = ceil(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/acosh(omegapp/omegasp))
K = 5
Normalizing the passband frequency to 1, we now design our prototype Chebyshev lowpass lter
using
Eqs. (2.45), (2.47), and (2.48). Since K is odd, the dc gain of the prototype is 1 rather than
1/ 1 + 2 .
04
05
06
07
With the prototype Chebyshev lowpass lter in place, we next use Eq. (8.23) to determine the
nal digital highpass lter. To do this, we rst need to determine an appropriate frequency scaling
503
parameter 1 . Setting 1 = p = 0.3249 causes the resulting lter to exactly meet passband requirements and exceed stopband specications. Most design tools choose this simple and convenient
value. To realize a design with buer zones on both the passband and stopband sides, a little more
work is required.
To achieve the other extreme, we rst use Eq. (2.46) to determine the actual stopband frequency
lp,s of the lowpass prototype.
08
omegalps = cosh(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/K);
From Eq. (2.27), we see that 1 = s lp,s causes the lowpass stopband frequency lp,s to map
exactly to the (prewarped) analog highpass lters stopband frequency s . This results in a lter
that exactly meets stopband requirements and exceeds passband specications. Instead of using
either extreme, we instead choose a middle value.
09
omega1p = mean([omegapp,omegasp*omegalps])
omega1p = 0.3162
In this case, the balanced value 1 = 0.3162 is quite close to the extreme (but simple) choice
1 = p = 0.3249. As lter order increases, the dierences tend to become progressively smaller,
and there is less justication to go through the extra work to determine the balanced value.
We next apply Eq. (8.23) and expand the result to obtain the coecients of H(z) = B(z)/A(z).
10
11
12
B = bL/aK*prod(omega1p-Z)/prod(omega1p-P)*...
poly([(Z+omega1p)./(Z-omega1p),ones(1,K-L)])
B = 0.2615 -1.3073 2.6145 -2.6145 1.3073 -0.2615
A = poly([(P+omega1p)./(P-omega1p)])
A = 1.0000 -2.4798 2.8611 -1.6181 0.4299 0.0224
From these results, the transfer function of the desired digital Chebyshev highpass lter is thus
H(z) =
To verify that lter requirements are met, Fig. 8.12 plots the magnitude response versus /T = .
13
14
15
Omega = linspace(0,pi,1001);
H = polyval(B,exp(1j*Omega))./polyval(A,exp(1j*Omega));
plot(Omega/T,abs(H),k-);
|H(ej )|
1
0.8913
0.1
0
15 20
100
Example 8.6
504
s2 + 1 2
,
s (2 1 )
where 1 and 2 are the (prewarped) bandpass lter frequencies that correspond to 0 = 1 of the
lowpass prototype. Combined with the simplied bilinear transform s = (z 1)/(z +1), a normalized
analog lowpass prototype Hc (s) is converted to a digital bandpass lter H(s) by the substitution
s=
z 2 + 2c1 z + 1
,
c2 (z 2 1)
where c1 =
1 2 1
1 2 + 1
and c2 =
2 1
.
1 2 + 1
(8.24)
Applied to the factored form of the lowpass prototype transfer function Hc (s) (see Eq. (8.14)), the
desired bandpass digital lter is thus
0
1 L 2 2c1
L
1+c2 zl
z
z
+
+
bL l=1 ( c12 zl )
KL
l=1
1c2 zl
1c2 zl
z2 1
H(z) =
,
(8.25)
K
K
1+c2 pk
2c1
2
aK k=1 ( c12 pk )
k=1 z + 1c2 pk z + 1c2 pk
where
c1 =
1 2 1
1 2 + 1
and c2 =
2 1
.
1 2 + 1
As Eq. (8.25) shows, each ofthe lowpass prototypes zeros zl maps to a pair of zeros determined
1+c2 zl
2c1
1c2 zl z + 1c2 zl . Similarly, each of the poles pk maps to a pair of poles
2c1
2 pk
z + 1+c
determined by the roots of z 2 + 1c
1c2 pk . Further, each of the K L zeros at maps
2 pk
to a pair of zeros, one at z = 1 and one at z = 1.
by the roots of z 2 +
Design a digital lter to realize a Butterworth bandpass lter with p = 2.1 dB of maximum
passband ripple (p = 0.2148) for 1000 2000 and s = 20 dB of minimum stopband
attenuation (s = 0.1) over both 0 450 and 4000. Take T = /10000, and let the
digital design exactly meet passband specications.
The passband and stopband critical frequencies are s1 = 450, p1 = 1000, p2 = 2000, and
2s = 4000. The corresponding prewarped critical frequencies are determined using Eq. (8.19).
01
02
03
omegas = abs([(omegas1p^2-omegap1p*omegap2p)/(omegas1p*(omegap2p-omegap1p)),...
(omegas2p^2-omegap1p*omegap2p)/(omegas2p*(omegap2p-omegap1p))])
omegas = 3.9393 3.9374
505
Selecting the smaller (more restrictive) value, the order is computed using Eq. (2.38).
06
07
To meet passband specications exactly, we compute the 3-dB cuto frequency c of the prototype
lter using the lower bound of Eq. (2.39).
08
omegac = omegap/((10^(alphap/10)-1)^(1/(2*K)))
omegac = 1.1261
Using Eqs. (2.34) and (2.35), we compute the zeros, poles, and gain of the lowpass prototype.
09
10
Using Eq. (8.25), each pole of the prototype transforms into a pair of poles in the digital BPF. The
zeros are at z = 1 since the Butterworth prototype is an all-pole lter (L = 0).
11
12
13
14
15
c1 = (omegap1p*omegap2p-1)/(omegap1p*omegap2p+1);
c2 = (omegap2p-omegap1p)/(omegap1p*omegap2p+1);
Zdig = [ones(1,K-L),-ones(1,K-L)];
for i = 1:K, Pdig(i,:) = roots([1 2*c1./(1-c2*P(i)) (1+c2*P(i))./(1-c2*P(i))]); end
B = bL/aK*prod(1/c2-Z)/prod(1/c2-P)*poly(Zdig(:)), A = poly(Pdig(:)),
B = 0.0248 0 -0.0495 0 0.0248
A = 1.0000 -3.1646 4.0431 -2.4558 0.6071
Thus, the desired digital Butterworth bandpass lter has transfer function
H(z) =
0.0248(z 4 2z 2 + 1)
B(z)
= 4
.
A(z)
z 3.1646z 3 + 4.0431z 2 2.4558z + 0.6071
The magnitude response plot of Fig. 8.13 veries that H(z) satises design requirements.
16
17
|H(ej )|
1
0.7852
0.1
0
450 1000
2000
4000
10000
0.0248(z 4 2z 2 +1)
z 4 3.1646z 3 +4.0431z 2 2.4558z+0.6071 .
Example 8.7
506
s (2 1 )
,
s2 + 1 2
where 1 and 2 are the (prewarped) bandstop lter frequencies that correspond to 0 = 1 of the
lowpass prototype. Combined with s = (z 1)/(z + 1), a normalized analog lowpass prototype Hc (s)
is converted to a digital bandstop lter H(s) by the substitution
s=
c2 (z 2 1)
,
z 2 + 2c1 z + 1
where c1 =
1 2 1
1 2 + 1
and c2 =
2 1
.
1 2 + 1
(8.26)
Equation (8.26) is just the reciprocal of the lowpass-to-bandpass transformation of Eq. (8.24). Applied to the factored form of the lowpass prototype transfer function Hc (s), the desired bandstop
digital lter is thus
1 L 2 2c1 zl
0
zl +c2
L
z
z
+
+
KL
l=1
zl c2
zl c2
bL l=1 (c2 zl )
z 2 + 2c1 z + 1
,
(8.27)
H(z) =
K
K 2 2c1 pk
pk +c2
aK k=1 (c2 pk )
+
z
z
+
k=1
pk c2
pk c2
where
c1 =
1 2 1
1 2 + 1
and c2 =
2 1
.
1 2 + 1
Equation (8.27) creates a bandstop digital lter that is double the order of the lowpass prototype,
with two poles (or zeros) for every pole (or zero) of the lowpass prototype.
Plot the magnitude response of a 10th-order digital Chebyshev bandstop lter that has p = 1
dB of maximum passband ripple (p = 0.1087) for 0 /4 and /2 . Determine the
critical stopband frequencies s1 and s2 that correspond to s = 20 dB of stopband attenuation
(s = 0.1).
A 10th-order digital Chebyshev bandstop lter requires a 5th-order lowpass prototype, which we
can design with normalized passband frequency p = 1 in an identical fashion to Ex. 8.6.
01
02
03
04
The critical passband frequencies of the digital bandstop lter are p1 = /4 and p2 = /2.
These digital specications are prewarped according to Eq. (8.21).
05
Next, we use Eq. (8.27) to determine the poles, zeros, gain, and transfer function coecients of the
digital lter.
06
07
08
09
10
c1 = (omegap1p*omegap2p-1)/(omegap1p*omegap2p+1);
c2 = (omegap2p-omegap1p)/(omegap1p*omegap2p+1);
Zdig = repmat(roots([1 2*c1 1]),K-L,1);
for i = 1:K, Pdig(i,:) = roots([1 2*c1*P(i)./(P(i)-c2) (P(i)+c2)./(P(i)-c2)]); end
B = bL/aK*prod(c2-Z)/prod(c2-P)*poly(Zdig(:)); A = poly(Pdig(:));
507
and
s2 = 1.4784 = 0.4706.
The magnitude response plot of Fig. 8.14 conrms these calculations as well as the overall behavior
of the digital bandstop lter.
13
14
15
Omega = linspace(0,pi,1001);
H = polyval(B,exp(1j*Omega))./polyval(A,exp(1j*Omega));
plot(Omega,abs(H),k-);
|H(ej )|
1
0.8913
0.1
0
Figure 8.14: Magnitude response for 10th-order digital Chebyshev bandstop lter.
Example 8.8
Plot the magnitude response of a 12th-order digital inverse Chebyshev bandstop lter that has p = 0.5
dB maximum passband ripple (p = 0.0559) for 0 /3 and 2/3 . Set the minimum
stopband attenuation to s = 40 dB (s = 0.01), and determine the critical stopband frequencies s1 and
s2 .
508
8.1.5
Section 7.5 presents several methods to realize constant-coecient linear dierence equations. For
low-order designs implemented on oating-point processors, any of the direct realizations are likely to
work, although the canonical TDFII realization is probably the most popular. For high-order designs
or implementations on xed-point processors, however, direct realizations are often unsatisfactory.
Better performance is obtained using parallel or cascade structures. Next, we present a relatively
simple procedure to generate a cascade realization that works well in most circumstances. More
exotic methods are found in the literature.
Cascade of Second-Order Sections
Cascade realizations are usually considered the best general-purpose lter realization. Here, we
present one strategy to generate a realization based on the cascade of second-order sections. We
shall assume the more common case of real systems, where complex poles and zeros occur in complexconjugate pairs. The idea is to pair poles with nearby zeros, thereby encouraging the magnitude
response of each pole-zero pair to be as at as possible [5,7].
1. Express H(z) in factored form to determine system poles and zeros.
2. Pair conjugate roots and expand to produce second-order terms with real coecients. Real
roots, if any, can also be combined to form second-order terms.
3. Sort conjugate pole terms followed by real pole terms in decreasing order of pole magnitude.
4. Pair the complex poles nearest the unit circle with the nearest complex zeros to form a secondorder section. Remove these poles and zeros from the list.
5. Repeat step 4 for each remaining pair of poles and zeros.
6. Retain or reverse section order. Both choices have advantages, although the reverse order,
which orders poles closest to the unit circle last, is more common.
7. Realize each second-order section with a standard structure, such as TDFII. Overall lter gain
is often applied to the rst or last section or distributed across all sections.
We next demonstrate the procedure and the reasoning behind it with an example.
Realize the 4th-order digital Butterworth bandpass lter of Ex. 8.7 using a cascade of second-order
sections.
A cascade of two second-order stages is required to realize this 4th-order system. Factoring H(z)
from Ex. 8.7, the four system zeros are
z1 = 1, z2 = 1, z3 = 1, z4 = 1,
the four system poles are
p1 = 0.8659 + j0.2876, p2 = 0.8659 j0.2876, p3 = 0.7164 + j0.4648, p4 = 0.7164 j0.4648,
and the overall system gain is 0.0248. Figure 8.15 shows the pole-zero plot for this Butterworth
bandpass lter.
Matching p1 with its conjugate p2 produces the quadratic z 2 1.7318z 2 + 0.8325, and matching
p3 with its conjugate p4 produces z 2 1.4328z 2 + 0.7293. Grouping z1 and z2 produces z 2 + 2z + 1,
while the remaining zeros z3 and z4 produce z 2 2z + 1.
Since p1 and p2 are closest to the unit circle, these poles are paired with the closest zeros z1 and z2
to form a second-order transfer function (z 2 +2z+1)/(z 2 1.7318z 2 +0.8325). The remaining poles p3
509
Im
p3
p1
2
z3 , z4
Re
z1 , z2
p2
p4
0.0248
Y (z)
z 1
z 1
1.4328
1.7318
z 1
z 1
0.7293
0.8325
Figure 8.16: Second-order section cascade realization of 4th-order digital Butterworth BPF.
To better appreciate the cascade realization of Fig. 8.16, consider the magnitude response plots of
Fig. 8.17. The magnitude response |H1 (ej )| of the rst stage is fairly at and has a gain less than 1
everywhere. The second stages magnitude response |H2 (ej )| is more peaked and has a gain greater
than 1 for most frequencies. Taken in combination, the overall response |H(ej )| = |H1 (ej )H2 (ej )|
produces the desired Butterworth BPF characteristics with maximum passband gain of unity. Even
for xed-point implementations, this realization is well behaved and unlikely to cause overow.
Next, let us exchange the numerators of H1 (z) and H2 (z) to produce an alternate pair of secondorder sections. The resulting two transfer functions are
H1 (z) =
z 2 + 2z + 1
z 2 1.4328z 2 + 0.7293
0.0248(z 2 2z + 1)
.
z 2 1.7318z 2 + 0.8325
510
|H2 (ej )|
2
1.5
1
|H(ej )|
0.5
|H1 (ej )|
0
450 1000
2000
4000
10000
This cascade realization pairs the poles closest to the unit circle with the zeros that are farthest away,
exactly opposite the recommended strategy. Figure 8.18 plots the corresponding magnitude response
plots. Although the magnitude response |H2 (ej )| of the second stage is somewhat less peaked than
that in Fig. 8.17, the rst stage is signicantly more peaked. Further, both |H1 (ej )| and |H2 (ej )|
have gains greater than 1 for some frequencies. Ideally, the total response |H1 (ej )H2 (ej )| exactly
equals the total response |H1 (ej )H2 (ej )| of the previous cascade realization. Practically, however,
and especially for xed-point implementations, this alternate structure possesses inferior behavior
and can easily cause overow errors. These dierences tend to become only more pronounced as
lter order increases.
|H2 (ej )|
|H1 (ej )|
1.5
1
|H(ej )|
0.5
450 1000
2000
4000
10000
Example 8.9
Realize the 10th-order digital Chebyshev bandstop lter of Ex. 8.8 using a cascade of second-order sections.
8.2
511
Innite impulse response (IIR) lters are very sensitive to coecient accuracy. Implementation
deciencies, especially short word lengths, may drastically change IIR lter behavior and even make
them unstable. Moreover, IIR lter design methods are well established only for magnitude responses
that are piecewise constant, such as lowpass, bandpass, highpass, and bandstop lters. In contrast,
FIR lters are all-zero systems that are guaranteed to be stable even with implementation limitations
such as nite word lengths. Additionally, FIR lters can be readily designed to have arbitrarily
shaped frequency responses. Unlike IIR lters, FIR lters can possess a linear phase response,
thereby allowing constant group delay. This makes FIR lters well suited to applications where
linear phase is important. On the other hand, when both FIR and IIR design solutions exist for a
particular problem, IIR lters will have lower order, which means that IIR lters operate with less
processing delay and require less memory than their FIR counterparts. When processing delay is
not critical, FIR lters are the obvious choice. Let us now briey review the nature of FIR lters.
As discussed in the beginning of this chapter, Eq. (8.1) represents a FIR lter if a1 = a2 = =
aK = 0. Consequently, the transfer function of the resulting Lth-order FIR lter is
H(z) = b0 + b1 z 1 + + bL1 z (L1) + bL z L .
(8.28)
n=0
(8.29)
Thus, an FIR lters impulse response h[n] has a nite length of Lh = L + 1 elements, and the
dierence equation coecients bn serve as an FIR lters impulse response h[n], and vice versa.
Written in terms of the impulse response h[n], Eq. (8.28) becomes
H(z) = h[0] + h[1]z 1 + + h[L 1]z (L1) + h[L]z L .
(8.30)
(8.31)
Substituting ej for z, Eq. (8.30) also yields an FIR lters frequency response as
H(ej ) = h[0] + h[1]ej + + h[L]ejL =
h[n]ejn .
(8.32)
n=0
8.2.1
An important subclass of FIR lters consists of those with linear phase. Such lters are desirable
as linear phase implies only a delay in the response, not phase distortion. We shall now show that
certain symmetry conditions in h[n] result in a generalized linear phase response.
Consider a causal Lth-order nite impulse response (FIR) lter described by the transfer function
H(z) of Eq. (8.30) and the corresponding impulse response h[n] of Eq. (8.31). We shall now show that
We
restrict our attention here to real lters. By carefully modifying the discussion, one can also treat the more
general case of complex lters with linear phase.
512
FIR lters with odd or even symmetry about the center point of h[n] have linear phase characteristics.
As summarized in Table 8.2 and depicted graphically in Fig. 8.19, four types of linear phase FIR
lters are possible, depending on whether h[n] is midpoint symmetric or antisymmetric and whether
the lter order L is even or odd. Notice that when L is odd (type II or type IV), the midpoint of
h[n] does not occur at an integer value of n.
Even Order L
(Odd Length Lh )
Odd Order L
(Even Length Lh )
Midpoint
Symmetric h[n]
Type I
Type II
Midpoint
Antisymmetric h[n]
Type III
Type IV
h[n]
h[n]
(a)
(b)
h[n]
h[n]
(c)
(d)
Figure 8.19: Representative linear phase lter impulse responses: (a) type I, (b) type II, (c) type
III, and (d) type IV.
To show the phase linearity of these lters, we rst consider a fourth-order (L = 4) lter that
is symmetric about the center point n = 2. This is a type I lter, such as the one depicted in
Fig. 8.19a. As given by Eq. (8.31), the lter impulse response is given as
h[n] = h[0][n] + h[1][n 1] + h[2][n 2] + h[3][n 3] + h[4][n 4].
Using Eq. (8.32), the frequency response is given by
H(ej ) = h[0] + h[1]ej + h[2]ej2 + h[3]ej3 + h[4]ej4
= ej2 h[0]ej2 + h[1]ej + h[2] + h[3]ej + h[4]ej2 .
Because h[n] is symmetric about n = 2, h[0] = h[4], h[1] = h[3], and
H(ej ) = ej2 h[0] ej2 + ej2 + h[2] + h[1] ej + ej
= ej2 [2h[0] cos(2) + 2h[1] cos() + h[2]] .
Ha (ej )
513
The bracketed quantity Ha (ej ) is real and represents the lters amplitude response; it can be
positive over some bands of frequencies and negative over others. Thus, the phase response is
2
Ha (ej ) > 0
j
H(e ) =
.
2 Ha (ej ) < 0
The occasional jumps of in H(ej ) caused by Ha (ej ) changing sign do not alter the linear nature
of the phase response, which is what we sought to prove. Notice in this case that the delay of the
lter, which is computed as the negative slope of the phase response, is 2 samples (see Eq. (6.16)).
Let us now consider an L = 4 type III lter. The antisymmetry of h[n] requires that h[n] = 0 at
the center point. Thus, h[2] = 0, h[0] = h[4], h[1] = h[3], and the frequency response becomes
H(ej ) = ej2 h[0] ej2 ej2 + h[1] ej ej
= jej2 [2h[0] sin(2) + 2h[1] sin()] .
Ha (ej )
As in the type I case, the amplitude response Ha (ej ) is real and only impacts the phase response
with an occasional jump of . Since jej2 = ej(2/2) , the phase response is thus
2 + 2 Ha (ej ) > 0
j
H(e ) =
.
2 2 Ha (ej ) < 0
Clearly, this phase response is linear in . This system has a time delay of 2 samples, the same as
in the symmetric case.
Similar procedures demonstrate the linear phase characteristics of type II and type IV lters.
All these results are easily generalized to arbitrary order L. Table 8.3 summarizes the amplitude
and phase responses for each type as a function of lter order L. Filter magnitude response is just
the absolute value of the amplitude response, so the overall frequency response is computed as
j
Type II
H(ej )
Ha (ej )
Filter Type
Type I
L2
2
n=0
Type III
Type IV
h[n] cos L2 n + h[L/2]
L2
L
2
Ha (ej ) > 0
Ha (ej ) < 0
h[n] cos L2 n
L2
L2
Ha (ej ) > 0
Ha (ej ) < 0
h[n] sin L2 n
L2
L2
Ha (ej ) > 0
Ha (ej ) < 0
h[n] sin L2 n
L2 +
L2
Ha (ej ) > 0
Ha (ej ) < 0
L1
2
n=0
L2
2
n=0
L1
2
n=0
Table 8.3: Amplitude and phase responses of linear phase FIR lters.
From Table 8.3, the linear nature of each phase response is clear. Further, the delay of these
lters equals half the lter order (L/2 samples). As we shall later see, the equations of Table 8.3
also provide a foundation for the design of linear phase FIR lters.
When
L is odd, the lter delay L/2 is not an integer and thus does not truly represent a simple DT shift. Refer
to Sec. 6.4 for a more correct interpretation of non-integer shifts.
514
h[n]z n =
n=0
h[L n]z n .
n=0
h[m]z
mL
=z
m=0
or
h[m](z 1 )m
m=0
H(z) = z L H(z 1 ).
(8.33)
In other words, symmetry in h[n] forces H(z) to be what is called a mirror image polynomial.
Similarly, the transfer function of an antisymmetric (type III or IV) FIR lter is an anti-mirror
image polynomial
H(z) = z L H(z 1 ).
(8.34)
According to both Eqs. (8.33) and (8.34), if zl is a zero of H(z), then the reciprocal 1/zl must also
be a zero of H(z).
Now, consider a system with a general zero at z = rej . If the system is real, it must also include
a zero at the conjugate location z = rej . If the system is linear phase, the reciprocals z = 1r ej
and z = 1r ej must also be zeros of the system. Thus, a general zero of a real linear phase FIR lter
always travels in the company of three other roots. Setting r = 1, a zero on the unit circle z = ej
need only travel with its conjugate z = ej . The requirement for reciprocal roots is already met
since r = 1 = 1/r. Similarly, a real zero z = r need only travel with its reciprocal z = 1r since real
roots already equal their own conjugates. Zeros at z = 1, which equal their own reciprocal and
conjugate, can exist singly.
To see how this discussion helps us better understand linear phase FIR lters, consider a real
type II FIR lter. Since the order L is odd, there must be an odd number of zeros. However, most
zeros must travel in groups of two or four. The only way to obtain an odd number of zeros is for
at least one system zero to be at either 1 or 1. It is straightforward to show that a type II FIR
lter must possess an odd number of zeros at z = 1 (see Prob. 8.2-3). By constraint, type II
lters cannot pass high frequencies and therefore are not suitable for highpass and bandstop lter
applications. Table 8.4 summarizes the various restrictions for each type of linear phase FIR lter.
Filter Type
Zero Restrictions
Type I
None
Type II
LP, BP
Type III
BP
Type IV
HP, BP
515
As shown in Table 8.4, type I FIR lters have the fewest restrictions and are generally the
most popular of the four types. There are reasons, however, to utilize the other types. The phase
requirements of Hilbert transformers and dierentiators, for example, are not satised by type I or
type II lters, which makes a type III or type IV lter the logical choice. When a lter is realized
in hardware, the most ecient memory storage and retrieval occurs if h[n] has a length that is
a power of 2; this requires that the order of the lter be odd, which favors type II and type IV
lters. As is so often the case in engineering, good lter design needs to balance a wide variety
of design considerations and constraints, and no simple one-size-ts-all design method works for
every possible case.
8.2.2
The FIR lter in Eq. (8.28) is a special case of the general lter structures, depicted in Figs. 7.14, 7.17,
and 7.19, with all feedback (or recursive) coecients set equal to zero. Therefore, the realization
of an FIR lter is the same as that of an IIR lter with all the feedback connections omitted.
Figure 8.20a shows the direct form realization for an Lth-order FIR lter using Eq. (8.29) to dene
the feedforward coecients in terms of the impulse response. With all the feedback coecients zero,
there is no dierence between the DFI and DFII structures. The transposed direct form of an FIR
lter, shown in Fig. 8.20b, is nearly identical to the direct form. We can readily verify from either
of these two gures that for the input [n], the output is h[n] given in Eq. (8.31).
x[n]
z 1
z 1
h[0]
h[1]
z 1
z 1
h[L 1]
h[2]
y[n]
h[L]
(a)
x[n]
h[0]
h[1]
z 1
h[L 1]
h[2]
z 1
z 1
z 1
h[L]
y[n]
(b)
Figure 8.20: Canonical realizations of an Lth-order FIR lter: (a) direct form and (b) transposed
direct form.
As Fig. 8.20 illustrates, an FIR lter is a tapped delay line with successive taps at unit delay (T
seconds). Such a lter is also known as a transversal lter. To obtain a cascade realization, we factor
Eq. (8.30) into a combination of rst- and second-order terms and then cascade their realizations.
Realization of Linear Phase Filters
For linear phase FIR lters, symmetry conditions reduce the number of coecients to half or nearly
half. Table 8.3 shows that the number of coecients required for an Lth-order FIR lter is either L/2
(type III), (L + 1)/2 (types II and IV), or (L + 2)/2 (type I). By summing appropriate pairs of delay
chain outputs prior to coecient multiplication, we can use symmetry to reduce by half or nearly
half the number of multipliers needed by direct realization. For many hardware targets, multiply
516
operations are quite expensive, so such a substantial reduction in multipliers is very desirable.
Figures 8.21a and 8.21b illustrate the idea for type I and type II FIR lters, respectively.
x[n]
z 1
z 1
z 1
z 1
z 1
h[0]
z 1
h[ L2
]
2
h[1]
y[n]
h[ L
]
2
(a)
x[n]
z 1
z 1
z 1
z 1
z 1
h[0]
z 1
h[ L3
]
2
h[1]
z 1
h[ L1
]
2
y[n]
(b)
Figure 8.21: Multiplier-ecient realizations of linear phase FIR lters: (a) type I and (b) type II.
Determine the type and direct form realization of a sixth-order comb lter whose impulse response
is given by
h[n] = [n] [n 6].
Additionally, determine the transfer function and plot the frequency response of this system.
Because the impulse response is nite duration and antisymmetric about n = 3, this is a type
III linear phase FIR lter with L = 6. Also,
H(z) =
n=
h[n]z n =
([n] [n 6])z n = 1 z 6 .
n=
01
02
03
517
z 1
z 1
z 1
z 1
z 1
z 1
y[n]
(a)
|H(ej )|
H(ej )
2
1
2
(c)
(b)
Figure 8.22: Sixth-order comb lter: (a) direct form realization, (b) magnitude response, and (c)
phase response.
Using a similar procedure, we see that an Lth-order comb lter has transfer function H(z) =
1 z L and frequency response
H(ej ) = 2ej (
2 2
) sin(L/2).
Over any 2 interval of frequency , the magnitude response of an Lth-order comb lter has L nulls
and L peaks.
Example 8.10
Modify the type I and type II structures of Fig. 8.21 to instead realize type III and type IV FIR lters.
8.2.3
Since the impulse response of an FIR lter is nite in duration, we can always view h[n] as being
an implicitly windowed function, even if the window is simply rectangular. Further, when a desired
lter response has innite length, explicit windowing produces an FIR approximation of the system.
In either case, windowing is inherent to FIR lters, and it is important to understand the nature of
window functions and their impact on lter performance and behavior.
We observed in Sec. 2.4.1 that straight truncation of data creates serious problems such as
spectral spreading and leakage. As explained in Sec. 2.4.3, we can partly remedy these problems
by increasing the window length and tapering (smoothing) the windows. Much of the discussion in
Ch. 2 about windows for continuous-time signals applies to discrete-time signals also. A review of
The
reason for this similarity stems from the fact that DT windows are sampled versions of CT windows. Thus,
as discussed in Ch. 3, DT window spectra are just periodically replicated versions of CT window spectra.
518
Sec. 2.4 is highly recommended for a better understanding of this section. We shall briey survey
the eects of windowing for the discrete-time case.
Consider a causal rectangular window function wrec [n] of length Lw = 9, depicted in Fig. 8.23a.
This same window (centered at the origin) is analyzed in Ex. 6.1. As shown in Fig. 8.23b, the
magnitude spectrum of this window, found from pair 7 of Table 6.1, is
sin(Lw /2)
.
|Wrec (ej )| =
sin(/2)
The main lobe (the shaded lobe centered at the origin) reaches zero at = 2/9 so that the main
lobe width is 4/9. In general, the main lobe width is 4/Lw for a rectangular window of length
Lw . This may also be computed from pair 7 of Table 6.1. Observe the reciprocal nature between
window length and bandwidth. For this window, the spectrum decays rather slowly with frequency
(approximately as 1/). Thus, the peak value of the second lobe of the spectrum (the highest side
lobe) is only about 13.3 dB below the peak value of the main lobe, as shown in the normalized dB
spectrum of Fig. 8.23c.
wrec [n]
1
(a)
Lw 1
|Wrec (ej )|
1
(b)
L2
0
(c)
2
Lw
20 log10 L1 Wrec (ej )
w
13.3
2
Lw
519
The ideal window is a rectangular window of innite length. Such a window permits all the
data to pass and hence causes no distortion. Over the fundamental band, the frequency response
of this ideal window is 2(). Thus, an ideal window spectrum has zero width and side lobe level
of zero. In practice, a window of innite length defeats the very purpose of windowing to produce
a nite-length lter (FIR lter). Hence, our goal should be to achieve a window spectrum as close
to () as possible yet remain nite in duration. In other words, we want a nite-duration window
whose spectral width (spread) and side lobes are as small as possible.
Unfortunately, the two goals of narrow main lobe width and small side lobes are generally incompatible. For a given window length, if we try to improve the one, then the other deteriorates. For
instance, low side lobes (reduced leakage) require a smooth (tapered) window that truncates data
gradually rather than abruptly. But as window smoothness increases, so does spectral spreading.
Recalling that window length is inversely proportional to the spectral spread, the way out of this
dilemma is to increase the window length suciently to counter the increased spectral spread due
to tapering. Thus, we choose a suciently smooth (tapered) window to obtain the desired side lobe
(leakage) characteristics and then we increase the window length to compensate for the increased
spectral spreading.
The relative importance of spectral spreading and leakage varies with application. In spectral
analysis, for example, a smooth window is often desired since its small side lobes with fast decay
help minimize interference between dierent frequency components. On the other hand, window
smoothness is less important in lter applications that emphasize a narrow transition band over
large stopband attenuation.
Some Useful Windows
A useful selection of discrete-time window functions is readily obtained by sampling the continuoustime window functions in Table 2.1 (page 110). For convenience, we make the DT window functions
causal by appropriately delaying the CT window functions prior to sampling. Most of the discussion
in Sec. 2.4 about continuous-time windows applies to the discrete-time (sampled) versions as well.
Hence, we again stress a review of Sec. 2.4.
A causal length-Lw rectangular window is specied by
wrec [n] = u[n] u[n Lw ].
Similarly, to construct a causal length-Lw Hamming window, we delay the continuous-time Hamming
window from Table 2.1 by T /2 to render it causal. Over 0 t T , this yields
2[t (T /2)]
2t
wham (t) = 0.54 + 0.46 cos
= 0.54 0.46 cos
.
T
T
Now we sample this signal at intervals of T /(Lw 1) by substituting t = nT /(Lw 1) to obtain Lw
uniformly spaced samples. This yields
0.54 0.46 cos L2n
0 n Lw 1
w 1
wham [n] =
.
0
otherwise
Figures 8.24a and 8.24b show the Hamming window for Lw = 9 and Lw = 10, respectively.
In a similar way, we can construct discrete-time versions of the other continuous-time windows of
Table 2.1. Table 8.5 summarizes the resulting discrete-time window functions. Since the underlying
CT windows are non-bandlimited, sampling them to produce the DT windows causes aliasing in the
spectra. The eects of this aliasing change with Lw , so the main lobe width, rollo rate, and peak
side lobe values in Table 8.5 should be taken as approximations. Observe that the windows in
Table 8.5 are symmetric about the center point (Lw 1)/2, so the corresponding window spectra
possess linear phase characteristics.
In
the literature, expressions for these same windows often appear dierent because they are either not causal or
their expressions omit the end points with zero values.
520
w[n]
w[n]
(a)
(b)
Rollo
Rate
[dB/dec]
Peak Side
Lobe Level
[dB]
4
Lw
20
13.3
Triangular (Bartlett):
w 1)|
1 |2n(L
Lw 1
8
Lw
40
26.5
Hann:
3
4
1
2n
1
cos
2
Lw 1
8
Lw
60
31.5
8
Lw
20
42.7
12
Lw
60
58.1
varies
with
20
varies
with
Rectangular:
1
Hamming:
0.54 0.46 cos L2n
w 1
Blackman:
+ 0.08 cos L4n
0.42 0.5 cos L2n
w 1
w 1
Kaiser:
w 1) 2
I0 1( 2n(L
)
Lw 1
I0 ()
Table 8.5: Common discrete-time window functions and their approximate characteristics.
Comments on Windows
Recall that a desirable window is one with narrow main lobe and small side lobes. For a given
window type, peak side lobe levels are more or less xed. Main lobe width, however, shrinks as
window length increases. Thus, it is typical to choose a window based on side lobe characteristics
and then adjust the window length to achieve a suitable main lobe width. Notice also that the
complexity (order) of a windowed FIR lter depends on the length of the window. Particularly for
real-time ltering applications, it is crucial to minimize the computational complexity of the lter.
Thus, the shortest possible window length should be chosen.
For a given length Lw , the rectangular window has the smallest spectral spread (4/Lw ). Unfortunately, its peak side lobe is also highest (13.3 dB relative to the main lobe peak). This undesirable
behavior is the result of the abrupt truncation and consequent Gibbs phenomenon. These problems
can be minimized by using a tapered window, although a longer window will be required to maintain
a comparable level of spectral spread.
As discussed in Ch. 2, the triangular window (also called the Bartlett window) is one of the
simplest tapered windows, but it is rarely used since its characteristics are largely inferior to other
521
window types. The relatively simple Hann window (also called the Hanning window), with modest
spread (8/Lw ), reasonable peak side lobe (31.5 dB), and excellent rollo rate, is quite popular,
particularly for spectral analysis applications. Both the triangular and Hann windows are dened
with their end points as zero. Because of this feature, when using the triangular or Hann window,
the lter order can be reduced by two for the same window length. Alternately, we can increase the
window length by two points for the same length Lw .
Like the triangular and Hann windows, the Hamming window has a reasonable main lobe width
of 8/Lw . Its relatively low side lobe level (42.7 dB), achieved at the cost of poor rollo, makes
it a popular choice for ltering applications, where low side lobe level is more important than fast
rollo rates. The Blackman window achieves both low side lobes and fast rollo at the expense of
increased complexity and main lobe width (12/Lw ).
The Kaiser window is an adjustable window that is dened in terms of I0 (), a 0th-order modied
Bessel function of the rst kind. Bessel functions are most easily evaluated with mathematical
packages such as MATLAB but can also be computed according to
2
xk
.
I0 (x) =
2k k!
k=0
By adjusting the parameter , the smoothness of the Kaiser window can be controlled. Starting at
0, increasing tends to increase the smoothness of the Kaiser window, reduce its peak side lobe
level, and increase its main lobe width. Since a Kaiser window can be adjusted to meet almost any
set of lter specications, it is perhaps the most widely used window in signal processing.
Although Table 8.5 summarizes the most popular discrete-time window functions, there are many
others. Additional examples include the cosine and Lanczos windows, as well as the adjustable
Dolph-Chebyshev window. Each dierent window has its own special characteristics that make it
suitable for particular applications. Details can be found in the literature and online.
8.2.4
As in the case of IIR lters, FIR lters can be designed using time-domain or frequency-domain
criteria. For time-domain criteria, we exactly or closely match a digital lter impulse response to
the samples of a desired (analog or digital) lter impulse response over a nite range 0 n Lh 1.
For frequency-domain criteria, we exactly or closely match a digital lter frequency response to a
desired (analog or digital) lter frequency response at a selection of frequencies, normally at uniform
spacing. Let us begin our investigation of these methods by looking at two time-domain methods of
FIR lter design, the second of which is a special case of the rst.
With the window method, a length-Lh window is applied to a desired impulse response to produce
the desired FIR lter impulse response. If the window is tapered, the FIR impulse response only
approximately matches the desired impulse response over 0 n Lh 1. If the window is
rectangular, however, the digital lter impulse response exactly matches the desired impulse response
over 0 n Lh 1. This case, known as the Fourier series method, is similar to the impulse
invariance method used for IIR lters discussed in Sec. 8.1.1, except that the FIR lter impulse
response must be of nite length.
For the window and Fourier series methods, the FIR lter design problem begins as follows: we
are given a digital frequency response H(ej ) that needs to be realized by an FIR lter. Alternately,
we may be given a continuous-time lter frequency response Hc (j) that needs to be realized using
a FIR lter. Since the former case can be easily converted to the latter, we shall consider only the
case where we are required to realize a continuous-time frequency response Hc (j) using a length-Lh
FIR lter.
When
an FIR lter is designed using the window method, the lter and window lengths are equal, Lh = Lw .
convert H(ej ) to Hc (j), simply set T = 1 so that = . Then, Hc () = H(ej ) for || and is zero
otherwise.
To
522
Recall that a digital lters frequency response is periodic, with the rst period in the frequency
range T < T . Hence, the best we can hope for is to realize the equivalence of Hc (j) over
this range. Using this range, the bandlimited CT impulse response is given by the inverse Fourier
transform as
/T
1
hc (t) =
Hc (j)ejt d.
(8.35)
2 /T
Remember, by integrating from T to T rather than from to , we eectively bandlimit
Hc (j), which ensures that we can use the impulse invariance method of Eq. (6.55) to convert
hc (t) to a discrete-time form. This condition does not pose any limitations in our realization of the
continuous-time lter because by selecting smaller T , we can encompass as much range of as we
wish.
The CT response hc (t) is generally centered at the origin and of innite length. To convert this
noncausal response into a causal DT sequence of nite length, we must delay hc (t) by T (Lh 1)/2,
convert the response to DT by h[n] = T hc (nT ) (Eq. (6.55)), and then truncate the response using a
suitable window w[n] of length Lh . The combination of these operations results in a causal impulse
response with nite length Lh , that is,
h[n] = T hc ([n
Lh 1
2 ]T )w[n].
Substituting Eq. (8.35) into the right-hand side of this equation yields
0
1
/T
L 1
T
j(n h2 )T
h[n] =
Hc (j)e
d w[n].
2 /T
(8.36)
(8.37)
This equation describes the window method of FIR lter design. Notice that Eq. (8.37) produces
a causal impulse response with nite length Lh . Knowing h[0], h[1], h[2], . . ., h[Lh 1], we can
determine H(z) using Eq. (8.30) and can realize the lter using a standard structure such as those
shown in Fig. 8.20.
Optimality of the Rectangular Window
If the truncating window is rectangular, the procedure outlined here is optimum in the sense that
the energy of the error (dierence) between the desired frequency response Hc (j) and the realized
frequency response H(ejT ) is the minimum for a given Lh . This conclusion follows from the fact
that the resulting lter frequency response H(ejT ) is given by
h[n]ejnT .
H(ejT ) =
n
This frequency response is an approximation of the desired frequency response Hc (j) because of
the nite length of h[n]. Thus,
Hc (j)
h[n]ejnT .
(8.38)
n
How do we select h[n] for the best approximation in the sense of minimizing the energy of the
error Hc (j) H(ejT )? The preceding equation shows that the right-hand side is the nite-term
exponential Fourier series for Hc (j) with period 2/T . As seen from Eq. (8.37), h[n] are the
Fourier coecients, which explains why the rectangular window method is also called the Fourier
series method. According to the nality property (see page 37), a nite Fourier series is the optimum
(in the sense of minimizing the error energy) for a given Lh . In other words, for a given number of
terms (Lh ), any choice for h[n] other than the Fourier coecients in Eq. (8.38) will lead to higher
When
Lh is odd, we can order the delay operation after truncation. However, for even Lh , we must delay the
sequence before sampling and truncation. Otherwise, the elements of h[n] are located at fractional values of n.
523
error energy. For windows other than rectangular, this minimum mean square error optimality
deteriorates, and the lter is somewhat suboptimal.
Next, let us investigate some concrete examples of window method FIR lter design. To emphasize procedure rather than a jungle of data, the initial examples have small Lh and no rigid
specications. Later, we shall consider design problems with all the usual lter specications.
Using rectangular and Hamming windows, design length-7 FIR lters to approximate an audio
lowpass lter with cuto frequency fc = 20 kHz. Plot the magnitude response of each lter. Set
the sampling frequency Fs equal to four times the cuto frequency fc .
In this case, the impulse response length (and thus the window length) is Lh = 7, and the sampling
interval T is computed as
1
= 4fc = 80000
=
T = 12.5 106 .
T
Recall that a continuous-time frequency appears as a discrete-time frequency = T . Thus, the
s
desired CT cuto frequency c = 2fc = F
2 = 2T appears at c = 2 , which is halfway to the
highest (non-aliased) digital frequency = .
Although we could now use Eq. (8.37) to nd the desired impulse responses, we shall derive the
results in steps. This approach, although more lengthy, will help clarify the basic design concepts.
Let us consider the rectangular window (Fourier series method) rst.
Using pair 8 of Table 1.1, the impulse response of the desired ideal (zero-phase) lowpass lter is
t
1
sinc
hc (t) =
.
2T
2T
Fs =
(Lh 1)T
2
= 3T to obtain
hc (t 3T ) =
t 3T
1
sinc
.
2T
2T
This response is now scaled by T , truncated (windowed), and sampled by setting t = nT to obtain
the desired FIR impulse response
n3
1
wrec [n].
hrec [n] = T hc (nT 3T )wrec [n] = sinc
2
2
This result also follows directly from Eq. (8.36).
To visualize these three steps, consider Fig. 8.25. Using the impulse invariance method, the ideal
but noncausal DT impulse response is T hc (nT ) = 0.5 sinc(n/2) (Fig. 8.25a). To obtain a causal and
nite-duration solution, we rst delay the CT response by (Lh 1)T /2 = 3T (Fig. 8.25b) and then
truncate it with a length-7 rectangular window (Fig. 8.25c). In this case, the noncausal lter is made
realizable at a cost of a 3T -second delay. Over the window duration 0 n 6, the samples hrec [n]
exactly match the underlying CT impulse response. In this case, hrec [n] is also midpoint symmetric
and thus a type I linear phase FIR lter.
Using Eq. (8.30) and computing each value of hrec [n], the transfer function is
Hrec (z) =
hrec [n]z n =
n=0
1
1
1
1
1 6
+ z 2 + z 3 + z 4
z .
3
2
)=
6
n=0
hrec [n]ejn =
1
1
1
1
1 j6
+ ej2 + ej3 + ej4
e
.
3
2
524
T hc (nT 3T )
T hc (nT )
0.5
0.5
10
(a)
(b)
hrec [n]
hham [n]
0.5
0.5
(c)
(d)
Figure 8.25: Discrete-time LPF impulse responses: (a) ideal, (b) shifted ideal, (c) rectangular
windowed, and (d) Hamming windowed.
Using the amplitude and phase responses of Table 8.3, we can alternately express the frequency
response as
!
1
2
2
j
+ cos()
cos(3) ej3 .
Hrec (e ) =
2
3
The right-hand term ej3 conrms the lters linear phase characteristics and represents 3 samples
(3T seconds) of delay. Computed using MATLAB, Fig. 8.26 shows the resulting magnitude response
|Hrec (ej )| as well as the ideal lowpass response (shaded) for reference. The magnitude response
exhibits oscillatory behavior that decays rather slowly over the stopband. Although increasing Lh
improves the frequency response, the oscillatory nature persists due to Gibbs phenomenon.
01
02
03
04
05
06
|Hrec (ej )|
1
|Hham (ej )|
Figure 8.26: Window method LPF magnitude responses: rectangular (solid) and Hamming (dashed).
The side lobes in the rectangular window are rather large (13 dB), which results in a lter
with poor stopband attenuation. The Hamming window, which has smaller side lobes (43 dB),
produces a lter with better stopband attenuation but wider transition band. Using a Hamming
525
Unlike the result obtained using the rectangular window, hham [n] does not exactly match the underlying CT impulse response. The largest dierences occur at the edges, where the taper of the
Hamming window is greatest.
Using Eq. (8.32) and the computed values of hham [n], the frequency response is
Hham (ej ) = 0.0085 + 0.2451ej2 + 0.5ej3 + 0.2451ej4 0.0085ej6 .
The magnitude response |Hham (ej )| is shown dashed in Fig. 8.26.
09
Observe that the transition band corresponding to the Hamming window is wider than that corresponding to the rectangular window. Both hrec [n] and hham [n] are symmetric about n = 3 and,
hence, are type I lters. Either can be realized with six delay elements using a structure of the form
depicted in Fig. 8.21a.
Comments:
Referring to Fig. 8.26, the ideal (unwindowed) lter transitions from passband to stopband abruptly,
resulting in a zero-width transition band. In the windowed lters, on the other hand, the spectrum
spreads out, which results in a gradual transition from the passband to the stopband. For the
rectangular window case, the distance (spectral spread) between the two peaks on either side of
the transition region approximately equals 4/Lh , the main lobe width of the rectangular window
spectrum. Clearly, increasing the window width decreases the transition width. This result is
intuitive because a wider window means that we are accepting more data (closer approximation),
which should cause smaller distortion (smaller spectral spreading). Smaller window length (poorer
approximation) causes more spectral spreading (more distortion).
The windowed lters also possess passband and stopband ripple. These characteristics are a
result of the side lobes of the window spectra. When the ideal impulse response is windowed, its
spectrum is convolved with the windows spectrum, and the windows side lobes leak into the passband and stopband. To keep this spectral leakage small, the window side lobes must also be small
and decay rapidly with . It is the type of window, not its length, that largely determines side lobe
levels and decay rates.
Example 8.11
Using rectangular and Hamming windows, design order-98 FIR lters to approximate an audio lowpass
lter with cuto frequency fc = 20 kHz. Plot the magnitude response of each lter. Set the sampling
frequency Fs equal to four times the cuto frequency fc .
526
Using the window method and a length-9 triangular (Bartlett) window, show that the transfer function of
a lowpass FIR lter with c = /2 is
H(z) = 0.0265z 1 + 0.2387z 3 + 0.5z 4 + 0.2387z 5 0.0265z 7 .
Using rectangular and Hamming windows, design length-8 and length-11 FIR lters to realize a
digital dierentiator. Plot the magnitude response of each lter.
The transfer function of an ideal continuous-time dierentiator is Hc (s) = s, and its frequency
response is Hc (j) = j. Restricting our attention to the frequencies of interest to our digital
dierentiator, the desired impulse response is found from Eq. (8.37) as
0
1
/T
L 1
T
j(n h2 )T
h[n] =
je
d w[n].
2 /T
Letting x = (n
Lh 1
2 )T ,
we have
1
0
/T
T
jx
je
d w[n]
h[n] =
2 /T
2x
=
T
2
cos(x/T )2 sin(x/T )
x2
w[n] x = 0
.
x=0
0
For integer n, observe that sin(x/T ) = sin [n Lh21 ] = 0 when Lh is odd. Similarly, cos(x/T ) =
cos [n Lh21 ] = 0 when Lh is even. Hence, for n = (Lh 1)/2,
L 1
cos [n h2 ]
w[n]
Lh odd
L 1
[n h2 ]T
h[n] =
.
(8.39)
L 1
sin [n h2 ]
w[n] L even
[n
Lh 1 2
] T
2
-0.333
0.250
-0.200
-0.133
0.042
-0.016
In each of the two cases, the n = (Lh 1)/2 = 5 point is initially computed incorrectly as . It is
a simple matter to adjust this point to the correct value of 0 (line 06). Since the impulse responses
are odd length and antisymmetric, both are type III FIR lters.
527
Figures 8.27a and 8.27b show the (scaled) impulse responses T hrec [n] and T hham[n], and Fig. 8.27c
compares their corresponding magnitude responses (rectangular solid, Hamming dashed) to an ideal
dierentiator (shaded). Notice once again that the rectangular window produces oscillatory behavior
(Gibbs phenomenon). The tapered Hamming window produces a much smoother response.
07
08
09
10
T hham [n]
T hrec [n]
1
1
10
10
n
5
1
1
(b)
(a)
T |H(ej )|
(c)
Figure 8.27: Lh = 11 digital dierentiators: (a) T hrec [n], (b) T hham [n], and (c) T |Hrec (ej )| (solid)
and T |Hham (ej )| (dashed).
Since these lters are type III FIR lters, closed-form expressions for the magnitude and phase
responses are easily obtained using Table 8.3. Except for occasional jumps of and a linear phase
component of 5 (corresponding to time delay of 5T seconds), both lters exactly match the phase
response of an ideal dierentiator. Notice that the Hamming-windowed lter is more accurate for
low frequencies, but the rectangular-windowed lter operates over a broader frequency range. The
taper of the Hamming window eectively shrinks the passband of the dierentiator. This is generally
true for all tapered windows. To compensate for this shrinkage, we usually start with a passband
somewhat larger (typically 25% larger) than the design passband. For example, to ensure that our
Hamming-windowed dierentiator works in the 20-kHz audio range, we might select T such that
2 20000
2
3T
T 16.67 s.
Case of Even Lh
We shall now consider the case of Lh = 8 (Lh even). Once again, we use MATLAB to compute T h[n]
using Eq. (8.39). The (scaled) impulse responses T hrec [n] and T hham [n] are shown in Figures 8.28a
and 8.28b, and the corresponding magnitude responses are shown in Fig. 8.28c.
11
12
13
14
15
0.0260
528
16
17
18
19
T hham [n]
T hrec [n]
1
1
(a)
(b)
0.0021
T |H(ej )|
0
(c)
Figure 8.28: Lh = 8 digital dierentiators: (a) T hrec [n], (b) T hham [n], and (c) T |Hrec (ej )| (solid)
and T |Hham (ej )| (dashed).
A Surprising Success
It is interesting to compare the magnitude responses of the even-length lters (Fig. 8.28c) with
those of the odd-length lters (Fig. 8.27c). Despite the advantage of being higher order, the Lh = 11
dierentiators cannot compete with the Lh = 8 dierentiators. The surprising success of the Lh = 8
cases can be explained in two ways.
First, we note that the Lh = 8 cases are type IV lters, whereas the Lh = 11 cases are type III
lters. Consulting Table 8.4, we see that both type III and type IV lters are constrained to have
at least one system zero at z = 1 (dc). This poses no problem since an ideal dierentiator naturally
blocks dc. The type III lter, however, has an additional restriction that it must also have at least
one system zero at z = 1 (high frequency). Since dierentiators should pass rather than block
high-frequency signals, this restriction degrades the performance of odd-length dierentiators.
Another way to view the discrepancy in performance is to look at Eq. (8.39) and the impulse
response plots. These show that the impulse responses for even Lh decay rapidly (as 1/L2h ) from
the center. But for odd Lh , the rate of decay is slower (only as 1/Lh ). Consequently, truncation
(windowing) for even Lh does not aect the impulse response as much as the truncation for odd Lh .
In other words, the truncated impulse responses for the even case behave very similar to the ideal
impulse response. Such is not the case for odd Lh .
Example 8.12
Using a Hann window, design length-49 and length-50 FIR lters to realize a digital dierentiator. Plot
the magnitude response of each lter.
529
Using a rectangular window, design a length-7 FIR lter to realize Hc (j) = (T /). Plot the magnitude
response of the lter.
8.2.5
To this point, we have applied the window method to design FIR lters without concern for meeting
particular passband ripple, stopband ripple, or transition band requirements. We now consider how
to use the window method to design FIR lters to meet given specications.
For IIR and FIR digital lters, we designate passband edge as p (or p ), stopband edge as s
(or s ), and stopband ripple as s . However, FIR lters require a slight modication from IIR lters
with regard to passband ripple. For IIR lters, the maximum gain over the passband is unity, and
the minimum gain is 1 p (see Fig. 2.22). The passband gain of FIR lters, in contrast, oscillates
about unity between 1 + 2p and 1 2p , as shown in Fig. 8.29 for the lowpass case. Although both
possess p of passband ripple, the reference levels are dierent.
|H(ej )|
1+
1
p
2
p
2
s
0
main lobe
width
1 + 2p
.
(8.40)
rp = 20 log10
1 2p
The passband ripple parameter rp serves essentially the same purpose as the passband attenuation parameter p for IIR lters, which is also the ratio of maximum to minimum passband gains
expressed in a dB scale.
The window method causes ripple in the resulting lter response. While the amount of ripple
depends on the window type, the lters stopband ripple equals half its passband ripple, s = 2p .
In other words, passband and stopband ripple cannot be independently specied when using the
window method to design an FIR lter. To provide an example, a rectangular window produces a
magnitude response |Hrec (j)| (such as the one shown in Fig. 8.26) with maximum passband gain
of 1.09 ( 2p = 0.09 and rp = 1.57 dB) and maximum stopband ripple of s = 0.09 (s = 20.9 dB).
Similar
adjustments in dening passband ripple are needed for highpass, bandpass, and bandstop FIR lters.
530
Thus, we see that a rectangular window produces ripple of 2p = s = 0.09. In fact, each windows
ripple characteristics are more or less xed, changing only very little with window length (or lter
order).
Recall from Table 8.5 that the main lobe width for a rectangular window is 4/Lh . The main
lobe width is equal to the spectral spread caused by the window. This should not be confused with
the transition band = s p , although the two are often very close. For the rectangular
window, the main lobe width equals the dierence between the frequencies where the passband and
stopband gains are maximum. The transition band , on the other hand, is the dierence between
s (the start of the stopband where the gain drops to s ) and p (the end of the passband where
the gain drops to 1 2p ). This dierence is clearly depicted in Fig. 8.29. Table 8.6 (adapted from
[6]) shows some useful windows and their approximate ltering characteristics.
Window
Main
Lobe
Width
Peak Side
Lobe Level
[dB]
=
s p
s , p /2
s [dB]
rp [dB]
1.
Rectangular
4
Lh
13.3
1.84
Lh 1
0.090
20.9
1.57
2.
Hann
8
Lh
31.5
6.22
Lh 1
0.0064
43.9
0.11
3.
Hamming
8
Lh
42.7
6.64
Lh 1
0.0019
54.5
0.033
4.
Blackman
12
Lh
58.1
11.13
Lh 1
0.00017
75.3
0.0030
5.
Kaiser
varies with
Example 8.13 (Window Method FIR LPF Design for Given Specications)
Using the window method, design a FIR lowpass lter with cuto frequency fc = 20 kHz, passband
frequency fp 19 kHz, passband ripple rp 0.1 dB, stopband frequency fs 21 kHz, and
stopband attenuation s 50 dB. Plot the magnitude response of the lter using a dB scale. Set
the sampling frequency to be four times the cuto frequency, Fs = 4fc = 80 kHz.
From Table 8.6, it follows that the Hamming window can satisfy the specications because it has
rp = 0.033 and s = 54.5. Using = T , we determine that
c =
2(20000)
= ,
4(20000)
2
p =
19
,
40
and
s =
21
.
40
531
Thus, = s p = 2/40 = 0.05. Consulting Table 8.6 for the Hamming window,
= 0.05 =
6.64
Lh 1
Lh = 133.8.
1
sinc(t/2T ). Due to the relatively high
We take Lh = 134. As in Ex. 8.11, c = /2T and hc (t) = 2T
order of this design, the necessary design computations are done using MATLAB. The resulting
impulse and magnitude responses are shown in Fig. 8.30. Careful inspection of the magnitude
response veries that all design specications are met.
01
02
03
04
05
06
07
08
09
h[n]
0.5
(a)
133
20 log10 |H(ej )|
0
(b)
50
p s
Figure 8.30: Length-134 Hamming LPF: (a) impulse response and (b) magnitude response.
Example 8.13
532
Explain why a Hamming window is preferred over a Blackman window for the lter design in Ex. 8.13,
even though a Blackman window more easily meets the given ripple requirements.
0
s < 21
0.1102(s 8.7)
s > 50
Kaiser also found that the lter length Lh needed to satisfy the specications s and is approximately given by
s 8
.
(8.42)
Lh = 1 +
2.285
Equations (8.41) and (8.42) are written in terms of s rather than rp , assuming that s is more
restrictive than rp . However, should the passband ripple be more restrictive than the stopband
ripple, it is a simple matter to express Eqs. (8.41) and (8.42) in terms of rp rather than s (see
Prob. 8.2-21).
Dening the Kaiser window w[n] as in Table 8.5, we next design the Kaiser lter using Eq. (8.36).
The resulting impulse and dB magnitude response are shown in Fig. 8.31.
05
06
07
08
09
10
11
533
besseli(0,alpha).*((n>=0)&(n<=Lh-1));
hc = @(t) 1/(2*T)*sinc(t/(2*T)); h = T*hc(n*T-(Lh-1)/2*T).*wkai(n);
subplot(211); stem(n,h);
H = polyval(h,exp(1j*Omega)).*exp(-1j*(Lh-1)*Omega);
subplot(212); plot(Omega,20*log10(abs(H)));
h[n]
0.5
(a)
118
20 log10 |H(ej )|
0
(b)
50
p s
Figure 8.31: Length-119 Kaiser LPF: (a) impulse response and (b) magnitude response.
Compared with the length-134 Hamming lter in Ex. 8.13, the length-119 Kaiser window is about
12% shorter yet meets the same specications. The principal reason for the shorter length is that the
Kaiser lter more closely meets stopband ripple requirements (Fig. 8.13b), whereas the Hamming
lter unnecessarily exceeds stopband ripple requirements (Fig. 8.30b).
Example 8.14
534
Using the window method, design a digital bandpass lter with rp = 0.1 dB maximum passband
ripple for 1000 2000 and s = 50 dB minimum stopband attenuation over both 0 450
and 4000. Take T = /10000.
In this design, the critical analog frequencies are s1 = 450, p1 = 1000, p2 = 2000, and s2 = 4000.
While many choices are possible to satisfy the design constraints, let us take the ideal CT BPF to
have cuto frequencies set midway between passband and stopband edges, that is,
c 1 =
s1 + p1
= 725
2
and
c 2 =
s2 + p2
= 3000.
2
Thus, the ideal BPF has center frequency ctr and bandwidth 2B given as
ctr =
c 1 + c 2
= 1862.5
2
and
2B = c2 c1 = 2275.
2B
2275
sinc(Bt/) cos(ctr t) =
sinc(1137.5t/) cos(1862.5t).
The lower transition band of Hc (j) has width 1 = p1 s1 = 550, whereas the upper transition
band has width 2 = s2 p2 = 2000. Since it is more narrow, the lower transition band
1 = 550 is the more restrictive.
55
Recalling that = T , the digital lter has transition band = T = 1000
. Given rp = 0.1
and s = 50, we nd from Table 8.6 that a Hamming window should be adequate. Further, the
Kaiser window, being a window for all occasions, can also be used. We shall consider both.
Hamming Window
To simplify the process, we use MATLAB to perform all calculations. First, we dene the design
parameters and the ideal CT BPF impulse response.
01
02
03
04
05
06
Referring to Table 8.6, we next compute Lh from . Then, dening the Hamming window as in
Table 8.5, we use Eq. (8.36) to compute the desired impulse response h[n] (Fig. 8.32a), from which
it is a simple matter to compute the corresponding magnitude response (Fig. 8.32b).
07
08
09
10
11
12
Lh = ceil(6.64*pi/DeltaOmega+1)
Lh = 122
wham = @(n) (0.54-0.46*cos(2*pi*n/(Lh-1))).*((n>=0)&(n<=Lh-1));
n = 0:Lh-1; h = T*hc(n*T-(Lh-1)/2*T).*wham(n);
subplot(211); stem(n,h);
Omega = linspace(0,pi,10001); H = polyval(h,exp(1j*Omega)).*exp(-1j*(Lh-1)*Omega);
subplot(212); plot(Omega/T,20*log10(abs(H)));
535
h[n]
0.25
(a)
121
10000
20 log10 |H(ej )|
0
(b)
50
0 450 1000
2000
4000
Figure 8.32: Length-122 Hamming BPF: (a) impulse response and (b) magnitude response.
Although Table 8.6 suggests that the Hamming window should produce 54.5 dB of stopband
attenuation, we see from Fig. 8.32b that, in this design, the lower stopband barely achieves the
required 50 dB of attenuation. We once again emphasize the approximate nature of the window
ltering characteristics of Table 8.6 as well as the need to verify every design to ensure specications
are met.
Kaiser Window
Using Eqs. (8.41) and (8.42), we compute the Kaiser window parameter and length Lh .
13
14
alpha = 0.5842*(alphas-21)^(0.4)+0.0788*(alphas-21)
alpha = 4.5318
Lh = ceil(1+(alphas-8)/(2.285*DeltaOmega))
Lh = 108
Dening the Kaiser window as in Table 8.5, we use Eq. (8.36) to compute the desired impulse
response h[n] and then the magnitude response |H(ej )|.
15
16
17
18
19
20
Unfortunately, inspecting the magnitude response, we nd that the resulting FIR lter does not
quite meet specications. Increasing the length by 1 to Lh = 109 and again executing lines 15
through 20 produces the impulse response of Fig. 8.33a and magnitude response of Fig. 8.33b. In
this case, all design specications are met. Due to its adjustable parameter , the Kaiser lter is
536
shorter (Lh = 109) than the corresponding Hamming lter (Lh = 122). Both possess very similar
impulse responses that require high-precision digital implementations to preserve desired lter behavior.
h[n]
0.25
(a)
108
10000
20 log10 |H(ej )|
0
(b)
50
0 450 1000
2000
4000
Figure 8.33: Length-109 Kaiser BPF: (a) impulse response and (b) magnitude response.
Example 8.15
Suppose that the specications for a real highpass lter suggest using a Hamming window of length
Lh = 20. Explain why the resulting FIR lter is virtually guaranteed not to meet specications. Would it
help to double the lter length? Explain.
s = 2p . When a design calls for two independent values, we select the more stringent of the two
ripple specications. It is also dicult to specify precisely the band edges and maximum ripple sizes.
For all these reasons, the window method is suboptimal, and all designs must be veried to ensure
that design specications are met. Later in this chapter we shall investigate more optimal methods
such as frequency-weighted least squares and, briey, equiripple FIR lter design [8].
8.2.6
537
It is more natural to describe lters in the frequency domain than in the time domain. For example,
it is easier to speak of a lowpass lter (a frequency-domain description) than a sinc response (a timedomain description). In fact, the elementary descriptions of lters as lowpass, highpass, bandpass,
and bandstop are all intrinsically frequency-domain descriptions. Not surprisingly, frequency-domain
methods of FIR lter design are generally more intuitive than their time-domain counterparts.
Conceptually, an analog lter Hc (s) can be realized by digital means, as depicted in Fig. 6.21a, if
we select h[n] = T hc (nT ) (Eq. (6.55)). This time-domain criterion is the impulse invariance method
of digital lter design. The equivalent frequency-domain criterion is to cause H(ej ) = Hc (j/T )
over || (Eq. (6.54)). Since = T , this is equivalently stated as H(ejT ) = Hc (j) over
|| /T . These criteria typically lead to noncausal and innite-length impulse responses.
For a length-Lh FIR lter, we have only Lh degrees of freedom. Thus, as we saw in the preceding
section, the Fourier series method forces h[n] = T hc (nT ) only at Lh values of n. Similarly, the
frequency sampling method, also called the spectral sampling method, forces H(ej ) = Hc (j/T )
only at Lh frequencies. To cover the 2 spectral width of Hc (j/T ), we typically choose these
frequencies to be uniformly spaced 0 = L2h apart; that is,
0 =
2
Lh
and, equivalently,
0 =
2
.
Lh T
(8.43)
Since H(ej ) is 2-periodic, we can proceed using any 2 interval of . There are advantages,
however, to using the interval 0 < 2. Over all frequencies , H(ej ) equals the 2-periodic
replication of Hc (j/T ). Thus, over 0 < 2, the frequency sampling method requires that
0 k Lh21 (0 k0 )
Hc (jk0 /T )
jk0
H[k] H(e
)=
.
(8.44)
Hc j k0T2
Lh21 + 1 k Lh 1 ( < k0 < 2)
In other words, Eq. (8.44) seeks to exactly match the frequency responses of the digital and (periodically replicated) analog lters at the Lh frequencies = k0 (0 k Lh 1). To determine
H(ej ) over < < 2, Eq. (8.44) copies (replicates) Hc (j/T ) from < < 0. For real lters,
this causes H[k] to possess conjugate symmetry about the (possibly non-integer) point k = L2h ,
which is to say that H[k] = H [Lh k].
Now, to determine our DT FIR lters impulse response h[n], recall that
H(ej ) =
L
h 1
h[n]ejn
n=0
so that
H(ejk0 ) = H[k] =
L
h 1
h[n]ejnk0 ,
k = 0, 1, 2, . . . , Lh 1.
(8.45)
n=0
These Lh linear simultaneous equations in Lh unknowns h[0], h[1], h[2], . . ., h[Lh 1] can be solved
in the usual manner to nd h[n]. This same problem is solved in the next chapter. The solution is
given by (see Eq. (9.5))
h[n] =
Lh 1
1
H(ejk0 )ejnk0
Lh
k=0
Lh 1
1
j 2nk
H[k]e Lh ,
Lh
n = 0, 1, 2, . . . , Lh 1.
(8.46)
k=0
Actually,
T hc ([n
causality requires the Fourier series method to force equality of the shifted impulse response, h[n] =
for 0 n Lh 1.
Lh 1
]T ),
2
538
Together, Eqs. (8.45) and (8.46) form the well-known discrete Fourier transform (DFT) pair. We
call H[k] = H(ejk0 ) the direct DFT of h[n], and h[n] is the inverse DFT (IDFT) of H[k]. The fast
Fourier transform (FFT) and inverse fast Fourier transform (IFFT), which are ecient algorithms
to compute the DFT and IDFT, make this method of design especially simple.
Using the frequency sampling method, design an ideal lowpass FIR lter with cuto frequency
c = 2 and length Lh = 7.
MATLAB makes short work of this design.
01
02
03
04
05
06
Line 01 establishes the basic design parameters. Although we can theoretically use Eq. (8.44)
to compute H[k], computer round-o sometimes causes seemingly minor errors that destroy the
conjugate symmetry required of H[k]. Thus, line 02 determines H[k] using Hc (jk0 /T ) over 0
k0 and then computes the remaining values to ensure that H[k] is conjugate symmetric about
k = Lh /2 = 3.5 (k0 = ). Rather than compute h[n] by direct evaluation of Eq. (8.46), it is more
simple to use MATLABs built-in inverse fast Fourier transform command, ifft. Figure 8.34 shows
the resulting impulse and magnitude responses.
h[n]
0.5
6
(a)
|H(ej )|
2
7
4
7
6
7
8
7
10
7
12
7
(b)
Figure 8.34: Frequency sampling method ideal LPF: (a) impulse response and (b) magnitude response.
While |H(ej )| exactly matches the ideal response at the seven frequencies = k2/7 (0 k
6), we see from Fig. 8.34b that the magnitude response is an overall poor approximation of the ideal
(shaded). The culprit is the underlying 0-phase nature of the ideal response. In essence, we are
trying to obtain a good magnitude response without any lter delay. As discussed in Sec. 2.3, our
causal (realizable) lter cannot meet such unreasonable expectations. We can also predict this poor
539
lter behavior based on h[n]. Instead of being sinc-like, the impulse response of Fig. 8.34a is highly
distorted with the bulk of its energy at the edges rather than the middle; these abrupt edges cause
severe spectral leakage, which explains the signicant passband and stopband ripple of the lter.
As we shall next see, we can greatly improve the magnitude response by modifying the spectral
sampling method to deliver a linear phase lter.
Example 8.16
jk
Lh 1
Lh
Lh 1
Lh 1
jk L
h
Hc (jk0 /T )e
H[k] =
Lh 1
jk L
L 1
h (1) h
Hc j k0T2 e
For real lters, Eq. (8.47) can also be computed as
H [L k]
h
0 k Lh21
(8.47)
Lh21 + 1 k Lh 1
0 k Lh21
Lh21 + 1 k Lh 1
(8.48)
When there is a choice, Eq. (8.48) is generally preferred over Eq. (8.47) since the resulting H[k] is
guaranteed to be conjugate symmetric, even in the presence of computer round-o errors. Let us
now demonstrate the approach and its advantages by redesigning the lter of Ex. 8.16.
Example 8.17 (Frequency Sampling Method Linear Phase Lowpass Filter Design)
Using the frequency sampling method, repeat Ex. 8.16 and design a linear phase lowpass FIR lter
with cuto frequency c = 2 and length Lh = 7.
In this case, we use Eq. (8.48) rather than Eq. (8.44), as used in Ex. 8.16. Over 0 k0 ,
the only dierence between these equations is that Eq. (8.47) includes the extra term e
jk
Lh 1
Lh
540
01
02
03
04
05
06
07
As line 03 demands, H[k] is conjugate symmetric about k = Lh /2 = 3.5. The impulse response
h[n], shown in Fig. 8.35a, is more sinc-like than that in Ex. 8.16 and has the bulk of its energy
in the middle rather than the edges. The natural taper of h[n] helps ensures a relatively smooth
magnitude response, as shown in Fig. 8.35b. Although both exactly match the ideal response at
the seven frequencies = k2/7 (0 k 6), the linear phase lter more closely approximates the
ideal (shaded) than the Fig. 8.34b response of Ex. 8.16. Clearly, allowing a little lter delay greatly
improves the lters magnitude response.
h[n]
0.5
6
n
0
(a)
|H(ej )|
1
2
7
4
7
6
7
8
7
10
7
12
7
(b)
Figure 8.35: Frequency sampling method linear phase LPF: (a) impulse response and (b) magnitude
response.
Before concluding this example, it is worth comparing this lter with that obtained using the
Fourier series (rectangular window) method (see Figs. 8.25c and 8.26). The impulse responses of
both lters are very similar, as are the magnitude responses. What, then, is the dierence in these
two lters? The Fourier series method optimizes the design with respect to all frequencies. It minimizes the mean square error between the desired and realized frequency responses. The frequency
sampling method, in contrast, realizes a lter whose frequency response exactly matches the desired
frequency response at Lh uniformly spaced frequencies. The mean square error in this design will
generally be higher than that in the Fourier series (rectangular window) method.
Example 8.17
541
to design FIR lters that are guaranteed to have linear phase. All that needs to be done is to set
Ha (ej ) equal to a desired response Hc (j/T ) at a suitable number of frequencies k and then solve
the resulting linear system of equations.
To provide an example, consider a type I lter. From Table 8.3, we see that
Lh 1
2
Ha (k ) =
ak,n h[n],
2 cos k Lh21 n
n = 0, . . . ,
where ak,n =
n=0
n=
Lh 3
2
Lh 1
2
(8.49)
For k = 0, 1, . . ., Lh21 , we get a set of Lh2+1 linear equations in Lh2+1 unknown values of h[n] (the
remaining values are known from symmetry). Expressed in matrix form and letting Hc (jk /T ) =
Ha (k ), the solution of this system of equations is
h[0]
h[1]
..
.
h[ Lh21 ]
h
a0,0
a0,1
a0, Lh 1
a1,0
a1,1
a1, Lh 1
..
..
.
..
.
..
.
a Lh 1 ,0
a Lh 1 ,1
A1
a Lh 1 , Lh 1
2
Hc (j0 /T )
Hc (j1 /T )
..
.
(8.50)
Hc (j Lh 1 /T )
2
H
542
Using the frequency sampling method of Eqs. (8.49) and (8.50), repeat Ex. 8.17 and design a type
I lowpass FIR lter with cuto frequency c = 2 and length Lh = 7.
MATLAB is particularly well suited to matrix computations such as that in Eq. (8.50).
01
02
03
The resulting lter h[n] is identical to that obtained in Ex. 8.17 using Eqs. (8.47) and (8.46).
Example 8.18
Using frequency sampling based on the equations in Table 8.3, design Lh = 7 or 8 type I, II, III, and IV
allpass lters. Plot the magnitude responses to conrm the conclusions of Table 8.4.
L
h 1
n=0
L
h 1
n=0
1
Lh
h[n]z n
0
Lh 1
1
j 2nk
H[k]e Lh
Lh
1
z n
k=0
L
h 1
k=0
H[k]
L
h 1
(e
j 2k
L
h
z 1 )n .
n=0
The second sum on the right-hand side is a geometric series. Using entry 1 of Table 5.1, we have
0
1
Lk 1
1 z Lh ej2k
1
H[k]
.
H(z) =
j 2k
Lh
1 e Lh z 1
k=0
Hence,
Lh 1
H[k]
1 z Lh
H(z) =
.
j 2k
Lh
L
1
k=0 1 e h z
H1 (z)
(8.51)
H2 (z)
Observe that we do not need to perform IDFT (or IFFT) computations to obtain the desired lter
transfer function. All we need is the values of the frequency samples H[k], which are known.
Equation (8.51) shows that the desired lter is realized as a cascade of two lters with transfer
functions H1 (z) and H2 (z). Also, H1 (z) is the transfer function of an Lh th-order comb lter (see
543
Ex. 8.10). The second lter with transfer function H2 (z) is a parallel combination of Lh rstj 2k
order lters whose poles lie on the unit circle at e Lh (k = 0, 1, 2, . . . , Lh 1). Particularly for
lowpass and bandpass lters, many of the coecients H[k] appearing in H2 (z) are zero. In Ex. 8.17,
for example, four of seven coecients are zero. Thus, in practice, the nal lter is usually much
simpler than it appears in Eq. (8.51). As a result, this realization may require fewer computations
(multiplications and additions) than a direct form realization.
When we realize an FIR system using a frequency sampling lter, we make the observation that
the H2 (z) subsystem is an IIR lter. This strange fact should alert us to the possibility of something
interesting going on in this realization. For an FIR lter, there can be no poles other than those at
the origin. In the frequency sampling lter of Eq. (8.51), in contrast, H2 (z) has Lh poles at ejk0
(k = 0, 1, 2, . . . , Lh 1). All these poles lie on the unit circle at equally spaced points. These poles
simply cannot remain in our FIR lter. They must somehow get canceled along the way. This is
precisely what happens. The zeros of H1 (z) are exactly where the poles of H2 (z) are because
z Lh 1 = (z e
2
j0 L
)(z e
2
jL
)(z e
2
j2 L
) (z e
2
j(Lh 1) L
).
Thus, in theory at least, the poles of H2 (z) are canceled by the zeros of H1 (z), which results in the
desired FIR lter.
The pole-zero cancellation in the frequency sampling lter is a potential cause for mischief because
such a perfect cancellation assumes exact realization of both H1 (z) and H2 (z). Such a realization
requires the use of innite-precision arithmetic, which is a practical impossibility because of quantization eects. Imperfect pole-zero cancellation means that there will still be poles on the unit circle
and the overall lter cannot be FIR. More serious, however, is the fact that the resulting system will
be marginally stable. Such a system provides no damping of the round-o noise that is introduced in
the computations. In fact, such noise tends to increase with time and may render the lter useless.
We can partially mitigate this problem by moving both the poles (of H2 (z)) and zeros (of H1 (z)) to
a circle of radius r = 1 , where is a small positive number. This artice will make the overall
system asymptotically stable.
It is also worth emphasizing that the rst-order systems that comprise H2 (z) are complex. This
is because the poles lie on the unit circle, and the scaling coecients H[k] are, in general, complex.
Although it is relatively simple to realize complex systems digitally, it is possible to avoid the need
for complex lters by combining conjugate poles into real second-order systems. These points are
claried in the next example.
Realize the length-7 lowpass FIR lter of Ex. 8.17 using a frequency sampling lter.
Referring to Ex. 8.17, we see that H[0] = 1, H[1] = ej6/7 , H[6] = ej6/7 , and H[2] = H[3] =
H[4] = H[5] = 0. Substituting these values in the frequency sampling lters transfer function of
Eq. (8.51), we obtain
H(z) =
1 z 7
7
H1 (z)
1
ej6/7
ej6/7
+
+
.
1 z 1 1 ej2/7 z 1
1 ej2/7 z 1
H2 (z)
In this form, two of the three rst-order lters in H2 (z) are complex. To implement this system
544
using only real lters, we combine the two conjugate pole terms to obtain
1 z 7
1
2 cos(6/7) 2cos(8/7)z 1)
H(z) =
+
7
1 z 1
1 2 cos(2z/7)z 1 + z 2
1
1.802(1 z 1 ))
1 z 7
.
=
7
1 z 1
1 1.247z 1 + z 2
H1 (z)
H2 (z)
This frequency sampling lter realization only requires three scalar multipliers, as opposed to the
seven scalar multipliers needed using the direct form realization of Fig. 8.20. This is also more
ecient that the four scalar multipliers needed using the form of Fig. 8.21.
Example 8.19
8.2.7
The Fourier series method forces an FIR impulse response to exactly match Lh values of the ideal.
Such rigid expectations rarely lead to the best lter. The window method, on the other hand, seeks
an impulse response that is only similar to the ideal. Through this compromise, the window method
can often produce satisfactory lters when the Fourier series method cannot.
The story is the same when using frequency-domain methods for FIR lter design. The frequency
sampling method wants to exactly match Lh values of the ideal frequency response. To exactly match
these values, the remaining values of the frequency response may deviate so much from the ideal
so as to render the lter worthless. Would it not be wiser to try and do well at all frequencies,
even if most do not exactly match the ideal? This is precisely the approach taken by the frequencyweighted least-squares method. In order to derive the approach, however, we need to rst cover
some background mathematics.
Linear Vector Spaces, Inner Products, and Orthogonality
Here, we briey summarize the concepts of linear vector spaces, inner products, and orthogonality.
A comprehensive treatment of these topics would likely distract more than aid our goal of FIR lter
design. Thus, we only cover the bare minimum needed for our later derivations.
545
A linear vector space is a set of elements (vectors) together with the operations of addition and
scalar multiplication. For our purposes, we are most concerned with elements (vectors) that take
the form of a function, either of time or of frequency.
Let x, y, and z designate elements in a linear vector space and be some constant. We dene
the inner product , as an operation that satises four properties:
1. x, y = y, x ,
2. x + y, z = x, z + y, z,
3. x, y = x, y , and
4. x, x 0 with x, x = 0 if and only if x = 0.
An inner product results in a (possibly complex) constant, which is to say that x, y C. For any
linear vector space, there are many possible ways (innite) to dene an inner product.
It is convenient to view the inner product x, y as some measure of similarity between x and y.
If x is quite similar to y, then the inner product is large. If x is not similar to y, then the inner
product is small. We say that elements x and y are orthogonal (or perpendicular) if their inner
product is zero. That is,
if x, y = 0,
then x y.
(8.52)
Orthogonal vectors are independent of one another: knowing one tells you nothing about the other.
One can also interpret the inner product as a projection of one vector onto another. If the vectors
are perpendicular to one another (orthogonal), then the projection results in zero. Designated as
x,
of a vector is a positive real quantity that indicates the vectors size. The quantity
the norm
x, x = x2 is a valid norm.
To provide a simple example, the set of all continuous-time energy signals is a linear vector space.
For two energy signals x(t) and y(t), one valid inner product is
x(t)y (t) dt.
x(t), y(t) =
From this denition, we see that a causal energy signal x(t)u(t) is orthogonal to an anti-causal
energy signal y(t)u(t). Such signals have nothing in common. Finally, we note that signal energy
Ex = x(t), x(t) = x(t)2 is a valid norm.
The Orthogonality Principle
Next, consider a linear vector space that contains a known set of K basis vectors (or basis signals)
k (1 k K). One can think of the basis vectors k as building blocks with which to construct
or estimate any vector x that is in the linear vector space. We construct an estimate x
K of vector
x as a linear combination of the K basis vectors k , that is,
x
K =
ck k .
(8.53)
k=1
What coecients ck produce the best possible estimate xK of x? To answer this question, we must
rst know what we mean by best.
A sensible measure of estimate quality is the norm-squared error between x and x
K ,
EK = x xK 2 = x xK , x x
K .
In this sense, the best coecients ck minimize EK , the norm-squared error between x
K and x.
According to the orthogonality principle, this occurs when the error is orthogonal to the data used
in the estimate, or
l = 1, 2, . . . , K.
(error = x x
K ) l ,
546
Consequently,
x xK , l = 0,
l = 1, 2, . . . , K
xK , l = x, l ,
l = 1, 2, . . . , K.
or
Substituting for x
K , we nd that the coecients ck that minimize EK must satisfy
K
ck k , l = x, l ,
l = 1, 2, . . . , K.
(8.54)
k=1
These K linear equations in K unknown coecients ck are solved in the standard manner. However,
if {k }K
k=1 is an orthogonal set of basis vectors (meaning that l , k = 0 for l = k), then the
coecients ck can be individually solved as
ck =
x, k
.
k 2
(8.55)
This equation is particularly nice and intuitive. The coecient ck depends on the similarity between
x and the basis function k . If k is very similar to x, then the coecient ck will be relatively large.
If k is not very similar to x, then the coecient ck will be small.
Let us prove the orthogonality principle. First, let us dene an estimate x
K as one that satises
the orthogonality principle. That is,
x
K =
c
k k
and
x x
K , l = 0 for l = 1, 2, . . . , K.
k=1
Using a little give and take, we next write the norm-squared error of an arbitrary estimate x
K in
terms of x
as
K
K 2
EK = x x
= (x x
K )2
K ) + (xK x
2
= x x
K + x
K , x x
K 2
K + x xK , xK x
K x
K + xK x
2
= x x
K + x
K 2 .
K + 2Re x xK , xK x
K x
K = 0.
x x
K , xK x
Consequently,
2
K 2 x x
EK = x x
K + xK x
K .
547
xx
1
x
1
1
(a)
(b)
Example 8.20 (Using the Orthogonality Principle to Derive the Fourier Series )
1
x(t)y (t) dt.
x(t), y(t) =
T0 T0
In this way, signal power Px = x(t), x(t) = x(t)2 .
The Fourier series represents a continuous-time T0 -periodic power signal x(t) using an orthonormal set of harmonically related complex exponential basis functions,
x(t) =
Xk ejk0 t .
k=
This representation of x(t) follows the form of Eq. (8.53), where the basis functions k = ejk0 t . The
term orthonormal means that the basis functions are mutually orthogonal (l , k = 0 for l = k)
and of unit norm (k 2 = k , k = 1).
According to the orthogonality principle, the best (minimum norm-squared error) coecients Xk
of this representation are given by Eq. (8.55) as
x, k
1
Xk =
=
2
k
T0
x(t)ejk0 t dt.
T0
This is exactly the Fourier series analysis equation (see Eq. (1.58)).
Example 8.20
We are now equipped to develop the frequency-weighted least-squares (FWLS) method of FIR
lter design. From Eq. (8.32), recall that a length-Lh FIR lter with impulse response h[n] has
frequency response given by
L
h 1
H(ej ) =
h[n]ejn .
(8.56)
n=0
This equation is identical in form to Eq. (8.53). From this perspective, an FIR lters frequency
response approximates some desired frequency response (call it Hd (ej )) using a linear combination
of complex exponential basis functions. To nd the optimal coecients h[n], all we need is to dene
an appropriate inner product and then use the orthogonality principle.
548
Let us dene our inner product between arbitrary functions X() and Y () as
2
1
X(), Y () =
X()Y ()Q() d.
2 0
(8.57)
The weighting function Q(), which is taken to be real and nonnegative, allows dierent frequency
regions to be emphasized in dierent ways. As a basic rule of thumb, the weighting function is
typically set inversely proportional to the allowable squared ripple,
2
1
passband
/2
2
Q() =
.
(8.58)
1
stopband
0
transition band
Dening Q() in this way, the lters norm-squared error is more heavily weighted where ripple
requirements are most restrictive (small). Thus, unlike the other FIR design methods we have
discussed, an FWLS FIR lter has the notable advantage that it can achieve dierent levels of
passband and stopband ripple.
Using the inner product of Eq. (8.57), the norm-squared error of our lter is given as
2
1
|Hd (ej ) H(ej )|2 Q() d.
E = Hd (ej ) H(ej ), Hd (ej ) H(ej ) =
2 0
To minimize E, the orthogonality principle requires that the error be orthogonal to the data (basis
functions); that is,
Hd (ej ) H(ej ), ejl = 0
for
l = 0, 1, . . . , Lh 1.
Thus,
2
1
Hd (ej ) H(ej ) ejl Q() d = 0,
2 0
To help simplify this equation, let us dene
2
1
al =
ejl Q() d
2 0
and
1
bl =
2
l = 0, 1, . . . , Lh 1.
(8.59)
Using Eq. (8.56), we next rewrite Eq. (8.59) in terms of the known quantities al and bl as
L
h 1
l = 0, 1, . . . , Lh 1.
aln h[n] = bl ,
n=0
h[0]
h[1]
..
h[Lh 1]
h
=
a0
a1
a1
a0
..
.
..
.
..
aLh 1
aLh 2
A1
a1Lh
a2Lh
..
a0
b0
b1
..
.
bLh 1
b
(8.60)
549
Since A is a Toeplitz matrix, ecient algorithms exist to compute its inverse. Still, there are several
signicant disadvantages to this form of the FWLS method. First, in cases such as real-time channel
equalization, the desired response Hd (ej ) may only be known for a nite number of points, not a
continuum of . Further, even if Hd (ej ) is known for all , it is not particularly convenient to
evaluate the integrals that dene al and bl .
To overcome both these problems, we discretize the FWLS procedure. Rather than looking at
over a continuum of points, we instead look at a large but nite number of frequencies K Lh .
Typically, these frequencies are uniformly spaced 2/K apart. Thus, replacing integrals with sums,
our norm-squared error over these points is
EK =
K1
1
|Hd [k] H(ejk2/K )|2 Q(k2/K).
K
k=0
Orthogonality again yields a solution, but now our expressions for al and bl become
al =
K1
1 jkl2/K
e
Q(k2/K)
K
(8.61)
k=0
and
K1
1
Hd [k]ejkl2/K Q(k2/K).
bl =
K
(8.62)
k=0
The desired FWLS FIR lter is again found using Eq. (8.60). As before, it is important that Hd [k]
be specied so that a linear phase solution is preferred. Similar to Eq. (8.48), for example, we can
dene a linear phase Hd [k] for a real lter in terms of an ideal continuous-time response as
L 1
jk hK
Hc (j k2
0 k K1
KT )e
2
.
(8.63)
Hd [k] =
Hd [Lh k]
K1
2 +1 k K 1
It is also crucial for real lters that the weighting function Q(k2/K) possess midpoint symmetry. To
avoid problems from computer round-o, this is best done explicitly, as done for Hd [k] in Eq. (8.63).
Let us conclude with an FWLS design example.
Using the frequency-weighted least-squares method, design a length Lh = 20 lowpass FIR lter
with p = /3, s = /2, p = 1, and s = 0.01. Specify the desired frequency response to have
linear phase.
Let us use MATLAB to complete the design.
01
02
03
04
05
06
07
08
09
10
11
Line 01 establishes the basic lter parameters, and line 02 selects K = 10Lh points k to represent
the continuum of points over 0 < 2. Line 03 denes the frequency-weighting function Q(k )
550
over 0 k according to Eq. (8.58), whereas line 04 uses midpoint symmetry to compute Q(k )
for the remaining frequencies < k < 2. Line 05 uses Eq. (8.63) to compute the desired (linear
phase) response over 0 k , and line 06 computes the remaining values using the midpoint
conjugate symmetry of Hd [k]. Line 07 computes the al and bl using Eqs. (8.61) and (8.62). Line 08
forms the Toeplitz matrix A from the values al and then computes the FIR impulse response h[n]
using Eq. (8.60). Here, the computationally expensive matrix inverse is avoided by using the simpler
left divide command. Lines 0911 plot this impulse response (Fig. 8.60a) and its corresponding
dB magnitude response (Fig. 8.60b). Notice that this FWLS solution achieves dierent levels of
passband and stopband ripple.
h[n]
0.5
(a)
0
19
20 log10 |H(ej )|
0
(b)
40
Figure 8.37: Frequency-weighted least-squares LPF: (a) impulse response and (b) magnitude response.
Although this design meets specications on the rst try, this will not always be the case. Thus,
the length Lh or weighting function Q() may require adjustment to achieve a satisfactory design.
Example 8.21
Using the frequency-weighted least-squares method, design a length Lh = 101 highpass FIR lter with
p = /2 and s = 3/8. Specify the desired frequency response to have linear phase and Q() to be
10 times smaller in the passband than in the stopband. What is the passband and stopband ripple of the
lter?
551
same principles hold for FIR lters as well. To help reduce FIR lter length (complexity), we seek
an equiripple solution.
As with FWLS FIR lters, consider a frequency-weighting function Q() from which we can
dene a frequency-weighted error E() given as
E() = Hd (ej ) H(ej )
Q().
Using this notation, the FWLS method minimizes the mean (integral) square of E(). Now rather
than mean square error, another sensible measure of error is maximum absolute error,
Emax = max |E()|
Q() .
= max Hd (ej ) H(ej )
Although the proof is outside the scope of this text, an equiripple design results from minimizing
this maximum error (a min-max optimization problem).
The Remez exchange algorithm is a computation procedure for the general min-max optimization
problem, and the Parks-McClellan algorithm is a popular variation specically suited for FIR lter
design. The details of these algorithms are rather complicated, and we do not cover them here.
Fortunately, MATLABs Signal Processing Toolbox provides built-in functions that implement the
Parks-McClellan algorithm, as well as many other FIR lter design methods. Let us demonstrate
the design of an equiripple FIR lter with a simple example.
Using functions from MATLABs Signal Processing Toolbox, design a length Lh = 20 equiripple
lowpass FIR lter with p = 2/5 and s = /2.
Here, we use MATLABs firpm command to design our equiripple FIR lter. Details on this
command, which implements the Parks-McClellan algorithm, are available using MATLABs help
facilities.
h[n]
0.5
(a)
0
19
|H(ej )|
1
(b)
2
5
Figure 8.38: Equiripple LPF: (a) impulse response and (b) magnitude response.
552
01
02
03
04
05
As shown in Fig. 8.38a, the resulting impulse response is nite in length and sinc-like in character. Further, the even symmetry of h[n] ensures a linear phase response. The magnitude response
of Fig. 8.38b conrms the equiripple nature of the response in both the passband and the stopband.
Example 8.22
8.3
Summary
Digital lters are classied as IIR or FIR. The duration of the impulse response of an IIR lter is
innite; that of a FIR lter is nite. A digital lter can simulate the time-domain or frequencydomain behavior of a desired lter. Thus, common digital lter design procedures are based on
time- or frequency-domain criteria.
Digital IIR lters are typically derived from analog IIR lters. The time-domain criterion yields
the impulse invariance method, and the frequency-domain criterion yields the bilinear transform.
The impulse invariance method is handicapped by aliasing and cannot be used for highpass and
bandstop lters. The bilinear transform, which is generally superior to the impulse invariance
method, suers from frequency warping. This eect, however, can be neutralized by prewarping. To
design digital IIR highpass, bandpass, and bandstop lters, careful combinations of transformations
are applied to normalized analog lowpass prototypes. To mitigate the ill eects of nite word lengths,
digital IIR lters are usually realized using cascades of second-order sections.
Because FIR lters are a special case of IIR lters, we expect the performance of IIR lters to be
superior. This statement is true in the sense that a given magnitude response can be achieved by an
IIR lter of an order smaller than that required for the corresponding FIR lter. To their advantage,
however, FIR lters can easily realize arbitrarily shaped magnitude responses, are guaranteed stable,
and can, through proper midpoint symmetry in the impulse response h[n], possess linear phase.
Further, the realization of FIR lters is more simple and robust than the realization of IIR lters.
For FIR lters, the time-domain criterion leads to the window method, of which the Fourier series
method is a special case. Smoother windows yield smaller passband and stopband ripple but require
longer lengths to achieve a given transition band. The frequency-domain criterion leads to the
frequency sampling and frequency-weighted least-squares methods, both of which are particularly
well suited to the design of lters with arbitrarily shaped magnitude responses.
References
1. Jackson, L. B., A Correction to Impulse Invariance, IEEE Signal Processing Letters, Vol. 7,
No. 10, October 2000.
2. Kaiser, J. F., Nonrecursive Digital Filter Design Using the I0 -sinh Window Function, Proc.
1974 IEEE International Symposium on Circuits and Systems, San Francisco, CA, April 1974,
pp. 2023.
3. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
4. Mecklenbrauker, W. F. G., Remarks on and Correction to the Impulse Invariant Method
for the Design of IIR Digital Filters, Signal Processing, Vol. 80, No. 8, August 2000, pp.
16871690.
8.3. Summary
553
5. Mitra, S. K., Digital Signal Processing: A Computer-Based Approach, 3rd Ed., McGraw-Hill,
New York, 2006.
6. Mitra, S. K., and Kaiser, J. F., Handbook for Digital Signal Processing, Wiley, New York, 1993.
7. Porat, B., A Course in Digital Signal Processing, Wiley, New York, 1997.
8. Selesnick, I. W., et al., Classical Filter Design Methods, in The Digital Signal Processing
Handbook , V. K. Madisetti and D. B. Williams, eds., CRC Press, Boca Raton, FL, 1998, pp.
11-1811-30.
554
Problems
8.1-1 In Ch. 4, we approximate the rst-order
d
dierential equation dt
y(t) + cy(t) = x(t)
[Eq. (4.48)] using backward dierences as
T
1
y[n 1] =
x[n].
y[n] +
1 + cT
1 + cT
Compare this solution with the one resulting from the impulse invariance method.
Show that one result is a close approximation of the other and that the approximation improves as T 0.
8.1-2 Using the impulse invariance criterion, design a digital lter to realize a continuoustime lter with transfer function
Hc (s) =
7s + 20
.
2(s2 + 7s + 10)
s2
.
+ 2s + 1
Hc (s)
L1
.
s
t=nT
c
.
s + c
8.1-4 Design a digital integrator using the impulse invariance method. Determine and
plot the magnitude response, and compare 8.1-7 In the ramp invariance method for a given
Hc (s), we design H(z) in Fig. 8.1b such
it with that of an ideal integrator. If this
that
its output y[n] is identical to yc (nT ) in
integrator is used primarily for integrating
Fig.
8.1a for the input xc (t) = tu(t). Use
audio signals (whose bandwidth is 20 kHz),
this
method
to synthesize a discrete-time
determine a suitable value for T .
dierentiator.
8.1-5 By denition, an oscillator is a source (no
input) that generates a sinusoid of a cer- 8.1-8 Repeat Prob. 8.1-7 to design a discretetime integrator.
tain frequency 0 . Therefore, an oscillator
is a system whose zero-input response is a 8.1-9 In an impulse invariance design, show that
sinusoid of the desired frequency. Choosing
if Hmc (s) is a transfer function of a stable
T so that there are 10 samples in each cysystem, the corresponding H(z) is also a
cle of the sinusoid, consider the design of a
transfer function of a stable system.
10-kHz digital oscillator.
8.1-10 Consider the design of a digital dieren(a) Determine H(z) directly so that its
tiator H(z).
zero-input response is a discrete-time
sinusoid of frequency = T corre(a) Determine H(z) using the bilinear
sponding to 10 kHz.
transform.
Problems
555
03
04
05
06
y = mem(1)*7/16 - mem(3)*7/16;
write_DAC = y;
mem(3) = mem(2);
mem(2) = mem(1);
556
Hc (j2f )
1
50
150
Figure P8.2-5
8.1-26 Prove that applying the bilinear trans- 8.2-7 Using the Fourier series method, design an
Lh = 15 FIR lter to approximate an ideal
form to the CT lter of Eq. (8.14) yields
lowpass
lter with a cuto frequency of 20
the DT lter of Eq. (8.15).
kHz. Let the sampling frequency be Fs =
200 kHz.
8.2-1 Show that the frequency response of a
third-order (L = 3) type II FIR lter is
8.2-8 Repeat Prob. 8.2-7 using the window degiven by
sign method and a Hamming window.
H(ej ) = 2ej1.5
(h[0] cos(3/2) + h[1] cos(/2)) .
8.2-2 Show that the frequency response of a
third-order (L = 3) type IV FIR lter is
given by
8.2-9 Consider the length-7 (Lh = 7) lowpass FIR lter of Ex. 8.11. Redesign
this lter using a Hann window, and plot
the resulting magnitude response |H(ej )|.
How does this lter compare with those of
Ex. 8.11?
8.2-10 Consider the Lh = 8 and Lh = 11 FIR
dierentiators of Ex. 8.12. Redesign these
lters using a Blackman window, and plot
the resulting magnitude response |H(ej )|.
How does this lter compare with those of
Ex. 8.12?
8.2-11 An ideal (bandlimited) /2 phase shifter
(Hilbert transformer) is given by
Hc (j) = jsgn()
.
2/T
(a) Sketch |Hc (j)| and Hc (j).
(b) Using rectangular and Hamming windows, use the window method to design Lh = 15 FIR lters to approximate Hc (j). Plot the resulting magnitude and phase responses, and compare them with the ideal.
8.2-12 Using the window method and a nonKaiser window, design a digital lowpass lter with p = /4, s = /3, and s = 20
dB.
8.2-13 Repeat Prob. 8.2-12 using s = 35 dB.
8.2-14 Repeat Prob. 8.2-12 using s = 50 dB.
Problems
557
8.2-16 Using the window method and a nonKaiser window, design a digital highpass
lter with s = 0.45, p = 0.5, and 8.2-23 Given a lowpass FIR lter with impulse
response hlp [n], it is possible to obtain a
s = 60 dB.
bandpass FIR lter with center frequency
ctr according to
8.2-17 Using the window method with a Blackman window, design a length Lh = 11
hbp [n] = 2 cos(nctr )hlp [n].
digital bandpass lter with p1 = /4,
p2 = 3/8, and s = 60 dB. Plot the
(a) Prove that this technique really does
corresponding magnitude response, and detransform a lowpass FIR lter into a
termine the approximate widths of the two
bandpass FIR lter.
transition bands. Lastly, show an ecient
block diagram realization of the lter.
8.2-18 Repeat Prob. 8.2-17 using a Kaiser window.
8.2-19 Using the frequency sampling method
(with linear phase), design an Lh = 11
digital dierentiator. Compare both h[n]
and H(ej ) of the resulting design with the
Lh = 11 designs of Ex. 8.12.
8.2-20 Repeat Prob. 8.2-19 using Lh = 8.
(b) If hlp [n] has a cuto frequency c , determine the corresponding cuto frequencies of hbp [n].
(c) Using the window method and a triangular window, design an Lh = 61 lowpass lter with cuto frequency c =
/4. Plot the impulse response hlp [n]
as well as the corresponding magnitude response |Hlp (ej )|.
(d) Transform the lowpass lter in
part (c) into a bandpass lter. Plot
both hbp [n] and |Hbp (ej )|.
8.2-22 Given a lowpass FIR lter with impulse 8.2-25 Using the frequency sampling method,
design a linear phase lowpass FIR lter
response hlp [n], it is possible to obtain a
with cuto frequency c = 2/3 and Lh =
highpass FIR lter by simply alternating
28.
the sign of every other value of hlp [n]. That
is,
8.2-26 Using the frequency sampling method,
hhp [n] = (1)n hlp [n].
design a linear phase highpass FIR lter
with cuto frequency c = /3 and Lh =
(a) Prove that this technique really does
15. Show an ecient block diagram realtransform a lowpass FIR lter into a
ization of the lter.
highpass FIR lter.
(b) If hlp [n] has a cuto frequency c , de- 8.2-27 Using the frequency sampling method,
design a linear phase bandpass FIR lter
termine the corresponding cuto frewith cuto frequencies c1 = /4, c2 =
quency of hhp [n].
5/8, and Lh = 70.
(c) Using the window method and a Hann
window, design an Lh = 50 lowpass 8.2-28 Using the frequency sampling method,
lter with cuto frequency c = /3.
design a linear phase bandstop FIR lter
Plot the impulse response hlp [n] as
with cuto frequencies c1 = /3, c2 =
well as the corresponding magnitude
/2, and Lh = 13. Realize the design as a
response |Hlp (ej )|.
frequency sampling lter.
558
2 4
Figure P8.2-29
8.2-30 Dening Q() = 1 for all , repeat
Prob. 8.2-29 using the frequency-weighted
least-squares method. What happens if instead Q() = 2 over all ?
8.2-31 Dening Q() = 10 for || < /2 and
1 elsewhere, repeat Prob. 8.2-29 using the
frequency-weighted least-squares method.
8.2-32 Using the frequency-weighted leastsquares method, design a length Lh = 25
highpass FIR lter with p = 2/3, s =
/2, p = 0.5, and s = 0.02. Specify the
desired frequency response to have linear
phase. Does the lter meet specications?
8.2-33 Using functions from MATLABs Signal
Processing Toolbox, design a length Lh =
31 equiripple highpass FIR lter with p =
3/4 and s = /2.
Chapter 9
560
continuous-time signal exactly from its Nyquist samples. Of course, not all signals of interest are
nite in length. What about innite-length x[n]? Every practical x[n] must necessarily have nite
energy and, therefore, must approach 0 and become negligible for n greater than some n N . We
can truncate this signal for n N and then use the DFT. This truncation produces (controllable)
error in the results. But, as seen earlier, by its very nature, numerical computations for innitelength x[n] generally involve approximations no matter what method is used.
9.1
Let X() be the DTFT of a nite-length signal x[n] that is zero outside 0 n N 1. Let X[k]
be the uniform samples of X() at a frequency interval of 0 = 2/N ,
2k
X[k] = X(k0 ) = X
,
0 k N 1.
(9.1)
N
Thus, X[k] are the N samples of X() that are spaced uniformly at intervals of 0 = 2/N over
the frequency range of 0 to 2 (one full period of X()). Next, we develop the equations relating
x[n] and X[k] that dene the discrete Fourier transform (DFT).
Using Eq. (6.1) and the fact that X[k] = X(k0 ) with 0 = 2/N , we obtain
X[k] =
N
1
x[n]ej0 kn ,
0 k N 1.
(9.2)
n=0
This analysis equation of the DFT (direct DFT) identies the spectral components of x[n]. Since
the spectrum X[k] is constructed exclusively from N -periodic functions ej0 kn , it is inherently an
N -periodic function of k, although we only concern ourselves with the single period 0 k N 1.
This is a satisfying result as we expect all DT signals to have periodic spectra.
To obtain the inverse relationship, we multiply both sides of Eq. (9.2) by ej0 km and sum over
0 k N 1 to obtain
$ 1
%
N
1
N
1 N
j0 km
j0 kn
X[k]e
=
x[n]e
ej0 km .
k=0
Multiplying by
1
N
n=0
k=0
(9.3)
k=0
To simplify this expression, let us investigate the right-hand-side bracketed sum. First note that since
0k
0 N = 2, ej(mn)0 k = 1 when m n = 0, N , 2N , . . .. More
ej(mn)
Ncompactly,
N 1= 1 for
1 j0 k(mn)
= k=0 1 = N
m nN = 0, where m nN denotes m n modulo N . Thus, k=0 e
for m nN = 0. To compute the remaining values of m n, we note that the sum is a geometric
progression with common ratio ej0 (mn) . Thus, using entry 1 of Table 5.1, we see for m nN = 0
that
N
1
1 ej0 (mn)N
1 ej2(mn)
11
ej0 k(mn) =
=
=
= 0.
j0 (mn)
j0 (mn)
j0 (mn)
1
e
1
e
1
e
k=0
Taken together,
N
1
k=0
ej0 k(mn) =
N
0
m nN = 0
m nN = 0
= N [m nN ].
More
(9.4)
intuitively, the modulo-N operation m nN is the remainder after dividing m n by N , assuming
m n 0. This operation is quite important to DFT studies and is covered in detail in Sec. 9.2.1.
561
The right-hand sum has only one nonzero term at n = m, so this simplies to
N 1
1
X[k]ej0 km = x[m],
N
0 m N 1.
k=0
Replacing the variable m with the more conventional n, we obtain the inverse relationship we seek:
x[n] =
N 1
1
X[k]ej0 kn ,
N
0 n N 1.
(9.5)
k=0
This synthesis equation of the DFT (inverse DFT) uses the spectral samples X[k] to construct x[n]
over the range 0 n N 1.
Equations (9.2) and (9.5) dene the DFT pair. We call X[k] the (direct) discrete Fourier transform (DFT) of x[n]. Conversely, x[n] is the inverse discrete Fourier transform (IDFT) of X[k]. This
can be represented as
X[k] = DFT{x[n]} and x[n] = IDFT{X[k]}
or, more compactly, as
x[n] X[k].
To avoid needless confusion, we use to indicate the DFT pair rather than , which is reserved
for DTFT pairs. We stress once again that the number of points in both x[n] and X[k] are identical
and equal to N . Commonly, DFT frequencies are referred to as DFT bins.
Find the DFT of the length-3 signal x[n] = 3[n] + 2[n 1] + 3[n 2] shown in Fig. 9.1. Compare
the DFT spectrum X[k] with the corresponding DTFT spectrum X().
x[n]
3
2
x[n]ej (
2
3
4
)kn = 3 + 2ej 2
3 k + 3ej 3 k .
n=0
Therefore,
X[0] = 3 + 2 + 3 = 8,
562
and
X[1] = 3 + 2e
j 2
3
+ 3e
j 4
3
Similarly,
= 3 + 1 j 3 +
X[2] = 3 + 2ej
4
3
+ 3ej
1 0
1
3 3
1
3
3
=
+j
= ej 3 .
+j
2
2
2
2
8
3
= ej 3 .
0
8
0
1
1
2
1
3
Observe that X[1] = X[2] . This follows from the conjugate symmetry property of X[k], given later
by Eq. (9.25). Because x[n] is a 3-point signal (N = 3), X[k] is also a 3-point sequence.
Since x[n] is nite duration, the DFT equals sample values of the DTFT X(). By comparing the
DFT with the DTFT, we can determine whether the DFT has enough samples to give a reasonably
good representation of the DTFT. The DTFT for x[n] is given by
X() =
n=0
and
X() =
2 + 6 cos() > 0
.
2 + 6 cos() < 0
Figure 9.2 compares |X[k]| and X[k] with |X()| and X(). Observe that the DFT values are
exactly equal to DTFT values at the sampling frequencies; there is no approximation. This is always
true for the DFT of a nite-length x[n]. However, if x[n] is obtained by truncating or windowing a
longer sequence, we shall see that the DFT gives only approximate sample values of the DTFT.
|X[k]|
X[k]
8
|X()|
4
3
1
s
2
3
4
3
X()
2
3
2 k0
2 k0
Figure 9.2: 3-point DFT of x[n] = 3[n] + 2[n 1] + 3[n 2] and its DTFT comparison.
The DFT in this example has too few points to give a reasonable picture of the DTFT. The peak
of DTFT appearing between the second and third samples (between k = 1 and 2), for instance, is
missed by the DFT. The two valleys of the DTFT are also missed. We denitely need more points
in the DFT for an acceptable resolution. This goal is accomplished by zero padding, explained next.
Example 9.1
Recall that X[k] are the samples of X() over the interval 0 2. Moreover, X() is 2-periodic so that
X(2 ) = X(). Also, for real x[n], X() = X () = X (2 ). If we let = k0 and use the fact that
N 0 = 2, we obtain X[k] = X [N k]. Here, N = 3, so X[1] = X [3 1] = X [2].
563
A length-3 signal is specied by x[n] = 2[n] + [n 1] + [n 2]. Show that the (N = 3)-point DFT of
this signal is X[0] = 4, X[1] = 1, and X[2] = 1. Find X(), the DTFT of this signal, and graphically
verify that the DFT is equal to the samples of X() at intervals of 0 = 2/N = 2/3.
9.1.1
The DFT yields samples of the DTFT spaced at frequency intervals of 0 = 2/N . In this way,
the DFT size N determines the frequency resolution 0 . Seeing the DTFT through the DFT is
like viewing X() through a picket fence. Only the spectral components at the sampled frequencies
(which are integral multiples of 0 ) are visible. All the remaining frequency components are hidden,
as though behind the pickets of a fence. If the DFT has too few points, then peaks, valleys, and
other details of X() that exist between the DFT points (sampled frequencies) will not be seen,
thus giving an erroneous view of the spectrum X(). This is precisely the case in Ex. 9.1. Actually,
using the interpolation formula (discussed later), it is possible to compute any number of values of
the DTFT from the DFT. But having to use the interpolation formula really defeats the purpose of
the DFT. We therefore seek to reduce 0 so that the number of samples is increased for a better
view of the DTFT.
Because 0 = 2/N , we can reduce 0 by increasing N , the length of x[n]. But how do we
increase the length of a signal when its length is given as N ? Simple! For an N -point signal, its
values outside the range 0 n N 1 are zero. By simply taking x[n] to include some of the
zero-valued points beyond N 1, we can articially increase its length. This process is referred
to as zero padding. By appending zero-valued samples to x[n], we can increase N as much as we
wish, thereby increasing the number of points of the DFT. Zero padding allows us to obtain more
samples of X() for clarity. Furthermore, this process does not change the underlying signal x[n],
which means that zero padding does not aect the underlying spectrum X(). Returning to our
picket fence analogy, zero padding increases the number of pickets in our fence (N ), but it cannot
change what is behind the fence (X()). To demonstrate the idea, we next rework Ex. 9.1 using
zero padding to double the number of samples of the DTFT.
Using zero padding, nd the 6-point DFT of the length-3 signal of Ex. 9.1, x[n] = 3[n] + 2[n
1] + 3[n 2]. Compare the 6-point DFT X[k] with the corresponding DTFT spectrum X().
To compute a 6-point DFT from our length-3 signal, we must pad x[n] with three zeros, as shown
in Fig. 9.3. In this way, we treat x[n] as a 6-point signal with x[0] = 3, x[1] = 2, x[2] = 3, and
x[3] = x[4] = x[5] = 0.
x[n]
3
2
Figure 9.3: Zero padding x[n] = 3[n] + 2[n 1] + 3[n 2] to a length of six.
By padding x[n] with three zeros, N increases to 6, and 0 decreases to 2/6 = /3. Computed
564
using Eq. (9.2), the magnitudes and angles of the resulting X[k] are thus
k
|X[k]|
X[k]
0
8
0
1
5
3
2
1
3
4
0
4
1
3
5
5
Because of the conjugate symmetry property (Eq. (9.25), discussed later), X[1] = X [5] and
X[2] = X [4]. Observe that we now have a 6-point DFT, which provides 6 samples of the DTFT
spaced at the frequency interval of /3 (in contrast to the 2/3 spacing in Ex. 9.1). Here, the
samples at k = 0, 2, and 4 are identical to the samples at k = 0, 1, and 2 in Ex. 9.1. The DFT
spectrum in Fig. 9.4 contains all three samples appearing in Fig. 9.2 plus three additional samples
interlaced in between. Clearly, zero padding allows us a better assessment of the DTFT. Notice in
this case, however, that the valleys of X() are still largely missed by this 6-point DFT.
|X[k]|
X[k]
X()
|X()|
4
3
5
4
3
1
2
3
4
3
2
3
2 k0
2 k0
Figure 9.4: 6-point DFT of x[n] = 3[n] + 2[n 1] + 3[n 2] and its DTFT comparison.
Example 9.2
565
X[k] over the frequency range from 0 to 2. Later, when we consider a periodic perspective of both
the DFT and its inverse, we shall gain additional useful insight into this puzzle.
For the length-3 signal of Ex. 9.1, determine the zero padding needed to achieve a DFT frequency
resolution of 0 = /10. Write the corresponding expression for computing the DFT.
2
2
For 0 = /10, the padded signal length is required to be N =
= 20. Since the
=
0
/10
total length should be 20, we need to pad 17 zeros to x[n]. In this case,
X[k] =
19
x[n]ej ( 10 )kn ,
0 k 19.
n=0
However, the last 17 samples of x[n] are zero. Therefore, the preceding equation reduces to
X[k] =
x[n]ej ( 10 )kn ,
0 k 19.
n=0
The plot of this 20-point DFT, computed using MATLAB in Ex. 9.4, is shown in Fig. 9.5. As the
DFT size N increases, it becomes progressively more dicult to compute the DFT (or its inverse)
by hand. As we shall see next, matrix-based computations are more manageable, although not
generally as ecient as the fast Fourier transform described in Sec. 9.7.
Example 9.3
9.1.2
For large N , whether the result of a long signal or much zero padding, it is cumbersome to manually
evaluate the DFT and its inverse. Fortunately, both represent sets of N linear equations in N
unknowns. Consequently, both can be expressed in matrix form, suitable for simple computer
evaluation. Let us rst consider the direct DFT. Expanding each sum for each value of k, Eq. (9.2)
yields the matrix form of
1
1
1
1
x[0]
X[0]
ej0
ej0 2
ej0 (N 1)
x[1]
X[1]
j
2
j
4
j0 2(N 1)
0
0
e
e
e
x[2]
X[2]
(9.6)
.
=
..
..
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
2
x[N 1]
X[N 1]
1 ej0 (N 1) ej0 2(N 1) ej0 (N 1)
x
X
DN
Known as the discrete Fourier transform matrix, the square matrix D N has (kn)th element ej0 kn .
1
Furthermore, the DFT matrix D N has a particularly convenient inverse D 1
N = N D N . Using this
fact (or writing out Eq. (9.5)), the matrix form of the inverse DFT is
1
1
1
1
X[0]
x[0]
1
ej0 2
ej0 (N 1)
ej0
X[1]
x[1]
j
2
j
4
j0 2(N 1)
1
0
0
1
e
e
e
X[2]
x[2]
(9.7)
.
=
N ..
.
..
..
.
..
.
.
.
.
.
.
.
.
.
.
.
2
X[N 1]
x[N 1]
1 ej0 (N 1) ej0 2(N 1) ej0 (N 1)
x
X
D1
N
566
In compact matrix forms, the DFT is simply X = D N x, and the inverse DFT is x = D1
N X or,
equivalently, x = N1 DN X.
The matrix forms of Eqs. (9.6) and (9.7) highlight the similarity between the DFT and its inverse.
Except for a scale factor and a complex conjugation, the two are identical. As we shall explore later,
this near-perfect symmetry leads to a duality property that is very similar to that of the FT.
Use MATLAB and Eq. (9.6) to compute and plot the DFT of Ex. 9.3. Compare the DFT spectrum
X[k] with the corresponding DTFT spectrum X().
MATLAB readily computes and plots the required 20-point DFT and the DTFT for comparison.
01
02
03
04
05
06
Line 01 establishes the basic parameters of the problem. Line 02 denes the length-3 signal
x[n] = 3[n]+2[n1]+3[n2] of Ex. 9.1 and pads it with N 3 = 17 zeros, as discussed in Ex. 9.3.
Line 03 denes the 20-point DFT matrix D N and then computes the DFT using the matrix representation of Eq. (9.6). Line 04 denes the DTFT, derived in Ex. 9.1, as X() = ej [2 + 6 cos()].
Finally, lines 0506 plot the corresponding magnitude and phase spectra. As shown in Fig. 9.5, the
20-point DFT provides a good representation of the corresponding DTFT.
X[k]
|X[k]|
8
X()
|X()|
4
3
4
3
2
3
4
3
2
3
2 k0
2 k0
Figure 9.5: 20-point DFT of x[n] = 3[n] + 2[n 1] + 3[n 2] and its DTFT comparison.
Example 9.4
k = 0, 1.
567
= 8 and X[1]
= 4. The IDFT corresponding to X[k]
n = 0, 1.
k=0
This yields x
[0] = 6 and x[1] = 2. The corresponding DTFT X()
is given by
X()
=
x[n]ejn = 6 + 2ej .
n=0
Observe that reducing the number N of samples X[k] from 3 to 2 changes everything. Zero padding,
which increases the length N , does not change the basic signal x[n] or the DTFT X(). In contrast, a
The DTFT of the 3-point signal x[n] specied in Drill 9.2 is X() = ej [1 + 2 cos()]. For this DTFT,
consider the 2-point DFT obtained by sampling X() at intervals of given by X[0]
= 3 and X[1]
= 1.
x
[n] is given by X()
= 2 + ej .
9.1.3
The length-N DFT of signal x[n] yields N samples of its DTFT X(). However, we can determine
any number of samples of X() from the DFT of x[n] by padding an adequate number of zerovalued samples to x[n]. If we pad a very large number of zeros to x[n], we can practically obtain
the entire X(). This requires a large number of computations. We can also determine the entire
X() from the DFT using interpolation. Recall that for the continuous-time case, we can obtain
a signals spectrum from its samples using spectral interpolation (Eq. (3.22)). We now discuss a
similar technique for the discrete-time case. For a length-N x[n], the DTFT is
X() =
N
1
n=0
N
1
n=0
1
N
x[n]ejn
$
%
N 1
1
j0 kn
X[k]e
ejn
N
N
1
k=0
k=0
X[k]
N
1
n=0
ej(0 k)n .
(9.8)
568
The inner sum on the right-hand side of Eq. (9.8) is a geometric progression with common ratio
ej(0 k) . Using entry 1 of Table 5.1 and substituting 0 = 2/N , we obtain
N
1
1 ej(N 2k)
1 ej(2k/N )
j(N 2k)/2
e
ej(N 2k)/2 ej(N 2k)/2
= j(N 2k)/2N
e
ej(N 2k)/2N ej(N 2k)/2N
sin N 2k
2
2k ej(N 2k)(N 1)/2N .
=
sin N2N
ej(0 k)n =
n=0
(9.9)
Substitution of Eq. (9.9) in Eq. (9.8) yields the desired interpolation formula
N 1
sin N 2k
1
2
X() =
X[k] N 2k ej(N 2k)(N 1)/2N .
N
sin
2N
k=0
(9.10)
Using this interpolation formula, we can compute X() from its N uniform samples X[k] (the DFT).
Using interpolation, determine the DTFT X() if the DFT of the corresponding 3-point x[n] is
given by X[0] = 8, X[1] = ej/3 , and X[2] = ej/3 .
From Eq. (9.10), we obtain
2
sin 32k
2k
1
2
X() =
X[k] 32k ej ( 3 )
3
sin
6
k=0
0
8
1
sin(3/2)
1
+
= ej
3
sin(/2) sin( 2 3 ) sin( 2
1
2
3 )
x[n] =
0 n 2.
k=0
This yields x[0] = 3, x[1] = 2, and x[2] = 3. From these values of x[n], we determine X() as
X() =
k=0
Both procedures yield the same result, which also matches the result of Ex. 9.1.
Example 9.5
569
Use the interpolation formula to show that X() = 2 + ej is the DTFT underlying the 2-point DFT
given by X[0] = 3 and X[1] = 1.
9.2
In all the discussion so far, we have restricted the length-N sequence x[n] to the range 0 n N 1.
What happens if a sequence falls outside this range? Is the DFT for such a signal dened? Even
when a signal is restricted to the range 0 n N 1, this signal, when time shifted in the
traditional manner, will go out of this range. How, then, can one nd the DFT of a shifted signal?
Moreover, in the convolution of two signals, one of the signals is time-reversed and then shifted. A
signal restricted to the range 0 n N 1, when time-reversed, also goes out of this range. Does
this mean that the DFT of the convolution of two signals does not exist or is not meaningful? What
use is such a restricted form of DFT that cannot handle signal shifting or convolution, which are
the daily bread-and-butter issues in signal processing? Most important of all, for the purpose of
dening the DFT, why are we restricting a signal to the range 0 n N 1? Why not let it have
a general range such as N1 n N2 ? The answers to all these questions have something to do
with the uniqueness of the DFT.
The Importance of Range on DFT Uniqueness
Let us see what happens if we remove the restriction on the range 0 n N 1. Consider a
length-N signal x[n] dened for 0 n N 1 and its N -point DFT X[k], which has a similar
range 0 k N 1. We use Eq. (9.2) to compute X[k] as
X[k] =
N
1
x[n]ej0 kn ,
0 k N 1.
n=0
We make one interesting observation. In the sum on the right-hand side, the contribution of the
sample x[r], located at n = r, is x[r]ej0 kr . If this sample x[r], located at n = r, is shifted by some
integer multiple of N , that is, shifted to n = r + mN , its contribution remains unchanged because
x[r]ej0 k(r+mN ) = x[r]ej0 kr ej2m = x[r]ej0 kr .
Clearly, if we remove the restriction on the range 0 n N 1, the shift of any individual samples
by some integer multiple of N results in the same X[k]. Note that each sample may be shifted by
dierent integer multiples of N , although the more common case is when all x[n] are shifted by the
same integer multiple of N , which yields the signal x[n mN ] dened over mN n mN + N 1.
Either way, the only requirement to ensure that the N values of X[k] remain unchanged is that all
shifts be integer multiples of N . Using a similar argument, we can show that if we shift individual
samples of X[k] any way we want, as long as the shift of each sample is some integer multiple of N ,
the resulting x[n] is the same.
To provide a graphical example, consider the 4-point signal xa [n] of Fig. 9.6a, dened over
0 n 3. Shifting all xa [n] to the left by 4 yields the signal xb [n], dened over 4 n 1
and depicted in Fig. 9.6b. Figure 9.6c shows a case where dierent samples are shifted by dierent
multiples of N : x[0] is shifted from n = 0 to n = 0 + 4 = 4, x[1] is shifted from n = 1 to
n = 1 + (2 4) = 7, and the remaining two samples x[2] and x[3] are not shifted at all. Since
their samples dier only by shifts that are integer multiples of N , the spectral samples X[k] for all
three signals in Fig. 9.6 are identical.
570
xa [n]
4
3
2
xb [n]
3
2
1
7
4
(a)
xc [n]
4
3
4
2
1
3
4
(b)
1
3
4
(c)
Figure 9.6: Three (N = 4)-point signals that dier only by shifting samples by multiples of N .
Do You Know My Niece Nicole?
Clearly, unless we restrict our signal to some accepted range such as 0 n N 1, we will not
have a one-to-one correspondence between x[n] and X[k]. Without such a convention, the DFT
and IDFT are meaningless. It is like the case of an elderly gentleman who decides to visit his niece
Nicole, who lives in New York City. Because of advanced age, he has forgotten her address, her
phone number, and even her last name. Upon arriving in New York, he starts asking every stranger
he meets whether they know his niece Nicole. Every stranger gives the same answer, I know many
people named Nicole, but I do not know whether any is your niece. Poor uncle! If he had at least
known the address of his niece, he would have had some hope of nding her. It is the same situation
for the DFT. Unless we restrict x[n] to some agreed range, the poor DFT will never nd its IDFT
relative.
A Perspective of Periodicity
There is another perspective that helps clarify this nonuniqueness between X[k] and various x[n].
Mathematically, we can construct an N -periodic signal x
[n] from an N -point signal x[n] as
x
[n] =
x[n mN ].
(9.11)
m=
Figure 9.7 shows the three signals of Fig. 9.6 with their respective N -periodic replications. The
resulting three N -periodic signals, which we know to have the same X[k], are identical. This is no
coincidence. Any N -point signals with identical N -periodic replications will have identical X[k].
Thought of another way, signals with the same periodic replication are indistinguishable to the
DFT (indistinguishable X[k]). It is as if the DFT views all N -point signals as being inherently N periodic. On the surface, periodicity may seem absurd for a signal that is assumed to be zero outside
of N points. Before dismissing the idea of periodicity as delusional, however, we might notice that,
taken over all n, the DFT synthesis Eq. (9.5) produces an N -periodic signal x[n]. Furthermore,
the discrete nature of X[k] also suggests a periodic view of x[n] (see Table 1.4 on page 68). The
periodicity perspective oers tremendous insight into the DFT and its properties. Later, we will
discuss this periodicity perspective in greater detail.
The main point to the preceding discussion is that by restricting ranges from 0 to N 1, there is
a one-to-one correspondence (uniqueness) between x[n] and X[k]. Without such a restriction, there
are innite possible N -point x[n] for a given N -point X[k], and vice versa. This is the reason why
we shall restrict x[n] to 0 n N 1 and X[k] to 0 k N 1. But why should we worry about
uniqueness at all?
Without uniqueness, DFT analysis is largely meaningless. For instance, if DFT analysis yields
an output DFT as Y [k], then we cannot know y[n] without uniqueness. Unless y[n] is unique for a
If x[n] is an N -point signal with range 0 n N 1, we can also construct an N -periodic replication using the
modulo-N operator as x
[n] = x[nN ]. The modulo-N operator is discussed in greater detail in Sec. 9.2.1.
Also notice that the DFT analysis Eq. (9.2) produces an N -periodic signal X[k].
xa [n]
4
3
2
1
7
4
(a)
571
xc [n]
4
3
xb [n]
4
3
1
7
4
(b)
2
1
7
4
(c)
As in Drill 9.1, the 3-point signal x[n] specied as x[0] = 2 and x[1] = x[2] = 1 has DFT given by X[0] = 4
and X[1] = X[2] = 1. Show that this DFT is identical to the samples of the DTFT of the 3-point signal
y[n] specied as y[0] = 2 and y[1] = y[1] = 1. Show that the DTFTs of x[n] and y[n] are not identical.
572
9.2.1
Modulo-N Operation
In DFT studies, the modulo-N operation proves very useful. We can think of the modulo-N value
of number n as the remainder of the division of n by N , assuming nonnegative integers n and N .
Thus, for example, the modulo-4 value of 7 is 3. The modulo-N value of n may also be obtained
by subtracting (or adding) some integer multiple of N to n such that the resulting number lies in
the range 0 n N 1. For instance, the modulo-4 values of 4 and 10 are 4 (1 4) = 0 and
10 (2 4) = 2, respectively.
Mathematically, we denote the modulo-N value of n as nN . Using 0 n 10, the following
table shows n modulo-N for N = 3, 4, and 7:
n
n3
n4
n7
0
0
0
0
1
1
1
1
2
2
2
2
3
0
3
3
4
1
0
4
5
2
1
5
6
0
2
6
7
1
3
0
8
2
0
1
9
0
1
2
10
1
2
3
where
rN n (r + 1)N 1.
(9.12)
Observe that the modulo-N value of any integer n always remains within the range from 0 to N 1.
Furthermore, notice that nN is an N -periodic function of n. As we shall see shortly, this connection
between periodicity and nN is very useful to the DFT.
Modulo-N Shift
One useful application of the modulo-N operation is to help shift an arbitrary N -point sequence
into the range 0 to N 1. The modulo-N shift relocates the samples of an N -point signal, no matter
its range, to the DFT-favored range of 0 to N 1. To nd out which sample goes where, we just
perform a modulo-N operation on each samples time index. Let us consider an example.
Find the signal x[n] that is the modulo-N shift of the (N = 6)-point sequence w[n], shown in
Fig. 9.8. That is, modulo-N shift the samples of w[n] so that x[n] occupies 0 n N 1.
w[n]
6
5
4
3
2
1
14
n
n6
9
3
10
4
11
5
573
12
0
13
1
14
2
Figure 9.9a shows x[n], the resulting modulo-6 shift of w[n]. Notice that the range of x[n] is
0 n N 1, as desired.
There is another particularly simple way to compute x[n]. Figure 9.9b shows w[n],
the 6-periodic
replication of w[n]. By simply retaining w[n]
w[n]
x[n]
6
5
6
4
2
1
0
1
n
5
(a)
14
(b)
Figure 9.9: (a) Modulo-N shift of w[n] and (b) N -periodic replication of w[n].
Example 9.6
Recall from Drill 9.5 that the three DTFT samples of x[n], dened as x[0] = 2 and x[1] = x[2] = 1, are
identical to the three DTFT samples of y[n], dened as y[0] = 2 and y[1] = y[1] = 1. Show that a
modulo-3 shift of y[n] yields x[n]. Find another 3-point signal z[n] that is modulo-3 shift equivalent to
x[n].
9.2.2
As we have seen, there is advantage and utility to viewing N -point signals as being N -periodic. Still,
it can be a bit cumbersome to work with and display such signals. Additionally, a periodic extension
of an N -point sequence seems to be adding many new samples, even if those samples are just copies
of the originals. It seems somehow absurd to change an N -point signal into one of innite duration.
574
A circular representation avoids all these diculties while retaining the advantages of a periodic
view. It adds no samples and is no more dicult to display than any N -point sequence. With a
circular representation, time reversal and shifting are naturally modulo-N operations that retain a
signals 0 n N 1 range, which is not only desirable but necessary for DFT analysis. Still,
despite their apparent dierences, the circular representation of an N -point signal x[n] is really
identical to the N -periodic replication of the same N -point signal.
In the circular representation of a length-N sequence, data is displayed on a circular scale rather
than a linear scale. We locate the N samples of a sequence x[n] uniformly along the circumference
of a circular dial in the clockwise direction, usually starting with x[0] at the 0 hour. Figure 9.10a
shows a length-6 sequence x[n], and Fig. 9.10b shows the circular representation of x[n]. For this
length-6 sequence, the points n = 0, 1, 2, 3, 4, and 5 are located at the 0, 2, 4, 6, 8, and 10 oclock
positions, respectively. While Fig. 9.10b explicitly labels n for clarity, such labeling is not necessary
as the time index can be inferred by position.
x[0]
n=0
x[1]
x[5]
x[n]
n=1
n=5
n
5
(a)
n=4
n=2
x[4]
x[2]
n=3
x[3]
(b)
Figure 9.10: Length-6 signal x[n]: (a) linear representation and (b) circular representation.
Show that the circular representations of the 3-point signals x[n] and y[n] in Drill 9.6 are identical.
over all n, notice that x[nN ] yields an N -periodic signal, which further strengthens a periodic perspective
of N -point sequences.
575
To illustrate, consider the 6-point signal x[n] depicted in Fig. 9.10a. Figure 9.11a shows the reection
x[n]. Over 0 n 5 (heavy lines), Fig. 9.11b shows x[nN ] obtained by transporting the
samples of x[n] to their modulo-6 locations, as per Eq. (9.13). Note that x[N n] is x[n] right
shifted by N . Thus, except for the sample at n = 0, which remains unchanged, the rest of x[n] are
right shifted by N = 6. The sample at 1 goes to n = 5 (the modulo-6 value of 1), the sample at
n = 2 goes to n = 4, and so on.
x[n]
x[0]
n=0
(a)
x[1]
x[5]
n=1
n=5
5
n
x[nN ]
(b)
n=4
n=2
x[2]
x[4]
n=3
x[3]
(c)
Figure 9.11: Modulo-N reection: (a) x[n], (b) x[nN ], and (c) circular representation of
x[nN ].
In the second method, we exploit the connection between a modulo-N shift and periodic replication to obtain x[nN ]. Using Eq. (9.11) and the footnote on page 569, we have
x[nN ] =
x[n + kN ].
(9.14)
k=
Equation (9.14) just denes a periodic replication of x[n]. To illustrate, the periodic replication of
x[n] in Fig. 9.11a is shown in Fig. 9.11b, which is identical to the rst method considered.
In the third method, we use a circular representation of x[n], as depicted in Fig. 9.11c. This
can be done by placing the samples of x[n] in a counterclockwise direction along the dial to represent
x[n]. We now read this diagram in a clockwise direction to obtain x[nN ]. We read the values at
n = 0, 1, 2, 3, 4, and 5 as x[0], x[5], x[4], x[3], x[2], and x[1], respectively. This matches Fig. 9.11b,
the result of the rst two methods. Notice that just as with a linear representation, the circular
representation of time reversal is just a reection about the vertical axis.
Because we can obtain x[nN ] from x[n] through a modulo-N shift, the N uniform samples
of the DTFT of x[n] are identical to the DFT of x[nN ]. It is in this sense that we can perform
time reection and maintain the range 0 n N 1 required of the DFT. Next, we consider
another case of a modulo-N shift so as to accommodate x[n m].
576
As with the case of reection, we instead seek a form that will retain the range 0 n N 1.
A modulo-N shift of x[n m], also called a circular shift, accomplishes exactly this task. Further,
because x[n mN ] is obtained from x[n m] through a modulo-N shift, the set of N uniform
samples of the DTFT of x[n m] is identical to the DFT of x[n mN ].
If 0 m N 1, a modulo-N shift operation does not aect the samples x[n m] over the
range m n N 1. That is, x[n mN ] = x[n m] for m n N 1. The remaining samples
over the range N n < N + m are shifted to the range 0 n < m by the modulo-N operation.
Over 0 n N 1, Eq. (9.12) yields
x[n m]
0mnN 1
.
(9.15)
x[n mN ] =
x[N + n m] 0 n < m N 1
We can also compute the modulo-N shift of x[n m], for any value m, by computing the N -periodic
replication of x[n m] and then retaining the samples over 0 n N 1. That is,
x[n mN ] =
x[n m kN ],
0 n N 1.
(9.16)
k=
As a third method, and the one that is probably most intuitive, we simply adopt a circular representation of x[n m] to obtain x[n mN ].
To illustrate these three methods, let us consider an m = 2 shift of the 6-point signal x[n] depicted
in Fig. 9.10a. Figure 9.12a shows the shift x[n m]. Over 0 n 5 (heavy lines), Fig. 9.12b shows
x[n mN ] obtained by transporting the samples of x[n m] to their modulo-6 locations, as per
Eq. (9.15). In this case, the samples 2 n 5 of x[n m] do not move, but samples n = 6 and
n = 7 of x[n m] are moved left by 6 to their modulo-N positions. Figure 9.12b also shows the
periodic replication of x[n m], which, over 0 n N 1, matches the modulo-N shift of x[n m].
x[n m]
x[4]
n=0
(a)
x[3]
x[5]
n=1
n=5
0
n
n
x[n mN ]
(b)
n=4
n=2
x[2]
x[0]
n=3
x[1]
(c)
Figure 9.12: Circular shift by m = 2: (a) x[n m], (b) x[n mN ], and (c) circular representation
of x[n mN ].
To understand the circular representation, let us rst consider how we might interpret x[n m]
on a linear scale. If m > 0, we shift x[n] right by sliding it m positions rightward along our scale.
If m < 0, we shift x[n] left by sliding it |m| positions leftward along our scale. The circular shift
x[n mN ] is accomplished in a similar fashion using the circular representation, except that we
rotate rather than slide our values. If m > 0 (right shift), we rotate our values clockwise by m
positions. If m < 0 (left shift), we rotate our values counterclockwise. In the present example,
m = 2 is positive, so we rotate the circular representation (Fig. 9.10b) 2 positions clockwise, as
shown in Fig. 9.12c. The results again match those of the two earlier methods. That is, at n = 0 (0
hour), we obtain x[4]; at n = 1, we obtain x[5]; at n = 2, we obtain x[0]; and so forth.
577
x[0]
x[5]
x[4]
n=0
n=0
n=0
x[1]
x[5]
x[4]
x[0]
x[4]
x[3]
x[5]
x[2]
x[3]
x[1]
x[2]
x[0]
x[3]
x[2]
x[1]
(a)
(b)
(c)
x[1]
x[2]
x[3]
n=0
n=0
x[2]
x[0]
x[5]
n=0
x[3]
x[1]
x[4]
x[2]
x[3]
x[0]
x[4]
x[1]
x[5]
x[4]
x[5]
x[0]
(f)
(e)
(d)
Figure 9.13: Circular shift x[n mN ]: (a) m = 0, (b) m = 1, (c) m = 2, (d) m = 3, (e) m = 4,
and (f) m = 5.
578
and
X[k] = X[k + N ]
for all k
x[n] = x[n + N ]
for all n.
(9.17)
Here, periodicity is guaranteed since both X[k] and x[n] are exclusively constructed of scaled sums
of functions ej0 nk that are N -periodic in both k and n.
Recall that the DTFT X() is periodic. Viewed as the N uniform samples of the DTFT, the
periodicity of X[k] is therefore understandable. It is more surprising that x[n] also seems periodic,
particularly since we derived the DFT by assuming x[n] to be zero outside 0 n N 1. Again,
the key to this mystery is that the DFT is only concerned with samples in the range 0 to N 1.
How we view x[n] (or X[k]) outside this range is irrelevant to the inner workings of the DFT and
its inverse. We can adopt whatever view best helps our understanding and intuition of the DFT.
Later, in Sec. 9.8, we shall rely on a periodic view of x[n] to derive the discrete-time Fourier series
(DTFS) equations, and the phantom periodicity of x[n] will seem even more natural.
One of the consequences of the phantom periodicity of x[n] in Eq. (9.17) is that x[0] = x[N ].
Strictly speaking, as observed earlier, this result is meaningless because x[N ] is not one of the N
values that describes our N -point signal x[n]. However, if we compute x[N ] using Eq. (9.5), we nd
it to be x[0]. It is in this sense that we shall accept the existence of x[N ] and other values outside
579
0 n N 1.
(9.18)
0 k N 1.
(9.19)
9.3
Properties are useful to better understand and utilize the DFT. Because the DFT can be viewed
as samples of the corresponding DTFT, DFT properties bear similarity to those of the DTFT. The
proofs of several DFT properties follow directly from the corresponding properties for the DTFT
and viewing the DFT as samples of the DTFT, that is, X[k] = X(k0 ). These proofs can also be
derived directly from the denition of the DFT. In some cases, DFT properties are best understood
from a periodicity perspective. We shall use both perspectives while discussing DFT properties.
9.3.1
Duality Property
Much like how the near-perfect symmetry of the FT produces the duality property of Eq. (1.80), the
near-perfect symmetry between the DFT analysis and synthesis equations also produces a duality
property. Thus, for any result or relationship between x[n] and X[k], there exists a dual result or
relationship that is obtained by interchanging the roles of x[n] and X[k]. More formally, the DFT
duality property states that
if x[n] X[k], then X[n] N x[kN ].
(9.20)
There is a striking relationship between the DFT duality property of Eq. (9.20) and the FT duality
property of Eq. (1.80) on page 51. A proof of this property is outlined in Prob. 9.8-1 and is also
found in the literature, such as [4].
9.3.2
Linearity Property
(9.21)
The proof is trivial and follows directly from the denition of DFT. Here, we are assuming that the
lengths of both x[n] and y[n] are identical. If the lengths of x[n] and y[n] are dierent, then we
only need to pad the shorter signal with zeros to use the linearity property. Of course, the linearity
property easily extends to any nite number of terms.
580
9.3.3
Complex-Conjugation Property
Let us start with the frequency-domain complex-conjugation property. This property states that
x [nN ] X [k].
(9.22)
Using our earlier argument of letting x[N ] = x[0] leads to x [nN ] = x [N n]. Hence, Eq. (9.22)
simplies to
(9.23)
x [N n] X [k].
To prove this property, note that x [nN ] is the modulo-N shift of x [n]. Thus, the DFT of
x [nN ] is the same as the N uniform samples of the DTFT for x [n]. Now, from Eqs. (6.14)
and (6.15), the DTFT of x [n] is X (). The N uniform samples of X () are X [k]. Hence, it
follows that
x [nN ] X [k].
Using the similar reasoning, we can nd that the time-domain complex-conjugation property is
x [n] X [kN ] = X [N k].
(9.24)
X[k] = X [N k].
(9.25)
This is the (midpoint) conjugate-symmetry property of the DFT for real x[n], which has been veried
in Exs. 9.1 and 9.2.
Prove that if x[n] is imaginary, then X[k] is midpoint conjugate antisymmetric, X[k] = X [N k].
9.3.4
Time-Reversal Property
The time-reversal property, which also serves as the frequency-reversal property, states that
if x[n] X[k], then x[nN ] X[kN ] = X[N k].
(9.26)
To prove this property, recall that x[nN ] is obtained by modulo-N shifting x[n]. Hence, the set
of N uniform samples of the DTFT of x[n] is the same as the DFT of x[nN ]. From Eq. (6.15),
we nd that x[n] X(), and the uniform sample set of X() is X[k], which is equal to
X[N k] because of the N -periodicity of X[k]. Since X[N k] = X[kN ], the result follows.
We can also use the simplied expression x[N n] for x[nN ] to express an alternate form of
Eq. (9.26) as
x[N n] X[N k].
9.3.5
(9.27)
We again turn to the DTFT to prove this property. Because x[n mN ] is obtained by a modulo-N
shift of x[n m], the DFT of x[n mN ] is the same as the N uniform samples of the DTFT of
581
x[n m]. From Eq. (6.16), we obtain x[n m] X()ejm . Hence, the N samples of the
DTFT are X[k]ej0 km , and the result in Eq. (9.27) follows.
The dual of the circular time-shifting property is the circular frequency-shifting property. This
property states that
if x[n] X[k], then x[n]ej0 mn X[k mN ] for integer m.
(9.28)
To prove this property, let us use Eq. (9.2) to nd the DFT of x[n]ej0 mn as
N
1
x[n]ej0 mn ej0 kn =
n=0
N
1
n=0
Let a 3-point signal x[n], dened as x[0] = 2 and x[1] = x[2] = 1, have DFT X[k]. Through explicit
computation, show that X[k]ej0 k results in a one-unit circular shift of x[n].
Let us use MATLAB to perform the necessary computations.
01
02
03
As in Ex. 9.4, line 01 establishes basic parameters. Line 02 denes the 3-point DFT matrix D N
and computes the DFT of x[n]. Recalling that N1 DN is the inverse DFT matrix, line 03 computes
the IDFT of X[k]ej0 k . The resulting sequence [1, 2, 1] is clearly a one-unit circular shift of the
original sequence [2, 1, 1].
Example 9.7
9.3.6
For two signals x[n] and y[n], each of length N , circular convolution is dened by
x[n]y[n]
N
1
m=0
x[m]y[n mN ] =
N
1
y[m]x[n mN ].
(9.29)
m=0
Circular convolution is like ordinary convolution except that it retains the 0 to N 1 range by
using the modulo-N operation. Circular convolution is very much a natural extension of regular
convolution for N -point signals restricted to the range 0 to N 1. Next, we introduce two circular
convolution properties. Later, we shall provide a graphical interpretation of circular convolution and
demonstrate some applications of circular convolution that are useful in DSP.
Let us begin with two N -point DFT pairs
x[n] X[k] and y[n] Y [k].
The time-domain circular convolution property states that
x[n]y[n]
X[k]Y [k].
(9.30)
Equivalently, Eq. (9.30) tells us that by multiplying the DFTs of two N -point signals, the timedomain result is the circular convolution of the original two signals.
582
The proof of this property follows from the denition of the DFT,
%
$ 1
N
1 N
DFT {x[n]y[n]}
=
x[m]y[n mN ] ej0 kn
n=0
N
1
m=0
x[m]
$N 1
m=0
N
1
%
y[n mN ]e
j0 kn
n=0
x[m] Y [k]ej0 km
m=0
= Y [k]
N
1
x[m]ej0 km
m=0
= X[k]Y [k].
The dual of the time-domain circular convolution property is the frequency-domain circular
convolution property. This property states that
x[n]y[n]
1
X[k]Y
[k].
N
(9.31)
This property is sometimes called the multiplication property, which references the time-domain side
of Eq. (9.31). The proof of this property is similar to that for the time-domain circular convolution
property.
9.3.7
Just as we extended linear convolution to circular convolution, we can use the modulo-N operation
to extend linear correlation to circular (or cyclic) correlation. The circular time-domain correlation
between N -point signals x[n] and y[n] is dened as
x,y [l] =
N
1
(9.32)
m=0
The circular correlation function x,y [l] is easily expressed in terms of circular convolution as
x,y [l] = x[l]y
[lN ].
(9.33)
Applying the complex-conjugation, time-reversal, and circular convolution properties yields the circular correlation property
x,y [l] = x[l]y
[lN ] X[k]Y [k].
(9.34)
We stress that correlation order is important. That is, x,y [l] does not generally equal y,x [l].
A Frequency-Domain Representation of Signal Energy
Setting x[n] = y[n] and l = 0 in Eq. (9.32) yields signal energy
x,x [0] =
N
1
n=0
x[n]x [n] =
N
1
|x[n]|2 = Ex .
n=0
Since x,x [l] has DFT X[k]X [k], it can be synthesized using Eq. (9.5) as
x,x [l] =
N 1
N 1
1
1
X[k]X [k]ej0kl =
|X[k]|2 ej0kl .
N
N
k=0
k=0
(9.35)
583
N
1
|x[n]|2 =
n=0
N 1
1
|X[k]|2 .
N
(9.36)
k=0
Equation (9.36) is Parsevals theorem for the discrete Fourier transform, and it provides a frequencydomain representation of signal energy.
|x[n]|2 =
n=0
N 1
1
|X[k]|2 .
N
k=0
Using the notation of Sec. 9.1.2, we rst express the frequency-domain side in matrix form as
N 1
1
1
1
1
(D N x)T (D N x) = xT DT
D x .
|X[k]|2 = X T X =
N
N
N
N
N N
k=0
1
D 1
N = N D N . Thus,
N 1
N
1
1
T
|X[k]|2 = xT D N D1
x
=
x
x
=
|x[n]|2 .
N
N
n=0
k=0
Example 9.8
Table 9.1 summarizes the discrete Fourier transform properties just discussed and provides a
side-by-side comparison with the corresponding properties of the discrete-time Fourier transform.
In most cases, the properties of the DFT and the DTFT are very similar.
9.4
Let us dene y[n] as the circular convolution between x[n] and h[n]; that is,
y[n] = x[n]h[n]
N
1
x[m]h[n mN ].
(9.37)
m=0
This dry equation does not provide much intuition on computing y[n]. To help our understanding,
let us consider a graphical interpretation of circular convolution. The circular convolution y[n] =
x[n]h[n]
can be visualized by using circular representations of x[n] and h[n] in two concentric
circles. The two sequences to be convolved must have the same length. If not, we should append
a sucient number of zeros to the smaller sequence to ensure equal lengths of both sequences. For
simplicitys sake, we shall take both x[n] and h[n] as 4-point signals throughout this discussion.
To begin, notice in Eq. (9.37) that regardless of the value n of interest, the signal x[m] remains
xed in the convolution sum. Thus, we take the inner circle as the xed circular representation
of x[m], drawn in the regular clockwise manner. Starting at n = 0, the convolution sum requires
h[0 mN ]. Thus, we take the outer circle as the circular representation of h[mN ], which we
584
x[n] =
Synthesis:
N 1
j0 kn
,
k=0 X[k]e
0 =
Analysis:
N 1
j0 kn
,
n=0 x[n]e
0 =
1
N
X[k] =
x[n] =
2
N
Synthesis:
1
jn
d
2 2 X()e
X() =
Analysis:
jn
n= x[n]e
Duality:
if x[n] X[k], then X[n] N x[kN ]
Duality:
Linearity:
ax[n] + by[n] aX[k] + bY [k]
Linearity:
ax[n] + by[n] aX() + bY ()
Complex Conjugation:
x [n] X [kN ]
x [nN ] X [k]
Complex Conjugation:
x [n] X ()
x [n] X ()
Reversal:
x[nN ] X[kN ]
Reversal:
x[n] X()
Shifting:
x[n mN ] X[k]ej0 km ,
x[n]ej0 mn X[k mN ],
Shifting:
x[n m] X()ejm
x[n]ej0 n X( 0 )
0 = 2
N
0 = 2
N
Convolution:
x[n]y[n]
X[k]Y [k]
x[n]y[n] N1 X[k]Y
[k]
Convolution:
x[n] y[n] X()Y ()
1
x[n]y[n] 2
X()Y
()
Correlation:
x,y [l] = x[l]y
[lN ] X[k]Y [k]
Correlation:
x,y [l] = x[l] y [l] X()Y ()
Ex =
N 1
n=0
Parsevals:
N 1
|x[n]|2 = N1 k=0 |X[k]|2
Ex =
Parsevals:
1
2
|x[n]|
= 2
|X()|2 d
n=
2
h[1]
h[0]
585
h[0]
h[1]
x[0]
x[0]
x[1]
x[3]
h[3]
h[2]
x[3]
x[2]
x[2]
h[2]
h[3]
(a)
(b)
h[3]
h[2]
x[0]
x[0]
x[1]
x[3]
h[2]
h[3]
x[3]
x[2]
x[2]
h[1]
h[0]
(d)
(c)
x[1]
h[0]
x[1]
h[1]
is N -periodic.
Over 0 n 5, dene the 6-point signals x[n] and h[n] as [1, 1, 2, 2, 1, 1] and [1, 2, 3, 4, 5, 6],
respectively. Letting y[n] = x[n]h[n],
9.4.1
Circular convolution discussed here is dierent from the linear convolution of Eq. (5.22) studied in
Ch. 5. In linear convolution, we place x[m] along a straight line and place h[m] in reverse direction
along another straight line. Figures 5.5a and 5.5c (also Figs. 5.7a and 5.7c) show this graphically
when x[0] and h[0] are aligned. Shifting by n, the h strip (now h[nm]) moves along the xed x strip
(x[m]), where we multiply the overlapping numbers and add to obtain the convolution at n. Despite
some similarities, a little reection shows that linear convolution is not the same as the circular
586
variety shown in Fig. 9.14. For instance, in the linear convolution of two causal sequences x[n] and
h[n], to obtain the output at n = 0, only x[0] and h[0] align, resulting in the single-term output
x[0]h[0]. To obtain the convolution at n = 1, the h strip is shifted by one unit to the right, which
results in two terms overlapping, yielding the two-term output x[0]h[1] + x[1]h[0]. In contrast, in
circular convolution, all N numbers are aligned for every value of n. Hence, the circular convolution
for any value of n consists of the sum of N terms.
For linear system analysis, as seen in Ch. 5, we need linear rather than circular convolution.
Then what is the use of circular convolution? We shall now show that with suitable zero padding,
we can make the results of circular convolution identical to those of linear convolution.
To determine the number of zeros to be padded, recall that the length of linear convolution
x[n] h[n] is N = Nx + Nh 1, where Nx and Nh are the lengths of x[n] and h[n], respectively.
We also know that for circular convolution, both signals must have the same length. Thus, if linear
and circular convolutions are to yield identical results, then a necessary condition is that the length
of each signal x[n] and h[n] must be extended to N = Nx + Nh 1. In other words, we must pad
Nh 1 zeros to x[n] and pad Nx 1 zeros to h[n]. This conclusion applies to x[n] and h[n] of any
arbitrary lengths. The length Nx need not be equal to Nh . We shall give two proofs that the linear
convolution of two nite-length sequences x[n] and h[n] (both starting at n = 0) is equal to the
circular convolution of x[n] and h[n] after they are padded by Nh 1 and Nx 1 zeros, respectively.
Frequency-Domain Proof
Let us denote the length-N zero-padded versions of x[n] and h[n] by xpad [n] and hpad [n], respectively.
Since zero padding does not change a signal, xpad [n] and hpad [n] are equivalent to x[n] and h[n].
The linear convolution of x[n] and h[n] is given by
n
ylin [n] =
x[m]h[n m],
0 n N 1.
m=0
The length of ylin [n] is N = Nx + Nh 1. From the property of linear convolution, we know that
the DTFT of ylin [n] is Ylin () = X()H(). Also, the N uniform samples of Ylin () represent
the DFT of ylin [n]. Further, the N uniform samples of X() and H() correspond to the DFTs
of the length-N zero-padded signals xpad [n] and hpad [n], respectively. Hence, the DFT of ylin [n] is
Ylin [k] = Xpad [k]Hpad [k] with length N = Nx + Nh 1.
pad [n], where xpad [n] and hpad [n]
Let us now consider the circular convolution ycir [n] = xpad [n]h
are zero-padded versions of x[n] and h[n]. The lengths of xpad [n], hpad [n], and ycir [n] are each
Nx + Nh 1. Using the time-domain circular convolution property of Eq. (9.30), the DFT of ycir [n]
is thus Ycir [k] = Xpad [k]Hpad [k]. In this case, the linear and circular convolutions clearly yield the
same result.
Alternate Time-Domain Proof
Let us next consider an alternative, time-domain proof of this result. The circular convolution of
xpad [n] and hpad [n] is given by
ycir [n] =
N
1
m=0
m=0
N
1
m=n+1
n
m=0
xpad [m]hpad [n m] +
N
1
m=n+1
(9.38)
587
Next, we show that the second sum on the right-hand side is zero. This follows from the fact that
hpad [r] can be nonzero only when 0 r and also r Nh 1 or, simply, 0 r Nh 1. Hence,
hpad [N + n m] can be nonzero only when m N + n and also Nx + n m or, simply,
Nx + n m N + n.
Moreover, by denition, xpad [m] can be nonzero only when
0 m Nx 1.
Clearly, the product xpad [m]hpad [N + n m] can be nonzero only for those values of m that simultaneously satisfy these twin restrictions. Figure 9.15 shows the regions where xpad [m] (light shading)
and hpad [N +nm] (dark shading) can be nonzero. Since the regions are nonoverlapping, the two restrictions cannot be fullled simultaneously for any value m, and the product xpad [m]hpad [N +nm]
must always be zero. Hence, the second sum on the righthand side of Eq. (9.38) is zero, and
ycir [n] =
m=0
This is identical to Eq. (5.23), the linear convolution ylin [n] of the causal signals x[n] and h[n].
Nx 1
Nx + n
N +n
Figure 9.15: Range of m where xpad [m] (light shading) and hpad [N + n m] (dark shading) can be
nonzero.
Over 0 n 4, dene the 5-point signal x[n] as [1, 2, 3, 4, 5]. Over 0 n 3, dene the 4-point
signal h[n] as [1, 1, 2, 2]. Compute the linear convolution ylin [n] = x[n] h[n], and show that the
same result is obtained by the (Nx + Nh 1)-point circular convolution ycir [n] = xpad [n] hpad [n].
In this example, we use MATLAB to perform all computations. To begin, we perform the linear convolution using the conv command.
01
To perform the circular convolution, we rst appropriately zero pad both x[n] and h[n]. Since the
lengths of x[n] and h[n] are dierent, dierent numbers of zeros are appended to make each have
length Nx + Nh 1.
02
03
To compute the circular convolution, we compute the DFTs Xpad [k] and Hpad [k], multiply them
together, and then take the inverse DFT.
04
05
As expected, the circular convolution of xpad [n] and hpad [n] is the same as the linear convolution of
x[n] and h[n].
Example 9.9
588
9.4.2
As we saw in the preceding section, to use circular convolution to compute the linear convolution of
an Nx -point sequence x[n] and an Nh -point sequence h[n], we must pad Nh 1 zeros to x[n] and
Nx 1 zeros to h[n]. What happens if we pad fewer zeros so that the two sequences both have
equal lengths N but N is less than Nx + Nh 1? The resulting convolution and its DFT will have
less than Nx + Nh 1 samples. As seen earlier in Sec. 9.1.2, the use of fewer samples results in
aliasing that generally causes erroneous results. But even under such aliasing, some samples of the
two convolutions can be identical, and this fact is exploited in certain practical applications.
Consider the case where we do not zero pad x[n] and pad Nx Nh zeros to h[n] so that the length
of both sequences is Nx (assuming Nx Nh ). Let us see if there is any connection between the linear
[n], their circular convolution. The circular convolution in
convolution ylin [n] = x[n] h[n] and ycir
this case has only Nx samples, whereas the linear convolution has Nx + Nh 1 samples. Obviously,
the results of the two convolutions are not identical. Yet, we shall see that Nx Nh + 1 samples
[n] for this aliased Nx -point circular
of the two convolutions are identical. We use the notation ycir
convolution to distinguish it from ycir [n], the (Nx + Nh 1)-point convolution without aliasing.
The linear convolution of x[n] and h[n] is given by
n
ylin [n] =
x[m]h[n m].
(9.39)
m=0
Let the sequence h[n] padded with Nx Nh zeros be denoted by hpad [n]. The Nx -point circular
convolution of x[n] and hpad [n] is given by
[n] =
ycir
N
x 1
m=0
n
m=0
x[m]hpad [n m] +
N
x 1
(9.40)
m=n+1
The rst sum on the right-hand side is identical to the linear convolution ylin [n] in Eq. (9.39). Let
us examine the second sum on the right-hand side, which contains the product x[m]hpad [Nx + n m]
and where m varies from n + 1 to Nx 1. Over this entire range of m, generally x[m] = 0. Let us
now consider the term hpad [Nx + n m]. Because m varies from n + 1 to Nx 1, we have
Nx 1 when m = n + 1
Nx + n m =
.
n + 1 when m = Nx 1
Thus, Nx + n m varies from a low of n + 1 to a high of Nx 1; that is,
n + 1 Nx + n m Nx 1.
When n < Nh 1, then n + 1 < Nh , and according to the preceding equation, Nx + n m includes
values less than Nh where hpad [Nx + n m] = 0. Thus, when 0 n < Nh 1, the right-hand sum
of Eq. (9.40) includes some nonzero terms. Hence, the linear and the circular convolutions are not
equal for 0 n < Nh 1 (the rst Nh 1 terms of the output). In the same way, we can show that
x[m]hpad [Nx + n m] = 0 for n + 1 Nh , implying that the linear and the circular convolutions
are identical for n Nh 1.
Although
589
Observe that there are Nx + Nh 1 terms in the linear convolution ylin [n]. In contrast, there
[n]. We have shown that the rst Nh 1 terms
are only Nx terms in the circular convolution ycir
of the linear and circular convolutions are generally dierent. The next Nx Nh + 1 terms of both
convolutions are identical. This exhausts all the terms of ycir
[n]. In addition to the rst Nx values,
ylin [n] has extra Nh 1 terms at the end. Thus, if we ignore the rst Nh 1 samples and the last
Nh 1 samples of the linear convolution, then the remaining middle Nx Nh + 1 samples of the
linear convolution are identical to the last Nx Nh + 1 samples of the Nx -point circular convolution
of x[n] and hpad [n]. Keep in mind that in this case no zeros are padded to x[n], and Nx Nh zeros
are padded on h[n] to form hpad [n].
The observations in this section prove useful in block convolution, to be discussed in the next
section.
Consider a 4-point sequence x[n] and a 3-point sequence h[n] respectively described as
3
and
To demonstrate the aliasing that can occur in circular convolution, compare the linear convolution
ylin [n] = x[n] h[n] with the 4-point circular convolution ycir
[n] = x[n]h
pad [n], where no zeros
are padded to x[n] and one zero (Nx Nh = 1) is padded to h[n].
Figure 9.16a shows the two sequences on sliding tapes ready for linear convolution. We shift the
h-tape forward by n, multiply the values of the overlapping samples, and then add to obtain ylin [n]
as
ylin [0] = x[0]h[0],
ylin [1] = x[0]h[1] + x[1]h[0],
ylin [2] = x[0]h[2] + x[1]h[1] + x[2]h[0],
ylin [3] = x[1]h[2] + x[2]h[1] + x[3]h[0],
and
h[0]
x[0]
x[0]
x[1]
x[2]
h[0]
n=0
x[3]
h[1]
h[2]
h[1]
(a)
x[1]
x[3]
x[2]
h[2]
(b)
Figure 9.16: (a) Linear convolution and (b) circular convolution with aliasing.
Figure 9.16b shows the two 4-point sequences aligned along concentric circles ready for circular
convolution. We shift the h-circle clockwise by n, multiply the values of the overlapping samples,
590
and then add to obtain ycir
[n] as
[0] = x[0]h[0] + x[2]h[2] + x[3]h[1],
ycir
ycir
[1] = x[0]h[1] + x[1]h[0] + x[3]h[2],
[2] = x[0]h[2] + x[1]h[1] + x[2]h[0],
ycir
and
ycir
[3] = x[1]h[2] + x[2]h[1] + x[3]h[0].
Observe that ycir
[0] and ycir
[1] are the inseparable sums of ylin [0] + ylin [4] and ylin [1] + ylin [5], respectively. This aliasing in the circular convolution causes the rst Nh 1 = 2 samples of the two
convolutions to be dierent. The next Nx Nh + 1 = 2 samples are identical, as expected.
Example 9.10
Using the DFT, show that the 3-point signal [15, 17, 16] is the circular convolution of the signals [3, 2, 3]
and [1, 2, 3]. Verify your answer using the graphical method explained in Fig. 9.14. Show that the linear
convolution of these two signals is the 5-point signal [3, 8, 16, 12, 9]. How can this linear convolution be
used to obtain the previous 3-point circular convolution?
9.5
The DFT is useful in the computation of direct and inverse Fourier transforms, ltering, convolution,
correlation, and others. It can perform these tasks not only for discrete-time systems but also for
continuous-time signals and systems. The ecient FFT algorithm, discussed in Sec. 9.7, makes the
DFT even more appealing. Let us focus our attention on using the DFT to perform ltering.
We generally think of ltering in terms of some hardware-oriented solution, such as using adders,
multipliers, and delay elements. However, ltering also has a software-oriented solution that uses
a computer algorithm to determine the ltered output y[n] for a given input x[n] and impulse
response h[n]. Such ltering, which involves the convolution of x[n] and h[n], can be conveniently
accomplished by using the DFT.
Filtering can be accomplished either in the time domain or in the frequency domain. In the
time-domain approach, we compute the lter output y[n] directly from a given input x[n] and the
known lter impulse response h[n]. This output is equal to the linear convolution of x[n] with h[n].
It is also equal to the circular convolution of suitably zero-padded signals xpad [n] and hpad [n]. We
shall later see that the number of computations can be drastically reduced by solving this problem
in the frequency domain using the FFT algorithm. Using the FFT, we rst nd the DFTs Xpad [k]
and Hpad [k] of the zero-padded signals xpad [n] and hpad [n]. The desired convolution (or correlation)
is given by the IDFT of Xpad [k]Hpad [k], found also by using the FFT algorithm.
The DFT-based procedure to nd the linear convolution of two signals x[n] and h[n], whose
lengths are Nx and Nh , respectively, is summarized in four steps as follows:
1. Pad Nh 1 zeros to x[n] to form xpad [n], and pad Nx 1 zeros to h[n] to form hpad [n].
2. Find Xpad [k] and Hpad [k], the DFTs of xpad [n] and hpad [n].
3. Multiply Xpad [k] by Hpad [k] to obtain Y [k].
4. The desired convolution y[n] is the IDFT of Y [k].
This procedure is known as fast convolution when the DFT and IDFT are computed using the
ecient FFT algorithm.
591
Using DFT-based convolution, determine the output y[n] of an LTID lter with impulse response
h[n] = 2[n] + 2[n 1] to an input x[n] = 3[n] + 2[n 1] + 3[n 2].
The output y[n] is the convolution x[n] h[n], which we compute using the outlined four-step
procedure.
1. In this case, Nx = 3 and Nh = 2. Therefore, we pad 1 zero to x[n] and 2 zeros to h[n], as
depicted in Figs. 9.17a and 9.17b, respectively.
xpad [n]
y[n]
3
2
10
(a)
hpad [n]
2
0
(b)
(c)
Figure 9.17: DFT-based convolution: (a) xpad [n], (b) hpad [n], and (c) y[n] = IDFT{Xpad [k]Hpad [k]}.
2. Now, N = 4 and 0 = /2. The DFTs Xpad [k] and Hpad [k] of the zero-padded signals xpad [n]
and hpad [n] are given by
Xpad [k] =
xpad [n]ej0 kn =
n=0
and
Hpad [k] =
n=0
3
hpad [n]ej0 kn =
n=0
n=0
h[n]ej 2 kn = 2 + 2ej 2 k .
and
3
3
{Y [k]}3k=0 = {32, 4 2ej 4 , 0, 4 2ej 4 }.
4. The desired convolution is the IDFT of Y [k], given by
1
1
3
Y [0] + Y [1]ej 2 n + Y [2]ejn + Y [3]ej 2 n ,
Y [k]ej0 kn =
4
4
3
y[n] =
0 n 3.
k=0
= ej 2 , we obtain
3
n
= 8 + 2 2 cos
,
2
4
3
2
0 n 3.
592
As an informative exercise, we encourage the reader to conrm these answers graphically by com pad [n] using two concentric
puting y[n] as x[n] h[n] using the sliding-tape method and as xpad [n]h
circles, as in Fig. 9.14.
Example 9.11
Convolution Doublespeak?
From Ex. 9.11, the DFT-based convolution procedure appears much more laborious than the direct
sliding-tape method or even the circular convolution method. To think that such a procedure leads
to anything fast seems to be classical doublespeak. How can the task of convolution be simplied
by adding the complexities of both the DFT and its inverse? In all honesty, there is little advantage
to using DFT-based convolution for short signal lengths such as in Ex. 9.11. For relatively large N ,
however, DFT-based convolution implemented using the ecient FFT algorithm (fast convolution)
can dramatically reduce the number of computations (multiplications and additions) needed for
convolution-based ltering. With fewer computations, DSP execution time is shortened, and fast
convolution lives up to its name.
Using a suitable truncation, use DFT-based convolution to approximate the linear convolution y[n]
between the innite-duration signals x[n] = (0.8)n u[n] and h[n] = (0.5)n u[n].
Since both signals have innite duration, we shall truncate them to a suitable nite length to use
DFT-based convolution. Both signals decay exponentially, so lets truncate them once they are less
than 1% of their peak amplitudes. For x[n], this requires 0.8n 0.01 or n log(0.01)/ log(0.8) =
20.64. Thus, we truncate x[n] to have length Nx = 21. Similarly, Nh = log(0.01)/ log(0.5) = 7.
Now, we only need code similar to that in Ex. 9.11 to determine y[n], an approximation of y[n] =
x[n] h[n].
01
02
03
04
05
Nx = ceil(log(0.01)/log(0.8)); x = (0.8).^(0:Nx-1);
Nh = ceil(log(0.01)/log(0.5)); h = (0.5).^(0:Nh-1);
xpad = [x;zeros(Nh-1,1)]; hpad = [h;zeros(Nx-1,1)];
N = Nx+Nh-1; n = (0:N-1); k=(0:N-1); Omega0 = 2*pi/N; DN = exp(-1j*Omega0*k*n);
Xpad = DN*xpad; Hpad = DN*hpad; yhat = conj(DN)/N*(Xpad.*Hpad); stem(n,yhat);
The resulting approximation y[n], shown in Fig. 9.18, is visually indistinguishable from the true
closed-form result (see pair 8 of Table 5.2),
y[n] =
10
(0.8)n+1 (0.5)n+1 u[n].
3
593
y[n]
1
10
15
20
25
An LTID system has 3-point impulse response h[n] and 4-point input x[n] given by
{h[n]}2n=0 = {1, 2, 1}
and
Using the DFT-based procedure for convolution, show that the output y[n] is the 6-point signal
[1, 3, 4, 4, 3, 1]. Verify your answer by computing the linear convolution x[n] h[n].
Even with all DSP has to oer, there are no free lunches.
9.5.1
Block Convolution
594
Furthermore, a large input length Nx requires a proportionally large number of zeros padded to
h[n], which unnecessarily increases the number of computations. These computations are not only
very time-consuming but also require much larger amounts of memory, thereby increasing system
cost and complexity.
To overcome these problems, we invoke the linearity property of convolution, which allows us
to partition the input x[n] into smaller consecutive data blocks xr [n], each of xed length Nx .
Partitioning data as it is received, we convolve each of the smaller blocks xr [n] with h[n] and then
add the results of all the convolutions, a process known as block convolution. Block convolution
drastically reduces not only the delay time of the output but also the system memory requirements.
Block convolution need not be performed using circular (DFT-based) convolution, but doing so can
provide great computational benets, particularly when the FFT algorithm is utilized. Thus, in
our discussion of block convolution, we assume that all convolutions are performed in the frequency
domain using the DFTs of the appropriately zero-padded signals, as explained earlier.
We shall discuss two such methods of block processing: the overlap-and-add method and overlapand-save method. Either of the methods requires the same number of computations, so the choice
of method is largely a matter of personal preference.
Overlap-and-Add Method
Consider a ltering operation where the output y[n] is the convolution of the input x[n] and an FIR
lter impulse response h[n] of length Nh . In practice, Nh is usually much smaller than the length
of the input. Figure 9.19 illustrates a long input signal x[n] sectioned into nonoverlapping blocks
xr [n], each of a manageable length Nx . The number inside each block indicates its length. Let us
assume that Nx Nh . We now lter each block of the input data xr [n] using the impulse response
h[n]. To be able to use circular convolution to perform these linear convolutions, we need to pad
Nh 1 zeros at the end of each data block. Figure 9.19 shows each input data block augmented by
Nh 1 zeros (shaded). Observe that the zero-padded input blocks, each now of length Nx + Nh 1,
overlap.
r=0
r=1
r=2
nonoverlapping
input blocks xr [n]
Nx
Nx
Nx
zero-padded
input blocks
Nx
Nh 1
Nx
output blocks
Nx
Nh 1
Nx
Nh 1
Nx Nh +1
Nh 1
Nh 1
Nh 1
Nx Nh +1
Nh 1
Nh 1
also pad h[n] with Nx 1 zeros so that the length of the padded h[n] is Nx + Nh 1.
595
more than two overlapping output blocks, the output lag is never much greater than the input
segment length Nx . For obvious reasons, this method is known as the overlap-and-add method.
To explain the overlap-and-add method mathematically, consider a long signal x[n] that is sectioned into R blocks, each of length Nx . The rth block xr [n] is given by
xr [n] =
R1
xr [n].
r=0
If the system impulse response is h[n], the system output y[n] is given by
y[n] = x[n] h[n] =
0R1
1
xr [n]
h[n].
r=0
R1
r=0
xr [n] h[n] .
yr [n]
This is the result we seek. It shows that the convolution y[n] = x[n] h[n] can be performed by
adding a series of individual block convolutions yr [n] = xr [n] h[n], each of which can be computed
using ecient FFT-based fast convolution.
Using the overlap-and-add method with an Nx = 3 input block size, nd the response y[n] of an
LTID system with the Nh = 2 nite impulse response h[n] and input x[n] shown in Fig. 9.20.
x[n]
h[n]
3
2
1
0
3
(a)
(b)
Figure 9.20: Block convolution: (a) input x[n] and (b) impulse response h[n].
Although the output y[n] is a linear convolution of x[n] and h[n], we compute y[n] using the overlapand-add method of block convolution. In this example, the input block length is chosen as Nx = 3,
and the impulse response length is Nh = 2. Hence, we need to pad h[n] with Nx 1 = 2 zeros. Once
we partition the input into blocks of size Nx = 3, we pad each input block with Nh 1 = 1 zero, as
depicted in Fig. 9.21. We convolve each of these blocks with h[n] using the DFT, as demonstrated
in Ex. 9.11.
596
zero-padded
input blocks
0
1
0
1
0
output blocks
10
10
6
2
nal output
10
10
y[n]
10
8
6
4
2
2
and
Hpad [k] =
n=0
h[n]ej 2 kn .
n=0
Further, Yr [k] = Xr,pad [k]Hpad [k]. We compute the values of Xr,pad [k], Hpad [k], and Yr [k] using
these equations for each block.
For the rst (r = 0) block, we have
and
1
y0 [n] =
Y0 [k]ej 2 kn .
4
k=0
Even for the small N of this case, these equations are rather dull to evaluate by hand. Instead, we
use MATLAB to perform the necessary calculations.
01
02
03
We follow the same procedure for the second (r = 1) and third (r = 2) blocks.
04
05
x1pad =
y1 = 2
x2pad =
y2 = 0
597
Once properly aligned, the nal output y[n] is just the sum of the output blocks. Figure 9.21 shows
the overlapping input blocks, output blocks, and nal block convolution output.
In this example, computing each block convolution using the DFT is much more laborious than
direct convolution by the sliding-tape method (Sec. 5.5.2). One reason is that we are not yet using
the ecient FFT algorithm to compute the DFT and its inverse. Furthermore, the most dramatic
reductions in the number of computations occur only for relatively large N . In practice, we generally deal with values of N much larger than 4, where the DFT-based approach (utilizing the FFT
algorithm) really pays o.
Example 9.13
Overlap-and-Save Method
In the overlap-and-save method, the input signal is once again sectioned into manageable nonoverlapping blocks, this time of length Nx Nh + 1. As before, each block is augmented (padded) with
Nh 1 data points. Unlike the previous method, however, this method places augmented points at
the beginning of each block. Furthermore, it is not zeros that augment the signal but rather copies
of the input signal itself, creating data-padded rather than zero-padded input blocks. The Nh 1
augmented data points of a block are the same as the last Nh 1 points of the previous block so
that the last Nh 1 data points of each block are saved and then reused as the rst Nh 1 data
points of the succeeding block. The exception is the rst block, where the rst Nh 1 data points
are taken as zeros. We also pad h[n] with Nx Nh zeros to make a length-Nx signal hpad [n].
Once we form each input block, we compute the circular convolution between it and hpad [n].
Each result has Nx samples. The rst Nh 1 samples are discarded, and the remaining Nx Nh + 1
samples are saved. The saved samples of each output block are then concatenated together to obtain
the nal output. Figure 9.22 illustrates the general structure of this technique, which is commonly
known as the overlap-and-save method. A better but less common name is the overlap-and-discard
method. As with the overlap-and-add method, the DFT is used to perform the needed circular
convolutions. Unlike the overlap-and-add method, however, these are circular convolutions with
aliasing, as discussed in Sec. 9.4.2 and illustrated in Ex. 9.10.
Dening x[n] as 0 for n < 0, the rth data-padded input block xr [n] is expressed as
x[n] rNx Nh + 1 n (r + 1)Nx Nh
xr [n] =
.
0
otherwise
Each block xr [n] includes Nx values of the input x[n] and shares Nh 1 of these values with the
following block xr+1 [n]. Next, we dene each output block yr [n] as the Nx -point circular convolution
between the Nx values of xr [n] and hpad [n]. That is,
pad [n].
yr [n] = xr [n]h
To obtain the nal result y[n], the rst Nh 1 values of each yr [n] are discarded, the remaining
Nx Nh + 1 values are saved, and then the saved values from each output block are concatenated
together. Let us now demonstrate the overlap-and-save method with an example.
Keys to Understanding the Overlap-and-Save Method
We have outlined the procedure of the overlap-and-save method, but what makes it work? The
procedure is obviously based on the results of Sec. 9.4.2 on aliasing in circular convolution. When
One might wonder why we partition the input into nonoverlapping length-N blocks for the overlap-and-add
x
method but use a length of Nx Nh + 1 in the overlap-and-save method. There are two primary reasons. First, this
notation ensures that both methods use Nx input values for each processed block. Second, it helps readers directly
use Sec. 9.4.2 (aliasing in circular convolution) to better understand how the overlap-and-save method actually works.
598
nonoverlapping
input blocks xr [n]
data-padded
input blocks
Nh 1
r=0
r=1
r=2
Nx Nh +1
Nx Nh +1
Nx Nh +1
Nx Nh +1
save and reuse
padded
zeros
Nh 1
Nx Nh +1
save and reuse
Nh 1
output blocks
Nh 1
discard
Nx Nh +1
Nx Nh +1
Nh 1
Nx Nh +1
discard
Nh 1
Nx Nh +1
discard
Using the overlap-and-save method, repeat Ex. 9.13 and nd the response y[n] of an LTID system
with the Nh = 2 nite impulse response h[n] and input x[n] shown in Fig. 9.20. As in Ex. 9.13,
initially partition x[n] into nonoverlapping blocks of length 3.
To partition x[n] into nonoverlapping blocks of length 3 requires Nx Nh + 1 = 3. Since Nh = 2,
we must use Nx = 4. We follow the procedure illustrated in Fig. 9.22 to section the input data, as
shown in Fig. 9.23. For the rst data block, we pad Nh 1 = 1 zero at the beginning. Thereafter,
we save the last Nh 1 = 1 point of each block and pad it to the beginning of the next block. Each
length-4 input block is then circularly convolved (using the DFT) with hpad [n] to yield a 4-point
output block. As in Ex. 9.13, these computations are easily performed in MATLAB.
01
02
03
04
05
DN
X0
y0
x1
y1
x2
y2
=
=
=
=
=
=
=
599
Figure 9.23 graphically depicts these output blocks. Discarding the rst Nh 1 = 1 point of each
output block, the remaining saved blocks are concatenated to provide the total output. As hoped,
the result is identical to that obtained using the overlap-and-add method of Ex. 9.13.
data-padded
input blocks
3
save and reuse
3
1
save and reuse
1
output blocks
10
10
8
discard
2
4
discard
discard
nal output
10
10
y[n]
10
8
6
4
2
Example 9.14
600
9.6
Goertzels Algorithm
Assuming a complex-valued input x[n], Eq. (9.2) requires N complex multiplications and N 1
complex additions to directly compute one sample of X[k]. Each complex addition requires 2 real
additions. A complex multiplication requires 4 real multiplications and 2 real additions. Thus, it
takes 4N real multiplications and 2(N 1) + 2N = 4N 2 real additions to compute each sample
X[k]. To compute all N values of X[k] (k = 0, 1, . . . , N 1) requires N 2 complex multiplications and
N (N 1) complex additions or, equivalently, 4N 2 real multiplications and N (4N 2) real additions.
Computed in this way, the DFT requires order-N 2 multiplications and additions, denoted O(N 2 ).
Notice that as we linearly increase our DFT size N , we geometrically increase our computational
burden as O(N 2 ). It is not uncommon to encounter DFT sizes well in excess of N = 1000. For such
large N , DFT computations can be prohibitively time-consuming, even for high-speed computers.
Fortunately, there is much that we can do to reduce the computational burden of the DFT. Goertzels
algorithm, introduced next, oers one such approach, as does the fast Fourier transform (FFT),
discussed later.
For convenience, we dene the N th principle root of unity as
WN = ej2/N = ej0 .
(9.41)
N
1
x[n]WNkn ,
0 k N 1,
(9.42)
n=0
N 1
1
X[k]WNkn ,
N
0 n N 1.
(9.43)
k=0
N
1
x[m]WNkm =
m=0
N
1
k(N m)
x[m]WN
m=0
Written in this way, X[k] resembles the convolution sum of Eq. (5.23). Let us capitalize on this fact.
Dene
x[n] 0 n N 1
xN [n] =
0
otherwise
and
hk [n] = WNkn u[n] =
For n 0, next dene
WNkn
0
n0
.
n<0
k(nm)
xN [m]WN
m=0
We can view yk [n] as the output of a causal system with complex-valued impulse response hk [n] to
the nite-duration input xN [n]. Recalling that xN [n] = x[n] for 0 n N 1 and xN [N ] = 0, we
see that
N
N
1
k(N m)
k(N m)
yk [N ] =
xN [m]WN
=
x[m]WN
= X[k].
m=0
Here,
m=0
601
This provides a ltering perspective of the DFT. That is, X[k] can be found from our lters output
at n = N as
X[k] = yk [n]|n=N .
(9.44)
Yk (z)
XN (z)
1
.
1 WNk z 1
yk [n]
k
WN
z 1
1 WNk z 1
1 WNk z 1
1 WNk z 1
k
1 WN + WNk z 1 + z 2
1 WNk z 1
.
1 2 cos(2k/N )z 1 + z 2
This expression, which is the basis of Goertzels algorithm, suggests a second-order IIR structure,
shown using direct form II in Fig. 9.25.
For
Eq. (9.44) to hold, the system must have relaxed initial condition yk [1] = 0.
602
vk [n]
2 cos( 2k
)
N
z 1
yk [n]
k
WN
z 1
1
Figure 9.25: Goertzels algorithm: second-order complex IIR lter to compute X[k].
A Ludicrous Proposition?
It may seem a ludicrous proposition that the second-order implementation of Fig. 9.25 can be more
ecient than the rst-order implementation of Fig. 9.24, but this is precisely the case. The primary
key to realizing the computational savings of Goertzels algorithm is recognizing that we only need
the output yk [n] at n = N to determine X[k]. All other values of yk [n] are unimportant. Thus, we
compute the intermediate variable vk [n] according to
2k
0 n N.
(9.45)
vk [n] = xN [n] + 2 cos
vk [n 1] vk [n 2],
N
Only at n = N does the last feed-forward step of Fig. 9.25 need to be computed,
X[k] = yk [n]|n=N = vk [N ] WNk vk [N 1].
Over 0 n N 1, the feed-forward paths and computation of yk [n] are ignored completely.
Continuing our original assumption that input xN [n] is complex, Eq. (9.45) requires 2N real
multiplies and 4N real additions. The nal feed-forward step adds another 4 real additions and
4 real multiplications to the computation of X[k]. To compute all N values of X[k] thus requires
(2N + 4)N real multiplications and (4N + 4)N real additions. Despite having twice the order, the
structure of Fig. 9.25 requires approximately half the number of real multiplications as does the
structure of Fig. 9.24.
(N k)n
u[n]
To realize a further reduction in computational complexity, notice that hN k [n] = WN
and
0
1
(N k) 1
1 WN
z
1
HN k (z) =
(N k) 1
(N k) 1
1 WN
z
1 WN
z
(N k)
1 WN
z 1
(N k)
(N k)
1 WN
+ WN
z 1 + z 2
1 WN
z 1
1 2 cos(2(N k)/N )z 1 + z 2
1 WN
z 1
.
1 2 cos(2k/N )z 1 + z 2
(N k)
(N k)
This lter, which is used to compute X[N k], uses the same feedback paths as the lter used to
compute X[k]. Thus, the computations of Eq. (9.45) used to compute X[k] serve double duty to
also compute X[N k]. Only the nal feed-forward step is dierent:
(N k)
X[N k] = vk [N ] WN
vk [N 1].
603
This further reduces the computational demands of both multiplication and addition by half. Thus,
Goertzels algorithm computes X[k] using approximately N 2 real multiplications and 2N 2 real additions. Compared with a direct DFT computation using Eq. (9.2), Goertzels algorithm uses approximately one-fourth the number of real multiplications and one-half the number of real additions.
9.7
While Goertzels algorithm reduces the number of additions and multiplications to compute the
DFT, the computational complexity of Goertzels algorithm remains O(N 2 ). Thus, the benets
of Goertzels algorithm are quickly overcome as N increases. The only real way to dramatically
improve the situation is to reduce the order of computational complexity. This is precisely what is
done by an algorithm developed by Tukey and Cooley in 1965 [1]. This algorithm, known as the
fast Fourier transform (FFT), reduces the number of computations from O(N 2 ) to O(N log2 N ).
Particularly for large N , the computational savings are substantial. The FFT algorithm is largely
what has made the Fourier transform accessible for digital signal processing.
604
9.7.1
Decimation-in-Time Algorithm
The FFT algorithm is simplied if we choose N to be a power of 2, although such a choice is not
essential. Thus, let us consider a sequence x[n] with length N that is a power of 2. Next, we divide
this N -point data sequence x[n] into two ( N2 )-point sequences x0 [n] and x1 [n] that consist of the
even- and odd-numbered samples, respectively. That is,
N/21
{x0 [n]}n=0
and
N/21
{x1 [n]}n=0
These sequences are just x[n] and x[n + 1] downsampled by a factor 2. That is, x0 [n] = x[2n], and
x1 [n] = x[2n + 1]. Letting WN = ej2/N = ej0 , we next represent the DFT of x[n] as
N
2
X[k] =
x[2n]WN2nk
N
2
n=0
(2n+1)k
x[2n + 1]WN
n=0
Replacing x[2n] with x0 [n], x[2n + 1] with x1 [n], and using the fact that W N = WN2 , we have
2
N
2
X[k] =
nk
x0 [n]W N
n=0
WNk
N
2
nk
x1 [n]W N
2
n=0
0k
N
2
1.
(9.46)
Here, X0 [k] and X1 [k] are the ( N2 )-point DFTs of x0 [n] and x1 [n], respectively. Since X0 [k] and
X1 [k] are ( N2 )-point DFTs, they are themselves ( N2 )-periodic. Hence,
X0 [k +
N
2]
= X0 [k]
and
X1 [k +
N
2]
= X1 [k].
(9.47)
Moreover,
(k+ N
2 )
WN
N
2
= WN
(9.48)
N
2]
0k
N
2
1.
We can compute the rst N2 points of X[k] using Eq. (9.46) and the last
That is, over 0 k N2 1,
X[k] = X0 [k] + WNk X1 [k]
and
X[k +
N
2]
N
2
(9.49)
points using Eq. (9.49).
(9.50)
From Eq. (9.50), we see that an N -point DFT can be computed by combining two ( N2 )-point DFTs.
These equations can be represented conveniently by the signal ow graph depicted in Fig. 9.26. This
structure is known as a buttery. The scale factor WNk that appears in these computations is called
the twiddle factor.
The next step is to compute the ( N2 )-point DFTs X0 [k] and X1 [k]. The computation of these
DFTs is simplied by computing each as a combination of two ( N4 )-point DFTs. To this end, we
use downsampling to divide x0 [n] and x1 [n] each into two sequences. That is, we divide x0 [n] into
x00 [n] = x0 [2n] and x01 [n] = x0 [2n + 1], and we divide x1 [n] into x10 [n] = x1 [2n] and x11 [n] =
x1 [2n + 1]. This process of subdividing each DFT into two smaller DFTs continues until we reach
This
is known as the two-band polyphase decomposition of x[n]. See [3] for a general treatment of this topic.
X0 [k]
605
X0 [k]
X[k]
k
WN
X1 [k]
k
WN
X[k]
X[k+ N
]
2
X[k+ N
]
2
X1 [k]
k
WN
two-point DFTs (which require no multiplication at all). Let us demonstrate the procedure in its
entirety for a length-8 sequence x[n]; that is,
{x[n]}7n=0 = {x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]} X[k],
0 k 7.
We divide this length-8 sequence into two length-4 sequences x0 [n] and x1 [n], consisting of evenand odd-numbered samples, respectively, as
{x0 [n]}3n=0 = {x[2n]}3n=0 = {x[0], x[2], x[4], x[6]} X0 [k],
0k3
and
{x1 [n]}3n=0 = {x[2n + 1]}3n=0 = {x[1], x[3], x[5], x[7]} X1 [k],
0 k 3.
We can determine X[k] from X0 [k] and X1 [k] according to Eq. (9.50) as
X[k] = X0 [k] + W8k X1 [k]
and
At this point, we have divided our 8-point DFT into two 4-point DFTs, as illustrated in Fig. 9.27.
Continuing our decomposition, we next divide the 4-point DFTs X0 [k] and X1 [k] each into two
2-point DFTs. Let us begin with X0 [k]. First, we divide x0 [n] into two length-2 sequences consisting
of its even- and odd-numbered samples
{x00 [n]}1n=0 = {x0 [2n]}1n=0 = {x[4n]}1n=0 = {x[0], x[4]} X00 [k],
k = 0, 1
and
{x01 [n]}1n=0 = {x0 [2n + 1]}1n=0 = {x[4n + 2]}1n=0 = {x[2], x[6]} X01 [k],
k = 0, 1.
Similar to Eq. (9.50), we express the length-4 DFT X0 [k] in terms of the two length-2 DFTs X00 [k]
and X01 [k] as
X0 [k] = X00 [k] + W4k X01 [k]
and
Substituting k = 0 and 1 and using the fact that W41 = W82 yield
X0 [0] = X00 [0] + W80 X01 [0],
X0 [1] = X00 [1] + W82 X01 [1],
606
x[0]
x0 [0]
X0 [0]
x[2]
x0 [1]
X0 [1]
X[0]
W80
X[1]
N=4
DFT
W81
x[4]
x0 [2]
X0 [2]
x[6]
x0 [3]
X0 [3]
X[2]
W82
X[3]
W83
x[1]
x1 [0]
X[4]
X1 [0]
W80
X1 [1]
W81
x[5]
x1 [2]
X1 [2]
W82
x[7]
x1 [3]
X1 [3]
W83
x[3]
x1 [1]
X[5]
N=4
DFT
X[6]
X[7]
Figure 9.28 shows this stage of our decomposition, where our 8-point DFT is divided into four
2-point DFTs.
The nal 2-point DFTs are straightforward to compute using a simple buttery. The 2-point
DFT X00 [k], for example, is given by (see Prob. 9.7-2)
X00 [0] = x[0] + W80 x[4]
Similarly,
and
(9.51)
Substituting these equations into the structure of Fig. 9.28 results in the nal 8-point decimationin-time FFT shown in Fig. 9.29. This example is solved in three stages. Generally, there are log2 N
stages in an FFT computation. Each stage uses buttery structures, as given in Eq. (9.50) and also
Fig. 9.26, with each succeeding stage using half the points but twice as many variables. Thus the
number of computations in each stage remains the same.
First, we divide x1 [n] into two length-2 sequences consisting of even- and odd-numbered samples,
{x10 [n]}1n=0 = {x1 [2n]}1n=0 = {x[4n + 1]}1n=0 = {x[1], x[5]} X10 [k],
k = 0, 1
and
{x11 [n]}1n=0 = {x1 [2n + 1]}1n=0 = {x[4n + 3]}1n=0 = {x[3], x[7]} X11 [k],
k = 0, 1.
Next, we represent the length-4 DFT X1 [k] in terms of the two length-2 DFTs X10 [k] and X11 [k] as
X1 [k] = X10 [k] + W4k X11 [k]
and
Substituting k = 0 and 1 and using the fact that W41 = W82 yield the desired result.
607
X00 [0]
x[0]
x00 [0]
W80
N =2
DFT
X00 [1]
x[4]
x00 [1]
W82
x[2]
x01 [0]
N =2
DFT
x[6]
x01 [1]
W80
X01 [1]
W82
W80
W80
X10 [1]
x[5]
x10 [1]
W81
W82
x[3]
x11 [0]
N =2
DFT
x[7]
x11 [1]
X11 [0]
W80
X11 [1]
W82
X[3]
W83
X10 [0]
N =2
DFT
X[2]
W82
x[1]
x10 [0]
X[1]
W81
X01 [0]
X[0]
W80
W82
W83
X[4]
X[5]
X[6]
X[7]
W80
x[4]
x[2]
W80
+
W80
x[6]
x[1]
W80
+
W80
x[5]
x[3]
W80
+
W80
x[7]
W80
W80
+
W82
+
W80
+
W82
+
W80
+
W82
+
W80
+
W82
X[0]
W80
+
X[1]
W81
+
X[2]
W82
+
X[3]
W83
+
W80
+
W81
+
W82
+
W83
X[4]
X[5]
X[6]
X[7]
To count the number of computations in the FFT, we observe that each stage requires an identical number of operations: N complex additions and N complex multiplications. Since there are
log2 N stages, the FFT algorithm requires, conservatively, a total of N log2 N complex additions and
N log2 N complex multiplications to compute an N -point DFT. By using the multiplication-ecient
form for each buttery (see Fig. 9.26), we can reduce the number of complex multiplications by
608
half to N2 log2 N . Furthermore, many scale factors are 1 or 1, which requires no multiplication at
all. Figure 9.30 shows a multiplication-ecient form of the 8-point decimation-in-time FFT. This
structure computes an 8-point DFT using 24 complex additions and only 5 complex multiplications. In fact, in this case, we can further reduce the number of complex multiplications to only
2 since the scale factor W82 = j can, with a little clever programming, be implemented without
multiplication.
x[0]
x[4]
x[2]
x[6]
x[3]
x[7]
X[0]
X[1]
X[2]
X[3]
X[4]
X[5]
X[6]
X[7]
x[1]
x[5]
W82
+
W81
+
W82
W82
W83
Binary Equivalent
000
001
010
011
100
101
110
111
Bit-Reversed Binary
000
100
010
110
001
101
011
111
Bit-Reversed Order
0
4
2
6
1
5
3
7
Table 9.2: Using bit reversal to determine sample ordering for an N = 8 FFT.
From Fig. 9.30, we see that x[6] is the fourth input to an 8-point DIT FFT. What is the fourth input to
a 128-point DIT FFT? What is the 100th input to a 128-point DIT FFT?
9.7.2
609
Decimation-in-Frequency Algorithm
In the decimation-in-frequency (DIF) FFT algorithm, instead of dividing the input x[n] into two
sequences of even- and odd-numbered samples, we divide x[n] into two sequences formed by the rst
N
N
2 and the last 2 samples, proceeding in the same way until a series of 2-point DFTs is reached in
log2 N stages. The resulting DIF FFT structure, shown in Fig. 9.31 for N = 8, has the input x[n]
in normal order and the output X[k] in bit-reversed order. The total number of computations in
this algorithm is the same as that in the decimation-in-time algorithm.
x[0]
x[1]
x[2]
x[3]
x[4]
x[5]
x[6]
x[7]
W82
W81
W82
W83
W82
X[0]
X[4]
X[2]
X[6]
X[1]
X[5]
X[3]
X[7]
x[1]
x[2]
x[3]
x[4]
x[5]
x[6]
x[7]
W82
W81
W82
W82
W83
X[0]
X[4]
X[2]
X[6]
X[1]
X[5]
X[3]
X[7]
Figure 9.32: A multiplication-ecient 8-point decimation-in-time FFT with input in normal order.
610
Estimate the CTFT Xc () of the CT signal xc (t) = et/10 u(t) using the DFT. Graphically compare
the true and estimated spectra.
In this case, xc (t) is neither timelimited nor bandlimited, so the DFT can only approximate the
CTFT. From entry 1 of Table 1.1 (page 48), signal xc (t) = et/10 u(t) has CTFT given by
Xc () =
1
.
j + 0.1
This spectrum is lowpass in nature with peak magnitude |Xc (0)| = 10. To determine the eective
bandwidth B, we use a 1% criterion,
1
= B = 0.1 9999 10.
0.01(10) =
jB + 0.1
611
10
Using this eective bandwidth, the Nyquist sampling rate is Fs = 2B
2 = , and the sampling interval
1
is T = Fs = 10 .
The signal xc (t) possesses an exponentially decaying envelope. To determine the eective duration T0 , we again use a 1% criterion,
T0 = 10 ln(0.01).
Using the sampling interval T = /10, the required number of DFT points is thus
N 1=
100
T0
=
ln(0.01) = 147
T
N = 148.
With these calculations complete, we are now prepared to estimate the CTFT using an N -point
DFT. Combining Eq. (6.49), which connects the CTFT to the DTFT, and Eq. (9.1), which connects
the DTFT to the DFT, a DFT-based estimate of the CTFT is
k0
c k0 = T X[k],
X
(9.52)
T T.
T
10
Xc ()
|Xc ()|
10
5
(a)
10
10
2
(b)
c ()|
|X
c ()
X
10
5
(c)
10
2
(d)
Xc ().
Figure 9.33 compares the true and estimated spectra, computed using MATLAB.
01
02
03
04
05
06
07
08
Much like the impulse invariance method in Ch. 8, line 01 denes the CT unit step so that u(0) = 0.5.
Lines 0203 estimate the CTFT using the DFT, where for convenience we use MATLABs built-in
fft function to compute the DFT. Line 04 restricts our attention to those DFT points that correspond to the frequency range 0 T = 10. This is to avoid the (unnecessary) inconvenience of
dealing with the second half of the DFT, which actually corresponds to negative frequencies. Lines
612
0508 plot the true and estimated magnitude and phase spectra. Except for high frequencies, the
DFT estimate is almost visually indistinguishable from the true CTFT. If more points are needed in
the estimate, we simply zero pad the sampled signal before taking the DFT. Furthermore, estimate
accuracy can be improved as needed by increasing (improving) our estimates of signal bandwidth
and duration (B and T0 ).
Example 9.15
9.8
Equation (9.17) shows that the DFT equations are periodic. Thus, although we started out with
length-N sequences x[n] and X[k], the DFT equations themselves are periodic. In other words,
using Eq. (9.5), if we compute x[n] for values of n outside the range 0 n N 1, we nd that
x[n] is periodic. The same is the case with X[k]. This observation allows us to write equations for
the discrete-time Fourier series for an N -periodic signal.
Consider a length-N sequence x[n] that is zero outside the range 0 n N 1. Let x
[n] be
the N -periodic extension of x[n], obtained by repeating x[n] periodically as in Eq. (9.11). Similarly,
let X[k]
be the N -periodic extension of X[k], the length-N DFT of x[n]. Using 0 = 2/N and the
periodicity property in Eq. (9.17), we have
x
[n] =
N 1
1
X[k]ej0 kn
N
k=0
and
=
X[k]
N
1
x
[n]ej0 kn =
n=0
Letting D[k] =
1
N X[k],
N
1
x[n]ej0 kn .
n=0
N
1
D[k]ej0 kn
(9.53)
k=0
and
D[k] =
N 1
N 1
1
1
x
[n]ej0 kn =
x[n]ej0 kn .
N n=0
N n=0
(9.54)
Equation (9.53) is the synthesis equation of the discrete-time Fourier series (DTFS), and it expresses
the N -periodic signal x
[n] as a sum of N exponentials consisting of ej0 n and its harmonics. To
nd the DTFS of signal x
[n] is to represent it using Eq. (9.53). Unlike the continuous-time case, the
discrete-time case has only N harmonics. This is because the discrete-time signals are bandlimited
to 2 rad/sample, and the fundamental frequency is 0 = 2/N . The analysis equation of the
discrete-time Fourier series is given by Eq. (9.54), which expresses the N -periodic signal D[k] as a
sum of N exponentials consisting of ej0 k and its harmonics. Within the scale factor N1 , we see
that the DTFS analysis and synthesis equations are identical to the DFT analysis and synthesis
equations. Thus, the DTFS shares the same properties and insights of the DFT.
Periodic Extension of the Fourier Spectrum
Note that if [k] is an N -periodic function of k, then
N
1
k=0
[k] =
{k}N
[k],
(9.55)
613
where {k}N indicates any N consecutive values of k. This result follows because the right-hand
side of Eq. (9.55) is the sum of N consecutive values of [k]. Because [k] is periodic, each sample
repeats with period N . Therefore, the same set of samples is present in any group of N consecutive
samples, although not necessarily in the same order. Hence, the sum of any N consecutive samples
of an N -periodic function [k] must be identical regardless of where we start the rst term.
With these observations, let us return to the DTFS. Now ej0 kn is N -periodic because
ej0 (k+N )n = ej0 kn ej2n = ejn0 k .
Therefore, if x
[n] is N -periodic, x
[n]ej0 kn is also N -periodic. Hence, from Eq. (9.54), it follows
that D[k] is also N -periodic, as is D[k]ej0 kn . Now, because of Eq. (9.55), we can express Eqs. (9.53)
and (9.54) as
D[k]ej0 kn
(9.56)
x[n] =
{k}N
and
D[k] =
x
[n]ej0 kn .
(9.57)
{n}N
If we plot D[k] for all values of k (rather than only 0 k N 1), then we see that the spectrum
D[k] is N -periodic. Moreover, Eq. (9.55) shows that x[n] can be synthesized by not only the N
exponentials corresponding to 0 k N 1 but by any successive N exponentials in this spectrum,
starting at any value of k (positive or negative). For this reason, it is customary to show the spectrum
D[k] for all values of k and not just over the interval 0 k N 1. Yet, to synthesize x
[n] from
this spectrum, we need to add only N consecutive components.
Adjacent spectral components of D[k] are separated by the frequency interval 0 = 2
N , and there
are a total of N components repeating periodically along the = k0 axis. Thus, D[k] repeats
every 2 on the frequency scale . Equations (9.55), (9.56), and (9.57) show that both x
[n] and its
spectrum D[k] are periodic, and both have exactly N components over one period. The period of
x
[n] is N , and that of D[k] is 2 radians.
Equation (9.57) shows that D[k] is complex in general, and D[k] is the conjugate of D[k] if x
[n]
is real. Thus, for real x
[n],
|D[k]| = |D[k]|
and
D[k] = D[k].
Clearly, the magnitude spectrum |D[k]| is an even function of k, and the phase spectrum D[k] is
an odd function of k (or ). All these concepts are claried by the examples to follow.
Find the discrete-time Fourier series (DTFS) for the periodic signal x
[n] = sin(0.1n), shown in
Fig. 9.34. Sketch the magnitude and phase spectra |D[k]| and D[k].
x
[n]
1
10
10
20
614
0.1
1
20
The smallest value of m that makes 20m an integer is m = 1. Therefore, the period N = 20, and
0 = 2
[n] can be expressed as
N = 0.1. From Eq. (9.55), the DTFS for x
D[k]ej0.1kn ,
x
[n] =
{k}20
where the sum is performed over any 20 consecutive values of k. We shall select the range 10
k < 10 (values of k from 10 to 9). This choice corresponds to synthesizing x
[n] using the spectral
components in the fundamental frequency range ( < ). Thus,
x[n] =
D[k]ej0.1kn ,
k=10
j0.1(1k)n
n=10
%
e
j0.1(1+k)n
n=10
Although this expression for D[k] is valid for all k, let us focus on a single period of D[k] where k
takes on all values between 10 and 9 (the fundamental band). Over this range, the rst sum on the
right-hand side is zero for all values of k except k = 1, when the sum is equal to N = 20. Similarly,
the second sum is zero for all 10 k 9 except k = 1, when it is equal to N = 20. Therefore,
D[1] =
1
1
= ej/2
2j
2
and
D[1] =
1
1
= ej/2 .
2j
2
All the remaining coecients D[k] over 10 k 9 are zero. The corresponding discrete-time
Fourier series is given by
j0.1n
1
x
[n] = 2j
e
(9.58)
ej0.1n = sin(0.1n).
Here, the fundamental frequency 0 = 0.1.
Figures 9.35a and 9.35b show the respective magnitude and phase spectra, plotted as a function
of frequency = k0 . Because of the periodicity property discussed earlier, both the magnitude and
phase spectra are periodic functions of k with period N = 20. Nonetheless, it is sucient to specify
the spectra over any single period, such as the fundamental band < (10 k < 10).
According to Eq. (9.58), there are only two nonzero spectral components to x
[n], corresponding to
D[1] and D[1]. The remaining 18 fundamental-band coecients are zero. We can synthesize x
[n]
by adding these 20 spectral components. Observe that the magnitude spectrum is an even function
and the angle or phase spectrum is an odd function of k (or ) as expected.
The result of Eq. (9.58) is a trigonometric identity, and it could have been obtained immediately
without the formality of nding the Fourier coecients. We have intentionally chosen this trivial
example to introduce the reader gently to the concept of the discrete-time Fourier series and its
periodic nature. The DTFS is a way of expressing a periodic signal x
[n] in terms of exponentials of
the form ej0 kn and their harmonics. The result in Eq. (9.58) is merely a statement of the (obvious)
fact that sin(0.1n) can be expressed as a sum of the two exponentials ej0.1n and ej0.1n .
To
see this fact, we can simply evaluate the sum as a geometric progression or, more simple, apply an identity
similar to Eq. (9.4).
615
|D[k]|
0.5
10
10
k0
(a)
D[k]
10
10
k0
2
(b)
Find the discrete-time Fourier series spectrum D[k] for the periodic sampled gate function shown
in Fig. 9.36.
x
[n]
1
32
16
16
2
32
16 .
Therefore,
x
[n] =
k={32}
D[k]ej 16 kn ,
32
616
where
D[k] =
x
[n]ej 16 kn .
32
n={32}
For our convenience, we shall choose the interval 16 n 15 to compute D[k], although any other
interval of 32 points gives the same result. Over this interval, x
[n] = 1 for 4 n 4 and is zero
for all the remaining values of n. Thus,
D[k] =
15
4
1 j 16
1
kn
x
[n]ej 16 kn =
e
.
32 n=16
32 n=4
This is a geometric progression with a common ratio ej 16 k . Using Table 5.1 on page 290,
4
%
j 0.5k 3 j 4.5k
$ 4k
j 4.5k
16
16
16
e
j 16
j 5k
e
e
1
e 16
1 e
3 0.5k
4.
=
D[k] =
k
0.5k
0.5k
j
32
32
16
1e
ej 16 ej 16 ej 16
This spectrum, shown over more than one period, is depicted in Fig. 9.37.
9
32
D[k]
k0
9.9. Summary
617
Using MATLAB and the matrix form of the DFT, compute and plot the DTFS spectrum D[k] from
Ex. 9.17.
9.9
Summary
The discrete Fourier transform (DFT) may be viewed as an economy-class DTFT, applicable when
x[n] is of nite length. The DFT is one of the most important tools for digital signal processing, especially when we implement it using the ecient fast Fourier transform (FFT) algorithm. Computed
using the FFT algorithm, the DFT is truly the workhorse of modern digital signal processing.
The DFT X[k] of an N -point signal x[n] starting at n = 0 represents N uniform samples taken
over the frequency interval 0 < 2 of X(), the DTFT of x[n]. Because DFT values are
samples of the DTFT, a plot of the DFT X[k] is like viewing the DTFT X() through a picket
fence. If N is large enough, X[k] will include enough samples to give a reasonably good picture
of X(). If N is not large enough, we can articially increase N by padding zeros to the end of
x[n]. This gives a corresponding increase in the size of the DFT, which is to say that the number
of samples of the DTFT also increases. Both the DFT and its inverse are conveniently computed
using simple matrix representations. Furthermore, we can reconstruct X() from the DFT using
the interpolation formula. Taken together, we see that the DFT proves extremely useful in DTFT
computations.
To ensure a unique one-to-one relationship between an N -point signal x[n] and its DFT X[k], it
is customary to restrict x[n] to the range 0 n N 1. Without such a restriction, the uniqueness
of the DFT is lost. The reason for this nonuniqueness is that the contribution to the DFT from any
sample of x[n] at n = r is the same as that of the same sample at the location n = r + mN , where
m is an arbitrary integer. These observations also lead to a periodic view or circular representation
of the signal x[n].
The circular (or periodic) representation of a length-N sequence proves very useful in DFT
studies. A modulo-N shift, for example, is conveniently interpreted as a circular shift. Many of
the properties of the DFT are best viewed in the context of a circular representation. A circular
representation is particularly useful in the graphical interpretation of circular convolution.
By properly zero padding two nite-duration sequences, circular convolution produces a result
that is identical to linear convolution. To this end, both sequences are zero padded to have the
same length as the linear convolution result. If a sucient number of zeros are not padded, circular
convolution yields erroneous results because of aliasing. However, even under such aliasing, it
is possible that some of the samples of circular convolution are equal to the samples of linear
convolution.
Circular convolution can be accomplished, often with a savings in overall computations, by using
the DFT and its inverse. If the FFT algorithm is used, this process is known as fast convolution.
With the potential for signicant computational savings, fast convolution is attractive for certain
discrete-time ltering applications. When a large, possibly innite-duration sequence x[n] is to
be convolved with a nite-duration sequence h[n], it is often desirable to partition x[n] in smaller
blocks, convolve each of these blocks with h[n], and then combine the outputs corresponding to
all the blocks. Two methods, overlap and add and overlap and save, are discussed. In the latter
method, we use circular convolution with aliasing. Both methods require about the same amount
of computations.
Ordinarily, direct computation of an N -point DFT requires N 2 complex multiplications and
about N 2 complex additions. By exploiting symmetry and other characteristics, DFT computation
eciency is improved. Goertzels algorithm is particularly simple and can reduce by half the number
618
of additions and reduce by three-quarters the number of multiplications. More dramatic improvements in computational eciency are achieved by using the fast Fourier transform (FFT) algorithm.
The FFT algorithm computes the DFT using only about N log2 N complex additions and N log2 N
complex multiplications. For large N , the FFT yields dramatic benets.
There is a close connection between the DFT of an N -point sequence x[n] and the discretetime Fourier series of x
[n], an N -periodic signal whose rst period over 0 n N 1 is x[n].
Equations for computing the discrete-time Fourier series and its inverse are scaled versions of the
DFT equations.
References
1. Cooley, J. W., and Tukey, J. W., An Algorithm for the Machine Calculation of Complex
Fourier Series, Mathematics of Computation, Vol. 19, April 1965, pp. 297-301.
2. Lathi, B. P., Linear Systems and Signals, 2nd Ed., Oxford University Press, New York, 2005.
3. Mitra, S. K., Digital Signal Processing: A Computer-Based Approach, 3rd Ed., McGraw-Hill,
New York, 2006.
4. Oppenheim, A. V., Schafer, R. W., and Buck, R. J., Discrete-Time Signal Processing, 2nd
Ed., Prentice-Hall, Upper Saddle River, NJ, 1999.
Problems
619
Problems
9.1-1 For this problem, interpret the N -point
DFT as an N -periodic function of k. Answer yes or no if the following frequencydomain signals are valid DFTs. For each
valid DFT, determine the size N of the
DFT and whether the time-domain signal
is real.
(a) Xa [k] = j
(b) Xb [k] = sin(k/10)
(c) Xc [k] = sin(k/10)
k
620
a vector x that
9.2-1 MATLABs fft command computes the
of the sinusoid
DFT of a vector x assuming that the rst
the result. How
sample occurs at time n = 0. Given that X
signal appear?
= fft(x) has already been computed, de(b) Using the fft command, compute the
rive a method to correct X to reect an arDFT X of vector x. Plot the magnibitrary starting time n = n0 .
tude of the DFT coecients. Do they
9.2-2 Determine the following:
make sense?
(c) Zero pad the DFT vector to a total
(a) n5 for 5 n 10
length of 100 by inserting the appro(b) n6 for 5 n 10
priate number of zeros in the middle
(c) n5 for 5 n 10
of the vector X. Call this zero-padded
DFT sequence Y. Why are zeros in(d) n + 36 for 5 n 10
serted in the middle rather than at the
end? Take the inverse DFT of Y and 9.2-3 Determine 3n+26 5 for 5 n 10.
plot the result. What similarities ex9.2-4 Determine three dierent 4-point signals
ist between the new signal y and the
xa [n], xb [n], and xc [n] that, when modulooriginal signal x? What are the dif4 shifted, all equal the 4-point signal
ferences between x and y? What is
the eect of zero padding in the frex[n] = 3[n] 2[n 2] + 2[n 3].
quency domain? How is this type of
zero padding similar to zero padding
Using 0 = /2, express the DTFT samin the time domain?
ples Xa (k0 ), Xb (k0 ), and Xc (k0 ) in
terms of the DFT X[k] of x[n].
(d) Derive a general modication to the
procedure of zero padding in the frequency domain to ensure that the am- 9.2-5 Consider the 4-point signal
plitude of the resulting time-domain
x[n] = 3[n] 2[n 2] + 2[n 3].
signal is left unchanged.
(e) Consider one period of a square
wave described by the length-8 vector [1, 1, 1, 1, 1, 1, 1, 1]. Zero
pad the DFT of this vector to a length
of 100, and call the result S. Scale
S according to (d), take the inverse
DFT, and plot the result. Does the
new time-domain signal s[n] look like
a square wave? Explain.
Problems
621
x[n] = 3[n]2j[n1]+[n2]+2j[n3].
and
9.3-1 A designer accidentally takes the N -point
[0, 0, 1, 1, 2, 2].
inverse DFT of a real signal instead of the
N -point DFT. Devise a simple and ecient
method to correct the result without re- 9.4-3 Use the graphical method to compute the
circular convolution of
computing the DFT.
[1, j, 1, j]
1
2j (X[k]
X [kN ]).
and
[1, j, j, 1].
9.4-4 Use circular convolution to compute the
linear convolution of
[1, 2, 3, 4]
and
[1, 1, 1].
9.3-5 If DFT Y [k] is the imaginary portion of 9.4-5 Use circular convolution to compute the
linear convolution of
DFT X[k], determine an expression for y[n]
in terms of x[n].
[1, 2, 3, 4]
9.3-6 Using only [n] 1 and properties of
and
the DFT, determine the 4-point DFTs of
[4, 3, 2, 1].
the following 4-point sequences:
(a) xa = [0, 2, 0, 0]
(b) xb = [0, 0, 0, 4]
(c) xc = [0, 0, j, 0]
[1, 2, 2, 1]
(d) xd = [0, 4, j, 2]
9.3-7 If the 4-point signal [1, 2, 3, 4] has DFT
X[k], use DFT properties to determine the
time-domain signals that correspond to the
following spectra:
(a) Xa [k] = X [k]ej2k/N
(b) Xb [k] = X[k] + X [k]
(c) Xc [k] = X[k 14 ]
(d) Xd [k] = X[k](1)k
(e) Xe [k] = X 2 [k]
9.4-1 Use the graphical method to compute the
circular convolution of
[1, 2, 3, 4]
and
[1, 1, 2, 2].
and
[1, 1, 2, 0].
Using the idea of time-domain aliasing,
show how to obtain the circular convolution from the linear convolution.
9.5-1 Using DFT-based convolution, determine
the output y[n] of an LTID lter with impulse response h[n] = [n]+2[n1]+[n
2] to the input x[n] = u[n] u[n 4].
9.5-2 Repeat Prob. 9.5-1 for the input x[n] =
u[n 4] 2u[n 8] + u[n + 12].
9.5-3 An input x[n] = (0.5)n u[n] is applied to an
LTID system with impulse response h[n] =
[n] [n 1]. Use the overlap-and-add
method with Nx = 3 to nd the output
y[n] over 0 n 19.
622
Problems
623
g[n]. By exploiting the FFTs natural ability to accommodate complex signals, this
problem demonstrates that the desired 2N point FFT can be computed from a single
N -point FFT. To this end, dene the N point complex signal v[n] = x[n] + jy[n]
with FFT V [k], where x[n] = g[2n] and
y[n] = g[2n+1]. From Prob. 9.7-7, we know
that
X[k] =
1
2
(V [k] + V [kN ])
and
Y [k] =
1
2j
(V [k] V [kN ]) .
1
2j
(V [k] V [kN ]) .
(d) Determine an 8-by-8 permutation matrix that bit-reverse orders vector x for
the DIT FFT algorithm of Fig. 9.30.
9.8-1 The DTFS duality property states that if
x
[n] D[k],
then
D[n]
1
[k].
Nx
624
Appendix A
MATLAB
MATLAB (a registered trademark of MathWorks, Inc.) is a language and interactive environment
for numeric computation, algorithm development, data analysis, and data visualization. It is particularly well suited for digital signal processing applications. While MATLAB is relatively simple
to use, it is a sophisticated package that can be a bit intimidating to new users. Fortunately, there
are many excellent resources on MATLAB and its use, including MATLABs own built-in documentation. This appendix provides a brief introduction to MATLAB that complements the MATLAB
material found throughout this book.
626
Appendix A. MATLAB
Calculator Operations
MATLAB functions well as a scientic calculator. Addition, subtraction, multiplication, division,
and exponentiation are performed using the traditional operator symbols +, -, *, /, and ^. To
subtract 2 from 5, for example, type 5-2 at the command prompt.
01
5-2
ans = 3
Since the operation 5-2 in line 01 is not explicitly assigned to a variable, MATLAB assigns the
result to a variable named ans.
Let us next compute (8/4)2 . MATLAB follows standard precedence rules for mathematical
operators, so typing 8/4^2 yields an incorrect result of 8/16 = 0.5 as exponentiation has precedence
over division. Ordinary parentheses are used to overcome this problem and establish the desired
order of operations.
02
(8/4)^2
ans = 4
Since the operation is not explicitly assigned to a variable, MATLAB again assigns the result to a
variable named ans. Consequently, the result of line 01 is overwritten and lost once line 02 executes.
To retain a calculation for later use, we assign the result to some variable: simply precede an
expression or number with a variable name and an equal sign. For example, we can assign variable
x with the result of 5-2 by typing x = 5-2.
03
x = 5-2
x = 3
In similar fashion, we can assign a dierent variable y with the result of (8/4)2 .
04
y = (8/4)^2
y = 4
w = x+1j*y
w = 3+4i
r = abs(w)
r = 5
theta = angle(w)
theta = 0.9273
Using these results, we see that w = 3 + j4 has polar form w = rej = 5ej0.9273 . Using MATLABs
exp function, we can readily verify that the polar form of w correctly evaluates to the rectangular
form of w = 3 + j4.
In
code.
also predenes variables j and i as 1. It is best to avoid using j or i as 1 since these values
are
easily overwritten. It is preferable to use 1j or 1i as these quantities cannot be overwritten and always equal 1.
MATLAB
627
08
r*exp(1j*theta)
ans = 3+4i
To convert a radian angle to degrees, the radian angle must be multiplied by 180/. This is easily
accomplished using the variable pi, which MATLAB predenes as .
09
theta*180/pi
ans = 53.1301
Using this result, we see that we can represent w in phasor notation as 5 53.1301.
Like most scientic calculators, MATLAB provides a full selection of trigonometric functions:
standard trigonometric functions cos, sin, tan; reciprocal trigonometric functions sec, csc, cot;
inverse trigonometric functions acos, asin, atan, asec, acsc, acot; and hyperbolic variations cosh,
sinh, tanh, sech, csch, coth, acosh, asinh, atanh, asech, acsch, acoth. As with the angle command, MATLAB trigonometric functions utilize units of radians. Unlike many scientic calculators,
MATLAB supports complex arguments
for any
trigonometric
function. For example, MATLAB
easily conrms that cos(j) = 12 ej(j) + ej(j) = 12 e1 + e1 = 1.5431.
09
cos(1j)
ans = 1.5431
0:2:11
ans = 0
10
Notice that the termination value might not appear in the nal vector. Non-integer and negative step
sizes are also permissible in the a:b:c notation. Furthermore, an apostrophe (), which designates a
complex-conjugate transpose operation in MATLAB, provides a convenient way to create a column
vector from a row vector and vice versa. For example, (11:-2.5:0) produces a length-5 row vector
of values starting at 11 and decreasing by steps of 2.5 until the termination value of 0 is reached.
02
(11:-2.5:0)
ans = 11.0000
8.5000
6.0000
3.5000
1.0000
It is often undesirable to display all the elements of a vector to the computer screen. Ending a
MATLAB command with a semicolon (;) suppresses the display of data to the screen. For example,
suppose that we wish to create a vector of integers between 0 and 99 and then determine the sum
of those values.
03
04
k = 0:1:99;
sum(k)
ans = 4950
Line 03 creates the desired row vector k but, since the command is terminated with a semicolon,
does not display the resulting 100 values to the screen. Line 04 uses MATLABs sum command to
compute the sum of the 100 elements comprising k, which evaluates to 4950 in this case. The a:b:c
628
Appendix A. MATLAB
notation can be simplied as a:c when the step size is one. Thus, typing k = 0:99 produces a result
that is identical to that of line 03.
To select particular elements within a vector (or matrix), we need to specify the indices of the
desired vector elements. In MATLAB, indexing begins at 1 and increments integer-wise to the length
of the vector. Various elements of a vector (or matrix) are selected by parenthetically supplying
the desired indices to the vector name. For example, we use indices from 1 to 10 to select the rst
10 elements of the length-100 vector k.
05
k(1:10)
ans = 0
In line 05, the notation 1:10 produces a length-10 vector ranging from 1 to 10. This vector is passed
parenthetically as indices to the variable k to select the corresponding elements, which in this case are
the integers between 0 and 9 inclusive. In the context of indexing, the end command automatically
references the nal index of a vector and is particularly useful in accessing the last values of a vector
of unknown or changing length. To provide an example, let us use the end command to extract the
nal 10 values of k.
06
k(end-9:end)
ans = 90 91
92
93
94
95
96
97
98
99
Many MATLAB functions accept vector arguments, for which they produce a vector of results.
This makes it as easy to tell MATLAB to compute one or one million values of some function. For
example, suppose that we want to compute x(t) = cos(t) over 0 t 2 using a time spacing of
/4.
07
08
t = 0:pi/4:2*pi;
x = cos(t)
x = 1.0000 0.7071
0.0000
-0.7071
-1.0000
-0.7071
-0.0000
3
4, 2, 4 ,
0.7071
1.0000
5 3 7
4 , 2 , 4 ,
x(4)
ans = -0.7071
It is important to notice that x(4) in line 09 means the fourth element of vector x, not the function
x(t) = cos(t) evaluated at t = 4. Parentheses have dierent meanings based on context: parentheses pass arguments to functions (such as cos) and pass indices to variables. If this distinction is
forgotten, the results are going to be wrong.
In some cases, we need to create vectors that are not based on a set of equally spaced real
numbers (the a:b:c notation). MATLAB uses brackets [] to concatenate objects, a construct that
allows for the creation of arbitrary vectors. For example, suppose that we rolled a six-sided die six
times and observed the sequence 3, 5, 1, 3, 6, and then 5. We can use brackets to create a vector
set1 that contains these observations.
10
set1 = [3,5,1,3,6,5]
set1 = 3 5 1 3 6
By separating elements with commas (or just blanks), concatenation occurs horizontally. Alternatively, concatenation occurs vertically when elements are separated with semicolons. Let us construct
a column vector that contains the six additional observations of 2, 1, 5, 3, 3, and 1.
11
set2 = [2;1;5;3;3;1]
set2 = 2
1
5
3
3
1
Other
languages, such as C, begin indexing at 0. Careful attention must be paid to such dierences.
629
A vector constructed using brackets functions the same as one constructed using the a:b:c notation.
For example, an index of 4 always extracts the fourth element of a vector, regardless of the method
of vector construction.
12
set1(4)
ans = 3
Brackets can also be used to concatenate vector objects. For example, let us combine set1 and set2
into a side-by-side pair of column vectors.
13
set3 = [set1,set2]
set3 = 3 2
5 1
1 5
3 3
6 3
5 1
In line 13, we use an apostrophe to transpose row vector set1 into a column vector and then use
brackets to horizontally concatenate the result with the vector set2. The result is the matrix set3.
The same result can also be achieved by using brackets and a combination of commas or blanks (to
separate row elements) and semicolons (to separate rows).
14
set3 = [3,2;5,1;1,5;3,3;6,3;5,1]
set3 = 3 2
5 1
1 5
3 3
6 3
5 1
Matrices are just two-dimensional vectors. By convention, the rst dimension of a matrix is the
number of rows, and the second dimension is the number of columns. Thus, set3 is a 6-by-2 matrix
since it has six rows and two columns. Indexing matrices is identical to indexing vectors, except
that two indices are utilized: one for the row and another for the column. For example, set3(5,1)
selects the element in the fth row and rst column of matrix set3.
15
set3(5,1)
ans = 6
By supplying ranges of row and column indices, it is possible to extract multiple elements from a
matrix. For example, suppose that we want to extract the upper half of matrix set3.
16
set3(1:3,:)
ans = 3 2
5 1
1 5
In line 15, 1:3 species the rst three rows be selected, and the isolated colon (:) indicates that all
columns be selected.
In general, MATLAB assumes linear algebra rules when performing mathematical operations
between two or more vectors or matrices. For example, if we multiply the 1-by-6 row vector set1
and the 6-by-1 column vector set2, we obtain the inner product of these two vectors.
17
set1*set2
ans = 48
Alternately, vectors are one-dimensional matrices. A length-N column vector is just an N -by-1 matrix, whereas
a length-M row vector is just a 1-by-M matrix.
It is also possible to access all elements of a matrix using a single but less intuitive index, a topic we shall not
cover. To learn more, consult MATLAB help.
630
Appendix A. MATLAB
If we multiply the 6-by-1 column vector set2 and the 1-by-6 row vector set1, we obtain the outer
product of these two vectors.
18
set2*set1
ans = 6
3
15
9
9
3
10
5
25
15
15
5
2
1
5
3
3
1
6
3
15
9
9
3
12
6
30
18
18
6
10
5
25
15
15
5
The multiplications found in lines 17 and 18 both work since the two vectors are conformable, which
is to say that the number of columns of the multiplier equals the number of rows of the multiplicand.
One of the most common sources of error in MATLAB programming is trying to mathematically
manipulate vector or matrix objects in ways that are not compatible with their dimensions. For
example, in algebra, we know that x2 is just x times x. We might be tempted to square the elements
of vector set1 by multiplying it by itself.
19
set1*set1
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Since set1 is not conformable with itself (its number of rows does not equal its number of columns),
the requested multiplication makes no sense from a linear algebra perspective, and MATLAB complains with an error. Trying to raise x to a power of 2 does no better.
20
set1^2
??? Error using ==> mpower
Inputs must be a scalar and a square matrix.
The problem now is that MATLAB is trying to apply rules of matrix exponentiation to a vector,
which does not work. The key here is to realize that what is needed is an element-by-element
multiplication or exponentiation, not a matrix multiplication or exponentiation.
In element-by-element operations, a desired mathematical operation is performed between corresponding elements of two vectors (or matrices). Sometimes, such as in the case of addition or
subtraction, the operation is naturally element by element, and no special action is needed in MATLAB. Other times, such as in the cases of multiplication, division, and exponentiation, MATLAB
needs to be instructed that the element-by-element version of the operation is desired. This is readily
accomplished by preceding the operator (*, \, or ^) with a period (.*, .\, or .^). Element-by-element
multiplication or exponentiation is just what is needed to square the elements of set1.
21
22
set1.*set1
ans = 9 25
set1.^2
ans = 9 25
36
25
36
25
Even though operations such as addition and subtraction are naturally element by element,
this does not mean that errors are not possible. Suppose, for example, that we want to add the
observations of set1 with those of set2. Simply trying to add these two sets produces an error.
23
set1+set2
??? Error using ==> plus
Matrix dimensions must agree.
The problem is that while the two sets have the same number of elements, they do not have the
same orientation. MATLAB might guess that an element-by-element operation is desired, but it
has no way of knowing whether the result should be represented as a column or row vector. By
transposing set2 into a row vector, it can be added to set1 to produce a row vector result.
631
24
set1+set2
ans = 5 6
The same attention to vector orientation is also needed when using element-by-element multiplication. For example, suppose that we wish to element-by-element multiply set1 and set2.
25
set1.*set2
??? Error using ==> times
Matrix dimensions must agree.
Here, an error is produced because set1 is a row vector and set2 is a column vector. Even though
the two vectors have the same number of elements, MATLAB cannot element-by-element multiply
the two together unless they also have the same orientation (both column vectors or both row
vectors). Following the strategy used in line 24, we can transpose set2 into a row vector and then
perform element-by-element multiplication to obtain a row vector result.
26
set1.*set2
ans = 6 5 5
18
We emphasize these ideas for a simple reason: improper dimension, orientation, or form of operation
are among the most common MATLAB programming errors.
Plots
MATLAB makes it simple to visualize data with a wide variety of plotting functions. Here, we
discuss the plot and stem commands, which are the primary commands to graph continuous-time
and discrete-time functions, respectively. There are many other plotting functions, however, such
as semilogx, semilogy, and loglog for logarithmic plots; bar and pie for bar and pie charts;
image to display pictures; contour to generate contour plots; contour3, plot3, mesh, and surf for
visualizing data in three dimensions; and others.
To begin, let us use the plot command to graph the continuous-time sinusoid x(t) = cos(2t)
over the interval 1 t 1. First, we construct a time vector t, and then we use that time vector
to create a vector x.
01
02
t = (-1:0.001:1);
x = cos(2*pi*t);
Notice that t is a length-2001 vector of time values between 1 and 1 using a step size of 0.001, and
x is a length-2001 vector of the function cos(2t) evaluated at those same time instances. We can
plot x by simply typing plot(x).
03
plot(x);
1
0.5
0
0.5
1
500
1000
1500
2000
2500
632
Appendix A. MATLAB
The result of line 03, shown in Fig. A.1, is unsatisfactory for a variety of reasons. Since we did not
provide the plot command with the time vector t, MATLAB plots x against its index values, which
range from 1 to 2001. In this example, MATLAB also extends the horizontal axis to a value of 2500,
which is well past the computed values of the function. Thus, the graphs horizontal axis gives the
impression that the plot covers times ranging from 0 to 2500 rather than from 1 to 1. The bounding
box of the plot crowds the function peaks, a problem that obscures data and makes it dicult to
tell if the function ends at index 2000 or remains unity over from 2000 to 2500. Furthermore, the
graph lacks axis labels and therefore does not clearly indicate what is actually being plotted.
These deciencies are easily remedied by passing both vectors t and x to the plot command,
using the xlabel and ylabel commands to specify axis labels, and using the axis command to
specify the lower and upper limits of the horizontal and vertical axes, respectively. The much
improved result is shown in Fig. A.2. If desired, grid lines are easily added with the grid command.
04
05
06
07
plot(t,x);
xlabel(t);
ylabel(x(t));
axis([-1 1 -1.25 1.25]);
x(t)
1
0
1
1
0.5
0
t
0.5
subplot(1,2,1);
plot(t,x);
xlabel(t);
ylabel(x(t));
axis([-1 1 -1.25 1.25]);
y = sin(2*pi*t);
subplot(1,2,2);
plot(t,y);
xlabel(t);
ylabel(y(t));
axis([-1 1 -1.25 1.25]);
Although the plots of Fig. A.3 allow a side-by-side comparison of cos(2t) and sin(2t), an
even more eective presentation method is to graph the two functions on a single plot. MATLAB
633
1
y(t)
x(t)
1
0
1
0
1
0.5
0
t
0.5
0.5
0
t
0.5
subplot(1,1,1);
plot(t,x,k-,t,y,k--);
xlabel(t);
ylabel(Amplitude);
axis([-1 1 -1.25 1.25]);
legend(x(t),y(t),location,EastOutside);
The subplot(1,1,1) command of line 19 returns the gure window from the previous pair of
subplots (lines 0818) to a single plot conguration. To plot both x(t) and y(t) on the same graph,
we type plot(t,x,t,y). The additional arguments k- and k-- shown in line 20 tell MATLAB
to use a black solid line for the rst curve x(t) and to use a black dashed line for the second curve
y(t). MATLABs help resources provide details on these and other plot options. Line 24 uses the
legend command to identify each curve. The result, shown in Figure A.4, is a quality plot.
Amplitude
1
x(t)
y(t)
0
1
1
0.5
0
t
0.5
Figure A.4: MATLAB plot of x(t) = cos(2t) (solid) and y(t) = sin(2t) (dashed).
To simplify plotting discrete-time data, MATLAB oers the stem command, which operates
much like the plot command, although multiple overlapping curves are not allowed. To provide an
example, consider plotting the discrete-time sinusoid x[n] = cos(2n/10) over the two-period time
interval 10 n < 9. Aside from using stem rather than plot, the code is nearly identical to our
earlier example of plotting x(t) = cos(2t). The result is shown in Fig. A.5.
25
26
27
28
29
30
n = -10:9;
x = cos(2*pi*n/10);
stem(n,x);
xlabel(n);
ylabel(x[n]);
axis([-10.5 9.5 -1.25 1.25]);
A
similar result is obtained by typing clf, a command that clears the current gure window.
634
Appendix A. MATLAB
x[n]
1
0
1
10
0
n
x = 0:9;
x>5
ans = 0 0
Since line 02 tests the length-10 vector x, the result is a length-10 vector of logical 0s (when x is
not greater than 5) and logical 1s (when x is greater than 5). As expected, we see that the last four
elements of vector x satisfy the condition that x>5. To provide another example, let us next test
which elements of x are less than or equal to 8.
03
x<=8
ans = 1
In this case, we see that all but the last element of x satisfy the condition x<=8.
MATLAB also provides logical and, or, and not operators: &, |, and ~, respectively. Like
relational operators, logical operators function in an element-wise fashion. In combination with
relational operators, logical operators are useful in many tasks. For example, we can determine if
5 < x 8 by logically anding the result of x>5 and x<=8.
04
(x>5)&(x<=8)
ans = 0 0 0
Only three elements of the length-10 vector x satisfy the condition 5 < x 8.
One powerful use of logical data is in logical indexing. In logical indexing, a logical vector is
parenthetically passed to a variable to select only those elements where the logical vector is true
(logical 1). In other words, when a logical data type is passed as an index to a variable, it positionally
indicates (by 1s) which elements to select. To provide an example, let us use logical indexing to
extract the elements of vector x that satisfy 5 < x 8.
05
x((x>5)&(x<=8))
ans = 6 7 8
In line 05, the combined relational and logical operations of (x>5)&(x<=8) produce the length-10
logical result 0 0 0 0 0 0 1 1 1 0. Used as a logical index, this result selects the seventh, eighth,
and ninth elements of x, which have values 6, 7, and 8, respectively. We can obtain the same result
through ordinary (linear) indexing by explicitly specifying that we need elements 7, 8, and 9 of
vector x.
635
06
x(7:9)
ans = 6
Logical indexing is often simpler and more intuitive than linear indexing.
It is worth pointing out that logical indexing requires the index to have a logical data type. It is
not enough to specify a vector of 1s and 0s; a logical vector of 1s and 0s is required. For example, it
might appear that x([0 0 0 0 0 0 1 1 1 0]) would behave the same as line 05, but it produces
an error instead.
07
x([0 0 0 0 0 0 1 1 1 0])
??? Subscript indices must either be real positive integers or logicals.
x(logical([0 0 0 0 0 0 1 1 1 0]))
ans = 6 7 8
This is not to say that MATLABs bracket notation cannot be directly used for indexing. Bracket
notation is fully capable of indexing as long as the elements concatenated together are valid indices.
In fact, brackets allow for very exible indexing that would otherwise be dicult to achieve, such as
reordering or repeating elements. To provide two examples, x([1:2:end,2:2:end]) reorders x so
that the even elements precede the odd elements, and x([5 5 5 4 4]) repeats the fth element of
x three times and the fourth element twice.
09
10
x([1:2:end,2:2:end])
ans = 0 2 4 6 8 1
x([5 5 5 4 4])
ans = 4 4 4 3 3
As we shall see in the next section, relational and logical operators are also very useful in
constructing functions.
1 t>0
1
t=0 .
u(t) =
2
0 t<0
Argument names can be arbitrarily selected since they are internal (local) to an anonymous function
and do not correspond to desktop variables. Still, it is good practice to follow sensible naming
conventions. For our unit step function, we name the argument t to correspond with time and then
use relational operators to represent the piecewise character of the function.
01
u = @(t) 1.0*(t>0)+0.5*(t==0);
636
Appendix A. MATLAB
Like other MATLAB functions, anonymous functions are used by parenthetically passing arguments
to the function name. For example, we type u(-1:0.5:1) to evaluate our unit step function at
values t = 1, 0.5, 0, 0.5, and 1.
02
u(-1:0.5:1)
ans = 0 0 0.5000
1.0000
1.0000
Anonymous functions can also be used in the construction of other anonymous functions. Suppose,
for example, that we want to dene the function x(t) = et u(t). We can create an anonymous
function x that itself uses the anonymous function u previously dened.
03
x = @(t) exp(-t).*u(t);
Notice in line 03 that element-by-element multiplication is needed to properly multiply exp(-t) and
u(t). Let us evaluate and plot this function over the interval 1 t 3. First, we construct a
time vector t, and then we plot the function x evaluated at these time instances. Figure A.6 shows
the result, a causal signal that exponentially decays with time.
04
05
06
07
08
t = -1:0.0001:3;
plot(t,x(t))
axis([-1 3 -0.25 1.25]);
xlabel(t);
ylabel(x(t));
x(t)
1
0.5
0
1
1
t
1
x(1t)
09
10
11
12
0.5
0
1
1
t
637
Comparing Figs. A.6 and A.7, we see that x(1-t) is just a reected and shifted version of x(t), as
expected.
Like anonymous functions, program control statements also enhance MATLAB functionality. Let
us briey consider three important types of program control: conditional execution, for loops, and
while loops. MATLABs if, elseif, and else statements allow conditional execution of code. The
syntax is
if logicalexpression1
statements1
elseif logicalexpression2
statements2
else
statements3
end
The elseif and else components can be removed or additional elseif statements can be added
as circumstances warrant.
MATLABs for statement allows repeated execution of a code segment. The syntax is
for LoopVariableName = values
statements
end
The statements within a for loop execute once for each value taken by the loop variable. Loop
variable values are usually specied as a vector using the a:b:c notation but can also be formed
using brackets or mathematical expressions. For example, (1:4), [1 1 1 4], and (1:4).^2 are all
valid ways to specify four values of a loop variable.
MATLABs while statement, which repeats execution of a code segment until some condition is
met, has a syntax that is very similar to the for statement.
while logicalexpression
statements
end
Of course, MATLAB allows nested while, for, and if statements.
To provide an example of using program control statements, let us write a program that determines the product of all prime numbers between 1 and 20.
13
14
15
16
17
18
19
result = 1;
for n = 1:20,
if isprime(n),
result = result*n;
end
end
result
result = 9699690
Line 13 initializes variable result, and line 14 establishes a for loop that sequences the loop variable
n through the 20 integers ranging from 1 to 20. Line 15 uses an if statement and MATLABs
isprime command to check whether the loop variable n is prime. If the loop variable n is prime,
line 16 updates the result variable. Line 17 concludes the if statement, and line 18 concludes the
for loop. Line 19 provides the somewhat surprisingly large result of 9699690.
Often, loops and other program control statements can be avoided by using clever programming
techniques. Consider the following alternate code that also computes the product of all prime
numbers between 1 and 20:
638
20
Appendix A. MATLAB
Here, the prod command computes the product of all values of vector n that, using logical indexing,
are found to be prime. Clearly, line 20 is a more compact way to perform the tasks of lines 1319.
However, the program of lines 1319 is probably more understandable, particularly to those who
are not experts in MATLAB syntax.
Another option to consider in functions is the script, or M-le, function. Unlike anonymous
functions, which do not require their own separate les, a script function requires a dedicated M-le.
The syntax of an M-le function is
function [output list] = FunctionName(input list)
statements
The rst line of a script function le must begin with the function keyword followed by a bracketed
list of outputs, an equal sign, and then the function name with a parenthetical list of inputs. The
remainder of the M-le contains the statements needed to dene the function. The le should be
named the same as the function and use a .m extension.
To provide an example, let us modify the code of line 20 to create a script function that computes
the product of all primes from 1 to a user-dened end value of N.
function [result] = ProductOfPrimes(N)
n = 1:N; result = prod(n(isprime(n)));
Saving these two lines of code as a text le named ProductOfPrimes.m creates the desired script
function. To test the function, we simply type the function name at the command prompt along
with the desired input value. To provide two examples, consider computing the product of primes
up to 20 and 100, respectively.
21
22
ProductOfPrimes(20)
ans = 9699690
ProductOfPrimes(100)
ans = 2.3056e+036
MATLAB Tips
We conclude this introduction to MATLAB with a few useful tips. Some tips involve advancedlevel MATLAB commands not covered in this introduction; in these cases, MATLAB help resources
should be consulted.
1. Use command-line help for unfamiliar functions. Command-line help provides basic function
information and syntax and often concludes with a See also section that identies related
MATLAB commands; this is a great way to learn new MATLAB instructions. If the commandline help is insucient, seek the browser help, which tends to be more complete.
2. Use the up and down arrow keys to speed up your command-line operations. Pressing the
up or down arrow keys will scroll through the recent command history, allowing you to easily
repeat commands without retyping them. By typing the rst few characters of your desired
sequence followed by the up or down arrow keys, MATLAB will only display commands in
the history that begin with the same characters. Simultaneously press Control and C to
break out of a never-ending program.
3. Remain aware of the dierence between matrix and element-wise computations, and use the
operation appropriate to your task. Often, matrix operators become element-wise operators
when proceeded with a period (.). Element-wise operations require objects have the same size
(dimensions); for simplicity, use the (:) notation to force all vectors into column vectors.
639
4. Except for the most trivial of computations, use an M-le for your work. M-les allow you
to easily debug your program, reproduce your work, and modify programs to accommodate
inevitable changes. Include comment lines at the beginning of your code that provide enough
description so that you know what the program does. Use code cells, where each cell begins
with the %% notation, to divide a large M-le into manageable parts.
5. Use anonymous or M-le functions when you need a result but do not really care about
intermediate variables. Variables internal to functions are generally considered local and thus
never appear on the desktop.
6. Label your gure axes. For most publications, do not use color. Rather, create black-andwhite graphics that print clearly using black-and-white printers. When plotting graphics, use
an appropriate resolution. If you plot too few points, your graph will be jagged and will not
properly reect the function. If you plot too many points, the graph will become excessively
large, which causes excessive le sizes and can dramatically slow down document printing. Use
the print command to convert gures to your preferred le format, and then embed them at
a suitable scale into your report. If you dont need to produce a formal report, consolidate
multiple graphs onto a single sheet using subplots.
7. Verify that your MATLAB results make sense. MATLAB has inherent limits in accuracy since
it represents numbers with a nite number of bits. Certain operations compound these errors
and can result in signicant accuracy problems. An analytically correct expression is not always
enough; use of numerically robust algorithms can help. Dierences of large numbers, ratios of
large factorials, rooting of high-order polynomials, and inverses of ill-conditioned matrices are
all examples of situations where accuracy may become an issue.
8. Spend time to become procient with MATLAB Handle Graphics, beginning with the get
and set commands. Handle Graphics allows for the most customizable and professional plots.
Perform all plot annotations and modications using commands in your M-le, as opposed
to using pull-down menus and mouse clicks. Only in this way will you be able to reliably,
accurately, and quickly reproduce your plots, as well as tweak the look of your plot to meet
your requirements. The more complicated the plot, the more important this advice becomes.
While they may not look it, nearly every gure in this book has been created using MATLAB
and its Handle Graphics commands.
9. Learn how to use MATLABs low-level I/O commands, such as the fprintf command. Although they may be somewhat cumbersome to use, they are extremely powerful. They are
eective at formatting data to more readable formats (thereby saving you lots of cutting, pasting, and typing); they are also eective in helping automate the collection and storage of large
data sets.
10. When things go wrong (and they will), debug your MATLAB code just as you would any
programming language: systematically verify your sequence of code. MATLAB has many
useful features to assist with this task, including detailed error reporting, breakpoints, and
other debugging features. When possible, try to divide complex code into blocks that can be
individually checked.
Appendix B
Useful Tables
This appendix provides a collection of useful tables for quick reference. While most of these tables
are found in identical form elsewhere in the book, a few are formed from multiple tables or are
altogether new. The tables included in this appendix are summarized as follows:
1. Bilateral and unilateral Laplace transform properties (identical to Table 1.6 on page 72).
2. Bilateral and unilateral z-transform properties (identical to Table 7.2 on page 434).
3. A selection of useful sums (identical to Table 5.1 on page 290).
4. Fourier analysis and synthesis equations (new table).
5. Fundamental Fourier properties (combination of Table 1.2 on page 66 and Table 1.4 on
page 68).
6. Fourier transform and Fourier series properties (identical to Table 1.3 on page 67).
7. Discrete-time Fourier transform and discrete Fourier transform properties (combination of
Table 6.3 on page 356 and Table 9.1 on page 583).
640
641
x(t) =
X(s) =
Synthesis:
+j
st
j X(s)e ds
1
2j
Analysis:
st
dt, ROC: Rx
x(t)e
x(t) =
Synthesis:
+j
st
j X(s)e ds
1
2j
Analysis:
X(s) = 0 x(t)est dt
Linearity:
Linearity:
u
ax(t) + by(t)
aX(s) + bY (s)
Complex Conjugation:
Complex Conjugation:
x (t) X (s ), ROC: Rx
u
x (t)
X (s )
x(t t0 ) X(s)e
Shifting:
st0
, ROC: Rx
tx(t)
d
ds X(s),
ROC: Rx
u
x(t)es0 t
X(s s0 )
Dierentiation:
Lu
d
dt x(t)
sX(s) x(0 )
(general case shown below)
L
u
tx(t)
d
ds X(s)
Time Integration:
t
Lu 1
x( )d
s X(s)
0
Convolution:
Convolution:
u
x(t) y(t)
X(s)Y (s)
Time Integration:
u
If t0 > 0: x(t t0 )
X(s)est0
642
Unilateral z-Transform
Synthesis:
8
1
X(z) z n1 dz
2j
x[n] =
Analysis:n
, ROC: Rx
n= x[n] z
Analysis:
n
X(z) =
n=0 x[n] z
Linearity:
Linearity:
u
ax[n]+by[n]
aX(z)+bY (z)
Complex Conjugation:
Z
Synthesis:
8
1
X(z) z n1 dz
2j
Complex Conjugation:
Z
x [n] X (z ), ROC: Rx
u
x [n]
X (z )
Time Reversal:
Time Reversal:
x[n m] z
Time Shifting:
Z
u
If m > 0: x[n m]u[n m]
z m X(z)
(general case given below)
z-Domain Scaling:
z-Domain Scaling:
u
n x[n]
X(z/)
z-Domain Dierentiation:
z-Domain Dierentiation:
nx[n]
d
z dz
X(z),
u
d
nx[n]
z dz
X(z)
ROC: Rx
Time Convolution:
Time Convolution:
u
x[n] y[n]
X(z)Y (z)
n
r p r n+1
1r
m=p
rm =
m=0
m=
m=0
m2 =
m=0
mrm =
n
n
n
n
m=0
r = 1
n(n+1)
2
n(n+1)(2n+1)
6
r+[n(r1)1]r n+1
(r1)2
m2 r m =
r = 1
n
2 n
r = 1
643
Aperiodic
Periodic
FT
(Analysis):
X() =
x(t)ejt dt
FS (Analysis):
1
Xk =
x(t)ejk0 t dt
T0 T0
Continuous
IFT (Synthesis):
1
x(t) =
X()ejt d
2
k=
DFT (Analysis):
N
1
X[k] =
x[n]ej0 kn ,
DTFT (Analysis):
X() =
x[n]ejn
n=0
n=
Discrete
FS (Synthesis):
x(t) =
Xk ejk0 t
IDTFT
(Synthesis):
1
x[n] =
X()ejn d
2 2
where k = {0 : N 1} and 0 =
2
N
IDFT (Synthesis):
N 1
1
X[k]ej0 kn ,
x[n] =
N
k=0
where n = {0 : N 1} and 0 =
2
N
While the discrete-time Fourier series (DTFS) and the discrete Fourier transform (DFT) both use
1
0 = 2
N , the DTFS diers from the DFT by a scale factor N in the analysis equation and a scale
factor N in the synthesis equation. The DTFS analysis and synthesis equations are thus
X[k] =
N 1
1
x[n]ej0 kn
N n=0
and
x[n] =
N
1
X[k]ej0 kn .
k=0
644
Fourier Series
Synthesis:
X()ejt d
Synthesis:
jk0 t
x(t) =
Xk e
1
2
Analysis:
X() = x(t)ejt dt
Xk =
Analysis:
x(t)ejk0 t dt
T0
1
T0
Duality:
if x(t) X(), then X(t) 2x()
Duality:
Linearity:
ax(t) + by(t) aX() + bY ()
Linearity:
ax(t) + by(t) aXk + bYk
Complex Conjugation:
x (t) X ()
Complex Conjugation:
x (t) Xk
Shifting:
x(t t0 ) X()ejt0
x(t)ej0 t X( 0 )
Shifting:
x(t t0 ) Xk ejk0 t0
x(t)ejk0 0 t Xkk0
x(t) Xk
Dierentiation:
jX()
d
jtx(t) d
X()
Dierentiation:
jk0 Xk
d
dt x(t)
d
dt x(t)
Time Integration:
X()
x( )d j + X(0)()
Time Integration:
Convolution:
x(t) y(t) X()Y ()
1
x(t)y(t) 2
X() Y ()
Correlation:
x,y ( ) = x( ) y ( ) X()Y ()
Ex =
Parsevals:
1
2
2
|x(t)|
dt = 2
|X()| d
Convolution:
Xk Yk
x(t)y(t) Xk Yk
T0 x(t)y(t)
Correlation:
1
( )
T0 x( )y
x,y ( ) =
Px =
1
T0
Xk Yk
Parsevals:
2
|x(t)|
dt = k= |Xk |2
T0
645
x[n] =
Synthesis:
1
jn
d
2 2 X()e
X() =
Analysis:
jn
n= x[n]e
x[n] =
Synthesis:
N 1
j0 kn
,
k=0 X[k]e
0 =
Analysis:
N 1
j0 kn
,
n=0 x[n]e
0 =
1
N
X[k] =
2
N
2
N
Duality:
Duality:
if x[n] X[k], then X[n] N x[kN ]
Linearity:
ax[n] + by[n] aX() + bY ()
Linearity:
ax[n] + by[n] aX[k] + bY [k]
Complex Conjugation:
x [n] X ()
x [n] X ()
Complex Conjugation:
x [n] X [kN ]
x [nN ] X [k]
Shifting:
x[n m] X()ejm
x[n]ej0 n X( 0 )
x[nN ] X[kN ]
Shifting:
x[n mN ] X[k]ej0 km ,
x[n]ej0 mn X[k mN ],
0 = 2
N
0 = 2
N
Dierentiation:
d
jnx[n] d
X()
Dierentiation:
Convolution:
x[n] y[n] X()Y ()
1
x[n]y[n] 2
X()Y
()
Convolution:
x[n]y[n]
X[k]Y [k]
x[n]y[n] N1 X[k]Y
[k]
Correlation:
x,y [l] = x[l] y [l] X()Y ()
Correlation:
x,y [l] = x[l]y
[lN ] X[k]Y [k]
Ex =
Parsevals:
1
2
2
n= |x[n]| = 2 2 |X()| d
Ex =
N 1
n=0
Parsevals:
N 1
|x[n]|2 = N1 k=0 |X[k]|2
Appendix C
Drill Solutions
Chapter 1
Drill 1.1 (CT Time Scaling)
Let x(t) = cos(0 t + ). Compressing x(t) by a > 1 yields
x(at) = cos(0 (at) + ) = cos (a0 t + ) .
This sinusoid has frequency a0 , an a-fold increase, and maintains the original phase .
Expanding x(t) by a > 1 yields
0
t+ .
x(t/a) = cos (0 (t/a) + ) = cos
a
Here, the frequency is decreased a-fold to a0 , and the original phase remains unchanged.
These conclusions are veried in Fig. D1.1, which plots a sinusoid x(t) = sin(2t), its compressed
version x(3t), and an expanded version x(t/2). Clearly, x(3t) has three times the frequency of x(t),
and x(t/2) has half the frequency of x(t).
x(3t) = sin(6t)
x(t) = sin(2t)
1
x(t/2) = sin(t)
2
1
2
1
2
1
Figure D1.1
Drill 1.2 (Combined CT Operations)
Noting that x(3t 4) = x(3 t 4
3 ), we see that this signal is a reected, compressed (by 3),
and shifted (by 43 ) version of x(t), as shown in Fig. D1.2. We know that x(3t 4) achieves a
1 +4
maximum when 3t 4 = T1 or at t = T3
, as conrmed in Fig. D1.2.
646
647
1
x(3t 4)
t
43
T23+4
T13+4
Figure D1.2
Drill 1.3 (CT Unit Gate Representations)
Using Eq. (1.2), we see that (t) = u(t + b) u(t b) for b = 1/2. It is also possible to represent
(t) using reected and time-shifted unit step functions as
(t) = u(t + 1/2) u(t 1/2).
Drill 1.4 (CT Unit Impulse Properties)
Using Eq. (1.5):
(a) (t3 + 2t2 + 3t + 4)(t) = (t3 + 2t2 + 3t + 4)t=0 (t) = 4(t)
(b) (t) sin t2 2 = sin t2 2 t=0 (t) = sin(/2)(t) = (t)
(c) e2t (t + 1) = e2t t=1 (t + 1) = e2 (t + 1)
xb (t)
xa (t)
2
xc (t)
1
4
t
1
t
1
2
1
2
xd (t)
xf (t)
t
2
xe (t)
Figure D1.5
t
1
648
1+j1+j
2j
= 1 and Im {j} =
jj
2j
j+j
2j
= 1.
ejt + ejt
x(t) + x(t)
=
= cos(t).
2
2
ejt ejt
x(t) x(t)
=
= j sin(t).
2
2
The nal step in both cases follows from Eulers formula (see Drill 1.6).
Drill 1.9 (Conjugate-Symmetric and Conjugate-Antisymmetric Decompositions)
Using Eqs. (1.28) and (1.29):
(a)
ejt + ej(t)
xa (t) + xa (t)
=
= ejt
2
2
ejt ej(t)
xa (t) xa (t)
=
=0
xa,ca (t) =
2
2
xa,cs (t) =
(b)
jejt + (j)ej(t)
xb (t) + xb (t)
=
=0
2
2
jejt (j)ej(t)
xb (t) xb (t)
=
= jejt
xb,ca (t) =
2
2
(c) Recognizing xc (t) = 2ej(t+/4) = (1 + j)ejt and using the previous two parts yield
xb,cs (t) =
1
1
1
1
1
[2t + sin(2t) cos(2t)]|t=0 =
(2) = .
sin2 (2t) dt =
Ex =
4
4
2
0
649
x(t)
1
0
Figure D1.10
Drill 1.11 (Signal Power)
Using Eq. (1.33):
(a) Pxa = limT
1
T
1
T
T /2
|C|2 dt = limT
T /2
T /2
T /2
|u(t)|2 dt = limT
1
T0 T0 |C cos(0 t
2
2
|C| 0+2T0 +0
= |C|
T0
4
2 .
(d) Pxd =
1
2
T |C|
1
T0
T0
1
T
T /2
0
|C|2 |ej0 t |2 dt =
+ )|2 dt =
1
T0
T0
T /2
t|t=T /2 = |C|2
1 dt = limT
1
T0
T0
1
T
T /2
t|t=0 =
1
2
|C|2 dt = |C|2
|C cos(0 t)|2 dt =
|C|2
T0
T0
ej20 t +2+ej20 t
4
dt =
(e) For the last part, we begin with Eq. (1.33) and later use Eq. (1.34) as needed:
1 T /2
2
Pxe = lim
|C1 cos(1 t + 1 ) + C2 cos(2 t + 2 )| dt
T T T /2
1 T /2 3
|C1 cos(1 t + 1 )|2 +
= lim
T T T /2
C1 C2
[cos(1 t + 1 + 2 t + 2 ) + cos(1 t + 1 2 t 2 )] +
2
C1 C2
[cos(1 t + 1 + 2 t + 2 ) + cos(1 t + 1 2 t 2 )] +
2
4
|C2 cos(2 t + 2 )|2 dt
When 0 = 1 = 2 = 0, the middle two terms of the integral are simple sinusoids, which
integrate to zero. Using the results of part (d), the nal result simplies to
Pxe =
|C1 |2 + |C2 |2
for 0 = 1 = 2 = 0.
2
1 T /2 3
2
|C1 cos(1 t + 1 )| +
Pxe = lim
T T T /2
C1 C2
[cos(21 t + 1 + 2 ) + cos(1 2 )] +
2
C1 C2
[cos(21 t + 1 + 2 ) + cos(1 2 )] +
2
4
|C2 cos(2 t + 2 )|
dt.
650
The cos(21 t + 1 + 2 ) terms, being simple sinusoids, integrate to zero. This leaves
1 T /2 3
2
|C1 cos(1 t + 1 )| +
Pxe = lim
T T T /2
C1 C2 + C1 C2
cos(1 2 )+
2
4
|C2 cos(2 t + 2 )|
dt.
T /2
T /2
|e
T /2
1 e2at
1 eaT eaT
.
| dt = lim
= lim
T T 2a
T T
2a
t=T /2
at 2
Px = lim
k=1
k=1
2
k=1
2
k=1
2
Re {ck xk (t)}
Re {ck } Re {xk (t)} Im {ck } Im {xk (t)}
Re {ck } yk (t) Im {ck } Im {xk (t)}
k=1
=
2
k=1
ck yk (t).
651
Since the superposition property does not hold, the system y(t) = Re {x(t)} is not linear.
Drill 1.14 (Testing LTIC Systems for BIBO Stability)
Eq. (1.41) states that the output of an LTIC system is given by
y(t) =
x( )h(t ) d.
x( )h(t ) d <
|y(t)| =
|x( )h(t )| d.
Using Eq. (1.44), we can establish BIBO stability if |y(t)| is nite for all bounded input |x(t)|
Kx < :
|x( )| |h(t )| d < Kx
|h(t )| d < .
|y(t)| <
Dividing the right-hand inequality by Kx and using a change of variable yield the desired test for
BIBO stability
|h( )| d Kh < .
In other words, an LTIC system is BIBO stable if its impulse response is absolutely integrable.
Drill 1.15 (Computing the Transfer Functions of Common Systems)
(a) An ideal delay of T has impulse response h(t) = (t T ). System behavior is easily veried
using Eqs. (1.41) and (1.9):
x( )h(t ) d =
x( )(t T ) d = x(t T ).
y(t) =
The corresponding system transfer function is directly computed using Eq. (1.46) as
H(s) =
h( )es d =
( T )es d = esT .
H(s) =
b1 s + b0
s
= = s.
a1 s + a0
1
652
X(t)
x(t)
X(t)
2x()
x(t)+x (t)
,
2
Y () =
x(t)x (t)
,
2
Y () =
X() + X ()
= Re {X()} .
2
X() X ()
X() X ()
=j
= jIm {X()} .
2
2j
653
and setting
= 0 yield
20
1
jt0
x(t t0 ) = sinc (0 [t t0 ]) X()e
=
ejt0 .
0
20
Figure D1.18 shows the corresponding rectangular magnitude and linear phase spectra.
X()
|X()|
1
0
t0
0
Figure D1.18
Drill 1.19 (Using the Modulation Property)
t
and the corresponding modulated signal x(t) cos(5t).
Figure D1.19 plots the signal x(t) = 4
Using pair 7 in Table 1.1 yields
t
x(t) =
X() = 4sinc (2) .
4
Combining this with the modulation property of Eq. (1.90) yields
x(t) cos(0 t) 12 X( 0 ) + 12 X( + 0 )
t
.
4
cos(5t) 2sinc (2[ 5]) + 2sinc (2[ + 5])
x(t)
x(t) cos(5t)
1
2
1
Figure D1.19
Drill 1.20 (Proving the Time-Integration Property with Convolution)
The time integration of a signal is represented using convolution as
y(t) =
654
1
j .
1
X()
.
x( ) d X() () +
= X(0)() +
j
j
1
j
e1 t u(t) e2 t u(t)
1
.
(j 1 )(j 2 )
1
1
e1 t e2 t
e1 t u(t) +
e2 t u(t) =
u(t),
1 2
2 1
1 2
.
sinc(1 ) sinc(2 ) 2
21
21 22
22
The product of two unit gate functions is just the smaller of the two unit gate functions. Thus,
3
4
1
t
12 2
1 < 2
2
1
1
.
sinc(1 ) sinc(2 )
3
4
1
t
1
>
1
2
1 22
22
Inverting the right-hand side of the expression yields the nal result of
1
2 sinc(1 ) 1 < 2
sinc(1 ) sinc(2 ) =
.
1
1 sinc(2 ) 1 > 2
Drill 1.23 (Correlation Order Is Important)
From Eqs. (1.97) and (1.98), we know that
x(t + )y (t) dt = x( ) y ( ).
x,y ( ) =
Thus,
y,x ( ) =
y(t + )x (t) dt = y( ) x ( ).
655
y(t )x (t) dt
y (t )x(t) dt.
y,x ( ) =
y (t)x(t + ) dt.
2a
t2 +a2
2
2
4 2 2a
1 2a
2
a||
e
(0 1) =
.
e
d = 4
=
2e
d = 2
2
2a
a
a
0
=0
Chapter 2
Drill 2.1 (Characterizing Behavior of a Real LTIC System)
Taking the Laplace transform of the system dierential equation yields (s2 +3s+2)Y (s) = (s+5)X(s).
Taking the ratio of Y (s)/X(s) and factoring the denominator yield the system transfer function
H(s) =
s+5
.
(s + 2)(s + 1)
There are two poles (p1 = 2 and p2 = 1) and one nite zero (z1 = 5), as shown in Fig. D2.1a.
There is also one zero at innity. The poles are nearest to the origin, which will boost the lowfrequency response, and the zero at innity ensures that high frequencies are eliminated. Thus, we
expect the response to be lowpass, with dc gain of H(0) = 5/2 = 2.5. This prediction is veried
with MATLAB-generated magnitude and phase response plots, as shown in Figs. D2.1b and D2.1c.
01
02
03
04
05
656
|H(j)|
Im {s}
2.5
2 1
Re {s}
0.5114
0
(a)
(b)
H(j)
x(t)
20
0
9
2
3
2
3
y(t)
1.6914
20
(c)
(d)
Figure D2.1
The input x(t) = 20 sin(3t /4) has radian frequency 3 rad/s. Consulting the magnitude and
phase plots at this frequency, the response y(t) to input x(t) is thus
y(t) = |H(j3)|20 sin[3t /4 + H(j3)] = 0.5114(20) sin(3t /4 1.6914)
= 10.2282 sin(3t 2.4768).
The output is shown in Fig. D2.1d, which also plots the input for reference.
Drill 2.2 (Characterizing Behavior of a Complex LTIC System)
Similar to Ex. 2.2, MATLAB computes and plots the system zeros and poles, which are shown in
Fig. D2.2a.
01
02
No conjugate poles accompany the repeated pole at s = 1 + 2j, which conrms that the system
must be complex. Since the poles are nearest to frequency = 2, we expect strong gain near this
657
(positive) frequency. The zero at s = 2j ensures that the response is zero at the negative frequency
= 2. Additionally, there is a zero at innity. Thus, we expect a response that peaks near = 2,
is zero at = 2, and decays to zero as .
Our predictions about system behavior are veried with MATLAB-generated magnitude and
phase response plots, as shown in Figs. D2.2b and D2.2c. Neither response has the symmetry
necessary for a real system.
03
04
|H(j)|
Im {s}
4
2
(b)
Re {s}
H(j)
2
6
(c)
(a)
Figure D2.2
Since the system is complex, Eq. (2.5) cannot be used to determine the output y(t) in response
to input x(t). Rather, we expand x(t) using Eulers formula as
x(t) = 10 sin(2t + /4) =
10ej(2t+/4) 10ej(2t+/4)
.
2j
Due to the system zero at s = 2j, the component at = 2 is completely removed. This leaves a
single complex exponential component to the input, the output of which is computed using Eq. (2.1).
Consulting the magnitude and phase plots at this frequency, the response y(t) to input x(t) is thus
y(t) = |H(j2)|
10 j[2t+/4+H(j2)]
e
= (4)5ej/2 ej(2t+/4+/2)
2j
= 20ej(2t+/4) .
658
1/3
1/3
+
.
j 1 j + 2
1 t
1
e u(t) + e2t u(t).
3
3
Since this everlasting Gaussian impulse response is noncausal (h(t) = 0 for t < 0), the system
is unrealizable.
(b) Using Eq. (2.19), we evaluate the Paley-Wiener criterion according to
| ln |H()| |
2
d
=
d = tan1 () = .
2
2
1+
1 +
Since this integral is not nite, the criterion is violated, and the system is unrealizable.
659
Line 01 denes a normalized time vector (t/T ) and denes the rectangular window. Following
Table 2.1, line 02 denes the Kaiser window. Line 03 begins a for loop to treat each value of . Line
04 plots the Kaiser window for the current . Eective window width is computed in exactly the
same manner as eective bandwidth, treated in Ch. 1. In fact, lines 0507 are basically identical to
lines 0103 in Ex. 1.14, which are explained on page 64. The only signicant dierence is that line
07 uses the fminbnd function rather than the fminsearch function; this function allows a bounded
search just over the nite duration of the window function. Figure D2.6 plots the resulting Kaiser
windows and summarizes normalized window energy Ew /T and eective window width W/T for the
dierent . The price of ever-smoother windows is an ever-smaller eective window width.
w(t)
=0
1
0
1
2
3
5
10
20
3
5
20
W/T
0.95
0.9329
0.8665
0.7595
0.5999
0.4306
0.3072
10
T2
Ew /T
1
0.8656
0.6627
0.5320
0.4034
0.2823
0.1988
T
2
Figure D2.6
Drill 2.7 (Lowpass-to-Lowpass Transformation)
First, we determine the half-power (3-dB) frequency of the lowpass prototype by solving
|H(j0 )|2 =
1
4
=
02 + 4
2
w0 = 2.
Using Eq. (2.25), the lowpass-to-lowpass transformation rule and transformed lter are thus
s
0 s
2s
=
1
3
3
2
=
.
2s/3 + 2
s+3
660
The magnitude response of the transformed lter, shown in Fig. D2.7, conrms that the 3-dB
frequency is correctly located at 3 rad/s.
|H()|
1
1
2
Figure D2.7
Drill 2.8 (Lowpass-to-Bandpass Transformation)
First, we determine the half-power (3-dB) frequency of the lowpass prototype by solving
|H(j0 )|2 =
1
4
=
02 + 4
2
w0 = 2.
s2 + 1(3)
s2 + 3
s2 + 1 2
=2
=
.
s(2 1 )
s(3 1)
s
|H()|
1
1
2
Figure D2.8
Drill 2.9 (Determining Butterworth Lowpass Filter Order)
To begin, we convert p and s into the corresponding attenuation parameters using Eq. (2.24).
Then, as in Ex. 2.11, we use Eq. (2.38) to determine lter order K.
01
02
03
Thus, a ninth-order Butterworth lowpass lter is required to meet the given specications.
661
The value corresponding to the upper transition band is the most restrictive and dictates the lowpass
prototype order.
04
05
Thus, the
1.01
29
337
1.1
10
36
2
4
5
5
2
3
10
2 .
2
For more restrictive specications, Chebyshev lter order can be an impressive order of magnitude
smaller than the Butterworth case. Further, a Chebyshev lter never has higher order than a
comparable Butterworth lter.
Drill 2.12 (Eect of Passband Ripple on Chebyshev Pole Locations)
To locate the Chebyshev poles from Butterworth circles and poles, the Butterworth circle radii and
pole locations are rst computed using Eqs. (2.47) and (2.35).
01
02
03
04
To provide reference, the Butterworth circles and Chebyshev ellipse are next found.
05
06
07
omega = linspace(0,2*pi*3/4,1001);
Bcircle1 = Bradius1*exp(1j*omega); Bcircle2 = Bradius2*exp(1j*omega);
Cellipse = Bradius1*cos(omega)+1j*Bradius2*sin(omega);
plot(real(Bcircle1),imag(Bcircle1),--,real(B1pk),imag(B1pk),x,...
real(Bcircle2),imag(Bcircle2),--,real(B2pk),imag(B2pk),x,...
real(Cellipse),imag(Cellipse),--,real(Cpk),imag(Cpk),x)
662
Im {s}
0.30
Im {s}
Re {s}
Im {s}
Re {s}
Re {s}
0.73
1.04
(a)
1.24
(b)
1.27
1.62
(c)
Figure D2.12
The results, using p = 3 dB, are shown in Fig. D2.12a.
The p = 0.3 dB and p = 0.03 dB cases, shown in Figs. D2.12b and D2.12c, respectively,
are produced with simple modication to line 01. As Fig. D2.12 demonstrates, the Chebyshev
ellipse expands and converges toward a circle as p is decreased. That is, as we eliminate our
tolerance for passband ripple, our Chebyshev lter looks more and more like a Butterworth response.
Drill 2.13 (Chebyshev Lowpass Filter Design)
Although the problem species an order of K = 6, we begin by computing the minimum order to
meet the given specications.
01
02
03
Since the minimum required order is four, our sixth-order solution will likely exceed specications
by signicant margins. If we proceed as in Ex. 2.13, we can construct passband and stopband buer
zones, but our passband ripple will meet specications exactly without margin for error (due to the
nature of the Chebyshev response, stopband behavior will exceed specications everywhere). Thus,
it is worthwhile to strengthen our passband ripple constraint. Consider what happens when the
passband ripple requirement is reduced by a factor of 10 so that p 0.01. Making the appropriate
change to line 01 and re-executing lines 0103 yield the result K = 5, which is still below the specied
order of six.
Using the strengthened passband ripple requirement, we can design a K = 6 lter whose response
nicely exceeds all specications. As in Ex. 2.13, we choose p as the mean of the two limiting
extremes.
04
05
06
K = 6;
omegap = [omegap,omegas/cosh(acosh(sqrt((10^(alphas/10)-1)/(10^(alphap/10)-1)))/K)];
omegap = mean(omegap)
omegap = 13.2306
Next, we use Eqs. (2.44), (2.45), (2.47), and (2.48) to determine the desired transfer function
coecients.
05
06
07
08
663
09
B = H0*prod(-pk), A = poly(pk)
B = 1176347.05
A = 1.00 23.29 533.73 6724.15
65864.89
388261.43
1188229.35
Thus,
H(s) =
1176347.05
.
s6 + 23.29s5 + 533.73s4 + 6724.15s3 + 65864.89s2 + 388261.43s + 1188229.35
The corresponding magnitude response, plotted using MATLAB, is shown in Fig. D2.13a. Given
the stringent passband ripple requirement, the zoom plot of Fig. D2.13b more clearly shows that
passband requirements are met, and the dB plot of Fig. D2.13c better illustrates that stopband
requirements are met.
10
11
12
13
|H(j)|
1
0.9
10
30
(a)
|H(j)|
1
0.99
0
10
(b)
30
10
(c)
30
20 log10 |H(j)|
0
20
40
60
Figure D2.13
Although the designed lter easily meets all specications, the solution is not unique. An innite
number of possible lters exist that satisfy all the constraints of the problem.
Drill 2.14 (Investigating Bessel-Thomson Filter Characteristics)
Using Table 2.5, a fth-order normalized (1 = 1) Bessel-Thomson prototype transfer function is
664
given as
Hp (s) =
BK (0)
945
= 5
.
BK (s)
s + 15s4 + 105s3 + 420s2 + 945s + 945
945(1020)
.
s5 + 15(104 )s4 + 105(108)s3 + 420(1012)s2 + 945(1016)s + 945(1020)
The corresponding magnitude and delay responses, shown in Fig. D2.14, are computed using MATLAB. The delay response calculation of line 04 is a numerical approximation based on a simple
d
H(j).
rst-order dierence approximation to the derivative d
01
02
03
04
05
2.431
41
51
41
51
(a)
d
d
H(j)
100 s
50 s
0
2.711
(b)
Figure D2.14
Using Fig. D2.14a, the 3-dB frequency is found to be approximately 2.431 , or 24300 rad/s. To
determine the bandwidth over which the delay response of Fig. D2.14b is approximately constant
requires us to quantify what is meant by approximately constant. Using a tolerance of 1%, we
nd that bandwidth of constant delay is approximately 2.711, or 27100 rad/s.
Chapter 3
Drill 3.1 (Determining the Nyquist Rate and the Nyquist Interval)
Bt
From pair 8 of Table 1.1, we know B
2B
. Thus, sinc(100t) has spectral width of
sinc
665
Line 01 dene the samples x[n] of the rectangular pulse, the limits N for plotting, and the normalized time vector t/T . Lines 0204 estimate the corresponding continuous-time, bandlimited signal
x(t) using the interpolation formula of Eq. (3.13). Lastly, line 05 plots the result, shown in Fig. D3.3,
including the original samples. Clearly, x
(t) is not a continuous-time rectangular pulse. Rather, it
is a bandlimited pulse whose samples, properly aligned, are a rectangular pulse. The interpolation
formula, which necessarily produces bandlimited signals, should not produce a true continuous-time
rectangular pulse, which has innite bandwidth.
x
(t)
1
15
10
10
15
t
T
Figure D3.3
Drill 3.4 (Graphical Verication of Aliasing in Sinusoids)
Figure D3.4a shows the spectrum of signal x(t) = cos[(s /2+1)t]. When x(t) is sampled to produce
x(t), the spectrum X() is replicated every s , as shown in Fig. D3.4b. Over s s , we
see the original spectrum (k = 0 replicate) as well as portions of two other replicates (k = 1 and
k = 1). Figure D3.4c shows the spectrum of signal y(t) = cos[(s /2 1 )t]. When y(t) is sampled
to produce y(t), the spectrum Y () is replicated every s , as shown in Fig. D3.4d. Although the
666
impulses correspond to dierent replicates, it is clear that the two sampled signal spectra are equal;
that is, Y() = X(). The result also holds true for 1 > s /2, although the labeling of replicates
will likely change somewhat.
1
2
2s 1
X()
2s
s
2
s
2
+1
(a)
k = 1
k = 0
1
2
X()
k = 1
k = 0
2s 1
2s
2s +1
s
2
s
2
s
2
s
2
s
2
+1
(b)
1
2
2s
Y ()
2s +1
(c)
k = 1
k = 0
1
2
Y()
k = 1
k = 0
2s 1
2s
2s +1
s
2
s
2
s
2
+1
(d)
Figure D3.4
Drill 3.5 (Anti-Aliasing Filter Type Is Important)
Recall that when a signal is sampled, all frequency content beyond Fs /2 aliases back to the fundamental band [Fs /2, Fs /2). If the sampled signal has broadband noise or broadband content, the
fundamental-band accumulation of multiple aliases can be signicant. A good anti-aliasing lter
needs to remove the high-frequency components so that the fundamental-band accumulation of
aliased components is limited and, hopefully, insignicant.
A lowpass Butterworth lter has a monotonically decreasing frequency response. What this
means is that components at ever-higher frequencies are increasingly attenuated. Even the lowest
Butterworth roll-o of 20 dB/dec ensures that there is a limit to the total accumulation of aliased
content from higher frequencies. Each decade increase in frequency is accompanied by at least a
tenfold reduction in gain. Aliased content is only signicant for a nite number of foldings, which
ensures that the total accumulation is likewise limited.
The roll-o of an elliptic lter, on the other hand, is at best 20 dB/dec (odd-order lters) and
at worst 0 dB/dec (even-order lters). In the case of an even-order elliptic lter, the combination
of a xed attenuation with innite aliases translates to a potentially devastating distortion of the
fundamental band. Even a minuscule stopband gain, when compounded with an innite number of
foldings, can produce unacceptable results.
667
2
20
20 n) = cos(2 20 n). Since cos is an even
9
function, it follows that x2 (nT ) = cos(2 20 n) = x1 (nT ).
Had the signals x1 (t) and x2 (t) been each oset in phase by some factor , their sampled
versions, while identical in |fa |, would dier by a sign factor in the phase term. To understand why,
notice that the apparent frequency of x1 (t) is f0 + Fs /2Fs Fs /2 = 90 + 100200 100 = 90 Hz,
whereas the apparent frequency of x2 (t) is 110 + 100200 100 = 90. Since the two apparent
frequencies dier by a sign, the phase of the corresponding apparent sinusoids will also dier by a
sign factor, as explained in the text.
Drill 3.7 (An Alternate Form for Apparent Sinusoids)
Using Eq. (3.14) to compute apparent frequency fa , we know that signal sin(2f0 t + ) will appear
as sin(2fa t + ). If fa < 0, we can rewrite the apparent sinusoid as sin(2|fa |t + ). Since
sin(x) = sin(x), the resulting apparent sinusoid is represented as
sin(2|fa |t )
for fa < 0.
Thus, when the original signal is in the form of sine rather than cosine, the apparent sinusoid
includes both a phase reversal and an amplitude sign change.
Drill 3.8 (Computing Apparent Frequency)
From Eq. (3.14), we compute apparent frequency as fa = f0 + Fs /2Fs Fs /2. In each case, the
sampling frequency remains constant at Fs = 100 Hz.
(a) For f0 = 40 Hz, fa = 40 + 50100 50 = 40, and |fa | = 40.
(b) For f0 = 60 Hz, fa = 60 + 50100 50 = 40, and |fa | = 40.
(c) For f0 = 140 Hz, fa = 140 + 50100 50 = 40, and |fa | = 40.
(d) For f0 = 160 Hz, fa = 160 + 50100 50 = 40, and |fa | = 40.
Interestingly, each of the four cases has, in absolute value, the same apparent frequency.
Drill 3.9 (Sampling a Bandpass Signal)
Using Eq. (3.16), we determine that the maximum possible number of replicates in band 0 to f1 is
.
Kmax
/
f2
=
1.
B
668
(K = 0 case)
(K = 1 case)
.
(K = 2 case)
(all K > 2)
From these calculations, the lowest possible sampling rate is clearly bound by Fs = 14/3 kHz.
Drill 3.10 (Sampling a Complex Bandpass Signal)
2
Figure D3.10 illustrates the spectrum X() = 1
of complex signal x(t). This signal,
2
2
which is comprised solely of positive-frequency components, has a bandwidth of 2 rad/s. Further,
this bandwidth constitutes the entire spectral duration of the signal. Consequently, x(t) can be
recovered from samples taken at any rate that exceeds this width,
s > 2 rad/s
or
Fs >
1
Hz.
or
FNyq >
3
Hz.
X()
1
Figure D3.10
Drill 3.11 (Computing the Number of Bits and Baud Rate)
The number of bits needed to encode the 128 possible states (characters) is
B = log2 (128) = 7.
Thus, to transmit 100000 characters per second requires a baud rate of
7 100000 = 700000 bits/s.
Drill 3.12 (Quantization with M -ary Symbols)
Using M -ary numbers, a total of B digits produces L = M B distinct states (or levels). Thus, to
represent L levels requires B = logM (L) digits. The ceiling operator is used to ensure an integer
number of digits B.
Using these relations, we compute the number of digits required to achieve L = 64 levels for the
cases M = 2, 3, 4, 5, 6, 7, and 8.
M
2
3
4
5
6
7
8
logM (L) 6.0000 3.7856 3.0000 2.5841 2.3211 2.1372 2.0000
6
4
3
3
3
3
2
B
669
xq [n]
Vref
x(t)
5
1
10
11
n
Vref
Figure D3.13
Drill 3.14 (Quantization Can Amplify Noise)
Whenever a signal stays for an extended period of time at a level that is also a quantization boundary, any amount of noise, no matter how small, will cause the sample to jitter in random fashion
from one side to the other. In essence, the quantization process acts as a low-noise amplier
whenever the nominal state of the signal is also a quantization boundary.
Such is the situation for an asymmetric truncating converter when x(t) is nominally zero. An
asymmetric rounding converter, on the other hand, does not include 0 as a quantization boundary
and will thus tend to suppress low-level noise when the desired signal x(t) is zero. Using similar
reasoning, a truncating symmetric converter is preferred in this situation over a rounding symmetric
converter since the former does not include 0 as a quantization boundary.
Drill 3.15 (ADC Errors Reduce Dynamic Range)
For a 16-bit converter, each quantization level is 1/216 of full scale, which provides a dynamic range
of 20 log10 (216 ) = 96.3296 dB. For a 16-bit converter with an ENOB of 12.25, each quantization level
is eectively 1/212.25 of full scale, which reduces the dynamic range to 20 log10 (212.25 ) = 73.7523
dB. Thus, a 16-bit converter with an ENOB of 12.25 loses 96.3296 73.7523 = 22.5772 dB of
dynamic range.
Drill 3.16 (Flash Converters)
Since the converter is asymmetric, zero must be a quantization level. Further, since the reference
voltages are balanced (Vref ) and there are an even number (L = 2B ) of equal-valued resistors
R connected in series, the midpoint of the resistor chain, and thus one of the L 1 quantization
boundaries, is 0 volts. Of the two types of asymmetric converters, only the truncating converter
670
Chapter 4
Drill 4.1 (DT Time Shifting)
To begin, we note that x[n] in Fig. 4.3a is represented as
x[n] = (0.9)n (u[n 3] u[n 11]).
To left shift (advance) this signal by 3 units requires
y[n] = x[n + 3] = (0.9)n+3 (u[n + 3 3] u[n + 3 11]) = 0.729(0.9)n(u[n] u[n 8]).
The original signal x[n] and its shift y[n] = x[n + 3] are shown in Fig. D4.1.
01
02
x[n]
y[n] = x[n + 3]
1
0.729
1
0.729
10
5
(a)
15
5 8
(b)
10
15
Figure D4.1
Drill 4.2 (DT Time Reversal)
In this case, x[n] = en/2 (u[n + 3] u[n 3]) and y[n] = x[n]. Created using MATLAB, Fig. D4.2
illustrates both signals.
01
02
x[n]
y[n] = x[n]
3
1
1
5
(a)
3
(b)
Figure D4.2
671
n=0
n=1
n=2
n=0
n=1
n=2
The original signal x[n] is shown in Fig. D4.5a, and the twofold expansion x [n] = x[2n] is shown in
Fig. D4.5b. There are many ways to interpolate an expanded signal. The approach of Fig. D4.5c is
a linear, or straight-line, interpolation. While this method follows the underlying waveform better
than the upsampled signal x [n], we see that the interpolation is not perfect; in this case, a triangle
wave is produced rather than the expected sinusoid.
672
x[n]
1
5
10
10
10
10
1
(a)
x [n]
1
10
5
1
(b)
xi [n]
1
10
5
5
1
(c)
Figure D4.5
Drill 4.6 (Using Kronecker Delta Functions to Represent Expansion)
The expansion of signal x[n] by factor L using Kronecker delta functions is stated as
x [n] =
x[m][n Lm].
m=
Due to the [n Lm] term, this sum has, at most, one nonzero term for a given n. A nonzero term
only occurs when n Lm = 0, or when n is an integer multiple of L. That is, when n Lm = 0 or
m = n/L, [n Lm] = 1, and the sum evaluates to x[m] = x[n/L]. Taken together, we see that
x[n/L] n = 0, L, 2L, . . .
,
x [n] =
0
otherwise
which is precisely the denition of expansion given in Eq. (4.6).
For the signal x[n] = u[n + 4] u[n 5], which is 1 for 4 n 4 and 0 otherwise, we see from
Eq. (4.13) that an L = 4 expansion is given as
x [n] =
[n 4m].
m=4
x [n]
1
20
10
10
Figure D4.6
20
673
Although this signal is easy to sketch by hand, MATLAB also plots the result with very little
eort (see Fig. D4.6).
01
02
03
(b)
en
(c) e0.6931n
(d)
0.6931 n
e
(e) 2n
(f )
2n
(g) en/4
(h)
ejn
zan = 1n
(b) zbn = en
(c)
zcn = (0.5)n
(f ) zfn = (0.5)n
zh
zd
zc
zg
za
zb
ze
zf
zan
zbn
20
zdn
zcn
20
20
n
4
zfn
zen
20
zgn
20
zhn
20
4
Figure D4.7
Figure D4.7 locates each constant z and plots the corresponding DT exponential. Cases (c),
(d), (f), and (g) are located inside the unit circle and correspond to decaying exponentials. Cases
(b) and (e) are located outside the unit circle and correspond to growing exponentials. Cases (a)
and (h) are located on the unit circle and correspond to exponentials with constant envelopes. The
674
plots also conrm that the decay or growth rate of a DT exponential z n is related to the distance
of z from the unit circle. Values of z close to the unit circle decay or grow more slowly than those
that are further away.
Drill 4.8 (Apparent Frequency of DT Sinusoids)
Using Eq. (4.17), we nd the apparent frequencies of = [2, 3, 5, 3.2, 22.1327, + 2] as
a = [0, , , 0.8, 3, + 2].
Taking the absolute value yields the desired result of
|a | = [0, , , 0.8, 3, 2].
We know that a DT sinusoid of frequency can be expressed in terms of |a | as
cos(|a |n + ) a 0
.
cos(n + ) =
cos(|a |n ) a < 0
Since a < 0 in all but the rst case, the phase changes sign for all but the rst case. Interestingly,
the cases with a = can also be represented as a = , which requires no sign change in phase
(see Prob. 4.2-10).
Drill 4.9 (Exponentially-Varying DT Sinusoids)
Since 49/6 + 2 = /6, both xa [n] and xb [n] have the same apparent frequency of a = /6.
Further, note that
49
n ) = 0.5ej/3 (1.1ej/6 )n + 0.5ej/3 (1.1ej/6 )n .
6
3
Thus, xa [n] requires two exponentials z1n and z2n , where
xb [n] = (1.1)n cos(
z1 = 0.9ej/6
and z2 = 0.9ej/6 .
and z2 = 1.1ej/6 .
xa [n]
xb [n]
1
10
n
10
(a)
(b)
Figure D4.9
675
1
3
= 2
= 0 .
14
14
(c) The sinusoid cos( n) is also aperiodic since its frequency = is a not a rational multiple
of 2.
(d) In the nal case, the sinusoid sin(2.35n + 1) is periodic since its frequency = 2.35 =
247/40 = 2m/N0 is a rational multiple of 2. Thus,
N0 = 40 and = 2
1
47
= 2
= 0 .
40
40
|x[n]|2 =
n=
n=0
|z|2n =
1
.
1 |z|2
Since |z| < 1, Ex is nite, and x[n] is an energy signal (Px = 0).
For |z| = 1, x[n] = u[n] is a constant 1 for all n 0. The power is computed as
N
N
1
1
1
N +1
2
= .
|x[n]| = lim
1 = lim
Px = lim
N 2N + 1
N 2N + 1
N 2N + 1
2
n=0
n=N
Px = lim
n=N
Since the power is innite, x[n] is neither an energy signal nor a power signal.
Drill 4.12 (Approximating Derivatives)
We can approximate a rst derivative dy(t)/dt using forward dierences as
d
1
y([n + 1]T ) y(nT )
y(t)
(y[n + 1] y[n]).
= lim
T 0
dt
T
T
t=nT
Thus, we can approximate a second derivative using forward dierences by observing that
0
1
d
d
d2
1
y(t)
y(t)
= lim
y(t)
T 0 T
dt2
dt
dt
t=nT
t=(n+1)T
t=nT
1 y[n + 2] y[n + 1] y[n + 1] y[n]
T
T
T
1
= 2 (y[n + 2] 2y[n + 1] + y[n]) .
T
676
d
d
Using Eq. (4.52) to approximate each derivative, we approximate dt
2 y(t)+3 dt y(t)+2y(t) = 1000x(t)
as
3
1
(y[n] 2y[n 1] + y[n 2]) + (y[n] y[n 1]) + 2y[n] = x[n].
T2
T
Substituting T = 0.05 yields
400
1000
860
y[n 1] +
y[n 2] =
x[n].
462
462
462
For the initial conditions, we note that y(0) = 0 = y[0] and y(0)
=3
Thus, the initial conditions are
y[0] = 0
1
T
677
(b) Let y1 [n] = |x1 [n]|2 and y2 [n] = |x2 [n]|2 . Multiplying these two equations by c1 and c2 ,
respectively, and then adding yield
c1 y1 [n] + c2 y2 [n] = c1 |x1 [n]|2 + c2 |x2 [n]|2 .
This result is not the same as c1 y1 [n] + c2 y2 [n] = |c1 x1 [n] + c2 x2 [n]|2 , so the system is not
linear.
Next, we shift y[n] = |x[n]|2 to produce y[n m] = |x[n m]|2 . This result also represents
how the system responds to a time-shifted input; that is, x[n m] y[n m]. Thus, the
system is time invariant. Thought of another way, the system operation does not depend on
the independent variable n.
Drill 4.16 (Causality of Backward and Forward Dierence Systems)
Since both systems are LTI, causality is readily established from their respective impulse response
functions. The rst-order backward dierence is given as y[n] = x[n] x[n 1], so its impulse
response is h[n] = [n] [n 1]. Since h[n] = 0 for n < 0, the rst-order backward dierence is
causal.
The rst-order forward dierence is given as y[n] = x[n + 1] x[n], so its impulse response is
h[n] = [n + 1] [n]. Since h[1] = 1 = 0, the rst-order forward dierence is not causal.
Drill 4.17 (Properties of a Time Reversal System)
Let y1 [n] = x1 [n] and y2 [n] = x2 [n]. Multiplying these two equations by c1 and c2 , respectively,
and then adding yield
c1 y1 [n] + c2 y2 [n] = c1 x1 [n] + c2 x2 [n].
This equation also represents how the system responds to a sum of scaled inputs; that is, c1 x1 [n] +
c2 x2 [n] c1 y1 [n] + c2 y2 [n]. Thus, the superposition property holds, and the system is linear.
Next, consider the input x[n] = u[n]. The system output is y[n] = u[n]. Clearly, the output
precedes the input. Thus, the system is not causal.
Notice that the impulse response of this system is h[n] = [n] = [n]. Even though h[n] = 0
for n < 0, we cannot conclude that the system is causal. To understand why, realize that we can
test causality using h[n] only for linear and time-invariant systems, and this system is not time
invariant.
Drill 4.18 (Digital Dierentiator Stability)
The digital dierentiator of Ex. 4.9 is represented as y[n] = T1 (x[n] x[n 1]). If |x[n]| Kx < ,
then
2
1
|y[n]| = | (x[n] x[n 1])| Kx < .
T
T
As long as T > 0, a bounded input is guaranteed to yield a bounded output. Therefore, the digital
dierentiator is BIBO stable.
The response of a DT dierentiator to the unit step x[n] = u[n] is y[n] = T1 [n] (see Eq. (4.12)).
This is a bounded output. The response of a CT dierentiator to x(t) = u(t) is similar:
y(t) = x(t)
= (t) (see Eq. (1.8)). However, this is not a bounded output. Although a digital
dierentiator is BIBO stable, a CT dierentiator is not BIBO stable.
Drill 4.19 (Static and Dynamic Systems)
(a) The output at time n + 1 depends on the input one unit in the past at time n, which requires
that the system possess memory. Further, the output does not depend on future inputs. Thus,
the system y[n + 1] = x[n] is dynamic and causal.
678
(b) The output at time n depends on the input at the same time n, which indicates an instantaneous system. Thus, the system y[n] = (n + 1)x[n] is static and causal.
(c) The output at time n + 1 depends on the input at the same time n + 1, which indicates an
instantaneous system. Thus, the system y[n + 1] = x[n + 1] is static and causal.
(d) The output at time n 1 depends on the input at the future time n, which requires that the
system possess memory. Thus, the system y[n 1] = x[n] is dynamic and noncausal.
Drill 4.20 (Fractional Sampling Rate Conversion)
The structure of Fig. 4.34a expands an input by L and then compresses the result by M . This
L
changes the input sampling rate of Fs to M
Fs . Choosing L and M to be coprime, the desired rate
0.6Fs requires L = 3 and M = 5. Figure D4.20a shows the input signal x[n] = cos(n), where
= 4/30. The L = 3 expander triples the number of points, shown as x [n] in Fig. D4.20b.
Lastly, an M = 5 compressor produces the waveform x [n], shown in Fig. D4.20c, which has 60%
as many points as the original.
01
02
03
04
05
x
L
n
n
n
=
=
=
=
=
@(n) cos(4*pi*n/30).*(mod(n,1)==0);
3; M = 5; xup = @(n) x(n/L); xupdown = @(n) xup(n*M);
0:30; subplot(311); stem(n,x(n));
0:30*L; subplot(312); stem(n,xup(n));
0:30*L/M; subplot(313); stem(n,xupdown(n));
x[n]
1
0
15
30
90
18
1
(a)
x [n]
1
0
45
1
(b)
x [n]
1
0
1
(c)
Figure D4.20
Chapter 5
Drill 5.1 (Iterative Solution to a Dierence Equation)
Following the form of Eq. (5.1), the system is expressed as
y[n] = 2y[n 1] + x[n 1].
679
To begin, we set n = 0 in this equation and use y[1] = 10 and x[0] = 2u[1] = 0 to obtain
y[0] = 2(10) + 0 = 20.
Next, we set n = 1 and use the values y[0] = 20 and x[1] = 2u[0] = 2 to obtain
y[1] = 2(20) + 2 = 42.
Proceeding in this way iteratively, we obtain
y[2] = 2(42) + 2 = 86
y[3] = 2(86) + 2 = 174
..
..
Drill 5.2 (Solution to a Nonrecursive Dierence Equation)
Since the system is nonrecursive, the outputs y[0] and y[1234] are computed through direct substitution. Thus,
1
cos()u[2] + cos(/2)u[1] + cos(0)u[0] + cos(/2)u[1] + cos()u[2]
5
1
= (1 + 0 + 1 + 0 + 0) = 0,
5
y[0] =
and
1
cos(1236/2)u[1236] + cos(1235/2)u[1235] + cos(1234/2)u[1234]+
5
+ cos(1233/2)u[1233] + cos(1232)u[1232]
1
1
= (1 + 0 1 + 0 + 1) = .
5
5
y[1234] =
n =
n =
for
ans
(0:10); stem(n,8*(0.8).^n);
(-1:2); y = zeros(size(n)); y(n<0) = 10;
ind = find(n>=0), y(ind) = 0.8*y(ind-1); end; y(n>=0)
= 8.0000 6.4000 5.1200
(b) Here, the characteristic equation is + 0.8 = 0, so = 0.8 is a characteristic root. Thus, the
zero-input response is of the form
y[n] = c(0.8)n .
Using y[1] = 10, we nd that 10 = c/(0.8) or that c = 8. Thus, the ZIR is
y[n] = 8(0.8)n .
This result, shown in Fig. D5.3b, is conrmed iteratively using MATLAB.
680
01
02
03
n =
n =
for
ans
(0:10); stem(n,-8*(-0.8).^n);
(-1:2); y = zeros(size(n)); y(n<0) = 10;
ind = find(n>=0), y(ind) = -0.8*y(ind-1); end; y(n>=0)
= -8.0000 6.4000 -5.1200
(c) Here, the characteristic equation is 2 + 0.3 0.1 = ( + 0.5)( 0.2). Thus, 1 = 0.5 and
2 = 0.2 are the characteristic roots, and the zero-input response is of the form
y[n] = c1 (0.5)n + c2 (0.2)n .
Using y[1] = 1 and y[2] = 33, we see that
!
!
2 5
c1
=
4 25
c2
01
1
33
n =
n =
for
ans
(0:10); stem(n,2*(-0.5).^n+(0.2).^n);
(-2:2); y = zeros(size(n)); y(n<0) = [33 1];
ind = find(n>=0), y(ind) = -0.3*y(ind-1)+0.1*y(ind-2); end; y(n>=0)
= 3.0000 -0.8000 0.5400
(d) Here, the characteristic equation is 2 + 4 = ( 2j)( + 2j). Thus, 1 = 2j = 2ej/2 and
2 = 2j = 2ej/2 are the characteristic roots, and the zero-input response is of the form
y[n] = c1 (2j)n + c1 (2j)n .
1
Using y[1] = 2
and y[2] =
2
,
4 2
we see that
j0.5 j0.5
0.25 0.25
01
c1
c2
!
=
1
2
2
1
4 2
%
.
n =
n =
for
ans
(-2:10); stem(n,2.^(n).*cos(pi*n/2-3*pi/4));
(-2:2); y = zeros(size(n)); y(n<0) = [1/(4*sqrt(2)) -1/(2*sqrt(2))];
ind = find(n>=0), y(ind) = -4*y(ind-2); end; y(n>=0)
= -0.7071 1.4142 2.8284
681
y[n]
y[n]
4
5
10
10
8
(a)
(b)
y[n]
y[n]
16
8
5
10
16
3
(c)
(d)
Figure D5.3
Drill 5.4 (Determining the Impulse Response)
(a) In this case, the characteristic equation is 2 5 + 6 = ( 3)( 2). Thus, the impulse
response is of the form
h[n] = A0 [n] + c1 (3)n + c2 (2)n u[n].
For this second-order (K = 2) system, aK = 6 and bK = 19. Thus, A0 = bK /aK = 19
6 . To
nd c1 and c2 , we rst nd h[0] and h[1] iteratively; that is,
h[0] = 5h[1] 6h[2] + 8[1] 19[2] = 0,
and
h[1] = 5h[0] 6h[1] + 8[0] 19[1] = 8.
Next, we substitute these values into the expression for h[n].
2
$
%
! $ 19 %
1
1
19
+
c
+
c
=
0
1
2
c
1
6
6
=
=
.
c2
3 2
8
0 + 3c1 + 2c2 = 8
Using the matrix representation, MATLAB easily computes the constants c1 and c2 .
01
Thus,
h[n] =
19
[n] +
6
5 n 3 n
(3) + (2) u[n].
3
2
(b) In this case, the characteristic equation is 2 4 + 4 = ( 2)2 . Thus, the impulse response
is of the form
h[n] = A0 [n] + c1 (2)n + c2 n(2)n u[n].
682
y[n] =
k=
x[k]h[n k]
(0.8)k u[k] u[n k].
k=
(0.8)k =
k=0
1 (0.8)n+1
.
1 0.8
Thus,
y[n] = 5(1 (0.8)n+1 )u[n].
Changing h[n] to u[n 1] rather than u[n], we have
y[n] =
k=
n1
(0.8)k =
k=0
1 (0.8)n
1 0.8
or
y[n] = 5(1 (0.8)n )u[n 1].
Thus, shifting h[n] by one causes the output to shift by the same amount.
683
(
)
(
u[n]
3
1
3
5
( 15 13 )2
5
or
15
4
2 n
n
n
u[n].
3 n3 5
3
Now, the desired convolution n3n u[n] (0.2)n u[n 1] is just n( 13 )n u[n] 15 ( 15 )n1 u[n 1],
which is n( 13 )n u[n] ( 15 )n u[n] scaled by 15 and shifted by 1. Applying this scale factor and
shift, the nal result is thus
3
2
3n+1 (n 1)3n+1 5n+1 u[n 1].
4
3
(c) In this case, we rst note from the distributive property that (en u[n] j[n + 1]) 2n u[n] is
equal to en u[n] 2n u[n] j[n + 1] 2n u[n]. Using entries 8 and 1 of Table 5.2, the result
is
en 2n
+ j2(n+1) u[n + 1].
2e
2e
Drill 5.7 (Graphical Procedure for the Convolution Sum)
To begin, we plot both x[m] and h[m], as shown in Figs. D5.7a and D5.7b. These plots are identical
to plots of x[n] and h[n], except that m replaces n. It is simpler to invert and shift h[n] rather than
x[n], so we choose to follow the procedure using x[m] and h[n m]. To obtain h[n m], we rst
reect h[m] to obtain h[m], as shown in Fig. D5.7c. Next, we shift h[m] by n to obtain h[n m],
as shown in Fig. D5.7d.
Expressed mathematically, we see that
x[m] = (0.8)m u[m 1] and h[n m] = u[n + 3 m].
For n + 3 < 1 (n < 2), there is no overlap between x[m] and h[n m], as shown in Fig. D5.7e.
Thus,
y[n] = 0 for n < 2.
Figure D5.7f shows the general situation for n 2. The two functions x[m] and h[n m] overlap
over the interval 1 m n + 3. Therefore, for n 2,
y[n] =
n+3
x[m]h[n m] =
m=1
y[n] = 5 0.8 (0.8)n+4
n+3
(0.8)m .
m=1
for n 2.
684
x[m]
1
h[m]
1
(0.8)m
(a)
(b)
h[m]
h[n m]
1
n+3
(c)
(d)
x[m]
h[n m]
1
(n + 3 < 1)
m
n+3
(e)
x[m]
h[n m]
1
(n + 3 1)
m
n+3
(f)
y[n]
4
10
10
(g)
Figure D5.7
685
m=0
(a)
x[m] 1
m=0
(b)
3 2 1
h[m] 1
1 1
m=n4
(c)
(e)
(f)
1 1
1 1
1 1
3 2 1
1 1 n + 1 = 3
1 1
1 1
1 1
1 1
1 1
1 1
(j)
1 1
(i)
1 1
1 1
y[3] = 1
3 2 1
y[2] = 3
3 2 1
(m)
y[1] = 6
y[0] = 8
y[1] = 9
1 h[n m]
3 2 1
1 1
3 2 1
1 1
3 2 1
1 1
y[2] = 9
1 1 n+1 = 3
y[3] = 8
1 1
1 1
1 1
y[5] = 3
1 1
3 2 1
1 1
y[6] = 1
n4=2 1 1
1 n+1 = 4
y[4] = 6
3 2 1
n4=1
(p)
1 n+1 = 2
1 1
n4=0
(o)
1 1 n+1 = 1
3 2 1
(n)
1 n+1 = 0
3 2 1
(l)
m=n+1
1 1
3 2 1
1 1
(k)
1 1 n + 1 = 1
1
(h)
y[4] = 0
1 n + 1 = 2
1
(g)
(d)
h[m]
1 1
3 2 1
1 1
1 1
y[7] = 0
n4=3 1
1 1
y[n]
9
(q)
10
10
Figure D5.8
At n + 1 = 1 (Fig. D5.8g), two slots overlap, and
y[2] = (11) + (21) = 3.
Continuing this process (Figs. D5.8h through D5.8o), we obtain the values of y[n] up to n 4 = 2
(n = 6). For n 4 3 (n 7), the two tapes again have no overlap, and y[n] again becomes zero.
Viewed in sequence, Figs. D5.8e through D5.8p show h[n m] sliding forward, one slot at a time,
to produce y[n], one value of n at a time. The width of x[n] is 4, and the width of h[n] is 5. From
the width property, the width of y[n] is thus 4 + 5 = 9, a fact that is conrmed by the Fig. D5.8q
plot of y[n].
686
27
Since the highest-power term in this expansion is x9 , the nal expansion is thus
4x9 2x8 + 19x7 8x6 + 52x5 20x4 + 78x3 24x2 + 72x 18 + 27x1 .
Drill 5.10 (Transfer Functions of LTID Systems)
(a) In operator notation, the digital dierentiator is
1
1
E {y[n]} = ( E ) {x[n]} .
T
T
The transfer function H(z) is thus
H(z) =
Y (z)
B(z)
z1
=
=
.
X(z)
A(z)
Tz
B(z)
1
= .
A(z)
z
687
Im
Im
Re
Re
0.5
(a)
(b)
Figure D5.11
Drill 5.12 (Forced Response to a Sinusoid)
In this case,
B()
+ 0.32
H() =
= 2
.
A()
+ 0.16
For the input cos(2n + /3)u[n], the forced response is
y [n] = H(ej2 ) cos 2n + /3 + H(ej2 ) u[n],
where
H(ej2 ) =
ej2 + 0.32
= 0.548ej2.990 .
ej2 + 0.16
(ej2 )2
Therefore,
y [n] = 0.548 cos(2n + /3 2.990)u[n] = 0.548 cos(2n 1.943)u[n].
Chapter 6
Drill 6.1 (Magnitude and Phase Spectra of a Two-Sided Exponential)
For || 1, the DTFT of x[n] does not exist. For || < 1, the DTFT of x[n] is obtained using
Eq. (6.1).
X() =
x[n]ejn
n=
n ejn +
n=
n=0
( 1 ej )n +
n=
n ejn
(ej )n
n=0
01
10
=
+
1 1 ej
1 ej
ej
+ j
= j
e
e
2
1
,
|| < 1.
=
1 2 cos() + 2
Using = 0.8, Fig. D6.1 plots the resulting (real) spectrum X().
688
X()
9
Figure D6.1
Drill 6.2 (Verication of DTFT Pairs)
To verify Eq. (6.11), we take the IDTFT (Eq. (6.2)) of X() = 2 k= ( 0 2k) to
obtain
1
x[n] =
2
( 0 2k)ejn d.
2
k=
Within the region of integration ( to ), there is present only a single delta function, identied
by some value k = k1 (for |0 | < , k1 = 0). Thus, only one term in the summation is required, and
our IDTFT expression simplies to
x[n] =
( 0 2k1 )ejn d.
Using the sifting property of the impulse function (Eq. (1.6)), this integral evaluates to
x[n] = ej(0 +2k1 )n = ej0 n ej2k1 n = ej0 n .
Thus, we have shown that the IDTFT of 2 k= ( 0 2k) is ej0 n , which conrms
Eq. (6.11). To conrm Eq. (6.10), we simply repeat this procedure using 0 = 0.
Drill 6.3 (DTFT Pairs for Generalized Sinusoids)
Scaling pair 16 from CTFT Table 1.1 shows that
if 0 . This pair is given by
ej j0 t
2 e
ej j0 t
ej ( 0 ).
e
2
Similarly,
ej j0 t
e
ej ( + 0 ).
2
Adding these two pairs together, we see that the CTFT of a generalized sinusoid is
|0 | < .
cos(0 t + ) ( 0 )ej + ( + 0 )ej ,
We obtain the desired pair by substituting t = n and = in this CTFT pair. As long as |0 | < ,
this results in the DTFT pair
|0 | < .
cos(0 n + ) ( 0 )ej + ( + 0 )ej ,
This describes the DTFT in the fundamental band only. Over the entire range of , the DTFT pair
is given by
cos(0 n + )
k=
( 0 2k)ej + ( + 0 2k)ej .
689
Using a similar procedure (or using the fact that sin(0 n + ) = cos(0 n + /2)), we establish
that
( 0 2k)ej ( + 0 2k)ej .
sin(0 n + )
j
k=
ej2 ej cos(0 )
|| .
A()
ej2 ej cos(0 )
+ [(0 ) + (+0)],
ej2 2 cos(0 )ej + 1 2
(+0 )
(0 )
|| .
B()
B() 1 =
ej2
ej cos(0 ) ej2
ej2 2 cos(0 )ej + 1
= A().
|| .
Assuming that Lx is odd and using the time-shifting property, left shifting this signal by
u[n + (Lx 1)/2] u[n Lx + (Lx 1)/2]
Lx 1
2
yields
690
Simplifying, we obtain
u[n + (Lx 1)/2] u[n (Lx + 1)/2]
sin(Lx /2)
.
sin(/2)
(2k).
k=
From the frequency-shifting property, we know that replacing with 0 in the frequency domain
causes multiplication by ej0 n in the time domain. Applying the frequency-shifting property to pair
10 thus yields
ej0 n 2
( 0 2k).
k=
This is pair 12 of Table 6.1. Similarly, replacing with + 0 in the frequency domain causes
multiplication by ej0 n in the time domain. Thus,
ej0 n 2
(+ 0 2k).
k=
( 0 2k) + (+ 0 2k).
k=
ej
+ ()
ej 1
and
cos(0 n) [(0 ) + (+0 )] .
Multiplying the two time-domain expressions yields x[n] = cos(0 n)u[n]. Using the frequencydomain convolution property, the spectrum X() found through convolution is
!
1
ej
X() =
+ () d.
[(0 ) + (+0)] j
2 2
e 1
Using the sifting property of the delta function, this integral evaluates to
X() =
1 ej(+0 )
1 ej(0 )
+
+ [(0 ) + (+0 )] .
j(
)
j(+
)
0
0
2e
2
1 2e
1
ej2 ej cos(0 )
+ [(0 ) + (+0 )] .
2ej cos(0 ) + 1
2
ej2
691
This is pair 15 in Table 6.2. Periodically extending this result with period 2 yields pair 15 in
Table 6.1.
Drill 6.8 (Practical LPF Design)
The desired LPF is obtained with only minor adjustments to the code used to produce Fig. 6.16.
01
02
03
04
05
06
The result is shown in Fig. D6.8. Although this LPF does not have ideal characteristics, it is a
realizable lter. Clearly, the LPF cuto frequency is correctly located at 1 = 2/3. Compared
with the lter of Fig. 6.16, this lter has a shorter-duration impulse response and thus causes less
delay in producing an output. However, the price of this shorter delay is a poorer approximation of
the ideal lter response, particularly near the transition bands of the lter.
h[n]
1
2ng
n
ng
(a)
|H()|
H()
1
1 n g
(c)
(b)
Figure D6.8
Drill 6.9 (Another Bandlimited Analog Delay)
Procedurally, the design of a bandlimited analog delay of 275 s is identical to the 250-s case of
Ex. 6.20. Since both systems use inputs bandlimited to 10 kHz, the minimum possible sampling
period is T = 50 s in both cases. Thus, in terms of sample periods, a delay of 275 s equals 5.5T
(a non-integer multiple of T ). The impulse response of the DT lter is thus
h[n] = sinc[n 5.5].
Unlike Ex. 6.20, this impulse response does not reduce to a simple delta function. Further, h[n] is
both everlasting and noncausal, which makes it impossible to realize the desired system in practice.
692
Truncation can render h[n] causal, but it will necessarily distort the frequency response of the
system to something other than a simple delay. Unless the desired delay is an integer multiple of the
sampling frequency, the system of Fig. 6.21a cannot perfectly achieve a bandlimited analog delay.
It is also worth noting that there are dierences in realizing dierent fractional delays. For
example, a delay of 5.5T is more accurately realized than a delay of 0.5T . The primary reason is
that truncation of h[n], which is needed to produce a causal system, eliminates more energy in the
0.5T case than in the 5.5T case. As more energy is eliminated, more distortion is introduced in the
system response.
Drill 6.10 (Downsampling a Sinusoid)
Using Eq. (6.68), the spectrum of x [n] = x[2n] = cos(20 n) is given by
2
1
1
X () = X
+ X
.
2
2
2
2
Using pair 13 of Table 6.1 for X(), we obtain
0 2k +
+ 0 2k
X () =
2
2
2
k=
2
2
+
0 2k +
+ 0 2k .
2
2
Expressing each delta function with a common denominator of 2 yields
20 4k
+ 20 4k
X () =
+
2
2
2
k=
20 4k 2
+ 20 4k 2
+
+
.
2
2
Using the hint that (ax) = (x)/|a|, we obtain
X () =
( 20 4k) + ( + 20 4k)
k=
+ ( 20 4k 2) + ( + 20 4k 2) .
Combining terms, this reduces to
X () =
( 20 2k) + ( + 20 2k) .
k=
Referring to pair 13 of Table 6.1, we recognize that this is the transform of cos(20 n), as expected.
Lastly, we note that if 0 > /2, aliasing occurs in the downsampled signal. In other words, if
0 > /2, then the apparent frequency of x [n] = x[2n] = cos(20 n) will be something other than
twice the frequency of x[n].
Drill 6.11 (Interpolating a Sinusoid)
For convenience, we assume that |20 | < (|0 | < /2). Using pair 13 of Table 6.1, we know that
x[n] = cos(20 n) X() =
k=
693
Next, we upsample this signal by factor L = 2. According to Eq. (6.74), the spectrum of the
upsampled signal is
X () = X(2) =
k=
(0 k) + (+0 k).
2
k=
(0 2k) + (+0 2k) + (0 2k) + (+0 2k) .
2
k=
desired spectrum
undesired images
Applying an ideal interpolation lter with gain L = 2 and cuto frequency /2 (Eq. (6.75)), the
undesired images are removed to produce the nal spectrum
Xi () = X ()Hi () =
k=
This is identical to pair 13 of Table 6.1 for a sinusoid of frequency 0 , as desired. Thus, L = 2
interpolation of x[n] = cos(20 n) results in xi [n] = cos(0 n).
Drill 6.12 (Frequency Response of a Linear Interpolator)
The impulse response of an ideal linear interpolator is given by Eq. (6.80) as
i [n] = n .
h
2L
Dening x[n] = u[n] u[n L], notice that
hi [n] = 1 x[n] x[n].
L
Using the convolution and time-reversal properties, the corresponding frequency response is
i () = 1 X()X().
H
L
Using pair 7 of Table 6.1, we thus obtain
i () = 1 sin(L/2) ej(L1)/2 sin(L/2) ej(L1)/2 .
H
L sin(/2)
sin(/2)
Simplifying, we obtain the desired result of
i () = 1 sin(L/2)
H
L sin(/2)
!2
.
Using L = 4, we use MATLAB to plot this frequency response and the frequency response for
ideal interpolation. The results are shown in Fig. D6.12.
01
02
03
04
L = 4; Om = linspace(-2*pi,2*pi,5000);
Hihat = @(Om) ((sin(Om*L/2)./sin(Om/2)).^2)/L;
Hi = @(Om) L*((mod(Om,2*pi)<=pi/L)+(mod(Om,2*pi)>=2*pi-pi/L));
plot(Om,Hihat(Om),Om,Hi(Om))
694
i ()
H
4
Hi ()
Figure D6.12
The results, shown in Fig. D6.13, are quite similar as those obtained in Fig. 6.34 for x[n] =
sin(2n/7)(u[n] u[n 7]). The primary dierences are seen near the boundaries of the waveforms.
Since x[n] = sin(2n/7)(u[n]u[n7]) is zero at both boundaries (n = 0 and n = 7), its interpolation
turns out quite smooth, closely reecting the waveform we expect. However, in the case of x[n] =
cos(2n/7)(u[n]u[n7]), the two boundary points (at n = 0 and n = 7) are nonzero. Consequently,
transitions occur in the interpolation at these boundaries. These transitions, while necessary, do
not seem quite so reective of the expected (sinusoidal) waveform. To help minimize this behavior,
signals are sometimes started and ended more gradually using some form of tapered window.
x[n]
1
(a)
6
x [n]
(b)
24
24
xi [n]
(c)
1
Figure D6.13
695
Chapter 7
Drill 7.1 (Unilateral z-Transforms)
(a) Using Eq. (7.7), we see that
Xa (z) =
x[n]z n =
n=0
z n .
n=4
z 4 z 10
z
(z 4 z 10 ).
=
1
1z
z1
z k = z 4 + z 5 + z 6 + z 7 + z 8 + z 9 .
k=4
Both expressions for Xa (z) are mathematically equivalent. Since we are computing the unilateral z-transform, there is no requirement to specify that the ROC for Xa (z) is |z| > 0.
(b) Noting that = 2, = /4, and = 1.415, pair 10 of Table 7.1 yields
Xb (z) = 20.65
Although unnecessary for this unilateral z-transform, the ROC of Xb (z) is |z| >
Drill 7.2 (Inverse Unilateral z-Transform by Partial Fraction Expansion)
(a) Using MATLAB, we rst expand Xa (z) into modied partial fractions.
01
Thus,
2
4
2z 1
Xa (z)
3
=
= 3 +
,
z
(z 1)(z + 0.5)
z 1 z + 0.5
and
Xa (z) =
2
3z
z1
4
3z
z + 0.5
2
3
+ 43 (0.5)n u[n].
2.
696
Thus,
2
4
Xb (z)
1
2
3
=
= 3 +
+
,
z
z(z 1)(z + 0.5)
z 1 z + 0.5
z
and
Xb (z) =
2
3z
z1
4
3z
z + 0.5
2.
2
3
+ 43 (0.5)n u[n] 2[n].
Thus,
0.72 17.28
18
9
7.2
Xc (z)
=
+ ,
=
+
+
z
z(z + 2)(z 0.5)2
z+2
z 0.5 (z 0.5)2
z
and
Xc (z) =
7.2z
0.72z 17.28z
+
+
+ 18.
z+2
z 0.5
(z 0.5)2
Thus,
5(z 1)
2.5 + j1.25
2.5 j1.25
Xd (z)
= 2
=
+
,
z
z 1.6z + 0.8
z 0.8 j0.4 z 0.8 + j0.4
and
Xd (z) =
Scaling pair 10 of Table 7.1 by r = 2|2.5 + j1.25| = 5.5902 and identifying || = |0.8 + j0.4| =
0.8944, = (0.8 + j0.4) = 0.4636, and = (2.5 + j1.25) = 0.4636, we obtain
xd [n] = 5.5902(0.8944)n cos(0.4636n + 0.4636)u[n].
Drill 7.3 (Impulse Response by Inverse z-Transform)
(a) Using Eq. (5.33), we determine that
Ha (z) =
8z 19
B(z)
= 2
.
A(z)
z 5z + 6
697
01
Thus,
5
3
19
8z 19
Ha (z)
3
2
6
=
=
+
+
,
z
z(z 2 5z + 6)
z3 z2
z
and
Ha (z) =
5
3z
z3
3
2z
z2
19
.
6
19
6 [n].
2z 2 2z
B(z)
= 2
.
A(z)
z 4z + 4
Thus,
Hb (z)
2z 2 2z
2
2
= 2
=
+
,
z
z 4z + 4
z 2 (z 2)2
and
Hb (z) =
2z
2z
+
.
z 2 (z 2)2
698
Thus,
X(z)
z
= 2 5
z
z + 6z +
and
X(z) =
Since the ROC is
that the mode at
obtain
1
3
1
3
1
6
6
6
+
,
z + 12
z + 13
6z
6z
.
1 +
z+2
z + 13
< |z| < 12 , we know that the mode at 12 corresponds to a left-sided signal and
corresponds to a right-sided signal. Using pairs 3 and 5 of Table 7.1, we thus
x[n] = 6( 21 )n u[n 1] + 6( 31 )n u[n].
0.25z 1
0.25z 1 0.125z 2
0.125z 2
..
.
Thus,
Xa (z) = 1 + 12 z 1 + 14 z 2 + 18 z 3 + .
4z 3
4z 3 8z 4
8z 4
..
.
Thus,
Xb (z) = 2z 4z 2 8z 3 16z 4 .
Using pair 12 of Table 7.1, we obtain
xb [n] = 2[n + 1] 4[n + 2] 8[n + 3] 16[n + 4] = ( 12 )n u[n 1].
This matches the expected result of pair 14 of Table 7.1.
699
u[n]
z
,
z1
|z| > 1.
The time-reversal property states that changing n to n in the time domain requires changing z to
1/z. Thus,
1
1
Z
z
> 1.
u[n] 1
,
z
1
z
Simplifying, we obtain the desired result of
Z
u[n]
1
,
z1
|z| < 1.
u
Using the right-shifting property of Eq. (7.21) and the fact that u[n]
Zu 4
xa [n] = u[n 4] u[n 10]
z z 10
u[n]
n u[n]
z
,
z
We similarly derive pair 14. To begin, pair 13 of Table 7.1 states that
Z
u[n 1]
z
,
z1
|z| < 1.
n u[n 1]
n u[n 1]
z
,
z
we see that
z
= Xa (z).
z1
z
z1 ,
700
n n u[n] z
d
dz
z
z
= z
1
z
z
(z )2
|z| > ||.
n n u[n]
z
,
(z )2
z
d
2z
Z
n2 n u[n] z
=
z
,
dz (z )2
(z )2
(z )3
n2 n u[n]
z(z + )
,
(z )3
=
z
,
n3 n u[n] z
dz (z )3
(z )3
(z )4
n3 n u[n]
z(z 2 + 4z + 2 )
,
(z )4
u[n]
z
z1
and
u[n 1]
1
,
z1
|z| > 1.
z
(z1)2
1 2
5 1
z Y (z) + y[1] +
z Y (z) + y[1]z 1 + y[2] = 5z 1 z 2 X(z).
6
6
Since x[n] is causal, any input terms such as x[1] and x[2] are necessarily zero. Substituting
z
, we obtain
y[1] = 2, y[2] = 0, and X(z) = z1
5
1
5 z 1
5 1
Y (z) 1 z 1 + z 2 + z 1 =
.
6
6
3 3
z1
701
Thus,
14
12
15
Y (z)
3
=
+
+
,
z
z 1 z 12
z 13
and
Y (z) =
14
z
15z
12z
+
+ 3 1.
1
z1 z 2
z 3
14 1 n
3 (3)
u[n].
Drill 7.12 (z-Transform Solution Using Initial Conditions y[0], y[1], . . ., y[K 1])
Since the initial conditions are given in terms of y[0] and y[1], it is most convenient to express the
dierence equation in advance form as y[n + 2] + 3y[n + 1] + 2y[n] = x[n + 1] + 3x[n]. Taking the
unilateral z-transform yields
Y (z) z 2 + 3z + 2 z 2 y[0] zy[1] 3zy[0] = X(z) (z + 3) zx[0].
Notice that since the advance form is used, input terms (such as x[0]) now come into play. Substiz
, we obtain
tuting x[0] = 1, y[0] = 1, y[1] = 2, and X(z) = z1
z(z + 3)
z.
Y (z) z 2 + 3z + 2 z 2 5z =
z1
Solving for Y (z) yields, after some simplication,
Y (z) =
z(z 2 + 4z 1)
.
(z 1)(z + 1)(z + 2)
702
Thus,
5
2
Y (z)
2
= 3 + 3 +
,
z
z+2 z1 z+1
and
Y (z) =
5
3z
z+2
2
3z
z1
2
3
2z
.
z+1
+ 2(1)n u[n].
IC terms
Solving for Y (z) but keeping the IC and input terms separated yield
Y (z) =
z( 35 z 13
z(5z 1)
+
.
(z 13 )(z 12 )(z 1) (z 13 )(z 12 )
ZSR
ZIR
Now, we use MATLAB to expand the ZSR into modied partial fractions.
01
Thus,
Yzsr (z) =
and
18z
12z
6z
+
+
,
1
z1 z 2
z 13
yzsr [n] = 12 18( 21 )n + 6( 13 )n u[n].
Next, we use MATLAB to expand the ZIR into modied partial fractions.
01
Thus,
Yzir (z) =
and
34 z
3z
,
1 +
z2
z 13
yzir [n] = 3( 12 )n 43 ( 13 )n u[n].
As required and expected, summing the ZSR and ZIR generates the result of Drill 7.11,
1 n
u[n].
y[n] = yzsr [n] + yzir [n] = 12 15( 21 )n + 14
3 (3)
703
u
x[n] = 3(n+1) u[n]
1
3
In the transform domain, the ZSR is just the product of the input and system transfer function
1
z 12
3z
.
Yzsr (z) = X(z)H(z) = z
1
(z+ 1 )(z1)
3
Next, we use MATLAB to expand Yzsr (z) into modied partial fractions.
01
Thus,
1
6z
Yzsr (z) =
and
yzsr [n] =
z1
1
4
15 z
z + 12
4
1 n
15 ( 2 )
1
10 z
z 13
1 1 n
10 ( 3 )
u[n].
(b) To determine the dierence equation that relates y[n] to x[n], we rst note that
H(z) =
z1
Y (z)
= 2 1 2 1.
X(z)
z 2z 2
Cross-multiplying, we obtain
1
1
1
2
z z
Y (z) = z
X(z).
2
2
2
Since the system is assumed to be both controllable and observable, we need not worry about
any potential pole-zero cancellations. Inverting the previous transform-domain expression, we
thus obtain the desired system dierence equation as
y[n + 2] 12 y[n + 1] 12 y[n] = x[n + 1] 12 x[n].
Drill 7.15 (ZSR by z-Transform for a Two-Sided Input)
To begin, we note that
x[n] =
1 n
4
z
z 14
5z
z3
4z 2 74 z
,
(z 14 )(z3)
1
4
In the transform domain, the ZSR is just the product of the input and system transfer function
Yzsr (z) = H(z)X(z) =
z
z
1
2
4z 2 74 z
(z 14 )(z 3)
Since we later consider both causal and anti-causal systems, we ignore the ROC at this time. Next,
we use MATLAB to expand Yzsr (z) into modied partial fractions.
704
01
Thus,
Yzsr (z) =
3z
6z
z
+
+
.
z 3 z 12
z 14
(a) In the case that the system is causal, we see that the ROC for H(z) is |z| > 12 and the ROC
of the ZSR is therefore 12 < |z| < 3. Thus, the time-domain expression of the causal system
ZSR is
ya [n] = 6(3)n u[n 1] + 3( 12 )n ( 14 )n u[n].
(b) In the case that the system is anti-causal, we see that the ROC for H(z) is |z| < 12 and the
ROC of the ZSR is therefore 14 < |z| < 12 . Thus, the time-domain expression of the anti-causal
system ZSR is
yb [n] = 6(3)n 3( 12 )n u[n 1] ( 14 )n u[n].
Drill 7.16 (Assessing System Stability)
z
. The
(a) An accumulator with impulse response ha [n] = u[n] has transfer function Ha (z) = z1
single pole of this system is on the unit circle, which makes the system marginally stable.
To assess external (BIBO)
stability, we determine
whether or not the impulse response is
absolutely summable. Since n= |ha [n]| = n=0 1 , ha [n] is not absolutely summable,
and the system is therefore BIBO unstable.
z+1
(b) The system Hb (z) = (z+0.5)(z1)(z2)
has three poles, located at z = 12 , 1, and 2, respectively.
Further, the ROC of Hb (z) is given as 0.5 < |z| < 1. The annular shape of this ROC conrms
that the system is noncausal. Since the ROC contacts (but does not include) the unit circle
and there are no repeated roots on the unit circle, the system is marginally stable.
To assess BIBO stability, we rst use MATLAB to expand Hn (z) into modied partial fractions.
01
Thus,
Hb (z) =
3
5z
z2
34 z
4z
+ 15 1 + 1.
z1 z+ 2
For the ROC 0.5 < |z| < 1, the impulse response is thus
4 1 n
hb [n] = 53 (2)n + 43 u[n 1] 15
( 2 ) u[n].
Due to the 43 u[n 1] term, n= |hb [n]| , and the system is BIBO unstable.
Drill 7.17 (Inverse Systems)
The inverse system transfer function is just the reciprocal of the original transfer function; that is,
Hi (z) =
z 0.5
1
=
.
H(z)
z+2
Due to the pole z = 2, which is outside the unit circle, the inverse system is unstable and
therefore not well behaved. This is a common problem with inverse systems, which swap the roles
705
of the original systems poles and zeros. Zeros whose locations in no way impact the stability of
the original system become poles that, depending on location, can render the inverse system unstable.
Drill 7.18 (Canonical System Realizations)
To begin, it is useful to represent the transfer function using Eq. (7.45) in terms of z 1 as
H(z) =
1 1
16 z
.
3 1
+ 98 z 2
2z
Following the structures of Figs. 7.17 and 7.19, the DFII and TDFII realizations of this system are
shown in Figs. D7.18a and D7.18b, respectively.
X(z)
Y (z)
X(z)
Y (z)
z 1
3
2
z 1
1
16
1
16
3
2
z 1
z 1
98
98
(a)
(b)
Figure D7.18
Drill 7.19 (The Unpopular Transposed Direct Form I)
Applying the transpose operation to the DFI structure of Fig. 7.14, we obtain the TDFI structure
shown in Fig. D7.19. Not only is this structure non-canonical, but it also orders system poles before
system zeros. For these two reasons, the TDFI is not a popular structure for system realization.
b0
X(z)
Y (z)
z 1
z 1
a1
b1
z 1
z 1
a2
b2
Figure D7.19
Drill 7.20 (A Non-Realizable Transfer Function)
In this case, we realize that
H(z) =
z2 +
Y (z)
=
X(z)
z
1
4
1 + 14 z 2
.
z 1
706
Clearly, this system is noncausal and, therefore, not realizable. No matter how we might try to
shift this dierence equation, the output always depends on a future value of the input. In fact,
whenever a transfer function is not proper, the corresponding system is noncausal and, therefore,
not realizable. This fact explains why practical systems have proper transfer functions.
Looked at a dierent way, we see that H(z) = z + 14 z 1 . Inverting, we nd that the impulse response is h[n] = [n+1]+ 14 [n1]. The [n+1] term clearly renders the impulse response noncausal.
Drill 7.21 (Determining and Using Frequency Response)
In advance operator form, the system equation is expressed as
(E 0.5) {y[n]} = x[n].
Therefore, the transfer function of the system is
H(z) =
1
.
z 0.5
1
.
ej 0.5
1.25 cos()
sin()
cos() 0.5
MATLAB readily computes and graphs the magnitude and phase responses, which are shown in
Figs. D7.21a and D7.21b, respectively.
01
02
H(ej )
|H(ej )|
2
(a)
(b)
Figure D7.21
Sampling the CT input x(t) = cos(1000t 3 ) with T = 0.5 ms produces the DT input x[n] =
cos(0.5n 3 ). Further, a sinusoidal input passes through an LTID system changed only in gain and
phase. Since |H(ej0.5 )| = 1.6386 and H(ej0.5 ) = 0.9037, the response to x[n] = cos(0.5n 3 ) is
therefore
707
H(ej )
|H(ej )|
(a)
(b)
Figure D7.23
To determine the output of this system, notice that we can use Eulers formula to represent the
input as
x[n] = cos(n/2) = 12 ejn/2 + 12 ejn/2 .
The rst component is completely removed by the zero at z = j. The second component is passed
with unity gain (and zero phase shift). Thus, the (complex) response to x[n] is
y[n] = 12 ejn/2 .
Chapter 8
Drill 8.1 (Impulse Invariance Method: Digital Butterworth LPF)
We follow Ex. 8.1 to complete this design, which shows that the transfer function of a rst-order
Butterworth lowpass lter with 3-dB cuto frequency c is
Hc (s) =
Setting s = j in Hc (s), we have
c
.
s + c
c
|Hc (j)| =
.
2
+ c2
In this case, the maximum value of |Hc (j)| is 1, which occurs at = 0. Applying a 10% criterion
leads to |Hc (j/T )| = 0.1. Observe that
|Hc (j)|
for c .
708
Hence,
c
= 0.1 = /T = 10c = 10(2250) = 5000.
/T
Thus, a 10% criterion yields T = 1/5000 and Fs = 5000 Hz.
According to Eq. (8.3) (or pair 4 in Table 8.1), the transfer function H(z) of the corresponding
digital lter is
c T z + ec T
H(z) =
.
2
z ec T
|Hc (j/T )|
Bc (s)
0.3275
= 2
.
Ac (s)
s + 0.6338s + 0.3675
Expanding Eq. (8.20), we obtain the coecients of the desired digital lter.
07
B = Bcp/prod(1-pk)*poly([-1,-1]), A = poly((1+pk)./(1-pk))
B = 0.1637 0.3273 0.1637
A = 1.0000 -1.7241 2.7276
That is,
H(z) = Hc (s)|s= z1 =
z+1
0.3275
0.1637(z 2 + 2z + 1)
.
= 2
2
s + 0.6338s + 0.3675 s= z1
z 1.7241z + 2.7276
z+1
To verify that requirements are met, Fig. D8.2 plots the magnitude response |H(ej )| versus .
709
08
09
10
Omega = linspace(0,pi,1001);
H = polyval(B,exp(1j*Omega))./polyval(A,exp(1j*Omega));
plot(Omega,abs(H),k);
|H(ej )|
1
0.8913
Figure D8.2
Drill 8.3 (Digital Bandstop IIR Filter Design)
To design a 12th-order digital inverse Chebyshev bandstop lter, we begin with a 6th-order Chebyshev lowpass prototype with normalized passband frequency p = 1.
01
02
03
04
05
Here, line 01 sets the initial parameters. Rearranging Eq. (2.46) (or Eq. (2.52)), line 02 determines
the corresponding Chebyshev prototype stopband frequency s . Using Eq. (2.53), line 03 computes
, and lines 0405 determine the prototype Chebyshev LPF poles using Eq. (2.47).
Next, we use Eqs. (2.55), (2.56), and (2.54) to determine the pole locations, zero locations, and
gain factor of the inverse Chebyshev LPF. Notice that the inverse Chebyshev prototype also has
normalized passband frequency.
06
07
P = omegap*omegas./P; Z = 1j*omegas.*sec(pi*(2*k-1)/(2*K));
bL = prod(P./Z); aK = 1; L = length(Z); K = length(P);
Using Eq. (8.21), we next prewarp our DT passband specications to the corresponding CT
passband specications. Then, using Eqs. (8.24) and (8.25), we determine the desired digital inverse
Chebyshev bandstop lter.
08
09
10
11
12
13
From the lowpass-to-bandstop transformation of Eq. (2.31), s maps to two stopband frequencies
of the analog bandstop lter, which are determined by solving the quadratic
s 2 + (p2 p1 ) s p1 p2 = 0.
The bilinear transform then converts these values according to = 2 tan1 ().
710
14
and
s2 = 1.9143 = 0.6093.
The magnitude response plot of Fig. D8.3 conrms these calculations as well as the overall behavior
of the digital bandstop lter.
15
16
|H(ej )|
1
0.9441
0.01
0
2
3
Figure D8.3
Drill 8.4 (Filter Realization Using a Cascade of Second-Order Sections)
To begin, we execute lines 0109 in Ex. 8.8 to design the desired 10th-order digital Chebyshev
bandstop lter.
01
02
03
04
05
06
07
08
09
The locations of the digital zeros and poles, as well as the distance of the poles from the origin, are
easily displayed.
10
PDist = 0.9739
0.8795
0.6246
0.8795
0.9739
0.9632
0.8135
0.2838
0.8135
0.9632
711
Since the conjugate zeros 0.4142 j0.9102 are repeated ve times, no pole-zero pairing is required.
Each of the ve second-order stages possesses the same pair of conjugate zeros, realized as
B(z) = (z 0.4142 j0.9102)(z 0.4142 + j0.9102) = z 2 0.8284z + 1.
To determine the poles for each of the ve second-order stages, we follow the recommended (reverseorder) procedure on page 508, which orders the two real poles rst and follows with the conjugate
poles ordered beginning with those furthest from the unit circle. In this way, the poles for each of
the ve stages are realized as
A1 (z) = (z 0.6246)(z + 0.2838) = z 2 0.3408z 0.1772,
A2 (z) = (z + 0.1491 j0.7997)(z + 0.1491 + j0.7997) = z 2 + 0.2982z + 0.6617,
A3 (z) = (z 0.6976 j0.5355)(z 0.6976 + j0.5355) = z 2 1.3953z + 0.7735,
A4 (z) = (z + 0.0010 j0.9632)(z + 0.0010 + j0.9632) = z 2 + 0.0020z + 0.9278,
and A5 (z) = (z 0.6894 j0.6879)(z 0.6894 + j0.6879) = z 2 1.3787z + 0.9484.
Referencing Eq. (8.27), we compute the lters overall gain factor as
10
bL/aK*prod(c2-Z)/prod(c2-P)
ans = 0.1779
Figure D8.4 shows the nal realization, utilizing the gain factor of 0.1779 and a cascade of ve
second-order TDFII stages.
X(z) 0.1779
z 1
z 1
z 1
0.8284
0.3408
0.8284
0.2982
0.8284
1.3953
z 1
z 1
z 1
0.6617
0.1772
z 1
z 1
0.7735
Y (z)
0.8284
0.0020
0.8284
1.3787
z 1
z 1
0.9278
0.9484
Figure D8.4
Drill 8.5 (Realization of Type III and Type IV FIR Filters)
Multiplier-ecient realizations of type III and type IV linear phase FIR lters are shown in
Figs. D8.5a and D8.5b, respectively.
712
x[n]
z 1
z 1
z 1
z 1
z 1
h[0]
z 1
h[ L2
]
2
h[1]
y[n]
(a)
x[n]
z 1
z 1
z 1
z 1
z 1
h[ L3
]
2
h[1]
z 1
z 1
h[0]
h[ L1
]
2
y[n]
(b)
Figure D8.5
Drill 8.6 (Window Method Lowpass Filter Design)
The rectangular and Hamming lowpass lter designs are easily accomplished with minor modications to the code of Ex. 8.11. Since order is one less than length, each order-98 lter possesses
a length of Lh = 99. Due to this large length, we plot rather than print the impulse response
coecient values. Magnitude response plots help highlight the behavioral dierences between the
two lters.
01
02
03
04
05
06
07
08
09
As shown in Figs D8.6a and D8.6b, the impulse responses for the rectangular and Hamming windows
are quite similar. Owing to the taper of the Hamming window, the primary dierence is that the
Hamming window impulse response is smoother at its edges. Looking at the magnitude response
plots of Figs D8.6c and D8.6d, we see that the rectangular window lter possesses a rapid transition
band but rather signicant passband and stopband rippple. The Hamming window lter, on the
other hand, has markedly less passband and stopband ripple but a more gradual transition band.
713
hham [n]
hrec [n]
0.5
0.5
98 n
98 n
(a)
(b)
|Hrec (ej )|
|Hham (ej )|
(c)
(d)
Figure D8.6
Drill 8.7 (Triangular Window Lowpass Filter Design)
To obtain the digital cuto frequency of c = 2 , we require the impulse response hc (t) of a suitable
CT lowpass lter with cuto frequency c . Since no system sampling rate is specied, we can
choose any c and T such that c = c T . Let us choose T = 1 and c = 2 . Using pair 8 of
Table 1.1, the impulse response of the desired ideal (zero phase) lowpass lter is
hc (t) = c sinc c t .
Following the approach of Ex. 8.11, we use MATLAB to complete the design. Line 01 denes the
CT lter. Line 02 denes the lter length and, using entry 2 of Table 8.5, the required triangular
window. Using Eq. (8.36), line 03 computes the desired DT impulse response.
01
02
03
Using these results with Eq. (8.30), we thus conrm that the DT lter transfer function is
H(z) = 0.0265z 1 + 0.2387z 3 + 0.5z 4 + 0.2387z 5 0.0265z 7.
Notice that since the triangular window is dened to be zero at its end points, this Lh = 9 lter
looks more like a length-7 lter. Many sources alternately dene the triangular window so as to
avoid this situation. Indeed, there is some advantage to realizing this lter instead as
H(z) = 0.0265 + 0.2387z 2 + 0.5z 3 + 0.2387z 4 0.0265z 6.
To conclude, we lastly compute and plot the magnitude response of the lter. As shown in Fig. D8.7,
the response of this low-order lter only roughly approximates the desired ideal.
04
05
Omega = linspace(-pi,pi,1001);
H = polyval(h,exp(1j*Omega)).*exp(-1j*(Lh-1)*Omega); plot(Omega,abs(H));
714
|H(ej )|
1
Figure D8.7
|T H49 (ej )|
T h49 [n]
48
(a)
(b)
|T H50 (ej )|
T h50 [n]
49 n
1
(c)
(d)
Figure D8.8
715
Lh 1
2 ]T )wrec [n]
= 14 sinc2
1
4 [n
Lh 1
2 ]
wrec [n].
MATLAB allows us to readily compute and plot h[n] and |H(ej )|.
01
02
03
04
05
Using the results of line 03 with Eq. (8.30), the DT lter transfer function is
H(z) = 0.0225 + 0.1023z 1 + 0.2026z 2 + 0.25z 3 + 0.2026z 4 + 0.1013z 5 + 0.0225z 6.
Figures D8.9a and D8.9b show the impulse response h[n] and magnitude response |H(ej )|, respectively. Despite its low order, this DT lter does a respectable job of approximating Hc (j) =
(T /). Increasing Lh improves the quality of the approximation.
|H(ej )|
h[n]
1
1
4
(b)
(a)
Figure D8.9
Drill 8.10 (Choosing between Small and Large Ripple Windows)
We can see from Table 8.6 that both the Hamming and Blackman windows should satisfy the design
ripple requirements of rp 0.1 dB and s 50 dB. From the same table, we see that the given
transition width of = 0.05 suggests a lter length of Lh = 6.64
0.05 + 1 = 134 for the Hamming
window and a length Lh = 11.13
+
1
=
224
for
the
Blackman
window.
Thus, while both lters
0.05
can meet given requirements, the Hamming window produces a lter length 40% shorter than the
Blackman window. Since lter length directly relates to lter complexity, the Hamming window is
clearly superior to the Blackman window in this case.
Drill 8.11 (A Guaranteed Failure of the Window Method)
In this case, the diculty is that the lter length is even yet the desired response needs to pass high
frequencies ( = ). The frequency response Hc () of the (bandlimited) highpass prototype is an
even function, which means that the corresponding impulse response hc (t) is also even. Combined
with a symmetric window, the window design method of Eq. (8.37) delivers a symmetric impulse
716
response h[n]. If h[n] is odd length, the lter is necessarily type I. If h[n] is even length, the lter is
necessarily type II. From Table 8.4, we see that although a type I lter is suitable for all basic lter
types, a type II lter is unsuitable for HP and BS lters since type II lters necessarily possess an
odd number of zeros at z = 1. Thus, we see that the window design method using an even lter
length cannot pass the desired frequencies = . Doubling the lter length does not help since
that lter is also of even length. Increasing lter length by one, however, changes the lter from
type II to type I and dramatically improves the response at high frequencies. Let us demonstrate
these ideas with a simple example.
T
2T
t
1
jt
jt
1
.
e d +
e d = T1 sinc Tt 2T
sinc 2T
hc (t) =
2 T
2T
Using this result with Eq. (8.36), the desired DT lter impulse response is
h[n] = sinc n Lh21 12 sinc n2 Lh41 w[n].
Using a Hamming window for w[n], let us investigate the Lh = 20 and Lh = 21 cases.
01
02
03
04
05
06
07
08
09
10
Lh = 20; n = 0:Lh-1;
wham = @(n) (0.54-0.46*cos(2*pi*n/(Lh-1))).*((n>=0)&(n<=Lh-1));
h20 = (sinc(n-(Lh-1)/2)-0.5*sinc(n/2-(Lh-1)/4)).*wham(n);
Omega = linspace(-pi,pi,1001); H20 = polyval(h20,exp(1j*Omega)).*exp(-1j*(Lh-1)*Omega);
subplot(221); stem(n,h20); subplot(222); plot(Omega,abs(H20))
Lh = 21; n = 0:Lh-1;
wham = @(n) (0.54-0.46*cos(2*pi*n/(Lh-1))).*((n>=0)&(n<=Lh-1));
h21 = (sinc(n-(Lh-1)/2)-0.5*sinc(n/2-(Lh-1)/4)).*wham(n);
H21 = polyval(h21,exp(1j*Omega)).*exp(-1j*(Lh-1)*Omega);
subplot(223); stem(n,h21); subplot(224); plot(Omega,abs(H21))
|H20 (ej )|
h20 [n]
0.5
19
0.5
(a)
(c)
|H21 (ej )|
h21 [n]
0.5
20
0.5
(b)
(d)
Figure D8.11
Figs. D8.11a and D8.11c show the impulse responses for Lh = 20 and Lh = 21, respectively. Both
cases possess the expected midpoint symmetry. Figs. D8.11b and D8.11d show the corresponding
717
magnitude responses. The two cases produce nearly identical behavior at all but the highest frequencies. The z = 1 zero of the even-length (type II) lter, however, guarantees failure of this
highpass lters high-frequency response.
While this example concentrates on the highpass case, the same diculties also occur with
bandstop lters and multiband lters that attempt to pass = .
Drill 8.12 (Alternate Frequency Sampling Method Allpass Filter Designs)
To design an Lh = 7 type I allpass FIR lter, we need only change the frequency samples in the
Ex. 8.18 MATLAB code from lowpass (ones and zeros) to allpass (all ones). In this case, we use
four frequency samples beginning at = 0 and uniformly spaced by 2/7 to determine the four
unknown coecients of the impulse response; the remaining three values are obtained by symmetry.
Figure D8.12a shows the resulting magnitude response and the frequency samples utilized in the
design.
01
02
03
04
05
The design of an Lh = 8 type II allpass FIR lter is nearly identical to the design of an Lh = 7
type I allpass FIR lter. From Table 8.3, we infer that the only dierence is in the nal column of
matrix A: the type II case computes this column as the previous columns rather than using a column
of ones. As in the Lh = 7 type I case, the Lh = 8 type II lter has four unknown coecients of the
impulse response (the remaining four values are obtained by symmetry). We obtain these values
using four frequency samples beginning at = 0 and uniformly spaced by 2/8. Figure D8.12b
shows the resulting magnitude response and the frequency samples utilized in the design. Although
intended to be allpass, this type II lter is unable to pass high frequencies near = , which is
consistent with the restriction given in Table 8.4 that type II lters must have an odd number of
zeros at z = 1.
06
07
08
09
10
The design of an Lh = 7 type III allpass FIR lter is similar the previous type I and type II
designs. From Table 8.3, we see that matrix A is constructed using the sine function rather than
the cosine function. Since the midpoint of a type III lters impulse response is zero, an Lh = 7 type
III lter has three unknown coecients; the remaining coecients are determined by antisymmetry.
Since the sine of zero is always zero, we cannot use a frequency sample at = 0 in the design since
it renders the matrix A singular (non-invertible). Thus, in this case, we use three frequency samples
beginning at = 2/7 and uniformly spaced by 2/7. Figure D8.12c shows the resulting magnitude
response and the frequency samples utilized in the design. Consistent with the Table 8.4 restrictions
that type III lters possess an odd number of zeros at both z = 1 and z = 1, this lter can neither
pass high frequencies nor low frequencies.
11
12
13
14
15
The design of an Lh = 8 type IV allpass FIR lter is nearly identical to the design of an Lh = 7
type III allpass FIR lter. Since the midpoint of this lter is between samples, the impulse response
does not require a value of zero in the middle, as in the case of a type III lter. Since an Lh = 8 type
IV lter has four unknown coecients (the remaining four values are obtained by antisymmetry), we
718
require four frequency samples, which in this case are taken beginning at = 2/8 and uniformly
spaced by 2/8. Figure D8.12d shows the resulting magnitude response and the frequency samples
utilized in the design. Consistent with the Table 8.4 restriction that type IV lters possess an odd
number of zeros at z = 1, this lter cannot pass low frequencies.
16
17
18
19
20
|HII (ej )|
|HI (ej )|
1
2
7
4
7
6
7
(a)
3
4
3
4
(b)
|HIII (ej )|
|HIV (ej )|
2
7
4
7
6
7
(c)
(d)
Figure D8.12
Although we utilize uniformly spaced frequency samples in these designs, this is not required.
Dierent frequency samples yield dierent frequency responses, although the general limitations of
the dierent lter types remain.
Drill 8.13 (Frequency-Weighted Least-Squares Highpass Filter Design)
The desired frequency-weighted least-squares (FWLS) highpass lter is designed using nearly identical MATLAB code to the FWLS LPF of Ex. 8.21. Aside from the obvious changes in parameter
values p , s , and Lh , the main dierences are the frequency-weighting function Q (line 03) and
a highpass (rather than lowpass) desired frequency response Hd (line 05). The resulting impulse
response h[n] and dB magnitude response 20 log10 |H(ej )| are shown in Figs. D8.13a and D8.13b,
respectively. From line 12, we see that the actual passband ripple is p = 1.4736(10)4, which,
using Eq. (8.40), corresponds to rp = 1.2799(10)3 dB. This value is too small to visually discern
in the magnitude response plot of Fig. D8.13b. From line 13, we see that the stopband ripple is
s = 1.6339(10)5, which corresponds to a stopband attenuation of s = 95.7357 dB. Notice that
the stopband ripple is approximately ten times smaller than the passband ripple, which corresponds
nicely to the frequency-weighting function Q being 10 times larger in the stopband as in the
passband.
01
02
03
719
04
05
06
07
08
09
10
11
12
13
Q(fix(K/2)+2:end) = Q(round(K/2):-1:2);
Hd = 1.0*(Omegak>=Omegap).*exp(-1j*k*pi*(Lh-1)/K);
Hd(fix(K/2)+2:end) = conj(Hd(round(K/2):-1:2));
l = (0:Lh-1); a = exp(1j*l*Omegak)*Q./K; b = exp(1j*l*Omegak)*(Hd.*Q/K).;
A = toeplitz(a); h = (A\b);
n = (0:Lh-1); subplot(211); stem(n,h);
Omega = linspace(0,pi,1001); H = polyval(h,exp(1j*Omega)).*exp(-1j*(Lh-1)*Omega);
subplot(212); plot(Omega/pi,20*log10(abs(H)));
deltap = 2*max(abs(abs(H(Omega>=Omegap))-1))
deltap = 1.4736e-004
deltas = max(abs(H(Omega<=Omegas)))
deltas = 1.6339e-005
h[n]
0.5
(a)
0
100
20 log10 |H(ej )|
0
(b)
95.7
3
8
Figure D8.13
Chapter 9
Drill 9.1 (3-Point DFT of a Length-3 Signal)
Using Eq. (9.2), the DFT of x[n] = 2[n] + [n 1] + [n 2] is
X[k] =
N
1
n=0
X[1] = 1,
and X[2] = 1.
n=
720
Using MATLAB, we can readily verify that the DFT X[k] is equal to samples of the DTFT X()
at intervals of 0 = 2/N = 2/3.
01
02
03
04
|X[k]|
X[k]
X()
|X()|
2
3
1
2
3
4
3
4
3
2 k0
2 k0
Figure D9.1
Drill 9.2 (3-Point and 8-Point DFTs of a Length-3 Signal)
(a) Using Eq. (6.1), the DTFT of x[n] = [n] + [n 1] + [n 2] is
X() =
n=
(b) Using Eq. (9.2) and 0 = 2/3, the 3-point DFT of x[n] is
X[k] =
n=0
X[1] = 0,
and X[2] = 0.
Using MATLAB, we can readily verify that the DFT X[k] is equal to samples of the DTFT
X() at intervals of 0 = 2/3, as shown in Fig. D9.2a. From the results of line 01, we notice
that X[2] and X[3] are computed not quite exactly as zero. This computer rounding error
causes the aberrant phase computations at k = 2 and k = 3.
01
02
03
04
n=0
Using MATLAB, we verify the conjugate symmetry of X[k] about k = N/2 = 4, which is to
say that X[1] = X [7], X[2] = X [6], and X[3] = X [5]. Figure D9.2b graphically shows that
X[k] is equal to samples of the DTFT X() at intervals of 0 = /4.
721
05
06
07
|X[k]|
X[k]
X()
|X()|
(a)
1
2
3
2
3
|X[k]|
X[k]
X()
|X()|
(b)
1
2 k0
2 k0
4
3
4
3
k0
3
2
3
2
2 k0
Figure D9.2
= 3 and X[1]
= 1, obtained by undersampling the DTFT of the 3-point
The 2-point DFT X[0]
signal x[n] = [n] + [n 1] + [n 2], has IDFT
1
3 1
X[k]ejkn = + ejn .
2
2 2
1
x[n] =
k=0
and x[1] = 1.
By undersampling the original 3-point signals DTFT, the duration of the corresponding time-domain
signal x
[n] is reduced. Viewed another way, undersampling in frequency produces aliasing in the time
domain. In this case, the n = 2 sample of the length-3 original signal x[n] = [n] + [n 1] + [n 2]
aliases to n = 0 to produce the length-2 signal x
[n] = 2[n] + [n 1].
The DTFT of x
[n] is
X()
=
x
[n]ejn = 2 + ej .
n=0
This DTFT is clearly dierent from the original 3-point signal DTFT X() = ej [1 + 2 cos()],
although both functions are equal at = 0 and = .
Drill 9.4 (DFT Interpolation to Obtain the DTFT)
Due to the cumbersome nature of the Eq. (9.10) interpolation formula, we use Eq. (9.8) to interpolate
722
1
1
1
X[k]
ej(k)n
2
n=0
1
2
k=0
1
X[k] 1 + ej(k)
k=0
4
13
=
3 1 + ej + 1 1 + ej()
2
1
=
3 + 3ej + 1 ej
2
= 2 + ej .
(C.1)
Equation (9.10) yields, after somewhat tedious simplication, the same result.
Drill 9.5 (Nonuniqueness of DTFT Samples)
From Drill 9.1, we know that signal x[n] = 2[n] + [n 1] + [n 2] has DTFT given by
X() = 2 + 2 cos(/2)ej3/2 and DFT given by
X[0] = 4,
X[1] = 1,
and X[2] = 1.
y[n]ejn = ej + 2 + ej = 2 + 2 cos().
n=1
Y (10 ) = 1,
and Y (20 ) = 1.
Thus, although Y () = X(), the samples Y (k0 ) exactly match the DFT samples X[k].
Drill 9.6 (Modulo-N Shift and DTFT Sample Equivalence)
The length-3 signal x[n], dened as x[0] = 2, x[1] = 1, and x[2] = 1, ranges over 0 n 2.
The length-3 signal y[n], dened as y[1] = 1, y[0] = 2, and y[1] = 1, ranges over 1 n 1.
A modulo-3 shift of y[n], which relocates y[n] to the range 0 n 2, only requires that the
sample y[1] be moved to its modulo-3 location of 13 = 2. Since y[0] = x[0], y[1] = x[1] and
y[1] = x[2], the modulo-3 shift of y[n] equals x[n].
As discussed in Sec. 9.2.1, if an N -point signal is the modulo-N shift of another signal, then the
N DTFT samples of both signals exactly match. Since the three DTFT samples of signal y[n] match
the three DTFT samples of x[n] (see Drill 9.5), it is not surprising that y[n] is modulo-3 equivalent
to x[n].
There are an innite number of signals that are modulo-3 shift equivalent to x[n]. Let us
determine a 3-point signal z[n] with an arbitrarily chosen range of 20 n 22 that is modulo-3
shift equivalent to x[n]. Since 203 = 2, 213 = 0, and 223 = 1, we set
z[20] = x[2],
z[21] = x[0],
Dened in this way, z[n] is modulo-3 equivalent to x[n], and the N DTFT samples of both signals
are identical.
Drill 9.7 (Circular Representations of 3-Point Signals)
From Drill 9.6, we see that the 3-point signal x[n] is dened as x[0] = 2, x[1] = 1, and x[2] = 1.
723
Similarly, 3-point signal y[n] is dened as y[1] = 1, y[0] = 2, and y[1] = 1. Figure D9.7a
and D9.7b show the circular representations of x[n] and y[n], respectively. Since y[n] is modulo-3
shift equivalent to x[n] (see Drill 9.6), the circular representation of x[n] is identical to the circular
representation of y[n].
x[0] = 2
y[0] = 2
n=0
n=0
x[2] = 1
y[1] = 1
y[1] = 1
x[1] = 1
(b)
(a)
Figure D9.7
Drill 9.8 (Modulo-N Reection)
To begin, Figure D9.8a shows the reection x[n] of the 3-point signal x[n] specied by x[1] = 1,
x[2] = 2, and x[3] = 3. Over 0 n 2 (heavy lines), Fig. D9.8b shows x[nN ] obtained by
transporting the samples of x[n] to their modulo-3 locations, as per Eq. (9.13). Since all three
nonzero samples of x[n] are outside the range 0 n 2, every sample needs to be relocated.
In the second method, we periodically replicate the Fig. D9.8a signal x[n]. As shown in
Fig. D9.8b (light lines), this periodic replication produces x[nN ] over the principal range
0 n N 1.
In the third method, we use a circular representation of x[n], as depicted in Fig. D9.8c. This
is achieved by placing the samples of x[n] in a counterclockwise direction along a circular dial to
represent x[n]. We now read this diagram in a clockwise direction to obtain x[nN ]. We read
the values at n = 0, 1, and 2 as x[3], x[2], and x[1], respectively. This matches Fig. D9.8b, the result
of the rst two methods.
x[n]
x[3] = 3
n=0
3
(a)
n
n
x[nN ]
n=2
3
(b)
n=1
x[1] = 1
x[2] = 2
n
(c)
Figure D9.8
Drill 9.9 (Circular Shift)
Figure D9.9a shows the m = 4 shift x[n 4] of the 3-point signal x[n] specied by x[0] = 2 and
x[1] = x[2] = 1. Over 0 n 2 (heavy lines), Fig. D9.9b shows x[n 4N ] obtained by
transporting the samples of x[n 4] to their modulo-3 locations, as per Eq. (9.13).
724
In the second method, we periodically replicate the Fig. D9.9a signal x[n 4]. As shown in
Fig. D9.9b (light lines), this periodic replication produces x[n 4N ] over the principal range
0 n N 1 (heavy lines).
In the third method, we use a circular representation of x[n 4], as depicted in Fig. D9.9c. This
is achieved by rotating the circular representation of x[n] clockwise by m = 4 positions. This result
is equivalent to Fig. D9.9b, the result of the rst two methods.
Since 10193 = 43 = 1, a shift by m = 1019 is identical to the shift by m = 4.
x[n m]
x[2] = 1
n=0
(a)
x[n mN ]
n=2
(b)
n=1
x[1] = 1
x[0] = 2
(c)
Figure D9.9
Drill 9.10 (Combined Modulo-N Reection and Shift)
Let us use three methods to determine x[n 2N ] of the 6-point signal x[n] shown in Fig. 9.10a.
Figure D9.10a combines reection and shift to produce x[n 2]. To obtain x[n 2N ], we
transport the samples of x[n 2] to their modulo-6 locations, as shown in Fig. D9.10b (heavy
lines).
In the second method, we periodically replicate the Fig. D9.10a signal x[n 2]. As shown in
Fig. D9.10b (light lines), this periodic replication produces x[n 2N ] over the principal range
0 n N 1 (heavy lines).
In the third method, we produce a circular representation of x[n 2], as depicted in Fig. D9.9c.
This is achieved by rst rotating the circular representation of x[n] clockwise by 2 positions (shift)
and then reecting this result about the vertical axis (reection). This result is equivalent to the
Fig. D9.9b result of the rst two methods.
x[n 2]
x[4]
n=0
(a)
x[3]
x[5]
n=1
n=5
7
2 0
n
x[n 2N ]
(b)
n=4
n=2
x[0]
x[2]
n=3
x[1]
(c)
Figure D9.10
725
is expressed mathematically as
y[n] =
x[m]h[n m6 ].
m=0
Let us use the graphical method to compute the desired value y[2]. To do this, we represent x[m] and
h[2m6 ] using two concentric circles. We take the inner circle as the (xed) circular representation
of x[m], drawn in the regular clockwise manner. The outer circle, which represents h[2 m6 ], is
obtained by rst writing h[m] in the counterclockwise direction to obtain the modulo-N reection
h[m6 ]. This outer circle is then rotated clockwise by two positions to obtain h[2 m6 ]. Both
circular representations are shown in Fig. D9.13.
h[2] = 3
x[0] = 1
h[3] = 4
h[4] = 5
h[1] = 2
x[5] = 1
x[1] = 1
x[4] = 1
x[2] = 2
x[3] = 2
h[0] = 1
h[5] = 6
Figure D9.13
To compute y[2], we multiply the corresponding points on our concentric circles and sum the
results,
y[2] = x[0]h[2] + x[1]h[1] + x[2]h[0] + x[3]h[5] + x[4]h[4] + x[5]h[3]
= 1(3) + 1(2) + 2(1) 2(6) + 1(5) + 1(4) = 2.
726
To further verify that y[2] = 2, we compute the entire 6-point circular convolution in MATLAB
as y[n] = IDFT {DFT(x[n])DFT(h[n])}, 0 n 5.
01
02
03
The same result is also obtained using the built-in MATLAB functions fft and ifft to compute
the DFT and IDFT, respectively.
04
y = ifft(fft([-1,1,2,-2,1,1]).*fft([1,2,3,4,5,6]))
y = 12 8 -2 12 8 4
Perhaps more simply, the same result is also obtain using the built-in MATLAB functions fft and
ifft to compute the DFT and IDFT, respectively.
03
ifft(fft([3;2;3]).*fft([1;2;3]))
ans = 15 17 16
We can verify this result graphically with two concentric circles. On the inner circle, we represent
[3, 2, 3] in the standard way, moving clockwise from a 12 oclock starting position. On the outer
circle, we represent [1, 2, 3] beginning at the 12 oclock position and then moving counterclockwise
(modulo reection of the signal). To compute the circular convolution for time n, the outer circle
is rotated clockwise by n positions, corresponding points on the two circles are multiplied together,
and then the results are summed. Using Fig. D9.14 as our guide, the 3-point circular convolution is
thus computed as
2, 3] =
conv([3,2,3],[1,2,3])
ans = 3 8 16 12 9
This result can also be obtained by graphical means such as the sliding-tape method.
The linear convolution of two signals can, through aliasing, be used to compute the circular
convolution of those same two signals. To do this, we perform a modulo-N shift of the linear
convolution and add together any overlapping points. In the present example, we modulo-3 shift
the linear convolution result [3, 8, 16, 12, 9] (0 n 4). The rst three values are already in
their modulo-3 positions, so they do not move. However, the n = 3 value of 12 needs to be moved
(aliased) to 33 = 0, where it is added to the existing value of 3 to produce 15. Similarly, the
n = 4 value of 9 aliases to 43 = 1, where it is added to the existing value of 8 to produce 17. The
3-point result [15, 17, 16] exactly matches the original 3-point circular convolution.
727
3
1
n=0
2
2
n=1
n=2
Figure D9.14
Drill 9.15 (Convolution Using the DFT)
We can compute the linear convolution x[n] h[n] using the DFT and IDFT as
x[n] h[n] = IDFT {DFT(xpad )DFT(hpad )} .
This expression is conveniently computed using MATLAB code similar to that in Ex. 9.11.
01
02
03
04
To verify this result, we compute the convolution x[n] h[n] using the sliding-tape method, as
illustrated in Fig. D9.15. As expected, the results of both methods are identical.
1
1
1
1 1
n=0
1
2
1
1
1 1
n=1
1
1
1
2
1
1
1
n=2
1
1
1
2
1
1
n=3
1
1
1
2
n=4
1
1
y[0] = 1(1) = 1
n=5
y[5] = 1(1) = 1
Figure D9.15
Drill 9.16 (Block Convolution)
In this problem, we use two methods of block convolution to determine the output of an LTID system
728
By adding the overlapping output blocks together, we obtain the nal output {y[n]}
n=0 =
{3, 2, 0, 4, . . .}, also shown in Fig. D9.16a.
zero-padded
input blocks
output blocks
nal output
(a)
data-padded
input blocks
0
save and reuse
output blocks
0
discard
discard
nal output
(b)
Figure D9.16
For the overlap-and-save method, we again segment the input into nonoverlapping length-2
blocks. Except for the rst block, which uses zeros, these blocks are data-padded at their beginnings with Nh 1 = 2 previous input values, as shown at the top of Fig. D9.16b. As in the
overlap-and-add method, we use a single zero to pad the impulse response h[n] to the same total
length of 4. Next, we use the DFT to convolve the data-padded input blocks with the zero-padded
impulse response. Figure D9.16b shows the resulting output blocks, computed using MATLAB.
05
729
06
y0 = 3 0 3 2
x1pad = [x0pad(end-1:end);-1;2]; X1pad = DN*x1pad; y1 = conj(DN)/N*(X1pad.*Hpad)
y1 = 4 8 0 4
By discarding the rst Nh 1 = 2 values of each output block, we obtain the nal output
{y[n]}
n=0 = {3, 2, 0, 4, . . .}, as shown in Fig. D9.16b.
Drill 9.17 (Determining DIT FFT Input Order)
The input position of a 128-point DIT FFT requires a 7-bit number that ranges from 0 to 127.
Counting from zero, the fourth input position is identied by the decimal value 3, which written as
a 7-bit binary number is 0000011. Bit reversing this number yields binary 110000, which is 96 in
decimal. Thus, the fourth input to a 128-point DIT FFT is x[96].
Similarly, the 100th input position is identied by the decimal value 99, which is written in
binary as 1100011. Bit reversing this number produces the same binary number, 1100011. Thus,
the 100th input to a 128-point DIT FFT is x[99].
Drill 9.18 (DTFS Using an Alternate Frequency Interval)
In this case, the fundamental frequency is 0 = 0.1. Referring to Fig. 9.35, over 2 < 2,
there are two nonzero spectral coecients, D[21] = 2j and D[39] = 2j . Using Eq. (9.56), the DTFS
is thus computed as
40
x[n] =
D[k]ej0.1kn = 2j ej2.1n + 2j ej3.9n .
k=21
The rst sinusoid has period 10, and the second sinusoid has period 4. To determine the period N
of the combined signal x
[n], we simply compute the least common multiple of the two periods,
N = LCM(4, 10) = 20.
Thus, 0 =
2
N
10
and
x
[n] = 4 cos(20 n) + 6 sin(50 n) = 2ej20 n + 2ej20 n 3jej50 n + 3jej50 n .
This result is the DTFS of x
[n] constructed over < (10 k < 10). To construct x
[n]
over 0 < 2, we need to exchange the spectral components over < 0 (10 k < 0) with
the equivalent components from the range < 2 (10 k < 20). This requires that we replace
the k = 2 component with k = 2 + N = 18 and the k = 5 component with k = 5 + N = 15.
Thus, constructed over 0 < 2, the DTFS is
x
[n] = 2ej20 n 3jej50 n + 3jej150 n + 2ej180 n ,
where 0 =
10 .
730
x = [ones(5,1);zeros(23,1);ones(4,1)];
N = 32; Omega0 = 2*pi/N; k = (0:N-1); n = (0:N-1);
DN = exp(-1j*Omega0*k*n); Dk = (DN/N)*x;
stem(k*Omega0,Dk);
The results, shown in Fig. D9.20, exactly match the Fig. 9.37 results of Ex. 9.17.
D[k]
9
32
Figure D9.20
2 k0
Index
accumulator systems, 239, 240, 302, 447
as digital integrators, 243
adders, 238, 447
additivity property, 26, 250
distinction from homogeneity, 27
adjustable windows, 521
advance form, 240, 245, 254, 275
advance-operator form, 275
aliasing, 170173, 373
disguised in s-to-z mapping, 224
downsampling and, 217, 257, 379, 384
fundamental-band representation and, 341
impulse invariance method and, 487491
in circular convolution, 588590, 597
in exponentials, 226230
in sinusoids, 173176, 226230
multiple folding and, 171
prevented by ltering, 170
relation to apparent frequency, 174
sub-Nyquist sampling and, 180, 378
time-domain, 566
treachery of, 169
allpass systems, 95, 542
amplitude modulation, 58
amplitude response, 513, 540
analog lter transformations
digital lters designed by, 485507
lowpass-to-bandpass, 117118
lowpass-to-bandstop, 118120
lowpass-to-highpass, 116117
lowpass-to-lowpass, 115116
analog lters, 85150, 247
digital realization of, 370
families of, 120149
ideal, 100
practical specication of, 112
analog resampling, 393
analog signals, 3, 185
digital processing of, 370379
analog systems, see continuous-time systems
analog-to-digital conversion, 185199, 247
analog-to-digital converters
bipolar, 189
counting, 197
dynamic errors, 194
eective number of bits, 195
ash, 198
gain errors, 194
missing codes, 195
nonlinearity errors, 195
oset errors, 194
quantization errors, 189
saturation errors, 189
static errors, 194
successive approximation, 197
timing jitter, 195
transfer characteristics of, 189
unipolar, 189
analysis equation
discrete Fourier transform, 560, 584, 600
discrete-time Fourier transform, 331, 356,
584
Fourier series, 34, 67
Fourier transform, 45, 67, 356
Laplace transform, 69, 72
z-transform, 397, 410, 434
angles, see phase spectrum
anti-aliasing lters, 170
importance of type, 173
in digital processing of analog signals, 371
used in decimation, 217, 257, 380, 384
anti-causal signals, 15, 231
anticipative systems, see systems, noncausal
anti-mirror image polynomials, 514
antisymmetry, see conjugate antisymmetry; odd
symmetry
aperiodic signals, 21, 233
DT Fourier transform and, 331
Fourier transform and, 45
aperture eect, 200201
apparent frequency, 173176, 226230
multiple folding to determine, 175
associative property, 292
asymmetric quantization, see quantization,
asymmetric
asymptotic stability, see internal stability
731
732
Index
Index
733
734
Index
Index
735
L-ary, 3, 185
digital systems, see discrete-time systems
digital-to-analog conversion, 199202
Dirac delta function, 9
connection to the unit step function, 10
impulse sampling using the, 155161
properties of the, 10
Dirac, P. A. M., 9
direct form I realizations, 255, 448
direct form II realizations, 449450, 508
direct form realizations, 447450
transposed, 451453
Dirichlet conditions
Fourier series, 42
Fourier transform, 47
Dirichlet kernel, 104
discrete Fourier transform, 538, 559569
analysis equation, 560, 584, 600
bins, 561
continuous-time Fourier transform estimated with the, 610
direct, 560, 561
discrete-time Fourier series equivalence to
the, 612
discrete-time Fourier transform obtained by
interpolation of the, 567569
fast Fourier transform, 603
frequency resolution of the, 563
Goertzels algorithm, 600603
inverse, 561
matrix representation of the, 565566
Parsevals theorem, 583
periodicity of the, 570
picket fence eect and the, 563
properties of the, 579583
synthesis equation, 561, 584, 600
table of properties, 584
uniqueness, 569572
zero padding and the, 563565
discrete-time Fourier series, 612617
analysis equation, 612
discrete Fourier transform equivalence to
the, 612
synthesis equation, 612
discrete-time Fourier transform, 331342
analysis equation, 331, 356, 584
continuous-time Fourier transform connection to the, 338, 364370
diculties of the, 559
direct, 332
existence of the, 335
generalization to z-transform, 395397
736
Index
Index
737
738
Index
Index
739
740
Index
Index
741
742
Index
Index
743
power
computed as an inner product, 547
frequency-domain representation of, 65
of continuous-time signals, 23
of discrete-time signals, 236
power series expansion, 425
power signals
continuous-time, 24
discrete-time, 236
power spectral density, 65
practical lters, 100113, 362364
analog, 120, 149
digital, 485552
predictive rst-order hold, 206
prewarping, 497501
principal values
phase using, 55, 362
prototype lters, 114, 501
pulse-code modulation, 186, 380
pulse dispersion, 315
pulse sampling, 161164
quadratic factors
method of, 422
quadratic formula, 127, 136
quadrature systems, 404
quantization, 185
asymmetric, 189, 190
linear, 193
nonlinear, 193
rounding, 189, 190
symmetric, 189, 190
truncating, 189, 190
quantization errors, 189, 201202
quantization levels, 185
quantization noise, see quantization error
radix-2 fast Fourier transform, 610
ramp invariance method, 554
random signals, 25
rational functions, 420
real part, 16
real signals, 16, 232
real systems, 85
complex roots of, 280
realizable lters, see practical lters
reconstruction
practical diculties in, 168176
reconstruction lters, 164176, 199201
rectangle function, see unit gate function
rectangular window, 104110, 517521, 530
optimality of the, 522
744
recursion, 270
recursive form, 239, 273
reection, see reversal property; time reversal
region of convergence, 69, 411415
for nite-length signals, 414
poles never found within the, 412
unilateral transforms and, 70, 416
region of existence, see region of convergence
Remez exchange algorithm, 551
repeated poles, see poles, repeated
repeated roots, 279, see also poles, repeated
resampling
analog, 393
digital, 257, 379395
resonance, 32, 283, 311, 315317
reversal, see reversal property; time reversal
reversal property
discrete Fourier transform, 580, 584
discrete-time Fourier transform, 344, 356,
584
Fourier series, 67
Fourier transform, 53, 67, 356
Laplace transform, 72
z-transform, 428, 434
reverse Bessel polynomials, 148
table of, 148
right half-plane, 12, 224
right shift, 4, 214, 430
right-sided signals, 16, 69, 231, 414
ripple parameters, 112, 529, 536
rise time, 314
rollo, 107, 519
roots
characteristic, see characteristic roots
complex, 280
repeated, see repeated roots
transfer function, 31, 89, 462
rounding quantization, see quantization, rounding
sample-and-hold, 196
sampled continuous-time sinusoids, 458461
sampling, 155164
rst-order, 178
at-top, 206
impulse, 10, 155158, 366
natural, 206
nonuniform, 177
Nyquist rate, see Nyquist rate
of bandpass signals, 176181
point, 155, 366
practical, 161164
Index
Index
745
746
Index
Index
747
748
Index