Help Needed: TDMA Simulation in 5G-LENA (NS-3)

25 views
Skip to first unread message

Pratyush Sharma

unread,
Mar 28, 2025, 12:25:27 AM3/28/25
to 5G-LENA-users

Hello everyone,

I am new to NS-3 and 5G-LENA, and I am currently working on simulating TDMA (Time Division Multiple Access) in a small 5G network (10-15 users and 1 base station). My goal is to analyze QoS parameters such as throughput, latency, and packet loss.I’d appreciate any guidance on:

How to configure and use the TDMA scheduler in 5G-LENA?

Any example scripts or documentation available?

Resources to learn NS-3 programming and understand 5G-LENA schedulers?

Thanks in advance!

Kent Huns

unread,
Mar 28, 2025, 8:07:01 AM3/28/25
to 5G-LENA-users
Hi,

Please check below 2 examples.
    * Indoor scenario : 120 UEs connect the closest of the 12 gNBs
    * 2UEs require different QoS flows

And if you find some UEs' throughputs are 0, please try below patch.

Resource mapping and user selection are mainly done by the following functions.
Only the main points are extracted as they are complex, but you can try your idea by modifying them.

model/nr-mac-scheduler-ns3.cc : starting point of resource mapping
uint8_t
NrMacSchedulerNs3::DoScheduleDlData() const
{
    BeamSymbolMap symPerBeam = AssignDLRBG(symAvail, activeDl);
model/nr-mac-scheduler-tdma.cc : priority sort by RR/PF/QoS(=latency-aware PF)
NrMacSchedulerTdma::BeamSymbolMap
NrMacSchedulerTdma::AssignRBGTDMA() const
{
        std::stable_sort(ueVector.begin(), ueVector.end(), GetCompareFn());
model/nr-mac-scheduler-ue-info-(rr/pf/qos).h : comparison & definition of priority
    static bool CompareUeWeightsDl(const NrMacSchedulerNs3::UePtrAndBufferReq& lue,
                                   const NrMacSchedulerNs3::UePtrAndBufferReq& rue)
    {
        double lQoSMetric = CalculateDlWeight(lue);
        double rQoSMetric = CalculateDlWeight(rue);
        return (lQoSMetric > rQoSMetric);
    }
    static double CalculateDlWeight(const NrMacSchedulerNs3::UePtrAndBufferReq& ue)
    {
                weight += (100 - LCPtr->m_priority) *
                          std::pow(uePtr->m_potentialTputDl, uePtr->m_alpha) /
                          std::max(1E-9, uePtr->m_avgTputDl) * delayBudgetFactor;
        return weight;

Thanks

Reply all
Reply to author
Forward
0 new messages