configureScheduler
Description
configureScheduler(
configures a scheduler at a 5G new radio (NR) base station (gNB) node. The function sets the
scheduling parameters using one or more optional name-value arguments. For example,
gnb,Name=Value)ResourceAllocationType=0 sets the resource allocation type to
0. You can configure a scheduler at multiple gNB nodes in a single
configureScheduler function call. In this case, all the nodes use the
same scheduling parameter values specified in the name-value arguments. This feature also
requires the Wireless Network
Toolbox™ product.
Note
System-level simulation dynamically selects the uplink and downlink rank based on the measured channel quality.
Examples
Initialize the wireless network simulator.
networkSimulator = wirelessNetworkSimulator.init;
Create a default gNB node.
gnb = nrGNB;
Create two UE nodes, specifying their positions.
ue = nrUE(Position=[100 100 0; 5000 100 0]); % In Cartesian x, y, and z coordinates.Configure a scheduler at the gNB with the maximum number of users per transmission time interval (TTI) as 3.
configureScheduler(gnb,MaxNumUsersPerTTI=3)
Connect the UE nodes to the gNB node.
connectUE(gnb,ue)
Create voice over Internet protocol (VoIP) application traffic pattern objects to generate VoIP application traffic patterns between the gNB and UE nodes.
traffic1 = networkTrafficVoIP(ExponentialMean=5); traffic2 = networkTrafficVoIP(ExponentialMean=125);
Add a data traffic source from the gNB node to the UE nodes.
addTrafficSource(gnb,traffic1,DestinationNode=ue(1)) addTrafficSource(gnb,traffic2,DestinationNode=ue(2))
Add the nodes to the network simulator.
addNodes(networkSimulator,gnb) addNodes(networkSimulator,ue)
Set the simulation time, in seconds.
simulationTime = 0.3;
Run the simulation for the specified simulation time.
run(networkSimulator,simulationTime)
Obtain statistics for the gNB and UE nodes.
gnbStats = statistics(gnb); ue1Stats = statistics(ue(1)); ue2Stats = statistics(ue(2));
Input Arguments
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: configureScheduler(gnb,ResourceAllocationType=0) sets the
resource allocation type to 0
Scheduler strategy, specified as one of these options.
"RoundRobin"— Enable the round-robin (RR) scheduler. This scheduler provides equal scheduling opportunities to all the UE nodes."BestCQI"— Enable the best channel quality indicator (CQI) scheduler. This scheduler gives priority to the UE node with the best CQI."ProportionalFair"— Enable the proportional-fair (PF) scheduler. This scheduler is a compromise between the round-robin and best CQI schedulers.An object of a subclass of
nrScheduler. (since R2024b)
The scheduling strategies RR, best CQI, and PF attempt to schedule
MaxNumUsersPerTTI UE nodes in each slot. For a custom
scheduler, the scheduling logic determines the number of UE nodes to be scheduled, but
it cannot exceed MaxNumUsersPerTTI.
Note
Important considerations for the Scheduler name-value include:
When you specify the
Schedulername-value argument as an object of a subclass ofnrScheduler, the applicable name-value arguments areRVSequence,ResourceAllocationType,CSIMeasurementSignalDL,MaxNumUsersPerTTI, andMUMIMOConfigDL.Built-in schedulers, such as
"RoundRobin","BestCQI", and"ProportionalFair", do not use subband-level modulation and coding scheme (MCS) and channel quality indicator (CQI) measurements for scheduling. Even if you configure them, built-in schedulers use only wideband MCS and CQI measurements for scheduling. However, custom schedulers can use subband-level MCS and CQI measurements if you configure these measurements.
Redundancy version sequence, specified as a vector of any length with integer
elements in the range [0, 3]. To disable retransmissions, set
RVSequence to a scalar value.
Note
Since R2026a, you can set RVSequence to a vector of any
length with integer elements in the range [0, 3]. In R2025b and earlier releases,
you must set RVSequence as a vector containing up to four
unique integers from 0 to 3.
Data Types: double
Time constant of an exponential moving average, specified as a positive integer, in number of slots. The proportional-fair scheduler uses this time constant to calculate the average data rate.
Dependencies
To enable this name-value argument, specify the Scheduler
argument as "ProportionalFair".
Data Types: double
Resource allocation type, specified as 1 (resource allocation
type 1) or 0 (resource allocation type 0).
Data Types: double
Maximum number of users per transmission time interval (TTI), specified as a positive integer.
Data Types: double
Modulation and coding scheme (MCS) index for downlink (DL), specified as an
integer in the range [0, 27]. The MCS index corresponds to a row in TS 38.214, table
5.1.3.1-2 [1]. The gNB node stores
the MCS table as the static property MCSTable. The default value of [] indicates
for the gNB to select the MCS based on the CSI-RS measurement report.
Dependencies
This name-value argument is not applicable when you specify the Scheduler
name-value argument as an object of a subclass of nrScheduler.
Data Types: double
Modulation and coding scheme (MCS) index for uplink ( UL), specified as an integer
in the range [0, 27]. The MCS index corresponds to a row in TS 38.214, table
5.1.3.1-2. The gNB node stores the MCS table as static property MCSTable. The default value of [] indicates
for the gNB to select the MCS based on the sounding reference signal (SRS)
measurements.
Dependencies
This name-value argument is not applicable when you specify the Scheduler
name-value argument as an object of a subclass of nrScheduler.
Data Types: double
Since R2024b
DL channel state information (CSI) measurement signal, specified as
"SRS" or "CSI-RS". Note that you can set an
unequal number of transmit and receive antennas at a UE node for both measurement
signal types: SRS and CSI-RS. For more information about the SRS-based DL channel
measurements, see SRS-Based Downlink Channel Measurements for TDD System.
Note
Important considerations for the Scheduler name-value
argument include:
While integrating a custom scheduler or using a built-in scheduler, setting
CSIMeasurementSignalDLto"SRS"populates theSRSfield of theCSIMeasurementDLstructure of theUEContextproperty of thenrSchedulerbase class. By default, the built-in schedulers use the CSI-RS-based measurements for the DL scheduling. However, the responsibility for using these SRS-based measurements for custom scheduling falls to the developer of the custom scheduler.Enabling the
SRSMeasurementConfigDLproperty of thenrGNBobject sets the default value ofCSIMeasurementSignalDLto"SRS". (since R2026a)
Configuration of DL multi-user multiple-input and multiple-output (MU-MIMO), specified as a structure. The structure must contain these fields.
MaxNumUsersPaired— The maximum number of users that the scheduler can pair for a MU-MIMO transmission, specified as integer in the range[2, 4]. The default value is2. This field applies to both the CSI-RS and SRS-based DL MU-MIMO.MinNumRBs— The minimum number of resource blocks (RBs) the scheduler must allocate to a UE to consider it as an MU-MIMO candidate, specified as a positive integer. The default value is6. The scheduler calculates the number of RBs based on the buffer occupancy and the CSI reported by the UE node. This field applies to both the CSI-RS and SRS-based DL MU-MIMO.MaxNumLayers— The maximum number of layers that a DL MU-MIMO transmission supports, specified as an integer in the range[2, 16]. The default value is8. This field applies to both the CSI-RS and SRS-based DL MU-MIMO. (since R2025a)MinCQI— The minimum channel quality indicator (CQI) required for considering a UE as an MU-MIMO candidate, specified as an integer in the range[1, 15]. The default value is7. For more information about the CQI table, see TS 38.214 Table 5.2.2.1-2 [1]. This field applies to CSI-RS-based DL MU-MIMO.SemiOrthogonalityFactor— Inter-user interference (IUI) orthogonality factor, specified as a numeric scalar in the range[0, 1]. The scheduler uses this value to decide whether to pair up the UE nodes for MU-MIMO.SemiOrthogonalityFactorvalues of0and1indicate nonorthogonality and orthogonality between the UE nodes, respectively. The default value ofSemiOrthogonalityFactoris0.75. This field applies to CSI-RS-based DL MU-MIMOMinSINR— The minimum signal-to-interference-plus-noise ratio (SINR) in dB for a UE node in the DL direction to qualify as a MU-MIMO candidate, specified as a scalar in the range[-7, 25]. The default value is10. The data type is double. This field applies to SRS-based DL MU-MIMO. (since R2025a)EffectiveMCSAndPrecoder— Effective MCS and precoder calculation option, specified as logical1(true) or0(false). Set this field totrueto enable the option, or tofalseto disable it. The default value isfalse. This field applies to the CSI-RS-based DL MU-MIMO. (since R2026a)When you disable
EffectiveMCSAndPrecoder, the node uses the reported CQI and precoders directly for MU-MIMO transmissions. When you enable it, a heuristic algorithm adjusts the reported CQI and precoders based on the actual user pairing to better suit MU-MIMO. Note that this feature does not support"type1SinglePanel"asCodebookTypeinCSIReportConfig.
Note
Since release 2026a, you configure the codebook type for measurements through
the CodeBookType property of the CSIReportConfig name-value argument in the connectUE
function. This approach allows you to access CSI reports with the configured
codebook type, but you remain responsible for MU-MIMO scheduling when you use a
custom scheduler. In contrast, when you use built-in schedulers, MUMIMOConfigDL both enables CSI reporting with the specified
CodeBookType and implements the MU-MIMO algorithm. Built-in
schedulers do not support MU-MIMO with subband measurements. In releases R2025b and
earlier, when you integrate a custom scheduler, providing MUMIMOConfigDL (either empty or as a structure with defined fields)
only activates type-II CSI reporting. However, the responsibility for MU-MIMO
scheduling still falls to the developer of the custom scheduler.
Link adaptation (LA) configuration structure for DL transmissions, specified as a
structure. To enable LA for DL transmissions, create an LA configuration structure and
specify it to this argument. If not set, LA remains disabled. The
LinkAdaptationConfigDL value of [] enables LA
with default configuration parameters. If you configure LA, do not specify the
FixedMCSIndexDL argument. An LA structure must contain these fields.
InitialOffset— Initial MCS offset applied to all UEs, specified as an integer in the range[-27, 27]. This offset considers the errors in channel measurements at the UE node. Upon receiving the CSI report, the gNB node resets the MCS offset to theInitialOffsetvalue. The scheduler then determines the MCS for the physical downlink shared channel (PDSCH) transmission by subtracting the MCS offset from the MCS obtained from the channel measurements. The default value is0.StepUp— Incremental value for the MCS offset when a packet reception fails, specified as a numeric scalar in the range[0, 27]. LA considers only the failure of new transmissions while ignoring any retransmission feedback. The default value is0.27.StepDown— Decremental value for the MCS offset when a packet reception is successful, specified as numeric scalar in the range[0, 27]. LA considers only the success of new transmissions while ignoring any retransmission feedback. The default value is0.03.ResetOffsetOnCSIReport— LA MCS offset resetting upon CSI measurement report reception, specified as a logical1(true) or0(false). To enable the LA MCS offset resetting, set the value of this field totrue. The default value istrue. (since R2026a)
Dependencies
This name-value argument is not applicable when you specify the Scheduler
name-value argument as an object of a subclass of nrScheduler.
LA configuration structure for UL transmissions, specified as a structure. To
enable LA for UL transmissions, create an LA configuration structure and specify it to
this argument. The LinkAdaptationConfigUL value of
[] enables LA with default configuration parameters. If you
configure LA, do not specify the FixedMCSIndexUL argument. The
LinkAdaptationConfigUL structure must contain these fields.
InitialOffset— Initial MCS offset applied to all UEs, specified as an integer in the range[-27, 27]. This offset considers the errors in channel measurements at the UE node. Upon receiving the CSI report, the gNB node resets the MCS offset to theInitialOffsetvalue. The scheduler then determines the MCS for the physical downlink shared channel (PDSCH) transmission by subtracting the MCS offset from the MCS obtained from the channel measurements. The default value is0.StepUp— Incremental value for the MCS offset when a packet reception fails, specified as a numeric scalar in the range[0, 27]. LA considers only the failure of new transmissions while ignoring any retransmission feedback. The default value is0.27.StepDown— Decremental value for the MCS offset when a packet reception is successful, specified as numeric scalar in the range[0, 27]. LA considers only the success of new transmissions while ignoring any retransmission feedback. The default value is0.03.ResetOffsetOnCSIReport— LA MCS offset resetting upon CSI measurement report reception, specified as a logical1(true) or0(false). To enable the LA MCS offset resetting, set the value of this field totrue. The default value istrue. (since R2026a)
Dependencies
This name-value argument is not applicable when you specify the Scheduler
name-value argument as an object of a subclass of nrScheduler.
More About
The function implements the link adaptation algorithm outlined in Proceedings of
European Wireless 2015 [2], with a notable
modification. Whereas the original approach applies an offset to the signal-to-noise ratio
(SNR), the method used by the function applies the offset directly to the MCS index. The
link adaptation algorithm for the configureScheduler function consists
of these steps.
Define the LA configuration parameters
StepUpandStepDown. The algorithm defines the target Block error rate asStepDown/(StepDown+StepUp).Upon receiving channel measurements feedback (CQI) from the UE node, the gNB node maps the reported CQI to an appropriate MCS value. The MCS table used for the DL LA complies with TS 38.214, Table 5.1.3.1-2 [3].
Reset the MCS offset to the initial offset on each CSI reporting periodicity, considering any channel measurement errors.
Determine the MCS for physical downlink shared channel (PDSCH) transmission as the downlink MCS mapped by the gNB node minus the MCS offset.
If the UE node reports a successful PDSCH reception, decrease the MCS offset by
StepDown.If the UE node reports a failed PDSCH reception, increase the MCS offset by
StepUp.
Similarly, for UL link adaptation, the gNB node calculates the UL MCS based on the sounding reference signal (SRS) channel measurements. The function determines the MCS for the physical uplink shared channel (PUSCH) transmission as the MCS calculated by the gNB node minus the MCS offset.
References
[1] 3GPP TS 38.321. “NR; Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
[2] Sarret, Marta Gatnau, Davide Catania, Frank Frederiksen, Andrea F. Cattoni, Gilberto Berardinelli, and Preben Mogensen. “Dynamic Outer Loop Link Adaptation for the 5G Centimeter-Wave Concept.” In Proceedings of European Wireless 2015; 21st European Wireless Conference, 1–6, 2015. https://ieeexplore.ieee.org/document/7147668
[3] 3GPP TS 38.214. “NR; Physical layer procedures for data.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
Version History
Introduced in R2023aStarting in R2026a, this feature is available in 5G Toolbox™ and also requires a Wireless Network Toolbox license. In prior releases, the feature is available through the Communications Toolbox™ Wireless Network Simulation Library add-on.
The configureScheduler object function now enables effective MCS and precoder calculation for
CSI-RS-based DL MU-MIMO through the EffectiveMCSAndPrecoder field in
MUMIMOConfigDL.
The configureScheduler object function now includes a new field,
ResetOffsetOnCSIReport, in LinkAdaptationConfigDL and LinkAdaptationConfigUL. You can use this field to enable LA MCS offset
resetting upon reception of a CSI measurement report.
The configureScheduler object function now supports these new fields in the downlink MU-MIMO configuration.
MaxNumLayers— The maximum number of layers that a DL MU-MIMO transmission supports. This field applies to both the CSI-RS and SRS-based DL MU-MIMO.MinSINR— The minimum SINR in dB for a UE node in the DL direction to qualify as a MU-MIMO candidate. This field applies to SRS-based DL MU-MIMO.
The configureScheduler object function now supports these functionalities.
You can now plug a custom scheduler into the system-level simulation by using the
Schedulername-value argument.You can now choose the DL CSI measurement signal by using the
CSIMeasurementSignalDLname-value argument of the configureScheduler object function.
The configureScheduler object function now supports link adaptation for both the downlink and uplink directions.
The configureScheduler object function now supports these functionalities.
Select a scheduling strategy through the
Schedulername-value argument.Set time constant of an exponential moving average through the
PFSWindowSizename-value argument.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)