From Analog
to Digital
Analog to Digital Conversion
Advantages of Analog:
• Analog signals can convey an infinite range of values, providing a
continuous and smooth representation of the original information.
• Analog systems are often simpler and less expensive than digital
systems, making them more accessible for certain applications.
• Analog signals can be easier to manipulate and process in some
cases, such as with audio signals.
Advantages of Digital:
• Digital signals can be easily and accurately reproduced without
the degradation or noise that can occur with analog signals.
• Digital systems are often more versatile and flexible than analog
systems, allowing for more complex processing and manipulation
of signals.
• Digital signals can be easily compressed and transmitted over
long distances without significant loss of information.
Analog to Digital Conversion
• Pulse Code Modulation (PCM)
• Delta Modulation
• Sigma-Delta Modulation
• Successive Approximation ADC
• Dual-slope Integrating ADC
Pulse Code Modulation (PCM)
• Pulse-code modulation (PCM) is a method used to digitally
represent sampled analog signals.
• PCM consists of three steps to digitize an analog signal:
• Sampling
• Quantization
• Binary encoding
• Before we sample, we have to filter the signal to limit the
maximum frequency of the signal as it affects the sampling
rate.
• Filtering should ensure that we do not distort the signal, ie
remove high frequency components that affect the signal
shape.
PCM
Sampling
• Analog signal is sampled every TS secs.
• Ts is referred to as the sampling interval.
• fs = 1/Ts is called the sampling rate or sampling frequency.
• There are 3 sampling methods:
• Ideal - an impulse at each sampling instant
• Natural - a pulse of short width with varying amplitude
• Flattop - sample and hold, like natural but with single
amplitude value
• The process is referred to as pulse amplitude modulation
PAM and the outcome is a signal with analog (non integer)
values.
Sampling
Nyquist Theorem
According to the Nyquist theorem, the sampling rate
must be at least 2 times the highest frequency
contained in the signal.
Example
• Sample a simple sine wave at three sampling rates: fs = 4f (2 times
the Nyquist rate), fs=2f (Nyquist rate), and fs = f (one-half Nyquist
rate).
•The
sampling
and the
subsequent
recovery of
the signal.
Example
• If we want to digitize an analog signal of maximum frequency
of 4000 Hz. The sampling rate is?
• A complex low-pass signal has a bandwidth of 200 kHz. What
is the minimum sampling rate for this signal?
Quantization
• Sampling results in a series of pulses of varying amplitude
values ranging between two limits: a min and a max.
• The amplitude values are infinite between the two limits.
• We need to map the infinite amplitude values onto a finite set
of known values.
• This is achieved by dividing the distance between min and
max into L zones, each of height (Uniform)
= (max - min)/L
Quantization Levels
• The midpoint of each zone is assigned a value from 0 to L-1
(resulting in L values).
• Each sample falling in a zone is then approximated to the
value of the midpoint.
• Assume we have a voltage signal with amplitudes Vmin=-20V
and Vmax=+20V.
• We want to use L=8 quantization levels.
• Zone width = (20 - -20)/8 = 5
• The 8 zones are: -20 to -15, -15 to -10, -10 to -5, -5 to 0, 0
to +5, +5 to +10, +10 to +15, +15 to +20
• The midpoints are: -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5, 17.5
Assigning Codes to Zones
• Each zone is then assigned a binary code.
• The number of bits required to encode the zones, or the
number of bits per sample as it is commonly referred to, is
obtained as follows:
nb = log2 L
• Given our example, nb = 3
• The 8 zone (or level) codes are therefore: 000, 001, 010, 011,
100, 101, 110, and 111
• Assigning codes to zones:
• 000 will refer to zone -20 to -15
• 001 to zone -15 to -10, etc.
Quantization & Encoding of Sampled
Signal
Delta Modulation
• Delta Modulation is a technique which provides a staircase
approximation to an over-sampled version of the message
signal (analog input).
• Compare the input analog signal with a quantized
version of the previously sampled signal and
determine whether the input signal has increased or
decreased. The difference between the actual signal and
the quantized signal is then represented as a binary value,
typically a 1 or 0.
• Sampling is at a rate higher than the Nyquist rate – aims at
increasing the correlation between adjacent samples;
simplifies quantizing of the encoded signal
Delta Modulation
16
Delta Modulation
• Message signal is over-sampled
• Difference between the input and the approximation is
quantized in two levels - +/-Δ
• These levels correspond to positive/negative differences
• Provided signal does not change very rapidly the
approximation remains within +/-Δ
Assume that:
• m(t) denotes the input message signal
• mq(t) denotes the staircase approximation
• m[n] = m(nTs), n = +/-1, +/-2 … denotes a sample of the
signal m(t) at time t=nTs, where TS is the sampling period
then
17
Delta Modulation
Basic principles of delta modulation in a mathematical form:
error signal
quantized error signal
quantized output
18
Delta Modulation
19
Transmitter Side
• Comparator – computes difference between input signal and
one interval delayed version of it
• Quantizer – includes a
hard-limiter with an input-
output relation a scaled
version of the signum
function
• Accumulator – produces the
approximation mq[n] (final
result) at each step by
adding either +Δ or –Δ
• = tracking input samples by
one step at a time
Receiver Side
• Decoder – creates the sequence of positive or negative
pulses
• Accumulator – creates the staircase approximation mq[n]
similar to transmitter side
• Out-of-band noise is cut off by low-pass filter (bandwidth
equal to original message bandwidth)
Noise in Delta Modulation
• Slope overhead distortion: When the input signal changes too
quickly. Step size of the delta modulator is too small to keep up
with the rapid changes in the input signal. ➔ The output of the
delta modulator starts to lag behind the actual input signal, leading
to distortion.
• Granular noise: Step size of the delta modulator is too large
compared to the signal being sampled. ➔ The staircase
approximation generated by the delta modulator does not
accurately represent the original analog signal, resulting in a
distorted signal.
Delta Sigma Modulation
• Conventional delta modulation - Quantizer input is an
approximation of the derivative of the input message signal
m(t).
• Results in the accumulation of error (noise)
• accumulated noise (transmission disturbances) at the
receiver (cumulative error).
• Possible solution: integrating the message before delta
modulation – called delta sigma modulation
Delta Sigma Modulation