You are on page 1of 1

EE 451: Communication Systems II - Laboratory

Laboratory 2: Quantization

Labwork

2.1

Quantization

a. Construct a signal where x(t) = 0.8cos(2f1 t) + 1.9sin(2f2 t) with f1 = 500Hz, f2 = 1.5KHz and
the sampling frequency Fs = 12KHz with signal duration 10ms.
b. Create a function, called quantize2() in order to quantize your signal. Assuming that your signal varies
in the range [a, b], one practical way of doing so is the following:


xa
ba
XQ =
(2N 1) N
+a
(1)
ba
2 1
Here, N represents the number of bits to represent the sample value. The signal range is divided into
2N levels, equally spaced, as such this procedure is called uniform quantization. a and b represents the
minimum and maximum values of the original signal.
c. Quantize the signal x(t) with 2 bits and 3 bits by using quantize2() function.
d. Plot the signal x(t) and the quantized outputs for 2 and 3 bits in order to compare the quantization
performance. Create a 2 1 subplot whose 1st axes has x(t) and 2-bits quantization result when 2nd
axes has x(t) and 3-bits quantization result. Do not forget to add labels and legends in order to have
clear figures.

Due: October 22, 2015

Page 1

You might also like