1. Introduction {#sec1-sensors-19-03114}
===============

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., \[[@B1-sensors-19-03114],[@B2-sensors-19-03114],[@B3-sensors-19-03114]\]). 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., \[[@B4-sensors-19-03114],[@B5-sensors-19-03114]\]). 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., \[[@B6-sensors-19-03114],[@B7-sensors-19-03114],[@B8-sensors-19-03114],[@B9-sensors-19-03114],[@B10-sensors-19-03114],[@B11-sensors-19-03114]\] 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 \[[@B12-sensors-19-03114]\] (compare also \[[@B13-sensors-19-03114],[@B14-sensors-19-03114]\]) 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 \[[@B15-sensors-19-03114]\]. The approach based on Petri nets is proposed in \[[@B16-sensors-19-03114]\] in energy consumption evaluation. A queueing model with priorities is investigated in \[[@B17-sensors-19-03114]\]. 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 \[[@B18-sensors-19-03114],[@B19-sensors-19-03114],[@B20-sensors-19-03114],[@B21-sensors-19-03114]\] (compare also \[[@B22-sensors-19-03114],[@B23-sensors-19-03114],[@B24-sensors-19-03114]\]). In particular, in \[[@B18-sensors-19-03114],[@B21-sensors-19-03114]\] the departure process is investigated in cases of infinite and finite buffer capacities, respectively, while in \[[@B19-sensors-19-03114]\] 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 \[[@B25-sensors-19-03114]\] (queueing delay) and \[[@B26-sensors-19-03114]\] (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](#sec2-sensors-19-03114){ref-type="sec"} we state a detailed mathematical description of the considered queueing system. In [Section 3](#sec3-sensors-19-03114){ref-type="sec"} we analyze the queue-size distribution on the idle period of the system and, moreover, in [Section 4](#sec4-sensors-19-03114){ref-type="sec"} and [Section 5](#sec5-sensors-19-03114){ref-type="sec"} 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](#sec6-sensors-19-03114){ref-type="sec"}. The representation for the LT of the distribution of the busy period duration can be found in [Section 7](#sec7-sensors-19-03114){ref-type="sec"}. Finally, [Section 8](#sec8-sensors-19-03114){ref-type="sec"} contains the most general result in that the queue-size at an arbitrary epoch is considered.

2. Queueing Model Description {#sec2-sensors-19-03114}
=============================

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 $\lambda$ 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\left( \cdot \right)$ and with its Laplace-Stieltjes transform (LST) $f\left( \cdot \right)$. 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 \leq N \leq 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.

3. Queue-Size on Processing Suspension Period {#sec3-sensors-19-03114}
=============================================

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 \leq N \leq K$. Evidently, we have $$\begin{matrix}
{\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1} \right\} = \sum\limits_{i = 1}^{\infty}\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1,i} \right\},} \\
\end{matrix}$$ where $I_{1,i}$ stands for the *i*th successive vacation during the first idle period $I_{1}$.

Let us denote by $1_{A}\left( \cdot \right)$ the characteristic function of the set *A*, i.e., $$\begin{matrix}
{1_{A}\left( x \right)\overset{def}{=}\begin{cases}
{1,} & {{if}\mspace{900mu} x \in A,} \\
{0,} & {{if}\mspace{900mu} x \notin A,} \\
\end{cases}} \\
\end{matrix}$$ and let $\delta_{i,j}$ stand for the Kronecker delta function.

Note that the following representation holds:$$\begin{array}{l}
{\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1,i} \right\} = 1_{\lbrack(i - 1)T,iT)}\left( t \right)\left\{ 1_{\{ 0,\ldots,N - 1\}}\left( m \right)\sum\limits_{k = 0}^{m}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T} \right.} \\
{\cdot \frac{\left\lbrack \lambda\left( t - \left( i - 1 \right)T \right) \right\rbrack^{m - k}}{\left( m - k \right)!}e^{- \lambda\lbrack t - (i - 1)T\rbrack}} \\
{+ 1_{\{ N,\ldots,K - 1\}}\left( m \right)\sum\limits_{k = 0}^{N - 1}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T}\frac{\left\lbrack \lambda\left( t - \left( i - 1 \right)T \right) \right\rbrack^{m - k}}{\left( m - k \right)!}e^{- \lambda\lbrack t - (i - 1)T\rbrack}} \\
{\left. + \delta_{m,K}\sum\limits_{k = 0}^{N - 1}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T}\sum\limits_{j = K - k}^{\infty}\frac{\left\lbrack \lambda\left( t - \left( i - 1 \right)T \right) \right\rbrack^{j}}{j!}e^{- \lambda\lbrack t - (i - 1)T\rbrack} \right\}.} \\
\end{array}$$

Let us briefly comment on ([3](#FD3-sensors-19-03114){ref-type="disp-formula"}). Indeed, if $t \in I_{1,i}$ then $t \in \left\lbrack \left( i - 1 \right)T,iT \right)$. The first summand on the right side of ([3](#FD3-sensors-19-03114){ref-type="disp-formula"}) 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 $\left( i - 1 \right)T$ the number of arrivals must equal at most $N - 1$ in order to initialize the *i*th vacation). Finally, the last summand on the right side of ([3](#FD3-sensors-19-03114){ref-type="disp-formula"}) describes the situation, in that the buffer is saturated at time $t$.

Before we will state the representation for the LT of $\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1,i} \right\}$, let us observe that for $s > 0$ we have $$\begin{array}{l}
{\int_{(i - 1)T}^{iT}e^{- (s + \lambda)t}\frac{\left\lbrack \lambda\left( t - \left( i - 1 \right)T \right) \right\rbrack^{j}}{j!}dt} \\
{= \int_{0}^{T}e^{- (s + \lambda)\lbrack u + (i - 1)T\rbrack}\frac{\left( \lambda u \right)^{j}}{j!}du = e^{- (s + \lambda)(i - 1)T}\frac{\lambda^{j}}{\left( s + \lambda \right)^{j + 1}}\mathbb{E}_{s + \lambda}\left( j,T \right),} \\
\end{array}$$ where $\mathbb{E}_{s + \lambda}\left( j, \cdot \right)$ denotes the CDF of the *j*-Erlang distribution with parameter $s + \lambda$.

Referring to ([2](#FD2-sensors-19-03114){ref-type="disp-formula"})--([4](#FD4-sensors-19-03114){ref-type="disp-formula"}), we get now for $s > 0$$$\begin{array}{l}
{p_{I}\left( s,m \right)\overset{def}{=}\int_{0}^{\infty}e^{- st}\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1} \right\} dt = \sum\limits_{i = 1}^{\infty}e^{- (s + \lambda)(i - 1)T}\left\{ 1_{\{ 0,\ldots,N - 1\}}\left( m \right) \right.} \\
{\cdot \sum\limits_{k = 0}^{m}\frac{\lambda^{m - k}}{\left( s + \lambda \right)^{m - k + 1}} \cdot \frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}\mathbb{E}_{s + \lambda}\left( m - k,T \right) + \sum\limits_{k = 0}^{N - 1}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}} \\
{\left. \cdot \left\lbrack {1_{\{ N,\ldots,K - 1\}}\left( m \right)\frac{\lambda^{m - k}}{\left( s + \lambda \right)^{m - k + 1}}\mathbb{E}_{s + \lambda}\left( m - k,T \right) + \delta_{m,K}\sum\limits_{j = K - k}^{\infty}\frac{\lambda^{j}}{\left( s + \lambda \right)^{j + 1}}\mathbb{E}_{s + \lambda}\left( j,T \right)} \right\rbrack \right\}.} \\
\end{array}$$

4. Queue Measurement at the Idle Period Completion Epoch {#sec4-sensors-19-03114}
========================================================

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 $$\begin{matrix}
{a_{n}\overset{def}{=}\mathbf{P}\left\{ X_{I} = n \right\}, n \in \left\{ N,\ldots,K \right\},} \\
\end{matrix}$$ observe that the following equality is true:$$\begin{array}{l}
{a_{n} = \sum\limits_{i = 1}^{\infty}\mathbf{P}\left\{ X\left( iT \right) = n,\,{idle}{period}{contains}{exactly} i{single}{vacations} \right\}} \\
{= \sum\limits_{i = 1}^{\infty}\left( 1_{\{ N,\ldots,K - 1\}}\left( n \right)\sum\limits_{k = 0}^{N - 1}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T} \cdot \frac{\left( \lambda T \right)^{n - k}}{\left( n - k \right)!}e^{- \lambda T} \right.} \\
{\left. + \delta_{n,K}\sum\limits_{k = 0}^{N - 1}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T}\sum\limits_{j = K - k}^{\infty}\frac{\left( \lambda T \right)^{j}}{j!}e^{- \lambda T} \right).} \\
\end{array}$$

Indeed, the first summand on the right side of ([7](#FD7-sensors-19-03114){ref-type="disp-formula"}) 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.

5. Idle Period Duration {#sec5-sensors-19-03114}
=======================

In this section, without loss of generality, we identify the *r*th idle period $I_{r}$ with its duration. Obviously, we have $$\begin{matrix}
{\mathbf{P}\left\{ I_{r} \geq iT \right\} = \sum\limits_{k = 0}^{N - 1}\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T}, r = 1,2,\ldots,} \\
\end{matrix}$$ due to the fact that the *i*th vacation during the idle period is being initialized if and only if the number of accumulated packets at time $\left( i - 1 \right)T$ does not exceed $N - 1$.

From ([8](#FD8-sensors-19-03114){ref-type="disp-formula"}) we obtain immediately $$\begin{array}{l}
{\mathbf{P}\left\{ I_{r} = iT \right\} = \mathbf{P}\left\{ I_{r} \geq iT \right\} - \mathbf{P}\left\{ I_{r} \geq \left( i + 1 \right)T \right\}} \\
{= \sum\limits_{k = 0}^{N - 1}\left( {\frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T} - \frac{\left( \lambda iT \right)^{k}}{k!}e^{- \lambda iT}} \right).} \\
\end{array}$$

Introducing the LST $f_{I}\left( \cdot \right)$ of the CDF of the arbitrary idle period duration, we get $$\begin{array}{l}
{f_{I}\left( s \right)\overset{def}{=}\sum\limits_{i = 0}^{\infty}e^{- siT}\left( {\mathbf{P}\left\{ I_{r} = \left( i + 1 \right)T \right\} - \mathbf{P}\left\{ I_{r} = iT \right\}} \right) = \sum\limits_{i = 0}^{\infty}e^{- siT}} \\
{\cdot \sum\limits_{k = 0}^{N - 1}\left( {\frac{2\left( \lambda iT \right)^{k}}{k!}e^{- \lambda iT} - \frac{\left\lbrack \lambda\left( i + 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i + 1)T} - \frac{\left\lbrack \lambda\left( i - 1 \right)T \right\rbrack^{k}}{k!}e^{- \lambda(i - 1)T}} \right).} \\
\end{array}$$

6. Queue-Size on Processing Period {#sec6-sensors-19-03114}
==================================

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 \in \left\{ N,\ldots,K \right\}$. 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 $\left\{ 1,\ldots,K \right\}$. 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 \[[@B27-sensors-19-03114]\]. Let us denote by $X\left( t \right)$ the number of packets present in the system exactly at time $t$.

Introduce the following notations:$$\begin{matrix}
{P_{n}^{(P)}\left( t,m \right)\overset{def}{=}\mathbf{P}\left\{ X\left( t \right) = m,t\mspace{900mu}{is}{in} a{processing}{period}\, \middle| \, X\left( 0 \right) = n \right\},} \\
\end{matrix}$$ where $m,n \in \left\{ 1,\ldots,K \right\}$ and $t > 0$, and $$\begin{matrix}
{p_{n}^{(P)}\left( s,m \right)\overset{def}{=}\int_{0}^{\infty}e^{- st}P_{n}^{(P)}\left( t,m \right)dt, s > 0.} \\
\end{matrix}$$

It is well known that, due to the memoryless property of the exponential distribution of interarrival times, the sequence $X\left( t_{i} \right)$, $i = 1,2,\ldots$, where $t_{i}$ stands for the *i*th processing completion epoch after the starting moment, is an embedded Markov chain for the process $\left\{ X\left( t \right),t \geq 0 \right\}$. Thus, utilizing the formula of total probability with respect to the first departure moment after $t = 0$, we obtain for $n = 1$ $$\begin{array}{l}
{P_{1}^{(P)}\left( t,m \right) = \sum\limits_{i = 1}^{K - 2}\int_{0}^{t}\frac{\left( \lambda x \right)^{i}}{i!}e^{- \lambda x}P_{i}^{(P)}\left( t - x,m \right)dF\left( x \right)} \\
{+ \sum\limits_{i = K - 1}^{\infty}\int_{0}^{t}\frac{\left( \lambda x \right)^{i}}{i!}e^{- \lambda x}P_{K - 1}^{(P)}\left( t - x,m \right)dF\left( x \right)} \\
{+ \left\lbrack 1 - F\left( t \right) \right\rbrack e^{- \lambda t}\left( {1_{\{ 1,\ldots,K - 1\}}\left( m \right)\frac{\left( \lambda t \right)^{m - 1}}{\left( m - 1 \right)!} + \delta_{m,K}\sum\limits_{i = K - 1}^{\infty}\frac{\left( \lambda t \right)^{i}}{i!}} \right).} \\
\end{array}$$

Similarly, for $2 \leq n \leq K$, we have $$\begin{array}{l}
{P_{n}^{(P)}\left( t,m \right) = \sum\limits_{i = 0}^{K - n - 1}\int_{0}^{t}\frac{\left( \lambda x \right)^{i}}{i!}e^{- \lambda x}P_{n + i - 1}^{(P)}\left( t - x,m \right)dF\left( x \right)} \\
{+ \sum\limits_{i = K - n}^{\infty}\int_{0}^{t}\frac{\left( \lambda x \right)^{i}}{i!}e^{- \lambda x}P_{K - 1}^{(P)}\left( t - x,m \right)dF\left( x \right)} \\
{+ \left\lbrack 1 - F\left( t \right) \right\rbrack e^{- \lambda t}\left( {1_{\{ n,\ldots,K - 1\}}\left( m \right)\frac{\left( \lambda t \right)^{m - n}}{\left( m - n \right)!} + \delta_{m,K}\sum\limits_{i = K - n}^{\infty}\frac{\left( \lambda t \right)^{i}}{i!}} \right).} \\
\end{array}$$

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](#FD14-sensors-19-03114){ref-type="disp-formula"}). Let us note that the first sum in ([14](#FD14-sensors-19-03114){ref-type="disp-formula"}) 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 define for $s > 0$ the following functional sequences:$$\begin{matrix}
{\gamma_{n}\left( s \right)\overset{def}{=}\int_{0}^{\infty}e^{- (\lambda + s)t}\frac{\left( \lambda t \right)^{n}}{n!}dF\left( t \right)} \\
\end{matrix}$$ and $$\begin{matrix}
{\eta_{n}\left( s,m \right)\overset{def}{=}\int_{0}^{\infty}e^{- (\lambda + s)t}\left\lbrack 1 - F\left( t \right) \right\rbrack\left\lbrack {1_{\{ n,\ldots,K - 1\}}\left( m \right)\frac{\left( \lambda t \right)^{m - n}}{\left( m - n \right)!} + \delta_{m,K}\sum\limits_{i = K - n}^{\infty}\frac{\left( \lambda t \right)^{i}}{i!}} \right\rbrack dt.} \\
\end{matrix}$$

Implementing ([15](#FD15-sensors-19-03114){ref-type="disp-formula"}) and ([16](#FD16-sensors-19-03114){ref-type="disp-formula"}) into (13) and ([14](#FD14-sensors-19-03114){ref-type="disp-formula"}) gives $$\begin{matrix}
{p_{1}^{(P)}\left( s,m \right) = \sum\limits_{i = 1}^{K - 2}\gamma_{i}\left( s \right)p_{i}^{(P)}\left( s,m \right) + p_{K - 1}^{(P)}\left( s,m \right)\sum\limits_{i = K - 1}^{\infty}\gamma_{i}\left( s \right) + \eta_{1}\left( s,m \right)} \\
\end{matrix}$$ and $$\begin{matrix}
{p_{n}^{(P)}\left( s,m \right) = \sum\limits_{i = 0}^{K - n - 1}\gamma_{i}\left( s \right)p_{n + i - 1}^{(P)}\left( s,m \right) + p_{K - 1}^{(P)}\left( s,m \right)\sum\limits_{i = K - n}^{\infty}\gamma_{i}\left( s \right) + \eta_{n}\left( s,m \right),} \\
\end{matrix}$$ where $2 \leq n \leq K$.

Let us rewrite equations of the system ([17](#FD17-sensors-19-03114){ref-type="disp-formula"}) and ([18](#FD18-sensors-19-03114){ref-type="disp-formula"}) in a another form. Indeed, substituting ${\widetilde{p}}_{n}^{(P)}\left( s,m \right)\overset{def}{=}p_{K - n}^{(P)}\left( s,m \right),$ where $0 \leq n \leq K - 1$, we transform them as follows:$$\begin{array}{l}
{{\widetilde{p}}_{K - 1}^{(P)}\left( s,m \right) = \sum\limits_{i = 1}^{K - 2}\gamma_{i}\left( s \right){\widetilde{p}}_{K - i}^{(P)}\left( s,m \right) + {\widetilde{p}}_{1}^{(P)}\left( s,m \right)\sum\limits_{i = K - 1}^{\infty}\gamma_{i}\left( s \right) + \eta_{1}\left( s,m \right),} \\
\end{array}$$$$\begin{array}{l}
{\sum\limits_{k = - 1}^{n}\gamma_{k + 1}\left( s \right){\widetilde{p}}_{n - k}^{(P)}\left( s,m \right) - {\widetilde{p}}_{n}^{(P)}\left( s,m \right) = \omega_{n}\left( s,m \right),} \\
\end{array}$$ where $0 \leq n \leq K - 2$, and $$\begin{matrix}
{\omega_{n}\left( s,m \right)\overset{def}{=}\gamma_{n + 1}\left( s \right){\widetilde{p}}_{0}^{(P)}\left( s,m \right) - {\widetilde{p}}_{1}^{(P)}\left( s,m \right)\sum\limits_{i = n + 1}^{\infty}\gamma_{i}\left( s \right) - \eta_{K - n}\left( s,m \right).} \\
\end{matrix}$$

Each solution of the linear infinite-size system with known coefficients $a_{k}$'s and $b_{k}$'s $$\begin{matrix}
{\sum\limits_{k = - 1}^{n}a_{k + 1}x_{n - k} - x_{n} = b_{n}, n \geq 0,} \\
\end{matrix}$$ can be written in the following form (see \[[@B27-sensors-19-03114],[@B28-sensors-19-03114]\]):$$\begin{matrix}
{x_{n} = cr_{n + 1} + \sum\limits_{i = 0}^{n}r_{n - i}b_{i},} \\
\end{matrix}$$ where *c* is certain constant and the sequence $\left( r_{n} \right)$ is defined by the following recursive relationship:$$\begin{matrix}
{r_{n} = \left\{ \begin{matrix}
{0,} & {{for}\mspace{900mu} n = 0,} \\
{1/a_{0},} & {{for}\mspace{900mu} n = 1,} \\
{\left( 1/a_{0} \right){(r_{n - 1} - \sum\limits_{i = 0}^{n - 1}a_{i + 1}r_{n - 1 - i})},} & {{for}\mspace{900mu} n \geq 2.} \\
\end{matrix} \right.} \\
\end{matrix}$$

At this stage let us make some essential observations. Firstly, the systems ([20](#FD20-sensors-19-03114){ref-type="disp-formula"}) and (22) are very similar, however in the former, functional sequences occur. Secondly, the number of equations in ([20](#FD20-sensors-19-03114){ref-type="disp-formula"}) 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](#FD19-sensors-19-03114){ref-type="disp-formula"}) and ([20](#FD20-sensors-19-03114){ref-type="disp-formula"}) and, moreover, the fact that the number of equations in ([20](#FD20-sensors-19-03114){ref-type="disp-formula"}) is finite allows for finding an explicit representation for $c$.

So, we can write (compare (23) and (24)) $$\begin{matrix}
{{\widetilde{p}}_{n}^{(P)}\left( s,m \right) = c\left( s,m \right)r_{n + 1}\left( s \right) + \sum\limits_{i = 0}^{n}r_{n - i}\left( s \right)\omega_{i}\left( s,m \right),} \\
\end{matrix}$$ where $c\left( s,m \right)$ does not depend on the index *n* and the functional sequence $\left( r_{n}\left( s \right) \right)$ is defined via $\left( \gamma_{n}\left( s \right) \right)$ in the following way:$$\begin{matrix}
{r_{n}\left( s \right) = \left\{ \begin{matrix}
{0,} & {{for}\mspace{900mu} n = 0,} \\
{1/\gamma_{0}\left( s \right),} & {{for}\mspace{900mu} n = 1,} \\
{\left( 1/\gamma_{0}\left( s \right) \right){\lbrack r_{n - 1} - \sum\limits_{i = 0}^{n - 1}\gamma_{i + 1}\left( s \right)r_{n - 1 - i}\left( s \right)\rbrack},} & {{for}\mspace{900mu} n \geq 2.} \\
\end{matrix} \right.} \\
\end{matrix}$$

Note that to represent ${\widetilde{p}}_{n}^{(P)}\left( s,m \right)$ explicitly we need to find the formulae for ${\widetilde{p}}_{0}^{(P)}\left( s,m \right)$ and ${\widetilde{p}}_{1}^{(P)}\left( s,m \right)$ occurring in the definition (21) of $\omega_{n}\left( s,m \right)$.

Let us start with substituting $n = 0$ into (25). We obtain $$\begin{matrix}
{c\left( s,m \right) = \gamma_{0}\left( s \right){\widetilde{p}}_{0}^{(P)}\left( s,m \right).} \\
\end{matrix}$$

Writing ([20](#FD20-sensors-19-03114){ref-type="disp-formula"}) for $n = 0$ leads to $$\begin{matrix}
{{\widetilde{p}}_{1}^{(P)}\left( s,m \right) = \left\lbrack \gamma_{0}\left( s \right) \right\rbrack^{- 1}\lbrack\omega_{0}\left( s,m \right) + {\widetilde{p}}_{0}^{(P)}\left( s,m \right)\left( {1 - \gamma_{1}\left( s \right)} \right)\rbrack} \\
\end{matrix}$$ and hence, referring to (21), we get $$\begin{matrix}
{{\widetilde{p}}_{1}^{(P)}\left( s,m \right) = \frac{{\widetilde{p}}_{0}^{(P)}\left( s,m \right) - \eta_{K}\left( s,m \right)}{f\left( s \right)}.} \\
\end{matrix}$$

As a consequence, implementing representations (27) and (29) in the formula (25), we have $$\begin{matrix}
{{\widetilde{p}}_{n}^{(P)}\left( s,m \right) = g_{n}\left( s \right){\widetilde{p}}_{0}^{(P)}\left( s,m \right) + h_{n}\left( s,m \right),} \\
\end{matrix}$$ where $n \geq 0$ and $$\begin{matrix}
{g_{n}\left( s \right)\overset{def}{=}\gamma_{0}\left( s \right)r_{n + 1}\left( s \right) + \sum\limits_{i = 0}^{n}r_{n - i}\left( s \right)\{\gamma_{i + 1}\left( s \right) - \left\lbrack f\left( s \right) \right\rbrack^{- 1}\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right)\}} \\
\end{matrix}$$ and $$\begin{matrix}
{h_{n}\left( s,m \right)\overset{def}{=}\sum\limits_{i = 0}^{n}r_{n - i}\left( s \right)\{\left\lbrack f\left( s \right) \right\rbrack^{- 1}\eta_{K}\left( s,m \right)\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right) - \eta_{K - i}\left( s,m \right)\}.} \\
\end{matrix}$$

Applying now the representation (30) in the Equation ([19](#FD19-sensors-19-03114){ref-type="disp-formula"}), we can easily eliminate ${\widetilde{p}}_{0}^{(P)}\left( s,m \right)$ in the form $$\begin{matrix}
{{\widetilde{p}}_{0}^{(P)}\left( s,m \right) = U\left( s,m \right)V\left( s \right),} \\
\end{matrix}$$ where $$\begin{array}{l}
{U\left( s,m \right)\overset{def}{=}\sum\limits_{i = 1}^{K - 2}\gamma_{i}\left( s \right)h_{K - i}\left( s,m \right) - \left\lbrack f\left( s \right) \right\rbrack^{- 1}\eta_{K}\left( s,m \right)\sum\limits_{i = K - 1}^{\infty}\gamma_{i}\left( s \right) + \eta_{1}\left( s,m \right) - h_{K - 1}\left( s,m \right),} \\
\end{array}$$ $$\begin{array}{l}
{V\left( s \right)\overset{def}{=}\left\{ {h_{K - 1}\left( s \right) - \sum\limits_{i = 1}^{K - 2}\gamma_{i}\left( s \right)g_{K - i}\left( s \right) - \left\lbrack f\left( s \right) \right\rbrack^{- 1}\sum\limits_{i = K - 1}^{\infty}\gamma_{i}\left( s \right)} \right\}^{- 1}.} \\
\end{array}$$

Finally, returning to $p_{n}^{(P)}\left( s,m \right)$ (instead of ${\widetilde{p}}_{n}^{(P)}\left( s,m \right)$) and referring to (21), (25), (27), (29) and (33), we can formulate the following result: $$\begin{matrix}
{p_{n}^{(P)}\left( s,m \right) =} & {\int_{0}^{\infty}e^{- st}P_{n}^{(P)}\left( t,m \right)dt = \left\{ {\gamma_{0}\left( s \right)r_{K - n + 1}\left( s \right) + \sum\limits_{i = 0}^{K - n}r_{K - n - i}\left( s \right)\left\lbrack {\gamma_{i + 1}\left( s \right) - \left( f\left( s \right) \right)^{- 1}\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right)} \right\rbrack} \right\}} \\
 & {\cdot U\left( s,m \right)V\left( s \right) + \sum\limits_{i = 0}^{K - n}r_{K - n - i}\left( s \right)\left\lbrack {\left( f\left( s \right) \right)^{- 1}\eta_{K}\left( s,m \right)\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right) - \eta_{K - i}\left( s,m \right)} \right\rbrack,} \\
\end{matrix}$$ where $s > 0$ and the formulae for $\gamma_{k}\left( s \right)$, $\eta_{k}\left( s,m \right)$, $r_{k}\left( s \right)$, $U\left( s,m \right)$ and $V\left( s \right)$ are given in ([15](#FD15-sensors-19-03114){ref-type="disp-formula"}), ([16](#FD16-sensors-19-03114){ref-type="disp-formula"}), (26), (34) and (35), respectively.

7. Processing Period Duration {#sec7-sensors-19-03114}
=============================

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 \in \left\{ 1,\ldots,K \right\}$ 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:$$\begin{matrix}
{F_{BP,n}\left( x \right)\overset{def}{=}\mathbf{P}\left\{ {first}{busy}{period}{duration}\, < x\, \middle| \,{busy}{period}{starts}{with}\, n\,{packets}{present} \right\}} \\
\end{matrix}$$ and $$\begin{matrix}
{f_{BP,n}\left( s \right)\overset{def}{=}\int_{0}^{\infty}e^{- sx}dF_{BP,n}\left( x \right), s > 0.} \\
\end{matrix}$$

It is easy to note that for $f_{BP,n}\left( s \right)$, $n \in \left\{ 1,\ldots,K \right\}$, the following system of equations is true (compare ([17](#FD17-sensors-19-03114){ref-type="disp-formula"}) and ([18](#FD18-sensors-19-03114){ref-type="disp-formula"})):$$\begin{array}{l}
{f_{BP,1}\left( s \right) = \sum\limits_{i = 1}^{K - 2}\gamma_{i}\left( s \right)f_{BP,i}\left( s \right) + f_{BP,K - 1}\left( s \right)\sum\limits_{i = K - 1}^{\infty}\gamma_{i}\left( s \right) + f\left( \lambda + s \right),} \\
\end{array}$$ $$\begin{array}{l}
{f_{BP,n}\left( s \right) = \sum\limits_{i = 0}^{K - n - 1}\gamma_{i}\left( s \right)f_{BP,n + i - 1}\left( s \right) + f_{BP,K - 1}\left( s \right)\sum\limits_{i = K - n}^{\infty}\gamma_{i}\left( s \right),} \\
\end{array}$$ where $2 \leq n \leq K$.

Let us observe that if we define $$\begin{matrix}
{{\widetilde{\eta}}_{n}\left( s,m \right)\overset{def}{=}\delta_{n,1}f\left( \lambda + s \right),} \\
\end{matrix}$$ then we can obtain the explicit-form representation for $f_{BP,n}\left( s \right)$ utilizing the Formula (36). Indeed, we obtain $$\begin{aligned}
{f_{BP,n}\left( s,m \right) =} & \left\{ {\gamma_{0}\left( s \right)r_{K - n + 1}\left( s \right) + \sum\limits_{i = 0}^{K - n}r_{K - n - i}\left( s \right)\left\lbrack {\gamma_{i + 1}\left( s \right) - \left( f\left( s \right) \right)^{- 1}\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right)} \right\rbrack} \right\} \\
 & {\cdot \widetilde{U}\left( s,m \right)V\left( s \right) + \sum\limits_{i = 0}^{K - n}r_{K - n - i}\left( s \right)\left\lbrack {\left( f\left( s \right) \right)^{- 1}{\widetilde{\eta}}_{K}\left( s,m \right)\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right) - {\widetilde{\eta}}_{K - i}\left( s,m \right)} \right\rbrack,} \\
\end{aligned}$$ where $s > 0$ and now $$\begin{matrix}
{\widetilde{U}\left( s,m \right)\overset{def}{=}\sum\limits_{i = 1}^{K - 2}\gamma_{i}\left( s \right){\widetilde{h}}_{K - i}\left( s,m \right) - \left\lbrack f\left( s \right) \right\rbrack^{- 1}{\widetilde{\eta}}_{K}\left( s,m \right)\sum\limits_{i = K - 1}^{\infty}\gamma_{i}\left( s \right) + {\widetilde{\eta}}_{1}\left( s,m \right) - {\widetilde{h}}_{K - 1}\left( s,m \right)} \\
\end{matrix}$$ and $$\begin{matrix}
{{\widetilde{h}}_{n}\left( s,m \right)\overset{def}{=}\sum\limits_{i = 0}^{n}r_{n - i}\left( s \right)\left\{ {\left\lbrack f\left( s \right) \right\rbrack^{- 1}{\widetilde{\eta}}_{K}\left( s,m \right)\sum\limits_{j = i + 1}^{\infty}\gamma_{j}\left( s \right) - {\widetilde{\eta}}_{K - i}\left( s,m \right)} \right\}.} \\
\end{matrix}$$

8. Queue-Size Distribution at an Arbitrary Time {#sec8-sensors-19-03114}
===============================================

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},\ldots$ interspersed with busy periods $BP_{1},BP_{2},\ldots$. The formula of total probability gives $$\begin{matrix}
{\mathbf{P}\left\{ X\left( t \right) = m \right\} = \sum\limits_{i = 1}^{\infty}\left( {\mathbf{P}\left\{ X\left( t \right) = m,\, t \in I_{i} \right\} + \mathbf{P}\left\{ X\left( t \right) = m,\, t \in BP_{i} \right\}} \right).} \\
\end{matrix}$$

Due to the memoryless property of the exponential distribution of interarrival times, the following representation is true:$$\begin{aligned}
{\mathbf{P}\left\{ X\left( t \right) = m,\, t \in I_{i} \right\} =} & {\sum\limits_{l_{1},\ldots,l_{i - 1} \in {\{ N,\ldots,K\}}}\prod\limits_{j = 1}^{i - 1}a_{l_{j}}\int_{0}^{t}\mathbf{P}\left\{ X\left( t - y \right) = m,\, t - y \in I_{1} \right\}} \\
 & {\cdot d\left( {F_{I}^{(i - 1)i*}*F_{BP,a_{l_{1}}}*\ldots*F_{BP,a_{l_{i - 1}}}} \right)\left( y \right),} \\
\end{aligned}$$ where $F_{I}\left( \cdot \right)$ 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},\ldots,l_{i - 1} \in \left\{ N,\ldots,K \right\}.$

Quite similarly we obtain $$\begin{array}{l}
{\mathbf{P}\left\{ X\left( t \right) = m,\, t \in BP_{i} \right\}} \\
{= \sum\limits_{l_{1},\ldots,l_{i} \in {\{ N,\ldots,K\}}}\prod\limits_{j = 1}^{i - 1}a_{l_{j}}\int_{0}^{t}\mathbf{P}\left\{ X\left( t - y \right) = m,\, t - y \in BP_{1}\, \middle| \, BP_{1}\,{starts}{with}\, l_{i}\,{packets}{present} \right\}} \\
{\cdot d\left( {F_{I}^{i*}*F_{BP,a_{l_{1}}}*\ldots*F_{BP,a_{l_{i - 1}}}} \right)\left( y \right).} \\
\end{array}$$

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:$$\begin{aligned}
{\int_{0}^{\infty}e^{- st}\mathbf{P}\left\{ X\left( t \right) = m \right\} dt =} & {\sum\limits_{i = 1}^{\infty}\left\{ p_{I}\left( s,m \right)\left\lbrack f_{I}\left( s \right) \right\rbrack^{i - 1}\sum\limits_{l_{1},\ldots,l_{i - 1} \in {\{ N,\ldots,K\}}}\prod\limits_{j = 1}^{i - 1}a_{l_{j}}f_{BP,a_{l_{j}}}\left( s \right) \right.} \\
 & {\left. + \sum\limits_{l_{1},\ldots,l_{i} \in {\{ N,\ldots,K\}}}a_{l_{i}}p_{a_{l_{i}}}^{(P)}\left( s,m \right)\prod\limits_{j = 1}^{i - 1}a_{l_{j}}f_{BP,a_{l_{j}}}\left( s \right) \right\},} \\
\end{aligned}$$ where $s > 0$.

9. Numerical Study {#sec9-sensors-19-03114}
==================

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}\left( \cdot \right)$ of the service time has the following form:$$\begin{matrix}
{f_{S}\left( t \right) = 0.25 \cdot 2\exp\left( - 2t \right) + 0.75 \cdot \exp\left( - t \right), t > 0.} \\
\end{matrix}$$

Hence the mean service time of a single packet equals 0.875 and, in consequence, the offered load for the system is $\varrho = 0.963$. Let us fix $K = 8$, $N = 3$ and $T = 0.8$. In [Figure 1](#sensors-19-03114-f001){ref-type="fig"} the queue-size distributions $\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1} \right\}$ 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 [Figure 2](#sensors-19-03114-f002){ref-type="fig"} and [Figure 3](#sensors-19-03114-f003){ref-type="fig"} the appropriate results are presented for two other arrival intensities. In [Figure 2](#sensors-19-03114-f002){ref-type="fig"} the case of a relatively low arrival intensity $\lambda = 0.7$ (mean interarrival time equal to 1.429 and the offered load $\varrho = 0.612$) is shown. Similarly, the case of the overloaded system in that $\lambda = 1.4$ (mean interarrival time equal to 0.714 and the offered load $\varrho = 1.225$) is visualized in [Figure 3](#sensors-19-03114-f003){ref-type="fig"}.

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 [Figure 4](#sensors-19-03114-f004){ref-type="fig"}, [Figure 5](#sensors-19-03114-f005){ref-type="fig"} and [Figure 6](#sensors-19-03114-f006){ref-type="fig"}, respectively, the cases of $\lambda = 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 $\lambda$ (or with the decrease of the offered load).

Finally, in [Figure 7](#sensors-19-03114-f007){ref-type="fig"}, [Figure 8](#sensors-19-03114-f008){ref-type="fig"} and [Figure 9](#sensors-19-03114-f009){ref-type="fig"} the probability distributions of the number of packets present in the system at the completion epoch of the idle period are shown for the same three values of the arrival intensity, so for the offered traffic load $\varrho = 0.963$, 0.612 and $1.225$.

10. Conclusions {#sec10-sensors-19-03114}
===============

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.

This research was funded by Silesian University of Technology, Gliwice, Poland.

The author declares no conflict of interest.

![Transient probabilities $\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1} \right\}$ for $\lambda = 1.1$ and for $m = 0,1,2$.](sensors-19-03114-g001){#sensors-19-03114-f001}

![Transient probabilities $\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1} \right\}$ for $\lambda = 0.7$ and for $m = 0,1,2$.](sensors-19-03114-g002){#sensors-19-03114-f002}

![Transient probabilities $\mathbf{P}\left\{ X\left( t \right) = m,t \in I_{1} \right\}$ for $\lambda = 1.4$ and for $m = 0,1,2$.](sensors-19-03114-g003){#sensors-19-03114-f003}

![Distribution of idle period duration for $\lambda = 1.1$.](sensors-19-03114-g004){#sensors-19-03114-f004}

![Distribution of idle period duration for $\lambda = 0.7$.](sensors-19-03114-g005){#sensors-19-03114-f005}

![Distribution of idle period duration for $\lambda = 1.4$.](sensors-19-03114-g006){#sensors-19-03114-f006}

![Number of packets of at the completion epoch of idle period for $\lambda = 1.1$.](sensors-19-03114-g007){#sensors-19-03114-f007}

![Number of packets of at the completion epoch of idle period for $\lambda = 0.7$.](sensors-19-03114-g008){#sensors-19-03114-f008}

![Number of packets of at the completion epoch of idle period for $\lambda = 1.4$.](sensors-19-03114-g009){#sensors-19-03114-f009}
