src/buildings/doc/source/buildings-testing.rst
author Nicola Baldo <nbaldo@cttc.es>
Wed, 30 May 2012 14:33:29 +0200
changeset 8825 85fb8f3dc39d
parent 8768 e5607ee90a49
child 10408 5c604e8ec2e1
permissions -rw-r--r--
fixed bug 1437 - LTE documentation missing figures and references
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     1
+++++++++++++++++++++++++++++++++++++
8259
591bfffeda6a revised section titles in buildings doc
Nicola Baldo <nbaldo@cttc.es>
parents: 8257
diff changeset
     2
 Testing Documentation
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     3
+++++++++++++++++++++++++++++++++++++
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     4
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     5
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     6
Overview
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     7
********
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     8
8554
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
     9
To test and validate the ns-3 Building Pathloss module, some test suites is provided which are integrated with the ns-3 test framework. To run them, you need to have configured the build of the simulator in this way::
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    10
8554
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
    11
    ./waf configure --enable-tests --enable-modules=buildings
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    12
    ./test.py
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    13
8554
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
    14
The above will run not only the test suites belonging to the buildings module, but also those belonging to all the other ns-3 modules on which the buildings module depends. See the ns-3 manual for generic information on the testing framework.
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    15
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    16
You can get a more detailed report in HTML format in this way::
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    17
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    18
    ./test.py -w results.html
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    19
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    20
After the above command has run, you can view the detailed result for each test by opening the file ``results.html`` with a web browser. 
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    21
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    22
You can run each test suite separately using this command::
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    23
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    24
    ./test.py -s test-suite-name
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    25
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    26
For more details about ``test.py`` and the ns-3 testing framework, please refer to the ns-3 manual.
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    27
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    28
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    29
8554
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
    30
Description of the test suites
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
    31
******************************
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    32
8556
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    33
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    34
BuildingsHelper test
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    35
~~~~~~~~~~~~~~~~~~~~
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    36
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    37
The test suite ``buildings-helper`` checks that the method ``BuildingsHelper::MakeAllInstancesConsistent ()`` works properly, i.e., that the BuildingsHelper is successful in locating if nodes are outdoor or indoor, and if indoor that they are located in the correct building, room and floor. Several test cases are provided with different buildings (having different size, position, rooms and floors) and different node positions. The test passes if each every node is located correctly.
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    38
f859539f5dd3 BuildingsMobilityModel instances automatically placed in appropriated Building
Nicola Baldo <nbaldo@cttc.es>
parents: 8554
diff changeset
    39
8768
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    40
BuildingPositionAllocator test
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    41
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    42
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    43
The test suite ``building-position-allocator`` feature two test cases that check that respectively RandomRoomPositionAllocator and SameRoomPositionAllocator work properly. Each test cases involves a single 2x3x2 room building (total 12 rooms) at known coordinates and respectively 24 and 48 nodes. Both tests check that the number of nodes allocated in each room is the expected one and that the position of the nodes is also correct.
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    44
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    45
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    46
Buildings Pathloss tests
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
    47
~~~~~~~~~~~~~~~~~~~~~~~~
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    48
8554
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
    49
The test suite ``buildings-pathloss-model`` provides different unit tests that compare the expected results of the buildings pathloss module in specific scenarios with pre calculated values obtained offline with an Octave script (test/reference/buildings-pathloss.m). The tests are considered passed if the two values are equal up to a tolerance of 0.1, which is deemed appropriate for the typical usage of pathloss values (which are in dB).
8226
8b6e2e92ebae Address Nicola's comment on lte-pathloss-testing
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8214
diff changeset
    50
8b6e2e92ebae Address Nicola's comment on lte-pathloss-testing
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8214
diff changeset
    51
In the following we detailed the scenarios considered, their selection has been done for covering the wide set of possible pathloss logic combinations. The pathloss logic results therefore implicitly tested.
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    52
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    53
Test #1 Okumura Hata
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    54
--------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    55
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    56
In this test we test the standard Okumura Hata model; therefore both eNB and UE are placed outside at a distance of 2000 m. The frequency used is the E-UTRA band #5, which correspond to 869 MHz (see table 5.5-1 of 36.101). The test includes also the validation of the areas extensions (i.e., urban, suburban and open-areas) and of the city size (small, medium and large).
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    57
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    58
Test #2 COST231 Model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    59
---------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    60
8229
32337df80523 Add documentation on shadowing test
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8226
diff changeset
    61
This test is aimed at validating the COST231 model. The test is similar to the Okumura Hata one, except that the frequency used is the EUTRA band #1 (2140 MHz) and that the test can be performed only for large and small cities in urban scenarios due to model limitations.
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    62
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    63
Test #3 2.6 GHz model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    64
---------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    65
8825
85fb8f3dc39d fixed bug 1437 - LTE documentation missing figures and references
Nicola Baldo <nbaldo@cttc.es>
parents: 8768
diff changeset
    66
This test validates the 2.6 GHz Kun model. The test is similar to Okumura Hata one except that the frequency is the EUTRA band #7 (2620 MHz) and the test can be performed only in urban scenario.
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    67
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    68
Test #4 ITU1411 LoS model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    69
-------------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    70
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    71
This test is aimed at validating the ITU1411 model in case of line of sight within street canyons transmissions. In this case the UE is placed at 100 meters far from the eNB, since the threshold for switching between LoS and NLoS is left to default one (i.e., 200 m.).
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    72
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    73
Test #5 ITU1411 NLoS model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    74
--------------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    75
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    76
This test is aimed at validating the ITU1411 model in case of non line of sight over the rooftop transmissions. In this case the UE is placed at 900 meters far from the eNB, in order to be above the threshold for switching between LoS and NLoS is left to default one (i.e., 200 m.).
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    77
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    78
Test #6 ITUP1238 model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    79
----------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    80
8226
8b6e2e92ebae Address Nicola's comment on lte-pathloss-testing
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8214
diff changeset
    81
This test is aimed at validating the ITUP1238 model in case of indoor transmissions. In this case both the UE and the eNB are placed in a residential building with walls made of concrete with windows. Ue is placed at the second floor and distances 30 meters far from the eNB, which is placed at the first floor.
8214
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    82
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    83
Test #7 Outdoor -> Indoor with Okumura Hata model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    84
-------------------------------------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    85
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    86
This test validates the outdoor to indoor transmissions for large distances. In this case the UE is placed in a residential building with wall made of concrete with windows and distances 2000 meters from the outdoor eNB.
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    87
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    88
Test #8 Outdoor -> Indoor with ITU1411 model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    89
-------------------------------------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    90
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    91
This test validates the outdoor to indoor transmissions for short distances. In this case the UE is placed in a residential building with walls made of concrete with windows and distances 100 meters from the outdoor eNB.
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    92
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    93
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    94
Test #9 Indoor -> Outdoor with ITU1411 model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    95
-------------------------------------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    96
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    97
This test validates the outdoor to indoor transmissions for very short distances. In this case the eNB is placed in the second floor of a residential building with walls made of concrete with windows and distances 100 meters from the outdoor UE (i.e., LoS communication). Therefore the height gain has to be included in the pathloss evaluation.
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    98
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    99
Test #10 Indoor -> Outdoor with ITU1411 model
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   100
-------------------------------------------------
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   101
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   102
This test validates the outdoor to indoor transmissions for short distances. In this case the eNB is placed in the second floor of a residential building with walls made of concrete with windows and distances 500 meters from the outdoor UE (i.e., NLoS communication). Therefore the height gain has to be included in the pathloss evaluation.
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   103
e68383edb9f1 Add pathloss testing documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   104
8768
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
   105
Buildings Shadowing Test
e5607ee90a49 buildings module: consistent room & floor indexing
Nicola Baldo <nbaldo@cttc.es>
parents: 8556
diff changeset
   106
~~~~~~~~~~~~~~~~~~~~~~~~
8229
32337df80523 Add documentation on shadowing test
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8226
diff changeset
   107
8554
39c5b84b1ad1 revised buildings documentation
Nicola Baldo <nbaldo@cttc.es>
parents: 8307
diff changeset
   108
The test suite ``buildings-shadowing-test`` is a unit test intended to verify the statistics distribution characteristics of the shadowing are the one expected. The shadowing is modeled according to a normal distribution with mean :math:`\mu = 0` and variable standard deviation :math:`\sigma`, according to models commonly used in literature.
8229
32337df80523 Add documentation on shadowing test
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8226
diff changeset
   109
The test generates 10,000 samples of shadowing by subtracting the deterministic component from the total loss returned by the ``BuildingPathlossModel``. The mean and variance of the shadowing samples are then used to verify whether the 99% confidence interval is respected by the sequence generated by the simulator.
32337df80523 Add documentation on shadowing test
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8226
diff changeset
   110