Sie sind auf Seite 1von 61

6.

003: Signals and Systems


Sampling

November 22, 2011


1

Sampling
Conversion of a continuous-time signal to discrete time.

x(t)

x[n]

t 0 2 4 6 8 10 0 2 4 6 8 10

We have used sampling a number of times before. Today: new insights from Fourier representations.

Sampling
Sampling allows the use of modern digital electronics to process, record, transmit, store, and retrieve CT signals. audio: MP3, CD, cell phone pictures: digital camera, printer video: DVD everything on the web

Sampling
Sampling is pervasive. Example: digital cameras record sampled images.

I (x, y )

I [m, n]

Sampling
Photographs in newsprint are half-tone images. black or white and the average conveys brightness. Each point is

Sampling
Zoom in to see the binary pattern.

Sampling
Even high-quality photographic paper records discrete images. When AgBr crystals (0.04 1.5m) are exposed to light, some of the Ag is reduced to metal. During development the exposed grains are completely reduced to metal and unexposed grains are removed.

Images of discrete grains in photographic paper removed due to copyright restrictions.

Sampling
Every image that we see is sampled by the retina, which contains 100 million rods and 6 million cones (average spacing 3m) which act as discrete sensors.

Courtesy of Helga Kolb, Eduardo Fernandez, and Ralph Nelson. Used with permission.

http://webvision.med.utah.edu/imageswv/sagschem.jpeg
8

Check Yourself
Your retina is sampling this slide, which is composed of 1024768 pixels. Is the spatial sampling done by your rods and cones adequate to resolve individual pixels in this slide?

Check Yourself
The spacing of rods and cones limits the angular resolution of your retina to approximately eye = rod/cone spacing 3 106 m 104 radians diameter of eye 3 cm

The angle between pixels viewed from the center of the classroom is approximately screen size / 1024 3 m/1024 pixels = 3 104 radians distance to screen 10 m Light from a single pixel falls upon multiple rods and cones.

10

Sampling
How does sampling aect the information contained in a signal?

11

Sampling
We would like to sample in a way that preserves information, which may not seem possible.

x(t)

Information between samples is lost. Therefore, the same samples can represent multiple signals.
n? cos 73

cos 3 n?

t
12

Sampling and Reconstruction


To determine the eect of sampling, compare the original signal x(t) to the signal xp (t) that is reconstructed from the samples x[n]. Uniform sampling (sampling interval T ).

x[n] = x(nT ) t n

Impulse reconstruction.

xp (t) =
n

x[n] (t nT ) t n
13

Reconstruction
Impulse reconstruction maps samples x[n] (DT) to xp (t) (CT). xp (t) = =
0 n= 0 n= 0 n=

x[n] (t nT ) x(nT ) (t nT ) x(t) (t nT ) (t nT )


p(t)

= x(t) -

0 n=

,,

"

Resulting reconstruction xp (t) is equivalent to multiplying x(t) by impulse train.

14

Sampling
Multiplication by an impulse train in time is equivalent to convolution by an impulse train in frequency. generates multiple copies of original frequency content.

X (j ) 1 W W P (j )
2 T

s
1 T

Xp (j ) = 21 (X (j ) P (j ))( ) s
15

s =

2 T

Check Yourself

What is the relation between the DTFT of x[n] = x(nT ) and the CTFT of xp (t) = x[n] (t nT ) for X (j ) below.

X (j ) 1 W W
1. Xp (j ) = X (e j )|= 2. Xp (j ) = X (e j )|=
T

3. Xp (j ) = X (e

)|=T

4. none of the above

16

Check Yourself
DTFT X (ej ) =
0 n=

x[n]ej n

CTFT of xp (t)

Xp (j ) =

x[n] (t nT )ejt dt

n= 0 n=

x[n]

(t nT )ejt dt

0 n=

x[n]ejnT )

= X (e

=T

17

Check Yourself
Xp (j ) = X (e j )
=T

X (j ) 1 W W

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s s =
2 T

X (ej ) = Xp (j ) = T
1 T

2
18

Check Yourself

What is the relation between the DTFT of x[n] = x(nT ) and the CTFT of xp (t) = x[n] (t nT ) for X (j ) below.

X (j ) 1 W W
1. Xp (j ) = X (e j )|= 2. Xp (j ) = X (e j )|=
T

3. Xp (j ) = X (e

)|=T

4. none of the above

19

Sampling
The high frequency copies can be removed with a low-pass lter (also multiply by T to undo the amplitude scaling).

Xp (j ) = 21 (X (j ) P (j ))( ) 1 T
T

s 2

s 2

Impulse reconstruction followed by ideal low-pass ltering is called bandlimited reconstruction.

20

The Sampling Theorem


If signal is bandlimited sample without loosing information. If x(t) is bandlimited so that X (j ) = 0 for | | > m then x(t) is uniquely determined by its samples x(nT ) if 2 > 2m . s = T The minimum sampling frequency, 2m , is called the Nyquist rate.

21

Summary
Three important ideas. Sampling x(t) x[n] = x(nT ) Bandlimited Reconstruction s = 2 T

LPF T
s 2

x[n]

Impulse Reconstruction

xp (t) = x[n] (t nT )

s 2

xr (t)

Sampling Theorem: If X (j ) = 0 | | >

s then xr (t) = x(t). 2

22

Check Yourself
We can hear sounds with frequency components between 20 Hz and 20 kHz. What is the maximum sampling interval T that can be used to sample a signal without loss of audible information? 1. 100 s 3. 25 s 5. 50 s 2. 50 s 4. 100 s 6. 25 s

23

Check Yourself
s 2 = 2 2T 1 1 T < = = 25 s 2 20 kHz 2fm 2fm = m <

24

Check Yourself
We can hear sounds with frequency components between 20 Hz and 20 kHz. What is the maximum sampling interval T that can be used to sample a signal without loss of audible information? 1. 100 s 3. 25 s 5. 50 s 2. 50 s 4. 100 s 6. 25 s

25

CT Model of Sampling and Reconstruction


Sampling followed by bandlimited reconstruction is equivalent to multiplying by an impulse train and then low-pass ltering.

LPF x(t) p(t) xp (t)


s 2

T
s 2

xr (t)

p(t) = sampling function

0 T

26

Aliasing
What happens if X contains frequencies | | > ? T

X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

27

Aliasing
What happens if X contains frequencies | | > ? T

X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

28

Aliasing
What happens if X contains frequencies | | > ? T

X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

29

Aliasing
What happens if X contains frequencies | | > ? T

X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

30

Aliasing
The eect of aliasing is to wrap frequencies.

Output frequency
s 2

Input frequency
s 2

X (j )

1 T

s 2

s 2
31

Aliasing
The eect of aliasing is to wrap frequencies.

Output frequency
s 2

Input frequency
s 2

X (j )

1 T

s 2

s 2
32

Aliasing
The eect of aliasing is to wrap frequencies.

Output frequency
s 2

Input frequency
s 2

X (j )

1 T

s 2

s 2
33

Aliasing
The eect of aliasing is to wrap frequencies.

Output frequency
s 2

Input frequency
s 2

X (j )

1 T

s 2

s 2
34

Check Yourself

A periodic signal, period of 0.1 ms, is sampled at 44 kHz. To what frequency does the third harmonic alias?

1. 2. 3. 4. 5. 0.

18 kHz 16 kHz 14 kHz 8 kHz 6 kHz none of the above

35

Check Yourself
Output frequency (kHz)
88 44 22

Input frequency (kHz)


22 44 66 88

36

Check Yourself
Output frequency (kHz)
88 44 22

Input frequency (kHz)


22 44 66 88

Harmonic 10 kHz 20 kHz 30 kHz

Alias 10 kHz 20 kHz 44 kHz-30 kHz =14 kHz

37

Check Yourself

A periodic signal, period of 0.1 ms, is sampled at 44 kHz. To what frequency does the third harmonic alias? 3

1. 2. 3. 4. 5. 0.

18 kHz 16 kHz 14 kHz 8 kHz 6 kHz none of the above

38

Check Yourself
Output frequency (kHz)
88 44 22

Input frequency (kHz)


22 44 66 88

Harmonic 10 kHz 20 kHz 30 kHz 40 kHz 50 kHz 60 kHz 70 kHz 80 kHz

Alias 10 kHz 20 kHz 44 kHz-30 44 kHz-40 50 kHz-44 60 kHz-44 88 kHz-70 88 kHz-80

kHz kHz kHz kHz kHz kHz

=14 = 4 = 6 =16 =18 = 8


39

kHz kHz kHz kHz kHz kHz

Check Yourself
Scrambled harmonics.

40

Aliasing
High frequency components of complex signals also wrap.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

41

Aliasing
High frequency components of complex signals also wrap.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

42

Aliasing
High frequency components of complex signals also wrap.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

43

Aliasing
High frequency components of complex signals also wrap.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

44

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

45

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

46

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

47

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s s 2 2

48

Aliasing Demonstration
Sampling Music s = 2 = 2fs T

fs = 44.1 kHz fs = 22 kHz fs = 11 kHz fs = 5.5 kHz fs = 2.8 kHz J.S. Bach, Sonata No. 1 in G minor Mvmt. IV. Presto Nathan Milstein, violin

49

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

50

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

51

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

52

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s s 2 2

53

Anti-Aliasing Filter
To avoid aliasing, remove frequency components that alias before sampling.

x(t)

Anti-aliasing Filter 1 s s 2 2

p(t)

Reconstruction Filter T xp (t) s s 2 2

xr (t)

54

Aliasing
Aliasing increases as the sampling rate decreases.

X (j ) 1 P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

55

Aliasing
Aliasing increases as the sampling rate decreases.

Anti-aliased X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

56

Aliasing
Aliasing increases as the sampling rate decreases.

Anti-aliased X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s 2

s 2

57

Aliasing
Aliasing increases as the sampling rate decreases.

Anti-aliased X (j )

P (j )
2 T

Xp (j ) = 21 (X (j ) P (j ))( )
1 T

s s 2 2

58

Anti-Aliasing Demonstration
Sampling Music s = 2 = 2fs T

fs = 11 kHz without anti-aliasing fs = 11 kHz with anti-aliasing fs = 5.5 kHz without anti-aliasing fs = 5.5 kHz with anti-aliasing fs = 2.8 kHz without anti-aliasing fs = 2.8 kHz with anti-aliasing J.S. Bach, Sonata No. 1 in G minor Mvmt. IV. Presto Nathan Milstein, violin
59

Sampling: Summary
Eects of sampling are easy to visualize with Fourier representations. Signals that are bandlimited in frequency (e.g., W < < W ) can be sampled without loss of information. The minimum sampling frequency for sampling without loss of information is called the Nyquist rate. The Nyquist rate is twice the highest frequency contained in a bandlimited signal. Sampling at frequencies below the Nyquist rate causes aliasing. Aliasing can be eliminated by pre-ltering to remove frequency components that would otherwise alias.

60

MIT OpenCourseWare http://ocw.mit.edu

6.003 Signals and Systems


Fall 2011

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Das könnte Ihnen auch gefallen