New Radio Tutorial¶
Goals¶
This tutorials includes simulation examples that are intended to provide hints about the basic configurations of 5G NR networks.
New in version 1.2.2.
Source files location: showcases/NR/standalone
Introduction¶
In this tutorial the omnetpp.ini
file is composed of several sections, each of which extends the scenario provided
by the previous one. This way, the beginner user is provided with a step-by-step guide towards
scenarios with increasing complexities.
All the configurations use the SingleCell_Standalone
network that can be found in the
simulations/NR/networks
folder.
network SingleCell_Standalone
{
parameters:
int numUe = default(1);
int numBgCells = default(0);
@display("i=block/network2;bgb=1000,1000;bgi=background/pisa");
submodules:
channelControl: LteChannelControl {
@display("p=50,25;is=s");
}
routingRecorder: RoutingTableRecorder {
@display("p=50,75;is=s");
}
configurator: Ipv4NetworkConfigurator {
@display("p=50,125");
}
binder: Binder {
@display("p=50,175;is=s");
}
carrierAggregation: CarrierAggregation {
@display("p=50.993748,258.7;is=s");
}
server: StandardHost {
@display("p=212,118;is=n;i=device/server");
}
router: Router {
@display("p=363.175,115.66875;i=device/smallrouter");
}
upf: Upf {
@display("p=527.35,116.9125");
}
iUpf: Upf {
@display("p=725,118");
}
gnb: gNodeB {
@display("p=726.35,277.35626;is=vl");
}
bgCell[numBgCells]: BackgroundCell {
@display("p=416,277;is=vl");
}
ue[numUe]: NRUe {
@display("p=628.09375,411.68124");
}
connections:
server.pppg++ <--> Eth10G <--> router.pppg++;
router.pppg++ <--> Eth10G <--> upf.filterGate;
upf.pppg++ <--> Eth10G <--> iUpf.pppg++;
iUpf.pppg++ <--> Eth10G <--> gnb.ppp;
}
Step 1: Single UE¶
Configuration: Single-UE
This simple scenario simulates only one UE attached to one gNB, with downlink traffic. The UE is located 400 meters far from the gNB and receives 800 kbps CBR traffic from a remote server.
[Config Single-UE]
# gNodeB position
*.gnb.mobility.initialX = 500m
*.gnb.mobility.initialY = 500m
# UE configuration
*.numUe = 1
# UE position (400m far from the gNB)
*.ue[*].mobility.initialX = 500m
*.ue[*].mobility.initialY = 900m
# connect the UE's NIC (NR side) to the corresponding serving gNB
*.ue[*].macCellId = 0
*.ue[*].masterId = 0
*.ue[*].nrMacCellId = 1
*.ue[*].nrMasterId = 1
# Application Setup
*.ue[*].numApps = 1
*.server.numApps = 1
*.ue[*].app[*].typename = "CbrReceiver"
*.ue[*].app[*].localPort = 1000
*.server.app[*].typename = "CbrSender"
*.server.app[*].PacketSize = 1000 # send 800 Kb/s
*.server.app[*].sampling_time = 0.01s
*.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of Apps
*.server.app[*].destPort = 1000
*.server.app[*].localPort = 3088+ancestorIndex(0)
*.server.app[*].startTime = uniform(0.01s,0.05s)
Since this scenario does not include any inter-cell interference and the gNB is lightly loaded
(it is serving one UE only), you will observe that the throughput received by the UE is equal
to the throughput generated by the server.
See cbrReceivedThroughput:mean
and cbrGeneratedThroughput:mean
statistics.
Step 2: Adding Inter-Cell Interference¶
Configuration: BgTraffic
As a next step, let’s add some inter-cell interference to the previous configuration. To do this, the scenario simulates one background cell, which serves 10 background UEs. Each background UEs receives 800 kbps CBR traffic.
Note
Background cells/UEs are simplified models of cells/UEs and have the only purpose to create interference on foreground cells/UEs. See the following paper for more information:
G. Nardini, G. Stea, A. Virdis, “Scalable Real-time Emulation of 5G Networks with Simu5G”, IEEE Access, vol. 9, pp. 148504-148520, 2021. doi: 10.1109/ACCESS.2021.3123873.
[Config BgTraffic]
extends = Single-UE
########## Background cells configuration #############
*.numBgCells = 1
*.bgCell[*].bgScheduler.isNr = true
*.bgCell[*].bgScheduler.txPower = 23
# position of the background gNodeB
*.bgCell[*].mobility.initialX = 750m
*.bgCell[*].mobility.initialY = 1000m
# number and position of background UEs in the background cells
*.bgCell[*].bgTrafficGenerator.numBgUes = 10
*.bgCell[*].bgTrafficGenerator.bgUE[*].mobility.initialX = uniform(500m,1000m)
*.bgCell[*].bgTrafficGenerator.bgUE[*].mobility.initialY = uniform(500m,1000m)
# Background traffic in the background cells
*.bgCell[*].bgTrafficGenerator.bgUE[*].trafficGeneratorType = "TrafficGeneratorCbr"
*.bgCell[*].bgTrafficGenerator.bgUE[*].generator.startTimeDl = uniform(0s,0.05s)
*.bgCell[*].bgTrafficGenerator.bgUE[*].generator.packetSizeDl = 1000B
*.bgCell[*].bgTrafficGenerator.bgUE[*].generator.periodDl = 0.01s
Due to the presence of interference you will observe smaller CQI for the foreground UE, as well as higher
number of allocated Resource Blocks in the downlink of the foreground cell.
See averageCqiDl:mean
and avgServerBlocksDl:mean
statistics.
Step 3: Adding a Variable Number of UEs¶
Configuration: Multiple-UEs
This configuration adds a variable number of (foreground) UEs (from 1 to 20) in the (foreground) gNB. All of them receive 800 kbps CBR traffic from a remote server.
[Config Multiple-UEs]
extends = BgTraffic
# variable number of UEs
*.numUe = ${numUes=1,5,10,15,20}
# UEs position
*.ue[*].mobility.initialX = uniform(0m,1000m)
*.ue[*].mobility.initialY = uniform(0m,1000m)
# the server has one app per client
*.server.numApps = ${numUes}
# include itervars in the output file names
output-scalar-file = ${resultdir}/${configname}/${iterationvars}-${repetition}.sca
output-vector-file = ${resultdir}/${configname}/${iterationvars}-${repetition}.vec
Due to the increased offered load, you will observe higher number of allocated Resource Blocks in the
downlink of the foreground cell. In particular, you will observe that the allocated RBs will reach the
maximum number of available RBs in this scenario (6). As a consequence, some UEs will experience a lower
throughput than the throughput generated at the server.
See avgServerBlocksDl:mean
and cbrReceivedThroughput:mean
statistics.
Step 4: Carrier Aggregation¶
Configuration: CarrierAggregation
This configuration enables a second Component Carrier (CC) at the gNBs. Thus, the UEs will be allocated into the second CC when the RBs in the first one are terminated.
[Config CarrierAggregation]
extends = Multiple-UEs
############### CA configuration ################
*.carrierAggregation.numComponentCarriers = 2
*.carrierAggregation.componentCarrier[0].carrierFrequency = 2GHz
*.carrierAggregation.componentCarrier[0].numBands = 6
*.carrierAggregation.componentCarrier[1].carrierFrequency = 6GHz
*.carrierAggregation.componentCarrier[1].numBands = 6
*.gnb.cellularNic.numCarriers = 2
*.gnb.cellularNic.channelModel[0].componentCarrierIndex = 0
*.gnb.cellularNic.channelModel[1].componentCarrierIndex = 1
*.ue[*].cellularNic.numNRCarriers = 2
*.ue[*].cellularNic.nrChannelModel[0].componentCarrierIndex = 0
*.ue[*].cellularNic.nrChannelModel[1].componentCarrierIndex = 1
############ Background cells configuration #############
*.numBgCells = 2
*.bgCell[0].bgScheduler.carrierFrequency = 2GHz
*.bgCell[0].bgScheduler.numBands = 6
*.bgCell[1].bgScheduler.carrierFrequency = 6GHz
*.bgCell[1].bgScheduler.numBands = 6
*.bgCell[*].bgScheduler.txPower = 23
Due to the higher radio capacity available, you will observe higher number of allocated Resource Blocks in the
downlink of the foreground cell, but you will also observe that UEs will get higher throughput than the
previous scenario.
See avgServerBlocksDl:mean
and cbrReceivedThroughput:mean
statistics.
Step 5: Numerology¶
Configuration: Numerology
This configuration shows how to change the numerology (u=0,1,2) assigned to all Component Carriers (CC).
[Config Numerology]
extends = CarrierAggregation
# configure numerology for all component carriers
*.carrierAggregation.componentCarrier[*].numerologyIndex = ${num = 0,2,4}
*.bgCell[*].bgScheduler.numerologyIndex = ${num}
When numerology increases, you will observe that the number of allocated Resource Blocks will decrease and
more UEs will get higher throughput.
See avgServerBlocksDl:mean
and cbrReceivedThroughput:mean
statistics.
Sources: omnetpp.ini
, SingleCell_Standalone.ned
Discussion¶
Use `this page <https://github.com/Unipisa/Simu5G/discussions/TODO`__ in the GitHub issue tracker for commenting on this showcase.