Friday, November 22, 2024

youtube

   
Text Size

Capture Effect OMF/OML experiment

1. Scenario and topology

 

Topology

 

In this scenario 3 nodes will be used:

  • 1 node will be the receiver
  • the other 2 nodes will be the senders

UDP traffic will be generated with iperf from the senders to the receiver. In the duration of the experiment we will decrease the transmit power of one node and notice how is affected the throughput.

The distance of the two nodes from the receiver is equal.

 

  • Both senders start sending traffic with 10Mbps and 20Mbps
  • Both senders have initial transmit power 17dBm
  • After the first 30 seconds the transmit power of the first node (10Mbps) is decreased to 14dBm
  • The transmit power of the first node is further reduced after 30 seconds (60th second) to 11dBm
  • At exactly the 120th second the transmit power of the first node is set back to its default value 17dBm.
  • The experiment is left to run 60 more seconds and then it is terminated.

 

 

2. Experiment Description in OMF

  1 #
2 # This application generates UDP traffic with iperf and simultaneously changes the transmission power of the senders.
3 # The measurement points collected, is the traffic generated from the UDP and the observed dBm values at the receiver
4 # The graphs depict firstly the throughput between the senders and the receiver and secondly the rssi values measured at the side of the receiver
5 #
6
7 defProperty('mode', 'a', 'The mode the nodes will be using')
8 defProperty('channel', '40', 'The wifi channel the nodes will be using')
9 defProperty('interval', 5, 'The interval in seconds between samples')
10 defProperty('duration', 180, 'The duration in seconds the iperf generates traffic')
11
12
13 # Define the applications and the interface settings of the Senders
14 defGroup('Sender1',"omf.nitos.node001"){|node|
15 node.addApplication("test:app:iperf") do |app|
16 app.setProperty('udp', true)
17 app.setProperty('client', '192.168.2.9') # define the ip of the receiver
18 app.setProperty('port', 5337)
19 app.setProperty('time',property.duration)
20 app.setProperty('bandwidth', 10000000) # 10 Mbps
21 app.measure('Peer_Info', :samples => 1)
22
23 end
24 node.net.w0.mode = "adhoc"
25 node.net.w0.type = property.mode
26 node.net.w0.channel = property.channel
27 node.net.w0.essid = "iperf_rssi_test"
28 node.net.w0.ip = "192.168.2.1"
29 }
30 defGroup('Sender2',"omf.nitos.node003"){|node|
31 node.addApplication("test:app:iperf") do |app|
32 app.setProperty('udp', true)
33 app.setProperty('client', '192.168.2.9') # define the ip of the receiver
34 app.setProperty('port', 5337)
35 app.setProperty('time',property.duration)
36 app.setProperty('bandwidth', 20000000) # 20 Mbps
37 app.measure('Peer_Info', :samples => 1)
38 end
39 node.net.w0.mode = "adhoc"
40 node.net.w0.type = property.mode
41 node.net.w0.channel = property.channel
42 node.net.w0.essid = "iperf_rssi_test"
43 node.net.w0.ip = "192.168.2.3"
44 }
45
46
47 # Define the applications and the interface settings of the Receiver
48 defGroup('Receiver',"omf.nitos.node009"){|node|
49 node.addApplication("test:app:iperf") do |app|
50 app.setProperty('udp', true)
51 app.setProperty('server', true)
52 app.setProperty('port', 5337)
53 app.setProperty('interval', property.interval) # interval in seconds between iperf reports
54 app.measure('UDP_Rich_Info', :samples => 1)
55 app.measure('Peer_Info', :samples => 1) # interval between collected iperf reports
56 end
57 node.addApplication("wlanmonitor_app") do |app|
58 app.setProperty('interface', 'ath0')
59 app.setProperty('sampling', 1)
60 app.measure('wlanstat')
61 end
62 node.net.w0.mode = "adhoc"
63 node.net.w0.type = property.mode
64 node.net.w0.channel = property.channel
65 node.net.w0.essid = "iperf_rssi_test"
66 node.net.w0.ip = "192.168.2.9"
67 }
68
69 onEvent(:ALL_UP_AND_INSTALLED) {|event|
70 wait 15
71 group("Receiver").startApplications
72 wait 1
73
74 group("Sender1").startApplications
75 group("Sender2").startApplications
76 wait 30
77 info("Changing Transmission Power to 14dBm")
78 group("Sender1").exec("iwconfig ath0 txpower 14")
79
80 wait 30
81 info("Changing Transmission Power to 11dBm")
82 group("Sender1").exec("iwconfig ath0 txpower 11")
83
84 wait 60
85 info("Changing Transmission Power to 17dBm")
86 group("Sender1").exec("iwconfig ath0 txpower 17")
87 wait 60
88 allGroups.stopApplications
89 wait 600 # for evaluation of the graph
90 Experiment.done
91 }
92
93 # Define a graph to display while the experiment is running
94
95 addTab(:defaults)
96 addTab(:graph2) do |tab|
97 opts = { :postfix => %{This graph shows the Throughput from the UDP traffic.}, :updateEvery => 1 }
98 tab.addGraph("Throughput", opts) do |g|
99 data = Hash.new
100 stations = Hash.new #keeps track the Node's number via the ID of the iperf connection
101 mp = ms('UDP_Rich_Info') #This measurement point contains all the iperf reports
102 mp2 = ms('iperf_Peer_Info') #This measurement point contains the IDs of the peers
103 # access the measurements of the 'iperf_Peer_Info'
104 mp2.project(:ID, :foreign_address).each do |sample|
105 id, address = sample.tuple
106 stations[id] = address.split('.').last #we keep track of the last number of the ip. By convention tha last part of the ip corresponds to the number of the node
107 end
108
109 #access the measurements of the 'UDP_Rich_Info'
110 mp.project(:oml_ts_server, :ID, :Bandwidth).each do |sample|
111
112 time, id, bw = sample.tuple
113
114
115 data[stations[id]]=[] if data[stations[id]]==nil # initialization of the data[] array
116 bw = bw * 8 / 2**20 #Mbps ( bytes * 8 / 2^20 )
117 data[stations[id]] << [time, bw] # stations[id] gives us the correct number of the node
118 end
119 data = data.sort # ascending order of the array. [ 1 2 3 ...]
120 data.each do |k,v|
121 g.addLine(v, :label => "Node #{k}") # we depict the bandwidth of each node. data[1] corresponds to BW value of Node 1...data[2]... etc
122 end
123 end
124
125 #Graph with the rssi values
126
127
128 opts = { :postfix => %{This graph shows the received signal strength in dBm.}, :updateEvery => 1 }
129 tab.addGraph("RSS in dBm", opts) do |g|
130 data = Hash.new
131 # we keep track of the MACs of our nodes, in order to use more familiar names like "Node X" instead of the MAC address
132 nodes = {
133 "06:1b:b1:00:26:62" => "Node 1",
134 "06:1b:b1:00:26:6f" => "Node 2",
135 "06:1b:b1:00:26:b0" => "Node 3",
136 "06:1b:b1:00:26:bb" => "Node 4",
137 "06:0b:6b:84:8f:d3" => "Node 4", # ath1 interface
138 "06:1b:b1:00:26:85" => "Node 5",
139 "06:1b:b1:00:26:b4" => "Node 6",
140 "06:1b:b1:00:26:a8" => "Node 7",
141 #"06:1b:b1:00:26:5e" => "Node 9",# we comment out Node 9 in order not to measure it's own rssi values in the graph
142 "06:1b:b1:00:26:4d" => "Node 14",
143 "06:1b:b1:00:26:70" => "Node 15"
144 }
145 # Measurement point of wlanconfig
146 mp = ms('wlanstat')
147 mp.project(:oml_ts_server, :src_addr, :dbm).each do |sample|
148 time, src, dbm = sample.tuple
149
150 #we don't show in the graph rssi values from Nodes that do not belong to our setup
151 next unless nodes.has_key?(src)
152
153 data[nodes[src]] = [] if data[nodes[src]] == nil # initilization of the data
154 data[nodes[src]] << [time, dbm] # data will have the following format: data["Node X"] = [time, rssi_value]
155 end
156 data = data.sort # ascending order... Node 1...Node 2... etc
157 data.each do |d,v|
158 g.addLine(v, :label => d)
159 end
160 end
161 end




3. Running the experiment and viewing the results.

To run the above experiment simple type in the console the following command.

omf exec iperf_power_rssi.rb

where iperf_power_rssi.rb is the name of the file that has the experiment description.

Then we go to the following address to see our graphs

http://nitlab.inf.uth.gr:4000

Here are some screenshots from the results of the experiment

Video Link:

http://www.youtube.com/watch?v=KZIfpz43Ww4

Who's Online

We have 84 guests and no members online

VIDEO DEMONSTRATIONS