Sie sind auf Seite 1von 11

SIMULATION LAB

OPEN ENDED EXPERIMENT - 1&2

MATLAB & LabVIEW

NAME. SOUEMN MONDAL


ROLL NO. 1807602(L.E)
CLASS. EEE
SECTION.2
SESSION. 2019-2020
MATLAB EXPERIMENTS
A. FIND THE CROSS CORRELATION OF TWO
SEQUENCES WITHOUT USING ‘XCORR’.

 Aim of The Experiment: Find the cross correlation of


two sequences without using ‘xcorr’.

 CODING:

 clc;

 clear all;


 close all;


 h=[0 1 2 3 4 5];

 x=[5 4 3 2 1 0];


 pp=h;

 qq=x;


 l1=length(h);


 l2=length(x);

 l=abs(l1-l2);


 if(l1>l2)


 x=[x zeros(1,l)];

 else if(l2>l1)

 h=[h zeros(1,l)];


 end


 end
 h=[h zeros(1,max(l1,l2))];

 for shift=0:max(l1,l2)

 xx=[zeros(1,shift) x zeros(1,(max(l1,l2))-shift)];


 y(shift+1,:)=sum(h.*xx);


 end

 y=y'


 subplot(3,1,1)

 stem(pp,'m');


 title('h');


 subplot(3,1,2)

 stem(qq,'b');


 title('x');


 subplot(3,1,1)

 stem(y,'r');


 title('coorelation'); 
 OBSERVATION:

CONCLUSION: The cross correlation of two sequences were


studied & ploted without using ‘xcorr’.

B. FIND THE AM MODULATED SIGNAL FOR THE GIVEN,


MESSAGE SIGNAL=2SINR & CARRIER SIGNAL=10COS1000X

 AIM OF THE EXPRIMENT: Find the am modulated signal


for the given, message signal=2sinr & carrier signal=10cos1000x

 CODING:

 clc;


 clear all;

 close all;


 t=0:0001:6.3;


 am=2;

 fm=1;


 msg=am*cos(fm*t);
 ac=10;

 fc=1000;

 carrier=ac*cos(fc*t);


 m=am/ac;


 y=ac.*(1+(m.*cos(fm.*t))).*cos(fc.*t);


 subplot(3,1,1)


 plot(t,msg);

 title('message signal');


 subplot(3,1,2)


 plot(t,carrier);

 title('carrier signal');


 subplot(3,1,3)


 plot(t,y);


 title('modulated signal'); 

 OBSERVATION:
 CONCLUSION: Here we plotted massage signal , carrier signal
& modulated signal.

C. FIND THE ENERGY SPECTRAL DENSITY(ESD) FOR I/R


SPEECH SIGNAL.

 AIM OF THE EXPERIMENT: Find the energy


spectral density(esd) for i/r speech signal.

 CODING:

 clc;


 clear all;


 close all;

 t=0:0.01:10;


 x=2*sin(2*t);
 freq=linspace(-5,5,1000);

 for k=1:length(freq);

 w=exp(-1i*2*pi*freq(k)*t);


 l=trapz(t,x.*w);


 magdata(k)=abs(l);

 phasedata(k)=angle(l);


 esd(k)=magdata(k)^2;

 end


 subplot(3,1,1)


 plot(freq,magdata);

 title('magnitude plot');


 subplot(3,1,2)


 plot(freq,phasedata);

 title('phase plot');


 subplot(3,1,3);

 plot(freq,esd);


 title('electro spectral density'); 
 OBSERVATOIN:

 CONLUSION: We studied energy spectral density for i/r speech


signal.
LabVIEW EXPERIMENT
 AIM OF THE EXPERIMENT: IMPLEMENT DIFFERENT
DIGITAL LOGIC CIRCUIT USING LABVIEW.

 SOFTWARE REQUIRED: LABVIEW

A. IMPLEMENT 4:1 MULTIPLEXER USING LABVIEW.

 OBSERVATION:

INPUT: D0 , D1 , D2 , D3

SELECT : S1 , S2

OUTPUT : Y

Selection Lines Output

S1 S0 Y
0 0 I0

0 1 I1

1 0 I2

1 1 I3

B. IMPLEMENT 3X8 DECODER USING LABVIEW

 OBSERVATION:

TRUTH TABLE:
S0 S1 S2 E D0 D1 D2 D3 D4 D5 D6 D7
x x x 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 1
0 0 1 1 0 0 0 0 0 0 1 0
0 1 0 1 0 0 0 0 0 1 0 0
0 1 1 1 0 0 0 0 1 0 0 0
1 0 0 1 0 0 0 1 0 0 0 0
1 0 1 1 0 0 1 0 0 0 0 0
1 1 0 1 0 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 0 0 0 0

The decoder circuit works only when the Enable pin (E) is high. S0, S1 and S2 are three different inputs and D0, D1, D2, D3.
D4. D5. D6. D7 are the eight outputs.

C. IMPLEMENT A 3-BIT DOWN COUNTER USING LABVIEW

 OBSERVATION:

In the 4-bit counter above the output of each flip-flop changes state on the falling edge (1-to-0 transition) of
the CLK input which is triggered by the Q output of the previous flip-flop, rather than by the Q output as in the up
counter configuration. As a result, each flip-flop will change state when the previous one changes from 0 to 1 at
its output, instead of changing from 1 to 0.

 CONCLUSION:


 HENCE,WE Implement different digital logic circuits using labview.

Das könnte Ihnen auch gefallen