# A Service-Constrained Positioning Strategy for an Autonomous Fleet of Airborne Base Stations
## 4 Positioning and Communication for a Fleet of UAVs
### Derivation of the UAV Trajectories
#### 4.2.2 Gradient of the Wireless Backhaul Constraint Functions  
As mentioned above, the update of vector \(\mathbf{v}\) following the gradient of the cost function can only be applied when all the constraints formulated in Equations (24) and (25) are fulfilled. If this does not happen, we need to identify the unfulfilled constraints. A vector \(\mathbf{w}\) is defined to store the indexes of all the unfulfilled constraints. If \(\mathbf{w}\) is empty, the cost function is increased according to Section 4.2.1. Otherwise, one of these unfulfilled constraints is randomly selected, which can lead to two different situations: either the selected constraint is one of the \(P\) constraints defined in Equation (24) or the selected constraint is the one defined in Equation (25). Then, the selected constraint function is used to update the optimization variables through its gradient, as it is detailed below. Regarding the \(P\) constraints in Equation (24), each one is related to the individual backhaul link for each UAV whose capacity should be greater than the aggregated rate that is delivered to the users in its service region. To model these wireless backhaul channels, the free space channel model has been used as we assume that the UAVs are positioned sufficiently high and the backhaul ground station is located in an isolated area so that there is no blocking in the backhaul connection (that is, LOS condition). Thus, the backhaul rate that each UAV can use (Equation (29)) depends on its distance to the backhaul ground station \(d_{BHi}\) and the backhaul bandwidth \(B_{i}^{BH}\) assigned to it. The antennas used for the backhaul are assumed to point towards the ground station. For the sake of simplicity in the notation, we have assumed that both antennas are isotropic and there is no signal occlusion due to buildings:  
\[R_{i}^{BH}=B_{i}^{BH}\cdot\log_{2}\left(1+\frac{k_{BH}}{B_{i}^{BH}\cdot d_{BHi }^{2}}\right), \tag{29}\]  
where \(k_{BH}\) has a similar definition to \(k\) in Equation (13):  
\[k_{BH}=\frac{P_{T_{BH}}\cdot\lambda_{c}^{2}}{16\cdot\pi^{2}\cdot k_{b}\cdot T \cdot F}\cdot G_{R}\cdot G_{T}. \tag{30}\]Note that the backhaul rate in Equation (29) depends on the distance \(d_{BHi}\) such that, if this distance is very large, the corresponding backhaul rate will tend to zero. Since the adaptive positioning strategy being described in this section of the paper looks for the optimum positions of the UAVs, this positioning strategy will prevent the UAVs from going to positions out of the hearing range of the backhaul ground station. According to the previous expressions, at each iteration, the aggregated rate that each UAV can serve \((\overline{R}\big{|}_{A_{i}}\cdot N_{i})\) is compared to the rate that its backhaul link can carry (\(R_{i}^{BH}\)), leading to a negative \(R_{i}^{BH}-\overline{R}\big{|}_{A_{i}}\cdot N_{i}\) difference when the individual constraint is not accomplished. Thus, when one of the these \(P\) constraints is not fulfilled and is randomly selected (namely, that corresponding to the index \(i_{p}\)), a gradient approach similar to the one defined in Equation (26) is applied to update the optimization variables contained in vector \(\mathbf{v}\):  
\[\mathbf{v}[n+1]=\mathbf{v}[n]+\mu_{BH}\cdot\
abla_{\mathbf{v}}\left(R_{i_{p}}^ {BH}-\overline{R}\big{|}_{A_{i_{p}}}\cdot N_{i_{p}}\right)[n], \tag{31}\]  
where \(i_{p}\) stands for the index corresponding to the selected unfulfilled constraint in Equation (24). In the computation of the gradient in Equation (31), the entries of \(\mathbf{v}\) with non-zero values are different from those in Equation (26). These entries can be separated in two groups. On the one hand, those related to the positions of the UAV servicing the region associated to the selected constraint, which affect \(R_{i_{p}}^{BH}\), \(\overline{R}\big{|}_{A_{i_{p}}}\) and the boundary of \(A_{i_{p}}\), and the positions of its neighboring UAVs, which affect the boundary of the selected region \(A_{i_{p}}\).