Correct Rx power difference between LAA/WiFi and WiFi/Wifi for symmetry
There was a gain compensation that was seemingly introduced to compensate
LAA->Wi-Fi vs Wi-Fi->LAA asymmetry, but ended up making a difference.
Actually gain in LTE is handled by AntennaModel and used for Tx and Rx by
SpectrumModel. For Wi-Fi it is handled by SpectrumWifiPhy. so there was
no need to compensate as such.
The problem originated from the fact that eNB's AdhocWifiMac (used for LBT)
was configured with UE gains rather than BS gains.
With this patch, RX power is symmetric.
--- a/src/laa-wifi-coexistence/helper/laa-wifi-coexistence-helper.cc Sat Dec 09 11:41:12 2017 -0800
+++ b/src/laa-wifi-coexistence/helper/laa-wifi-coexistence-helper.cc Sat Dec 09 11:46:26 2017 -0800
@@ -118,11 +118,11 @@
WifiMacHelper mac;
spectrumPhy.Set ("ShortGuardEnabled", BooleanValue (false));
spectrumPhy.Set ("ChannelWidth", UintegerValue (20));
- spectrumPhy.Set ("TxGain", DoubleValue (phyParams.m_ueTxGain));
- spectrumPhy.Set ("RxGain", DoubleValue (phyParams.m_ueRxGain));
- spectrumPhy.Set ("TxPowerStart", DoubleValue (phyParams.m_ueTxPower));
- spectrumPhy.Set ("TxPowerEnd", DoubleValue (phyParams.m_ueTxPower));
- spectrumPhy.Set ("RxNoiseFigure", DoubleValue (phyParams.m_ueNoiseFigure));
+ spectrumPhy.Set ("TxGain", DoubleValue (phyParams.m_bsTxGain));
+ spectrumPhy.Set ("RxGain", DoubleValue (phyParams.m_bsRxGain));
+ spectrumPhy.Set ("TxPowerStart", DoubleValue (phyParams.m_bsTxPower));
+ spectrumPhy.Set ("TxPowerEnd", DoubleValue (phyParams.m_bsTxPower));
+ spectrumPhy.Set ("RxNoiseFigure", DoubleValue (phyParams.m_bsNoiseFigure));
spectrumPhy.Set ("Receivers", UintegerValue (2));
spectrumPhy.Set ("Transmitters", UintegerValue (2));
--- a/src/laa-wifi-coexistence/helper/scenario-helper.cc Sat Dec 09 11:41:12 2017 -0800
+++ b/src/laa-wifi-coexistence/helper/scenario-helper.cc Sat Dec 09 11:46:26 2017 -0800
@@ -2011,9 +2011,9 @@
NetDeviceContainer apDevices;
SpectrumWifiPhyHelper spectrumPhy = SpectrumWifiPhyHelper::Default ();
spectrumPhy.SetChannel (channel);
- // XXX until LTE eNB rxGain is implemented, compensate by increasing TxGain
- // at AP and decreasing RxGain the same amount at UE, in Wi-Fi
- spectrumPhy.Set ("TxGain", DoubleValue (phyParams.m_bsTxGain + phyParams.m_bsRxGain));
+ // Note that LTE eNB rxGain is implemented through AntennaModel at SpectrumChannel, contrary to Wi-Fi which is handled by SpectrumWifiPhy only.
+ // In addition, LAA has an AdHocWifiMac station to perform LBT (set in ConfigureEnbDevicesForLbt), that should have BS gain properties (namely Rx).
+ spectrumPhy.Set ("TxGain", DoubleValue (phyParams.m_bsTxGain));
spectrumPhy.Set ("RxGain", DoubleValue (phyParams.m_bsRxGain));
spectrumPhy.Set ("TxPowerStart", DoubleValue (phyParams.m_bsTxPower));
spectrumPhy.Set ("TxPowerEnd", DoubleValue (phyParams.m_bsTxPower));
@@ -2070,10 +2070,10 @@
NetDeviceContainer staDevices;
SpectrumWifiPhyHelper spectrumPhy = SpectrumWifiPhyHelper::Default ();
spectrumPhy.SetChannel (channel);
- // XXX until LTE eNB rxGain is implemented, compensate by increasing TxGain
- // at AP and decreasing RxGain the same amount at UE, in Wi-Fi
+ // Note that LTE eNB rxGain is implemented through AntennaModel at SpectrumChannel, contrary to Wi-Fi which is handled by SpectrumWifiPhy only
+ // In addition, LAA has an AdHocWifiMac station to perform LBT (set in ConfigureEnbDevicesForLbt), that should have BS gain properties (namely Rx).
spectrumPhy.Set ("TxGain", DoubleValue (phyParams.m_ueTxGain));
- spectrumPhy.Set ("RxGain", DoubleValue (phyParams.m_ueRxGain - phyParams.m_bsRxGain));
+ spectrumPhy.Set ("RxGain", DoubleValue (phyParams.m_ueRxGain));
spectrumPhy.Set ("TxPowerStart", DoubleValue (phyParams.m_ueTxPower));
spectrumPhy.Set ("TxPowerEnd", DoubleValue (phyParams.m_ueTxPower));
spectrumPhy.Set ("RxNoiseFigure", DoubleValue (phyParams.m_ueNoiseFigure));