1. Introduction
In the era of 5G, the flourishing progress of the Internet of Things (IoT) technology is instigating transformative shifts in emerging application domains. Leveraging the high-speed and low-latency attributes of 5G networks [
1], wireless sensor networks (WSNs) containing a large number of sensors have become the backbone of the IoT, demonstrating an impressive capability to transmit massive amounts of data with exceptional efficiency. Consequently, WSNs can provide unprecedented real-time sensing and decision support for status-update systems with stringent real-time demands. It has emerged as the central driving force behind applications such as smart transportation [
2], environmental monitoring [
3], and smart agriculture [
4]. However, ground sensor nodes (SNs) used for monitoring in WSNs usually suffer from small size and limited battery capacity. In some remote areas, SNs are far away from data centers. Transmitting the data sensed by SNs only through the ground-based multi-hop network is prone to the energy hole phenomenon [
5]. It cannot satisfy the high information freshness in the state update system, affecting the timeliness and accuracy of decision-making.
Therefore, in real-time sensing scenarios such as forest fire monitoring [
6] and disaster monitoring [
7], the use of mobile data collectors like unmanned aerial vehicles (UAV) is considered a promising solution [
8]. Recently, UAVs have attracted extensive attention due to their significant advantages [
9,
10]. First, UAVs can fly to inaccessible places to collect data, improving the completeness and accuracy of data collection compared to traditional collectors. Second, they have a high flight speed and bandwidth, making data collection fast and efficient. Third, they can be equipped with mobile edge computing (MEC) servers for real-time sensing, data processing, and decision-making. By processing data instantly on the fly, the latency of data transmission to the cloud is reduced, resulting in a more rapid response. Moreover, since UAVs usually have limited computing, storage, and power resources, some computationally intensive tasks may exceed their processing capabilities. Equipping MEC servers can provide additional computational and storage resources to optimize the efficiency of task execution. Finally, they can move close to the ground SNs, making it easy to establish line of sight (LoS) links and reduce the transmit power and packet loss rate [
11]. Currently, data collection in UAV-assisted MEC networks has become a popular research topic, and scholars have carried out a lot of work accordingly.
Due to the limited energy onboard the UAV, a part of the existing work focuses on minimizing energy consumption in data collection tasks [
12,
13,
14,
15,
16]. Some scholars have considered the impact of different data collection modes on UAV energy consumption, such as hover mode [
12], flight mode [
13], and hybrid mode [
14]. In comparison, the flight mode has the lowest energy consumption but requires a long task completion time, while the hover mode requires higher energy consumption but achieves the minimum task completion time. In [
15], a framework for data collection in UAV-assisted WSNs was considered and a sensor-energy-based method for initial UAV trajectory determination was proposed to maximize the minimum residual energy of the SNs after data transmission. To improve the security and energy efficiency of data collection in IoT applications, an adaptive linear prediction algorithm was designed to reduce the energy consumption of the WSN [
16]. Furthermore, in [
17], a binary search algorithm based on successive convex approximation (SCA) was designed to minimize the collection time, and the Frequency Division Multiple Access (FDMA) scheme was found to be superior to the simpler Time Division Multiple Access (TDMA) scheme by comparison. The algorithm proposed in [
18] maximized the minimum data collection rate by jointly optimizing the 3D trajectory of the UAV and the time allocation.
However, in state update systems, outdated data can lead to wrong decisions, so there is an extremely high requirement for data freshness. Generally, the age of information (AoI) is used to characterize data freshness, which portrays the time elapsed since the generation of the latest incoming update [
19]. Therefore, many scholars have considered minimizing the peak AoI or average AoI in data collection tasks. On the one hand, when the number of sensors is large, the data collection strategy plays an important role in reducing the AoI. References [
20,
21,
22,
23,
24] utilized clustering algorithms to divide the network into multiple sub-networks, and the UAV only needed to collect data at the corresponding data collection points (CPs) of each sub-network, thus reducing the AoI. Commonly used algorithms include simple adaptive algorithms [
22], k-means clustering algorithms [
23], and affinity propagation (AP) algorithms [
24]. For different system models and performance metrics, it is necessary to choose the appropriate clustering algorithm. Moreover, the authors proposed an aerial collaborative relay-based data collection scheme to obtain better AoI performance in [
25]. In [
26], the data collection method, the energy consumption, and the age evolution were comprehensively optimized to minimize the average AoI.
On the other hand, the UAV’s flight trajectory greatly affects the time required for the data collection task. The high flexibility of UAVs imposes challenges on their trajectory planning, and much attention has been paid to deriving the optimal trajectory of UAVs from source to destination under given conditions. The authors of [
27] jointly optimized the UAV’s trajectory and the service time allocation to minimize the SN’s average AoI. In [
28], an algorithm based on graph theory and the kernel K-means method and an energy-constrained trajectory planning algorithm were proposed to reduce the average AoI and the energy consumption of each UAV. The authors jointly optimized the collection time and the trajectory of the UAV to achieve a trade-off between AoI and energy consumption in [
29]. By decomposing the optimization problem, the sub-problems were solved using SCA and Lagrange duality methods, respectively. An iterative algorithm was proposed for minimizing the peak and average AoI of multi-UAV-assisted data collection in [
30], where an improved ant colony optimization (ACO) algorithm was used to optimize the UAVs’ trajectories. In [
31], the authors proposed an average AoI-minimizing trajectory design based on the Safe-Twin Delayed Deep Deterministic policy gradient. In general, UAV trajectory planning algorithms can be broadly classified into graph theory-based algorithms, optimization theory-based algorithms, and artificial intelligence (AI)-based algorithms in UAV-assisted data collection scenarios. Since the computational complexity of traditional optimization-based algorithms mostly grows exponentially with the system size, heuristic algorithms such as the ACO algorithm and genetic algorithm (GA) become better choices that can obtain a near-optimal solution in a shorter time. However, they are not suitable for real-time planning in rapidly changing environments, making online trajectory optimization considered to be implemented using machine learning algorithms [
32].
The findings of the above work show that the collection method and the trajectory of the UAV have a significant impact on the AoI performance in data collection tasks. However, in related work [
25,
27,
33], the non-line of sight (NLoS) communication link between the UAV and the ground SN was ignored, resulting in a model that may not be universal. Our work, on the other hand, builds a more rigorous mathematical model based on actual scenarios by taking into account the probability of both LoS and NLoS links occurring. Moreover, considering the case of a large number of SNs, different from directly performing trajectory planning [
34], we first adopt a suitable clustering algorithm to divide the SNs into clusters. Meanwhile, similar work [
24] failed to strike a balance between the accuracy and computational complexity of the solution, resulting in the computational complexity becoming intolerable when the problem size is large. Accordingly, our work is inspired to combine SN clustering with heuristic trajectory planning algorithms. The optimal collection strategies and offline flight trajectories for data collection scenarios in UAV-assisted MEC networks are investigated to minimize the peak AoI of the collected data, and the main contributions are as follows:
We establish a rigorous mathematical model for the considered UAV-assisted MEC network, and we formulate a minimization problem for the peak AoI of the collected data, which is solved by jointly optimizing the SN–collection point (CP) association, the positions of the CPs, and the UAV trajectory.
To solve this non-convex optimization problem accurately and efficiently, we propose a two-step iterative solution algorithm. First, an AP-based algorithm is applied to solve the optimal SN-CP associations and locations of CPs. In the second step, an improved elite genetic algorithm is used to obtain the AoI-optimal UAV trajectory.
We control the number of clusters by varying the clustering parameter to achieve an optimal balance between data collection time and flight time. Accordingly, the optimal solution can be obtained by the that minimizes the peak AoI.
The remainder of this article is organized as follows. In
Section 2, the system model for UAV-assisted data collection in MEC networks is presented.
Section 3 formulates a minimization problem on the peak AoI of SNs’ collected data.
Section 4 describes the proposed iterative optimization algorithms in detail.
Section 5 demonstrates the simulation results to evaluate the performance of the proposed algorithms. Finally, this article is concluded in
Section 6. The overall framework diagram of this article is presented in
Figure 1.
Notations: In this paper, scalars are denoted by italic letters and sets by calligraphic letters, such as . Furthermore, vectors and matrices are denoted by bold letters. denotes the space of -dimensional real-valued matrices. denotes the Euclidean norm of a vector. represents the cardinality of a set, i.e., the number of elements in a finite set. denotes an array, i.e., an ordered sequence of elements. denotes the standard big-O notation.
5. Simulation Results and Discussion
To evaluate the performance of the proposed algorithm, we present and analyze the simulation results in this section. The simulations were executed on a desktop computer equipped with an Intel Core i7-12700
[email protected] GHz, based on Python 3.8. The manufacturer of the device is HP, sourced from Beijing, China. We consider
M SNs randomly distributed in a square area with a side length of 2000 m, and the departure time of the UAV from the MEC server
is
. If not specified, the system parameters are set as follows:
m,
m/s,
m,
,
dB,
,
,
MHz,
dBm,
dBm,
dB.
Running our proposed Algorithm 3, the convergence curve of the GA algorithm is shown in
Figure 4 when
K reaches a maximum value of 50. It can be seen that the flight time shows an overall significant decrease with the number of iterations. Convergence is reached when the algorithm has been iterated about 68 times.
Figure 5a shows how the number of CPs
K changes regarding the parameter
for M = 50. Experimentally, it is found that different
may lead to the same
K. To demonstrate the results more clearly, we choose the
that makes the peak AoI the smallest for each
K. It is obvious from
Figure 5a that
K tends to decrease as
increases. According to (
15), this is due to the fact that
represents the likelihood of each SN to be an exemplar, and the larger
is, the more SNs are likely to be exemplars. Similarly, the larger
is, the fewer SNs are likely to be exemplars, i.e., the smaller
K is.
Figure 5b demonstrates the optimal peak AoI and the relative collection and flight times for different
K. The specific simulation results when
are listed in
Table 1. In particular, the parameters in Algorithm 2 are set as
= 300,
= 300,
= 0.99,
= 0.15,
= 0.1. First, it can be found from both subfigures of
Figure 5 that
K does not start at 1 but at 3. The reason is that the clustering result with
cannot satisfy the distance limit in (
1). Second, it can be observed that the collection time decreases with increasing
K, while the flight time increases with it. In addition, the collection time decreases fast and dominates at the beginning, but the rate of decrease becomes flat in the latter half, while the flight time changes more uniformly, which leads to a trend of decreasing and then increasing peak AoI. Analyzing the reason, when
K is larger, there are fewer SNs associated at each CP, the distances between SNs and CPs are shorter, and the collection time decreases consequently. In contrast, the UAV’s flight trajectory contains more CPs, increasing its flight distance and yielding a longer flight time. In particular, it is noted that the peak AoI for the
case reaches 608.76 s. This case implies that the data of each SN are collected directly above itself, and the UAV needs to fly over each SN one by one for data collection. Therefore, the poorer peak AoI is due to the longer flight time caused by the fact that clustering was not performed. From the above analysis, it is easy to conclude that our proposed clustering idea can well strike a balance between the collection time and the flight time, so the optimal peak AoI can be achieved by choosing a suitable
K.
The optimal and suboptimal clustering results and the flight trajectories are respectively visualized in
Figure 6a,b. Note that the different colored circles in the figure represent SNs in different clusters. The specific simulation results are as follows. When
, the optimal peak AoI is 393.20 s, corresponding to a collection time of 156.27 s and a flight time of 236.93 s. When
, the suboptimal peak AoI is 396.77 s, corresponding to a collection time of 98.98 s and a flight time of 297.79 s.
Further, to better evaluate the performance of the proposed Algorithm 3, the following four schemes are considered as comparisons:
Solve the ILP problem using the branch-and-cut (BC) method and find the optimal trajectory using Algorithm 2.
Solve the problem using Algorithm 1 and find the optimal trajectory using the dynamic programming (DP) algorithm.
The first step is the same as in Scheme 2, and then solve the TSP to obtain the optimal trajectory.
The first step is the same as above, and the optimal trajectory is solved using the greedy algorithm.
Considering that the complexity of the DP algorithm can be up to
,
M is set to 20 to ensure that the experiment can be carried out properly. Moreover, the parameters in Algorithm 2 are set as
= 300,
= 500,
= 0.9,
= 0.2,
= 0.1. Running Algorithm 3, the convergence curve of the GA algorithm is shown in
Figure 7 when
K reaches a maximum value of 20. It can be seen that the flight time shows an overall significant decrease with the number of iterations. Convergence is reached when the algorithm has been iterated about ten times, less than the number of iterations at
.
Figure 4 and
Figure 7 illustrate that our proposed algorithm can solve the problem efficiently with a small number of CPs and also obtains an asymptotically optimal solution with an acceptable number of iterations when the number of CPs is large.
The five AoI curves derived from all the schemes are shown in
Figure 8 and the specific simulation results are listed in
Table 2. It is easily observed that the five curves in the figure have the same trend with
K. First, there is a small decrease until the optimum is reached, then there is a general upward trend, and all of them reach the worst peak AoI at
except Scheme 4. Slightly different from the AoI curves in
Figure 6b, except for Scheme 3 which achieves the optimal peak AoI at
, the other three schemes as well as our proposed algorithm all achieve the optimal solution at
, and the optimal peak AoI becomes smaller. Understandably, this is because the reduction in
M leads to the association of fewer SNs at each CP as well. This further results in a lower percentage of data collection time, and the flight time dominates in this case. It can be noticed that Scheme 4 provides the worst peak AoI performance in all cases. This is due to it only considering the nearest unvisited CPs at each decision step and bot being motivated by a global perspective, causing it to obtain usually locally optimal solutions.
On the contrary, Schemes 1 and 2 and the proposed algorithm demonstrate the best performance, and the three curves have identical results for as well as . Comparing Scheme 1 and the proposed algorithm, since BC is an exact algorithm for solving the ILP problem, the clustering results it obtains must be optimal. However, its peak AoI is not always smaller than the proposed algorithm, such as when and 14. This is mainly related to the fact that peak AoI includes both collection time and flight time, and the optimal collection time does not necessarily correspond to the optimal flight time. The comparison of Scheme 2 and the proposed algorithm shows that Scheme 2 has better performance at some points with the same clustering results. This is because the DP algorithm included in Scheme 2 obtains the optimal solution by comparing all the candidate paths. Therefore, DP has an exponential algorithm complexity that increases rapidly as the problem size grows. The space required by the algorithm exceeds the memory capacity of the computer when . However, GA belongs to heuristic algorithms; it usually obtains the optimal solution or suboptimal solution but has a better computational complexity than DP. The proposed algorithm can achieve a performance extremely close to the exact algorithm near the optimal number of clusters or when K is very large. Overall, Scheme 2 does not apply to the large-scale SNs’ data collection problem, while our proposed algorithm is still able to solve with high accuracy by adjusting the parameters.
Lastly, the performance of Scheme 3 is substantially better than that of Scheme 4, but it still has some gaps with the optimal performance. This can be explained because the TSP always considers the optimal solution of a loop that traverses all CPs from the starting point and back to the starting point. Even if we have subtracted the distance from the starting point to the first visited CP, the result obtained is not the path that makes the peak AoI optimal.
As presented in
Table 3, we also evaluated the running time of the proposed algorithm. Combined with the results in
Figure 8, it is easy to notice that Schemes 1, 3, and 4 obtain relatively poor solutions in a faster time. The remaining two better-performing schemes vary greatly in their running time. Consistent with our theoretical analysis, Scheme 2 obtains the optimal result with the longest running time. When
, the proposed algorithm obtains very similar results to Scheme 2 in a much shorter time. When
, the computational complexity of Scheme 2, which contains the DP algorithm, is too high for the simulation to proceed. We give the running times of the remaining schemes for
. The four schemes spend more time on computations when
M is increased, but it is still acceptable.
To better explain the generality of our algorithm, the main simulation results of the four schemes for
are presented in
Table 4. The minimum AoI for all schemes is obtained at
, and the first three schemes have the same result of 336.25. Only Scheme 4 has a worse result of 413.47. From the simulation results, we can conclude that our algorithm can still give a better feasible solution in an acceptable time at
. In agreement with our theoretical analysis of the complexity of the GA algorithm, this is because
K is very small compared to
and
, so our algorithm is equally applicable to larger problem sizes. Asymptotically optimal solutions can be obtained by adjusting the size of the hyperparameters in the proposed algorithm if high-precision results are required and computational resources are sufficient.