TrafficGeneratorBase

Package: simu5g.background.trafficGenerator.generators

simple module TrafficGeneratorBase

Provides the basic functions and parameters that a traffic generator submodule (implementing the ITrafficGenerator interface) can utilize. It enables the configuration of parameters such as the starting time of the traffic, the size and inter-generation timing of packets, the rate of retransmissions, and so on. Custom background traffic generators can be implemented by extending this module.

simu5g.background.trafficGenerator.generators.TrafficGeneratorBaseTrafficGeneratorBasesimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

BackgroundUe

compound module

Lightweight model for 4G or 5G User Equipment (UE). It is used to simulate the generation of background traffic in both uplink and downlink bandwidths, according to the logic specified by its ITrafficGenerator submodule. The generated traffic is not actually transmitted or received by this module, making it more efficient from a simulation complexity perspective. Instead, such traffic modifies the buffer status information that is used by the BackgroundScheduler to allocate resources. Each background UE has a mobility submodule to configure its position in the simulation floor plan. This allows for realistic channel status information to be computed for the background UE and used by the BackgroundScheduler. Since this module does not send or receive actual traffic, application-level statistics are not produced.

Known subclasses

Name

Type

Description

TrafficGeneratorCbr

simple module

Specializes the TrafficGeneratorBase module to provide a Constant Bit Rate (CBR) background traffic generator. This generator produces fixed-size packets at regular intervals in either downlink or uplink bands, or both.

Parameters

Name

Type

Default value

Description

computeAvgInterference

bool

enablePeriodicCqiUpdate

bool

useProbabilisticCqi

bool

backgroundTrafficManagerModule

string

“^.^.manager”

startTimeDl

double

-1s

startTimeUl

double

-1s

headerLen

int

33B

txPower

double

26dBm

fbPeriod

int

6tti

periodDl

double

uniform(10ms,50ms)

periodUl

double

uniform(10ms,50ms)

packetSizeDl

int

intuniform(20B,100B)

packetSizeUl

int

intuniform(20B,100B)

rtxRateDl

double

0.1

rtxDelayDl

double

0.006s

rtxRateUl

double

0.1

rtxDelayUl

double

0.006s

cqiMeanDl

double

15

These values are only considered when periodicCqi == false && computeAvgInterference == false

cqiMeanUl

double

15

cqiStddevDl

double

0

cqiStddevUl

double

0

Properties

Name

Value

Description

class

TrafficGeneratorBase

display

i=block/source

Signals

Name

Type

Unit

Description

bgAverageCqiDl

bgAverageCqiUl

bgHarqErrorRateDl

bgHarqErrorRateUl

bgMeasuredSinrDl

Statistics

bgMeasuredSinrUl

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

bgAverageCqiDl

Average DL CQI for background UEs

bgAverageCqiDl

mean,count,vector

bgAverageCqiUl

Average UL CQI for background UEs

bgAverageCqiUl

mean,count,vector

bgHarqErrorRateDl

Average DL HARQ error rate for background UEs

bgHarqErrorRateDl

mean,count,vector

bgHarqErrorRateUl

Average UL HARQ error rate for background UEs

bgHarqErrorRateUl

mean,count,vector

bgMeasuredSinrDl

Average DL SINR for background UEs

bgMeasuredSinrDl

mean,count,vector

bgMeasuredSinrUl

Average UL SINR for background UEs

bgMeasuredSinrUl

mean,count,vector

Source code

//
// Provides the basic functions and parameters that a traffic generator
// submodule (implementing the ~ITrafficGenerator interface) can utilize. It
// enables the configuration of parameters such as the starting time of the traffic,
// the size and inter-generation timing of packets, the rate of retransmissions, and so on.
// Custom background traffic generators can be implemented by extending this module.
//
simple TrafficGeneratorBase like ITrafficGenerator
{
    parameters:
        @display("i=block/source");
        @class("TrafficGeneratorBase");

        bool computeAvgInterference;
        bool enablePeriodicCqiUpdate;
        bool useProbabilisticCqi;

        string backgroundTrafficManagerModule = default("^.^.manager");

        double startTimeDl @unit("s") = default(-1s);
        double startTimeUl @unit("s") = default(-1s);

        //# TODO check parameters
        int headerLen @unit(B) = default(33B);
        double txPower @unit(dBm) = default(26dBm);
        int fbPeriod @unit(tti) = default(6tti);

        volatile double periodDl @unit("s") = default(uniform(10ms,50ms));
        volatile double periodUl @unit("s") = default(uniform(10ms,50ms));

        volatile int packetSizeDl @unit(B) = default(intuniform(20B,100B));
        volatile int packetSizeUl @unit(B) = default(intuniform(20B,100B));

        double rtxRateDl = default(0.1);
        double rtxDelayDl @unit("s") = default(0.006s);
        double rtxRateUl = default(0.1);
        double rtxDelayUl @unit("s") = default(0.006s);

        // These values are only considered when
        // - periodicCqi == false && computeAvgInterference == false
        double cqiMeanDl = default(15);
        double cqiMeanUl = default(15);
        double cqiStddevDl = default(0);
        double cqiStddevUl = default(0);

        // Statistics
        @signal[bgMeasuredSinrDl];
        @statistic[bgMeasuredSinrDl](title="Average DL SINR for background UEs"; unit=""; source="bgMeasuredSinrDl"; record=mean,count,vector);
        @signal[bgMeasuredSinrUl];
        @statistic[bgMeasuredSinrUl](title="Average UL SINR for background UEs"; unit=""; source="bgMeasuredSinrUl"; record=mean,count,vector);
        @signal[bgAverageCqiDl];
        @statistic[bgAverageCqiDl](title="Average DL CQI for background UEs"; unit=""; source="bgAverageCqiDl"; record=mean,count,vector);
        @signal[bgAverageCqiUl];
        @statistic[bgAverageCqiUl](title="Average UL CQI for background UEs"; unit=""; source="bgAverageCqiUl"; record=mean,count,vector);
        @signal[bgHarqErrorRateDl];
        @statistic[bgHarqErrorRateDl](title="Average DL HARQ error rate for background UEs"; unit=""; source="bgHarqErrorRateDl"; record=mean,count,vector);
        @signal[bgHarqErrorRateUl];
        @statistic[bgHarqErrorRateUl](title="Average UL HARQ error rate for background UEs"; unit=""; source="bgHarqErrorRateUl"; record=mean,count,vector);
}

File: src/simu5g/background/trafficGenerator/generators/TrafficGeneratorBase.ned