Version 7 (modified by 7 years ago) ( diff ) | ,
---|
Aggregate Managers
METIS II 5G Visualization - Trace Generation Extension
Using the METIS II 5G Visualization for simulation of an urban environment, time-variant attenuation (path loss) traces can be generated to approximate real world situations. These traces can then be used on an attenuator matrix based test bed, such as Sandbox 4, for tightly controlled experiments with various protocol and connection methodologies. An extension to the simulator is available to generate these trace files through the selection of objects of interest (pedestrians, cars, base stations, etc.) and calculation of distance and occlusion based free space path loss at regular intervals. Note that these calculations do not take into account multi-path or sources of noise.
The path loss between object pairs is calculated as follows:
Total Path Loss = Free Space Path Loss(d, f) + Object Attenuation(k)
Free Space Path Loss(d, f) = 20 log10(d) + 20 log10(f) - 27.55
Assuming f = 2385 MHz gives the “typical” path loss of approximately 40dB at 1 meter.
Object Attenuation(k) = a1n1 + a2n2 + … + aknk
a = attenuation factor in dB for object type “k”
n = number of “k” type objects between the two objects of interest
Addition of this extension to the simulator is done through minor modification of the simulator's source code as described below. Configuration of the desired trace generation is done through an XML file which can be created manually or through the XML Generator.
Adding the Trace Generation Extension code to METIS II 5G Visualization source
The following documentation gives an overview of the changes that have to be made to the original METIS II simulator for it to have the ability to generate pairwise attenuation traces for selected objects in the simulator.
- Adding an empty object to the scene:
- Under the Hierarchy tab, select the ‘Stage’ object, right click on it and choose ‘Create Empty’.
- Rename it to Tracker and under the Inspector tab of Unity, click Add Component button.
- Select Scripts and add the TrackObject_Test.cs file
- Alternatively, add a new script and paste the code from Track Object_Test.cs after renaming the class Track Object_Test to whatever name was given to the script.
- Adding tags to GameObjects:
- Under the project tab, search for the object Antenna5G_01
- In the inspector tab, click on the Tag dropdown and choose ‘Add Tag..’.
- In the Tags and Layers window, inside the Inspector tab, click on ‘+’ and add the tag “Antenna”.
- Now, select Antenna5G_01 from the Project tab and the tag ‘Antenna’ should be available. Click on Antenna to add that tag to the GameObject.
- Repeat the same steps for the following objects
- Person, StaticPerson – Pedestrian
- MadridGrid, MadridGridRectangle8, MadridGridRectangle10, MadridGridSquare – Building
- Sensor – Sensor
- lamp-single-ap-002 – Lightpole
- CarSedan01 – Car
- Bus – Bus
- Adding Collider to GameObjects:
- For getting a list of the objects the ray hits between the source and the destination object, it is necessary to add Box Colliders to each of the objects that the ray might pass through.
- For the models MadridGrid, MadridGridRectangle8, MadridGridRectangle10, Person, StaticPerson and Sensor, add Box Collider components
- For adding it, select the model from the Project tab and in the Inspector tab, select AddComponent → Physics → Box Collider.
- Generating a build:
- Once all of the above has been done, generate a build by selecting File → Build Settings
- Choose the Target Platform, Architecture and hit Build.
- Make sure that the config file “config.xml” is located in the running directory. In its absence, the simulator runs normally.
XML Configuration File
The Trace Generation Extension requires an XML configuration file which is used to select object pairs for which path loss is to be computed as well as setting specific calculation related parameters. You can create your own config file manually, or use the TODO XML Generator to create one for Sandbox 4. Below is an overview of the different sections of the config file and how they function. A sample XML file (config.xml) is provided for reference.
<?xml version="1.0" encoding="utf-8"?> <config> <sim_parameters max_time="180" time_interval="1000" /> <attenuations> <attenuation type="Building" value="60" /> <attenuation type="Car" value="30" /> <attenuation type="Bus" value="40" /> <attenuation type="Pedestrian" value="10" /> <attenuation type="Antenna" value="3" /> <attenuation type="Lightpole" value="0" /> <attenuation type="Sensor" value="0" /> </attenuations> <links> <link name="1" max_obj="9" default_attenuation="99.9" frequency="2400" /> <object index="1" type="Car" id="1">2,3,4</object> <object index="2" type="Car" id="2">1,3,4</object> <object index="3" type="Car" id="3">1,2,4</object> <object index="4" type="Car" id="4">1,2,3</object> <object index="5" type="Car" id="5">6,7,8,9</object> <object index="6" type="Car" id="6">5,7,8,9</object> <object index="7" type="Car" id="7">5,6,8,9</object> <object index="8" type="Car" id="8">5,6,7,9</object> <object index="9" type="Car" id="9">5,6,7,8</object> <link name="2" max_obj="5" default_attenuation="99.9" frequency="1800" /> <object index="1" type="Antenna" id="1">2,3,4,5</object> <object index="2" type="Car" id="3">1,3,4,5</object> <object index="3" type="Car" id="4">1,2,4,5</object> <object index="4" type="Car" id="5">1,2,3,5</object> <object index="5" type="Car" id="6">1,2,3,4</object> </links> </config>
<sim_parameters … />
This section contains global trace related simulation parameters.
Parameter Description max_time Number of seconds to run the simulation time_int Time interval (miliseconds) for calculating pairwise attenuations
<attenuation … />
Insertion loss attenuations (in dB) of different objects in the simulation are defined here. These are the attenuation factors of objects obstructing line of sight between the two objects for which the pairwise attenuation is being calculated. These factors are not taken into account for the pair of objects themselves.
Parameter Description type Object type value Insertion loss attenuation in dB
<link … />
The links define the independent sets of connections objects in the simulator may have (eg. multi-homing). In terms of Sandbox 4, each link set is mapped to it's own RF attenuator matrix.
Parameter Description name The identification number of the link (RF matrix number) max_obj The maximum number of objects handled by this link (max number of ports on RF matrix) default_attenuation The default (maximum) attenuation between undefined object pairs frequency The center frequency being used on this link. This can affect path loss calculations by a few dB
<object …> … </object>
This defines the objects and object pairs that the user wishes to track and generate trace data for. The comma separated list of numbers are the indices of other objects on the same link for which pairwise attenuations will be calculated. Because links are bidirectional, if object of index=1 has object of index=2 in its list, object of index=2 does not need to have object of index=1 in it's list. Note that the indices in different links are completely independent of each other.
Parameter Description index Index of object on this link (port on RF matrix) type Subset of objects to which the object belongs (Bus, Car, etc.) id Specific id of the object being tracked (see valid id table below)
Object Type Valid Id Building none Car 0 - 404 Bus 0 - 5 Pedestrian 0 - 115 Antenna 0 - 3 Lightpole 0 - 5 Sensor 0 - 9
Trace Output CSV File
The output trace file generated at the end of a simulation run is formatted in accordance with the requirements of the Instrumentation AM service for trace replay.
Attachments (2)
- TrackObject_Test.cs (12.7 KB ) - added by 7 years ago.
- config.xml (1.5 KB ) - added by 7 years ago.
Download all attachments as: .zip