statistics
Download Required: To use statistics
,
first download the Communications Toolbox Wireless Network Simulation Library add-on.
Description
Examples
Create, Configure, and Simulate 5G Network
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
Output Arguments
stats
— Statistics of gNB node
structure | array of structures
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.
Field | Values | Description |
---|---|---|
ID | positive integer | ID of the gNB node. |
Name | string scalar, character vector | Name of the gNB node. |
App | structure | Application layer statistics, returned as a structure containing these fields.
If you call the statistics function using the
|
RLC | structure | RLC layer statistics, returned as a structure containing these fields.
If you call the statistics function using the
|
MAC | structure | MAC layer statistics, returned as a structure containing these fields.
If you call the statistics function using the
|
PHY | structure | PHY layer statistics, returned as a structure containing these fields.
If you call the statistics function using the
|
Version History
Introduced in R2023a
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)