You are on page 1of 2

Page 1

American International University of Bangladesh


Department of Computer Engineering
DATA COMMUNICATION [L] COE 3201: Data Communication Laboratory

Faculty: Tanjil Amin [ BS BUET, EEE; MS Georgia Southern University, USA; Research University of Texas at Dallas.]

My ID = 17-35323-2
Name : Chayon MD Injamumul Haque (17-35-323-2) AB-CDEFG-H

Performance Task for Lab Report:


Generating two 3532 hertz sinusoids with di erent amplitudes and phases.
x1(t) = A1 cos(2π(3532)t + j1) ; x2(t) = A2 cos(2π(3532)t + j2)
A1 =AB= 17 ; A2 =GH= 32 ;
j1 =DG= 53 ; j2 = 30o
____________________________________________________________________

Ans. to the Ques. No - a :


Command Window -
>> A1 = 17;
>> A2 = 32;
>> c = 3*5*3*2;
>> j1 = 53*(pi/180);
>> j2 = 30*(pi/180);

Ans. to the Ques. No - b:


>> t = -1.5/c:3/2000000:1.5/c;
f0 = 3;
A = 5;
t = -1:0.005:1;
y = A*cos(2*pi*f0*t);
gure, plot(t, y,'*:');
xlabel('Time, sec'), ylabel(‘Amplitude');
title('Graph of sinusoid');

Ans. to the Ques. No - c :


>> x1 = A1*cos(2*pi*c*t+j1);
>> x2 = A2*cos(2*pi*c*t+j2);
>>xlabel('Time, sec'), ylabel(‘Amplitude');
>> plot(t,x1,'-r');grid on;hold;
>> plot(t,x2,'-b');
fi

ff

Page 2

Ans. to the Ques. No - d :


>> subplot(3,1,1);
>> plot(t,x1,'-r');grid on;
>> subplot(3,1,2);
>> plot(t,x2,'-b');grid on;

Ans. to the Ques. No - e :


>> x3 = x1+x2;
>> subplot(3,1,3);
>> plot(t,x3,'-r');grid on;

Ans. to the Ques. No - f :


>> load iddata2 z2;
w = linspace(0,10*pi,128);
sys_np = spa(z2,[],w);
sys_p = tfest(z2,2);
>> bode(sys_np,sys_p,w);
legend('sys-np','sys-p')

You might also like