For 5G network projects, OMNeT++ with Simu5G and Ns-3 with its mmWave and NR modules are the highly adaptable two prevalent simulators. Regarding the various types of 5G simulations, we propose an extensive comparison among these two simulators which involves their modules, characteristics and applicability:
Simulators and Modules
- OMNeT++ with Simu5G
- Simu5G: In order to simulate 5G NR networks, Simu5G are specifically tailored, which is an expansion of OMNeT++. For the 5G NR protocol stack, it is configured on the INET model and offers extensive architectures.
- Characteristics:
- It provides further assistance for 5G NR and LTE-A.
- MAC layer models and detailed physical (PHY) are encompassed.
- Incorporates MIMO capacities and beamforming.
- Portable numerology and dynamic TDD are included.
- For higher-layer protocols, it enables the synthesization with the INET model.
- Access the mobility models for UEs.
- Network slicing support.
- INET Model: Within OMNeT++, design Internet protocols and network systems by implementing this INET framework, which acts as an extensive library.
- Properties:
- Specifically for wired and wireless network protocols, this model is highly adaptable.
- Provides further support for mobility models, routing protocols and TCP/UDP, IPv4/IPv6.
- As regards network, transport and application layers, it offers extensive frameworks.
- Ns-3 with mmWave and NR Modules
- MmWave Module: For mmWave frequencies, significant frameworks are involved in an mmWave module which is designed by NTU Wireless. For 5G, it acts as a crucial base.
- Characteristics:
- This module offers assistance for mmWave PHY and MAC layers.
- Antenna array models and beamforming techniques are involved.
- Regarding mmWave frequencies, it encompasses extensive channel frameworks.
- Multiple scheduling techniques are assisted here.
- NR Module: It mainly concentrates on the innovative radio perspectives of 5G, as NR Module is a segment of NS-3. According to the descriptions of 3GPP NR, it offers efficient properties.
- Properties:
- For portable numerology and dynamic TDD, the NR model provides support.
- Enables the synthesization with the LTE module for interworking conditions.
- Extensive PHY and MAC layer executions are involved in this module.
- Modernized MAC scheduling techniques could be incorporated.
Comparison Table
Feature / Aspect | OMNeT++ with Simu5G | ns-3 with mmWave and NR Modules |
PHY Layer Models | Detailed 5G NR models, beamforming, MIMO | Detailed mmWave and NR models, beamforming, MIMO |
MAC Layer Models | Dynamic TDD, flexible numerology, scheduling | Dynamic TDD, flexible numerology, scheduling |
Network Layer Models | Integration with INET, IPv4/IPv6 support | Integration with LTE module, IPv4/IPv6 support |
Application Layer Models | Extensive support via INET framework | Support for various applications, can be extended |
Mobility Models | Support for various mobility models | Support for various mobility models |
Network Slicing | Supported | Can be implemented with custom scripting |
Scalability | High (suitable for large networks) | High (suitable for large networks) |
Ease of Use | Requires learning curve for OMNeT++ and INET | Requires learning curve for ns-3 and modules |
Documentation | Comprehensive documentation, active community | Comprehensive documentation, active community |
Flexibility | Highly flexible, suitable for academic and research purposes | Highly flexible, suitable for academic and research purposes |
Applicability for Various Scenarios
- Network Slicing and Application Layer Studies
Because of the extensive support which is offered through the INET model, OMNeT++ is highly adaptable for research which mainly emphasizes application layer protocols, QoS management and network slicing.
- PHY and MAC Layer Research
- Ns-3 with mmWave and NR Modules:
Specifically for mmWave communications and enhanced scheduling techniques, this approach is perfect for projects which demand extensive modeling of MAC and physical layers.
- Interworking with Modern Technologies
For conducting a detailed research on transition conditions from 4G to 5G, these both simulators assist the process of integration with current LTE networks.
- Large-Scale Network Simulations
Even though the learning period and configuration may vary with each other, the simulators OMNeT++ with Simu5G and Ns-3 with mmWave and NR modules have the capacity to manage extensive-scale network simulations.
Sample Simulation Scenario Configuration
OMNeT++ with Simu5G
NED File Example:
Package my5gproject;
Import inet.node.inet.Router;
Import inet.node.inet.StandardHost;
Import inet.mobility.static.StaticMobility;
Import simu5g.node.basenode.gnb.Gnb;
Import simu5g.node.ue.NrUe;
Network Simple5GNetwork
{
Types:
Channel ChannelType extends ned.DatarateChannel
{
Data rate = 1Gbps;
Delay = 1us;
}
Submodules:
GNB: GNB {
@display (“p=100,100”);
}
ue [5]: NrUe {
@display (“p=200,100+$index*50”);
}
Connections:
ue [0].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue [1].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[2].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[3].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[4].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
}
INI File Example:
(Common)
Network = my5gproject.Simple5GNetwork
Sim-time-limit = 10s
*.gnb.gnbMac.maxTxPower = 40mW
*.gnb.gnbMac.carrierFrequency = 28GHz
*.gnb.gnbMac.bandwidth = 100MHz
*.gnb.mobility.typename = “StaticMobility”
*.gnb.mobility.initialX = 100m
*.gnb.mobility.initialX = 100m
*.ue[*].ueMac.maxTxPower = 20mW
*.ue[*].ueMac.carrierFrequency = 28GHz
*.ue[*].ueMac.bandwidth = 100MHz
*.ue[*].mobility.typename = “StaticMobility”
*.ue[*].mobility.initialX = 200m
*.ue[*].mobility.initialY = 100m+$index*50m
Ns-3 with mmWave and NR Modules
C++ Simulation Script Model:
#include “ns3/core-module.h”
#include “ns3/network-module.h”
#include “ns3/internet-module.h”
#include “ns3/point-to-point-module.h”
#include “ns3/mobility-module.h”
#include “ns3/applications-module.h”
#include “ns3/mmwave-helper.h”
#include “ns3/mmwave-module.h”
Using namespace ns3;
Int main (int argc, char *argv [])
{
Double simTime = 10.0;
Uint16_t numUeNodes = 2;
Uint16_t numEnbNodes = 1;
NodeContainer ueNodes;
ue Nodes.Create(numUeNodes);
NodeContainer enbNodes;
ENB Nodes.Create (numEnbNodes);
Mobility Helper mobility;
mobility.SetMobilityModel (“ns3::ConstantPositionMobilityModel”);
Mobility. Install (ueNodes);
Mobility. Install (enbNodes);
Ptr<MmWaveHelper> mmwaveHelper = CreateObject<MmWaveHelper>();
MmwaveHelper->SetSchedulerType (“ns3::MmWaveFlexTtiMaxWeightMacScheduler”);
NetDeviceContainer enbDevices = mmwaveHelper->InstallEnbDevice (enbNodes);
NetDeviceContainer ueDevices = mmwaveHelper->InstallUeDevice(ueNodes);
MmwaveHelper->AttachToClosestEnb (ueDevices, enbDevices);
InternetStackHelper internet;
internet.Install (ueNodes);
internet.Install (enbNodes);
Ipv4AddressHelper ipv4;
ipv4.SetBase (“7.0.0.0”, “255.0.0.0”);
Ipv4InterfaceContainer enbIpIfaces = ipv4.Assign (enbDevices);
Ipv4InterfaceContainer ueIpIfaces = ipv4.Assign (ueDevices);
Uint16_t dlPort = 1234;
OnOffHelper onOffHelper (“ns3::UdpSocketFactory”, InetSocketAddress (ueIpIfaces.GetAddress (0), dlPort));
onOffHelper.SetConstantRate (Data Rate (“100Mbps”));
Application Container clientApps = onOffHelper.Install (enbNodes.Get (0));
ClientApps. Start(Seconds(1.0));
clientApps. Stop(Seconds(simTime));
PacketSinkHelper packetSinkHelper (“ns3::UdpSocketFactory”, InetSocketAddress (Ipv4Address::GetAny(), dlPort));
ApplicationContainer serverApps = packetSinkHelper.Install (ue Nodes.Get (0));
serverApps. Start(Seconds(1.0));
serverApps. Stop(Seconds(simTime));
mmwaveHelper->EnableTraces();
Simulator::Stop(Seconds(simTime));
Simulator
How to simulate 5g projects using UE simulator?
UE simulator is crucially deployed among users specifically for its high-performance and capability. For the purpose of configuring and executing 5G simulations in both OMNeT++ and Ns-3 with the application of UE simulators, the following step-by-step procedures will assist you in an efficient manner:
Implementing OMNeT++ with Simu5G
Step 1: Install OMNeT++ and Needed Modules
- Install OMNeT++:
To download and install Mininet, follow the directions on the OMNeT++ website.
- Install INET and Simu5G:
Git clone https://github.com/inet-framework/inet.git
The Simu5G repository needs to be cloned:
Git clone https://github.com/Unipisa/Simu5G.git
Import INET and Simu5G projects by opening the mininet and then configure them.
Step 2: Develop a Original OMNeT++ Project
- Design a real OMNeT++ Project: Right-click on the Project Explorer in the OMNeT++ IDE. Then, choose “New” -> “OMNeT++ Project”. To design the project, keep a track of experts.
- Incorporate Functionalities: On your project, right-click and choose “properties”. Then, select “Project References” and for LNET and Simu5G, verify the boxes.
Step 3: Specify the Network Topology
- Develop a NED file: To specify the 5G network topology, design a new NED file in your project.
Package my5gproject;
Import inet.node.inet.Router;
Import inet.node.inet.StandardHost;
Import inet.mobility.static.StaticMobility;
Import simu5g.node.basenode.gnb.Gnb;
Import simu5g.node.ue.NrUe;
Network Simple5GNetwork
{
Types:
Channel ChannelType extends ned.DatarateChannel
{
Data rate = 1Gbps;
Delay = 1us;
}
Submodules:
Gnb: Gnb {
@display (“p=100,100”);
}
ue [5]: NrUe {
@display (“p=200,100+$index*50”);
}
Connections:
ue[0].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[1].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[2].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[3].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
ue[4].gnbPhy <–> ChannelType <–> gnb.gnbPhy;
}
Step 4: Setup Simulation Parameters
- Develop an INI file: Determine the simulation parameters by generating an omnetpp.ini.
[General]
Network = my5gproject.Simple5GNetwork
Sim-time-limit = 10s
*.gnb.gnbMac.maxTxPower = 40mW
*.gnb.gnbMac.carrierFrequency = 28GHz
*.gnb.gnbMac.bandwidth = 100MHz
*.gnb.mobility.typename = “StaticMobility”
*.gnb.mobility.initialX = 100m
*.gnb.mobility.initialY = 100m
*.ue[*].ueMac.maxTxPower = 20mW
*.ue[*].ueMac.carrierFrequency = 28GHz
*.ue[*].ueMac.bandwidth = 100MHz
*.ue[*].mobility.typename = “StaticMobility”
*.ue[*].mobility.initialX = 200m
*.ue[*].mobility.initialY = 100m+$index*50m
*.ue[*].numApps = 1
*.ue[*].app[0].typename = “UdpBasicApp”
*.ue[*].app[0].destAddresses = “gnb”
*.ue[*].app[0].startTime = uniform(1s, 2s)
*.ue[*].app[0].stopTime = 10s
*.ue[*].app[0].messageLength = 1024B
*.ue[*].app[0].sendInterval = uniform(0.1s, 0.2s)
*.gnb.numApps = 1
*.gnb.app [0].typename = “UdpSink”
Step 5: Execute the Simulation
- Develop the project: In the OMNeT++ IDE, compile the project.
- Implement the simulation: Choose Simple5GNetwork scenario to run the simulation. The simulation has to be observed and gather the findings.
Deploying ns-3 with mmWave and NR Modules
Step 1: Install ns-3 and Needed Modules
- Download ns-3: To download and install NS-3, follow the steps which are provided in the Ns-3 website.
- Clone the mmWave and NR modules:
- The mmWave module repository is cloned by following command
Git clone https://github.com/signetlabdei/mmwave.git
Clone the NR module repository:
Git clone https://github.com/nsnam/ns-3-dev-git.git
- Build ns-3 with the modules: As a means to incorporate new modules, go to the Ns-3 directory and set up the build.
Cd ns-3-allinone
./download.py -n ns-3-dev
./build.py –enable-examples –enable-tests
Step 2: Design a Simulation Script
- Develop a C++ script: For your simulation, generate a new C++ script.
#include “ns3/core-module.h”
#include “ns3/network-module.h”
#include “ns3/internet-module.h”
#include “ns3/point-to-point-module.h”
#include “ns3/mobility-module.h”
#include “ns3/applications-module.h”
#include “ns3/mmwave-helper.h”
#include “ns3/mmwave-module.h”
Using namespace ns3;
Int main (int argc, char *argv [])
{
Double simTime = 10.0;
Uint16_t numUeNodes = 2;
Uint16_t numEnbNodes = 1;
NodeContainer ueNodes;
ue Nodes.Create(numUeNodes);
NodeContainer enbNodes;
EnbNodes. Create (numEnbNodes);
MobilityHelper mobility; mobility.SetMobilityModel (“ns3::ConstantPositionMobilityModel”);
mobility.Install (ueNodes);
mobility.Install (enbNodes);
Ptr<MmWaveHelper> mmwaveHelper = CreateObject<MmWaveHelper> ();
MmwaveHelper->SetSchedulerType (“ns3::MmWaveFlexTtiMaxWeightMacScheduler”);
NetDeviceContainer enbDevices = mmwaveHelper->InstallEnbDevice (enbNodes);
NetDeviceContainer ueDevices = mmwaveHelper->InstallUeDevice (ueNodes);
MmwaveHelper->AttachToClosestEnb (ueDevices, enbDevices);
InternetStackHelper internet;
internet.Install (ueNodes);
internet.Install (enbNodes);
Ipv4AddressHelper ipv4;
ipv4.SetBase (“7.0.0.0”, “255.0.0.0”);
Ipv4InterfaceContainer enbIpIfaces = ipv4.Assign (enbDevices);
Ipv4InterfaceContainer ueIpIfaces = ipv4.Assign (ueDevices);
Uint16_t dlPort = 1234;
OnOffHelper onOffHelper (“ns3::UdpSocketFactory”, InetSocketAddress (ueIpIfaces.GetAddress (0), dlPort));
onOffHelper.SetConstantRate (Data Rate(“100Mbps”));
ApplicationContainer clientApps = onOffHelper.Install (enbNodes.Get(0));
ClientApps. Start (Seconds(1.0));
ClientApps. Stop (Seconds(simTime));
PacketSinkHelper packetSinkHelper(“ns3::UdpSocketFactory”, InetSocketAddress(Ipv4Address::Get Any(), dlPort));
ApplicationContainer serverApps = packetSinkHelper.Install (ue Nodes.Get(0));
serverApps.Start (Seconds (1.0));
serverApps. Stop (Seconds (simTime));
MmwaveHelper->EnableTraces();
Simulator::Stop(Seconds(simTime));
Simulator::Run();
Simulator::Destroy();
return 0;
}
Step 3: Configure and Execute the Simulation
- Save the Program: In the scratch directory of your Ns-3 installation, save the program as mmwave-simulation.cc.
- Configure the simulation: To compile your program, make use of the waf build system.
. /waf build
- Implement the Simulation: Use the following command to run the simulation:
. /waf –run scratch/mmwave-simulation