Stochastic Modeling and Analysis with Energy Optimization for Wireless Sensor Networks

Due to the battery limitation of wireless sensor network (WSN), there is imperative requirement of energy saving and optimization in practical application of WSN. In order to optimize the energy of WSN, in this paper, a stochastic energy model for WSN is proposed. The model is based on the continuous time Markovian decision processes (CMDP) machine and spans both energy consumption and ensued transition costs. We use PRISM to analyze stochastic CMDP strategies of sensor devices as the formal framework. Simulation experiment is carried out to evaluate the model with given performance criteria. The result shows that the given model can effectively balance energy optimization and perform with high efficiency in WSN.


Introduction
Wireless sensor networks (WSNs) can collect information and monitor situations in a variety of scenarios including coal mines, battlefields, forests, and farmlands [1][2][3].Compared to other self-organized networks, the nodes in WSNs are generally powered by small inexpensive batteries.Each operation, calculation, and intercommunication consume the nodes' energy.Once some nodes, especially those crucial nodes like the cluster head, run out of energy, they will directly influence the connection of WSNs and the monitoring process.To extend the network's lifetime of power constrained wireless sensor networks for a long period of time, their energy consumption should be well managed by optimal routing designs.
Those nodes have the common attractive traits that they have small size, light weight, high mobility, and smart usage, and the most important feature is that they are all battery aware devices.As we move from the wired to wireless sensor network domain, one of the common problems in those battery-operated devices is the availability and cost of the energy.Power savings in these computing devices become more crucial and this constrains the budgets of the data collecting and computing.Google engineers, maintaining thousands of servers, warned that if power consumption continues to grow, power costs can easily overtake hardware costs by a large margin [4].Each of us has experienced the event that the battery of our laptop or mobile phone is depleted.The issue is even more serious in autonomous, distributed devices such as sensor networks where the charging of batteries on running is difficult or impossible.Finally, energy dissipation causes thermal problems.Most of the energy consumed by a system is converted into heat, resulting in wear and reduced reliability of hardware and software components.
The research community, hardware manufacturers, and OS designers [5] already found positive solutions to extend the battery life of mobile nodes in WSNs at different levels such as hardware [6], operating system, wireless technologies, and applications [7].However, these efforts are limited by the heavy layering existing on WSNs platforms that makes difficult exploiting cross layer optimizations, which might be fairly straightforward otherwise.One of the main reasons behind this limitation is a complex business ecosystem in which multiple players (e.g.mobile network providers, content providers, cloud service Providers, hardware manufacturers and OS vendors) compete to retain their share of the mobile business.Most of WSNs have power monitor to allow hardware and software components to dynamically adjust power consumption based on required function and services quantity.However, each kind of approach to power savings has its own limitations.Much of the previous work on dynamic power management has been based on ad hoc International Journal of Distributed Sensor Networks techniques, such as the use of regression equations, interpolation, or learning based methods.Stochastic approaches [8,9] tend to be more formal in the sense that they are based on mathematical models which make precise assumptions about the probabilistic characteristics, for example, when service requests arrive at a device and how long the device takes to respond to these requests.Validation and analysis of the stochastic DPM [10] schemes, however, are less formal and evaluation is usually being carried out with simulation techniques which are time consuming and often not completely reliable.
The material in the paper is organized as follows.We introduce the models of three different states and transition paths in Section 2. The general CMDP framework and the PRISM tool are presented in Section 3. Simulation example and experiment numerical analysis results are showed to be applying PRISM in Section 4. Finally, the conclusion and future work are described in Section 5.

The Energy Consumption Model
In this section, we present a stochastic energy consumption model.We prefer a stochastic model; the mean sojourn time for each state is known in advance, but the delay is not deterministic.For example, the sleep state is actually distributed with exponential distribution using the rate for sleep.The same principle is applied for idle and active states as well.We believe that such a stochastic model is more convenient and more realistic then using deterministic delay, since the philosophy of WSN can be described as "finish your job and go to sleep as soon as possible." Thus, each process should go to sleep as long as it is done.
In the paper, the energy consumption model is majorly fixed in the active state.Let  be the energy consumption rate, measured in energy units per time unit in the active state.From a practical point of view, it is instructive to study stochastic settings where the length of idle periods is governed by probability distributions [11].In the following, we assume that the distribution is continuous-time Markov distribution (CTMD).The node energy consumption devices in general have three states: active, idle, and sleep.Each state has two types of energy consumption: state consumption and state transition consumption (Figure 1).We model the states as a stochastic Markov chain process {   ()}.In this set,  stands for states of the sensor nodes state.In the paper, three states are considered,   ,   , and   , and are called action states.The set of actions is denoted by ACT.An action  ∈  is the number of time slots the device waits until making the next detecting.When the action occurs, the device passes into one of the three states.These three action events correspond to a device passing to the states "in active, " "in idle, " and "in sleep." "" is the time for illustrating that one action is chosen at every unit of time.When the action state    occurs at the moment , it is represented by    ()."" is the energy consumption, measured by the states energy consumption and transition energy consumption in one state.Let  be the energy consumption rate, measured in energy units per time unit, in the active state.From a practical point Sleep (S = 0, R = 0, L = 1) of view, it is instructive to study stochastic settings where the length of idle periods is governed by probability distributions."act" is the action for specifying the action state.Each action state has three type actions, listening, sending, and receiving, and each action has two values: 0 and 1.The expression    () expresses the state that is staying.
At the beginning of the time interval , the variable describing these factors is set to    () and changes during the next time step to    ( + 1) with the transition probability (     (+1) |    ()).This distribution depends on state    () and hence captures the variations in accuracy with changing actions.In real activities, the transition may happen due to the random arrival of signal.The form of the distribution is assumed to be a two dimensional Gaussian distribution centered at    (): In general, we assume the probability  is not known in advance, but we can compute the transition probability  according to the condition probability ( )) to calculate the next state reaching probability.In fact, from the daily usage of the WSN nodes, we cannot give the (  |  +1 ) current state probability, so it is difficult to compute the next state probability.Given the fact that we can detect state  at some time   and the next detects state  at time   (  ,   ∈  and   <   ) easily, the probability of being in state  at time  is given by International Journal of Distributed Sensor Networks In order to gain the "most likely" state, the quantity given in the above formula needs to be maximized: (,   ) is the reward associated with the transition  to   .When the action act was chosen,   (,   ) was produced at once.In the model, the reward will reflect the reward energy for electricity consumption associated with the transition.We note that these rewards are meant to achieve a desired performance on the node and are therefore tunable to achieve desired behaviors.For example, if request is less valuable than data synchronization, the reward for request can be lowered with respect to data reward.We propose to use the CMDP approach to better handle the dynamics of the system because WSN's behavior is real stochastic.Reward is positive and it is usually interpreted as income and otherwise as cost.Actions are listening, sending, and receiving.
For short-term, small-scale evaluations a wireless sensor network with regular nodes layout is implemented.19 sites, each with 3 sectors, 10 MHz bandwidth operating at 2.1 GHz carrier frequency, are assumed.Moreover, 2×2 MIMO transmission with adaptive rank adaption is assumed.The intersite distance (ISD) for the dense urban and urban environments is set to 500 m, whereas the ISD for suburban and rural areas is set to 1732 m.The users are uniformly distributed, with population densities corresponding to the respective deployment scenarios.The simulation parameters are taken from 3GPP specifications [4].Two cases are simulated: (a) base stations without sleep mode and (b) base stations with microsleep during idle transmit intervals, that is, neither data nor control signals are transmitted.
The power per area unit P/A, expressed in [kW/km2], with an ISD of 500 m corresponds to a coverage area of 0.2165 km2 per site.The power consumption is around 4.15 kW/km2 at low loads, and it can reach 5.1 kW/km2 at high loads.For the network with microsleep capable base stations, the corresponding figures are 3.5 kW/km2 at low loads and can reach 5 kW/km2 at high loads.For comparison, in an empty network when only control channels are transmitted, but no user data, the power consumption equals 885 W per site, which corresponds to a power per area unit of 4.1 kW/km2.In the (hypothetical) extreme case, when nothing at all is transmitted (i.e., no data and no control channels) so that the RF output power is 0W, we obtain / = 3.3 kW/km2.The power consumption per area unit for suburban and rural areas is substantially lower, which is due to the increased ISD of 1732 m, which corresponds to a coverage area of 2.6 km2 [12,13].However, the system throughput per area unit decreases accordingly, due to the increased site coverage area.Average power consumption (W) and service times (ms) for each power state and average state transitions consumption results (W) are separated and depicted in Tables 1 and 2.
For the analysis of the energy consuming of the sensor node, we limit each state has a finite queue length, say size of , to store the data it generated or forwarded from other state for relaying purpose.

CMDP Model and Performance Characteristics
The main challenge of modeling is to manage its complexity in terms of the number of states, the number of actions, and the time horizon.This is important because ultimately the optimal energy consuming, typically in the form of a precomputed table, will itself be running on a resource-constrained device (i.e., a senor node).In order to give a formal model to be feasible for model checking, it should have an explicit state space.We present the situation with numerical values and examples.In general, the model consists of services requestor (SR) to generate the tasks to be serviced, a single service provider (SP) to supply the required services, and a service queue (SQ) to store the tasks waiting for services.Each service may consist of numbers of sensors states.For example, there are five sensors built into most models of the WSN node.Without these sensors, none of the devices would be what we know them as today.They are proximity sensor, motion sensor/accelerometer, ambient light sensor, moisture sensor, and gyroscope.The total number of modules: #modules = ( + 1) * . services,  sensors in each service, in the real case:  = 3,  = 5, #modules = 15.For example, assuming that each module has 3 states, the whole model has roughly 3 power 15 = 14348907, and the transition is 3 power 15 * 16 − 1 = 229582511.
Here we adopt the continuous-time Markovian decision processes approach to the problem of interest.CMDP is a commonly used technique in the field of performance and dependability analysis of sensor and especially of real-time communication system.A CMDP is defined as a 5-tuple, (, 0, , , ), where  is the finite set of states, which is denoted as  = { 0 ,  1 ,  2 , . . .,   }, and the state at time  is denoted as   , a direct product of the handset states set (), and the indirect states set (),  = () ⊗ @(), 0 ∈  is the initial state; Act is a finite set of actions.() is the finite set of actions available from state  ∈ .A typical system with a limited battery may have around 800 states and 1600 actions.In practice, the real tool performance is often much better than this worst case analysis, especially for sparse linear programs.Act is a finite set of actions.Within the framework, the actions are constrained in the listening, receiving, and sending. is the transition probability between states that action act chosen while in state  at time  will lead to state   at time  + 1.The probabilistic description of the transition allows accounting for stochastic nature of the energy fluctuations as well as for the randomness in the dynamics of the sensor node. is the reward associated with the transition  →   when the action act was chosen.In the models, the reward will reflect the cost for energy consumption associated with the transition.
PRISM [14] is a probabilistic model checker, a tool for formal modeling and analysis of systems that exhibit random or probabilistic behavior.It supports a wide range of probabilistic models and has been used to analyze systems from many different application domains, including communication and multimedia protocols, randomized distributed algorithms, security protocols, biological systems, and many others.It supports analysis of several types of probabilistic models: discrete-time Markov chains (DTMCs), continuous-time Markov chains (CTMCs), Markov decision processes (MDPs), probabilistic automata, and probabilistic timed automata.In PRISM, models are described as the parallel composition of a set of modules, with each module containing a set of commands describing transitions.Each command consists of optional action and Boolean formulae over simple arithmetic expressions of variables and constants for antecedent and consequent.Variables can be local with respect to a module or global with respect to the whole model.A transition from one state to another corresponds to a choice of all enabled commands.A command is enabled in a state when its antecedent holds and all other commands with the same action synchronously hold.Depending on the type of model, the choice of transition is probabilistic, nondeterministic, or both.The PRISM tool can read and parse a model description in the PRISM language.

Experiment Numerical Analysis
To verify the validity of the stochastic model, we have applied PRISM to implement the experiment and present the result.The experiment results of the numerical analysis had been done in this section.The performance measures considered here are several consumptions.We assume the data storage capacity of the service request is 10( = 10), and the state transition distribution has the same value and equals 0.5.Given a performance constraint (average number of request in awaiting service), we construct the optimal policy which minimizes the average power consumption while satisfying the performance constraint.We obtained these policies by constructing the generator matrix of the system in PRISM.
We start our analysis of the power error probability according to the changes of the state transition number.As shown in Figure 2, if the state transitions number increases with exponential, the power error probability of the sensor increases very quickly and may not work when the number reaches 10000.If the state transitions number increases with uniformity, the power error probability of the sensor increases very quickly, but the power error probability may keep a stable number.Based on the results of Figure 2, the number of the power error probability is large, so the state transition number under 10000 is kept.
Figure 3 shows the energy consumption when the state switches from the sleep mode to the active mode.It is clear that the sensor may consume more energy when the activities are increased.Also, from this figure, we know that the less capacity, the more the energy the sensor may consume, although the energy assumption does not change too much.Thus, from the viewpoint of minimizing the energy consumption for switching from sleep mode to active mode, it is optimal to minimize the number of data packets which may need relay through the sensor under investigation.By considering the relay is a vital property for sensor, it is imperative to find an optimal capacity to leverage the energy consumption.

Conclusion and Future Works
As people increasingly rely on WSNs, good energy management is becoming necessary to squeeze the most out of a battery.In the paper, the states and state transitions of sensor are explicitly illustrated.According to the rules of the state transitions, a simple stochastic framework to analyze energy consumption on sensor using CMDP is proposed.We tested the framework with PRISM on both power error and power consumption according to the state transitions.We can obtain the automated analytical means by applying International Journal of Distributed Sensor Networks  the given performance measures strategies with no additional expensive simulation.
In the future works, we will investigate other related results with the analytical method from this paper.

Figure 1 :
Figure 1: Illustration of the states and the states transition path of general WSNs.

Figure 2 :
Figure 2: The error probability according to the changes of state transition number.

Figure 3 :
Figure 3: Energy consumption for switching from sleep to active state.

Table 1 :
Average power consumption (W) and service times (ms) for each power state.

Table 2 :
Average state transitions consumption results (W).