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. For more information about this output, see NR Node Statistics.

    Version History

    Introduced in R2023a