You are on page 1of 36

Lecture 8

Sampling and Reconstruction


EE 442 – Spring Semester

Reading: Chapter 5; Section 5.2 Sampling – pp. 237 to 242

Ideal sampling Natural sampling

Flat-top sampling

https://sipdtdevelopers.wordpress.com/tag/sampling/
1
Practical Sampling Process (Uniform Sample Interval)
Sample, Quantize & Encode

Allowed
g(t) or m(t) values

Sampling time points

Red line: analog signal

16 discrete levels shown

https://en.wikipedia.org/wiki/Audio_bit_depth

2
Remember this basic principle

An absolutely band-limited waveform can’t be absolutely time-limited,


and
an absolutely time-limited waveform can’t be absolutely band-limited.

f
t

https://www.quora.com/What-is-the-difference-between-Nyquist’s-
signalling-theorem-and-Shannon’s-sampling-theorem

3
Using The “Fourier Transform” To Construct a “Sampling Function”

Shah function Ш(t): (TS is the sampling interval or period)


 
Ш(t) =   (t − nT ) =   (t + nT )
n =−
S
n =−
S

n+ 1
2

n is an integer
 Ш (t ) dt = 1
n− 1
2

1
Ш(t) Ш(f) fS =
Period = TS TS
1
TS

−2TS −TS 0 TS 2TS t −2 f S − f S 0 fS 2 fS f

Shah Function (aka “Dirac Comb Function” or “Sampling Function”)

4
Sampling Theorem
Sampling Theorem: A band-limited signal g(t) of bandwidth B (Hz)
can be reconstructed exactly from data samples taken at a sampling
rate fS if fS is greater than or equal to 2B (Hz).

Ideal sampling exists only mathematically on paper – it is achieved by


multiplying by an impulse train. The unit impulse train (aka as Shah
Function, or Dirac comb function, or sampling function) is

Ш( t ) =   (t − nT )
n =−
S

with interval TS seconds. Sampling signal g(t) at a uniform rate (with


sampling period TS and sampling rate fS =(1/TS) ) yields

 
g(t ) Ш (t ) =  g(t ) (t − nT ) =  g(nT ) (t − nT )
n =−
S
n =−
S S

5
Fourier Transform of a Sampled Signal

The impulse train is a periodic signal of period TS and can be expressed


as an exponential Fourier series, hence,
1 
jn t 2
Ш (t ) =
TS
e S
n =−
with S =
TS
= 2 f S

The Fourier transform of g(t) multiplied by Ш(t) is



1 jn 2 f St
F  g(t ) Ш (t ) =  g(t )e
TS n =−

Based upon the frequency-shifting property of the Fourier transform,


the nth term is shifted by frequency nfS. We write this as
1 
F  g(t ) Ш (t ) =  G( f − nf S )
TS n=−
where g(t )  G( f )

6
Fourier Transform of Sampled Signal (in pictures)
Baseband
g(t ) ( or m(t )) G(f)
“band-limited”
FT spectra of
bandwidth B
t

Ш(t)
G(f) consists of G(f), scaled by the
constant 1/TS , repeated periodically
with period fS = (1/TS) as shown here.
TS

g(t)  Multiple
Impulse G(f)
spectra
Sampling FT
t

After Lathi & Ding, 4th ed., 2009; p. 303. 7


Why Multiple Spectrums Result From Sampling

Lowest frequency

The samples of two sine waves can be identical


when at least one of them is at a frequency
greater than half the sample rate.

http://www.wikiwand.com/en/Nyquist–Shannon_sampling_theorem

8
Sampling Exactly at the Nyquist (Critical) Rate

Single
Sinusoidal
Waveforms

Results in
nonunique
solutions

A family of sinusoids at the critical frequency, all having the same sample
sequences of alternating +1 and –1. That is, they all are aliases of each
other, even though their frequency is not above half the sample rate.

http://www.wikiwand.com/en/Nyquist–Shannon_sampling_theorem

9
Recall the Fourier Transform of a Single Pulse
G1 ( f )
T1 G2 ( f )
1 1 T2

T1 T1
f f
−1 1

 g 1 (t ) T2 g2 (t ) T2

−T1 T1 t −T2 T2 t
2 2 G3 ( f ) 2 2
T3

1 f
1

T1 > T2 > T3 T3 g3 (t ) T3 
−T3 T3 t
2 2
Narrower spectrum corresponds to wider pulse. 10
Remember: Fourier Series for a Periodic Pulse Train
g(t )

−T − /2 0  /2 T t

G( f )
sinc function envelope
( −2 / )
(2/ )
( −1 / )
(1 / )

0 f
f S = (1 / T )

For a pulse train we have discrete frequencies (rather than a continuum


of frequencies) spaced as (1/T) from each other. Thus, we have a comb
of sinusoids at . . . -2fS, -fS, 0, fS, 2fS, . . . , with amplitudes given by the
sinc function associated with pulses of width .

11
Fourier Transform of Sampled Signal (in pictures)

g(t ) Band-limited G(f)


FT spectra of
bandwidth B
t

Ш(t)

The envelope of G(f) is the sinc function.


At f = 0 the
amplitude
is A/TS
 
g(t) G(f)
FT
t

12
Important Question: Can g(t) be reconstructed from samples?

Answer: Yes, assuming no overlap meaning that fS > 2B, so the


the sampling interval TS must be < (1/2B).

Minimum Sampling Rate:


The Minimum Sampling Rate fS = 2B is the Nyquist rate.
Oversampling occurs when the rate exceeds the Nyquist rate.

Interpolation:
Signal reconstruction is called Interpolation. We can recover
g(t) by sending the samples through a band-limited filter of
bandwidth B (Hz).

How we do this is illustrated in the next slide . . .

13
Ideal Interpolation (Illustrated Diagrammatically)
Pass the samples through band-limited filter:
h(t) Note: A
H(f) FT noncausal
Ideal Unit impulse impulse
band-limited response h(t) response
filter −1 1
2B 2B

f
t

g(t) A collection
g(t)
of sinc (t)
1
functions
2B

After Lathi & Ding, 4th ed., 2009; p. 305. 14


Ideal Interpolation (Shown Mathematically)

Mathematics for the previous slide in reconstruction of g(t):

h(t ) = 2 BTS  sinc(2 Bt )


At the Nyquist rate, with 2BTS = 1, then h(t) becomes

h(t ) = sinc(2 Bt )

g(t ) =  g( kTS )  h(t − kTS )


k

g(t ) =  g( kTS )  sinc  2 B(t − kTS )


k

15
Practical Reconstruction For Non-ideal Samples – I

Impulse functions are not physically realizable, so a sampling pulse can


not be truly instantaneous. Here p(t) is the reconstruction pulse.

g(t ) =  
n g ( nTS ) p( t − nTS ) = p( t )  
 n
g ( nTS ) ( t − nT )
S 

= p(t )  g(t )
g(t )
g(t ) p(t )

  
g(t ) = n g ( nTS ) p( t − nTS ) = p( t )  
 n
g ( nTS ) ( t − nT )
S 

= p(t )  g(t )

After Lathi & Ding, 4th ed., 2009; p. 307.


16
Practical Reconstruction For Non-ideal Samples – II

To reconstruct g(t) from non-ideal sampling, we must filter 


g(t) by using
a special filter known as an equalizer. In the frequency domain,
 1
G( f ) = P( f )
TS
 G( f − nf
n
S )

We denote the equalizer’s transfer function as E(f). The operation we



use is to apply the filter to G(f), hence
 1
G( f ) = E( f )G( f ) = E( f )P( f )
TS
 G( f = nf
n
S )

This relationship shows that the equalizer must remove all the shifted
replicas G(f – nfS) in the summation except for the low-pass term at n = 0.


g(t ) g(t )
Equalizer

G( f ) G( f )

17
Signal Recovery Observations

g(t )
Generally we use short pulses of duration
Tp to sample a function g(t). This does a Tp
better job of signal interpolation without
excessive demands upon an equalizer
filter. In fact, often the equalizer can be t
omitted.
TS

In practice it is impossible to precisely recover a band-limited signal g(t)


from its samples, even if the sampling rate is higher than the Nyquist
rate.

The sampling theorem rests upon the signal being strictly band-limited.
All practical signals are time-limited, they therefore can’t be precisely
band-limited.

After Lathi & Ding, 4th ed., 2009; p. 308.


18
Simple & Practical “Sample and Hold” Circuit
Basic sample and hold circuit and general waveform

Sampling Discharge Holding


Switch Switch Capacitor
+ +
Note: The RC time constants
C are not shown in figure.
g(t) VG1 g(t) Also, the samples are flat-top
VG2
samples of duration Tp seconds.

g(t)
g(t)

Tp t
TS
TS = 1/fS

19
Example of a Practical Circuit For “Sample and Hold”

Output
Input Buffer
Buffer

S1 A2
A1 + +
+
+ R C
VG1 S2 g(t)
g(t)
Sampling VG2
Pulse

Sampling capacitor C is isolated from input and output using unity-gain


connected operational amplifiers and independent input and output
resistances (high input resistance and very low output resistance).

http://www.electro-tech-online.com/attachments/samplehold-jpg.16101/

20
The Problem of Aliasing (or Spectral Folding)
Because signals are not band-limited, they have long tails in the frequency
domain as shown in G(f). Sampling at higher rates does not eliminate spectral
overlapping of repeated spectral cycles as shown in (b).
G( f )
Fourier transform
of waveform g(t)

0 f
(a) Note the spectra cross at
Reconstruction filter G( f ) Frequency fS /2 = (1/2TS) Hz.
H(f) Sample signal
spectrum

0  
−-sS -s /2 Lost tail is s /2 sS
folded back Lost tail

- fs - fs /2 fs /2 fs f
After Lathi & Ding, 4th ed., 2009; p. 311. (b) 21
1. What Can We Do to Reduce the Problem of Aliasing?

We can oversample, that is, we can sample at a rate exceeding the Nyquist
rate. This is illustrated below:

G( f )
Filter Sampled at Nyquist rate

-B B f f
S

G( f )
Filter Sampled above Nyquist rate

fS f

22
2. What Can We Do to Reduce the Problem of Aliasing?
We can place an anti-aliasing filter in front of the sampler.
Reconstructed filter
II(f)
Folded tail distorts
lower frequencies
Reconstructed spectrum
Gaa(f) Lost tail results in loss
of higher frequencies

Anti-aliasing filter

Haa(f) Sampler
g(t ) gaa (t ) gaa (t )
 T (t )
Reconstructed filter
II(f) Gaa(f)
Sample signal
spectrum
Reconstructed spectrum
(no distortion of lower frequencies

After Lathi & Ding, 4th ed., 2009; p. 311. 23


Maximum Information Rate in Communications

Basic relationship in digital communications:

A maximum of 2B independent elements of information per


second can be transmitted, error-free, over a noiseless channel
of bandwidth B Hz.

This is related to the sampling theorem:


Remember the sampling theorem states that a low-pass signal g(t) of
bandwidth B Hz (i.e., band-limited) can be recovered from uniform
samples taken at the rate of 2B samples per second.

The sampling theorem is important in signal analysis, digital signal


processing and transmission because it allows us to replace an analog
signal with a discrete sequence of numbers (i.e., a digital signal).

24
Digital Multiplexing & Demultiplexing – TDM
Time sharing a transmission medium.

Time
Division
Multiplexed
(TDM) Output

MUX DEMUX

25
Example: Time Division Multiplexing of Two Signals

g 1 (t )

g 2 (t )
t

After Lathi & Ding, 4th ed., 2009; p. 319.

26
TDM Can Be Realized Using NAND Gates

Four inputs
Select Lines

Note: 4PST means four pole, single throw, switch.

http://www.electronics-tutorials.ws/combination/comb_2.html
27
Example of TDM in Operation

https://rotechproject.wordpress.com/2014/04/13/time-division-multiplexing/

28
Advantages of Digital Over Analog For Communications

1. Digital is more robust than analog to noise and interference†


2. Digital is more viable to using regenerative repeaters
3. Digital hardware more flexible by using microprocessors and VLSI
4. Can be coded to yield extremely low error rates with error correction
5. Easier to multiplex several digital signals than analog signals
6. Digital is more efficient in trading off SNR for bandwidth
7. Digital signals are easily encrypted for security purposes
8. Digital signal storage is easier, cheaper and more efficient
9. Reproduction of digital data is more reliable without deterioration
10. Cost is coming down in digital systems faster than in analog systems
and DSP algorithms are growing in power and flexibility
† Analog signals vary continuously and their value is affected by all levels of noise.

29
30
Definition of Fourier Transform

The Fourier transform (i.e., spectrum) of f(t) is F ( ):



F  f (t ) =
F ( ) =   f (t )e − jt dt
−

1
 −-11  F ( ) =
f (t ) = F  F ( )e jt d 
2 −

Therefore, f (t )  F ( ) is a Fourier Transform pair

Agbo & Sadiku;


Section 2.7;
pp. 40-41
Note: Remember  = 2 f

31
Sampling Theorem
Sampling Theorem:
A physical waveform may be represented over the interval - < t < + by
 sin  f S (t − ( n f S ) 
g(t ) =  an
n =−  f S (t − ( n f S ) 
where 
sin  f S (t − ( n f S ) 
an = f S  g(t ) dt
−  f S (t − ( n f S ) 

and fS is the sampling rate parameter (fS > 0). If g(t) is bandlimited to
B Hz, and fS is greater than or equal to 2B Hz, then the equation becomes
the sampling function representation with
n
an = g  
 fS 
For fS > 2B Hz, the orthogonal series coefficients are the values of the
waveform when sampled every 1/fS seconds.

Proof in Leon W. Couch, II, 8 edition, Section 2-7, pp. 91-93.


32
Uniform Linear Quantization

https://slideplayer.com/slide/5274806/

33
1-to-8 FET Multiplexer/Demultiplexer

https://electronics.stackexchange
.com/questions/47279/difference
s-between-a-fet-multiplexer-and-
regular-digital-multiplexer

http://www.ti.com/lit/ds/symlink/sn74cbt3251.pdf
34
Aliasing in Sampling

S( f )

Aliasing 1
TS 
2W

1
TS 
2W

https://eng.libretexts.org/Bookshelves/Electrical_Engineering/Book%3
A_Electrical_Engineering_(Johnson)/5%3A_Digital_Signal_Processing/
5.03%3A_The_Sampling_Theorem
35
https://slideplayer.com/slide/5261494/
36

You might also like