PhyUeD2D

Package: simu5g.stack.d2d.phy

simple module PhyUeD2D

Extends the PHY functionalities at the User Equipment side to support device-to-device (D2D) communications. Specifically, it customizes the PhyUe functionalities to support the transmission and reception of frames to another UE directly, without going through the serving eNodeB. It also supports one-to-many D2D transmission to UEs belonging to a multicast group. It is assumed that one-to-one D2D communication is only possible when both endpoints are served by the same eNodeB. When a handover is triggered, this module is responsible for initiating a mode switch from direct (D2D) mode to infrastructure mode.

simu5g.stack.d2d.phy.PhyUeD2DPhyUeD2Dsimple

Inheritance diagram

Extends

Name

Type

Description

PhyUe

simple module

Extends the PhyBase module by providing specific PHY functions on the User Equipment (UE) side. It ensures that frames received on the air interface are sourced from the serving eNodeB (eNB) and provides functions to manage the handover procedure, including periodic measurement of channel conditions to determine when a handover should occur. If enabled, the selection of the serving eNB at initialization is done dynamically based on radio conditions.

Parameters

Name

Type

Default value

Description

isNr

bool

false

True for the NR leg (set by NrNicUe/NrNicEnb on their PHY submodule)

macNodeId

int

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

ueTxPower

double

26dBm

eNodeBTxPower

double

46dBm

microTxPower

double

30dBm

txDirection

string

“OMNI”

txAngle

double

0deg

binderModule

string

“binder”

channelModelModule

string

“^.channelModel[0]”

Set to “^.nrChannelModel[0]” on an NR leg, see NrNicUe

connectionControlModule

string

“^.rrc.connectionControl”

d2dBinderModule

string

“d2dBinder”

The network’s D2dBinder, which holds the D2D state

d2dTxPower

double

26dBm

d2dMulticastCaptureEffect

bool

true

d2dMulticastCaptureEffectFactor

string

“RSRP”

“RSRP”, otherwise distance-based

enableMulticastD2DRangeCheck

bool

false

multicastD2DRange

double

1000m

Properties

Name

Value

Description

class

PhyUeD2D

display

i=block/wrxtx

Gates

Name

Direction

Size

Description

upperGateIn

input

From upper layer

upperGateOut

output

To upper layer

radioIn

input

Gate to receive message via sendDirect

Signals

Name

Type

Unit

Description

averageCqiD2D

averageCqiDl

averageCqiUl

distance

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

averageCqiD2D

Average Cqi reported in D2D

averageCqiD2D

mean,vector

cqi

averageCqiDl

Average Cqi reported in DL

averageCqiDl

mean,count,vector

cqi

averageCqiUl

Average Cqi reported in UL

averageCqiUl

mean,count,vector

cqi

distance

distance between UE and serving base station

distance

mean,vector

meters

Source code

//
// Extends the PHY functionalities at the User Equipment side to support device-to-device (D2D)
// communications. Specifically, it customizes the ~PhyUe functionalities to support the transmission and reception
// of frames to another UE directly, without going through the serving eNodeB. It also supports one-to-many
// D2D transmission to UEs belonging to a multicast group. It is assumed that one-to-one D2D communication is only possible
// when both endpoints are served by the same eNodeB. When a handover is triggered, this module is responsible
// for initiating a mode switch from direct (D2D) mode to infrastructure mode.
//
simple PhyUeD2D extends PhyUe
{
    parameters:
        @class("PhyUeD2D");
        string d2dBinderModule = default("d2dBinder");  // The network's ~D2dBinder, which holds the D2D state
        double d2dTxPower @unit(dBm) = default(26dBm);
        bool d2dMulticastCaptureEffect = default(true);
        string d2dMulticastCaptureEffectFactor = default("RSRP");  // "RSRP", otherwise distance-based
        bool enableMulticastD2DRangeCheck = default(false);
        double multicastD2DRange @unit(m) = default(1000m);

        //# D2D CQI statistic
        @signal[averageCqiD2D];
        @statistic[averageCqiD2D](title="Average Cqi reported in D2D"; unit="cqi"; source="averageCqiD2D"; record=mean,vector);
}

File: src/simu5g/stack/d2d/phy/PhyUeD2D.ned