Sampling of Continuous-Time Sig Nals

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 85

Chapter 4

Sampling of Continuous-Time Sig


nals

1. Continuous-to-Discrete-Time
(C/D) Converter

T : sampling period
1 : sampling frequency
fs
T

2/85

2. Mathematically

X(n)

is indexed on the integer variable n, which in

effect introduces a time normalization


X(n)

contains no explicit information about samplin

g rate !! (look at Fig.4.2 (c) (p. 142))


3/85

xs (t ) xc (t ) s(t ) xc (t ) (t nT )
n

x (t ) (t nT )

Shifting property of impulse function

Fourier transform gives

X s ( j ) X c ( j ) S ( j )
aside : S ( j)

jt
s
(
t
)
e
dt

4/85

s(t )

(t nT )

Its a periodic function, then Fourier series exists

s(t )

j 2kt / T
c
e
k

k
T
2

T
2

1
1
1
j 2kt / T
j 2kt / T
ck s(t )e
dt (t mT )e
dt
T T
T m T
T
2

5/85

1 j 2kt / T
s(t ) e
k T
Then,

1 j 2kt / T jt
1
j ( 2k / T ) t
S ( j ) e
e
dt

e
dt

T
T k

k
1
( 2k / T )
T k

k s s 2 / T

6/85

X s ( j ) X c ( j ) S ( j )

FT of
sampled
signal

1
X c ( j kj s )
T k

Infinite sum of FT of
original signal

Look at Fig. 4.3~4.4 (p. 144~145)

7/85

Note:

X s ( j )

X (e jw )

Frequency scaling by w T
(normalization)
( s is normalized to w 2 )

From

this fact, we know already that


x(n)

xs (t )
Time normalization

8/85

3. Reconstruction of the Original


Signal
Time

axis is normalized by T

Frequency axis is normalized by fs = 1/T

Fig. 4.8(p. 151)


9/85

Reconstruction

filter
sin( t / T )
hr (t )
t / T

xr (t )

x(nT )h (t nT )

sin[ (t nT ) / T ]
x(nT )
(t nT ) / T
n

Ideal LPF interpolate between the impulses of xs(t)

10/85

Fig. 4. 9 (c) (p. 152)

Fig. 4. 3 (c) (p. 144)


11/85

4. Reconstruction of ContinuousTime Signal using ILPF

Fig. 4. 4 (d) (p. 144)

X r ( j ) H r ( j ) X s ( j )

12/85

5. Nyquist Sampling Theorem


s

2
2 N
T

Nyquist frequency
; the frequency to prevent aliasing

To recover

the original signal exactly, its neces

sary to sample the original signal at a rate great


er than twice its highest frequency

13/85

6. Fourier Transform of xs(t)


X s ( j )

xs (nT )e

j t

jTn
x
(
nT
)
e
c

dt

j t
x
(
nT
)

(
t

nT
)
e
dt
c

jnT
x
(
nT
)
e
c

14/85

Since x(n)=xc(nT) and FT of x(n)

X (e jw )

jwn
x
[
n
]
e

Then

X s ( j) X (e jw ) wT X (e jT )

X (e

jT

1
) X c ( j jk s )
T k

1
w 2k
or X (e ) X c ( j j
)
T k
T
T
jw

15/85

7. D/C Converter

Fig. 4. 8 (a) (p. 151)

In

frequency domain

X r ( j )

j T n
x
[
n
]
e
H r ( j )

X (e jT ) H r ( j)
Reconstruction filter
16/85

8. Interpolation
X(n)

X(t)

Xc(t)

Interpolation

LPF

x'c(t)

discontinuities arise here, but


it can be eliminated with the
adaption of LPF

17/85

Nearest neighbor interpolation (zero-order hold)

Linear

Cubic B-spline

Cubic convolution

Multi-point Lagrange (3, 4, 5, 6)

Etc.

18/85

9. Discrete-Time Processing of
Continuous-Time Signals

Fig. 4. 15 (b) (p. 161)

Suppose

that the discrete-time system is LTI

y ( n ) h ( n) x ( n)

Y (e jw ) H (e jw ) X (e jw )

19/85


1
w 2k
jw
jw
jw
jw
1. Y (e ) H (e ) X (e ) H (e ) X c ( j j
)
T k
T
T

2. Yr ( j) H r ( j)Y (e jT )

1
2k
jT
H r ( j ) H ( e ) X C ( j j
)
T k
T

Ideal interpolating filter

20/85


3. If X C ( j) 0,
T

jT
Then Yr ( j)
H (e ) X C ( j),
T

0
,
T

4. Yr ( j) H eff ( j) X c ( j)

where H eff ( j)

H (e
0

jT

,
T

,
T

Over-all continuous-time system


21/85

Important !!

Discrete-time system must be LTI

Input signal must be band-limited

Sampling rate must be high enough to remove


aliased components by discrete-time system

22/85

23/85

Fig. 4. 13 (p. 157)


24/85

10. Summary

If X C ( j) 0,
T
Then the system

Fig. 4. 15(b) (p. 161)


25/85

Behave as an LTI continuous-time system whe


re freq. Response is
Yr ( j)
H eff ( j)

X c ( j )

H (e
0

jT

),
T

,
T

26/85

11. Changing the Sampling Rate u


sing Discrete-Time Processing

Behave as an LTI continuous-time system whe


re freq. Response is
x[n] xc (nT )

x[n] xc (nT )

: New discrete-time response

27/85

One approach
Reconstruct
xc (t ) from x[n]
Resampling
to obtain x[n]
xc (t )

Not desirable due to nonideal analog reconstruction


filter, D/A, A/D converters

Other approach
; involve only discrete-time operations

28/85

12. Sampling Rate Reduction by an I


nteger Factor

Fig. 4. 20 (p. 167)

xd [n] x[nM ] xc (nMT )

if

N
T ' MT

DFT of x[n] = xc(nT)


1
w 2k
X (e ) X c ( j j
)
T k
T
T
jw

29/85

DFT of xd [n] x[nM ] xc (nT )

1
w
2 r
jw
X d (e ) X c ( j j
)
T r
T
T

Since T MT
1
X d (e )
MT
jw

w
2r
Xc( j
j
)

MT
MT
r

r i kM ; integer

where k , 0 i M 1

30/85

Now
1
X d (e )
M
jw

1
2k
2i
w

T X c j MT j T j MT

i 0
k

M 1

1
w 2i 2k
Xc j
j

T k
MT
T
X (e
1
X d (e )
M
jw

M 1

w 2i
M

X (e

)
w 2 i
M

i 0

31/85

FT of xd[n] in terms of FT of x[n]


infinite set of copies of

w T '
or

shifted by integer multiple of

M copies of
r

X c ( j )

freq. scaled through

jw

X (e )

2 / T '

, freq. Scaled by M, shifted by intege

2 / M

of

32/85

33/85

Fig. 4. 21 (p. 170)


34/85

Here no aliasing since original sampled seque


nce is downsampled by M=2

If M>2

aliasing occurs

To avoid aliasing in downsampling

wN M

wN
M
35/85

13. In Case of Possible Aliasing,


use LPF (Prefilter)

Fig. 4. 23 (p. 172)

Its decimator!
(downsampling by LPF followed by compression)

36/85

14. Upsampling
(Increase the Sampling Rate)
xi [n] xc (nT )

T T / L

xi [n] x[n / L] xc (nT / L), n 0, L, 2 L,

Fig. 4. 24 (p. 173)

Its (sampling rate) expander !


37/85

xe [n] x[n / L], n 0, L, 2 L,


0,
otherwise

x[k ] [n kL]

In freq. domain, FT of xe [ n] is

X e (e )
jw

jwn
x
[
k
]

[
n

kL
]
e

n k

jwkL
x
[
k
]
e

X (e jwL )
38/85

freq. scaled version of FT of the input

w wL

w T
(cf)

Down sampling

Up sampling

1. sampling rate reduction

1. sampling rate increase

2. increase sample period

2. decrease sample period

3. decimation

3. interpolation

39/85

15. Digital Sampling Rate Increase


(Interpolation)
xc (t )

Ideal C/D
converter

x(n)

Assume X c ( j) 0 for

x(n) xc (nT )

Discrete-time
system

xi (n)

xi (n) xc (nT ' )

T
T '
L

40/85

2T
-2T

-T

3T

4T

T
2

-4

-3

-2

-1

0 1 2 3 4 5 6 7 8

new sequence

41/85

16. The Up-Sampler


x(n)

xe (n)

xe (n)

x( n / L)

n/L : an integer

otherwise

T
2T

-T

T'

T
: for this example
T '
3

42/85

17. Interpolation in the Frequenc


y Domain
X e (e jw ) X (e jwL )
X e (e jT ) X (e jT L ) X (e jT )

43/85

18. Proof of Interpolation Formul


a
xe (n) x(n / L) xc (nT / L) xc (nT )
n
0
if
integer
L
X e (e )
jw

jwn
x
(
n
)
e
e

x ( n / L )e

jwn

, n / L : integer

jwmL
x
(
m
)
e

X (e jwL )
X e (e jT ) X (e jT L ) X (e jT )
44/85

45/85

Fig. 4. 25 (p. 174)


46/85

19. General System for Interpola


tion
x(n)

xe (n)

xi (n)

LPF
Gain : L

Cutoff :

T
L

47/85

20. Lowpass Filter


H (e jw )

L, w

{ 0,

otherwise

n
sin
L , n
h( n)
n
L

sin (n kL) / L
xi (n) x(k )
(n kL) / L
k

48/85

21. General Rate Change

Fig. 4. 28 (p. 177)

49/85

50/85

22. Linear Interpolation


xi (n) xe (n) h lin(n)

x ( n) h

(n k )

lin

What is h (n) ?
lin

h lin(n)

0,

n
L

, n L

n L

1 sin( wL / 2)
H lin(e )
L sin( w / 2)

jw

51/85

Fig. 4. 27 (p. 175)


52/85

23. Idealized System


T

xc (t )

T
Discrete-time
system

Ideal C/D

Ideal D/C

y (n)

x(n)

yr (t )

sin (t nT ) / T
yr (t ) y (n)
(t nT ) / T
n

If

X c ( j ) 0
H eff ( j)

/ T , then

Yr ( j)

X c ( j )

H (e jT ), / T
0,

/T
53/85

24. Practical Implementation

Fig. 4. 41 (p. 185)


54/85

25. Pre-Filtering to Avoid Aliasin


g

Fig. 4. 42 (p. 186)

Ideal H

aa

( j ) :

H aa ( j)

1,

0,

55/85

26. Practical Implementation

Then
H (e

{ 0,

H eff ( j) is as before

jT

Practical H ( j)
aa
H eff ( j)

H aa ( j) H (e

{ 0,

jT

),

),

T
56/85

27. Analog-to-Digital Conversion

Then
xa (t )

Sample
& Hold

xo (t )

A/D converter

xB (t )

Sample and hold


xo (t )

x(n)h (t nT )

where x(n) xa (nT )


h0 (T )

1,

0t T

0,

otherwise

57/85

xo (t ) ho (t ) xa (nT ) (t nT )
n

Fig. 4. 46(a) (p. 189)

58/85

Fig. 4. 46(b) (p. 189)

Purpose of S&H
To hold sample value constant while it is quantized
and coded by the A/D converter

Combine S&H and A/D conv.


xa (t )

Sample
& Hold

xo (t )

A/D converter

xB (t )
59/85

xa (t )

Equivalent system
Ideal C/D

Coder

Quantizer

x(n)

x (n)

xB (t )

x (n) Q [ x(n)] : Quantized input sample

x B (n) Binary coded-quantized sample

60/85

Fig. 4. 48 (p. 190)


61/85

Fig. 4. 49 (p. 192)


62/85

28. Twos Complement Coding Fractions


Binary symbol
0
0
0
0
1
1
1
1

1
1
0
0
1
1
0
0

Numeric value
3/4
1/2
1/4
0
-1/4
-1/2
-3/4
-1

1
0
1
0
1
0
1
0

Binary integers or fraction


Sign bit

63/85

For (B+1) bit binary 2s complement


a0 a1 a2 aB
then its value

a0 20 a1 2 1 a2 2 2 aB 2 B

Step size - 2 B 1 levels


2X m X m
B 1 B
2
2
x (n) x B X m

64/85

29. Quantization Error


e(n) x (n) x(n)
For

e( n)
2
2

3-bit quantizer,

when 9 x(n) 7
2

In

general, e(n)
2

when X x(n) X
m
m
2

65/85

30. Additive Noise Model


x(n)

Quantizer
Q[ ]

x (n)

x(n)

x (n)
e(n)

Assumptions

1. e(n) : a simple sequence of a stantionary random pr


ocess
2. e(n) is uncorrelated with x(n)
3. The error is a white-noise process
4. Probability distribution of the error process is unifor
m over

~
2
2

66/85

Quantized

speech signal with 8 bits

67/85

Quantization

error 3 bits 5

68/85

Quantization

error

100

69/85

31. Signal-to-Quantization Noise


Ratio
Pen (e)
1

2 B X m

Fig. 4. 52 (p. 196)


70/85

e2 mean - squared value or noise power


2 2 B X m2
2

12
12
x2
signal power
10 log 10

SNR 10 log 10
2
noise power
e
12 2 2 B x2

10 log 10
2
Xm

6.02B 10.8 20 log 10

Xm

71/85

32. D/A Conversion


x B (n)
x B (n)

Scale by

Xm

x DA (t )

D/A Converter

x ( n)

Convert to
Zero-order
Impulses xS (n)
Hold

xDA (n)

Fig. 4. 53 (p. 197)

Ideal

D/C

(t nT )
sin

T
xr (t ) x ( n)
(t nT )
n
T
X r ( j) H r ( j) X (e jT )

H r ( j )
T
0 , otherwise

T ,

72/85

D/A converter

xDA (t )

x B ( n)h0 (t nT )

x (n)h (t nT)

x(n)h (t nT) e(n)h (t nT)

x0 (t ) e0 (t )

73/85

jnT
x
(
n
)
H
(
j

)
e

X 0 ( j )

x ( n )e

jnT

H 0 ( j )

X (e jT ) H 0 ( j)
How

can we get X r ( j) from X 0 ( j) ?

~
~
X r ( j) H r ( j) X 0 ( j) H r ( j) H 0 ( j) X (e jT )
H r ( j )
~
H r ( j )
H 0 ( j )

T
2 sin(
) j T
2 e 2
H 0 ( j )

74/85

Fig. 4. 54 (p. 199)


75/85

For

an ideal compensated reconstruction filter

(t nT )
sin

T
x r (t ) x ( n)
(t nT )
n
T
(t nT )
(t nT )
sin
sin

T
T
x ( n)
e( n )
(t nT )
(t nT )
n
n
T
T
xa (t ) ea (t )

76/85

33. Practical Model for Digital Fil


tering
xc (t )

H aa ( j)

x ( n)

Digital
Filter

y ( n)

D/A

xa (t )

y DA (t )

S&H
A/D

x ( n)

Quantizer

y ( n)

~
H r ( j )

y r (t )

77/85

34. Equivalent Model

xc (t )

Ideal
C/D

H aa ( j)

x ( n)
e1 ( n)

x ( n)

Digital
Filter

y ( n)
e2 ( n)

y ( n)

Convert to
Impulses

Zero-order
Holder

~
H r ( j )

y r (t )

78/85

35. Equations for Practical Mode


l
y r (t ) ya (t ) ea (t )
~
Ya ( j) H r ( j) H 0 ( j) H (e jT ) H aa ( j) X c ( j)

X a ( j )

The

noise has a power spectrum

2
~
jT
Pea ( j) H r ( j) H 0 ( j) H (e
) e2

79/85

Effective

Frequency Response (for signal)

Ya ( j)
H eff ( j)
X c ( j )
~
jT
H r ( j) H 0 ( j) H (e ) H aa ( j)
for any

if H aa ( j) 0
X c ( j )
~

H r ( j ) 0

80/85

36. Application of Decimation & Int


erpolation in A/D & D/A
xc (t )

Simple
Anti-aliasing
Filter

xa (t )

A/D
Conv.

x (n)

Decimation
By M

T ' MT

T
Discrete-time
System

x d (n)

y d (n)

T MT
'

Interpol.
By L

y (n)

T ''

M
T'
T
L
L

x d (n)

D/A
conv.

y d (n)

y DA (t )

Simple
Recons.
Filter

y r (t )

Fig. 4. 41~45 (p. 185~188)


81/85

Fig. 4. 44 (p. 188)


82/85

Fig. 4. 44 (p. 188) continue


83/85

84/85

85/85

You might also like