Tải bản đầy đủ

Bài giảng Xử lý tín hiệu số: Chapter 1 - Hà Hoàng Kha

Chapter
p 1
Sampling and Reconstruction
Ha Hoang Kha, Ph.D.Click to edit Master subtitle style
Ho Chi Minh City University of Technology
@
Email: hhkha@hcmut.edu.vn

CuuDuongThanCong.com

https://fb.com/tailieudientucntt


Content
™ Sampling
‰ Sampling theorem
‰ Spectrum of sampling signals

™ Antialiasing prefilter
‰ Ideal
Id l prefilter

fil
‰ Practical prefilter

™ Analog reconstruction
‰ Ideal reconstructor
‰ Practical reconstructor

Ha H. Kha

2
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


Review of useful equations
™ Linear system

Linear system
h(t)
H(f)

x(t )
X(f )

y (t ) = x(t ) ∗ h(t )
Y ( f ) = X ( f )H ( f )

™ Especially,
Especially x(t ) = A cos(2π f 0t + θ )
y (t ) = A | H ( f 0 ) | cos(2π f 0t + θ + arg( H ( f 0 )))

1
cos(2π f 0t ) ←⎯→ [δ ( f + f 0 ) + δ ( f − f 0 )]
2
1
sin(2π f 0t ) ←⎯→
← FT → j[δ ( f + f 0 ) − δ ( f − f 0 )]
2


1
™ Trigonometric formulas: cos(a) cos(b) = [cos(a + b) + cos(a − b)]
2
1
sin( a) sin(b) = − [cos( a + b) − cos( a − b)]
2
1
sin( a) cos(b) = [sin( a + b) + sin( a − b)]
2

™ Fourier transform:

Ha H. Kha

FT

3
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


1. Introduction
™ A typical signal processing system includes 3 stages:

™ The
Th analog
l signal
i l is
i digitalized
di i li d b
by an A/D converter
™ The digitalized samples are processed by a digital signal processor.
‰ The digital processor can be programmed to perform signal processing
operations such as filtering, spectrum estimation. Digital signal processor can be
a general purpose computer, DSP chip or other digital hardware.

™ The resulting output samples are converted back into analog by a
D/A converter.
Ha H. Kha

4
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


2. Analog to digital conversion
™ Analog to digital (A/D) conversion is a three-step process.

x(t)

Sampler
t=nT

x(t)

x(nT)≡x(n)
( ) ( ) Quantizer xQ(n) Coder
A/D converter
x(n)

t

Ha H. Kha

n

5
CuuDuongThanCong.com

11010

111 xQ(n)
110
101
100
011
010
001
000

n

Sampling and Reconstruction
https://fb.com/tailieudientucntt


3. Sampling
™ Sampling is to convert a continuous time signal into a discrete time
signal The analog signal is periodically measured at every T seconds
signal.

™ x(n)≡x(nT)=x(t=nT),
( ) ( ) (
), n=….-2,, -1,, 0,, 1,, 2,, 3……..
™ T: sampling interval or sampling period (second);
™ fs=1/T: sampling rate or sampling frequency (samples/second or
Hz)
Ha H. Kha

6
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


3. Sampling-example 1
™ The analog signal x(t)=2cos(2πt) with t(s) is sampled at the rate fs=4
Hz. Find the discrete-time signal
g x(n)
( )?
Solution:
™ x(n)≡x(nT)=x(n/fs)=2cos(2πn/fs)=2cos(2πn/4)=2cos(πn/2)
n

0

1

2

3

4

x(n)

2

0

‐2

0

2

™ Plot the signal

Ha H. Kha

7
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


3. Sampling-example 2
™ Consider the two analog sinusoidal signals
7
1
x1 (t ) = 2 cos(2π t ),
) x2 (t ) = 2cos(2π t ); t (s)
8
8
These signals are sampled at the sampling frequency fs=1 Hz.
Fi d the
Find
h discrete-time
di
i signals
i l ?
Solution:

1
71
7
) = 2 cos(2π
n) = 2 cos( π n)
fs
81
4
1
π
= 2 cos((2 − )π n) = 2 cos( n)
4
4
1
11
1
x2 (n) ≡ x2 (nT ) = x2 (n ) = 2 cos(2π
n) = 2 cos( π n)
fs
81
4
x1 (n) ≡ x1 (nT ) = x1 (n

™ Observation: x1(n)=x2(n) Æ based on the discrete-time signals, we
cannot tell which of two signals are sampled ? These signals are
called “alias”
Ha H. Kha

8
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


3. Sampling-example 2
f2=1/8 Hz

f1=7/8 Hz

fs=1 Hz

Fig: Illustration of aliasing

Ha H. Kha

9
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


3. Sampling-Aliasing of Sinusoids
™ In general, the sampling of a continuous-time sinusoidal signal
p g rate fs=1/T
/ results in a discretex(t ) = A cos(2π f 0t + θ ) at a sampling
time signal x(n).
™ The sinusoids xk (t ) = A cos(2π f k t + θ ) is sampled at fs , resulting in a
discrete time signal xk(n).
™ If fk=f0+kfs, k=0,
k=0 ±1,
±1 ±2,
±2 …., then x(n)=xk(n) .
Proof: ((in class))
™ Remarks: We can that the frequencies fk=f0+kfs are indistinguishable
from the frequency f0 after sampling and hence they are aliases of f0
Ha H. Kha

10
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


4. Sampling Theorem-Sinusoids
™ Consider the analog signal x(t ) = A cos(Ωt ) = A cos(2π ft ) where Ω is
the frequency
q
y (rad/s)
(
) of the analogg signal,
g , and f=Ω/2π is the
frequency in cycles/s or Hz. The signal is sampled at the three rate
fs=8f, fs=4f, and fs=2f.

Fi Sinusoid
Fig:
Si
id sampled
l d at diff
different rates
™ Note that

f s samples / sec samples
=
=
f
cycles
l / sec
cycle
l

™ To sample a single sinusoid properly, we must require f s ≥ 2 samples
f

Ha H. Kha

11
CuuDuongThanCong.com

cycle

Sampling and Reconstruction
https://fb.com/tailieudientucntt


4. Sampling Theorem
™ For accurate representation of a signal x(t) by its time samples x(nT),
two conditions must be met:
1) The signal x(t) must be bandlimitted, i.e., its frequency spectrum must
be limited to fmax .

Fig:
g Typical
yp
bandlimited spectrum
p
2) The sampling rate fs must be chosen at least twice the maximum
f s ≥ 2 f max
frequency fmax.
™ fs=2fmax is called Nyquist rate; fs/2 is called Nyquist frequency;
[ fs/2,
[-f
/2 fs/2] is
i Nyquist
N i interval.
i
l
Ha H. Kha

12
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


4. Sampling Theorem
™ The values of fmax and fs depend on the application
Application
pp

fmax

fs

Biomedical

1 KHz

2 KHz

Speech

4 KHz

8 KHz

Audio

20 KHz

40 KHz

Video

4 MHz

8 MHz

Ha H. Kha

13
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


4. Sampling Theorem-Spectrum Replication


™ Let x(nT ) = x (t ) = x(t ) ∑ δ (t − nT ) = x(t ) s(t ) where s(t ) =
n =−∞



∑ δ (t − nT )

n =−∞

™ s(t) is periodic, thus, its Fourier series are given by
s (t ) =





n =−∞

S n e j 2π f s nt where S n =

1
1
1
− j 2π f s nt
δ (t )e
dt = ∫ δ (t )dt =

TT
TT
T

1 ∞ j 2π f s nt
Thus, s(t ) = ∑ e
T n =−∞

1

which results in
x (t ) = x(t ) s(t ) = ∑ x(t )e j 2π nf st
T n =−∞

1 ∞

™ Taking the Fourier transform of x (t ) yields X ( f ) = ∑ X ( f − nf s )
T n =−∞

™ Observation: The spectrum of discrete-time signal is a sum of the
original spectrum of analog signal and its periodic replication at the
i
interval
l fs.
Ha H. Kha

14
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


4. Sampling Theorem-Spectrum Replication

™ fs/2 ≥ fmax

Fig: Spectrum replication caused by sampling
Fi Typical
Fig:
T i l badlimited
b dli i d spectrum
™ fs/2 < fmax

Fig: Aliasing caused by overlapping spectral replicas
Ha H. Kha

15
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


5. Ideal Analog reconstruction

Fig: Ideal reconstructor as a lowpass filter
™ An ideal reconstructor acts as a lowpass filter with cutoff frequency
equal to the Nyquist frequency fs/2.
⎧T
H
(
f
)
=
™ An ideal reconstructor (lowpass filter)

⎩0

Then

f ∈ [− f s / 2, f s / 2]
otherwise
othe
wise



X a ( f ) = X ( f )H ( f ) = X ( f )

Ha H. Kha

16
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


5. Analog reconstruction-Example 1
™ The analog signal x(t)=cos(20πt) is sampled at the sampling
frequency fs=40 Hz.
a) Plot the spectrum of signal x(t) ?
b) Find
Fi d the
h discrete
di
time
i signal
i l x(n)
( )?
c) Plot the spectrum of signal x(n) ?
d) The signal x(n) is an input of the ideal reconstructor,
reconstructor find the
reconstructed signal xa(t) ?

Ha H. Kha

17
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


5. Analog reconstruction-Example 2
™ The analog signal x(t)=cos(100πt) is sampled at the sampling
frequency fs=40 Hz.
a) Plot the spectrum of signal x(t) ?
b) Find
Fi d the
h discrete
di
time
i signal
i l x(n)
( )?
c) Plot the spectrum of signal x(n) ?
d) The signal x(n) is an input of the ideal reconstructor,
reconstructor find the
reconstructed signal xa(t) ?

Ha H. Kha

18
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


5. Analog reconstruction
™ Remarks: xa(t) contains only the frequency components that lie in the
Nyquist interval (NI) [-f
[ fs//2,
//2 fs/2].
/2]
sampling
p g at fs
ideal reconstructor
™ x(t), f0 ∈ NI ------------------> x(n) ----------------------> xa(t), fa=ff0
sampling at fs
ideal reconstructor
™ xk(t), fk=f0+kfs------------------> x(n) ----------------------> xa(t), fa=f0
™ The
Th frequency
f
fa off reconstructedd signal
i l xa(t)
( ) is
i obtained
b i d by
b adding
ddi
to or substracting from f0 (fk) enough multiples of fs until it lies
within the Nyquist interval [[-ffs//2,
//2 fs/2]..
/2] That is
f a = f mod( f s )
Ha H. Kha

19
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


5. Analog reconstruction-Example 3
™ The analog signal x(t)=10sin(4πt)+6sin(16πt) is sampled at the rate 20
Hz. Findd the
h reconstructed
d signall xa(t) ?

Ha H. Kha

20
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


5. Analog reconstruction-Example 4
™ Let x(t) be the sum of sinusoidal signals
x(t)=4+3cos(πt)+2cos(2πt)+cos(3πt)
x(t)
4+3cos(πt)+2cos(2πt)+cos(3πt) where t is in milliseconds.
milliseconds
a) Determine the minimum sampling rate that will not cause any
aliasing effects ?
b) To observe aliasing effects, suppose this signal is sampled at half its
Nyquist rate. Determine the signal xa(t) that would be aliased with
x(t) ? Plot the spectrum of signal x(n) for this sampling rate?

Ha H. Kha

21
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


6. Ideal antialiasing prefilter
™ The signals in practice may not bandlimitted, thus they must be
f l d by
filtered
b a lowpass
l
fl
filter

Fi Ideal
Fig:
Id l antialiasing
ti li i prefilter
p filt

Ha H. Kha

22
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


6. Practical antialiasing prefilter
™ A lowpass filter: [-fpass, fpass] is the frequency range of interest for the
application
l
(ffmax=ffpass)
™ The Nyquist frequency fs/2 is in the middle of transition region.
™ The stopband frequency fstop and the minimum stopband attenuation
Astop dB must be chosen appropriately to minimize the aliasing
effects.
effects
f s = f pass + f stop

Fig: Practical antialiasing lowpass prefilter
Ha H. Kha

23
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


6. Practical antialiasing prefilter
™ The attenuation of the filter in decibels is defined as
A( f ) = −20 log10

H( f )
(dB)
H ( f0 )

where f0 is a convenient reference frequency, typically taken to be at
p filter.
DC for a lowpass
™ α10 =A(10f)-A(f) (dB/decade): the increase in attenuation when f is
g byy a factor of ten.
changed
™ α2 =A(2f)-A(f) (dB/octave): the increase in attenuation when f is
changed by a factor of two.
™ Analog filter with order N, |H(f)|~1/fN for large f, thus α10 =20N
(dB/decade) and α10 =6N (dB/octave)
Ha H. Kha

24
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


6. Antialiasing prefilter-Example
™ A sound wave has the form
x(t ) = 2 A cos(10π t ) + 2 B cos(30π t ) + 2C cos(50π t )
+ 2 D cos(60π t ) + 2 E cos(90π t ) + 2 F cos(125π t )

where t is in milliseconds. What is the frequency content of this
g ? Which parts
p
of it are audible and whyy ?
signal
This signal is prefilter by an anlog prefilter H(f). Then, the output y(t)
prefilter is sampled
p at a rate of 40KHz and immediatelyy
of the p
reconstructed by an ideal analog reconstructor, resulting into the final
analog output ya(t), as shown below:

Ha H. Kha

25
CuuDuongThanCong.com

Sampling and Reconstruction
https://fb.com/tailieudientucntt


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×