自由空间路损在ns2中的应用
Free Space Path-loss as in ns2
<伊落丹> illidan.modeler [at] gmail.com
Northern Capital, Republic of Pandaren
Free space path-loss is a major factor when considering the attenuation of EM signal strength. Basically it's defined by the following equation:
Pt: transmitted power
Pr: received power
d: the distance between transmitter and receiver
f: the signal frequency
c: light speed
Recast the equation in dB form, we get
Take the FSPL of a IEEE 802.11 WLAN signal for example. The relation between FSPL and distance is depicted below:
where the transmission power is about 10 mW, without considering antenna gain and other attenuation.
In ns2, path loss, which is an effect of the physical layer, is handled by class WirelessPhy (mac/wirelss-phy.{h,cc}). WirelessPhy calculates the path loss in its method sendUp(), by calling FreeSpace::Pr(PacketStamp *t, PacketStamp *r, WirelessPhy *ifp). FreeSpace and its parent Propagation are defined in mobile/propagation.{h, cc}.
The code snipit carrying out the call to FreeSpace's method is given below (wireless-phy.cc):
The real meat of the path loss calculation is Propagation's method Friis(), which not only deals with free-space path loss but also considers antenna gains. (Note: By my obervation, antenna gain is actually 0 dB by default, revealed in Antenna::getTxGain().)
For a description of path loss and link budget analysis, turn to sub-section 5.2 of [Sklar 2001].
References
1. [Book] [Sklar 2001]
<伊落丹> illidan.modeler [at] gmail.com
Northern Capital, Republic of Pandaren
Of the Net, by the Net, for the Net
Free space path-loss is a major factor when considering the attenuation of EM signal strength. Basically it's defined by the following equation:
Pt/Pr = (4*Pi*d*f/c)^2 |
Pt: transmitted power
Pr: received power
d: the distance between transmitter and receiver
f: the signal frequency
c: light speed
Recast the equation in dB form, we get
FSPL (dB) = -147.56 + 20*log10(d) + 20*log10(f) |
Take the FSPL of a IEEE 802.11 WLAN signal for example. The relation between FSPL and distance is depicted below:
where the transmission power is about 10 mW, without considering antenna gain and other attenuation.
In ns2, path loss, which is an effect of the physical layer, is handled by class WirelessPhy (mac/wirelss-phy.{h,cc}). WirelessPhy calculates the path loss in its method sendUp(), by calling FreeSpace::Pr(PacketStamp *t, PacketStamp *r, WirelessPhy *ifp). FreeSpace and its parent Propagation are defined in mobile/propagation.{h, cc}.
The code snipit carrying out the call to FreeSpace's method is given below (wireless-phy.cc):
if(propagation_) { |
The real meat of the path loss calculation is Propagation's method Friis(), which not only deals with free-space path loss but also considers antenna gains. (Note: By my obervation, antenna gain is actually 0 dB by default, revealed in Antenna::getTxGain().)
For a description of path loss and link budget analysis, turn to sub-section 5.2 of [Sklar 2001].
References
1. [Book] [Sklar 2001]