Age of information of a server with energy requirements

We investigate a system with Poisson arrivals to two queues. One queue stores the status updates of the process of interest (or data packets) and the other handles the energy that is required to deliver the updates to the monitor. We consider that the energy is represented by packets of discrete unit. When an update ends service, it is sent to the energy queue and, if the energy queue has one packet, the update is delivered successfully and the energy packet disappears; however, in case the energy queue is empty, the update is lost. Both queues can handle, at most, one packet and the service time of updates is exponentially distributed. Using the Stochastic Hybrid System method, we characterize the average Age of Information of this system. Due to the difficulty of the derived expression, we also explore approximations of the average Age of Information of this system.


INTRODUCTION Motivation
The Age of Information has been introduced recently as a metric to measure the freshness of information in applications in which a monitor at the destination is interested in having timely updates about a process of interest in the source. There is a wide range of applications in which the Age of Information is a useful metric of the performance of the system. For example, in autonomous driving, the location, orientation, and speed of the rest of the vehicles in the route must be as recent as possible for an optimal system behavior. Most of the articles that study the Age of Information model the network where the communication network connecting the system whose status is of interest and the monitor that tracks the status of that system as a queueing network. In this work, we analyze the Age of Information of a queueing system with energy requirements, that is, we consider that the communication system needs some energy to deliver the status updates of the source to the monitor.
In the last decades, there has been a big increase of energy usage that come from renewal sources, such as solar or wind and this growth will continue in the near future. This kind of energy sources are known to be very volatile. For instance, the amount of energy generated by solar or wind generators depend on the weather of the region where the generators are located. Therefore, in a system that run on renewal energy, it might happen the generation of energy when it is not required or the lack of energy when the system needs to work. A solution to this problem that has been presented in the last years function (Kosta et al., 2017b(Kosta et al., , 2020 and the age of incorrect information (Maatouk et al., 2020). Recently, the authors in Yates & Kaul (2019) present the Stochastic Hybrid System (SHS) method as a technique to compute the average Age of Information without requiring the computation of the aforementioned difficult expression. We describe this methodology more in detail in "SHS for the Average Age of Information" since it is the technique we use in this article to compute the average Age of Information of our model.
The queueing system we analyze is a particular case of the Energy Packet Network (EPN) model where the queues M/M/1/1 queues. The EPN model was introduced by Gelenbe and his colleagues (Gelenbe, 2011(Gelenbe, , 2012Gelenbe & Ceran, 2015) and it is based on G-networks Gelenbe (1991), Gelenbe (1993aGelenbe ( , 1993b, Chao, Miyazawa & Pinedo (1999) and Fourneau & Gelenbe (2017) (although not all EPN models are related to G-networks, see for instance, Gelenbe (2014) and Abdelrahman & Gelenbe (2016). Therefore, there is a large number of EPN models where the existence of a product form of the steady-state distribution of jobs in the queues follows from that of G-networks. The importance of the existence of the product form expression is that it allows to optimize the system for some utility function like losses or response time (Gelenbe & Ceran, 2016;Fourneau, Marin & Balsamo, 2016) and the energy distribution (Gelenbe & Zhang, 2019;Zhang, 2019) as well as to design networks (Kadioglu & Gelenbe, 2016;Gelenbe & Abdelrahman, 2018;Doncel & Fourneau, 2019) and data-centers Fourneau (2020) with energy harvesting. We refer to Ray (2019) for a recent survey of the EPN literature. In the EPN model, energy is represented by packets of discrete units called energy packets that model a certain number of Joules, whereas the workload is represented by data packets. Each station of the network consists of a data queue where data packets are stored and an energy queue (or battery) to keep the energy. In such a model, the authors in Gelenbe & Marin (2015) study the influence of the lack of energy in the delay of data packets. As in Kadioglu & Gelenbe (2019), we consider an EPN model where the data packets start that transfer. This means that, when a data packet is served, it is sent to the energy queue and triggers the deletion of an energy packet and the movement of the data packet to the following station, whereas the data packet is lost if it does not find an energy packet. To the best of our knowledge, the average Age of Information of this kind of systems has not been studied so far.

Contributions
In this article, we study the average Age of Information of a queueing system that is formed by two queues: one queue stores the updates of the system of interest and the other stores the energy that is required to deliver the status updates to the monitor. Both queues can handle, at most, one packet. We assume that there are leakages in the energy queue.
The main contributions of this article are summarized as follows: We use the SHS technique to study the average Age of Information of a queueing system under consideration. We first observe that the average Age of Information requires to compute some of the variables that are the solution of a system with 8 equations.
Then, we prove that, to compute the average Age of Information, it is enough to solve a system with four equations and four variables. Solving the latter system of equation, we provide an explicit expression of the average Age of Information of our model. Due to the difficulty of the derived expression, we aim to study approximations of the average Age of Interest of this model. We first study the accuracy of the expression obtained under the assumption that there is always energy available to deliver the updates and we show that this expression is a good approximation when the arrival rate of energy packets is very large and the rate at which energy packets are lost is small. Then, we present another expression where it provides a good approximation of the average Age of Information when the arrival rate of energy packets is large and any value of the rate at which energy packets are lost.
The results of this article provides insides on the impact on the average Age of Information of the presence of energy harvesting devices in which the arrival of the energy follows a random process. This is a particularly interesting problem given that, in the last decades, there has been a huge growth of energy that come from renewable sources. This work also shows the difficulty in obtaining an analytical expression of the average Age of Information for energy harvesting models and illustrate that the study of approximations of such a difficult performance metric is a very promishing research line.

Organization of the paper
The remainder of the article is organized as follows. In "Model Description", we describe the model we study. In "Exact Computation of the Average Age of Information", we provide an exact analysis of the average Age of Information of our model, whereas in "Approximation of the Average Age of Information" we present approximations to the derived expression. Finally, we explain the main conclusions of our work in "Conclusions".

Age of information
We study the transmission of status updates to a monitor. We assume that update i is generated at time s i and that it is received by the monitor at time t 0 i . Let N(t) be the index of the last successfully received update at time t, that is, From the above definitions, it follows that the generation time of the last received update at time t is given by t N(t) . The Age of Information is defined as An example of the evolution of Δ(t) is presented in Fig. 1.
We know that the average D(t) exists in a stationary ergodic updating system. Under such assumption, it is defined as follows: In this article, we are interested in calculating the average Δ(t) in an energy harvesting model. As we said in the introduction, the analytical study of the above expression in a general setting is known to be an extremely difficult task. In the following section, we describe for completeness the SHS method and how it can be used to calculate the average Age of Information.

SHS for the average age of information
We now present the SHS method and how it is used to compute the average Age of Information for an arbitrary model. For full details about this technique, we refer to Hespanha (2006).
In the SHS, the system is modeled as a hybrid state (q(t), x(t)). Each of the components of this hybrid state is as follows: q(t) belongs to a continuous time Markov Chain and x(t) is a vector evolves according to an ordinary differential equation. The latter contains the current value of the Age of Information as well as the value of the Age of Information if the packets present in the system were delivered to the monitor.
A link l of the Markov Chain represents a transition between two states, which occurs with rate λ l . In each transition l, the vector x changes to x ′ using a transformation matrix A l , that is, x′ = x A l . Therefore, x(t) is a piecewise function.
For each state q, we define b q as the vector whose elements are zero or one since the time from the generation of the updates that are present in the system increase at unit rate, whereas the updates that are not in the system do not.
We assume the Markov Chain is ergodic and we denote by p q the stationary distribution of state q. We denote by L q the set of outgoing links of state q and L 0 q the set of links that get into state q. We now present the following theorem that will be used to characterize the average Age of Information: then the average Age of Information is D ¼ P q v q ð0Þ. In "Exact Computation of the Average Age of Information", we use the SHS technique to characterize the average Age of Information of a model that consists of single server with energy requirements. Prior to that, we describe this energy harvesting model.

Energy harvesting model
We analyze a system formed by one server that stores the updates of the status of a system that is monitored. Updates arrive to the system according to a Poisson process with rate λ. We model the server that handles the status updates as a M/M/1/1 queue, that is, it is a server with exponential service times and without buffer. We allow preemption in updates in service, that is, when an update arrives and there is server is busy, the new packet replaces the update that was getting served.
We consider that the updates require energy to be delivered to the monitor. Energy is represented by packets of discrete units called energy packets that model a certain number of Joules. We consider that energy packets are stored in a battery (or energy queue). We assume that energy packets arrive according to a Poisson process with rate rate a. We consider that the battery can store, at most, one energy packet. We also consider that there are energy leakages, that is, an energy packet in the energy queue can be lost with exponential times. We denote by β the leakage rate of one energy packet in the energy queue.
We now present the dynamics of the system. When a status update is served, it is sent to the energy queue and two things can happen: (i) the energy queue is empty, in which can the status update is lost and (ii) there is a packet in the battery, in which case the update is delivered to the monitor and the energy packet disappears.
The model we study in this article is represented in Fig. 2.

EXACT COMPUTATION OF THE AVERAGE AGE OF INFORMATION
We use the SHS technique to compute the average age of information of the model described above. The continuous state is , where x 0 is the current age and x 1 is the age if the data packet that is getting service is successfully sent to the monitor. The discrete state is a continuous time Markov Chain of four states, where the state ij represents that there are i energy packets and j data packets in the system, with i = 0,1 and j = 0,1. See Fig. 3. We use the same notation than in Yates & Kaul (2019) and Yates (2018) and we label each of the transitions of the Markov chain with a number from 0 to 11 in Fig. 3. Let l ¼ 0; . . . ; 11. We now explain each of the transitions of the Markov chain of Fig. 3 as well as how the state x evolves when each of the possible transitions occurs. l = 0 A data packet arrives to the system when the data queue. For this case, this data packet starts getting service and the value of x 1 changes to zero since a new packet arrived, that is, When this transition occurs, the state 00 of the Markov chain of Fig. 3 changes to 01. l = 1 A data packet ends the service and is sent to the energy queue when it is empty. When this occurs, the transfer is unsuccessful and, since the monitor does not receive the data packet, the value of x 0 does not change. When this transition occurs, the state 01 of the Markov chain of Fig. 3 changes to 00. l = 2 A data packet arrives to the system when there is another data packet getting service. Since we allow preemption in service, the freshest data packet starts getting service and the data packet that was previously in service is lost. Therefore, the value of x 1 changes to zero and the value of x 0 does not change. When this transition occurs, the state 01 of the Markov chain of Fig. 3 does not change. l = 3 An energy packet arrives when the system is empty. For this case, the value of x 0 and x 1 are not modified. When this transition occurs, the state 00 of the Markov chain of Fig. 3 changes to 10. l = 4 A leakage of an energy packet occurs and the system gets empty. Besides, the value of x 0 and of x 1 do not change. When this transition occurs, the state 10 of the Markov chain of Fig. 3 changes to 00. l = 5 A data packet finishes the service and is sent to the energy queue, which has an energy packet. Since the transfer is successful, the age at the monitor is updated to the age of the sent data packet, that is, x 0 0 ¼ x 1 . When this transition occurs, the state 11 of the Markov chain of Fig. 3 changes to 00. l = 6 A leakage of an energy packet occurs when the system is full. For this case, the value of x 0 and x 1 are not modified. When this transition occurs, the state 11 of the Markov chain of Fig. 3 changes to 01. l = 7 A data packet arrives to the system when the data queue is empty and the energy queue full. Given that a fresh data packet arrived to the system, the value of x 1 changes as follows: x 0 1 ¼ 0. The monitor does not receive packets and, as a result, the value of x 0 is not modified. When this transition occurs, the state 01 of the Markov chain of Fig. 3 changes to 11. l = 8 A data packet arrives when there is another data packet in service. The new packet starts getting service and, therefore, the value of x 1 changes to zero, that is, x 0 1 ¼ 0. However, the value of x 0 is not modified since the monitor does not receive packets. When this transition occurs, the state 10 of the Markov chain of Fig. 3 does not change. l = 9 An energy packet arrives to the system when the energy queue is empty and the data queue is full. When this occurs, the last arrived energy packet is lost and the value of x 0 and of x 1 do not change. When this transition occurs, the state 10 of the Markov chain of Fig. 3 changes to 11. l = 10 An energy packet arrives to the system when the energy queue and the data queue are full. Thus, the energy packet that arrived last is lost and the value of x 0 and of x 1 are not changed. When this transition occurs, the state 11 of the Markov chain of Fig. 3 does not change. l = 11 An energy packet arrives to the system when the energy queue and the data queue are full. For this case, the value of x 0 remains unchanged since the packets are not sent to the monitor, whereas the value of x 1 is set to zero, i.e, x 0 1 ¼ 0. When this transition occurs, the state 11 of the Markov chain of Fig. 3 does not change.
The SHS transitions of this model are represented in Table 1. In this table, we represent in each row the transitions we have explained above. In the second column of the table, we present the origin state and the destination state of the Markov Chain when a transition occurs and in the third column the rate of each transition. In the next column, we show the evolution of the values x 0 and x 1 for each transition and in the last column, the values v ql A l that are used in Eq. (1). In this table, we can observe how the vector x varies for all the transitions described above.
Let Q s be the set of states of the Markov chain of Fig. 3. We denote by p q the stationary distribution of state q 2 Q s . We now study the stationary distribution of the Markov chain of Fig. 3. We write the balance equations below: p 00 ða þ Þ ¼ p 10 b þ p 01 m þ p 11 m p 01 ðm þ aÞ ¼ bp 11 þ p 00 p 10 ð þ bÞ ¼ ap 00 p 11 ðm þ bÞ ¼ p 10 þ p 01 a Using the above expressions and also that P q2Q s p q ¼ 1, it results that the stationary distribution of the Markov Chain is We now define the vectors b q and v q for each state q 2 Q s . First, for the states q ∈ {00,10}, we have that b q = [1 0] since the age of the monitor increases at unit rate and, since  Fig. 3. (1) (0) 0] there is not a packet in service, its age do not need to be taken into account. On the other hand, for the states q ∈ {01,11}, we have that b q = [1 1], since for this case the age of the monitor and of the packet in service increase at unit rate. Besides, we write for all q 2 Q s , v q = [v q (0) v q (1)]. We note that we obtained all we need to apply Theorem 1. Thus, the system of equations given in Eq. (1) is for this case v 00 ð þ aÞ ¼ ½p 00 0 þ m½v 01 ð0Þ 0 þ l½v 11 ð1Þ 0 þ b½v 10 ð0Þ 0 (3a) v 01 ð þ m þ aÞ ¼ ½p 01 p 01 þ ½v 00 ð0Þ 0 þ ½v 01 ð0Þ 0 þ b½v 11 ð0Þ v 11 ð1Þ (3b) v 10 ð þ a þ bÞ ¼ ½p 10 0 þ a½v 00 ð0Þ 0 þ a½v 10 ð0Þ 0 (3c) v 11 ð þ m þ a þ bÞ ¼ ½p 11 p 11 þ a½v 01 ð0Þ v 01 ð1Þ þ a½v 11 ð0Þ v 11 ð1Þ þ ½v 10 ð0Þ 0 þ ½v 11 ð0Þ 0 (3d) Taking into account that Eqs. (3a) and (3c) have one irrelevant variable (i.e., the second element of the vector of both sides of the expression is zero), we conclude that the above expression can be rewritten a system of 6 equations. From the above formula, the computation of the average Age of Information requires the values of v 00 (0), v 10 (0), v 01 (0) and v 11 (0). In the following result, we show that v 00 (0), v 10 (0), v 01 (0) and v 11 (0) is the solution of a system with four equations.
We now focus the solution of Eq. (2). Since v 10 (λ + β) = p 10 + a v 00 , we can restrict to study the following system of three equations: The system of equations we need to solve is the following: Calculating the inverse of M, we obtain the solution of this system and we presented it here.
Lemma 3 The solution of Eq. (7) is given by  (6) and, for all q 2 Q s , p q is given in Eq.
(2). From Theorem 1, we know that the average Age of Information of this model is given by v 00 (0) + v 01 (0) + v 10 (0) + v 11 (0). In the following result, we present its value: Proposition 4 The average Age of Information of a single server with energy harvesting is where v 00 (0),v 01 (0) and v 11 (0) are given in Lemma 3. Proof. Using that v 10 ð0Þð þ bÞ ¼ p 10 þ av 00 ð0Þ and the results of Lemma 3, we derive the desired result. □

The case α/∞
In this section, we consider that the arrival rate of energy packets tends to infinity and the rest of the parameters are finite. We first note that, when a/∞, p 00 and p 01 tend to 0, whereas p 10 and p 11 tends, respectively, to m þm and þm . On the other hand, from the first three equations of Eq. (1), it follows that v 00 (0), v 01 (0) and v 01 (1) tend to zero when a/∞. Therefore, to compute the Age of Information in this regime we have to analyze the following system of equations: v 11 ð1Þð þ m þ bÞ ¼ p 11 þ av 01 ð1Þ We now study α v 00 (0) when a/∞. Using L'Hopital's rule, we get that lim a!1 av 00 ð0Þ ¼ mv 11 ð1Þ þ bv 10 ð0Þ Likewise, we show that a v 00 (1) tends to β v 01 (0) and a v 01 (1) tends to β v 11 (1) when a/∞. As a result, the above system of equations can be written as follows: From this expression, we derive the following interesting conclusions. First, we observe that this system of equation does not depend on β. This means that the Age of Information of the EPN model with a single station, when α/∞, does not depend on the leakage rate of energy packets. Another conclusion is related to the comparison of the above expression with the model studied in Section IVB of Yates & Kaul (2019). We observe that, if we consider λ 2 = 0 in their model, that is, that there is a single source, both models coincide. More precisely, if we consider λ 2 = 0 in (48) of Yates & Kaul (2019), we obtain the same system of equation as the one above. Therefore, the average Age of Information of a single station when a/∞ is the same as that of a single server with preemption in service without energy hasvesting and its value can be derived from Theorem 2 of Yates & Kaul (2019).
Proposition 5 The average Age of Information of a single server with energy harvesting when α tends to infinity is Proof. See the proof of Theorem 2 of Yates & Kaul (2019).

APPROXIMATION OF THE AVERAGE AGE OF INFORMATION
In Proposition 4, we characterize the average Age of Information of a single server with energy harvesting. Due to the difficulty of the derived expression, we aim to study approximations of the average Age of Information in this section. We have shown in Proposition 5 that, when a/∞ and the rest of the parameters are finite, the average Age of Information of a single server with energy harvesting tends to 1 m þ 1 (AOI-APPROX) Therefore, this expression can be used as an approximation of the average Age of Information provided in Proposition 4 when a is large. We first study the accuracy of this approximation in Fig. 4.
We consider λ = μ = 1 and we plot in Fig. 4 the evolution of the average Age of Information using the result of Proposition 4 when a changes from 0.01 to 10 3 and different values of β. We observe that, in all the cases, when a is large, the average Age of Information is very close to 2, which is the value obtained for the approximation (AOI-APPROX), that is, for 1 m þ 1 . Interestingly, for β = 1, the approximation is very accurate when a is larger than 10. However, for β = 5 and β = 10, the approximation is accurate when a is larger than 100. Therefore, from this experiment we conclude that the range of values of a such that the accuracy is good decreases with β.
Another interesting conclusion of the experiments represented in Fig. 4 is that the average Age of Information is very large when a is small. For instance, when β = 1 and a = 10 −2 , the average Age of Information is 2· 10 3 . The raison for this is that, when the arrival rate of energy packet is very small, the energy queue is almost always empty. Thus, when a data packet is sent to the energy queue, it is almost always lost and, therefore, since the monitor does not receive timely status updates, the average Age of Information is large.
We now analyze the influence of the leakage rate on the average Age of Information. In Fig. 5, we consider λ = μ = 1 and different values of a. We first see in this plot that, when the leakage rate is large, the average Age of Information is high. For instance, when a = 1 and β = 100, the average Age of Information equals 2,000. Another interesting property we derive from this illustration is related to the monotonicity of the average Age of Information with β. In fact, we show that the average Age of Information increases linearly with β. Therefore, this illustration shows the existence of an approximation of the average Age of Information that depends linearly on the leakage As it can be seen it is a refined version of the approximation of (AOI-APPROX) since it has an additional term 2b a . We will see that this additional term leads to a high improvement of the accuracy when β is large.
In Fig. 6, we consider λ = μ = 1 and a = 20. As we before, the approximation (AOI-APPROX) provides approximates the average Age of Information. We now aim to compare the accuracy of the approximation given in (REFINED-AOI-APPROX) with the accuracy of the approximation of (AOI-APPROX) when β varies from 0.001 to 1. As it can be observed, the accuracy of both approximations is very high for small values of the leakage rate since the percentage relative error in both cases is almost 5·10 −2 %. However, the percentage relative error of the approximation REFINED-AOI-APPROX does not substantially change with β, whereas for the approximation (AOI-APPROX) it increases substantially; indeed, when β is equal to one, the percentage relative error of the approximation (AOI-APPROX) is 4%. Therefore, from this plot we conclude that, when a is high and β small, both approximation are accurate, but when β and a are high, the approximation (REFINED-AOI-APPROX) is much more accurate than the approximation (AOI-APPROX). We also consider other values of the parameters and we compare the percentage relative error of (AOI-APPROX) and (REFINED-AOI-APPROX) when β varies. For instance, in Fig. 7, we consider λ = 1, μ = 0.25 and a = 20 and in Fig. 8, we consider λ = 0.5, μ = 1 and a = 20. We observe that, in both cases, the percentage relative error of (AOI-APPROX) is larger that that of (REFINED-AOI-APPROX).

CONCLUSIONS
We analyze the average Age of Information in a system with two queues, one queue that stores the updates and another queue that handles the energy. We consider that an update is sent to the energy queue when it ends the service and, if there is an available energy packet, the status update is transferred to the monitor (and the energy packet leaves the system), whereas if the energy queue is empty, the update is lost. We consider that energy packets and updates arrive to the system according to independent Poisson processes. We characterize the average Age of Information of this system using the SHS technique and we show that its value coincides with the sum of the variables of a system of 4 equations. Given the difficulty of the derived expression, we also provide different approximations of the average Age of Information of this system. We believe that the obtained results are useful in the design of systems with energy requirements since the derived expression (and the approximations) allows us to formulate optimization problems related to the energy consumption of systems where the freshness of information is the performance metric of interest.
For future work, we are interested in studying the EPNs models from the perspective of the the Age of Information metric. In fact, as said in the Related Work Section, the EPN The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.