Vous êtes sur la page 1sur 40

DIGITAL SIGNAL PROCESSING

Chapter 2:
Analog Signal Processing
Sampling and Reconstruction
Reference:
S J.Orfanidis, Introduction to Signal Processing, Prentice Hall , 1996,ISBN 0-13-209172-0
M. D. Lutovac, D. V. Toi, B. L. Evans, Filter Design for Signal Processing Using MATLAB
and Mathematica, Prentice Hall, 2001
Lectured by Prof. Dr. Thuong Le-Tien
National Distinguished Lecturer
Tel: 08-38654184; 0903 787 989
Email: ThuongLe@hcmut.edu.vn,
ThuongLe@yahoo.com

Dated on Feb 2017


Sampling and Reconstruction

1. Introduction
2. Overview of Analog
3. Sampling theorem
4. Sampling of Sinusoids
5. Spectra of Sampled
6. Analog signal reconstruction

2
1. Introduction
Three steps for digital signal processing of
analog signals
Step 1: Digitizing of analog signals:

Sampling, Quantization Analog to Digital


Conversion (ADC).
Step 2: Implementing digital signal
processor for discrete samples
Step 3: Reconstructing the analog signal

after processing Digital to Analog


Conversion (DAC)
3
2. Review of Analog signals

FOURIER Transform X(W) of x(t) is the spectrum of the


analog signal:
X ( W ) x ( t )e jW t dt
(2.1)

Where W is the radian frequency (rad/s).
and W = 2pf (2.2)

Definition of Laplace Transform:



st (2-3)
X ( s ) x(t ).e dt

4
Response of a linear system
x(t) Linear system y(t)
input h(t) output

The system is characterized by impulse response h(t). The


output y(t) is obtained by the time domain convolution :

y (t ) h(t t ' ) x(t ' )dt '

Or frequency domain:
Y (W ) H (W ). X (W )
where H(W) is the frequency response of the system.

5
H(W) is the Fourier transform of h(t)

H (W ) h( t )e jWt dt
The steady state response of a sinusoid:
x(t) = exp(jWt) Linear system y(t) = H(W)exp(jWt)
Sinusoid in H(W) Sinusoid out

Output is a sinusoid with frequency (W),


amplitude equal to the signal amplitude multiplied
by MagH(W), and phase shift equal to arg(H(W)):
x ( t ) e jWt y( t ) H (W )e jWt | H (W ) | .e jWt j arg H ( W )

6
Linear superposition: Signals x(t) has two frequency
components
jW 1 t jW 2 t
x ( t ) A1 e A2 e
After filtering
jW 1 t jW 2 t
y( t ) A1 H (W )e A2 H (W )e

Note: Filtering only change the magnitudes but not


the frequencies

7
The result is presented in frequency domain
X( W ) Y( W )
A 1 A 2

H( W ) A 1 H( W )
A 2 H( W )

W W

Spectrum of X(W)
X (W ) 2pA1 (W W 1 ) 2pA2 (W W 2 )
Spectrum of Y(W)
Y (W) H (W) X (W) H (W)(2pA1 (W W1 ) 2pA2 (W W 2 ))
2pA1 H (W1 ) (W W1 ) 2pA2 H (W 2 ) (W W 2 )

8
3. Concept of Sampling theorem

Sampling process in Fig. 3.1. x(t) is sampled


by period T, t=nT where n=0,1,2,
Many high frequency components appear
in the signal spectrum
Two questions are often provided for
1. What is the effect of sampling on the
original frequency spectrum?
2. How should one choose the sampling
interval T?

9
The spectrum of the sampled sinusoid x(nT)
will be periodic replication of the original
spectral line at intervals fs=1/T

Figure 3.1 Ideal Sampler

10
Figure 3.2. Spectrum replication caused by sampling.

With the replicated spectrum of the sampled signal, one


cannot tell uniquely What the original frequency was. It
could be any one of the replicated frequencies namely
f=f+mfs. This potential confusion of the original frequency
with another is known as aliasing and can be avoided if one
satisfies the condition of the sampling theorem

11
Sampling theorem
For accurate representation of a signal x(t) by its
time samples x(nT), two conditions must be met:
1: x(t) is bandlimited
2: Sampling frequency must be chosen to be
at least twice the maximum frequency fmax,
fs 2fmax:
fs = 2fmax is the Nyquist rate.
fs/2 is the Nyquist frequency or folding
frequency

12
Typical sampling rate for some common applications
Antialiasing Prefilter
Signal must be bandlimited therefore need to pass
through a low pass filter namely prefilter before sampling
Input spectrum
Prefiltered spectrum

prefilter

f f
0 -fs/2 fs/2

Replicated
spectrum

f
-fs 0 fs

Bandlimited
x(t) signal x(nT)
Analog lowpass Sampler and
To DSP
Analog filter x(t) quantizer digital
signal signal

Antialiasing prefilter
14
What happens if we do not sample in
accordance with the sampling theorem?
Missing important time variations between sampling instants
May arrive at the erroneous conclusion that the samples
represent a signal which is smoother than it actually is
Be confusing the true frequency content of the signal with a
lower frequency content. Such confusion of signals is called
aliasing

Aliasing in
The time domain
4. Sampling of sinusoid: x(t) = cos(2pft)
The number of samples per is given by the quantity fs/f:
f s samples / sec samples

f cycles / sec cycle

Special case with multiple frequency components in the x(t)

16
Analog reconstruction and aliasing

Define also the following family of sinusoids, for m in integer

And its sampled version


Using the property fsT=1 and the trigonometric identity

x m (nT ) e 2pj ( f mf s )Tn e 2pjfTne 2pjmf sTn e 2pjfTn x(nT )


f , f f s , f 2 f s ,..., f mf s ,...
Note that xm(t) are different from each other
but they have same samples:
17
LPF as an ideal
reconstructor

18
Example
As sinusoid f=10 Hz, sampled by fs=12Hz. The sampled
signal consists of periodic frequencies 10+m.12Hz, m = 0,
1, 2, or: , -26, -14, -2, 10, 22, 34, 46, but only fa
= 10 mod(12) = 10 12 = -2 Hz in the range of Nyquist
interval [-6,6] Hz. So the reconstructed signal with 2 Hz
is not as the original one with 10 Hz.

19
Example: 5 signals are sampled by the rate 4Hz:
sin(14pt ), sin( 6pt ), sin(2pt), sin(10pt), sin(18pt) (t second)
Let prove they are aliased each other due to their same
samples.
Sol: The frequencies of the signals: -7, -3, 1, 5, 9 Hz. They
have the same periodic replication in multiples of fs=4Hz.
Writing the five frequencies compactly:
fm=1+4m, m=-2, -1, 0, 1, 2.
xm (t ) sin(2pf mt ) sin(2p (1 4n)), m -2,-1,0,1,2
x m ( nT ) sin( 2p (1 4m )nT ) sin( 2p (1 4m )n / 4)
sin( 2pn / 4 2pmn ) sin( 2pn / 4)

20
Example: x(t)=4+3cos(pt)+2cos(2pt)+cos(3pt) t: in ms
Determine the min sampling rate without any aliasing effects
Supposed the signal sampled at half its Nyquist rate.
Determine xa(t) that would be aliased with x(t).
Sol:
Freq. of 4 terms: f1=0, f2=0.5kHz, f3=1kHz,f4=1.5kHz
Example: The square wave sampled at rate fs; t in seconds

Determine the xa(t) that will appear at the output of the


reconstructor for 2 cases fs=4Hz and 8Hz.
Sol:
Fourier series of square wave contains odd harmonics at freq.
For fs =4kHz, the aliased signal will be

For fs =8kHz, the aliased signal will be


The first case: Sketch for xa(t)
Condition xa(t)=x(nT) evalued at n=1 implies A=1

The second case: xa(t)=Bsin(pn/4)+Csin(3pn/4)


Condition xa(t)=x(nT) at n=1,2 give two equations
Example: A given x(t), t in ms and a block of DSP

Determine the 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 filter with cutoff fs/2=20kHz
c. When H(f) is a practical prefilter as follows,
Sol: Six terms of freq. in x(t)
Case a.

Case b.
Case c.
5. Spectra of sampled signals

Sampled signal: x ( t ) x(nT ) (t nT )
n

In practical sampling, the sampled signal:



x flat ( t ) x(nT ) p(t nT )
n

where, p(t) is flat-top pulse of duration second.


Ideal sampling with toward 0.
x ( n T ) ( t n T )
x ( t ) x fla t (t) x ( n T ) p ( t nT )

0 T 2T . nT t
0 T 2T . nT t
30
Discrete Time Fourier Transform DTFT

or

This approximation become exact if

Practical approximation
Spectrum Replication

32
Aliasing caused by overlapping spectral replicas

Ideal antialiasing prefilter


Practical antialiasing prefilter

Attenuation in dB
6. Analog signal reconstruction

Staircase reconstructor

Analog reconstructor as a low pass filter


35
Reconstructed analog signal

y ( t ) y ( nT ) (t nT )
n


y a (t ) y ( nT ) h (t nT )
n


y a (t ) y (nT )h(t nT )
n

Y a ( f ) H ( f )Y ( f )

Replicated spectrum

1
Y ( f ) Y ( f mf s )
T m
36
Ideal reconstructor
Staircase reconstructor
Anti-image postfilter
Digital equalization filter for D/A conversion

Vous aimerez peut-être aussi