ECE 363L: Chapter 2C
Quantization
ECE363L Fall 2024 Dr. Nema Salem 1
ADC
x (t ) ADC
Anti- Quantization Digital y (t )
Sample Zeroth- Anti-
aliasing binary signal DAC
and hold order image
filter encoder processor
hold filter
▪ The A/D conversion is achieved by first discretizing x(t) in time (sampling) and then rounding off these
samples’ amplitudes (quantization).
▪ The term rounding off points towards measuring the samples’ amplitudes by comparing them with the
chosen reference thresholds. The quantization process can be realized in several different ways, which results
in different quantized signal characteristics.
▪ Classically, the A/D conversion combines a uniform sampling and a uniform deterministic quantization
process. Here, the term uniform quantization states that the reference thresholds are uniformly distributed,
which means that the consecutive amplitude difference between all thresholds is unique.
ECE363L Fall 2024 Dr. Nema Salem 2
ECE363L Fall 2024 Dr. Nema Salem 3
Quantization
▪ Converting a discrete-time continuous-amplitude signal into a digital
signal by expressing each sample value as a finite number of digits is
called quantization.
▪ The error between a continuous-valued signal and a finite set of
discrete value levels signal is called quantization error.
▪ The output of the quantizer is: 𝑥𝑞 𝑛 = 𝑄 𝑥 𝑛
▪ The quantizer error is 𝑒𝑞 𝑛 = 𝑥 𝑛 − 𝑥𝑞 𝑛
ECE363L Fall 2024 Dr. Nema Salem 4
Unipolar Quantization
▪ The process of converting analog voltage with infinite precision to finite
precision is called the quantization process➔ quantization error which is the
difference between the original and recovered signals
▪ Unipolar quantizer deals with analog signals ranging from 0V to a positive
reference voltage. For 3-bit word, the amplitudes can be converted into eight
different levels.
▪ Bipolar quantizer has an analog signal range from a negative reference to a
positive reference.
ECE363L Fall 2024 Dr. Nema Salem 5
3-bit Unipolar Quantizer
ECE363L Fall 2024 Dr. Nema Salem 6
Binary code xq
111 7
110 6
101 5
100 4
011 3
010 2
001
000 x
0 2 3 4 5 6 7 8
eq
/2 x
− / 2
ECE363L Fall 2024 Dr. Nema Salem 7
ECE363L Fall 2024 Dr. Nema Salem 8
▪ xmax and xmin are the maximum and minimum values of the analog
input signal x.
▪ L denotes the number of quantization levels.
▪ m is the number of bits used in ADC.
▪ Δ is the step size of the quantizer or the ADC resolution.
▪ xq indicates the quantization level, and
▪ i is an index corresponding to the binary code.
𝑥𝑚𝑎𝑥 − 𝑥𝑚𝑖𝑛
Δ=
𝐿 = 2𝑚
𝑥 − 𝑥𝑚𝑖𝑛
i = round
Δ
𝑥𝑞 = 𝑖Δ 𝑖 = 0,1, … . , 𝐿 − 1
ECE363L Fall 2024 Dr. Nema Salem 9
Example
Assuming that a 3-bit ADC channel accepts analog input ranging from
0 to 5V, determine the following:
a) Number of quantization levels
b) Step size of quantizer or resolution
c) Quantization level when the analog voltage is 3.2𝑉
d) Binary code produced by the ADC.
e) determine the quantization error
ECE363L Fall 2024 Dr. Nema Salem 10
Solution
𝐹𝑜𝑟 𝑉𝑚𝑎𝑥 = 5𝑉, 𝑉𝑚𝑖𝑛 = 0𝑉, 𝑚 = 3 𝑏𝑖𝑡𝑠:
a) The number of quantization level: 𝐿 = 23 = 8 For the range is from 0V to 5V and there is 8
5−0 levels, the boundaries will be:
b) The step size: ∆ = = 0.625 𝑉
8 - Level 0: 0V
3.2Δ - Level 1: 0.625V
c) when x =3.2𝑉 = = 5.12Δ
Δ - Level 2: 1.25V
5.12 0.625 −0 - Level 3: 1.875V
d) 𝑖 = 𝑟𝑜𝑢𝑛𝑑
0.625
= 𝑟𝑜𝑢𝑛𝑑 5.12 = 5
- Level 4: 2.5V
The quantization 𝑥𝑞 = 5 0.625 = 5Δ = 3.125𝑉 - Level 5: 3.125V
- Level 6: 3.75V
The binary code 𝑖𝑠 101 - Level 7: 4.375V
Δ - Level 8: 5V
a) 𝑒𝑞 = 𝑥 − 𝑥𝑞 = 3.2 − 3.125 = 0.075 < = 0.3125
2
ECE363L Fall 2024 Dr. Nema Salem 11
3-bit Bipolar Quantizer
m=3
xmin = -4Δ
xmax = 3Δ
ECE363L Fall 2024 Dr. Nema Salem 12
ECE363L Fall 2024 Dr. Nema Salem 13
ECE363L Fall 2024 Dr. Nema Salem 14
Example
Design a bipolar quantizer for a signal that ranges from -5V to +5V. Determine
1. the number of the quantization levels
2. The quantization step
3. the quantization levels
4. If a continuous signal value of -3.2V is input into the quantizer, what will be the
quantized output?
5. Calculate the quantization error.
ECE363L Fall 2024 Dr. Nema Salem 15
Solution
1. Eight quantization Levels.
2. The signal range is 5V - (-5V) = 10V.
3. The quantization step size (Delta) is given by:
10V/8 = 1.25V 5. For an analog signal of -3.2V:
4. The quantization levels are:
- The closest quantization level is round(-3.2V/1.25) = round(-
- Level -4: -5V
- Level -3: -3.75V 2.56) = -3 (Level -3) = -3.75V.
- Level -2: -2.5V 6. Binary value is 001
- Level -1: -1.25V
6. Quantization error e = Input – Quantized Output
- Level 0: 0V
- Level 1: +1.25V = -3.2V - (-3.75V) = 0.55V
- Level 2: +2.5V
- Level 3: +3.75V
- Level 4: +5V
ECE363L Fall 2024 Dr. Nema Salem 16
SQNR Calculation
▪ m bits bipolar quantizer,
A
▪ Analog signal to be quantized is a sinusoidal waveform:
𝑥 𝑡 = 𝐴 𝑠𝑖𝑛 𝜋 × 1000𝑡
plot
Agin
or ECE363L Fall 2024 Dr. Nema Salem 17
a sinusoidal signal with max amplitude of “A”:
2𝐴
Δ= 𝑚
2
𝑇
2
1 𝐴
𝑇ℎ𝑒 𝑚𝑒𝑎𝑛 𝑠𝑞𝑢𝑎𝑟𝑒 𝑝𝑜𝑤𝑒𝑟 𝑜𝑓 𝑥𝑎 𝑡 : 𝑃𝑥 𝑡 = න 𝐴 𝑐𝑜𝑠𝜔𝑡 2 𝑑𝑡 =
𝑇 2
0
ECE363L Fall 2024 Dr. Nema Salem 18
𝑒𝑞 𝑡 = 𝑥𝑎 𝑡 − 𝑥𝑞 𝑡
∆
𝑒𝑞 𝑡 = 𝑡 − 𝜏 ≤ 𝑡 ≤ 𝜏
2𝜏
𝜏
1
𝑇ℎ𝑒 𝑚𝑒𝑎𝑛 𝑠𝑞𝑢𝑎𝑟𝑒 𝑒𝑟𝑟𝑜𝑟 𝑝𝑜𝑤𝑒𝑟: 𝑃𝑞 = න 𝑒𝑞2 𝑡 𝑑𝑡
2𝜏
−𝜏
𝜏 2 2 3 𝜏
1 ∆ 1 ∆ 𝑡 Δ2
= න 𝑡 𝑑𝑡 = อ =
𝜏 2𝜏 𝜏 2𝜏 3 12
0 0
2𝐴 4𝐴2
𝑓𝑜𝑟 Δ = 𝑚 = 2𝑚
2 2 12
𝐴2
=
3 22𝑚
ECE363L Fall 2024 Dr. Nema Salem 19
𝑃𝑥
𝑡ℎ𝑒 𝑠𝑖𝑔𝑛𝑎𝑙 𝑞𝑢𝑎𝑛𝑡𝑖𝑧𝑎𝑡𝑖𝑜𝑛 𝑛𝑜𝑖𝑠𝑒 𝑟𝑎𝑡𝑖𝑜: 𝑆𝑄𝑁𝑅 =
𝑃𝑞
𝐴2 3 22𝑚 2𝑚−1
= = 3 2
2 𝐴2 If L increases:
▪ Δ decreases
𝑆𝑄𝑁𝑅 𝑑𝐵 = 10 log 3 22𝑚−1 ▪ quantization error
decreases
= 6𝑚 + 1.77 ▪ accuracy of the
quantizer increases.
ECE363L Fall 2024 Dr. Nema Salem 20
Quantirer
unipolar Bipolarguanter