Project Icon

lorawan

LoRaWAN网络模拟模块,ns-3仿真工具

这是一个基于ns-3网络模拟器的LoRaWAN模块,用于模拟和评估LoRaWAN网络性能。模块提供多个示例和API文档,可模拟不同场景下的网络覆盖、吞吐量和能耗。支持ADR算法和并行接收等功能,适用于物联网研究和开发。

LoRaWAN ns-3 module

CI codecov

This is an ns-3 module that can be used to perform simulations of a LoRaWAN network.

Quick links:

Getting started

Prerequisites

To run simulations using this module, you first need to install ns-3. If you are on Ubuntu/Debian/Mint, you can install the minimal required packages as follows:

sudo apt install g++ python3 cmake ninja-build git ccache

Otherwise please directly refer to the prerequisites section of the ns-3 installation page.

Note: While the ccache package is not strictly required, it is highly recommended. It can significantly enhance future compilation times by saving tens of minutes, albeit with a higher disk space cost of approximately 5GB. This disk space usage can be eventually reduced through a setting.

Then, you need to:

  1. Clone the main ns-3 codebase,
  2. Clone this repository inside the src directory therein, and
  3. Checkout the current ns-3 version supported by this module.

To install this module at the latest commit, you can use the following all-in-one command:

git clone https://gitlab.com/nsnam/ns-3-dev.git && cd ns-3-dev &&
git clone https://github.com/signetlabdei/lorawan src/lorawan &&
tag=$(< src/lorawan/NS3-VERSION) && tag=${tag#release } && git checkout $tag -b $tag

Note: When switching to any previous commit, including the latest release, always make sure to also checkout ns-3 to the correct version (NS3-VERSION file at the root of this repository) supported at that point in time.

Compilation

Ns-3 adopts a development-oriented philosophy. Before you can run anything, you'll need to compile the ns-3 code. You have two options:

  1. Compile ns-3 as a whole: Make all simulation modules available by configuring and building as follows (ensure you are in the ns-3-dev folder!):

    ./ns3 configure --enable-tests --enable-examples &&
    ./ns3 build
    
  2. Focus exclusively on the lorawan module: To expedite the compilation process, as it can take more than 30/40 minutes on slow hardware, change the configuration as follows:

    ./ns3 clean &&
    ./ns3 configure --enable-tests --enable-examples --enable-modules lorawan &&
    ./ns3 build
    

    The first line ensures you start from a clean build state.

Finally, ensure tests run smoothly with:

./test.py

If the script reports that all tests passed or that just three-gpp-propagation-loss-model failed1, you are good to go.

If other tests fail or crash, consider filing an issue.

Usage examples

The module includes the following examples:

  • simple-network-example
  • complete-network-example
  • network-server-example
  • adr-example
  • aloha-throughput
  • frame-counter-update
  • lora-energy-model-example
  • parallel-reception-example

Examples can be run via the ./ns3 run example-name command (refer to ./ns3 run --help for more options).

Documentation

  • Simulation Model Overview: A description of the foundational models of this module (source file located at doc/lorawan.rst).
  • API Documentation: documentation of all classes, member functions and variables generated from Doxygen comments in the source code.

Other useful documentation sources:

Getting help

To discuss and get help on how to use this module, you can open an issue here.

Contributing

Refer to the contribution guidelines for information about how to contribute to this module.

Authors

  • Davide Magrin
  • Martina Capuzzo
  • Stefano Romagnolo
  • Michele Luvisotto

License

This software is licensed under the terms of the GNU GPLv2 (the same license that is used by ns-3). See the LICENSE.md file for more details.

Acknowledgments and relevant publications

The initial version of this code was developed as part of a master's thesis at the University of Padova, under the supervision of Prof. Lorenzo Vangelista, Prof. Michele Zorzi and with the help of Marco Centenaro.

Publications:

  • D. Magrin, M. Capuzzo and A. Zanella, "A Thorough Study of LoRaWAN Performance Under Different Parameter Settings," in IEEE Internet of Things Journal. 2019. Link.
  • M. Capuzzo, D. Magrin and A. Zanella, "Confirmed traffic in LoRaWAN: Pitfalls and countermeasures," 2018 17th Annual Mediterranean Ad Hoc Networking Workshop (Med-Hoc-Net), Capri, 2018. Link.
  • D. Magrin, M. Centenaro and L. Vangelista, "Performance evaluation of LoRa networks in a smart city scenario," 2017 IEEE International Conference On Communications (ICC), Paris, 2017. Link.
  • Network level performances of a LoRa system (Master thesis). Link.

Footnotes

  1. This is due to a bug in the current ns-3 version when restricting compilation to the lorawan module and its dependencies. If you need to use the three-gpp-propagation-loss-model, you can solve this by compiling ns-3 as a whole or with the --enable-modules "lorawan;applications" option to reduce compilation time.

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号