Bug 3013 - Noise PSD is not updated when phyCurrentChannel is set
Noise PSD is not updated when phyCurrentChannel is set
Status: NEW
Product: ns-3
Classification: Unclassified
Component: lr-wpan
All All
: P5 normal
Assigned To: Tom Henderson
Depends on:
  Show dependency treegraph
Reported: 2018-11-15 13:20 EST by Guilherme Lello
Modified: 2018-11-15 13:20 EST (History)
1 user (show)

See Also:

Diff from ns-3-dev fixing the build and the reported issue (2.63 KB, text/plain)
2018-11-15 13:20 EST, Guilherme Lello

Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Lello 2018-11-15 13:20:42 EST
Created attachment 3215 [details]
Diff from ns-3-dev fixing the build and the reported issue

When the phyCurrentChannel attribute is changed from its default value (11) by calling LrWpanPhy::PlmeSetAttributeRequest, the noise power spectral density, stored in the LrWpanPhy::m_noise member, is not updated accordingly. The observed effect is that, for any channel number other than the defaut value, the spectrum channel seems to be ideal, free of packet loss.

This problem can be easily reproduced, starting with the example src / lr-wpan / examples / lr-wpan-error-distance-plot.cc. However, in fact, there is another bug in this example regarding phyCurrentChannel change that must be fixed first. The patches for both the example and lr-wpan-phy.cc are attached.

After the example is patched, the psr plot behaves as expected only if the example is run with the default channel number value. On the other hand, if the channelNumber command-line argument specifies any other value (e.g. 12), no packet will be lost due to path loss in the simulation.

After patching both the example and lr-wpan-phy.cc and then running the simulation one more time, the correct behavior is observed.

Both patches were created from commit 5c4e5b38e53ec2379064a766a451d888f71a2f3a. There are also modifications in files src/wifi/model/he-configuration.cc and src/wifi/model/he-configuration.h in order to fix the build, which is currently broken for ns-3-dev.