0% found this document useful (0 votes)
72 views30 pages

EE 424 #1: Sampling and Reconstruction

The document summarizes key concepts related to sampling and reconstruction of continuous-time signals. It discusses: 1) Ideal sampling and reconstruction is based on representing the sampled signal as impulse trains and using ideal lowpass filtering for reconstruction, which yields the Shannon interpolation formula. 2) The sampling theorem states that a bandlimited continuous-time signal can be perfectly reconstructed from its samples if the sampling frequency satisfies the Nyquist criterion. 3) Reconstruction filters considered include the ideal lowpass filter, which is difficult to implement in practice, and zero-order hold reconstruction, which is easier to implement but introduces errors.

Uploaded by

ArunShan
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)
72 views30 pages

EE 424 #1: Sampling and Reconstruction

The document summarizes key concepts related to sampling and reconstruction of continuous-time signals. It discusses: 1) Ideal sampling and reconstruction is based on representing the sampled signal as impulse trains and using ideal lowpass filtering for reconstruction, which yields the Shannon interpolation formula. 2) The sampling theorem states that a bandlimited continuous-time signal can be perfectly reconstructed from its samples if the sampling frequency satisfies the Nyquist criterion. 3) Reconstruction filters considered include the ideal lowpass filter, which is difficult to implement in practice, and zero-order hold reconstruction, which is easier to implement but introduces errors.

Uploaded by

ArunShan
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
You are on page 1/ 30

EE 424 #1: Sampling and Reconstruction

January 13, 2011


Contents
Notation and Definitions

A Review: Signal Manipulations, CT Convolution, CTFT and Its Properties


Signal manipulations
CT convolution

CTFT and its properties

Poisson Sum Formula


Sampling

Introduction

Applications

Point and impulse sampling


Sampling theorem

Reconstruction

11

12

Ideal Reconstruction: Shannon interpolation formula


Ideal reconstruction: Summary

13

A general reconstruction filter

14

Reconstruction with zero-order hold

15

Examples of sampling and reconstruction

Comments on Lab 1

12

19

24

Sampling part of Lab 1

24

Reconstruction part of Lab 1

25

Lowpass reconstruction filters


DT lowpass reconstruction filters

26
29

Reading: EE 224 handouts 2, 16, 18, 19, and lctftsummary (review);


1.2.1, 2.2.2, 4.3, and 7.1 7.3 in the textbook1 .

A. V. Oppenheim and A. S. Willsky.


Signals & Systems. Prentice Hall, Upper
Saddle River, NJ, 1997
1

ee 424 #1: sampling and reconstruction

Notation and Definitions


Definition 1. The unit rectangle is defined in Fig. 1.
Definition 2. The sinc function is defined as
sinc( x ) =

sin( x )
x

(1)

see also Fig. 2.


Definition 3. An indicator function is defined as:
(
1, t ( a, b)
.
1(a,b) (t) =
0, otherwise

(2)

Definition 4 (CT impulse). We define the continuous-time (CT) impulse


() by the property that
Z +

x (t) (t) dt = x (0)

Figure 1: Definition and plot of the unit


rectangle.

for all x (t) that are continuous at t = 0.

Figure 2: Plot of the sinc function.

ee 424 #1: sampling and reconstruction

A Review: Signal Manipulations, CT Convolution, CTFT and Its


Properties
Signal manipulations
Practice examples:
Figure 3: Time shift: y(t) = x (t t0 ).
Where does time t = 0 move?

Figure 4: Scaling: y(t) = x (t/T ) where


T > 0.

CT convolution
CT convolution is defined as
x (t) ? h(t) =

Z +

x ( ) h(t ) d.

Basic CT linear time-invariant (LTI) systems. The time-shift system


y(t) = x (t t0 ) is LTI with impulse response (t t0 ):
x ( t ) ? ( t t0 ) = x ( t t0 ).
Example: Compute y(t) = ( x ? h)(t) for x (t) = 2 1(0,2) (t) and
h(t) = 1(0,1) (t).
First sketch x (t) and h(t):

(3)

ee 424 #1: sampling and reconstruction

Figure 5: Critical time points: t 1 = 0


and t = 0 as well as t 1 = 2 and t = 2,
i.e. t = 0, 1, 2, 3, meaning that we have 5
intervals to consider for t.

ee 424 #1: sampling and reconstruction

CTFT and its properties


X F ( ) denotes continuous-time Fourier transform (CTFT)
of x ( t ) :
XF () =
x(t) =

Z +

1
2

x ( t ) e j t dt

Z +

X F ( ) e j t d

(4a)
(4b)

where is the frequency in radians per second (rad/s).


Review EE 224 handout lctftsummary to solve the practice examples in Fig. 6.

The textbook uses X ( j ) to denote the


CTFT of x (t).

ee 424 #1: sampling and reconstruction

Figure 6: Examples of CTFT properties.

CTFT

Modulation property: If x (t) X F ( ), then


CTFT

x (t) e j 0 t X F ( 0 )

(complex modulation).

(5)

Generalized modulation property. Find CTFT of a signal


x (t) f (t)

(6)

where f (t) is periodic with fundamental period T0 and fundamental


frequency 0 = 2 /T0 . First, express f (t) using Fourier series (FS):
+

f (t) =

k =

a k e j k 0 t

and substitute this expansion into (6):


+

x (t)

k =

a k e j k 0 t =

k =

CTFT

ak x (t) e j k 0 t

k =

a k X F ( k 0 ) .
(7)

To derive the sampling theorem, we will choose f (t) to be the impulse train, defined in the following.
Ideal lowpass filter. The frequency response of the ideal lowpass
filter in Fig. 7 can be written as2
H F ( ) = T 1/T,/T ( )

/T
/T 
t
sinc
t = sinc
.

See also Definition 3.

See EE 224 handout lctftsummary.

(8)

and the corresponding impulse response hLP (t) is3


h(t) = T

(9)

ee 424 #1: sampling and reconstruction

Figure 7: An ideal lowpass filter.

Poisson Sum Formula


Figure 8: The impulse train pT (t) is
defined as
+

pT (t) =

(t n T )

n=

where T denotes its period.

Poisson sum formula. Consider the Fourier-series representation


of the impulse train pT (t) in Fig. 8:
+

pT (t) =

k =

where
0 =

a k e j k 0 t

2
T

and
ak =

1
T

Z
T

pT (t)e j k 0 t dt =

Therefore,

1
T

pT (t) =

k =

Z T/2
T/2

(t) e j k 0 t dt =

1 j k 0 t
e
.
T

1
.
T

(10)

Sampling
Introduction
Sampling: Conversion of a continuous-time signal (usually not quantized) to a discrete-time signal (usually
quantized).

ee 424 #1: sampling and reconstruction

Reconstruction: Conversion of a discrete-time signal


(usually quantized) to a continuous-time signal.
Why Sample and Reconstruct?

Digital storage (CD, DVD, etc.)


Digital transmission (optical fiber, cellular phone, etc.)
Digital switching (telephone circuit switch, Internet packet switch,
etc.)
Digital signal processing (video compression, speech compression,
etc.)
Digital synthesis (speech, music, etc.).

Applications
Here is a typical sampling and reconstruction system:

Quantization causes noise, limiting the signal-to-noise ratio (SNR) to about 6 dB per bit. We mostly
neglect the quantization effects in this class.

Point and impulse sampling


There are two ways of looking at the sampled signal: as
1. a sequence of numbers
x [n] = x (n T ), n integer
point sampling of x (t), depicted in Fig. 9 (b), or

ee 424 #1: sampling and reconstruction

2. a continuous-time signal
+

x P (t) =

x (n T ) (t n T )

n=

impulse sampling of x (t), depicted in Fig. 9 (c).

Figure 9: Sampling: (a) CT signal x (t),


(b) the point-sampled sequence x [n],
and (c) the impulse-sampled signal
x P ( t ).

ee 424 #1: sampling and reconstruction

10

Point sampling: An actual sampling system mixes continuous and discrete time.

Discrete-time
x [n] = x (n T )

Continuous-time x (t) specified for all t.


at n T, n integer.

Spectrum X F ( ) analyzed by CTFT, frequency


variable .

Spectrum X f () analyzed by DTFT, frequency


variable = T.

Impulse sampling: An equivalent all-CT system.

Continuous-time signal x P (t) specified for all t, but zero except at t = n T.


Spectrum XPF ( ) analyzed using CTFT (which is why we use impulse sampling), with
T ).
XPF ( ) = X f (|{z}

(11)

ee 424 #1: sampling and reconstruction

11

Sampling theorem
In this handout, we focus on impulse sampling because it
requires only the knowledge of theory of CT signals and

CTFT. 4 Recall the impulse train pT (t) = +


n= ( t n T ) and define
+

x P (t) = x (t) pT (t) =

x (t) (t n T ) =

n=

which is formally a CT
have

x (n T ) (t n T )
{z }

n= |

signal.5

(12)
By the Poisson sum formula (10), we

x P (t) =

x [n]

k =

1
x ( t ) e j k 0 t .
T

Since this is a course on digital signal


processing, we will turn to DT signals
and point sampling starting handout #2. Then, (11) will be the bridge
between the CT sampling theory developed in this handout and DT results in
the remainder of the class.
4

However, it is clear that the information it conveys about x (t) is limited to


the values x (n T ), n integer.
5

(13)

Take CTFT of (13):


XPF ( ) =

k =

1
1
CTFT{ x (t) e j k 0 t } =
T
T

where
0 =

2
T

k =

X F ( k 0 )

(14)

(rad/s).

CTFT

For x (t) X F ( ) bandlimited to | | < m , we have:


Figure 10: A bandlimited signal spectrum X F ( ) and the spectrum XPF ( ) of
the corresponding sampled signal.

CTFT

Sampling Theorem. Suppose x (t) X F ( ) bandlimited to | | <


m .

ee 424 #1: sampling and reconstruction

If the sampling frequency satisfies6


0 > 2 m

12

(15) is known as the Nyquist criterion.

(15)

as in Fig. 10, no aliasing occurs and we can perfectly reconstruct x (t)


from its samples
x [n] = x (t)|t=n T , n = 0, 1, 2, . . .
or, equivalently, from x P (t).

If
0 6 2 m
aliasing occurs and we cannot reconstruct x (t) perfectly from x [n] in
general. (In special cases, we can.)

Reconstruction
Assume that the Nyquist requirement 0 > 2 m is satisfied. We consider two reconstruction schemes:

ideal reconstruction (with ideal bandlimited interpolation),


reconstruction with zero-order hold.

Ideal Reconstruction: Shannon interpolation formula


Recall (14):
XP (t) = . . . +

1 F
1
1
X ( + 0 ) + X F ( ) + X F ( 0 ) + . . .
T
T
T
Figure 11: To reconstruct the original
CT signal x (t), apply an ideal lowpass
filter to the impulse-sampled signal
x P ( t ) = x ( t ) p T ( t ).

Our ideal reconstruction filter has the frequency response:


H F ( ) = T 1(/T,/T ) ( )

ee 424 #1: sampling and reconstruction

13

and, consequently, the impulse response [see (9)]


h(t) = sinc

t
.
T

Figure 12: An equivalent all-CT reconstruction system.

Now, the reconstructed signal is


+

x (t) =

x P (t)
| {z }

? h(t) =

impulse-sampled signal

x (n T ) (t n T ) ? h(t) = x (n T ) sinc
|
{z
}
n=
n=
h(t n T ), see (3)

which is the Shannon interpolation (reconstruction) formula. The actual


reconstruction system mixes continuous and discrete time.

The reconstructed signal xr (t) is a train of sinc pulses scaled by the


samples x [n].
This system is difficult to implement because each sinc pulse extends over a long (theoretically infinite) time interval.

Ideal reconstruction: Summary

Easy to analyze.
Hard to implement.
Based on bandlimited sinc pulses.

t n T
T

ee 424 #1: sampling and reconstruction

14

Figure 13: The interpolated signal is


a sum of shifted sincs, weighted by
the samples x (n T
 ). The sinc function
h(t) = sinc t/T shifted to n T, i.e.
h(t T ), is equal to one at n T and zero
at all other samples l T, l 6= n. The sum
of the weighted shifted sincs will agree
with all samples x (n T ), n integer.

A general reconstruction filter


For the development of the theory, it is handy to consider the
impulse-sampled signal x P (t) and its CTFT.
Figure 14: Reconstruction in the frequency domain is lowpass filtering.

F ( ) in Fig. 14 may not be a freHLP


quency response of an ideal lowpass
filter, in contrast with H F ( ) in Fig. 11.

ee 424 #1: sampling and reconstruction

15

Here, the reconstructed signal is xr (t), with CTFT


F
XrF ( ) = HLP
( ) XPF ( )

sampling th.

F
HLP
( )

1
T


2k 
XF
.
T}
k =
| {z

k 0

CTFT

F ( ) can be made more


Note: As sketched in Fig. 14, hLP (t) HLP
flexible than the ideal sinc/boxcar pair; yet, we can still achieve perfect reconstruction. The more we sample above the Nyquist rate, the
more flexibility we gain in terms of designing this filter. An example
of a more flexible filter is given in Fig. 15.

Figure 15: Frequency response of a


flexible lowpass reconstruction filter.
If m = 0 /2, then this frequency
response reduces to the standard boxcar
frequency response.

Reconstruction with zero-order hold

Many practical reconstruction systems use zero-order


hold circuits for reconstruction.
Why? Rectangular pulses are (much) easier to generate than (approximate) sinc pulses.
Replace the ideal sinc with a rectangular pulse7
hZOH (t) = rect
yielding

See Definition 1.

 t 0.5 T 
T

xZOH (t) =

n=

x [n] hZOH (t n T ).

Frequency response of the zero-order hold:


F
HZOH
( ) =

Z T
0

recall 0 = 2 /T and (1).

e j t dt =

 T

1 e j T
j
0
= T sinc
e j 0.5 T = T sinc
e
j
2
0

(16)

ee 424 #1: sampling and reconstruction

16

Reconstruction system (mixes continuous and discrete time).

Figure 16: The zero-order hold output xZOH (t) is a train of rectangular
pulses scaled by the samples x [n] (a
staircase approximation of x (t)), easy to
generate.

Rewrite the zero-order hold output as


+

xZOH (t) =

n=

x [n] hZOH (t n T ) =

n=

x [n] hZOH (t) ? (t n T )


{z
}
|
see (3)

= hZOH (t) ?

x [n] (t n T )

n=

= hZOH (t) ? [ x (t)

(t n T ) ]

n=

{z

p T (t)

= hZOH (t) ? x P (t).


Now, take CTFT of (17):
F
F
XZOH
( ) = HZOH
( ) XPF ( )

sampling th.

F
HZOH
( )

1
T

k =

X F ( k 0 ) .

ee 424 #1: sampling and reconstruction

17

Finally, the output of the reconstruction filter has the following spectrum [see (16)]:
F
F
XrF ( ) = HrF ( ) XZOH
( ) = HrF ( ) HZOH
( ) XPF ( ) = HrF ( )
| {z }

reconstruction
filter

We can reconstruct the signal perfectly, i.e.


CTFT

xr ( t ) = x ( t )

XrF ( ) = X F ( )

if

the Nyquist criterion is satisfied and


we can design a reconstruction filter with the following frequency response:
HrF ( )

 
sinc 0
| {z }

compensates ZOH
including delay (hence not causal)

1(0 /2,0 /2) ( ) .


|
{z
}
removes copies
k 6= 0


j 1
0
T sinc
e
0
T
|
{z
}|
sinc with phase factor
from the ZOH circuit

k =

X F ( k 0 ) .
{z

shifted copies
from sampling

ee 424 #1: sampling and reconstruction

18

ee 424 #1: sampling and reconstruction

We achieve flexibility in designing HrF ( ) by utilizing a sampling


rate that is significantly higher than the Nyquist rate, which provides
a guard band.

We can boost the sampling rate by digital interpolation you will


see how to do that in Lab 1 and learn the theory later in class.

Examples of sampling and reconstruction


In practice, we often use one of the standard analog lowpass filters
having order 2 to 10 (or so) as reconstruction filters HrF ( ). The last
two of the following examples use a second-order analog Butterworth
filter with cutoff frequency c = 0 /2.
First, recall Fig. 10.

19

ee 424 #1: sampling and reconstruction

20

ee 424 #1: sampling and reconstruction

21

ee 424 #1: sampling and reconstruction

22

ee 424 #1: sampling and reconstruction

23

ee 424 #1: sampling and reconstruction

24

Comments on Lab 1
Sampling part of Lab 1
Basic fact: A bandlimited signal with bandwidth f m (in
Hz) can be reconstructed perfectly from its samples if the sampling
rate f 0 = 1/T is twice the signal bandwidth (or more): f 0 > 2 f m .
Typically, we think of sampled sinusoids as looking like that in
Fig. 17.
Figure 17: Sampled sinusoid. At this
sampling rate, it is easy to believe that
we can reconstruct the sinusoid from its
samples.

Most sampled sinusoids are much less recognizable:


Figure 18: Sinusoid sampled at a much
lower sampling rate.

Conclusion: The fact that the signal was bandlimited before


sampling is a very powerful constraint in the reconstruction of the
continuous-time signal.

ee 424 #1: sampling and reconstruction

Figure 19: Continuous-time model of


the reconstruction of a discrete-time
signal.

Reconstruction part of Lab 1


How important is the lowpass filter response of the reconstruction filter in Fig. 19? You will look at the improvement in reconstruction as you go from a very simple lowpass filter to
higher-performance lowpass filters.
Basic Problem: You have one second of a 200 Hz sinusoid, sampled at 1024 Hz. You want to reconstruct it as accurately as possible.
Since everything in Matlab is inherently discrete time, we will
consider a closely related problem.

We start with a 200 Hz sinusoid sampled at 8192 Hz.


If we take every eighth sample (subsampling, or decimating by a
factor of eight), we have the 200 Hz sinusoid sampled at 1024 Hz.
We then wish to recover the 7/8ths of the samples we threw away.
Conceptually, the 8192 Hz sampling rate is so high that we can consider the sampled 200 Hz sinusoid to be continuous.
The 8192 Hz sampling rate was chosen so that the signals would
all be in the audio range. This is the sampling rate that Matlab
assumes for sound you can play and hear the reconstructions.
The first 16 ms of the 1024 Hz sampled signal look like this:

25

ee 424 #1: sampling and reconstruction

26

This is sampled well above the Nyquist rate, which is 400 Hz. Simple
interpolation methods will not be adequate.

Lowpass reconstruction filters


One-sample zero-order hold:
Figure 20: Convolution with a onesample wide (at 1024 Hz) rect() function.

Common approach, often followed by an additional reconstruction


filter HrF ( ) to correct for the passband frequency response of the
rect() and suppress sidelobes at multiples of 0 (in rad/s), see the
earlier discussion in this handout.
Linear interpolation:
This has better suppression of the sidelobes and more passband
distortion than the rect().
Ideally, we wish to use the perfect filter with a sinc() impulse response. This is not practical, so instead we approximate the infiniteduration sinc by a segment that we extract with a window function.

ee 424 #1: sampling and reconstruction

27

Figure 21: Convolution with a twosample wide (at 1024 Hz) wedge()
function.

Figure 22: The rect() and wedge()


filters are zero- and first-order approximations to the sinc.

Figure 23: Approximate interpolation:


Convolution with a windowed sinc.

ee 424 #1: sampling and reconstruction

28

Figure 24: First case: A 4-sample


windowed sinc (at 1024 Hz sampling).

Figure 25: Second case: An 8-sample


windowed sinc (at 1024 Hz sampling).

ee 424 #1: sampling and reconstruction

DT lowpass reconstruction filters


In Lab 1, we will do the filtering in discrete time using
sampled versions of the filters, and the convolution sum.

What we actually do here is upsampling or discrete-time interpolation:


the sampling rate is increased by a factor of M in discrete time, in
order to reduce the demands of the D/A conversion. This allows us
to use a very simple D/A converter. We will come back to this later
at the end of semester.

29

ee 424 #1: sampling and reconstruction

This is commonly done in CD players, where the data sampling rate


is 44.1 kHz. This rate is upsampled by a factor of 8 to 352.8 kHz. By
doing so, the need for correction of the ZOH passband distortion is
effectively eliminated.

References
A. V. Oppenheim and A. S. Willsky. Signals & Systems. Prentice Hall,
Upper Saddle River, NJ, 1997.

30

You might also like