Sampling and Reconstruction - Sonoma State …Sampling and Reconstruction EE 442 –Spring...

Preview:

Citation preview

Sampling and ReconstructionEE 442 – Spring Semester

Ideal sampling

Flat-top sampling

1

Lecture 8

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

2

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

Practical Sampling Process (Uniform Sample Interval)

Sample, Quantize & Encode

Ш(t) = ( ) ( )S Sn n

t nT t nT

12

12

( ) 1

n

n

t dt

Ш

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

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

From “Fourier Transform” We Can Construct a Sampling Function

Sf 2 SfSf2 Sf 0 fST 2 STST2 ST 0 t

SPeriod T1

S

S

fT

Ш(t) Ш(f)

1

ST

3

Sampling Theorem

Sampling Theorem: A band-limited signal g(t) of bandwidth B (Hz)can be reconstructed exactly from data samples taken at a samplingrate fS provided 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 written as

with interval TS seconds. Sampling signal g(t) at a uniform rate (withsampling period TS and sampling rate fS =(1/TS) ) produces

( ) ( )Sn

t t nT

( ) ( ) ( ) ( ) ( ) ( )S S Sn n

g t t g t t nT g nT t nT

Ш

Ш

4

Fourier Transform of a Sampled Signal

The impulse train is a periodic signal of period TS and can be expressedas an exponential Fourier series, thus,

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

Based upon the frequency-shifting property of the Fourier transform,the nth term is shifted by frequency nfS. We can express this as

1 2( ) with 2S S

nS S

Sjn tt f

T Te

Ш

21

( ) ( ) ( )nS

Sjn f tF g t t g t

Te

Ш

1

( ) ( ) )

where ( ) ( )

( SnS

F g t tT

g t G f

G f nf

Ш

5

Fourier Transform of Sampled Signal (in pictures)

6

( )g t

Ш(t)

FT

FT

G(f) consists of G(f), scaled by theconstant 1/TS , repeated periodicallywith frequency period f

S= (1/TS).

G(f)g(t)

Band-limitedSpectra

(bandwidth B)

G(f)

t

t

TS

Sampledg(t) = g(t)

7

Recall the Behavior of the Fourier Transform of a Single Pulse

1( )g t

t t

2( )g t

3( )g t

t

1( )G f

2( )G f

3( )G f

f

f

f

1

2

T1

2

T 2

2

T2

2

T

3

2

T3

2

T

2T

1T

3T

1

1

T1

1

T

2

1

T2

1

T

3

1

T3

1

T

T1 > T2 > T3

8

Fourier Series for a Periodic Pulse Train

/2/2 TT t

f

(1/ )S Sf T

(1/ )

(2/ )( 1/ )

( 2 / )

0

0

( )g t

( )G f

For a pulse train we have discrete frequencies (rather than a continuum of frequencies) spaced at (1/TS) from each other. Thus, we have a combof sinusoids at . . . -2fS, -fS, 0, fS, 2fS, . . . , with amplitudes given by the sinc function associated with pulses of width .

9

Fourier Transform of Sampled Signal (in pictures)

( )g t

Ш(t)

FT

FT

G(f)g(t)

Band-limitedSpectra

(bandwidth B)

G(f)

t

t

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

At f = 0 theamplitude

is A/TS

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

Answer: Yes, assuming no overlap meaning that fS

> 2B, so thethe sampling interval TS must be < (1/2B).

Minimum Sampling Rate:The Minimum Sampling Rate f

S= 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 ofbandwidth B (Hz).

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

10

Ideal Interpolation (Illustrated Diagrammatically)

Band-limitedFilter

FT

g(t) g(t)

H(f)h(t)

t

t

f

Note: ANoncausalImpulse

Response

Pass the samples through band-limited filter:

1

2B

1

2B

1

2B

A collectionof sinc(x)functions

11

Sampled Signal Reconstructed Signal

Ideal Interpolation (Shown Mathematically)

( ) 2 sinc(2 )Sh t BT Bt

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

( ) sinc(2 )h t Bt

( ) ( ) ( )

( ) ( ) sinc 2 ( )

S Sk

S Sk

g t g kT h t kT

g t g kT B t kT

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

12

Signal Recovery Limitation

t

( )g t

TS

Tp

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.

13

Basic sample and hold circuit and general waveform

Simple & Practical Sample and Hold Circuitry

14

Note: The RC time constantsare not shown in the figure.

Also, the samples are flat-topsamples of duration Tp seconds.

VG1VG2

SamplingSwitch

DischargeSwitch

HoldingCapacitor

C

+ +

g(t) g(t)

g(t)

g(t)

t

TS = 1/fS

TS

Tp

S2

S1

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

Example of a Practical Circuit For “Sample and Hold”

15

VG1VG2

C+

+

g(t)g(t)

S1

S2

++A1

A2

InputBuffer

OutputBuffer

SamplingPulse

R

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 spectraloverlapping of repeated spectral cycles as shown in (b).

16

Lost tail isfolded back Lost tail

0

Reconstruction filter

H(f) Sample signalspectrum

0

fs /2- fs /2 fs f

f

S

- fs

S

( )G f

( )G f

(a)

(b)

Note the spectra cross at Frequency fS /2 = (1/2TS) Hz.

Typical Fourier transformof a real waveform g(t)

s /2-s /2 s -s

17

What Can We Do to Reduce the Consequences of Aliasing?

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

B-B f

f

fS

fS

Sampled at the Nyquist rate

Sampled above the Nyquist rate

( )G f

( )G f

IdealFilter

Practical Filter

18

What Can We Do to Reduce the Consequences of Aliasing?

We can place an anti-aliasing filter in front of the sampler.

Haa(f)

Anti-aliasing filter

Sampler( )g t ( )aag t ( )aag t

( )T t

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 channelof bandwidth B Hz.

It is related to the sampling theorem:

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

The sampling theorem is important in signal analysis, digital signalprocessing (DSP) and transmission because it allows us to replace an analog signal with a discrete sequence of numbers (i.e., digital signal).

19

Digital Multiplexing -- TDM

20

TimeDivisionMultiplexing(TDM)

Time sharing a transmission medium.

MUX DEMUX

Example: Time Division Multiplexing of Two Signals

21

1( )g t

2( )g t

t

TDM Can Be Realized Using NAND Gates

http://www.electronics-tutorials.ws/combination/comb_2.html

22

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

23

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.

Advantages of Digital Over Analog For Communications

Recommended