Digital Representation of Analogue Signals Analogue to ...€¦ · Analogue to Digital Conversion...

Preview:

Citation preview

Digital Representation of Analogue Signals

Analogue to Digital Conversion

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.

PCM encoder

Sampling

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

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

Nyquist theorem: Example

Nyquist theorem: Intuition

Nyquist theorem: Clocks

Note: We only care about ONE dimension!

Telephone companies digitize voice by assuming a

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

Nyquist theorem: Telephones

What is its spectrum?

Can we sample it?

Nyquist theorem: Square Wave

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!

PCM: Quantization and Encoding

-0.28

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)

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)

Quantization Noise: Examples (wiki)

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

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]:

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

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

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.

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

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

Delta modulation components

Delta demodulation components

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)

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)

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

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

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

Recommended