Вы находитесь на странице: 1из 33

Sampling

time-domain discretization
Sampling of bandlimited signals
Reconstruction of analog signals from the
sampled signal

Sampling theorem
u ( t ) =

1

t + t

2
2

A sample of x(t) is obtained


multiplying the continuous-time
signal x(t) with the rectangular
impulse u(t ) of area 1:
x ( t ) u ( t ) x ( 0 ) u ( t )

Another sample can be obtained using the same


rectangular impulse shifted by kTs.

x ( t ) u ( t kTs ) x ( kTs ) u ( t kTs )


2

sampling process :
x (t )

x ( kTs ) u ( t kTs )
u ( t kTs ) k
=
k =

For small values of :


(t ) = (t )

lim u
0

Dirac distribution

u ( t kTs ) = ( t kTs )x ( kTs ) = T ( t )


0
k =
k =
lim

Periodic Dirac
distribution

ideal sampling of the signal x(t) :

x ( t ) = x ( t ) Ts ( t ) =

x ( kTs ) ( t kTs )

k =

Ideal Sampling
Mathematical model

x ( t ) = x ( t ) Ts ( t ) =

x ( kTs ) ( t kTs )

k =

System model

Spectrum of Ideal Sampled


Signal
ideal sampled signal:

x ( t ) = x ( t ) Ts ( t ) =

x ( kTs ) ( t kTs )

k =

the spectrum of the ideal sampled signal :

X ( ) = F x ( t ) Ts ( t )

The Fourier transform of a product is convolution of the


Fourier transforms. The Fourier transform of the periodic
Diracs distribution is also a periodic Diracs distribution.
1
2
2
k
X ( ) = F x ( t ) Ts ( t ) =
X ( )

Ts k =
Ts
2

1
X ( ) =
Ts

2 1
X ( ) k
=

Ts Ts
k =

X k T
k =

The effect of the convolution of a specified function with


the periodic Diracs distribution is the periodic repetition
of the considered function.
6

x (t ) =

x ( kTs ) ( t kTs )

k =

1
X ( ) =
Ts

X k T
k =

The spectrum of an ideal sampled signal is the periodic


repetition of the spectrum of the original signal. The
period is inverse proportional with the sampling step Ts.

Spectrum of
original signal

Spectrum of periodic
Dirac distribution

Spectrum of
ideal sampled
signal

Aliasing
error

1
X ( ) =
Ts

X k T
k =

Sampling Band-limited Signals


x(t)-band-limited
X () = 0 if M

successive replica of the original signal


spectrum are not superimposed and the
spectrum of the original signal can be
recovered by low-pass ideal filtering for
s 2M

10

Ideal Low-pass Filter

H () = pc () h(t ) =

sin c t
t
11

the aliasing error can be avoided.

s 2M

Sampling freq.

M c s M

Cutoff freq for the low pass filter

For perfect reconstruction :


H r ( 0 ) = Ts

12

The frequency response of the reconstruction filter is:

T ,
H r ( ) = Ts pc ( ) = s
0,

c
> c

M c s M

Its response :
xr ( t ) = x ( t ) hr ( t )

with the spectrum:

X r ( ) = X ( ) H r ( )
1
=
Ts

X ( k s )Ts pc ( ) = X ( )

k =

xr ( t ) = x ( t ) , a.e.w.
13

When the condition:


appears.

s 2M

is not verified, the aliasing error

s M < M

14

Reconstruction
H r ( ) = Ts pc ( ) hr ( t ) = Ts

sin c t
t

xr ( t ) = hr ( t ) x ( t )

sin ct
x ( kTs ) ( t kTs )
t
k =

sin ct
= x ( kTs )Ts
( t kTs )
t
k =

= Ts

x ( kTs )Ts
k =

k =

sin c ( t kTs )
( t kTs )

sin c ( t kTs )
2c
x ( kTs )
s
c ( t kTs )
15

xr ( t ) =

k =

sin c ( t kTs )
2c
x ( kTs )
s
c ( t kTs )

Nyquists sampling frequency = minimum sampling


frequency s = 2M :
xr ( t ) =

because

x ( kTs )
k =

sin M ( t kTs )

M = c = s M
M = c =

M ( t kTs )

or

s
2
16

WKS (Whittaker, Kotelnikov,


Shannon) Sampling Theorem
If the finite energy signal x(t) is band limited at M , ( X()=0
for | | > M), it is uniquely determined by its samples { x ( nTs ) n
if the sampling frequency is higher or equal than twice the
maximum frequency of the signal:
s 2M

the original signal can be reconstructed from its samples a.e.w:


xr ( t ) =

k =

sin c ( t kTs )
2c
x ( kTs )
s
c ( t kTs )

if the cut-off frequency of ideal low-pass reconstruction filter :


M c s M

17

Ideal Low-pass Filtering


Reconstruction

The signal reconstructed from curves of type sin x / x.


Interpolation
18

In the sampling moments, only one


sample defines the signal
x ( nTs ) =

x ( kTs )
k =

sin M Ts ( n k )
M Ts ( n k )

sin ( n k )

M = s x ( nTs ) = x ( kTs )
= x ( kTs )n,k = x ( nTs )
2
(n k )
k =
k =

1, for n = k
n ,k =
0, for n k

In between the sampling points, infinite


number of terms
19

Linear interpolation
approximates the signal using straight lines
that unify points determined by the samples
Reconstruction filter is triangular.
errors

20

10

Ts

sin 2
H r ( ) = Ts
Ts

sin

= Ts

ideal

21

Reconstruction by Zero Order


Extrapolation

Ts
T
Ts
sin s
2 = e j 2 T
2
s
Ts

Ts
sin
T
sin
j
j s
s
s
2
2
H r ( ) = e
Ts
=e
Ts

s
2

T
hr ( t ) = pTs t s
2
2

Ts
2

2sin

22

11

Difference between filters is significant


large errors

The frequency response of the reconstruction filter is not


perfectly flat in the pass band.

The spectrum of the reconstructed signal:


X r ( ) = X ( ) H r ( ) =

k =

j
e s

23

s
X ( k s )

sin

24

12

The reconstructed signal is not band-limited. The reconstruction


error can be further reduced if an ideal low-pass filter is added.

Even after low pass filtering errors persist. It is decreased if s >> M .

25

Ideal Sampling of Periodic Signals


periodic signal of period T, band limited at
the Nth harmonic (maximum frequency)
M = N 0 ;

0 =

2
T0

Ideal sampling with sampling frequency


s = M 0 ,

Effect: periodic repetition of its spectrum,


weighted by inverse of the sampling step
Spectral components should not overlap:
N 0 < s N 0 = 0 ( M N )

26

13

N0 = 30

s min = 2 30 + 0 = 70

N 0 < c < s N 0

27

N 0 < s N 0 = 0 ( M N )
The difference M-N is a natural number:
0 ( M N ) N 0 = R0 ,

R = 1,2,

s = M 0 = ( 2 N + R ) 0 = 2M + R0 ,

R = 1, 2,

Minimum sampling frequency

s min = ( 2 N + 1) 0 = 2M + 0

28

14

Reconstruction by ideal low-pass filtering:


T , c
H r ( ) = Ts pc ( ) = s
;
> c
0,
N 0 < c < s N 0

to avoid aliasing error for ideal sampling of periodic signals:


s N 0 > N 0
s > 2 N 0 = 2M

Reminder: sampling non-periodic signals s 2M


On the period of the fastest harmonic component more than 2
samples (at least 3) must be taken.
29

T0 - period of the fundamental


ideal sampling with s=(2N+R)0 then:
2
2
= ( 2N + R )
Ts
T0

Ts =

T0
;
2N + R

R = 1, 2,

2N+R = maximum different


samples on a single fundamental
period of the original signal.

30

15

Principle of Sampling Oscilloscope


Same result : successive samples from successive periods.
x ( kTs ) = x (T0 + kTs ) = x ( KT0 + kTs )
Ts = KT0 + kTs = KT0 +

1
T
2N + R 0

31

http://www.jhu.edu/~signals/sampling

s > 2 N 0
N 0 < c < s N 0

Applet for studying the


sampling of some signals
s = 100rad / s

c = 50rad / s
s = 120rad / s

32

16

Energy of original signal and ideal


sampled signal
non-periodic signals, Rayleighs relation
W=

x ( t ) dt = Ts

x ( kTs )
k =

periodic signals, Parsevals relation


P=

1
T0

T x ( t )
0

dt =

1
M

M 1

x ( kTs )
k =0

; M = 2 N + R;

R = 1, 2,

Power and energy can be computed in the frequency


domain also.
33

Sample and Hold


x ( t ) = x ( t ) Ts ( t ) h ( t ) = x ( t ) h ( t )
j
t
e
h ( t ) = p t t
2
2

t
2

t
t
sin
j t
2 = e 2 t
2
t

2sin

pulse amplitude modulation (PAM)


34

17

Spectrum of the sampled


and hold signal
x ( t ) = x ( t ) Ts ( t ) h ( t ) = x ( t ) h ( t )

The spectrum of the sampled and hold signal :


1
X ( ) =
Ts

k =

X ( )

j t
e 2 t

j t
e 2

t
t
sin

j t t
2 X ( k ) =
e 2 T 2t X ( k s )
s
t
k =
s
2
2

sin

t
=
T
k = s

t
t
sin

Ts
t
2 X ( k ) =
X ( k s )

s
t
k = Ts t
Ts
2

sin

35

Limitation of errors in the central spectral lobe:

2
>> M
t

Minimum duration of impulses, t


reconstruction by zero order extrapolation : particular case of PAM, for t=Ts

36

18

Natural sampling
Used in time division multiplexing (TDM) of analog signals

switch driven by a periodic rectangular train of impulses.


high impulse : input signal is transmitted
low impulse : zero.

37

x ( t ) = x ( t ) qTs ( t ) = x ( t ) h ( t ) Ts ( t )
= x (t )

k =

h ( t kTs ) =

x ( t ) h ( t kT )
s

k =

input signal multiplied with the periodic impulse train qTs(t).

j
t
h ( t ) = p t t
H ( ) = e
2
2

t
2

t
2

2sin

38

19

Natural Sampled Signal Spectrum


{

X ( ) = F x ( t ) h ( t ) Ts ( t )

sin
t

1
2

2
=
( k s )
X ( ) e 2 t

t
2
Ts k =

k s t
sin
k t

j s t
2 ( k )
2
= X ( ) e
s
Ts k s t
k =
2
numerical factor

k =

k s t
2

t
Ts

k s t
2 X ( k )
s
k s t
2

sin

39

numerical factor

No distortion of central spectral lobe, as


opposed to sampling and hold.
Reconstruction by ideal low-pass filtering like
in the case of ideal sampling.

Ts
,
H ( ) = t

0,

c
> c

M c s M

40

20

Connection between spectra of discrete


and corresponding continuous signals
xa ( t )
X a ( ) ; xd [ n] = xa ( nTs )
X d ()
1
X ( ) =
x ( t ) = x ( t ) Ts ( t )
Ts

2
Ts

= F xa ( kTs ) ( t kTs )
k =

( t kTs )
k =

1
X ( ) =
Ts

s =

X ( ) = F xa ( t ) ( t kTs )
k =

x ( t ) = x ( t ) Ts ( t )
= xa ( t )

X a ( k s ) ,
k =

k =

xa ( kTs ) F { ( t kTs )}
k =

xa ( kTs ) e jkT
k =

X a ( k s ) =

41

xa ( kTs ) e jkT

k =

The Discrete Fourier spectrum:

X d () =

k =

xd [ k ] e jk =

xa ( kTs ) e jk

k =

It can be observed that:

xa ( kTs ) e jkT

k =

jk
= xa ( kTs ) e
=
Ts k =

Connection between spectra of discrete and corresponding continuous


signals :

X d () =

1
Ts

Xa T
k =

Ts

42

21

The link between the two frequency axes of spectra of the discrete
signal and of the corresponding continuous signal is:

= Ts
spectrum X d ( ) periodic

The maximum frequencies are also related:


M = M Ts ;

Ts

43

Sampling of discrete-time signals


Unknown maximum frequency of a band-limited signal
generally use maximum sampling frequency allowed
Problem: the sampling frequency used is too high
(oversampling).
Solution: reduce the number of samples after the signal
was sampled = Sampling a discrete-time signal
x [ n ] = x [ n ] N [ n ] = x [ n ]
=

[ n kN ]
k =

x [ kN ] [ n kN ]
k =
44

22

sampling step N=3

45

Spectrum of Discrete-time Sampled


Signal
N [ n ]
s s ( ) = s

( ks ) ;
k =

s =

2
N

s =

2
N

X ( ) = F { x [ n ] N [ n ]}
=

1
2
X ()
( k s ) ;
2
N k =

Spectrum of a discrete-time sampled signal = periodic


repetition of the spectrum of the original signal
N 1
1
1
X r ( ) = X r ( ) ( k s ) =
N
N
k =0

N 1

X r ( k s ),
k =0

s =

2
N
46

Restriction for one period, 2

23

sampling step N=3

Spectrum periodic of period s


47

The continuous-time signal, x(t), band-limited at M , ideal sampled,


sampling step Ts band-limited discrete-time signal x[n], also
sampled, step N.
The spectral lobes do not overlap if the analog signal x(t) could have
been sampled with the sampling step Ts=NTs following the sampling
theorem. Initially the signal was oversampled.
Because the maximum frequency is M=MTs, S=2/N, the perfect
reconstruction condition is:
s 2M
NTs

;
M

Ts

Ts = NTs

48

24

Aliasing error

s M < M
49

Reconstruction of discrete-time
signal from its samples

ideal low-pass filter:


N ,
Hr () =
0,

2k c
M c s M .
otherwise

50

25

Discrete-time Ideal Low-pass


Filter

1, 2k < c , k
H () =
0, otherwise

h [ n] =

sin c n
n

51

Sampling and Decimation of a


Discrete-Time Signal
The zero samples bring no information
after sampling the discrete-time signal, so
they can be omitted.

Example for
N=2

N-1 zeros between 2 consecutive samples


Discrete-time sampling

Decimated signal x D [ n] : omitting zerovalued samples.


Relation between sampled discrete-time
signal and decimated version

Decimation

x D [n] = x[Nn].

Recover non-decimated signal : insert N-1


zeros between pairs of consecutive samples.
52

26

Spectrum of sampled and decimated discrete-time signal :


X D ( ) = F { xD [ n ]} =

n =

xD [ n ]e jn =

n =

x [ nN ]e jn =

sampled discrete-time signal

k = 0:

m=

x [ m ] e

jm
N

= X
N

initial discrete-time signal

1
X ( ) =
N

1
X Dr ( ) =
N

N 1

X ( k )
s

k =0

N 1

k 2

X r
k =0

N M
0
(1/ N ) X ( / N )

The spectral lobes of the sampled and decimated signal are N times
larger than the spectral lobes of the signal x[n].

53

example N=2.

Spectrum of original signal

Spectrum of sampled signal

Spectrum of sampled and


decimated signal

54

27

Sampling of spectrum. Finite


duration discrete-time signals
Processing the signal in frequency using a computer requires the
spectrum to be discrete! For a discrete-time signal x[n], its spectrum
X() is sampled, but with what sample frequency/step?
X ( ) = X ( ) s ( ) = X ( )

X ( k s ) ( k s )
( k s ) = k
=
k =

55

1
[ n ]
s ( )
s N
x [ n] = F
s =

s =

2
N

{ X ( ) s ( )} = F 1 { X ( )} F 1 {s ( )} = x [ n] 1s N [ n];

2
N

The signal obtained by sampling the spectrum of the signal x[n]


is an extension by repetition with period N of the original signal
x[n].

x [n] =

N
x [ n kN ]
2 k =

Reconstruction condition : x[n] finite duration, MN.


56

28

57

Sample the spectrum of the finite duration signal x [n] (zero for n<0
and n>M-1) periodic signal ~x [n] , period N = 2 / s
Reconstruction condition: If N M

, no overlapping.

multiplication with the temporal window:


2
, 0 n N 1
xr [ n] = x [ n] = x [ n ] wr [ n] ; wr [ n] = N
0,
otherwise

Low sampling step, N<M successive temporal groups


overlap; aliasing error appears.
Original signal can not be reconstructed using a temporal
window.

58

29

Practical Sampling of
Continuous-time Signals
bandwidth of the signal to be sampled not known.
high frequency spectral components, not important for the
application (e.g. produced by the noise that perturbs the useful
signal)
aliasing errors. Avoid using low-pass filter: anti-aliasing filter
before the sampling system.

59

digital telephony system (audio signal) :


maximum frequency fM=3.4 kHz
Theoretical sampling frequency fs=6.8 kHz
sampling frequency fs=8 kHz
television system (video signal):
maximum frequency fM=5 MHz
Theoretical sampling frequency fs=10 MHz
Sampling frequency fs=18 MHz
60

30

originalspeech.wav

Speech signal without aliasing.


Speech signal with aliasing.

aliasingspeech.wav

music.wav

Music signal without aliasing.


Music signal with aliasing.

aliasingmusic.wav

61

Sampling of Band-pass Signals


Spectrum of low-pass signals centered on 0.
Spectrum of band-pass signals has a support of the form
supp {X ( )} = M , m m , M

Perfect reconstruction of ideal sampled


band-pass signal using WKS theorem:
s2M.
Occasionally, perfect reconstruction of
ideal sampled band-pass signals can be
achieved even if a sampling frequency
inferior to the Nyquist frequency was
used.
62

31

Narrow-band Band-pass Signals


Narrow-band band-pass signals :

M m
<1
m

Support of spectrum for ideal sampled narrow-band band-pass signal


supp {X s ( )} = { M + ns , m + ns m + ns , M + ns }
n

Here: s= M

Perfect reconstruction: ideal band-pass filter even for sampling


frequency inferior to the Nyquist frequency

63

Ideal Band-pass Filter

1,
H BP ( ) =
0,

c1 < < c2

hBP ( t ) =

otherwise

= pc 2 ( ) pc1 ( )

sin c 2t sin c1t

t
t

64

32

Perfect reconstruction condition :

M + k s , m + k s m + l s , M + ls =
Translation of interval
[m, M] with ls

Translation of interval
[-M,-m] with ks

For l=0:

k , l

M + k s , m + k s m , M = , k
M + k s m
2
2
M s m

+
+

1
k
) s M k +1
M (

If there are integer values of k for which this condition is satisfied then there are
values for the sampling frequency inferior to the Nyquist frequency, for which the
narrow-band band-pass signals can be reconstructed from their samples.
65

0<k

m
= n0
M m

sampling frequency must belong to intervals of the form:


2M 2m
k +1 , k

with

k {1, , n0 }

Example

If m = 8 and M = 10 then

n0 =

m
=4
M m

k =1,2,3, 4.

The corresponding intervals for the sampling frequency are:

s {4} [5, 5.33] [ 6.66, 8] [10, 16] [ 20, ]

66

33

Вам также может понравиться