21 #include "ns3/simulator.h"
25 #include "ns3/spectrum-test.h"
27 #include "ns3/lte-phy-tag.h"
28 #include "ns3/lte-sinr-chunk-processor.h"
29 #include "ns3/lte-spectrum-signal-parameters.h"
69 sm = Create<SpectrumModel> (bands);
75 (*rxPsd1)[0] = 1.255943215755e-15;
76 (*rxPsd1)[1] = 7.204059965732e-16;
79 (*theoreticalSinr1)[0] = 3.72589167251055;
80 (*theoreticalSinr1)[1] = 3.72255684126076;
88 (*rxPsd2)[0] = 2.505936168136e-17;
89 (*rxPsd2)[1] = 3.610582885110e-17;
92 (*theoreticalSinr2)[0] = 0.0743413124381667;
93 (*theoreticalSinr2)[1] = 0.1865697965291756;
107 :
TestCase (
"SINR calculation in downlink: " + name),
109 m_sm (sv->GetSpectrumModel ()),
129 dlPhy->SetCellId (100);
132 dlPhy->AddSinrChunkProcessor (chunkProcessor);
159 for (
int pb = 0 ; pb < numOfPbs ; pb++ )
162 packetBursts[pb] = CreateObject<PacketBurst> ();
165 for (
int i = 0 ; i < numOfPkts ; i++ )
167 pkt[pb][i] = Create<Packet> (1000);
177 packetBursts[pb]->
AddPacket ( pkt[pb][i] );
188 (*noisePsd)[0] = 5.000000000000e-19;
189 (*noisePsd)[1] = 4.545454545455e-19;
191 (*i1)[0] = 5.000000000000e-18;
192 (*i2)[0] = 5.000000000000e-16;
193 (*i3)[0] = 1.581138830084e-16;
194 (*i4)[0] = 7.924465962306e-17;
195 (*i1)[1] = 1.437398936440e-18;
196 (*i2)[1] = 5.722388235428e-16;
197 (*i3)[1] = 7.204059965732e-17;
198 (*i4)[1] = 5.722388235428e-17;
211 dlPhy->SetNoisePowerSpectralDensity (noisePsd);
222 sp1->packetBurst = packetBursts[0];
230 ip1->packetBurst = packetBursts[1];
237 ip2->packetBurst = packetBursts[2];
244 ip3->packetBurst = packetBursts[3];
251 ip4->packetBurst = packetBursts[4];
264 NS_LOG_INFO (
"Calculated SINR: " << calculatedSinr);