Digital Signal ProceSSing
Digital Signal ProceSSing
João MarqueS De carvalho, eDMar canDeia gurJão, luciana ribeiro veloSo, anD carloS Danilo MiranDa regiS
MOMENTUM PRESS, LLC, NEW YORK
Digital Signal Processing
Copyright © Momentum Press ^{®} , LLC, 2019.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means— electronic, mechanical, photocopy, recording, or any other—except for brief quotations, not to exceed 400 words, without the prior permission of the publisher.
First published by Momentum Press ^{®} , LLC 222 East 46th Street, New York, NY 10017 www.momentumpress.net
ISBN13: 9781947083905 (print) ISBN13: 9781947083912 (ebook)
Momentum Press Communications and Signal Processing Collection
Collection ISSN: 23774223 (print) Collection ISSN: 23774231 (electronic)
Cover and interior design by Exeter Premedia Services Private Ltd., Chennai, India
10 9 8 7 6 5 4 3 2 1
Printed in the United States of America
AbstrAct
In this book, we present the fundamentals of digital signal processing (DSP) in a format which is both concise and accessible to anyone with an engineering or sciences background. Without sacrificing the fundamental theory and concepts, we provide the reader with knowledge that capaci tates him or her for further reading or for using available DSP tools. The initial chapters provide the background for proper understanding of DSP techniques. We start by presenting discretetime (digital) signals and systems, with emphasis on the class of linear shift invariant (LSI) systems, as those are used to model most systems of practical interest. In the sequence, we introduce the Fourier and the z transforms, which are essential signals and systems analysis tools, followed by signal sampling and analogtodigital (A/D) conversion. The discrete Fourier transform (DFT) and its computationally effi cient form, the fast Fourier transform (FFT), are examined next. FFT algorithms have been widely used in different DSP applications, either in software or in hardware implementation, for realtime signal processing in the frequency domain at very high sampling rates. The largest chapter of this book is dedicated to digital filters, which are an essential component of most DSP systems. We analyze and com pare the two main filter classes: infinite impulse response (IIR) and finite impulse response (FIR) and the structures used for their implementation. We also describe how to specify a digital filter and the main design tech niques for both IIR and FIR filters. Examples are presented throughout the chapter. In the final chapter, we present examples of DSP techniques appli cations to practical problems from several areas, including time and frequency analysis of signals, biomedical signal processing, audio pro cessing, and digital communications.
vi
• AbstrAct
KeyWords
A/D conversion; digital signal processing; digital filters; fast fourier transform; fourier transform; signals sampling
contents
List of Figures 
ix 

List of Tables 
xv 

Preface 
xvii 

Acknowledgments 
xxi 

1 DiscreteTime Signals and Systems 
1 

1.1 Introduction 
1 

1.2 Properties of DiscreteTime Signals 
2 

1.3 The Unit Step and Unit Impulse Signals 
8 

1.4 Complex Exponential and Sinusoidal Signals 
10 

1.5 DiscreteTime Systems 
13 

1.6 Linear ShiftInvariant Systems 
19 

1.7 Chapter Overview 
22 

2 DiscreteTime Signal Transforms 
23 

2.1 Introduction 
23 

2.2 Signals as Linear Combinations of Complex Exponentials 
24 

2.3 Fourier Series for Periodic Signals 
25 

2.4 The Fourier Transform 
26 

2.5 The z Transform 
37 

2.6 Chapter Overview 
53 

3 Sampling and Analog to Digital Conversion 
55 

3.1 
Introduction 
55 
3.2 
Signal Sampling and Reconstruction 
55 
3.3 
AnalogtoDigital Conversion 
59 
3.4 
Chapter Overview 
65 
4 Discrete Fourier Transform and Fast Fourier Transform 
65 

4.1 
Introduction 
65 
4.2
Discrete Fourier Transform
66
viii
• contents
4.3 Circular Convolution 
68 

4.4 OverlapAdd Method 
70 

4.5 Windowing 
73 

4.6 The Fast Fourier Transform 
73 

4.7 Chapter Overview 
78 

5 Digital Filters 
79 

5.1 
Introduction 
79 
5.2 
FIR and IIR Filters 
80 
5.3 
Magnitude and Phase of Digital Filters 
84 
5.4 
Comparing FIR and IIR Filters 
88 
5.5 
Specifying a Digital Filter 
89 
5.6 
IIR Filter Design with the Bilinear Transformation 
91 
5.7 
Designing FIR Filters 
103 
5.8 
Chapter Overview 
119 
6 Applications 
121 

6.1 
Introduction 
121 
6.2 
Spectrum Peak Detection 
121 
6.3 
Signal Envelope Detection 
122 
6.4 
Processing Electromyographic Signals 
123 
6.5 
Generating Audio Effects 
124 
6.6 
Removing Harmonic Interference 
127 
6.7 
Digital Down Converter 
129 
6.8 
Decimation in SoftwareDefined Radios 
130 
6.9 
Polynomial Multiplication 
131 
6.10 
Fourier Analysis of Signals with TimeVarying Spectral Components 
132 
6.11 
Chapter Overview 
133 
Recommended Readings 
137 

About the Author 
139 

Index 
141 
List of figures
Figure 1.1.
Figure 1.2.
Figure 1.3.
Figure 1.4.
Figure 1.5.
Figure 1.6.
(a) Continuostime signal s(t), (b) discretetime signal
s
Discretetime periodic signal (segment) with period N _{0} . (a) Signal x ( n ), (b) x _{e} (n), even component of x(n),
(c) x _{o} (n), odd component of x(n).
Time shifting: (a) original signal v(n), (b) delayed signal g(n) = v(n–2).
Time reversal: (a) original signal g(n), (b) reversed signal g(–n).
Time scaling: (a) original signal x(n) =
(b) compressed signal g(n), (c) expanded signal v(n).
(a) Unit step signal u(n), (b) unit impulse signal δ(n). Signal x(n) for Example 1.5.
_{d} (n) = s(nT ).
pn
6
,
si n
Figure 1.7.
Figure 1.8.
Figure 1.9.
Figure 1.10. One period of sinusoidal signal x(n) _{=}
Figure 1.11. Nonperiodic cosine x(n) = co s
Figure 1.12. Representation of a discretetime system.
Figure 1.13. Accumulator of Example 1.8: (a) input signal x(n) = u(n), (b) output signal y(n).
Figure 1.14. LSI system represented by its impulse response h(n).
Figure 1.15. Equivalences among serial connections of LSI systems.
Figure 1.16. (a) Parallel connection of two LSI systems,
Signal x(n) for Example 1.6.
p
6 ^{n}
.
si n
2
3 ^{n}
_{} for Example 1.7.
Figure 2.1.
(b) equivalent single system.
Example 2.2 for N _{1} = 2 and N = 20: (a) periodic impulse train, (b) Fourier series coefficients.
2
3
5
6
7
8
9
9
10
11
12
14
14
19
21
21
26
Figure 2.2.
Example 2.3: (a) magnitude and (b) phase of X(e ^{j}^{w} ).
28
x
• List of figures
Figure 2.3.
Figure 2.4.
Figure 2.5.
Figure 2.6.
Figure 2.7.
Figure 2.8.
Figure 3.1.
Figure 3.2.
Figure 3.3.
Figure 3.4.
Figure 3.5.
Figure 3.6.
Example 2.4: Magnitude response of the average filter. The z plane and the unit circle. ROC representation: R _{−} < z = r < R _{+} . ROC and polezero plot for Example 2.6. ROC and polezero plot for Example 2.7.
ROCs for Example 2.8: (a) X _{1} (z)z>1/3,
(b) X _{2} (z):z < 1/2, (c) X(z):1/3<z<1/2.
Block diagram of analog to digital conversion.
(a) Continuoustime signal x(t) and (b) frequency spectrum of x(t).
(a) Analog signal x(t), (b) impulse train s(t), and
(c)
Frequency spectrum of the impulse train s(t).
Spectrum of the sampled signal x
Signal reconstruction in the frequency domain
(a) X _{s} (jΩ), (b) H _{L}_{P} (jΩ), and (c) X _{r} (jΩ).
(a) Sampled signal x _{s} (t) and (b) recovered signal x _{r} (t). Quantization levels for uniform quantization. Quantization levels for nonuniform quantization.
product x
_{s} ( ) =
t
x t s t ) .
( )
(
s ^{(}
t ) with _{Ω}
s
> 2
_{Ω}
x
.
Figure 3.7.
Figure 3.8.
Figure 3.9.
Figure 3.10. Block diagram for decimation.
Figure 3.11. Discretetime interpolation: (a) original x(n),
(b) interpolated x _{i} (n), using L =
T
^{T} i
= 4.
Figure 3.12. 
Block diagram for interpolation. 
Figure 4.1. 
Magnitude of the Fourier transform of signal x(n) in Example 4.1. 
Figure 4.2. 
N = 8 samples taken from X(e ^{j}^{w} ) (dashed lines) of Example 4.1 producing X(k). 
Figure 4.3. 
Signal x(n) obtained with zero padding for N = 16. 
Figure 4.4. 
Magnitude of the DFT for Example 4.1 calculated with N = 16. 
Figure 4.5. 
Example 4.2: (a) Signal x(n) with L = 4, (b) signal h(n) with M = 4, and (c) result of circular convolution between x(n) and h(n). 
Figure 4.6. 
Linear convolution obtained with N + M + L – 1 in the circular convolution for Example 4.3. 
35
37
38
40
41
45
55
56
56
57
57
58
59
60
61
63
63
64
66
67
67
68
69
69
List of figures • xi
Figure 4.7.
Application of the overlapadd method to a signal x(n) to calculate linear convolution between x(n) and h(n).
N = 16point DFT of x ( n ) =
11
Figure 4.8.
p
2
n
p
20
.
_{n}
.
co
co
s
s
Figure 4.9.
Figure 4.10. (a) Discrete hanning window, (b) DFT of the discrete hanning window.
Figure 4.11.
N = 16point DFT of _{x} _{(} _{n} _{)} _{=}
11
p
20
n
Magnitude of the N = 16point DFT of x ( n ) = obtained with a hanning window.
Butterfly structure representation. Butterfly for N/2. Structure composed by butterflies for N = 8.
Frequency response of ideal filters: (a) lowpass and (b) highpass.
Effects of ideal filtering: (a) spectrum of a hypothetical signal, (b) lowpass filtered spectrum, and (c) highpass filtered spectrum.
Tapped delay line implementation of an FIR filter.
Canonic implementation of a recursive (IIR) filter of order N.
Flow graph for the FIR structure of Figure 5.3. Flow graph for the IIR structure of Figure 5.4. Flow graph for an IIR secondorder section.
Illustration of filtering on the magnitude and phase of a signal.
Frequency response for an ideal lowpass filter.
co s
Figure 4.12.
Figure 4.13.
Figure 4.14.
Figure 5.1.
Figure 5.2.
Figure 5.3.
Figure 5.4.
Figure 5.5.
Figure 5.6.
Figure 5.7.
Figure 5.8.
Figure 5.9.
Figure 5.10. Example of frequency response for a real lowpass filter.
Figure 5.11. Example of lowpass filter specification.
Figure 5.12. Nonlinear relation between _{w} and _{W} for bilinear transformation.
Figure 5.13. Mapping of H _{a} (e ^{j}^{w} ) into H(e ^{j}^{w} ) with bilinear transformation.
Figure 5.14. Flow graph for an IIR Filter from Example 5.1.
Figure 5.15. Magnitude and phase responses of IIR Butterworth lowpass filter of Example 5.2.
71
72
72
74
74
76
76
77
80
80
82
82
83
83
83
85
87
87
90
93
94
95
97
xii
• List of figures
Figure 5.16. Magnitude and phase responses of IIR Chebyshev lowpass filter of Example 5.3. 
99 

Figure 5.17. Magnitude and phase responses of IIR Elliptic lowpass filter of Example 5.4. 
100 

Figure 5.18. Magnitude and phase responses of H(z) for Example 5.5. 
103 

Figure 5.19. 
Rectangular window: w(n) and W(e ^{j}^{w} ). 
107 
Figure 5.20. 
Windowing in the time domain. 
108 
Figure 5.21. 
Windowing in the frequency domain. 
109 
Figure 5.22. Commonly used windows for an FIR filter design. 
111 

Figure 5.23. Impulse and magnitude responses for Example 5.6 with Hanning window and N = 124. 
112 
Figure 5.24. Magnitude responses for Example 1.7 (a) rectangular with N = 36, (b) Bartlett with N = 122, (d) Hamming with N = 132, and (e) Blackman window with N = 220. 112
Figure 5.25. Impulse and magnitude responses for Example 5.7. 
114 

Figure 5.26. Frequency sampling design: (a) sampling H _{d} (e ^{j}^{w} ), (b) interpolating between samples to obtain H(e ^{j}^{w} ). 
116 

Figure 5.27. 
H _{d} (k) for Example 5.8. 
117 
Figure 5.28. Impulse and magnitude responses for Example 5.8. 
118 

Figure 6.1. 
Points to FFT interpolation to obtain the peak adjust factor d. 
122 
Figure 6.2. 
AMDSB Signal x(n) and its interpolated envelope signal e(n). 
124 
Figure 6.3. 
Electromyographic signal representing three biceps contractions: (a) signal, (b) signal filtered with Butterworth filter, and (c) signal filtered with Hamming filter. 
125 
Figure 6.4. 
Universal filter block diagram for delay generation. 
126 
Figure 6.5. 
Block diagram for Schroeder reverb generation. 
127 
Figure 6.6. 
Frequency response (magnitude) of a comb filter for D = 6. 
128 
Figure 6.7. 
Magnitude of 256 points FFT for a 650 Hz signal plus 256 Hz and 512 Hz interference. 
128 
Figure 6.8. 
256 points FFT magnitude of the signal filtered by a comb filter with D = 10 to remove interference. 
129 
List of figures • xiii
Figure 6.9. 
Block diagram of a DDC. 
130 
Figure 6.10. STFT: (a) signal (b), (c), (d), and (e) windowed segments. 
133 

Figure 6.11. (a) 1,024 points FFT absolute value and (b) STFT of the signal in Figure 6.10 (a). 
134 
List of tAbLes
Table 2.1. 
Basic Fourier transform pairs 
28 
Table 2.2. 
Properties of the Fourier transform 
33 
Table 2.3. Some commonly found signals and their z transforms 
44 

Table 2.4. 
Main z transform properties 
49 
Table 5.1. Transformations to map a prototype lowpass filter into other filter types 
102 

Table 5.2. 
Impulse responses for linearphase FIR filters 
105 
Table 5.3. Magnitude response H _{d} (e ^{j}^{w} ) and impulse response h _{d} (n) of standard frequencyselective filters with cutoff frequency w _{c} and sample delay a. 
106 

Table 5.4. Commonly used windows for an FIR filter design 
110 

Table 5.5. 
Windows features for an FIR filter design 
110 
Table 6.1. Configurations of a universal filter for the example of Figure 6.4. 
127 
PrefAce
Motivation for this book comes from the assessment that technological knowledge transmission should not be restricted to the traditional sequence of courses present in most undergraduate programs. Those courses have and will maintain in the foreseeable future a vital role in the formation of qualified professionals. Nevertheless, there is an evergrowing need for texts written in a concise (although not less accurate) format to teach in a few hours the basic theory and essential techniques of a subject, as well as to provide understanding of some related applications. This book aims to fill this gap, being directed to people who need to acquire the fundamen tals of digital signal processing (DSP) in a short time, during a three hours flight, for example. DSP works with digital representations of signals, modifying those in order to improve their analysis, transmission, and reception. Starting in the 1960s, the use of DSP has been growing continuously, because of the development of powerful and efficient methods, particularly filter design techniques and fast Fourier transform (FFT) algorithms, opening several application areas. The advancement of integrated circuits technology further contributes to the popularization of DSP, allowing for highspeed implementations of complex processes. In this book, we present the fundamentals of DSP in a concise format accessible to anyone with an adequate mathematical background. We do not assume a previous course on signals and systems, as is usually the case with undergraduate textbooks. Knowledge of differential and integral calculus and of finite and infinite sequences and series, as well as complex numbers, is the basis needed to read and understand the present text. Our book should be of interest to anyone with an engineering or sciences background who must attend on a short notice a technical meet ing or who needs to use a DSP software tool, but does not have enough time to learn all theory behind the involved methods. As an example, DSP textbooks typically describe in details optimization techniques for equiripple FIR filters parameters selection or for minimizing IIR filters
xviii
• PrefAce
frequency response meansquare error. Those details were originally justi fied because the filter designer had often to implement those optimization algorithms. However, many software libraries and toolboxes are currently available with filter design and implementation modules, requiring only a set of specifications from the user. Thus, the designer can focus on deter mining the best set of filter specifications for the problem at hand, instead of spending time to learn all involved methods. In addition, this book can also be used as a textbook for an advanced undergraduate or graduate course in DSP with emphasis on problem solving. This type of course usu ally starts with the analysis of an application problem, from which theory is introduced only as required to progress toward a solution. We start the book in Chapter 1 looking at the fundamentals of dis cretetime signals and systems. Signals properties are presented, and the unit step, unit impulse, and complex exponential signals are defined and analyzed. After describing the basic properties of discretetime systems, we focus on linear shift invariant systems, as those are used to model most systems of practical interest. The discrete convolution operation is defined and its computation analyzed. Chapter 2 is dedicated to the discretetime Fourier transform and the z transform. Those are the tools that allow analysis of discretetime signals and systems in the frequency and z domains, respectively, providing the basis for most DSP techniques. Both transforms express signals as linear combinations of complex exponentials, as described in the chapter. The relationship between Fourier and z transforms, the concepts of conver gence and region of convergence, frequency response, and examples of applying transforms to the analysis and implementation of discretetime systems are also presented in Chapter 2. Signal sampling and analog to digital (A/D) conversion is the sub ject of Chapter 3. We start by analyzing uniform time sampling of analog signals, establishing the fundamental limit of the Nyquist theorem and defining aliasing and the need for antialiasing filtering. Analog signal reconstruction from its samples is also described both in time and fre quency domains. Next, quantization and encoding of sampled signals are examined in this chapter. Uniform and nonuniform quantization, binary representation of quantized samples, and intrinsic errors in analog to dig ital conversion are analyzed and A/D converter parameters described. Finally, Chapter 3 analyzes sampling and reconstruction, or sampling rate reduction and increase, of discretetime signals performed by the decima tion and interpolation operations, respectively. In Chapter 4, we introduce the discrete Fourier transform (DFT). While the discretetime Fourier transform presented in Chapter 2 is
PrefAce • xix
periodic and continuous in frequency, DFT provides a finitelength dis crete frequency domain representation of a signal. We present the concept of circular convolution, show how DFT is applied to an infinitelength signal, and analyze effects of leakage and windowing on DFT. Despite its potential for DSP applications, DFT was initially of limited practical use due to its high computational complexity. The amount of complex multiplications required for a direct DFT calcula tion of a size N signal is of order N ^{2} . Only with the advent of the family of algorithms known as fast Fourier transform (FFT), this complexity was reduced to order N log _{2} N, making it feasible for implementation in DSP systems. The decimation in time formulation of the FFT is derived in Chapter 4, as well as the structure known as butterfly, which implements the basic computation for that FFT form. We show how butterflies can be combined to calculate largersize FFTs. Filters are the main components of most DSP systems; thus, proper understanding of specification, design, and synthesis of digital filters is fundamental for a good understanding of those systems. This is the sub ject of Chapter 5. We start by analyzing and comparing the two main filter classes: infinite impulse response (IIR) and finite impulse response (FIR) and the structures used for their implementation. Applying the bilinear transformation to design lowpass IIR filters from analog filter is exam ined, followed by description of the zdomain transforms that allow to obtain other frequency selective filters from a lowpass prototype. Design examples are provided. Still in Chapter 5, we examine three linear phase FIR filters design techniques: windowing, optimal equiripple, and frequency sampling. We describe the main features of each method and provide design examples. Relative advantages and drawbacks are discussed, and a comparison among them is presented. We finally describe in Chapter 6 how DSP techniques can provide the solution to practical problems chosen from several application areas, which include time and frequency analysis of signals, biomedical signal processing, audio processing, and digital communications. Much has been written on the subjects presented in this book. Instead of inserting reference citations along the text, we opted for providing a set of Recommended Readings at the end. We believe that this approach makes for a more fluid reading, in tune with the objective of this book. By looking up at the indexes of the recommended texts, readers can further explore any of the topics here covered. Although it reflects our preference, the list of Recommended Readings is not exhaustive by any
xx
• PrefAce
criteria, and many other textbooks and technical papers are available on DSPrelated subjects. Finally, we hope that this book will be helpful to professionals and students in need of an introduction to the area of DSP. João Marques de Carvalho, Edmar Candeia Gurjão, Luciana Ribeiro Veloso, and Carlos Danilo Miranda Regis
AcknowLedgments
The authors express their gratitude to all those who made this book possible, especially to their families for the continuous support. The authors are thankful to professor Orlando Baiocchi from the University of Washington, Tacoma, United States, who supported this project from the beginning and helped with the reviewing process. The authors also acknowledge the support of Joel Stein from Momentum Press who provided the documents and guidance required during the writing process.
cHAPter 1
discretetime signALs And systems
1.1 introduction
A discretetime signal is a sequence of values usually representing the behavior of a physical phenomenon. In electrical engineering problems, those values are samples of a continuoustimevarying electrical signal taken at uniform rate, called sampling rate or sampling frequency. The inverse of the sampling rate is called sampling interval or sampling period. Figure 1.1 shows the graphical representations of a continuoustime signal and its discretetime uniformly sampled version. For the latter, time is normalized by the sampling period becoming the index n. This can be stated as:
s
_{d} ( ) =
n
s n T )
(
(1.1)
where T is the sampling period. In practice, continuoustime or analog signals are electrical events (voltage or current) representing the behavior of some physical phenomenon such as speech or temperature as a function of time. Devices known as transducers are utilized to convert physical variations (of pressure or temperature, for example) into voltage or electrical current changes, thus creating an electrical signal. To be digitally processed, electrical signals have to be sampled, time discretized, quantized, and encoded, thus becoming a digital signal. Therefore, a digital signal is a discretetime signal, as represented in Figure 1.1(b), for which the amplitude is quantized, that is, it is constrained to assume values in a finite set. Quantization is usually accomplished by rounding or truncating the amplitude sample to the nearest value in the discrete set. It is always present in digital signal processing, as samples
2
• digitAL signAL Processing
Figure 1.1. (a) Continuoustime signal s(t), (b) Discretetime signal s _{d} (n) = s(nT ).
must be stored in finite length registers. Chapter 3 analyzes the sampling and quantization processes. In this chapter, we present the main properties of discretetime signals, demonstrate how those signals are affected by operations on the independent variable, and introduce some signals that are important in digital signal processing.
1.2 ProPerties of discretetime signALs
Most properties of continuoustime (analog) signals are also common to discretetime (digital) signals. In this section, we review some relevant properties to digital signal processing.
1.2.1
Periodicity
A discretetime signal is periodic if there exists an integer N such that:
x ( n ) = x ( n + N )
_{(}_{1}_{.}_{2}_{)}
for any value of n. The integer N is called the period of the signal.
discretetime signALs And systems • 3

x( n ) 



2 









1 









− 2 N _{0} 
−N _{0} 
0 
N _{0} 
2 N _{0} 
n 
Figure 1.2. Discretetime periodic signal (segment) with period N _{0} .
Equation 1.2 holds for any integer multiple of N. Figure 1.2 shows a periodic signal where N _{0} is the smallest value that period N can assume, called fundamental period. Thus, this signal is periodic for any period N = kN _{0} , k integer. Equation 1.2, thus, generalizes to:
x ( n ) = x ( n + kN ) ∀ n, k ∈ Z .
0
1.2.2 Power and energy
(1.3)
The energy of a discretetime signal x(n) is defined as:
E
∞
∑
= 
n =−∞
x ( n )

2
.
(1.4)
The average power of a discretetime signal is defined as:
P =
li m
N →∞
1
N
N
2
− 1
∑
n =−
N
2

x n
(
)

2
.
(1.5)
If x(n) has finite energy (E < ∞ ), then P = 0, and the signal is called an energy signal. If E is infinite and P is finite and nonnull, then x(n) is known as a power signal. All finite duration signals with finite amplitude are energy signals. All periodic signals are power signals, but not all power signals are necessar ily periodic.
1.2.3 even and odd SignalS
An even signal is symmetric with respect to the vertical axis. Therefore, for an even signal, we have:
x ( n ) = x ( − n ).
4
• digitAL signAL Processing
If a signal is antisymmetric with respect to the vertical axis, that is, if:
x ( n ) = − x ( − n )
it is called an odd signal. Any signal x(n) can be expressed as the sum of an even component x _{e} (n) and an odd component x _{o} (n) such that:
( ) =
x n
( ) +
x n
e
( ).
x n
o
The even and odd components of the signal can be obtained as:
and
x
_{e} ( ) =
n
x
_{o} ( ) =
n
1
2
[
x n
(
) + ( −
x
n
)
]
1
2
[
x n
(
) − ( −
x n ) ].
(1.6)
(1.7)
Example 1.1 Consider the following discretetime signal:
x ( n ) =
1 0
,
≤
n
≤
4
0 otherwis e
,
.
The even and odd components of this signal can be obtained, respec tively, from Equations 1.6 and 1.7, yielding:
and
_{e} ( ) =
x n
_{o} ( ) =
x n
1
2
, 1 ≤
n  ≤
4
1
0 , otherwis e
,
n =
0
−
1
1
4
≤
n
≤
4
≤ −
1
otherwis e
.
2
0 ,
, − ≤
n
Signals x(n), x _{e} (n) and x _{o} (n) for this example are shown in Figure 1.3.
discretetime signALs And systems • 5
1 




0.5 










− 
6 
− 4 
− 2 
0 
246 n 

(a) 


x 
_{e} ( n ) 

1 





0.5 










−6 
− 4 
− 
2 
0 
246 n 

(b) 

0.5 
x
o ( n )






−4 
− 2 




− 
6 
0 
246 n 





− 0.5 

(c)
Figure 1.3. (a) Signal x(n), (b) x _{e} (n), even component of x(n), (c) x _{o} (n), odd component of x(n).
1.2.4 oPerationS on the indePendent variable
Discretetime signals are functions of the discrete variable n. Therefore, all operations defined for functions, such as sum and multiplication, are also valid for signals. More specific to our interest is how signals are affected by operations performed on the independent variable, which we examine next.
1.2.4.1 time Shifting
Time shifting of a signal is accomplished by replacing the independent variable n by n − n _{0} . If n _{0} is a positive integer, the signal is delayed; other wise, (negative n _{0} ) the signal is advanced. Delaying means that the signal is rightshifted, whereas advancing implies a left shift.
Example 1.2. Consider v ( n ) = means to delay it by 2:
2
5
n
2
+
1
5
n . Shifting
g ( n
g n
(
)
)
=
=
v ( n
−
n
0
)
=
v ( n
−
2
)
1
[
(
2
n
2
)
2
+
(
n
1
−
−
5
5
2
)]
=
(
2
v ( n )
n
2
−
7
by
n
+
n _{0} = +2
6
)
6
• digitAL signAL Processing
Figure 1.4. Time shifting: (a) original signal v(n), (b) delayed signal g(n) = v(n–2).
A segment of the delayed signal g ( n ) = v ( n − 2 ) is illustrated Figure 1.4.
1.2.4.2 time reversal
Time reversing a signal consists in changing the sign of the independent variable n. Thus, the timereversed version of a discretetime signal x(n) is x(−n). This reversion has the effect of reflecting the signal about the vertical axis.
Example 1.3. Let us timerevert the signal g ( n ) = Example 1.2:
n )
+
6
1
5
]
(
2
2
n −
7
n + )
6
from
Both g(n) and g(−n) are illustrated in Figure 1.5.
1.2.4.3 time Scaling
Time scaling by an integer factor α is achieved by multiplying or dividing the independent variable n by α, with α > 1. Multiplication implies in time compression, whereas division implies in time expansion. Therefore,
discretetime signALs And systems • 7
Figure 1.5. Time reversal: (a) original signal g(n), (b) reversed signal g(–n).
x(αn) and x(n/α) are, respectively, timecompressed and timeexpanded versions of x(n). For discretetime, compression corresponds to sampling the signal at rate α, meaning that, for each α samples, one is preserved and the others are discarded. Inversely, expansion in discretetime means that α − 1 samples are inserted between two original ones. The values of the inserted samples must be estimated by some interpolation technique.
p
Example 1.4. Consider the discretetime sinusoidal signal x ( n ) = sin( ) n , (more on sinusoidal signals in Section 1.4). Compressing this signal by a factor α = 2, we obtain the signal g ( n ) given by:
6
g n
(
) =
(
x 2 n
) = si n
2 n
p
n
3
6
= s in
p
.
Expansion of x ( n ) by factor 2 corresponds to signal v ( n ):
(
)
v n =
x
(
)
n / 2 =
0
,
si n
p
n
n 12 ^{,}
p
⋅
6
2
=
s in
n even
n odd
Figure 1.6 shows signals x(n), g(n), and v(n) for 0 ≤ n ≤ 1 2 . One full cycle of x(n) fits in that interval, as shown in Figure 1.6(a). Due to time compression, two cycles of g(n) fit in the same interval. However, it can be seen in Figure 1.6(b) that some samples of x(n) are lost to produce g(n). In this example expansion is accomplished by inserting zero between each two original values of x(n). As a result, only half cycle of v(n) fits in the
8
• digitAL signAL Processing
interval, as shown in Figure 1.6(c). Other techniques can be used to fill the gaps between samples, such as replication of the previous value or linear interpolation.
1.3 tHe unit steP And unit imPuLse signALs
The discretetime unit step signal is called u ( n ) and is defined as:
u ( n ) =
0
1 ,
,
n
n
<
≥
0
_{0}
as shown in Figure 1.7(a).
The
discretetime
unit
impulse
signal
Figure 1.7(b) and is defined as:
d ( n ) =
1
0
,
,
n
n
=
≠
0
0
,
.
called
δ(n)
is
(1.8)
shown
in
(1.9)
discretetime signALs And systems • 9

u 
( n ) 

δ 
( n ) 







1 
1 














− 
4 
− 2 
0 
2 
4 
n 
−4 
− 2 
0 
2 
4 
n 

(a) 
(b 
) 
Figure 1.7. (a) Unit step signal u(n), (b) unit impulse signal δ(n).
Signals δ(n) and u(n) are related by the following equation:
(
u n
_{)} =
n
_{∑}
k =−∞
d ( )
k
.
(1.10)
Signals δ(n) and u(n) play a very important role in the study of digital signals and systems. These signals can be used to express other discretetime signals, as shown in the following examples.
Example 1.5. Consider the following signal:
(
x n
) =
1
2
n − 2
_{} 
, 
n 
≥ 2 

0 
, 
n 
< 
2 
shown in Figure 1.8. An alternative expression for this signal can be obtained with a shifted unit step signal as:
Figure 1.8. Signal x(n) for Example 1.5.
10 • digitAL signAL Processing
Figure 1.9. Signal x(n) for Example 1.6.
Example 1.6. Consider the finite duration signal shown in Figure 1.9 and given by:
(
x n
) =
n
,
2
0 ,
4
otherwis e
n
0
≤
≤
.
Signal x(n) can be expressed using two unit steps, one of which shifted to n = 5
x
(
n _{)} =
n
2
u ( n ) − u (n − )
5 ^{.}
Alternatively, this signal can be expressed in terms of a sum of shifted weighted impulses:
x _{(}_{n} _{)} = 0 d _{(}_{n} _{)} + 0 .5 d _{(}_{n} − 1) + d _{(}_{n} − 2 _{)} + 1. 5 d _{(}_{n} − 3) + 2 d _{(}_{n} − 4 _{)} .
1.4 comPLex exPonentiAL And sinusoidAL signALs
A discretetime complex exponential signal is defined as:
(
x n
_{)} =
z
n
=
n
r e
j n
w
(1.11)
where z is a complex parameter given by z
imaginary component of z is null, and the complex exponential becomes
n . In this case, for  r  > 1 , we have
an increasing exponential, whereas for  r  < 1 , x _{(}_{n} _{)} is a decreasing exponential.
a real exponential signal x n r
j ^{w} . When w = 0, the
= r e
(
_{)} =
discretetime signALs And systems • 11
Of particular interest is the case  r  = 1 that implies z e ^{j} ^{w} ^{0} . From
=
Euler’s formula, we have:
where
and
(
x n
_{)} =
e
j
w
0
n
=
cos(
w
0
n
cos( w ) =
0
n
1
2
j
e
w
0
n
sin( w ) =
0
n
1
2 j
j
e
w
0
n
)
+
j
s in(
w
0
+
−
e
−
j
w
0
n
,
e
−
j
w
0
n
.
n ) 
(1.12) 
(1.13) 

(1.14) 
Equations 1.13 and 1.14 define, respectively, the discretetime cosine and sine signals, jointly known as sinusoidal signals. A general expression for this class of signals is given by:
x _{(}_{n} _{)} = co s _{(}_{w} n + f _{)} ,
0
where
f
is the phase of the sinusoidal signal. For
p
2
f = 0 ,
implies that x ( n ) = sin( w n ) .
x ( n ) = cos( w n ) , whereas f =
0
0
Figure 1.10 shows one period ( N = 12 ) of x ( n ) = si n (
p
6
n ) .
(1.15)
we have
1.4.1 Periodicity of diScretetime exPonentialS
Assuming the existence of a period N such that x ( n ) = x ( n + N ) (Section 1.2.1) for the complex exponential defined in Equation 1.12, we have:
(
x n N
+
.
12 • digitAL signAL Processing
which leads to:
e
j w n
0
⋅
e
j w N
0
=
e
j w n
0
_{.}
(1.16)
Equation 1.16 implies that, if x(n) is periodic, then w _{0} N must be
_{0} N = 2 m , where m
is an integer, that is, for values of w _{0} N that are integer multiples of 2p. The fundamental period is, thus, given by:
such that e ^{j} ^{w} ^{N} = 1 . This condition is satisfied for w
0
p
or
N
= ^{2}
p
m
w 0
(1.17)
w
0
m
=
2
p
N
.
(1.18)
The fundamental frequency defined as:
w
Molto più che documenti.
Scopri tutto ciò che Scribd ha da offrire, inclusi libri e audiolibri dei maggiori editori.
Annulla in qualsiasi momento.