how can i get to know the time elapsed in transferring the data from one node to other

i am trying to transfer the data from one node to other, i want to know the time elapsed when i send different data ??

7 Comments

How are you doing the transfer?
After the transfer is done can the other side send you a "finished" message?
clc;
clear all;
B1=[];B2=[];B3=[];B4=[];B5=[];B6=[];B7=[];
g=graph({'1','2','3','4','5','6','7','7','5','5','6','7'},{'2','3','4','5','6','7','5','4','2','1','1','1'})
plot(g)
B1=input ('enter your data\n P Q delta Voltage\n ');
B2=input ('enter your data\n P Q delta Voltage\n ');
B3=input ('enter your data\n P Q delta Voltage\n ');
B4=input ('enter your data\n P Q delta Voltage\n ');
B5=input ('enter your data\n P Q delta Voltage\n ');
B6=input ('enter your data\n P Q delta Voltage\n ');
B7=input ('enter your data\n P Q delta Voltage\n ');
s1=de2bi(B1);
s2=de2bi(B2);
s3=de2bi(B3);
s4=de2bi(B4);
s5=de2bi(B5);
s6=de2bi(B6);
s7=de2bi(B7);
r1=bi2de(s1)';
r2=bi2de(s2)';
r3=bi2de(s3)';
r4=bi2de(s4)';
r5=bi2de(s5)';
r6=bi2de(s6)';
r7=bi2de(s7)';
if(B1(4)>=22&&B1(4)<=24)
display('voltage at bus 1 is in range')
node1=vertcat(r1,r2,r6)
node2=vertcat(r2,r1,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r1,r2,r4,r6,r7)
node6=vertcat(r6,r1,r5,r7)
node7=vertcat(r7,r6,r5,r4)
else if(B1(4)>21&&B1(4)<=22)
display ('under voltage at bus 1')
node1=vertcat(r1,r2,r6)
node2=vertcat(r2,r1,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r1,r2,r4,r6,r7)
node6=vertcat(r6,r1,r5,r7)
node7=vertcat(r7,r6,r5,r4)
else if (B1>24)
% display('disconnecting the bus1 from entire network due to over voltage ')
display('node1 has been removed from the network due to over voltage' )
node1=vertcat(r1,r2,r6)
node2=vertcat(r2,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r2,r4,r6,r7)
node6=vertcat(r6,r5,r7)
node7=vertcat(r7,r6,r5,r4)
else if (B1(4)<=21)
display('disconnecting the bus1 from entire network')
node1=display('node1 has been removed from the network due to over voltage' )
node2=vertcat(r2,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r2,r4,r6,r7)
node6=vertcat(r6,r5,r7)
node7=vertcat(r7,r6,r5,r4)
end
end
end
endclc;
clear all;
B1=[];B2=[];B3=[];B4=[];B5=[];B6=[];B7=[];
g=graph({'1','2','3','4','5','6','7','7','5','5','6','7'},{'2','3','4','5','6','7','5','4','2','1','1','1'})
plot(g)
B1=input ('enter your data\n P Q delta Voltage\n ');
B2=input ('enter your data\n P Q delta Voltage\n ');
B3=input ('enter your data\n P Q delta Voltage\n ');
B4=input ('enter your data\n P Q delta Voltage\n ');
B5=input ('enter your data\n P Q delta Voltage\n ');
B6=input ('enter your data\n P Q delta Voltage\n ');
B7=input ('enter your data\n P Q delta Voltage\n ');
s1=de2bi(B1);
s2=de2bi(B2);
s3=de2bi(B3);
s4=de2bi(B4);
s5=de2bi(B5);
s6=de2bi(B6);
s7=de2bi(B7);
r1=bi2de(s1)';
r2=bi2de(s2)';
r3=bi2de(s3)';
r4=bi2de(s4)';
r5=bi2de(s5)';
r6=bi2de(s6)';
r7=bi2de(s7)';
if(B1(4)>=22&&B1(4)<=24)
display('voltage at bus 1 is in range')
node1=vertcat(r1,r2,r6)
node2=vertcat(r2,r1,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r1,r2,r4,r6,r7)
node6=vertcat(r6,r1,r5,r7)
node7=vertcat(r7,r6,r5,r4)
else if(B1(4)>21&&B1(4)<=22)
display ('under voltage at bus 1')
node1=vertcat(r1,r2,r6)
node2=vertcat(r2,r1,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r1,r2,r4,r6,r7)
node6=vertcat(r6,r1,r5,r7)
node7=vertcat(r7,r6,r5,r4)
else if (B1>24)
% display('disconnecting the bus1 from entire network due to over voltage ')
display('node1 has been removed from the network due to over voltage' )
node1=vertcat(r1,r2,r6)
node2=vertcat(r2,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r2,r4,r6,r7)
node6=vertcat(r6,r5,r7)
node7=vertcat(r7,r6,r5,r4)
else if (B1(4)<=21)
display('disconnecting the bus1 from entire network')
node1=display('node1 has been removed from the network due to over voltage' )
node2=vertcat(r2,r3,r5)
node3=vertcat(r3,r2,r4,r5)
node4=vertcat(r4,r3,r5,r7)
node5=vertcat(r5,r2,r4,r6,r7)
node6=vertcat(r6,r5,r7)
node7=vertcat(r7,r6,r5,r4)
end
end
end
end
i Want to know the time elapsed when its over voltage
I do not see any transfer of anything to anything else? I also do not see any time base? It seems unlikely to me that you want to be measuring the amount of time that a user is typing at an input() statement.
Sorry sir i m new to networking
I apologize fr this Can u please send me some basic codes where i can transfer data between two nodes
You appear to have a set up for an electrical network such as with generators and busses. You do not appear to be doing any data transfer.
Yes sir for electrical system only
I just want to find the effect of wrong data in bus 1 on other busses
As other busses will get effected by bus 1 data
You are not transferring data, and in your model it takes no time to change a parameter.
It would be valid to simulate an electrical bus and model voltage spikes and drops and voltage swings as you make changes such as simulating faults. For that kind of work you should search
tag:"ieee bus"
Here and in the File Exchange

Answers (0)

This question is closed.

Asked:

on 11 Jul 2019

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!