Sie sind auf Seite 1von 0

Curtin University, Australia 3-1

YH Leung (2005, 2006, 2007, 2012)


SAMPLING


In electrical engineering, discrete-time signals usually arise from the periodic
sampling of continuous-time signals

This section studies the process of sampling, from a mathematical modelling
perspective




1 Signal Model

Consider following simple digital signal processing system


Fig. 1 Sampled data system
Continuous-time signal ( )
c
x t sampled at sampling frequency
s
w
Analog-to-digital converter ADC converts sampled and held (S/H) value
of ( )
c
x t at time t nT = , 2
s
T p w = , to a digital number = [ ] ( )
c
x n x nT
Digital-to-analog converter DAC converts [ ] x n back to an analog signal ( )
c
y t
T is sampling period


Fig. 2 Output of sampled data system
S/H ADC DAC
x
c
(t)
x[n]
y
c
(t)
w
s
t
0
T
x
c
(t)
y
c
(t)
x[n]
Curtin University, Australia 3-2
YH Leung (2005, 2006, 2007, 2012)
Assuming ADC, [ ] x n and DAC has infinite precision, digital signal processing
system can be modelled as follows


Fig. 3 Model of sampled data system

( )
T
s t is impulse train function
( ) ( )
T
n
s t t nT d

=-
= -

(1)
ZOH is zero order hold whose impulse response is shown Fig. 4



Fig. 4 Equivalent impulse response of ZOH


Fig. 5 Output of model



Comparing output signals of Figs. 2 and 5, we see model of Fig. 3 is valid

ZOH
x
c
(t) x
s
(t) z
c
(t)
2T T -T 0
t
( )
T
s t

1
h
ZOH
(t)
0 T
t
t
0
T
x
c
(t)
z
c
(t)
x
s
(t)
Curtin University, Australia 3-3
YH Leung (2005, 2006, 2007, 2012)
2 Sampling and Aliasing





Impulse train ( )
T
s t has Fourier transform
( ) ( )
T s s
k
S j j jk w w d w w

=-
= -

(2)

1
( ) ( ) ( ) ( ) ( )
2
s T c T c
X j S j X j S j X j j d w w w x w x x
p

-
\ = * = -


( ) ( ( ) ) )
2
(
s
s
c s T c
k
X j S j X j X j jk
w
w
p
w w w w

=-
= - \ = *

(3)
or
1
( ) ( )
s c s
k
X j X j jk
T
w w w

=-
= -

(4)
where ( )
c
X j w is Fourier transform of ( )
c
x t


Fig. 6 Spectrum of sampled signal


ZOH
x
c
(t) x
s
(t) z
c
(t) = y
c
(t)
2T T -T 0
t
( )
T
s t

X
c
(jw)
0
1
w
1/T
w
N
X
s
(jw)
w
0 w
s
2w
s
-w
s
w
N
Curtin University, Australia 3-4
YH Leung (2005, 2006, 2007, 2012)
If (i) ( )
c
x t is bandlimited to
N N
w w w - < <+ , and
(ii) 2
N s
w w <
then ( )
c
x t can be recovered from ( )
s
x t by passing ( )
s
x t through an ideal low
pass filter with cut-off frequency between
N
w and ( )
s N
w w -


Fig. 7 Recovery of ( )
c
x t from ( )
s
x t by low pass filtering



If ( )
c
x t is not bandlimited, or if it is bandlimited but 2
N s
w w > , then have
aliasing


Fig. 8 Aliasing



Example

4 Hz sinewave being sampled at 6 Hz. Samples acquired are indistinguishable from those of a 2 Hz
sinewave

X
s
(jw)
w
0 w
s
2w
s
-w
s
low pass filter
w
N
1/T
X
s
(jw)
w
0 w
s
2w
s
-w
s
w
N
t
0
4 Hz -2 Hz
Curtin University, Australia 3-5
YH Leung (2005, 2006, 2007, 2012)
(Baseband) Nyquist Sampling Theorem
Let ( )
c
x t be a bandlimited signal with
( ) 0 for
c N
X j w w w = (5)
( )
c
x t is uniquely determined by its samples = [ ] ( )
c
x n x nT , n , if

p
w w = >
2
2
s N
T
(6)




N
w is called the Nyquist frequency
2
N
w is called the Nyquist rate



In practice, ( )
c
x t generally has a very large (maybe infinite) bandwidth, but
beyond a certain frequency
1
w , it often has little energy

Therefore, aliasing can be prevented as follows:
(i) first filter ( )
c
x t with a low pass anti-aliasing filter with cut-off frequency
1
w
(ii) then sample it at a rate
1
2
s
w w >


Fig. 9 Anti-aliasing filtering



As it turns out, anti-aliasing filtering is essential even if it is known ( )
c
x t is
bandlimited anti-aliasing filter prevents high frequency noise from aliasing into
frequency band of ( )
c
x t

ADC
x
c
(t) x[n]
w
s
S/H
anti-alisaing
LPF
Curtin University, Australia 3-6
YH Leung (2005, 2006, 2007, 2012)
Finally, we establish following result
{ }
2
1
DTFT [ ] ( ) ( ) ( )
j
s c
T T T
k
x n X e X j X j jk
T
q
q q p

=-
= = = -

(7)
where { } w = ( ) ( )
c c
X j x t (8)



From Fig. 3

{ }
{ }
( ) ( ) ( )
( ) ( )
( ) ( )
[ ] ( )
[ ] ( )
[ ]
j t
s s s
j t
c
n
j t
c
n
j t
n
j t
n
j
X j x t x t e dt
x t t nT e dt
x nT t nT e dt
x n t nT e dt
x n t nT e dt
x n e
w
w
w
w
w
w
w
d
d
d
d

-
-

-
-
=-

-
-
=-

-
-
=-

-
-
=-
-
= =



= -






= -






= -



= -
=

{ }
nT
n

=-


Hence

{ }
( ) [ ] [ ] ( )
jn T jn j
s
T
n n
T
X j x n e x n e X e
w q q
q w
q w
w

- -
=
=- =-
=
= = =

(9)

Now, recall Eq. (4)

1
( ) ( )
s c s
k
X j X j jk
T
w w w

=-
= -

(4)
Substituting Eq. (4) into Eq. (9) yields

2
1
( ) ( ) ( )
j
s c
T T T
k
X e X j X j jk
T
q
q q p

=-
= = -

(10)

Curtin University, Australia 3-7
YH Leung (2005, 2006, 2007, 2012)
3 Digital to Analog






( )
s
x t does not really exist, but ( )
c
y t certainly does
How are ( )
c
y t and ( )
c
x t related?
How to recover ( )
c
x t from ( )
c
y t ?



Transfer function of ZOH given by

( )
2
ZOH
sin 2
( )
2
j T
T
H j T e
T
w
w
w
w
-
= (11)
Therefore, from
ZOH
( ) ( ) ( )
c s
Y j X j H j w w w = , we get


Fig. 10 Distortion due to ZOH
ZOH
x
c
(t) x
s
(t) z
c
(t) = y
c
(t)
2T T -T 0
t
( )
T
s t

w
w
0
0
1
1T
w
s
w
s
w 2
s
w 2
s
sinx
x
( )
c
Y j w
w ( )
s
X j
Curtin University, Australia 3-8
YH Leung (2005, 2006, 2007, 2012)
Spectrum of ( )
c
x t distorted by ZOH: sinx x distortion



Staircase nature of ( )
c
y t consistent with appearance of high frequency
components centred about , 2 ,
s s
w w w =



sinx x distortion can be corrected by interpolating low pass filter ( )
i
H j w


Fig. 11 sin x/x distortion correction by interpolating filter



Alternatively, sinx x distortion can be compensated digitally in DSP


Fig. 12 sin x/x distortion correction by digital pre-compensation



At best, recovered waveform ( )
c
x t can only be a delayed version of ( )
c
x t
because of inevitable delays in ADC, DAC, w ( )
i
H j , and pre-compensation filter
w
w
1
1
0
0 w
s
w 2
s
w ( )
i
H j
Ideal interpolating
filter
Zero-order hold
DAC
x[n] y
c
(t)
H
i
(jw)
Ideal LPF
( )
c
x t
Pre-compensation
filter
Curtin University, Australia 3-9
YH Leung (2005, 2006, 2007, 2012)
4 Practical Baseband Sampling

4.1 Aperture Time




S/H has an integrator which is charged by ( )
c
x t over a small time interval
a
T
called aperture time
When charged, integrator output is held and subsequently converted to digital
form by ADC
During ADC conversion, integrator is reset to zero (dumped) in readiness for
next conversion cycle



Appendix shows aperture time causes a high frequency roll-off in [ ] x n

Fig. 13 Spectral distortion due to non-zero aperture time where
( )
( )
( )
s s
c s
X j
X j T
lw
f l
lw
=

High frequency roll-off can be compensated through ( )
i
H j w or digitally
S/H ADC
x
c
(t)
x[n]
w
s
0.2
a
T T =
0.5
a
T T =
1
a
T T =
0.1
a
T T =
Curtin University, Australia 3-10
YH Leung (2005, 2006, 2007, 2012)
4.2 Quantisation Error

Fig. 14 3-bit ADC of the midtread type



Suppose ADCs reference voltage is V and digital output
d
x is a B-bit binary
word. Quantisation step given by

1
2
2 2
B B
V V
-
D = = (12)
Suppose quantisation error -
c d
x x can be modelled as a white noise process
uniformly distributed between 2 D
1
. Variance or power of quantisation error
given by

2 2
2
2 2
2
1
12
3 4
q
B
V
q dq s
D
-D
D
= = =
D

(13)
If input signal
c
x has power
2
x
s , then signal-to-quantisation-noise ratio of a
B-bit quantiser given by

( )
2
2
SNR 10 log 6.0206 4.7712 20 log
x
x
q
V
B
s
s
s


= = + -



(14)



Eq. (14) can be used to find B required to achieve a certain SNR. However,
other errors in ADC may require us to increase B by 1 or 2


1
This requires
c
x to be sufficiently rich spectrally and its dynamic range to be large relative to D
S/H ADC
x
c
x
d
w
s
000
001
010
011
100
101
110
111
Output x
d
Input x
c +V -V

Curtin University, Australia 3-11


YH Leung (2005, 2006, 2007, 2012)
5 Bandpass Sampling

Suppose ( )
c
x t is a bandpass signal with centre or carrier frequency
c
w much
greater than its bandwidth
B
w


Fig. 15 Bandpass spectrum



( )
c
x t can be sampled at rate 1
s
T w = much lower than ( ) 2 2
c B
w w + without
incurring aliasing



Suppose 2
s c B
w w w = -


Fig. 16 Sampling translation


Can perform sampling and frequency translation simultaneously sampling
translation



In general, no aliasing if sampling rate
s
w satisfies

w w w w
w
+ -

+
2 2
1
c B c B
s
m m
, for some m (15)
and w w < 2
B s
(16)
w
0 w
c
-w
c
w
B
( )
c
X j w
w
0 w
c
-w
c
w
B
w
s
2
B
s c
w
w w = -
2 2
s c B
w w w = -
Curtin University, Australia 3-12
YH Leung (2005, 2006, 2007, 2012)
Example
40 rad/s
c
w = , 10 rad/s
B
w =

m
2
1
c B
m
w w +
+

2
c B
m
w w -

2 2
1
c B c B
m m
w w w w + -

+
?
1 45 70
2 30 35
3 22.5 23.33
4 18 17.5
5 15 14




0 10 20 30 40 50 -10 -20 -30 -40 -50
0 10 20 30 40 50 -10 -20 -30 -40 -50
0 10 20 30 40 50 -10 -20 -30 -40 -50
0 10 20 30 40 50 -10 -20 -30 -40 -50
0 10 20 30 40 50 -10 -20 -30 -40 -50
0 10 20 30 40 50 -10 -20 -30 -40 -50
Original
spectrum
w
w
w
w
w
w
aliasing
45
s
w =
35
s
w =
30
s
w =
22.5
s
w =
15
s
w =
aliasing
2
s
w

2
s
w

2
s
w

2
s
w

2
s
w

70
s
w =
3 m =
5 m =
2 m =
2 m =
1 m =
1 m =
2
s
w

Curtin University, Australia 3-13


YH Leung (2005, 2006, 2007, 2012)
Appendix Analysis of ADC Aperture Time

Model


Fig. 17 Sampling with non-zero aperture time



a
T is aperture time and integrate-and-dump has following impulse response
2




i.e., { }
w
w
w
= =
sin 2
( ) ( )
2
a
c c a
a
T
H j h t T
T
(17)



Analysis

Fourier transform of ( )
T
p t and ( )
T
s t given respectively by

2
( ) ( ) ( )
T s s
k
P j P jk j jk
T
p
w w d w w

=-
= -

(18)
and ( ) ( )
T s s
m
S j j jm w w d w w

=-
= -

(19)
where { }
sin 2
( ) ( )
2
a
a
T
P j p t
T
w
w
w
= = (20)

2
( )
c
h t is non-causal to simplify analysis. However, this does not weaken generality of the result
a
T

x
c
(t) x
s
(t)
T -2T 0
t
( )
T
p t
a(t)
b(t)

( ) p t
2T T -T 0
t
( )
T
s t

1
a
T
a
T
3T
1
h
c
(t)
t
2
a
T
-
0
2
a
T
Curtin University, Australia 3-14
YH Leung (2005, 2006, 2007, 2012)
Therefore, spectra of ( ) b t and ( )
s
x t given respectively by
{ } w w w w w w = = * ( ) ( ) ( ) ( ) ( ) ( )
c c T c
B j H j A j H j P j X j
( ) (
1
( ) ( ( ( ) ) ) )
c s s
k
c c
H j P jk X j j j A j k
T
B H j w w w w w w w

=-



= -

=

(21)
and
w w w w w

=-
= * = -

1
( ) ( ) ( ) ( )
s T s
m
X j S j B j B j jm
T


2
1
( ) ( ) ( ( ) ( ) )
c s s c s
m
s
k
H j jm P jk X j j X j m k
T
w w w w w w

=- =-



= - - +




(22)


Suppose ( )
c
x t is bandlimited to 2
s
w , i.e., ( ) 0
c
X j w = for 2
s
w w > .
Then for 2
s
w w < , Eq. (22) simplifies to

2
2
1
( ) ( ) ( ) ( )
1
( ) ( ) ( )
s c s s c
m
c c s s
m
X j H j jm P jm X j
T
X j H j jm P jm
T
w w w w w
w w w w

=-

=-



= - -



= - -



2
1
( ) ( ) ( ) ( )
s c c s s
m
X j H j jm P jm X
T
j w w w w w

=-
= -

(23)


Define
s
w
l
w
= (24)
It follows from Eqs. (17) and (20) that Eq. (23) can be written as

( ) ( ) ( ) sin ( ) sin
( )
( )
c s a a a
s s
a a
m
X j T m T T m T T
X j
T T m T T m T T
lw l p p
lw
l p p

=-
-
=
-

(25)
or
( ) ( ) ( ) sin ( ) sin
( )
( ) ( )
s s a a a
c s a a
m
X j T m T T m T T
X j T T m T T m T T
lw l p p
f l
lw l p p

=-
-
= =
-

(26)
i.e. ( ) f l , the spectral distortion from ( )
c
X j T w to ( )
s
X j w , depends only on
a
T T

( ) f l is plotted in Fig. 13
Curtin University, Australia 3-15
YH Leung (2005, 2006, 2007, 2012)
Problems


1. Let ( )
c
x t be a signal with Nyquist rate w
o
. Determine the Nyquist rate for each of the
following signals.
(a) ( ) ( 1)
c c
x t x t + -
(b) ( )
d
c
dt
x t
(c)
2
( )
c
x t
(d) ( ) cos
c o
x t t w


2. Consider the system shown below where an ideal sampler is followed by an ideal
lowpass filter to reconstruct ( )
c
x t from its samples ( )
s
x t . From the sampling theorem,
we know that if 2 w p =
s
T is greater than twice the highest frequency present in ( )
c
x t
and 2 w w =
c s
, then the reconstructed signal ( )
r
x t will exactly equal ( )
c
x t . If this
condition on the bandwidth of ( )
c
x t is violated, then ( )
r
x t will not equal ( )
c
x t . We
seek to show in this problem that if 2 w w =
c s
, then for any choice of T , ( )
r
x t and
( )
c
x t will always be equal at the sampling instants, that is,
( ) ( ) , 0, 1, 2,
r c
x nT x nT n = =

To obtain the result, first show

( ) sin ( )
( ) ( )
( )
c c
r c
c
n
t nT
x t x nT T
t nT
w w
p w

=-
-
=
-


which reduces to the following expression when 2 w w =
c s


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

=-
-
=
-


Then consider the values of a for which ( ) sin 0 a a = .


x
c
(t) x
s
(t) x
r
(t)
2T T -T 0
t
( )
T
s t

( ) w
i
H j
w
c
w -
c
T
Curtin University, Australia 3-16
YH Leung (2005, 2006, 2007, 2012)
3. The sequence
[ ] cos ,
4
p

= - < <



x n n n
was obtained by sampling a continuous-time signal
( ) ( ) cos ,
c o
x t t t w = - < <
at a sampling rate of 1000 samples/s. What are two possible positive values of
o
w that
could have resulted in the sequence [ ] x n ?


4. The following continuous-time signals ( )
c
x t are sampled. Specify a choice for the
sampling period T that will result in the discrete-time sequences shown. In each case,
is your choice of T unique? If not, give another possible choice of T .
(a) ( ) sin(10 )
c
x t t p = , [ ] sin( 4) p = x n n
(b) ( ) sin(10 ) (10 )
c
x t t t p p = , [ ] sin( 2) ( 2) p p = x n n n
(c) ( ) sin(20 ) cos(40 )
c
x t t t p p = + , [ ] sin( 5) cos(2 5) p p = + x n n n


5. Let ( )
c
h t denote the impulse response of an LTI continuous-time filter and [ ] h n the
impulse response of an LTI discrete-time filter.
(a) If ( ) ( )
t
c
h t e u t
-
= , determine the frequency response of the continuous-time filter
and sketch its magnitude.
(b) If [ ] ( )
c
h n Th nT = with ( )
c
h t as in Part (a) and
1
10
T = , determine the frequency
response of the discrete-time filter and sketch its magnitude.


6. A complex-valued continuous-time signal ( )
c
x t has the Fourier transform shown below
where
2 1
w w w D = - . This signal is sampled to produce the sequence [ ] ( )
c
x n x nT = .

(a) Sketch the Fourier transform ( )
q j
X e of the sequence [ ] x n for
2
p w = T .
(b) What is the lowest sampling frequency that can be used without incurring any
aliasing distortion, i.e., so that ( )
c
x t can be recovered from [ ] x n ?
(c) Draw the block diagram of a system that can be used to recover ( )
c
x t from [ ] x n
if the sampling rate is greater than or equal to the rate determined in Part (b).
Assume (complex) ideal filters are available.
0
1
w
2
w
w
( ) w
c
X j
w D
Curtin University, Australia 3-17
YH Leung (2005, 2006, 2007, 2012)
7. A sampled-data system is shown below.

Suppose the input signal ( )
c
x t is bandlimited with the Fourier transform shown below,
and the discrete-time system ( )
q j
H e is an ideal lowpass filter with frequency response
1,
( )
0, otherwise
q
q q <

c j
H e

(a) What is the minimum sampling rate w
s
such that no aliasing occurs in sampling
the input?
(b) If
2
p
q =
c
, what is the minimum sampling rate such that there are no frequency
aliased components in the spectrum of ( )
c
y t ?


8. The spectrum of a bandpass continuous-time signal ( )
c
x t is shown below. Determine
the lowest sampling rate that can be used such that the sampled signal sequence does
not suffer from aliasing. Sketch the spectrum of the sampled signal.



9. Suppose an ADC has reference voltages V where 5 V V = . For the input signal

1 2
( ) 0.8cos sin
c
x t t t w w = +
where
1 2
w w , determine the number of bits B that are required so that the signal-
to-quantisation-noise ratio is greater than 50 dB.

ADC DAC ( )
q j
H e
( )
c
x t ( )
c
y t
w
0 w
o
w -
o
1
( ) w
c
X j
f (kHz)
0 6 8
|X
c
(f)|
Curtin University, Australia 3-18
YH Leung (2005, 2006, 2007, 2012)
Answers


1. (a) w
o

(b) w
o

(c) 2w
o

(d) 3w
o



3. 250p or 2250p


4. (a) 1 40, 9 40
(b) 1 20 and unique
(c) 1 100, 11 100


6. (b) w w >D
s



7. (a) 2 w w >
s o

(b)
4
3
w w >
s o



8. 4 kHz


9. 10 bits

Das könnte Ihnen auch gefallen