{'fraction_non_alphanumeric': 0.04175075200852911, 'fraction_numerical': 0.010985035982180254, 'mean_word_length': 4.397348951911221, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimizing Information Freshness in Computing enabled IoT Networks

Internet of Things (IoT) has emerged as one of the key features of the next generation wireless networks, where timely delivery of status update packets is essential for many real-time IoT applications. To provide users with context-aware services and lighten the transmission burden, the raw data usually needs to be preprocessed before being transmitted to the destination. However, the effect of computing on the overall information freshness is not well understood. In this work, we first develop an analytical framework to investigate the information freshness, in terms of peak age of information (PAoI), of a computing enabled IoT system with multiple sensors. Specifically, we model the procedure of computing and transmission as a tandem queue, and derive the analytical expressions of the average PAoI for different sensors. Based on the theoretical results, we formulate a min-max optimization problem to minimize the maximum average PAoI of different sensors. We further design a derivative-free algorithm to find the optimal updating frequency, with which the complexity for checking the convexity of the formulated problem or obtaining the derivatives of the object function can be largely reduced. The accuracy of our analysis and effectiveness of the proposed algorithm are verified with extensive simulation results.


I. INTRODUCTION
Being one of the key technologies of the next generation (5G) wireless networks, Internet of Things (IoT) has attracted significant attentions from both academia and industry alike in recent years. In particular, IoT aims at enabling the ubiquitous connectivity among billions of things, ranging from tiny, resource-constrained sensors to more powerful smartphones and networked vehicles [2]- [4]. With the help of IoT, devices can sense and even interact with the physical surrounding environment, thereby providing us with many valuable and remarkable context-aware real time applications at an efficient cost, such as automatic control of electric appliance [5], intelligent transportation network [6], and event monitoring and predication for health safety [7]. For these applications, the staleness of obtained information at destinations inevitably deteriorates the accuracy and reliability of derived decisions, and even compromises in safety and security. In order to quantify the information freshness, age of information (AoI) [8] and peak age of information (PAoI) [9] have been recently introduced. Particularly, AoI measures the time elapsed since the latest received update packet was generated, while PAoI provides information about the maximum value of AoI for each update and captures the extent to which the update information is stale. Unlike many conventional metrics, e.g., delay or throughput [10]- [12], AoI and PAoI are affected not only by the transmission delay but also by the update generation rate, and hence they are more essential and comprehensive for information freshness evaluation [13].
In conventional IoT networks, due to the limited communication resource, a significant delay may occur during the packet transmission phase, which largely deteriorates the information freshness at the receiver side. As discussed in a line of existing work [14]- [16], to lighten the transmission burden and provide the end users with better context-aware services in IoT networks, it is preferable to first process the collected raw data with the edge/fog computing technique [17]- [19], and then transmit the resultant packet, which has a large reduction in size, to the actuator or monitor. However, the effect of such a data preprocessing procedure on the information freshness has not been fully understood.
In this paper, we consider a computing enabled IoT network, which consists of multiple sensors, a data aggregator, and a destination. The aggregator first preprocesses the status updates generated from sensors with different priorities and then forwards the processed data to the destination via a wireless channel according to the first-come-first-serve (FCFS) discipline. By modeling the system as a tandem queue, we analytically derive the expressions of the average PAoI for updates from different sensors, accounting for the joint effect of data preprocessing and transmission. Furthermore, we develop a Generating set search based Average PAoI minimization (GAP) algorithm to optimally control the generation rate of updates from different sensors to achieve the best information freshness. The accuracy of our analysis and the effectiveness of our proposed GAP algorithm are verified with extensive simulations. The main contributions of this work can be summarized as follows. • We establish a mathematical framework to model the joint effect from data preprocessing and transmission on the information freshness of an IoT network. Our framework is general and captures many key features in IoT networks, including the prioritized data processing, queueing, and wireless channel fading. We respectively derive a closed-form expression and an information theoretic approximation of the expectation of waiting time for the data processing queue and transmission queue. Based on these, we obtain the analytical expressions of the average PAoI for packets from different sensors. The accuracy of our analysis is verified via simulations, which shows a good match between the simulation and theoretical results. • We develop a derivative-free GAP algorithm to search for the solution of the formulated min-max programming, which minimizes the maximum average PAoI for updates from different sensors. Particularly, with GAP, the problem can be solved by getting around of the difficulty of checking the convexity of the formulated problem or resorting to the derivatives of the object function. Due to this features, our proposed algorithm is still available when other penalty functions (instead of the maximum of average PAoI) are incorporated. Besides, the global convergence of GAP is also presented. The convergence rate of GAP is acceptable and does not exponentially increase with number of sensors. Hence, it still works when the number of sensors becomes large. Moreover, compared with the baseline strategies, the achieved maximum average PAoI can be effectively reduced by implementing our proposed GAP algorithm. The outline of this paper is as follows. In Section II, a brief survey of related work is presented. The description of system model and mathematical definitions of AoI and PAoI are given in Section III. In Section IV, we analyze the average PAoI for updates from different sensors and verify the accuracy of our analysis via simulations. In Section V, based on the obtained analytical results, we formulate a minmax programming to minimize the achieved maximum average PAoI of sensors, develop the GAP algorithm to solve it, and conduct simulations to validate the effectiveness of this algorithm. Finally, conclusions are drawn in Section VI.

II. RELATED WORK
Ever since the concept of AoI was introduced, a variety of researches have been carried out to understand and/or optimize the information freshness of the delivered update packets in single sensor systems [8], [9], [20]- [27]. Authors in [8] considered the system where a sensor generated and transmitted update packets to its destination with the FCFS principle and derived the expression of average AoI by resorting to a queueing theoretic approach. Then, AoI of the last-come-firstserved (LCFS) queueing based system was further studied in [20], and it demonstrated that the AoI was improved compared with the FCFS based system. In [9] and its journal version [21], the effects of packet preemption on both AoI and PAoI were respectively analyzed by considering three distinct preemption policies. Authors in [22] further considered a symbol erasure transmission channel and studied the effect of packet preemption on the average AoI when adopting two hybrid ARQ protocols. For IoT networks with arbitrary distributions of the update inter-arrival time and service time, the relation among the distributions of the AoI, PAoI and system delay was derived in [23], while the effect of packet preemption on the AoI was investigated in [24]. Focusing on the one hop transmission from a data source to a destination, authors in [25] introduced a general penalty function to characterize the effect of AoI, and developed efficient algorithms to find the optimal update policy for minimizing the average penalty among all causal update policies. In [26] and [27] the effects of sampling strategies on the tradeoff between the achieved AoI and estimation accuracy for remote estimation problems was addressed, where the environment related state was assumed to be generated from a discrete Markov process and Wiener process, respectively.
Apart from the point-to-point scenario [8], [9], [20]- [27], a line of recent studies turned their attention to addressing the information freshness related issues in IoT networks with multiple sensors [28]- [34]. In particular, authors in [28] considered that one transmitter sent status update packets generated from multiple sensors to the destination, and analyzed the average AoI for updates allowing the latest arrival to overwrite the previous queued ones. Focusing on the PAoI metric, work [29] analyzed the system performance by considering a general service time distribution, and tried to optimize the update arrival rates to minimize its defined PAoI-related system cost. In [30] the AoI was thoroughly studied for systems with three different serving policies, i.e., FCFS, LCFS with preemption in service, and LCFS with preemption only in waiting. Furthermore, in [31] preemption of pacckets were allowed for FCFS based transmission when the transmitter was busy, and expressions of both the average AoI and PAoI were derived. Although the priority issue was not specifically addressed, the authors in [31] deduced that updates from one sensor can be prioritized from the age point of view by increasing their generation rate. Authors in [32] considered the interactions among transmission links and proposed link scheduling algorithms to minimize the maximum PAoI of update packets from different sensors. For multi-sensor multi-destination networks, the AoI oriented optimal scheduling policy was studied in [33] and [34], which considered the scenario with one transmitter and multiple transmitters, respectively.
As mentioned above, valuable performance analysis on information freshness and efficient control strategies for min-imizing the system AoI or PAoI in various IoT networks with multiple sensors have been presented in the literature [28]- [34]. However, they commonly treated the data aggregator purely as a transmitter and thus do not apply to the case, where update packets would be preprocessed (e.g., data compression and aggregation) to reduce the redundancy or even extract the "intrinsic content" from the collected raw data, before any transmission procedure begins. Actually, the joint operation of data preprocessing and transmission has been regarded as a promising solution for providing better context-aware services to users and meanwhile, overcoming the resource limitations on transmission capacity inherent in traditional IoT networks [14]- [16]. As such, it calls for additional efforts to study and optimize the information freshness when the data preprocessing and transmission are successively conducted. The most related work to this topic comes from [35], which studied the wireless camera networks consisting of multiple sensors and fog nodes, and proposed a modular optimization algorithm to minimize the achieved maximum PAoI by optimally assigning processing nodes and scheduling transmission links. However, the joint effect of the processing procedure (e.g., processing policy and time) and update arrival rates on information freshness has not been investigated in [35] nor, to the best of our knowledge, in other existing researches.
We note that there are some available work recently focusing on studying and/or optimizing AoI and/or PAoI for status updates in multi-hop IoT networks, e.g., [36]- [40], which are also relevant to our work. Particularly, authors in [36] considered a multi-hop networks with an external source, and proved that, among all causal policies, the preemptive Last Generated First Served (LGFS) policy and non-preemptive LGFS policy minimized the age processes at all nodes for the exponentially distributed and generally distributed packet transmission times, respectively. Authors in [37] focused on a line network with one sensor, one destination, and multiple relay nodes, and studied the effect of preemption on the average AoI at each node. The energy and data causality constraints in a two-hop network were considered in [38], and the optimal scheduling policy was proposed to minimize the total AoI of a session. Considering multi-hop networks and utilizing graph theory, the optimal scheduling policies for the networks with and without pre-defined source/destination pairs were investigated in [39] and [40], respectively. However, the aggregator considered in our work plays different roles to those relay nodes studied in [36]- [40]. Particularly, the aggregator not only forwards the packets, but also regenerates the packets with different sizes, which would alter the service time of the second queue. This makes the interaction between the aggregator and transmitter more complicated than that between relay nodes purely for data retransmission. In this light, our concerned problem, formulated mathematical model, derived analysis results and proposed optimizing algorithm are all different from those presented in existing researches [36]- [40].

A. Network Model
We consider an IoT system which consists of J sensors, denoted by S = {S 1 , S 2 , · · · , S J }, a data aggregator that is able to perform data processing as well as transmission, and a destination node, as depicted in Fig. 1. Each sensor keeps collecting information from the ambient environment and periodically updates the status to the aggregator, whereas the update packets from sensor S j arrive at the aggregator according to an independent Poisson process with parameter λ j , ∀j ∈ J = {1, 2, · · · , J}. Upon receiving the status updates, the aggregator preprocesses the data packets with different priorities and then forwards them to the destination node. Without loss of generality, we assume the data from S i has a higher priority than that from S j if i < j. In this regard, a generic update packet can only be processed if, in front of it, there is no packet with a higher or equal priority being or waiting to be processed.
For an incoming update packet with the j-th priority, we denote C j andC j (C j < C j ) as the size before and after data processing, respectively, and τ j Cj −Cj r the corresponding processing time. Here, r is the CPU's computational speed of the aggregator with the units CPU cycles per second, while τ j is a scaling parameter depends on the specific operation made on the packet and with the units CPU cycles per bit. For instance, data mining may be more complicated than data compression and would be endowed with a larger τ . We note that the similar computation model has been widely used for data processors as shown in [41] and references therein. As such, the preprocessing subsystem is formulated as a priority M/G/1 queue where the size of buffer is infinite. 1 After being preprocessed, each update packet will be pushed into an infinite-size queue at the transmitter according to the FCFS discipline. We term this buffer the transmission queue. The transmitter sends each packet with a constant power p A through a channel with bandwidth of B Hz. The channel is subjected to a small scale Rayleigh fading with unit mean and a large scale path loss that follows power law, with path loss Fig. 2. Example of the AoI evolution process for sensor S j at the destination node. The time instant of packet arrival at the aggregator and the destination node are marked as and •, respectively. exponent α > 2. Both the processing queue and transmission queue are considered to be non-preemptive.

B. Age of Information
We denote t j,n the time instant when the n-th packet from S j arriving at the aggregator, 2 and denote witht j,n the time instant that this packet arrived at the destination node. The AoI of sensor S j is defined as ∆ j (t) = t − u j (t), where u j (t) is the generation time of the most recently received packet from S j until time instant t [28]- [31]. An example of the AoI evolution process ∆ j (t) for the j-th sensor is illustrated in Fig. 2. It can be seen that after one packet arrived at the destination node, the AoI increases linearly in time until a new data packet is received. In other words, the n-th peak value of ∆ j (t) is achieved just before the n-th update packet arrives at the destination node, which is defined as the PAoI and denoted by A j,n as shown in Fig. 2. Formally, the PAoI evolves as follows where ∆ j (0) denotes the initial age of the last received data at the start time, X j,n represents the time interval between t j,n and t j,n−1 , and Y j,n represents the time interval betweent j,n and t j,n , i.e., X j,n = t j,n − t j,n−1 and Y j,n =t j,n − t j,n . It is worth noting that while the inter-arrival time X j,n only relates to the sensor S j , the system time Y j,n is determined by many factors, including the packet arrival processes from S j and S −j = {S 1 , S 2 , · · · , S j−1 , S j+1 , · · · , S J }, and the preprocessing and transmission processes in the aggregator. As such, we can write Y j,n as the sum of the time that the packet n spent in the preprocessing stage Y P j,n and that in the transmission stage Y T j,n , i.e., Y j,n = Y P j,n + Y T j,n . The central thrust of this work is to design a scheme that ensures the received packets contain the most fresh information. Busy probability of the data processor µ j Ratio of the expected waiting time for packets from sensor S j to that from sensor S 1 in the transmission queue Λ

Vector of update arrival rates from sensors A (Λ)
Achieved maximum average PAoI associated with Λ I (Λ, ε) Set of indexes of ε-binding constraints associated with Λ N (Λ, ε) Cone generated by the set of vectors in I (Λ, ε) T (Λ, ε) ε-tangent cone for the polar of the cone N (Λ, ε) S T (Λ,ε) Set of candidate searching directions in T (Λ, ε) Φs l Adopted searching step-size along the direction s l To achieve this goal, we first derive an analysis and then conduct optimization on the achieved average PAoI for updates. In the following, we provide detailed analyses for the joint effects of the preprocessing and transmission procedures on the achieved average PAoI for updates from different sensors in Section IV. Based on the analytical results, to minimize the achieved maximum average PAoI by controlling the update generation rates of individual sensors, we formulate a minmax programming and devise a derivative-free algorithm to solve it in Section V. Some important notations used in this paper are summarized in Table I.

IV. AVERAGE PEAK AGE OF INFORMATION
In this section, we analyze the average PAoI for different sensors, which facilitates the subsequential optimizations. To start with, the following lemma presents a general form of the average PAoI for each sensor.
Lemma 1: Assuming that the whole queueing system is ergodic, we can express the average PAoI attained for sensor S j as where E[W P j ] and E[W T j ] respectively represent the expected time spent in the preprocessing queue and the transmission queue for an arbitrary update packet generated from the sensor S j , and E[Z T j ] denotes the expected transmission time. Proof: By ergodicity, the average PAoI for sensor S j can be calculated as where (a) follows from the fact that the effect of the sum ∆ j (0) +t j,1 vanishes as t goes to infinity. N j (t) denotes the number of update packets until time instant t, and X j , Y P j and Y T j are random variables respectively denoting the interarrival time, system time spent in the preprocessing queue and that in the transmission queue of an arbitrary update packet.
Recalling that the packet arrival from sensor S j follows exponential distribution with parameter λ j , we thus have E X j = 1/λ j . Moreover, for each packet, the system time spent in the aggregator consists of the queueing time and serving time. Hence, Eq. (3) can be written as where E[Z P j ] is the average time spent for data preprocessing and is given as denote the expected waiting time in the preprocessing queue, the expected transmission time, and the expected waiting time in the preprocessing queue, respectively.
In the following, we detail the analysis to each individual elements in (2) A. Calculation of E W P j Due to prioritized processing, a newly arrived packet with priority j has to wait till the completion of data processing for the following packets: 1) The packet that is currently occupying the processor.
2) The packets with priorities from 1 to j in the processing queue when the packet arrives.
3) The packets with priorities from 1 to j − 1 that arrive while the typical packet is waiting for its service. We denote by P AP ,B the probability that the processor is busy. Using the Little's law [42], we have the following equation Based on the above analysis and definitions, we are now ready to derive E[W P j ]. Theorem 1: For packets from sensor S j , the expected waiting time in the processing queue is given by where ρ j = λ j E[Z P j ] denotes the load contributed by the data packets from sensor S j , and χ {·} is the indicator function, i.e., Proof: The proof is given in Appendix A.
During the transmission stage, the time spent for transmitting the processed data packet is directly related to both its size and the transmission rate. In particular, the instantaneous transmission rate is given by where B is the bandwidth of the channel, h is the channel power gain, d is the distance between the aggregator and destination node, and σ 2 is the noise power. Considering a Rayleigh fading, we note that the transmission rate R D is a random variable. Then, we derive the expected service time in the transmission subsystem for the data packet from each sensor in the following theorem. Theorem 2: The expected transmission time for successfully delivering a data packet originally generated by sensor S j is given as where ξ j =C j ln 2/B. Proof: The proof is given in Appendix B.
For the transmission subsystem, we can model it as a G/G/1 FCFS queueing system by considering that the inter-arrival time and service time follow different general distributions. The exact analytical results are usually unavailable for the G/G/1 queue, especially for the case where the distribution about the arrival or departure is unknown [43]. For our concerned problem, the output of the processing queue is the input of the transmission queue. Although the average waiting time of update packets spent in the processing queue can be obtained according to Theorem 1, the high-order statistics for the inter-departure times of the processing queue are troublesome to derive due to the complexity. In this light, for the data transmission queue, it is inconvenient to get the distribution of the inter-arrival time of packets and further derive the expectation of the waiting time with classical approaches presented in [43].
In this subsection, we resort to implementing the principle of maximum entropy (PME) and getting an information where µ 1 = 1 and µ j is given in (10), ∀j ∈ {2, 3, · · · , J}, which represents the ratio of the expectation of waiting time for packets from sensor S j to that for packets from sensor 1 in the transmission queue, i.e., µ j = , ∀i ∈ {1, 2, · · · , j − 1}, and H P j,j = λ j E W P j . Proof: The proof is given in Appendix C. Remark 1: We note Eq. (10) implicitly means that for a typical packet, its expected waiting time in the transmission queue is approximately proportional to the difference between two parts: 1. The overall transmission time of packets processed by the processor when it waited for its service in the processing queue; 2. Its experienced system time (i.e., the sum of waiting time and service time) in the data processing system. More details can be found in Appendix C.
Based on the analyses made in the above three subsections, we can obtain the expression of the average PAoI for packets from each sensor S j by combining Eq. (4), (6), (8), and (9).

D. Validation
We now verify the accuracy of our analysis via simulations. Specifically, we set the arrival rate of update packets from sensor S j as λ j = (J − j)λ b , where λ b can be regarded as the basic arrival rate with the units packets/second. This setting means that the packets with a higher processing priority would also have a larger arrival rate. Other parameters are set according to Table II. In this subsection, all the simulation results are obtained by averaging over 10 6 realizations, i.e., by averaging the PAoI for 10 6 update packets. We note that by introducing the basic arrival rate λ b , the comparison of simulation and theoretical results for different sensors can be clearly presented in one figure, as shown in Fig. 3. Fig. 3(a) compares the simulation and theoretical results on the average PAoI for different sensors, where the equivalent processing rate, r τj , ∀j ∈ {1, 2, 3}, is 5 Mbits/s, and the data processing time dominates transmission time, i.e., E Z P = 1.200 s and E Z T = 0.384 s. The results show a close match for all sensor, which validate the our mathematical analysis. It can be observed from Fig. 3(a) that even the traffic load is high, e.g., λ b = 0.13, the average PAoI for packets from sensor S 1 is still kept low, i.e., about 6.4 s, while those for sensor S 2 and S 3 are about 20.1 s and 94.8 s, respectively. This is due to the fact that the priority based processing subsystem will try its best to first provide required service to update packets with the highest priority even in the case where the resource is not enough to provide good service to all sensors. In other words, the average PAoI for the packets with the lowest priority will first suffer significant performance degradation as the traffic load becomes heavy, while the packets with the highest priority would be delivered timely. Hence, to make the whole system working in a stable state we need to properly control the packet arrival rates for all sensors, which will be presented and studied in detail in Section 4.
To see what happens when the data processing time is comparable to or even dominated by the data transmission time, we respectively set the equivalent processing rate, r τj , ∀j ∈ {1, 2, 3} to 15 Mbits/s (i.e., E Z P = 0.400 and E Z T = 0.384) and 25 Mbits/s (i.e., E Z P = 0.240 and E Z T = 0.384) in Fig. 3(b) and Fig. 3(c). In these two figures, the simulation results match well with the theoretical results in the low traffic load region, while, in the heavy load region, the theoretic results is slightly higher than the simulation results. This is mainly due to the fact when the transmission subsystem gradually acts as the bottleneck, the waiting time in the transmission queue brings more obvious effects to the average PAoI. However, according to the proof of Theorem 3, for the transmission queue, only the first moment of the number of waiting packets is incorporated when adopting the principle of maximum entropy, which makes the obtained average waiting time undervalued, i.e., higher than that in practice. This could be more obviously observed in Fig. 3(c) where the data transmission time dominates the data processing time. Particularly, as the load increase, the waiting time gradually beats the inter-arrival time and plays a pivotal role in determining the information freshness, and the difference between the simulation results and theoretical results becomes larger. Nevertheless, the variation trend of the average PAoI could be well captured by our theoretic analysis. Besides, by combining Fig. 3(a)-(c), it can be seen that, given the arrival rate λ b , the advantage brought by data preprocessing is more significant when the processing rate is higher. This is because, for the same λ b , the system time could be decreased if the aggregator is equipped with a faster data processor, since the time spent in the data processing queue is reduced.
In conclusion, it's feasible to obtain the average PAoI and further derive the optimal data arrival rates for distinct sensors with our theoretical analysis presented in this section, when the processing time is dominating or comparable with the transmission time. On the other hand, for the case that the processing time is extremely short and there is no queueing for the processing subsystem, our formulated tandem queue ( Fig. 1) degrades into a M/G/1 queue where the packet arrival from each individual sensor is delayed for a fix time for data processing. Then, it can be regarded as one special case that studied in available work [29], [30].

V. PROBLEM FORMULATION AND ALGORITHM DESIGN
The analysis derived in Section IV allows us to perform further control on the update frequency so as to optimize the information freshness. Specifically, using the analytical expressions, we can formulate the problem into the following min-max programming [29], [32] P : min where Λ = (λ 1 , λ 2 , · · · , λ J ) represents the vector of update arrival rates and A j denotes the average PAoI for updates from sensor S j . The constraints (12) and (13) guarantee the stability of the processing and transmission subsystems, respectively. Additionally, the non-negativity of each individual variable is guaranteed with constraint (14). Here, we consider the case that the above two constraints (12) and (13) are linearly independent, i.e., E Z P 1 , E Z P 2 , · · · , E Z P where ς ∈ R is a constant. Otherwise, only the tighter one needs to be addressed and the problem degenerates into that with J + 1 constraints.
While problem P looks simple as incorporating only linear constraints, solving it is actually non-trivial. Because the common processing and transmission resources are shared by different sensors, their achieved average PAoIs are closely correlated and have no closed-form expression. Hence, the convexity of this problem can not be readily established and traditional efficient algorithms resorting to the derivatives of the object function is prohibitive to be applied. In this regard, we adopt the derivative-free optimization methods [44], [45] to address our formulated problem P.
Motivated by the recent work [46], we develop a Generating set search based Average PAoI minimization (GAP) algorithm to solve problem P. In general, generating set search, introduced in [47], is one of frameworks for globally convergent directional direct-search methods, with which some feasible points (trial points) are selected and evaluated in each iteration, and the solution is finally obtained when the stop criterion is satisfied. For each optimization programming with constraints, to guarantee the global convergence 3 of the developed generating set search based algorithm, two key issues have to be well addressed in each iteration: 1. how to select a suitable set of searching directions; 2. how to choose an appropriate step-size for each individual searching direction. Next, we would provide clues about how to address these two issues for our concerned problem in Section V-A, present the details of the devised algorithm as well as its convergence analysis in Section V-B, and finally give the numerical results and discussions in Section V-C.

A. Preliminary on GAP Algorithm Design
Here, based on the problem P, we introduce some preliminary knowledge about the principle of selecting available searching directions and corresponding step-sizes, which is the fundamental basis of the further algorithm design in the following subsection. For the sake of presentation, we first rewrite problem P as the following equivalent problem: with A (Λ) = max {A j |j ∈ {1, 2, · · · , J} } and Wherein, Z denotes a J × (J + 2) parameter matrix associated to the J + 2 inequality constraints presented in Eq. (12)- (14), and (·) T denotes the transpose operation. Particularly, the matrix Z 1 and vector b can be expressed as respectively, and I is a J × J unit matrix.
Hereafter, we focus on solving P1 and introduce some basic notations and definitions as follows. Let Ω = Λ ZΛ T < b T and Υ l = Λ z l Λ T = b l denote the feasible region and set where the l-th constraint is (virtually) binding, respectively. Given a feasible point Λ ∈ Ω, the set of indexes of the ε-binding constraints is defined as [46] where D(Λ, Υ l ) represents the distance from Λ ∈ Ω to the boundary face of Ω according to the l-th constraint. Accordingly, each vector with the index belonging to I(Λ, ε) is the outward-pointing normal to one boundary face of Ω which is within distance ε from point Λ. Meanwhile, for one feasible point Λ ∈ Ω, we can define the ε-normal cone N (Λ, ε) to be the cone generated by the set of vectors {z l |l ∈ I(Λ, ε) } ∪ {0}, i.e., where {0} and ∅ represent a 1 × J zero vector and the empty set, respectively. Furthermore, we coin the term ε-tangent cone T (Λ, ε) for the polar of the cone N (Λ, ε), i.e, where each element   N (Λ, ε) and T (Λ, ε) in R 2 space, where three different cases with distinct values ε 1 , ε 2 and ε 3 (ε 1 < ε 2 < ε 3 ) are presented. We note that when ε is small enough (e.g., ε 3 ) then N (Λ, ε) = {0} and T (Λ, ε) = R 2 . than ε. 4 To ease the understanding, we present an example illustration of sets N (Λ, ε) and T (Λ, ε) in R 2 space in Fig.  4, where the whole feasible region is a rectangle with dashed edges labeled by Ω. As shown in Fig. 4, as ε varies from ε 1 to ε 3 , the size of set N (Λ, ε) gradually becomes small while that of T (Λ, ε) is larger. According to this trend, given Λ as the starting point and ε as the upper bound of the stepsize for searching, more directions endow us feasible points lie in Ω. We note that if ε is small enough (e.g., ε 3 ) then N (Λ, ε) = {0} and T (Λ, ε) = R 2 , i.e., there is no infeasible points lie within the distance less than ε 3 from the starting feasible point Λ.
As discussed above, starting from any feasible point Λ, the suitable searching directions and step-sizes could be determined based on the ε-tangent cone T (Λ, ε) and its parameter ε, respectively. The developed algorithm GAP and its convergence analysis will be presented in detail in the following subsection.

B. GAP Algorithm for Solving Problem P1
Based on the preliminary presented in the previous subsection, here we develop GAP algorithm to solve problem P1 (equivalent to the original problem P) as shown in Algorithm 1, where Λ(t) denotes the feasible solution Λ chosen in the t-th iteration. In this algorithm, the loop is repeated until the searching step-size is small enough, i.e., 0 < Φ(t) < Φ min with Φ min → 0 + (e.g., Φ min = 10 −5 ).
At the beginning of GAP, the starting point (initial guess) Λ(0) is randomly selected from the feasible region Ω. Meanwhile, the potential step-size for searching is initialized as Φ(0) > Φ min > 0. For instance, we could set it as Algorithm 1 Generating set search based Average PAoI minimization (GAP) algorithm. 1: Initialization: 2: Set t = 0 and Φ(t) with Eq. (23) as the initial value of the potential step-size for searching. Randomly generate a point Λ(t) ∈ Ω as the initial guess. 3: Go into a loop: 4: Set Λ = Λ(t) and ε = min{ε max , Φ(t)} . 5: Searching directions and step-sizes generation: 6: Derive the set of candidate searching directions S T (Λ,ε) with Eq. (25). Adopt Φ s l (with Eq. (27)) as the searching step-size for each direction s l . 7: Evaluation for trial points: 8: Set Λ(t + 1) = Λ and put Λ into the candidate set O t . 9: for Each direction ∀s l ∈ S T (Λ,ε) do 10: if A(Λ+Φ s l s l ) < A(Λ) − 10 −4 (Φ s l ) 2 then 11: PutΛ s l = Λ + Φ s l s l into the candidate set O t . 12: end if 13: end for 14: Set Λ(t + 1) = arǧ 15: Potential searching step-size update: 16: if Λ = Λ (t + 1) then 17: Set Φ(t + 1) = Φ(t). 18  After that, the algorithm goes into a loop. At each iteration t, with the current feasible point Λ(t) as the origin, we will first determine the candidate searching directions and corresponding step-sizes. Then, we calculate the function values for generated trail points and get the best solution obtained after this iteration. In the sequel, we introduce these two parts in detail.
As presented in the previously subsection, we note that staring from a feasible point Λ and searching along any direction (vector) in the ε-tangent cone T (Λ, ε), we can always get a feasible point with the step-size less than ε. Hence, if T (Λ, ε) is {0} then only {0} is the feasible direction, i.e., no other feasible points can be find starting from Λ. In addition, if T (Λ, ε) = R J then, as for the traditional programming without constraints, the set of candidate searching directions could be a positive basis in R J , e.g., P = {e 1 , e 2 , · · · , e J , −e 1 , −e 2 , · · · , −e J }, where e j denotes a 1 × J row vector with the j-th element being 1 and other elements being 0. 5 In cases T (Λ, ε) is neither R J nor {0}, the set of candidate searching directions S T (Λ,ε) could be constructed with a set of generators of T (Λ, ε).
Proposition 1: Denote F as a matrix whose rows consist of the linearly independent generators of N (Λ, ε), and D as a matrix whose rows constitute a positive basis for the null-space of F T . Then, we have the matrix whose rows are the generators of the polar cone T (Λ, ε). Wherein, I denotes a J × J unit matrix. Proof: Readers are referred to the proof of Proposition 8.2 in [48] for the similar processes by just taking ε as the maximum allowed distance from the feasible point to constraints in each iteration. The details are omitted here due to space limitations.
To construct the matrix F, one promising and feasible option is to set its rows as the elements in {z l |l ∈ I(Λ, ε) }. Then, according to Proposition 1, S T (Λ,ε) can be set as follows where s l , ∀l = {1, 2, · · · , 2J + |I(Λ, ε)|}, denotes the l-th row of the matrix S in Eq. (24), i.e., and |·| represents the cardinality of a set. Accordingly, along each direction s l the adopted searching step-size is set as where · denotes the Euclidean norm of a vector. It should be noted that, as suggested in [46], besides the directions shown in S T (Λ,ε) the generators of N (Λ, ε) should also be chosen as searching directions by utilizing appropriate step-sizes, which may accelerate the convergence especially when the optimal solution is near the boundary of the feasible region. However, for our concerned problem, we can see that if the feasible point is close to the boundary of Ω, then the system approaches the unstable state, i.e., the average PAoI becomes extremely large. In other words, the optimal solution of problem P1 is surely an interior point and generally "far" away from the boundary of Ω. Hence, to avoid unnecessary calculations and accelerate the convergence of the algorithm, we only adopt vectors belonging to S T (Λ,ε) as the candidate searching directions.
After that, we evaluate all obtained trial points. The trial points yielding the function value less than A(Λ) − 10 −4 ε 2 are regarded as potential starting points for the next iteration. Among them, that yielding the smallest A is chosen as the best solution after the current iteration to accelerate the convergence, while the potential step-size is kept the same, i.e., line 14. If there is no such a potential point being found, Λ will be still adopted as the starting point for the next iteration, while the potential step-size is halved, i.e., line 19. When Algorithm 1 is terminated, one feasible point Λ * is finally outputted. The global convergence of our proposed GAP algorithm is guaranteed according to Theorem 4.
Theorem 4: For our proposed GAP algorithm, when given a Φ min and arbitrary initial guess Λ(0), there always exists a positive constant t 0 when t > t 0 the condition Φ(t) < Φ min can be satisfied. In other words, the global convergence of this algorithm can be guaranteed.
Proof: To prove this theorem, we refer to Theorem 5.1 given in [46], which presents the sufficient conditions for the global convergence of a generating set search based algorithm. Actually, it could be readily proved that all such requirements on the adopted searching directions, step-sizes and forcing function (i.e., conditions 1, 2, 4, 5 and 6 specified in [46]) are satisfied by our developed algorithm GAP. Hence, the global convergence of our proposed GAP algorithm can be guaranteed. Readers are referred to the proof in [46] for detail, which are omitted here due to space limitations.
It should be noted that, according to Theorem 6.5 [46], if more stringent requirements on the Lipschitz continuity for the gradient of A (Λ) can be satisfied, then our proposed algorithm can globally converge to a local optimal point. However, it is extremely hard to mathematically prove whether such a condition can be met or not, due to the complicated expressions of average PAoI for packets. Even though, the effectiveness of our proposed algorithm could be validated with numerical results in the following subsection.

C. Numerical Results and Discussions
We now conduct simulations to evaluate the performance of our proposed algorithm. In particular, we vary the number of sensors J from 1 to 10. Meanwhile, the original size of update packets from sensor S j is set as 24 − (j − 1) * 2 Mbits, ∀j ∈ J , e.g., C 6 = 24−(6−1) * 2 = 14 Mbits. The equivalent processing rate is the same, 5 Mbits/s, for all update packets, i.e., r τj = 5, ∀j ∈ J , and the parameter Φ min is set to 10 −5 . Furthermore, we set all the processed data packets to the same size, i.e.,C j =C, ∀j ∈ J , which varies in distinct simulation scenarios. The other parameters are given in Table II. Here, all the simulation results are obtained by averaging over 10 3 independent runs, and for each run the the potential step-size for searching is initialized with Eq. (23). Fig. 5 illustrates the convergence property for various number of sensors. From this figure, two observations are due: 1) for randomly selected feasible points (i.e., Λ(0)) the resulted maximum average PAoI A is extremely high, i.e, the whole system approaches the instable state, especially when more sensors are incorporated. This is mainly due to the fact that compared with the region of update arrival rates with an acceptable lower A, the "undesired" region is much larger, where the randomly selected Λ(0) is likely to lie. Thus, making the arrival rate profile Λ = (λ 1 , λ 2 , · · · , λ J ) lie in a "preferable" region to keep the obtained information fresh is very necessary. 2) the convergence rate of GAP is acceptable and does not exponentially increase with the number of sensors. Particularly, when there are 6 sensors our algorithm converges in about 90 iterations. However, when about 67 percent more sensors (i.e., 10 sensors) are incorporated, about 56 percent more iterations (i.e., 140 iterations) are needed before the convergence is achieved. Besides, we note that during the first a few (about 5) iterations no improvement can be made. This is due to the fact, compared with the size of the feasible region Ω of Problem P1, the adopted initial potential searching step-size is too large. Hence, before it is reduced to a suitable value, the searching direction makes all constraints be violated, i.e., N (Λ, ε) = R J and T (Λ, ε) = {0}. In other words, during these iterations, no other feasible trial points could be found and hence, no performance improvement can be made. However, when the size of Ω is not easy to be evaluated, adopting a larger initial searching step-size is recommended, since it can be quickly (exponentially) decreased down to some proper value (seeing line 19 in Algorithm 1).
To evaluate the performance of our proposed algorithm in terms of the achieved maximum average PAoI A (Λ), the performance of a Proportion to the Processing and Transmission rate (PPT) algorithm are considered as the baseline. Concretely, by utilizing the PPT algorithm, the data arrival rates are set as where K > 1 is a constant affecting the obtained A (Λ). Obviously, the adopted point is feasible, since In other words, we can control the upper bound of the achieved loads in both processing subsystem and transmission subsystem by adjusting the value of K, i.e., a smaller K results in a higher upper bound on loads.
The simulation results are presented in Fig. 6 (a) and (b), where the size of each processed data packet is set to 4 Mbits and 1 Mbits, respectively. We can observe that our developed GAP algorithm can significantly reduce the achieved maximum average PAoI even when the number of involved sensor is large, although the performance of PPT is occasionally close to that of GAP in some scenarios (e.g., J = 5 and K = 1.3 in Fig. 6 (a)). For instance, when there are 10 sensors, the performance improvement is up to 53.13% (reducing from 85.58 s to 40.11 s) and 49.72% (reducing from 97.54s to 49.04s) in Fig 6 (a) and (b), respectively. The main reason for this improvement lies in the fact that based on the analytical results derived in the previous section, we can essentially capture the joint effect of data preprocessing and transmission on the information freshness, and therefore control the generation rate of updates more efficiently.

VI. CONCLUSIONS
In this paper, we took a fresh look at the problem of optimizing information freshness in computing enabled IoT networks. Considering a system that allows the collected raw data to be preprocessed before transmission, we modeled it as a tandem queue and derived an analytical expression for the average PAoI. Based on the analytical results, we closely examined how computing and transmission affect the information freshness. Furthermore, we developed an algorithm to minimize the achieved maximum average PAoI for updates from different sensors. Our algorithm is derivative-free and hence applicable to a host of different penalty functions, besides of the maximum of average PAoI. Simulations showed that our algorithm is both efficient and effective, whereas it takes a few steps to converge and largely outperforms the benchmark.
Following our developed framework, several extensions are possible. For instance, when the packets belonging to different sensors are correlated, the framework can be used to develop more advanced processing and optimization schemes. Another future direction is to investigate the scenario where multiple aggregators coexist in the network. Then, an interesting problem is how to align interference and meanwhile maintain information freshness.

APPENDIX A PROOF OF THEOREM 1
Proof: We denote the average number of update packets with priority j in the processing queue by E[N P j,Q ] and the expectation of the remaining processing time of a packet in service by E[Z P R ]. The expectation E[W P 1 ] can be expressed as where P AP ,B is expressed in Eq. (5) and ρ 1 denotes the load in the processing subsystem caused by packets with priority 1. Similarly, for j > 1 we have Directly substituting Eq. (29) into Eq. (30) and setting j = 2, we have Similarly, for ∀j > 2, we have where (a) follows Eq. (30). Substituting (31) into the recursion formula in (32), we can express the expectation E W P j as where E Z P R is the expectation of the remaining processing time of a packet in service. By applying the renewal-reward theory [42], we have where and Finally, combining from Eq. (33) to (36) and introducing the indicator function χ {·} , we can draw the conclusion shown in Theorem 1.

APPENDIX B PROOF OF THEOREM 2
Proof: We note that the expected transmission time varies for data packets from different sensors. According to Eq. (7), we have the transmission time of one data packet from the aggregator to destination node given by whereC ∈ {C 1 ,C 2 , · · · ,C J } denotes the size of the concerned packet. Note that Z T C is a random variable due to the random channel gain. Moreover, Z T C monotonically decreases with respect to the channel gain h with the expression given by where f (Z T C ) is the function inversely mapping from Z T C to h. In consequence, we obtain the cumulative distribution function (CDF) and probability density function (PDF) of Z T C , respectively, as follows As such, for packets originally generated from sensor S j , the expectation of transmission time can be attained as (41) Finally, by substituting (40) into (41) we can draw the conclusion in Theorem 2.

APPENDIX C PROOF OF THEOREM 3
Proof: We adopt the principle of maximum entropy (PME) to derive an approximation of the expectation E W T j , ∀j ∈ J . The interested readers are referred to [49]- [52] for more details about PME and its applications for performance analysis in various types of queueing systems.
In the transmission queue, the expectation of the waiting time for a typical data packet in the queue can be expressed where P T j denotes the probability that there is one packet arriving at the transmission queue originally from sensor S j , and E W T j is the expectation of its waiting time. In addition, (a) holds under the condition that the previous processing subsystem is stable, i.e., the arrivals are all processed on average. Moreover, from Theorem 2 we have that for a typical packet, the average time spent in the transmission subsystem can be expressed as where (a) holds under the condition that the previous processing subsystem is stable, and the expectation E Z T j is given in (8). Then, by applying Little's law to the transmission subsystem and combining the result with (42) we have where E N T denotes the expectation of the total number of packets in the transmission subsystem, E Z T is given by (43), and µ j represents the ratio , ∀j ∈ {1, 2, · · · , J}.
As N T is an integer-value random variable, we use the PME to express its probability mass function as follows Wherein, β m is the introduced Lagrangian multiplier associated with the m-th moment of the random variable N T , while (a) and (b) hold due to the first moment approximation 6 . By applying Little's law to the transmission queue and combining the result with (45) and (46) we have the following 6 Note that the accuracy of the approximation improves when more moments of N T are incorporated, giving rise to a higher complexity.
where ρ T = J j=1 λ j E Z T j denotes the probability that the server is busy. As such, using the PME for another time, we have Next, we analyze the ratio µ j . In the transmission queue, the waiting time of one arriving data packet is related to the number and kinds of packets (i.e., the profile of packets) waiting in front of it, which are determined by the output of the previous processing queue and are extremely difficult to obtain. This is due to the fact that, as previously stated, deriving the PDF of the inter-departure time of packets in the previous priority M/G/1 queue is hindered due to the complexity. Next, we derive an approximation of ratio µ j , ∀j ∈ {2, 3, · · · , J} by recalling the analysis for E W P j in Appendix A. Particularly, for one typical packet originally generated by sensor Sj, during its waiting time in the processing queue, the profile of packets which are severed before it can be statistically expressed as H P j = (H P j,1 , H P j,2 , · · · , H P j,j−1 , H P j,j ), ∀j ∈ J where H P j,i = λ i E W P i + E W P j , ∀i ∈ {1, 2, · · · , j − 1} and H P j,j = λ j E W P j . We note that when this typical packet is waiting or being served in the processing queue, packets in front of it would be sequently sent into the transmission queue and served by the transmitter. Hence, recalling the analysis for E W P j in Appendix A, we can derive an approximation of ratio µ j , ∀j ∈ {2, 3, · · · , J} as shown in (10). It intuitively means that for a typical packet its waiting time spent in the transmission queue is approximately proportional to the difference of its experienced system time (sum of waiting time and service time) in the processing system and the total transmission time of packets described by Eq. (49).