Skip to content

Commit fbb490e

Browse files
committed
fix(mmwave): correct SINR calculation enabling proper handover
Fix critical bugs in MmWaveEnbPhy::UpdateUeSinrEstimate(): - Use received power (rxPsd) instead of transmit power (txPsd) - Include interference in SINR calculation (was SNR only) Impact: SINR values now realistic, enabling proper handover decisions Fixes: Signal power mixup and missing interference calculation Tested: mc-twoenbs example shows proper handover behavior
1 parent c01be94 commit fbb490e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mmwave/model/mmwave-enb-phy.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ MmWaveEnbPhy::UpdateUeSinrEstimate()
686686

687687
NS_LOG_LOGIC("RxPsd " << *rxPsd);
688688

689-
m_rxPsdMap[ue->first] = txPsd->Copy();;
689+
m_rxPsdMap[ue->first] = rxPsd->Copy();
690690
*totalReceivedPsd += *rxPsd;
691691

692692
// set back the bf vector to the main eNB
@@ -716,8 +716,7 @@ MmWaveEnbPhy::UpdateUeSinrEstimate()
716716
{
717717
SpectrumValue interference = *totalReceivedPsd - *(ue->second);
718718
NS_LOG_LOGIC("interference " << interference);
719-
SpectrumValue sinr = *(ue->second) / (*noisePsd); // + interference);
720-
// we consider the SNR only!
719+
SpectrumValue sinr = *(ue->second) / (*noisePsd + interference);
721720
NS_LOG_LOGIC("sinr " << sinr);
722721
double sinrAvg = Sum(sinr) / (sinr.GetSpectrumModel()->GetNumBands());
723722
NS_LOG_DEBUG("Time " << Simulator::Now().GetSeconds() << " CellId " << m_cellId << " UE "

0 commit comments

Comments
 (0)