Bug 2783 - WifiPhy::NotifyMonitorSniffRx() is insensitive to RxNoiseFigure
WifiPhy::NotifyMonitorSniffRx() is insensitive to RxNoiseFigure
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
unspecified
All All
: P3 normal
Assigned To: sebastien.deronne
:
: 2784 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-15 01:43 EDT by Tom Henderson
Modified: 2017-09-26 02:43 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-09-15 01:43:26 EDT
NotifyMonitorSniffRx() reports signal and noise as follows (line 2550 in wifi-phy.cc):

          signalNoise.signal = RatioToDb (event->GetRxPowerW ()) + 30;
          signalNoise.noise = RatioToDb (event->GetRxPowerW () / snrPer.snr) - GetRxNoiseFigure () + 30;

However, RxNoiseFigure is already accounted for in the snrPer calculation of InterferenceHelper.

A user (Izydor Sokoler) suggests this statement instead:

          signalNoise.noise = RatioToDb (event->GetRxPowerW () / snrPer.snr) + 30;

and complained that, e.g. the wifi-spectrum-per-example.cc, which reports this trace as the SNR, is insensitive to changing RxNoiseFigure values.
Comment 1 sebastien.deronne 2017-09-20 16:50:33 EDT
I agree with the proposed change.
Comment 2 Tom Henderson 2017-09-21 12:56:36 EDT
Before the patch:
----------------
$ ./waf --run 'wifi-spectrum-per-example --ns3::WifiPhy::RxNoiseFigure=7'

wifiType: ns3::SpectrumWifiPhy distance: 50m; sent: 1000 TxPower: 1 dBm (1.3 mW)
index   MCS Rate (Mb/s) Tput (Mb/s) Received Signal (dBm) Noise (dBm)  SNR (dB)
    0     0       6.5     5.76513    7414    -79.6633    -100.966     21.3027
    1     1        13       11.58   14892    -79.6633    -100.966     21.3027
    2     2      19.5     17.3856   22358    -79.6633    -100.966     21.3027
    3     3        26     22.9991   29577    -79.6633    -100.966     21.3027
    4     4        39           0       0         N/A         N/A         N/A

$ ./waf --run 'wifi-spectrum-per-example --ns3::WifiPhy::RxNoiseFigure=10'

wifiType: ns3::SpectrumWifiPhy distance: 50m; sent: 1000 TxPower: 1 dBm (1.3 mW)
index   MCS Rate (Mb/s) Tput (Mb/s) Received Signal (dBm) Noise (dBm)  SNR (dB)
    0     0       6.5     5.76513    7414    -79.6633    -100.966     21.3027
    1     1        13       11.58   14892    -79.6633    -100.966     21.3027
    2     2      19.5     17.3825   22354    -79.6633    -100.966     21.3027
    3     3        26           0       0         N/A         N/A         N/A


After the patch:
----------------
$ ./waf --run 'wifi-spectrum-per-example --ns3::WifiPhy::RxNoiseFigure=7'

wifiType: ns3::SpectrumWifiPhy distance: 50m; sent: 1000 TxPower: 1 dBm (1.3 mW)
index   MCS Rate (Mb/s) Tput (Mb/s) Received Signal (dBm) Noise (dBm)  SNR (dB)
    0     0       6.5     5.76513    7414    -79.6633     -93.966     14.3027
    1     1        13       11.58   14892    -79.6633     -93.966     14.3027
    2     2      19.5     17.3856   22358    -79.6633     -93.966     14.3027
    3     3        26     22.9991   29577    -79.6633     -93.966     14.3027
    4     4        39           0       0         N/A         N/A         N/A

$ ./waf --run 'wifi-spectrum-per-example --ns3::WifiPhy::RxNoiseFigure=10'

wifiType: ns3::SpectrumWifiPhy distance: 50m; sent: 1000 TxPower: 1 dBm (1.3 mW)
index   MCS Rate (Mb/s) Tput (Mb/s) Received Signal (dBm) Noise (dBm)  SNR (dB)
    0     0       6.5     5.76513    7414    -79.6633     -90.966     11.3027
    1     1        13       11.58   14892    -79.6633     -90.966     11.3027
    2     2      19.5     17.3825   22354    -79.6633     -90.966     11.3027
    3     3        26           0       0         N/A         N/A         N/A

i.e. performance is not affected by the patch, but reporting of SNR is.  Conceptually, this patch shifts the point of SNR measurement from input to output of amplifier, but this is probably what is expected by users.  I will update and also update documentation (doxygen and manual) about this.
Comment 3 Tom Henderson 2017-09-22 12:46:15 EDT
fixed in changeset 13076:a04e85356951
Comment 4 sebastien.deronne 2017-09-26 02:43:02 EDT
*** Bug 2784 has been marked as a duplicate of this bug. ***