Professional Documents
Culture Documents
Signals, Sequences, and Systems: C H A PT E R
Signals, Sequences, and Systems: C H A PT E R
1
Signals, Sequences, and
Systems
Preview
Analog-to- Digital-to-
x(t) x[n] Discrete- y[n] y(t)
Digital Analog
Time
Converter Converter
System
(ADC) (DAC)
receive sequences of numbers as inputs and process them signal processing technology. Control systems to manufacture
with a numerical procedure (an algorithm) to produce another products, command robots, and move equipment and objects
sequence of numbers as outputs. The elements of the input and also depend on digital processing. Digital computers (or
output sequences generally change at uniformly spaced times, special-purpose digital hardware) are essential elements in all
and the amplitudes of the sequence values are quantized (that of these systems.
is, they can take on only a finite or discrete set of values that Discrete-time systems have many advantages over analog
depend on the wordlength of the digital hardware). Figure 1-4 systems. For example, the accuracy of a digital processor
illustrates a digital or discrete-time system2 along with typical can be improved by increasing the wordlength of the system
input and output sequences. Early applications of digital or using floating-point processing, whereas analog processing
computers focused on simulations of analog systems as a way to accuracy depends on component tolerances, and component
evaluate designs before committing to build systems. Another values may also vary with temperature. In addition, the
application was in seismic exploration, where data was recorded sensitivity to noise of a digital system is generally better
from sensors and later fed into a digital computer and processed. than for an analog system. Another positive feature of a
The processing often took much longer than the time duration discrete-time system is the capability to make changes in
of the recorded data. This was not a serious drawback, since processing functions by modifying the software or firmware
seismic structures do not change significantly except perhaps of the system; changes in analog processing, on the other
over relatively long time periods. hand, generally require hardware component changes. Digital
As technology progressed, however, it became apparent systems are also amenable to implementing adaptive, nonlinear,
that digital computers have attributes that make them very and time-varying processing algorithms, which is a capability
desirable as system elements as well as computational aids not generally available with analog systems. In addition, digital
to carry out analysis and design procedures. Initially, digital processing enables encryption and decryption of system inputs
computers were physically large, relatively slow, had limited and outputs—something that cannot be provided by an analog
memory, were expensive, and required significant electric system. As a consequence of these and other advantages, even
power compared to today’s computers. This began to change analog signals are usually converted to a discrete-time format
in the 1960s, and today digital computers and special-purpose and processed digitally. Depending on the system application,
digital-processing hardware are small, fast, reliable, have the output sequence may be converted (or reconstructed) to
abundant memory, are inexpensive, and require small amounts an analog signal. For example, in an audio system with
of electric power. digital processing, the output would drive speakers, and this
Although the earliest analysis and design approaches for necessitates conversion of the discrete-time output to an analog
discrete-time systems were largely based on “translations” signal, as shown in Figure 1-5.
or adaptations of analog methods, it soon became apparent We note that (in spite of continuing advances in speed, cost,
that the attributes of digital systems offered opportunities to capability, and size of digital hardware) software development
dramatically expand the repertoire of useful techniques. Today, continues to be a challenge. In addition, the need for conversion
the applications of discrete-time systems are everywhere. of continuous-time signals to and from discrete-time sequences
Systems for control, signal processing, and communications adds complexity and cost in the form of analog-to-digital
rely on discrete-time systems technology for both design and and digital-to-analog converters and associated analog filters.
implementation. Speech processing, for example, includes Finally, applications requiring very high speed processing still
techniques for storing, transmitting, enhancing, compressing, may be beyond the capabilities of digital hardware.
synthesizing and recognizing the content of speech, and
identifying a speaker. Interpreting seismic signals is a valuable 1.3 Signals and Sequences
tool in exploration for oil and subterranean surface structures.
We are now ready to consider in detail continuous-time signals
Radar signal processing is relied upon in both civilian and
that occur in analog (or continuous-time) systems and discrete-
military applications to identify and track aircraft, satellites,
time sequences in discrete-time systems. We will observe many
and space vehicles. We frequently see road signs warning
similar characteristics in signals and sequences, but also some
us that our car speed may be tracked by radar. Image
differences.
processing has become widespread in television, movies and
the visual media that surround us. Medical imaging is often
used to detect and diagnose illnesses. Of course, mobile 1.3.1 Signals (Continuous-Time Functions)
phones, audio players, and portable reading tablets also rely on We begin with several signals that occur frequently in
2Although continuous-time system applications and describe these signals
there are subtle differences of significance in some
circumstances, we will use the terms discrete-time systems and digital systems using analytical expressions (equations) and corresponding
interchangeably. graphical representations.
1.3 SIGNALS AND SEQUENCES 5
␦()
Unit impulse
0
Sifting property
∞
p(t)δ(t − t1 )dt = p(t1 ) (1.2)
−∞
3.4
0 t
g(t) 2 2
1.5 1.5
u(t + 1) − u(t − 3)
1 1
u(t)
t 0.5 0.5
0 0
(a) An arbitrary signal
−0.5 −0.5
s(t)
−1 −1
−2 0 2 4 −2 0 2 4
Time, t Time, t
(a) Unit step function (b) Pulse formed by two
unit step functions
t
4 4
3.5 3.5
3 3
1.5 1.5
which is an exact representation of g(t) for all values of t. 1 1
0.5 0.5
Unit Step Function
0 0
Figure 1-8(a) pictures a unit step function that “turns on” at −0.5 −0.5
t = 0 and is defined by −1 −1
−2 0 2 4 −2 0 2 4
Time, t Time, t
Unit step function (c) A cosine with a (d) Signal g(t) multiplied
dc component by pulse function
1, 0≤t
u(t) = (1.4) Figure 1-8: A unit step function and an application.
0, t <0
Ramp Functions 20
18 g1(t)
A shifted ramp function g(t) with slope B is defined as g2(t)
16
14
g2(t) = 2e(−1.2t)
r(t)
−4
2 If A is real and β is imaginary, that is β = j ω0 with ω0 a real
−6 constant, we have
1
−8
0 g(t) = Aej ω0 t = Aej 2πf0 t . (1.11)
−10
−12 −1 In this case, g(t) is a complex-valued function of t. The quantity
−2 0 2 4 −2 0 2 4
Time, t Time, t ω0 is called the radian frequency and has units of radians/second
(a) Scaled, shifted (b) Unit ramp (rad/s); f0 is called the frequency and has units of hertz (Hz) or
ramp function function cycles/second.3 Clearly, ω0 = 2πf0 or f0 = ω0 /2π.
3A hertz has dimensions of cycles/second, and multiplication by 2π
Figure 1-9: Two ramp functions. radians/cycle yields a quantity with dimensions radians per second.
8 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS
Aej ω0 t = A cos(ω0 t) + j A sin(ω0 t) (1.16) The effect of the phase shift ϕ on the diagrams in Figure 1-11
is to rotate each of the vectors by ϕ radians—counterclockwise
and we observe that {real part of [Aej ω0 t ]} = Re[Aej ω0 t ] = for ϕ equal to a positive value or clockwise for ϕ negative.
A cos(ω0 t) and {imaginary part of [Aej ω0 t ]} = Im[Aej ω0 t ] = Figure 1-12 shows a plot generated by DTSFA m-file F1_12
A sin(ω0 t). From Figure 1-11 we see that the real parts of the of the real part of g(t) from Eq (1.17) with A = 5e−j π/3 , ω0 =
vectors representing Aej ω0 t are the projections of these vectors 20π. Clearly, this is a periodic function, and the period easily
onto the real (horizontal) axis and the imaginary parts are the can be measured as shown. As found previously, the period is
projections onto the imaginary (vertical) axis. Notice that the given by
angles made by these vectors with the positive real axis are the
values of ω0 t. T0 = 2π/ω0 = 2π/20π = 0.1 sec . (1.18)
1.3 SIGNALS AND SEQUENCES 9
T0 = 0.1 Other useful expressions for the real and imaginary parts of
g(t) are
5
4
3 Exponentially-modulated sinusoidal signals
= −/3
2
ej (ω0 t+ϕ) + e−j (ω0 t+ϕ)
1 |A|e cos(ω0 t + ϕ) = |A|e
αt αt
2
g(t)
0 T0 = 0.1
−1
−2 ej (ω0 t+ϕ) − e−j (ω0 t+ϕ)
|A|e sin(ω0 t + ϕ) = |A|e
αt αt
.
−3 2j
−4
(1.21)
−5
−0.1 −0.05 0 0.05 0.1 0.15 0.2
t, sec The expressions in Eq. (1.21) frequently occur in linear,
continuous-time systems and are known as exponentially
Figure 1-12: A continuous-time sinusoidal signal. modulated sinusoidal signals. These expressions are obtained
by applying Euler’s identity to expand the definitions of the
cosine and sine functions in terms of exponentials. Several
special cases easily can be deduced by substituting α = 0,
We can also evaluate the phase ϕ as shown in Figure 1-12, and ω0 = 0, or ϕ = 0 as appropriate in these general expressions.
we find that it is indeed −π/3 by determining the value of the Figure 1-13 illustrates two possibilities with positive and
cosine function at t = 0. negative values of α. The dotted curves represent the
At this point it is appropriate to summarize the units of exponential terms that multiply the sinusoid; these terms are
the various quantities in Eq. (1.17). We will use the referred to as the envelope. Notice that exponentially modulated
meter-kilogram-second (MKS) system. The function g(t) has sinusoidal signals are periodic only if α = 0.
whatever units are appropriate for the physical quantity being It is always good practice when relying on computer
represented, such as volts, amperes, watts, joules, meters per programs to ask if the results are reasonable. Figure 1-13
second, and so forth. Time, t, is measured in seconds, and the was generated by running DTSFA file F1_13, and we observe
units of ω0 are radians/second. that the exponential envelope (the term eαt ) decreases as time
Another variation on the complex exponential theme we have increases when the exponent is negative and the envelope
been pursuing is letting increases with increasing time when the exponent is positive.
We can also check a couple of points. For example, at t = 0,
2e−0.6(0) = 2, 2e0.3(0) = 2, and cos(0 + 1.047) = 0.5. This
A = |A|ej ϕ and β = α + j ω0 (1.19)
indicates that the values of g1 (t) and g2 (t) should be 1.0 at
t = 0, as shown on the plots. Other points may be verified in a
in Eq. (1.10) with α and ω0 as real numbers. In this case, both similar fashion.
A and β are complex quantities and
10 g1(t)
8
A
6 2e−0.6t
4
2 t
0 2
g1(t)
0
−2 (a) A sawtooth signal
g1(t) = 2e−0.6tcos(πt + 1.047)
−4
−2e−0.6t g1p(t)
−6
−8 A
−10
−2 0 2 4
Time, t t
−4 −2 0 2 4 6
(a) Exponential decreasing
with t increasing (b) A periodic sawtooth signal
10 g2(t)
8
B
6
4
2 2e0.3t
t
g2(t)
0 0 1 4
g2(t) = 2e0.3tcos(πt + 1.047)
−2 (c) A triangular pulse
−4 −2e0.3t
−6 Figure 1-14: Signals for Example 1-1.
−8
−10 result, using the subscript p to denote periodic, is
−2 0 2 4
Time, t ∞
A
g1p (t) = (t − 2m)[u(t − 2m) − u(t − 2m − 2)].
(b) Exponential increasing
m=−∞
2
with t increasing
where m is an integer.
Figure 1-13: Exponentially modulated sinusoidal signals.
(c) We can represent the rising pulse edge by
Bt[u(t) − u(t − 1)] and the falling edge by
Example 1-1: Describing Continuous-Time Signals −[B/3][t − 4][u(t − 1) − u(t − 4)]; adding these
gives
Use the functions defined previously to determine analytical
expressions for the signals shown in Figure 1-14. B
g2 (t) = Bt[u(t)−u(t −1)]− [t −4][u(t −1)−u(t −4)]
3
Solution:
which can be simplified as
(a) The expression for the signal in the interval 0 ≤ t < 2 is 4B B
(A/2)t, so we need only “turn on” this signal at t = 0 and g2 (t) = Btu(t) − [t − 1]u(t − 1) + [t − 4]u(t − 4).
3 3
“turn it off” again at t = 2, giving
A
g1 (t) = t [u(t) − u(t − 2)] .
2
1.3.2 Sequences (Discrete-Time Functions)
(b) Here we have a repeating, or periodic signal with a period
of 2. We need only to replicate the triangular pulse of We now consider sequences that occur and are processed in
part (a) an infinite number of times with each replica discrete-time systems. As with signals found in continuous-
displaced by two time units from the previous one. The time systems, our focus will be on how to describe sequences
1.3 SIGNALS AND SEQUENCES 11
␦[n]
n
u[n] = δ[m]. (1.26)
1 m=−∞
... ... As with the unit impulse sequence, we can shift and scale the
n step sequence to obtain
0
n
0 1 2 3
as shown in Figure 1-16(b) for B = −5 and n0 = −3. It is
(b) Shifted unit impulse sequence also possible to generalize the definition of the step sequence
by considering the sequence given by B · u[−n − n0 ]. This
Figure 1-15: A unit impulse sequence and a shifted unit impulse sequence will be zero for [−n − n0 ] < 0 or −n0 < n and will
sequence. be equal to B for n ≤ −n0 .
12 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS
2
20
1.5 10
g[n] = 2[n − 10]
1 0
−10
u[n]
g[n]
0.5
−20
0
−30
−0.5
−40
−1 −10 −5 0 5 10 15 20
−10 −5 0 5 10 15 20
Sample number, n
Sample number, n
(a) Unit step sequence Figure 1-17: Shifted ramp sequence.
2
Exponential Sequences
1
x[n] = −5u[n + 3] A sequence characterized by
0
−1
Exponential sequence
−2
x[n]
10 10
Focusing on the units of the quantities appearing in this
expression, we observe that the units of g[n] and hence those
of Ar n are of whatever physical quantity g[n] represents (e.g.,
5 5
volts, meters, meters/second, and so forth). The argument that
appears in the cosine and sine functions is in radians, and the
ga[n]
gb[n]
0 0 phase shift, ϕ, is also in radians. The integer n has units of
samples, so the discrete-time angular frequency ω̂0 is expressed
−5 −5 in radians per sample (rad/smp).4
Equation (1.31) is a general expression that allows us to
−10 −10 investigate several special cases. Defining g1 [n] as the sequence
that results by letting r = 1 and ϕ = 0 in g[n] and taking the
−10 −5 0 5 10 −10 −5 0 5 10 real part, we have
Sample number, n Sample number, n
(a) ga[n] = 4(0.9)n (b) gb[n] = 4(−0.9)n g1 [n] = |A| cos(nω̂0 ), (1.32)
0 0
−10 −5 0 5 10 −10 −5 0 5 10 (b) Repeat part (a) with A = 5, ω̂0 = 0.8, and −18 ≤ n ≤ 18.
Sample number, n Sample number, n What is the period of this sequence?
(c) gc[n] = 4(1.1)n (d) gd[n] = 4(−1.1)n
(c) On the plot of part (b), superimpose a plot of gc (t) =
5 cos(0.8t) for −18 ≤ t ≤ 18. Compare the plots of parts
(b) and (c).
10 10
Solution:
5 5
(a) Figure 1-19(a) is a plot of the sequence ga [n]. This plot
ge[n]
gf[n]
0
By inspecting the plot, we observe that the sequence is
−2 periodic and begins to repeat itself every 16 samples.
−4 Comment:
The graphics function stem is a built-in m-function of
−6 LabVIEW and MATLAB® , software applications that
−15 −10 −5 0 5 10 15
Sample number, n provide many such functions. When referring to these
(a) Cosine sequence ga[n] = 5 cos(nπ/8) m-functions we use boldface type, and the most
significant ones are listed at the end of each chapter.
6
(b) In Figure 1-19(b), the sequence gb [n] = 5 cos(0.8n) is
4 plotted for −18 ≤ n ≤ 18. Inspecting this graph, we
observe that the sequence is not periodic, at least over
2 the interval shown. In fact, this sequence is not periodic,
period!
gb[n]
0
(c) To get an idea of what’s going on here, Figure 1-19(c)
−2 again shows the sequence gb [n], and it also shows the
continuous-time signal gc (t) = 5 cos(0.8t) for −18 ≤ t ≤
18. But t is a continuous-time variable; it is not restricted
−4
to integer values as n is.5 We observe that gc (t) is periodic
with a period of approximately eight units. (Without
−6 knowing the time scale on the plot, we cannot state the
−15 −10 −5 0 5 10 15
Sample number, n period in seconds.)
(b) Cosine sequence gb[n] = 5 cos(0.8n)
6
4
Example 1-2 illustrates that a cosine sequence isn’t always
periodic so let’s consider the conditions that are required for
periodicity. Similar to the continuous-time situation, we define
2
gb[n] and gc(t)
−4 for all integers n. N is the smallest integer for which Eq. (1.33)
holds. For a cosine sequence, this requires that
−6
−15 −10 −5 0 5 10 15 cos(nω̂0 ) = cos([n + N ]ω̂0 ). (1.34)
Sample number, n
(c) Sequence gb[n] = 5 cos(nπ/8) 5Actually, since these plots were obtained by using a PC, all of the variables
and the signal gc(t) = 5 cos(0.8t) are discrete, but in this case, the value 0.005 was used for the time increment
to obtain the plot of gc (t). Thus, this plot is approximately a continuous-time
version of the cosine signal gc (t).
Figure 1-19: Some cosine sequences.
1.3 SIGNALS AND SEQUENCES 15
For the equality to be true, N ω̂0 must be an integer multiple of Therefore, if 0 ≤ ω̂0 < 2π , there will always be an infinite
2π number of sinusoidal sequences with frequencies outside of
N ω̂0 = 2πm (1.35) this range that have identical sample values. Conversely,
if ω̂0 lies outside of the range 0 ≤ ω̂0 < 2π , there will
(i.e., where m is an integer). This in turn requires that
always be an integer and a frequency ω̂0 + 2π for which
ω̂0 = 2π m/N, (1.36) 0 ≤ ω̂0 + 2π < 2π . Figure 1-20(a) shows samples of
three continuous-time sinusoidal signals. These sinusoidal
which tells us that ω̂0 must be a rational multiple6 of 2π if g[n] sequences of samples have discrete-time angular frequencies
is to be a periodic sequence. If this is the case then the period of ω̂ = ω̂0 = 3π/4 rad/s, ω̂0 + 2π = 11π/4 rad/s, and
N is given by ω̂0 + 6π = 27π/4 rad/s. As shown, these three sets of sample
values are identical. Figure 1-20(b) shows the first three
samples from Figure 1-20(a) along with three continuous-time
Period of a periodic sinusoidal sequence sinusoidal signals (represented by the dashed curves) that have
the same sample values.
N = 2πm/ω̂0 . (1.37)
6
Comparing Eq. (1.37) with Eq. (1.15)
4
T0 = 2π/ω0 , (1.38)
g1[n], g2[n], and g3[n] 2
we see that they have a similar structure; however, the period of
the cosine signal T0 in the continuous-time case is a real number,
0
whereas N in the discrete-time case must be an integer.
Looking back at Example 1-2 part (a), we have ω̂0 = 2π/16,
which satisfies Eq. (1.36) for m = 1 and N = 16. Clearly, −2
this relationship is also satisfied for m = 2, and N = 32, etc.,
but it is the smallest value of N that we seek. In part (b), −4
however, ω̂0 = 0.8, and there are no integer values of m for
which N = 2π m/0.8 = 2.5πm will be an integer, because π −6
−2 0 2 4 6 8 10 n
is not a rational number.
So a cosine sequence, even one resulting from sampling (a) Three sinusoidal sequences having the same values
a continuous-time sinusoid that is guaranteed to be periodic,
g1[n] and g1(t), g2[n] and g2(t), and g3[n] and g3(t)
Although it may be unsettling to find that many continuous- g1[n] = 2(1.1)n cos(nπ/8 + π/3) g2[n] = 2(−1.1)n cos(nπ/8 + π/3)
time sinusoidal signals have the same sample values, we shall
see in Section 1.5 on the sampling theorem how this issue is 25 25
20 2 (1.1)n 20 2 (1.1)n
addressed.
15 15
Finally, let us consider the general exponential sequence
10 10
5 5
g[n] = |A|r n {Re[ej (nω̂0 +ϕ) ] + j Im[ej (nω̂0 +ϕ) ]}
g1[n]
g2[n]
(1.42) 0 0
= |A|r n cos(nω̂0 + ϕ) + j |A|r n sin(nω̂0 + ϕ). −5 −5
−10 −10
As previously assumed, we have −15 −15
−20 −2 (1.1)n −20 −2 (1.1)n
A = |A|ej ϕ and a = rej ω̂0 , (1.43) −25 −25
−20 0 20 n −20 0 20 n
where |A|, ϕ, r, and ω̂0 are known, real constants. Again
focusing on the real part
g3[n] = 2(0.95)n cos(nπ/8 + π/3) g4[n] = 2(−0.95)n cos(nπ/8 + π/3)
Exponentially modulated sinusoidal sequence 10 10
8 8
2 (0.95)n 2 (0.95)n
|A|r n cos(nω̂0 + ϕ), (1.44) 6 6
4 4
2 2
we have what is called an exponentially modulated sinusoidal
g3[n]
g4[n]
0 0
sequence. The values of |A| cos(nω̂0 + ϕ) vary between ±|A|.
-2 -2
The factor r n , however, can cause the sequence to increase
-4 -4
without bound or decay to zero as n → ∞, depending whether
-6 -6
1 < |r| or |r| < 1, respectively.7 We also need to consider the −2 (0.95)n −2 (0.95)n
possibility that r may be negative, in which case the sign of -8 -8
the sequence will generally alternate from sample to sample. -10 -10
−20 0 20 n −20 0 20 n
Figure 1-21 shows plots with A = 2.0, ω̂0 = π/8, ϕ = π/3,
r = ±0.95, and r = ±1.1. The dashed curves, collectively Figure 1-21: Exponentially modulated sinusoidal sequences.
referred to as the envelope, are the exponentials ±|Ar n | that
modulate the sinusoidal sequence.
Another relationship that occurs frequently in the analysis of analytical relationships for sequences specified by graphical
linear, discrete-time systems is obtained by expanding cosine representations.
and sine sequences in terms of exponentials as
Example 1-3: Writing Analytical Expressions That
Exponentially modulated sinusoidal sequences Describe Sequences
j (nω̂0 +ϕ) + e−j (nω̂0 +ϕ) Use the sequences defined previously to describe analytically
n e
|A|r cos(nω̂0 + ϕ) = |A|r
n
the sequences shown in Figure 1-22.
2
Solution:
j (nω̂0 +ϕ) − e−j (nω̂0 +ϕ)
n e
|A|r sin(nω̂0 + ϕ) = |A|r
n
2j (a) The pulse sequence can be described by g1 [n] =
u[n] − u[n − 3]. The first step sequence turns on the pulse
(1.45)
at n = 0 and the second step turns it off at n = 3.
1
g3 [n] = (n + 3)(u[n + 2] − u[n]) + 3(u[n] − u[n − 5])
C 3
…
2.5
2
… g[n] = 2u[−n + 3]
g[n] 1.5 = 2 − 2u[n − 4]
g[n]
1
0.5
…
0
…
−0.5
−1
n0 n −15 −10 −5 0 5 10 15
Sample number, n
Figure 1-23: A left-sided step sequence.
Figure 1-24: A left-sided step sequence using stepfun.
m-file
% F1-23: A left-sided step sequence (b) Using a right-sided step sequence, we can write
set(gcf,’DefaultLineLineWidth’,2);
% set default line width to 2 units g[n] = C − Cu[n − n0 − 1] = C(1 − u[n − n0 − 1]).
n=-15:1:15; % n=[-15 -14 ... 9 10]
gn=zeros(size(n)); % f=[0(at n=-15) 0...0 0(at n=10)] (c) The m-file segment that follows uses the m-function
gn(1:13)=2*ones(size(n(1:13))); stepfun and gives the plot in Figure 1-24. The plotting
% Makes first 13 entries of f=2.0, i.e., statements are omitted. Comparing the m-file segments
% gn=[2 2 ... 2 2 2 2 2 2(at n=-3) 0 0...0] used to plot Figures 1-23 and 1-24, we observe the
stem(n,gn); % plot advantages of using stepfun rather than setting the
axis off; individual elements of arrays.
2D 6 110
Quantizer output, xq(t)
D 5 101
Level 5 3 5 3 3 7 4 2 6 4 4 7
Offset Binary 101 011 101 011 011 111 100 010 110 000 000 111
2’s Complement 001 111 001 111 111 011 000 110 010 100 100 011
conversion from discrete-time (or digital) form to an analog order hold DAC; there also are other possibilities.9 The output
signal is accomplished by a digital-to-analog converter (DAC). signal from this DAC is smoothed by a lowpass analog filter.
The input to a DAC is a sequence, and the output is a continuous- Figure 1-31 gives a representation of the process that begins
time signal. One type of DAC converts each input sample value with an incoming analog signal that is converted to discrete-time
to a pulse whose amplitude equals the value of the sample value. form, processed by a discrete-time system, and reconstructed to
The result of this process is shown in Figure 1-30. The sequence analog form. The sequences shown in Figure 1-31 are quantized
values that appear at the output registers of the discrete-time of course. In the remainder of this text, however, we will ignore
processing system are shown as blue circles. This sequence is quantization effects. This corresponds to the assumption that
quantized to the same levels as shown earlier with the three-bit we have ideal conversion of analog signals to discrete-time form
ADC and also may be represented in a 2’s complement binary (as indicated by the dashed straight line in Figure 1-28) and ideal
representation, for example. The particular DAC represented reconstruction using a DAC as well. End-of-chapter references
here provides a piecewise-constant output signal. This signal provide additional details on quantization effects in discrete-
is similar to what occurs in the sample-and-hold portion of an time systems.
ADC. This piecewise-constant output is provided by a zero-
4 Sampling theorem
0 0.08 0.16 0.24 0.32 0.40 time, s The minimum acceptable sampling frequency, 2 · fmax , is
0 1 2 3 4 5 6 7 8 9 10 n known as the Nyquist rate.
Figure 1-30: A DAC input sequence and stepwise constant output 9 See, for example, the discussion in Section 4-4 of Reference [1] in the
signal. bibliography at the end of this chapter.
1.5 THE SAMPLING THEOREM 23
t n n t
Figure 1-31: A discrete-time processing system with analog input and output signals.
Although not a part of the sampling theorem as originally which, by defining ω̂0 = ω0 T can be written as the (discrete-
stated, it turns out that reconstruction of the original analog time) sinusoidal sequence
signal can be carried out by passing the samples through an
x[n] = A cos(nω̂0 + ϕ). (1.51)
ideal lowpass analog filter having an appropriate bandwidth.
The importance of the sampling theorem is that we can We have dropped the sampling period T from x(nT ) knowing
sample a frequency-band-limited, continuous-time waveform; that this dependence is implicit. We define ω̂0 as the digital
use a discrete-time system to process the samples; and then radian frequency of the discrete-time sinusoid, and ω̂0 , ω0 , T ,
convert the processed samples back to an analog signal without and fs have the following important relationships:
losing information! Thus, the sampling theorem is what makes
it possible to obtain the benefits of discrete-time processing as
discussed in Sections 1.1 and 1.2 and shown in Figure 1-31. ω̂0 = ω0 T = ω0 /fs = 2πf0 T = 2πf0 /fs . (1.52)
Our goal in this section is demonstrate why the sampling
theorem works and what happens if its conditions are violated. Again, we note that the units of fs are samples/second, and
We will concentrate on the sampling of sinusoidal signals, but ω̂0 has units of radians/sample. Clearly, ω0 = 0 corresponds
the results can be generalized to other signals as well. to ω̂0 = 0. If ω0 ≈ 2πfs /2, which is the highest frequency
that can be represented by the specified sampling frequency,
Comment:
this corresponds to the digital frequency ω̂0 ≈ π . Thus, the
Deriving the sampling theorem requires background in Fourier
useful range of digital frequencies for a discrete-time system
transform theory. If you have previously studied continuous-
processing analog signals is
time Fourier transforms, however, Appendix C gives an
abbreviated development of the sampling theorem. 0 ≤ ω̂ < π, (1.53)
We begin by observing what happens when a continuous-
corresponding to analog frequencies in the range
time sinusoidal signal is sampled. For example, consider
0 ≤ f ≤ fmax < fs /2. (1.54)
x(t) = A cos(2πf0 t + ϕ) = A cos(ω0 t + ϕ), (1.49)
It is useful at this point to consider some alternative
representations of sinusoidal sequences. Consider
where A is the amplitude, f0 is the frequency in hertz (or cycles
per second), t is time in seconds, ω0 is the angular frequency x[n] = cos(nω0 T ) = cos(nω̂0 )
in radians/second, and ϕ is the phase shift in radians. If this 1 1 (1.55)
signal is the input to an ideal analog-to-digital converter with a = ej nω̂0 + e−j nω̂0 ,
2 2
sampling interval of T seconds/sample (a sampling frequency
fs = 1/T smp/s), the sampled output sequence from an ideal which is a cosine sequence with angular frequency ω̂0 . One
ADC is way to represent this sequence of two exponentials is as a
pair of rotating vectors, as shown in Figure 1-32 where we
x(t)|t=nT = A cos(ω0 t + ϕ)|t=nT = x(nT ) have assumed that ω̂0 = π/4. Notice that one vector rotates
(1.50)
= A cos(ω0 nT + ϕ), counterclockwise and the other clockwise. This representation
24 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS
Magnitude
x(t) x[n] xR(t)
C/D D/C
2
Magnitude
1/2
0 π
−14 −10 −8 −4 −2 −2 4 8 10 14
ˆ 3
−3 3
−3 1 −2 0 −1 −1 0 −2 1 −3
fs fs
− 0 f
2 2
State
equation Signal
flowgraph/
block diagram
Difference
equation
Impulse
response
Transfer
function
Frequency
response
Figure 1-39: Finding the frequency response from other system models.
Convolution Convolution
Final Comment: (by z transforms) (by Laplace transforms)
Tables 1-2 through 1-4 and Figure 1-39 are offered in the spirit
of telling you, the reader, where were going. Depending on the Correlation Correlation
state of your current knowledge, the information in these tables (by z transforms) (by Laplace transforms)
and the figure may mean a lot or very little. We recommend
that you periodically return to this section to gain perspective
as you work your way through the following chapters.
1.6 A ROAD MAP 29
Sampling Theorem
m-functions used
Function Purpose and Use
a(t)
b(t)
(a) u(t − 4) 3
0.5
(b) −2u(t − 1) 2
0
(c) 1.3u(t + 6) 1
(d) u(t − 2) − u(t − 5) 0 −0.5
−1 −1
1.2. Sketching continuous-time signals. −1 0 1 2 3 4 −1 0 1 2 3 4
t in seconds t in seconds
Sketch the following signals.
(a) −2u(t + 1) + 3u(t) − u(t − 2) 2
(b) 2.5t[u(t) − u(t − 2)]
1.5
(c) −2.5t[u(t + 2) − u(t)] c(t) = Kept cos(t + )u(t)
1
(d) −(t+4)u(t+4)+(t+2)u(t+2)+(t−2)u(t−2)−(t−4)u(t−4)
1.3. Signal synthesis. 0.5
c(t)
8 8 g1(t)
7 7
6
… … 6
… … 2
5 5
4 4 t
0 2 4 6
3 3 (a)
2 2 g2(t)
1 1 5
0 0
−1
0 5 10 15 −1 0 5 10 15 20
t, seconds t, seconds t
(a) (b) 0 4
(b)
g3(t)
5 5
4… …
4
3 2
… … 2
3 t
1 0 4 5 10 11
2 0 (c)
−1 g4(t)
1
−2 t
0 −3 0 4 6 10
−4
−1 −5
−5 0 5 10 −10 0 10 20 30 40
t, seconds t, seconds −10
(c) (d) (d)
g1p(t) 6
4
2
x1p[n]
1 0
−2
... ...
t −4
−4 −2 0 2 4 6 8 10 −6 −4 −2 0 2 4 6 8
Samples, n
(a) (a)
g2p(t) 2
2 1
x2p[n]
0
−1
... ... −2
t −6 −4 −2 0 2 4 6 8
−4 −2 0 2 4 6 8 10 Samples, n
(b)
(b)
g3p(t) 4
2
1
x3p[n]
0
t −2
−2 0 2 4 6 8 −4
−6 −4 −2 0 2 4 6 8 10
−1 Samples, n
(c) (c)
3
g4p(t) 2
1
x4p[n]
1 0
−1
... ... −2
t
−5 −3 −1 01 3 5 7 9 11 13 −3
−4 −2 0 2 4 6
(d) Samples, n
(d)
Figure 1-43: Signals to be described analytically.
Figure 1-44: Periodic sequences.
1.15. Periods of periodic sequences.
Write analytical expressions for the sequences shown in
Determine the period N of each of the periodic sequences shown Figure 1-47.
in Figure 1-44.
1.19. Describing periodic sequences.
1.16. Periods of periodic sequences. Write analytical expressions to describe the periodic sequences
Determine the period N of each of the periodic sequences shown fp (n) and gp (n) shown in Figure 1-48.
in Figure 1-45.
1.20. Modifying m-files.
1.17. Sequence synthesis. Modify DTSFA file F1_16 by using the m-function stepfun to
generate the two step sequences.
(a) Describe the sequence shown in Figure 1-46 as the sum
of subsequences consisting of either of the following. 1.21. Modifying m-files.
(i) Ramp sequences "turned on" at n = 0, 2, 6, and 8, Modify DTSFA file F1_21 by using the m-function stepfun to
respectively. generate pulsed, exponentially modulated sinusoidal sequences
(ii) Two triangular sequences and a rectangular pulse whose values are zero except in the interval 0 ≤ n ≤ 20. Adjust
sequence. the axes as necessary to provide useful plots.
(b) Show that the two forms obtained in part (a) are equivalent. 1.22. m-file generation of sequences.
Write and run m-files to generate and plot the sequences of
1.18. Sequence synthesis. Problem 1.13.
PROBLEMS 33
5 e[n]
4 3
3
x1p[n]
2
1
0 ...
−1
−4 −2 0 2 4 6 8 −2 −1 0 1 2 3 4 5 6 7 8 n
Samples, n
(a)
4 f [n]
3
2
x2p[n]
0
−2 ...
−5 0 5 10 −8 −7 −6 −5 −4 −3 −2 −1 0 n
Samples, n
(b) g[n]
2
1 8
x3p[n]
0
−1
−2
−4 −2 0 2 4 6 8 . 2n 4 4 8 . 2−n
Samples, n
(c)
6 2 2
4 1 1
... ...
x4p[n]
2 −4 −3 −2 −1 0 1 2 3 4 n
0
−4 −2 0 2 4 6 8 Figure 1-47: More analytical description of sequences.
Samples, n
(d)
fp[n]
Figure 1-45: More periodic sequences.
2 2 2 2
g[n] 1 1 1 1 1 1 1
... ...
−2 0 2 5 n
2
1
... gp[n]
0 1 2 6 8 n
3
1.26. Analog-to-digital conversion. The sinusoidal signal x(t) = 4 sin(2πf0 t) with f0 = 100 Hz is
sampled with fs = 400 smp/s to obtain the sequence x[n].
This problem uses the notation of Figure 1-28 and Eq. (1.48).
A three-bit quantizer of the truncation type is described by (a) Are the conditions of the sampling theorem satisfied?
⎧ Explain.
⎪
⎨3D, 3D < xs (t) (b) Find three sequences all having the same sample values
xq (t) = mD, mD ≤ xs (t) < (m+1), m = −3, −2, . . . , 2 as x[n].
⎪
⎩
−4D, xs (t) ≤ −3D. (c) Sketch the magnitude frequency spectrum, including
aliases, of the sequence x[n].
(a) Sketch the input–output characteristic of this quantizer.
(b) Defining the quantization error as e(t) = xs (t) − xq (t), 1.31. Frequency spectra.
sketch the error as a function of the input xs (t). Let fsmin denote the minimum sampling frequency to satisfy the
(c) Repeat part (b) using the three-bit rounding quantizer of sampling theorem. For each of the signals of Problem 1.28, use
Figure 1-28. a sampling frequency fs = 2 × fsmin .
(d) Which of the quantizers, the rounding quantizer of (a) Determine the resulting sequences
Figure 1-28 or the truncating quantizer of part (a) would
(b) Sketch the frequency spectra magnitudes in the interval
you prefer to use? Explain.
−π ≤ ω̂ < π .
PROBLEMS 35
1.32. Frequency spectra and sampling frequency. (c) On a magnitude spectrum sketch, show the frequency
components that are aliases of one another assuming that
Let fsmin denote the minimum sampling frequency to satisfy the
fs = 200 smp/s and f0 = 50 Hz.
sampling theorem.
(d) Compare the results of part (c) with those of Figure 1-34.
(a) For the signal of part (a) of Problem 1.28, sketch
the frequency spectrum magnitudes for the sequences Visualization Problems
obtained when
(i) fs = 2fsmin In each of the following four problems, we assume the
(ii) fs = 3fsmin configuration in Figure 1-36. That is, we assume ideal
continuous-time to discrete-time conversion followed by
(iii) fs = 4fsmin
ideal discrete-time to continuous-time conversion. It is
(b) On the sketches from part (a), show the aliases closest to recommended that all four problems be solved.
the range −π ≤ ω̂ < π .
1.37. Reconstruction of analog signals.
(c) What do you notice about the aliases shown in part (b)?
Equation (1.41), cos(n[ω̂0 + 2π ]) = cos(nω̂0 ) with n and
1.33. Frequency spectra and sampling frequency. integers, demonstrates that there are many sequences having the
same sample values as the sequence cos(nω̂0 ). In Problem 1.36,
Repeat Problem 1.32 for the signal of Problem 1.28, part (b).
it was shown that the sinusoidal analog frequencies f that yield
the sample values cos(n[ω̂0 +2π ]) are given by f = f0 +fs ,
= ±1, ±2, ±3, . . .. The quantity f0 is the analog frequency
Exploration Problems of a sinusoidal signal that when sampled with sampling
frequency fs gives the sequence cos(nω̂0 ). We also know that
the reconstruction process described in Section 1.5 selects the
1.34. Frequency spectra and sampling frequency.
digital frequencies in the interval 0 ≤ ω̂0 < π and that these
Repeat Problem 1.32 for the signal of Problem 1.28, part (c). frequencies correspond to the analog frequencies in the range
0 ≤ f0 < fs /2. Thus, for reconstruction purposes, we are
1.35. Frequency spectra and sampling frequency. interested in the values of f for having the negative values,
Repeat Problem 1.32 for the signal of Problem 1.28, part (d). because clearly f1 = f0 + fs , f2 = f0 + 2fs , . . . all lie outside
the reconstruction interval corresponding to 0 ≤ f0 < fs /2.
1.36. Aliases in discrete-time and continuous-time domains
(a) Evaluate |f0 + fs | for = 0, −1, −2, −3. The sampling
In Eq. (1.41), we found that the sinusoidal sequences having frequency is fs = 30 smp/s and the analog sinusoidal
the same values are related to one another by input signal to be sampled has frequency f0 that varies
from 0 Hz to 90 Hz in steps of 3 Hz. Use the values
cos(n[ω̂0 + 2π]) = cos(nω̂0 ) obtained to complete Table 1-5.
where n and are integers and = ±1, ±2, ±3, . . .. We also Table 1-5:
know from Eq. (1.52) that
f0 , Hz |f0 | |f0 − fs | |f0 − 2fs | |f0 − 3fs |
ω̂0 = ω0 T = ω0 /fs = 2πf0 T = 2πf0 /fs .
0
We now ask ourselves what analog sinusoidal frequencies when
sampled with a sampling frequency fs will give the samples
cos(n[ω̂0 + 2π ])? These frequencies are the aliases of f0 . 3
Clearly, there will be several such sinusoids, so we denote their
analog frequencies by f , where each frequency corresponds to ..
.
a value of the integer .