Bug 543

Summary: noiseFloor -> noiseFigure
Product: ns-3 Reporter: Nicola Baldo <nicola>
Component: wifiAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage, timo.bingmann
Priority: P5 Keywords: patch
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: noiseFloor -> noiseFigure

Description Nicola Baldo 2009-04-08 09:06:22 UTC
Created attachment 416 [details]
noiseFloor -> noiseFigure

In the current wifi code there are several variables and methods which are named after the term "noise floor". Given the way these variable are used (see in particular InterferenceHelper::CalculateSnr()), it is evident that these variables actually refer to the well-established concept of "noise figure"[1]. 

Moreover, InterferenceHelper::m_noiseFloorW is definitly misnamed, since from the way this variable is used in InterferenceHelper::CalculateSnr() it is clear that the variable is dimensionless, not in W. 

The attached patches introduces a more correct naming. Functionality is not affected (i.e., the way the variables are used does not change, and the default value of the associated attribute remains the same).

[1] http://en.wikipedia.org/wiki/Noise_figure
Comment 1 TimoB 2009-04-08 09:40:33 UTC
Sorry, but I disagreed:
The signal argument to the CalculateSnr() function is in watt.
To get snr (in plain-ratio) noise and interference are in watt as well.
Comment 2 Nicola Baldo 2009-04-08 10:11:38 UTC
(In reply to comment #1)
> Sorry, but I disagreed:
> The signal argument to the CalculateSnr() function is in watt.
> To get snr (in plain-ratio) noise and interference are in watt as well.
> 

please note that the  "noiseFloor" variable which is declared locally within the body of InterferenceHelper::CalculateSnr() is indeed in W, and since it represents the power of noise it makes sense to name it "noise floor". For this reason, the proposed patch leaves it with the same name. 

On the other hand, the variable InterferenceHelper::m_noiseFloorW, which actually refers to the noise figure, is not in W, it is dimensionless.
Comment 3 TimoB 2009-04-08 10:40:24 UTC
Okay thanks, yes now I see you changed the RxNoise of YansWifiPhy.
This is indeed a dimensionless multiplier. I mixed it up with the noiseFloor in CalculateSnr().
I fully agree, and also stumbled on that previously.
Comment 4 Mathieu Lacage 2009-04-09 04:17:50 UTC
ok for me: can you add a comment somewhere with a link to a definition of "noise figure" ? Maybe somehing like a decent reference paper or wikipedia link ?

Anyway, feel free to commit yourself if you have commit powers: let me know if you don't have them.
Comment 5 Nicola Baldo 2009-04-09 06:14:55 UTC
(In reply to comment #4)
> ok for me: can you add a comment somewhere with a link to a definition of
> "noise figure" ? Maybe somehing like a decent reference paper or wikipedia link
> ?

I already included the definition of noise figure as reported by wikipedia. I put it into the description of the RxNoiseFigure attribute in YansWifiPhy::GetTypeId(). Is that sufficient? 

> 
> Anyway, feel free to commit yourself if you have commit powers: let me know if
> you don't have them.
> 

I don't have commit powers, otherwise I would be glad to commit it by myself.





Comment 6 Nicola Baldo 2009-04-15 11:17:37 UTC
committed (changeset 56a5bf298339)