Digital Processing of Continuous-Time Signals Digital Processing of

Digital Processing of
Continuous-Time Signals
Digital Processing of
Continuous-Time Signals
• Digital processing of a continuous-time
signal involves the following basic steps:
(1) Conversion of the continuous-time
signal into a discrete-time signal,
(2) Processing of the discrete-time signal,
(3) Conversion of the processed discretetime signal back into a continuous-time
signal
1
• Conversion of a continuous-time signal into
digital form is carried out by an analog-todigital (A/D) converter
• The reverse operation of converting a
digital signal into a continuous-time signal
is performed by a digital-to-analog (D/A)
converter
2
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Digital Processing of
Continuous-Time Signals
Digital Processing of
Continuos-Time Signals
• Since the A/D conversion takes a finite
amount of time, a sample-and-hold (S/H)
circuit is used to ensure that the analog
signal at the input of the A/D converter
remains constant in amplitude until the
conversion is complete to minimize the
error in its representation
3
• To prevent aliasing, an analog anti-aliasing
filter is employed before the S/H circuit
• To smooth the output signal of the D/A
converter, which has a staircase-like
waveform, an analog reconstruction filter
is used
4
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Digital Processing of
Continuous-Time Signals
Sampling of Continuous-Time
Signals
Complete block-diagram
Antialiasing
filter
5
S/H
A/D
Digital
processor
D/A
• As indicated earlier, discrete-time signals in
many applications are generated by
sampling continuous-time signals
• We have seen earlier that identical discretetime signals may result from the sampling
of more than one distinct continuous-time
function
Reconstruction
filter
• Since both the anti-aliasing filter and the
reconstruction filter are analog lowpass
filters, we review first the theory behind the
design of such filters
• Also, the most widely used IIR digital filter
design method is based on the conversion of
an analog lowpass prototype
Copyright © 2005, S. K. Mitra
6
Copyright © 2005, S. K. Mitra
1
Sampling of Continuous-Time
Signals
Sampling of Continuous-Time
Signals
• In fact, there exists an infinite number of
continuous-time signals, which when
sampled lead to the same discrete-time
signal
• However, under certain conditions, it is
possible to relate a unique continuous-time
signal to a given discrete-time signals
• If these conditions hold, then it is possible
to recover the original continuous-time
signal from its sampled values
• We next develop this correspondence and
the associated conditions
7
8
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Now, the frequency-domain representation of
g a (t ) is given by its continuos-time Fourier
transform (CTFT):
• Let g a (t ) be a continuous-time signal that is
sampled uniformly at t = nT, generating the
sequence g[n] where
g [n] = g a (nT ), − ∞ < n < ∞
9
with T being the sampling period
• The reciprocal of T is called the sampling
frequency FT , i.e.,
FT = 1
T
∞
Ga ( jΩ) = ∫−∞ g a (t )e − jΩt dt
• The frequency-domain representation of g[n]
is given by its discrete-time Fourier transform
(DTFT):
− jω n
G ( e jω ) = ∑ ∞
n = −∞ g[ n] e
10
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• p(t) consists of a train of ideal impulses
with a period T as shown below
• To establish the relation between Ga ( jΩ)
and G (e jω ) , we treat the sampling operation
mathematically as a multiplication of g a (t )
by a periodic impulse train p(t):
∞
p (t ) = ∑ δ(t − nT )
n = −∞
g a (t )
11
×
g p(t )
p (t )
12
Copyright © 2005, S. K. Mitra
• The multiplication operation yields an
impulse train:
∞
g p (t ) = g a (t ) p(t ) = ∑ g a ( nT )δ(t − nT )
n = −∞
Copyright © 2005, S. K. Mitra
2
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• There are two different forms of G p ( jΩ):
• One form is given by the weighted sum of
the CTFTs of δ(t − nT ) :
− jΩnT
G p ( jΩ ) = ∑ ∞
n = −∞ g a ( nT ) e
• To derive the second form, we note that p(t)
can be expressed as a Fourier series:
p(t ) = 1 ∑∞
e j ( 2π / T )kT = 1 ∑∞
e jΩT kt
T k = −∞
T k = −∞
where ΩT = 2π / T
• g p (t ) is a continuous-time signal consisting
of a train of uniformly spaced impulses with
the impulse at t = nT weighted by the
sampled value g a (nT ) of g a (t ) at that instant
13
14
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• The impulse train g p (t ) therefore can be
expressed as
⎛ ∞
⎞
g p (t ) = ⎜⎜ 1 ∑ e jΩT kt ⎟⎟ ⋅ g a (t )
T
⎠
⎝ k = −∞
• From the frequency-shifting property of the
CTFT, the CTFT of e jΩT kt g a (t ) is given by
• Hence, an alternative form of the CTFT of
g p (t ) is given by
G p ( jΩ ) = 1
T
Ga ( j (Ω − kΩT ) )
15
16
∞
∑ Ga ( j (Ω − kΩT ) )
k = −∞
• Therefore, G p ( jΩ) is a periodic function of
Ω consisting of a sum of shifted and scaled
replicas of Ga ( jΩ) , shifted by integer
multiples of ΩT and scaled by 1
T
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Assume g a (t ) is a band-limited signal with a
CTFT Ga ( jΩ) as shown below
• The term on the RHS of the previous
equation for k = 0 is the baseband portion
of G p ( jΩ) , and each of the remaining terms
are the frequency translated portions of
G p ( jΩ )
17
• The frequency range
Ω
Ω
− T ≤Ω≤ T
2
2
• is called the baseband or Nyquist band
Copyright © 2005, S. K. Mitra
• The spectrum P ( jΩ) of p(t) having a
sampling period T = Ω2 π is indicated below
T
18
Copyright © 2005, S. K. Mitra
3
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Two possible spectra of G p ( jΩ) are shown
below
19
• It is evident from the top figure on the
previous slide that if ΩT > 2Ω m , there is no
overlap between the shifted replicas of Ga ( jΩ)
generating G p ( jΩ)
• On the other hand, as indicated by the figure
on the bottom, if ΩT < 2Ω m , there is an
overlap of the spectra of the shifted replicas
of Ga ( jΩ) generating G p ( jΩ)
20
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• The spectra of the filter and pertinent
signals are shown below
If ΩT > 2Ω m , g a (t ) can be
recovered exactly from g a (t ) by passing it
through an ideal lowpass filter H r ( jΩ) with
a gain T and a cutoff frequency Ωc greater
than Ω m and less than ΩT − Ω m as shown
below
21
22
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• On the other hand, if ΩT < 2Ω m , due to the
overlap of the shifted replicas of Ga ( jΩ) ,
the spectrum Ga ( jΩ) cannot be separated by
filtering to recover Ga ( jΩ) because of the
distortion caused by a part of the replicas
immediately outside the baseband folded
back or aliased into the baseband
23
Sampling theorem - Let g a (t ) be a bandlimited signal with CTFT Ga ( jΩ) = 0 for
Ω > Ωm
• Then g a (t ) is uniquely determined by its
samples g a (nT ) , − ∞ ≤ n ≤ ∞ if
ΩT ≥ 2Ω m
where ΩT = 2π / T
24
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
4
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• The condition ΩT ≥ 2Ω m is often referred to
as the Nyquist condition
• The frequency ΩT is usually referred to as
2
the folding frequency
25
• Given {g a (nT )}, we can recover exactly g a (t )
by generating an impulse train
g p (t ) = ∑∞
n = −∞ g a ( nT )δ(t − nT )
and then passing it through an ideal lowpass
filter H r ( jΩ) with a gain T and a cutoff
frequency Ωc satisfying
Ω m < Ωc < (ΩT − Ω m )
26
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
• The highest frequency Ω m contained in g a (t )
is usually called the Nyquist frequency
since it determines the minimum sampling
frequency ΩT = 2Ω m that must be used to
fully recover g a (t ) from its sampled version
• The frequency 2Ω m is called the Nyquist
rate
27
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
• Oversampling - The sampling frequency is
higher than the Nyquist rate
• Undersampling - The sampling frequency is
lower than the Nyquist rate
• Critical sampling - The sampling frequency
is equal to the Nyquist rate
• Note: A pure sinusoid may not be
recoverable from its critically sampled
version
28
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• In digital telephony, a 3.4 kHz signal
bandwidth is acceptable for telephone
conversation
• Here, a sampling rate of 8 kHz, which is
greater than twice the signal bandwidth, is
used
29
• In high-quality analog music signal
processing, a bandwidth of 20 kHz has been
determined to preserve the fidelity
• Hence, in compact disc (CD) music
systems, a sampling rate of 44.1 kHz, which
is slightly higher than twice the signal
bandwidth, is used
30
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
5
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Example - Consider the three continuoustime sinusoidal signals:
g1(t ) = cos(6πt )
g 2 (t ) = cos(14πt )
g3 (t ) = cos( 26πt )
• Their corresponding CTFTs are:
G1( jΩ) = π[δ(Ω − 6π) + δ(Ω + 6π)]
G2 ( jΩ) = π[δ(Ω − 14π) + δ(Ω + 14π)]
G3 ( jΩ) = π[δ(Ω − 26π) + δ(Ω + 26π)]
31
• These three transforms are plotted below
32
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Plots of the 3 CTFTs are shown below
• These continuous-time signals sampled at a
rate of T = 0.1 sec, i.e., with a sampling
frequency ΩT = 20π rad/sec
• The sampling process generates the
continuous-time impulse trains, g1 p (t ) ,
g 2 p (t ) , and g3 p (t )
• Their corresponding CTFTs are given by
33
Glp ( jΩ) = 10∑∞
k = −∞ Gl ( j (Ω − kΩT ) ), 1 ≤ l ≤ 3
34
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
35
• These figures also indicate by dotted lines
the frequency response of an ideal lowpass
filter with a cutoff at Ωc = ΩT / 2 = 10π and
a gain T = 0.1
• The CTFTs of the lowpass filter output are
also shown in these three figures
• In the case of g1(t ), the sampling rate
satisfies the Nyquist condition, hence no
aliasing
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
• Moreover, the reconstructed output is
precisely the original continuous-time
signal
• In the other two cases, the sampling rate
does not satisfy the Nyquist condition,
resulting in aliasing and the filter outputs
are all equal to cos(6πt)
36
Copyright © 2005, S. K. Mitra
6
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Note: In the figure below, the impulse
appearing at Ω = 6π in the positive
frequency passband of the filter results from
the aliasing of the impulse in G2 ( jΩ) at
Ω = −14π
37
• Likewise, the impulse appearing at Ω = 6π
in the positive frequency passband of the
filter results from the aliasing of the impulse
in G3 ( jΩ) at Ω = 26π
• We now derive the relation between the
DTFT of g[n] and the CTFT of g p (t )
• To this end we compare
− jω n
G ( e jω ) = ∑ ∞
n = −∞ g[ n] e
with
− jΩnT
G p ( jΩ ) = ∑ ∞
n = −∞ g a ( nT ) e
and make use of g[n] = g a (nT ), − ∞ < n < ∞
38
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• Observation: We have
G ( e jω ) = G p ( jΩ )
Ω =ω / T
or, equivalently,
G p ( jΩ ) = G ( e jω )
ω=ΩT
• From the above observation and
G p ( jΩ ) = 1
T
we arrive at the desired result given by
∞
G (e jω ) = T1 ∑ Ga ( jΩ − jkΩT )
k = −∞
∞
Ω =ω / T
= 1 ∑ Ga ( j ω − jkΩT )
T
T
k = −∞
∞
∞
∑ Ga ( j (Ω − kΩT ) )
= 1 ∑ Ga ( j ω − j 2 π k )
T
T
T
k = −∞
k = −∞
39
40
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Effect of Sampling in the
Frequency Domain
Effect of Sampling in the
Frequency Domain
• The relation derived on the previous slide
can be alternately expressed as
G (e jΩT ) = T1 ∑∞
k = −∞ Ga ( jΩ − jkΩT )
• From
G ( e jω ) = G p ( jΩ )
Ω =ω / T
or from
G p ( jΩ ) = G ( e jω )
• Now, the CTFT Gp ( jΩ) is a periodic
function of Ω with a period ΩT = 2π / T
• Because of the mapping, the DTFT G (e jω )
is a periodic function of ω with a period 2π
ω=ΩT
41
it follows that G (e jω ) is obtained from Gp ( jΩ)
by applying the mapping Ω = ω
T
Copyright © 2005, S. K. Mitra
42
Copyright © 2005, S. K. Mitra
7
Recovery of the Analog Signal
Recovery of the Analog Signal
• We now derive the expression for the output
g^ a (t ) of the ideal lowpass reconstruction
filter H r ( jΩ) as a function of the samples
g[n]
• The impulse response hr (t ) of the lowpass
reconstruction filter is obtained by taking
the inverse DTFT of H r ( jΩ):
T , Ω ≤ Ωc
H r ( jΩ) = ⎧⎨
⎩ 0, Ω > Ωc
43
• Thus, the impulse response is given by
hr (t ) =
1 ∞ H ( jΩ) e jΩt dΩ = T Ω c e jΩt dΩ
2 π −∞ r
2 π −Ωc
∫
sin(Ωct )
,
−∞ ≤t ≤ ∞
ΩT t / 2
• The input to the lowpass filter is the
impulse train gp(t ) :
=
g p (t ) = ∑∞
n = −∞ g[ n] δ(t − nT )
44
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Recovery of the Analog Signal
Recovery of the Analog Signal
• Therefore, the output g^ a (t ) of the ideal
lowpass filter is given by:
• The ideal bandlimited interpolation process
is illustrated below
g^ a (t ) = hr (t ) * g p (t ) =
∞
∑ g[n]hr (t − nT )
n = −∞
• Substituting hr (t ) = sin(Ωct ) /(ΩT t / 2) in the
above and assuming for simplicity
Ωc = ΩT / 2 = π / T , we get
∞
sin[ π(t − nT ) / T ]
^ (t ) =
g
g[ n]
∑
a
45
π(t − nT ) / T Copyright © 2005, S. K. Mitra
n = −∞
46
Copyright © 2005, S. K. Mitra
Recovery of the Analog Signal
Recovery of the Analog Signal
• It can be shown that when Ωc = ΩT / 2 in
sin( Ω ct )
hr (t ) =
• The relation
g^ a (rT ) = g[r ] = g a (rT )
ΩT t / 2
h r(0) = 1 and h r(nT ) = 0 for n ≠ 0
• As a result, from
sin[ π(t − nT ) / T ]
g^ a (t ) = ∑∞
n = −∞ g[ n] π(t − nT ) / T
we observe
g a (rT ) = g[r ] = g a (rT )
47
∫
for all integer values of r in the range
−∞ < r <∞
Copyright © 2005, S. K. Mitra
holds whether or not the condition of the
sampling theorem is satisfied
• However, g^a (rT ) = g a (rT ) for all values of
t only if the sampling frequency ΩT satisfies
the condition of the sampling theorem
48
Copyright © 2005, S. K. Mitra
8
Implication of the Sampling
Process
Implication of the Sampling
Process
• Consider again the three continuous-time
signals: g1(t ) = cos(6πt ) , g 2 (t ) = cos(14πt ) ,
and g3 (t ) = cos(26πt )
• The plot of the CTFT G1p ( jΩ) of the
sampled version g1p (t ) of g1(t ) is shown
below
• From the plot, it is apparent that we can
recover any of its frequency-translated
versions cos[(20k ± 6)π t] outside the
baseband by passing g1p (t ) through an ideal
analog bandpass filter with a passband
centered at Ω = ( 20k ± 6) π
49
50
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Implication of the Sampling
Process
Implication of the Sampling
Process
• For example, to recover the signal cos(34πt),
it will be necessary to employ a bandpass
filter with a frequency response
• Likewise, we can recover the aliased
baseband component cos(6πt) from the
sampled version of either g 2 p (t ) or g3 p (t )
by passing it through an ideal lowpass filter
with a frequency response:
0.1, (6 − ∆ )π ≤ Ω ≤ (6 + ∆ )π
H r ( jΩ) = ⎨⎧
otherwise
⎩ 0,
0.1, (34 − ∆ )π ≤ Ω ≤ (34 + ∆ )π
H r ( jΩ) = ⎧⎨
otherwise
⎩ 0,
where ∆ is a small number
51
52
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Implication of the Sampling
Process
Sampling of Bandpass Signals
• The conditions developed earlier for the
unique representation of a continuous-time
signal by the discrete-time signal obtained
by uniform sampling assumed that the
continuous-time signal is bandlimited in the
frequency range from dc to some frequency
Ωm
• There is no aliasing distortion unless the
original continuous-time signal also
contains the component cos(6πt)
• Similarly, from either g 2 p (t ) or g3 p (t ) we
can recover any one of the frequencytranslated versions, including the parent
continuous-time signal g 2(t ) or g3(t ) as the
case may be, by employing suitable filters
53
• Such a continuous-time signal is commonly
referred to as a lowpass signal
54
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
9
55
Sampling of Bandpass Signals
Sampling of Bandpass Signals
• There are applications where the continuoustime signal is bandlimited to a higher
frequency range Ω L ≤ Ω ≤ Ω H with Ω L > 0
• Such a signal is usually referred to as the
bandpass signal
• To prevent aliasing a bandpass signal can of
course be sampled at a rate greater than
twice the highest frequency, i.e. by ensuring
ΩT ≥ 2Ω H
• However, due to the bandpass spectrum of
the continuous-time signal, the spectrum of
the discrete-time signal obtained by sampling
will have spectral gaps with no signal
components present in these gaps
• Moreover, if Ω H is very large, the sampling
rate also has to be very large which may not
be practical in some situations
56
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Sampling of Bandpass Signals
Sampling of Bandpass Signals
• A more practical approach is to use undersampling
• Let ∆Ω = Ω H − Ω L define the bandwidth of
the bandpass signal
• Assume first that the highest frequency Ω H
contained in the signal is an integer multiple
of the bandwidth, i.e.,
Ω H = M (∆Ω)
• We choose the sampling frequency ΩT to
satisfy the condition
2Ω
ΩT = 2(∆Ω) = H
M
which is smaller than 2Ω H , the Nyquist
rate
• Substitute the above expression for ΩT in
57
G p ( jΩ ) = 1
T
58
∞
∑ Ga ( j (Ω − k ΩT ))
k = −∞
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
Sampling of Bandpass Signals
Sampling of Bandpass Signals
• This leads to
(
)
G p ( jΩ ) = 1 ∑ ∞
k = −∞ Ga jΩ − j 2k (∆Ω)
• Figure below illustrate the idea behind
Ga ( jΩ)
T
• As before, G p( jΩ) consists of a sum of Ga ( jΩ)
and replicas of Ga ( jΩ) shifted by integer
multiples of twice the bandwidth ∆Ω and
scaled by 1/T
• The amount of shift for each value of k
ensures that there will be no overlap
between all shifted replicas
no aliasing
59
− ΩH − ΩL
0
ΩL
ΩH
ΩL
ΩH
Ω
G p ( jΩ )
− ΩH − ΩL
0
Ω
60
Copyright © 2005, S. K. Mitra
Copyright © 2005, S. K. Mitra
10
Sampling of Bandpass Signals
• As can be seen, g a (t ) can be recovered from
g p (t ) by passing it through an ideal
bandpass filter with a passband given by
Ω L ≤ Ω ≤ Ω H and a gain of T
• Note: Any of the replicas in the lower
frequency bands can be retained by passing
g p (t ) through bandpass filters with
passbands Ω L − k ( ∆Ω) ≤ Ω ≤ Ω H − k (∆Ω) ,
1 ≤ k ≤ M − 1 providing a translation to
lower frequency ranges
61
Copyright © 2005, S. K. Mitra
11