How to control link power in system level 5G simulations?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am working on a 5G system-level simulation in MATLAB, which includes M gNBs and N UEs. I would like control the transmitted power to each UE separatly. Ideally, I would like to have a matrix of shape M x N where the cell (i, j) indicates the transmitted power from gNB-i to UE-j.
Since I am relatively new to MATLAB, I am basing my work on a specific example, so starting from there how can I achieve my needs stated above.
any guidance would be appreciated, thanks in advance.
0 comentarios
Respuestas (1)
Maneet Kaur Bagga
el 26 de Mzo. de 2024
Hi,
As per my understanding you want to create a matrix with dimensions "M x N" where each cell should indicate the transmitted power from the ith gNB to the jth UE to control the transmitted power to each UE from each gNB. The following code assumes that the "5G Toolbox" and the "Wireless Network Simulation Library" are already installed in the system.
Initialize the network simulator and set up the basic parameters for simulation.
rng('default'); % For reproducibility
numFrameSimulation = 20; % Simulation time in frames (10 ms each)
networkSimulator = wirelessNetworkSimulator.init;
Define positions for gNBs and ensure the number of positions match the number of gNBs (M). For each gNB, create a corresponding set of UEs and connect these UEs to the gNBs. Add the gNBs and UEs to the network simulator for simulation.
% User-defined parameters
M = 3; % Number of gNBs
N = 4; % Number of UEs per cell
% Define gNB positions (example positions, adjust as needed)
gNBPositions = [1000, 1000, 30; 2000, 1000, 30; 1500, 2000, 30]; % Adjust according to M
gNBPositions = gNBPositions(1:M, :); % Ensure positions match the number of gNBs
gNBNames = "gNB-" + (1:M);
gNBs = nrGNB(Name=gNBNames, Position=gNBPositions, CarrierFrequency=2.5e9, ...
ChannelBandwidth=10e6, SubcarrierSpacing=30e3, TransmitPower=32, ReceiveGain=11);
% Generate UE positions and create UEs
cellRadius = 500; % Radius of each cell (in meters)
uePositions = generateUEPositions(cellRadius, gNBPositions, N); % Adjusted for N UEs per cell
UEs = cell(M, 1); % Adjusted for M cells
for cellIdx = 1:M
ueNames = "UE-" + (1:N) + "-Cell" + cellIdx; % Adjusted for N UEs per cell
UEs{cellIdx} = nrUE(Name=ueNames, Position=uePositions{cellIdx}, ReceiveGain=11);
connectUE(gNBs(cellIdx), UEs{cellIdx}, FullBufferTraffic="DL");
end
% Add nodes to the network simulator
addNodes(networkSimulator, gNBs);
for cellIdx = 1:M
addNodes(networkSimulator, UEs{cellIdx});
end
Configure the channel model, assuming a 3GPP TR 38.901 model
% Use 3GPP TR 38.901 channel model
channelModel = "3GPP TR 38.901";
configureChannelModel(networkSimulator, channelModel, gNBs, UEs);
Execute the simulation by calculating the total simulation time in seconds based on the number of frames.
% Set simulation parameters
enableTraces = true;
simulationTime = numFrameSimulation * 0.01; % Convert frames to seconds
% Run the simulation
run(networkSimulator, simulationTime);
Hope this helps!
Ver también
Categorías
Más información sobre System-Level Simulation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!