Docsity

ECE-2026 Lecture 9: Sampling & Aliasing, Study notes of Digital Signal Processing

Toggle sidebar
bg1
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 ([email protected]. edu)
#2: Dr. Yang ([email protected])
#3: Dr. Marenco ([email protected])
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download ECE-2026 Lecture 9: Sampling & Aliasing and more Study notes Digital Signal Processing in PDF only on Docsity!

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 ([email protected]. edu)  #2: Dr. Yang ([email protected])  #3: Dr. Marenco ([email protected])

2/4/2018 3

Preliminary Quiz #1 Summary

Mean: 57. Median: 56 StdDev: 19.

 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

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)

x(t) (^) SYSTEM y(t)

2/4/2018 ECE2026, Spring 2018 8

System IMPLEMENTATION

 DIGITAL/MICROPROCESSOR

 Convert x(t) to numbers stored in memory

x(t) (^) ELECTRONICS y(t)

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

 ANALOG/ELECTRONIC:

 Circuits: resistors, capacitors, op-amps

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 = nT s

 IDEAL: x[n] = x(nTs)

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

2/4/2018 ECE2026, Spring 2018 10

SAMPLING RATE, fs

 SAMPLING RATE ( fs )

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

x(t) (^) C-to-D

x[n]=x(nTs)

2/4/2018 ECE2026, Spring 2018 13

fs  2 kHz

fs  500Hz

f  100 Hz

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 ”

2/4/2018 ECE2026, Spring 2018 15

Reconstruction? Which One?

x [ n ]cos( 0. 4  n )

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)

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)

fs

f ˆ^  2 

fs  1 kHz ˆ

12 X * 12 X

- 0.22 (0.1)

x [ n ] A cos( 2 ( 100 )( n / 1000 ) )

2/4/2018 ECE2026, Spring 2018 21

SPECTRUM (DIGITAL) ???



^ ˆ

12 X *^12 X

- 22 (1)

x [ n ] is zero frequency???

x [ n ] A cos( 2 ( 100 )( n / 100 ) )

fs

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 ALIASINGMANY SPECTRAL LINES

 SPECTRUM is PERIODIC with period = 2 

 Because A cos( ˆ n  )  A cos((  ˆ 2 ) n  )

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

2/4/2018 ECE2026, Spring 2018 27

SPECTRUM (MORE LINES)

ˆ

12 X *^12 X

- 0.22 (0.1)

12 X *

1.8

12 X

- 1.8x [ n ] A cos( 2 ( 100 )( n / 1000 ) )

fs  1 kHz

fs

f

ˆ^  2 

2/4/2018 ECE2026, Spring 2018 28

SPECTRUM (ALIASING CASE)

12 X *

- 0.5

12 X

- 1.5

12 X

- 2.5 ^ 0.5 ^ 2.5 ^ ˆ

12 X * 112 X
2 X

1.5

x [ n ] A cos( 2 ( 100 )( n / 80 ) )

fs  80 kHz

fs

ˆ  2  f

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(2pi1000tt.(1+tt)); plotspec(xx+j1e grid on, shg -9,8000) soundsc(xx,8000)*

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: t  (^) fn (^) s

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

then: x [ n ]  A cos(2  ( f  l fs ) nfs  )

or, x [ n ]  A cos(2 

f

fs n^ ^2 ^ l^ n^ ^ )

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