31
Digital Representation of Analogue Signals Analogue to Digital Conversion

Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Digital Representation of Analogue Signals

Analogue to Digital Conversion

Page 2: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Analogue to Digital Conversion

Digital signal is superior to an analog signal (why?)

Need to change an analog signal to digital data

Two common techniques

Pulse Code Modulation

Delta Modulation.

Page 3: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

PCM encoder

Page 4: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Sampling

Page 5: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Also known as

Nyquist–Shannon sampling theorem

• establishes a sufficient condition for a sample

rate that permits a discrete sequence of

samples to capture all the information from a continuous-time signal of finite bandwidth

Nyquist theorem

Page 6: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Generally (what we assume in this course)

“the sampling rate must be at least 2 times the highest frequency contained in the signal”

Sometimes

“the sampling rate must be at least 2 times the width of the non-zero frequency interval” (as opposed to its highest frequency component)

More complex to implement this constraint

Very important for high-frequency signals with narrow bandwidth (e.g., one radio transmission channel)

Nyquist theorem: Details

Page 7: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Nyquist theorem: Example

Page 8: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Nyquist theorem: Intuition

Page 9: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Nyquist theorem: Clocks

Note: We only care about ONE dimension!

Page 10: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Telephone companies digitize voice by assuming a

maximum frequency of 4000 Hz. The sampling rate therefore is 8000 samples per second.

Nyquist theorem: Telephones

Page 11: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

What is its spectrum?

Can we sample it?

Nyquist theorem: Square Wave

Page 12: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

A complex bandpass signal has a bandwidth of 200

kHz. What is the minimum sampling rate for this signal?

Solution

We cannot find the minimum sampling rate in this case

because we do not know where the bandwidth starts or

ends. We do not know the maximum frequency in the

signal.

Book Example 4.11

Not True!

Page 13: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

PCM: Quantization and Encoding

-0.28

Page 14: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

PCM: Quantization and Encoding

PAM: infinite precision

PCM: precision limited by the precision of the numbers chosen for amplitude “measurement”

This imprecision results in quantization noise

Unlike many other kinds of noise, q.n. is correlated with the signal that was digitized

This correlation is bad => often need to do noise

shaping (basically, add good white or non-white noise to mask the bad quantization noise)

Page 15: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

PCM: Quantization and Encoding

Where does 1.76 dB come from?

Applies only to sinusoidal signals. With sinusoids,

the distribution of signal values is non uniform, and

the amount of noise generated is lower than with

uniform noise (would have been + 0 dB with random signals)

Page 16: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Quantization Noise: Examples (wiki)

Page 17: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal
Page 18: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Dithering in Audio in Detail

500 Hz, no dither; here and further, ~3 bits

With Dither, ±1 LSB, triangular (rand()+rand()) PDF

More noise, but it’s uniform and less obtrusive now

Page 19: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Noise Shaping (2 ways)

Filter dither before adding

Move noise where it’s hard to hear

FIR filter: error @1 sample before as feedback

Quantize this, instead of x[n]:

Page 20: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Is Dithering Always Needed?

Don’t care about the nature of noise – noe.g., the result is not an image or a sound

With sound, if the dynamic range is high, during the quietest passages, the highest bits stay zero –meaning, temporarily, for those parts you might really use only 2 or 3 bits, not 16!

Using dithering and noise shaping increases the dynamic range past “6.02 dB per bit” for some frequencies

When the source input is at least slightly noisy (e.g., microphone, cheap audio device), no additional dithering noise is needed

Page 21: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

What is the SNRdB in the example of Figure 4.26?

Solution

We can use the formula to find the quantization. We have

eight levels and 3 bits per sample, so

SNRdB = 6.02(3) + 1.76 = 19.82 dB

Increasing the number of levels increases the SNR.

Book Example 4.12

Page 22: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

A telephone subscriber line must have an SNRdB

above 40. What is the minimum number of bits per sample?

Solution

We can calculate the number of bits as

Example 4.13

Telephone companies usually assign 7 or 8 bits per sample.

Page 23: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

We want to digitize the human voice. What is the bit rate, assuming 8 bits per sample?

Solution

The human voice normally contains frequencies from 0 to

4000 Hz. So the sampling rate and bit rate are calculated

as follows:

Example 4.14

Page 24: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Delta ModulationUse a reference (staircase)

Compare the signal against the [delayed] reference (1/0) and update it (up/down)

(+) simple to implement

(–) high “sampling” rate needed; only one bit: hard to process

Staircase “remembers” (integrates) the obtained bits

Page 25: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Delta modulation components

Page 26: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Delta demodulation components

Page 27: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Similar ADC: Delta-Sigma

Quantize the signal and the accumulated error

“Remember” how far away from the true values we are and correct for this systematic “straying”

Sometimes known as PD[ensity]M

Simple to implement

Works best at (very) high sampling frequencies

Dithering and noise shaping is usually an integral part!

SACD implementation

1 bit

2.8224 MHz (64x CD’s 44.1 kHz)

Page 28: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Which ADC to Use

Want to process (e.g., mixing, noise reduction, compression): bit stream output hard to use

PCM modulation

For high speed (e.g., video)

Direct Conversion (2n comparators, 8–10 bit max)

For high quality sound need high SNR

Delta-Sigma, followed by decimation into 16/24 bits

Slow and simple (sensors, measuring tools)

Ramp Compare, Integrating ADC (counter-based)

Page 29: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Summary: Digitization of Analog Signals

1. Sampling: obtain samples of x(t) at uniformly spaced time intervals

2. Quantization: map each sample into an approximation value of finite precision

� Pulse Code Modulation: telephone speech

� CD audio

3. Compression: to lower bit rate further, apply additional compression method

� Differential coding: cellular telephone speech

� Subband coding: MP3 audio

Page 30: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Samplert

x(t)

t

x(nT)

Interpolationfilter

t

x(t)

t

x(nT)

(a)

(b)

Nyquist: Perfect reconstruction if sampling rate 1/T > 2Ws

Reconstruction

Page 31: Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion Digital signal is superior to an analog signal (why?) Need to change an analog signal

Digital Transmission of Analog Information

Interpolationfilter

Displayor

playout

2W samples / s

2W m bits/sx(t)

Bandwidth W

Sampling(A/D)

QuantizationAnalogsource

2W samples / s m bits / sample

Pulse

generator

y(t)

Original

Approximation

Transmission

or storage