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


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.

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: 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.
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: 2  (1) Update we have: Where: P t :Transmission power(w) P r :Reception power (w) 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: 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: -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.
• 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 d 0 , 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, L 0 = 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.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: - -ErlangRv: Access to the underlying ErlangRandomVariable.
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.
• 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, 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.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.

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

•
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

Figure 1 .
Figure 1.Results of first simulation

Figure 2 .Figure 3 .
Figure 2. Results of first simulation Distance 1: Begin the second distance field.Initial value: 80m by default.-Distance 2: Begin the third distance field.Initial value: 200m by default.m 0 : Used for distances smaller than Distance 1.Initial value: 1.5 by default.m 1 : For distances smaller than Distance 2. Default is 0.75.m 2 : For distances greater than Distance 2. Initial value: 0.75 by default.

Table 2 .
Models used in simulation of channel 1

Table 3 .
Models used in simulation of channel 2