The mc-twoenbs example in the mmWave module is missing many mobility-related trace files.

51 views
Skip to first unread message

chang yi Liu

unread,
Nov 23, 2024, 8:10:38 AMNov 23
to ns-3-users
Hi,  I am using the mmWave example program mc-twoenbs, but when I execute the file, I do not see any handover-related files.  

螢幕擷取畫面 2024-11-23 210903.png

How can I make it generate these files?
CellIdStatsHandover.txt
EnbHandoverStartStats.txt
EnbHandoverEndStats.txt
UeHandoverStartStats.txt
UeHandoverEndStats.txt

Kent Huns

unread,
Nov 23, 2024, 2:44:32 PMNov 23
to ns-3-users
Please check the following flow. I think the setting about output is correct.
But, according to this script, "NotifyHandoverStartEnb()" will not be called if handover doesn't occur during the simulation.
  * Here, "handover occurs" means "any change occurs in /NodeList/*/DeviceList/*/LteEnbRrc/HandoverStart" .

So,  1) check your simulation scenario, and/or 2) identify the path above (maybe somewhere in /model/*rrc*.cc)

examples/mc-twoenbs.cc
    mmwaveHelper->EnableTraces();
↓ helper/mmwave-helper.cc
void
MmWaveHelper::EnableTraces(void)
{
    EnableMcTraces();
}
↓ helper/mmwave-bearer-stats-connector.cc
void
MmWaveBearerStatsConnector::EnableMcStats(Ptr<McStatsCalculator> mcStats)
{
    m_mcStats = mcStats;
    EnsureConnected();
}

void
MmWaveBearerStatsConnector::EnsureConnected()
{
    NS_LOG_FUNCTION(this);
    if (!m_connected)
    {
        Config::ConnectFailSafe(
            "/NodeList/*/DeviceList/*/LteEnbRrc/HandoverStart",
            MakeBoundCallback(&MmWaveBearerStatsConnector::NotifyHandoverStartEnb, this));
        Config::ConnectFailSafe(
            "/NodeList/*/DeviceList/*/LteUeRrc/HandoverStart",
            MakeBoundCallback(&MmWaveBearerStatsConnector::NotifyHandoverStartUe, this));
        Config::ConnectFailSafe(
            "/NodeList/*/DeviceList/*/MmWaveUeRrc/HandoverStart",
            MakeBoundCallback(&MmWaveBearerStatsConnector::NotifyHandoverStartUe, this));
void
MmWaveBearerStatsConnector::NotifyHandoverStartEnb(MmWaveBearerStatsConnector* c,
                                                   std::string context,
                                                   uint64_t imsi,
                                                   uint16_t cellId,
                                                   uint16_t rnti,
                                                   uint16_t targetCellId)
{
    c->PrintEnbStartHandover(imsi, cellId, targetCellId, rnti);
    c->DisconnectTracesEnb(context, imsi, cellId, rnti);
}
void
MmWaveBearerStatsConnector::PrintEnbStartHandover(uint64_t imsi,
                                                  uint16_t sourceCellid,
                                                  uint16_t targetCellId,
                                                  uint16_t rnti)
{
    NS_LOG_FUNCTION(this << " NotifyHandoverStartEnb " << Simulator::Now().GetSeconds());
    if (!m_enbHandoverStartOutFile.is_open())
    {
        m_enbHandoverStartOutFile.open(GetEnbHandoverStartOutputFilename().c_str());
    }
    m_enbHandoverStartOutFile << Simulator::Now().GetNanoSeconds() / 1.0e9 << " " << imsi << " "
                              << rnti << " " << sourceCellid << " " << targetCellId << std::endl;
}

chang yi Liu

unread,
Nov 30, 2024, 1:32:04 PMNov 30
to ns-3-users
Hi,  Thank you for your reply, Kent Huns.
I found that the SINR values in the mmWaveSinrTime output of this example program did not change after execution. I believe this is the reason why the handover was not triggered.  
Do you know how to configure this example program to improve the SINR issue?

Kent Huns 在 2024年11月24日 星期日凌晨3:44:32 [UTC+8] 的信中寫道:

Kent Huns

unread,
Dec 1, 2024, 1:39:00 AMDec 1
to ns-3-users
I've never tried this example but there seem many things you need to check. (It may sound tiresome)
  • UE's position & velocity (if you changed them.)
  • Whether the value in "mmWaveSinrTime" is UE's received SINR or gNB's.
       If gNB's, you also need to check UL configuration.
  • How the written SINR is unchanged. And how it may change when you set different random number seed.
       This example uses 3GPP channel model, which calculates SINR randomly each time,
       and the channel condition is configured to be reset every 100 ms.
       So the instantaneous value of SINR cannot be constant.
            * Don't report ‘slightly changed’ as ‘not changed’, they are quantitatively quite different.

       If it's not bug , time-averaged values may be written in the file.
          ** In addition, if time-averaged, you need check their time resolution.
       And if bug, constant SINR may be a characteristic value like 0 or extremely low[dB]. That might provide a clue.

  • All time-related settings about X2-handover
       Is Overall simulation time long enough? Is UE's speed slow enough?
       (If implemented, is the period of RRC-MR short? How is the subsequent latency?)
       cf) https://www.eventhelix.com/lte/handover/x2/lte-x2-handover-sequence-diagram.pdf
Thanks,
Kent
Reply all
Reply to author
Forward
0 new messages