diff --git a/CHANGES.html b/CHANGES.html
index 1a3e86c51..a8961358e 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -67,6 +67,8 @@ in order to support multi-users (MU) transmissions.
The wifi trace WifiPhy::PhyRxBegin has been extended to report the received power for every band.
+New attributes SpectrumWifiPhy::TxMaskInnerBandMinimumRejection, SpectrumWifiPhy::TxMaskOuterBandMinimumRejection and SpectrumWifiPhy::TxMaskOuterBandMaximumRejection have been added to configure the OFDM transmit masks.
+
Changes to build system:
diff --git a/src/spectrum/model/wifi-spectrum-value-helper.cc b/src/spectrum/model/wifi-spectrum-value-helper.cc
index 904174d5d..f7aabe5e8 100644
--- a/src/spectrum/model/wifi-spectrum-value-helper.cc
+++ b/src/spectrum/model/wifi-spectrum-value-helper.cc
@@ -157,9 +157,10 @@ WifiSpectrumValueHelper::CreateDsssTxPowerSpectralDensity (uint32_t centerFreque
}
Ptr
-WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth)
+WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth,
+ double minInnerBandDbr, double minOuterBandDbr, double lowestPointDbr)
{
- NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth);
+ NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth << minInnerBandDbr << minOuterBandDbr << lowestPointDbr);
uint32_t bandBandwidth = 0;
uint32_t innerSlopeWidth = 0;
switch (channelWidth)
@@ -203,16 +204,18 @@ WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (uint32_t centerFreque
WifiSpectrumBand maskBand (0, nAllocatedBands + nGuardBands);
CreateSpectrumMaskForOfdm (c, subBands, maskBand,
txPowerPerBandW, nGuardBands,
- innerSlopeWidth, -40.0); // -40 dBr for the outermost points of the standard defined mask for 11a, 11g and downclocked versions of 11a for 11p
+ innerSlopeWidth, minInnerBandDbr,
+ minOuterBandDbr, lowestPointDbr);
NormalizeSpectrumMask (c, txPowerW);
NS_ASSERT_MSG (std::abs (txPowerW - Integral (*c)) < 1e-6, "Power allocation failed");
return c;
}
Ptr
-WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth)
+WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth,
+ double minInnerBandDbr, double minOuterBandDbr, double lowestPointDbr)
{
- NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth);
+ NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth << minInnerBandDbr << minOuterBandDbr << lowestPointDbr);
uint32_t bandBandwidth = 312500;
Ptr c = Create (GetSpectrumModel (centerFrequency, channelWidth, bandBandwidth, guardBandwidth));
uint32_t nGuardBands = static_cast (((2 * guardBandwidth * 1e6) / bandBandwidth) + 0.5);
@@ -256,10 +259,7 @@ WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFreq
uint32_t start16 = stop15 + 2;
uint32_t stop16 = start16 + 28 - 1;
//Prepare spectrum mask specific variables
- uint32_t innerSlopeWidth = static_cast ((2e6 / bandBandwidth) + 0.5); //size in number of subcarriers of the 0dBr<->20dBr slope (2MHz for HT/VHT)
- double lowestPointDbr = (centerFrequency >= 5000) ?
- -40.0 : //if 5 GHz band
- -45.0; //if 2.4 GHz band
+ uint32_t innerSlopeWidth = static_cast ((2e6 / bandBandwidth) + 0.5); //size in number of subcarriers of the inner band (2MHz for HT/VHT)
std::vector subBands; //list of data/pilot-containing subBands (sent at 0dBr)
WifiSpectrumBand maskBand (0, nAllocatedBands + nGuardBands);
switch (channelWidth)
@@ -283,7 +283,6 @@ WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFreq
// 224 subcarriers (208 data + 16 pilot)
// possible alternative: 242 subcarriers (234 data + 8 pilot)
txPowerPerBandW = txPowerW / 224;
- NS_ASSERT (lowestPointDbr == -40.0);
subBands.push_back (std::make_pair (start1, stop1));
subBands.push_back (std::make_pair (start2, stop2));
subBands.push_back (std::make_pair (start3, stop3));
@@ -297,7 +296,6 @@ WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFreq
// 448 subcarriers (416 data + 32 pilot)
// possible alternative: 484 subcarriers (468 data + 16 pilot)
txPowerPerBandW = txPowerW / 448;
- NS_ASSERT (lowestPointDbr == -40.0);
subBands.push_back (std::make_pair (start1, stop1));
subBands.push_back (std::make_pair (start2, stop2));
subBands.push_back (std::make_pair (start3, stop3));
@@ -320,16 +318,18 @@ WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFreq
//Build transmit spectrum mask
CreateSpectrumMaskForOfdm (c, subBands, maskBand,
txPowerPerBandW, nGuardBands,
- innerSlopeWidth, lowestPointDbr);
+ innerSlopeWidth, minInnerBandDbr,
+ minOuterBandDbr, lowestPointDbr);
NormalizeSpectrumMask (c, txPowerW);
NS_ASSERT_MSG (std::abs (txPowerW - Integral (*c)) < 1e-6, "Power allocation failed");
return c;
}
Ptr
-WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth)
+WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth,
+ double minInnerBandDbr, double minOuterBandDbr, double lowestPointDbr)
{
- NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth);
+ NS_LOG_FUNCTION (centerFrequency << channelWidth << txPowerW << guardBandwidth << minInnerBandDbr << minOuterBandDbr << lowestPointDbr);
uint32_t bandBandwidth = 78125;
Ptr c = Create (GetSpectrumModel (centerFrequency, channelWidth, bandBandwidth, guardBandwidth));
uint32_t nGuardBands = static_cast (((2 * guardBandwidth * 1e6) / bandBandwidth) + 0.5);
@@ -345,10 +345,7 @@ WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (uint32_t centerFreq
uint32_t start4;
uint32_t stop4;
//Prepare spectrum mask specific variables
- uint32_t innerSlopeWidth = static_cast ((1e6 / bandBandwidth) + 0.5); //size in number of subcarriers of the 0dBr<->20dBr slope
- double lowestPointDbr = (centerFrequency >= 5000) ?
- -40.0 : //if 5 GHz band
- -45.0; //if 2.4 GHz band
+ uint32_t innerSlopeWidth = static_cast ((1e6 / bandBandwidth) + 0.5); //size in number of subcarriers of the inner band
std::vector subBands; //list of data/pilot-containing subBands (sent at 0dBr)
WifiSpectrumBand maskBand (0, nAllocatedBands + nGuardBands);
switch (channelWidth)
@@ -417,7 +414,8 @@ WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (uint32_t centerFreq
//Build transmit spectrum mask
CreateSpectrumMaskForOfdm (c, subBands, maskBand,
txPowerPerBandW, nGuardBands,
- innerSlopeWidth, lowestPointDbr);
+ innerSlopeWidth, minInnerBandDbr,
+ minOuterBandDbr, lowestPointDbr);
NormalizeSpectrumMask (c, txPowerW);
NS_ASSERT_MSG (std::abs (txPowerW - Integral (*c)) < 1e-6, "Power allocation failed");
return c;
@@ -469,10 +467,11 @@ WifiSpectrumValueHelper::CreateRfFilter (uint32_t centerFrequency, uint16_t tota
void
WifiSpectrumValueHelper::CreateSpectrumMaskForOfdm (Ptr c, std::vector allocatedSubBands, WifiSpectrumBand maskBand,
- double txPowerPerBandW, uint32_t nGuardBands,
- uint32_t innerSlopeWidth, double lowestPointDbr)
+ double txPowerPerBandW, uint32_t nGuardBands, uint32_t innerSlopeWidth,
+ double minInnerBandDbr, double minOuterBandDbr, double lowestPointDbr)
{
- NS_LOG_FUNCTION (c << allocatedSubBands.front ().first << allocatedSubBands.back ().second << maskBand.first << maskBand.second << txPowerPerBandW << nGuardBands << innerSlopeWidth << lowestPointDbr);
+ NS_LOG_FUNCTION (c << allocatedSubBands.front ().first << allocatedSubBands.back ().second << maskBand.first << maskBand.second <<
+ txPowerPerBandW << nGuardBands << innerSlopeWidth << minInnerBandDbr << minOuterBandDbr << lowestPointDbr);
uint32_t numSubBands = allocatedSubBands.size ();
uint32_t numBands = c->GetSpectrumModel ()->GetNumBands ();
uint32_t numMaskBands = maskBand.second - maskBand.first + 1;
@@ -481,8 +480,8 @@ WifiSpectrumValueHelper::CreateSpectrumMaskForOfdm (Ptr c, std::v
//Different power levels
double txPowerRefDbm = (10.0 * std::log10 (txPowerPerBandW * 1000.0));
- double txPowerInnerBandMinDbm = txPowerRefDbm - 20;
- double txPowerMiddleBandMinDbm = txPowerRefDbm - 28;
+ double txPowerInnerBandMinDbm = txPowerRefDbm + minInnerBandDbr;
+ double txPowerMiddleBandMinDbm = txPowerRefDbm + minOuterBandDbr;
double txPowerOuterBandMinDbm = txPowerRefDbm + lowestPointDbr; //TODO also take into account dBm/MHz constraints
//Different widths (in number of bands)
@@ -519,8 +518,8 @@ WifiSpectrumValueHelper::CreateSpectrumMaskForOfdm (Ptr c, std::v
+ (flatJunctionRight.second - flatJunctionRight.first + 1)));
//Different slopes
- double innerSlope = 20.0 / innerSlopeWidth; //0 to 20dBr
- double middleSlope = 8.0 / middleSlopeWidth; //20 to 28dBr
+ double innerSlope = (-1 * minInnerBandDbr) / innerSlopeWidth;
+ double middleSlope = (-1 * (minOuterBandDbr - minInnerBandDbr)) / middleSlopeWidth;
double outerSlope = (txPowerMiddleBandMinDbm - txPowerOuterBandMinDbm) / outerSlopeWidth;
//Build spectrum mask
@@ -562,7 +561,7 @@ WifiSpectrumValueHelper::CreateSpectrumMaskForOfdm (Ptr c, std::v
}
else
{
- txPowerW = DbmToW (txPowerInnerBandMinDbm); //consider that nulled as much as possible inband but power leakage -> -20dBr
+ txPowerW = DbmToW (txPowerInnerBandMinDbm);
}
}
else if (i <= innerBandRight.second && i >= innerBandRight.first)
@@ -689,7 +688,6 @@ WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity (double txPower, uint
return txPsd;
}
-
Ptr
WifiSpectrumValue5MhzFactory::CreateRfFilter (uint8_t channel)
{
@@ -706,5 +704,4 @@ WifiSpectrumValue5MhzFactory::CreateRfFilter (uint8_t channel)
return rf;
}
-
} // namespace ns3
diff --git a/src/spectrum/model/wifi-spectrum-value-helper.h b/src/spectrum/model/wifi-spectrum-value-helper.h
index 9f0417d49..8625d753d 100644
--- a/src/spectrum/model/wifi-spectrum-value-helper.h
+++ b/src/spectrum/model/wifi-spectrum-value-helper.h
@@ -88,9 +88,13 @@ public:
* \param channelWidth channel width (MHz)
* \param txPowerW transmit power (W) to allocate
* \param guardBandwidth width of the guard band (MHz)
+ * \param minInnerBandDbr the minimum relative power in the inner band (in dBr)
+ * \param minOuterbandDbr the minimum relative power in the outer band (in dBr)
+ * \param lowestPointDbr maximum relative power of the outermost subcarriers of the guard band (in dBr)
* \return a pointer to a newly allocated SpectrumValue representing the OFDM Transmit Power Spectral Density in W/Hz for each Band
*/
- static Ptr CreateOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth);
+ static Ptr CreateOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth,
+ double minInnerBandDbr = -20, double minOuterbandDbr = -28, double lowestPointDbr = -40);
/**
* Create a transmit power spectral density corresponding to OFDM
@@ -101,9 +105,13 @@ public:
* \param channelWidth channel width (MHz)
* \param txPowerW transmit power (W) to allocate
* \param guardBandwidth width of the guard band (MHz)
+ * \param minInnerBandDbr the minimum relative power in the inner band (in dBr)
+ * \param minOuterbandDbr the minimum relative power in the outer band (in dBr)
+ * \param lowestPointDbr maximum relative power of the outermost subcarriers of the guard band (in dBr)
* \return a pointer to a newly allocated SpectrumValue representing the HT OFDM Transmit Power Spectral Density in W/Hz for each Band
*/
- static Ptr CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth);
+ static Ptr CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth,
+ double minInnerBandDbr = -20, double minOuterbandDbr = -28, double lowestPointDbr = -40);
/**
* Create a transmit power spectral density corresponding to OFDM
@@ -114,9 +122,13 @@ public:
* \param channelWidth channel width (MHz)
* \param txPowerW transmit power (W) to allocate
* \param guardBandwidth width of the guard band (MHz)
+ * \param minInnerBandDbr the minimum relative power in the inner band (in dBr)
+ * \param minOuterbandDbr the minimum relative power in the outer band (in dBr)
+ * \param lowestPointDbr maximum relative power of the outermost subcarriers of the guard band (in dBr)
* \return a pointer to a newly allocated SpectrumValue representing the HE OFDM Transmit Power Spectral Density in W/Hz for each Band
*/
- static Ptr CreateHeOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth);
+ static Ptr CreateHeOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth,
+ double minInnerBandDbr = -20, double minOuterbandDbr = -28, double lowestPointDbr = -40);
/**
* Create a power spectral density corresponding to the noise
@@ -157,6 +169,7 @@ public:
* Create a transmit power spectral density corresponding to OFDM
* transmit spectrum mask requirements for 11a/11g/11n/11ac/11ax
* Channel width may vary between 5, 10, 20, 40, 80, and 160 MHz.
+ * The default (standard) values are illustrated below.
*
* [ guard band ][ channel width ][ guard band ]
* __________ __________ _ 0 dBr
@@ -184,13 +197,15 @@ public:
* \param maskBand start and stop subcarrier indexes of transmit mask (in case signal doesn't cover whole SpectrumModel)
* \param txPowerPerBandW power allocated to each subcarrier in the allocated sub bands
* \param nGuardBands size (in number of subcarriers) of the guard band (left and right)
- * \param innerSlopeWidth size (in number of subcarriers) of the inner band (i.e. slope going from 0 dBr to -20 dBr)
+ * \param innerSlopeWidth size (in number of subcarriers) of the inner band (i.e. slope going from 0 dBr to -20 dBr in the figure above)
+ * \param minInnerBandDbr the minimum relative power in the inner band (i.e. -20 dBr in the figure above)
+ * \param minOuterbandDbr the minimum relative power in the outer band (i.e. -28 dBr in the figure above)
* \param lowestPointDbr maximum relative power of the outermost subcarriers of the guard band (in dBr)
* \return a pointer to a newly allocated SpectrumValue representing the HT OFDM Transmit Power Spectral Density in W/Hz for each Band
*/
static void CreateSpectrumMaskForOfdm (Ptr c, std::vector allocatedSubBands, WifiSpectrumBand maskBand,
- double txPowerPerBandW, uint32_t nGuardBands,
- uint32_t innerSlopeWidth, double lowestPointDbr);
+ double txPowerPerBandW, uint32_t nGuardBands, uint32_t innerSlopeWidth,
+ double minInnerBandDbr, double minOuterbandDbr, double lowestPointDbr);
/**
* Normalize the transmit spectrum mask generated by CreateSpectrumMaskForOfdm
diff --git a/src/wifi/model/spectrum-wifi-phy.cc b/src/wifi/model/spectrum-wifi-phy.cc
index 76404ce44..d6ad2e964 100644
--- a/src/wifi/model/spectrum-wifi-phy.cc
+++ b/src/wifi/model/spectrum-wifi-phy.cc
@@ -24,6 +24,7 @@
*/
#include "ns3/log.h"
+#include "ns3/double.h"
#include "ns3/boolean.h"
#include "ns3/net-device.h"
#include "ns3/node.h"
@@ -47,10 +48,26 @@ SpectrumWifiPhy::GetTypeId (void)
.SetParent ()
.SetGroupName ("Wifi")
.AddConstructor ()
- .AddAttribute ("DisableWifiReception", "Prevent Wi-Fi frame sync from ever happening",
+ .AddAttribute ("DisableWifiReception",
+ "Prevent Wi-Fi frame sync from ever happening",
BooleanValue (false),
MakeBooleanAccessor (&SpectrumWifiPhy::m_disableWifiReception),
MakeBooleanChecker ())
+ .AddAttribute ("TxMaskInnerBandMinimumRejection",
+ "Minimum rejection (dBr) for the inner band of the transmit spectrum mask",
+ DoubleValue (-20.0),
+ MakeDoubleAccessor (&SpectrumWifiPhy::m_txMaskInnerBandMinimumRejection),
+ MakeDoubleChecker ())
+ .AddAttribute ("TxMaskOuterBandMinimumRejection",
+ "Minimum rejection (dBr) for the outer band of the transmit spectrum mask",
+ DoubleValue (-28.0),
+ MakeDoubleAccessor (&SpectrumWifiPhy::m_txMaskOuterBandMinimumRejection),
+ MakeDoubleChecker ())
+ .AddAttribute ("TxMaskOuterBandMaximumRejection",
+ "Maximum rejection (dBr) for the outer band of the transmit spectrum mask",
+ DoubleValue (-40.0),
+ MakeDoubleAccessor (&SpectrumWifiPhy::m_txMaskOuterBandMaximumRejection),
+ MakeDoubleChecker ())
.AddTraceSource ("SignalArrival",
"Signal arrival",
MakeTraceSourceAccessor (&SpectrumWifiPhy::m_signalCb),
@@ -374,7 +391,8 @@ SpectrumWifiPhy::GetTxPowerSpectralDensity (uint16_t centerFrequency, uint16_t c
{
case WIFI_MOD_CLASS_OFDM:
case WIFI_MOD_CLASS_ERP_OFDM:
- v = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (centerFrequency, channelWidth, txPowerW, GetGuardBandwidth (channelWidth));
+ v = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (centerFrequency, channelWidth, txPowerW, GetGuardBandwidth (channelWidth),
+ m_txMaskInnerBandMinimumRejection, m_txMaskOuterBandMinimumRejection, m_txMaskOuterBandMaximumRejection);
break;
case WIFI_MOD_CLASS_DSSS:
case WIFI_MOD_CLASS_HR_DSSS:
@@ -383,10 +401,12 @@ SpectrumWifiPhy::GetTxPowerSpectralDensity (uint16_t centerFrequency, uint16_t c
break;
case WIFI_MOD_CLASS_HT:
case WIFI_MOD_CLASS_VHT:
- v = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (centerFrequency, channelWidth, txPowerW, GetGuardBandwidth (channelWidth));
+ v = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (centerFrequency, channelWidth, txPowerW, GetGuardBandwidth (channelWidth),
+ m_txMaskInnerBandMinimumRejection, m_txMaskOuterBandMinimumRejection, m_txMaskOuterBandMaximumRejection);
break;
case WIFI_MOD_CLASS_HE:
- v = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (centerFrequency, channelWidth, txPowerW, GetGuardBandwidth (channelWidth));
+ v = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (centerFrequency, channelWidth, txPowerW, GetGuardBandwidth (channelWidth),
+ m_txMaskInnerBandMinimumRejection, m_txMaskOuterBandMinimumRejection, m_txMaskOuterBandMaximumRejection);
break;
default:
NS_FATAL_ERROR ("modulation class unknown: " << modulationClass);
diff --git a/src/wifi/model/spectrum-wifi-phy.h b/src/wifi/model/spectrum-wifi-phy.h
index 0c4c3643b..e95d67644 100644
--- a/src/wifi/model/spectrum-wifi-phy.h
+++ b/src/wifi/model/spectrum-wifi-phy.h
@@ -207,7 +207,7 @@ private:
*/
void UpdateInterferenceHelperBands (void);
- Ptr m_channel; //!< SpectrumChannel that this SpectrumWifiPhy is connected to
+ Ptr m_channel; //!< SpectrumChannel that this SpectrumWifiPhy is connected to
Ptr m_wifiSpectrumPhyInterface; //!< Spectrum PHY interface
Ptr m_antenna; //!< antenna model
@@ -215,6 +215,9 @@ private:
bool m_disableWifiReception; //!< forces this PHY to fail to sync on any signal
TracedCallback m_signalCb; //!< Signal callback
+ double m_txMaskInnerBandMinimumRejection; //!< The minimum rejection (in dBr) for the inner band of the transmit spectrum mask
+ double m_txMaskOuterBandMinimumRejection; //!< The minimum rejection (in dBr) for the outer band of the transmit spectrum mask
+ double m_txMaskOuterBandMaximumRejection; //!< The maximum rejection (in dBr) for the outer band of the transmit spectrum mask
};
} //namespace ns3
diff --git a/src/wifi/test/wifi-transmit-mask-test.cc b/src/wifi/test/wifi-transmit-mask-test.cc
index 8fb2d2c9d..51826a842 100644
--- a/src/wifi/test/wifi-transmit-mask-test.cc
+++ b/src/wifi/test/wifi-transmit-mask-test.cc
@@ -98,13 +98,14 @@ WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
uint16_t freq = 5170 + (bw / 2); // so as to have 5180/5190/5210/5250 for 20/40/80/160
double refTxPowerW = 1; // have to work in dBr when comparing though
m_tolerance = tol; // in dB
+ double outerBandMaximumRejection = -40; // in dBr
switch (standard)
{
case WIFI_PHY_STANDARD_80211p:
NS_ASSERT ((bw == 5) || (bw == 10));
freq = 5860;
- m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw);
+ m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
break;
// 11g and 11a
@@ -114,7 +115,7 @@ WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
case WIFI_PHY_STANDARD_80211a:
case WIFI_PHY_STANDARD_holland:
NS_ASSERT (bw == 20);
- m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw);
+ m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
break;
// 11n
@@ -122,15 +123,16 @@ WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
if (band == WIFI_PHY_BAND_2_4GHZ)
{
freq = 2402 + (bw / 2); //so as to have 2412/2422 for 20/40
+ outerBandMaximumRejection = -45;
}
NS_ASSERT (bw == 20 || bw == 40);
- m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw);
+ m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
break;
// 11ac
case WIFI_PHY_STANDARD_80211ac:
NS_ASSERT (bw == 20 || bw == 40 || bw == 80 || bw == 160);
- m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw);
+ m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
break;
// 11ax
@@ -139,9 +141,10 @@ WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
{
NS_ASSERT (bw != 160); // not enough space in 2.4 GHz bands
freq = 2402 + (bw / 2); //so as to have 2412/2422 for 20/40
+ outerBandMaximumRejection = -45;
}
NS_ASSERT (bw == 20 || bw == 40 || bw == 80 || bw == 160);
- m_actualSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw);
+ m_actualSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (freq, bw, refTxPowerW, bw, -20.0, -28.0, outerBandMaximumRejection);
break;
// other