0% found this document useful (0 votes)
36 views7 pages

Wireless Channel 802.11 in NS-3: Technical Note

Uploaded by

GNG NK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views7 pages

Wireless Channel 802.11 in NS-3: Technical Note

Uploaded by

GNG NK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.

v1

Technical Note
Wireless Channel 802.11 in NS-3
Lesly Maygua-Marcillo1 , Luis Urquiza-Aguiar1 , Martha Paredes-Paredes1
1
Departamento de Electrónica, Telecomunicaciones y Redes de Información, Facultad de Eléctrica y
Electrónica, Escuela Politécnica Nacional (EPN), C. Ladrón de Guevara E11-253, Quito PO.Box
17-01-2759, Ecuador; lesly.maygua@epn.edu.ec, cecilia.paredes@epn.edu.ec.
* Correspondence: luis.urquiza@epn.edu.ec; Tel.: +593-2-2976300 ext 2311

Received: 12 February 2018

Abstract: Network Simulators (NS) is typically used to study services and applications in complex
scenarios due to the infeasibility of deploying real testbeds. This is the case of Mobile Ad hoc Networks
(MANETs) which can be extensively used in emergency situations or to gather information without
infraestructure. An important factor to get realiable results in the MANETs’ simulations is the wireless
channel module of NSs. In this report, we explain how thw wireless channel is implemented in NS-3
and it can be configured.

Keywords: NS-3, simulation, wireless channel, propagation model.

1. Introduction
A wireless communication allows sending a signal or a certain amount of data from one point
to another (transmitter and receiver) without the need for a guided medium.A wireless channel uses
a specific frequency band to transmit information. The wireless channel of IEEE 802.11, one of the
enabled technologies for MANETs, employs the 2.4 GHz or 5.9 GHz band. The Wireless Channel 802.11
in NS-3 tries to model the real functionality of the standard.

2. Overview
Wireless Channel 802.11 in NS-3 is modeled by the class YansWifiChannel which works together
with WifiPhy class. WifiChannel includes the helper class YansWifiChannelHelper. By means of the
latter, we can configure predefined channels with propagation and delay models [1].
Each channel use two models for its configuration. These are:
− PropagationLossModel
− PropagationDelayModel
In NS-3, the default 802.11 channel considers the following models: A delay propagation model
equal to a constant and a propagation loss model based on log normal distribution. More specifically,
they are named: ConstantSpeedPropagationDelayModel and LogDistancePropagationLossModel [1].
Now, we analyze the propagation and delay models in NS-3.

PropagationLossModel
These models calculate the reception power considering the transmission power and position of
transmitting and receiving antennas.

• Cost231PropagationLossModel: This model extends to the range of 1500 MHz to 2000 MHz.
It is designed for suburban area.

• FixedRssLossModel: It establishes a constant reception power level (configurable) independent


of the transmission power. If we consider several loss models, this should be the first model to
avoid excluding the losses calculated by the other included models.

© 2018 by the author(s). Distributed under a Creative Commons CC BY license.


Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.v1

2 of 7

To configure this model in a NS-3 simulation need only an attribute. This attribute is Rss and
we can use the following command line:
wifiChannel.AddPropagationLoss("ns3::FixedRssLossModel","Rss",DoubleValue
(-80));

• FriisPropagationLossModel: It implements the Friis’ propagation loss model. It allows to


predict the power level that will be received considering some distance in ideal conditions. That is,
without obstacles of any nature near the link that may affect the electromagnetic propagation [2].
The original formula considering the case of an isotropic antenna without heat loss was described
as:

Pr λ2
= (1)
Pt (4π ∗ d)2

Update we have:
Pt Gt Gr λ2
Pr = L (2)
(4π ∗ d)2

Where: Pt :Transmission power(w)


Pr :Reception power (w)
Gt :Transmission gain (dimensionless)
Gr :Reception gain (dimensionless)
λ: Wavelength (m)
d: Distance (m)
L: System loss (dimensionless)

Implementing, f = c/λ , where C is the speed of light in vacuum, and f is the frequency in Hz. This
model is valid only for propagation in free space. This model is used for small to medium distances.

The attributes used for this model in NS-3 are:


- Frequency: The carrier frequency at which propagation occurs (Hz).
- MinLoss: The minimum value of the total loss (dB). Initial value: 0. - SystemLoss: Set the
system loss used by the Friis propagation model. Initial value: 1.

To configure the FriisPropagationLossModel function in a simulation scenario, it is necessary to


add the following line:
wifiChannel.AddPropagationLoss("ns3::FriisPropagationLossModel","Frequency",DoubleValue
(5.15e9),"SystemLoss",DoubleValue (1),"MinLoss",DoubleValue (0));

• TwoRayGroundPropagationLossModel: It implements a loss propagation model with a


diredt ray in line of sight and a second one reflected to earth. This model uses the following
equation:

Pt Gt Gr (Ht2 ∗ Hr2 )
Pr = (3)
d4 ∗ L
This model does not give good results for short distances due to the oscillations caused by the
constructive and destructive combination of the two rays.
To use this model in ns-3 in necessary to consider the following attributes:
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.v1

3 of 7

- Frequency: The carrier frequency at which propagation occurs (Hz).


- HeightAbove: The height of the antenna (m).
- MinDistance: At this distance the propagation model refuses to give results (m).
- SystemLoss: Set the system loss used by the Two Ray Ground propagation model.Initial value: 1.

The command line that allow us configure this model is:

wifiChannel.AddPropagationLoss("ns3::TwoRayGroundPropagationLossModel",
"Frequency",DoubleValue (), "HeightAboveZ", DoubleValue
(1.5),"MinDistance",DoubleValue ());

• LogDistancePropagationLossModel: The reception power is calculated with the logarithmic


distance model.
d
L = L0 + 10nlog ( ) (4)
d0
where: n:Path loss distance exponent
d0 :Reference distance (m)
L0 :Path loss at reference distance (dB)
d:Distance (m)
L:Path loss (dB)

To set the model in NS-3 is necessary consider the following attributes:


- Exponent: Exponent of the Path Loss propagation model. NS-3 value:3.
- ReferenceDistance: Distance at which the reference loss is calculated (m).
- ReferenceLoss: Reference loss at reference distance (dB).Default is Friis at 1m with 5.15 GHz.

• ThreeLogDistancePropagationLossModel: It’s the same model as LogDistance but


considering three distances (close, in the middle and far) with different exponents.
When the path loss is requested at a distance less than the reference distance d0 , the transsmission
power is returned (without path loss). The reference distance is set by default to 1 m and the
reference loss is predetermined in FriisPropagationLossModel with 5.15 GHz and, therefore, L0 =
46.67 dB.

• ItuR1411LosPropagationLossModel: Model is designed for systems without line of sight,


short range outdoor on rooftops at frequencies from 300 MHz to 100 GHz. The model depends of
several parameters, such as: street width, orientation, etc. The model expresses its loss based on
the sum of: loss of free space, the diffraction loss of the roof to the street and the reduction due
to the multiple diffraction screens of buildings.

• JakesPropagationLossModel: It is a deterministic model. It is used in cellular mobile


communications. It sses the Clark’s method. NS-3 uses two parameters for this model:
DopplerFrequencyHz, NumberOfOscillators [3].

• Kun2600MhzPropagationLossModel: For urban areas at a frequency of 2600 MHz.

• MatrixPropagationLossModel: The propagation loss is fixed for each pair of nodes and does
not depend on their actual positions. Useful for synthetic tests. By default it is assumed that the
propagation loss is symmetric.

• NakagamiPropagationLossModel: It implements the fast fading Nakagami model which


explains the variations in signal strength due to multipath fading. The model does not account
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.v1

4 of 7

for the path loss due to the distance traveled by the signal. In a simulation, it is recommended to
using it in combination with other models that take into account the path loss [4].
The Nakagami distribution applied to the power level is implemented with GammaRandomVariable
or ErlangRandomVariable. [5].
Rayleigh model [6] is a special case of Nakagami model. In fact, Nakagami model describes
different fading equations. Nakagami-m only gives us the fast fading effect which simply vary the
reception power according to a Nakagami distribution.
This model include several parameters to its configuration in ns-3 which are described below:

- Distance 1: Begin the second distance field. Initial value: 80m by default.
- Distance 2: Begin the third distance field. Initial value: 200m by default.
- m0 : Used for distances smaller than Distance 1. Initial value: 1.5 by default.
- m1 : For distances smaller than Distance 2. Default is 0.75.
- m2 : For distances greater than Distance 2. Initial value: 0.75 by default.
- ErlangRv: Access to the underlying ErlangRandomVariable.
- GammaRv: Access to the underlying GammaRandomVariable.

As already mentioned above, in order to have also the effect of distance, you can add any other
model you want. In this case we show Log Distance model on top of the Nakagami. The following
command lines are necessary to set theses models.
YansWifiChannelHelper wifiChannel;
wifiChannel.AddPropagationLoss("ns3::LogDistancePropagationLossModel");
wifiChannel.AddPropagationLoss("ns3::NakagamiPropagationLossModel","m0",
DoubleValue(1),"m1", DoubleValue(1),"m2", DoubleValue(1));
You can also add any other parameters/attributes to each of the models [7].
• OkumuraHataPropagationLossModel: It is used for trajectory losses in open area and long
distances (> 1km). The original Okumura Hata model is designed for frequencies of 150 MHz
to 1500 MHz [8]. Almost all models are designed for urban areas. Therefore, the model can not
cover all scenarios in all frequencies.
• RandomPropagationLossModel: It considers a loss of random propagation; It changes every
time the model is called. As a consequence, all packages (even those that are sent between two
fixed nodes) experience a random propagation loss.
• Shadowing Model: It is modeled according to a log-normal distribution with variable standard
deviation as function of the relative position (indoor or outdoor). One random value is drawn
for each pair of MobilityModels, and stays constant for that pair during the whole simulation.
Thus,it is appropriate for static nodes only. This model considers that the mean of the shadowing
loss in dB is always 0. For the variance, there are three possibilities of standard deviation,

- outdoor (m_shadowingSigmaOutdoor, defaul value of 7 dB) → XO ∼ N (µO , σO 2 ).

- indoor (m_shadowingSigmaIndoor, defaul value of 10 dB → XI ∼ N (µI , σI2 ).


- external walls penetration (m_shadowingSigmaExtWalls, default value 5 dB) → XW ∼ N (µW ,
σW2 )

• RangePropagationLossModel: The loss depends only on the distance in meters (range)


between the transmitter and the receiver. The only MaxRange attribute determines the path
loss. The receivers in or inside the MaxRange meters receive the transmission at the transmission
power level; those beyond MaxRange receive a power at -1000 dBm.
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.v1

5 of 7

In Table 1, we show a summary of default parameters to configure propagation models [9].

Table 1. My caption

Configuration of Propagation Loss Model


Propagation model Default Parameters
Fixed RSS Rx signal strength: -150 dBm
Minimum Distance: 0.5m
Friis Wave Length: 58.25mm
System Loss: 1
Reference Distance: 1m
Log Distance Reference Loss: 46.67 dB
Exponent: 3
Distances: 1 m, 200 m, 500m
Three Log Distance Reference Loss at 1 m: 46.67 dB
Exponents: 1.9, 3.8, 3.8
Minimum Distance: 0.5m
Wave Length: 58.25mm
Two Ray Ground
Height above Z: 0m
System Loss: 1
Rays per Path: 1
Oscillators per Ray: 4
Jakes
Doppler Frequency: 0 Hz
Distribution: Constant(1)
Distances: 80 m, 200m
Nakagami
Exponents: 1.5, 0.75, 0.75
Minimum Distance: 0.5m
Center Frequency: 2.3 GHz
COST-Hata
Base Station Antenna Height: 50m
Mobile Station Antenna Height: 3m

PropagationDelayModels

For this case NS-3 can implement the following two models:

• RandomPropagationDelayModel: The propagation delay is completely random, and changes


every time the model is called. All packages, even those that are sent between two fixed nodes,
experience a random delay. As a consequence, the order of the transmitted packets is not
maintained.

• ConstantSpeedPropagationDelayModel: In this model, the signal travels with constant


speed, equal to the speed of light. The delay is calculated according to the positions of the
transmitter and the receiver. The Euclidean distance between the antennas Tx and Rx is used.
This model considers that the Earth is flat. To obtain the channel configuration by default, the
following lines of code are used:
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());

3. Configuration and Results


In this section we show the configuration of channels and the simulations carried out.
To create a network device in ns-3 we must consider the different layers. First, create the nodes.
Next, the MAC and PHY layers must be added. In this point, it is necessary to configure the channel
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.v1

6 of 7

and finally add the different stacks and applications. Fig. 1 shows the structure that the script must
have. The green box indicates the class that is used to configure the wireless channel.

Figure 1. Results of first simulation

In general, to configure a propagation loss or delay model in ns-3 is necessary the following
command line:
wifiChannel.AddPropagationLoss("ns3::PropagationLossModel","Parameter
1",DoubleValue(),"Parameter 2",DoubleValue(), "Parameter 3",DoubleValue());

This command will be modified based on the selected model and parameters.

To configure a default wireless channel in NS-3 we can use the following lines:

YansWifiChannelHelper channel=YansWifiChannelHelper::Default()

The tables 2 and 3 show the propagation and delay model used for each channel simulation.

Table 2. Models used in simulation of channel 1

CHANNEL 1
Propagation model LogDistancePropagationLossModel
Delay model ConstantSpeedPropagationDelayModel

Table 3. Models used in simulation of channel 2

CHANNEL 2
Propagation model Fixed Rss Loss Model
Delay model ConstantSpeedPropagationDelayModel

The results of the transmission are shown in Fig.2 and Fig.3. Using channel N°1 there is a loss of
60% of packets, while using channel N°2 there is a packet loss of 0%. This difference is due to the fact
that channel 2 implements a propagation loss model that allows to directly configure the reception
power without relating to the transmission power.

In order that the configuration can be analyzed by our readers at the end of the tutorial, we add
the scripts as. This concludes our tutorial.

4. Conclusions
In this note, we have reviewed how to configure a wireless channel in NS-3. We provide a review
of wireless channel available in NS-3 and provide a useful example of their configuration in a 802.11
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 19 September 2018 doi:10.20944/preprints201809.0367.v1

7 of 7

Figure 2. Results of first simulation

Figure 3. Results of second simulation

MANET simulations. Our toy example shows that the configuration of this parameters can change the
results of the simulations drastically.
Supplementary Materials: The following are available with this note: the simulation file for simulating
wireless channel in a MANET example in NS-3.
Acknowledgments: The authors gratefully acknowledge the financial support provided by the Escuela
Politécnica Nacional, for the development of the project PIJ-16-01 - “Modelamiento de la Packet Error Rate
(PER) incluyendo condiciones de Peak-to-Average Power Ratio (PAPR) para transmisiones Ad-Hoc”.

Bibliography
1. Propagation Loss Models NS-3 (2016), [Online]. Available:https://www.nsnam.org/docs/models/html/
propagation.html
2. Friis, H.T., “A Note on a Simple Transmission Formula,” Proceedings of the IRE , vol.34, no.5, pp.254,256,
May 1946
3. Jakes process (2017), [Online]. Available:https://www.nsnam.org/doxygen/classns3_1_1_jakes_process.
html#a09be54eafd7e13b6dde28dae03f27a35
4. Nakagami propagation (2017), [Online]. Available:https://www.nsnam.org/doxygen/classns3_1_1_
nakagami_propagation_loss_model.html#details
5. F.Ikegami, T.Takeuchi, and S.Yoshida, “Theoretical prediction of mean field strength for Urban Mobile
Radio”, in IEEE Trans. Antennas Propagat., Vol.39, No.3, 1991
6. M. Nakagami, “The m-Distribution, A General Formula of Intensity Distribution of Rapid Fading,” Statistical
Methods in Radio Wave Propagation, pp. 3–36, 1960.
7. Add Propagation Loss Models - NS3, (2017), [Online]. Available:https://www.nsnam.org/doxygen/classns3_
1_1_yans_wifi_channel_helper.html#a71c64d54e148b43698c65736e1c77156
8. M.Hata, “Empirical formula for propagation loss in land mobile radio services”, IEEE Trans. on Vehicular
Technology, vol. 29, pp. 317-325, 1980
9. M. Stoffers, G. Riley, "Comparing the ns–3 Propagation Models", Georgia, 2012.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy