SpectrumWifiPhy support for channels other than 36,40,44 and 48

49 views
Skip to first unread message

saumil shah

unread,
Feb 22, 2018, 10:59:14 AM2/22/18
to ns-3-users
Dear All,

I am working on ns-3-lbt module. I would like to expand spectrumwifiphy model for frequency other than 36,40,44 and 48. As currently these 4 frequencies are only supported from 5GHz band. I wan to configure some channels 52-64 and 100-104 which can be use for indoor propagation in Europe region.

WifiSpectrumHelper class limits the use of toher channels than mention 4 channels. Because in src/wifi/model/spectrum-wifi-helper.cc file we have following FATAL_ERROR.

NS_FATAL_ERROR ("Only channel 36, 40, 44, and 48 supported initially");

Above FATAL_ERROR is called in 3 functions as mentioned below.

1) GetFreqMHzForChannel(uint16_t channel)
2) CreateTxPowerSpectralDensity (double txPower, WifiMode mode, uint32_t channel)
3) CreateRfFilter (uint32_t channel)

First function can be modified easily to support for other channels. But second and third functions uses some logic which i am not able to understand. As example for channel = 36 second and 3rd function contains below code.

Ptr<SpectrumValue>
WifiSpectrumHelper::CreateRfFilter (uint32_t channel)
{
  NS_LOG_FUNCTION_NOARGS ();
  Ptr<SpectrumValue> c = Create <SpectrumValue> (GetSpectrumModel (WifiPhy::GetOfdmRate6Mbps ()));
  (*c) = 0;
  if ((channel != 36) && (channel != 40) && (channel != 44) && (channel != 48))
    {
      NS_FATAL_ERROR ("Only channels 36, 40, 44, and 48 supported initially");
    }
  // For now, perfect 20Mhz-wide window
  Values::iterator vit = c->ValuesBegin ();
 

  for (uint16_t i = 0; i < c->GetSpectrumModel ()->GetNumBands (); i++, vit++)
    {

      if (channel == 36)
        {
          if (i >= 6 && i <= 9)
            {
              *vit = 1;
            }

        }
---------------
}

I am not able to understand based on what, value of i is chosen for above condition. Can someone give me any reference for it so may be i can extend it for other channels too?

Or is there any other way to support extra channels in SpectrumWifiPhy ?

Best Regards
Saumil Shah

Rediet

unread,
Feb 27, 2018, 3:03:59 AM2/27/18
to ns-3-users
Hello Saumil,

Have a look at how it's been globally handled in ns-3-dev, i.e. all the work that's been done since ns-3-lbt module has been branched off from main development branch.

Rediet

saumil shah

unread,
Mar 2, 2018, 10:33:46 AM3/2/18
to ns-3-users
Hello Rediet,

Thanks for the suggestion. I have looked at it in ns-3-dev branch and i think i can modify things based on that.

Best Regards
Saumil
Reply all
Reply to author
Forward
0 new messages