Bug 2001

Summary: Cost231PropagationLossModel is imprecise
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: propagationAssignee: Nicola Baldo <nicola>
Status: PATCH PENDING ---    
Severity: enhancement CC: krotov, ns-bugs, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Bug Depends on: 2011    
Bug Blocks:    
Attachments: proposed patch
Proposed patch

Description Tommaso Pecorella 2014-10-03 16:27:55 EDT
The model is "wrong" in two main points:
1) the speed of light is 299792458 m/s, not 300000000 m/s.
2) the last term in the equation is set to 10 dB, whereas the model states that it should be either 0 or 3 dB (depending on the environment).

Fixing the two may change (slightly) the simulation results. Even not so slightly, since there will be a 7dB difference (at best).
Comment 1 Tom Henderson 2014-10-20 09:39:46 EDT
sorry, I didn't realize the speed of light discussion was here also; opened a separate bug 2011 for the constant value.  

Let's keep this bug scoped to the Cost231 model, and make the fix of lambda depend on the bug 2011.
Comment 2 Nicola Baldo 2016-10-12 18:04:52 EDT
Created attachment 2613 [details]
proposed patch

Here is a proposed patch addressing the two issues mentioned by Tommaso. I did not test it.

As Tommaso mentioned, the change affects the behavior of the model for all distances, with a non negligible impact in simulation results for typical scenarios. 

I am not sure how much this COST 231 model implementation is used, I just recall that LTE simulation typically use OkumuraHataPropagationLossModel, which is in fact an alternative implementation of this model. I've seen just a few examples in the code base that use this model. This considered, how do you feel about pushing this patch?
Comment 3 Alexander Krotov 2016-12-28 12:03:58 EST
Created attachment 2718 [details]
Proposed patch

Fixed default value for Lambda attribute so it corresponds to default Frequency.
Comment 4 Tommaso Pecorella 2017-12-03 07:24:52 EST
There's an additional point, raised in the ns-3 users' group:
https://groups.google.com/forum/#!topic/ns-3-users/cQpBK9XbpGc

The COST 231 model is meant to be used in 1.5-2.0 GHz range, while the default frequency in the model is 2.3 GHz.

We should (at least) give a warning when one uses the model outside the normal range and (definitely) not use a default value of 2.3 GHz.