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

Labwork - 2

This document provides instructions for a lab on quantization. Students are asked to: 1) Construct a signal consisting of two sinusoids with given frequencies and sampling frequency. 2) Create a quantization function that maps a continuous signal range to discrete levels based on the number of bits, using uniform quantization. 3) Quantize the constructed signal with 2 and 3 bits using the quantization function. 4) Plot the original and quantized signals in a subplot to compare quantization performance with different numbers of bits. Add labels and legends to the plots.

Uploaded by

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

Labwork - 2

This document provides instructions for a lab on quantization. Students are asked to: 1) Construct a signal consisting of two sinusoids with given frequencies and sampling frequency. 2) Create a quantization function that maps a continuous signal range to discrete levels based on the number of bits, using uniform quantization. 3) Quantize the constructed signal with 2 and 3 bits using the quantization function. 4) Plot the original and quantized signals in a subplot to compare quantization performance with different numbers of bits. Add labels and legends to the plots.

Uploaded by

Azad Karataş
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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