DSP Lec 01 Sampling and Reconstruction
DSP Lec 01 Sampling and Reconstruction
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
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
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.
t=nT
A/D converter
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
f2=1/8 Hz f1=7/8 Hz
fs=1 Hz
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
Application
pp fmax fs
Biomedical 1 KHz 2 KHz
Speech 4 KHz 8 KHz
Audio 20 KHz 40 KHz
Video 4 MHz 8 MHz
fs/2 ≥ fmax
Fi Typical
Fig: T i l badlimited
b dli i d spectrum
fs/2 < fmax
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
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 )
Fi Ideal
Fig: Id l antialiasing
ti li i prefilter
p filt
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
H( f )
A( f ) = −20 log10 (dB)
H ( f0 )
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:
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
Fi Spectrum
Fig: S after
f postfilter
fil
Ha H. Kha 30 Sampling and Reconstruction
8. Homework