The energy consumption of UAV is important because of the limited-capacity battery of UAV [34]. On the other hand, the larger the cache size leads to the higher the average service success. But as the cache size increases, the caching energy consumption also increases. Therefore, a tradeoff is needed between reducing caching energy consumption and increasing the average service success. Also, the location of the UAV is important. The best location is the geometric median which is the point minimizing the sum of distances to the clients, which is computed using a Weiszfeld-type algorithm [35].
In this paper, a bi-objective optimization problem, i.e. minimizing caching energy consumption and maximizing the average service success, is defined. The goal is to find the optimum number of cache contents in UAV.
We assume that the UAV stored content is updated at each time period. Content caching in the UAV is done during off-peak hours when the UAVs return to their station for purposes such as charging the battery. Because users are constantly on the move, the location of the UAVs must change according to each time period to effectively serve the users. UAVs are assumed to be fixed during each time period. The time period is selected small enough for each user's location to be considered static along it. Generally, the speed of a UAV can be up to 30 meters per second and the average speed of pedestrian users is less than 2 meters per second at amusement parks. Hence, we ignore the amount of time each UAV uses to relocate [6]. It is also assumed that there is no obstacle to causing the UAV to fly unstable as it may lead to data loss due to changes in channel state [36].
After calculating the geometric median, we calculate the distance from the base station (or the station for charging the battery of UAV) to this point and entitle it D. By dividing this distance by the speed of the UAV movement V, the time t, required for the UAV to travel from the base station to the geometric median, is obtained:
The energy consumed by the UAV from the base station to the geometric median is entitled E1, which includes:
$${E_1}={\text{ }}{E_{caching}}+{\text{ }}{E_{flying}}$$
2
where in
$${E_{caching}}={\text{ }}{\mu _C}NBt$$
3
and
$${E_{flying}}={P_{flying}}t$$
4
Therefore:
$${E_1}={\text{ }}\left( {{\mu _C}NB{\text{ }}+{\text{ }}{P_{flying}}} \right)t$$
5
where µC is the caching coefficient in W/bit, and B is the size of each content in bit. So NB is the total number of data bits cached in the local storage of UAV. t is the time duration for caching. Pflying is the UAV flying power [34]. This energy is needed twice, once to go from the base station to the geometric median and vice versa.
The energy that the UAV must spend at the geometric median to serve the clients is entitled E2, which includes:
$$E2{\text{ }}={\text{ }}{E_{caching}}+{\text{ }}{E_{hovering}}+{\text{ }}{E_{communication}}$$
6
where in
$${E_{caching}}={\text{ }}{\mu _C}NB{\text{ }}T$$
7
$${E_{hovering}}={\text{ }}{P_{hovering}}T$$
8
$${E_{communication}}={\text{ }}{N_{clients}}PT$$
9
Therefore:
$${E_2}={\text{ }}\left( {{\mu _C}NB{\text{ }}+{\text{ }}{P_{hovering}}+{\text{ }}{N_{clients}}{P_{}}} \right)T$$
10
and
$$T{\text{ }}={\text{ }}{E_2}/{\text{ }}\left( {{\mu _C}NB{\text{ }}+{\text{ }}{P_{hovering}}+{\text{ }}{N_{clients}}{P_{}}} \right)$$
11
where T is the time that the UAV must spend at the geometric median to serve the clients, Phovering is the UAV hovering power, Nclients is the number of clients, P is the transmission power of the UAV fog node.
According to the internal structure of UAV, each UAV has primary energy, which we entitle Etotal, which is used for flying, caching, hovering, and transmitting information to users:
$${E_{total}}={\text{ }}2{E_1}+{\text{ }}{E_2}$$
12
Therefore:
$${E_2}={\text{ }}{E_{total}}{\text{- }}2{E_1}$$
13
By inserting Eq. 5 and Eq. 13 in Eq. 11, the time T that the UAV must spend at the geometric median to serve the clients is [37]:
$$T{\text{ }}={\text{ }}\left( {{E_{total}}{\text{- }}2{E_1}} \right){\text{ }}/{\text{ }}\left( {{\mu _C}NB{\text{ }}+{\text{ }}{P_{hovering}}+{\text{ }}{N_{clients}}P} \right)$$
14
$$T{\text{ }}={\text{ }}\left( {{E_{total}}{\text{- }}\left( {2\left( {{\mu _C}NB{\text{ }}+{\text{ }}{P_{flying}}} \right)t} \right)} \right){\text{ }}/{\text{ }}\left( {{\mu _C}NB{\text{ }}+{\text{ }}{P_{hovering}}+{\text{ }}{N_{clients}}P} \right)$$
15
If the user equipment wants to download some contents from UAV fog nodes, the user equipment should be located in circular cells with a center at fog nodes and a radius equal to R. The maximum communication distance is:
$$R={(\frac{P}{{\tau {N_0}}})^{\frac{1}{\alpha }}}$$
16
Here, τ is the threshold of the SNR value. α represents the path loss factor. N0 represents additive white Gaussian noise power [38].
1) Caching energy consumption
The caching energy consumption in UAVs is:
T is the time that the UAV must spend at the geometric median to serve the clients.
2) Average service success
The probability of the user finding the ith content in the nearest UAV within the radius R is given as
$${P_{hit,i}}=1 - \exp ( - {q_i}\lambda \pi {R^2})$$
18
and successful transmission probability is
$${P_{suc,i}}=\int_{0}^{R} {\frac{{2\pi {q_i}\lambda r}}{{1 - \exp ( - {q_i}\lambda \pi {R^2})}}} \times \exp ( - {q_i}\lambda \pi {r^2}) \times \exp ( - \tau {r^\alpha }/P)dr$$
19
So average service success for content i is
$$\begin{gathered} {A_{srv,i}}={P_{hit,i}}{P_{suc,i}} \hfill \\ =(1 - \exp ( - {q_i}\lambda \pi {R^2})) \hfill \\ \times \int_{0}^{R} {\frac{{2\pi {q_i}\lambda r}}{{1 - \exp ( - {q_i}\lambda \pi {R^2})}}} \times \exp ( - {q_i}\lambda \pi {r^2}) \times \exp ( - \tau {r^\alpha }/P)dr \hfill \\ \end{gathered}$$
20
and total average service success is
$$\begin{gathered} {A_{srv}}=\sum\limits_{{i=1}}^{L} {{a_i}{A_{srv,i}}} \hfill \\ =\sum\limits_{{i=1}}^{L} {\frac{{{i^{ - \gamma }}}}{{\sum\nolimits_{{j=1}}^{L} {{j^{ - \gamma }}} }}} \hfill \\ \times (1 - \exp ( - {q_i}\lambda \pi {R^2})) \hfill \\ \times \int_{0}^{R} {\frac{{2\pi {q_i}\lambda r}}{{1 - \exp ( - {q_i}\lambda \pi {R^2})}}} \times \exp ( - {q_i}\lambda \pi {r^2}) \times \exp ( - \tau {r^\alpha }/P)dr \hfill \\ \end{gathered}$$
21
where \({a_i}\) the popularity of the ith content is given by
$${a_i}=\frac{{{i^{ - \gamma }}}}{{\sum\nolimits_{{j=1}}^{L} {{j^{ - \gamma }}} }}$$
22
and where γ is the popularity factor. With a higher value of γ, the level of a user requesting files is concentrated. The UAV is placed following the independent homogeneous Poisson Point Process (PPP) with density λ. qi denotes the probability that the ith content is cached at the UAV. τ = 2Rt − 1 is the given SNR threshold of the UAV where Rt is a target data rate of successful content delivery. α is the path loss exponent and P denotes the transmit power of the UAV [39]. Therefore, the first objective function of our optimization problem is:
$$\hbox{min} {E_c}={\mu _c}NBT$$
23
and the second objective function of the problem is:
$$\hbox{max} {A_{srv}}=\sum\limits_{{i=1}}^{L} {{a_i}{A_{srv,i}}}$$
24
where the goal is to find the optimum number of cache contents in UAV (the value of N).
Some classical techniques to solve multi-objective problems are weighted sum, Goal Programming, Goal-Attainment, and ε-Constraint. These methods are also entitled exact or decomposition. In Goal Programming, the goals or targets that the decision maker wishes to achieve for each objective should be determined. These values are included as additional constraints in the problem. The objective function then tries to minimize the absolute deviations from the goals to the objectives.
Pareto optimal solutions are corresponding phenotype objective vector components that cannot be all simultaneously improved within the genotype search space (decision space). These solutions are also termed admissible, non-inferior, or efficient solutions. Their corresponding vectors are entitled non-dominated. The selection of vector(s) from this vector set implicitly indicates acceptable decision variables, Pareto optimal solutions, or genotypes. They form the set of all solutions whose associated vectors are non-dominated [40].
Because our problem is non-convex, the weighted sum method is not suitable for solving it because it does not find all the solutions to the problem. So we use the Goal Programming method to solve it. In Goal Programming, the multi-objective problem becomes a single-objective problem and is solved. Therefore, according to Eq. 23 and Eq. 24, we have:
$$Objective{\text{ }}Function={w_1} \times \left( {ObjectiveFunctio{n_1}\left( x \right) - {t_1}} \right)+{w_2} \times \left( {ObjectiveFunctio{n_2}\left( x \right) - {t_2}} \right)$$
25
where w1 and w2 are different weights between 0 and 1 that they change in each repetition and w2 = 1-w1. In Eq. 25, t1 and t2 are the optimal points of ObjectiveFunction1 and ObjectiveFunction2, respectively, which are solved separately and are goal points. Also, x is the variable that is supposed to optimize the value of the Objective Function, i.e. the number of cache contents in UAV (the value of N).