Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Validation of Wi-Fi network simulation on ns-3, Schemes and Mind Maps of Wireless Networking

3. ns-3 Network Throughput. Validation. Test Setup: We have constructed ns-3 simulation scenarios to match the analytical model as closely ...

Typology: Schemes and Mind Maps

2022/2023

Uploaded on 05/11/2023

barnard
barnard 🇺🇸

3.9

(9)

1 document

1 / 20

Toggle sidebar

Related documents


Partial preview of the text

Download Validation of Wi-Fi network simulation on ns-3 and more Schemes and Mind Maps Wireless Networking in PDF only on Docsity! Validation of Wi-Fi network simulation on ns-3 University of Washington Technical Report: August 2017 Rohan Patidar Sumit Roy, Thomas R. Henderson, Morteza Mehrnoush University of Washington Seattle, WA 98195 August 7, 2017 1. Introduction Network simulation is a powerful tool for performance evaluation of computer communi- cations networks. A large number of tools are available commercially and as open-source, with different levels of abstraction, and with different levels of support for modeling various technologies. The ns-3 discrete-event network simulator is a popular open-source simulator used for networking research, and contains detailed models of the medium access control (MAC) layers of Wi-Fi and LTE. This paper is concerned with the validation of a crucial component of the Wi-Fi MAC protocol model in ns-3. A key component of the Wi-Fi MAC model is the implementation of the contention resolu- tion process known as the distributed coordination function (DCF). The DCF is a distributed process designed with the goal of achieving fair medium sharing among similar devices, de- spite the lack of any centralized scheduling control of the medium. In a distributed channel access process based on Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA), and in a network with multiple stations, stations with data to send will inevitably attempt to transmit at the same time, resulting in an overlapping, failed transmission known as a collision. The DCF is designed to reduce the collision probability in such situations, in a manner that should, over time, result in successful transmissions and a relatively equal (fair) sharing of the medium between contending stations. In its most basic form, the DCF consists of a carrier sensing (CS) function and a ran- dom backoff protocol. Carrier sensing allows stations to realize when the medium is busy, and to postpone transmission attempts until the medium is free. The carrier sense may be physical (detection of energy on the channel) and may also be virtual (detection of a reservation of the medium for a given period of time through protocol mechanisms). Once the medium becomes free, if two or more stations have a frame to send, the possibility exists that their transmissions will immediately collide. To avoid collisions, stations will backoff their attempts for a random number of slot times, based on a random variate selected from a contention window. If competing stations select different random variates, one station will access the medium first and will begin transmission, and the other stations will sense the medium has become busy and wait for the next idle opportunity. If two or more competing stations select the same transmission time, their transmissions will collide, and they will detect this based on the lack of a positive acknowledgement of the frame. Stations that collide will temporarily increase their contention window size and try again, and reset their contention window upon eventual successful transmission. Consider the case of a dense network, with perhaps dozens of stations within detection range of one another, in which all stations have a saturating load (i.e., each station is always trying to transmit a new data frame). A key question is how the network behaves in such a saturating condition; will it result in a fair allocation of the medium, an unfair allocation 1 Technical Report CHAPTER 2. MATHEMATICAL MODEL Using this Markov model, the probability that a station transmits in a randomly chosen slot time can be obtained as given by Equation 2.1: τ = 2 W0 ( (1−(2Pw)m+1)(1−Pw)+2m(Pm+1 w −PR+1 w )(1−2Pw) (1−2Pw)(1−PR+1 w ) ) + 1 (2.1) where R is the number of the backoff stage (R = m+1 in above figure),W0 is the minimum contention window size + 1, m = log2( CWmax CWmin ) and each frame collides with constant collision probability p given by equation 2.2 Pw = 1− (1− τ)n−1 (2.2) where n is the number of competing stations. The two equation with two variables can be solved to obtain τ and p. Using obtained τ , the normalized throughput S can be calculated according to equations 2.3- 2.8, where Ts is the average time that the channel is sensed busy due to successful transmission, Tc due to collision, E[P ] is the frame time duration and Ptr is the probability of at least one station transmitting in a slot given by equation 2.8 and Ps is probability of successful transmission as in 2.8. Here H represents the MAC and PHY header time, and δ is the propagation delay equal to 0.1 us. We investigate basic access mechanisms, and below are the governing equations. Network throughput is then calculated as (DataRate) ∗ S . S = PsPtrE[P ] (1− Ptr)σ + PtrPsTs + Ptr(1− Ps)Tc (2.3) Ts = H + E[P ] + SIFS + δ + ACK +DIFS + δ (2.4) Tc,old = H + E[P ] +DIFS + δ (2.5) In accordance with the current IEEE 802.11 standard specification, during contention, the node waits for an Ack time out period which leads to updating the collision time from Tc,old defined in [1] to Tc [4] as Tc = H + E[P ] + SIFS + ACK + δ +DIFS + δ (2.6) Ptr = 1− (1− τ)n (2.7) Ps = nτ(1− τ)(n−1) Ptr (2.8) Table 2.1 presents parameters employed for the three standards in ns-3 simulation and 2.2 shows the throughput for all MCSs of 802.11a calculated in MATLAB using an equation solver. 4 Technical Report CHAPTER 2. MATHEMATICAL MODEL Table 2.1.: Parameters for simulation (802.11a) Slot time σ (us) 9 SIFS (us) 16 DIFS (us) 34 PHY Header (us) 4us * 5 OFDM symbols MAC Header (Bytes) 36 ACK (us) PHY + 112/dratemin UDP + IP Header (Bytes) 28 R 1000 CWmin 15 CWmax 1023 m 6 5 10 15 20 25 30 35 40 45 50 Number of competing stations 0 5 10 15 20 25 30 T h ro u g h p u t( M b p s ) Analytical aggregated throughput for 11a data rates (1500B ) 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps Figure 2.2.: Throughput performance from mathematical model 5 3. ns-3 Network Throughput Validation Test Setup: We have constructed ns-3 simulation scenarios to match the analytical model as closely as possible. We use an ad-hoc network with varying numbers of nodes; the topology is shown in Figure 3.1. Unlike infrastructure networks with access points, the additional channel activity due to association (beacon transmission, active scanning etc.) are avoided; thus we may obtain relatively closer throughput results as most mathematical models generally consider only payload packets and association effects are not considered. For ns-3 simulations, the setup is configured for a number of competing stations in the range [5, 50]. We conducted 10 simulation trials (with differently seeded random number generators) with N (number of stations) as 5, 10, 15 ..., 50 for 6 Mbps data rate, 802.11a, and averaged the results. Figure 3.1.: Network Topology The aggregated network throughput is calculated after the transition period because of steady state Markov modeling assumption in calculating the theoretical throughput. ns-3 implementation: In this experiment, we create "networksize" number of nodes in the network. The default YANS model for the physical layer is utilized, and the nodes are placed close to each other with a minimum distance of 0.001m. 6 Technical Report CHAPTER 3. NS-3 NETWORK THROUGHPUT VALIDATION s s << "wi f i −11a−" << netS i z e << "−p−" << pktS ize << "−throughput . p l t " ; s td : : o f s tream netSizeThroughputPlot ( s s . s t r ( ) . c_str ( ) ) ; s s . s t r ( "" ) ; s s << "wi f i −11a−" << netS i z e << "−p−" << pktS ize << "−throughput . eps " ; Gnuplot gnuplot = Gnuplot ( s s . s t r ( ) ) ; Wif iHelper w i f i ; w i f i . SetStandard (WIFI_PHY_STANDARD_80211a) ; WifiMacHelper wifiMac ; wifiMac . SetType ( "ns3 : : AdhocWifiMac" ) ; YansWifiPhyHelper wif iPhy = YansWifiPhyHelper : : De fau l t ( ) ; YansWifiChannelHelper wi f iChanne l ; wi f iChanne l . SetPropagationDelay ( "ns3 : : ConstantSpeedPropagationDelayModel " ) ; wi f iChanne l . AddPropagationLoss ( "ns3 : : LogDistancePropagationLossModel " ) ; NS_LOG_DEBUG ("6" ) ; Experiment experiment ; w i f i . SetRemoteStationManager ( "ns3 : : ConstantRateWifiManager" , "DataMode" , Str ingValue ( "OfdmRate6Mbps" ) ) ; Gnuplot2dDataset datase t ; Gnuplot2dDataset dataset_Model ; data se t . SetErrorBars ( Gnuplot2dDataset : :Y) ; datase t . S e tS ty l e ( Gnuplot2dDataset : : LINES_POINTS) ; dataset_bianchi . S e tS ty l e ( Gnuplot2dDataset : : LINES_POINTS) ; double mean_t , throughput , stDev , throughputVector [ t r i a l s ] ; for ( uint32_t n = 5 ; n <= netS i z e ; n += 5) { mean_t = 0 ; for ( uint32_t run_index = 1 ; run_index <= t r i a l s ; run_index++) { std : : f i l l ( bytesRece ived . begin ( ) , bytesRece ived . end ( ) , 0 ) ; s td : : f i l l ( packetsRece ived . begin ( ) , packetsRece ived . end ( ) , 0 ) ; throughput = 0 ; experiment .Run ( w i f i , wifiPhy , wifiMac , wif iChannel , pktSize , n , de l ta , gridWidth , durat ion , fa l se ) ; for ( uint32_t k = 0 ; k< n ; k++) { throughputpernode [ k ] = (double ) bytesRece ived [ k ]/1000/1000/100∗8 ; throughput += throughputpernode [ k ] ; } std : : cout << "Total ␣ throughput ␣" << throughput << std : : endl ; mean_t += throughput ; throughputVector [ run_index − 1 ] = throughput ; 9 Technical Report CHAPTER 3. NS-3 NETWORK THROUGHPUT VALIDATION } mean_t = mean_t / t r i a l s ; stDev = 0 ; for ( uint32_t i = 0 ; i < t r i a l s ; ++i ) { stDev += pow ( throughputVector [ i ] − mean_t , 2 ) ; } stDev = sq r t ( stDev / ( t r i a l s − 1 ) ) ; datase t .Add (n , mean_t , stDev ) ; std : : cout << mean_t ; } 10 4. Discussion All simulations in the section are conducted for a duration of 200 seconds. To obtain the best results, the initial transient time should be avoided in the throughput calculation. We observed throughput fluctuation for initial 20 seconds in 50 node simulation (12Mbps) shown in Figure 4.1. The transient time for higher rate would be higher, so throughput is calculated 100 seconds after simulation start time. We obtain close correspondence between results for ns-3 simulation and those from the mathematical model as shown in Figure 4.2. Figure 4.3 captures the effect of packet size on throughput. 0 20 40 60 80 100 Time (seconds) 5.9 6 6.1 6.2 6.3 6.4 6.5 6.6 T h ro u g h p u t (M b p s ) Network throughput curve for 50 nodes Figure 4.1.: Network throughput fluctuation with time for 50 nodes simulation in 1 trial for 12Mbps. In 802.11a standard, the maximum number of retry limit is chosen to be 7. The mathe- matical model and ns-3 simulation results for throughput are compared in figure 4.4. 11 5. Summary In this work, we have validated the ns-3 MAC layer implementation configured for the IEEE 802.11a standard against well known bi-dimensional Markovian mathematical models for aggregated network saturation throughput under ideal channel conditions. Comparison of simulation results with the mathematical model shows close correspondence. We observed that the performance of the basic access method strongly depends on the DCF-related system parameters, mainly minimum contention window and number of stations in the wireless network, but less so on other details of the standard. Hence, this model can be used for validation of similar Wi-Fi standards such as 11n/11ac/11ax. Furthermore, with the acceptance of LTE in unlicensed bands, we suggest as future work to study the performance of the DCF against LTE unlicensed systems, including the devel- opment of analytical models and corresponding simulations. 14 Bibliography [1] G. Bianchi. Performance analysis of the ieee 802.11 distributed coordination function. IEEE Journal on selected areas in communications, 18(3):535–547, 2000. [2] M. Morteza. Analytical modeling of wi-fi lte-laa coexistence: Throughput and impact of energy detection threshold. IEEE Transactions on Networking, submitted, 2017. [3] G. Pei, T. Goff, and T. Henderson. Validation of ns-3 wifi distributed coordination function (dcf) model. 2012. [4] I. Tinnirello, G. Bianchi, and Y. Xiao. Refinements on ieee 802.11 distributed coordina- tion function modeling approaches. IEEE Transactions on Vehicular Technology, 59(3): 1055–1067, 2010. 15 A. Appendix To analyze the ns-3 experimental throughput behaviour at higher data rates, we run the above network topology for data rate of 9, 12, 18, 24, 36, 48 and 54 Mbps, throughput is as shown in Figure A.1 to A.7 respectively. 4.8 5 5.2 5.4 5.6 5.8 6 6.2 6.4 6.6 6.8 7 5 10 15 20 25 30 35 40 45 50 T h ro u g h p u t (M b p s) Number of competing stations Frame size 1500 bytes ns-3 Model Figure A.1.: Throughput validation results for 9 Mbps for 200 seconds and 5 runs 6 6.5 7 7.5 8 8.5 9 5 10 15 20 25 30 35 40 45 50 T h ro u g h p u t (M b p s) Number of competing stations Frame size 1500 bytes ns-3 Model Figure A.2.: Throughput validation results for 12 Mbps for 200 seconds and 5 runs 16
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved