How to control link power in system level 5G simulations?

조회 수: 5 (최근 30일)
Zeyad
Zeyad 2024년 3월 24일
댓글: Zeyad 2024년 3월 26일
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.

답변 (1개)

Maneet Kaur Bagga
Maneet Kaur Bagga 2024년 3월 26일
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!
  댓글 수: 1
Zeyad
Zeyad 2024년 3월 26일
Thank you for responding, but this code won't allow me to configure the power per UE, right?
so basically for UEs connected to the same gNB will receive the same power, what I want is that each UE should receive a different power level, is that possible? also, I wonder if it is possible to change that power level during the simulation.
I need something as follows:-
Power allocation matrix
[10 dBm 5 dBm 1dBm 6 dBm;
1 dBm 2 dBm 4 dBm 4 dBm;
9 dBm 3 dBm 2 dBm 7 dBm]

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 System-Level Simulation에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by