sampling theorem

92
Sampling Theorem 主主主 主主主

Upload: sema

Post on 12-Feb-2016

291 views

Category:

Documents


5 download

DESCRIPTION

Sampling Theorem. 主講者:虞台文. Content. Periodic Sampling Sampling of Band-Limited Signals Aliasing --- Nyquist rate CFT vs. DFT Reconstruction of Band-limited Signals Discrete-Time Processing of Continuous-Time Signals Continuous-Time Processing of Discrete-Time Signals - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Sampling Theorem

Sampling Theorem

主講者:虞台文

Page 2: Sampling Theorem

Content Periodic Sampling Sampling of Band-Limited Signals Aliasing --- Nyquist rate CFT vs. DFT Reconstruction of Band-limited Signals Discrete-Time Processing of Continuous-Time Signals Continuous-Time Processing of Discrete-Time Signals Changing Sampling Rate Realistic Model for Digital Processing

Page 3: Sampling Theorem

Sampling Theorem

Periodic Sampling

Page 4: Sampling Theorem

Continuous to Discrete-Time Signal Converter

C/D

T

xc(t) x(n)= xc(nT)

Sampling rate

Page 5: Sampling Theorem

C/D SystemConversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

Page 6: Sampling Theorem

Sampling with Periodic Impulse train

t

xc(t)

0 T 2T 3T 4TT2T3T

n

x(n)

0 1 2 3 4123

t

xc(t)

0 2T 4T 8T 10T2T4T8T

n

x(n)

0 2 4 6 8246

Page 7: Sampling Theorem

Sampling with Periodic Impulse train

t

xc(t)

0 T 2T 3T 4TT2T3T

n

x(n)

0 1 2 3 4123

t

xc(t)

0 2T 4T 8T 10T2T4T8T

n

x(n)

0 2 4 6 8246

What condition has to be placed on the sampling rate?

We want to restore xc(t) from x(n).

Page 8: Sampling Theorem

C/D SystemConversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

n

n

nTtts )()(

)()()( tstxtx cs

n

nc nTttx )()(

n

nc nTtnTx )()(

Page 9: Sampling Theorem

C/D SystemConversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

n

n

nTtts )()(

)()()( tstxtx cs

n

nc nTttx )()(

n

nc nTtnTx )()(

)(*)(21)(

jSjXjX cs

2 2( ) ( ), s sk

S j kT T

Page 10: Sampling Theorem

C/D System)(*)(

21)(

jSjXjX cs

Tk

TjS s

ks

2 ,)(2)(

s:Sampling Frequency

kscs k

TjXjX )(2*)(

21)(

Page 11: Sampling Theorem

C/D System

kscs k

TjXjX )(2*)(

21)(

k

sc kjXT

)(*)(1

k

sc kjjXT

)(1

k

scs kjjXT

jX )(1)(

Page 12: Sampling Theorem

Sampling Theorem

Sampling of Band-Limited Signals

Page 13: Sampling Theorem

Band-Limited Signals

Yc(j)

Band-Limited

Band-Unlimited

Xc(j)

NN

1

Page 14: Sampling Theorem

Sampling of Band-Limited Signals

Band-Limited

TkjjX

TjX s

kscs

2 ),(1)(

Xc(j)

NN

1

ss 2s 3s2s3s

S(j)2/T

4s4s 2s 6s2s6s

S(j)2/T

Sampling withHigher Frequency

Sampling withLower Frequency

Page 15: Sampling Theorem

Sampling Theorem

Aliasing ---Nyquist Rate

Page 16: Sampling Theorem

Recoverability

Band-Limited

TkjjX

TjX s

kscs

2 ),(1)(

Xc(j)

NN

1

ss 2s 3s2s3s

S(j)2/T

4s4s 2s 6s2s6s

S(j)2/T

Sampling withHigher Frequency

Sampling withLower Frequency

s > 2N

s < 2N

Page 17: Sampling Theorem

Case 1: s > 2N T

kjjXT

jX sk

scs

2 ),(1)(

Xc(j)

NN

1

ss 2s 3s2s3s

S(j)2/T

1/T

ss 2s 3s2s3s

Xs(j)

Page 18: Sampling Theorem

Case 1: s > 2N T

kjjXT

jX sk

scs

2 ),(1)(

Xc(j)

NN

1

ss 2s 3s2s3s

S(j)2/T

1/T

ss 2s 3s2s3s

Xs(j)

Passing Xs(j) through a low-pass filter with cutoff frequency N < c< s N , the original signal can be recovered.

Xs(j) is a periodic function with period s.

Page 19: Sampling Theorem

Case 2: s < 2N T

kjjXT

jX sk

scs

2 ),(1)(

Xc(j)

NN

1

1/T

2s2s 4s 6s4s6s

S(j)2/T

2s2s 4s 6s4s6s

Xs(j)

Page 20: Sampling Theorem

Case 2: s < 2N T

kjjXT

jX sk

scs

2 ),(1)(

Xc(j)

NN

1

1/T

2s2s 4s 6s4s6s

S(j)2/T

2s2s 4s 6s4s6s

Xs(j)Aliasing

No way to recover the original signal.

Xs(j) is a periodic function with period s.

Page 21: Sampling Theorem

Nequist Rate

Xc(j)

NN

1Band-Limited

Nequist frequency (N) The highest frequency of a band-limited signal

Nequist rate = 2N

Page 22: Sampling Theorem

Nequist Sampling Theorem

Xc(j)

NN

1Band-Limited

s > 2N

s < 2N

Recoverable

Aliasing

Page 23: Sampling Theorem

Sampling Theorem

CFT vs. DFT

Page 24: Sampling Theorem

C/D SystemConversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

k

scs kjjXT

jX )(1)(

n

n

nTtts )()(

)()()( tstxtx cs

n

nc nTttx )()(

n

nc nTtnTx )()(

Page 25: Sampling Theorem

Continuous-Time Fourier Transform

Conversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

n

n

nTtts )()(

)()()( tstxtx cs

n

nc nTttx )()(

n

nc nTtnTx )()(

k

scs kjjXT

jX )(1)(

n

Tnjcs enTXjX )()(

Page 26: Sampling Theorem

CFT vs. DFT

Conversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

n

Tnjcs enTXjX )()(

n

njj enxeX )()(

k

scs kjjXT

jX )(1)(

x(n)

Page 27: Sampling Theorem

CFT vs. DFT

Conversion from impulse train to

discrete-time sequence

xc(t)x(n)= xc(nT)

s(t)xs(t)

n

Tnjcs enTXjX )()(

n

njj enxeX )()(

k

scs kjjXT

jX )(1)(

x(n)

Ts

j jXeX )()(T

js eXjX

)()(

Page 28: Sampling Theorem

CFT vs. DFT

Tsj jXeX )()(

k

scs kjjXT

jX )(1)(

kc

j

Tkj

TjX

TeX )2(1)(

Page 29: Sampling Theorem

CFT vs. DFT

kc

j

Tkj

TjX

TeX )2(1)(

Xs(j)

ss

Ts

21/T

X(ej)

2

1/T

2 44

Xc(j)1

Page 30: Sampling Theorem

CFT vs. DFT

Xs(j)

ss

Ts

21/T

X(ej)

2

1/T

2 44

Xc(j)1Amplitude scaling

&Repeating

Frequency scaling

s2

kc

j

Tkj

TjX

TeX )2(1)(

Page 31: Sampling Theorem

Sampling Theorem

Reconstruction of Band-limited Signals

Page 32: Sampling Theorem

Key Concepts

t

xc(t)

0 T 2T 3T 4TT2T3T

n

x(n)

0 1 2 3 4123

X(ej)

FT

IFT

Xc(j)

/T/T

SamplingC/D

RetrieveOne period

ICFT

CFT

Page 33: Sampling Theorem

TTjXT

eX cTj // 1)(

Interpolation

T

T

tjcc dejXtx

/

/21)(

T

T

tjTj deeTX/

/21

T

T

tj

n

Tnjc deenTxT /

/)(

2

T

T

tjTnj

nc deeTnTx

/

/2)(

T

T

Tntj

nc deTnTx

/

/

)(

2)(

TnTtTnTtnTx

nc /)(

]/)(sin[)(

Page 34: Sampling Theorem

Interpolation

TnTtTnTtnTxtx

ncc /)(

]/)(sin[)()(

x(n) n(t)

)()()( tnxtx nn

c

Page 35: Sampling Theorem

Ideal D/C Reconstruction System

x(n) xs(t) xr(t)Covert from sequence to

impulse train

T

Ideal Reconstruction

FilterHr(j)

T

Page 36: Sampling Theorem

x(n) xs(t) xr(t)Covert from sequence to

impulse train

T

Ideal Reconstruction

FilterHr(j)

T

Ideal D/C Reconstruction System

/T/T

Hr(j)

T

Obtained from sampling xc

(t) using an ideal C/D system.

)()()( nTtnxtxn

s

Page 37: Sampling Theorem

x(n) xs(t) xr(t)Covert from sequence to

impulse train

T

Ideal Reconstruction

FilterHr(j)

T

Ideal D/C Reconstruction System

)()( Tjs eXjX

))(/())(/sin()()(

nTtTnTtTnxtx

nr

)()()( Tjrr eXjHjX

Page 38: Sampling Theorem

Ideal D/C Reconstruction System

x(n) xr(t)D/C

T

))(/())(/sin()()(

nTtTnTtTnxtx

nr

xc(t) C/D

T

In what condition xr(t) = xc(t)?

Page 39: Sampling Theorem

Sampling Theorem

Discrete-Time Processing of Continuous-Time Signals

Page 40: Sampling Theorem

The Model

y(n) yr(t)D/C

T

Discrete-TimeSystem

T

xc(t) C/Dx(n)

Continuous-TimeSystemxc(t) yr(t)

Page 41: Sampling Theorem

The Model

y(n) yr(t)D/C

T

Discrete-TimeSystem

T

xc(t) C/Dx(n)

Continuous-TimeSystemxc(t) yr(t)Heff(j)

H (ej)

Page 42: Sampling Theorem

LTI Discrete-Time Systems

y(n) yr(t)D/C

T

Discrete-TimeSystem

T

xc(t) C/Dx(n)

H (ej)

)( jX c )( jeX )( jeY )( jYr

Hr (j)

kc

j

Tkj

TjX

TeX )2(1)(

)()()( Tjrr eYjHjY )()()( TjTj

r eXeHjH

kc

Tjr T

kjjXT

eHjH )2(1)()(

Page 43: Sampling Theorem

LTI Discrete-Time Systems

y(n) yr(t)D/C

T

Discrete-TimeSystem

T

xc(t) C/Dx(n)

H (ej)

)( jX c )( jeX )( jeY )( jYr

Hr (j)

kc

Tjrr T

kjjXT

eHjHjY )2(1)()()(

TTjXeH

jY cTj

r /||0/||)()(

)(

Page 44: Sampling Theorem

LTI Discrete-Time Systems

Continuous-TimeSystemxc(t) yr(t)Heff(j)

TTjXeH

jY cTj

r /||0/||)()(

)(

)( jX c )()()( jXjHjY reffr

TTeH

jHTj

eff /||0/||)(

)(

Page 45: Sampling Theorem

Example:Ideal Lowpass Filter

y(n) yr(t)D/C

T

Discrete-TimeSystem

T

xc(t) C/Dx(n)

)( jX c )( jYr

1

cc

H(ej)

TT

jHc

ceff /||0

/||1)(

TTeH

jHTj

eff /||0/||)(

)(

Page 46: Sampling Theorem

Example:Ideal Lowpass Filter

Continuous-TimeSystemxc(t) yr(t)1

cc

Heff(j)

2||0||1

)(T

TeH

c

cj

TTeH

jHTj

eff /||0/||)(

)(

Page 47: Sampling Theorem

Example: Ideal Bandlimited Differentiator

Continuous-TimeSystemxc(t) )()( tx

dtdty cc

TTj

jHeff /||0/||

)( jjH )(

Page 48: Sampling Theorem

Example: Ideal Bandlimited Differentiator

Continuous-TimeSystemxc(t) )()( tx

dtdty cc

TTj

jHeff /||0/||

)( jjH )(

|Heff(j)|

T

T

Page 49: Sampling Theorem

Example: Ideal Bandlimited Differentiator

|| ,/)( TjeH j

Continuous-TimeSystemxc(t) )()( tx

dtdty cc

|Heff(j)|

T

T

Page 50: Sampling Theorem

Impulse InvarianceContinuous-Time

LTI systemhc(t), Hc(j)

xc(t) yc(t)

y(n) yc(t)D/C

T

Discrete-TimeLTI System

h(n)H(ej)

T

xc(t) C/Dx(n)

What is the relation between hc(t) and h(n)?

|| ),/()( TjHeH cj

Page 51: Sampling Theorem

Impulse Invariance || ),/()( TjHeH c

j

)()( jeXnx )()( jXtx cc

)()( nTxnx c

k

cj

Tkj

TjX

TeX 21)(

|| , 1)(T

jXT

eX cj

Page 52: Sampling Theorem

Impulse Invariance || ),/()( TjHeH c

j

)()( jeHnh )()( jHth cc

)()( nThnh c

|| , 1)(T

jHT

eH cj

)()( nTThnh c

|| , )(T

jHeH cj

Page 53: Sampling Theorem

Impulse InvarianceContinuous-Time

LTI systemhc(t), Hc(j)

xc(t) yc(t)

y(n) yc(t)D/C

T

Discrete-TimeLTI System

h(n)H(ej)

T

xc(t) C/Dx(n)

What is the relation between hc(t) and h(n)?

)()( nTThnh c

Page 54: Sampling Theorem

Sampling Theorem

Continuous-Time Processing of Discrete-Time Signals

Page 55: Sampling Theorem

The Modelyc(t) y(n)

C/D

T

Continous-TimeSystem

T

x(n)D/C

xc(t)

Discrete-TimeSystemx(n) y(n)

Page 56: Sampling Theorem

The Modelyc(t) y(n)

C/D

T

Continous-TimeSystem

T

x(n)D/C

xc(t)

Discrete-TimeSystemx(n) y(n)H (ej)

Hc(j)

Page 57: Sampling Theorem

The Modelyc(t) y(n)

C/D

T

Continous-TimeSystem

T

x(n)D/C

xc(t) Hc(j)

)( jX c)( jeX )( jeY)( jYc

TnTtTnTtnxtx

nc /)(

]/)(sin[)()(

TnTtTnTtnyty

nc /)(

]/)(sin[)()(

TeTXjX Tjc /|| ),()(

TjXjHjY ccc /|| ),()()(

|| ),/(1)( TjYT

eY j

Page 58: Sampling Theorem

The Model

TeTXjX Tjc /|| ),()(

TjXjHjY ccc /|| ),()()(

|| ),/(1)( TjYT

eY cj

)/()/(1)( TjXTjHT

eY ccj

)()/(1 jc eTXTjH

T)()/( j

c eXTjH

Page 59: Sampling Theorem

The Model)/()/(1)( TjXTjH

TeY cc

j

)()/(1 jc eTXTjH

T)()/( j

c eXTjH

Discrete-TimeSystemx(n) y(n)H (ej)

)/()( TjHeH cj

Page 60: Sampling Theorem

The Model

Discrete-TimeSystemx(n) y(n)H (ej)

)/()( TjHeH cj

yc(t) y(n)C/D

T

Continous-TimeSystem

T

x(n)D/C

xc(t) Hc(j)

Page 61: Sampling Theorem

Sampling Theorem

Changing Sampling Rate UsingDiscrete-Time Processing

Page 62: Sampling Theorem

The Goal

Down/UpSampling

)()( nTxnx c )'()(' nTxnx c

Page 63: Sampling Theorem

Sampling Rate Reduction By an Integer Factor

DownSampling

)()( nTxnx c )'()(' nTxnx c

MTT ' )()()( nMTxnMxnx cd

Page 64: Sampling Theorem

Sampling Rate Reduction By an Integer Factor

k

cj

Tkj

TjX

TeX 21)(

MTT ' )()()( nMTxnMxnx cd

r

cj

d Trj

TjX

TeX

'2

''1)(

r

c MTrj

MTjX

MT21

Page 65: Sampling Theorem

Sampling Rate Reduction By an Integer Factor

k

cj

Tkj

TjX

TeX 21)(

r

cj

d MTrj

MTjX

MTeX 21)( Let r = kM + i

1

0

2211 M

i kc MT

ijT

kjMT

jXTM

1

0

2211)(M

i kc

jd T

kjMT

ijXTM

eX

Page 66: Sampling Theorem

Sampling Rate Reduction By an Integer Factor

1

0

2211)(M

i kc

jd T

kjMT

ijXTM

eX

1

0

/)2( )(1)(M

i

Mijjd eX

MeX

NN

Xc(j)

NN

Xs(j), X (ejT)

2/T2/T

1/T

N=NTN

X (ej)

22

1/T

Page 67: Sampling Theorem

Sampling Rate Reduction By an Integer Factor

Xd (ej)

22

1/MTM=2

Xd (ejT)1/T’

2/T’2/T’ 4/T’4/T’

1

0

/)2( )(1)(M

i

Mijjd eX

MeX

NN

Xc(j)

NN

Xs(j), X (ejT)

2/T2/T

1/T

N=NTN

X (ej)

22

1/T

N < : no aliasing

Page 68: Sampling Theorem

Antialiasing

NN

X (ej)

22

1/T

M=3

Xd (ej)1/MT

22

Aliasing

Page 69: Sampling Theorem

Antialiasing

NN

X (ej)

22

1/T

22

)(~ jd eX

/3

Hd (ej)

22

1

/3

22

)()()( jjd

jd eXeHeX

/3/3

However, xd(n) x(nT’)

M=3

Page 70: Sampling Theorem

Decimator

Lowpass filterGain = 1

Cutoff = /MM)(nx )(~ nx

)(~)(~ nMxnxd

Page 71: Sampling Theorem

Increasing Sampling Rate By an Integer Factor

UpSampling

)()( nTxnx c )'()(' nTxnx c

LTT /'

T4/' TT

Page 72: Sampling Theorem

Increasing Sampling Rate By an Integer Factor

UpSampling

)()( nTxnx c )'()(' nTxnx c

LTT /'

)( jeX )(' jeX

X (ej)

1/T

X’ (ej)

L/T

Page 73: Sampling Theorem

InterpolatorLowpass filter

Gain = LCutoff = /L

L)(nx )(nxe)(nxi

otherwiseLLLnx

nxe 0,2,,0)/(

)(

k

e kLnkxnx )()()(

Page 74: Sampling Theorem

Interpolator

k

e kLnkxnx )()()()()( Ljje eXeX

nj

n k

je ekLnkxeX

)()()(

k n

njekLnkx )()(

k

Lkjekx )(

Page 75: Sampling Theorem

Interpolator

k

e kLnkxnx )()()()()( Ljje eXeX

X (ej)

1/T

Xe(ej)

1/T

Xi(ej)

L/T

L=3

Hi(ej)

L

/3/3

Page 76: Sampling Theorem

Changing the Sampling Rate By a Noninteger Factor

Resampling

)()( nTxnx c )'()(' nTxnx c

LTMT '

Page 77: Sampling Theorem

Changing the Sampling Rate By a Noninteger Factor

)(nx

Lowpass filterGain = 1

Cutoff = /MM

Lowpass filterGain = L

Cutoff = /LL )(nxe )(nxi )(~ nxi )(~ nxd

Sampling Periods:

T LT / LTM /

MLowpass filter

Gain = LCutoff = min(/L, /M)

L)(nx )(nxe )(~ nxi )(~ nxd

Page 78: Sampling Theorem

Sampling Theorem

Realistic Model forDigital Processing

Page 79: Sampling Theorem

Ideal Discrete-Time Signal Processing Model

y(n) yc(t)D/C

T

Discrete-TimeLTI System

T

xc(t) C/Dx(n)

Real world signal usually is not

bandlimited

Ideal continuous-to-discrete converter is

not realizable

Ideal discrete-to-continuous

converter is not realizable

Page 80: Sampling Theorem

More Realistic Model

y(n) yc(t)D/C

T

Discrete-TimeLTI System

T

xc(t) C/Dx(n)

)(ˆ nx )(ˆ ny)(txc )(txa

)( jH aa

)(txo )(tyDA )(ˆ tyr

)(~ jH r

Anti-aliasing

filter

Sample and

Hold

A/D converter

Discrete-time system

D/A converter

Compensated reconstruction

filter

T TT

Page 81: Sampling Theorem

Analog-to-Digital Conversion

T

Sample and

Hold

A/D converter

T T

)(txa )(txo )(ˆ nxB

)(txo

)(txa

Page 82: Sampling Theorem

Sample and Hold

T )(txo

)(txa

otherwiseTt

th0

01)(0

tT

ho(t)

n

nTt )(t

Page 83: Sampling Theorem

Sample and Hold

T )(txo

)(txa

otherwiseTt

th0

01)(0

tT

ho(t)

n

nTtnx )()(

t

xo(t)

n

a nTtnTx )()(

Page 84: Sampling Theorem

Sample and Hold

otherwiseTt

th0

01)(0

tT

ho(t)

n

nTtnx )()(

t

xo(t)

n

a nTtnTx )()(

n

aoo nTtnTxthtx )()(*)()(

Page 85: Sampling Theorem

Sample and Hold

n

aoo nTtnTxthtx )()(*)()(

Zero-OrderHoldho(t)

n

nTtts )()(

)(txc )(txo)(txs

Goal: To hold constant sample value for A/D converter.

Page 86: Sampling Theorem

A/D Converter

C/D

T

Quantizer Coder)(ˆ nx)(txa )(nx )(ˆ nxB

)]([)(ˆ nxQnx

Page 87: Sampling Theorem

Typical Quantizer

2Xm (B+1)-bit Binary code

Bm

Bm XX

222

1

2

23

25

27

29

2-

23-

25-

27-

29-

2

3

2

3

4

2’s complementcode

Offset binarycode

011

010

001

000

111

110

101

100

111

110

101

100

011

010

001

000

)(ˆ xQx

x

Page 88: Sampling Theorem

Analysis of Quantization Errors

C/D

T

Quantizer Coder)(ˆ nx)(txa )(nx )(ˆ nxB

)(ˆ)(ˆ nxXnx Bm

QuantizerQ[ ]

)]([)(ˆ nxQnx )(nx

)()()(ˆ nenxnx )(nx

)(ne

Page 89: Sampling Theorem

Analysis of Quantization Errors

)()()(ˆ nenxnx )(nx

)(ne 2/)(2/ ne)2/()()2/( mm XnxX

The error sequence e(n) is a stationary random process. e(n) and x(n) are uncorrelated. The random variables of the error process are uncorrelated,

i.e., the error is a white-noise process. e(n) is uniform distributed.

Page 90: Sampling Theorem

SNR (Signal-to-Noise Ratio)

)()()(ˆ nenxnx )(nx

)(ne 2/)(2/ ne)2/()()2/( mm XnxX

12

22 e 12

)2/( 2BmX

12

2 2m

B X

2

2

10log10e

xSNR

2

22

10212log10

m

xB

XSNR

x

mXB 10log208.1002.6

Page 91: Sampling Theorem

SNR (Signal-to-Noise Ratio)

12

22 e 12

)2/( 2BmX

12

2 2m

B X

2

2

10log10e

xSNR

2

22

10212log10

m

xB

XSNR

x

mXB 10log208.1002.6

每增加一個 bit , SNR 增加約 6dB

Page 92: Sampling Theorem

SNR (Signal-to-Noise Ratio)

12

22 e 12

)2/( 2BmX

12

2 2m

B X

2

2

10log10e

xSNR

2

22

10212log10

m

xB

XSNR

x

mXB 10log208.1002.6

x大較有利,但不得過大 ( 為何? ) x過小不利 x每降低一倍 SNR 少 6dB X~N(0, x

2) P(|X|<4x )0.00064

Let x=Xm / 4 SNR 6B1.25 dB