0% found this document useful (0 votes)
54 views5 pages

American International University-Bangladesh Department of Computer Science Lab Report Cover Sheet Course Name Student Name Student Id Lab Report No

This lab report cover sheet provides information about a data communication lab report submitted by student Tafshir Ahmed Khan. The performance task asks the student to apply uniform quantization on a signal x(t) using two manual quantization methods - using (2^H + 2) levels for the first method and (12 - 2^H) levels for the second. The student is asked to include the necessary MATLAB codes and figures in their report.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views5 pages

American International University-Bangladesh Department of Computer Science Lab Report Cover Sheet Course Name Student Name Student Id Lab Report No

This lab report cover sheet provides information about a data communication lab report submitted by student Tafshir Ahmed Khan. The performance task asks the student to apply uniform quantization on a signal x(t) using two manual quantization methods - using (2^H + 2) levels for the first method and (12 - 2^H) levels for the second. The student is asked to include the necessary MATLAB codes and figures in their report.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

American International University- Bangladesh

Department of Computer Science

Lab Report Cover Sheet

Course Name DATA COMMUNICATION

Student Name TAFSHIR AHMED KHAN

Student Id 18-39135-3

Lab Report No. 03

Lecturer Name TANJIL AMIN

Semester Fall 2020-21

Submission Date 10/03/2021

Section E
Performance Task for Lab Report: (your ID = AB-CDEFG-H)
x(t) = (H+5)*cos(2π((D+E+5)*10)t) + (H+7)*sin(2π((E+F+10)*10)t)
Q: Apply uniform quantization on signal ‘x(t)’ using both of the manual quantization
methods learnt in this manual. Use (2^H + 2) levels for first method and use (12 – 2^H )
levels for the second one. Attach codes and necessary figures in your report.

Ans:
My Id: 18-39135-3
A = 1;
B = 8;
C = 3;
D = 9;
E = 1;
F = 3;
G = 5;
H = 3;

x(t) = (H+5)*cos(2π((D+E+5)*10)t) + (H+7)*sin(2π((E+F+10)*10)t)


 x(t) = (3+5)*cos(2π((9+1+5)*10)t) + (3+7)*sin(2π((1+3+10)*10)t)
 x(t) = 8*cos(2π(15*10)t) + 10*sin(2π(14*10)t)
METHOD 1:
Levels: (12H + 2) = (8 + 2) = 10
So, bit = 23.4

MATLAB CODE
clc
close all
A1 = 8;
B1 = 10;
Am = A1 + B1;
bit = 3.4;
f1 = 150;
f2 = 140;
f = f1 + f2;
fs = 30000;
t = 0:1/fs:1/f;
y = 8*cos(2*pi*150*t) + 10*sin(2*pi*140*t);
Nsamples=length(y);
quantised_out=zeros(1,Nsamples);
del= (max(y)-min(y))/(2^bit);
Llow=-Am+del/2;
Lhigh=Am-del/2;
for i=Llow:del:Lhigh
for j=1:Nsamples
if(((i-del/2)<=y(j))&&(y(j)<=(i+del/2)))
quantised_out(j)=i;
end
end
end
plot(t,y,'r-.', 'linewidth',1.5);
hold on;
plot(t,quantised_out,'k-.', 'linewidth',1.5);
xlabel('time')
ylabel('amplitude')
title('example of manual quantization method 1')
legend('Original signal','quantized signal')
METHOD:2
x(t) = 8*cos(2π(15*10)t) + 10*sin(2π(14*10)t)
Levels = (12 - 2H) = (12 – 23) = 4

clc
close all
fs = 5000;
f1 = 150;
f2 = 140;
f = f1 + f2;
t = 0:1/fs:1/f;
A = 8;
B = 10;
x = 8*cos(2*pi*150*t) + 10*sin(2*pi*140*t);
L = 4;
delta=(max(x)-min(x))/(L-1);
xq = min(x)+(round((x-min(x))/delta)).*delta;
plot(t,x,'r-.', 'linewidth',1.5);
hold on;
plot(t,xq,'k-.', 'linewidth',1.5);
xlabel('time')
ylabel('amplitude')
title('example of manual quantization method 1')
legend('Original signal','quantized signal')

You might also like