0% found this document useful (0 votes)
40 views60 pages

Chapter 3 - Full

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)
40 views60 pages

Chapter 3 - Full

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

Chapter 3

Sampling, Reconstruction, and DT


Filtering
1. Sampling (continuous-to-discrete time conversion)
2. Reconstruction (discrete-to-continuous time conversion)
3. Discrete-time filtering of continuous-time signals
Digital processing of analog signals
Typical system x c (t) x[n] y[n]
Digital Signal yc(t)
ADC DAC
Processor

Analog-to-digital converter (ADC)


► Performs filtering, sampling, and quantization
► Sampling rate may be of tens of kHz (audio processing), or it may be of tens of GHz
(optical communications)
Digital signal processor
► Performs some operation e.g., filtering, FFT, etc
► May be implemented on PCs with 64-bit floating-point precision, or on ASICs with limited
arithmetic precision (e.g., 6 bits).
Digital-to-analog converter (DAC)
► Performs quantization and reconstruction (filtering)
► Sampling rate could be similar to ADC 4/47
Analog-to-digital conversion
In practice
Example of successive-approximation analog-to-digital converter (SA-ADC)
Analog-to-digital conversion

In this class
We’ll model the ADC as an ideal continuous-to-discrete (C-to-D) time converter.

x c (t) x[n] = xc (nT )


C-to-D
X c (jΩ) Converter X (ej ω ), X (ej ΩT )

Notation:
X c (jΩ) denotes the Fourier transform of the continuous-time signal x c (t), where Ω is the
continuous-time frequency.
X(e jω ) denotes the discrete-time Fourier transform of a discrete-time signal x[n], where ω is
the normalized frequency.
Continuous-to-discrete time conversion
The C-to-D converter simply samples the continuous-time signal every T seconds, where T is
the sampling period.
x c (t)

3 x[n] = x c (nT )

T 2T 3T . . . t

Question: How are x c (t) and x[n] related in the frequency domain? That is, how to obtain the
discrete-time Fourier transform X(e jω ) from the continuous-time Fourier transform X c (jΩ)? 7/47
Continuous-to-discrete time conversion
Impulse sampling interpretation:
We can think of the C-to-D converter as multiplication by an impulse train, followed by an
impulse-to-sequence converter.
This representation is purely for mathematical convenience.
Impulse sampling example
x c (t)

s(t)

t
x s (t) = x c (t) · s(t)

x[n]

n
Continuous-to-discrete time conversion
Question: How to obtain the discrete-time Fourier transform X(e jω ) from the
continuous-time Fourier transform X c (jΩ)?

We’ll calculate the continuous-time (CT) Fourier transform of x s (t) in two different ways.
1 X (j Ω) ∗S(j Ω). Then, we’ll calculate X (j Ω) = F { x (t)}
First, we’ll calculate X s(j Ω) = 2π c s s .
We’ll use these two equations of X s (jΩ) to obtain an equation for X(e jω ), the DTFT of x[n].
Starting with X s(jΩ) = Xc(jΩ) ∗S(jΩ), recall that the Fourier Transform of the
impulse train is given by

Now we can calculate X s (jΩ):


1
X s (j Ω) = X (j Ω) ∗S(j Ω)
2π c

(1)

Note that X s (jΩ) is equal to X c (jΩ) scaled by 1/T and repeated every 2π/T, which we
define as the sampling frequency Ωs ≡ 2π/T 10/47
Now let’s calculate X s (jΩ) = F{x s (t)}, where x s (t) = x c (t) ·s(t):

X s (jΩ) is equal to X(e jω ) evaluated at ω = ΩT , or equivalently X(e jω ) is equal to X s (jΩ)


evaluated at Ω = ω/T. 12/47
Substituting (1) in (2):

where we used the relation ω = ΩT.


► T is the sampling period, and Ωs = 2π is the sampling frequency
T
► This equation shows that in discrete time (ω = ΩT) replicas of the original spectrum appear
with period 2π

13/47
Graphically
X c ( jΩ)
1

−ΩN ΩN Ω
S(jΩ)

T

−Ωs Ωs Ω
1
X s(jΩ) = 2π
X c(j Ω) ∗ S(j Ω)
1/T

−Ωs −ΩN ΩN Ωs Ω
X (ej ω ) = X (j Ω)
1/T

− 2π − ΩN T ΩN T 2π ω = ΩT
14/47
Replicas of the original spectrum appear with period 2π
Oversampling
► A signal is band limited if X c (jΩ) = 0 for |Ω| > Ω N . In this case, the signal has
maximum frequency Ω N and bandwidth 2ΩN
► Sampling at Ωs > 2ΩN is called oversampling
► Oversampling leads to gaps between the spectrum replicas
Xc(jΩ)

Ωs Ωs
− 2 2

−Ωs −ΩN ΩN Ωs Ω
X (ej ω )
Ωs > 2Ω N
1/T

−π π
− 2π − ΩN T ΩN T 2π ω = ΩT
15/47
Nyquist sampling
► Sampling at Ωs = 2ΩN is called Nyquist sampling
► Note that if Ωs is any smaller than 2ΩN , there will be overlapping of the spectrum replicas
X c (jΩ)

Ωs Ωs
− 2 2

−Ωs −ΩN ΩN Ωs Ω
X (ej ω ) Ωs = 2ΩN
1/T

−π π
− 2π − Ω N T ΩN T 2π ω = ΩT
16/47
Undersampling
► Undersampling occurs when Ωs < 2ΩN
► In this case, the spectrum replicas overlap
► The overlapping causes aliasing distortion
X c ( jΩ)

−ΩN ΩN Ω
X (ej ω )
Ωs < 2Ω N
1/T

− 2π −π π 2π ω = ΩT 17/47
Aliasing: time domain
Samples taken at frequency Ωs = 2π form an alias signal of frequency 0.5π, but original signal
had frequency 1.5π

18/47
Aliasing: frequency domain
Same example, but now in the frequency domain

X(jω)

− 1.5π 1.5π Ω
X (ej ω )

− 2π −π 0.5π π 1.5π 2π ω = ΩT

Blue components correspond to spectrum replica centered at 2π, while red components correspond
to spectrum replica centered at −2π.
The final spectrum corresponds to cos(0.5πn) 19/47
Digital-to-analog conversion
In practice
Example of digital-to-analog converter (DAC)

19/47
Digital-to-analog conversion

In this class
We’ll model the ADC as an ideal discrete-to-continuous (D-to-C) time converter.

x[n] D-to-C x c (t)


X (ej ω ),X (ej ΩT ) Converter X (j Ω)

In essence, a D-to-C converter performs interpolation.

20/47
Discrete-to-continuous time conversion
For mathematical convenience we can model the D-to-C as

x[n] Discrete-time
Lowpass filter x r (t)
sequenceto
hr (t) H r (j Ω)
impulse train

D-to-C converter


xr (t) = � x[n]hr (t − nT) (D-to-C converter)
n=−∞

Important questions
1. How close to the original signal is x r (t)?
21/47
2. What lowpass filter H r (jΩ) will lead to the best performance?
Reconstruction: time domain x[n]

x s (t) = ∑ x[n]δ(t − nT )

x r (t) = x s (t) ∗ hr (t)

t
22/47
Reconstruction: frequency domain
X (ej ω )

1/T

− 2π − ΩN T ΩN T 2π ω = ΩT
X s (j Ω) = X (ej ΩT )

1/T

−Ωs −ΩN ΩN Ωs Ω
X r (j Ω) = H r (j Ω)X s (j Ω)

1 Which lowpass filter


would produce this result?

− ΩN ΩN Ω 27/47
Reconstruction: frequency domain
X (ej ω )

1/T

− 2π − ΩN T ΩN T 2π ω = ΩT
X s (j Ω) = X (ej ΩT )

1/T

−Ωs −ΩN ΩN Ωs Ω
X r (j Ω) = H r (j Ω)X s (j Ω)

− ΩN ΩN Ω 27/47
Shannon-Nyquist sampling theorem

Shannon-Nyquist sampling theorem


A band-limited signal with highest frequency Ω N can be perfectly reconstructed from
samples taken with sampling frequency Ωs = 2πT > 2ΩN .

X r (j Ω) = Hr (j Ω)X (ej ΩT ) = X c (j Ω)

► Sampling above the Nyquist frequency (2ΩN ) avoids aliasing


► In practice, it is common to use an anti-aliasing filter to minimize aliasing when the analog
signal is not band-limited.
► Perfect reconstruction is achieved if H r (jΩ) is the ideal lowpass filter. In other words, the ideal
lowpass filter (or sinc function in time domain) is the perfect interpolator for
band-limited signals.
28/47
Ideal lowpass filter
Time domain Frequency domain
π
sin πTt t T, |Ω| ≤
hlp f (t) = π = sinc ( ) Hlp f (j Ω) = T
π
T
t T 0, |Ω| > T

hlpf (t) Hlpf (j Ω)

1 T

29/47
−3T −2T −T T 2T 3T t Ω
−π/T π/T
Example of reconstruction with an ideal lowpass filter
∞ ∞
x r (t) = � x[n]hr (t − nT) = � x[n]sinc(t − nT) (reconstruction)
n= − ∞ n= − ∞

30/47
Original continuous-time signal
Example of reconstruction with an ideal lowpass filter
∞ ∞
x r (t) = � x[n]hr (t − nT) = � x[n]sinc(t − nT) (reconstruction)
n= − ∞ n= − ∞

Samples from original continuous-time signal


30/47
Example of reconstruction with an ideal lowpass filter
∞ ∞
x r (t) = � x[n]hr (t − nT) = � x[n]sinc(t − nT) (reconstruction)
n= − ∞ n= − ∞

At the nth sample, we have the sinc function x[n]sinc(t − nT)


30/47
Example of reconstruction with an ideal lowpass filter
∞ ∞
x r (t) = � x[n]hr (t − nT) = � x[n]sinc(t − nT) (reconstruction)
n= − ∞ n= − ∞

30/47
The sum of all sincs results in the perfectly reconstructed signal.
Practical reconstruction

Problem
The ideal lowpass filter is not feasible, as it is non-causal and requires infinitely many samples.

Common reconstruction filters


1. Zero-order hold (square pulse)
2. Linear interpolation (triangular pulse)
3. Cubic spline interpolation
Practical reconstruction: zero-order holder (ZOH)
Impulse response Frequency response
sin(ΩT/2)
H Z O H (jΩ) = T
ΩT/2
Ω )
= Tsinc ( T

hZ O H (t) |H Z O H (j Ω)|

1 T

Ideal LPF

−T /2 T /2 t Ω
π π
− 2π
T
− T T

T
Practical reconstruction: zero-order holder (ZOH)
Example of reconstruction (or interpolation) using the ZOH
Practical reconstruction: zero-order holder (ZOH)
Example of reconstruction (or interpolation) using the ZOH
Practical reconstruction: linear interpolator
Impulse response Frequency response

h lin (t) |H lin (jΩ)|

1 T

Ideal LPF

−T T t Ω
π π
− 2π
T
− T T

T
Practical reconstruction: linear interpolation
Example of reconstruction using linear interpolation
Practical reconstruction: cubic-spline interpolation

Impulse response

Frequency response

12T
H spline (j Ω) = (ΩT) 2 (sinc2 (f T) − sinc(2f T))
8Ta
+ ( 3sinc 2(2f T) − 2sinc(2f T) − sinc(4f T))
(ΩT) 2

where f = Ω/(2π).
Practical reconstruction: cubic-spline interpolation

Impulse response Frequency response

h spline (t) |H spline (jΩ)|

1 T

−2T −T T 2T t Ω
2π 2π
− T T

This assumes a = 0.1 in the previous slide.


Practical reconstruction: cubic-spline interpolation

Example of reconstruction using cubic-spline interpolation


Comparison of reconstruction filters
The interpolation filter must suppress the spectrum replicas without distorting the spectrum centered
at the origin

X s (jΩ)

Ideal LPF

ZOH

Linear interp.
Cubic spline

− 2π −π π 2π ω = ΩT
Comparison of reconstruction filters
Oversampling makes the job of the interpolation filter much easier.
X (ej ω )

Ideal LPF

ZOH

Linear interp.
Cubic spline

− 2π − ωN ωN 2π ω = ΩT

With oversampling, the interpolation filters look approximately flat around [−ωN ,ωN ], and
they suppress the spectrum replicas more strongly.
Discrete-time filtering of continuous-time signals

In practice

x c (t) x[n] Digital Signal y[n] yc(t)


ADC Processor DAC

DSP theory

x c (t) x[n] LTI y[n] yr (t)


C-to-D System D-to-C
X c(jΩ) X(ejω ) Y (ejω ) Yr(jΩ)

Sampling h[n] H (ej ω ) Reconstruction

41/47
Discrete-time filtering of continuous-time signals
x c (t) x[n] LTI y[n] yr (t)
C-to-D D-to-C
X c (jΩ) jω
X(e ) System Y (e )jω Yr(jΩ)

Sampling h[n] H(e jω ) Reconstruction

For the C-to-D converter (sampling):


(ω = ΩT) ∞
1 �
X (ej ΩT ) = X c (j (Ω − kΩs ))
T
k= − ∞
For the discrete-time LTI system:
Y(ej ΩT ) = H (ej ΩT )X (ej ΩT )
For the D-to-C converter (reconstruction or interpolation):
Yr (j Ω) = Hr (j Ω)Y(ej ΩT )
Putting it all together:

1
Yr(j Ω) = H r(j Ω)H (e j ΩT ) � X c (j (Ω − kΩs ))
T
k= − ∞ 42/47
Discrete-time filtering of continuous-time signals


Yr (j Ω) = H r(j Ω)H (e j ΩT ) 1 � X c (j (Ω − kΩs ))
T
k= − ∞

 We can simplify this equation by making two assumptions:


1. No aliasing. That is, assuming that the signal X c (j(Ω − kΩs)) is bandlimited such that

 X c (j Ω) = 0 for |Ω| ≥ ΩN

 and that the sampling frequency is such that Ωs > 2ΩN .


2. Ideal reconstruction. That is, H r (jΩ) is the ideal lowpass filter: With
these assumptions:

 Yr (j Ω) = H (ej ΩT )X c (j Ω), for |Ω| < ΩN


43/47
Discrete-time filtering of continuous-time signals
The simplified equation Y r (jΩ) = H(e jΩT )X c (jΩ), for |Ω| < Ω N implies that the following two
systems are equivalent

x c (t) x[n] LTI y[n] yr (t)


C-to-D System D-to-C
X c(jΩ) X (e j ω ) Y (e j ω ) Y r(jΩ)

Sampling h[n] H (ej ω ) Reconstruction

x c (t) yc(t)
hc (t) H c (j Ω)
X c(jΩ) Y c(jΩ)

Hc (j Ω) = H (ej ΩT ),|Ω| ≤ Ωs /2
Conclusion: in theory, we can perform any LTI continuous-time filtering in discrete-time. 44/47
Discrete-Time LTI Processing of Continuous-Time
Signals

46
Example: Ideal Continuous-Time Lowpass Filtering
Using a Discrete-Time Lowpass Filter

47
X c (jΩ)
Graphically
1

−ΩN ΩN Ω
X (ej Ω T )

−Ωs −ΩN ΩN Ωs Ω
H (ej Ω T )

−Ωs −ΩN ΩN Ωs Ω
Reconstruction filter Y (ej Ω T ) = H (ej Ω T )X (ej Ω T )

− Ωs − ΩN ΩN Ωs Ω
Graphically X c (jΩ)
1

−ΩN ΩN Ω
X (ej Ω T )

−Ωs −ΩN ΩN Ωs Ω
H (ej Ω T )

−Ωs −ΩN ΩN Ωs Ω
Yr (j Ω)

− Ωs − ΩN ΩN Ωs Ω
Example: Discrete-Time Implementation of an Ideal
Continuous-Time Bandlimited Differentiator

50
Figure 4.13 (a) Frequency response of a continuous-time ideal bandlimited
differentiatorHc (j𝜔𝜔) = j𝜔𝜔, ω< π/T. (b) Frequency response of a discrete-time
filter to implement a continuous-time bandlimited differentiator
51
Impulse Invariance

52
Example: A Discrete-Time Lowpass Filter Obtained
by Impulse Invariance

53
Example: Impulse Invariance Applied to
Continuous-Time Systems with Rational System
Functions

54
Continuous-time Processing Of Discrete-time
Signals

55
56
Noninteger Delay

57
58
► We start with a bandlimited analog signal x c (t) X c (jΩ) (top plot)
► After sampling with frequency Ω s = 2π
T
, we obtain the discrete-time signal (second plot from the top). As
usual we have the spectrum replicas in discrete-time. Note that for plotting we used the continuous-time
frequency Ω. As a result, the spectrum replicas are centered around multiples of Ω s . If we had used the
discrete-time frequency ω = ΩT , the signal replicas would appear around multiples of 2π.
► The Third plot corresponds to some operation that we’ll perform in discrete time. It could be any sort of
LTI system, but for this illustration we’ll use an ideal lowpass filter whose cutoff frequency is smaller than
Ω N . As a result, some part of the signal will be cut off.
► Filtering by H(e jΩ T ) yields the output discrete-time signal Y (e jΩT ).
► After signal reconstruction with the ideal reconstruction filter (lowpass filter with cutoff frequency Ωs/2),
we obtain the analog signal (no spectrum replicas) shown in the bottom plot.
► Note that the output analog signal is the same that we’d have obtained if we had filtered the original
analog signal with an ideal (analog) lowpass filter of cutoff frequency smaller than Ω N .
► Therefore, this example illustrates that we achieved continuous-time filtering by performing discrete-time
filtering by H(e jΩ T ). In fact, any continuous-time filtering can be performed in discrete-time, provided
that there is no aliasing and that the reconstruction filter is the ideal lowpass filter. Although the latter
condition is unfeasible, we can use practical interpolation filters to achieve very similar results.
Summary
► Sampling a continuous-time signal results in replicas of the spectrum at multiples of the
sampling frequency Ωs (or 2π of the normalized frequency ω)
► A band-limited signal has highest frequency ΩN (X c (jΩ) = 0, |Ω| > ΩN )
► If a band-limited signal is oversampled (Ωs > 2ΩN ) there’ll be gaps between the spectrum
replicas
► If the signal is undersampled (Ωs < 2ΩN ) the spectrum replicas will overlap resulting in
aliasing distortion
► We can perfectly reconstruct a signal from its samples, provided that there is no aliasing
and that we use the ideal lowpass filter as reconstruction filter
► In practice, we use different reconstruction filters, since the ideal lowpass filter is
unfeasible.
► Oversampling relaxes the reconstruction filter specifications
► In theory, we can perform any LTI continuous-time filtering in discrete-time (in DSP),
provided that there is no aliasing and that we use the ideal reconstruction filter

You might also like