main content

nr fdd scheduling performance evaluation -凯发k8网页登录

this example models scheduling of downlink (dl) and uplink (ul) resources and measures network performance in frequency division duplexing (fdd) mode. to evaluate the network performance with different data traffic patterns, the example also models the radio link control layer in unacknowledged mode (rlc-um) with the logical channel prioritization (lcp) procedure. the example uses link-to-system-mapping-based abstract physical layer (phy). the performance of the scheduling strategy is evaluated in terms of the achieved throughput and fairness in resource sharing.

introduction

to assign dl and ul resources, this example uses a round robin scheduler. the scheduler takes resource allocation decisions based on these inputs: pending retransmissions, buffer status, and channel quality for the ues.

this example models:

  • slot-based dl and ul scheduling.

  • multiple logical channels (lchs) to support different kind of applications.

  • logical channel prioritization (lcp) to distribute the received assignment among logical channels per ue for ul and dl.

the control packets required are assumed to be sent out of band without the need of resources for transmission. the control packets are ul assignment, dl assignment, buffer status report (bsr), and pdsch feedback.

scenario simulation

check if the communications toolbox wireless network simulation library support package is installed. if the support package is not installed, matlab® returns an error with a link to download and install the support package.

wirelessnetworksupportpackagecheck

create a wireless network simulator.

rng("default") % reset the random number generator
numframesimulation = 50; % simulation time in terms of number of 10 ms frames
networksimulator = wirelessnetworksimulator.init;

create a gnb node. specify the duplex mode, carrier frequency, channel bandwidth, subcarrier spacing, and receive gain of the node.

gnb = nrgnb(duplexmode="fdd",carrierfrequency=2.6e9,channelbandwidth=30e6,subcarrierspacing=15e3,receivegain=11);

set the scheduler parameter resourceallocationtype by using the configurescheduler function.

configurescheduler(gnb,resourceallocationtype=0);

create 4 ue nodes. specify the name, position and receive gain of each ue node.

uepositions = [100 0 0; 250 0 0; 700 0 0; 750 0 0];
uenames = "ue-"   (1:size(uepositions,1));
ues = nrue(name=uenames,position=uepositions,receivegain=11);

load the application configuration table containing these fields. each row in the table represents one application and has these properties as columns.

  • datarate - application traffic generation rate (in kilobits per second).

  • packetsize - size of the packet (in bytes).

  • hostdevice - defines the device (ue or gnb) on which the application is installed with the specified configuration. the device takes values 0 or 1. the values 0 and 1 indicate the configuration of application is at the gnb and the ue, respectively.

  • rnti - radio network temporary identifier of a ue. this identifies the ue for which the application is installed.

  • logicalchannelid - logical channel identifier.

load("nrfddappconfig.mat")
% validate the host device type for the applications configured
validateattributes(appconfig.hostdevice,{'numeric'},{"nonempty","integer",">=",0,"<=",1},"appconfig.hostdevice", ...
    "hostdevice");

load the rlc bearer configuration table. each row in the table represents one rlc bearer and has these properties as columns.

  • rnti - radio network temporary identifier of the ue.

  • logicalchannelid - logical channel identifier.

  • logicalchannelgroup - logical channel group identifier.

  • snfieldlength - defines the sequence number field length. it takes either 6 or 12.

  • buffersize - maximum tx buffer size in terms of number of higher layer service data units (sdus).

  • reassemblytimer - defines the reassembly timer (in ms).

  • rlcentitytype - defines the rlc entity type. it takes values "umdl", "umul", and "um", which indicates whether the rlc um entity is unidirectional dl, unidirectional ul, or bidirectional um, respectively.

  • priority - priority of the logical channel.

  • prioritizedbitrate - prioritized bit rate (in kilo bytes per second).

  • bucketsizeduration - bucket size duration (in ms).

load("nrfddrlcchannelconfig.mat")

create a set of rlc bearer configuration objects.

rlcbearerconfig = cell(1, length(ues));
for rlcbearerinfoidx = 1:size(rlcchannelconfig, 1)
    rlcbearerconfigstruct = table2struct(rlcchannelconfig(rlcbearerinfoidx, 2:end));
    ueidx = rlcchannelconfig.rnti(rlcbearerinfoidx);
    % create an rlc bearer configuration object with the specified logical
    % channel id
    rlcbearerobj = nrrlcbearerconfig(logicalchannelid=rlcbearerconfigstruct.logicalchannelid);
    % set the other properties of the configuration object with specified values
    rlcbearerobj.logicalchannelgroup = rlcbearerconfigstruct.logicalchannelgroup;
    rlcbearerobj.snfieldlength = rlcbearerconfigstruct.snfieldlength;
    rlcbearerobj.buffersize = rlcbearerconfigstruct.buffersize;
    rlcbearerobj.reassemblytimer=rlcbearerconfigstruct.reassemblytimer;
    rlcbearerobj.priority=rlcbearerconfigstruct.priority;
    rlcbearerobj.prioritizedbitrate=rlcbearerconfigstruct.prioritizedbitrate;
    rlcbearerobj.bucketsizeduration=rlcbearerconfigstruct.bucketsizeduration;
    rlcbearerobj.rlcentitytype=rlcbearerconfigstruct.rlcentitytype;
    rlcbearerconfig{ueidx} = [rlcbearerconfig{ueidx} rlcbearerobj];
end

connect the ue nodes to gnb node. specify the rlc bearer configuration that will be used to establish rlc bearer between gnb node and each ue node.

for ueidx = 1:length(ues)
    connectue(gnb,ues(ueidx),bsrperiodicity=5,rlcbearerconfig=rlcbearerconfig{ueidx})
end

set the periodic dl and ul application traffic pattern for ues.

for appidx = 1:size(appconfig,1)
    
    % create an object for on-off network traffic pattern
    app = networktrafficonoff(packetsize=appconfig.packetsize(appidx),generatepacket=true, ...
            ontime=numframesimulation/100,offtime=0,datarate=appconfig.datarate(appidx));
    if appconfig.hostdevice(appidx) == 0
        % add traffic pattern that generates traffic on downlink
        addtrafficsource(gnb,app,destinationnode=ues(appconfig.rnti(appidx)),logicalchannelid=appconfig.logicalchannelid(appidx))
    else
        % add traffic pattern that generates traffic on uplink
        addtrafficsource(ues(appconfig.rnti(appidx)),app,logicalchannelid=appconfig.logicalchannelid(appidx))
    end
end

add gnb node and ue nodes to the network simulator.

addnodes(networksimulator,gnb)
addnodes(networksimulator,ues)

set the enabletraces to true to log the traces. if the enabletraces is set to false, then traces are not logged in the simulation. to speed up the simulation, set the enabletraces to false.

enabletraces = true;

the cqivisualization and rbvisualization parameters control the display of the cqi visualization and the rb assignment visualization respectively. by default, these plots are enabled. you can disable them by setting the respective flags to false.

cqivisualization = true;
rbvisualization = true;

set up rlc logger, scheduling logger, and phy logger.

if enabletraces
    % create an object for rlc traces logging
    simrlclogger = helpernrrlclogger(numframesimulation,gnb,ues);
    % create an object for scheduler traces logging
    simschedulinglogger = helpernrschedulinglogger(numframesimulation,gnb,ues);
    % create an object for cqi and rb grid visualization
    gridvisualizer = helpernrgridvisualizer(numframesimulation,gnb,ues,cqigridvisualization=cqivisualization, ...
        resourcegridvisualization=rbvisualization,schedulinglogger=simschedulinglogger);
end

the example updates the metrics plots periodically. set the number of updates during the simulation.

nummetricssteps = 20;

set up metric visualizer.

metricsvisualizer = helpernrmetricsvisualizer(gnb,ues,nummetricssteps=nummetricssteps, ...
    plotschedulermetrics=true,plotrlcmetrics=true);

write the logs to mat-files. the example uses these logs for post-simulation analysis and visualization.

simulationlogfile = "simulationlogs"; % for logging the simulation traces

run the simulation for the specified numframesimulation frames.

% calculate the simulation duration (in seconds)
simulationtime = numframesimulation*1e-2;
% run the simulation
run(networksimulator,simulationtime)
custom channel model is not added. using free space path loss (fspl) model as the default channel model.

figure channel quality visualization contains objects of type heatmap, uigridlayout. the chart of type heatmap has title channel quality visualization for cell id - 1.

figure resource grid allocation contains an axes object and another object of type uigridlayout. the axes object with title resource grid allocation for cell id - 1, xlabel slots in 10 ms frame, ylabel resource blocks contains 233 objects of type text, line.

read per-node stats.

gnbstats = statistics(gnb);
uestats = statistics(ues);

at the end of the simulation, the achieved value for system performance indicators is compared to their theoretical peak values (considering zero overheads). performance indicators displayed are achieved data rate (ul and dl), achieved spectral efficiency (ul and dl), and block error rate (bler) observed for ues (ul and dl). the peak values are calculated as per 3gpp tr 37.910.

displayperformanceindicators(metricsvisualizer)
peak ul throughput: 199.08 mbps. achieved cell ul throughput: 121.95 mbps
achieved ul throughput for each ue: [46.25        17.48         39.8        18.42]
peak ul spectral efficiency: 6.64 bits/s/hz. achieved ul spectral efficiency for cell: 4.07 bits/s/hz 
peak dl throughput: 199.08 mbps. achieved cell dl throughput: 131.47 mbps
achieved dl throughput for each ue: [45.96         16.4        48.64        20.47]
peak dl spectral efficiency: 6.64 bits/s/hz. achieved dl spectral efficiency for cell: 4.38 bits/s/hz

simulation visualization

the run-time visualization shown are:

  • display of ul scheduling metrics plots: for details, see 'uplink scheduler performance metrics' figure description in example.

  • display of dl scheduling metrics plots: for details, see 'downlink scheduler performance metrics' figure description in example.

  • display of rlc metrics plot: the 'rlc metrics visualization' figure represents the number of bytes transmitted by rlc layer for each ue.

simulation logs

the simulation logs are saved in mat-files for post-simulation analysis. the per time step logs, scheduling assignment logs, and rlc logs are saved in the mat-file simulationlogfile. after the simulation, open the file to load dltimesteplogs, ultimesteplogs, schedulingassignmentlogs, rlclogs in the workspace.

time step logs: for more information on the time step log format, see .

scheduling assignment logs: for more information on the scheduling log format, see .

rlc logs: each row in the rlc logs represents a slot and contains this information:

  • timestamp: timestamp (in milliseconds)

  • frame: frame number.

  • slot: slot number in the frame.

  • ue rlc statistics: n-by-p cell, where n is the number of ues, and p is the number of statistics collected. each row represents statistics of a ue. the last row contains the cumulative rlc statistics of the entire simulation.

  • gnb rlc statistics: n-by-p cell, where n is the number of ues, and p is the number of statistics collected. each row represents statistics of all logical channel of a ue at gnb. the last row contains the cumulative rlc statistics of the entire simulation.

each row of the ue and gnb rlc statistics table represents a logical channel of a ue and contains:

  • ueid: node id of a ue.

  • rnti: radio network temporary identifier of a ue.

  • transmittedpackets: number of packets sent by rlc to mac layer.

  • transmittedbytes: number of bytes sent by rlc to mac layer.

  • receivedpackets: number of packets received by rlc from mac layer.

  • receivedbytes: number of bytes received by rlc from mac layer.

  • droppedpackets: number of received packets from mac which are dropped by rlc layer.

  • droppedbytes: number of received bytes from mac which are dropped by rlc layer.

save the simulation logs in a mat file.

if enabletraces
    simulationlogs = cell(1,1);
    if gnb.duplexmode == "fdd"
        loginfo = struct("dltimesteplogs",[],"ultimesteplogs",[],"schedulingassignmentlogs",[],"rlclogs",[]);
        [loginfo.dltimesteplogs,loginfo.ultimesteplogs] = getschedulinglogs(simschedulinglogger);
    else % tdd
        loginfo = struct("timesteplogs",[],"schedulingassignmentlogs",[],"rlclogs",[]);
        loginfo.timesteplogs = getschedulinglogs(simschedulinglogger);
    end
    % get the scheduling assignments log
    loginfo.schedulingassignmentlogs = getgrantlogs(simschedulinglogger);
    % get the rlc logs
    loginfo.rlclogs = getrlclogs(simrlclogger);
    % save simulation logs in a mat-file
    simulationlogs{1} = loginfo;
    save(simulationlogfile,"simulationlogs")
end

further exploration

you can use this example to further explore tdd modeling.

tdd modeling

you can use this example to further explore tdd modeling by setting the duplexmode property of the gnb object to "tdd". you can also customize the dl-ul slot pattern configuration for tdd by using the dlulconfigtdd property of the nrgnb object.

appendix

the example uses these helper classes:

  • : implements metrics visualization functionality

  • : implements scheduling information logging functionality

  • : implements phy packet reception information logging functionality

  • : implements rlc packet transmission and reception information logging functionality

  • : implements channel quality and resource grid visualization functionality

references

[1] 3gpp ts 38.104. “nr; base station (bs) radio transmission and reception.” 3rd generation partnership project; technical specification group radio access network.

[2] 3gpp ts 38.214. “nr; physical layer procedures for data.” 3rd generation partnership project; technical specification group radio access network.

[3] 3gpp ts 38.321. “nr; medium access control (mac) protocol specification.” 3rd generation partnership project; technical specification group radio access network.

[4] 3gpp ts 38.322. “nr; radio link control (rlc) protocol specification.” 3rd generation partnership project; technical specification group radio access network.

[5] 3gpp ts 38.331. “nr; radio resource control (rrc) protocol specification.” 3rd generation partnership project; technical specification group radio access network.

see also

objects

  • | |

related topics

网站地图