Top Banner
06/11/22 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing
25

8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

Dec 25, 2015

Download

Documents

Milo Joseph
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 1

Signal Processing First

Lecture 8Sampling & Aliasing

Page 2: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 2

READING ASSIGNMENTS

This Lecture: Chap 4, Sections 4-1 and 4-2

Replaces Ch 4 in DSP First, pp. 83-94

Other Reading: Recitation: Strobe Demo (Sect 4-3) Next Lecture: Chap. 4 Sects. 4-4 and 4-5

Page 3: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 3

LECTURE OBJECTIVES

SAMPLING can cause ALIASING Nyquist/Shannon Sampling Theorem Sampling Rate (fs) > 2fmax(Signal bandwidth)

Spectrum for digital signals, x[n] Normalized Frequency

22

ˆ s

s f

fT

ALIASING

Page 4: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 4

SYSTEMS Process Signals

PROCESSING GOALS: We need to change x(t) into y(t) for many

engineering applications: For example, more BASS, image deblurring,

denoising, etc

SYSTEMx(t) y(t)

Page 5: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 5

System IMPLEMENTATION

DIGITAL/MICROPROCESSOR Convert x(t) to numbers stored in memory

ELECTRONICSx(t) y(t)

COMPUTER D-to-AA-to-Dx(t) y(t)y[n]x[n]

ANALOG/ELECTRONIC: Circuits: resistors, capacitors, op-amps

Page 6: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 6

SAMPLING x(t)

SAMPLING PROCESS Convert x(t) to numbers x[n] “n” is an integer; x[n] is a sequence of values Think of “n” as the storage address in memory

UNIFORM SAMPLING at t = nTs

IDEAL: x[n] = x(nTs)

A-to-Dx(t) x[n]

Page 7: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 7

SAMPLING RATE, fs

SAMPLING RATE (fs) fs =1/Ts

NUMBER of SAMPLES PER SECOND

Ts = 125 microsec fs = 8000 samples/sec• UNITS ARE HERTZ: 8000 Hz

UNIFORM SAMPLING at t = nTs = n/fs

IDEAL: x[n] = x(nTs)=x(n/fs)

A-to-Dx(t) x[n]=x(nTs)

Page 8: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 8

Hz100f

Page 9: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 9

SAMPLING THEOREM

HOW OFTEN ? DEPENDS on FREQUENCY of SINUSOID ANSWERED by NYQUIST/SHANNON Theorem ALSO DEPENDS on “RECONSTRUCTION”

Page 10: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 10

Reconstruction? Which One?

)4.0cos(][ nnx )4.2cos()4.0cos(

integer an is Whennn

n

Given the samples, draw a sinusoid through the values

Page 11: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 11

STORING DIGITAL SOUND

x[n] is a SAMPLED SINUSOID A list of numbers stored in memory

EXAMPLE: audio CD CD rate is 44,100 samples per second

16-bit samples Stereo uses 2 channels

Number of bytes for 1 minute is 2 X (16/8) X 60 X 44100 = 10.584 Mbytes

Page 12: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 12

sfsT

nAnx

ˆ

)ˆcos(][

)cos()(][)cos()(

ss nTAnTxnxtAtx

DISCRETE-TIME SINUSOID

Change x(t) into x[n] DERIVATION

))cos((][ nTAnx s

DEFINE DIGITAL FREQUENCY

Page 13: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 13

DIGITAL FREQUENCY

VARIES from 0 to 2, as f varies from 0 to the sampling frequency

UNITS are radians, not rad/sec DIGITAL FREQUENCY is NORMALIZED

ss f

fT

Page 14: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 14

SPECTRUM (DIGITAL)

sf

f 2ˆ

kHz1sf 2–2

))1000/)(100(2cos(][ nAnx

Page 15: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 15

SPECTRUM (DIGITAL) ???

2–2

?

x[n] is zero frequency???

))100/)(100(2cos(][ nAnx

Page 16: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 16

The REST of the STORY

Spectrum of x[n] has more than one line for each complex exponential Called ALIASING MANY SPECTRAL LINES

SPECTRUM is PERIODIC with period = 2 Because

Page 17: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 17

ALIASING DERIVATION

Other Frequencies give the sameHz1000at sampled)400cos()(1 sfttx

)4.0cos()400cos(][ 10001 nnx n

Hz1000at sampled)2400cos()(2 sfttx

)4.2cos()2400cos(][ 10002 nnx n

)4.0cos()24.0cos()4.2cos(][2 nnnnnx

][][ 12 nxnx )1000(24002400

Page 18: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 18

ALIASING DERIVATION–2

Other Frequencies give the same

ss f

fT

2ˆ 2

s

s

ss

s

f

f

f

f

f

ff 22)(2ˆ :then

Page 19: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 19

ALIASING CONCLUSIONS

ADDING fs or 2fs or –fs to the FREQ of x(t) gives exactly the same x[n] The samples, x[n] = x(n/ fs ) are EXACTLY

THE SAME VALUES

GIVEN x[n], WE CAN’T DISTINGUISH fo

FROM (fo + fs ) or (fo + 2fs )

Page 20: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 20

NORMALIZED FREQUENCY

DIGITAL FREQUENCY

ss f

fT

2ˆ 2

Page 21: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 21

SPECTRUM for x[n]

PLOT versus NORMALIZED FREQUENCY INCLUDE ALL SPECTRUM LINES

ALIASES ADD MULTIPLES of 2 SUBTRACT MULTIPLES of 2

FOLDED ALIASES (to be discussed later) ALIASES of NEGATIVE FREQS

Page 22: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 22

SPECTRUM (MORE LINES)

2–0.2 1.8–1.8

))1000/)(100(2cos(][ nAnx

kHz1sf

sf

f 2ˆ

Page 23: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 23

SPECTRUM (ALIASING CASE)

–0.5–1.5 0.5 2.5–2.5 1.5

))80/)(100(2cos(][ nAnx

sf

f 2ˆ

Page 24: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 24

SAMPLING GUI (con2dis)

Page 25: 8/27/2015 © 2003, JH McClellan & RW Schafer 1 Signal Processing First Lecture 8 Sampling & Aliasing.

04/19/23 © 2003, JH McClellan & RW Schafer 25

SPECTRUM (FOLDING CASE)

0.4–0.4 1.6–1.6

))125/)(100(2cos(][ nAnx