[Ns-developers] [NS-developers] Bug in the shadowing model for ns3-lte
nbaldo at cttc.es
Wed Sep 7 08:28:30 PDT 2011
On 09/07/2011 05:06 PM, lucaanchora at virgilio.it wrote:
> Dear all,
> I noted a bug in the implementation of the shadowing model in ns3-lte.
> In the files src/devices/lte/shadowing-loss-model.hh(cc) the shadowing
> is declared as a LogNormal random variable (property m_randVariable).
> Actually, what is lognormally distributed is the value in natural
> units and not in dB (which has a Normal distribution).
> On the contrary, in the current implementation
> the lognormal distribution is used for the values in dB
> (see the file src/devices/lte/propagation-loss-model.cc, method
> DoCalcRxPowerSpectralDensity), with the result that the
> value for the shadowing is always positive and can assume quite
> large values (e.g, several hundreds or thousands). This, of course,
> results in an incredible attenuation that prevents the destination from
> receiving the signal.
> A fast solution could be to declare the property m_randVariable
> of the class ShadowingLossModel as NormalVariable* and not LogNormalVariable*.
> Then, when in the constructors this variable is assigned to an
> object of class NormalVariable, it is important to be careful with the
> parameters passed for the construction. The first is the mean (mu), while
> the second one is the variance (sigma^2) and not the standard error (sigma).
> So, if for example one wants a shadowing whose value (in natural units) is
> lognormally distributed with mean = 0 dB and \sigma = 8 dB,
> he should do something like
> m_randVariable = new NormalVariable (.0, 64.0);
> Is my observation right?
thanks for this report. To my understanding, your observations are
correct. Can you please post a bug report on bugzilla, so we keep track
of this issue? A cut & paste of your email would be enough, of course if
you could also provide a patch it would be great.
More information about the Ns-developers