Analytical Model of a Wireless Sensor Network (WSN) Node Operation with a Modified Threshold-Type Energy Saving Mechanism

In this article, a model of the operation of a wireless sensor network (WSN) node with an energy saving mechanism based on a threshold-controlled multiple vacation policy is considered. When the queue of packets directed to the node becomes empty, a multiple vacation period is started during which the receiving/transmitting of packets is blocked. In such a period, successive vacations of a fixed constant duration are taken until a predetermined number of N packets accumulated in the queue is detected. Then, at the completion epoch of this vacation, the processing restarts normally. The analytic approach is based on the conception of an embedded Markov chain; integral equations and renewal theory are applied to study the queue-size transient behaviour. The representations for the Laplace transforms of the queue-size distribution at an arbitrary fixed time t and on the idle and processing periods are obtained. The compact-form formulae for the distributions of the idle and processing period duration are derived. Numerical examples are attached as well.


Introduction
The issue of energy saving in wireless sensor networks (WSNs) is crucial from the point of view of network security, including ensuring the reliability of its operation, but also in securing an adequate level of data transmission quality. One of the important tools supporting these processes are the algorithms used for self-organization of sensor networks. The purpose of this type of algorithm, after the initial organization of the network, is primarily to minimize the risk of data loss during transmission, which is associated with the organization of network node structures, and secondly to maximize the battery life of individual sensors (see e.g., [1][2][3]). Another challenge for ensuring the appropriate level of the quality of service (QoS) is the occurrence of temporal death in some sensor nodes (see e.g., [4,5]). There are two different main approaches to solving the problem of energy saving in WSNs. The first one is based on the selection of the shortest route, so uses various-type shortest path algorithms. However, as it turns out, minimizing the costs of energy consumption can lead to an increase in the ratio of lost packets. Hence, another approach chooses not necessarily the shortest route, but one that gives a relatively small ratio of lost packets. As a consequence, the connection may be established using rather peripherally located network nodes, however, they are those for which the data loss ratio is very small (see e.g., [6][7][8][9][10][11] for proposals and discussion on this topic).
In the analysis of the functioning of packet network nodes and in the process of network optimization, queueing theory is often used. The subjects of its research are stochastic characteristics of models in which the individual elements (jobs, packets, items etc.) of the input stream are being processed, but due to insufficient service speed or limitations in the processing process, there occur phenomena like the accumulation of jobs waiting to start the service and sometimes (in the case of finite accumulating buffer capacity) the loss of incoming jobs.
In [12] (compare also [13,14]) the queueing model of the M/M/1-type with a control mechanism based on the N-policy is proposed as a tool for reducing power consumption of nodes in wireless sensor networks. A Geo/G/1-type discrete-time model with disasters is considered in [15]. The approach based on Petri nets is proposed in [16] in energy consumption evaluation. A queueing model with priorities is investigated in [17]. Transient (time-dependent, non-stationary) results for queueing systems with multiple (repeated) vacation policy, used as a model of energy saving mechanisms, can be found in [18][19][20][21] (compare also [22][23][24]). In particular, in [18,21] the departure process is investigated in cases of infinite and finite buffer capacities, respectively, while in [19] the queueing delay is investigated (also for the single vacation policy). Similarly, transient analysis of power saving models based on the N-policy can be found in [25] (queueing delay) and [26] (departure process).
In the article we study a model of the operation of a WSN node with an energy saving mechanism based on a threshold-controlled multiple vacation policy. When the queue of incoming packets directed to the node empties, a multiple vacation period is initialized, during which the receiving/transmitting of packets is blocked. In such a period, successive vacations of a fixed constant duration are taken until a predetermined number of N packets accumulated in the queue is detected. Then, at the completion epoch of this vacation, the processing restarts normally.
We propose the analytic approach based on the conception of an embedded Markov chain, integral equations and renewal theory to investigate the queue-size transient distribution. The explicit compact-form representation for the Laplace transform of the queue-size distribution at arbitrary fixed time t and on the idle and processing periods are obtained. The compact-form formulae for the distributions of the idle and processing period duration are derived. A numerical illustration example is attached as well.
The remaining part of the paper is organized as follows. In the next Section 2 we state a detailed mathematical description of the considered queueing system. In Section 3 we analyze the queue-size distribution on the idle period of the system and, moreover, in Sections 4 and 5 we give explicit results for the probability mass function of the number of packets present in the system at the idle period completion epoch, and the distribution of the idle period duration Laplace transform (LT), respectively. The queue-size distribution on the processing (busy) period is studied in Section 6. The representation for the LT of the distribution of the busy period duration can be found in Section 7. Finally, Section 8 contains the most general result in that the queue-size at an arbitrary epoch is considered.

Queueing Model Description
In the article we consider an M/G/1-type queueing model with finite buffer capacity and a control (energy saving) mechanism being a mix of the classical multiple vacation policy and the threshold-type policy (N-policy). Successive data packets arrive according to a Poisson process with rate λ and are being processed according to a FIFO (First-In-First-Out) service discipline with generally-distributed processing times with a cumulative distribution function (CDF) F(·) and with its Laplace-Stieltjes transform (LST) f (·). The capacity of the accumulating buffer is finite and equals K − 1, so the maximum system size is K.
Every time the queue empties an energy saving mode is initialized, during which the processing is completely blocked (idle period). Namely, successive server vacations of constant length T are started until the number of accumulated (and waiting for processing) packets equals 1 ≤ N ≤ K or more, where N is fixed. In the occurrence of such a situation, at the moment of this "successful" queue-size measurement the idle period completes and a new processing (busy) period begins immediately.

Queue-Size on Processing Suspension Period
Let us investigate, firstly, the queue-size behaviour on the first processing suspension period (idle period) I 1 that starts at time t = 0 and consists of a number of independent constant-length vacations being initialized as far as the buffer queue length at the end of one of them will reach at least the predetermined level 1 ≤ N ≤ K. Evidently, we have where I 1,i stands for the ith successive vacation during the first idle period I 1 .
Let us denote by 1 A (·) the characteristic function of the set A, i.e., and let δ i,j stand for the Kronecker delta function. Note that the following representation holds: Let us briefly comment on (3). Indeed, if t ∈ I 1,i then t ∈ [(i − 1)T, iT). The first summand on the right side of (3) refers to the situation in which the threshold level N is not reached before time t. In the second summand the number of packets accumulated in the buffer queue reaches at least N at time t but the buffer is still not saturated (clearly, up to time (i − 1)T the number of arrivals must equal at most N − 1 in order to initialize the ith vacation). Finally, the last summand on the right side of (3) describes the situation, in that the buffer is saturated at time t.
Before we will state the representation for the LT of P{X(t) = m, t ∈ I 1,i }, let us observe that for s > 0 we have where E s+λ (j, ·) denotes the CDF of the j-Erlang distribution with parameter s + λ.

Queue Measurement at the Idle Period Completion Epoch
In this section we are interested in the probability distribution of the queue state X I r = X I at the completion epoch of the arbitrary processing suspension period (idle period) I r . Denoting observe that the following equality is true: Indeed, the first summand on the right side of (7) refers to the situation where the buffer is not fulfilled before the endpoint of the idle period, while for the second one the processing starts after the idle period with exactly K packets present.

Idle Period Duration
In this section, without loss of generality, we identify the rth idle period I r with its duration. Obviously, we have due to the fact that the ith vacation during the idle period is being initialized if and only if the number of accumulated packets at time (i − 1)T does not exceed N − 1. From (8) we obtain immediately Introducing the LST f I (·) of the CDF of the arbitrary idle period duration, we get

Queue-Size on Processing Period
We investigate now the case of the queue-size distribution on a single processing period. Obviously, the transient behavior of this stochastic characteristic depends on the system state n at the completion epoch of the preceding idle period, where n ∈ {N, ..., K}. Without loss of generality, let us assume that the processing period starts at time t = 0 and, temporarily, that at the starting moment the number of packets accumulated in the buffer can take on any value from {1, ..., K}.
To receive a representation for the LT of the conditional queue-size distribution on a processing period, we will use the method of potential proposed by Korolyuk in [27]. Let us denote by X(t) the number of packets present in the system exactly at time t.
Introduce the following notations: where m, n ∈ {1, ..., K} and t > 0, and It is well known that, due to the memoryless property of the exponential distribution of interarrival times, the sequence X(t i ), i = 1, 2, ..., where t i stands for the ith processing completion epoch after the starting moment, is an embedded Markov chain for the process {X(t), t ≥ 0}. Thus, utilizing the formula of total probability with respect to the first departure moment after t = 0, we obtain for n = 1 P (P) Similarly, for 2 ≤ n ≤ K, we have Observe that the first summand on the right side of (13) and (14) describes the case in that the accumulating buffer does not become fulfilled before the first departure occurring precisely at time x < t, while the second one refers to the situation in which the system is saturated before x. The case of the first processing finishing after t is presented in the last summand on the right side of (13) and (14). Let us note that the first sum in (14) is taken from 0 while in (13) from 1. Indeed, if the system contains exactly one packet at the starting moment then no departure occurs before t, otherwise the processing (busy) period will end before t.
Let us rewrite equations of the system (17) and (18)  K−n (s, m), where 0 ≤ n ≤ K − 1, we transform them as follows: where 0 ≤ n ≤ K − 2, and Each solution of the linear infinite-size system with known coefficients a k 's and b k 's can be written in the following form (see [27,28]): where c is certain constant and the sequence (r n ) is defined by the following recursive relationship: At this stage let us make some essential observations. Firstly, the systems (20) and (22) are very similar, however in the former, functional sequences occur. Secondly, the number of equations in (20) is finite, while in (22) it is infinite. As it turns out, the representation (23) can be used to find the solution of the system (19) and (20) and, moreover, the fact that the number of equations in (20) is finite allows for finding an explicit representation for c.

Processing Period Duration
In this section we establish the formula for the LST of the first busy (processing) period duration, conditioned by the number of packets accumulated in the buffer at the starting epoch. The appropriate result we will write in the most general case, namely assuming that the processing period may start with n ∈ {1, ..., K} packets present (not necessarily with at least N packets present). Suppose temporarily that the first busy period starts at t = 0.
Introduce the following notations: It is easy to note that for f BP,n (s), n ∈ {1, ..., K}, the following system of equations is true (compare (17) and (18)): where 2 ≤ n ≤ K. Let us observe that if we define then we can obtain the explicit-form representation for f BP,n (s) utilizing the Formula (36). Indeed, we obtain where s > 0 and now and

Queue-Size Distribution at an Arbitrary Time
Consider now the transient queue-size distribution at arbitrary time t. Assume that the system starts the operation at time t = 0 with the first idle period. The evolution of the considered queueing system can be observed on successive idle periods I 1 , I 2 , ... interspersed with busy periods BP 1 , BP 2 , .... The formula of total probability gives Due to the memoryless property of the exponential distribution of interarrival times, the following representation is true: where F I (·) stands for the CDF of the idle period duration (all idle periods are independent and identically distributed) and * denotes the Stieltjes convolution. The sum on the right side of (46) is taken over all possible values of l 1 , ..., l i−1 ∈ {N, ..., K}.
Quite similarly we obtain Taking LTs of both sides in (46) and (47) and referring to (45), we obtain the following representation for the LT of the queue-size distribution in the considered queueing model with a threshold-controlled multiple vacation policy: where s > 0.

Numerical Study
In this section we present some numerical examples illustrating theoretical results obtained in previous sections. Let us investigate the operation of the system on the first idle period. Assume that the intensity of Poisson arrivals equals 1.1 items per time unit (mean interarrival times are equal to 0.909) and that the processing times are distributed according to a mixture of two exponential distributions, namely the probability density function f S (·) of the service time has the following form: Hence the mean service time of a single packet equals 0.875 and, in consequence, the offered load for the system is = 0.963. Let us fix K = 8, N = 3 and T = 0.8. In Figure 1 the queue-size distributions P{X(t) = m, t ∈ I 1 } for m = 0 (solid line), m = 1 (dashed line) and 2 (dotted line) are visualized. As one can observe, for m > 0 the graphs have characteristic shapes in which the character of the function changes every 0.8 time unit. Obviously, it is connected with the fixed duration of a single server vacation equal to 0.8. In Figures 2 and 3 the appropriate results are presented for two other arrival intensities. In Figure 2 the case of a relatively low arrival intensity λ = 0.7 (mean interarrival time equal to 1.429 and the offered load = 0.612) is shown. Similarly, the case of the overloaded system in that λ = 1.4 (mean interarrival time equal to 0.714 and the offered load = 1.225) is visualized in Figure 3.  We investigate now the behaviour of the probability distribution of the idle period duration. Evidently, this time is a certain multiple of the single vacation duration T. In Figures 4-6, respectively, the cases of λ = 1.1, 0.7 and 1.4 are presented. As it can be observed, the greater arrival intensity, the greater probability that the idle period will finish after one server vacation only (at time T = 0.8). Moreover, let us note that (except for the case of one single vacation case) the maximum of the distribution moves to the right with the decrease of λ (or with the decrease of the offered load).

Conclusions
In the paper a queueing system with a threshold-type multiple vacation policy is considered as a model of the operation of a WSN node with an energy saving mechanism. The idea of the algorithm is that the node radio transmitter/receiver goes to sleep mode every time the queue of packets directed to the node becomes empty. Being in this mode it takes successive independent vacations of deterministic duration until the predetermined number of packets present is detected. The time-dependent queue-size distribution is studied, applying the analytic approach based on the idea of the embedded Markov chain, integral equations and renewal theory. The compact-form formulae for the Laplace transforms of the queue-size distribution at an arbitrary fixed time t, and on the idle and processing periods are obtained. Moreover, the compact-form formulae for the distributions of the idle and processing period duration are derived. Numerical examples illustrating the theoretical results are obtained.
Funding: This research was funded by Silesian University of Technology, Gliwice, Poland.

Conflicts of Interest:
The author declares no conflict of interest.