0% found this document useful (0 votes)
17 views31 pages

DSP Lec 01 Sampling and Reconstruction

The document discusses the concepts of sampling and reconstruction in signal processing, detailing the processes of analog to digital conversion, sampling, and the sampling theorem. It emphasizes the importance of the Nyquist rate for accurate signal representation and the effects of aliasing when sampling frequencies are insufficient. Additionally, it covers the role of antialiasing prefilters and ideal reconstructors in maintaining signal integrity during these processes.

Uploaded by

huyendtt214
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views31 pages

DSP Lec 01 Sampling and Reconstruction

The document discusses the concepts of sampling and reconstruction in signal processing, detailing the processes of analog to digital conversion, sampling, and the sampling theorem. It emphasizes the importance of the Nyquist rate for accurate signal representation and the effects of aliasing when sampling frequencies are insufficient. Additionally, it covers the role of antialiasing prefilters and ideal reconstructors in maintaining signal integrity during these processes.

Uploaded by

huyendtt214
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

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: [email protected]
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 Sampling and Reconstruction


Review of useful equations

x(t ) Linear system y (t ) = x(t ) ∗ h(t )


™ Linear system h(t)
X(f ) H(f) Y ( f ) = X ( f )H ( f )

Especially x(t ) = A cos(2π f 0t + θ )


™ Especially,
y (t ) = A | H ( f 0 ) | cos(2π f 0t + θ + arg( H ( f 0 )))
1
™ Fourier transform: cos(2π f 0t ) ←⎯→ [δ ( f + f 0 ) + δ ( f − f 0 )]
FT

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
Ha H. Kha 3 Sampling and Reconstruction
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 Sampling and Reconstruction


2. Analog to digital conversion

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

x(t) Sampler ( ) ( ) Quantizer xQ(n) Coder


x(nT)≡x(n) 11010

t=nT
A/D converter

x(t) x(n) 111 xQ(n)


110
101
100
011
t n 010 n
001
000

Ha H. Kha 5 Sampling and Reconstruction


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 Sampling and Reconstruction
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 Sampling and Reconstruction


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π
x1 (n) ≡ x1 (nT ) = x1 (n 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
™ 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 Sampling and Reconstruction
3. Sampling-example 2

f2=1/8 Hz f1=7/8 Hz

fs=1 Hz

Fig: Illustration of aliasing

Ha H. Kha 9 Sampling and Reconstruction


3. Sampling-Aliasing of Sinusoids

™ In general, the sampling of a continuous-time sinusoidal signal


x(t ) = A cos(2π f 0t + θ ) at a sampling
p g rate fs=1/T
/ results in a discrete-
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).
k=0 ±1,
™ If fk=f0+kfs, k=0, ±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 Sampling and Reconstruction


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
f s samples / sec samples
™ Note that = =
f cycles
l / sec cycle
l
™ To sample a single sinusoid properly, we must require f s ≥ 2 samples
f cycle
Ha H. Kha 11 Sampling and Reconstruction
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


frequency fmax. f s ≥ 2 f max

™ 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 Sampling and Reconstruction
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 Sampling and Reconstruction


4. Sampling Theorem-Spectrum Replication
∞ ∞

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

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



1 1 1
s (t ) = ∑
n =−∞
S n e j 2π f s nt where S n =
TT∫ δ (t )e − j 2π f s nt
dt = ∫ δ (t )dt =
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 Sampling and Reconstruction
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 Sampling and Reconstruction
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 f ∈ [− f s / 2, f s / 2]
™ An ideal reconstructor (lowpass filter) H ( f ) = ⎨
⎩0 otherwise
othe wise
Then  
X a ( f ) = X ( f )H ( f ) = X ( f )

Ha H. Kha 16 Sampling and Reconstruction


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 Sampling and Reconstruction


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 Sampling and Reconstruction


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 byb 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 Sampling and Reconstruction


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 Sampling and Reconstruction


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 Sampling and Reconstruction


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 Sampling and Reconstruction


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 Sampling and Reconstruction
6. Practical antialiasing prefilter

™ The attenuation of the filter in decibels is defined as

H( f )
A( f ) = −20 log10 (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 Sampling and Reconstruction


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
signal p of it are audible and whyy ?
This signal is prefilter by an anlog prefilter H(f). Then, the output y(t)
of the p
prefilter is sampled
p at a rate of 40KHz and immediatelyy
reconstructed by an ideal analog reconstructor, resulting into the final
analog output ya(t), as shown below:

Ha H. Kha 25 Sampling and Reconstruction


6. Antialiasing prefilter-Example

Determine the output signal y(t) and ya(t) in the following cases:
a)When there is no prefilter, that is, H(f)=1 for all f.
b)When H(f) is the ideal prefilter with cutoff fs/2=20 KHz.
c)When H(f) is a practical prefilter with specifications as shown
below:

The filter’s phase response is assumed to be ignored in this example.

Ha H. Kha 26 Sampling and Reconstruction


7. Ideal and practical analog reconstructors

™ An ideal reconstructor is an ideal lowpass filter with cutoff Nyquist


f
frequency f/
fs/2.

Ha H. Kha 27 Sampling and Reconstruction


7. Ideal and practical analog reconstructors

sin(π f s t)
™ The ideal reconstructor has the impulse response: h(t ) =
which
h h is not realizable l response is not casualπl f s t
l bl since its impulse

™ It is practical to use a
staircase reconstructor

Ha H. Kha 28 Sampling and Reconstruction


7. Ideal and practical analog reconstructors

Fig: Frequency response of staircase recontructor

Ha H. Kha 29 Sampling and Reconstruction


7. Practical reconstructors-antiimage postfilter

™ An analog lowpass postfilter whose cutoff is Nyquist frequency fs/2


is usedd to remove the
h surviving spectrall replicas.
l

Fig: Analog anti-image postfilter

Fi Spectrum
Fig: S after
f postfilter
fil
Ha H. Kha 30 Sampling and Reconstruction
8. Homework

™ Problems: 1.2, 1.3, 1.4, 1.5, 1.9

Ha H. Kha 31 Sampling and Reconstruction

You might also like