Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

regarding multiple antenna in gnb

131 views
Skip to first unread message

satya singh

unread,
Jun 14, 2024, 5:21:06 AM6/14/24
to 5G-LENA-users
Hi, i am trying to configure integrated access and backhaul infrastructure, for that a gnb should be able to form fronthaul and backhaul simultaneously for that i am using different antenna models (3gpp and isotropic),  below i am attaching how i configured antennas ,please tell me whether its fine and also if yes then how i can access different antenna based on my requirement , isotropic for fronthaul and  3gpp for backhaul
NrHelper::AntennaParams apUe;
NrHelper::AntennaParams apGnbIso;
NrHelper::AntennaParams apGnb3Gpp;

// Configure UE antenna
apUe.antennaElem = "ns3::IsotropicAntennaModel";
apUe.nAntCols = 2;
apUe.nAntRows = 2;
apUe.nHorizPorts = 2;
apUe.nVertPorts = 1;
apUe.isDualPolarized = false;

// Configure isotropic antenna for gNB
apGnbIso.antennaElem = "ns3::IsotropicAntennaModel";
apGnbIso.nAntCols = 16;
apGnbIso.nAntRows = 8;
apGnbIso.nHorizPorts = 2;
apGnbIso.nVertPorts = 1;
apGnbIso.isDualPolarized = false;

// Configure 3GPP antenna for gNB
apGnb3Gpp.antennaElem = "ns3::ThreeGppAntennaModel";
apGnb3Gpp.nAntCols = 4;
apGnb3Gpp.nAntRows = 2;
apGnb3Gpp.nHorizPorts = 2;
apGnb3Gpp.nVertPorts = 1;
apGnb3Gpp.isDualPolarized = false;

// The polarization slant angle in degrees in case of x-polarized
double polSlantAngleGnb = 0.0;
double polSlantAngleUe = 90.0;
// The bearing angles in degrees
double bearingAngleGnb = 0.0;
double bearingAngleUe = 180.0;

//--------other funtions-------//


/**
* Configure gNb antenna
*/
nrHelper->SetupGnbAntennas(apGnbIso);
nrHelper->SetupGnbAntennas(apGnb3Gpp);

/**
* Configure UE antenna
*/
nrHelper->SetupUeAntennas(apUe);

// can we do something like this

for (uint32_t i = 0; i < numGnbs; ++i) {
    Ptr<Gnb> currentGnb = nrHelper->GetGnb(i);
    // Set the 3GPP antenna configuration for connecting to other gNBs
    currentGnb->SetAntennaConfiguration(apGnb3Gpp);

   
    for (uint32_t j = 0; j < numGnbs; ++j) {
        if (i != j) { // Skip connecting to itself
            Ptr<Gnb> targetGnb = nrHelper->GetGnb(j); // Get the target gNB
            currentGnb->ConnectToGnb(targetGnb);
        }
    }

    // Set the isotropic antenna configuration for connecting to UEs
    currentGnb->SetAntennaConfiguration(apGnbIso);

   
    for (uint32_t k = 0; k < numUes; ++k) {
        Ptr<Ue> currentUe = ueContainer.Get(k); // Get the current UE
        currentGnb->ConnectToUe(currentUe);
    }
}



iab.cc

satya singh

unread,
Jun 14, 2024, 7:36:41 AM6/14/24
to 5G-LENA-users
also i think there is no function for attaching gnb to gnb in nr-helper
i got only 2 methods there to atatch any ue to gnb
void AttachToClosestEnb(NetDeviceContainer ueDevices, NetDeviceContainer enbDevices);
/**
* \brief Attach a UE to a particular GNB
* \param ueDevice the UE device
* \param gnbDevice the GNB device to which attach the UE
*/
void AttachToEnb(const Ptr<NetDevice>& ueDevice, const Ptr<NetDevice>& gnbDevice);

/**
* \brief Enables the following traces:
* Transmitted/Received Control Messages
* DL/UL Phy Traces
* RLC traces
* PDCP traces
*
*/

Biljana B.

unread,
Jun 19, 2024, 5:42:15 AM6/19/24
to 5G-LENA-users
Hi Satia,

it is not yet possible to attach a gNB with another gNB.

Regarding on how to access different parameters of the antenna, take a look into other examples, in which is obtained a pointer towards a specific antenna object of a specific PHY (ue or gNB).

Kind regards,
Biljana

satya singh

unread,
Jun 19, 2024, 7:06:36 AM6/19/24
to 5G-LENA-users
Thank you so much for your reply , i found a way regarding antenna model , but the problem of attaching gnb to gnb still exist,  in order to impliment that function , what are the thing i should look into and one more thing i want to ask , in ideal beamforming  ,  how many maximum ue can be attached to  a single ?

Biljana B.

unread,
Jun 19, 2024, 8:55:58 AM6/19/24
to 5G-LENA-users
Hi Satia, I do not understand when you say "attaching gnb to gnb", to what interface do you refer?
Kind regards,
Biljana

satya singh

unread,
Jun 19, 2024, 11:24:54 AM6/19/24
to 5G-LENA-users
So basically i want a wireless connection between gnb using beamforming , i am using 3gpp antenna model for that , for now i think only wired p2p connection can be established between two gnb.

Biljana B.

unread,
Jun 19, 2024, 2:24:00 PM6/19/24
to 5G-LENA-users
Based on your first question I understand that you are interested in the IAB use case and that you would like to simulate it using F1 Application Protocol (F1AP). We do not have yet F1AP implemented in 5G-LENA, which is why you cannot find the function for attaching gNBs in the NrHelper. 

This is a very interesting research topic, and I hope that we or someone else will soon implement and contribute such a feature to the 5G-LENA module.

Kind regards,
Biljana

satya singh

unread,
Jun 20, 2024, 4:17:00 AM6/20/24
to 5G-LENA-users
Thank you for your response , i have two more question related to beamforming :
1. In ideal or realistic beamforming , when there are multiple ue do we have to tweak downtilt angles or elivation angles as well as ?
2. What factors determines how many number of ue can connect to a single gnb , is it only row and column of antenna or both gnb and ue , or it also includes bandwidth  , power etc?

satya singh

unread,
Jun 20, 2024, 6:02:10 AM6/20/24
to 5G-LENA-users
void
NrHelper::AttachEnb2Enb(const Ptr<NetDevice>& gnbDevice1, const Ptr<NetDevice>& gnbDevice2)
{
Ptr<NrGnbNetDevice> enbNetDev1 = gnbDevice1->GetObject<NrGnbNetDevice>();
Ptr<NrGnbNetDevice> enbNetDev2 = gnbDevice2->GetObject<NrGnbNetDevice>();

NS_ABORT_IF(enbNetDev1 == nullptr || enbNetDev2 == nullptr);

uint64_t enbIdentifier2 = GetNetDeviceIdentifier(gnbDevice2);

for (uint32_t i = 0; i < enbNetDev1->GetCcMapSize(); ++i)
{
enbNetDev2->GetPhy(i)->SetSymbolsPerSlot(enbNetDev1->GetPhy(i)->GetSymbolsPerSlot());
enbNetDev2->GetPhy(i)->SetNumerology(enbNetDev1->GetPhy(i)->GetNumerology());
enbNetDev2->GetPhy(i)->SetPattern(enbNetDev1->GetPhy(i)->GetPattern());
}

if (m_epcHelper)
{
// Create a bearer between the eNBs if EPC is enabled
m_epcHelper->ActivateEpsBearer(gnbDevice1,
enbIdentifier2,
EpcTft::Default(),
EpsBearer(EpsBearer::NGBR_VIDEO_TCP_DEFAULT));
}

if (m_beamformingHelper)
{
m_beamformingHelper->AddBeamformingTask(enbNetDev1, enbNetDev2);
}
}

uint64_t
NrHelper::GetNetDeviceIdentifier(const Ptr<NetDevice>& device)
{
// Use the memory address of the object as a unique identifier
uint64_t identifier = reinterpret_cast<uint64_t>(&(*device));
return identifier;
}


How this implimentation looks like , i mean there are some methods which are not there in NrGnbNetdevice , so i removed them , regarding an identifier i just used address of netdevice2 object

Biljana B.

unread,
Jun 20, 2024, 10:29:56 AM6/20/24
to 5G-LENA-users
Please find the inline: 

On 20/6/24 10:17, satya singh wrote:
Thank you for your response , i have two more question related to beamforming :
1. In ideal or realistic beamforming , when there are multiple ue do we have to tweak downtilt angles or elivation angles as well as ?

In general, no, because downtilt angle is typically a static configuration parameter that depends on a scenario, e.g. UMa, UMi,... you may look into 3GPP reference scenarios.

2. What factors determines how many number of ue can connect to a single gnb , is it only row and column of antenna or both gnb and ue , or it also includes bandwidth  , power etc?

The number of antenna elements in an array is unrelated to how many UEs can connect to a single gNB. Ideal and realistic beamforming refers to analog beamforming in which multiple antenna elements are used to direct the radiated power toward the UEs. Still, there is no limitation in the simulation on how many UEs you may have.

satya singh

unread,
Jun 21, 2024, 5:15:32 AM6/21/24
to 5G-LENA-users
Thank you Biljana , i will get back to you reagrding other query related to backhaul connectivity, currently i am trying to impliment it .

satya singh

unread,
Jun 26, 2024, 10:27:02 AM6/26/24
to 5G-LENA-users
Hi Biljana , i am getting some error while exection of my demo.cc , i am attaching my demo.cc  as well please take a look , there is a function attachGnbToGnb which i have implimented,  that is attaching cloned gnb to each other or backhaul link , original gnbs are providing access to ue (fronthaul coverage) , original gnb are p2p connected with cloned gnb .
Screenshot from 2024-06-26 19-52-04.png
demo1.cc

George Frangulea

unread,
Jun 27, 2024, 4:18:08 AM6/27/24
to 5G-LENA-users
Maybe move your project into the example folder ( ns-3-dev/contrib/nr/examples). Then, within the example folder, look at how other NR examples have been added in the CMakeLists.txt and add the example you want to run accordingly so it has access to the right libraries. 

Then you enable examples:
./ns3 configure --enable-examples --enable-tests
./ns3 build

And then you can run it the same way you run NR examples:
./ns3 run cttc-nr-demo

satya singh

unread,
Jun 27, 2024, 4:55:01 PM6/27/24
to 5G-LENA-users
Thanks for  George, i tried using that but while building it , same error .
so i move back to scratch directory again , the problem is not only this error, after clean build , ptr.h file is getting modified , i have not changed anything in that file , not only this there is an error in demo.cc related to DynamicCast , as it is giving error that it is not defined  but when i opened its file which was ptr.h , there was template for that ,i am attaching snapshots of errors as well as file i am currently working on demo1.cc.
1. Error in ptr.h file
2. Error i got in demo1.cc after executing demo1.cc itself (intially there was no any compilation error)
3. image with error while building , which George suggested to try running it in example.

Screenshot from 2024-06-28 02-09-48.png
Screenshot from 2024-06-28 02-15-39.png
Screenshot from 2024-06-28 02-01-29.png
demo1.cc

satya singh

unread,
Jun 27, 2024, 11:05:07 PM6/27/24
to 5G-LENA-users
Sorry, ptr.h is not getting modified, but somehow something breaks up in src/core , and it creates an error.

George Frangulea

unread,
Jun 28, 2024, 4:14:47 AM6/28/24
to 5G-LENA-users
What 5g-lena and ns-3-dev versions are you using? Pick the 5g-lena branch you want, check which ns-3 version it requires, and compile without your example. You should not get any errors. 

Then you can go on and create an example. I never use the scratch folder, so I am not sure how the libraries you need can be found from there. That's why I suggested following how an NR example is implemented. But first, make sure you have clean ns-3 and 5g-lena that compile without errors.

satya singh

unread,
Jun 28, 2024, 8:41:37 AM6/28/24
to 5G-LENA-users
I am using ns3 v3.41 and nr  v3.0 currently, this is not the first program i am executing , what is new while running this program is that i had to modify the existing files , these attached snapshots showing modified files in nr module and ns3 dev module respectively , look at the errors which ns3 dev showing ,they are related to dynamicCast which i previously mentioned and Simulator.
Screenshot from 2024-06-28 18-05-56.pngScreenshot from 2024-06-28 18-06-51.png
Reply all
Reply to author
Forward
0 new messages