Experiment No. 2 Discretization of Signals: Quantization and Encoding
Experiment No. 2 Discretization of Signals: Quantization and Encoding
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.
3) Generate sampled signal, y(t), with message signal frequency F = 3000 Hz and sampling frequency
F s = 8000Hz.
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.
5) Repeat all the ’Procedure’ steps and recreate the Quantization and Encoding of discrete signal into
simulink.
Well Done