The ris-module is added in ns-3.4/contrib folder and enables the simulation of a an uplink scenario where users communicate with the BS via the associated RIS. For each user, the RIS that offers the higher SNR is selected. A UDP client-server model is used, where users are configured as clients (UdpClientHelper) and the BS is configured as the server (UdpServerHelper). A TDMA protocol is considered, i.e., the users transmit to the BS during their respective time slots, using the RIS to improve the channel conditions.
This software is licensed under the terms of the GNU General Public License v2.0 only (GPL-2.0-only). See the LICENSE file for more details.
The following dependencies need to be installed:
sudo apt install g++ python3 python3-dev pkg-config sqlite3 qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
Before building ns-3, you must configure it. This step allows the configuration of the build options, such as whether to enable the examples, tests and more.
To configure ns-3 with examples and tests enabled, run the following command on the ns-3 main directory:
./ns3 configure --enable-examples --enable-tests
Then, build ns-3 by running the following command and redirect output to log file:
./ns3 build > build.log 2>&1
Various simulation parameters can be configured in "config.txt" file:
MAX_PACKETS=1000
PACKET_SIZE=1024
CHANNEL_WIDTH=20
INTERVAL=0.01
TOTAL_DURATION=10
NUM_USERS=5
NUM_RIS=3
NUM_ELEMENTS=32
TX_POWER_DBM=10
Next, to run the ris-module-test-suite, run the following command on the ns-3 main directory:
./test.py -s ris-module -v