Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital...

10

Click here to load reader

Transcript of Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital...

Page 1: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Digital Signal ProcessingLecture # 2

Discrete-Time Signals and Systems

Monson H. [email protected]

x(n) =∞∑

k=−∞

x(k)δ(n − k)

This material is the property of the author and is for the sole and exclusive use of his students. It is not for publication,nor is it to be sold, reproduced, or generally distributed.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 1 / 37

What is Digital Signal Processing?

First, let’s ask ourselves: What is a signal?

In the fields of communications, signal processing, and in electricalengineering more generally, a signal is any time-varying orspatial-varying quantity.

I Current, voltage, acoustic waveform, light intensity across the focalplane of a camera, ...

In the physical world, any quantity measurable through time or overspace can be taken as a signal.

I Temperature distribution over an area or a volume or as a function oftime, wide velocity, rainfall, ...

Within a complex society, any set of human information or machinedata can be taken as a signal.

I Stock market prices, number of bytes transmitted across a channelversus time, human population as a function of time, ...

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 2 / 37

What is a Digital Signal?

A signal that is a function of a discrete variable, such as x(n) or z(k),is a discrete-time signal

When a discrete-time signal is quantized in amplitude,xq(n) = Q{x(n)} then we have a digital signal.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 3 / 37

What is Digital Signal Processing?

Digital Signal Processing

DSP is concerned with the representation of signals as sequences ofnumbers and with methods of processing those numbers to achieve somedesired goal.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 4 / 37

Page 2: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Examples of Processing Tasks

Information extraction1 Trends in data (forcasting and control)2 Target detection (radar and sonar)3 Single speaker in a crowd (surveillance)

Signal restoration and enhancement1 Deconvolution (deblurring, channel equalization)2 Noise reduction (CD’s?)

Signal representation1 Signal modeling (speech synthesis)2 Signal coding (Transmission and storage)3 Signal restoration, Spectral analysis

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 5 / 37

Digital Signal Processing Applications

General-Purpose DSP Graphics/Imaging Instrumentation

Digital filtering 3-D rotation Spectrum AnalysisConvolution Robot vision Function generationCorrelation Image transmission Pattern matchingHilbert transforms Image compression Seismic processingFast Fourier transforms Pattern recognition Transient analysisAdaptive filtering Image enhancement Digital filteringWindowing Homomorphic processing Phase-locked loopsWaveform generation Workstations

Voice/Speech Control Military

Voice mail Disk control Secure communicationsSpeech vocoding Servo control Radar processingSpeech recognition Robot control Sonar processingSpeaker verification Engine control Image processingSpeech enhancement Laser printer control NavigationSpeech synthesis Motor control Missile guidanceText to speech Radio frequency modems

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 6 / 37

Digital Signal Processing Applications

Telecommunications Automotive

Echo cancellation FAX Engine controlADPCM transcoders Cellular telephone Vibration analysisDigital PBX’s Speaker phones Antiskid brakesLine repeaters Digital speech interpolation Adaptive ride controlChannel multiplexing X.25 packet switching Global positioning1200 to 19200 bps modems Video conferencing NavigationAdaptive equalizers Spread spectrum Voice commandsDTMF encoding/decoding Workstations Digital radioData encryption Cellular telephones

Consumer Industrial Medical

Radar detectors Robotics Hearing aidsPower tools Numeric control Patient monitoringDigital audio/tv Security access Ultrasound equipmentMusic synthesizer Power line monitors Diagnostic toolsEducational toys Prosthetics

Fetal monitorsM.Hayes (CAU-GT) Lecture # 2 September 1, 2011 7 / 37

Objectives

Our approach, for the most part, concerns the description, analysis,and design of digital systems.

-x(n) Digital

System-y(n)

We will look at1 Types of digital systems.

F Characterizations and properties

2 Analysis of digital systems.F Finding responses to given inputs

3 Design of digital systems.F Algorithms, filters, computer programs

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 8 / 37

Page 3: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Digital Signal Processing Systems

-x(n) Digital

System-y(n)

Why Digital Signal Processing?

1 High precision, repeatability2 Design may be simulated in software3 Easy to modify an algorithm or system design4 Many operations difficult to implement in analog form are

straightforward using digital techniques

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 9 / 37

Discrete-Time Signals

A discrete-time signal is an indexed set of real or complex numbers:

x = {x(n)} −∞ < n <∞

I x(n) is the nth sample of the sequenceI x(n) is not defined for n not an integer.

-

6s s ss s s s s s

ss s s s s

s sq q q q q qx(n)

n

Sequences may be thought of as numbers stored in a computer arrayor as a list of numbers in a table.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 10 / 37

Discrete-Time Signals (cont)

Where do these signals come from?

I Sampling a continuous-time signal (speech, image, audio, radar, sonar,. . .)

-

xa(t)

A/D -

x(n) = xa(nTs)

I Signals may be inherently discrete-time1 Amortization (signal is monthly debt)2 Population3 Inventory4 Stock prices

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 11 / 37

Discrete-Time Signals

Impulse sequence

δ(n) =

{1 n = 00 n 6= 0

Unit step response

u(n) =

{0 n < 01 n ≥ 0

Exponential sequencex(n) = αn

Complex sinusoidal sequencex(n) = e jω0n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 12 / 37

Page 4: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Discrete-Time Systems

-

x(n)Discrete-

TimeSystem

-

y(n) = T{x(n)}

Numerical algorithm for transforming an input sequence into anoutput sequence.

Delay y(n) = x(n − nd)

Modulator y(n) = x(n) cos(nω0)

Squarer y(n) = [x(n)]2

Compressor y(n) = x(Mn) (also called a downsampler).

Smoother y(n) = 13{x(n) + x(n − 1) + x(n + 1)}

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 13 / 37

Basic Signal Manipulations

Summation: y(n) = x1(n) + x2(n)

-x1(n)

-y(n)

6

x2(n)

v

I Pointwise addition of signals

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 14 / 37

Basic Signal Manipulations (cont.)

Multiplication: y(n) = x1(n)x2(n)

-x1(n)

-y(n)

6

x2(n)

×m

I Pointwise multiplication of signals

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 15 / 37

Basic Signal Manipulations (cont.)

Delay: y(n) = x(n − n0)

-x(n) z−n0 x(n − n0)

I Time shift of the sequence

-

6

s ss s s s s s

s s s

x(n)

n-

6

s s s ss s s s s s

s

x(n − 2)

n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 16 / 37

Page 5: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Basic Signal Manipulations (cont.)

Shift and time reversal: y(n) = x(n0 − n)

I Basic operation in convolution

-

6

s s s s s s s ss s s

x(n)

n-

6

s s s ss s s s s s s

x(7− n)

n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 17 / 37

Signal Decomposition

An arbitrary signal may always be decomposed into a summation ofweighted and delayed unit samples.

-

6

c c c c c c c c c c c c c c c cq q q q q qx(n)

n

cx(0)

x(n) = x(0)δ(n)+x(1)δ(n − 1) + x(2)δ(n − 2) · · ·

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 18 / 37

Signal Decomposition

An arbitrary signal may always be decomposed into a summation ofweighted and delayed unit samples.

-

6

c c c c c c c c c c c c c c cq q q q q qx(n)

n

c cx(1)

x(n) = x(0)δ(n) + x(1)δ(n − 1)+x(2)δ(n − 2) · · ·

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 19 / 37

Signal Decomposition

An arbitrary signal may always be decomposed into a summation ofweighted and delayed unit samples.

-

6

c c c c c c c c c c c c c cq q q q q qx(n)

n

c ccx(2)

x(n) = x(0)δ(n) + x(1)δ(n − 1) + x(2)δ(n − 2)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 20 / 37

Page 6: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Signal Decomposition

An arbitrary signal may always be decomposed into a summation ofweighted and delayed unit samples.

-

6

c cc

c c c c cc

cc c c c

cc cq q q q q q

x(n)

n

c c

x(n) =∞∑

k=−∞x(k)δ(n − k)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 21 / 37

Discrete-Time Systems

Discrete-time systems transform one sequence, the input, intoanother, the output.

-x(n)

T -y(n)

y(n) = T [x(n)]

Generally, we would like to be able to

1 Take a given system and evaluate the response to a given input or todetermine the input that will yield a desired response.

2 Design a system to have given input/output characteristics.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 22 / 37

Types of System Specifications

Input/Output table (catalog)

x1(n) −→ y1(n)

x2(n) −→ y2(n)

x3(n) −→ y3(n)...

Mathematical rule

(a) y(n) = [x(n)]2

(b) y(n) = 12y(n − 1) + x(n) + x(n − 1)

System properties and some input/output pairs1 T [δ(n − k)] = nu(n − k)2 Linearity

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 23 / 37

Difference Equations

An important class of LSI systems are those for which the input andoutput satisfy a linear constant coefficient difference equation:

I General Nth-order LCCDE:

N∑k=0

a(k)y(n − k) =M∑k=0

b(k)x(n − k)

The constants a(k) and b(k) specify the system.

The output may be computed recursively (assuming a(0) = 1) asfollows

y(n) =M∑k=0

b(k)x(n − k)−N∑

k=1

a(k)y(n − k)

LCCDE’s are the discrete-time counterpart of linear constantcoefficient differential equations for continuous-time systems.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 24 / 37

Page 7: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Some Simple Systems

-x(n)

System -y(n)

Differentiator (First Backward Difference):

y(n) = x(n)− x(n − 1)

-

6

s ss s s s s s

s s s

x(n)

n-

6

s ss

s s s s ss

s s

y(n)

n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 25 / 37

Some Simple Systems (cont.)

Smoother (3-point running average):

y(n) = 13 {x(n) + x(n − 1) + x(n + 1)}

-

6

s ss s s s s s

s s s

x(n)

n-

6

s s s s s s s s s s s

y(n)

n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 26 / 37

Some Simple Systems (cont.)

Modulator:y(n) = x(n) cos(nω0)

-

6

s ss s s s s s

s s s

x(n)

n-

6

s ss s

ss s s

s s s

y(n)

n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 27 / 37

Some Simple Systems (cont.)

Savings account:

y(n) = y(n − 1) + αy(n − 1) + x(n)

I y(n) = account balance at end of nth day.I x(n) = deposit made on the nth day.I α = 1

365p

100 = interest rate.

-

6

s s s s s s s s s s s

x(n)

n-

6

s s s s s s s s s s sy(n)

n

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 28 / 37

Page 8: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

System Properties

-x(n)

T -y(n) = T [x(n)]

Linear System: A system is linear if

T [ax1(n) + bx2(n)] = ay1(n) + by2(n)

for any complex numbers a and b and for any signals x1(n) and x2(n).

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 29 / 37

Examples

Linear Nonlinear

1. y(n) = 3x(n) 1. y(n) = x2(n)

2. y(n) = nx(n) 2. y(n) = ax(n) + b

3. y(n) = x(n) + x(−n) 3. y(n) = log x(n)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 30 / 37

Example

If a linear system is characterized by the following input/output pairs

T [δ(n)] = u(n)

T [δ(n − 1)] = 2u(n − 1)

T [δ(n − 2)] = 3u(n − 2)...

T [δ(n − n0)] = (n0 + 1)u(n − n0)

then the response to x(n) = δ(n) + δ(n − 1)− δ(n − 2) is

y(n) = u(n) + 2u(n − 1)− 3u(n − 2) = δ(n) + 3δ(n − 1)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 31 / 37

System Properties (cont.)

Shift-Invariance: A system is shift-invariant if a shift in the inputresults in a shift in the output

T [x(n − n0)] = y(n − n0)

for any integer n0 and for any signal x(n).

Interpretation: The system does not change in time.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 32 / 37

Page 9: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Examples

Shift-Invariant Shift-Varying

1. y(n) = x(n) + x(n − 1) 1. y(n) = nx(n)

2. y(n) = x2(n) 2. y(n) = x(−n)

3. y(n) = log x(n) 3. y(n) = x(n) cos nω0

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 33 / 37

System Properties (cont.)

Stability (BIBO): A system is said to be stable if any bounded inputproduces a bounded output.

|x(n)| < M <∞ =⇒ |y(n)| < N <∞

Stable Unstable

1. y(n) = x2(n) 1. Savings account

2. y(n) = x(n)− x(n − 1) 2. y(n) = nx(n)

3. y(n) = ex(n) 3. y(n) =∑n

k=0 x(k)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 34 / 37

System Properties (cont.)

Causality: A system is said to be causal if for any input x(n) and forany n0 the output y(n0) depends only on values of x(n) for n ≤ n0.

Interpretation: The system cannot respond prior to a stimulus.

Causal Noncausal

1. y(n) = x2(n) 1. y(n) = x(−n)

2. y(n) = x(n) + x(n − 1) 2. y(n) = x(n) + x(n + 1)

3. savings account 3. y(n) =∑n

k=0 x(k)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 35 / 37

System Properties (cont.)

Invertibility: A system is said to be invertible if distinct inputsproduce distinct outputs, i.e., with

y1(n) = T [x1(n)]

y2(n) = T [x2(n)]

thenx1(n) 6= x2(n) =⇒ y1(n) 6= y2(n)

For invertible systems: The input is uniquely determined by theoutput. This is important in the deconvolution problem.

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 36 / 37

Page 10: Digital Signal Processing Lecture # 2 Discrete-Time ...hayes/courses/dsp/lectures/lect02.pdfDigital Signal Processing Systems x( n)-Digital System y(n)- Why Digital Signal Processing?

Examples

Invertible Noninvertible

1. y(n) = 2x(n) 1. y(n) = x2(n)

2. y(n) =∑n

k=−∞ x(k) 2. y(n) = nx(n)

3. y(n) = x(−n) 3. y(n) = x(n)− x(n − 1)

M.Hayes (CAU-GT) Lecture # 2 September 1, 2011 37 / 37