Traffic Models

Hello,

I’m trying to implement traffic models to my HetNet scenario.

Originally we have as users: clusteredUser (IoT users), poissonPedestrians, poissonCars and streetCars (as vehicular users).

In my scenario, I’ve changed to:
clusteredUser
poissonPedestriansFullBuffer (NEW)
poissonPedestriansHTTP (NEW)
poissonPedestriansVideo (NEW)
poissonPedestriansVoIP (NEW)
poissonPedestriansGaming (NEW)
poissonCars
streetCars

I have some questions:

1) Is Full Buffer the traffic type set as default? This is what I undestood by reading scenarios/example and parameters/user/trafficModel/TrafficModel

2) What is the correct way to configure a traffic model? I’m confused about what instruction to follow. In sequence I demonstrate the two ways that I found possible:

% First Way - as "scenarios/example"
poissonPedestriansGaming = parameters.user.Poisson2D;
poissonPedestriansGaming.nElements            = 30; % number of users placed
poissonPedestriansGaming.nRX                  = 1;
poissonPedestriansGaming.speed                = 0; % static user
poissonPedestriansGaming.movement             = parameters.user.movement.Static;
poissonPedestriansGaming.schedulingWeight     = 10; % assign 10 resource blocks when scheduled
poissonPedestriansGaming.indoorDecision       = parameters.indoorDecision.Random(0.5);
poissonPedestriansGaming.losDecision          = parameters.losDecision.UrbanMacro5G;
poissonPedestriansGaming.channelModel         = parameters.setting.ChannelModel.PedA;
poissonPedestriansGaming.trafficModel.type              = parameters.setting.TrafficModelType.Gaming;
poissonPedestriansGaming.trafficModel.delayConstraint   = 60; 
params.userParameters('poissonUserPedestrianGaming') = poissonPedestriansGaming;

Or

% Second Way - as "trafficModels/example"
poissonPedestriansGaming = parameters.user.Poisson2D;
poissonPedestriansGaming.nElements            = 30; % number of users placed
poissonPedestriansGaming.nRX                  = 1;
poissonPedestriansGaming.speed                = 0; % static user
poissonPedestriansGaming.movement             = parameters.user.movement.Static;
poissonPedestriansGaming.schedulingWeight     = 10; % assign 10 resource blocks when scheduled
poissonPedestriansGaming.indoorDecision       = parameters.indoorDecision.Random(0.5);
poissonPedestriansGaming.losDecision          = parameters.losDecision.UrbanMacro5G;
poissonPedestriansGaming.channelModel         = parameters.setting.ChannelModel.PedA;


params.setDependentParameters;
params.transmissionParameters.DL.bandwidthHz = 20e6;
UE                        = networkElements.ue.User;
poissonPedestriansGaming.trafficModel.type        = parameters.setting.TrafficModelType.Gaming;
UE.setGenericParameters(poissonPedestriansGaming, params);
traffic = UE.trafficModel;
for iSlot = 1:10
    UE.trafficModel.checkNewPacket(iSlot);
end
[numberOfPackets,remaningBits,generationTimes] = UE.trafficModel.getBufferState;
userThroughput = 3000;
UE.trafficModel.updateAfterTransmit(userThroughput,iSlot);
Latency = UE.trafficModel.getTransmissionLatency;
if all(isinf(Latency)) || isempty(Latency)
    warning('Transmission latency plot will not be shown since insufficient number of packets has been transmitted, you may need to increase the simulation time or change the traffic model parameters.');
    return;
end

params.userParameters('poissonUserPedestrianGaming') = poissonPedestriansGaming;

3) Is it possible to configure multiple users with different traffic models in the same scenario? If possible, what details should I pay attention to in the configuration?

4) Sometimes I get the warning about insufficient number of packets. How can I increase separately for each scenario user?

5) What is the correct way to plot the Latency ECDF of all users of my scenario including the ones with Traffic Models set? In the MATLAB variable result.transmissionLatency all I get is Inf

Hello,

Yes. If you do not set another traffic model for a user group, a full buffer will be simulated.

The trafficModels.example is the example for stand-alone use for the traffic models. So the scenario example is the better template. You can also refer to the openStreetMap scenario. There, constant rate models are set up.

You can set arbitrary traffic models for each user group that you add to a scenario. If you want latency results, it is not recommended to use the full buffer traffic model, since the latency cannot be determined for this traffic model.

I suspect that you set up short simulations with traffic models that have long waiting times in between their periods for traffic generation, so you might end up with a simulation without any data to transmit. If you want to set the traffic generation manually, I recommend using the constant rate traffic model. You also get this warning if there are only full buffer users in the simulation.

The Inf values can come from full buffer users, or from users that never successfully transmit data. The lack of successful transmission can stem from bad channel conditions for these users, or from an overloaded network that never schedules these users for transmission, or from the scheduling decision that prioritizes other users. If you do not set a traffic model and use only full buffer users, plotting the latency is not possible, since there are no latency values.

Hello @afastenb,

Thank you for the answers.

I changed my scenario considering the information of configuration provided by the openStreetMap scenario. Also, I removed the FullBuffer traffic so I could get information about latency.

Now I’m having trouble in generating my plot for the throughput by user group. I get errors like this one:

*Index in position 1 exceeds array bounds. Index must not exceed 213.

Error in launcherFiles.launcherHetNet (line 113)
VideoThroughput = result.userThroughputMBitPerSec.DL(pedestrianUserVideo,:);*

Also, the ECDF graph for latency is only plotted up to 50% of users and the latency axis varies from 1 in 1 ms to just 9 ms. Is the default setting of “result.plotUserLatencyEcdf;” correct?

Do you mind if I send you my codes for “HetNet” and “launcherHetNet” so you can take a closer look at this array error? I’m a little confused on this part

Hello,

the error message tells you that your indices pedestrianUserVideo do not match the throughput results. You probably did not set them correctly.

Also, the ECDF graph for latency is only plotted up to 50% of users and the latency axis varies from 1 in 1 ms to just 9 ms. Is the default setting of “result.plotUserLatencyEcdf;” correct?

The latency ECDF only reaching 50% means that 50% of packets are not transmitted during the simulation time, and thus their latency is set to Inf. The example HetNet scenario simulates a duration of 10 ms, thus large latency values are not reached within a simulation. Keep in mind that the example scenarios are example that show how to set parameters and what features the simulator supports. They are kept very small in order to produce and show results quickly. They are not providing full simulation results with meaningful results, they at best provide a snapshot of the network.

Do you mind if I send you my codes for “HetNet” and “launcherHetNet” so you can take a closer look at this array error?

We do not have the resources to debug your code for you. Please look at the results object and the implementation of the respective classes and use the debugging functionalities provided by MATLAB.