A Viability Approach For Management Of IEEE 802.15.4 Wireless Sensor Node Performance

ABSTRACT


INTRODUCTION
Nowadays, the integration of sensors in our daily life is a reality. They are used as an automatic data acquisition system (physical information: temperature, pressure, brightness, humidity, movement ...) for monitoring the environment in which they are deployed. Due to their relatively low cost and easy deployment procedure for monitoring some hostile areas, they cover a wide domain of applications (Health, agriculture, military...) [1]. For example, in agriculture, sensors are used to collect, process and transmit data relating to temperature, humidity, level of soil acidity, for better management of natural resources and also control the evolution of plants and the use of pesticides. Today, although, its importance seems obvious in our life, sensor still has inherent constraints to its constitution (intrinsic characteristics). Particularly: low computation and transmission power, low memory and weakness in the energy storage system. These constraints generate many problems and limit their use in certain conditions and domains [2]. The use of wireless sensors node over a long period while offering a level of Quality of Service (QoS) acceptable, is one of major concerns in Wireless Sensor Network field. In fact, it is often difficult to recharge or replace batteries of sensor nodes that have been deployed to monitor some areas hostile to human. This becomes problematic if the system is used to collect information autonomously and over a long period of time. For example in the agricultural field, it is very often necessary to collect data on plant/soil during the period from one harvest to the next. In this case, it seems essential to define a good resources utilization Wang et al [14] propose also an algorithm for the adaptive management of Wireless Sensor Network performance. This algorithm is based on tuning of m and m0. In fact, at the end of each beacon interval (BI), and according to the number of its neighboring nodes, packet arrival rate, packet delivery rate, packet delay, each node determines the necessary adjustments to adapt to the current state of the network for ensuring a better QoS and reducing energy consumption. The difficulty here is that this method has to be executed at each beacon interval (BI). This generates more energy consumption which could harm the network's lifetime.
Sahoo et al [12] have proposed a novel synchronous MAC protocol that aims at reducing energy consumption due to an unnecessary Clear Channel Assessment (CCA). In fact they introduced the sent of signaling messages at the start/end of data transmission as well as before transmission of an acknowledgment message (ACK) to prevent the other nodes from performing unnecessary CCA. These transmitted signals allow other nodes that have detected them to go to standby mode for a time that they will determine according to the signaling message. This allows them to know when they have to wake and perform their CCA, without increasing their contention window (m0 and m). But this method can lead to significant packet loss and delay. Because at the end of waiting time, the access to the channel is not guaranteed, so when a node wakes up from the standby mode it might find that the transmission channel is busy by a packet/ack of an other node which was not concerned by this signaling message as it was not ready for a CCA when this message was sent.
All of these recent methods encountered in literature are mostly based on the optimization techniques which require regular updates. These updates generate more additional energy consumption. Besides, most of them aim at either minimizing delay, maximizing reliability, throughput or also reducing congestion rate [10]. They are generally suitable for emergency or real-time applications, but not necessarily for monitoring applications, as environment monitoring, pollution control or agricultural field, where the frequency of collection is specific at different moments and it depends on the evolution stage of a plant for example [9]. For this kind of application (monitoring), a new approach is defined and used in literature: the theory of viability [9], [15]- [18]. It has been applied for the first time in sensors network fields by Kone et al. in [19]. They have shown that by defining a good actions' policy (controlling the evolution of sensor node over the time through the tunning of MAC parameters (MacMinBE and MacMaxCsmaBackoff) and sensing frequency), in general one could guarantee a good lifetime and quality of service that meet the application requirements related to monitoring activity, particularly in agri-environment field. The viability approach allows to use adequately and sustainably the sensor resources. It consists in controlling and maintaining evolution of a system in a set of acceptable/desirable states, through a defined strategy. To make it possible, it is necessary to define both the evolution over time of node's resources (energy consumption, data flow, congestion, delay, reliability…) and the set of desirable states in which the evolution must be confined (the space of constraints).To apply this approach, it is also essential to identify and define the key parameters (controls) of the system that could be used to control evolution of this system (node) inside the set of defined desirable states. This method has the advantage 1) to find a tradeoff for example between the energy, the delay and the packet loss rate 2) to adapt the current state of the network, according to the current state of its nodes. It is in this approach that our study is fitted.

ANALYTICAL MODEL OF THE PROBLEM
One of the major problems inherent to the wireless sensor networks, is the consideration of the uncertainty and hazardous phenomena (environmental change, hardware failures, hidden nodes ...). Indeed, most of time these are the main reasons of the network's QoS degradation and failure (the early end). Then, the problem is now how to define a policy that could be flexible and adaptive and could take into account the environment's variations.
Let's define () yt as the state of our system (node) and () et be its evolution over the time. So we have: With () ct being a control which can influence evolution of the system and C the set of admissible controls.
We define also: In our study, we define: Where E(t), D(t), and R(t) are respectively the remaining energy inside a node, the delay (average delivery ration), the reliability (probability of successful transmission). f, g and h correspond to the functions which respectively calculate the average energy inside the battery, the average probability of successful transmission and the average packets delivery ration, with a set of parameters P.
As we said in the previous section, the viability approach requires defining the system's evolution overtime.
In the following section, we define the set of parameters that characterize the state of a node. These are energy inside the node's battery, the average duration between sending and receiving a packet, and finally the reliability.

Energy
Sensors are some small electronic devices with low storage capacity and low power. One of the major problems in designing a wireless sensor network (WSN), is energy management. In fact, unlike traditional wired networks, where one can always recharge, change or even almost continuously supply energy to device battery (mobile phone, laptop ...); it is very difficult to change or recharge the batteries of wireless sensor nodes. Especially if they are deployed in a hostile environment (difficult access: Ocean, mountain ...). To have a WSN, which would remain autonomous during a long period (the time from one harvest to the next for example), it is necessary and even essential to have intelligent management of energy resources of sensors inside the network. This involves knowing at every moment the level of energy remaining in the nodes' battery. In [19] the authors proposed a mathematical model describing energy's evolution overtime inside a sensor node's battery by the equation (05) below: This model (05), although reflecting the evolution overtime of the node's energy, has some limits. Indeed, it is not tackling certain disturbances that could occur and have a negative impact on network performance and lifetime. In fact, during their study, the authors assume that: • the solar energy is permanently produced by the photovoltaic panel, which is not the case because production of solar energy is strongly related to solar radiation; • sensors are working in a perfect environment without any disturbance which is also not the case.
However, these disturbances can cause significant energy losses. This limits the approximation of reality by this model (05). Indeed, generally, uncertainties are one of the mains causes of networks' premature failure, but particularly in the case of WSN. The advent of unexpected phenomena can disrupt the good functioning of network, and thus generates some serious consequences (QoS, low delivery ratio, high energy consumption ...) which lead to the early end of the network. Several factors (sources) can cause these disturbances. Some of these are inherent to the environment in which sensor nodes are located, while others are related to its intrinsic characteristics and communication scheme. We can mention among others the failure of solar panel, the aging of node's battery (degradation with the time of the storage capacity), the material failures of node, mobility, etc. Furthermore, their energy consumption model is not tackling the hidden node problem and also the correct detection of transmission channel state. As it does not distinguish channel occupation between a packet and an ACK message. This leads to a waste of energy and degradation of the network's QoS. All of these reasons motivated us to propose a new energy model (06) that better reflects more the reality of node and which is more accurate. This one takes into account: • fluctuation of the amount of energy produced by the solar panel; • battery failure ; • an accurate energy consumption model which allow node knowing the real state of the channel.  Et are respectively the residual energy (remaining) inside the battery, the energy consumed by sensor when performing its duties (collection, processing, transmission/reception of data), the additional energy provided by the solar module and finally the energy lost in the battery.

Energy produced by photovoltaic cell
The average solar energy is not always produced because solar irradiation rate varies randomly ( Figure.1). So to express this random variation we propose to use Weibull law, which is one of the most used laws in the literature to estimate the reliability rate of a given system. Indeed, according to Bousaid et al [20] and [21]- [23] the reliability of a solar module follows Weibull law and it is given by equation (07) below: Where , pv average E denotes the average energy produced by the solar module during a time period T.
Where β and η are repectively the shape and scale parameters.
• t ϵ [t1; t2], β =1 the production is constant and equal to Epvmax regardless of the irradiation rate.
• t ϵ [t2; t3], β > 1, reliability decreases, the energy produced decreases until it reaches its minimum value Epvmin. • t ϵ [t3; t4], β > 1, the irradiation rate goes down, so the system becomes less reliable, and the energy production drops to its minimum value Epvmin. Figure.1. Example of evolution of solar energy production.

Energy consumption
The energy consumed by node depends on the activities of its 3 main components: sensing, processing, and transceiver modules.
So we define the energy consumed by a node as the sum of the energies dissipated inside these 3 following modules sensing (Esens), processing(Euc) and transceiver (Erf).
❖ Sensing energy This energy is defined as the sum of amount energy used by a node upon activating its sensing unit to collect data from the environment where it is deployed, and the energy dissipated inside the analog-to-digital converter (ADC) for converting the analog sensed data to digital data which would be used by the processing unit uC. It depends on the number of active sensors on the node's board. In fact, depending on the use fields, one could have on a node's board several types of sensors. For example in the case of agriculture fields, one could look for data related to humidity, luminosity, temperature, acidity, noise, dust etc. So as in [24], we define the energy dissipated by the sensing unit during a time slot as follow : where Pon_sensing(i) and Poff_sensing(i) are respectively the power consumption related to the sensor i when it is active or not. Pon_ADC and Poff_ADC are respectively the ADC power consumption, when it is active or not; λ denotes the sensing frequency. Sb is the time slot, Nsens is the number of active sensors on the board; tsens(i) is the time response of the physical measure associated with the active sensor i.

❖ Processing energy
The processing unit manages the events that make the sensor node collaborate with the sink node to carry out the assigned sensing tasks. The energy relative to this unit is defined as the sum of amount energy used by a node upon activating or not its processing unit to process data to/from the transceiver.
So as in [24] we define the processing energy as follows: where Eon_µc and Eoff_µc denote the energies dissipated by the microcontroller when it is respectively in active or idle mode. We have: Where Pon_µc and Poff_µc are respectively the power consumption of the microcontroller when it is active or idle.
_ on Tx  and _ on Rx  correspond to the stages where the node is sending and receiving data and they depend on the probabilities encounter during the first and second CCA as it is indicated in our previous study [25].
The terms cycle b c N S F  , FµC, Ncycle are respectively the data processing stage, the microcontroller frequency, the average number of cycles per second according to the microcontroller speed and the software running on the wireless sensor node; and λ.Sb.tmeasure corresponds to the sensing stage of physical measurements. 1  and 2  are the probabilities that the channel is occupied by a data and an ACK message during the second CCA1. 1  and 2  are respectively the probabilities that the channel is occupied by a data and an ACK during the second CCA2. 1  2  1  and 2  correspond respectively to equation 2, 3, 5 and 6 in [26].

❖ Tranceiver energy
The energy dissipated inside the transceiver module is the amount of energy used by the node for transmitting or receiving data from/to the gateway or sink node. The model has been described in detail in [26]. It is given by the following equation (16): Where: • Eb is the average energy consumption of RF module during idle backoff state.
• Esc is the average energy consumption of RF module during channel sensing state.
• Et is the average energy consumption of RF module during packet transmission stage.
• Eq is the average energy consumption of RF module during idle stage without generating packet.
• Eh is the average energy consumption of RF during packet copying stage. x y E P L b S P y P y x • Ew is the average energy consumption of RF during wake-up state after being idle during backoff period.
• x is the busy channel probability during the first and the second CCA: •  is the probability that a node attempts is first CCA: • Pfail is the transmission failure probability: With Pcol the probability that a collision occurred.
Pi, Psc, Pt, Pr, Pw, and Psp are respectively, the power consumption of RF module in idle-listen state, channel sensing state, transmitting state, receiving state, wake-up state and sleep state during the backoff stages. N is the total number of nodes. LD and LACK correspond respectively to the data packet length and ack message length in number of slots, L1 (an expression is proposed in [27]) is the packet copying delay between the microcontroller and the radio transceiver, P0 is the stationary probability of having an empty queue, i.e. the probability that the node has no packets to transmit (an estimation is given in [28]). m is the maximum number of backoff stage that a node can perform before declaring that the channel access attempt has failed; n is the maximum number of attempts allowed after a transmission failure; Pe is the probability relating to transmission errors due to the transmission channel constraints and the modulation/coding technics used. Pfb is the probability to have a full buffer, b0,0,0 is the state where the backoff stage, the state of the backoff counter and the state of retransmission counter are equal to 0.

Battery energy leakage
Many energy losses can occur in the battery throughout its operation. Several factors could lead to these losses. For example: the battery failure (manufacturing defect), degradation of battery performance over time, possible leakage and the phenomenon of self-discharge, etc. These factors are usually caused by the charging and discharging frequency [29] the variation of the temperature (ambient and internal of the battery), the deep discharge of the battery [30] and so on. According to several studies conducted in [31]-[33] the loss of capacity of a battery follows a law described by a square root function of time. For Shimpe et al [33] it is mainly a function of temperature (T) and state of charge (SoC.) as described by the model below: Where kT,Soc is the stress factor that is related to the state of charge and the internal temperature of the battery. Its expression is given by equation (09) in [33].

Reliability and Delay
Having a long lifetime of the network can lead to a degradation of network performance. It is then necessary to find a compromise between the maximization of lifetime and the other QoS parameters. To do so it is necessary to define the dynamics of these metrics. In our study we decide to consider the reliability (the packet delivery rate of the) and the packet delivery time. An analytical expression of each of these two (02) metrics is given below (equation 23 and 24 in [26]).
• Reliability With: Pfb is the probability of having a full buffer (queue). Pcf and Pcr are respectively the probability that the packet is rejected due to a communication channel failure and due to the reach of the limit number of attempts allowed for accessing the channel. x is the probability that the channel is busy and y is the probability of failure to transmit a packet, more precisely, it is the probability that a packet, after successfully been emitted on the channel, either lost (for example, collisions); m is the maximum number of attempts before declaring a channel access failure and n is the maximum number of attempts allowed after a transmission failure in IEEE 802.15.4 slotted CSMA/CA, λ is the sensor node sensing/sending data frequency.

CONSTRAINT SPACE AND CONTROLS
The main idea of the viability approach is to control and maintain evolution of a system inside the set of desirable states. In the following section, we define both the set of key parameters which could be used to control dynamic of the sensor wireless node and the space of constraint.

Constraint space
The objective is to maintain evolution of our system (node) defined by the equations (06), (29) and (30), in a set that we want and which is conditioned by the application requirements. We assume that, to be able to function and achieve its objectives: • the residual energy's level (E) inside the node battery must not be below a threshold: • the reliability (R) must always be greater than a minimum value Rmin.

Controls
One of the mains underlying of the viability theory is the definition of control parameters. Indeed, for the efficient use of node resources, it is essential to define some action policies, which will allow maintaining the dynamic of the system inside the set of constraints Df. To do so, it is then necessary to identify factors that impact on dynamic of this system, that is to say, to find the key parameters that could influence evolution of : 1) node energy consumption, 2) reliability (successful transmission rate ), and 3) packet transmission delay.
In the previews works [25], we have shown that the following MAC layer parameters: MacMaxCSMABackoffs ( ) which denotes the maximum number of backoff that CSMA/CA algorithm will attempt before declaring a channel access failure and MacMinBE ( 0) which represents the minimum number of backoff slots a device should wait before starting a channel access attempt through CSMA/CA algorithm as well as the data collection/transmission frequency (λ), are the key elements for managing the performance of wireless sensor networks especially when the network is dense.
In this study we consider these three (3) parameters for controlling the evolution of the system inside space constraints. We have:     Figure 2 shows the evolution of viability kernel under different solar energy values. In this Figure the X, Y and Z axes respectively represent the remaining energy level inside the battery, the reliability rate and finally the frequency of data transmission. We note that the percentage of viability kernel increases according to the value of solar energy. Indeed, the higher the value of solar energy, the greater the number of viable states that satisfy the inequality 0 Et  . In other words, the higher the external supply energy to the sensor's battery, the higher the remaining energy level will be. This gives to the node more possibilities to collect and send data with important frequencies that could be closer to the maximum admissible sending frequency (In this case λmax = 0.5 packets/slot). In addition, in Figure 3, we note that for solar energy values below 4 MicroJoule/slot, the viability kernel is empty. This is due to the fact that, to allow the system operate properly, it is necessary that the amount of additional energy reaches a minimum level required to meet the energy needs for the activities of the 3 key components of sensor (sensing + processing + radio unit) and also meet application requirements, i.e. reliability R(t) greater than or equal to Rmin (here 99%) and Delay D(t) less than or equal to Dmax (50 ms). An empty kernel then means here that the amount of solar energy is not sufficient ( 0 Et  ) to ensure these sensor's functionalities.We can also see in Figure 3-A that for solar energy values greater than or equal to 4 micro Joules/slot, the higher the reliability, the lower the viability kernel is. A requirement in terms of high minimum reliability will require a lower sensing frequency value to satisfy this constraint (Rmin < R(t)) and that relating to delay (D(t) < Dmax). This will reduce the number of frequency values (λ) that can satisfy this application requirement. Indeed, if the sensing frequency is high, it will lead to more packets being sent, which could lead to saturation and collisions leading to a significant packets loss. So, if the packets do not reach the destination or arrive with a high delay, this will degrade reliability. This explaines why the viability kernel becomes more reduced as the reliability inscreases. Furthermore in Figure 3-B, it should be noted that for a maximum delay set to 20ms, the viability kernel remains empty regardless of solar energy supplied. This is due to the choice of the minimum value of data sensing frequency. Indeed, in our case this value is 0.1 packets/s and this does not seem to be sufficient to meet both a minimum level of reliability (99%) and a delay less than 20ms. Indeed, as the authors of [19] have indicated, the denser the network is, the lower the frequency of sending and collecting data should be. Figure 4 shows the evolution of the percentage of viability kernel obtained by the model proposed in [19] and ours, as a function of solar energy supplied by the photovoltaic panel. We have set the minimum reliability at 99% and the maximum delay to 50ms.

Evolution of the viability kernel
We note that the percentage of kernel achieved through our model is always higher than that of Kone et al [19] regardless of the amount of solar energy provided. Indeed, this situation is explained by the fact that our model, unlike theirs, takes into account possible disruptions such as fluctuations in solar energy levels   Figure 5 shows the equilibriums' sampling frequencies for different values of solar energy. We note that the greather the value of supply solar energy is, the higher the value of equilibrium sampling frequency will be. This could be explained by the fact that having more energy allow the node to have more possibility to send more packets. Figure 6 shows trajectories of a node starting from a viable state Y with the coordinates (E =20000J, D =20ms,  = 0.22packets/s). We note in these figures that whatever the maximum value of the energy provided by the solar panel, the trajectory is first straight and then ends up in a loop inside viability kernel. We also observe that, depending on the value of solar energy, the cycle of the loop varies. The greater the solar energy, the slower the loop is made. This is due to the fact that the viability kernel grows with solar energy as shown in Figure 2  In addition, we also notice that for smaller solar energy supplied ( Figure 6-A and B), the trajectory of the system changes direction regularly, while for larger values (Figure 6-C), we observe less and less these changes in direction. This regular change in direction is due to the variation in solar energy supply. Indeed, one of the principles of viability theory is that when the system begins operating, at a given viable state, the trajectory is not modified until it reaches a boundary beyond which one of the constraints (33), (34), (35) would be violated. Therefore, from this point (boundary), another strategy is defined by readjusting the values of the control parameters ( , m, m0) in order to give another direction that allows the system to remain in the space of viable states. Since solar energy is dependent on the irradiation rate, so whenever the level of energy produced by the photovoltaic module is not sufficient to satisfy the inequality 0 Et  , there will be a new control's tunning ( , m, m0) to meet the application requirement in term of energy, reliability and delay. This is the main difference between the viability approach and the others which exist in the literature, as the readjustments are made only when the constraints will not be met whereas for the others approach these readjustments are made at each time slot or beacon interval which leads to excessive energy consumption. Figure 7 (A, B and C) shows how these settings must be done according to constraints. This leads to a change in direction that intensifies as energy is low. This approach is also different from those encountered in the literature where the value of , m, m0 are fixed from the beginning to the end. In fact we could see in Figure 7-A that a node could send information with a sampling frequency higher than the equilibrium sampling frequency eq (see Table 3). Recall that the equilibrium point is the point from which the evolution of the system remains inert. Indeed, in some cases, when t → the evolution of a system overtime could converge to a set of stable states define by equation (46). These points depend on the application requirement and the supply energy level as we can observe in Figure 5. The more the supply energy is, the higher will be

Evolution of the trajectory
In Figure 7-B we can notice that the tunning values of control m0 fluctuate between 6 and 7 which is different from that found by Kone et al in [19] where this value was fixed to 6. And unlike in [19] where m is either 4 or 5, here we have found that m must be in [2 ; 3]. This provides more flexibility, and allows to adjust the setting depending on the state of the WSN. In fact, even if it has been shown in [25] that having a great value of m0 could give a good reliability in the network but if it not tune correctly, it leads to a greater delay, as more m0 is, more the time spent by the nodes waiting for accessing the channel will be. Furthermore, the more the value of m is, the greater the nodes which go to the idle mode due to the channel access failure and collisions. This leads to longer idle-backoff times, resulting in higher delay and weak reliability as the packet drop due to access failure will be increased. So it's then important to tune this value depending on WSN condition to guarantee the expected requirements.
We can see that with the controlling policy obtained through the viability theory Figure 7 (A, B and C), the application requierements are respected as for example in this case we could see that Emin=6127.2J  In the Figure 8 we have trajectories of 2 nodes starting from two different viable states Y1 = (E = 20000 J, D = 20 ms, λ = 0.22 packets/s) and Y2 = (E = 15000 J, D = 20 ms, λ = 0.15 packets/s) where Dmax = 50 ms, Rmin = 99%, Esol = 6 µJ/slot. The x-axis, y-axis and z-axis indicate the remaining nodal energy, the packet delivery delay and the sampling frequency, respectively. We observe that the trajectories loop inside de kernel in the same region regardless of the initial states. But depending on the level of the initial energy of the node, the trajectory joins more or less quickly this looping area. This looping effect is due to the fact that all the admissible sampling frequency's values are not equal to λeq.
So as in [19] we can conclude that the initial level of energy is not significant on the trajectory followed by the node, but it has an effect on the cost of this trajectory, as the lesser the initial energy is, the faster the next parameter tuning to meet application requirement will be (equations (33) to (35)).

CONCLUSION
In most WSN subjected to uncertainties, while MAC protocols are designed to meet application requirements; adaptability to dynamic of traffic conditions is a major design criterion. In this paper, we have studied the performance of the IEEE 802.15.4 sensor network based on an adaptive approach using the MAC layer parameters and sampling frequency. To do this, we proposed an analytical model of the sensor node's energy. The numerical results obtained through the viability theory simulation showed that the proposed model improves the packet delivery ratio and reliability while achieving energy efficiency as a node can send more packets while running for a long time without violating application constraints.
Our model improves the one proposed in [19] as despite the possible disturbances, it allows sensors to operate for a long time thanks to an accurate estimation of the channel state.
As future work, we plan to implement the operating policies obtained from the viability theory on a real WSN platform and study the resilience of the proposed model as it's possible that when the level of disturbance occurred is high, the proper functioning of the node could be prevented.