Analog To Digital Convertion
Analog To Digital Convertion
x (t ) = x(t ) (t − nTs ) -------------------- (1)
n = −
where 𝛿(𝑡 − 𝑛𝑇𝑠) is Dirac delta
function.
5/5/2021 Latha, Department of ECE, ASE,Bengaliuru 2
By using shifting property of the impulse
x(t) δ(t-to) = x(to) δ(t-to)
We can write expression (1) as
x (t ) = x(nT ) (t − nT )
n = −
s s
--------- (2)
or 1
n
X ( f ) =
Ts
n = −
X(f − )
Ts -------------(6)
X ( f ) = fs X( f −n f
n = −
s )
--------------(7)
-W 0 W
-W 0 W
-W 0 W
H( f )= 1
0 for f − W
TS
fs = 2W + WG = (2 × 40) + 10 = 90 KHz.
2.5
---------
f
-110 -90 0 90 110
∞ 5
𝐺𝛿 (f) = fs σ𝑛=−∞ [ δ ( f – n fs - 110) + δ (f – n fs+110)
2
+ δ (f – n fs - 90) + δ (f – n fs + 90) ]
5
𝐺𝛿 (f) = fs σ∞
𝑛=−∞ [ δ ( f – 250n - 110) + δ (f – 250n +110)
2
5
Gδ( f) /n=0 = G(f) = fs [ δ ( f -110) + δ ( f +110) + δ (f - 90) + δ (f + 90) ]
2
5
= fs [ δ ( f -360) + δ ( f -140) + δ (f - 340) + δ (f - 160) ]
2
5
= fs [ δ ( f +140) + δ ( f +360) + δ (f - 160) + δ (f - 340) ]
2
Gδ(f)
2.5 fs
f
-360 -340 fs -160 -140 -110 -90 0 90 110 140 160 fs 340 360
5/5/2021
Quantization
5/5/2021
Number of quantization levels=8
Input voltage range=[-2, 2]
-∞ ≤ xi < -1.5: xq=-1.75
-1.5 ≤ xi < -1: xq=-1.25
-1 ≤ xi < -0.5: xq=-0.75
-0.5 ≤ xi < 0: xq=-0.25
0 ≤ xi < 0.5: xq=0.25
0.5 ≤ xi < 1: xq=0.75
1 ≤ xi < 1.5: xq=1.25
1.5 ≤ xi < ∞ : xq=1.75
X=[ -0.3, -1.45, 0.6, 1.33, 0.798, -0.492]
Xq=[-0.25, -1.25, 0.75, 1.25, 0.75, -0.25]
5/5/2021
The conversion of an analog sample of the signal into
discrete form is called quantizing process.
5/5/2021
Quantization Error : It is the difference between the
output and input values of the quantizer. The maximum
instantaneous value of quantization error is half of one
step size, and the range of variation is from minus half a
step to plus half a step.
qe= x - Q(x)
x is input to the quantizer, Q(x) is output of the quantizer
and qe is quantization error
∆
Max{qe}=
𝟐
Quantization error is in the range
∆ ∆
- ≤ qe ≤
𝟐 𝟐
5/5/2021
5/5/2021
Quantization Methods
a. Uniform quantization
b. Non-uniform quantization
5/5/2021
5/5/2021
5/5/2021
ENCODING
5/5/2021
In encoding process a sequence of bits are assigned to
different quantization values.
Since there are a total of N=2ν quantization levels, ν
bits are sufficient for encoding.
There are ν bits corresponding to each sample.
Since the sampling rate is fs samples per second, we
will have a total
bit rate R= νfs bits per second.
5/5/2021
NBC and GRAY codes for 16-level Quantization
Level order NBC code Gray code
0 0000 0000
1 0001 0010
2 0010 0011
3 0011 0001
4 0100 0101
5 0101 0100
6 0110 0110
5/5/2021
7 0111 0111
8 1000 1111
9 1001 1110
10 1010 1100
11 1011 1101
12 1100 1001
13 1101 1000
14 1110 1010
15 1111 1011
5/5/2021
Example: Design an 8-bit quantizer for the input sample range
[-1.6, 1.6], and plot the transfer function. Also quantize the
sample values and encode using NBC
5/5/2021
Solution: Number of quantization levels=N=8
Step size= Vpp/N=3.2/8 =0.4 or ∆=0.4
Maximum quantization noise is 0.2
Quantization noise is in the range -0.2 – 0.2
xc=[1 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1]
5/5/2021
5/5/2021
Line coding
The assignment of the electrical voltages to
binary symbols 0 and 1 is called line coding.
5/5/2021
Waveform coding schemes are designed to reproduce
the waveform output of the source at the destination
with as minimum distortion as possible.
The aim is to reproduce the source output at the
destination with high fidelity.
The waveform coders are robust and can be used with
a variety of sources producing the waveforms having
some similarities.
5/5/2021
PULSE CODE MODULATION
Pulse code modulation(PCM) is the oldest and
simplest waveform coding scheme.
Pulse code modulation (PCM) is the name given to
the class of baseband signals obtained from sampled,
quantized signals by encoding each quantized sample
into a digital word.
For baseband transmission, the codeword bits will be
transformed into pulse waveforms.
It is the standard form of digital audio in computers,
CDs, digital telephony and other digital audio
applications.
5/5/2021
The pulse code modulator consists of three basic
sections. A sampler, a quantizer and an encoder.
In PCM the following assumptions are made.
1. The signal is band limited with a maximum
frequency of W Hz. Therefore it can be completely
reconstructed from samples taken at a rate of fs ≥ 2W.
2. The signal is of finite amplitude or bounded.
3. The quantization is done with a large number of
quantization levels N which is a power of 2 (N=2ν ).
5/5/2021
Basic elements of PCM system
5/5/2021
The basic elements of PCM system are as shown.
The basic operations in the transmitter are sampling,
quantization and encoding which are done in same
circuit known as analog-to-digital converter.
Regenerative repeaters will do the regeneration of
impaired signals at intermediate points along the
transmission path.
The operations at the receiver are last stage of
regeneration, decoding and demodulation of train of
quantized samples.
The operation of decoding and reconstruction are
performed in same circuit called a digital-to-analog
converter.
5/5/2021
Two PCM systems are
1. Uniform PCM system : uses uniform quantizer
2. Non uniform PCM system : uses non uniform
quantizer
5/5/2021
Uniform PCM System:
In uniform PCM system the quantizer is uniform
quantizer.
The range of input samples is [-xmax, +xmax]
The number of quantization levels is N.
The length of each quantization region is
2 xmax xmax
= = v −1
N 2
5/5/2021
SQNR
In uniform PCM the quantized values are chosen to be
the midpoint of the quantization regions
The quantization error is ~ x = x − Q ( x) is a random
variable taking values in the interval [− Δ , + Δ]
2 2
In ordinary PCM application the length of each
quantization region (Δ) is small and N is large.
Under these assumptions, in each quantization region,
the error X~ = X − Q( X ) can be approximated by a
uniformly distributed random variable on ( − , + ]
2 2
Or 1 ~
− x
f ( ~x ) = 2 2
0 otherwise
5/5/2021
Therefore quantization noise is
Δ
+2 1 Δ2 2
𝑥𝑚𝑎𝑥 2
𝑥𝑚𝑎𝑥
𝐸[𝑋෨ 2 ] = Δ Δ 𝑥 2 𝑑 𝑥 = = = 𝑣
− 12 3𝑁2 3×4
2
5/5/2021
Example 7.4.1: What is the resulting SQNR for a signal
uniformly distributed on [- 1 , I], when uniform PCM with 256
levels is employed?
Sol: We have SQNR / dB 10 log10 PX + 6v + 4.8
2
xmax
5/5/2021
7.15: A stationary random process has an autocorrelation function
𝐴2 𝜏
given by 𝑅𝑥 (𝜏) = 𝑒 cos2πf0τ . We know that the random
2
process never exceeds 6 in magnitude.
Assume that A = 6.
1. How many quantization levels are required to guarantee an
SQNR of at least 60 dB ?
2. Assuming that the signal is quantized to satisfy the condition of
Part 1 and assuming the approximate bandwidth of the signal is
W, what is the minimum required bandwidth for the
transmission of a binary PCM signal based on this quantization
scheme?
5/5/2021
𝐴2 𝜏
Sol: 𝑅𝑥 (𝜏) = cos2πf0τ . We know that the power in random
𝑒
2
process Px= Rx(τ) / τ=0
𝐴2 62
Px= = 18W xmax=6
=
2 2
1. PX
SQNR / dB 10 log10 2 + 6v + 4.8
xmax
60=10 log(18/36) + 6v + 4.8
60=-3 +6v +4.8 v=9.7 ≈ 10
Number of quantization levels N=2v =1024
2. The minimum bandwidth requirement for transmission of a
binary PCM signal is
BW = νW. Since ν = 10, we have BW= 10W.
5/5/2021
Example7.21: The power spectral density of a zero-mean WSS random
process X (t) is as given below and the maximum amplitude of this process
is 600.
1. What is the power content of this process?
2. If this process is sampled at rate fs to
guarantee a guard band of 2000 Hz, what
is fs?
3. If we use a PCM system with 256
quantization levels on this process (sampled
at the rate you found in Part 2), what is the resulting SQNR (in decibels)?
and also what is the resulting bit rate?
5. If the output of the PCM system is to be transmitted using a binary system,
what is the required minimum transmission bandwidth?
6. If we need to increase the SQNR by at least 25 dB, what is the required
number of quantization levels, the resulting SQNR, and the required
transmission bandwidth?
5/5/2021
Differential Pulse Code Modulation(DPCM)
In PCM each sample is quantized independently using
scalar quantizer.
Previous sample values have no effect on the
quantization of the present sample.
When a band limited random process is sampled with
Nyquist rate or more, the sampled values are
correlated random variables which means that the
signal does not change rapidly from one sample to
next so that the difference between the adjacent
samples has a variance that is smaller than the
variance of the signal itself
5/5/2021
When these highly correlated samples are encoded as
standard PCM the resulting encoded signal contains
redundant information.
By removing this redundancy before encoding we can
obtain more efficient coded signal.
Here the previous samples give some information
about the next sample.
This information can be used to improve the
performance of the PCM system
Example: If the previous sample values were small,
there is high probability that the next sample value
will also be small then it is not necessary to quantize
a wide range of values to achieve a good performance.
5/5/2021
Delta Modulation(DM)
Delta Modulation is simplified version of DPCM
In basic form DM provides a stair case
approximation to the over sampled version of an
input base band signal
DM quantizer is one bit (two level) quntizer
with amplitudes ±δ.
Analysis are same as analysis of the DPCM.
5/5/2021
Two level quantizer
5/5/2021
Here quantization noise is high if dynamic
range of the signal to the quntizer is high as
one bit per sample is employed. This implies
that the correlation between two consecutive
samples must be high.
Therefore the sampling frequency for DM must
be much higher than the Nyquist rate.
The number of bit per sample is only one, so
that the total number of bits per second
required to transmit is much lower than the
PCM system.
5/5/2021
5/5/2021
The step size ∆ plays very important role in
the design of delta modulator system.
The larger values of ∆ causes the modulator to
follow rapid changes in the input signal.
This causes excessive quantization noise when
the input changes slowly.
Granular noise is the quantization noise
caused by the larger value of ∆ with slowly
varying input where in stair case approximation
will hunt around a relatively flat segment of the
input waveform
5/5/2021
When ∆ is too small, we have problem with the
signal that is changing rapidly with the time.
When the input changes rapidly, the modulator
takes a long time for the out put to follow the
input.
The excessive quantization noise caused by the
small value of the ∆ for rapidly changing signal
where in stair case approximation falls far
behind the signal is known as slope-over load
distortion.
5/5/2021
The condition which should be satisfied to
avoid slope overload distortion is
dx(t )
max or
2Ts dt
dx(t )
max
TS dt
5/5/2021
5/5/2021
Example: A DM system is designed to operate at 3 times the
Nyquist rate for a signal with 3 kHz band width. The step size is
250 mV.
1. Determine the maximum amplitude of a 1 kHz input sinusoid
for which the DM does not show slope over load distortion.
Solution: 1. Let the input sinusoidal signal be
x(t)=a0 cos(2π1000t)
Condition for no slope over load distortion is
dx(t )
max
𝑑𝑥(𝑡)
= a 2000π max
𝑑𝑡 0 ST dt
𝛿
≥ a0 2000π
𝑇𝑆
5/5/2021
𝛿 𝑓𝑠
a0 ≤
2000𝜋
250×10−3 (3×2×3×103)
a0 ≤
2000π
a0≤ 716.19 mV
5/5/2021