1 of 21

Quantization in Digital Signal Processing

UNDERSTANDING THE PROCESS STEP-BY-STEP

2 of 21

Introduction to Quantization

  • Definition: Quantization is the process of mapping continuous amplitude values into discrete levels.
  • Importance: It is a key step in Analog-to-Digital Conversion (ADC) after Sampling.
  • Applications: Used in audio processing, image compression, and digital communications.

3 of 21

Steps of ADC

  • Sampling – Discretizing the signal in time.

  • Quantization– Assigning discrete amplitude levels.

  • Encoding– Representing quantized values as binary numbers.

4 of 21

Step 1 - Sampling

  • Definition: Sampling is the process of converting a continuous-time signal into discrete-time values.
  • Nyquist Theorem (مبرهنة نايكويست): The sampling frequency should be at least twice the highest frequency component in the signal to avoid aliasing.
  • Formula:

5 of 21

Illustration:

6 of 21

Step 2 - Quantization

  • Definition:
  • After sampling, we get continuous but time-discrete values. In the quantization step, each sample is rounded to the nearest possible value within a limited range of numerical values.

OR

Assigning each sampled value to the nearest discrete level.

7 of 21

Illustration:

8 of 21

Illustration:

9 of 21

Illustration:

10 of 21

Step 3 - Encoding

  • Definition:
  • Assigning a unique binary code to each quantized level.
  • Formula for Number of Levels:
  • Where N is the number of bits.

  • Example:
  • If N = 3 , then L = 8 quantization levels.

11 of 21

Illustration:

12 of 21

step size

  • Compute step size:

  • Example: Signal range = -5V to 5V, and N = 3 bits.
  • Compute quantization levels: 2^3 = 8
  • Compute step size: Delta = (5-(-5))/8 = 1.25V

13 of 21

Quantization Rules:

14 of 21

Example:

  • Assuming that a 3-bit ADC channel accepts analog input ranging from 0 to 5 volts, determine the following:

  • a. number of quantization levels
  • b. step size of the quantizer or resolution
  • c. quantization level when the analog voltage is 3.2 volts

15 of 21

  • a. number of quantization levels:

  • L = 2^3 = 8

  • b. step size of the quantizer or resolution

Delta = (5-0)/8 = 0.625

16 of 21

  • c. quantization level when the analog voltage is 3.2 volts (2 steps):

i (index level) = round[(3.2-0)/0.625] = 5

Xq = 0 + 5 * 0.625 = 3.125

17 of 21

Quantization Error

  • Definition:
  • The difference between the actual sampled value and its quantized approximation.
  • Formula:

  • Error Range:

18 of 21

Example:

  • Using Pervious Example , determine the quantization error when the analog input is 3.2 volts.

  • eq = xq - x
  • = 3.125 – 3.2 = -0.075 volt
  • Note that the quantization error is less than half of the step size, that is,
  • |eq| = 0.075 < Delta/2 = 0.3125 volt

19 of 21

MatLab

  • N = 3;
  • L = 2^N;
  • disp(['Number of quantization levels: ', num2str(L)]);
  • V_min = 0;
  • V_max = 5;
  • Delta = (V_max - V_min) / L;
  • disp(['Step size: ', num2str(Delta), ' V']);
  • V_input = 3.2;
  • I_level = round((V_input - V_min) / Delta);
  • Q_level = V_min + I_level * Delta;
  • disp(['Quantization Level for 3.2V: ', num2str(Q_level), ' V']);

20 of 21

Thank you

NAYIRA SELEEM

21 of 21

Signal-to-Noise Ratio (SNR)

  • Definition:
  • Measures the quality of quantization.
  • Formula:
  • Observation:
  • Increasing N improves SNR and reduces quantization noise.
  • Example: