Sale!

CS455/655-Mobile Sensor Networks: Homework 1 solution

$30.00 $25.50

Category:

Description

5/5 - (5 votes)

Write a program (Matlab, Cpp, Python, etc) to:
1. Randomly distribute a network of 100 sensor nodes in the area of 180×180. Assume each sensor
node has its interaction range r =k*d, where k =1.2 and d = 15 (See Slide 9 in Lecture 4 to
understand these parameters). Draw a communication circle of each sensor node based on its
interaction range r. See the figure below:
Then plot a network of 100 sensor nodes (see figure below)
r
0 20 40 60 80 100 120 140 160 180
140
160
180
200
220
240
260
280
300
320
2. Find a number of neighbors for each sensor node and output it on a table. Basically you need to
write a programing function to do this job. (See a table in the next page)
3. Link sensor node i with its neighbors by a blue line (if programing on Matlab, use line function to
do it). Plot the sensor network with linked neighbors. Hint: a sensor network looks similarly to
this:
Reference Table for Question 2
Sensor
Index Neighbor indexes
1.
[9;73]
2.
[23;55]
3.
[44;64;82;88]
4.
[14;32;51;52;68;78;94]
5.
[21;37;55]
6.
[35;44]
7.
[45;96]
8.
[57;62;95]
9.
[1;33]
10.
[58;98]
11.
[70;72;91]
12.
[31;42;83;85;99]
13.
43
14.
[4;32;52;63;68;93]
15.
[25;34;59]
16.
64
17.
[25;40;50;51;60;78]
18.
[70;74]
19.
[53;69]
20.
[27;34;39;59;76;81]
21.
[5;37]
22.
[42;43;73;99]
23.
[2;65]
24.
[46;72]
25.
[15;17;40;50]
26.
[33;48;49]
27.
[20;34;39;76;81]
28.
[75;77;79;87;100]
29.
36
30.
[75;79;87]
31.
[12;42;83;85;88;99]
32.
[4;14;52;68;69;93;94]
33.
[9;26;48]
34.
[15;20;27;39;59;76]
35.
[6;36]
36.
[29;35;47]
37.
[5;21]
38.
[54;59;60]
39.
[20;27;34;59;81]
40.
[17;25;50;51;60;78]
41.
45
42.
[12;22;31;83;85;88;99]
43.
[13;22;73]
44.
[3;6;64;82]
45.
[7;41;58;96;98]
46.
24
47.
[36;81]
48.
[26;33;49]
49.
[26;48]
50.
[17;25;40;57;62]
51.
[4;17;40;60;68;78;86;94]
52.
[4;14;32;68;93;94]
53.
19
54.
[38;89]
55.
[2;5]
56.
90
57.
[8;50;62]
58.
[10;45;96;98]
59.
[15;20;34;38;39;60]
60.
[17;38;40;51;59;78]
61.
[]
62.
[8;50;57]
63.
[14;95]
64.
[3;16;44;82]
65.
23
66.
[]
67.
80
68.
[4;14;32;51;52;69;78;86;93;94]
69.
[19;32;68;93]
70.
[11;18;72;74;91]
71.
[]
72.
[11;24;70;91]
73.
[1;22;43]
74.
[18;70;91]
75.
[28;30;77;79;87;100]
76.
[20;27;34]
77.
[28;75;79;87]
78.
[4;17;40;51;60;68;86;94]
79.
[28;30;75;77;87]
80.
67
81.
[20;27;39;47]
82.
[3;44;64;88]
83.
[12;31;42;85;88;99]
84.
[92;95]
85.
[12;31;42;83;88;99]
86.
[51;68;78;94;97]
87.
[28;30;75;77;79;100]
88.
[3;31;42;82;83;85]
89.
54
90.
56
91.
[11;70;72;74]
92.
84
93.
[14;32;52;68;69;94]
94.
[4;32;51;52;68;78;86;93]
95.
[8;63;84]
96.
[7;45;58;98]
97.
86
98.
[10;45;58;96]
99.
[12;22;31;42;83;85]
100.
[28;75;87]