Unipisa / Simu5G

Simu5G - 5G NR and LTE/LTE-A user-plane simulation model for OMNeT++ & INET
https://simu5g.org
Other
147 stars 83 forks source link

BgTraffic for e/gNBs with multiple carriers and 4/5G auto switch in NSA 5G scenarios #154

Closed gehirndienst closed 1 year ago

gehirndienst commented 1 year ago

Hello,

I have the following scenario: several eNBs that is capable of serving for the known LTE bands 1, 3, 7 (so 3 ccs in common) and one secondary gNB that is capable of serving NR bands 28, 78 (so 2 NR ccs in common, overall 5 carriers). I want to create scenario with lots of traffic to test edge-cases for one target "real" UE. To speed up the simulation I plan to use BgTraffic UEs, which, if I understood correctly, model a proper signal interference and noise without the whole protocol traversals as for "normal" other UEs (i.e., those assigned with real apps). Since the amount of those UEs will be around several thousands, that will be a great speedup for the performance.

So, the setup with carriers looks like this:

*.carrierAggregation.numComponentCarriers = 5
# n1
*.carrierAggregation.componentCarrier[0].carrierFrequency = 2.1GHz
*.carrierAggregation.componentCarrier[0].numBands = 50
# n3
*.carrierAggregation.componentCarrier[1].carrierFrequency = 1.8GHz
*.carrierAggregation.componentCarrier[1].numBands = 100
# n7
*.carrierAggregation.componentCarrier[2].carrierFrequency = 2.6GHz
*.carrierAggregation.componentCarrier[2].numBands = 100
# n78
*.carrierAggregation.componentCarrier[3].carrierFrequency = 3.5GHz
*.carrierAggregation.componentCarrier[3].numBands = 100
*.carrierAggregation.componentCarrier[3].numerologyIndex = 1
*.carrierAggregation.componentCarrier[3].useTdd = true
# n28
*.carrierAggregation.componentCarrier[4].carrierFrequency = 0.7GHz
*.carrierAggregation.componentCarrier[4].numBands = 100

*.targetUe.cellularNic.numCarriers = 3
*.targetUe.cellularNic.channelModel[0].componentCarrierIndex = 0
*.targetUe.cellularNic.channelModel[1].componentCarrierIndex = 1
*.targetUe.cellularNic.channelModel[2].componentCarrierIndex = 2

*.targetUe.cellularNic.numNRCarriers = 2
*.targetUe.cellularNic.nrChannelModel[0].componentCarrierIndex = 3
*.targetUe.cellularNic.nrChannelModel[1].componentCarrierIndex = 4

Here are my questions:

  1. Do I have to specify a traffic generator for each of the carriers, smth. like: *.*NB*.cellularNic.bgTrafficGenerator[*]...? Or is there a way of spawning multiple bgUEs around the playground so that they automatically decide which carrier to use depending on the situation, as it happens with "normal" UEs capable of using all carriers?

  2. How to make targetUe (let's say it is just a CbrSender that sends the data in the strict order to some static StandardHost aka CbrReceiver) to be capable of automatically switching from 5G to 4G and vice versa in the same way as smartphones do? As far as I unterstand, it is only possible to set tos parameter for an application and therefore to order to use only LTE, NR or Split Bearer. The last one, however, is not suitable if one transmits something like a video stream, the transmission produces then too much out-of-order frames. I need a way to change from LTE to NR on-the-fly, something like "use only 5G if it is available, 4G otherwise". Is that possible in NSA scenario?

With best regards, Nikita

giovanninardini commented 1 year ago

Hi,

your understanding of background UEs is correct. I will try to answer your two questions:

  1. when you assign N carriers to one e/gNB, automatically that e/gNB will include N bgTrafficGenerator modules, one for each carrier configured for that e/gNB. Each of those bgTrafficGenerator can be configured with a number of (background) UEs. Each background UE will generate traffic on the corresponding carrier according to its own TrafficGenerator. It is not possible to have background UEs that change their carrier dynamically, as this would require some "intelligence" to be added to the background UEs, jeopardizing the whole idea of having lightweight UEs that make simulation faster.

  2. you would need to check the behavior coded into the IP2Nic::markPacket() function (link here). As you said, at the moment the choice is based on the ToS. However, if you hack the conditions within the above function you should be able to obtain what you wish. Note that when a UE is not connected to a gNB (e.g., because it is out of coverage), its nrMasterId parameter is 0.

Hope this helps. Giovanni