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

Experiment No. 2 Discretization of Signals: Quantization and Encoding

This document describes an experiment on quantization and encoding of signals. The experiment involves: 1) Generating a sampled sinusoidal signal and quantizing it for different levels (8, 16, 32, 64 levels). 2) Computing the mean square error and signal to quantization noise ratio (SQNR) and verifying with theoretical expressions. 3) Plotting the sampled, quantized signals and encoding the quantized levels into binary numbers. 4) Recreating the quantization experiment in Simulink.

Uploaded by

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

Experiment No. 2 Discretization of Signals: Quantization and Encoding

This document describes an experiment on quantization and encoding of signals. The experiment involves: 1) Generating a sampled sinusoidal signal and quantizing it for different levels (8, 16, 32, 64 levels). 2) Computing the mean square error and signal to quantization noise ratio (SQNR) and verifying with theoretical expressions. 3) Plotting the sampled, quantized signals and encoding the quantized levels into binary numbers. 4) Recreating the quantization experiment in Simulink.

Uploaded by

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

1

Experiment No. # 2
Discretization of signals : Quantization and Encoding
———————————————————————————————————————————

1) Objectives:
a) Quantization and Encoding.
b) Simulink based Quantization.

2) Software used:
a) MATLAB.

A. Pre-Lab
a) Read about analog to digital conversion.
b) practice simulink.

I. Q UANTIZATION
A. Theory
1) J. Proakis and D. Manolakis, Digital signal processing: principles, algorithms, and applications

B. Procedure
1) Generate a sinusoidal signal,
x(t) = A cos(2πf t)
of frequency 3000 Hz and 1Vpp for four complete cycles with sampling rate 100000 Hz.

2) The discrete time sampled signal is given by replacing t with nT s


x(nT s) = A cos(2πf nT s) (1)
where n is sample number and T s is time period of signal having frequency F s.

3) Generate sampled signal, y(t), with message signal frequency F = 3000 Hz and sampling frequency
F s = 8000Hz.

4) Make your own function myquantizer(y,L) for following quantizer specification.


• Type of Quantizer - Uniform.
• Input Range of Quantizer - 1Vpp.
• Levels of Quantizer - L.
2

5) Generate quantized signal g(t) by quantizing y(t) for different quantizer levels ’L’ i.e. 8, 16, 32, 64
etc.

6) Compute Mean Square error between g(t) and y(t) i.e. quantization noise power(Qe) and verify it
with the theoretical expression for SQNR of sinusoidal signal given by
3
SQN R = (22b )
2
= 1.76 + 6.02(b) (In dB)
where b is the no. of bits representing a particular level (i.e.Total levels L = 2b ).

7) Now, Fix the number of quantization level L to 64 and change peak to peak amplitude of input
signal x(t) from 0.1Vpp to 1Vpp with the difference of 0.1Vpp. Compute Signal to quantization
noise ratio(SQNR) for all cases.

8) Encoding:
Obtain quantized signal and represent each level by a definite binary number. The number of digits
b >= log(L).

9) Observation:
a) Plot 5 cycles of sampled signal and quanitized signal for various values of L = 8.
b) Plot the graph between quantization noise power(Qe) and quantization level L= 16, 32, 64.
c) Plot SQNR vs input voltage for various voltage levels as given in step.
d) Plot the sampled, quantized and encoded signal of a single complete cycle for L = 8.
e) Repeat the experiment in simulink.

10) Conclusion: Conclude the effect of increasing quantization level on SQNR. Also mention effect of
signal amplitude on SQNR.

II. Q UANTIZATION IN S IMULINK


1) Open simulink and create a model file with .slx extension.

2) Find various sources(sinewave, Quantizer) and sinks(display, scope) etc.

3) Drag the various functions to model file.

4) Search for matlab function in simulink blockset.

5) Repeat all the ’Procedure’ steps and recreate the Quantization and Encoding of discrete signal into
simulink.

Well Done

You might also like