{'fraction_non_alphanumeric': 0.025848069289065318, 'fraction_numerical': 0.011322627210393359, 'mean_word_length': 4.900718658504125, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Altitude Optimization of UAV Base Stations from Satellite Images Using Deep Neural Network

It is expected that unmanned aerial vehicles (UAVs) will play a vital role in future communication systems. Optimum positioning of UAVs, serving as base stations, can be done through extensive field measurements or ray tracing simulations when the 3D model of the region of interest is available. In this paper, we present an alternative approach to optimize UAV base station altitude for a region. The approach is based on deep learning; specifically, a 2D satellite image of the target region is input to a deep neural network to predict path loss distributions for different UAV altitudes. The predicted path distributions are used to calculate the coverage in the region; and the optimum altitude, maximizing the coverage, is determined. The neural network is designed and trained to produce multiple path loss distributions in a single inference; thus, it is not necessary to train a separate network for each altitude.


INTRODUCTION
The use of unmanned aerial vehicles (UAVs) as base stations has emerged as a solution to address the demand for high-speed and reliable wireless communication in various scenarios. UAV base stations can be deployed easily, provide connectivity during emergency situations, and improve coverage and quality of service if needed.
One of the challenging problems related to aerial base stations is the placement of the base station. The optimal base station altitude can be defined as the one that maximizes the coverage, which requires the prediction of path loss distribution in the target area. There are various models that can be used to estimate the path loss distribution, including Okumura [1], Hata [2] and Walfisch-Ikegami [3] models. These models require a general classification of the area, such as "urban," "sub-urban," and "rural." Since such a rough classification of an area may not yield accurate predictions in all cases, there have been efforts to improve the results using additional information, such as the building density between transmitter and receiver [4], [5]. When the 3D model of an area is available, it is possible to apply ray tracing simulation techniques to get accurate results [6], [7]. In addition to the requirement of a 3D model of the area, simulation based approaches have the disadvantage of high computational cost.
There are articles specifically aiming to optimize the altitude of an aerial base station. For example, in [8], airto-ground channel is modeled as the addition of line-ofsight (LoS) and non-line-of-sight (NLoS) terms, where the probability of LoS depends on three parameters based on the ITU recommendation [9]: the ratio of building area to total area, the average number of buildings per unit area, and the height distribution of buildings. The formulation derived in [8] is used in other work, including [10], where horizontal and vertical placements are decoupled, and [11], where the problem of placing multiple aerial base stations is addressed. In [12], using a probabilistic model for LoS, "This work was supported by TUBITAK Grant 215E324." the downlink coverage performance of aerial base stations is investigated, and the optimal base station altitude, which leads to a maximum ground coverage and minimum required transmit power for a single base station, is derived. The work is extended for the placement of multiple aerial base stations in [13]. In [14], air-to-ground channels characteristics, including height-dependent path loss models, root mean square (RMS) delay spread and the number of multipath components, at 3.9GHz for suburban areas and for UAV altitudes up to 40m are investigated and compared against ray tracing simulations. In [15], large-scale and small-scale channel parameters are extracted for LoS and NLoS cases at 1GHz and 4GHz from actual measurements; and an altitude-dependent path loss model is proposed. In [16], extensive measurements are taken to model airto-ground channel characteristics, including path loss, RMS delay spread, Rician K-factor, and inter-antenna correlations for sub-urban and near-urban environments.
In recent years, the use of machine learning techniques, including deep neural networks, in wireless communication applications has become increasingly popular [17]. Machine learning based methods have been proposed to estimate path loss [18], classify the area model selection [19], identify wireless technology [20], identify interference [21], and allocate resources [22]. Deep neural networks have been used to predict path loss exponent and shadowing factor [23] and path loss distribution [24].
In this paper, we propose a deep learning based approach to determine path loss distribution in an area and optimize aerial base station (transmitter) altitude. Motivated by the fact that regional characteristics, such as building densities and heights, play a major role in path loss values, we aim to predict the path loss distribution of an area directly from its satellite image, which captures all regional characteristics visually. Given a dataset of satellite images and corresponding path loss distributions, a deep neural network is trained to convert an image to the corresponding path loss distribution.
Once the path loss distributions are estimated, the coverage, i.e., the percentage of the transmitters with path loss values less than a threshold in the region, is calculated. We design our network such that it produces path loss distributions for multiple base station altitudes. Therefore, we choose the altitude which results in the maximum coverage.
Our work is unique in the sense that it allows determining the optimal base station altitude directly from a satellite image, which is input to a deep neural network to predict path loss distribution. The path loss distribution portion of our method has similarities to the work done in [24], but there are major differences. Other than the fact that [24] does not involve any altitude optimization, the network in [24] produces path loss distribution for a single transmitter altitude. In this paper, the network is designed to produce multiple path loss distributions, where each distribution corresponds to a different transmitter altitude. The work in [24] can be extended for multiple altitudes; however, a separate network has to be trained and stored for each transmitter altitude. In this paper, the training process involves a single network, sharing common layers for different altitudes. This reduces the overall number of parameters to be learned, which is critical in deep learning to achieve better performance for a given dataset size.
To train the proposed network, we first generate a dataset by running ray tracing simulations on 3D models of regions for which we have the satellite images as well. The ray tracing simulations produce path loss distributions, which are coupled with satellite images to form the dataset. A deep network is trained to produce path loss distributions for multiple altitudes from each satellite image. While the training process takes time, once trained, the network simply takes a satellite image to instantly produce multiple path loss distributions.
The paper is organized as follows. In Section 2, the proposed approach is briefly presented. The details, including the dataset generation procedure and the deep neural network architecture, are given in Section 3 and Section 4, respectively. The performance of the deep neural network, the details of altitude optimization process, and the experimental results are discussed in Section 5. Finally, in Section 6, the paper is concluded with a summary and possible future work.

OVERVIEW OF THE PROPOSED APPROACH
The base station altitude optimization problem is defined as determining the altitude which results in the maximum number of serviceable receivers. Received signal strength, which is a function of the operation frequency, transmit power of the base station, antenna gains of the transmitter and receiver, and path loss, determines if a receiver is in the coverage area or not. Assuming there is only one transmitter and the receivers are of same type, the path loss becomes the only variable determining the coverage. The maximum allowable path loss, which we denote P L th , can be set as the threshold; any receiver with path loss higher than this threshold is considered out of coverage. Fig. 1 gives an illustration of path loss map and path loss distribution of an area. On the left of the figure, we have a satellite image of a region. The 3D model, which is not shown, of the region is input to a ray tracing software to obtain the path loss values of the receivers, which are uniformly distributed over the entire area. The path loss values are shown as a color map in the middle of the figure. The path loss values are quantized to 26 bins (with 3dB bin widths) to form the path loss distribution, which is shown on the right of the figure. The coverage (the ratio of serviceable receivers with path loss value less than a specific threshold) is calculated by summing up the path loss values less than the threshold.
To determine the optimal altitude which yields the maximum coverage, we need to have path loss distributions corresponding to different base station altitudes. We, therefore, design our path loss estimation network to generate path loss distributions for multiple altitudes in a single inference.
Our approach is illustrated in Fig. 2. An image is input to a deep neural network, which consists of convolutional layers and fully connected layers. The convolutional layers extracts high and low level features, which are then flattened passed through several fully connected layers. The output of the network is a vector, which has path loss distributions for different transmitter altitudes in its designated parts. The path loss distributions are then passed through a specified threshold value to calculate coverage for each altitude. The altitude maximizing the coverage is set as the optimum altitude.
Training a deep network requires a large dataset. In cases where the dataset size is limited, a common practice is to take a pre-trained network and re-train it with the available data for the desired application. We use this technique in our application. Specifically, we took a portion of the pretrained VGG16 network [25], appended two fully connected layers, and trained the entire network with our data. The VGG16 is pre-trained on the ImageNet dataset [26], and it extracts high and low level image features, representing the regional characteristics. The fully connected layers convert these features path loss distributions.

DATASET GENERATION
The data requirement for training a deep neural network is extremely large. Generating the dataset using actual measurements were not feasible due to time, cost and legal issues of flying UAVs in urban areas. Therefore, we use the dataset generation method presented in [23]. Using areas with known 3D models, ray tracing simulations are used to obtain the path loss at each receiver point for each transmitter altitude. The received path loss values are then converted to path loss distributions.
Specifically, 500 geographical regions, each with a size of 1.8 × 1.8 km, are extracted as in [23]. For each region, we have the satellite image as well as the 3D model. Each 3D model is imported to a ray tracing simulation software. 1 The transmitter is placed in the center of the region at a specific height. We placed 12,100 (110 × 110) receivers uniformly distributed over the region at 1.5 meters above ground. We assume having a flat terrain with dry earth material and concrete buildings. We run the simulations for each transmitter altitude and each region separately. We   Figure 2. (a) A satellite image of the target region is input to a deep neural network to produce path loss distributions at multiple altitudes. The network consists of a convolutional neural network (CNN) layer, followed by several fully connected layers (fc). The output layer is designed such that the path loss distribution for a specific transmitter height (h i ) is produced at a specific part of the output. The initial portion of the network is taken from the VGG16 network [25]; the entire network is re-trained for our dataset. (b) A threshold value is chosen to determine the coverage. Receivers with path loss value greater than the threshold are not covered by the transmitter. Path loss distributions are passed through the threshold to determine the ratio of covered receivers. The altitude that has the maximum coverage ratio is the optimum altitude.
choose 40m, 80m, 120m, and 300m as the representative set of transmitter altitudes in our experiments. The parameters used in the dataset generation are listed in Table 1.
The resulting path loss values at the receivers are processed to generate the path loss distributions. The path loss values corresponding to receivers that are inside a building are removed by utilizing the 3D models, which indicate the building locations. The remaining path loss values are quantized to 26 bins, starting from 55dB to 130dB bin centers, and bin widths of 3dB. The distributions are normalized so that the bin values add up to one for each distribution.
We repeat the simulations for 4 different altitudes. The path loss distributions for each altitude are concatenated to construct a target vector of size 104-by-1. By repeating the simulations for different target areas, we construct a dataset of 500 images and corresponding target vectors.

NETWORK ARCHITECTURE
The input to the network is of size 224 × 224 × 3. The network produces 104 values, corresponding to path loss distributions for four transmitter heights.
The network consists of a common pre-trained network (VGG16 [25]) followed by fully connected layers. The VGG16 network is a well-known architecture used for image classification; and it is pre-trained on the ImageNet dataset [26]. This portion of the network extracts the common features associated with the region. These features include low-level features such as lines, edges, corners, and other primitive features, as well as high-level features such as geometric structures and shapes with different colors and texture. Our intuition is that these features well describe the regional characteristics that directly affect the communication channel properties of the area. The last layers allow specialization/prediction of distributions for different altitudes by properly weighting the features extracted from the common layers. The final layer is a 104 unit layer with a softmax function at the end.
The dataset is divided into 400 images for training and 100 images for testing. During training, the stochastic gradient descent optimizer [27] is used with a learning rate of 0.0001, a momentum of 0.7, a batch size of 8, and crossentropy as the loss function.
The network can be modified (by reducing the size of the bin width and therefore increasing the number of bins) to increase the resolution of path loss distributions. This would increase the number of parameters to be learned during training; and we would need more data to successfully train the network parameters. Similarly, we can add more altitudes to the network, which would again require more training data.

Deep learning model performance
The mean squared error (MSE) between the true and predicted path loss distribution values is used to evaluate the network performance. Table 2 shows the MSE for each altitude. By comparing the MSE results to the variance of the true distribution values in the test set, it can be seen that the network is predicting the true distributions well. From the table, we notice that the prediction performance is better for higher altitudes. This improvement is due to the higher probability of LoS links for high altitudes. When the UAV is at a low altitude, such as 40m, the communication link may suffer from shadowing due to high building, making it more difficult to predict path loss. In Fig. 3, the true versus predicted path loss distribution values are shown for the entire test set. We note that the predicted path loss values match the true values well, except for a relatively small number of outliers.
In Fig. 4, we provide some examples of the test set showing the true versus predicted distributions with the corresponding satellite images. The regions are arranged from best to worst according to the average MSE of the four altitudes; the average MSE is written above each image. We notice that regions with low MSE values correspond to sub-urban areas. The MSE increases in the regions where there are high-rise buildings, causing extreme shadowing and multi-path reflections. In the last example, there is a high-rise building in the middle of the region, blocking the transmitter signal and resulting in high path loss at almost all receiver locations. As the transmitter altitude is increased, the receivers finally start get the signal from the transmitter. Even in such challenging situations, the network predicts the distributions well. Fig. 4 also includes the results of two baseline methods, i.e., the free-space path loss model [1] and the Okumura-Hata model [2]. The distributions predicted with the freespace path loss and Okumura-Hata models do not match well with the true distributions as these prediction methods are generic models with few categories for the regional characteristics and can not handle all sorts of variations.  On the contrary, our approach can extract the regional characteristics and provide more accurate predictions.

Altitude optimization
UAV altitude optimization can be done by choosing the altitude that has the maximum coverage, which is defined as the area under the path loss distribution curve below a specific threshold value. Since the distributions are quantized, the coverage is calculated by summing the values that are below the threshold value.
To investigate altitude optimization, we performed additional simulations for different altitudes, for a few regions. Fig. 5 shows the coverage curves for three different regions at seven different altitudes (40m, 80m, 120m, 160m, 300m, 600m, 1500m), and for five different path loss threshold values (116dB, 119dB, 122dB, 125dB, 128dB). In each row of the figure, we have the satellite image of the region, the coverage as a function of transmitter altitude, and the coverage as a function of path loss threshold.
In the first region, there are relatively few buildings. This means, the region can be covered well with LoS links even when the UAV altitude is low. As the altitude becomes higher, the coverage drops because of the reduction in signal strength. (See the coverage-altitude plot.) As the path loss threshold value is increased, we get more coverage as expected.
In the second and the third regions, there are more buildings; therefore, low UAV altitudes result in less coverage. Better coverage can be achieved by increasing the UAV altitude. As the UAV altitude is increased, the coverage eventually starts to decay due to the increasing distance between the transmitter and receiver. The optimum altitude for the second region is higher than the optimum altitude for the third region because of the existence of high-rise buildings in the second region. For a path loss threshold of 128dB, a coverage of about 95% is achieved when the transmitter is at 600m for the second region; whereas, the optimum coverage is achieved when the transmitter is at 300m for the third region.
We can also make further deductions by investigating the coverage-altitude and coverage-threshold plots. For example, in the first region, where we mostly have LoS links,     the coverage changes little for 40m to 600m. The effect of altitude is more when there are buildings in the region, as in the cases of second and third images. Combining the path loss distribution estimations from the deep network and the altitude optimization process, we have a complete flow from an image to an optimum altitude. We tested the process with the path loss distributions obtained from the deep network. In Table 3, we exemplify coverage values obtained from true distributions and predicted distributions. We show two correct and one incorrect altitude selection. In the first and third regions, both the true distributions and predicted distributions result in the same altitude, 120m and 300m, respectively. In the second example, predicted distributions resulted in incorrect optimum altitudes for two threshold values. Even in those few incorrect cases the coverage values are close to each other at different altitudes, meaning that even an incorrect altitude is selected, similar coverage would be achieved.

CONCLUSIONS
In this paper, we present a deep learning based approach to estimate the path loss distributions in an area for multiple altitudes in a single inference from a 2D satellite image, and then use the predicted path loss distributions to optimize the altitude of a UAV, serving as a base station in an air-toground communication systems.
The training process of the deep neural network is computational demanding; but once the network is trained, the inference can be done accurately in real time. This is a significant advantage over ray tracing simulations.
While we demonstrated the idea for four different altitudes due to the extensive simulation requirements to obtain the training dataset for each altitude, the approach can be extended for more altitudes. The main challenge is the dataset generation process, which require many satellite images and ray tracing simulations on the 3D models corresponding to the satellite images. Similarly, the method can be extended for other transmission frequencies.
Another possible extension of this work is to move the transmitter position in large satellite image, crop a target region centered around the transmitter position, and predict the path loss distributions for each transmitter position using the cropped target region. In this way, both the optimum altitude and position can be determined.