Bug 1259 - Bug in the shadowing model for ns3-lte
Bug in the shadowing model for ns3-lte
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: general
ns-3.9
All All
: P5 critical
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-09 04:57 UTC by Luca
Modified: 2012-05-19 11:18 UTC (History)
1 user (show)

See Also:


Attachments
Possible corrections for the shadowing loss model (2.13 KB, application/zip)
2011-09-09 04:57 UTC, Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca 2011-09-09 04:57:38 UTC
Created attachment 1241 [details]
Possible corrections for the shadowing loss model

Dear all,
I noted a bug in the implementation of the shadowing model in ns3-lte
(version ns-3.9).
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);

I attach the two files, src/devices/lte/shadowing-loss-model.hh(cc), with
the corrections aforementioned.

Luca
Comment 1 Tom Henderson 2012-05-18 17:24:42 UTC
Need to revisit in light of recent LTE merge
Comment 2 Nicola Baldo 2012-05-19 11:18:20 UTC
Fixed with the LENA merge, the shadowing model (now part of the buildings model) returns  dB values that are normally distributed.