signals, sequences, and systems

37
C H A P T E R 1 Signals, Sequences, and Systems Preview Engineers, scientists, and mathematicians all use linear systems theory because it is the foundation for building many of the things we use in our daily lives. The theory of linear systems introduced in this text provides powerful tools for analysis and design. Many communication, control, and signal-processing systems can be approximated by linear mathematical models, and by applying linear systems techniques to these models, we can design and develop better systems and shorten the production cycle. In addition, computer simulation plays a central role in applying linear systems theory, and there are now available powerful and easy-to-use software packages, such as LabVIEW and MATLAB ® . DTSFA 1 m-files that run with either of these packages are used extensively in this book. Computers are frequently used as elements of systems. This means that we need to consider systems whose signals change only at discrete-time instants, called discrete-time systems, and also those systems whose signals vary continuously with time, called continuous-time or analog systems. Discrete- time systems operate on sequences, whereas continuous-time systems process analog signals. Frequently, the sequences of interest in discrete-time systems analysis come from sampling continuous-time signals. 1 DTSFA is shorthand for D iscrete-T ime S ystems: F undamentals and A pplications. Figure 1-1: Claude E. Shannon.

Upload: others

Post on 16-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Signals, Sequences, and Systems

C H A P T E R

1Signals, Sequences, and

Systems

Preview

Engineers, scientists, and mathematicians all use linear systemstheory because it is the foundation for building many of thethings we use in our daily lives. The theory of linear systemsintroduced in this text provides powerful tools for analysis anddesign. Many communication, control, and signal-processingsystems can be approximated by linear mathematical models,and by applying linear systems techniques to these models,we can design and develop better systems and shorten theproduction cycle. In addition, computer simulation plays acentral role in applying linear systems theory, and there are nowavailable powerful and easy-to-use software packages, such asLabVIEW and MATLAB®. DTSFA1 m-files that run witheither of these packages are used extensively in this book.

Computers are frequently used as elements of systems. Thismeans that we need to consider systems whose signals changeonly at discrete-time instants, called discrete-time systems,and also those systems whose signals vary continuously withtime, called continuous-time or analog systems. Discrete-time systems operate on sequences, whereas continuous-timesystems process analog signals. Frequently, the sequences ofinterest in discrete-time systems analysis come from samplingcontinuous-time signals.

1DTSFA is shorthand for Discrete-Time Systems: Fundamentals andApplications.

Figure 1-1: Claude E. Shannon.

Page 2: Signals, Sequences, and Systems

2 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

We begin our study of linear systems theory by firstconsidering the ways in which signals and sequences aredescribed. After considering the basic "building blocks" ofsignals and sequences, we turn our attention to their use indescribing signals and sequences that occur in real-life systems.There are at least three good reasons for doing this. First, itis convenient to be able to describe sequences by analyticalmathematical expressions using compact notation. Second,analytical descriptions of sequences are advantageous whenusing the transform methods introduced in Chapter 2 to analyzeand design linear systems. Finally, an analytical description ofa sequence makes system simulation much easier than using atabulation of values.

Many systems contain both analog and discrete-time (ordigital) elements. Thus, there is a need to be able toconvert analog signals to sequences and vice versa. Theseconversions are accomplished by analog-to-digital converters(ADCs) and digital-to-analog converters (DACs), respectively.Following a discussion of analog-to-digital and digital-to-analog conversion, we consider the sampling theorem, basedon the work of Claude E. Shannon (Figure 1-1), Harry Nyquist,and others, that is of fundamental importance in convertingcontinuous-time signals to sequences. Finally, we take a lookat where the rest of the book is going.

1.1 Types of Systems

Continuous-time systems operate on and generate signals thatmay vary over the entire time interval rather than just at discretetimes, and these signals also have amplitudes that vary over acontinuous range of values. Such signals are called analogsignals. Figure 1-2 shows a typical analog input signal x(t),a continuous-time system, and an analog output signal y(t).Signals occurring in nature are often analog. As designerswanting to process and use these signals, however, we havea choice of whether to process them using continuous-time(analog) systems or discrete-time (digital) systems. If wechoose a discrete-time system, the continuous-time signalsmust be converted to a discrete-time and discrete-amplitudeformat. This is often accomplished by sampling the analogsignals at equally spaced time intervals to obtain sequences,as illustrated in Figure 1-3. Collectively, these sample valuesmake up the sequence r[n]. Observe that we use the notation (t),as in x(t) and y(t), to denote functions of the continuous-timevariable t (signals) and [n], as in r[n], to represent functions ofthe discrete-time variable n (sequences).

Discrete-time systems generally receive inputs at equallyspaced (uniform) time intervals. The inputs are simplynumbers, but the order in which they are received makesa difference, so we represent the numbers as sequences.For example, x[n] = {7.5, −3.5, 2.5, 6.0, 0, . . .} representsa sequence with the value 7.5 occurring first, followed

x(t)

t

x(t) y(t)Continuous-

time (analog)signal

(b) Continuous-time (analog) system

(a) Analog input signal

y(t)

t

(c) Analog output signal

Figure 1-2: A continuous-time system with its input and outputsignals.

by −3.5, and so forth, corresponding to the samplesn = {0, 1, 2, 3, 4, . . .}, as shown in Figure 1-4(a). In additionto knowing the sequence values, we also need to know a timereference, and we generally will use (arbitrarily) n = 0. Using

(a) Analog signal

(b) Sequence from sampled analog signal

r[n]

r(t)

t

n

Figure 1-3: Analog signal and sequence resulting from the samplingprocess.

Page 3: Signals, Sequences, and Systems

1.2 HISTORICAL PERSPECTIVE 3

x[n] y[n]Discrete-timesystem

(a) Input sequence

(b) Discrete-time system

(c) An output sequence

x[n]

n

6.07.5

2.5

−3.5

y[n]

n

2.5

5.06.0

3.0

120 3

1 20 3

4

−4.5

−7.0

−1.5

Figure 1-4: A discrete-time system and its input and output sequences.

the sequence x[n] in Figure 1-4(a) as the input to a discrete-time system represented in Figure 1-4(b) results in a differentsequence, such as the output y[n] shown in Figure 1-4(c).

The abscissas of the graphs of x[n] and y[n] portray time.The sequences are shown only at a discrete set of values,because a discrete-time system operates on or generates signalsonly at these discrete instants. Since the sequence valuesare often obtained by sampling a continuous-time (or analog)waveform at uniform intervals, we refer to the integer valuesof n as the sampling times and the amplitudes 7.5, −3.5, 2.5,6.0, . . ., as the sample values. We’ll see later that the timeinterval separating the samples is an important parameter in thesampling process.

Inputs to systems come from sensors, radars, sonars, orrecordings, for example. These are continuous-time (or analog)

x(t) x[n]Analog-to-

DigitalConverter

(ADC)

y[n]Discrete-Time

System

y(t)Digital-to-

AnalogConverter

(DAC)

Figure 1-5: Using a discrete-time system to process a continuous-time signal.

signals. We often want to process these signals by using a digitalcomputer which is a discrete-time system, so they must first beconverted to sequences. Also, we often may need to re-convertthe output sequence from a discrete-time system to an analogsignal. The means for accomplishing these conversions of acontinuous-time signal to a discrete-time sequence and viceversa appear in Figure 1-5 as an analog-to-digital converter(ADC), and a digital-to-analog converter (DAC). Notice howthe signals and sequences are labeled in this diagram. Theanalog input signal is denoted as x(t). The output of the analog-to-digital conversion process is the sequence x[n], which is theinput to the discrete-time system that modifies this sequence toprovide the output sequence y[n]. Assuming that an analogoutput is desired, the sequence y[n] is then converted to acontinuous-time signal y(t) by the digital-to-analog converter.Later in this chapter we consider more details concerninganalog-to-digital and digital-to-analog conversion.

1.2 Historical Perspective

The foundations for linear systems theory and applicationscan be traced to the 17th, 18th, and 19th centuries withresults developed by Newton, Gauss, Laplace, Euler, Fourier,Lagrange, Laurent, and many others. Initially, analysis wasdone by analytical methods or hand calculations. Theseapproaches were applied to the analysis and design of analogsystems whose input signals vary continuously with time (orwith other variables, such as space) and produce output signalsthat also vary continuously with time, space, or other variables.Figure 1-2 shows a conceptual representation of a continuous-time (or analog system) together with representations of typicalinput and output signals. As time evolved and systemcomplexity grew, the need for fast, accurate, and economicalcomputational approaches increased.

Analog computers were developed and widely used forsimulation of continuous-time systems and as components ofsystems through the late 1940s and early 1950s. The earliestanalog computers were mechanical systems, but advances inelectronics technology soon made electronic analog computersthe dominant form. In the 1950s and 1960s continuing progressin solid-state electronics and the eventual development ofintegrated circuits combined with the need for smaller, faster,and more accurate computing systems propelled computinginto digital domains. Unlike analog systems, digital systems

Page 4: Signals, Sequences, and Systems

4 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

receive sequences of numbers as inputs and process themwith a numerical procedure (an algorithm) to produce anothersequence of numbers as outputs. The elements of the input andoutput sequences generally change at uniformly spaced times,and the amplitudes of the sequence values are quantized (thatis, they can take on only a finite or discrete set of values thatdepend on the wordlength of the digital hardware). Figure 1-4illustrates a digital or discrete-time system2 along with typicalinput and output sequences. Early applications of digitalcomputers focused on simulations of analog systems as a way toevaluate designs before committing to build systems. Anotherapplication was in seismic exploration, where data was recordedfrom sensors and later fed into a digital computer and processed.The processing often took much longer than the time durationof the recorded data. This was not a serious drawback, sinceseismic structures do not change significantly except perhapsover relatively long time periods.

As technology progressed, however, it became apparentthat digital computers have attributes that make them verydesirable as system elements as well as computational aidsto carry out analysis and design procedures. Initially, digitalcomputers were physically large, relatively slow, had limitedmemory, were expensive, and required significant electricpower compared to today’s computers. This began to changein the 1960s, and today digital computers and special-purposedigital-processing hardware are small, fast, reliable, haveabundant memory, are inexpensive, and require small amountsof electric power.

Although the earliest analysis and design approaches fordiscrete-time systems were largely based on “translations”or adaptations of analog methods, it soon became apparentthat the attributes of digital systems offered opportunities todramatically expand the repertoire of useful techniques. Today,the applications of discrete-time systems are everywhere.Systems for control, signal processing, and communicationsrely on discrete-time systems technology for both design andimplementation. Speech processing, for example, includestechniques for storing, transmitting, enhancing, compressing,synthesizing and recognizing the content of speech, andidentifying a speaker. Interpreting seismic signals is a valuabletool in exploration for oil and subterranean surface structures.Radar signal processing is relied upon in both civilian andmilitary applications to identify and track aircraft, satellites,and space vehicles. We frequently see road signs warningus that our car speed may be tracked by radar. Imageprocessing has become widespread in television, movies andthe visual media that surround us. Medical imaging is oftenused to detect and diagnose illnesses. Of course, mobilephones, audio players, and portable reading tablets also rely on

2Although there are subtle differences of significance in somecircumstances, we will use the terms discrete-time systems and digital systemsinterchangeably.

signal processing technology. Control systems to manufactureproducts, command robots, and move equipment and objectsalso depend on digital processing. Digital computers (orspecial-purpose digital hardware) are essential elements in allof these systems.

Discrete-time systems have many advantages over analogsystems. For example, the accuracy of a digital processorcan be improved by increasing the wordlength of the systemor using floating-point processing, whereas analog processingaccuracy depends on component tolerances, and componentvalues may also vary with temperature. In addition, thesensitivity to noise of a digital system is generally betterthan for an analog system. Another positive feature of adiscrete-time system is the capability to make changes inprocessing functions by modifying the software or firmwareof the system; changes in analog processing, on the otherhand, generally require hardware component changes. Digitalsystems are also amenable to implementing adaptive, nonlinear,and time-varying processing algorithms, which is a capabilitynot generally available with analog systems. In addition, digitalprocessing enables encryption and decryption of system inputsand outputs—something that cannot be provided by an analogsystem. As a consequence of these and other advantages, evenanalog signals are usually converted to a discrete-time formatand processed digitally. Depending on the system application,the output sequence may be converted (or reconstructed) toan analog signal. For example, in an audio system withdigital processing, the output would drive speakers, and thisnecessitates conversion of the discrete-time output to an analogsignal, as shown in Figure 1-5.

We note that (in spite of continuing advances in speed, cost,capability, and size of digital hardware) software developmentcontinues to be a challenge. In addition, the need for conversionof continuous-time signals to and from discrete-time sequencesadds complexity and cost in the form of analog-to-digitaland digital-to-analog converters and associated analog filters.Finally, applications requiring very high speed processing stillmay be beyond the capabilities of digital hardware.

1.3 Signals and SequencesWe are now ready to consider in detail continuous-time signalsthat occur in analog (or continuous-time) systems and discrete-time sequences in discrete-time systems. We will observe manysimilar characteristics in signals and sequences, but also somedifferences.

1.3.1 Signals (Continuous-Time Functions)

We begin with several signals that occur frequently incontinuous-time system applications and describe these signalsusing analytical expressions (equations) and correspondinggraphical representations.

Page 5: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 5

Unit Impulse

The unit impulse is an important signal in the study ofcontinuous-time systems. An arbitrary analog signal can beapproximated by impulses, and knowing the response of asystem to an impulse input enables us to find the forced responseto all other inputs. Denoted by δ(σ ), the unit impulse is notreally a function in the normal sense. It is generally defined asthe limit of a function or through its properties. One commonlyused definition is

Unit impulse

δ(σ ) = lim�→0

g(�, σ) (1.1)

where g(�, σ) is a function such as the pulse shown inFigure 1-6(a). As � → 0, the height of this pulse becomesinfinitely large, its base approaches zero, and its area is always 1.Thus, we think of an impulse as having zero duration, infiniteheight, and unit area. Multiplying an impulse by a constant A

simply makes its area equal to A. We represent a unit impulse bythe symbol shown in Figure 1-6(b), where the numeral 1 nextto the arrow indicates the impulse’s area. Of course, we canhave impulses occurring at various times with different areas,as shown in Figures 1-6(c) and (d). Notice that we use time, t ,which is measured in seconds, as the independent variable, butthere are other possibilities such as distance, pressure, etc.

A useful property of impulses is the sifting property, whichis

Sifting property

∞∫−∞

p(t)δ(t − t1)dt = p(t1) (1.2)

at all values of t1 for which p(t) is continuous. This property iseasily justified by using a limiting argument based on the pulseapproximation to the impulse shown in Figure 1-6(a).

Arbitrary Functions

There is no analytical way of exactly describing an arbitraryanalog waveshape such as the one in Figure 1-7(a); however,equally spaced impulses can be used as an approximaterepresentation, shown as s(t) in Figure 1-7(b). The impulseshave the areas associated with the function g(t) in the intervals

(a) Unit pulse approximation

0

(b) Unit impulse symbol

(c) Shifted unit impulse

(d) Shifted and scaled impulse

g(Δ,�)

Δ

Δ

t

t

0

�(t − 1)

0

�(�)

0

−2.5�(t − 3.4)

1

1

1

3.4

−2.5

Figure 1-6: Impulse functions.

shown. As the number of impulses approaches infinity and theinterval between them approaches zero we have

g(t) =∞∫

−∞g(τ)δ(t − τ)dτ, (1.3)

Page 6: Signals, Sequences, and Systems

6 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

(a) An arbitrary signal

(b) Approximation of g(t) by a sum of impulses

g(t)

t

s(t)

t

Figure 1-7: Approximation of a signal by a sum of impulses.

which is an exact representation of g(t) for all values of t .

Unit Step Function

Figure 1-8(a) pictures a unit step function that “turns on” att = 0 and is defined by

Unit step function

u(t) ={

1, 0 ≤ t

0, t < 0(1.4)

Notice that the unit step is related to the unit impulse by

u(t) =t∫

−∞δ(τ )dτ. (1.5)

Of course, we can scale and time-shift step functions to obtain

General step function

Bu(t − t0) ={

B, t0 ≤ t

0, t < t0, (1.6)

which is equal to B for t0 ≤ t and zero otherwise. In additionto being useful in their own right, step functions also provide

−2 0 2 4−1

−0.5

0

0.5

1

1.5

2

Time, t−2 0 2 4

−1

−0.5

0

0.5

1

1.5

2

Time, t

u(t

)

u(t

+ 1

) −

u(t −

3)

(a) Unit step function (b) Pulse formed by two unit step functions

−2 0 2 4−1

−0.5

0

0.5

1

1.5

2

2.5

3

3.5

4

Time, t

g(t)

−2 0 2 4−1

−0.5

0

0.5

1

1.5

2

2.5

3

3.5

4

Time, t

g(t)

[u(

t + 1

) −

u(t −

3)]

(c) A cosine with a dc component

(d) Signal g(t) multiplied by pulse function

Figure 1-8: A unit step function and an application.

a way to "turn on" and "off" other functions. For example,Figure 1-8(b) shows the pulse function [u(t + 1) − u(t − 3)]that turns on at t = −1 and off at t = 3. The signal consistingof the difference between a constant and a sinusoid

g(t) = 2.5 − cos(5t) (1.7)

is plotted in Figure 1-8(c). Figure 1-8(d) shows the result ofmultiplying g(t) by the pulse signal of Figure 1-8(b). Thus, wecan think of step functions as mathematical switches.

Comment:Figure 1-8 was obtained by running DTSFA file F1_8. It isrecommended that you access this file and review the statementsalong with the explanatory comments. Then run this fileyourself using MathScript in LabVIEW or MATLAB®. Aswe proceed, there will be many m-files available, and you areencouraged to take advantage of them. Look for these files onthe DTSFA website (see Preface).

Page 7: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 7

Ramp Functions

A shifted ramp function g(t) with slope B is defined as

Shifted ramp function

g(t) = Bt − Bt0 = B · (t − t0). (1.8)

Notice that this is the equation of a straight line with a slopeof B with an ordinate intercept of −Bt0. Figure 1-9(a) showsa ramp with B = 2 and t0 = 3. To obtain a unit ramp functionthat passes through the origin, has a slope of 1, and “begins”or turns on at t = 0, we make B = 1, t0 = 0, and multiply byu(t) giving

Unit ramp function

r(t) = tu(t) ={

0, t < 0

t, 0 ≤ t,(1.9)

as shown in Figure 1-9(b).

Exponential Functions

A function given by

Exponential function

g(t) = Aeβt , (1.10)

where e is the Naperian constant 2.718 . . ., is called anexponential function. A and β are constants that may be realor complex. Let’s consider several of the possibilities for A

and β.

−2 0 2 4−12

−10

−8

−6

−4

−2

0

2

4

Time, t Time, t

g(t

)

g(t) = B(t − t0) = 2(t − 3)

−2 0 2 4−1

0

1

2

3

4

5

6

r(t

)

r(t) = t u(t)

(a) Scaled, shiftedramp function

(b) Unit rampfunction

Figure 1-9: Two ramp functions.

−2 0 2 402468

101214161820

Time, t

Time, t−4 −2 0 2

(a) Negative exponents

(b) Positive exponents

g1(t) = 2e(−0.5t)

g3(t) = 1.5e(0.5t)

g2(t) = 2e(−1.2t)

g4(t) = 1.5e(1.2t)

g1(t)g2(t)

g3(t)g4(t)

g 1(t)

and

g2(

t)

02468

101214161820

g 3(t)

and

g4(

t)

Figure 1-10: Real exponentials.

Real Exponential Functions

First, assume that A and β in Eq. (1.10) are both real numbersgiving a real exponential function. Exponentials for a fewvalues of A and β are shown in Figure 1-10.

Complex Exponential Functions

If A is real and β is imaginary, that is β = jω0 with ω0 a realconstant, we have

g(t) = Aejω0t = Aej2πf0t . (1.11)

In this case, g(t) is a complex-valued function of t . The quantityω0 is called the radian frequency and has units of radians/second(rad/s); f0 is called the frequency and has units of hertz (Hz) orcycles/second.3 Clearly, ω0 = 2πf0 or f0 = ω0/2π .

3A hertz has dimensions of cycles/second, and multiplication by 2π

radians/cycle yields a quantity with dimensions radians per second.

Page 8: Signals, Sequences, and Systems

8 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

The function g(t) can be visualized as the vectors shownon the complex planes of Figure 1-11 for various values of t .Two situations are illustrated: one where ω0 = π/4 and anotherwhere ω0 = 0.2. Notice that for the values of t selected bothsets of vectors begin to repeat themselves after different valuesof elapsed time. This repetition of a function is a propertycalled periodicity, and we say that g(t) is a periodic signalwith a period of T0 seconds. In general, if we have a signalp(t) for which there is an interval T0 such that

Periodic signal

p(t + T0) = p(t) (1.12)

for all values of time, t , then p(t) is a periodic signal withperiod T0. Notice that T0 is the smallest positive value forwhich the equality in Eq. (1.12) is satisfied. To determine ifg(t) in Eq. (1.11) is periodic, we consider whether or not thereis a value of T0 for which

g(t + T0) = g(t). (1.13)

Using the properties of exponentials we have

Aejω0(t+T0) = Aejω0t

Aejω0t · ejω0T0 = Aejω0t ,(1.14)

and for this to be satisfied for all t requires that ejω0T0 = 1.This will be the case if and only if ejω0T0 = ej2mπ , where m

is an integer. So we have that ω0T0 = 2mπ , and since T0 isthe smallest positive value for which Eq. (1.12) is satisfied, weselect m = 1, and the period T0 is given by

T0 = 2π/ω0 or T0 = 1/f0. (1.15)

For the values of ω0 shown in Figure 1-11(a) and (b), the periodsare T0 = 8 and T0 = 10π , respectively. Notice that these are thevalues of t when the vectors have made one complete rotationand again coincide with the positive real axis.

From the Euler Identities (see Appendix B), we can write

Aejω0t = A cos(ω0t) + jA sin(ω0t) (1.16)

and we observe that {real part of [Aejω0t ]} = Re[Aejω0t ] =A cos(ω0t) and {imaginary part of [Aejω0t ]} = Im[Aejω0t ] =A sin(ω0t). From Figure 1-11 we see that the real parts of thevectors representing Aejω0t are the projections of these vectorsonto the real (horizontal) axis and the imaginary parts are theprojections onto the imaginary (vertical) axis. Notice that theangles made by these vectors with the positive real axis are thevalues of ω0t .

(a) �0 = �/4

Radius = A

Re

Im

t

t = 0, 8,…

t = 1, 9,…

t = 2,10,…

t = 3,11,…

t = 4,12,…

t = 5,13,…

t = 6,14,…

t = 7,15,…

t = 15�4

55�4

, ,…

t = 10�4

50�4

, ,…

t = 5�4

45�4

, ,…

t = 35�4

75�4

, ,…

t = 30�4

70�4

, ,…

t = 25�4

65�4

, ,…

(b) �0 = 0.2

Radius = A

Re

Im

t

t = 0, 10�,…t = 5�,15�,…

Figure 1-11: Representation of Aejω0t as rotating vectors.

If we now allow the constant A to be a complex quantity (i.e.,A = |A|ejϕ) again with β = jω0, we have a slightly differentsituation. Again starting with g(t) = Aeβt , we have

g(t) = |A|ejϕejω0t

= |A|ej (ω0t+ϕ)

= |A| cos(ω0t + ϕ) + j |A| sin(ω0t + ϕ).

(1.17)

The effect of the phase shift ϕ on the diagrams in Figure 1-11is to rotate each of the vectors by ϕ radians—counterclockwisefor ϕ equal to a positive value or clockwise for ϕ negative.

Figure 1-12 shows a plot generated by DTSFA m-file F1_12of the real part of g(t) from Eq (1.17) with A = 5e−jπ/3, ω0 =20π . Clearly, this is a periodic function, and the period easilycan be measured as shown. As found previously, the period isgiven by

T0 = 2π/ω0 = 2π/20π = 0.1 sec . (1.18)

Page 9: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 9

T0 = 0.1

� = −�/3

t, sec

−0.1 −0.05 0 0.05 0.1 0.15 0.2

5

4

3

2

1

0

−1

−2

−3

−4

−5

T0 = 0.1g(t)

Figure 1-12: A continuous-time sinusoidal signal.

We can also evaluate the phase ϕ as shown in Figure 1-12, andwe find that it is indeed −π/3 by determining the value of thecosine function at t = 0.

At this point it is appropriate to summarize the units ofthe various quantities in Eq. (1.17). We will use themeter-kilogram-second (MKS) system. The function g(t) haswhatever units are appropriate for the physical quantity beingrepresented, such as volts, amperes, watts, joules, meters persecond, and so forth. Time, t , is measured in seconds, and theunits of ω0 are radians/second.

Another variation on the complex exponential theme we havebeen pursuing is letting

A = |A|ejϕ and β = α + jω0 (1.19)

in Eq. (1.10) with α and ω0 as real numbers. In this case, bothA and β are complex quantities and

g(t) = Aeβt = |A|ejϕe(α+jω0)t

= |A|eαt cos(ω0t + ϕ) + j |A|eαt sin(ω0t + ϕ)

= |A|eαt cos(2πf0t + ϕ) + j |A|eαt sin(2πf0t + ϕ)

= |A|eαt cos(2πt/T0 + ϕ) + j |A|eαt sin(2πt/T0 + ϕ),

(1.20)

where the relationships among ω0, f0, and T0 are displayedexplicitly.

Other useful expressions for the real and imaginary parts ofg(t) are

Exponentially-modulated sinusoidal signals

|A|eαt cos(ω0t + ϕ) = |A|eαt

[ej (ω0t+ϕ) + e−j (ω0t+ϕ)

2

]

|A|eαt sin(ω0t + ϕ) = |A|eαt

[ej (ω0t+ϕ) − e−j (ω0t+ϕ)

2j

].

(1.21)

The expressions in Eq. (1.21) frequently occur in linear,continuous-time systems and are known as exponentiallymodulated sinusoidal signals. These expressions are obtainedby applying Euler’s identity to expand the definitions of thecosine and sine functions in terms of exponentials. Severalspecial cases easily can be deduced by substituting α = 0,ω0 = 0, or ϕ = 0 as appropriate in these general expressions.

Figure 1-13 illustrates two possibilities with positive andnegative values of α. The dotted curves represent theexponential terms that multiply the sinusoid; these terms arereferred to as the envelope. Notice that exponentially modulatedsinusoidal signals are periodic only if α = 0.

It is always good practice when relying on computerprograms to ask if the results are reasonable. Figure 1-13was generated by running DTSFA file F1_13, and we observethat the exponential envelope (the term eαt ) decreases as timeincreases when the exponent is negative and the envelopeincreases 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. Thisindicates that the values of g1(t) and g2(t) should be 1.0 att = 0, as shown on the plots. Other points may be verified in asimilar fashion.

Piecewise-Linear and Periodic Functions

Equations readily can be obtained for signals that are composedof piecewise-linear segments. Example 1-1 illustrates aprocedure for accomplishing this. In addition, a process forwriting an analytical expression for a periodic signal is alsodemonstrated. (Sinusoidal signals are periodic, but they arenot the only periodic signals that occur.)

Page 10: Signals, Sequences, and Systems

10 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

−2 0 2 4−10

−8

−6

−4

−2

0

2

4

6

8

10

Time, t

(a) Exponential decreasingwith t increasing

−2 0 2 4−10

−8

−6

−4

−2

0

2

4

6

8

10

Time, t

(b) Exponential increasingwith t increasing

g1(t) = 2e−0.6tcos(πt + 1.047)

2e−0.6t

−2e−0.6t

2e0.3t

−2e0.3t

g2(t) = 2e0.3tcos(πt + 1.047)

g 1(t)

g 2(t)

Figure 1-13: Exponentially modulated sinusoidal signals.

Example 1-1: Describing Continuous-Time Signals

Use the functions defined previously to determine analyticalexpressions for the signals shown in Figure 1-14.

Solution:

(a) The expression for the signal in the interval 0 ≤ t < 2 is(A/2)t , so we need only “turn on” this signal at t = 0 and“turn it off” again at t = 2, giving

g1(t) = A

2t [u(t) − u(t − 2)] .

(b) Here we have a repeating, or periodic signal with a periodof 2. We need only to replicate the triangular pulse ofpart (a) an infinite number of times with each replicadisplaced by two time units from the previous one. The

g1(t)

A

t

(a) A sawtooth signal

g1p(t)

t

(b) A periodic sawtooth signal

g2(t)

t

(c) A triangular pulse

0 2

0 2

0 1 4

−2 4−4 6

A

B

Figure 1-14: Signals for Example 1-1.

result, using the subscript p to denote periodic, is

g1p(t) =∞∑

m=−∞

A

2(t − 2m)[u(t − 2m) − u(t − 2m − 2)].

where m is an integer.

(c) We can represent the rising pulse edge byBt[u(t) − u(t − 1)] and the falling edge by−[B/3][t − 4][u(t − 1) − u(t − 4)]; adding thesegives

g2(t) = Bt[u(t)−u(t−1)]− B

3[t−4][u(t−1)−u(t−4)]

which can be simplified as

g2(t) = Btu(t)− 4B

3[t − 1]u(t − 1)+ B

3[t − 4]u(t − 4).

1.3.2 Sequences (Discrete-Time Functions)

We now consider sequences that occur and are processed indiscrete-time systems. As with signals found in continuous-time systems, our focus will be on how to describe sequences

Page 11: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 11

using analytical expressions (equations) and connecting theseexpressions with their graphical representations.

Unit Impulse Sequence

The unit impulse sequence is defined as

Unit impulse sequence

δ[n − m] ={

1, n − m = 0

0, n − m �= 0,(1.22)

where n and m are integers. The notation [n − m] is used toindicate that we are dealing with a function of a discrete-timeinteger variable n − m. Notice that, unlike a continuous-timeunit impulse function, there is no approximation or limitingargument involved for the discrete-time impulse sequence. Wecan represent an impulse sequence of arbitrary amplitude A bysimply multiplying a unit impulse or a shifted unit impulse (asappropriate) by A to obtain the sequence A[n] or Aδ[n − n0].This makes it possible to represent an arbitrary sequence as theweighted sum of shifted unit impulse sequences. Figure 1-15shows the unit impulse sequence δ[n] and the shifted unitimpulse sequence δ[n − 3] plotted as functions of n.

When δ[n] is used as the input to a discrete-time system, theresulting output is referred to as the unit impulse response. Aswe shall see subsequently, if the response of a discrete-timesystem to a unit impulse input is known, the system’s responseto an arbitrary input can be determined.

(a) Unit impulse sequence

(b) Shifted unit impulse sequence

�[n]

n

n

1

1

0

... ...

�[n + 3]

0 1 32

Figure 1-15: A unit impulse sequence and a shifted unit impulsesequence.

Arbitrary Sequences

An arbitrary sequence can be described by a summation ofweighted unit impulse sequences; that is,

Description of any sequence

g[n] =∞∑

m=−∞g[n]δ[n − m]. (1.23)

For example, the system input x[n] in Figure 1-4(a) on page 3is described by

x[n] = 7.5δ[n]−3.5δ[n−1]+2.5δ[n−2]+6.0δ[n−3]. (1.24)

Unit Step Sequence

Figure 1-16(a) shows a unit step sequence defined as

Unit step sequence

u[n] ={

1, 0 ≤ n

0, n < 0.(1.25)

Notice that the unit step sequence u[n] is related to the unitimpulse sequence δ[n] by

u[n] =n∑

m=−∞δ[m]. (1.26)

As with the unit impulse sequence, we can shift and scale thestep sequence to obtain

General step sequence

x[n] = B · u[n − n0] ={

B, n0 ≤ n

0, n < n0,(1.27)

as shown in Figure 1-16(b) for B = −5 and n0 = −3. It isalso possible to generalize the definition of the step sequenceby considering the sequence given by B · u[−n − n0]. Thissequence will be zero for [−n − n0] < 0 or −n0 < n and willbe equal to B for n ≤ −n0.

Page 12: Signals, Sequences, and Systems

12 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

−7

−6

−5

−4

−3

−2

−1

0

1

2

x[n] = −5u[n + 3]

−1

−0.5

0

0.5

1

1.5

2

Sample number, n

u[n]

x[n]

(a) Unit step sequence

−10 −5 0 5 10 15 20

Sample number, n (b) Shifted step sequence B = −5, n0 = −3

−10 −5 0 5 10 15 20

Figure 1-16: Step sequences.

Ramp Sequences

A shifted ramp sequence with slope B and defined as

Ramp sequence

g[n] = B · (n − n0) (1.28)

is shown in Figure 1-17 for B = 2 and n0 = 10. For a unitramp sequence that is zero for n ≤ 0, we make B = 1, n0 = 0,and multiply by u[n].

−10 −5 0 5 10 15 20

−40

−30

−20

−10

0

10

20

Sample number, n

g[n]

g[n] = 2[n − 10]

Figure 1-17: Shifted ramp sequence.

Exponential Sequences

A sequence characterized by

Exponential sequence

g[n] = A(a)n (1.29)

is called an exponential sequence. A and a are constants thatmay be real or complex. Let’s consider some possibilities forA and a.

Real Exponential Sequences:

We begin by assuming that A and a are real constants. Fig-ure 1-18 shows the two exponential sequences ga[n] = 4(0.9)n

and gb[n] = 4(−0.9)n. As n → ∞, these sequences (both ofwhich have |a| < 1) approach zero as n → ∞; whereas forn → −∞, the sequences approach ±∞. For gc[n] and gd [n]in Figure 1-18 a = ±1.1, and these sequences with |a| > 1approach ±∞ as n → ∞ and approach 0 as n → −∞. Bymultiplying (point by point) the sequences ga[n] and gd [n] byunit step sequences u[n], we form the composite sequencesge[n] and gf [n], which are zero for n < 0.

Complex Exponential Sequences:

Next, having pursued a similar line of reasoning for continuous-time complex exponential functions, we move on to the generalsituation in which both A and a in g[n] = A(a)n are knowncomplex constants, specifically A = |A|ejϕ and a = rejω̂0 ,where r , ϕ, and ω̂0 are real constants. In this case,

g[n] = A(a)n = |A|ejϕ(rejω̂0)n = |A|rnej (nω̂0+ϕ). (1.30)

Page 13: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 13

−10 −5 0 5 10

−10

−5

0

5

10

Sample number, n(a) ga[n] = 4(0.9)n

g a[n

]

−10 −5 0 5 10

−10

−5

0

5

10

Sample number, n(b) gb[n] = 4(−0.9)n

g b[n

]

−10 −5 0 5 10

−10

−5

0

5

10

Sample number, n(c) gc[n] = 4(1.1)n

g c[n

]

−10 −5 0 5 10

−10

−5

0

5

10

Sample number, n(d) gd[n] = 4(−1.1)n

g d[n

]

−10 −5 0 5 10

−10

−5

0

5

10

Sample number, n(e) ge[n] = ga[n] • u[n]

g e[n

]

−10 −5 0 5 10

−10

−5

0

5

10

Sample number, n(f) gf[n] = gd[n] • u[n]

g f[n

]

Figure 1-18: Real exponential sequences.

As previously, we can use the Euler identity to write

g[n] = |A|rn{Re[ej (nω̂0+ϕ)] + jIm[ej (nω̂0+ϕ)]}= |A|rn cos(nω̂0 + ϕ) + j |A|rn sin(nω̂0 + ϕ).

(1.31)

Focusing on the units of the quantities appearing in thisexpression, we observe that the units of g[n] and hence thoseof Arn are of whatever physical quantity g[n] represents (e.g.,volts, meters, meters/second, and so forth). The argument thatappears in the cosine and sine functions is in radians, and thephase shift, ϕ, is also in radians. The integer n has units ofsamples, so the discrete-time angular frequency ω̂0 is expressedin radians per sample (rad/smp).4

Equation (1.31) is a general expression that allows us toinvestigate several special cases. Definingg1[n] as the sequencethat results by letting r = 1 and ϕ = 0 in g[n] and taking thereal part, we have

g1[n] = |A| cos(nω̂0), (1.32)

which is a cosine sequence with magnitude |A| and angularfrequency ω̂0. Let’s consider Example 1-2 that illustrates asurprising characteristic of sinusoidal sequences.

Example 1-2: Characteristic of Cosine Sequences

(a) Write an m-file to calculate and plot the cosine sequencega[n] = A cos(nω̂0) with A = 5, ω̂0 = π/8, and −18 ≤n ≤ 18. What is the period of this sequence?

(b) Repeat part (a) with A = 5, ω̂0 = 0.8, and −18 ≤ n ≤ 18.What is the period of this sequence?

(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).

Solution:

(a) Figure 1-19(a) is a plot of the sequence ga[n]. This plotwas obtained from the segment of DTSFA file F1_19 thatfollows.

m-file% F1-19: Some cosine sequencesset(gcf,’DefaultLineLineWidth’,2);

% set default line width to 2 units

ns=-18; % starting sample numbernf=18; % final sample numbern=ns:1:nf; % sample valueswzhat=pi/8; % angular frequency in radiansgan=5*cos(n*wzhat); % set cosine valuesstem(n,gan); % obtain a lollipop plot of a sequence

4An alternative also used is to define n as an integer without units, in whichcase the units of ω̂0 are radians.

Page 14: Signals, Sequences, and Systems

14 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

−15 −10 −5 0 5 10 15−6

−4

−2

0

2

4

6

Sample number, n

g a[n

]

(a) Cosine sequence ga[n] = 5 cos(nπ/8)

−15 −10 −5 0 5 10 15−6

−4

−2

0

2

4

6

Sample number, n

g b[n

]

(b) Cosine sequence gb[n] = 5 cos(0.8n)

−15 −10 −5 0 5 10 15−6

−4

−2

0

2

4

6

Sample number, n

g b[n

] an

d g c

(t)

(c) Sequence gb[n] = 5 cos(nπ/8) and the signal gc(t) = 5 cos(0.8t)

Figure 1-19: Some cosine sequences.

axis([-19 19 -6 6]); % set axis limitsxlabel (’sample number, n’); % x-axis labelylabel (’g_a[n]’); % y-axis label%title( ’(a): the cosine sequence g_a[n]

=5cos(n\pi/8’); % title (suppressed)grid; % place grid on plot

By inspecting the plot, we observe that the sequence isperiodic and begins to repeat itself every 16 samples.

Comment:

The graphics function stem is a built-in m-function ofLabVIEW and MATLAB®, software applications thatprovide many such functions. When referring to thesem-functions we use boldface type, and the mostsignificant ones are listed at the end of each chapter.

(b) In Figure 1-19(b), the sequence gb[n] = 5 cos(0.8n) isplotted for −18 ≤ n ≤ 18. Inspecting this graph, weobserve that the sequence is not periodic, at least overthe interval shown. In fact, this sequence is not periodic,period!

(c) To get an idea of what’s going on here, Figure 1-19(c)again shows the sequence gb[n], and it also shows thecontinuous-time signal gc(t) = 5 cos(0.8t) for −18 ≤ t ≤18. But t is a continuous-time variable; it is not restrictedto integer values as n is.5 We observe that gc(t) is periodicwith a period of approximately eight units. (Withoutknowing the time scale on the plot, we cannot state theperiod in seconds.)

Example 1-2 illustrates that a cosine sequence isn’t alwaysperiodic so let’s consider the conditions that are required forperiodicity. Similar to the continuous-time situation, we definea periodic sequence as one whose values repeat themselves afteran interval of N samples. That is a sequence g[n] is periodic ifthere exists an integer N for which

g[n + N ] = g[n] (1.33)

for all integers n. N is the smallest integer for which Eq. (1.33)holds. For a cosine sequence, this requires that

cos(nω̂0) = cos([n + N ]ω̂0). (1.34)

5Actually, since these plots were obtained by using a PC, all of the variablesare discrete, but in this case, the value 0.005 was used for the time incrementto obtain the plot of gc(t). Thus, this plot is approximately a continuous-timeversion of the cosine signal gc(t).

Page 15: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 15

For the equality to be true, Nω̂0 must be an integer multiple of2π

Nω̂0 = 2πm (1.35)

(i.e., where m is an integer). This in turn requires that

ω̂0 = 2πm/N, (1.36)

which tells us that ω̂0 must be a rational multiple6 of 2π if g[n]is to be a periodic sequence. If this is the case then the periodN is given by

Period of a periodic sinusoidal sequence

N = 2πm/ω̂0. (1.37)

Comparing Eq. (1.37) with Eq. (1.15)

T0 = 2π/ω0, (1.38)

we see that they have a similar structure; however, the period ofthe cosine signal T0 in the continuous-time case is a real number,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,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),however, ω̂0 = 0.8, and there are no integer values of m forwhich N = 2πm/0.8 = 2.5πm will be an integer, because π

is not a rational number.So a cosine sequence, even one resulting from sampling

a continuous-time sinusoid that is guaranteed to be periodic,may not be periodic. Fortunately, this does not cause practicallimitations in processing these sequences, periodic or not.

Another characteristic of discrete-time sinusoids that doesnot occur for continuous-time sinusoids is that there are aninfinite number of angular frequencies ω̂0, ω̂1, ω̂2, . . ., for which

cos(nω̂0) = cos(nω̂1) = cos(nω̂2) = . . . . (1.39)

In particular, if we select ω̂1 = ω̂0 + 2π , ω̂2 = ω̂0 + 4π ,. . ., ω̂� = ω̂0 + �2π , where � is an integer, then, using thetrigonometric identity for cos(α ± γ ), we obtain

cos(n[ω̂0+�2π ]) = cos(nω̂0) cos(n�2π)−sin(nω̂0) sin(n�2π).

(1.40)Since n and � are integers, cos(n�2π) = 1 and sin(n�2π) = 0.So for all integer n, we have

cos(n[ω̂0 + �2π ]) = cos(nω̂0). (1.41)

6A rational multiple is the ratio of two integers; the denominator integercannot be zero.

Therefore, if 0 ≤ ω̂0 < 2π , there will always be an infinitenumber of sinusoidal sequences with frequencies outside ofthis range that have identical sample values. Conversely,if ω̂0 lies outside of the range 0 ≤ ω̂0 < 2π , there willalways be an integer � and a frequency ω̂0 + �2π for which0 ≤ ω̂0 + �2π < 2π . Figure 1-20(a) shows samples ofthree continuous-time sinusoidal signals. These sinusoidalsequences of samples have discrete-time angular frequenciesof ω̂ = ω̂0 = 3π/4 rad/s, ω̂0 + 2π = 11π/4 rad/s, andω̂0 + 6π = 27π/4 rad/s. As shown, these three sets of samplevalues are identical. Figure 1-20(b) shows the first threesamples from Figure 1-20(a) along with three continuous-timesinusoidal signals (represented by the dashed curves) that havethe same sample values.

−2 0 2 4 6 8 10−6

−4

−2

0

2

4

6

n

n

(a) Three sinusoidal sequences having the same values

g 1[n

], g

2[n]

, an

d g 3

[n]

g 1[n

] an

d g 1

(t),

g2[

n] a

nd g

2(t)

, an

d g 3

[n]

and

g 3(t

)

−2 −1 0−6

−4

−2

0

2

4

6

(b) Three continuous-time sinusoids with the same sample values

Figure 1-20: Sinusoidal sequences of different frequencies but withidentical sample values.

Page 16: Signals, Sequences, and Systems

16 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

Although it may be unsettling to find that many continuous-time sinusoidal signals have the same sample values, we shallsee in Section 1.5 on the sampling theorem how this issue isaddressed.

Finally, let us consider the general exponential sequence

g[n] = |A|rn{Re[ej (nω̂0+ϕ)] + j Im[ej (nω̂0+ϕ)]}= |A|rn cos(nω̂0 + ϕ) + j |A|rn sin(nω̂0 + ϕ).

(1.42)

As previously assumed, we have

A = |A|ejϕ and a = rejω̂0 , (1.43)

where |A|, ϕ, r , and ω̂0 are known, real constants. Againfocusing on the real part

Exponentially modulated sinusoidal sequence

|A|rn cos(nω̂0 + ϕ), (1.44)

we have what is called an exponentially modulated sinusoidalsequence. The values of |A| cos(nω̂0 + ϕ) vary between ±|A|.The factor rn, however, can cause the sequence to increasewithout bound or decay to zero as n → ∞, depending whether1 < |r| or |r| < 1, respectively.7 We also need to consider thepossibility that r may be negative, in which case the sign ofthe sequence will generally alternate from sample to sample.Figure 1-21 shows plots with A = 2.0, ω̂0 = π/8, ϕ = π/3,r = ±0.95, and r = ±1.1. The dashed curves, collectivelyreferred to as the envelope, are the exponentials ±|Arn| thatmodulate the sinusoidal sequence.

Another relationship that occurs frequently in the analysis oflinear, discrete-time systems is obtained by expanding cosineand sine sequences in terms of exponentials as

Exponentially modulated sinusoidal sequences

|A|rn cos(nω̂0 + ϕ) = |A|rn

[ej (nω̂0+ϕ) + e−j (nω̂0+ϕ)

2

]

|A|rn sin(nω̂0 + ϕ) = |A|rn

[ej (nω̂0+ϕ) − e−j (nω̂0+ϕ)

2j

]

(1.45)

We now look at Examples 1-3 and 1-4 of how to use thesequences described previously as building blocks to write

7We have already considered the case where r = 1, which results in asustained oscillation.

−20 0 20

−25−20−15−10−5

05

10152025

n

−20 0 20 n

g 1[n]

g1[n] = 2(1.1)n cos(nπ/8 + π/3)

g3[n] = 2(0.95)n cos(nπ/8 + π/3) g4[n] = 2(−0.95)n cos(nπ/8 + π/3)

−20 0 20

−25−20−15−10−5

05

10152025

n

g 2[n]

g 3[n]

g2[n] = 2(−1.1)n cos(nπ/8 + π/3)

-10

-8

-6

-4

-2

0

2

4

6

8

10

−20 0 20 n

g 4[n]

-10

-8

-6

-4

-2

0

2

4

6

8

10

−2 � (0.95)n

2 � (0.95)n

−2 � (1.1)n

2 � (1.1)n

−2 � (1.1)n

2 � (1.1)n

−2 � (0.95)n

2 � (0.95)n

Figure 1-21: Exponentially modulated sinusoidal sequences.

analytical relationships for sequences specified by graphicalrepresentations.

Example 1-3: Writing Analytical Expressions That

Describe Sequences

Use the sequences defined previously to describe analyticallythe sequences shown in Figure 1-22.

Solution:

(a) The pulse sequence can be described by g1[n] =u[n]−u[n−3]. The first step sequence turns on the pulseat n = 0 and the second step turns it off at n = 3.

(b) The periodic sequence g2[n] can be described by firstdetermining the sequence for one period, for example, forn = 0 to n = 5 (the period is N = 6). This already hasbeen done in part (a), so all we need to do is create replicasof u[n]−u[n−3] with each displaced by mN units, where

Page 17: Signals, Sequences, and Systems

1.3 SIGNALS AND SEQUENCES 17

g1[n]

n4−2 1

1

1

−1 30 2

g2[n]

g3[n]

n3 5 71

... ...

−1−4−6 −2−5 −3 4 60 82

(a) A pulse sequence

(b) A periodic pulse sequence

32

12

1

n3 5 71−1−2−3 4 60 2

(c) A piecewise pulse sequence

Figure 1-22: Sequence for Example 1-3.

m is a positive or negative integer and N = 6. The resultis

g2[n] =∞∑

m=−∞g1[n − 6m]

=∞∑

m=−∞{u[n − 6m] − u[n − 6m − 3]},

where g1[n] = u[n] − u[n − 3].(c) We can determine the overall sequence by partitioning the

time axis into intervals where the sequence is linear: n ≤−3; −2 ≤ n ≤ −1 (or −2 ≤ n ≤ 0); 0 ≤ n ≤ 4; 5 ≤ n ≤6; and 7 ≤ n.

(i) For n ≤ −3, the sequence is identically zero.

(ii) When −2 ≤ n ≤ −1, the sequence values are givenby (n + 3), so we need to turn on this sequence atn = −2 and turn it off again at n = 0. This resultsin the subsequence (n + 3)(u[n + 2] − u[n]).

(iii) In the interval 0 ≤ n ≤ 4, the sequence has theconstant value 3 and can be represented by3(u[n] − u[n − 5]).

(iv) For 5 ≤ n ≤ 6, the envelope of the sample values isa straight line with a slope of −1. This envelope thus

can be described as (−n + a), and the value of a iseasily found by observing that, at n = 7, (−n + a)

has the value 0, which indicates that a = 7. So thispiece is described by (−n+7)(u[n−5]−u[n−7]).

(v) For 7 ≤ n, the sequence is zero.

Putting all of these pieces together, we have

g3[n] = (n + 3)(u[n + 2] − u[n]) + 3(u[n] − u[n − 5])+(−n + 7)(u[n − 5] − u[n − 7]),

which can be simplified as

g3[n] = (n + 3)u[n + 2] − nu[n] − (n − 4)u[n − 5]+(n − 7)u[n − 7].

This also can be written as

g3[n] = (n + 3)u[n + 3] − nu[n] − (n − 4)u[n − 4]+(n − 7)u[n − 7].

This latter form illustrates another approach (explored inProblem 1.17) for writing expressions describing piecewise-linear sequences.

In Example 1-4 we consider a left-sided step sequence anddevelop an m-file to plot the sequence. We also introducethe use of stepfun, a built-in m-function that simplifies theprocess.

Example 1-4: A Left-Sided Step Sequence

A left-sided unit step sequence g[n] is shown in Figure 1-23.This plot was generated by the segment of DTSFA fileF1_23_24 shown.

(a) Write an analytical expression for g[n] using a left-sidedunit step sequence.

(b) Write an analytical expression for g[n] using a right-sidedunit step sequence.

(c) Use the m-function stepfun to write an m-file to generateand plot the sequence

g[n] ={

2, n ≤ 3

0, 3 < n.

Page 18: Signals, Sequences, and Systems

18 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

C

g[n]

nn0

Figure 1-23: A left-sided step sequence.

m-file% F1-23: A left-sided step sequenceset(gcf,’DefaultLineLineWidth’,2);

% set default line width to 2 unitsn=-15:1:15; % n=[-15 -14 ... 9 10]gn=zeros(size(n)); % f=[0(at n=-15) 0...0 0(at n=10)]gn(1:13)=2*ones(size(n(1:13)));

% Makes first 13 entries of f=2.0, i.e.,% gn=[2 2 ... 2 2 2 2 2 2(at n=-3) 0 0...0]stem(n,gn); % plotaxis off;

%title(’Fig. 1-23: A Left-Sided Step Sequence’);% plot title(suppressed)

% text for plottext(-2,2,’C’);text(-17.7,1.2,’g[n]’);text(7,-0.1,’n’);text(-3.2,-0.1,’n_0’);text(-17.7,1.9,’\ldots’,’fontsize’,24);

% dots to show continuationtext(15.4,0.4,’\ldots’,’fontsize’,24);

% dots to show continuationpause; % pause execution to view the plots in window Figure 1

Solution:

(a) From the definition of the unit step sequence, u(−n − n0)

is 1 whenever −n − n0 ≥ 0, and it is 0 otherwise. Since−n − n0 ≥ 0 when n ≤ −n0, we have

g[n] = Cu[−n − n0] ={

C, n ≤ −n0

0, −n0 < n.

−15 −10 −5 0 5 10 15−1

−0.5

0

0.5

1

1.5

2

2.5

3

Sample number, n

g[n]

g[n] = 2u[−n + 3]= 2 − 2u[n − 4]

Figure 1-24: A left-sided step sequence using stepfun.

(b) Using a right-sided step sequence, we can write

g[n] = C − Cu[n − n0 − 1] = C(1 − u[n − n0 − 1]).

(c) The m-file segment that follows uses the m-functionstepfun and gives the plot in Figure 1-24. The plottingstatements are omitted. Comparing the m-file segmentsused to plot Figures 1-23 and 1-24, we observe theadvantages of using stepfun rather than setting theindividual elements of arrays.

m-filenzp = 4; % turn-on value for right-sided seq.gnp = 2*stepfun(n,nzp); % form right-sided seq. on at n=3gn = 2 - gnp; % flip the sequence to form left-sided seq.% plotting statements

Comment:In most m-files from here on, plotting statements will be omittedas in part (c), but they can be found in the DTSFA files that areavailable (see Preface).

Next in Example 1-5, we consider in more generality howto determine analytical expressions that characterize pulsesequences.

Example 1-5: Writing Analytical Expressions for Pulse

Sequences

(a) Write an analytical expression for the pulse sequence ga[n]shown in Figure 1-25.

Page 19: Signals, Sequences, and Systems

1.4 CONVERSION OF CONTINUOUS-TIME SIGNALS AND DISCRETE-TIME SEQUENCES 19

−10 −6 −2−8 −4 0 62 84 10Sample number, n

g a[n

]

−1

−0.5

0

0.5

1

1.5

2

Figure 1-25: A pulse sequence.

(b) Write an analytical expression for the pulse sequence gb[n]that is 3.0 for 9 ≤ n ≤ 15 and is 0 otherwise.

(c) Write an analytical expression for a sequence gc[n] thatis 2.0 for −3 ≤ n ≤ 3 and for 12 ≤ n ≤ 18 and is 0otherwise.

Solution:

(a) The pulse is to “turn on” at n = −3 and should “turn off’at n = 4; thus, we have ga[n] = u[n + 3] − u[n − 4].

(b) This pulse is to “turn on” at n = 9 and should “turn off” atn = 16, so the result is gb[n] = 3 · (u[n−9]−u[n−16]).Notice also that gb[n] can be expressed as a scaled andshifted version of ga[n]. That is,

gb[n] = 3ga[n − 12]= 3(u[n − 12 + 3] − u[n − 12 − 4])= 3(u[n − 9] − u[n − 16]).

(c) Here we can represent gc[n] as the sum of a scaled versionof ga[n] and a scaled and shifted version of ga[n]:

gc[n] = 2ga[n] + 2ga[n − 15]= 2(u[n + 3] − u[n − 4]) + 2(u[n − 12] − u[n − 19]).

Comment:The approach illustrated here of generating a sequence as asummation of shifted and scaled sequences frequently can beused to advantage.

1.4 Conversion of Continuous-TimeSignals and Discrete-Time Sequences

In Sections 1.1 and 1.2, it was indicated that discrete-timeprocessing has many advantages. Even when the input is acontinuous-time signal, it is often beneficial to convert it todiscrete-time form. Similarly, after processing a discrete-timesequence, it is often desirable to convert the output sequenceback to a continuous-time signal. Conversion of a continuous-time signal to a discrete-time format is accomplished by asampling operation. Conversion from a discrete-time sequenceto a continuous-time signal is called reconstruction. In thissection, we will consider how these operations are carried out.

We begin by looking at the analog-to-digital conversionprocess in a bit more detail. It is conceptually useful to be awareof the operations that take place in an analog-to-digital converter(ADC), even though we obtain anADC as an electronic packagethat accepts analog voltages (or currents) as inputs and producescoded sequences as outputs. The conversion begins with asample-and-hold operation that yields a staircase analog signalxs(t). Each step in this staircase is represented by a samplevalue

Sampling

xs(t)|t=nT = xs(nT ) n = . . . , −2, −1, 0, 1, 2, 3, . . .

(1.46)

where T represents the interval between samples obtained bythe device represented by the switch in Figure 1-26. Thesampling interval T and the sampling frequency fs are relatedby

T = 1/fs. (1.47)

For simplicity, we represent xs(nT ) as simply xs[n] with thesampling interval T understood and the square brackets indicatethat n is a discrete variable with integer values. The samples ofthe continuous-time signal are then quantized (i.e., representedby a sequence that has a discrete set of values). Typically, eachof these values will be represented by a coded binary word. Forexample, each output from the ADC may be represented as a2’s complement binary number.

Let’s look at the progression of an analog signal through ananalog-to-digital converter. Consider the analog signal xa(t)

shown in Figure 1-27. This signal is sampled at uniformintervals of 0.04 s so T = 0.04 seconds/sample (s/smp). Thereciprocal of T is the sampling frequency, which is denoted byfs and measured in samples/second (smp/s). In Figure 1-27, for

Page 20: Signals, Sequences, and Systems

20 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

Hold

TSampled-and-heldsignal

Quantizedsignal

Analogsignal

Codedsequence

Sample and hold S/H

Analog-to-Digital Converter (ADC)

Quantizer Encoderxs(t)xa(t) xq(t) xc(t)

Figure 1-26: Analog-to-digital conversion.

0 0.08 0.16 0.24 0.32 0.4 0.48−3

−2

−1

0

1

2

3

4

5

6

Time, seconds

xa(t), Input to samplerxa(nT), Sample valuesxs(t), Output of hold

Figure 1-27: Illustrating the sample-and-hold process.

example, we have fs = 1/T = 25 smp/s; the sample values areshown as circles, and the held samples, which are denoted byxs(t), appear as the piecewise-constant function. The signalxs(t) is sometimes referred to as a sampled-analog signal,because it is defined for all times in the interval 0 ≤ t < 0.46 sand is able to take on any amplitude values, not just a finite setof values. As shown in Figure 1-26, the next step is quantizationof the signal xs(t).

The input–output characteristic of a three-bit (binary digit)quantizer is shown in Figure 1-28. With three bits, the quantizeris capable of representing 23 = 8 different output levels. Theseeight levels have been numbered as 0 to 7 and are shown at theright side of the diagram. The input–output characteristic can

be described by the relationship

xq(t) =

⎧⎪⎪⎪⎨⎪⎪⎪⎩

3D, for 5D/2 ≤ xs(t),

mD, for D(m − 1/2) ≤ xs(t) < D(m + 1/2),

m = −3, −2, . . . , 1, 2

−4D, for xs(t) < −7D/2(1.48)

where D is the quantization increment measured, for example,in volts.

This three-bit quantizer is an example of a roundingquantizer, also referred to as a 1

2 -bit offset quantizer. Anothertype, considered in Problem 1.26, is a truncation quantizer.

In Figure 1-28, the ideal quantizer input–output characteristicis shown by the diagonal, dashed straight line passing

−9D/2 −5D/2 −D/2 D/2 5D/2

−4D

−3D

−2D

−D

0

D

2D

3D

Qua

ntiz

er o

utpu

t, x

q(t)

Quantizer input, xs(t)

LevelOffsetBinary

0

1

2

3

4

5

6

7

000

001

010

011

100

101

110

111

Figure 1-28: Input-output characteristic of a three-bit roundingquantizer.

Page 21: Signals, Sequences, and Systems

1.4 CONVERSION OF CONTINUOUS-TIME SIGNALS AND DISCRETE-TIME SEQUENCES 21

through the origin. A quantizer having this straight-linecharacteristic would be perfectly accurate, but to obtain thisideal characteristic, we would need an infinite number ofbits, which is obviously impractical. However, we can lessenquantization errors by increasing the number of quantizer bits,and this is one of the criteria used when selecting an ADC.By increasing the number of bits, the quantizer “staircase”function more closely approximates the ideal characteristic.Another aspect of the quantizer to be noted is its saturationcharacteristic. For example, any input that exceeds 5D/2 willbe quantized as 3D; similarly, any negative input less than−7D/2 will be quantized as −4D.

Assume that the increment D in Figure 1-28 is one voltand that the units of xs(t) in Figure 1-27 are volts. In thiscase, applying xs(t) to the quantizer yields the output shownfor xq(t) shown in Figure 1-29(a). Notice that the sampled-and-held signal xs(nT ) has a variety of values as shown inTable 1-1, whereas the quantized signal xq(nT ) has valuesthat are integer multiples of one volt. Saturation occurs forthe sample occurring at t = 0.2 s, where xs(0.2) = 3.35 V isquantized to an output voltage of 3.0 V. We also observe that thesample and its quantized version in the interval 0.36 ≤ t < 0.40are indistinguishable from one another on the plot. Therow labeled “Level” in Table 1-1 gives the values of xq(nT )

corresponding to the scale at the right side of Figure 1-28.Converting these levels to binary values yields the row

labeled “Offset Binary” in Table 1-1. The encoder converts theoffset binary values to the 2’s complement representation shownin the last row of Table 1-1. This encoding typically would bemade if the digital processing system for which xq(nT ) is theinput is using fixed-point binary arithmetic. Alternatively, theoutput values could be represented as floating-point numbersif the arithmetic is based on this format. Notice that the 2’scomplement representation can be obtained from the offsetbinary values by reversing the most significant bit value andretaining the remaining bits.

In addition to quantization errors introduced by the number ofbits available in the analog-to-digital converter, there are othersources of error to be considered.8 In addition to the numberof bits that characterize an ADC, there are other specificationsthat influence the selection of a particular model. Among theseare the maximum (and minimum) speed of conversion, powerrequirements, and various noise factors.

Figure 1-29(a) shows the input analog signal to an ADC,the sampled-and-held values, and their quantized representationusing a three-bit quantizer. The output of the ADC provides theinput to a discrete-time system that latches the values receivedinto a register. This process means that it is only the values ofthe coded signal xc(t) at the sampling instants that are input to

8A detailed discussion of these issues is given in Gray, Nicholas, “TheABCs of ADCs,” National Semiconductor Corporation, available at the websitewww.national.com/appinfo/adc/files/ABCs_of_ADCs.pdf.

0 0.08 0.16 0.24 0.32 0.40 0.48−5

−4

−3

−2

−1

0

1

2

3

4

Time, seconds

x s(t

), x q

(t)

in v

olts

xq(

nT)

in v

olts

Level

0

1

2

3

4

5

6

7

Output of hold, xs(t)xs(nT)Output of quantizer, xq(t)xq(nT)

(a) The original analog signal, sampled-and-held version, and quantized signal

0 1 2 3 4 5 6 7 8 9 10 11−5

−4

−3

−2

−1

0

1

2

3

4

n, samplest, seconds0.40.20.0

Output sequence of ADC, xq[n]

(b) Representation of an output sequence from an ADC

Figure 1-29: Signals at various stages of the analog-to-digitalconversion process.

the discrete-time processing system, so we find it convenient torepresent these sample values as shown in Figure 1-29(b). Fromhere on, we will use a representation resembling Figure 1-29(b)to show sequences. Generally, we will not include the variableT , and we will denote the sequence values xq(nT ) as simplyxq [n] with the implicit presence of the sampling period T beingunderstood.

Often, a discrete-time system is used to process an analogsignal that has been converted to digital form by an ADC, andthe processed sequence is then converted back to analog form,as shown in the system diagram of Figure 1-5. This would be thecase, for example, if the input were an audio signal that is to befiltered and is then used to drive speakers or headphones. This

Page 22: Signals, Sequences, and Systems

22 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

Table 1-1: Sampled and Quantized Signals and Representations

n 0 1 2 3 4 5 6 7 8 9 10 11

xs(nT ). 1.45 −0.93 1.45 −0.61 −0.78 3.35 0.26 −1.73 1.61 0.02 0.27 2.76

xq(nT ) 1 −1 1 −1 −1 3 0 −2 2 0 0 3

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 analogsignal is accomplished by a digital-to-analog converter (DAC).The input to a DAC is a sequence, and the output is a continuous-time signal. One type of DAC converts each input sample valueto a pulse whose amplitude equals the value of the sample value.The result of this process is shown in Figure 1-30. The sequencevalues that appear at the output registers of the discrete-timeprocessing system are shown as blue circles. This sequence isquantized to the same levels as shown earlier with the three-bitADC and also may be represented in a 2’s complement binaryrepresentation, for example. The particular DAC representedhere provides a piecewise-constant output signal. This signalis similar to what occurs in the sample-and-hold portion of anADC. This piecewise-constant output is provided by a zero-

0 0.08 0.16 0.24 0.32 0.40

−6

−4

−2

0

2

4

6

y c[n

] an

d y c

(t)

time, s

0 1 2 3 4 5 6 7 8 9 10 n

Output signal from DAC, yd(t)Input sequence to DAC, yc[n]

Figure 1-30: A DAC input sequence and stepwise constant outputsignal.

order hold DAC; there also are other possibilities.9 The outputsignal from this DAC is smoothed by a lowpass analog filter.

Figure 1-31 gives a representation of the process that beginswith an incoming analog signal that is converted to discrete-timeform, processed by a discrete-time system, and reconstructed toanalog form. The sequences shown in Figure 1-31 are quantizedof course. In the remainder of this text, however, we will ignorequantization effects. This corresponds to the assumption thatwe have ideal conversion of analog signals to discrete-time form(as indicated by the dashed straight line in Figure 1-28) and idealreconstruction using a DAC as well. End-of-chapter referencesprovide additional details on quantization effects in discrete-time systems.

1.5 The Sampling Theorem

The sampling theorem, whose development is traced primarilyto C. E. Shannon, H. Nyquist, J. M. Whittaker, and D. Gabor,is the fundamental result linking continuous-time and discrete-time systems. A statement of the sampling theorem is givenhere.

Sampling theorem

If an analog signal has no frequency components atfrequencies greater than fmax:

1. the signal can be uniquely represented by equallyspaced samples if the sampling frequency fs isgreater than 2 · fmax, and

2. the original analog signal can be reconstructedexactly from its samples.

The minimum acceptable sampling frequency, 2 · fmax, isknown as the Nyquist rate.

9See, for example, the discussion in Section 4-4 of Reference [1] in thebibliography at the end of this chapter.

Page 23: Signals, Sequences, and Systems

1.5 THE SAMPLING THEOREM 23

t n n t

x(t) x[n]

Analog-to-Digial

Converter(ADC)

Digital-toAnalog

Converter(DAC)

Digitalcomputer

orDSP chip set

y[n]

Analogsignal

Sequence Processedsequence

Processedanalogsignal

y(t)

x(t) x[n] y[n] y(t)

Figure 1-31: A discrete-time processing system with analog input and output signals.

Although not a part of the sampling theorem as originallystated, it turns out that reconstruction of the original analogsignal can be carried out by passing the samples through anideal lowpass analog filter having an appropriate bandwidth.

The importance of the sampling theorem is that we cansample a frequency-band-limited, continuous-time waveform;use a discrete-time system to process the samples; and thenconvert the processed samples back to an analog signal withoutlosing information! Thus, the sampling theorem is what makesit possible to obtain the benefits of discrete-time processing asdiscussed in Sections 1.1 and 1.2 and shown in Figure 1-31.

Our goal in this section is demonstrate why the samplingtheorem works and what happens if its conditions are violated.We will concentrate on the sampling of sinusoidal signals, butthe results can be generalized to other signals as well.

Comment:Deriving the sampling theorem requires background in Fouriertransform theory. If you have previously studied continuous-time Fourier transforms, however, Appendix C gives anabbreviated development of the sampling theorem.

We begin by observing what happens when a continuous-time sinusoidal signal is sampled. For example, consider

x(t) = A cos(2πf0t + ϕ) = A cos(ω0t + ϕ), (1.49)

where A is the amplitude, f0 is the frequency in hertz (or cyclesper second), t is time in seconds, ω0 is the angular frequencyin radians/second, and ϕ is the phase shift in radians. If thissignal is the input to an ideal analog-to-digital converter with asampling interval of T seconds/sample (a sampling frequencyfs = 1/T smp/s), the sampled output sequence from an idealADC is

x(t)|t=nT = A cos(ω0t + ϕ)|t=nT = x(nT )

= A cos(ω0nT + ϕ),(1.50)

which, by defining ω̂0 = ω0T can be written as the (discrete-time) sinusoidal sequence

x[n] = A cos(nω̂0 + ϕ). (1.51)

We have dropped the sampling period T from x(nT ) knowingthat this dependence is implicit. We define ω̂0 as the digitalradian frequency of the discrete-time sinusoid, and ω̂0, ω0, T ,and fs have the following important relationships:

ω̂0 = ω0T = ω0/fs = 2πf0T = 2πf0/fs. (1.52)

Again, we note that the units of fs are samples/second, andω̂0 has units of radians/sample. Clearly, ω0 = 0 correspondsto ω̂0 = 0. If ω0 ≈ 2πfs/2, which is the highest frequencythat can be represented by the specified sampling frequency,this corresponds to the digital frequency ω̂0 ≈ π . Thus, theuseful range of digital frequencies for a discrete-time systemprocessing analog signals is

0 ≤ ω̂ < π, (1.53)

corresponding to analog frequencies in the range

0 ≤ f ≤ fmax < fs/2. (1.54)

It is useful at this point to consider some alternativerepresentations of sinusoidal sequences. Consider

x[n] = cos(nω0T ) = cos(nω̂0)

= 1

2ejnω̂0 + 1

2e−jnω̂0 ,

(1.55)

which is a cosine sequence with angular frequency ω̂0. Oneway to represent this sequence of two exponentials is as apair of rotating vectors, as shown in Figure 1-32 where wehave assumed that ω̂0 = π/4. Notice that one vector rotatescounterclockwise and the other clockwise. This representation

Page 24: Signals, Sequences, and Systems

24 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

Radius = 1/2

Re

Im

n = 0, 8,…

n = 7,15,…

n = 6,14,…

n = 5,13,…

n = 4,12,…

n = 3,11,…

n = 2,10,…

n = 1, 9,…

^

Radius = 1/2

Re

Im

�0

^−�0

n = 0, 8,…

n = 1, 9,…

n = 2,10,…

n = 3,11,…

n = 4,12,…

n = 5,13,…

n = 6,14,…

n = 7,15,…

Figure 1-32: Rotating vector representation of a sinusoidal sequencewith ω̂0 = π/4.

looks very similar to the one for a continuous-time sinusoidshown in Figure 1-11. An important difference, however, is thatthe variable t in Figure 1-11 is a continuously varying quantity,whereas n in Figure 1-32 can assume only integer values (e.g.,n = 0, 1, 2, 3, . . .).

An alternative representation of Eq. (1.55) is given inFigure 1-33, where we show the frequency content of asinusoidal sequence. The two lines, one at ω̂ = ω̂0 and theother at ω̂ = −ω̂0, indicate that the sequence is made up oftwo frequency components with each having a magnitude of 1

2 .This plot is known as the magnitude spectrum of the sinusoidalsequence x[n]. The type of plot as shown in Figure 1-33 will bevery useful to us in considering the implications of the sampling

0 �0−�0ˆ ˆ �, radˆ

Magnitude

1/2 1/2

Figure 1-33: Magnitude spectrum of a sinusoidal sequence.

theorem. The different markers on the spectral lines at ±ω̂0 areused to distinguish positive and negative frequency componentsassociated with a sinusoidal sequence.

For Figures 1-32 and 1-33, we started with the sinusoidalsequence of Eq. (1.55). Let us now consider what happenswhen we obtain this sequence by sampling a continuous-time sinusoid. Assume that we sample x(t) = 4 cos(2πf0t) =4 cos(2π · 50t), which is a 50-Hz sinusoidal signal. Thesampling theorem tells us that, to uniquely represent thissinusoid by its samples, we must select a sampling frequencyof greater than 100 smp/s. Assume that we select a samplingfrequency of fs = 200 Hz. This corresponds to a samplinginterval of

T = 1/fs = 1/200 = 0.005 s/smp, (1.56)

and the sampled signal is given by the sequence

x(t)t=nT = x[n]= 4 cos(2π · 50 · n · 0.005) = 4 cos(nπ/2)

(1.57)

from which we see that ω̂0 = π/2. We already know fromSection 1.3.2 [see Eq. (1.41)] that these same sample valuescould have come from any one of an infinite number ofsinusoidal sequences given by

r�[n] = 4 cos(n[ω̂0 + �2π ]) (1.58)

where � is a positive or negative integer. Writing this expressionin exponential form gives

r�[n] = 4 cos(n[ω̂0 + �2π ])= 4

{1

2ej (n[ω̂0+�2π ]) + 1

2e−j (n[ω̂0+�2π ])

}� = 0, ±1, ±2, . . . .

(1.59)

This indicates that the sample values of x[n] could have comefrom any of the family of sequences r�[n]. If we represent someof these frequencies on a spectrum diagram with ω̂0 = π/2,the result is shown in Figure 1-34. The lines at ±π/2 arethose of the samples of the 50-Hz continuous-time sinusoidalsignal. The other frequency lines are from aliases,10 which arecontinuous-time sinusoids of other frequencies having the samesample values as those of the 50-Hz sinusoid. Notice that thespectral lines at ω̂ = . . . , −9π/2, −5π/2, 3π/2, 7π/2, . . . aredisplaced from the spectral line at ω̂ = −π/2 by 2π� radiansfor � = . . . , −2, −1, 1, 2, . . .. The diamond-shaped endof these lines indicates this relationship. Similarly, thespectral lines at ω̂ = . . . , 9π/2, 5π/2, −3π/2, −7π/2, . . . aredisplaced from the spectral line at ω̂ = π/2 by 2π� radians for� = . . . , 2, 1, −1, −2, . . ., as indicated by the lollipop-shapedline ends. Also shown are analog frequencies corresponding toω̂ = ±π (i.e., ±fs/2) and ω̂ = ±ω̂0 (i.e., ±f0).

10alias: an assumed or other name; also known as (aka).

Page 25: Signals, Sequences, and Systems

1.5 THE SAMPLING THEOREM 25

π2

0�, radˆ

Magnitude

2

−3π2

−7π2

−π−π π

25π2

9π2

−9π2

−5π2

3π2

7π2

0−1−2 0 1 2 �2 1 −1 −2

f0−f0 0fs2

fs2

Figure 1-34: Frequency spectrum lines of a sequence and aliases.

An important issue then is how to reconstruct the continuous-time sinusoidal signal from samples that could have beenobtained from many continuous-time sinusoids (an infinitenumber, actually). The capability to reconstruct the originalcontinuous-time sinusoid is based on the condition specifiedin Eq. (1.53), where we observed that the useful range offrequencies for a discrete-time system is

0 ≤ ω̂ < π.11 (1.60)

So, for example, in Figure 1-34, we select only those spectrumlines in the interval 0 ≤ ω̂ < π and pair them with thecorresponding negative frequencies, so we have those spectralcomponents enclosed by the dashed lines. From this selectionprocess, we obtain

xR[n] = 2ejnπ/2 + 2e−jnπ/2 = 4 cos(nπ/2), (1.61)

where the subscript R indicates that this sequence isreconstructed (or recovered) from the sequences whose spectrallines are represented in Figure 1-34. To convert this sequenceback to the original analog signal that was sampled, we recallthat this signal was given by

x(t) = A cos(2πf0t) (1.62)

with t = nT = n/fs . To accomplish the reconstruction weneed to determine A and the analog frequency f0.

Substituting t = n/fs in the expression for x(t) gives

x[n] = A cos(2πnf0/fs) (1.63)

and comparing the equations for xR[n] and x[n], we see thatA = 4 and

nπ/2 = 2πnf0/fs. (1.64)11We actually can consider frequency components in the interval 0 ≤ ω̂ <

2π , as in Figure 1-34, but the frequency components in the range π ≤ ω̂ < 2π

are the same as the components in the range −π ≤ ω̂ < 0. This symmetryexists for all positive and negative values of ω̂. See Figure 1-34. More on thislater.

x(t) x[n]C/D D/C

xR(t)

Figure 1-35: Ideal conversion of analog signal to discrete-timesequence and back again.

We know that fs = 200 smp/s and solving for f0 gives f0 =50 Hz. So the signal obtained by reconstructing this an analogsignal from its samples is

xR(t) = 4 cos(2π · 50t). (1.65)

Comment:This may seem like an obvious result—and it is—but whatwe are looking for is a process that will accept a sequence’ssample values (given knowledge of the sampling frequency)and reconstruct an analog signal. What we have done here canbe represented by the diagram of Figure 1-35. The blocks shownin this diagram represent ideal continuous-time-to-discrete-time conversion (C/D) and ideal discrete-time-to-continuous-time conversion (D/C). Since these processes are assumed tobe ideal, the reconstructed signal should be identical to theinput signal [i.e., xR(t) = x(t)]. Throughout the remainder ofthis text, we assume the configuration shown in Figure 1-36with ideal conversions to enable us to focus on the theoryand applications of discrete-time systems. If we were to lookinside the ideal conversion boxes, we would see somethinglike what is shown in Figure 1-37. The anti-aliasing ideallowpass analog filter12 removes any input signal componentsthat are at frequencies above the maximum frequency assumedfor application of the sampling theorem. This ensures thatany unwanted signal components do not corrupt the ADCconversion process. Similarly, the ideal lowpass analogreconstruction filter shown in the D/C block removes high-frequency components that accompany the output of a zero-hold DAC, which is a device commonly used to convert digitalsignals to a piecewise-constant output signal. It turns out thatoversampling, which is using a sampling frequency more thanthe minimum required, eases the requirements on the lowpassanalog reconstruction filter so that something approaching anideal filter characteristic is not required. For example, analogaudio signals that can be heard by the human ear generally donot exceed 20 kHz, but the sampling frequency used for CDrecording is 44.1 k samples/second (smp/s).

Finally, let’s consider Example 1-6 where an input sinusoidalsignal is sampled at a frequency below the minimum raterequired by the sampling theorem.

12As we shall see subsequently, an ideal filter removes all frequencycomponents completely except those in the passband, and these passbandfrequencies are all transmitted undistorted to the output of the filter.

Page 26: Signals, Sequences, and Systems

26 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

x(t) x[n]C/D D/C

y[n]Discrete-time

system

y(t)

Figure 1-36: Discrete-time system with ideal continuous-time/discrete-time conversions.

x(t) x(t)Anti-aliasing

filter(ideal lowpassanalog filter)

Reconstructionfilter

(ideal dowpassanalog filter)

C/D

x[n]Ideal analog-to-digital

converter

^

y[n] y(t)Ideal digital-to-analog

converter

D/C

y(t)^

Figure 1-37: Looking inside the ideal conversion processes.

Example 1-6: Consequences of Sampling Below the

Nyquist Rate

A sinusoidal signal x(t) = cos(2π · 50t) is sampled at a rateof 75 smp/s.

(a) Draw a spectrum diagram showing the frequencies ofsequences having the samples obtained by this process,including the aliases.

(b) Determine the continuous-time signal obtained byreconstructing the analog signal from the spectral linesin the interval −π ≤ ω̂ < π and compare the results withthe original continuous-time sinusoid.

Solution:

(a) The sampled sequence is given by x[n] =cos(2πn · 50/75) = cos(4πn/3). Thus, for theexponential form of the cosine sequence, we have

x[n] = 1

2ejn(4π/3) + 1

2e−jn(4π/3).

From our previous investigation, we know that in additionto the spectral lines at ±4π/3 there will also be aliases(lines) at

±(4π/3 + � · 2π), � = ±1, ±2, . . . .

Evaluating this expression for a few values of � yieldsspectral lines at

(π/3)×(. . . , −14, −10, −8, −4, −2, 2, 4, 8, 10, 14, . . .)

as shown in Figure 1-38. Notice that the spectral linesat ω̂ = ±4π/3 lie outside of the interval −π ≤ ω̂ < π ,so the reconstruction selects the lines at ω̂ = ±2π/3 asrepresenting the sequence of samples from the analogsignal. Also notice that the lollipop- and diamond-shapedtops are used to indicate from which spectral line atω̂ = ±4π/3 each of the alias lines came from.

(b) We know that the analog signal is to be reconstructed fromthe sequence

xR[n] = 1

2ej2πn/3 + 1

2e−j2πn/3 = cos(2πn/3).

The reconstructed analog signal has the form

xR(t) = A cos(2πf1t),

where A and f1 are to be determined. The samples thatcorrespond to xR(t) are given by

xR[n] = A cos(2πnf1/fs)

= A

2[(ej2πnf1/fs ) + (e−j2πnf1/fs )].

Comparing the two representations of xR[n], we see thatA = 1 and, with fs = 75 smp/s,

2πn/3 = 2πnf1/fs ⇒ f1 = fs/3 = 25 Hz.

Page 27: Signals, Sequences, and Systems

1.6 A ROAD MAP 27

40�̂

Magnitude

1/2

−4−10 10−14 −8 8 14

001

−2

−1

−23−3

−1 1−3 −2 −2 −3

0fs2

fs2

f

�π3

Figure 1-38: Spectral lines for 50 Hz sinusoid sampled at 75 smp/s.

So, even though the original analog signal was a 50 Hzsinusoid, after sampling and reconstructing, it appearsas if we had a 25-Hz analog sinusoid. This erroneousreconstruction is because we violated the requirementof the sampling theorem that tells us that the samplingfrequency fs should have been more than 100 smp/s.

Additional aspects of the sampling theorem are the subjectof the Exploration Problems at the end of the chapter.

Comment:To help understand the concepts in this text and exploreextensions, several visualizations are provided. The first ofthese, Sampler, is a LabVIEW Virtual Instrument (VI for short)on the DTSFA website (see Preface). This use of Sampler isfeatured in Exploration Problems 1.37 through 1.41.

We again emphasize that, although we have used sinusoidalsequences to illustrate important aspects of the samplingtheorem, it is important to keep in mind that this theorem appliesto all bandwidth-limited signals, not just sinusoids.

From this point onward, we will focus attention on the modelsand solution methods for discrete-time systems. We begin bytaking a view from 30,000 feet of where we are going.

1.6 A Road Map

The study of signals and linear systems involves domains,models, and methods. The rest of this book will focus onlearning to use the various models and techniques to analyzediscrete-time linear systems in the time [n], frequency (ω̂),and transform (z) domains. Table 1-2 presents the domainsof interest. We shall see that system characteristics that arehard to observe in one domain may be easily visible in another.In addition, depending on the information available, it may bemore direct and efficient to perform system analysis in onedomain rather than another.

Table 1-2: Domains for Discrete-Time and Continuous-Time Systems

Discrete-Time Systems Continuous-Time Systems

Time, n, samples (smp) Time, t , seconds (s)

Frequency, ω̂, Frequency, f , Hertz (Hz) orradians/sample (rad/smp) ω, radians/second (rad/sec)

Transform, z Transform, s

Table 1-3: Models for Discrete-Time and Continuous-Time Systems

Discrete-Time Systems Continuous-Time Systems

Difference equation, DE Differential equation, DE

Transfer function, H(z) Transfer function, H(s)

Frequency response, Frequency response,

H(ejω̂) H(jω)

State difference equation State differential equation

Unit impulse response, h[n] Unit impulse response, h(t)

Signal flowgraph or Signal flowgraph orblock diagram block diagram

Corresponding to the domains in Table 1-2 are the systemmodels listed in Table 1-3.

Page 28: Signals, Sequences, and Systems

28 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

Differenceequation

Stateequation Signal

flowgraph/block diagram

Transferfunction

Frequencyresponse

Impulseresponse

Figure 1-39: Finding the frequency response from other system models.

It is often important to be able to convert a model from oneform to another. This concept is illustrated in Figure 1-39,where it is shown that a conversion may be done directly fromone form to another (for example, from a difference equationdescribing a discrete-time system to its frequency response)or indirectly, as shown in the conversion from a differenceequation to its frequency response via an intermediate transferfunction. In Figure 1-39, we also see that the path to a frequencyresponse from other models also can be either direct or indirect.The model and domain used for a particular task depend onvarious factors, including what is known about the system; whatinformation is desired; and what solution aids (for example, acomputer with LabVIEW software) are available.

Along with the models and domains are various operations(given in Table 1-4) employed in the analysis and design oflinear systems. Notice that several of these operations may becarried out in more than one domain—as the (very) old sayinggoes, “there’s more than one way to....”

Final Comment:

Tables 1-2 through 1-4 and Figure 1-39 are offered in the spiritof telling you, the reader, where were going. Depending on thestate of your current knowledge, the information in these tablesand the figure may mean a lot or very little. We recommendthat you periodically return to this section to gain perspectiveas you work your way through the following chapters.

Table 1-4: Operations for Linear Systems

Discrete-Time Systems Continuous-Time Systems

z transform Laplace (s) transform

Convolution sum (time) Convolution integral (time)

Correlation sum (time) Correlation integral (time)

Discrete-time Fourier, Continuous-time Fourier,transform (DTFT), transform (CTFT),

Discrete Fourier Continuous-time Fouriertransform (DFT), series (CTFS)

Discrete Fourierseries (DFS)

Convolution Convolution(by z transforms) (by Laplace transforms)

Correlation Correlation(by z transforms) (by Laplace transforms)

Page 29: Signals, Sequences, and Systems

1.6 A ROAD MAP 29

Definitions, Techniques, and Connections

Continuous-Time Signals

Unitimpulsesignal

δ (σ ) = lim�→0

g(�, σ)

Step signal B · u(t − t0) ={

B, t0 ≤ t

0, t < t0

Exponentialsignal

g(t) = Aeβt

Exponentiallymodulatedsinusoidalsignal

g(t) = |A|eαt cos(ω0t + ϕ)

Representationof anysignal

g(t) = ∫ ∞−∞ g(τ)δ(t − τ)dτ

Discrete-Time Sequences

Unitimpulsesequence

δ[n − m] ={

1, n − m = 0

0, n − m �= 0

Stepsequence

B · u[n − n0] ={

B, n0 ≤ n

0, n < n0

Exponentialsequence

g[n] = A (a)n

Exponentiallymodulatedsinusoidalsequence

g[n] = |A| (r)n cos(nω̂0 + ϕ)

Representationof anysequence

g[n] =∞∑

m=−∞g(m)δ(n − m)

Sampling Theorem

If an analog signal has no frequency components atfrequencies greater than fmax:

1. the signal can be uniquely represented by equallyspaced samples if the sampling frequency fs is greaterthan 2 · fmax, and

2. the original analog signal can be reconstructed exactlyfrom its samples

The minimum acceptable sampling frequency, 2 · fmax, isknown as the Nyquist rate.

Page 30: Signals, Sequences, and Systems

30 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

m-functions used

Function Purpose and Use

plot Provides continuous-time or discrete-time plots.

stem Plots discrete-time functions (sequences).

stepfun Generates a shifted step function and/or a step sequence.

Problems

Reinforcement Problems

1.1. Sketching step and pulse continuous-time signals.

Sketch the following signals.

(a) u(t − 4)

(b) −2u(t − 1)

(c) 1.3u(t + 6)

(d) u(t − 2) − u(t − 5)

1.2. Sketching continuous-time signals.

Sketch the following signals.

(a) −2u(t + 1) + 3u(t) − u(t − 2)

(b) 2.5t[u(t) − u(t − 2)](c) −2.5t[u(t + 2) − u(t)](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.

Write analytical expressions with numerical values of theunknown constants for the signals shown in Figure 1-40.

1.4. Periods of periodic signals.

Find the period of each of the periodic signals shown inFigure 1-41.

1.5. Signal synthesis.

Write analytical expressions for the signals shown inFigure 1-42.

1.6. Describing periodic signals.

Write analytical expressions for the periodic signals shown inFigure 1-43.

1.7. Modifying m-files.

Use the m-function stepfun to modify DTSFA file F1_10 sothat the exponentials are zero for t < 0. Adjust the axes asnecessary to provide useful plots.

−1 0 1 2 3 4−1

0

1

2

3

4

5

6

7

8

t in seconds−1 0 1 2 3 4

t in seconds

a(t)

b(t)

a(t) = Aeptu(t − t0) b(t) = [K − Aept]u(t)

−1

−0.5

0

0.5

1

1.5

2

2.5

3

0 0.2 0.4 0.6 0.8 1 1.2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

t in seconds

c(t)

c(t) = Kept cos(�t + �)u(t)

Figure 1-40: Signals to be described analytically.

1.8. Modifying m-files.

Modify DTSFA file F1_12 so that the sinusoid has a period ofT = 0.05 s, the phase shift is ϕ = 0, and use the m-functionstepfun to make the signal zero for t < 0. Adjust the axes asnecessary to provide useful plots.

Page 31: Signals, Sequences, and Systems

PROBLEMS 31

0 5 10 15−1

0

1

2

3

4

5

6

7

8

t, seconds(a)

… …

0 5 10 15 20−1

0

1

2

3

4

5

6

7

8

t, seconds(b)

… …

−5 0 5 10−1

0

1

2

3

4

5

t, seconds(c)

… …

−10 0 10 20 30 40−5−4

−3

−2

−1

0

1

2

3

4

5

t, seconds(d)

… …

Figure 1-41: Periodic signals.

1.9. Modifying m-files.

Modify DTSFA file F1_13 so that the sinusoids of both partshave a period of T = 0.8 s, the phase shift, exponentials andsinusoidal amplitudes are unchanged, and use the m-functionstepfun to make the signals zero for t < 0. Adjust the axes asnecessary to provide useful plots.

1.10. Generation of signal plots using m-files.

Write and execute m-files to generate and plot the signals ofProblem 1.1.

1.11. Generation of signal plots using m-files.

Write and execute m-files to generate and plot the signals ofProblem 1.2.

1.12. Generation of signal plots using m-files.

Write and execute m-files to generate and plot the followingsignals.

(a) d1(t) = 3e−2t u(t)

(b) d2(t) = 2[1 − e−1.8t ]u(t)

g1(t)

2

t0 2 4 6

g3(t)

2

t0 4 10 115

g4(t)

−10

t0 4 106

g2(t)

5

t0

(a)

(c)

(d)

(b)

4

Figure 1-42: Signals to be described analytically.

(c) d3(t) = 2e−1.8t cos(10t − π/4)u(t)

(d) d4(t) = e1.01tcos(8t + π/5)u(t)

1.13. Sketching step and pulse sequences.

Sketch the following sequences.

(a) 3u[n − 4](b) −2u[n − 1](c) 1.3u[n + 6](d) u[n − 2] − u[n − 5]

1.14. Sketching sequences.

Sketch each sequence.

(a) 4u[n − 3] − 2(n − 6)u[n − 6] + 2(n − 8)u[n − 8](b) 4(u[n − 3] − u[n − 6]) − 2(n − 6)(u[n − 6] − u[n − 8])(c) 2(n + 5)u[n + 5] − 3nu[n] + (n − 10)u[n − 10](d) 2(n + 5)(u[n + 5] − u[n − 10]) − 3n(u[n] − u[n − 10])

Page 32: Signals, Sequences, and Systems

32 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

g1p(t)

1

t−4

...

...

...

...

−2 0 4 6 8 102

g2p(t)

2

t−4

... ...

−2 0 4 6 8 102

g3p(t)

1

t

−1

−2 0 4 6 82

g4p(t)

1

t−3−5 −1 0

(a)

(b)

(c)

(d)

3 5 7 11 1391

Figure 1-43: Signals to be described analytically.

1.15. Periods of periodic sequences.

Determine the periodN of each of the periodic sequences shownin Figure 1-44.

1.16. Periods of periodic sequences.

Determine the periodN of each of the periodic sequences shownin Figure 1-45.

1.17. Sequence synthesis.

(a) Describe the sequence shown in Figure 1-46 as the sumof subsequences consisting of either of the following.

(i) Ramp sequences "turned on" at n = 0, 2, 6, and 8,respectively.

(ii) Two triangular sequences and a rectangular pulsesequence.

(b) Show that the two forms obtained in part (a) are equivalent.

1.18. Sequence synthesis.

−6 −4 −2 0 2 4 6 8−4−2

0246

Samples, n(a)

−6 −4 −2 0 2 4 6 8−2

−1

0

1

2

Samples, n(b)

−6 −4 −2 0 2 4 6 8 10−4

−2

0

2

4

Samples, n(c)

−4 −2 0 2 4 6−3−2−1

0123

Samples, n(d)

x 1p[

n]x 2

p[n]

x 3p[

n]x 4

p[n]

Figure 1-44: Periodic sequences.

Write analytical expressions for the sequences shown inFigure 1-47.

1.19. Describing periodic sequences.

Write analytical expressions to describe the periodic sequencesfp(n) and gp(n) shown in Figure 1-48.

1.20. Modifying m-files.

Modify DTSFA file F1_16 by using the m-function stepfun togenerate the two step sequences.

1.21. Modifying m-files.

Modify DTSFA file F1_21 by using the m-function stepfun togenerate pulsed, exponentially modulated sinusoidal sequenceswhose values are zero except in the interval 0 ≤ n ≤ 20. Adjustthe axes as necessary to provide useful plots.

1.22. m-file generation of sequences.

Write and run m-files to generate and plot the sequences ofProblem 1.13.

Page 33: Signals, Sequences, and Systems

PROBLEMS 33

x 1p[

n]x 2

p[n]

x 3p[

n]x 4

p[n]

−4 −2 0 2 4 6 8−1012345

Samples, n(a)

−5 0 5 10

−2

0

2

4

Samples, n(b)

−4 −2 0 2 4 6−2

−1

0

1

2

Samples, n(c)

−4 −2 0 2 4 6 8

0

2

4

6

Samples, n(d)

Figure 1-45: More periodic sequences.

g[n]

2

...1

n1 6 80 2

Figure 1-46: Sequence to be described analytically.

1.23. m-file generation of pulse sequences.

Write and run m-files to generate and plot the sequences ofProblem 1.14.

1.24. Analog-to-digital conversion.

(a) Using the rounding ADC input–output characteristicin Figure 1-28 as a model, sketch the input–outputcharacteristic of a four-bit rounding quantizer whose inputvalues are as in Figure 1-28 and whose output values are

e[n]

...n3 5 71−1−2 4 6 80 2

3

f [n]

...n−5 −3 −1−7 −4 −2 0−8 −6

3

g[n]

... ...n0 2

221 1

4−2−4 1

44

3−3 −1

8

8 . 2−n8 . 2n

Figure 1-47: More analytical description of sequences.

fp[n]

......

n50 2−2

2

3

2 22

1 11 11 1 1

gp[n]

......

n0 12 24−12 3 7

Figure 1-48: Analytical description of periodic sequences.

in the range −4D to 3.5D, where D/2 is the quantizationincrement measured in volts, for example.

(b) On the sketch of part (a), show the input–outputcharacteristic of an ideal four-bit quantizer and the levelsfrom 0 to 15.

Page 34: Signals, Sequences, and Systems

34 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

−1 0 1 2 3 4 5� 10−3

−5

−4

−3

−2

−1

0

1

2

3

4

5

t, seconds

x s(t

)

Figure 1-49: Input to a quantizer.

(c) If quantization error is defined as quantizer input minusquantizer output, sketch the quantization error as afunction of quantizer input voltage.

1.25. Analog-to-digital conversion.

Consider the three-bit rounding quantizer of Figure 1-28 withD = 1 V.

(a) The input to the quantizer is the signal shown inFigure 1-49. Sketch the output xq(t).

(b) Sketch the quantization error e(t) = xs(t) − xq(t) for theinput of part (a).

(c) Comment on the errors you obtained in part (b).

1.26. Analog-to-digital conversion.

This problem uses the notation of Figure 1-28 and Eq. (1.48).A three-bit quantizer of the truncation type is described by

xq(t) =

⎧⎪⎨⎪⎩

3D, 3D < xs(t)

mD, mD ≤ xs(t)

−4D, xs(t) ≤ −3D.

< (m+1), m = −3, −2, . . . , 2

(a) Sketch the input–output characteristic of this quantizer.

(b) Defining the quantization error as e(t) = xs(t) − xq(t),sketch the error as a function of the input xs(t).

(c) Repeat part (b) using the three-bit rounding quantizer ofFigure 1-28.

(d) Which of the quantizers, the rounding quantizer ofFigure 1-28 or the truncating quantizer of part (a) wouldyou prefer to use? Explain.

1.27. Sampling frequency.

(a) The sampling frequency for an unknown analog signalis fs = 1000 smp/s. What is the highest frequencycomponent that can be present in the analog signal if itcan be reconstructed exactly from its samples?

(b) Repeat part (a) for fs = 250 smp/s.

(c) Repeat part (a) for fs = 25k smp/s.

(d) Repeat part (a) for fs = 2M smp/s.

1.28. Sampling frequency.

The following signals are to be sampled at frequencies thatguarantee satisfying the requirements of the sampling theorem.In each case, determine the minimum acceptable samplingfrequency.

(a) 5 cos(2π · 150t + π/3)

(b) 2 sin(500πt − π/4)

(c) 3 cos(20πt) · cos(500πt)

(d) 7 sin(500πt)[1 + 2 cos(30πt)]1.29. Aliasing.

A sinusoidal sequence is given by x[n] = 5 cos(0.3πn + ϕ).

(a) Find equations for two other sequences having the samesample values as x[n].

(b) An analog signal is given by y(t) = 5 cos(2πf0t + ϕ)

where f0 = 300 Hz. Find three sampling frequencies thatyield sequences having the same sample values as x[n].

1.30. Sampling and aliasing.

The sinusoidal signal x(t) = 4 sin(2πf0t) with f0 = 100 Hz issampled with fs = 400 smp/s to obtain the sequence x[n].(a) Are the conditions of the sampling theorem satisfied?

Explain.

(b) Find three sequences all having the same sample valuesas x[n].

(c) Sketch the magnitude frequency spectrum, includingaliases, of the sequence x[n].

1.31. Frequency spectra.

Let fsmin denote the minimum sampling frequency to satisfy thesampling theorem. For each of the signals of Problem 1.28, usea sampling frequency fs = 2 × fsmin .

(a) Determine the resulting sequences

(b) Sketch the frequency spectra magnitudes in the interval−π ≤ ω̂ < π .

Page 35: Signals, Sequences, and Systems

PROBLEMS 35

1.32. Frequency spectra and sampling frequency.

Let fsmin denote the minimum sampling frequency to satisfy thesampling theorem.

(a) For the signal of part (a) of Problem 1.28, sketchthe frequency spectrum magnitudes for the sequencesobtained when

(i) fs = 2fsmin

(ii) fs = 3fsmin

(iii) fs = 4fsmin

(b) On the sketches from part (a), show the aliases closest tothe range −π ≤ ω̂ < π .

(c) What do you notice about the aliases shown in part (b)?

1.33. Frequency spectra and sampling frequency.

Repeat Problem 1.32 for the signal of Problem 1.28, part (b).

Exploration Problems

1.34. Frequency spectra and sampling frequency.

Repeat Problem 1.32 for the signal of Problem 1.28, part (c).

1.35. Frequency spectra and sampling frequency.

Repeat Problem 1.32 for the signal of Problem 1.28, part (d).

1.36. Aliases in discrete-time and continuous-time domains

In Eq. (1.41), we found that the sinusoidal sequences havingthe same values are related to one another by

cos(n[ω̂0 + �2π ]) = cos(nω̂0)

where n and � are integers and � = ±1, ±2, ±3, . . .. We alsoknow from Eq. (1.52) that

ω̂0 = ω0T = ω0/fs = 2πf0T = 2πf0/fs.

We now ask ourselves what analog sinusoidal frequencies whensampled with a sampling frequency fs will give the samplescos(n[ω̂0 + �2π ])? These frequencies are the aliases of f0.Clearly, there will be several such sinusoids, so we denote theiranalog frequencies by f�, where each frequency corresponds toa value of the integer �.

(a) Show that the relationship between f0 and f� is f� =±(f0 + �fs), � = ±1, ±2, ±3, . . ..

(b) Write the expressions for f� in terms of f0 and fs for� = ±1, ±2, and ±3.

(c) On a magnitude spectrum sketch, show the frequencycomponents that are aliases of one another assuming thatfs = 200 smp/s and f0 = 50 Hz.

(d) Compare the results of part (c) with those of Figure 1-34.

Visualization Problems

In each of the following four problems, we assume theconfiguration in Figure 1-36. That is, we assume idealcontinuous-time to discrete-time conversion followed byideal discrete-time to continuous-time conversion. It isrecommended that all four problems be solved.

1.37. Reconstruction of analog signals.

Equation (1.41), cos(n[ω̂0 + �2π ]) = cos(nω̂0) with n and �

integers, demonstrates that there are many sequences having thesame sample values as the sequence cos(nω̂0). In Problem 1.36,it was shown that the sinusoidal analog frequencies f� that yieldthe sample values cos(n[ω̂0+�2π ]) are given by f� = f0+�fs ,� = ±1, ±2, ±3, . . .. The quantity f0 is the analog frequencyof a sinusoidal signal that when sampled with samplingfrequency fs gives the sequence cos(nω̂0). We also know thatthe reconstruction process described in Section 1.5 selects thedigital frequencies in the interval 0 ≤ ω̂0 < π and that thesefrequencies correspond to the analog frequencies in the range0 ≤ f0 < fs/2. Thus, for reconstruction purposes, we areinterested in the values of f� for � having the negative values,because clearly f1 = f0 +fs , f2 = f0 +2fs , . . . all lie outsidethe reconstruction interval corresponding to 0 ≤ f0 < fs/2.

(a) Evaluate |f0 + �fs | for � = 0, −1, −2, −3. The samplingfrequency is fs = 30 smp/s and the analog sinusoidalinput signal to be sampled has frequency f0 that variesfrom 0 Hz to 90 Hz in steps of 3 Hz. Use the valuesobtained to complete Table 1-5.

Table 1-5:

f0, Hz |f0| |f0 − fs | |f0 − 2fs | |f0 − 3fs |

0

3

...

90

It is recommended that you write a spreadsheet or anm-file to generate the entries for the table.

Page 36: Signals, Sequences, and Systems

36 CHAPTER 1 SIGNALS, SEQUENCES, AND SYSTEMS

Table 1-6:

f0 |f0 − fs | |f0 − 2fs | |f0 − 3fs |

0. · fs

0.1 · fs

...

30 · fs

(b) Explain why you were asked to use absolute values forthe four rightmost columns.

(c) From the table obtained in part (a), determine thereconstructed (or apparent) analog frequencies that wouldbe determined for each value of f0.

(d) Use the Sampler VI to verify the results of part (c) for therange 0.0 ≤ f0 ≤ 25 Hz.

(e) Plot the reconstructed frequency values from part (c) as afunction of the input frequency f0.

( f ) Repeat parts (a), (c), and (e) using literal quantities, (i.e.,using f0 for the analog sinusoidal input frequency and fs

for the sampling frequency). Complete Table 1-6.Hint: All of the table entries will be expressed in terms offs .

1.38. More reconstruction of analog signals.

An analog sinusoidal input signal of frequency 20 Hz is sampledat the following sampling frequencies:

(a) fs = 100 smp/s

(b) fs = 60 smp/s

(c) fs = 42 smp/s

(d) fs = 30 smp/s

(e) fs = 15 smp/s.

Use the Sampler VI to determine the frequencies of thereconstructed output signal and plot it as a function of fs/f0.

1.39. Still more reconstruction of analog signals.

The analog signal

x(t) = cos(2πf1t) + 0.5 cos(2πf2t) + 0.2 cos(2πf3t),

where f1 = 4 Hz, f2 = 7 Hz, and f3 = 12 Hz is sampled at thefollowing frequencies:

(a) fs = 100 smp/s

(b) fs = 80 smp/s

(c) fs = 25 smp/s

(d) fs = 15 smp/s

(e) fs = 10 smp/s

( f ) fs = 7 smp/s.

Use the Sampler VI to determine the reconstructed outputfrequencies in each case.

1.40. Alias exploration.

The input signal to an ideal continuous-time-to-discrete-timeconversion device is

x(t) = sin(20πt + π/12),

and y(t) is the reconstructed output of an ideal discrete-time-to-continuous-time conversion device.

(a) Predict and tabulate the frequencies that will appear iny(t) as the sampling frequency, fs , is decreased from itsstarting value of 30.0 smp/s in steps of 1.0 smp/s to a finalvalue of 1.0 smp/s.

(b) Run the Sampler VI using the given input signal and thesampling specifications from part (a).

(c) Compare your results from parts (a) and (b) and resolveany differences you find.

1.41. Design your own.

In learning new problem-solving techniques, it is often helpfulto formulate a hypothesis, design an experiment to test thehypothesis, conduct the experiment, evaluate the experimentalresults, and determine if the results support the hypothesis.13 Ifthe results do not support the hypothesis, an iterative approach isused in which the hypothesis and/or the experiment is modifiedand the sequence of steps is repeated. This is an example ofthe scientific method. The kind of "experiments" in this contextexemplify what is called a thought experiment (in the Germanlanguage gedankenexperiment), because we are not actually ina laboratory with equipment and measuring devices but insteaduse numerical techniques with the aid of VIs to investigate.

Develop a thought experiment that can be investigated usingthe Sampler VI. Decide on a question you want to explore,formulate a hypothesis, design and conduct the experiment withthe VI, and state your conclusions. If necessary, modify yourhypothesis and the experiment and repeat the process.

13This approach is also useful when learning to use a new software statementor package.

Page 37: Signals, Sequences, and Systems

BIBLIOGRAPHY 37

Bibliography

[1] McClellan, James H., Ronald W. Schafer, and Mark A.Yoder, Signal Processing First, 2nd ed., Pearson PrenticeHall, Upper Saddle River, N.J., 2003. Chapter 4 is devotedto sampling and aliasing and gives a treatment based onfirst principles that provides insight on these topics.

[2] Porat, Boaz, A Course in Digital Signal Processing, JohnWiley & Sons, Inc., New York, 1997. Chapter 1 providesa good discussion of the advantages and disadvantagesof discrete-time systems along with an overview ofapplication areas.

[3] Gabel, Robert A. and Richard A. Roberts, Signals andLinear Systems, 3rd ed., John Wiley and Sons, New York,1987. Chapter 1 includes a discussion of classification ofsystems, linearity, and models of discrete-time systems.

[4] Oppenheim, Alan V. and Ronald W. Schafer, Discrete-Time Signal Processing, 3rd ed., Prentice Hall, Inc.,Englewood Cliffs, N.J., 2010. This book is a new versionof the landmark work Digital Signal Processing thatwas published by the same authors in 1975. AlthoughDiscrete-Time Signal Processing is used primarilyin senior/graduate-level courses, the discussion onquantization illuminates some practical aspects of digitalprocessing of signals that are of interest when studyinglinear systems at an introductory level.

[5] Peled, Abraham, Bede Liu, Digital Signal Processing,Theory, Design and Implementation, John Wiley & Sons,New York, 1976. Chapter 1 includes a discussion of thebasic principles and characteristics of analog-to-digital(A/D) and digital-to-analog (D/A) conversions. Chapter 4is devoted to the hardware implementation of digital signalprocessors. The first two sections of this chapter review thebasics of binary arithmetic and digital hardware.

[6] Soliman, Samir S., and Mandyam D. Srinath, Continuousand Discrete Signals and Systems, Prentice-Hall, Inc.,Englewood Cliffs, N.J., 1990. Discrete-time sequences aredescribed in Chapter 6.