0% found this document useful (0 votes)
55 views

Lab4 Quantization

(1) The document describes an experiment on analog to digital conversion and quantization. It explores uniform quantization and optimal quantization. (2) Uniform quantization divides the signal range equally into 2^b levels, where b is the number of bits. Optimal quantization non-uniformly allocates more levels to signal regions with higher probabilities. (3) For a 3-bit sine wave, the optimal quantizer achieves a higher SNR than the uniform quantizer. The gap in performance increases for signals like sinc that have non-uniform probabilities.

Uploaded by

abs
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Lab4 Quantization

(1) The document describes an experiment on analog to digital conversion and quantization. It explores uniform quantization and optimal quantization. (2) Uniform quantization divides the signal range equally into 2^b levels, where b is the number of bits. Optimal quantization non-uniformly allocates more levels to signal regions with higher probabilities. (3) For a 3-bit sine wave, the optimal quantizer achieves a higher SNR than the uniform quantizer. The gap in performance increases for signals like sinc that have non-uniform probabilities.

Uploaded by

abs
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Department of Electrical and Computer Engineering

Faculty of Engineering
Beirut Arab University

COMP 453 – Lab Experiment

Experiment 4

Analog to Digital Conversion – 2:


Quantization
Fall 2020 - 2021
EXPERIMENT DESCRIPTION

GENERAL RULES

 If you open a VI and you are not asked to do any changes to it, then close it without saving
changes by clicking on “Defer decision”.

 Save plots as [Student family name]_Question number.jpg. For questions with more than
one plot, append extra info to the name to differentiate between the plots.

PART II: QUANTIZATION


In this part, you will investigate the quantization process including the introduced quantization
noise. You will consider two quantization algorithms: (1) uniform quantization and (2) optimal
quantization. You will also compare them to each other with regard to quantization SNR.

A. UNIFORM QUANTIZATION

Open the Block Diagram of “UniformExample.VI”.


The four block subVIs are the following:

GetUniformParameters.VI
Gets the quantization values for a uniform quantizer.
QuantizeGeneric.VI
It quantizes a signal based on the passed from the previous
GetUniformParameters function.
SNRq.VI
Computes the quantization SNR in dB.
PlotQFunction.VI
Creates a plot of the quantization staircase function.

Q.1 Explain how the quantizer is implemented.


Hint: Look in the help at how the “Threshold 1D array” computes the
“fractional index”

1
Q.2 What is the relation between the number of bits per sample and the number
of quantization levels?

On the Front Panel of “UniformExample.VI”, set the following parameters and run the VI.

Signal Frequency 5 kHz


Bits per Sample 3

Q.3 What is the resulting value of the SNR in dB? Compare with the theoretical
value.

Increase the Bits per Sample to 4 and run the VI.

Q.4 Calculate the difference between the resulting value of the SNR with the
value obtained in Q.17. Comment.

B. Optimal Quantization

In this part, you will compare optimal quantization to uniform quantization. The difference is in
specifying the quantization steps and their thresholds which are referred to as Parameters in the
experiment.

Open the Block Diagram “UniformVSOptimal.VI”.

The new subVI is:

GetOptimalParameters.VI
Gets the quantization values for an optimal quantizer.
On the Front Panel of “UniformVSOptimal.VI”, set the following parameters:

Signal Type Sine Wave


Signal Frequency 2 kHz
Bits per Sample 3
Examine the waveforms graph to see the difference between the quantized waveforms.

Q.5 Why are the first and last quantization intervals smaller for the optimal
quantizer compared to the uniform quantizer?

2
Q.6 Note the difference between the two SNR values. Comment.

Change the Signal Type to Sinc Function and the Frequency to 5 kHz. Run the VI and note the
difference.

Q.7 Compare the SNRs of both quantizers. Comment.

Q.8 Why is the gap between the optimal and uniform quantizers bigger with
Sinc Function compared to Sine Wave? Save a figure of the quantized
signal.

Change the Signal Type to Linear and examine the waveforms and the steps graphs.

Q.9 Compare the SNRs of both quantizers. Comment.

You might also like