Lab 3
Lab 3
Lab 3
DR SMITA PARIJA
DEPT. OF ETC
2 EXPERIMENT LIST
Experiment-1 Simulation of a basic Wireless Sensor Network with single sink node.
Experiment-2 Design and simulation of heterogeneous wireless sensor network.
Analyze the minimum spanning tree used in deployment of wireless sensor
Experiment-3 network.
Experiment-4 Design and simulate the RNG and GG for topology control in WSN.
Simulate the WSN localization method to identify the co-ordinate of unknown
Experiment 5 node.
Experiment 6 Simulate and determine the network routing path between nodes in WSN.
Experiment 7 Compare and Analyze among the clustering algorithms used in WSN.
Determination of Convergence Indicator of heterogeneous wireless sensor
Experiment 8 network.
Experiment-9 Comparision of Routing protocols in homogeneous WSN.
Experiment-10 Verify the attack in WSN and mention its prevention method.
3
EXPERIMENT-3
• EXPT. REQUIREMENTS
• Software:- MATLAB 2016a / Python/ NS2/ NS3
• Operating System:- Windows 10 / Unix based platform
6
• THEORY:
7 PROGRAM CODE
• # s = [1 1 1 2 5 3 6 4 7 8 8 8];
• t = [2 3 4 5 3 6 4 7 2 6 7 5];
• weights = [100 10 10 10 10 20 10 30 50 10 70 10];
• G = graph(s,t,weights);
• p = plot(G,'EdgeLabel',G.Edges.Weight);
• [T,pred] = minspantree(G);
• hold on
• highlight(p,T)
8 PROGRAM CODE
• x= [1 1 2 2 3 4 6 4 5 5 6 5 1 1];
• y= [2 5 3 4 4 5 3 1 2 6 4 3 3 6];
• names = {'A', 'B', 'C', 'Do', 'E', 'F'};
• weights = randi(100, size(x)); %random 100 weight in s size
•
• D = graph(x,y,weights,names);
• p = plot(D,'EdgeLabel',D.Edges.Weight, 'Layout','circle');
• title('Finding Minimum Spanning Tree on Random Node');
•
• [T,pred] = minspantree(D);
• %view(biograph(T,[],'ShowArrows','off','ShowWeights','on'))
• highlight(p,T,'NodeColor','r','EdgeColor', 'r')
9 OBSERVATION
10 REPORT WRITING FORMAT
• CONCLUSION