A LoRaWAN simulator for confirmed/unconfirmed transmissions and multiple gateways
The first version of the simulator was used here:
@article{zorbas2021optimal,
AUTHOR = {Zorbas, Dimitrios and Caillouet, Christelle and Abdelfadeel Hassan, Khaled and Pesch, Dirk},
TITLE = {{Optimal Data Collection Time in LoRa Networks—A Time-Slotted Approach}},
JOURNAL = {Sensors},
VOLUME = {21},
YEAR = {2021},
NUMBER = {4}
}
- Downlink policies:
@inproceedings{zorbas2022policies,
author = {Javed, Shahzeb and Zorbas, Dimitrios},
title = {{LoRaWAN Downlink Policies for Improved Fairness}},
booktitle = {IEEE Conference on Standards for Communications and Networking (CSCN '22)},
year = {2022},
pages = {1--6},
month = {Nov},
location={Thessaloniki, Greece},
publisher={IEEE}
}
- Multiple half-duplex gateways
- 1% radio duty cycle for uplink transmissions
- 1 or 10% radio duty cycle for downlink transmissions
- Two receive windows (RX1, RX2) for ACKs and commands
- Non-orthogonal SF transmissions
- Capture effect
- Path-loss signal attenuation model
- Multiple channels
- Collision handling for both uplink+downlink transmissions
- Proper header overhead
- Node energy consumption calculation (uplink+downlink)
- ADR (Tx power adjustment)
- Downlink policies
- Adjustable packet size and rate
- https://metacpan.org/pod/Math::Random
- https://metacpan.org/pod/GD::SVG
- https://metacpan.org/dist/Statistics-Basic/view/lib/Statistics/Basic.pod
Debian: apt install libmath-random-perl libgd-svg-perl libstatistics-basic-perl
perl generate_terrain.pl terrain_side_size_(m) num_of_nodes num_of_gateways > terrain.txt
perl LoRaWAN.pl packets_per_hour simulation_time_(hours) terrain.txt
perl generate_terrain.pl 3000 1000 5 > terrain.txt
(or perl generate_terrain.pl 3000 1000 > terrain.txt to automatically select the number of required gateways)
perl LoRaWAN.pl 12 10 terrain.txt
Simulation time = 35999.408 secs
Avg node consumption = 50.50573 J
Min node consumption = 32.32120 J
Max node consumption = 157.91968 J
Total number of transmissions = 119862
Total number of unique transmissions = 119658
Stdv of unique transmissions = 0.47
Total packets delivered = 96832
Total packets acknowledged = 0
Total confirmed packets dropped = 0
Total unconfirmed packets dropped = 22826
Packet Delivery Ratio = 0.80924
Packet Reception Ratio = 0.80924
Uplink fairness = 0.088
Script execution time = 6.2148 secs
-----
# of nodes with SF7: 197, Avg retransmissions: 0.00
# of nodes with SF8: 119, Avg retransmissions: 0.00
# of nodes with SF9: 229, Avg retransmissions: 0.00
# of nodes with SF10: 279, Avg retransmissions: 0.00
# of nodes with SF11: 159, Avg retransmissions: 0.00
# of nodes with SF12: 17, Avg retransmissions: 0.00
Avg SF = 9.135
Avg packet size = 35.912 bytes