LteMacEnbD2D

Package: simu5g.stack.d2d.mac

LteMacEnbD2D

compound module

Extends LTE MAC functionalities at the eNodeB side to support device-to-device (D2D) communications. Specifically, it enhances resource allocation procedures to enable direct communication between User Equipments (UEs), i.e., it allocates resources for D2D transmissions. Network-assisted D2D is only implemented (out-of-coverage D2D is not supported).

amc : like ILteAmc

ILteAmc: Module interface for the Adaptive Modulation and Coding (AMC) module.

Source:
amc: <amcType> like ILteAmc {
    @display("p=60,140");
} schedulerDl : like ILteSchedulerEnbDl

ILteSchedulerEnbDl: Module interface for the eNB/gNB downlink scheduler.

Source:
schedulerDl: <dlSchedulerType> like ILteSchedulerEnbDl {
    @display("p=60,60");
} schedulerUl : like ILteSchedulerEnbUl

ILteSchedulerEnbUl: Module interface for the eNB/gNB uplink scheduler.

Source:
schedulerUl: <ulSchedulerType> like ILteSchedulerEnbUl {
    @display("p=180,60");
}

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
LteMacEnb compound module

Extends the LteMacBase module by providing specific MAC functions on the eNodeB side. Specifically, it initializes and manages the scheduling classes responsible for resource allocation operations in both uplink and downlink directions, while also supporting Carrier Aggregation (CA). It manages the Random Access procedure (RAC) and the reception of Buffer Status Reports (BSRs) from UEs, as well as the transmission of scheduling grants to UEs allocated within the uplink bandwidth. For downlink connections, it notifies the Radio Link Control (RLC) layer when it is ready to receive MAC Service Data Units (SDUs) to build MAC Protocol Data Units (PDUs) and transmit them to the physical layer.

Parameters

Name Type Default value Description
macNodeId int

MacNodeId of the stack leg this MAC belongs to (set by the NIC)

binderModule string "binder"
queueSize int 2MiB
harqProcesses int 8
maxHarqRtx int 3
harqFbEvaluationTimer int 4

Number of slots for sending back HARQ FB

statDisplay bool false
rlcMuxModule string "^.rlcMux"

Module references for accessing other stack layers

bearerManagementModule string "^.rrc.bearerManagement"
amcType string "LteAmcD2D"

AMC Type: "LteAmc", "NrAmc" (the D2D NICs swap in the "LteAmcD2D"/"NrAmcD2D" leaves)

amcMode string "AUTO"

AMC pilot mode; supported values depend on the AMC implementation (LteAmc: "AUTO", "D2D")

rbAllocationType string "localized"

Resource allocation type ("distributed" or "localized")

summaryLowerBound double 5ms

Summary feedback confidence function lower bound

summaryUpperBound double 20ms

Summary feedback confidence function upper bound

fbhbCapacityDl int 5

Feedback historical base capacity in DL (number of stored feedback samples per UE)

fbhbCapacityUl int 5

Feedback historical base capacity in UL (number of stored feedback samples per UE)

cqiWeight double 0.0

Wideband CQI generation parameter (0.0 means "use the mean value")

eNodeBCount int 0

Number of eNodeBs - set to 0 if unknown

schedulingDisciplineDl string "MAXCI"

Scheduling discipline. See LteCommon.h for discipline meaning. ALLOCATOR_BESTFIT is the D2D frequency-reuse allocator: it is only constructible by the D2D uplink schedulers, so selecting it requires ulSchedulerType = LteSchedulerEnbUlD2D or NrSchedulerGnbUlD2D (and hence the Simu5G_D2D feature). Any other scheduler raises an error at setup.

schedulingDisciplineUl string "MAXCI"
ulSchedulerType string "LteSchedulerEnbUlD2D"

Scheduler Types

dlSchedulerType string "LteSchedulerEnbDl"
pfAlpha double 0.95

Proportional Fair parameters

pilotMode string "ROBUST_CQI"
numPreambles int 64

Number of RACH preambles available for contention-based random access

cellInfoModule string
fbhbCapacityD2D int 5

Feedback historical base capacity in D2D (number of stored feedback samples per UE)

usePreconfiguredTxParams bool false
d2dCqi int 7
reuseD2D bool false

Frequency reuse parameters

reuseD2DMulti bool false
conflictGraphUpdatePeriod double 1s
conflictGraphThreshold double 90

CG thresholds can be defined in either dBm or meters if distances are set to -1.0, then dBm thresholds are used, otherwise distances have priority on dBm thresholds

conflictGraphD2DInterferenceRadius double -1.0m

Meters

conflictGraphD2DMultiTxRadius double -1.0m

Meters

conflictGraphD2DMultiInterferenceRadius double -1.0m

Meters

msHarqInterrupt bool true

Handling of D2D mode switch

msClearRlcBuffer bool true

Properties

Name Value Description
display i=block/mac
class LteMacEnbD2D

Gates

Name Direction Size Description
upperLayerIn input

From RLC

upperLayerOut output

To RLC

phyIn input

From PHY

phyOut output

To PHY

Signals

Name Type Unit Description
macDelayDl
macThroughputDl
macDelayUl
macThroughputUl
macCellPacketLossDl
macCellPacketLossUl
macPacketLossUl
macPacketLossDl
macBufferOverFlowDl
macBufferOverFlowUl
harqErrorRateUl
harqErrorRateDl
harqTxAttemptsDl
harqTxAttemptsUl
harqErrorRate_1st_Ul
harqErrorRate_1st_Dl
harqErrorRate_2nd_Ul
harqErrorRate_2nd_Dl
harqErrorRate_3rd_Ul
harqErrorRate_3rd_Dl
harqErrorRate_4th_Ul
harqErrorRate_4th_Dl
receivedPacketFromUpperLayer
receivedPacketFromLowerLayer
sentPacketToUpperLayer
sentPacketToLowerLayer
macPduAcked
macPduDiscarded
rlcPduDiscarded
grantSent
ulMacPduArrived
avgServedBlocksDl
avgServedBlocksUl
macCellPacketLossD2D
macBufferOverFlowD2D

Statistics

Name Title Source Record Unit Interpolation Mode Description
macDelayDl Delay at the MAC layer UL macDelayDl mean, vector s
macThroughputDl Throughput at the MAC layer DL macThroughputDl simu5g_rateavg Bps
macDelayUl Delay at the MAC layer UL macDelayUl mean, vector s
macThroughputUl Throughput at the MAC layer UL macThroughputUl simu5g_rateavg Bps
macCellPacketLossDl Mac Cell Packet Loss Dl macCellPacketLossDl mean
macCellPacketLossUl Mac Cell Packet Loss Ul macCellPacketLossUl mean
macPacketLossUl Mac Packet Loss Ul macPacketLossUl mean
macPacketLossDl Mac Packet Loss Dl macPacketLossDl mean
macBufferOverFlowDl Mac buffer overflow as function of time macBufferOverFlowDl mean Byte/s
macBufferOverFlowUl Mac buffer overflow as function of time macBufferOverFlowUl mean Byte/s
harqErrorRateUl Harq Error Rate Ul harqErrorRateUl mean, vector
harqErrorRateDl Harq Error Rate Dl harqErrorRateDl mean, vector
harqTxAttemptsDl Harq Tx Attempts Dl harqTxAttemptsDl mean, vector
harqTxAttemptsUl Harq Tx Attempts Ul harqTxAttemptsUl mean, vector
harqErrorRate_1st_Ul Harq Error Rate Ul (1st tx) harqErrorRate_1st_Ul mean, vector
harqErrorRate_1st_Dl Harq Error Rate Dl (1st tx) harqErrorRate_1st_Dl mean, vector
harqErrorRate_2nd_Ul Harq Error Rate Ul (2nd tx) harqErrorRate_2nd_Ul mean, vector
harqErrorRate_2nd_Dl Harq Error Rate Dl (2nd tx) harqErrorRate_2nd_Dl mean, vector
harqErrorRate_3rd_Ul Harq Error Rate Ul (3rd tx) harqErrorRate_3rd_Ul mean, vector
harqErrorRate_3rd_Dl Harq Error Rate Dl (3rd tx) harqErrorRate_3rd_Dl mean, vector
harqErrorRate_4th_Ul Harq Error Rate Ul (4th tx) harqErrorRate_4th_Ul mean, vector
harqErrorRate_4th_Dl Harq Error Rate Dl (4th tx) harqErrorRate_4th_Dl mean, vector
receivedPacketFromUpperLayer receivedPacketFromUpperLayer count, sum(packetBytes), vector(packetBytes) none
receivedPacketFromLowerLayer receivedPacketFromLowerLayer count, sum(packetBytes), vector(packetBytes) none
sentPacketToUpperLayer sentPacketToUpperLayer count, sum(packetBytes), vector(packetBytes) none
sentPacketToLowerLayer sentPacketToLowerLayer count, sum(packetBytes), vector(packetBytes) none
avgServedBlocksDl Average number of allocated Resource Blocks in the Dl avgServedBlocksDl mean, vector blocks
avgServedBlocksUl Average number of allocated Resource Blocks in the Dl avgServedBlocksUl mean, vector blocks
macCellPacketLossD2D Mac Cell Packet Loss D2D macCellPacketLossD2D mean
macBufferOverFlowD2D Mac buffer overflow as function of time macBufferOverFlowD2D mean Byte/s

Source code

//
// Extends LTE MAC functionalities at the eNodeB side to support device-to-device (D2D)
// communications. Specifically, it enhances resource allocation procedures to enable direct
// communication between User Equipments (UEs), i.e., it allocates resources for D2D transmissions.
// Network-assisted D2D is only implemented (out-of-coverage D2D is not supported).
//
module LteMacEnbD2D extends LteMacEnb
{
    parameters:
        @class("LteMacEnbD2D");

        // Use the D2D-capable AMC leaf
        amcType = default("LteAmcD2D");

        // Use the D2D-capable uplink scheduler leaf
        ulSchedulerType = default("LteSchedulerEnbUlD2D");

        // Feedback historical base capacity in D2D (number of stored feedback samples per UE)
        int fbhbCapacityD2D = default(5);

        bool usePreconfiguredTxParams = default(false);
        int d2dCqi = default(7);

        // Frequency reuse parameters
        bool reuseD2D = default(false);
        bool reuseD2DMulti = default(false);
        double conflictGraphUpdatePeriod @unit(s) = default(1s);

        // CG thresholds can be defined in either dBm or meters
        // if distances are set to -1.0, then dBm thresholds are used,
        // otherwise distances have priority on dBm thresholds
        double conflictGraphThreshold = default(90);                       // dBm
        double conflictGraphD2DInterferenceRadius @unit(m) = default(-1.0m);         // Meters
        double conflictGraphD2DMultiTxRadius @unit(m) = default(-1.0m);              // Meters
        double conflictGraphD2DMultiInterferenceRadius @unit(m) = default(-1.0m);    // Meters

        // Handling of D2D mode switch
        bool msHarqInterrupt = default(true);
        bool msClearRlcBuffer = default(true);

        @signal[macCellPacketLossD2D];
        @statistic[macCellPacketLossD2D](title="Mac Cell Packet Loss D2D"; unit=""; source="macCellPacketLossD2D"; record=mean);
        @signal[macBufferOverFlowD2D];
        @statistic[macBufferOverFlowD2D](title="Mac buffer overflow as function of time"; unit="Byte/s"; source="macBufferOverFlowD2D"; record=mean);
}
File: src/simu5g/stack/d2d/mac/LteMacEnbD2D.ned