5G-LENA nr-v3.1-14-g738b08bc
The 5G/NR module for the ns-3 simulator
|
This is the ns-3 nr module for the simulation of 3GPP NR non-standalone cellular networks. ns-3 is used as a base simulator, on top of which can be added our nr module as plug-in.
This software is licensed under the terms of the GNU GPLv2, as like as ns-3. See the LICENSE file for more details.
To see the features, please go to the official webpage.
An updated list of published papers that are based on the outcome of this module is available here.
The OpenSim research group in CTTC is a group of highly skilled researchers, with expertise in the area of cellular networks, O-RAN, radio resource management, ML/AI based network management, with a focus on the following research lines:
Contact us if you think that we could collaborate! We are interested in research projects with companies or other research institutions. Our OpenSim research group has gained a vast experience in industrial research projects through many successful projects with some of the top companies in the telecom industry. We also organize secondments for excellent and motivated M.Sc./PhD students. We can organize tutorials for the academy or industry.
In alphabetical order:
Inspired by mmWave module by NYU/UniPD
We would be very happy if you would contribute to 5G-LENA!
If you identify a bug, please let us know through the Gitlab issue page.
If you do some of the following with 5G-LENA, please open a merge request or contact us to guide you through the contribution process:
When submitting patches, please follow our guide about NR Coding style and best practices which you should follow to keep the project as consistent and maintainable as possible. You can use the ns-3's check-style-clang-format
utility for automatic C++ code formatting.
For users Q&A about 5G-LENA module you can join our 5G-LENA users group: https://groups.google.com/g/5g-lena-users/
In order to start with the nr module you should have some confidence with the ns-3 environment. You can find on the ns-3 website all the necessary information.
If it is the first time you work with the ns-3 environment, we recommend to take things slowly (but steady) and going forward through simple steps. The ns-3 documentation https://www.nsnam.org/documentation/ is divided into three categories tutorial, manual and documentation (describing models):
After you get familiarized with ns-3, proceed to download and build the 5G-LENA project, and we will point out to ns-3 and 5G-LENA documentation to help you enter the ns-3 and the nr world.
Make sure to install all ns-3 prerequisites
Install libc6-dev (it provides semaphore.h
header file). The Ubuntu package name is:
Install sqlite (enables optional examples lena-lte-comparison
, cttc-nr-3gpp-calibration
and cttc-realistic-beamforming
):
Install eigen3 (enables optional MIMO features):
Notice that ns-3 and nr prerequisites are required to use all nr features. Otherwise, you will get a warning at configuration time and/or an error message during compilation or execution.
Check in the nr RELEASE_NOTES.md Supported platforms which is the recommended ns-3 release for each nr release.
For a quicker reference we provide a table with the supported versions of ns-3-dev for each nr release.
nr version | ns-3 version | Build system | Release date |
---|---|---|---|
5g-lena-v3.1.y | ns-3.42 | cmake | July 19, 2024 |
5g-lena-v3.0.y | ns-3.41 | cmake | February 16, 2024 |
5g-lena-v2.6.y | ns-3.40 | cmake | November 30, 2023 |
5g-lena-v2.5.y | ns-3.39 | cmake | July 26, 2023 |
5g-lena-v2.4.y | ns-3.38 | cmake | April 5, 2023 |
5g-lena-v2.3.y | ns-3.37 | cmake | November 23, 2022 |
5g-lena-v2.2.y | ns-3.36.1 | cmake | June 03, 2022 |
5g-lena-v2.1.y | ns-3.36 | cmake | May 06, 2022 |
5g-lena-v2.0.y | ns-3.36 | cmake | April 21, 2022 |
5g-lena-v1.3.y | ns-3.35 | waf | April 7, 2022 |
5g-lena-v1.2.y | ns-3-dev | waf | June 4, 2021 |
5g-lena-v1.1.y | ns-3-dev | waf | March 2, 2021 |
5g-lena-v1.0.y | ns-3-dev | waf | September 16, 2020 |
5g-lena-v0.4.y | ns-3-dev | waf | February 13 2020 |
5g-lena-v0.3.y | ns-3-dev | waf | August 27 2019 |
5g-lena-v0.2.y | ns-3-dev | waf | February 1 2019 |
Download then checkout the compatible version of ns-3:
To make sure everything is working properly, run the ns-3 tests:
A success for both previous commands indicates an overall success, and you are ready to install the nr module.
Download then checkout the compatible version of nr:
Notice that since these are two independent git repositories, when you run git status
inside of the ns-3, you will notice that the contrib/nr directory will be listed as "Untracked files". This is normal.
Let's configure the ns-3 + nr project:
In the output you should see:
If that is not the case, return to "ns-3 and nr prerequisites" section, and install all prerequisites. After the installation of the missing packages run again ./ns3 configure --enable-tests --enable-examples
.
To compile the ns-3 with nr you can run the following command:
If the nr module is recognized correctly, you should see "nr" in the list of built modules. If that is the case, Welcome to the nr world !
Now, you can list the available nr examples.
Note that some of the examples may be missing if the dependencies listed in nr Prerequisites section haven't been installed.
Also, the nr target listed below is the module library for nr, so it cannot be used with ./ns3 run
, and only ./ns3 build nr
.
Now, you can run one of these examples (see the nr/examples folder for their source code):
The cttc-nr-demo
example has a complete tutorial explaining the example in details available here.
Note: when writing or modifying examples, be aware that our code is stored under the ns3 namespace. You will either need to use such namespace or add the prefix "ns3::" for classes, structs and enums.
We assume that your work lives in a separate branch, and that the 'master' branch of the nr repository is left untouched as the first time you downloaded it. If it is not the case, then please move all your work in a separate branch.
A vanilla 'master' branch can be updated by simply running:
We maintain two sources of documentation:
If you would like to build the documentation on your own, you can follow the instructions from this section.
And you will find the PDF user manual in the directory build/latex. Please note that you may have to install some requirements to build the documentation; you can find the list of packages for any Ubuntu-based distribution in the file .gitlab-ci.yml
.
You will find the doxygen documentation inside doc/doc/html/
.