Main Content

statistics

Statistics of gNB

Since R2023a

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

    Description

    stats = statistics(gnb) returns the statistics of the 5G New Radio (NR) base station (gNB) node, gnb, in a structure, stats. To obtain statistics for multiple gNB nodes, specify an array of nrGNB objects to the statistics function.

    example

    stats = statistics(gnb,"all") adds a field, Destinations, to the structure for each NR stack layer that contains per-destination statistics.

    Examples

    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

    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);

    Input Arguments

    collapse all

    gNB Node, specified as an nrGNB object or an array of nrGNB objects.

    Output Arguments

    collapse all

    Statistics of the gNB node, returned as a structure for a single gNB node or an array of structures for multiple gNB nodes. Each structure contains the statistics for a single gNB node using these fields.

    FieldValuesDescription
    IDpositive integerID of the gNB node.
    Namestring scalar, character vectorName of the gNB node.
    Appstructure

    Application layer statistics, returned as a structure containing these fields.

    • TransmittedPackets — Total number of packets transmitted to the radio link control (RLC) layer.

    • TransmittedBytes — Total number of bytes transmitted to the RLC layer.

    • ReceivedPackets — Total number of packets received from the RLC layer.

    • ReceivedBytes — Total number of bytes received from the RLC layer.

    If you call the statistics function using the "all" argument, the App structure also contains a field, Destinations. The Destinations field is an array of structures of size 1-by-N, where N is the number of connected user equipment (UE) nodes. Each structure element corresponds to a connected UE, and contains these fields.

    • UEID — ID of the UE node.

    • UEName — Name of the UE node.

    • RNTI — Radio network temporary identifier of the UE node.

    • TransmittedPackets— Total number of packets transmitted to the radio link control (RLC) layer.

    • TransmittedBytes— Total number of bytes transmitted to the RLC layer.

    RLCstructure

    RLC layer statistics, returned as a structure containing these fields.

    • TransmittedPackets — Total number of packets transmitted to the medium access control (MAC) layer.

    • TransmittedBytes — Total number of bytes transmitted to the MAC layer.

    • ReceivedPackets — Total number of packets received from the MAC layer.

    • ReceivedBytes — Total number of bytes received from the MAC layer.

    • DroppedPackets — Total number of received packets dropped because of reassembly failure.

    • DroppedBytes — Total number of received bytes dropped because of reassembly failure.

    If you call the statistics function using the "all" argument, the RLC structure also contains a field, Destinations. The Destinations field is an array of structures of size 1-by-N, where N is the number of connected user equipment (UE) nodes. Each structure element corresponds to a connected UE, and contains these fields.

    • UEID— ID of the UE node.

    • UEName— Name of the UE node.

    • RNTI— Radio network temporary identifier of the UE node.

    • TransmittedPackets— Total number of packets transmitted to the medium access control (MAC) layer.

    • TransmittedBytes— Total number of bytes transmitted to the MAC layer.

    • ReceivedPackets — Total number of packets received from the MAC layer.

    • ReceivedBytes— Total number of bytes received from the MAC layer.

    • DroppedPackets— Total number of received packets dropped because of reassembly failure.

    • DroppedBytes— Total number of received bytes dropped because of reassembly failure.

    MACstructure

    MAC layer statistics, returned as a structure containing these fields.

    • TransmittedPackets — Total number of packets transmitted to the physical (PHY) layer. This only corresponds to new transmissions assuming that the MAC layer does not send the packet again to the PHY layer for retransmissions. Packets get buffered at the PHY layer. The MAC layer only sends the requests for retransmission to the PHY layer.

    • TransmittedBytes — Total number of bytes transmitted to the PHY layer.

    • ReceivedPackets — Total number of packets received from the PHY layer.

    • ReceivedBytes — Total number of bytes received from the PHY layer.

    • Retransmissions — Total number of retransmissions requests sent to the PHY layer.

    • RetransmissionBytes — Total number of MAC bytes that correspond to the retransmissions.

    If you call the statistics function using the "all" argument, the MAC structure also contains a field, Destinations. The Destinations field is an array of structures of size 1-by-N, where N is the number of connected user equipment (UE) nodes. Each structure element corresponds to a connected UE, and contains these fields.

    • UEID— ID of the UE node.

    • UEName— Name of the UE node.

    • RNTI— Radio network temporary identifier of the UE node.

    • TransmittedPackets— Total number of packets transmitted to the physical (PHY) layer. This only corresponds to new transmissions assuming that the MAC layer does not send the packet again to the PHY layer for retransmissions. Packets get buffered at the PHY layer. The MAC layer only sends the requests for retransmission to the PHY layer.

    • TransmittedBytes— Total number of bytes transmitted to the PHY layer.

    • ReceivedPackets— Total number of packets received from the PHY layer.

    • ReceivedBytes— Total number of bytes received from the PHY layer.

    • Retransmissions— Total number of retransmissions requests sent to the PHY layer.

    • RetransmissionBytes— Total number of MAC bytes that correspond to the retransmissions.

    PHYstructure

    PHY layer statistics, returned as a structure containing these fields.

    • TransmittedPackets — Total number of packets transmitted.

    • ReceivedPackets — Total number of packets received.

    • DecodeFailures — Total number of decode failures.

    If you call the statistics function using the "all" argument, the PHY structure also contains a field, Destinations. The Destinations field is an array of structures of size 1-by-N, where N is the number of connected user equipment (UE) nodes. Each structure element corresponds to a connected UE node, and contains these fields.

    • UEID — ID of the UE node.

    • UEName — Name of the UE node.

    • RNTI — Radio network temporary identifier of the UE node.

    • TransmittedPackets — Total number of packets transmitted.

    • ReceivedPackets — Total number of packets received.

    • DecodeFailures — Total number of decode failures.

    Version History

    Introduced in R2023a