Date post: | 18-Jan-2018 |
Category: |
Documents |
Upload: | marjorie-berry |
View: | 218 times |
Download: | 0 times |
Lecture 3:
The Sampling Process and Aliasing
1
Introduction • A digital or sampled-data control system operates on discrete-
time rather than continuous-time signals.• Due to the sampling process, some new phenomena appear
which need careful investigation. This is discussed in these slides.
2
Objectives • Describe mathematically the ideal impulse sampling
process.• Recognize the frequency spectrum of a sampled signal.• Identify aliasing phenomena.• Recognize the conditions under which a continuous time
signal can recovered from its sampled version (the sampling theorem). • Identify the disadvantages of ideal signal reconstruction
from its sampled version. • Describe the zero-order hold (ZOH) as a simple and
effective reconstruction operation. 3
Reminder of δ(t) function• Consider the following rectangular function
• The δ(t) function is defined as
4
otherwise ,0
0,/1)(
tt
)(lim)(0
tt
Integral of δ(t) function
5
],[0,0],[0,1
)(baba
dttb
a
Sifting property of δ(t) function
• Proof:
• Similarly, 6
],[0,0],[0),0(
)()(babaf
dtttfb
a
],[0),0(.)0(1)()()(0
baffdttfdtttfb
a
],[,0],[),(
)()(babaf
dtttfb
a
The sampling process
A sampler is basically a switch that closes every T seconds.
• Where q is the amount of time the switch is closed
7
In practice, q T , and the pulses can be approximated by flat-topped rectangles.
8
If q is neglected, the operation is called “ideal sampling”
9
Ideal sampling
Ideal sampling of a continuous signal can be considered as a multiplication of the continuous signal, r(t), with an impulse train P(t) defined as:
10
;)()(
n
nTttP
),()()(* trtPtr
.)()()(*
n
nTttrtr
.)()()(*
n
nTtnTrtr
Sampling of a continuous time signals
• After sampling a continuous time signal r(t), with sampling period T, we get a sequence of samples r(kT).
• The question now is “Do we loose anything by sampling”? • Or is it possible to recover r(t) from r(kT)?
• It seems that very little is lost if the sampling period T is small or ws = 2π/T is high. The question is how small (high) is small (high) enough?
• To answer this question we better study the frequency spectrum of the sampled signal r∗(t).
11
The frequency spectrum of sampled signal r∗(t)
• As we have seen, a sampled signal r*(t) of a continuous function r(t) can be represented as:
• We will assume that the frequency spectrum of r(t) is R(w) and is band limited from –w0 to w0 as shown.
• The Fourier transform of the impulse train is also an impulse train scaled by 1/T where ωs = 2π/T.
12
.)()()(*
k
kTttrtr
)()( wRtr
k
sk
kT
kTt )(1)(
• Now, we are looking for the frequency spectrum of r*(t) which is the result of the multiplication of r(t) by the impulse train.
13
ks
ks
ks
ks
tr
k
kRT
dkRT
kRT
kwT
RkTttr
)(1
)()(1
)(*)(1
)(1*)()()(
)(*
multiplication in time is convolution in frequency
convolution of sum is sum of convolutions
convolution is integral
apply sifting property of δ function
This is a momentous result, it tells us that two things happen to the frequency spectrum of r(t) when it is sampled to become r∗(t):
1. The magnitude of the sampled spectrum is 1/T that of the continuous spectrum, it is scaled by 1/T.
2. The summation indicates that there are an infinite number of repeated spectra in the sampled signal, and they are repeated every ωs = 2π/T along the frequency axis.
14
Example 1
• Consider continuous function r1(t) which has no frequency content above half the sampling frequency ωs/2.
• The original amplitude spectrum |R1 (jω)| and the sampled spectrum |R∗
1 (jω)| are shown.
• The spectrum of the sampled r ∗1(t) is scaled by 1/T and
repeated, but one can see the possibility of reconstructing by extracting the original single spectrum from the array of repeated spectra (Remember that all information present in r(t) is also present in R(jω), the original spectrum).
15
Example 2
• Now consider function r2(t) which has frequency content above half the sampling frequency ωs/2.
• The same scaling and repetition occurs in the sampled spectrum, but this time due to the addition of the overlapping spectra there is no chance of recovering the original spectrum after sampling.
16
• The following two sinusoids have identical samples, and we cannot distinguish between them from their samples.
• Note that the frequency of the two sinusoids are 7/8Hz, 1/8Hz and sampling frequency fs = 1Hz (try to deduce these from the plot). Do you realize any pattern?
17
Meaning of a repeated spectrum
• Let us consider the following situation: • A signal of frequency 100Hz, sampled at a rate of fs =
500Hz, will show up at 100Hz, 400Hz, 600Hz, 900Hz, 1100Hz, …• This means that any sinusoid signal of these
frequencies can pass through the samples.• The reconstruction of the continuous time signal
from discrete samples as we will see later uses some form of low-pass filtering. Therefore, in our case, the LPF filter will pass the 100Hz component, which is the original signal (so, no problem). 18
Example
• Consider another situation: • A signal of frequency 350Hz, sampled at a rate of fs = 500
Hz, will show up at: 150Hz, 350Hz, 650 Hz, 850Hz, 1350Hz, ….
• In this case, the LPF filter will pass the 150Hz component, which is not the original signal of 350Hz (a problem called aliasing).
• The impersonation of high-frequency continuous sinusoids (350Hz) by low-frequency discrete sinusoids (150Hz), due to an insufficient number of samples in a cycle (the sampling interval is not short enough), is called the aliasing effect.
19
Aliasing effect
• First, sample at least twice the largest frequency in the signal of interest.
• If the signal of interest contains noise (unwanted signal usually of high frequency), it is essential that an “anti-aliasing” analog filter be used, before sampling, to filter out those frequencies above one-half the sampling frequency (called the Nyquist frequency). Otherwise, those unwanted frequencies will erroneously appear as lower frequencies after sampling.
20
Solving the aliasing problem
The sampling theoremA continuous time signal with a Fourier transform that is zero outside the interval (-wo,wo) can be recovered uniquely by its values in equi-distant points if the sampling frequency is higher than 2wo (no aliasing) and the signal is given by
• This equivalent to passing R∗(jω) through an ideal low pass filter L(jω), with magnitude:
• The filter passes the original spectrum while will rejecting the repeated spectra.
21
k T
kTtkTrtr )(sinc)()(
TjL
TTTjL
||,0|)(|
,|)(|
Comments on the sampling theorem
• The reconstruction equation
shows how to reconstruct the (band-limited. . . no aliasing!) function r(t) from its samples r∗(t). The sinc() function shown fills in the gaps between samples.• However, look at the impulse response of the ideal LPF:
• Since this is the response due to an impulse applied at t = 0, the ideal reconstruction filter is non-causal, because its response begins before it has received the input. This means that we can not apply the filter in real time.
22
Tttl sinc)(
k T
kTtkTrtr )(sinc)()(
23
Figure: The interpolated signal is a sum of shifted sincs, weighted by the samples r(kT). The sinc function h(t) = sinc πt/T shifted to kT, i.e. h(t −kT), is equal to one at kT and zero at all other samples mT, m ≠ k. The sum of the weighted shifted sincs will agree with all samples r(kT), k integer.
Zero-order hold as a reconstruction filter
• As we just seen, the ideal LPF filter, being non-causal, cannot be used in real time, and furthermore it is too complicated.
• So we will examine the behavior of a zero-order hold as a way to reconstruct continuous signal from discrete samples. The ZOH remembers the last information until a new sample is obtained, i.e. it takes the value r(kT) and holds it constant for kT ≤ t < (k+1)T.
• This is exactly the behavior of a D/A in converting a sampled signal r∗(t) into a continuous signal r(t).
24
TktkTkTrtr )1(),()(
ZOH & sampling period
25
A sampler and ZOH can accurately follow the input signal if the sampling time T is small compared to the transient changes in the signal.
Example The following figure shows an ideal sampler followed by a ZOH. Assuming the input signal r(t) is as shown in the figure, show the waveforms after the sampler and also after the ZOH.
Answer
26
Frequency response of ZOH
• The impulse response of a ZOH is shown. • Hence, the transfer function of ZOH is
• The frequency behavior of GZOH (s) is GZOH(jw),
• Multiplying numerator and denominator by ejωT/2 , we get
27
.11)(se
se
ssG
TsTs
ZOH
.1)(
jejG
Tj
ZOH
22sinc
2sinc
)2/(2/sin
22)(
2/
2/2/
2/2/
2/
2/2/
TTTTTe
TeTT
ejee
ejeejG
Tj
TjTj
TjTj
Tj
TjTj
ZOH
A plot of the frequency response of the ZOH is shown below. The ZOH is a low-pass filter, at least an approximation of the ideal reconstructing filter, and has linear phase lag with frequency. This phase lag can be viewed as the destabilizing effect of information loss at low sampling frequencies. The DC magnitude of T of the ZOH compensates for the frequency scaling of 1/T incurred by sampling.
28