Main Content


Statistics of UE

Since R2023a

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



    stats = statistics(ue) returns the statistics of a 5G New Radio (NR) user equipment (UE) node, ue, in a structure, stats. To obtain statistics for multiple UE nodes, specify an array of UE objects to the statistics function.


    collapse all

    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


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


    Establish a connection between the UE and gNB nodes.


    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.


    Add the gNB node to the wireless network simulator.


    Add the UE node to the wireless network simulator.


    Specify the simulation time, in seconds.

    simulationTime = 0.3;

    Run the simulation for the specified simulation time.


    Obtain the statistics for the gNB and UE nodes.

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

    Input Arguments

    collapse all

    UE node, specified as an nrUE object or an array of nrUE objects.

    Output Arguments

    collapse all

    Statistics of the UE node, returned as a structure for a single UE node or an array of structures for multiple UE nodes. For more information about this output, see NR Node Statistics.

    Version History

    Introduced in R2023a