Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

frame scheduling and TTI

242 views
Skip to first unread message

Orfeas Agis Karachalios

unread,
Nov 8, 2022, 7:13:06 AM11/8/22
to 5G-LENA-users
Hi,

I am modifying the MAC scheduling to fit my use case. In particular, FT-plane resources (RBGs) need to be allocated to specific flows according to some requirements. This needs to happen on a TTI level, which is the 5G-frame.

Is it possible to run the scheduling algorithm twice on a frame? 
The first pass would assign FT resources according to some constraints, possibly leaving unallocated resources. The second pass would allocate these resources according to some other rule (not mentioned here for brevity).

The Mac Scheduler makes decisions on a slot basis. Is there a point of entry in the code for scheduling on a frame level?

Orfeas Agis Karachalios

unread,
Nov 15, 2022, 6:37:54 AM11/15/22
to 5G-LENA-users
After looking at the code, I can see the scheduling occurs on a slot by slot basis, creating packets to be transmitted, and the frame is implicitly constructed in this fashion. Does the slot scheduling include information from after the beginning of the frame, such as the channel status ?

Orfeas Agis Karachalios

unread,
Nov 15, 2022, 11:49:09 AM11/15/22
to 5G-LENA-users
Specifically, does the `HARQ` feedback arrive at the beginning of the next frame, or is it possible that it arrives at the start of a slot in the same frame?

Orfeas Agis Karachalios

unread,
Nov 16, 2022, 4:54:19 AM11/16/22
to 5G-LENA-users
Digging deeper into the code, I found that slots are scheduled at the same simulation time as transmissions, making the effective TTI the slot duration. Is this correct ? It would be more realistic if the scheduling happens at the beginning of each frame and transmissions are scheduled afterwards.

Sandra Lagén

unread,
Nov 16, 2022, 5:41:02 AM11/16/22
to Orfeas Agis Karachalios, 5G-LENA-users
Hi Orfeas,
I think we need clarification, this sentence from you confuses me a lot " This needs to happen on a TTI level, which is the 5G-frame.".
In the simulator, the frame is 10ms length, and it is composed of 10 subframes, of 1 ms each. Then, in each subframe (1ms), there is a number of slots, which depends on the operational numerology. For numerology 0, 1 slot/subframe (so a slot has length 1 ms). For numerology 1, 2 slots/subframe (so a slot has length 0.5 ms). For numerology 2, 4 slots/subframe (so a slot has length 0.25 ms). and the same logic for higher numerologies (3,4,...).
The scheduling process is performed on a slot level. So, for numerology 2, it happens every 0.25ms. At the slot start of slot number "n", the downlink data for slot "n+2" is scheduled and prepared, and the uplink allocation for slot "n+4" is scheduled (if the TDD pattern permits it, ofc). Within a slot, the scheduler can allocate RBGs and/or symbols, depends on the adopted access mode (OFDMA or TDMA). In TDMA, OFDM symbols are allocated to different UEs: in 1 slot, there are 14 OFDM symbols, and some of them are reserved for DL/UL control channels, depending on the slot format (DL, UL, flexible, etc.)
Having said all this, can you please reformulate your concern?
BR,
Sandra

Missatge de Orfeas Agis Karachalios <man...@gmail.com> del dia dc., 16 de nov. 2022 a les 10:54:
--
You received this message because you are subscribed to the Google Groups "5G-LENA-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 5g-lena-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/5g-lena-users/eefc5f76-f96e-46ba-962d-9306b6a1ce23n%40googlegroups.com.

Orfeas Agis Karachalios

unread,
Nov 16, 2022, 7:15:16 AM11/16/22
to 5G-LENA-users
Thank you for clarifying this. I see now that 5G transmits on a slot-by-slot basis. My concern is I would like to reserve resources for specific flows at the frame level, however that may change the behavior of the simulator in an unwanted fashion. For example, if HARQ feedback is received within a slot, that would change the available resources during a subsequent slot, which cannot be known beforehand (at the start of the frame).

Katerina Koutlia

unread,
Nov 18, 2022, 4:22:49 AM11/18/22
to 5G-LENA-users
Hi,

I am not sure I have totally understood what you are trying to do, but have a look at the notching implementation (nrModule.rst Chapter 2.5.8), where we use a mask to reserve resources within a slot and that is repeated. You can reserve some resources (using the notching mask) for UEs with traffic type X, and the rest to UEs of traffic type Y. 

Hope this can help. If not, try to give us some more details.

BR,
Kat  

Orfeas Agis Karachalios

unread,
Nov 23, 2022, 7:37:35 AM11/23/22
to 5G-LENA-users
It is more complicated than that, because I need to account for N types of flows (or slices). So the notched mask would need to take any value from 0 to (N - 1) in each cell.
For this reason, I need to modify the scheduling method to account for traffic per slice instead of traffic per UE.

Looking at the `AssignDLRBG` method contained in the scheduling method `DoScheduleDlData` I have some difficulty understanding it.

```
NrMacSchedulerNs3Slicing::BeamSymbolMap
NrMacSchedulerOfdmaSlicing::AssignDLRBG (uint32_t symAvail, const ActiveUeMap &activeDl) const
{
NS_LOG_FUNCTION (this);

NS_LOG_DEBUG ("# beams active flows: " << activeDl.size () << ", # sym: " << symAvail);

GetFirst GetBeamId;
GetSecond GetUeVector;
BeamSymbolMap symPerBeam = GetSymPerBeam (symAvail, activeDl);

// Iterate through the different beams
for (const auto &el : activeDl)
{
   // Distribute the RBG evenly among UEs of the same beam
   uint32_t beamSym = symPerBeam.at (GetBeamId (el));
   uint32_t rbgAssignable = 1 * beamSym;
   std::vector<UePtrAndBufferReq> ueVector;
   FTResources assigned (0,0);
   const std::vector<uint8_t> dlNotchedRBGsMask = GetDlNotchedRbgMask ();
   uint32_t resources = dlNotchedRBGsMask.size () > 0 ? std::count (dlNotchedRBGsMask.begin (),
                                        dlNotchedRBGsMask.end (), 1) : GetBandwidthInRbg ();
    NS_ASSERT (resources > 0);

    for (const auto &ue : GetUeVector (el))
   {
     ueVector.emplace_back (ue);
   }

   for (auto & ue : ueVector)
   {
      BeforeDlSched (ue, FTResources (rbgAssignable * beamSym, beamSym));
   }
// more code follows
```
- `rbgAssignable = 1 * beamSym` , does this mean the RBGs are assigned in stripes in the FT plane (that is, a whole row of RBGs is assigned at the same time)
- `resources = GetBandWidthInRBG ()`, aren't the total resources available equal to `GetBandWidthInRBG () * beamSym` in each slot?
- `BeforeDlSched (ue, FTResources (rbgAssignable * beamSym, beamSym));` this one calculates how many bytes per symbol the UE could transmit given its MCS. I find the input confusing.

If you can provide any assistance, I would appreciate it. I need to know how many resources in RBGs are assigned at the same time. This is because I need to keep track of resource usage during a frame, to make decisions on how to reserve resources in subsequent slots.

Katerina Koutlia

unread,
Nov 23, 2022, 11:30:54 AM11/23/22
to Orfeas Agis Karachalios, 5G-LENA-users
Hi,

The ofdma scheduler, first checks how many symbols are assigned to each beam, e.g. if there is only 1 beam, all the 12 symbols (if I remember correctly, out of the 14 symbols, 1 symbol is used for DL CTRL and 1 for UL CTRL, thus 12). This is done with the function GetSymPerBeam (). 
Then, for a given beam, it iterates among all the resources (let us say 50 RBs for BW of 10MHz), and assigns 1 RBG for the symbols belonging to this beam.

The BeforeDlSched () is used as a metric for the user sorting. So in PF, the user that will achieve higher ratio of the potential throughput and the previous average throughput will be scheduled first.

BR,
Kat

Orfeas Agis Karachalios

unread,
Nov 25, 2022, 5:54:06 AM11/25/22
to 5G-LENA-users

I assume 10MHz -> 50RBs wide in the frequency dimension and not the whole resource grid. This is for numerology 0 and SCS 15kHz ? I get around ~55 RBs, since each RB always contains 12 sub-carriers.
So for each RB, 1 RBG is assigned ? RBGs contain a number of RBs according to the BWP bandwidth, for 10MHz bandwidth that would be 2 RBs per RBG in configuration type 1.

> assigns 1 RBG for the symbols belonging to this beam.
So for all the symbols per beam being allocated (in this case 12), (1 RBG / symbol) * (12 symbols) = 12 RBGs are allocated to a single UE at once?

Sorry, this is somewhat confusing to me as I am still new in this field of research.

Katerina Koutlia

unread,
Nov 30, 2022, 2:59:36 AM11/30/22
to Orfeas Agis Karachalios, 5G-LENA-users
Hi Orfeas,

Yes, 50 RBs is in the freq dimension. Actually it is a bit more, around 52 if I remember correctly, due to an overhead of 0.05 considered in NR.  
The RBGs are calculated based on this number and the conf type. So if we have that each RBG is composed of 2 RBs, then we have 26 RBGs. 

So the scheduler iterates through these 26 RBGs and assigns 1 RBG for all the symbols of the beam. 
The other day I confused you because I said that it iterates through the 50 Rbs, but no, I checked the code and it gets the GetBandwidthInRbg().


You can see a good explanation in An E2E simulator for 5G NR networks in figure 4 b and c.

BR,
Kat


Diego Canizio

unread,
Oct 15, 2024, 11:36:19 AM10/15/24
to 5G-LENA-users
Hi Katerina,
I was reading about scheduling in NR and found this post.
I was confused about the mask and the nomenclature used for RBG and RB.
For example, in the cttc-nr-notching logs using the same configuration as your previous comment we have the following: "1 active UL beam, this beam has 13 SYM, starts from RBG 0 and symbol 13 (going backward) for a total of 689 RBG. In one symbol we have 53 RBG."

In this case, does RBG mean RB ?
It is also possible to find other log outputs that can be confusing in the use of RBG where it could be RB.
I say this because I am studying scheduling and trying to account for the availability of RBs for UEs.

Am I right in this doubt?

Gabriel Ferreira

unread,
Oct 15, 2024, 12:10:06 PM10/15/24
to 5G-LENA-users
You can see this is indeed an RBG in NrGnbMac::DoConfigureMac.
But the RBG size is currently fixed to 1 RB per RBG, as per NrGnbMac::SetNumRbPerRbg.
According to 3GPP, it should be 2, 4, 8 or 16 RBs per RBG. But as far as I know, this currently isn't supported nor tested.

Diego Canizio

unread,
Oct 15, 2024, 12:35:18 PM10/15/24
to 5G-LENA-users
Tks Gabriel.
Reply all
Reply to author
Forward
0 new messages