Laboratory Session No 03
Laboratory Session No 03
Objective:
An Introduction to Analog to Digital Conversion (Quantization and Coding).
“Quantization Step Size” or “Resolution” denoted by “∆”. The total number of quantization
levels is denoted by “L”.
The formula for Resolution can be written as:
X max −X min
∆= L−1
Where X Max and X Min are the maximum and minimum value of the signal x (n).
Laboratory Session#03 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
Question 2:
Execute the quantization code, understand it, plot and comment on the output plot?
Answer:
Code:
Laboratory Session#03 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
Output:
Comment:
In the above example the code has quantized the original signal (in this case a sine wave
represented by blue stems).
We know that quantization transforms a CVDT value signal into DVDT signal. The same
procedure is done by the above code which changes the continuous values of the sine wave
into discrete values and then plot against discrete time axis which is represented by red stems.
The difference between the original values of the signal and the quantized signal at any time
instant is represented by green stems.
Question 3:
Discuss the specifications of Arduino Uno ADC like number of bits, number of quantization
levels, etc. Also, calculate the default Arduino Uno ADC resolution.
Answer:
Arduino UNO ADC Specifications:
Arduino is a microcontroller which is used to process signal and extract data from them by
applying signal processing techniques.
The specification of Arduino is as follow:
1) It has 6 analog input signal i.e. 6 channels.
2) The Arduino UNO ADC has 10 bit resolution.
Laboratory Session#03 Digital Signal Processing
Department of Electrical Engineering NED University of Engineering and Technology
X max −X min
∆= L−1
The minimum (X Min) and maximum (X Max) value of
Arduino is 0 and 5 respectively.
Quantization Level = 1024
Resolution is found to be;
5−0
∆= 1024−1
Question 4:
A 12-bit ADC has input values in the range of 0 – 1 V. Calculate the resolution of ADC.
Answer:
Given that:
No. of bits = 12
X min = 0
X max = 1
∆=?
Formula:
X max −X min
∆= L−1
Eq. (1)
Solution:
We know that,
L = 2No. of bits
L = 212
L = 4096
To calculate the resolution, we use Eq. (1)
1−0
∆= 4096−1
Question 5:
What do you mean by the term SQNR and ENOB? Discuss it briefly.
Answer
Effective Number of Bits (ENOB):
Signal-to-noise ratio is a measure used in science and engineering that compares the level of
a desired signal to the level of background noise. SNR is defined as the ratio of signal power
to the noise power, often expressed in decibels.
When a measurement is digitized, the number of bits used to represent the measurement
determines the maximum possible signal-to-noise ratio. This is because the minimum
possible noise level is the error caused by the quantization of the signal, sometimes
called noise. The ratio of signal to quantization noise is called Signal to Quantization Noise
Ratio (SQNR).