Issue with Logging Jitter and Delay in TDMA RR Scheduling Simulation

30 views
Skip to first unread message

Pratyush Sharma

unread,
Apr 1, 2025, 10:25:01 AMApr 1
to 5G-LENA-users

Hello,

I’m new to NS-3 and 5G-LENA and have been working on modifying an example to simulate TDMA Round Robin (RR) scheduling in a 5G wireless network with 1 base station and 10 UEs. The simulation runs without errors, but I’m not able to see jitter and delay values in the logs. Instead, I’m getting logs like the following:

Screenshot 2025-04-01 at 7.51.03 PM.png

I’ve checked the code, but I’m unsure what might be causing the missing metrics. Here’s the link to my code: https://github.com/Pratyushs411/ns-3/blob/main/tdma.cc

Any help or suggestions would be greatly appreciated!

Thank you!

Kent Huns

unread,
Apr 1, 2025, 1:07:22 PMApr 1
to 5G-LENA-users
Hi,

I have no idea but please check following source.
It would be possible if you could link the packet ID or flow ID to each UE.

src/flow-monitor/model/flow-monitor.cc
void
FlowMonitor::ReportLastRx(Ptr<FlowProbe> probe,
                          uint32_t flowId,
                          uint32_t packetId,
                          uint32_t packetSize)
{
    Time now = Simulator::Now();
    Time delay = (now - tracked->second.firstSeenTime);
    probe->AddPacketStats(flowId, packetSize, delay);

    FlowStats& stats = GetStatsForFlow(flowId);
    stats.delaySum += delay;
    stats.delayHistogram.AddValue(delay.GetSeconds());
    if (stats.rxPackets > 0)
    {
        Time jitter = stats.lastDelay - delay;
        if (jitter > Seconds(0))
        {
            stats.jitterSum += jitter;
            stats.jitterHistogram.AddValue(jitter.GetSeconds());
        }
        else
        {
            stats.jitterSum -= jitter;
            stats.jitterHistogram.AddValue(-jitter.GetSeconds());
        }

Biljana B.

unread,
Apr 9, 2025, 6:09:56 AMApr 9
to 5G-LENA-users
Hello Pratyush,
Try to enable PDCP traces to see delay (see NrHelper EnableTraces function). Or as Kent suggest you may use flow monitor. Logs are not typically used to trace values like delay, jitter. They are more often used to understand the simulation, and processes behind 

Kind regards,
Biljana
Reply all
Reply to author
Forward
0 new messages