37
Sampling and the Discrete Fourier Transform Chapter 7

Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling and the Discrete Fourier Transform

Chapter 7

Page 2: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Why Sampling?

• Entrance to the Digital World• Computers can’t handle the infinite data

present in continuous time signals�samples are taken from the signal

• Sampling to digital world is like addition and subtraction to all math applications

Page 3: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling Methods

• Sampling is most commonly done with two devices, the sample-and-hold (S/H) and the analog-to-digital-converter (ADC)

• The S/H acquires a CT signal at a point in time and holds it for later use

• The ADC converts CT signal values at discrete points in time into numerical codes which can be stored in a digital system

Page 4: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling Methods

During the clock, c(t),aperture time, the responseof the S/H is the sameas its excitation. At theend of that time, theresponse holds that valueuntil the next aperture time.

Sample-and-Hold

Page 5: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling MethodsAn ADC converts its input signal into a code. The code can be output serially or in parallel.

Page 6: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling MethodsExcitation-Response Relationship for an ADC

Page 7: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling Methods

Page 8: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling MethodsEncoded signal samples can be converted back into a CTsignal by adigital-to-analog converter (DAC).

Page 9: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Pulse Amplitude ModulationPulse amplitude modulation was introduced in Chapter 6.

p t( )= recttw ∗

1Ts

combtTs

Modulator

Page 10: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Pulse Amplitude ModulationThe response of the pulse modulator is

y t( )= x t( )p t( )= x t( ) rectt

w ∗

1Ts

combt

Ts

and its CTFT is

Y f( )= wfs sinc wkfs( )X f − kfs( )k =−∞

Page 11: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Pulse Amplitude ModulationThe CTFT of the response is basically multiple replicasof the CTFT of the excitation with different amplitudes,spaced apart bythe pulse repetition rate.

Page 12: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Pulse Amplitude ModulationIf the pulse train is modified to make the pulses have a constantarea instead of a constant height, the pulse train becomes

p t( )=1w

recttw ∗

1Ts

combtTs

and the CTFT of the modulated pulse train becomes

Y f( )= fs sinc wkfs( )X f − kfs( )k =−∞

Page 13: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Pulse Amplitude Modulation

As the aperture time, w, of the pulses approaches zero the pulse train approaches an impulse train (a comb function) and the replicas of the original signal’s spectrum all approach the same size. This limit iscalled impulse sampling.

Modulator

Page 14: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling

The fundamental consideration in sampling theory is how fast to sample a signal to be able to reconstruct the signal from the samples.

High Sampling Rate

Medium Sampling Rate

Low Sampling Rate

CT Signal

Page 15: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Claude Elwood Shannon

Page 16: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling Theorem

As an example, let the CT signal to be sampled be

x t( )= Asinctw

Its CTFT is

XCTFT f( )= Aw rect wf( )

Page 17: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremSample the signal to form a DT signal

x n[ ]= x nTs( )= AsincnTs

w

and impulse sample the same signal to form the CT impulse signal

xδ t( )= Asinct

w fs comb fst( )= A sinc

nTs

w

δ t − nTs( )

n=−∞

The DTFT of the sampled signal is

X DTFT F( )= Awfs rect Fwfs( )∗comb F( )

Page 18: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling Theorem

Page 19: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling Theorem

XCTFT f( )= Aw rect wf( )

X DTFT F( )= Awfs rect Fwfs( )∗comb F( )

X DTFT F( )= Awfs rect F − k( )wfs( )k =−∞

The CTFT of the original signal is

a rectangle.

The DTFT of the sampled signal is

or

a periodic sequence of rectangles.

Page 20: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremIf the “k = 0” rectangle from the DTFT is isolated and then the transformation,

is made, the transformation is

If this is now multiplied by the result is

which is the CTFT of the original CT signal.

F →f

fs

Awfs rect Fwfs( )→ Awfs rect wf( )

Ts

Ts Awfs rect Fwfs( )[ ]= Awrect wf( )= XCTFT f( )

Page 21: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremIn this example (but not in general) the original signal can berecovered from the samples by this process:

1. Find the DTFT of the DT signal.2. Isolate the “k = 0” function from step 1.

3. Make the change of variable, , in the result of step 2.4. Multiply the result of step 3 by5. Find the inverse CTFT of the result of step 4.

The recovery process works in this example because the multiplereplicas of the original signal’s CTFT do not overlap in theDTFT. They do not overlap because the original signal isbandlimited and the sampling rate is high enough to separatethem.

F →f

fsTs

Page 22: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling Theorem

If the signal were sampled at a lower rate, the signal recovery process would not workbecause the replicas would overlap and the original CTFT function shape would not be clear.

Page 23: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

If a signal is impulse sampled, the CTFT of the impulse-sampled signal is

For the example signal (the sinc function),

which is the same as

Shannon’s Sampling Theorem

Xδ f( )= XCTFT f( )∗combTs f( )= fs XCTFT f − kfs( )k =−∞

Xδ f( )= fs Awrect w f − kfs( )( )k =−∞

X DTFT F( )F→ f

fs

= Awfs rect f − kfs( )w( )k =−∞

Page 24: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling Theorem

Page 25: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremIf the sampling rate is high enough, in the frequency range,

the CTFT of the original signal and the CTFT of the impulse-sampled signal are identical except for a scaling factor of . Therefore, if the impulse-sampled signal were filtered by an ideal lowpass filter with the correct corner frequency, the original signal could be recovered from the impulse-sampled signal.

−fs

2< f <

fs

2

fs

Page 26: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremSuppose a signal is bandlimited with this CTFT magnitude.

If we impulse sample it at a rate,

the CTFT of the impulse-sampled signal will have this magnitude.

fs = 4 fm

Page 27: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremSuppose the same signal is now impulse sampled at a rate,

The CTFT of the impulse-sampled signal will have this magnitude.

This is the minimum sampling rate at which the original signal could be recovered.

fs = 2 fm

Page 28: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Shannon’s Sampling TheoremNow the most common form of Shannon’s sampling theorem can be stated.

If a signal is sampled for all time at a rate more than twice the highest frequency at which its CTFT is non-zero it can be exactly reconstructed from the samples.

This minimum sampling rate is called the Nyquist rate. A signal sampled above the Nyquist rate is oversampled and a signal sampled below the Nyquist rate is undersampled.

Page 29: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Harry Nyquist

2/7/1889 - 4/4/1976

Page 30: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Timelimited and BandlimitedSignals

• The sampling theorem says that it is possible to sample a bandlimited signal at a rate sufficient to exactly reconstruct the signal from the samples.

• But it also says that the signal must be sampled for all time. This requirement holds even for signals which are timelimited (non-zero only for a finite time).

Page 31: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Timelimited and BandlimitedSignals

A signal that is timelimited cannot be bandlimited. Let x(t) be a timelimited signal. Then

The CTFT of x(t) is

Since this sinc function of f is not limited in f, anything convolved with it will also not be limited infand cannot be the CTFT of a bandlimited signal.

x t( )= x t( )rectt − t0

∆t

X f( )= X f( )∗ ∆t sinc ∆tf( )e− j2πft0

rectt − t0

∆t

Page 32: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling Bandpass SignalsThere are cases in which a sampling rate below the Nyquist rate can also be sufficient to reconstruct a signal. This applies to so-called bandpass signals for which the width of the non-zero part of the CTFT is small compared with its highest frequency. In some cases, sampling below the Nyquist rate will not cause the aliases to overlap and the original signal could be recovered by using a bandpass filter instead of a lowpass filter.

fs < 2 f2

Page 33: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

InterpolationA CT signal can be recovered (theoretically) from an impulse-sampled version by an ideal lowpass filter. If the cutoff frequency of the filter is thenfc

X f( )= Ts rectf

2 fc

Xδ f( ) , fm < fc < fs − fm( )

Page 34: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

InterpolationThe time-domain operation corresponding to the ideal lowpass filter is convolution with a sinc function, the inverse CTFT of the filter’s rectangular frequency response.

Since the impulse-sampled signal is of the form,

the reconstructed original signal is

x t( )= 2fc

fs

sinc 2fct( )∗xδ t( )

xδ t( )= x nTs( )δ t − nTs( )n=−∞

x t( )= 2fc

fs

x nTs( )sinc 2fc t − nTs( )( )n=−∞

Page 35: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

InterpolationIf the sampling is at exactly the Nyquist rate, then

x t( )= x nTs( )sinct − nTs

Ts

n=−∞

Page 36: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling a SinusoidCosine sampled at twice its Nyquist rate. Samples uniquely determine the signal.

Cosine sampled at exactly its Nyquist rate. Samples do notuniquely determine the signal.

A different sinusoid of the same frequency with exactly the same samples as above.

Page 37: Sampling and the Discrete Fourier Transform and DFT-1.pdf · Sampling Methods • Sampling is most commonly done with two devices, the sample-and-hold(S/H) ... sampling theory is

Sampling a SinusoidSine sampled slightly above its Nyquist rate

Two different sinusoids sampled at the same rate with the same samples

It can be shown (p. 516) that the samples from two sinusoids,

taken at the rate, , are the same for any integer value of k.

x1 t( )= Acos 2πf0t +θ( ) x2 t( )= Acos 2π f0 + kfs( )t +θ( )fs