# 3D Global Path Planning Optimization for Cellular-Connected UAVs under Link Reliability Constraint
## 3 Methodology
### Problem Definition and Formulation
#### 3.2.2 Objective Function  
The path planning problem in this study is considered a dynamic multiobjective problem with a deterministic objective function and a vector output, \(\mathcal{R}^{3}\). The output is a set of 3D waypoints, which is a combination of three nonlinear functions along three coordinate axes. Since the goal is to minimize the objective function, hereafter, we use the term cost function instead of objective function. The cost function is defined as  
\[F=L_{total}-\alpha\times L_{reliable}+\beta\times P_{nc}+\gamma\times P_{ob}+ \delta\times P_{nf}, \tag{3}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Scenario I** & **Scenario II** & **Scenario III** \\ \hline Environment & UKM & Bangi & Bangi \\ No. of BSs & 4 & 25 & 25 \\ Height of BSs (m) & 40 & 40 & 40 \\
2D distance between starting and end points (km) & 2.38 & 8.97 & 8.97 \\ Obstacle & No & No & Yes \\ No-fly zone & No & No & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters for modeling environments. Figure 4: 3D representation of the simulation model for Scenario III in MATLAB environment. where \(L_{total}\) is the total length of the computed path between the starting and end points. \(L_{reliable}\) is a function of the path length with a reliable communication link. \(P_{ob}\), \(P_{nc}\), and \(P_{nf}\) are the penalty terms, while the path collides with the obstacles and passes from the no-coverage and no-fly zones, respectively. The penalty terms are defined based on the problem constraints, which will be discussed later. \(\alpha\), \(\beta\), \(\gamma\), and \(\delta\) are the determination of weighted coefficients. The solution for the path planning problem is a function of \(x(t)\), \(y(t)\), and \(z(t)\), which correspond to the drone coordinates in space. Generally, these functions are continuous in time; therefore, infinite variables need to be considered to solve the problem. One common approach to reducing the problem complexity is using the spline interpolation technique, in which the problem can be solved with a limited number of variables, and the spline function can produce a smooth path. Therefore, the output of the path planning problem is a function of \(x\), \(y\), and \(z\), which is a vector of size \(k\), that contains computed 3D waypoints in space, where \(k\) is equal to the number of query points in the spline function. \(L_{total}\) can be computed as  
\[L_{total}=\sum\sqrt{diff(x)^{2}+diff(y)^{2}+diff(z)^{2}}, \tag{4}\]  
where \(diff\) is the difference function that calculates differences between adjacent elements of a vector, as \([x(2)-x(1),\ x(3)-x(2),\ldots,x(k-x(k-1)]\). One approach to modeling the wireless link reliability objective function is based on the wireless channel's characteristics. Such a function would be a dynamic and stochastic function, with a random distribution; therefore, the output also would be dynamic and random. To optimize this objective function, both mean and variance need to be optimized simultaneously. Since the output is not deterministic, the objective needs to be optimized with a probability, which is challenging. Inspired by reliable zone selection in terrestrial cellular communications and to reduce the complexity of the path planning problem, we identified a reliable aerial coverage zone for cellular-based drone communications by statistically analyzing the measured data described in Section 3.1. Based on the described strategy, \(L_{reliable}\) is defined as  
\[L_{reliable}=\sum r_{mask}\times\sqrt{diff(x)^{2}+diff(y)^{2}+diff(z)^{2}}, \tag{5}\]  
where \(r_{mask}\) is a mask vector of size \(k\), where its elements are either 1 or 0. If a computed point is within the reliable zone, its corresponding element in \(r_{mask}\) is 1; otherwise, it is 0.