Chapter 1-10 Notes on DSP, Study notes for Digital Signal Processing
Wedat
Wedat

Chapter 1-10 Notes on DSP, Study notes for Digital Signal Processing

19 pages
36Number of visits
Description
ECE 2026 Digital Signal Processing Notes
20 points
Download points needed to download
this document
Download the document
Preview3 pages / 19
This is only a preview
3 shown on 19 pages
This is only a preview
3 shown on 19 pages
This is only a preview
3 shown on 19 pages
This is only a preview
3 shown on 19 pages
EE-2200 Fall-98

1

ECE-2026 Spring-2018

Lecture 9

Sampling & Aliasing

12-Feb-2018

2/4/2018 ECE2026, Spring 2018 2

General Info

 ITS Questions: ITS #2 due today  Full credit with 2400 points per ITS session

 Lab #04: start this Week: Spectrogram, AM, FM  Lab #05 next week: Fourier Series

 HW #04 due this Week

 Quiz #1 score adjustment: before 2/23 (Friday)

 #1: Dr. Fekri (faramarz.fekri@ece.gatech. edu)

 #2: Dr. Yang (Benjamin.Yang@gtri.gatech.edu)

 #3: Dr. Marenco (Alvaro.Marenco@gtri.gatech.edu)

2

2/4/2018 3

Preliminary Quiz #1 Summary

Mean: 57.9

Median: 56

StdDev: 19.5

 An example summary from spring 2017

ECE2026, Spring 2018

Overlapping Sections in

Spectrograms (Labs 4 & 5)

 50% overlap is common

 Consider edge effects when analyzing a short sinusoid

2/4/2018 ECE2026, Spring 2018 4

SECTION

LOCATIONS

MIDDLE of SECTION

is REFERENCE TIME

3

2/4/2018 ECE2026, Spring 2018 5

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

2/4/2018 ECE2026, Spring 2018 6

LECTURE OBJECTIVES

 SAMPLING can cause ALIASING

Sampling Theorem

 Sampling Rate > 2*(highest frequency term)

 Spectrum for digital signals, x[n]

 Normalized Frequency

 

 2 2

ˆ  s

s f

f T

ALIASING

4

2/4/2018 ECE2026, Spring 2018 7

SYSTEMS Process Signals

 PROCESSING GOALS:

 Change x(t) into y(t)

 For example, more BASS, pitch shifting

 Improve x(t), e.g., image deblurring

 Extract Information from x(t)

SYSTEM x(t) y(t)

2/4/2018 ECE2026, Spring 2018 8

System IMPLEMENTATION

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

ELECTRONICS x(t) y(t)

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

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

5

2/4/2018 ECE2026, Spring 2018 9

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)

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

2/4/2018 ECE2026, Spring 2018 10

SAMPLING RATE, f s

 SAMPLING RATE (fs)

fs =1/Ts : in MATLAB - tt=0:1/8000:5.0  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)

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

6

2/4/2018 ECE2026, Spring 2018 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

Be careful…

2/4/2018 ECE2026, Spring 2018 12

7

2/4/2018 ECE2026, Spring 2018 13

fs  2 kHz

fs  500Hz

Hz100f

Which one provides most accurate representation of x(t)?

2/4/2018 ECE2026, Spring 2018 14

SAMPLING THEOREM

 HOW OFTEN DO WE NEED TO SAMPLE?

 DEPENDS on FREQUENCY of SINUSOID

 ANSWERED by SHANNON/NYQUIST Theorem

 ALSO DEPENDS on “RECONSTRUCTION

8

2/4/2018 ECE2026, Spring 2018 15

Reconstruction? Which One?

)4.0cos(][ nnx 



When n is an integer

cos(0.4n)  cos(2.4n)

Given the samples, draw a sinusoid through the values

Occam’s razor -> pick lowest frequency sinusoid

2/4/2018 ECE2026, Spring 2018 16

Spatial Aliasing (Lab6)

9

2/4/2018 ECE2026, Spring 2018 17

Spatial Aliasing (Ex: Your Own

Choice for Lab6 Report)

2/4/2018 ECE2026, Spring 2018 18

sfs T

nAnx 







ˆ

)ˆcos(][

)cos()(][

)cos()(









ss nTAnTxnx

tAtx

DISCRETE-TIME SINUSOID

 Change x(t) into x[n] DERIVATION

))cos((][   nTAnx s

DEFINE DIGITAL FREQUENCY

10

2/4/2018 ECE2026, Spring 2018 19

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



ˆ Ts  2f

fs



ˆ 

̂

2/4/2018 ECE2026, Spring 2018 20

SPECTRUM (DIGITAL)

sf

f  2ˆ 

kHz1sf ˆ 

1 2 X

1 2 X

*

2(0.1)–0.2

))1000/)(100(2cos(][   nAnx

11

2/4/2018 ECE2026, Spring 2018 21

SPECTRUM (DIGITAL) ???



ˆ 

1 2 X

1 2 X

*

2(1)–2

?

x[n] is zero frequency???

))100/)(100(2cos(][   nAnx

sf

f  2ˆ 



fs 100 Hz

2/4/2018 ECE2026, Spring 2018 22

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

( ) ( )( )  nAnA 2ˆcosˆcos

12

2/4/2018 ECE2026, Spring 2018 23

ALIASING DERIVATION

 Other Frequencies give the same

s

s f

f T

 

2 ˆ  2



ˆ 

s

s

ss

s

f

f

f

f

f

ff   

22)(2 ˆ :then 

 



and we want : x[n] Acos( ˆ n)

))(2cos()( If   tffAtx s



tn

fs

2/4/2018 ECE2026, Spring 2018 24

ALIASING DERIVATION

 Other Frequencies give the same

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  



ˆ 

13

2/4/2018 ECE2026, Spring 2018 25

ALIASING CONCLUSIONS

 Adding an INTEGER multiple of fs or –fs to

the frequency of a continuous sinusoid xc(t)

gives exactly the same values for the

sampled signal x[n] = xc(n/fs )

GIVEN x[n], we CAN’T KNOW whether it came

from a sinusoid at fo or (fo + fs ) or (fo + 2fs ) …

This is called ALIASING

2/4/2018 ECE2026, Spring 2018 26

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

14

2/4/2018 ECE2026, Spring 2018 27

SPECTRUM (MORE LINES)

ˆ 

1 2 X

1 2 X

*

2(0.1)–0.2

1 2 X

*

1.8

1 2 X

–1.8

))1000/)(100(2cos(][   nAnx

kHz1sf

sf

f  2ˆ 

2/4/2018 ECE2026, Spring 2018 28

SPECTRUM (ALIASING CASE)

1 2 X

*

–0.5

1 2 X

–1.5

1 2 X

0.52.5–2.5 ˆ 

1 2 X

1 2 X

* 1 2 X

*

1.5

))80/)(100(2cos(][   nAnx

kHz80sf

sf

f  2ˆ 

15

2/4/2018 ECE2026, Spring 2018 29

SAMPLING GUI (con2dis, Lab6)

2/4/2018 ECE2026, Spring 2018 30

SPECTRUM (FOLDING CASE)

ˆ  2 f

fs

fs  125Hz

1 2 X

*

0.4

1 2 X

–0.41.6–1.6 ˆ 

1 2 X

1 2 X

*

))125/)(100(2cos(][   nAnx

16

2/4/2018 ECE2026, Spring 2018 31

FOLDING DIAGRAM

EXAMPLE:

y(t) has 1500 Hz component

SAMPLING FREQ = 2000 Hz

WHAT is the “FOLDED” ALIAS ?

1500 1000 500  

2/4/2018 ECE2026, Spring 2018 32

Aliasing Demo with Chirp (Lab5)

fs=8000 Hz

tt=0:1/8000:4;

xx=cos(2*pi*1000*tt.*(1+tt));

plotspec(xx+j*1e-9,8000)

grid on, shg

soundsc(xx,8000)

17

2/4/2018 ECE2026, Spring 2018 33

SAMPLING DEMO (Chap. 4)

2/4/2018 ECE2026, Spring 2018 34

ALIASING DERIVATION

 Other Frequencies give the same ˆ 

and we substitute: tnf s

If x(t)  Acos(2( f  l fs)t )

then: x[n] Acos(2( f  l fs)

n fs  )

or, x[n] Acos(2

f

fs n 2l n)

18

2/4/2018 ECE2026, Spring 2018 35

ALIASING DERIVATION–2

 Other Frequencies give the same

ˆ  Ts  2f

fs 2l

ˆ 

then : ˆ  

2( f  l fs)

fs

2 f

fs

2 l fs fs

and we want : x[n] Acos( ˆ n  )

If x(t)  Acos(2( f  l fs)t ) t n

fs

2/4/2018 ECE2026, Spring 2018 36

FOLDING DERIVATION

 Negative Freqs can give the same

x(t)  Acos(2( f  l fs)t  ) ˆ 

SAME DIGITAL SIGNAL x[n] Acos( ˆ n ) x[n] Acos((2 fTs)n 2l n  ) x[n] Acos((2 fTs)n  (2l fsTs)n ) x[n] x(nTs)  Acos(2( f  l fs)nTs  )

19

2/4/2018 ECE2026, Spring 2018 37

FOLDING (a type of ALIASING)

 MANY x(t) give IDENTICAL x[n]

 CAN’T TELL fo FROM (fs-fo)

 Or, (2fs-fo ) or, (3fs-fo )

 EXAMPLE:

 y(t) has 1000 Hz component

 SAMPLING FREQ = 1500 Hz

 WHAT is the “FOLDED” ALIAS ?

1000 1500 500

2/4/2018 ECE2026, Spring 2018 38

DIGITAL FREQ AGAIN

ˆ  Ts  2f

fs 2l

ˆ Ts   2f

fs 2l FOLDED ALIAS

ˆ 

ALIASING

no comments were posted
This is only a preview
3 shown on 19 pages