digital to analogue conversion natural signals tend to be analogue need to convert to digital

22
Digital to Analogue Conversion • Natural signals tend to be analogue Need to convert to digital ) 2 sin( ) ( ft t x ) 2 sin( ) ( s fnt n x

Upload: william-chapman

Post on 24-Dec-2015

244 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Digital to Analogue Conversion

• Natural signals tend to be analogue

• Need to convert to digital

)2sin()( fttx

)2sin()( sfntnx

Page 2: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Sampling• Need to hold the signal steady for long enough

to enable the A to D converter to generate an output

SampleandHold

SampleandHold

AnalogueTo digitalconverter

AnalogueTo digitalconverter

Page 3: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

• Quantization converts continuous value to a discrete (usually integer) value

• Output value is rounded so accuracy lost

• Maximum quantization error of ±0.5 lsb

• Error is combined with signal as noise

Page 4: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Quantization accuracy

V30.5 2

volts2

2

range voltagefull valuelsb

or

7.81mV 2

volts2

2

range voltagefull valuelsb

:convertersbit 16 and 8for volt then1 is rangeinput If

16bits num

8bits num

• Least significant bit determines accuracy. So for a 2 Volt peak to peak signal, an 8 bit converter can accurately represent multiples of 7.81mV but anything in between will be rounded

Page 5: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Quantization error

Error is at most ±1/2 an lsb, or ±3.905 mV for the 8 bit converter or ±15.25µV in the 16 bit case

Page 6: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Quantization error

• Relatively small signal changes are subject to severe quantization errors

Page 7: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

• Quantization error creates steps

• Steps create distortion which is visible in the frequency domain

• Noise shown on dB scale as it is relatively small compared to the signal

Page 8: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Sampling theory

• Signal needs to be sampled at twice the speed of the fastest change to be captured

• Shannon or the Nyquist sampling theorem, (authors of 1940s papers)

• Theorem states that a continuous signal can be properly sampled, only if it does not contain frequency components above one-half of the sampling rate

Page 9: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Correctly sampled signal• Signal frequency is 0.09 of the sample rate

(i.e. sample rate is about 11x signal freq)

• e.g. 90Hz signal sampled at 1kHz

Page 10: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Sample rate still ok• Signal frequency is 0.31 of the sample rate

(i.e. sample rate about 3x signal freq)

• 3.2 samples / cycle but freq still preserved

Page 11: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Improper Sampling• Signal frequency is 0.95 of the sample rate (i.e.

sample rate only slightly higher than signal freq)

• Only 1.05 samples per cycle. Produces a 0.05Hz alias signal which is mixed with the original

Page 12: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Sidebands

• Sampling a signal is effectively multiplication of signals in the time domain

• Multiples of the sample frequency are produced as well as sum and difference frequencies (sidebands)

Page 13: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

No sampling no sidebands• Time domain to frequency domain of an

analogue signal

Page 14: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Sampled signal produces sidebands

Page 15: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Incorrectly sampled signal• Breaching Nyquist causes aliasing with

overlapping sidebands

Page 16: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Simulated sampling

• Using a sample rate of 1kHz, the frequency spectrum with noise was calculated from:

)3002sin()1202sin()502sin()( sss ntntntnf

• Then modified to illustrate aliasing by changing 300Hz signal to 800Hz:

)8002sin()1202sin()502sin()( sss ntntntnf

Page 17: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

)3002sin()1202sin()502sin()( sss ntntntnf

Correct sample rate

Page 18: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Aliasing at 200Hz

)8002sin()1202sin()502sin()( sss ntntntnf

Page 19: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Anti-alias filter• Frequencies higher than those of interest (such

as noise) need to be blocked before sampling. Use an analogue low pass filter

Page 20: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital
Page 21: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

DSP system

AnalogueAnti-alias

Filter

AnalogueAnti-alias

Filter

Analogueto digitalconverter

Analogueto digitalconverter

SampleandHold

SampleandHold DSPDSP

Digitalto analogueconverter

Digitalto analogueconverter

AnalogueReconstruction

Filter

AnalogueReconstruction

Filter

• Low pass input filter removes F > 0.5F(S)

• Reconstruction filter removes high frequency F(S) multiples

Page 22: Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital

Sound Blaster block diagram