nrScheduler Class
Description
Use the nrScheduler
base class to customize and implement physical uplink
shared channel (PUSCH) and physical downlink shared channel (PDSCH) resource scheduling
strategies in a subclass.
This class handles uplink (UL) and downlink (DL) scheduling in both frequency division
duplex (FDD) and time division duplex (TDD) modes. It incorporates these built-in scheduling
strategies: the round-robin scheduler, the best Channel Quality Indicator (CQI) scheduler, and
the proportional-fair scheduler. You can select one of these strategies by using the Scheduler
name-value
argument of the configureScheduler
function.
When the scheduler executes UL and DL scheduling, it prioritizes meeting the
retransmission needs of the user equipment (UE) nodes for each scheduled slot. After
addressing retransmissions, it schedules new transmissions with the remaining frequency
resources within the bandwidth. You have the option to customize this new transmission
scheduling. To write a custom scheduler, override the protected methods of the
nrScheduler
base class. You can use the information provided by the class
properties to write your scheduling logic.
For more information on how to use the nrScheduler
base class, see the
More About section.
The nrScheduler
class is a handle
class.
Properties
CellConfig
— Cell configuration
cell configuration object
Cell configuration, specified as a cell configuration object. The specified object has these properties:
DuplexMode
— Duplex mode of the cell. The value of this property is the same as the value of theDuplexMode
property specified duringnrGNB
object creation.SubcarrierSpacing
— Subcarrier spacing (SCS) used across the cell. The value of this property is the same as the value of theSubcarrierSpacing
property specified duringnrGNB
object creation.NumResourceBlocks
— Number of resource blocks in the channel bandwidth. The value of this property is the same as the value of theNumResourceBlocks
property specified duringnrGNB
object creation.DLULConfigTDD
— Downlink (DL) and uplink (UL) time division configuration for TDD model. The value of this property is the same as the value of theDLULConfigTDD
property specified duringnrGNB
object creation.
Attributes:
GetAccess | public |
SetAccess | protected |
UEContext
— UE context information
array of UE context objects
UE context information, specified as an array of UE context objects. The size of the array equals the number of the connected UE nodes. The object at index i in the array contains information about the UE node with the RNTI i. This table shows the UE context object properties.
Properties of UE Context Object
Property | Value | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RNTI | positive integer | RNTI of the UE node. | ||||||||||||||||||||||||
Name | string scalar or character vector | Name of the UE node. The value of this property is the same as the value
of the Name property specified during
nrUE object creation. | ||||||||||||||||||||||||
ID | positive integer | ID of the UE node. | ||||||||||||||||||||||||
NumTransmitAntennas | positive integer | Number of transmit antennas at the UE node. The value of this property is
the same as the value of the NumTransmitAntennas property specified during
nrUE object creation. | ||||||||||||||||||||||||
NumReceiveAntennas | positive integer | Number of receive antennas at the UE node. The value of this property is
the same as the value of the NumReceiveAntennas
property specified during nrUE object creation. | ||||||||||||||||||||||||
RadioBearerConfigDL | cell array | Radio Link Control (RLC) bearer configuration for DL logical
channels, specified as a 1-by-32 cell array. The maximum allowed number of
logical channels is 32. This property contains the bearer configuration
information for the DL logical channels with IDs 1 to 32. Each element of
this property can be The | ||||||||||||||||||||||||
RadioBearerConfigUL | cell array | RLC bearer configuration for UL logical channels, specified as a
1-by-32 cell array. The maximum allowed number of logical channels is 32.
This property contains the bearer configuration information for the UL
logical channels with IDs 1 to 32. The value of this property can be
The
| ||||||||||||||||||||||||
BufferStatusDL | integer |
The scheduler adjusts this value after generating a DL assignment for the UE node, subtracting the amount corresponding to the transport block size (TBS) of the grant. | ||||||||||||||||||||||||
BufferStatusDLPerLCH | integer vector | Current pending buffer amount in the DL logical channels of a UE node, specified as a 1-by-32 integer vector. The maximum allowed number of logical channels is 32. This property contains the buffer information for the DL logical channels 1 to 32. Each element of this property can be one of these options.
The | ||||||||||||||||||||||||
BufferStatusUL | integer | Total pending UL buffer amount for the UE node. The
nrScheduler class overwrites this value when the UE node
reports the pending buffer amount using a MAC buffer status report (BSR). The
scheduler adjusts this value after generating a UL grant for the UE node,
subtracting the amount corresponding to the TBS of the grant. | ||||||||||||||||||||||||
BufferStatusULPerLCG | integer vector | Current pending buffer amount in the UL direction for the logical channel groups (LCGs) of a UE node, specified as a 1-by-8 integer vector. The maximum allowed number of logical channel groups is 8. This property contains the buffer information for the logical groups 0 to 7. Each element of this property can be one of these options.
The You
can map a logical channel to a logical group using the | ||||||||||||||||||||||||
CSIRSConfiguration | nrCSIRSConfig
object | Channel state information reference signal (CSI-RS) configuration for the
UE node. For more information about the CSI-RS configuration, see nrCSIRSConfig . | ||||||||||||||||||||||||
SRSConfiguration | nrSRSConfig
object | Sounding reference signal (SRS) configuration for the UE node. For more
information about the SRS configuration, see nrSRSConfig . | ||||||||||||||||||||||||
CSIMeasurementDL | structure | Wideband DL channel measurement, as reported by the UE node based
on CSI-RS reception (as per
| ||||||||||||||||||||||||
CSIMeasurementUL | structure | Wideband UL CSI measurements based on SRS, specified as a structure with these fields.
| ||||||||||||||||||||||||
CustomContext | structure | Custom context information provided for a UE node, specified as a
structure. You can specify the value of this structure using the CustomContext name-value argument of the connectUE object function. You can use this UE-specific
information to customize your scheduler. If you do not specify the
CustomContext name-value argument of the
connectUE object function, the class specifies the
CustomContext property as {} . |
Attributes:
GetAccess | public |
SetAccess | protected |
Methods
Protected Methods
scheduleNewTransmissionsDL | Schedule New DL Transmissions |
scheduleNewTransmissionsUL | Schedule New UL Transmissions |
More About
How to Use nrScheduler
Base Class
To create a custom scheduler using the nrScheduler
base class, follow
these steps.
Implement the custom scheduler sub class:
Inherit from the
nrScheduler
base class. The class definition must have this format, wheremyCustomStrategy
is the name of your custom scheduler class.classdef myCustomStrategy < nrScheduler ... end
Override the base class protected methods
scheduleNewTransmissionsDL
andscheduleNewTransmissionsUL
. You can override either one or both of these methods.
Save the class definition in a
.m
file.In a simulation script, create an object of the
myCustomStrategy
class and plug the custom scheduler object into the gNB node using theconfigureScheduler
object function.myscheduler = myCustomStrategy; configureScheduler(gNB,Scheduler=myScheduler)
References
[1] 3GPP TS 38.214. “NR; Physical layer procedures for data.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
[2] 3GPP TS 38.321. “NR; Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
Version History
Introduced in R2024b
See Also
Functions
Objects
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)