• No results found

Evaluation of Analytic Interference, Reception and Detection Modeling for IEEE 802.15.4 Networks with the MiXiM Omnet++ Framework

N/A
N/A
Protected

Academic year: 2021

Share "Evaluation of Analytic Interference, Reception and Detection Modeling for IEEE 802.15.4 Networks with the MiXiM Omnet++ Framework"

Copied!
84
0
0

Loading.... (view fulltext now)

Full text

(1)

Evaluation of Analytic Interference,

Reception and Detection Modeling for

IEEE 802.15.4 Networks with the

MiXiM Omnet++ Framework

PEDRO JORGE TEIXEIRA SOUSA

Master’s Degree Project

Stockholm, Sweden

(2)
(3)

KTH Royal Institute of Technology

School of Electrical Engineering

Laboratory for Communication Networks

IST Instituto Superior Técnico

Departamento de Engenharia Electrotécnica e de Computadores

Evaluation of Analytic Interference, Reception

and Detection Modeling for IEEE 802.15.4

Networks with the MiXiM Omnet++

Framework

Pedro Jorge Teixeira Sousa

Advisor: Ioannis Glaropoulos

Examiner: Assoc. Prof. Viktoria Fodor

(4)
(5)

A B S T R A C T

Wireless Sensor Networks have emerged among the different wireless technologies sharing the ISMspectrum band. This band sharing between the technologies started to raise coexistence issues in accessing the overpopulated spectrum. TheWSNpower constrains make them vul-nerable to higher power devices, such asWLAN. Simulation studies are of great importance in predicting the coexistence phenomena in heterogeneous scenarios. Simulations allows us to have a prediction on how a network will behave without the need to physically deploy the network. We address the coexistence phenomena betweenWSNandWLAN devices and demonstrate a performance comparison. We evaluate the capability of theMiXiMsimulator to predict the coexistence issues in heterogeneous networks, raised byWLANandWSNdevices. We state the importance of having an accurate simulator to predict the phenomena.

In this work, we propose a new framework forMiXiMto allow more realistic simulation results in heterogeneous networks, when evaluating the interference phenomena between concurrent technologies. We implement a new definition of custom transmission power and custom reception filter.

Further, we evaluate simulation results provided byMiXiMin simulatingWSNhomogeneous scenarios and compare its prediction with analytical models.

We implement a new simulation paradigm inMiXiM, cross networks simulation sharing the sameISMspectrum band. We evaluate and analyse the coexistence phenomena ofWLANand WSNdevices.

Finally, we complete our work with the implementation of a channel sensing module, based on a fixed a priori false alarm probability, forWSNdevices. We evaluate its sensing results by comparing it withMiXiMs implementation for channel sensing and conclude that our simple analytic model for sensing comply withMiXiMs implementation.

(6)
(7)

A C K N O W L E D G E M E N T S

I would like to thank to all those who have made this work possible. First of all, I would like to express my gratitude to Prof. António Rodrigues, my supervisor in Portugal, for the opportunity to study abroad and to Prof. Viktoria Fodor, my supervisor in Sweden, for the opportunity of being able to do this work and, her guidelines during the master thesis work and for the thesis review. I would like to deeply thank to Ioannis Glaropoulos for his invaluable advice, guidance and support throughout all this work. I would also to thank him for his constructive suggestions during the project time and for the review and feedback during the drafting of the thesis. I would also like to thank all my friends in Sweden that supported me the whole time. Most importantly, I thank my parents, my sister and my family for all the encouragement and support they give me, without them none of this would be possible.

(8)
(9)

C O N T E N T S

1 Introduction 1

2 Background 3

2.1 Related Work . . . 3

2.2 Motivation and Contribution . . . 4

I

The MiXiM Simulator

7

3 MiXiM Topology 9 3.1 Omnet++ Simulator. . . 9

3.2 MiXiM Framework . . . 9

4 Power Spectrum and Filter Characteristic 13 4.1 MiXiMs Implementation . . . 13 4.2 New Implementation . . . 14 4.2.1 Power Spectrum . . . 14 4.2.2 Filter Characteristic. . . 16 4.3 Simulations . . . 19 4.3.1 No Interference Scenario . . . 19 4.3.2 Interference Scenario. . . 20

II

Simulation

25

5 WSN Standalone 27 5.1 Scenario . . . 27 5.2 Analytic Models. . . 27 5.3 Implementation . . . 28 5.4 Performance Metrics . . . 29 5.5 Simulation Set Up. . . 30 5.6 Simulation Results . . . 30 5.6.1 SNR Analysis . . . 30

5.6.2 Packet Reception Analysis . . . 31

6 WLAN / WSN Interference 35 6.1 Scenario . . . 35 6.2 Implementation . . . 36 6.3 Performance Metrics . . . 38 6.4 Experiment Set Up . . . 38 6.5 Simulation Results . . . 39 6.5.1 SINR Analysis. . . 39

6.5.2 Packet Reception Analysis . . . 42

7 WLAN / WSN Channel Sensing 51

(10)

7.1 Scenario . . . 51

7.2 Implementation . . . 52

7.3 Performance Metrics . . . 54

7.4 Experiment Set Up . . . 56

7.5 Simulation Results . . . 56

7.5.1 Path Loss Coefficient α . . . 57

7.5.2 Transmission Power . . . 58

7.5.3 Receiver Sensitivity. . . 59

7.5.4 Sensing Time . . . 60

7.5.5 Noise Variance . . . 60

7.5.6 Shadowing Interval . . . 62

7.5.7 Shadowing Standard Deviation. . . 62

8 Conclusion 65

9 Future Work 67

Acronyms 69

Bibliography 73

(11)

1

I N T R O D U C T I O N

Wireless Sensor Networks (WSN) have become a rising technology providing, among many others, the infrastructure for monitoring and actuating in a wide range of applications such as robotics, domotics, medical systems and factory automation [18]. The sensors are charac-terized by their low energy consumption, reduced coverage, low transmission power and low transmission rate. These characteristics reduce the production cost and therefore allow us to have several hundreds of these sensors per network. Despite the sensors low cost, standard performance and reliability are guaranteed and their reduced dimensions allow them to have the multi-purpose applications described before.

Due to the low coverage, the WSN may consist of a large number of distributed and autonomous battery operated sensors that are usually coordinated to perform a common task. The nodes in this multi-hop wireless network communicate with each other by operating, mostly, in the Industrial, Scientific and Medical (ISM) band at 2.4 GHz.

TheWSNMedia Access Control (MAC) layer, responsible for the channel access, and Physical (PHY) layer, the sensor interface to the physical medium, are standardized by the Institute of Electrical and Electronics Engineers (IEEE) 802.15.4 protocol. WSN MAC layer uses the Clear Channel Assessment (CCA) procedure to solve the medium status acknowledgement by defining three operation modes of considering the channel busy, based on power threshold, on same modulation characteristics and on the merging of the two criteria stated before [7].

With the proliferation of wireless devices, WSN devices need to compete with different technologies for the same spectrum band access, such as Bluetooth, Wireless Local Area Network (WLAN) and cordless phones. The spectrum accommodation for all these technologies has become a major issue in this overpopulated band [14].

The variety of technologies competing for the same band has raised coexistence issue. The devices competing for the same band do not have the same hardware characteristics. As an example aWSNor a Bluetooth device does not have the same transmission power capability as aWLANdevice. The lower transmission power and the lower range means they cannot compete equally for the same shared band, WLAN will not detect them and will act as they are not present.

As a result of the different technologies sharing the same spectrum band, coexistence problems have started to occur. A common issue from coexistence is the lack of awareness, by the high powered network, when a small ranged sensor network is nearby. As an example, WLANdevices are not aware of the presence of WSN devices, unless theWSN are at a short distance from theWLAN. WhenWLANandWSNpacket transmissions coincides both in time and frequency a collision occurs. These collisions will lead to packet losses. This will cause a major impact in theWSNperformance, leading to a highWSNpacket loss rate, although the same effect does not persist while analysingWLANtransmitted packets [2,6].

To address the coexistence problems of the spectrum access withWSNandWLANdevices, several studies have been made during the past years and solutions have been proposed, such as the prediction of theWLANbehaviour, opportunistic spectrum access and frequency hops among other. It is also proposed the use of cognitive radios [1,4], transceiver capable of changing its transmitting and receiving parameters, and algorithm investigation to predictWLANbehaviour and this way use the whiteWLANspace, the idle time.

(12)

2 i n t r o d u c t i o n1

the phenomena, so better and more efficient networks can be designed. Analytic models allow us to better predict the phenomena, though these models have limitations. The limitations in the models are usually due to their simplicity, based on ideal assumptions and this way not providing accurate predictions, or by the contrary, complex models, providing accurate results, though difficult to compute. Analytic models are implemented in simulators helping us in the task of obtaining results for planning and implementing networks, without having to actually deploy a real network not knowing the behaviour it would follow. Simulators take special importance in computing and predicting the results for complex cases, especially with no closed form models exist.

Several simulators are available for simulatingWSNscenarios [8], though our choice for this work is to use theMiXiMsimulator [11], a simulator with advanced physical layer options, specifically the signal concept that allow us to define a transmission signal defined in how many dimensions we want, being the most common, time and frequency domains. MiXiM also provides a non-centralized module for packet transmission, transmission of packets goes directly from the transmitter to the receiver, which replicates with accurateness the wireless transmission in the medium.

In this work, we investigate and evaluateMiXiMs results from simulating coexistence scenarios betweenWLANandWSNdevices, sharing and competing for the same spectrum in theISMband. We propose a new way of defining the transmitted signal class, class that represents the devices real transmitted signal, useful for cross network simulations. We also propose a new way of processing the signal at the reception by adding a non-ideal filter in the devices.

We perform and present a comparison betweenMiXiMs simulations and analytical models results under different scenarios.

We investigate the reception rate of aWSNstandalone network by evaluating the Signal-to-noise ratio (SNR) and packet loss rate and comparing its results with analytic models, log-distance path loss model combined with log-normal shadowing model.

An investigation is carried to assessMiXiMs results while simulating interference resulted fromWLANinWSNunder a coexistence scenario betweenIEEE802.11 andIEEE802.15.4 protocols. The simulation results are later evaluated by a comparison with interference analytic models proposed in the literature.

Furthermore, we implement a sensing module for theWSNdevices, based on an analytic model that considers an a priori false alarm probability, to sense the channel of the medium. A comparison between the results of our sensing module andMiXiMs implemented sensing module is performed.

(13)

2

B A C K G R O U N D

2.1

r e l at e d w o r k

WLANs have become one of the most popular networks all over the world. Soon these high powered devices became to have coexistence issues in the 2.4 GHzISM spectrum band. To overcome the problems of in-network collisions, the Request-To-Send/Clear-To-Send (RTS/CTS) mechanism was implemented. In [3], a performance evaluation in a homogeneous scenario, networks connecting devices with the same protocol scenario, is analysed. The authors take an extensive study of theWLANperformance using Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) and assume a finite number of devices and ideal channel conditions. They provide an extensive study of access mechanisms for theIEEE802.11 protocol regarding throughput performance. An accurate analytic model to compute theWLAN throughput is presented. The author proves the effectiveness ofRTS/CTSmechanism avoiding collisions and improving the throughput rate.

With the rising of new technologies in the same spectrum band, new challenges were raised. One recent technology has been rising among all,WSN. In this new scenario of heterogeneous networks, different networks in the same spectrum band, the authors of [2] study the coexistence betweenIEEE802.15.4 andIEEE802.11b wireless networks. In this study, the authors take into account the scenario where WLANis underWSNinterference and the scenario whereWSNis underWLANinterference and present the results according packet loss rate. With these results the authors affirm the coexistence is possible with some performance degradation of packet loss rate and throughput. The authors also state theWSNunderWLANinterference is the worst possible scenario. In this case to increase theWSNreliability the time duration of the polling window should be increased, or instead theWLANduty cycle should be reduced.

Due to the interference between different protocols sharing the sameISMspectrum band, the location of the devices placement should be taken into consideration. This is proposed by the authors of [13]. They show the packet delivery rate can be variable, according to theWLAN nodes placement, the traffic flow orientation of theWSNwith respect to theWLAN. The authors also conclude the high sensitivity of the Clear Channel Assessment (CCA) threshold, inWSN devices, is interfered by theWLANdevice, even though not transmitting in the same operating channels.

Other solutions are proposed to mitigate the undesired consequences of coexistence. In [10], the authors examine interference between technologies and propose BuzzBuzz, aMAClayer protocol designed to mitigateWLANinterference forWSN. This proposed protocol implements multiple headers inWSNdevices, giving them multiple options of detecting an incoming packet, and also uses a full-featured Reed Solomon library to help decoding the packet payload. The authors present this implementation in a real experiment, a medium sized test-bed and achieve a increase in the packet reception rate by 70 %.

The coexistence betweenWLANandWSNis harmful for theWSNdevices and it is crucial to better predict the effects of this coexistence. Due to this issue, several simulators have appeared to face the coexistence prediction issue, so that the effects could be predicted without the need of real physical scenario experiments.

(14)

4 m o t i vat i o n a n d c o n t r i b u t i o n2.2

The authors of [17] present a comparison between two commonly used simulators forWSN. The authors implement direct diffusion protocols and compare the performance of OMNeT++ [12] and NS2 regarding execution time and memory usage. This is of high importance, sinceWSN usually have a large scale with hundreds of devices. The authors conclude that OMNeT++ is more scalable and has better performance, use less memory and less execution time.

For simulations purpose, the authors of [9] presentMiXiM[11], an OMNeT++ framework made for wireless and mobile simulations. Due to the lack of direct support and concise modelling chain for wireless communications in OMNeT++ the authors propose the use of this framework. This framework is a merging of several oldMiXiM frameworks. A complete description is made in [9].

MiXiMis a project in development, though already very useful to wireless simulations. Here the pioneer concept of signal allows us to define complex scenarios. Also, in [16] the authors present the physical (PHY) layer of the simulator. We have the ability to define complex signals in several domains, or a simple signal, just defined in time domain. MiXiM also has several analogue models implementations for path-loss, shadowing, fading andIEEE802.15.4 andIEEE 802.11 standards.

In [15] the authors test several simulators, includingMiXiM, with a set of experiments using sensor nodes indoors and outdoors. Using the data gathered in the experiment, they calibrate the radio propagation and the noise levels. After the calibration, simulations are set and run. None of the simulators provided models for non-omnidirectional antennas, though the simulators provided some propagation models widely accepted. From the results the authors suggest to calibrate and validate the models with data from real experiments, to avoid the disparity in the results observed.

The authors of [5] extend theMiXiMframework with the possibility of each device to be equipped with multiple radios, where these radios can be toggled between on, sleep and off modes. For this purpose each device has two Network Interface Controller (NIC) cards, a primary and a secondary. The secondary card has a high power radio used only for the purpose of transmissions, uploading and downloading data, while the primary card has a low power radio used to sense the channel and for service discovery. When the device is not transmitting the high power radio is either on sleep mode or on off mode allowing the module to save energy. The high power radio only wakes up when the lower power radio senses a transmission request or the device has to send data. With this implementation we cans save a considerable amount of energy.

2.2

m o t i vat i o n a n d c o n t r i b u t i o n

Several studies about homogeneous scenarios in MiXiM were performed, though we were driven by the need to simulate the interference phenomena in heterogeneous scenarios of coexisting networks. We were interested in theMiXiMs ability to hold its results accurateness in heterogeneous networks and whether our simple analytic models comply withMiXiM.

In this report, we propose a framework where nodes can have custom signal and reception definitions. We implement a new way of defining the transmitted signal, to approach real scenarios, and we add a filter at each nodes packet reception. In this implementation, we offer the possibility of defining the signals and the filters mask pattern and allow them to have a more realistic implementation. This implementation will allow us to simulate, in a more accurate way, the real scenarios phenomena and will also allow us to study cross non overlapping channel interference. Some examples of simulations and their results are presented to validate the implementation.

(15)

2.2m o t i vat i o n a n d c o n t r i b u t i o n 5

evaluate them by comparing them with analytic results on path loss and shadowing models. In addition, we perform a inter protocol interference measurement to assess howMiXiM predicts the simulation of heterogeneous networks withWLAN and WSN devices. We will simulate the effect of interference caused by aWLANdevice onWSNdevices along the distance and compare the results with analytical predictions. The evaluation will be made based onSINR and packet loss rate.

(16)
(17)

Part I

(18)
(19)

3

M I X I M T O P O L O G Y

3.1

o m n e t

++ simulator

Omnet++ [12] is an open-source simulator, written in C++ programming language, that allows us to replicate wired and wireless networks. The simulator is module based, every component is defined in a module, and these modules can be combined into more complex compound models. This modular structure allows us to build models for our networks and to easily change every component in it, just by removing and adding a module, so performances comparison can be done.

Omnet++ is also a discrete event based simulator, a chronological sequence of events are scheduled in time to perform changes in the system. In this way, it allows us to create our simulations in a time driven basis, the flow of simulation events will be driven by a clock, events will follow a time driven schedule.

The Omnet++ simulator allows us to define our simulations in different types of files, NED files, INI files and the C++ files. These different types of files have their own purpose on the simulator. In the C++ files, we implement the simple modules we want to use in the simulation. In the NED files, we design the simulation network and build more complex modules by aggregating several simple modules into a single compound module. In the INI file, we configure the simulation parameters, such as which models to use in the simulation, we assign the network parameters for the modules defined in the NED files and also the number of devices of each type we want to use in the simulation. Here, in this INI file we can configure each of the several modules according to its specific parameters, making possible to have similar sensors with different transmitting power or sensitivity.

3.2

m i x i m f r a m e w o r k

MiXiM [11], a simulator framework for wireless networks and uses the Omnet++ simulator engine. One of the features of this framework is to establish the connection, to create a link for data exchange, between nodes, modules hierarchically placed to simulate a device. This is made by auto generating connections based on a certain limited distance, possible to change. This way of generating connections, will allow us to simulate collisions, overlap in time and frequency of data messages, in the network.

The Connection Manager module is the module responsible for setting up all the connections between the nodes. This is the solution the simulator provides to simulate the real scenarios propagation in the medium. This module holds all the information regarding the transmission of messages between nodes.

(20)

10 m i x i m f r a m e w o r k3.2 MiXiMNode PhyLayer MacLayer NetworkLayer ApplicationLayer Nic

Figure 3.1: MiXiM Node Scheme

MiXiMhas already some implemented nodes, hosts. These hosts can be selected by selecting MiXiMto auto generate them. To do so, we need to select theIEEEprotocol we want to take into account and then choose between the remaining already implementedTCP/IPprotocol layers, application and network, we want to use. Several examples for all the layers andNICcards are already provided. Here, we can find, libraries implementing the standardIEEE802.11 and the standardIEEE802.15.4 protocols.

The layers that are most useful to our work are the PhyLayer and the PhylayerBattery classes for thePHYlayer, and the Mac80211 and the CSMA802154 classes for theMAClayers, because they truly implement the standards forIEEE802.11 andIEEE802.15.4 standard protocols.

For theMACmodels, the Mac80211 implements theMAClayer for aWLANdevice according to theIEEE802.11 protocol. This will be useful to ourWLANnodes. The CSMA802154 implements theMAClayer for theIEEE802.1.4 protocol, so again it is important to our work, but this time for theWSNnodes.

TheMAClayer is also the module that creates the signal, radio transmitted signal of a device, mapping, the way the signal is represented in the simulator. The mappings can hold as many dimensions as we want, but mostly it is used the time and frequency dimensions. When a mapping is created we specify its duration and bandwidth, so the analogue models can be applied and any collision can be taken into account while processing the signals reception.

The PhyLayer class extends the BasePhyLayer class and implements a good base implemen-tation to use. It assures the radio modes on/off, and the times between the switches. Also it provides a good handling of the airframes, data messages transmitted between nodes to simulate the packets, adding and removing them from the channel. This class is especially important be-cause it applies the analogue models, mathematical models to simulate the propagation medium, that we will choose to use.

The PhyLayerBattery has special relevance forWSNsensors, because they extend the PhyLayer class adding it a battery module that will simulate a real battery by extracting current from its total capacity whenever an action is performed.

InMiXiMwe have the option of creating new analogue models, extending them or use the ones already implemented. In our simulations we will use only two of them, the SimplePathLoss-Model and the LogNormalShadowing. We chose the SimplePathLossSimplePathLoss-Model because it implements accurately the signals attenuation over the transmission distance. Also, the LogNormalShadowing choice is due to the fact we wanted to include the multi path experienced by the transmission signal before reaching the reception point. A countless number of analogue models can be used in one experiment, we just need to define them in aXML, Extensible Markup Language, file.

(21)

3.2m i x i m f r a m e w o r k 11

node and the transmitter node d. Some of these parameters are set in the analogue modelsXML file. The calculation of this attenuation can be seen in equation3.1.

Path Loss Attenuation = PL0 × d−α

Where:

PL0 = λ 4π

2

(3.1)

The LogNormalShadowing model adds shadowing to the signal. This is generated by a random number generator according to a normal distribution with a mean and standard deviation defined by us in theXMLfile for the analogue models. This random number was generated in dB, so it is converted to Watt and added to the power when the signals attenuation is computed. In this model we also specify the fading interval time. This will make that for each interval a random fading value, according to the procedure above described, is computed and added at the proper signals time. This interval definition enables us to tune between slow and fast fading.

The total signals attenuation is computed in thePHYlayer at a nodes reception by adding to the received signal all the attenuations resultant from the analogue models.

ThePHYlayer finally holds a module of most importance, the decider. The decider is the object that decides whether the packet arrived with errors or not. It will decide according to what we specify in its implementation, it can be aSINRthreshold or a sensitivity threshold, and it is the module that processes the airframe several times. First, it checks the header of the received packet, once, and then it will check the body of the received packet, as many times as the fading interval changes for the signals bandwidth.

(22)
(23)

4

P O W E R S P E C T R U M A N D F I LT E R C H A R

-A C T E R I S T I C

MiXiMsPHYmodels fail to mask the signals transmitted power in a realistic way to represent cross-channel interference. Adjacent cross-channels will contribute to signals degradation, interference in adjacent frequencies caused by more than one transmission during a packets duration time. IEEE protocols specify maximum interference power on the adjacent channels caused by hardware limitations when a transmission over a specific bandwidth occurs. This power in MiXiM is neglected, mostly becauseMiXiMwas not intended to be a cross network simulator. Though for the pursued purposes of this work we are forced to take it into account, so we can have a realistic scenario regarding the cross networks interference scenario.

These scenarios require that a signal should be mapped differently, closer to real power transmission masks. It should not be restrained under the bandwidth limits of the channel, but it should follow the attenuation pattern from the center frequency to adjacent channels according theIEEEprotocol in use, or according to the hardware limitations. The same procedure should apply to the filters at the receivers. They should not be set as an ideal filter, in which we receive all the power over the bandwidth of the channel, but they should try to approach in the best possible way the events in real scenarios, how the hardware processes the received signals.

For these reasons, it was required a new way of creating a signals mapping and a receivers filter mapping over the spectrum. By doing this, we could simulate cross channels interference, in non-overlapping channels, and simulate inter protocol interference like it happens in real scenarios, where the transmission power is not only contained within the channels bandwidth.

4.1

m i x i m s i m p l e m e n tat i o n

MiXiMimplements both ideal power spectrum, transmission power mask, mapping and filters characteristic, receivers mask, in which we obtain a uniform distributed function over the bandwidth of the signalsIEEEprotocol in use. This means that no cross channel interference will occur while transmitting signals, inside airframes, centred in different frequencies corresponding to two adjacent non overlapping channels. Similar will occur while using different protocols that share the sameISMband, like it happens withIEEE802.11,WLAN, andIEEE802.15.4,WSN, protocols using non overlapping channels.

To occur interIEEEprotocol interference, we need to use only one connexion manager object inMiXiMs simulation. This way, all the nodes can see and receive any transmitted power from any node despite using or not the sameIEEEprotocol.

(24)

14 n e w i m p l e m e n tat i o n4.2

power

frequency

f0− ∆f f0 f0+ ∆f

Tx Mapping

Figure 4.1: Transmitted power mask in MiXiMs signal

Figure 4.2: Real signals transmitted power mask

Similar methodology to the one used for the new definition of transmitted power, should be considered regarding signals reception. MiXiMimplements the reception filter as an ideal filter, figure4.3, receiving only the power in the channels bandwidth with a uniform distributed characteristic, mask. The filter characteristic should be defined as much as possible closer to the real filters characteristic, figure4.4. This real characteristic mapping is not constrained to the channel bandwidth and it is not uniform all over the channels bandwidth, in fact it has attenuation within the channels frequency domain, meaning the signal will not have the same received power all over the spectrum.

power

frequency

Filter Mapping f0− ∆f f0 f0+ ∆f

Figure 4.3: MiXiMs receivers filter mask

4.2

n e w i m p l e m e n tat i o n

In this section the new implementations for the power spectrum and the filter characteristic in MiXiMwill be presented.

4.2.1 Power Spectrum

The objective of the new transmitted power mapping is to implement in a new and more realistic model, also to make it as general as possible, so it can be shaped according the users purposes and objectives. For this goal, a general concept was idealized, it needed to be simple for the user and it should be able to represent any type of mapping, as long as it would follow the symmetry between the central frequency and the distance, both positive and negative, from it.

(25)

4.2 n e w i m p l e m e n tat i o n 15

Figure 4.4: Filters real characteristic

mapping as a combination of power density steps that would represent the signal transmission power. These steps would be as many as the user intends, for complex models, and as few as simple models require. With this implementation, figure4.5, we would achieve the proposed objective. It would grant complex and also simple models, just by changing the number and the level of the steps, achieving a customized granularity model.

Figure 4.5: New Implemented Transmission Power Mapping

To implement the desired power spectrum mapping inMiXiMsome classes were extended and new files were created. For the definition of the steps we thought the best option would be to write it in a text file, so a .txt file was created containing the definitions of the steps. The way to define it is to write a 2 column matrix containing in the first column the spacing between the center frequency and the border of the step, and in the second column we define the attenuation of the power for that step. The attenuation of the power defined in each step is calculated using Step Power = Power × Attenuation, so 1 means no attenuation at all, and 0 mean total attenuation and Power = 0 Watt.

As an example we can see how the table should look like, in table4.1, the first column defining the step width and the second column defining the step height. For this case we have 2× n = 5 steps in the mapping, being n the number of entries in the first column. We can state that there will be a central lobe defined between f0± 11MHz, with total transmission power,

and then the adjacent lobes defined from f0+ 11MHzto f0+ 22MHzand from f0− 22MHzto

f0− 11MHz, both adjacent lobes with only half of the total transmitted power. Same procedure

applies to the remaining lobes until the last entry of the file. Frequency in Hz Gain

11× 106 1.0

22× 106 0.5

33× 106 0.1

Table 4.1:Transmission Power Mapping Definition

(26)

16 n e w i m p l e m e n tat i o n4.2

classes. This newMACclass purpose is to override some functionalities of the previous class, especially the initialize and the createSignal, function that will generate the transmitted power mapping, functions.

In the initialize function, we extract the data from the file, by adding the functionality of reading the previously referred .txt file and store its info into two different vectors with the same size, the frequencies vector and the attenuation vector. In the frequencies vector we store the values for the frequency steps and in the attenuations vector the respective attenuation is also stored.

The other function that needs to be overridden is the createSignal, called by theMACclass to create the signal and send it to thePHYlayer. Here, we have to change the way to create the signal to be set in the AirFrame. In this function, a new method of creating the transmission signal mapping is called and the proposed new mapping is returned and associated with the transmitted signals mapping. This method will receive as argument the signals duration, the central frequency and the transmitted power value. Then it will create a mapping in time for the signals duration and in frequency according to the described above, setting the attenuated power values in the respective lobes. We should take into account that the signal will always be symmetric regarding its central frequency, as we go further from the center frequency the signal suffers the same attenuation behaviour for f0 + ∆fand for f0 − ∆f.

4.2.2 Filter Characteristic

TheMiXiMfilter characteristic represents an approximation to real scenarios, in this case an ideal filter characteristic. Though this could be set in a different way, a better way that could allow us to shape the mapping according the user needs, our needs, independently how the user wants it. With this objective, we propose a different approach to this problem, an approach in which the user defines the mask of the filter. The filter can be closer to the real filters, closer to ideal filters or even completely different, all at users choice.

To address this goal we proceeded with a similar approach to the power spectrum mapping. We will map the filter characteristic in several steps, as many or as few the user desires. The final filter characteristic will be similar to, figure4.6, in case the user chooses to have a filter characteristic closer to real scenarios. Again with this option of creating the desired reception filter mapping we can get more flexibility.

Figure 4.6: New Implemented Filter Characteristic

(27)

4.2 n e w i m p l e m e n tat i o n 17

of the filters gain along the frequency should be indBdue to practical reasons, it is usual to refer to filters characteristic indBand data sheets usually provide this information in this unit of measurement. An example of the filters .txt file can be seen in table4.2.

Frequency in Hz Gain in dB 2.412× 109 0

11× 106 0

22× 106 −40

33× 106 −80

Table 4.2: Filter Characteristic Mapping Definition

To implement this new filter mapping inMiXiMs we had to extend thePHYlayer so that a new decider could be implemented. This newPHYlayer named PowerPhyLayer extends the PhyLayer class and it adds to it the initialization of the new decider, PowerDecider. When a new object of this decider is created it reads the .txt file with the definitions of the filter characteristic and stores both frequencies and respective attenuations into two different vectors with the same size, so it can be used later for mapping purposes according to our objective.

The newly implemented decider has its main purpose to implement the new filter mapping, so it will have to override the function calculateRSSIMapping. The new overridden function calculateRSSIMapping will have the main role in applying the filter. Here in this function we compute the interferences of other packets in the medium, the air, and also add the noise that will be added to the received signal. So in this function we multiply the interferers signals with the filter, so we can obtain the right interference pattern.

The new filter mapping is created by a new function, createAttenuationMapping, and its only objective is to create the mapping of the filter, based on the vectors containing the filter definition in the file. The function, createAttenuationMapping, whenever called returns a filter mapping. As an example, if the information in the table4.2was inside the .txt file, a filter mapping would be created with 0dBattenuation in the band f0± 11MHz, with −40dBattenuation in the bands

from f0− 22MHzuntil f0− 11MHzand from f0+ 11MHzuntil f0+ 22MHz, and finally with

−80dBattenuation in the bands from f0− 33MHzuntil f0− 22MHzand from f0+ 22MHzuntil

f0+ 33MHz. The resultant filter mapping would be like figure4.7.

power frequency[Hz] 2.412× 109− 33× 106 2.412× 109 2.412× 109+ 33× 106 0dB −40dB −40dB −80dB −80dB 22MHz 11MHz 11MHz 11MHz 11MHz

Figure 4.7: Example of Resultant Filter Mapping Built From Input

When a collision occurs between airframes, the situation in figure4.8, between t1and t2

(28)

18 n e w i m p l e m e n tat i o n4.2 time AirFrame1 AirFrame2 t1 t2 t0 t3

Figure 4.8: Interference Between Signals in Time Overlap

Figure 4.9: Interference Between Signals in Spectrum Overlap

Furthermore, the calculateRSSIMapping will return the addition of all interference and the noise. In this function, calculateRSSIMapping, we filter the signals received power by dividing the total interference power plus the noise, by the filter mapping. This way, we can get the right SINRwhen we compute this ratio, dividing the receive power, by the noise plus interference over the filters mask, this means:

SINR= Received Signals Power

Total Noise + Interference (4.1)

Taking into account that calculateRSSIMapping will return:

Total Noise + Interference =Noise + (Interference × Filter Mask)

Filter Mask (4.2)

(29)

4.3s i m u l at i o n s 19

SINR= Received Signals Power Total Noise + Interference Having into account equation4.2:

= Received Signals Power Noise + (Interference × Filter Mask)

Filter Mask Resulting:

= Received Signals Power × Filter Mask Noise + (Interference × Filter Mask)

(4.3)

Which is exactly what we wanted to achieve, the signalsSINRtaking into account the filters characteristic.

4.3

s i m u l at i o n s

In this section some results will be presented to confirm the implementation of the power spectrum mapping and the filter characteristic mapping. We will present two scenarios, one with no interference and other with interference, in order to cover all case scenarios.

4.3.1 No Interference Scenario

In the first scenario we want to confirm if the changes toMiXiMare working as we intended. For this experiment we will consider two nodes, one transmitter and one receiver scenario, figure 4.10. This simulation purposes is to assess whether the new transmission mapping is being created or not and also to check the filter mapping.

Figure 4.10: Two Node Scenario

For the experiment we will transmit a packet, centred in 2.412GHz, with 100 milliwatt of transmission power and map it in frequency according to table4.1. The two nodes are distanced by 15 meters and we consider a thermal noise level of −110dBm. In figure4.11we can see that the mapping was successfully created and according to the requirements in table4.1. In the mapping figures, we can see at the top the time mapping, signals duration and at the left column the border frequencies are defined. Note that these prints only show the values at the border frequencies and not at the lobes center. Also the values shown in the mappings print are indBm.

(30)

20 s i m u l at i o n s4.3

Figure 4.11: Transmitted Power Mapping Created by createSignal Function

node receives the signals power, figure4.12, not filtered by the filter yet. The filter characteristic implemented in this experiment is defined by table4.2.

Figure 4.12: Received power Mapping Created by the Decider Class

In order to apply the filter mapping to the signals received power we have to calculate the SNR, as described above in equation4.3. In figure4.13we can see the noise divided by the filter characteristic and after returning this mapping to calculate theSNRwe obtain the final mapping, figure4.14, which is according to the expected, variable in the signals spectrum, as defined in the .txt files for the filter and the power mappings. We observe a betterSNRin the signals main lobe, the lobe containing the central frequency, and as a contrast we get, as expected, a worse SNRas we go further from the central frequency to the outer lobes.

Figure 4.13: Noise Mapping with Filter Mapping Created by calculateRSSIMapping Function

4.3.2 Interference Scenario

Having presented the first case, a simple scenario, where just 2 nodes could communicate, we present the second scenario, a scenario far more interesting for the purposes of this work, a scenario where we have 3 nodes, two transmitters and one receiver, figure4.15. The two transmitters are at different distances, Transmitter 1 at 15 meters and Transmitter 2 at 35 meters away from the receptor. Both will have their own central frequencies, Transmitter 1 with 2.412× 109Hzand Transmitter 2 with 2.445 × 109Hz, and both will have a 33 MHz bandwidth.

(31)

4.3s i m u l at i o n s 21

Figure 4.14: Final SNR Mapping Created by the Decider Class

interference at the frequencies between both nodes central frequencies, so that we can expect to see a difference between the mappings of both sides of the central frequency of the Transmitter 1 airframe at the reception.

Figure 4.15: Three Node Scenario

Given that the interferer, Transmitter 2, is further than Transmitter 1, regarding the receivers distance, we set a transmission power 100 times higher. This transmitted power will be mapped according the oldMiXiMmapping, figure4.1, not the new one, figure4.5. The purpose of these different mappings is to see a major difference between the frequencies suffering interference and the ones that do not. Again, the data frame from Transmitter 1 will have 100 milliwatt of transmitted power and the thermal noise level will be −110 dBm. In figure4.16we have the data frame transmitter power mapping, and in figure4.17we have the interferer frame mapping. This interference scenario will correspond to figure4.8in time domain and figure4.9 in frequency domain.

In table4.3, we have a brief description of the used parameters.

When the receiver receives the airframes it computes the first one received, the data airframe, and the second airframe received, interference airframe, will be added to the interference. The interference frame will be filtered and then added to the noise mapping, in figure4.18we have the interference power that will be added to the noise mapping, resulting in the mapping in figure4.19.

(32)

22 s i m u l at i o n s4.3

Parameter Value

Distance Between Transmiter 1 and Receiver 15 m Distance Between Transmiter 2 and Receiver 35 m

Noise Variance σ2

N −110 dBm

Transmiter 1 Bandwidth 33 MHz Transmiter 1 Central Frequency 2.412× 109Hz

Transmiter 1 Maximum Transmitted Power 100 mW Transmiter 2 Bandwidth 33 MHz Transmiter 2 Central Frequency 2.445× 109Hz

Transmiter 2 Maximum Transmitted Power 10 W

Table 4.3:New Power and Filter Implementation Experiment Parameters

Figure 4.16: Transmitted Power of Data Airframe Created by createSignal Function

suffer interference.

(33)

4.3s i m u l at i o n s 23

Figure 4.17: Transmitted Power of Interferer Airframe Created by the old createSignal Function

Figure 4.18: Interference Power After Filtered Created by calculateRSSIMapping Function

Figure 4.19: Noise Plus Interference Power and Filter Created by calculateRSSIMapping Function

Figure 4.20: Received Data Transmitted Power Mapping Created by the Decider Class

(34)
(35)

Part II

(36)
(37)

5

W S N S TA N D A L O N E

In this chapter we will useMiXiMs modules, application, network,MACandPHYlayer classes, for WSNnodes with the purpose of evaluating if it provides accurate data, data that should follow the same pattern and have similar values to the analytic models prediction, withIEEE802.15.4. We want to useMiXiMs simulations results to obtain the packet loss probability, between nodes transmission, and alsoSNRmeasurements so we can compareMiXiMs performance with the performance derived analytically, to validate, if the results are accurate,MiXiMs simulator for WSNwithIEEE802.15.4protocol.

5.1

s c e na r i o

To achieve the simulation results we want to analyse, a simple experiment was performed. We considered twoWSNnodes, one node transmitting packets over the medium, and the other node receiving the packets at a certain distance d.

We will vary the distance between them, d, from 5 meters up till 685 meters, so we can have negativeSNRvalues indB. This last distance exceeds by far the receivers sensitivity, minimum packet power level a sensor can detect in order to be received, but it is interesting to see the evolution of the results pattern, so only for this reason we extrapolate by far the maximum distance between the nodes. The scenario we describe can be seen in figure5.1.

Figure 5.1: WSN Standalone Simulation Scenario

Later, at the end of this chapter, we will analyse the obtained simulation results based on the received packetsSNRand the packets reception rate.

5.2

a na ly t i c m o d e l s

The theoretical model we will use to compare theMiXiMs results will be based on the transmitted power and its attenuation over the distance between the transmitter and the receiver device, equation5.1.

Received Power = PowerWSN× PL0 × d

−α

× 10-Z (5.1)

(38)

28 i m p l e m e n tat i o n5.3

by adding the path loss attenuation to the transmitted power. The reason we compute a monte carlo experiment is that it is simpler to define the shadowing by a sum of values, see equation 5.3, than to calculate the exact shadowing expression, see equation5.2. With this computational simplification we will obtain a real close value to the exact one, calculated by the integral, as long we provide enough samples in this addition of terms in equation5.3.

Z = Z+∞ −∞ s fs(s) ds where s = Shadowing (5.2)

Monte CarloReceived Power=

1 N × N X i=0 PowerWSN× PL0 × d −α× 10-Nvalue (5.3)

For each received packet we compute a monte carlo simulation with 1000 samples, in order to have an accurate and completely random value for the fading and the final received power.

5.3

i m p l e m e n tat i o n

The considered nodes in the scenario are Host802154 nodes using SensorApplLayer as application layer, BaseNetwLayer as network layer, CSMA802154 asMAClayer and PhyLayerBattery asPHY layer. Furthermore, we use as decider the Decider802154Narrow class.

All the layers chosen areMiXiMbasic classes, and the node name Host802154 comes from theMiXiMs auto generated node process. In figure5.2, we can see the layers of aWSNnode, in this experiment. The choice of the classes was driven by the purpose of the experiment, for theMACandPHYlayer, we chose these classes because they implement theIEEE 802.15.4 protocol standards. For the application layer, we needed a constant packet generator and the SensorApplLayer is a good class for this purpose, while for the network layer we chose BaseNetwLayer because we wanted it to be simple and just propagate the packet to the lower layer. WSNNode PhyLayerBattery CSMA802154 BaseNetwLayer SensorApplLayer Nic

(39)

5.4p e r f o r m a n c e m e t r i c s 29

5.4

p e r f o r m a n c e m e t r i c s

MiXiMsIEEE802.15.4PHYlayer implements a receiver based onSINR, in this scenarioSNR, and completely ignores the nodes sensitivities. This model of reception is defined by the choice of the decider class. This decider, Decider802154Narrow, will, whenever an airframe is received, be processed and assessed two times. The first time, it will analyse the signals header and the second, and last, analyse the entire packet. When the signals header is checked, we meant to assess if the receiver can synchronize, detect and receive thePHYheader with no errors, with the WSNpacket.

This assessment is done by checking the probability of error for thePHYheader length, this case 8 bits, and it is computed using theBERvalue for the header, equation5.4. TheBERvalue is obtained by using the headersSNRvalue and also taking into account the modulation used, OQPSK16, equation5.5. After this, we have the header error probability, so the decider generates a random number from a uniform distribution between 0 and 1. If the number is below the error probability we will have an error while trying to synchronize with the packet header, if it is above, the receiver has successfully synchronized with the packet.

Error Probability = 1 − (1 −BER)Number of Bits (5.4)

BER= 8 15× 1 16× 16

X

k=2 (−1)k16 k  e20×SNR× ( 1 k−1) (5.5)

Being theWSNpacket synchronized with the receiver, we have to do a similar process for the entire packet. Again we have to evaluate theBERfrom theSNR, equation5.5, and later compute the packet error probability, using equation5.4, but this time using the packet length, the 168 bit. Again, after having computed the packet error probability we generate a random number, using a uniform distribution between 0 and 1 and if bellow the error probability the packet is discarded, if above the packet is considered to have no errors.

Whenever a packet is rejected due toPHYheader synchronization errors we define it as a packet loss. If the packet contains errors in its body but not in the header, we define it as a discarded packet. We can see in figure5.3theWSNpacket structure, and in figure5.4 we can see the process, described above, done by the decider to assess if the packet was received successfully with no errors.

PHY Synchronization Header Body

Figure 5.3: WSN Packet Structure

Decider PHY Synchronization Header Errors ? Body Errors ? No Yes Packet Arrives No Yes Packet Lost Packet Discarded Packet OK

(40)

30 s i m u l at i o n r e s u lt s5.6

5.5

s i m u l at i o n s e t u p

We consider, for the medium in the experiment, the SimplePathLossModel and LogNormalShad-owing models available inMiXiM as the propagation models. In the SimplePathLossModel we consider the path loss variable α equal to 3 and use a carrier frequency of 2.412 × 109Hz. As

shadowing parameters we will choose zero mean with a standard deviation of 5dB. Also for the shadowing we will consider two scenarios, one where the shadowing interval changes every millisecond, slow shadowing, and another much faster, where the shadowing will change every 10microseconds, fast shadowing. In table5.1, we can see the medium models and parameters considered.

Parameter Value

Central Frequency 2.412× 109Hz

Fast Fading Interval 10 µs Path Loss Coefficientα 3.0

Path Loss Model SimplePathLossModel

Shadowing Mean µS 0 dB

Shadowing Model LogNormalShadowing Shadowing Standard Deviation σS 5 dB

Slow Fading Interval 1 ms

Table 5.1: Standalone Experiment Parameters

The experiment will consist of transmitting, in broadcast mode, 4000 packets of 168 bit at a rate of 250kbit/s, each generated at a periodic inter generation packet time of 0.01 seconds. The transmitted power of the airframe will be 1.1 milliwatt, and will only be defined in time dimension, due toMiXiMsMACclass forIEEE802.15.4implements only this mapping, though no problem will occur with this mapping, there are onlyWSNnodes and only one is transmitting, so no interference could occur. The receivers sensitivity will be −85dBm, and the medium thermal noise level will be −110dBm. In the decider, we define thePHYsynchronization header length, the minimum possibleBER, bit error rate, and the modulation of the packet to be sent. Here, we chose 8 bits for thePHYheader synchronization length, according toIEEE802.15.4, also for the minimumBERthe value of 10−8and a modulation of

OQPSK16. In table5.2we have a resume of all parameters.

5.6

s i m u l at i o n r e s u lt s

After having set up the experiment and the described the decision process, we present the results of the simulation in this section. First we will compare theMiXiMsSNRmeasurements for the fast shadowing and the slow shadowing case with the analytical model that considers log-distance path loss model combined with log-normal shadowing model. This log-normal shadowing model is computed by a monte carlo simulation. Later we will present and discuss about the reception probabilities of the packets.

5.6.1 SNR Analysis

(41)

5.6s i m u l at i o n r e s u lt s 31

Parameter Value

Central Frequency 2.412× 109Hz

Fast Fading Interval 10 µs Inter Packet Generation Rate Periodic Inter Packet Generation Time 10 ms

Minimum BER Value 10−8

Modulation OQPSK16

Noise Variance σ2

N −110 dBm

Packet Length 168 bit

Path Loss Coefficientα 3.0 PHY Header Synchronization Length 8 bit

Receiver Sensitivity −85 dBm Shadowing Mean µS 0 dB

Shadowing Standard Deviation σS 5 dB

Slow Fading Interval 1 ms Transmitted Packets 4000 Transmission Power 1.1 mW

Transmission Rate 250 kbit/s

Table 5.2:Standalone Experiment Parameters

By analysing the figure5.5, we can state thatMiXiMs curve follows the theoretical prediction curve very closely, both for the fast and slow shadowing experiments, when comparing the mean values, as expected. The reason why we see, with the same exact values, theSNRfor average minimum and average cases, considering slow shadowing, is due to the fact that packets are small enough to be contained within the variation interval of the shadowing. Different case occurs when we consider fast fading and here it changes within a packet duration time, so the average minimum of the packets is much lower than the case of slow fading.

SNR= Received Signals Power

Noise (5.6)

SNRminimum(dBm) = −85dBm− −110dBm= 25dB (5.7)

We should also state that if the decider took into account the receivers sensitivity we would stop receiving packets at a distance of 30 meters. This distance can be found due to the constant noise level and also due to no interference is present. We can consider in equation 5.6the sensitivity as the minimum signal power of a packet, and with this value obtain the minimum SNRfor the packet to be detected and received by the WSNreceiver. Calculating this value, equation5.7, we get a SNRequal to 25dB, which will correspond to a distance of around 30 meters.

5.6.2 Packet Reception Analysis

(42)

32 s i m u l at i o n r e s u lt s5.6

Figure 5.5: Signal-to-Noise Ratio

Contrary to this, we have two different evolutions of the discarded packets rate, number of discarded packets over total received packet with no errors on synchronization, for the slow and fast shadowing scenarios, see figure5.7. This figure5.7shows clearly the difference of having fast and slow shadowing. We have packets of 168 bits so at a rate of 250kbit/s, which makes a 672microseconds of packet duration. During this time the shadowing interval does not change for the slow scenario while for the fast scenario it changes between 67 and 68 times, rising up the probability of error, it just takes that during one time interval theSNRgoes bellow the error level and the packet gets discarded. For this reason, we can explain that in the presented figure5.7we drop much more packets at the same distances when fast shadowing scenario is considered than when we consider slow shadowing scenario.

(43)

5.6s i m u l at i o n r e s u lt s 33

Figure 5.6: Airframe Loss Rate

(44)

34 s i m u l at i o n r e s u lt s5.6

(45)

6

W L A N / W S N I N T E R F E R E N C E

WLAN,IEEE802.11 protocol, andWSN,IEEE802.15.4 protocol, coexist in the same area and spec-trum space, so it is important to predict the coexistence scenario phenomena. This coexistence brings collisions toWSNdevices whenever frames from both networks overlap in time and in frequency generating interference to each other. Due to their low power characteristics theWSN devices are the weakest link in this coexistence, resulting into unsuccessful data transmissions within this protocol,IEEE802.15.4.

In this chapter, we want to assess if the simulator, MiXiM provides useful and correct information about thisWLANandWSNdevices co-existence and whetherMiXiMs simulations results reflect the interference, predicted by the analytic models, between these devices.

We will present in this chapter the experiment set up, followed by the implementation and finally, we will analyse the results obtained from the simulations, as well as the comparison between these results and the analytic models prediction.

6.1

s c e na r i o

In this experiment, we want to achieve and compare the interference pattern betweenWLAN andWSNdevices, more specifically, when a network ofWSNdevices suffer interference from a WLANdevice transmitting at the same time and in the same spectrum space. This is meant to assess the implications of the high power interferer in theWSNdevices transmissions. We want also to study the interference behaviour along the distance between the two present networks. To achieve the pursued results we will consider a simple scenario, a scenario where we have two WSNdevices, one device transmitting and one device receiving. Also, we will consider oneWLANtransmitter. This high power transmitter, theWLANdevice, while compared with the WSN devices transmission power, will be synchronized with the WSN transmitter. The synchronization is in practical terms the ability of the receiver to detect a packet in the medium and start the reception process. Such synchronization will force theWSNtransmissions to have always interference in the transmitted airframes.

To study the variation of the interference pattern, two variations in two variables will be performed, we will have a variable, d, representing the distance, in meters, between the two WSNdevices and another variable, D, representing the distance, also in meters, between the WLANtransmitter, the interferer, and theWSNtransmitter. We will define this D with positive and negative values. If negative, we intend to refer that theWLANtransmitter is before theWSN devices, see figure6.1. If the values are positive, it means theWLANtransmitter is between the twoWSNdevices, see figure6.2.

(46)

36 i m p l e m e n tat i o n6.2

Figure 6.2: WLAN Between WSN Nodes Scenario

For this experiment, we will vary the distance, d, between 5 and 50 meters, and for each variation of d, we will vary the placement of the interferer, meaning we will vary D from −100 up to 100 meters for each variation of d.

The simulation results analysis will be based on the received packetsSINRand the packets reception rate. This evaluation will be done in section6.5.

a na ly t i c m o d e l s We will consider the analytic models described in section5.2for the simulation result analysis.

6.2

i m p l e m e n tat i o n

In order to make the simulation, we had to extend some classes inMiXiM, so theWLANandWSN nodes could behave the way we wanted them to do.

TheWSNnodes we considered in the scenarios were Host802154 using as application layer SensorApplLayer, as network layer BaseNetwLayer, asMAClayer InterferenceMacLayer, and finally asPHYlayer InterferencePhyLayer with an InterferenceDecider802154 decider.

The choice of the classes for theWSNdevice layers were made regarding the objectives we pursued, so the application layer is the SensorApplLayer, because it provides us a good packet generator where we can define the periodicity of the packet generation, which in our case will be every 0.01 seconds at a periodic time basis. The network layer we chose was BaseNetwLayer, because we just want this layer to propagate the packet down to theMAClayer, after having encapsulated the packet as a network layer packet.

For theMAClayer, we implement this new class, InterferenceMacLayer, which extends the CSMA802154MACclass and changed some aspects for this simulation. We chose to extend the CSMA802154 because this class would be a better basis for our purpose. We want to send the packet immediately, not having to wait for any timer, such as Clear Channel Assessment, or back-off, so we can control it better for a better synchronization with other devices. So, this newMACclass whenever receives a new packet coming from an upper layer, we propagate it immediately to the physical layer to be broadcasted into the medium. We also changed, here in this newMAClayer class the function createSignal, responsible for the creation of the transmitted power mapping. Now, this function will create a mapping in two dimensions, time and frequency, because the original function in the class was only mapping it in time domain, and for this experiment it is crucial to have a frequency domain mapping, due to the bandwidth difference between theWSNandWLANairframes.

(47)

6.2i m p l e m e n tat i o n 37

calcChannelSenseRSSI and added the new feature of processing the signal also in the frequency domain.

In figure6.3, we can see the scheme of theWSNdevice.

WSNdevice Nic InterferencePhyLayer InterferenceMacLayer BaseNetwLayer SensorApplLayer

Figure 6.3: Layers of a WSN Node

TheWLANnode we will consider in the scenarios will be Host80211 nodes using as application layer SensorApplLayer, as network layer BaseNetwLayer, asMAClayer WLANInterferenceMacLayer, and for thePHYlayer PhyLayer with the Decider80211 class as a decider.

The choice of the SensorApplLayer as application layer and the BaseNetwLayer as network layer is the same as for theWSNnodes, referred before. As for theMAClayer, we chose this new class, WLANInterferenceMacLayer, that extends the Mac80211 class, because we wanted aWLAN node with theIEEE802.11 protocol, but here some changes were made.

In order to achieve synchronization between networks and to assure theWLAN does not detect any packet from theWSNdevices at any location, we extended thisMACclass, so that no back-off timer was triggered. We changed the way to process a received packet from the upper layer, in the function handleUpperMsg. Whenever we receive a packet from the network layer we send immediately this packet to thePHYlayer, after having encapsulated it in aMACpacket and attaching the signal to the airframe. This packet will be sent down to be immediately transmitted as a broadcast airframe.

Regarding thePHYlayer and the decider, we used the classes that already implemented the WLAN,IEEE802.11 protocol standards. We can see in figure6.4the scheme of theWLANdevice.

WLANdevice Nic PhyLayer WLANInterferenceMacLayer BaseNetwLayer SensorApplLayer

Figure 6.4: Layers of a WLAN Node

(48)

38 e x p e r i m e n t s e t u p6.4

packets, andWLANairframes, as interferer packets, in this experiment.

6.3

p e r f o r m a n c e m e t r i c s

TheMiXiMs model for the IEEE 802.15.4PHYlayer we are using implements the reception as it was described in section5.6, so this model will ignore the nodes sensitivity and instead, it computes a reception probability based on the received signalSINR. The main difference in this section is that instead of computing theBERaccording to equation5.5, it is computed according the equation6.1, which is very similar to equation5.5, the only difference is that now the received frame will have interference cause by theWLANtransmission, so instead of having the packetSNRwe have to compute theBERconsidering theSINR, due to the interferer airframe present in the medium. We can see that theWSNairframe will suffer interference during its entire duration in figure6.5.

BER= 8 15× 1 16× 16

X

k=2 (−1)k16 k  e20×SINR× ( 1 k−1) (6.1)

Furthermore, for the interference of theWSNairframe by the WLANairframe, we should realize that the totalWSNpower ratio, ratio betweenWSNreceived power andWLANreceived power, defined in equation 6.2, is proportional to the distances of the receiver device and inversely proportional to the interferer device distance, both distances regarding the WSN receivers position. This equation6.2is important in the scenario where theWLANdevice is between the twoWSNdevices, configuration in figure6.2. Note that the variable PL0 in equation 6.2defines the reference distance attenuation.

WSNPower Ratio = WSNSignal Power WLANSignal Power

= PowerWSN× PL0WSN× d

−α

× 10-ShadowingWSN

PowerWLAN× PL0WLAN× D

−α × 10-ShadowingWLAN ∝ d −α D−α (6.2)

6.4

e x p e r i m e n t s e t u p

In the experiment we will consider the transmission of 25000 packets, each generated at a periodic inter generation time of 0.01 seconds for bothWLANandWSNtransmitters since they are synchronized. TheWSNtransmitter will generate packets of 168 bits length, at a rate of 250kbit/s, according toIEEE802.15.4. TheWLANdevice, the interferer, will transmit packets of 1696bits length at a rate of 1Mbit/s, according toIEEE802.11. In figure6.5we can see how the frames will interfere during the transmission from the transmitters to the receiver.

(49)

6.5s i m u l at i o n r e s u lt s 39

OQPSK16 with a minimumBERof 10−8and a header synchronization length of 8 bits, everything

according toIEEE802.15.4. time WLANAirFrame WSNAirFrame t1 t2 t0 t3

Figure 6.5: Interference Between Airframes

The experiment will be performed with the SimplePathLossModel and the LogNormalShadowing models, available inMiXiM. We will again consider two scenarios, slow-changing shadowing scenario and fast shadowing scenario. The parameter for these models are defined in table5.1, section5.5.

TheWSNdevices will have a packet transmission power of 1.1 milliwatt, and will be mapped in time and frequency. As for the interferer, theWLANdevice, will have a packet transmission power of 100 milliwatt and will also be mapped in time and frequency domains. Both devices, WLANandWSNwill have the same central frequency of 2.412 × 109Hz, but the

WSNdevices will have a bandwidth of 3MHz, according toIEEE802.15.4, while theWLANdevice, the interferer, will have, according toIEEE802.11, a bandwidth of 22MHz, which means that only a small part of the 100 milliwatt of the transmission power of the airframe will actually interfere with the WSNtransmitted airframe, due to its reduced bandwidth.

TheWSNdevices will also have a sensitivity of −65dBm, and the medium thermal noise power will be −80dBm.

In table6.1, we can see a brief resume of the simulation parameters.

6.5

s i m u l at i o n r e s u lt s

After having described the simulation parameters and theWLANandWSNdevices description we will present the experiment results in this section. First we will present the measurements for theSINR, in the slow shadowing scenario and fast shadowing scenario, considering the node configuration in figure6.1, where the interferer is before theWSNdevices, and the configuration in figure 6.2, in which theWLANdevice is in between the twoWSNdevices. Later, for these scenarios and configuration we will compare the probabilities of loss and discarded packets.

6.5.1 SINR Analysis

Having stated how the reception of a packet is processed we present the results obtained from the simulation. In figure6.6, we can observe theWSN SINRat the receiver node, for the scenario of figure 6.1, and considering slow shadowing. In this figure6.6, the y axis represents the signalsSINR, while the x axis represents the distance between theWSNreceiver and theWSN transmitter. Here, for each distance between theWLANnode and theWSNtransmitter node a curve is drawn, and each colour represents this distance.

(50)

40 s i m u l at i o n r e s u lt s6.5

Parameter Value

Central Frequency 2.412× 109Hz

Distance Between WLAN Tx and WSN Tx −100 to 100 m Distance Between WSN nodes 5 to 50 m

Fast Fading Interval 10 µs

Minimum BER Value 10−8

Noise Variance σ2

N −110 dBm

Path Loss Coefficientα 3.0 Receiver Sensitivity −65 dBm

Shadowing Mean µS 0 dB

Shadowing Standard Deviation σS 5 dB

Slow Fading Interval 1 ms

WLAN Bandwidth 22 MHz

WLAN Inter Packet Generation Rate Periodic WLAN Inter Packet Generation Time 10 ms

WLAN Packet Length 1696 bit WLAN Transmitted Packets 25000 WLAN Transmission Power 100 mW

WLAN Transmission Rate 1 Mbit/s

WSN Bandwidth 3 MHz

WSN Inter Packet Generation Rate Periodic WSN Inter Packet Generation Time 10 ms

WSN Modulation OQPSK16

WSN Packet Length 168 bit

WSN PHY Header Synchronization Length 8 bit WSN Transmitted Packets 25000 WSN Transmission Power 1.1 mW

WSN Transmission Rate 250 kbit/s

Table 6.1:Interference Experiment Parameters

theWLANand theWSNnodes at the exact same position, and in this case theSINRis less than 0 dB, meaning the interferer signal is much stronger than the data signal, theWSNtransmitted signal. Also the signalSINRsuffers an exponential decay due to the path loss attenuation, see equation3.1.

Now, let us analyse the results theSINRfor the scenario in figure6.1. For this scenario, we obtain theSINRin figure6.7. Here, we are still considering the case of slow shadowing. It is interesting to observe in figure6.7that theSINRfollows a different pattern compared to figure

6.6.

We can see some negative peaks in the figure6.7, these negative peaks correspond to the position of theWLANnode between theWSNnetwork. This is easily understandable, because we have a high powered interferer between the transmitter and the receiver, so it is expected to have a major interference on that place, meaning we will have a really lowSINR. It is also interesting to notice that theSINRtake its lower peak at the exact place where the interferer node is placed and from this point theSINRis increasing. This fact can be explained with the attenuation of the power regarding the distance, equation3.1, and also if we take into account the relation in equation6.2.

(51)

6.5s i m u l at i o n r e s u lt s 41

Figure 6.6: WLAN Before WSN Network Scenario SINR with Slow Shadowing

References

Related documents

This article aims to contribute to the above debate by focusing on how gender is being done through discourses on occupational choices and work division in relation to two

In this study, we aim to analyse the rate and the physician-documented indications, primary and secondary, for caesarean sections performed on patients in TGCS groups 1 and 2,

Som konstaterades i undersökningen så förefaller Cohens och framförallt Selwyns teorier om autenticitet passa bättre ihop med utställningarna på museet då de är

The effects of the students ’ working memory capacity, language comprehension, reading comprehension, school grade and gender and the intervention were analyzed as a

Given the results in Study II (which were maintained in Study III), where children with severe ODD and children with high risk for antisocial development were more improved in

Med utgångspunkt i att flera KSE förklarar att de känner skam och skuldkänslor av att inte berätta för partner eller sin socialarbetare kan tänkas ge konsekvenser i form av stress

This thesis is to explore and identify the methods for high data rate and data transmission issue with the help of two different techniques, IEEE 802.11a and IEEE 802.11g and to make

Qualitative Analysis of Video Packet Loss Concealment with Gaussian Mixtures.. Daniel Persson, Thomas Eriksson and