Antenna Reconfiguration , power per port

35 views
Skip to first unread message

omar tarek

unread,
Apr 15, 2025, 10:58:24 PMApr 15
to 5G-LENA-users

Hello,
I'm still new to NS-3 and I'm working on a project where I want to control the power per port of the antenna. I tried making changes to the antenna elements during the simulation as a try to indirectly change the power , but it didn’t work at all.

After doing some research, I found out that I might need to modify some of the source code in the NR gNB PHY and other related files, but I’m not sure where to start.

Any tips would be appreciated.

Thanks!

Kent Huns

unread,
Apr 16, 2025, 10:25:41 AMApr 16
to 5G-LENA-users
Hi Omar,

If you could tell the purpose to adjust the power per port, we might say something more.
(like NOMA, wider beamforming, energy saving ...etc)

I don't think this is the solution but please check the following source. 
It's the part of the sending process according to the MAC schedule once determined.
Maybe you can modify Tx power spectral density=psd for a particular UE=cellId & rnti.

model/nr-spectrum-phy.cc
void
NrSpectrumPhy::StartTxDataFrames(const Ptr<PacketBurst>& pb,
                                 const std::list<Ptr<NrControlMessage>>& ctrlMsgList,
                                 const std::shared_ptr<DciInfoElementTdma> dci,
                                 const Time& duration)
{
    switch (m_state)
    {
    case TX:{
        ChangeState(TX, duration);

        Ptr<NrSpectrumSignalParametersDataFrame> txParams =
            Create<NrSpectrumSignalParametersDataFrame>();
        txParams->psd = m_txPsd;
        txParams->cellId = GetCellId();
        txParams->rnti = dci->m_rnti;
        txParams->precodingMatrix = dci->m_precMats;

        if (m_channel)
        {
            m_channel->StartTx(txParams);
        }

        Simulator::Schedule(duration, &NrSpectrumPhy::EndTx, this);
        m_activeTransmissions++;

Thanks

omar tarek

unread,
Apr 16, 2025, 10:38:56 AMApr 16
to 5G-LENA-users
yes the purpose is energy saving 
i have seen this in the source code and thought it be a complicated approach to modify this for each user i put in the scenario 
so i thought maybe i can allocate the power to each port and then shut it down by assigning low value for it 
and try to handover the users to the active port but the starting point i cant find whenever i searched 

thanks 

Kent Huns

unread,
Apr 16, 2025, 11:23:26 AMApr 16
to 5G-LENA-users
>>  approach to modify this for each user i put in the scenario 
Maybe it's possible if you add a parameter in DCI to adjust tx power for a particular UE. 
But MCS must be adjusted at the same time when adjusting tx power, or reception errors will occur. So I think the algorithm there is a subject for research.

model/nr-mac-scheduler-ofdma.cc
std::shared_ptr<DciInfoElementTdma>
NrMacSchedulerOfdma::CreateDlDci(NrMacSchedulerNs3::PointInFTPlane* spoint,
                                 const std::shared_ptr<NrMacSchedulerUeInfo>& ueInfo,
                                 uint32_t maxSym) const
{
    std::shared_ptr<DciInfoElementTdma> dci =
        std::make_shared<DciInfoElementTdma>(ueInfo->m_rnti,
                                             DciInfoElementTdma::DL,
                                             spoint->m_sym,
                                             maxSym,
                                             ueInfo->m_dlMcs,
                                             ueInfo->m_dlRank,
                                             ueInfo->m_dlPrecMats,
                                             tbs,
                                             1,
                                             0,
                                             DciInfoElementTdma::DATA,
                                             GetBwpId(),
                                             GetTpc());

omar tarek

unread,
Apr 16, 2025, 11:43:15 AMApr 16
to 5G-LENA-users
Thanks for the help Kent much appreciated 
I will try and let you know If there is any updates 

Thanks 

Reply all
Reply to author
Forward
0 new messages