Hello everyone.
I am building a SINR formula that emulates the ones logged by the simulator via DLDATASINR.
I work with parabolic Antennas (both UEs and Gnb)
The values I received from my formulas is far from what was actually traced via DlDataSinr, even though I used the exact same values of parameters.
Here is my formula:
double bandwidthHz ;//bandwidth
double satAntennaGainDb ;
double vsatAntennaGainDb;
double sTxPower; Sat tx Power
double frequencyHz ;
double Brb=12*15e3;
double Nrb=88;
double pathloss=20*log10(d)+20*log10(frequencyHz)+20*log10(4*M_PI/3e8);//183.56db
double T=290.0;
double c = 3e8;
double lambda = c / frequencyHz;
// Pathloss
double Lfs = pow((4*M_PI*d)/lambda, 2);
// Convert dBm to Watts
double PtxW = pow(10, (sTxPower - 30)/10.0);
// RB power
double PtxRb = PtxW / Brb;
// Gains (linear)
double Gt = pow(10, satAntennaGainDb/10.0);
double Gr = pow(10, vsatAntennaGainDb/10.0);
// Received power
double Pr = PtxRb *Gt / Lfs;
// Noise
double k = 1.38e-23;
double Noise = k * T *Brb*Nrb;
// SINR
double sinrLinear = Pr / Noise;
double sinrDbCalcule = 10*log10(sinrLinear);
For context:
- I work with 5 users in around teh same position , therefore the same distance from the Satellite.
-I use Friis propag. loss model
-Numerology is 0
-Number of total Rbs is 88
-I use 3 bwps:
"//coté gnb
// BWP 0 - dl +ul
NrHelper::GetGnbPhy(gnbNetDev.Get(0), 0)
->SetAttribute("Pattern", StringValue("DL|UL|DL|UL|DL|UL|"));
//NrHelper::GetGnbPhy(gnbNetDev.Get(0), 0) ->SetAttribute("Numerology", UintegerValue(2));
//NrHelper::GetGnbPhy(gnbNetDev.Get(0), 0)->SetAttribute("TxPower", DoubleValue(4.0));
// BWP 1 - dl
NrHelper::GetGnbPhy(gnbNetDev.Get(0), 1)
->SetAttribute("Pattern", StringValue("DL|DL|DL|DL|DL|DL|"));
//NrHelper::GetGnbPhy(gnbNetDev.Get(0), 1)->SetAttribute("Numerology", UintegerValue(2));
//NrHelper::GetGnbPhy(gnbNetDev.Get(0), 1)->SetAttribute("TxPower", DoubleValue(4.0));
// BWP 2 - ul
NrHelper::GetGnbPhy(gnbNetDev.Get(0), 2)
->SetAttribute("Pattern", StringValue("UL|UL|UL|UL|UL|UL|"));
//NrHelper::GetGnbPhy(gnbNetDev.Get(0), 2)->SetAttribute("Numerology", UintegerValue(2));
//NrHelper::GetGnbPhy(gnbNetDev.Get(0), 2)->SetAttribute("TxPower", DoubleValue(4.0));
// ----- Link UL and DL BWPs -----
NrHelper::GetBwpManagerGnb(gnbNetDev.Get(0))->SetOutputLink(0, 0);
NrHelper::GetBwpManagerGnb(gnbNetDev.Get(0))->SetOutputLink(2, 1);
for (uint32_t i = 0; i < ueNetDev.GetN(); i++)
{
NrHelper::GetBwpManagerUe(ueNetDev.Get(i))->SetOutputLink(0, 0);
NrHelper::GetBwpManagerUe(ueNetDev.Get(i))->SetOutputLink(1, 2);
}
int64_t randomStream = 1;
nrHelper->AssignStreams(gnbNetDev, randomStream);
int64_t stream = 1;
for (uint32_t i = 0; i < ueNetDev.GetN(); ++i)
{
nrHelper->AssignStreams(ueNetDev.Get(i), stream);
}"
-I used the exact same parameters in my calculations as in NR
"double satTxPower =
(sTxPower + 30) + (10 * std::log10(bandwidthHz / 1e6));
for (uint32_t i = 0; i < gnbNetDev.GetN(); i++)
{
NrHelper::GetGnbPhy(gnbNetDev.Get(i), 0)->SetTxPower(sTxPower);
// NrHelper::GetGnbPhy(gnbNetDev.Get(i), 0)->SetAttribute("TxAntennaGain",DoubleValue(49.22));
}
for (uint32_t i = 0; i < ueNetDev.GetN(); ++i)
{
NrHelper::GetUePhy(ueNetDev.Get(i), 1)->SetTxPower(groundTxPower);
// NrHelper::GetUePhy(ueNetDev.Get(i), 0)->SetTxPower(groundTxPower);
}"
-The NoiseFigure is set at 0 for both users and Gnb
-NumHarqprocess is set at 1
-I modified the GetGainDb in parabolic-antenna-model so that its calculation depends mostly on the central frequency.
May I know what other details did I miss?
Thank you so much in advance