Sunteți pe pagina 1din 8

222

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

Analysis and Utilizing of the Error Models in Teaching Wireless Network


Anbao WANG
College of Information Science and Technology, Donghua University, Shanghai, China School of Computer and Information, Shanghai Second Polytechnic University, Shanghai, China abwang@it.sspu.cn

Zhenwen LIU
College of Information Science and Technology, Donghua University, Shanghai, China zwliu666@gmail.com

AbstractWireless network course often proves to be a quite challenging subject to teach in a meaningful way, because many students appear to find the subject rather dry and technical, and thus quite boring. ns-3 (Network Simulator version 3) can construct a network environment to help teacher in computer network teaching. It displays more benefits than the traditional ways. Because it is an open source software, it also can be used freely and make the network simulation easy, furthermore, the result of the network simulation can be analyzed with different software tools. In this paper, the authors have prepared some interesting error model simulations in teaching wireless network to provide the students of wireless network with a hands-on learning experience. They focus on the error model of WLAN in ns-3 which can be used in the teaching of network course, introducing and analyzing the related theories about the error models used in ns-3 physical layer, so as to help researchers and students to understand and utilize the error models in ns-3 smoothly. In addition, several error model simulation experiments are carried out. The effectiveness of these simulations has been evaluated by both students and teaching team. The feedback from students indicates that using error models simulations in teaching wireless network is successful. Index TermsWireless Network, Network Simulation, WLAN Error Model, ns-3

I. INTRODUCTION Computer network course is often included as a subject in computer science, engineering, and business courses because computer networks are a fundamental component of information technology (IT) systems today [1]. Wireless network courses are becoming more and more popular in universities, polytechnic institutions, postsecondary colleges, and private training institutions around the world, moreover, it is also closely related to our life. This is mainly because of rapid developments in wireless network technology and the high demand for wireless and mobile network skills in the industry. Unfortunately, motivating students to learn about wireless network course is often difficult because they find the subject dry, full of technical jargon, and, consequently,

rather boring [2]. However, in the educational literature [3, 4], the authors described that incorporating practical operations when teaching the theoretical concepts of the wireless network can give the students opportunity of hands-on learning experiences and enhance students to learn about wireless network techniques. SarKar has prepared some practical laboratory exercises and other materials [1]. The effectiveness of these exercises has been evaluated both formally by students and informally in discussion within the teaching team. The implementation of the laboratory exercises was judged to be successful. SarKar and Craig also have prepared some interesting projects to provide the students of wireless communication and networking with a handson learning experience [2]. In IEEE 802.11 network, nodes move randomly anytime, or its power may be closed sometimes, so a lot of reasons can cause packet delivery errors. Packet delivery errors in the IEEE 802.11 network result in the performance degradation of the network. Most of the previous works have been studied about how collision avoidance and hidden terminals affect the performance metric of the IEEE 802.11, such as probability of a collision and saturation throughput and so on. Jihwang Yeo and Ashok AgraWala focus on the effect of packet errors on capacity and variability of the IEEE 802.11 MAC protocol. They developed a new analytical model called pe-Model, by extending the existing model (Tay and Chua's model) to incorporate packet error probability pe. With pe-Model [5]. The rapid development and expansion of internet raises a new challenge to the planning and application of the network and the protocol design. To evaluate the network planning, new applications and protocols in the experiment environment is one of an effective means to cope with above challenge [6-8]. At present implementation techniques to build complex network experiment environment mainly include three types which are test-bed, network simulation and network emulation [9]. Ns-3 can support various network types such as wired and wireless, local or satellite, local area

2011 ACADEMY PUBLISHER doi:10.4304/jnw.6.2.222-229

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

223

networks and wide area networks, it also can support network hierarchical model [10, 11]. Ns-3 has strong second development capabilities, it has the event-driven features and is easy to configure and program, so it can provide a good foundation for constructing network simulation platform [12]. The ns-3 simulator is a discreteevent network simulator targeted primarily for research and educational use [10, 11]. The ns-3 project is an opensource project to develop ns-3. In the past teaching of computer network, the explaining of data transfer process in computer network was often carried out using abstract theoretical description, or demonstrated using symbolic animation in slides. This way of teaching is often not intuitive and accurate [13]. Using Network Simulator (such as ns-3) can explain knowledge point of the courses, analyze the data sending process by tracking the document in detail, and carry out statistics through a number of corresponding network analysis software tools which meet the intuitive and rigorous needs in the teaching of computer networks. This article focuses on network simulation tool ns-3, analyzes the error model in ns-3 and relevant theory which will be used in our study, and carries out simulation experiments of error model in ns-3.

erfc ( x ) = 1.0 erf ( x ) = erfc ( x ) =


Q( x) =

t 2 dt x e

(3) (4)

e 0

x t 2 dt

1 x (5) erfc ( ) 2 2 If the QAM (Quadrature amplitude modulation, modulated waves are summed, and the resulting waveform is a combination of both phase-shift keying (PSK) and amplitude-shift keying) is used in 802.11a, for M - QAM , k := log 2 M bits are represented in one

symbol by using M = 2 k different phase and amplitude constellations. The error probability is derived by regarding each of the M constellation points as independently distributed normal random variables, with special consideration for the outer points [14, 15, 16]. The probability of an error in a received symbol Ps is exactly
3 Ps = 1 [1 2(1 1 M ) Q( Es N0 M 1 2 )]

(6)

II.

ERROR MODEL USED IN NS-3

According to the different types of module and demodulate in the physical layer of ns-3, there are two types of error models which are used in 802.11a and 802.11b, for 802.11a, it uses the OFDM (orthogonal frequency division multiplexing) while DSSS (direct sequence spread spectrum) is used in 802.11b. The types of the error models in ns-3 are realized in different methods. A. the error model in 802.11a 802.11a supports eight different transmission modes. The different schemes data rates depend on how the used 5 GHz band is partitioned into channels. Table1 shows the data rates in Mb/s for 20, 10 and 5MHz channels [14]. Bit Error Rate of BPSK is done using two conditional Gaussian probability densities over the signal phase shifts. The probability of bit error P b , when receiving a signal modulated with BPSK or QPSK is

1 P b log M (1 [1 2(1 M ) Q ( 2

E 3 b log 2 M N0 2 )] ) M 1

(7)

Where Eb is energy per bit, Es is energy per symbol and N 0 is the noise and interference spectral density in watt per hertz, using the equation
E = k b and N0 N0 Es

dividing by k , the corresponding bit error probability P b of a M - QAM encoded bit can be given as fellows [14],

TABLE I.

DATA RATES AND MODULATION PARAMETERS FOR 802.11A


Coding rate (R) 1/2 3/4 1/2 3/4 1/2 3/4 2/3 3/4 Coded bits per subcarrier NBPSC 1 1 2 2 4 4 6 6 Coded bits per OFDM symbol NCBPS 48 48 96 96 192 192 288 288 Data bits per OFDM symbol NDBPS 24 36 48 72 96 144 192 216 Data rate (Mb/s) for 20MHz channels 6 9 12 18 24 36 48 54 Data rate (Mb/s) for 10MHz channels 3 4.5 6 9 12 18 24 27 Data rate (Mb/s) for 5MHz channels 1.5 2.25 3 4.5 6 9 12 13.5

Modulation

Eb Eb 1 P = Q 2 = erfc (1) b N N0 2 0 Two special error functions are used above, the Q x function is defined as the area right of x below a
standard normal (Gaussian) distribution, the erfc ( x ) is closely related to Q xwhich is defined in the following equations. t2 1 ( ) x (2) = Q e 2 dt 2 x

BPSK BPSK QPSK QPSK 16-QAM 16-QAM 64-QAM 64-QAM

This equation is not exact due to possible bit errors which occur at non-neighboring constellation points. However, this omitted probability is negligible small. In ns-3, the function erfc ( x ) is used instead of the function of Q ( x ) , so the bit error probability P b of an M - QAM encoded bit can be given as

2011 ACADEMY PUBLISHER

224

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

1 P b log M (1 [1 (1 M ) erfc ( 2

E 1.5 b log 2 M N0 2 )] ) M 1

(8)

In ns-3 Convolutional Coding and Viterbi decoder are used. Because of the hard-decision decoder using the Hamming metric, at least half the bits must be incorrectly detected to choose a different path which causes one bit error. The probability that more than half the sequence of d incorrectly detected [14], so the pd(p) is.
d k k d k Pd ( p ) = Cd p (1 p ) , (if d is odd ) (9) k =( d +1)/2

different transmission modes(1M, 2M, 5.5M,11M), and the error rate was given in [14, 20] as follow. 1) transmission mode using Dqpsk (Differential Quadrature Phase Shift Keying,1M), the bit error probability P b of a Dqpsk encoded bit can be given as E 11*Ec b N N 1 0 = 1e 0 P (14) b = 2e 2
2) transmission mode using Dbpsk(2M), the bit error probability P b of a Dbpsk encoded bit can be given as P (15) b = Q (5.5 * SIR ) 3) transmission mode using DqpskCck$5.5 (5.5M) the bit error probability P b of a DqpskCck5.5 encoded bit can be given as 8 P (16) b = 14 15 Q ( 8 SIR ) + Q ( 16 SIR ) 4) transmission mode using DqpskCck11 (11M) the bit error probability P b of a DqpskCck11 encoded bit can be given as 128 P b = 255 24 Q ( 4 SIR ) + 16 Q ( 6 SIR )
+174 Q ( 8 SIR ) + 16 Q ( 10 SIR ) +24 Q ( 12 SIR ) + Q ( 16 SIR )

1 d /2 d /2 d /2 Pd ( p ) = Cd p (1 p ) 2 (10) d k k d k + Cd p (1 p ) , (if d is even ) k =d /2+1 Selecting a wrong branch once, however, may still be corrected later during decoding because paths may be joined again. This error correcting property of the convolutional code can be upper bounded [17] by summing over all paths longer than a specific length called d free , which must be determined individually for

each convolutional code. For each path length d all ad paths of the same length must be considered. So the decoding error probability pdec ( p ) for a convolutional
ad pd ( p ) (11) d =d free To determine packet error rate of a chunk, the decoding error rates of each chunk with equal SINR per bit b must be calculated. Because in 802.11a [19], header and payload may be encoded with different modulation schemes, a further distinction may be necessary. For a l octet long chunk of packets, assuming uniform and independent bit errors distribution, the probability of error [14, 18] is 8l p (l ) 1 (1 pdec ( p )) (12) And by combining all segments the complete PER is n (13) p per 1 i =0 (1 p (li ))

(17)

code [14] is

Where Ec is the energy received per chip, N c is the noise per chip, N 0 is the in-band noise power density at the receiver, the Eb is the energy per bit, and the
SIR = Ec . Nc

pdec ( p )

III.

THE UTILIZING OF THE ERROR MODELS OF NS-3 IN WIRELESS NETWORK TEACHING

Where the number of chunks is n , li is the number of bytes in chunk i , in each chunk, the modulation schema and the SINR per bit may be different. In ns-3, the PER is calculated according to equation above and compared for the ultimate reception decision to a random integer from [0 "1] . For BPSK and QPSK only the first length d free , and for M-QAM only the first two lengths d free and d free + 1 [9] are added up.
B. the error model in 802.11b The modulation technique of DSSS (direct sequence spread spectrum) is used in 802.11b, it supports for

The ns-3 provides a not-so-slow PHY-level model of the 802.11 specification, to use the error model for network teaching, firstly we must analyze which layer simulation touches on, from the analysis above, the error model is realized in the physical layer of ns-3, it is based on c++ programming and the components containing in ns-3 have already met the requirements for the teaching objectives. We utilize the existing network elements of ns-3 to carry out the simulation, so there is no need to amend ns-3 itself and just need to write c++ simulation script to perform our simulation. In this section, we will create a simple WLAN error model simulation example at first and explain the results of this simulation. Then another simulation example was carried out to test the error model in 802.11a and 802.11b wireless network, the purpose is to test and verify the relation between the RSS (Received Signal Strength) and the number of successful received packets or not. Finally, we create a simulation example with more nodes to find out how many good packets and lost packet in this simulation environment.

2011 ACADEMY PUBLISHER

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

225

A. simple error model case study For the purpose of easy to understand to the students in the teaching course, the wireless network topology should be as simple as possible, this simulation just has 2 mobile nodes, one node sends the packages to the other, the distance between these two nodes are 100 meters, every 5 seconds sending node sends 4000 packets to the receiver. The parameters of the simulation are showed as Table 2:
TABLE II. Parameter PHY header txMode txPowerLevel packetSize Packet Intervals THE ERROR MODEL SIMULATION PARAMETERS Value 192 bits wifia (6, 9, 12, 18, 24, 36,48, 54)mbs wifib (1, 2, 5.5, 11)mbs 0 db 2304 counts 4000 5 second Figure 3. The success rate of the 802.11b (5.5M).

Figure 1.

The success rate of the 802.11a (24M,36M 48M,54M) and 802.11b (11M). Figure 4. The success rate of the 802.11a (12M).

Figure 2. The success rate of the 802.11a (18M). Figure 5. The success rate of the 802.11a (9M).

2011 ACADEMY PUBLISHER

226

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

In Figure 7, 802.11a 6Mbs is used in simulation, no packets are successfully received when the RSS is below -95.5 dBm, however, while the RSS is bigger than -95 dBm, the number of successfully received packets increases sharply accompanying with the RSS goes up. Especially, after the RSS reaches -93.5, no packets are lost.

Figure 6. The success rate of the 802.11a (6M) and 802.11b (1M, 2 M).

The error models in 802.11a and 802.11b were simulated, the 802.11a has eight different transmission modes and 802.11b has four different transmission modes. All of these transmission modes were simulated. For the reason to easy to understand we only get the success rate from the receive node, the results are showed from Figure1 to Figure6. We explain the error model script in c++ for students, it can help the students to get capability on how to write a real network simulation script and further understand the inner modules of the error model. We run this simulation about 1000 seconds. Firstly, from Figure1 to Figure6, we can get the error rate of each transmission modes, which is showed in Table3. Secondly, the students can find that the error rate increase with the speed increasing of each transmission, the error rate of 802.11a (24M, 36M, 48M, 54M) and 802.11b 11(M) is almost 100%, while the error rate of 802.11a (6M) and 802.11b (1M, 2M) can even reach 100%.
TABLE III. THE ERROR OF EACH TRANSMISION MODE Error rate (%) 100 99.8 98 0.2 0.0001 0

Figure 7. The number of received packets in 802.11a (6M).

Figure 8. The number of received packets in 802.11a (9M). Transmission mode 802.11a (24M,36M 48M,54M), 802.11b 11(M) 802.11a (18M) 802.11b (5.5M) 802.11a (12M) 802.11a (9M) 802.11a (6M), 802.11b (1M,2 M)

In Figure 8, 802.11a 9Mbs is used in simulation, no packets are successfully received when the RSS is below -93.5 dBm, however, while the RSS is bigger than -93 dBm, the number of successfully received packets increases sharply accompanying with the RSS goes up. Especially, after the RSS reaches -91.5, no packets are lost.

B.. the error model examples in 802.11a and 802.11b ad hoc network This simulation example was carried out to test the error model in 802.11a and 802.11b wireless network, the main purpose is to test and verify the relation between Received Signal Strength and the number of successful received packets or not. In this simulation, two nodes are created in ad hoc network, the mobility mode used by these two nodes is ConstantPositionMobilityModel, and the packet size is set with a constant value 1024, one node sends packets to another node every one second. The received Signal Strength is increased every 0.02 dBm from -102 dBm to -70 dBm. There are 250 packets are sent by one node and received by another.
Figure 9. The number of received packets in 802.11a (12M).

2011 ACADEMY PUBLISHER

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

227

In Figure 9, 802.11a 12Mbs is used in simulation, no packets are successfully received when the RSS is below -92.5 dBm, however, while the RSS is bigger than -92 dBm, the number of successfully received packets increases sharply accompanying with the RSS goes up. Especially, after the RSS reaches -91.5, no packets are lost.

Figure 13. The number of received packets in 802.11a (48M).

Figure 10. The number of received packets in 802.11a (18M).

Figure 14. The number of received packets in 802.11a (54M).

Figure 11. The number of received packets in 802.11a (24M).

Figure 12. The number of received packets in 802.11a (36M).

For the error model in 802.11a, it shows the same rules from Figure 7 to Figure 14, no packets are successfully received when the RSS is below some value, however, while the RSS is bigger than another value, the number of successfully received packets increases sharply accompanying with the RSS goes up. Finally, after the value of RSS becomes bigger enough, all the packets are received successfully. At the same time, we can tell the students that there is a difference From Figure 7 to Figure 14, as the data rate increases form 6Mbs to 54Mbs, the RSS must goes up concurrently to get the same number of successfully received packets for different 802.11a data rate. For the error model in 802.11b, it shows the same rules from Figure 15 to Figure 18, no packets are successfully received when the RSS is below some value, however, while the RSS is bigger than another value, the number of successfully received packets increases sharply accompanies with the RSS goes up, finally, after the value of RSS becomes bigger enough, all the packets are received successfully. At the same time, we can tell the students that there is a difference from Figure 15 to Figure 18, as the data rate increases form 1Mbs to 11Mbs, the RSS must goes up concurrently to get the same number of successfully received packets for different 802.11b data rate.

2011 ACADEMY PUBLISHER

228

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

Figure 15. The number of received packets in 802.11b (1M). Figure 18. The number of received packets in 802.11b (11M).

Figure 16. The number of received packets in 802.11b (2M).

C a simulation example in WLAN A simulation example with more nodes is created to find out how many good packets and lost packets in this simulation environment. This simulation example was carried out to test the error model in 802.11a and 802.11b wireless network, the main purpose is to test and verify how packets are received or discarded over time. In this simulation, 60 nodes are created, they are divided into 10 groups, in each group there are 6 nodes including one AP node and 5 ordinary nodes which sends packets to the AP, the mobility mode used by these 60 nodes is RandomDirection2dMobilityModel, and the packet size is set with a constant value 2000, each node sends packets to the AP in the same group continuously. We run this simulation about 60 seconds and compute the number of good packets and the lost packet every 0.2 second in the whole networks.

Figure 17. The number of received packets in 802.11b (5.5M). Figure 19. The number of good packets in WLAN.

2011 ACADEMY PUBLISHER

JOURNAL OF NETWORKS, VOL. 6, NO. 2, FEBRUARY 2011

229

Figure 20. The number of lost packets in WLAN.

From this simulation, the students can get the information about the error model in wireless local network when the network is contained more nodes. The good packets received at the beginning increases sharply and then it decreases slowly. Similarly, the lost packets become more and more at the beginning, the jitter is very clearly. As the time goes by, the performance of the WLAN becomes bad. IV. CONCLUSION

Teaching practice indicates that the teaching of wireless network course not only needs the theory teaching modernization and the practical teaching in the time when the development of computer network becomes further complexity, but also needs to continuously study advanced teaching methods and means to stimulate students interests in the WLAN course and improve teaching quality. Here, the error model of ns-3 as a teaching aid to construct a virtual network simulation teaching environment has positive significance in improving teaching quality and also can make up for the shortcoming of current computer network course. This is a new exploration in the teaching of wireless network course. ACKNOWLEDGMENT We thank HU Xiaoming for numerous discussions concerning this work. This work was supported by Innovation Program of Shanghai Municipal Education Commission REFERENCES
[1] N. Sarkar, Teaching computer networking fundamentals using practical laboratory exercises, IEEE Transactions on Education, vol. 49, no. 2, May 2006. [2] T. Sarkar, N.I. Craig, Teaching wireless communication and networking fundamentals using Wi-Fi projects, IEEETransactions on Education, vol. 49, no. 1, May 2006. [3] M. F.Young, Instructional design for situated learning,Educ. Technol., vol. 41, no. 1, Mar. 1993. [4] L. M. R. J. R. Anderson and H. A. Simon, Situated learning and education, in Educ. Res., vol. 25, no. 4, May 1996.

[5] A. Jihwang Yeo, Agrawala, Packet Error Model for the IEEE 802.11 MAC Protocol, in The 14Ih IEEE 2003International Symposium on Persona1,lndoor and Mobile Radio Communication Proceedings, 2003. [6] S. B. LI Bo, ZHAO Dong-feng, Simulating Platform for Grid Computing with Reservations(in Chinese), Journal of System Simulation, vol. 18, Aug. 2006. [7] L. Bo, Research on Job Scheduling Algorithms with Resource Reservations for Grid Computing, in Wu Han:Huazhong Universiy of Science and Technology, June 2005. [8] H. Yao-jun, Modeling and Analyzing of Resource Scheduling Scheme for Grid Computing Using Petri Nets(in Chinese), Journal of System Simulation, vol. 18, no. 4, 2006. [9] C. L. L. Y. Li, QoS based resource scheduling by computational economy in computational grid, JInformation Processing Letters(so020-0190), vol. 98, no. 3, May 2006. [10] ns3 project, ns-3 Tutorial, http://www.nsnam.org/, Sept. 2009. project, ns-3 Reference Manual, [11] Ns3 http://www.nsnam.org/, Sept. 2009. [12] G. Y. KUANG Xiao-hui, ZHAO Gang, Improvement of Simulation Function in Network Simulator(in Chinese), Journal of System Simulation, vol. 21, no. 2, Feb. 2009. [13] Z. X.-y. WANG Lin-tao, Application of NS in Computer Network Teaching (in Chinese), Experiment Science Technology, vol. 6, no. 4, 2008. [14] T. Bingmann, Accuracy Enhancements of the 802.11 Model and EDCA QoS Extensions in ns-3, Diploma Thesis at the Institute of Telematics, 2009. [15] A. Goldsmith, Wireless Communications. Cambridge University Press, 2005. [16] J. G. Proakis, Digital Communications. McGraw-Hill,New York, NY, USA, 2001. [17] D. T. M. Pursley, Error probabilities for spread-spectrum packet radio with convolutional codes and Viterbi decoding, IEEE Transactions on Communications, vol. 35, no. 1, Jan. 1987. [18] Y.-J. C. Liqiang Zhang, Rate avalanche:Effects on the performance of multi-rate 802.11 wireless networks, wireless networks, vol. 17, no. 3, Mar. 2009. [19] I. 802.11a, Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications: Highspeed Physical Layer in 5 GHz Band. IEEE, 1999. [20] T. H. Guangyu Pei, Validation of ns-3 802.11b PHY model, Boeing Reseach and Technology of TBC. http://www.nsnam.org/ pei/80211b.pdf, May 2009.

WANG Anbao is currently a Ph.D. candidate at College of Information Science and Technology, Donghua University of Shanghai city, China. He received his MS degrees in Computer Application Technology from Shanghai Normal University, Shanghai, China, in 2004 He is a lecturer at Shanghai Second Polytechnic University of Shanghai City, China, 2004-now. His research interests include wireless network, Networks and Multimedia.

2011 ACADEMY PUBLISHER

S-ar putea să vă placă și