# Developing an Intelligent Cellular Structure Design for a UAV Wireless Communication Topology
## 3 Proposed UAV Topology and Simulation
### Mathematical Calculation of Link Budget and AI Framework  
This subsection gives a mathematical outline of both the link budget predictions, as well as the proposed AI framework. First, calculating the link budget parameters between the UAVs and ground station, either mobile and/or fixed users are presented as shown in  
Figure 5: Co-ordinate system of a UAV’s cellular structure.  
Equations (7)-(11). These parameters help estimate connectivity, coverage, and data rate of the proposed UAV network topology.  
\[\text{PL (dB)}=20\text{ log}\frac{4\pi\left(\text{f}\right)\text{(d)}}{\text{c}} \tag{7}\]  
\[\text{d}=2R[\arccos\left(\frac{R}{R+\text{h}_{\text{t}}}*\cos(\theta)\right)- \theta] \tag{8}\]  
\[\text{RSS}=\text{P}_{\text{t}}+\text{G}_{\text{t}}+\text{G}_{\text{r}}-\text{P }_{\text{L}}-\text{L} \tag{9}\]  
\[\text{SNIR (dB)}=\frac{\text{RSS}}{\text{N}+\text{I}} \tag{10}\]  
\[\text{T}=\text{B}\times\text{log}(1+\text{SNIR}) \tag{11}\]  
where PL denotes path loss (dB) between UAV and a receiver, which can be a system or individual or thing, f denotes carrier frequency (GHz), d denotes distance of transmission (km), c denotes speed of light, \(R\) denotes the Earth's radius at 6378 km, h\({}_{\text{t}}\) denotes UAV's altitude, and \(\theta\) is the minimum elevation angle from a receiver and/or user location, RSS denotes received signal strength (dB), P\({}_{\text{t}}\) denotes transmitter power, G\({}_{\text{t}}\) denotes UAV antenna gain, G\({}_{\text{r}}\) denotes receiver antenna gain, L denotes losses, SINR denotes signal-to-interference-noise ratio (dB), N denotes noise figure (dB), I denotes interference (dB), T denotes throughput (Mb/S), and B denotes bandwidth (MHz).  
Using an AI framework helps in optimizing and tuning the 7 parameters of constructing a cellular cell for better wireless connectivity results. Artificial Neural Networks (ANN) are widely considered for optimization. Their purpose here is twofold: to optimize cellular cell design using SOMs unsupervised learning algorithm, which has a direct effect on link budget parameters. Then, to validate the SOMs performance using the NN fitting tool, where the key performance evaluator is a Mean Square Error (MSE) analysis.  
Figures 6 and 7 show the simulation of the proposed AI framework using the GUI toolbox in MATLAB [49]. Figure 6 shows the SOM layout, while Figure 7 shows the NN layout. Further, such a toolbox relies on well-recognized apps that allow us to create an app interactively, transform a script into a simple app, and build an app programmatically [50]. The mathematical representation of the proposed AI framework that includes SOM and NN fitting tool techniques is shown as per Equations (12)-(19):  
\[Dist=\sqrt{\sum_{i=1}^{i=n}\left(V_{i}-W_{i}\right)^{2}} \tag{12}\]  
\[\sigma(t)=\sigma_{0}\exp\left(-\frac{t}{\lambda}\right) \tag{13}\]  
\[W\text{ }(t+1)=W\text{ }(t)+\text{ }\Theta(t)\text{ }L(t)V(t)-W(t) \tag{14}\]  
\[L(t)=L_{0}\exp\left(-\frac{t}{\lambda}\right)\] (its learning (always equaling 1), \(\sigma(t)\) denotes width of the lattice at time \(t\). H denotes a Hessian matrix, J denotes the Jacobian matrix which consists of the first values of the network errors in consideration of the assigned weights and biases that can be computed via a backpropagation technique, g denotes a gradient, e denotes a vector of network errors, xk + 1 denotes the Hessian matrix approximation of [PERSON]'s method.