HybridBuildingsPropagationLossModel info

161 views
Skip to first unread message

Angelo Trotta

unread,
Apr 7, 2017, 2:01:35 PM4/7/17
to ns-3-users
Hi everybody,
I'm trying to make a simulation with the HybridBuildingsPropagationLossModel model.
The simplest simulation that I'm doing is with only two nodes and they can move also on the "z" coordinate, but they are always at the same height.
The problem is that they can communicate only at 2-3 meters... after that the communication link disappear.  Looking at the received SNR I see that at a distance of less then 1 meter the SNR=~80 and with distance greater then 1 the SNR drop to 20-30. I don't added yet any building. What am I doing wrong? Here there is the channel definition, while in attachment you can find the whole code (almost).

/****************************************************************************************************/
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiChannel.AddPropagationLoss("ns3::HybridBuildingsPropagationLossModel",
    "RooftopLevel", DoubleValue(10), "Environment", StringValue("OpenAreas"),  "CitySize", StringValue("Large")
    //"ShadowSigmaOutdoor", DoubleValue(0.0),  "ShadowSigmaIndoor", DoubleValue(0.0),  "ShadowSigmaExtWalls", DoubleValue(0.0)
    );
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, nodes);
/****************************************************************************************************/
Thank you.
  Angelo T.
help.cc

Angelo Trotta

unread,
Apr 8, 2017, 4:13:20 AM4/8/17
to ns-3-users
Hi,
I'm also trying to use another channel:
/********************************************************************************************************/
SpectrumChannelHelper s_channelHelper = SpectrumChannelHelper::Default ();
s_channelHelper.SetChannel ("ns3::MultiModelSpectrumChannel");
// constant path loss added just to show capability to set different propagation loss models
// FriisSpectrumPropagationLossModel already added by default in SpectrumChannelHelper
s_channelHelper.AddSpectrumPropagationLoss ("ns3::HybridBuildingsPropagationLossModel");
Ptr<SpectrumChannel> s_channel = s_channelHelper.Create ();
SpectrumWifiPhyHelper wifiPhy = SpectrumWifiPhyHelper::Default ();
wifiPhy.SetChannel (s_channel);
/********************************************************************************************************/
But if I add the HybridBuildingsPropagationLossModel, I get an error when starting ns3.
Can anybody explain me haow to use the HybridBuildingsPropagationLossModel?

Thank you
  Angelo

Tommaso Pecorella

unread,
Apr 21, 2017, 4:54:53 PM4/21/17
to ns-3-users
Hi Angelo,

this is a common error and it has been discussed in the past.

The YansWifiChannelHelper::Default call will automatically set a LogDistancePropagationLossModel in the channel and the 
AddPropagationLoss call will add another propagation loss model - without touching the previous one.

If you want to use just one propagation loss model and get rid of the LogDistancePropagationLossModel you have to avoid the Default call and set your own stuff in the channel.
Remember to add also a PropagationDelay model. Look at the Default code for hints.

T.
Reply all
Reply to author
Forward
0 new messages