ieee 802.11 simulation-libre
DESCRIPTION
VanetTRANSCRIPT
![Page 1: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/1.jpg)
The picture was extracted from http://www.ccs-labs.org/teaching/c2x-2012s/01-intro.pdf.
Seminar at GRC – 12 December 2012(12/12/12)
Simulating IEEE 802.11 in VANETs(using OMNeT++ and SUMO)
Last modification: 18 December 2012
![Page 2: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/2.jpg)
2
Outline
● Pre-Simulation (SUMO)
– SUMO setup
● Simulation (OMNeT++)
– NED file(s)
– Ini file(s)
– Running simulation
● Post simulation&initial results
![Page 3: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/3.jpg)
3
Pre-Simulation step(SUMO setup)
1.Extracting the map from www.OpenStreetMap.org (*.osm)
Extracted from [8]: Tutorial for Simulating VANET and ITS (using OMNeT++ and SUMO), MJ (Thinus) Booysen, july 2012.
![Page 4: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/4.jpg)
4
Pre-Simulation(SUMO setup)
2. Creating road network file (convert *.osm to net.xml with netconvertor)
netconvert --osm rc.osm
3. Generating random trips for road network file (randomTrips.py)
./randomTrips.py -n net.net.xml -l -e 600 -o trips.trips.xml
4. Convert the trips to routes and traffic flows (duarouter)
duarouter -n net.net.xml –t trips.trips.xml -o routes.rou.xml --ignore-errors
![Page 5: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/5.jpg)
5
Pre-Simulation(SUMO setup)
Creating config file (sumo.cfg)
![Page 6: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/6.jpg)
6
Pre-Simulation(SUMO setup)
● Creating obstacles (extract them from osm file by polyconvert)
polyconvert --net-file net.net.xml --osm-files map.osm -o map.poly.xml
● If the city doesn't include the building layout, it must be drawn with the JOSM (Java Open Street Map editor) tool.
● Referring to obstacles in config file.
<additional-files value="map.poly.xml"/>
![Page 7: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/7.jpg)
7
SUMO overview
● Several configuration files needed:
– .ned.xml
– .edg.xml
– .net.xml
– .poly.xml
– .rou.xml
– .sumo.cfg
● Begin, end time
● Simulation time step
netconvert
Refers to / Usespolyconvert
![Page 8: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/8.jpg)
8
Car mobility and road networks
● I'm using the pre-defined files that were prepared by GRC group.
● Moscow
● Milan
![Page 9: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/9.jpg)
9
Simulation step
● Modeling approach in OMNeT++
– Simple vs. compound modules
– Messages (can contain arbitrary data)
– Gates (input/output)
– Connections (within a compound module or between one submodule and compound module)
– self-messages
Extracted from [1]: OMNET++ User Manual: http://whale.hit.bme.hu/omnetpp/.
![Page 10: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/10.jpg)
10
Simulation step
● Simulation components:
– Behavior
● C++ code
– INETMANET package
– Structure
● NED file
– Runtime parameters
● Omnetpp.ini
![Page 11: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/11.jpg)
11
Simulation step
● Simulation components:
– Behavior
● C++ code
– INETMANET package
– Structure
● NED file
– Runtime parameters
● Omnetpp.ini
![Page 12: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/12.jpg)
12
Simulation step
● Preparing NED file for car:module Car
{
parameters:
string routingProtocol @enum("AODVUU","DYMOUM","DYMO",
"DSRUU","OLSR","OLSR_ETX","DSDV_2","Batman") = default("");
gates:
...
submodules:
app: UDPBasicBurst
mobility: TraCIMobility
udp: UDP
networkLayer: NetworkLayer
wlan: Ieee80211Nic {
manetrouting: <routingProtocol> like ImanetRouting
if routingProtocol != ""
connections allowunconnected:
...
}
Module Type
Module Interface
![Page 13: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/13.jpg)
13
Simulation step(continue)
● Preparing NED file for network scenario:
module Highway
{
submodules:
channelControl: ChannelControl {
parameters:
@display("p=256,128");
}
manager: TraCIScenarioManagerLaunchd {
parameters:
@display("p=512,128");
}
}
● Channel control
– determines which nodes are within communication or interference distance
● TraCIScenarioManagerLaunchd
– control creation and movement of nodes
![Page 14: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/14.jpg)
14
Simulation step(continue)
● Modifications in order to add obstacles and using VACaMobil
import inet.world.VACaMobil.VACaMobil;
...
import inet.world.obstacles.ObstacleControl;
import inet.world.annotations.AnnotationManager;
module Highway
{
submodules:
...
manager: VACaMobil {
@display("p=430,35");
}
obstacles: ObstacleControl {
@display("p=282,108");
}
annotations: AnnotationManager {
@display("p=144,108");
}
}
![Page 15: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/15.jpg)
15
Simulation step
● Simulation components:
– Behavior
● C++ code
– INETMANET package
– Structure
● NED file
– Runtime parameters
● Omnetpp.ini
![Page 16: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/16.jpg)
16
Simulation step(continue)
● Preparing ini file:
[General]
network = scenario
sim-time-limit = 3000s
#########################################
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 10699m
**.constraintAreaMaxY = 7131m
**.constraintAreaMaxZ = 0m
#########################################
# channel physical parameters
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 2.0mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
*.channelControl.numChannels = 1
![Page 17: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/17.jpg)
17
Simulation step(continue)
# udp apps
**.host[*].app.destAddresses = moduleListByPath("**.host[*]")
**.app.localPort = 1234
**.app.destPort = 1234
**.app.messageLength = 512B # Bytes
**.app.sendInterval = 0.25s + uniform(-0.001s,0.001s,0)
**.app.burstDuration = 0s
**.app.sleepDuration = 0s
**.app.chooseDestAddrMode = "perSend"
**.app.delayLimit =20s
**.app.startTime = simTime()+1s
#################################
# nic settings
**.wlan.bitrate = 54Mbps
**.wlan.opMode = "a"
**.wlan.mgmt.frameCapacity = 10
**.wlan.mgmtType = "Ieee80211MgmtAdhoc"
**.wlan.mac.address = "auto"
**.wlan.mac.maxQueueSize = 14
**.wlan.mac.rtsThresholdBytes = 2346B
**.wlan.mac.retryLimit = 7
**.wlan.mac.cwMinData = ${7, 15, 31}
**.wlan.mac.cwMaxData = 1023
**.wlan.mac.cwMinBroadcast = 15
**.wlan.mac.slotTime = 13us #
1. How can we select random connection (destination)?
● In application layer, the destination address must be set to
● “random_name(host)” or
● “moduleListByPath("**.host[*]")”
that is causes one node will be chosen randomly among the network nodes.
2. How can we run the simulation several times with different parameter values?
● In order to do this, we can assign different values to each parameter in ini file with ${ }.
● Notice that the number of simulation must be mentioned in “run configuration window” (config name and run number). Also, this activity cannot run in command line.
![Page 18: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/18.jpg)
18
Simulation step (last step)
● SUMO and OMNeT++● SUMO generates car mobility and
road network● OMNeT++ generates car
configuration details● How can we connect these two parts to have a VANET simulation?
● VEINS
● Veins connects the SUMO and OMNET++, it means every car in sumo are defined as a node in OMNET++, veins do this and also make mobility of nodes in OMNE++.● Veins uses a TCP connection and Python scripts to enable SUMO to act as a mobility model in OMNeT++.● sumo-launchd listening for event from omnet++ and if need any change in SUMO, it is done in XML format.
● OMNeT++ must be configured to look for mobility module
● back to ini file:# TraCIScenarioManagerLaunchd*.manager.updateInterval = 1s*.manager.host = "localhost"*.manager.port = 9999*.manager.moduleType = "inet.examples.traci_launchd.Car"*.manager.moduleName = "host"...*.manager.launchConfig = xmldoc("sumo-launchd.launch.xml")
● Python set up to wait for Veins (module in OMNeT++)sumo-launchd.py -p 9999 -vv -c/c/user/src/sumo/bin/sumo.exe
![Page 19: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/19.jpg)
19
Simulation step
● Modifications in order to add obstacles and using VACaMobil
**.meanNumberOfCars = 50
**.carHysteresisValue = 0
#########################################
# annotations
*.annotations.draw = true
#########################################
# obstacles
*.obstacles.obstacles = xmldoc("map.poly.xml")
![Page 20: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/20.jpg)
20
Running simulation
● OMNeT++ can be run under different user interfaces such as:
– Tkenv: graphical user interface
– Cmdenv: command line user interface
Graphical user interface (Tkenv)
![Page 21: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/21.jpg)
21
Post simulation
● Result file formats– Output vector
● Capture behavior over time.
● Contain several output vectors, each being a named series of (timestamp, value) pairs.
vector 470 scenario.host[15].udp sentPk:vector(packetBytes) ETV
1 117 5.005082890525 512
1 165 5.25059449109 512
1 194 5.501521816618 512
– Scalar result
● Contain summary statistics: number of packets sent, number of packet drops, average end-to-end delay of received packets, peak throughput.
● Every scalar generates one line in the output file like:
scalar scenario.host[186].udp passedUpPk:count 95
scalar scenario.host[186].udp rcvdPk:count 95
scalar scenario.host[186].udp rcvdPk:sum(packetBytes) 49400
scalar scenario.host[186].udp sentPk:count 2136
scalar scenario.host[186].udp sentPk:sum(packetBytes) 1110720
![Page 22: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/22.jpg)
22
Post simulation&Initial results
5 10 15 20 25 30 35
0
20000
40000
60000
80000
100000
120000
Average Number of Collision
CWmin
Ave
rag
e N
um
be
r o
f C
ollis
ion
5 10 15 20 25 30 35
23000
24000
25000
26000
27000
28000
29000
Throughput
CWmin
Th
rou
gh
pu
t
![Page 23: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/23.jpg)
23
![Page 24: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/24.jpg)
24
Next steps
1. Simulating vehicular ad hoc networks with obstacles and generated car mobility by VACaMobil. [it's done/18.12.2012]
2. Creating a script file to extract and draw final graphs automatically.
3. Reading the IEEE 802.11 implementation to know how it behaves.
1.How can I implement my previous works in omnet++.
4. Reading paper about MAC layer implementation(especially IEEE 802.11p), broadcast communication, and contention window adaptation. [in parallel with step 3]
5. Evaluate performance of my previous protocol(IEEE 802.11 based MAC protocol) in vehicular ad hoc networks.
1.Idea: Adapting contention window based on local density estimation
2.Try to find a way to change the way of collision detection (channel monitoring) in my previous works.
3.Compare with other IEEE 802.11-based protocols and also IEEE 802.11p.
6. Reading about IEEE 802.11p and it's implementation in OMNeT. [in parallel with 4 and 5]
![Page 25: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/25.jpg)
25
Broadcast communication in vehicular ad hoc networks
● IEEE 802.11 DCF
– RTS/CTS handshaking
– ACK packets
● They cause collision
● Due to lack of capability of collision detection
– CWmin does not increase
– It shows the necessity of adapting CWmin based on network density.
![Page 26: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/26.jpg)
26
Research questions
● How can IEEE 802.11-based protocols support broadcast services?
– How have previous works detected collisions in MAC layer? (for broadcast communication)
– Which one is suitable for broadcast communications, contention or contention-free mechanisms?
![Page 27: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/27.jpg)
27
References
1. OMNET++ User Manual: http://whale.hit.bme.hu/omnetpp/.
2. TicToc tutorial: http://www.omnetpp.org/doc/omnetpp/tictoc-tutorial.
3. IDE user guide: http://omnetpp.org/doc/omnetpp/userguide/index.html.
4. OMNeT++ 4.x Wiki page: http://www.omnetpp.org/pmwiki/index.php?n=Main.Omnetpp4.
5. Contributors: Open street map. www.openstreetmap.org. Accessed 11 November 2012
6. Omnet++ (home site). http://www.omnetpp.org/. Accessed 11 November 2012
7. SUMO Simulation of Urban MObility (home page). http://sumo.sourceforge.net/. Accessed 11 November 2012
8. Tutorial for Simulating VANET and ITS (using OMNeT++ and SUMO), MJ (Thinus) Booysen, july 2012.
9. SUMO overview, University of Innsbruck.
10. OMNeT++ tutorial. http://www.ccs-labs.org/teaching/nwsim-2012w/02-omnetpp.pdf.
![Page 28: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/28.jpg)
28
I have read these papers
● Broadcast communication in vehicular ad hoc network safety applications.
– Simulation-based performance evaluation of enhanced broadcast schemes for IEEE 802.11-based vehicular networks.
● Physical layer simulations of IEEE 802.11a for vehicle-to-vehicle communications.
![Page 29: Ieee 802.11 Simulation-libre](https://reader034.vdocuments.us/reader034/viewer/2022052302/55cf8fef550346703ba16b70/html5/thumbnails/29.jpg)
29
I am going to read these papers
● Enhancements of IEEE 802.11p protocol for access control on a VANET control channel.
– Network status detection-based dynamic adaptation of contention window in IEEE 802.11p.
– A collision alleviation scheme for IEEE 802.11p VANETs.