Main Content

nrUE

5G NR user equipment (UE) node

Since R2023a

    Download Required: To use nrUE, first download the Communications Toolbox Wireless Network Simulation Library add-on.

    Description

    Use the nrUE object to create and configure new radio (NR) user equipment (UE) nodes.

    Creation

    Description

    ue = nrUE creates a default UE object.

    example

    ue = nrUE(Name=Value) creates one or more similar UE objects, and sets properties using one or more optional name-value arguments. For example, Position=[100 100 0; 5000 100 0],Name=["ue1","ue2"] creates two UE objects, one with the name "ue1" and the other named "ue2", positioned at [100 100 0] and [5000 100 0], respectively. The number of rows in the Position argument defines the number of UE objects created. If you create N nodes but supply M names, where M is greater than N, the nrUE object uses only the first N names. If M is less than N, the object uses default names for the trailing (N-M) nodes.

    example

    Properties

    expand all

    Name of the UE node, specified as a character vector, string scalar, string array, or cell array of character vectors.

    If you do not set the Name property, the nrGNB object sets a default name, NodeX, where X is the ID of the node.

    To set the value of this property for multiple UE nodes simultaneously, you must specify it at object creation. After object creation, you can set the value of this property for one UE object at a time.

    Data Types: char | string

    Node position in 3-D Cartesian coordinates, specified as a three-element numeric row vector or N-by-3 matrix. N is the number of nrUE objects to create using the creation function. Each row specifies the position of the node in Cartesian x-, y-, and z- coordinates. Units are in meters.

    To set the value of this property for multiple UE nodes simultaneously, you must specify it at object creation. After object creation, you can set the value of this property for one UE object at a time.

    Data Types: double

    This property is read-only.

    Noise figure, specified as a nonnegative finite scalar. The object uses this value to apply thermal noise on the received packet. Units are in dB.

    To set the value of this property, you must specify it at object creation.

    Data Types: double

    This property is read-only.

    Receiver antenna gain, specified as a nonnegative finite scalar. Units are in dB.

    To set the value of this property, you must specify it at object creation.

    Data Types: double

    This property is read-only.

    Number of transmit antennas, specified as 1, 2, or 4.

    To set the value of this property, you must specify it at object creation.

    Data Types: double

    This property is read-only.

    Number of receive antennas, specified as 1, 2, or 4.

    To set the value of this property, you must specify it at object creation.

    Data Types: double

    This property is read-only.

    Transmit power, specified as a finite numeric scalar. Units are in dBm. The maximum value of transmit power you can specify is 60 dBm.

    By default, a gNB node activates the uplink transmit power control mechanism for the connected UE nodes. To configure the uplink (UL) power control mechanism, use the configureULPowerControl function of the nrGNB object. In this mode, a UE node determines its actual transmit power, which is less than or equal to the specified value of TransmitPower, based on the uplink power control equation specified in TS 38.213, Section 7.1 [5].

    To disable the UL power control mechanism, set Alpha to 1 and PoPUSCH to 24 dBm. When disabled, the actual transmit power of a UE node is the specified value of TransmitPower.

    To set the value of this property, you must specify it at object creation.

    Data Types: double

    This property is read-only.

    Physical (PHY) layer abstraction method, specified as one of these options. Note that all the 5G base station (gNB) and UE nodes must use the same PHY abstraction method.

    • "linkToSystemMapping" — Enable the link-to-system mapping-based abstracted PHY. The abstracted PHY models the link quality and performance to calculate the packet error rate (PER). Unlike full PHY, it does not involve waveform generation and decoding. For more information about the abstracted PHY, see Composition of NR Nodes.

    • "none" — Enable full PHY processing. Full PHY processing involves waveform generation and decoding at the PHY layer.

    To set the value of this property, you must specify it at object creation.

    Data Types: char | string

    This property is read-only.

    Node identifier of the UE node, returned as a positive integer. This value specifies a unique identifier for a node in the simulation.

    Note

    If you create and store the UE nodes in an uninitialized matrix, the node IDs that this property allocates to the nodes can be non-sequential because of the memory allocation to the object in the matrix. For more information about memory allocation, see How MATLAB Allocates Memory.

    Data Types: double

    This property is read-only.

    Connection state of the UE node, returned as "Idle" or "Connected", where"Idle" indicates that no connection between the UE and gNB nodes exists.

    Data Types: char | string

    This property is read-only.

    Node identifier of the gNB node to which the UE node connects, returned as a positive integer.

    Data Types: double

    This property is read-only.

    Radio network temporary identifier of the UE, returned as an integer in the range [1, 65,519].

    Data Types: double

    Object Functions

    addTrafficSourceAdd data traffic source to 5G NR node
    statisticsStatistics of UE
    addMobilityAdd random waypoint mobility model to UE node

    Examples

    collapse all

    Create 10 similar UE nodes with each having a transmit power of 20 dBm. Place the UE nodes randomly along the X-axis within 1000 meters of the origin.

    numUEs = 10;                                           % Number of UEs
    position = [1000*rand(numUEs,1) zeros(numUEs,2)];    % In Cartesian x, y, and z coordinates
    ue1 = nrUE(Position=position,TransmitPower=20);
    display(ue1(1))
      nrUE with properties:
    
                        Name: "Node7"
                    Position: [814.7237 0 0]
    
       Read-only properties:
                 NoiseFigure: 6
                 ReceiveGain: 0
               TransmitPower: 20
         NumTransmitAntennas: 1
          NumReceiveAntennas: 1
        PHYAbstractionMethod: "linkToSystemMapping"
             ConnectionState: "Idle"
                          ID: 7
    
    display(ue1(7))
      nrUE with properties:
    
                        Name: "Node13"
                    Position: [278.4982 0 0]
    
       Read-only properties:
                 NoiseFigure: 6
                 ReceiveGain: 0
               TransmitPower: 20
         NumTransmitAntennas: 1
          NumReceiveAntennas: 1
        PHYAbstractionMethod: "linkToSystemMapping"
             ConnectionState: "Idle"
                          ID: 13
    

    Create 7 similar UE nodes with each having a transmit power of 29 dBm transmit power. Place the UE nodes randomly.

    numUEs = 7;                                              % Number of UEs
    position = [700*rand(numUEs,1) 500*rand(numUEs,2)];    % In Cartesian x, y, and z coordinates
    ue2 = nrUE(Position=position,TransmitPower=29);

    Create a default gNB node.

    gnb = nrGNB
    gnb = 
      nrGNB with properties:
    
                            Name: "Node24"
                        Position: [0 0 0]
    
       Read-only properties:
                     NoiseFigure: 6
                     ReceiveGain: 6
                   TransmitPower: 34
             NumTransmitAntennas: 1
              NumReceiveAntennas: 1
            PHYAbstractionMethod: "linkToSystemMapping"
                      DuplexMode: "FDD"
                CarrierFrequency: 2.6000e+09
                ChannelBandwidth: 5000000
               SubcarrierSpacing: 15000
               NumResourceBlocks: 25
                         NumHARQ: 16
        ULPowerControlParameters: [1x1 struct]
                              ID: 24
    
       Constant properties:
                        MCSTable: [28x4 table]
    
    

    Create a default UE node.

    ue = nrUE
    ue = 
      nrUE with properties:
    
                        Name: "Node25"
                    Position: [0 0 0]
    
       Read-only properties:
                 NoiseFigure: 6
                 ReceiveGain: 0
               TransmitPower: 23
         NumTransmitAntennas: 1
          NumReceiveAntennas: 1
        PHYAbstractionMethod: "linkToSystemMapping"
             ConnectionState: "Idle"
                          ID: 25
    
    

    Establish a connection between the UE node and the gNB node.

    connectUE(gnb,ue)

    Initialize wireless network simulator.

    networkSimulator = wirelessNetworkSimulator.init;

    Create a gNB node with these specifications.

    • Duplex mode — Time division duplex

    • Channel bandwidth — 20 MHz

    • Subcarrier spacing — 30 KHz

    gnb = nrGNB(ChannelBandwidth=20e6,DuplexMode="TDD",SubcarrierSpacing=30e3);

    Create a UE node with a transmit power of 20 dBm.

    ue = nrUE(TransmitPower=20);

    Configure these uplink power control parameters at the gNB node.

    • Nominal transmit power of UE per resource block — 7 dBm

    • Fractional power control multiplier— 2

    configureULPowerControl(gnb,PoPUSCH=7,Alpha=0.4)

    Add a random way point mobility model to the UE node.

    addMobility(ue,BoundaryShape="rectangle")

    Establish a connection between the UE and gNB nodes.

    connectUE(gnb,ue)

    Create a voice over Internet protocol (VoIP) application traffic pattern object.

    traffic = networkTrafficVoIP(GeneratePacket=true);

    Add the data traffic source to the gNB node. Set the destination node as the UE node.

    addTrafficSource(gnb,traffic,DestinationNode=ue)

    Add the gNB node to the wireless network simulator.

    addNodes(networkSimulator,gnb)

    Add the UE node to the wireless network simulator.

    addNodes(networkSimulator,ue)

    Specify the simulation time, in seconds.

    simulationTime = 0.3;

    Run the simulation for the specified simulation time.

    run(networkSimulator,simulationTime)

    Obtain the statistics for the gNB and UE nodes.

    gnbStats = statistics(gnb);
    ueStats = statistics(ue);

    References

    [1] 3GPP TS 38.101-1. “NR; User Equipment (UE) radio transmission and reception; Part 1: Range 1 Standalone.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [2] 3GPP TS 38.214. “NR; Physical layer procedures for data.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [3] 3GPP TS 38.321. “NR; Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [4] 3GPP TS 38.322. “NR; Radio Link Control (RLC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    [5] 3GPP TS 38.213. “NR; Physical layer procedures for control.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    Version History

    Introduced in R2023a

    expand all