spfirst-l08 ev0

26
Copyright © Monash University 2009 Signal Processing First Lecture 8 Sampling and Aliasing 1

Upload: kewancam

Post on 23-Dec-2015

233 views

Category:

Documents


1 download

DESCRIPTION

ece2011 at monash universitysignal processing firstlecture notesif you are studying at monash uni electrical engineering than this will help

TRANSCRIPT

Page 1: SPFirst-L08 EV0

Copyright © Monash University 2009

Signal Processing

First

Lecture 8Sampling 

and Aliasing

1

Page 2: SPFirst-L08 EV0

Copyright © Monash University 2009

READING ASSIGNMENTS

• This Lecture:– Chap 4, Sections 4‐1 and 4‐2

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

2

Page 3: SPFirst-L08 EV0

Copyright © Monash University 2009

LECTURE OBJECTIVES

• SAMPLING can cause ALIASING– Sampling Theorem– Sampling Rate > 2(Highest Frequency)

• Spectrum for digital signals, x[n]– Normalized Frequency

3

22ˆ s

s ffT

ALIASING

Page 4: SPFirst-L08 EV0

Copyright © Monash University 2009

SYSTEMS Process Signals

• SIGNAL PROCESSING GOALS:– Change x(t) into y(t)

• For example, more BASS

– Improve x(t), e.g., image deblurring– Extract Information from x(t)

4

SYSTEMx(t) y(t)

Page 5: SPFirst-L08 EV0

Copyright © Monash University 2009

System IMPLEMENTATION

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

5

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: SPFirst-L08 EV0

Copyright © Monash University 2009

SAMPLING x(t)• SAMPLING PROCESS 

• Continuous to Discrete time• 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)

6

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

Page 7: SPFirst-L08 EV0

Copyright © Monash University 2009

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)

7

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

Page 8: SPFirst-L08 EV0

Copyright © Monash University 2009 8

fs 2 kHz

fs 500Hz

Hz100f

Page 9: SPFirst-L08 EV0

Copyright © Monash University 2009

SAMPLING THEOREM• HOW OFTEN ?

– DEPENDS on FREQUENCY of SINUSOID– ANSWERED by SHANNON/NYQUIST Theorem– ALSO DEPENDS on “RECONSTRUCTION”

9

Page 10: SPFirst-L08 EV0

Copyright © Monash University 2009

Reconstruction? Which One?

10

)4.0cos(][ nnx )4.2cos()4.0cos(integer an is When

nnn

Given the samples, draw a sinusoid through the values

We choose to reconstruct the smallest frequency .

Page 11: SPFirst-L08 EV0

Copyright © Monash University 2009

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

11

Page 12: SPFirst-L08 EV0

Copyright © Monash University 2009

DISCRETE-TIME SINUSOID• Change x(t) into x[n]      DERIVATION

12

sfsTnAnx

ˆ)ˆcos(][

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

ss nTAnTxnxtAtx

))cos((][ nTAnx s

DEFINE DIGITAL FREQUENCY

Page 13: SPFirst-L08 EV0

Copyright © Monash University 2009

DIGITAL FREQUENCY

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

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

13

ss f

fT 2ˆ

Page 14: SPFirst-L08 EV0

Copyright © Monash University 2009

SPECTRUM (DIGITAL)

14

sff 2ˆ

kHz1sf ˆ

12 X1

2 X*

2x 0.1–0.2

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

Page 15: SPFirst-L08 EV0

Copyright © Monash University 2009

SPECTRUM (DIGITAL) ???

15

ˆ 2ffs

fs 100 Hz ˆ

12 X1

2 X*

2x –2

?

x[n] is zero frequency???

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

Page 16: SPFirst-L08 EV0

Copyright © Monash University 2009

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 

• We choose to reconstruct the smallest 

16

A cos( ˆ n ) A cos(( ˆ 2 )n )

0 ≤ ≤ 2π or - π ≤ ≤ π

Page 17: SPFirst-L08 EV0

Copyright © Monash University 2009

ALIASING DERIVATION• Other Frequencies give the same

17

ˆ Hz1000at 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: SPFirst-L08 EV0

Copyright © Monash University 2009

ALIASING DERIVATION–2• Other frequencies give the same

18

ss f

fT 2ˆ 2

ˆ

s

s

ss

s

ff

ff

fff 22)(2ˆ :then

and we want : x[n] Acos( ˆ n )If x (t) A cos( 2( f f s )t ) t

nfs

Page 19: SPFirst-L08 EV0

Copyright © Monash University 2009

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 )

19

Page 20: SPFirst-L08 EV0

Copyright © Monash University 2009

NORMALIZED FREQUENCY• DIGITAL FREQUENCY

20

ss f

fT 2ˆ 2

Page 21: SPFirst-L08 EV0

Copyright © Monash University 2009

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

21

Page 22: SPFirst-L08 EV0

Copyright © Monash University 2009

SPECTRUM (MORE LINES)

22

ˆ

12 X1

2 X*

2–0.2

12 X*

1.8

12 X

–1.8

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

sff 2ˆ

2 - +

Page 23: SPFirst-L08 EV0

Copyright © Monash University 2009

SPECTRUM (Aliasing case fs<2fmax)

23

12 X*

–0.5

12 X

–1.5

12 X

0.5 2.5–2.5

ˆ

12 X1

2 X* 12 X*

1.5

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

Hz80sf

sff 2ˆ

22 1

-

Page 24: SPFirst-L08 EV0

Copyright © Monash University 2009

SAMPLING GUI (con2dis)

24

Page 25: SPFirst-L08 EV0

Copyright © Monash University 2009

SPECTRUM (FOLDING CASE)

25

12 X*

0.4

12 X

–0.4 1.6–1.6

ˆ

12 X1

2 X*

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

sff 2ˆ

2 -

Page 26: SPFirst-L08 EV0

Copyright © Monash University 2009

FOLDING DIAGRAM

26

)2cos()( tfAtx

n

ffAnxs

2cos][

ˆ

Hz2000sf