Novel Multilayered Cellular Automata for Flying Cells Positioning on 5G Cellular Self-Organising Networks

There will be a profound impact from 5G to develop smart cities. Questions such as “How telecommunication operators will efficiently provide network infrastructure”, “When and where the quality of service parameters are degraded or below expected” are to be considered. In this context, the use of base stations carried by Unmanned Aerial Vehicles (UAV) acting as flying cells to compensate areas where telecommunications systems are challenged by abnormal conditions during their operation has attracted attention. In this paper, we propose an intelligent solution based on a novel multilayered cellular automata for positioning flying cells and improvement of network capacity in context heavy traffic situations as congested cars in avenues in some hours of the day, crowded events, disaster or hot spot traffic. In our distributed approach, all UAV base stations operate in parallel. The self-organisation arises from an emergent pattern based on applying simple rules in a defined neighbourhood. The proposed scheme considers both backhaul and radio access network constraints, and user requirements in terms of downlink throughput. Simulation results show that the proposed algorithm performs favourably compared with other schemes in terms of all metrics considered. Therefore, we provide a solution for rapid and efficient positioning of multiple UAV base stations to respond in real time to urgent network changes.


I. INTRODUCTION
Mobile communication has been one of the most important technological innovations in contemporary times. The last ten years have seen significant and tremendous development in cellular networks, and an exponential increase in mobile data traffic and the number of mobile subscribers. According to [1], in 2022, monthly global mobile data traffic will reach 77 exabytes, and annual traffic almost one zettabyte. The number of mobile subscribers is estimated to be 5.7 billion, and the number of all devices connected around 12.3 billion. The average global smartphone connection speed will surpass 28.5 Mbps and in North America and Western Europe could The associate editor coordinating the review of this manuscript and approving it for publication was Maurizio Magarini . reach more than 40 Mbps. This incredible traffic growth will require a significant increase in wireless network capacity, leading to the necessity in developing the recent 5G mobile wireless networks and beyond. eMBB (enhanced Mobile BroadBand), mMTC (massive Machine Type Communications), and URLLC (Ultra-Reliable and Low Latency Communications) are the three sets of use cases defined by ITU-R IMT for 2020 and beyond [2], as follows [3]: • enhanced Mobile Broadband (eMBB): data-driven use cases requiring high data rates across a wide coverage area.
• Ultra Reliable Low Latency Communications (URLLC): strict requirements on latency and reliability for mission critical communications, such as remote surgery, autonomous vehicles, or the Tactile Internet.
• massive Machine Type Communications (mMTC): need to support a very large number of devices in a small area, which may only send data sporadically, such as the Internet of Things IoT) use cases. These use cases will be more and more frequent in the context of smart cities. Besides the market requirements, the mobile communication society itself also requires a sustainable development of an eco-system to produce the needs to further improve system efficiencies, such as spectrum efficiency, energy efficiency, operational efficiency, and cost efficiency [4]. According to [5], thanks to the wide service coverage capabilities and reduced vulnerability of space/airborne vehicles to physical attacks and natural disasters, Non-Terrestrial Networks are expected to: • foster the roll out of 5G service in un-served areas that cannot be covered by terrestrial 5G network, such as isolated/remote areas, onboard aircraft or vessels, and underserved areas.
• reinforce the 5G service reliability by providing service continuity for M2M/IoT devices or passengers onboard moving platforms or ensuring service availability anywhere especially for critical communications, future railway/maritime /aeronautical communications.
• enable 5G network scalability by providing efficient multicast/broadcast resources for data delivery towards the network edges or even user terminal. The benefits report not only to Non-Terrestrial networks operating alone but also to integrated terrestrial and Non-Terrestrial networks [4].
Hence, with the 5G network and beyond, the idea of the smart city may finally become a reality. A smart city is essentially a connected city. Any device can connect to this network at anytime, anywhere. One issue faced by urban planners is the infrastructure needed to meet the demands of smart city applications. Besides, fixed infrastructure is expensive (energy, equipment, place, and transmission rent) and it does not guarantee return from feasible investments as most of the time its use is not so smart. Therefore, in addition to fixed infrastructure, a promising approach is to adopt unmanned aerial vehicles (UAVs) as aerial user equipment (UE) or flying base stations (BSs) to address, temporarily, traffic on demand. Specifically, this second option of connection scenario between ground UEs and UAVs is relatively recent.
Expansion of the use of machine learning (ML) techniques to identify and treat areas where Quality of Service (QoS) parameters have been degraded for example due to a temporary high traffic demand generated by crowded events, disaster, or hot spot traffic is expected for 5G networks and beyond in the context of smart cities. Moreover, UAV-based communications can improve the network performance, enhancing network capabilities (e.g., by increasing coverage or capacity) in emergencies by providing rapid service recovery and by offloading traffic in extremely crowded temporary scenarios. This configuration will be centred on swarms of UAVs, which are capable of executing algorithms that allow their coordination and control.
On the other hand, there is, yet no single and simple strategy on how to utilize UAVs as aerial base stations. Furthermore, there are several open problems and challenges in assessing existing designs of UAVs with respect to the 5G network, as physical layer communication aspects, resource management, security, and position. The investigation and creation of strategies using efficient algorithms to guide the installation and positioning of each UAV are crucial. Also, the solutions should be adaptable and flexible in order to meet the scalability, stability, and agility requirements of self-organising networks (SON). Several studies on the optimised positioning of UAVs as BSs or relays have been previously conducted, as shown in Section II.
In order to provide additional capacity to relieve congestion in telecommunications systems, especially when the network is a challenge by conditions that deviate from the standard expected for that location, in this work the problem modelling must define where the UAVs should be, depending on the density of ground users in a particular space region. The solution proposed is based on the UAV-based communications concept, where the UAV swarm must be able to organise itself automatically. To address the UAV positioning problem, a novel Multilayered Cellular Automata (MCA) is proposed. The proposed scheme considers both backhaul and radio access network constraints, and user requirements in terms of downlink throughput. The main objective is to maximise total network coverage (or minimise the number of users in an outage). This article does not provide a final solution but another alternative to treat the positioning problem, attending dynamically the subscribers and the results show that the solution performs favourably compared with other schemes in terms of all metrics considered. Results show the important role that UAVs can play in future networks, especially in dynamic environments. Finally, future wireless networks using UAVs is no turning back.

II. RELATED WORK
In order to overcome the current limitations for future networks, it is clear that more intelligence needs to be deployed so that a fully autonomous and flexible network can be enabled [6]. Because of their flexibility, adaptability, and mobility capabilities, regardless of the situation, flying base stations are expected to have an important role in the next generation of mobile networks. Despite their many benefits, integration of UAVs into terrestrial networks introduces some challenges, both from a theoretical and practical viewpoint, such as, e.g., propagation channel modelling, trajectory planning, energy-efficient design, radio resource allocation, and user association [7].
According to [8], UAV communication has many potential applications, mainly categorized as: the UAV working as aerial base stations to support ground users, in which this kind of use can be applied in many areas, such as recovering the natural disaster, remote areas, etc; UAV working as a relay to support remote areas; and UAV communication to send/receive real-time information, for sensing applications, for example.
The main energy expenditures of UAVs with communication capabilities are due to the aircraft operations (i.e., hovering and flying) and radio transceivers [7]. Therefore, unlike terrestrial networks, a challenge when installing UAVs for communication is the limited energy storage capacity. An interesting alternative to cope with this issue was proposed by [9]. They suggested the use of specialised solar-powered charging stations distributed in strategic places around the city. Thus, whenever a UAV is out of power it could be recharged at its nearest charging stations while maintaining its service. The work in [8] investigated an energy-efficient UAV communication via designing the UAV trajectory path. The main novelty was to consider throughput, trajectory, transmit power, the speed of UAV and the UAV propulsion energy consumption to formulate the UAV energy-efficiency maximisation problem.
The interference also offers challenges when adding new UAV base stations on the area of interest. This is because certain user equipment (UE) may suffer interference from different nodes, including other UAV base stations. This may become a problem when the signal to interference and noise ratio (SINR) is below a threshold and UEs cannot demodulate the intended signal. The authors of [10] proposed a distributed optimisation model and a maximising algorithm to find a locally optimal solution in order to optimise the deployment of UAVs for maximum coverage and minimum interference in cellular networks based on local information such as the densities and the positions of the nearby UAVs. Also considering the presence of co-channel interference generated by multiple UAVs operating within a specific target area, the authors of [11] presented a coordinated multi-UAV strategy that unveiled that the SINR threshold, the separation distance, and the number of UAVs and their formations should be carefully selected to achieve the maximum coverage area inside and to reduce the unnecessary expansion outside the target area, reducing the co-channel interference. The authors of [12] proposed to jointly optimize the 3D UAV positioning and path loss compensation factor. According to [12], the positioning problem becomes even more complex as UAV changes its height, which in turn varies the channel conditions and reduces the coverage on account of high co-channel interference.
The security of the information that travels on the network is also an important issue. The authors of [13] emphasise that massive deployments of UAVs require coordination through radio signaling. For example, UAVs need to report their presence and communicate with other UAVs, terrestrial networks, and ground users. This places the mobile network at risk of suffering malicious attacks.
The positioning of UAVs affects various network performance metrics, such as throughput, coverage, connectivity, and revenue [14]. Challenges related to positioning include resource and power allocation, trajectory optimisation and user association [12]. To overcome the challenges, several research groups have investigated the UAV positioning problem recently, using the most diverse techniques. For example, in order to maximise the instantaneous sum rate of all ground pairs, the authors of [15] addressed the optimal design of UAV positioning and transmit power allocation for a multi-user UAV-relaying system using block coordinate descent and successive convex optimization (SCO) techniques. Numerical results showed that using UAV as a relay has remarkable advantages compared to direct ground communications in case of highly unfavourable channels and sparsely distributed ground devices. In [16], the authors proposed a framework for quality of experience (QoE)-driven deployment and dynamic movement of UAVs. For this, a three-step approach based on an iterative-GAKmean and Q-learning algorithms was proposed.
The authors of [17] studied the queuing delay behaviour of software defined coexisting UAV and WiFi access point via UAV positioning and WiFi traffic offloading. Software-Defined Networking (SDN) is a relatively recent technology and features a prominent trait of a global vision that enables unified control over network entities. How to improve the performance of multi-UAV enabled software-defined cellular networks with wireless backhaul was addressed in [18]. They developed an efficient distributed alternating maximisation iterative algorithm to solve the 3D UAV positioning, user scheduling and association, and spectrum resource allocation.
Besides the UAV positioning for wireless coverage, the deployment of UAV-mounted base stations in disaster scenarios has also gained attention. In such situations, the collapse of local communication infrastructure is a major issue due to the destruction of buildings, antennas, power sources, and other infrastructures [19]. In [20], the authors proposed a distributed approach based on a Q-learning solution to find the best position of multiple UAV base stations in an emergency scenario. The global reward was given by the total number of users covered. The authors emphasize that the optimization problem poses a difficult challenge, due to the varying conditions of the environment, such as users moving with different speeds, users having different requirements, and the UAVs being limited in both RAN and backhaul resources.
The authors of [19] proposed an algorithm that maximises the number of serviced users with a minimum number of UAVs. For this, they propose a computer vision approach, which identifies geographical areas of high user concentration, along with their user count. Next, they present a mathematical model that performs a joint optimization of user-UAV association and UAV positioning in the selected area. Considering two different types of users (indoor and outdoor users) and the use case of UAV-aided emergency rescue, the authors of [21] presented a heuristic approach with a genetic based algorithm to find an efficient deployment of a minimum number of UAVs that guarantees the connection requirements.
Also, some works have explored the temporary use of UAVs acting as flying base stations to supplement existing ground base stations when a cellular network is overloaded during a crowded event. For example, the UAV positioning for outdoor and indoor users in small coverage areas is considered in the work found in [22]. For this, Particle Swarm Optimization (PSO) and K-means with Ternary Search (KTS) algorithms were used to find the 3D UAV positioning to minimize the UAV transmission power and to satisfy the data rate for users. Using real dataset extracted from the Call Detail Records (CDR) of Milan, the authors of [23] also presented an approach to optimise drone deployment for cellular communication coverage during crowded events. They divided the method into two parts: the detection of overloaded cells using a machine learning algorithm called Long Short-Term Memory (LSTM) and the deployment of drone base stations into account the energy constraints.
The authors of [24] addressed the coverage overlapping problem of serving arbitrary crowds in 3D drone cellular networks. They proposed an enhanced data-driven 3D positioning (eDDP) algorithm which solves the considered positioning problem in a three-stage iterative searching framework. In [25], unlike most of the previous works which typically treat UAVs as relays or base stations, the UAVs that relay the data from other UAVs also have their sensing tasks, hence they consider the UAVs as flying mobile terminals in the UAV sensing network.
Despite all the advantages, due to the high complexity and heterogeneity of these networks, model-based design approaches, often relying on restrictive assumptions and constraints, exhibit severe limitation in real-world scenarios [7]. Therefore, the investigation and creation of strategies using efficient algorithms to guide the installation and positioning of each UAV in the target region is a hot topic.
Although several studies are addressing the positioning of UAVs, we understand that this subject is very current and is not yet exhausted.

A. OBJECTIVES AND CONTRIBUTIONS
In order to give another option that can be proposed in the list of potential solutions to solve the coverage and traffic bottlenecks in 5G and future generation networks, in this paper we consider a two-tier network with macrocells and UAV base stations (UAV-BSs) acting as flying cells that provide additional capacity to release congestion in the radio access network (RAN) where and when telecommunications systems are challenged by abnormal conditions during their operation, such as congested car avenues during certain hours of the day, crowd events, disaster or hot spot traffic. In this case, the target benefit is to offload as many users as needed to the UAV-BSs. What this work aims to do is to provide a robust and scalable solution for self-organising network (SON) without a centralised controller but with simple local coordination among neighbours. The concept of emergence is an essential part of self-organising systems in nature and it is not different for self-organising networks.
In this study, we apply cellular automata theory to simulate the distributed topology control. The solution presented is based on the users' position and obstacles sensed by each UAV-BS and the exchange of information between neighbouring UAV-BSs. For this, we propose a novel Multilayered Cellular Automata (MCA) for flying cells positioning on 5G cellular self-organising networks. We define new 3-dimensional cellular automata, formed by three overlapping 2-dimensional layers, where each layer models a part of the system, formed by identical elements. The layers exchange information among themselves in order to find the best possible positions of a UAV swarm, aiming to maximise the number of users covered by UAV-BSs and therefore minimising the number of users without service.
In our distributed scheme, all UAV-BSs operate in parallel and the interaction between layers leads to dynamic and complex behaviour. The proposed scheme considers both backhaul and radio access network constraints, and user requirements in terms of downlink throughput. Simulation results demonstrated that our proposal solution outperforms only fixed macrocell, a fixed UAV random position, and a scheme based on genetic algorithm in terms of QoS for the user equipment, with low computational effort. Besides, we show that our positioning method is scalable, agile, and stable to respond in real time to urgent changes in 5G cellular self-organising networks.
Our contributions in this paper can be summarized as follows: • We provide a deep discussion about the role of UAV communication and its challenges on 5G and beyond networks.
• We propose an intelligent solution based on novel multilayered cellular automata, in order to tackle the problem of user coverage in a critical and temporary situation.
To the best of our knowledge, it is the first based on cellular automata theory proposed as a solution for this problem while also considering different network conditions, such as user mobility, user requirements, and network constraints.
• We present illustrative use cases through simulations, with numerical results that show the potential benefits of the proposed scheme.
• We believe that the proposed algorithm requires no global information or computation, instead, it is a distributed one, which is effortless to implement and practical in real applications. The rest of the paper is organised as follows: In Section III, the system model is presented. In Section IV, the novel multilayered cellular automata are designed. The metrics used to measure the performance of the system are also presented in Section IV. Section V presents the simulation numerical analysis and discussions on the performance of the proposed method and the benchmarking strategies. Section VI presents the limitations of the study and section VII summarises the paper and finalises this paper with the main conclusion.

III. SYSTEM MODEL
The proposal addresses the deployment of an intelligent, mobile and adaptable network, through the use of small cells installed on Unmanned Aerial Vehicles (UAV-BS) to compensate areas where telecommunications systems are challenged by abnormal conditions during their operation, such as overload or site outage in cellular mobile networks. The network is composed of a macrocell base station that provides wireless backhaul links to UAV-BSs in order to improve the network capacity. The proposed scheme considers both backhaul and radio access network constraints, and user requirements in terms of downlink throughput.
In order to connect to the network operator, the UAV-BSs are connected to the macrocell base station through a dedicated out of band backhaul link, composed of a microwave link [20]. Note that the UAV-BSs do not have a direct backhaul connection to the operator, thus the traffic from UAV-BSs are routed to the macrocell base station and then to the network. It is also considered that the UAV-BSs use a dedicated spectrum slice of their band to perform this connection to the macrocell base station. A similar strategy is considered in [20]. It is assumed that the link between UAV-BSs and macrocell base has a very large capacity, as considered in [20] and [26]. We consider UAV-BSs exchanges positioning information with other UAV-BSs that are within a communication radius and all UAV-BSs are equipped with onboard Detectand-Avoid capability to avoid collision with other UAV-BSs and terrain obstacles.
In our work, to locate users on the floor and perform positioning heuristics, we assume that each UAV-BS carries a camera and a detection system. The camera captures images within a coverage area and detects users by means of a computer vision method, based, for example, on a deep learning technique. Although this contribution (algorithm for locating mobile users on the floor) is not part of the scope of our work, we are based on works such as the one presented in [19]. In it, the authors propose an efficient computer vision technique to identify areas with a high density of low mobility or stationary users. The authors adopt an adaptive approach to identify the potential areas of high user concentration. This is done using a multistep process, which includes image acquisition, classification, and crowd density estimation. In this proposal, we assume that the image classification system is also able to identify people carrying user equipment, such as cell phones, tablets, and notebooks, and therefore they are potential users of a mobile network. However, the proposed approach is not limited to these technologies and other discovery mechanisms could be used, such as the one based on wireless communication technologies. According to [27], the IEEE 802.11 standards are potential candidates for these technologies. The main features of the proposal are illustrated in Fig. 1.
In wireless communication systems, information is transmitted between a transmitting antenna (TX) and a receiving antenna (RX) through electromagnetic (EM) waves. As these waves propagate in the environment, they suffer path loss, in other words, a reduction in power density. In this work, we consider the COST 231 Walfisch-Ikegami model [28] to estimate the path loss between the macrocell base station and user equipment in built up areas. The model combines the Ikegami and Walfisch-Bertoni models with the results of measurements made in the city of Stockholm for frequencies in the range of 800 to 2000 MHz and it is restricted to flat urban terrain. It takes into consideration obstructing building height and street width, as well as other factors related to the urban environment.
For the air to ground communication, although line-ofsight (LOS) links are expected to be widely explored, links should also be occasionally blocked (NLOS, non-line-ofsight) due to obstacles such as buildings, terrain morphology, other UAVs, foliage, etc. Consider a UAV-BS located at a height of h meters transmitting signals to user equipment on the ground. To estimate the path loss between the UAV-BS and user equipment we adopt a suitable model detailed in [29]. The model considers line-of-sight (LOS) and non-lineof-sight (NLOS) components along with their occurrence probabilities separately. Hence, in addition to the free space propagation loss, different excessive path loss values are assigned to LOS and NLOS links. Fig. 2 illustrates the coverage area by a UAV-BS located at a height of h and a ground user at the radius of R from a point corresponding to the projection of UAV-BS onto the ground.
The distance d between the UAV-BS and the ground user is The elevation angle θ (in radians) of UAV-BS with respect to the ground user is given by The average path loss (PL) for LOS and NLOS links are, respectively where ξ LoS and ξ NLoS are the average additional loss to the free space propagation loss which depend on the environment, f c is the carrier frequency, c is the speed of light and d is the distance between the UAV-BS and the ground user. The probability of having LOS connections at an elevation angle of θ is given by where α and β are constant values that depend on the environment (rural, urban, dense urban, etc.). Also, the probability of NLOS is Finally, the average path loss is given in terms of the UAV-BS altitude and coverage radius Consider U the set of users U = {1, 2, . . . , N u }. N u is the total number of users that requires data service from the mobile network. B is the set of all base stations B = {1, 2, . . . , N b }, where N b is the total number of base stations in the scenario, including macrocell and flying smallcells. The received signal power PRX (in dB), for user i ∈ U , from base station j ∈ B is denoted by PRX i,j . We calculate where PTX m and PTX d are the power transmitted (in dBm) by the macrocell and UAV-BS, respectively. Likewise, PL m is the path loss between the macrocell base station and the user equipment and PL d is the path loss between UAV-BS and the user equipment.
According to [30], the signal to interference plus ratio (SINR) is calculated as where SINR i,j is the pair of user equipment and base station, and is the noise power. To calculate the SINR, PRX and noise are expressed in linear form. Consider BW the bandwidth (in Hz). The Shannon's channel capacity formula [30] is used to calculate the throughput T i,j for a user i allocated to a base station j, in bits per second According to [31], the required backhaul throughput, µ j , is computed based on the cumulative radio throughput of users served by base station j, and the technology and network architecture dependent overhead O j . The required backhaul throughput is expressed by (10) where U d is the total number of users served by UAV-BS j in that time slot and T i,j is the actual throughput of the user i. A similar strategy is considered in [20]. In this work, users are allocated to the best base station according to their SINR, considering the available backhaul capacity during the association process and the radio access network (RAN) status. If the SINR i,j of a user i is above a certain threshold and if the base station j meets the following requirements, then the user is allocated to the base station in that time slot: (i) the base station has enough resource blocks (RBs) available to meet the throughput requirement of the user; (ii) the sum of the backhaul throughput of the base station doesn't exceed its capacity with this action. If the user or the base station does not satisfy some of these requirements, the next base station is attempted, based on the highest SINR. After all base stations are attempted, if a user is still unable to be allocated with a base station, the user is considered to be in an outage (out of coverage service) for that time slot. A resource block is the smallest unit of resources that can be allocated to a user. The required resource blocks are calculated in terms of the required throughput of user i and the SINR i,j experienced concerning base station j.
Among the channel effects, the Doppler effect is caused by the relative movement between the UAV and the ground station [32]. According to [33], due to UAV motion, there are Doppler frequency shifts that depend on the velocity of the UAV and the geometry. The effect of the Doppler spread is typically negligible compared to carrier frequency at lower speeds [33]. In this work, we assume a UAV maximum speed of 15 m/s, such as in [27]. This value depends on the UAV type and for this reason, has been set to the average speed of a standard UAV [27]. Note that in a real scenario, the UAV-BSs could perform the new position search at certain time intervals. So, the aerial node is expected to be stationary (or mostly so) in space for a given time. Many of the air to ground channel measurements in the literature have been conducted with fixed wing aircraft with maximum speeds varying from 17 m/s to 293 m/s [33]. Therefore, for simplicity and considering that the UAV speed in our work is relatively low, its effect would not be significant or the Doppler effect due to UAV's mobility could be well compensated, as well as in the studies [34] and [35]. That is why we do not consider the Doppler effect on network performance.

IV. PROPOSED SOLUTION A. CELLULAR AUTOMATA
The Handbook of Dynamic System Modelling [36] explores a wide range of different types of modelling methods available for dynamic systems, including modelling dynamic systems with Cellular Automata. Cellular Automata (CA) are a mathematical and numerical modelling approach to spatio-temporal processes. Cellular Automata are completely discrete models in terms of states, space, and timewise. Besides, they are decentralised spatially extended systems consisting of large numbers of simple and identical components with local connectivity. The state of each simple component (usually referred to as cells) changes synchronously and is triggered by state updates in neighbouring cells [37]. These updates are based on local rules and the current states of the cell and the states of its neighbours [38]. All components operate synchronously in parallel.
Cellular Automata are examples of mathematical systems that may exhibit self-organising behaviour [39]. According to [40], even starting from complete disorder, their irreversible evolution can spontaneously generate ordered structures. Cellular Automata have also been used as abstract models for studying emergent cooperative or collective behaviour in complex systems [36]. The idea of CA was invented by John von Neumann and Stanisław Ulam in the 1940s and 1950s to describe self-reproductive and evolvable behaviour of living systems [36]. Afterward, Stephen Wolfram developed the CA theory [40]. Cellular Automata have attracted researchers from a wide variety of disciplines for the last years, and their applications have been proposed in almost all branches of science, as explored in [41]- [47] and [48]. This is due to their simplicity and to the enormous potential they hold in modelling complex systems, in spite of their simplicity. The operating principles of the CA are inspired by the emergency and self-organisation systems found in nature. This is one of the main reasons why CA is a suitable approach to the design of self-organised networks [49].
The dynamics of the CA develop in a D-dimensional discrete spatial grid (usually, D = 1, 2, or 3). In the two-dimensional (2D) case, multiple types of neighbourhoods can be defined but the most common are the Von Neumann, Moore, and Hexagonal neighbourhood [36], as shown in Fig. 3(a). Von Neumann neighbourhood has five cells, consisting of a core cell and its four immediate non-diagonal neighbours and has a radius of 1. The radius of a neighbourhood is defined to be the maximum distance from the core cell to either horizontal or vertical cells in the neighbourhood. Moore neighbourhood has nine cells, consisting of the cell and its eight surrounding neighbours and with a radius of 1. On the other hand, a hexagonal neighbourhood has seven cells, consisting of a centre cell and its six surrounding neighbours, and has a radius of 1. The most popular boundary conditions are null boundary (the extreme cells are connected to logic 0-state), periodic boundary (the extreme cells are adjacent to each other) and fixed boundary (if the extreme cells are connected to any fixed state value) [50], as shown in Fig. 3(b).
We can define 2-dimensional cellular automata as a quadruple (L, S, F, N ), where L is a regular lattice (the elements of L are called cells), S is the set of possible states of the cells, F is the state transition function of the cellular automata and N is the neighbourhood of a cell. In other words, a CA model consists of a set of cells arranged along a regular d-dimensional discrete spatial grid, where each cell can be in one of a finite number of states.
Consider L the set of square cells in the lattice 2D at position (x, y), L = φ 1 , φ 2 , . . . , φ Q . Q is the total number of cells in the lattice L. N is the neighbourhood set, a finite where φ + n ι designate the cells belonging to a given neighbourhood of cell φ and t is the transition time of a cell moving from its current state to the next state. One iteration step of the dynamical evolution is achieved after synchronous (i.e., simultaneous in time) application of the local rules to each cell in the grid [36]. The work in [37] highlights relevant properties of CA: • Cellular Automata systems are complex systems but consist of a large number of simple objects.
• Evolution of each component is based on interactions with their localised neighbourhood.
• They follow simple rules and result in an emergent pattern.
• All components operate synchronously in parallel. This makes CA an appropriate algorithm for modelling self-organising systems, in which there is the emergence of a pattern from a state of randomness [37]. This can be achieved without a centralised controller, but with simple local coordination between neighbouring components.

B. NOVEL MULTILAYERED CELLULAR AUTOMATA FOR FLYING CELLS POSITIONING
In our work, we propose a distributed approach for positioning flying cells based on a novel Multilayered Cellular Automata (MCA). We define new 3-dimensional cellular automata, formed by three overlapping 2-dimensional layers, as illustrated in Fig. 4. Each layer models a part of the system, formed by identical elements. The layers exchange information among themselves in order to find, in a distributed way, the best possible positions of a UAV-BS swarm, aiming to maximise user coverage. Users are distributed randomly in the scenario with different requirements (in terms of download traffic) and mobility characteristics. UAV-BSs have limited resources in terms of RAN and backhaul. The basic idea is to locate the UAV-BS where there are more users and fewer UAV-BSs available. To locate users on the ground, we assume that each UAV-BS carries a camera and a detection system. The camera captures images within a coverage area and detects users employing a computer vision method, based, for example, on a deep learning technique.
In our work, from a practical point of view, we assume that the UAV-BSs are equipped with onboard Detect-and-Avoid capability, with a 360-degree radial vision to avoid collision with other UAV-BSs and terrain obstacles. For this, we rely on works like the one presented in [51]. They propose a navigation system based on object detection and deep reinforcement learning (DRL) that only exploits sensing data obtained by a monocular camera mounted on the UAV. Their framework not only leads to collision-free trips, but it also reduces flying times towards given destinations.
We assume UAV-BS exchanges positioning information with other UAV-BSs that are within a communication radius. In this research, we consider that UAV-BSs are flying at a fixed height. To transmit and receive signals in highly mobile environments, all the UAV-BSs and UEs are equipped with omnidirectional antennas and LTE (Long Term Evolution) [52] interfaces. Also, the UAV-BSs are equipped with microwave (mW) [20] interfaces in order to establish wireless links with the macrocell and other UAV-BSs within the communication range.
The algorithm goal is to move each UAV-BS to the direction in which there are fewer UAV-BSs (provided by Layer 1) to serve the largest number of the users to be connected (provided by Layer 2), given the environment and motion restriction (provided by Layer 3) and then maximise the number of users on the ground covered by the set of UAV-BSs available. Each layer is defined as a five-tuple (L, , S, F, N ), where is the set of layers.

1) LATTICE
We consider 3-dimensional cellular automata, formed by three overlapping 2-dimensional layers. The lattice of each layer is a linear array of square cells. Each cell corresponds to a subarea of the total area of the considered scenario. For all layers, we adopt a null boundary condition.

2) LAYERS
We design cellular automata with three layers, as illustrated in Fig. 4. Layer 1 maps the current position (x, y, h) of UAV-BS, where h is the height. Each cell in Layer 2 maps the current number of users on the ground corresponding to that subarea. Finally, Layer 3 maps the current limits of the considered area and the information of motion restriction for UAV-BSs, indicating to which cells the UAV-BS may or may not move. Layer 3 depends especially on the environment being considered and corresponds to obstacles or regions of the scenario in which the flight of UAV-BSs is not allowed for safety or operational issues.

3) STATES
The states are defined according to the layer. In Layer 1, a cell of value 1 indicates the presence of a UAV-BS in that cell. Cell with value 0 indicates the opposite. The states in Layer 2 correspond to the integer number of users mapped to each cell up to a certain threshold η. For the number of users above the threshold, the threshold value is adopted. Note that states in Layer 2 change according to the mobility of the users since mobility changes the density of users on the ground. In Layer 3, a cell with value 1 indicates that the move to that cell is allowed. A value greater than 0 and less than 1 is assigned to the cells to which movement is allowed but restricted (i.e, cells that are neighbours of more than one UAV-BS simultaneously), and cells with value 0 indicate that movement to them is strictly prohibited. The set of states of each layer: in Layer 1, where ϑ 1 (φ, t) = 1 if the cell φ in time t is occupied by an UAV-BS and ϑ 1 (φ, t) = 0, if is the opposite.

4) STATE TRANSITION FUNCTIONS
State changes occur according to the current state of the core cell and its eight neighbouring cells, according to the transition rules. In general terms: (i) the UAV-BS should move to where there are fewer UAV-BSs available and more users to be covered. (ii) the new position is not occupied by another UAV-BS. (iii) the new position requires the existence of at least one UAV-BS or macrocell within the communication radius to maintain connectivity.

5) NEIGHBOURHOOD
To all layers, we adopt a Moore neighbourhood of radius 1. The Moore neighbourhood has nine cells, consisting of the core cell and its eight surrounding neighbours, as illustrated in Fig. 5 The proposed algorithm has two phases. In the first phase, each UAV-BS computes its future position (neighbour cell). Then, in the second phase, it decides whether it should move to that position or not.

6) FIRST PHASE -WHERE TO GO?
The algorithm starts by adding a null boundary to all Layers. Then, all cells in the boundary of all layers are set to state 0. In Layer 1, cells that are occupied by UAV-BSs are set to state ϑ 1 , and cells that do not have UAV-BS are assigned to state ϑ 2 . States in Layer 2 are updated according to the number of users that occupy each cell at the time t, up the threshold value η. Finally, Layer 3 is updated according to the environment and with the mapping of neighbouring cells corresponding to cell φ in Layer 1. Hence, state 3 is assigned to cells that are in the corresponding neighbourhood (in Layer 1) of more than one UAV-BS, aiming to prevent one UAV-BS from being immediately next to another (avoiding high interference). Cells that UAV-BSs cannot move to, such as those that correspond to obstacles or cells that are already occupied by another UAV-BS are set to state 2 . State 1 is assigned to all other cells, to which UAV-BSs can move without restriction.
Each UAV-BS flies at a fixed height (h) and can move to any direction of movement on the x and y axis (N, S, E, W, NE, NW, SE, and SW) or stay still, as illustrated in Fig. 5. For example, if a decision would take the UAV-BS out of the grid, it stays still. The decision is distributed and happens as follows.
In order to decide which direction (N, S, E, W, NE, NW, SE, SW and stay) the UAV-BS should move, the algorithm calculates a weight ω for the orientation of movement where there are fewer UAV-BSs and more users to be covered. Given the current position (x, y) of the UAV-BS in Layer 1, the UAV-BS considers the number λ of UAV-BSs that are within its communication radius δ, in each of the four orientations (East, West, North and South) shown in Fig. 5: Next, the UAV-BS computes the number of UEs that are in its neighbourhood of radius 1 in each of the four orientations (West, East, North, and South) in corresponding Layer 2.
A ratio of λ/ is calculated to each orientation West, East, North, and South) and we assigned a weight ω > 1 to the orientation with the smallest ratio. We set a weight ω = 1 to the others.
Next, the weight ω of higher value is associate with each direction, such that orientation East corresponds to directions NE, E, and SE; orientation West corresponds to directions NW, W, and SW; orientation North corresponds to directions NW, N, and NE; and orientation South corresponds to directions SW, S and SE, as illustrated in Fig. 5.
In order to calculate which direction ϒ (N, S, E, W, NE, NW, SE, SW and stay) the UAV-BS should move on the x and y axis, the algorithm calculates the product ϒ of the weight ω in that direction with the number of users (state in layer 2) κ and the restriction of movement (state in layer 3) : For example, if the weight of orientation North has a higher value, the product ϒ NE in the direction NE is For the ϒ stay , we consider a weight ω = 1. Finally, we have: • Rule 1: the future position (in the neighbour cell) of the UAV-BS should be that with the biggest product ϒ.
• Rule 2: if two or more directions have the same value of ϒ, the choice between them is random. If all directions have no users (κ = 0) then we apply the following rules: • Rule 3: the UAV-BS should move to any direction in the orientation that has fewer UAV-BSs.
• Rule 4: if there is no UAV-BS in any orientation (λ = 0) or if all directions have the same number of UAV-BS, then the UAV-BS should not move. These rules are similar to the rules considered in [53], [54] and [55]. And so, ends the first phase of the algorithm. If not, the UAV-BS must stay still in the same position. The computation ends when all UAV-BSs perform the local rules. After the decision, the UAV is ready to move to the computed position. In this proposal, in order to avoid a collision in a real scenario, we propose a displacement strategy described in the subsection ''On collision avoidance'', of this section. After all UAV-BSs perform the displacement strategy, the states in Layer 1 are updated according to the new positions of UAV-BSs. Layer 3 is updated according to the new Layer 1 and also according to the local obstacles sensed by the UAV-BSs in the new position. Note that Layer 2 presents the distribution of users in the scenario and will only be updated in order to give mobility to the users, thus modifying the number of users per cell. It is worth mentioning that the proposed cellular automata do not suffer from the effects of UAV speed. This is because in terms of the algorithm, for decision making we consider an episode as a snapshot of the scenario. That is, during computing, users are considered to be static, as well as the other UAVs in their range of communication. Therefore, layer 1 is considered static when computing the next position.

8) STOPPING CRITERIA
In our algorithm, we decided to divide each simulation into episodes. We consider an episode as a simulation time interval. For example, if a run corresponds to a simulation time of 100 seconds, an episode corresponds to 1 second. So, we have 100 episodes. Also, We consider an episode as a snapshot of the scenario. The mobility of users is taken into account between episodes. On the other hand, each episode is divided into iterations. During iterations of an episode, users are considered to be static, while the UAV-BSs try to find the best position according to the multilayered cellular automata algorithm. The stopping criteria of the algorithm are based on two conditions: where D is the set of all UAV-BSs available, ι is the size of the neighbourhood and κ is the number of users in each neighbour cell. However, in a real scenario, there is no notion of episodes, thus the UAV-BSs can perform the position change algorithm in certain time intervals, for example, and move according to the scenario in that time interval.

9) PERFORMANCE METRICS
In order to evaluate the proposed strategy, the following metrics are considered for the performance assessment and comparison with competitive solutions: Percentage of users in an outage, Global downlink throughput, Percentage of users with downlink throughput requirements met, Percentage of users served by UAV-BSs, Percentage of users served by macrocell, Coverage ratio, and Backhaul throughput. If a user fails to try to be connected to a base station and is left without service, we consider that user in an outage. The percentage of users in an outage is given by where is the total number of users served by base station j, N b is the total number of base stations, N u is the total number of users and N o is the total number of users in an outage. We calculate the Global downlink throughput T t as the cumulative throughput of all served users in the system; that is the sum of all individual achievable throughput T : The percentage ρ of users with downlink throughput requirements met (N r ) is computed considering all users which have an allocated throughput (T i ) equal or greater his/her requirement (τ i ), such that, i ∈ ϕ, and ϕ is the set of users with T i τ i . This percentage is given by In our proposal, if a user has not been connected to any cell, the user is considered dissatisfied and the throughput is assumed to be null.
Considering all users connected to any base station, the percentage of users served by UAV-BSs ( u ) is calculated considering all users connected to a UAV base stations, while the percentage of users served by macrocell ( m ) is computed all users connected to a macrocell: (27) where N d is the total number of UAV-BS and N m is the total number of macrocells. We calculate the coverage ratio N c as the opposite of users in outage, thus, as the ratio of the number of users connected to some base station to the total number of users: Considering the backhaul limitations in terms of throughput, we calculate the required backhaul throughput as (10). In this work, the amount of throughput that the user consumes from the backhaul is considered to be 30% higher than its actual throughput (network architecture dependent overhead). A similar strategy is considered in [20].
The evaluation parameters of the proposed solution were made in order to enable the evaluation of the solution in terms of both backhaul and radio access network constraints, and user requirements in terms of downlink throughput. Besides, the proposed solution seeks to tackle the problem of user coverage in a critical and temporary situation. The evaluation was based on publications such as [20], [56], [57] and [58]. The proposed algorithm is shown in Algorithm 1. From a practical point of view, we assume that all UAV-BSs are equipped with onboard Detect-and-Avoid capability to avoid collision with other UAV-BSs and terrain obstacles. We also assume that after computing the new position, the UAV performs a displacement strategy, in order to avoid collisions with other UAVs during the flight to the new position. For this, in our proposal we assume that there are four signalling states (in terms of movement) that the UAV sends and receives within its UAV communication radius: ''in computing'', ''ready to move'', ''parked'' and ''on the move''. In the proposed mechanism, the UAV can only start the displacement strategy when all other UAVs within the communication radius signal that they are in the ''ready to move'' or ''parked'' state. We understand that although they operate in parallel, each UAV can take a relatively different time to finish computing. Note that the calculation of the new position was based on the current position up to that time.
Thus, while the UAV is computing the new position, it signals that it is ''in computing''. At the end of the computation, it starts to signal that it is ''ready to move''. When the condition to start the displacement strategy is met, the UAV will initiate attempts to initiate the displacement. In our work, at this point, we assume a scheme inspired by the CSMA/CA of IEEE802.11. In this strategy, a UAV that wants to move must initially feel if another station is moving, that is, if another UAV is ''on the move''. If there is no other UAV ''on the move'', the UAV passes a signal that it is ''on the move'' and starts moving to the new position. This is so that another UAV within the communication radius does not move at the same time, avoiding collisions.
While moving, the UAV continues to send ''on the move'' signalling messages. After the movement, the UAV starts to signal that it is ''parked'' and begins to report the new position. Other UAVs will do the same scheme until all UAVs finish the displacement phase.
Note that the UAV only moves in its immediate vicinity and is equipped with a system to prevent a collision. Also, the UAV reports its state as well as its current position. Thus, if the new computed position is occupied by another UAV in the ''parked'' state, the UAV remains in the same position and starts to signal that it is ''parked''. If the new position is occupied by another UAV in the ''ready to move'' state, the UAV does not move and remains in the ''ready to move'' state and waits for some time to check again, until the new position is free or is occupied by another UAV in the ''parked'' state.
When an UAV is ''parked'' and all UAVs within its communication radius also signal that they are ''parked'', the UAV is authorised to start computing the new position and starts to signal that it is ''in computing''. It is worth mentioning that the movement strategy is only given within the communication radius of UAVs, so it is possible that more than one UAV moves at the same time in the network, but they don't collide because they are at a much higher distance (higher than the communication range of UAVs). In the same context, another alternative would be to change the flight altitudes of UAVs in case of a potential collision, as proposed in [27] and [59].

A. SIMULATION SCENARIO
According to [60], UAV deployment is an NP-hard problem, so the optimal position is impossible to derive from the mathematical deduction. Therefore, many studies are using heuristic algorithms to solve this problem. Among the many heuristic algorithms, in this paper, we consider a Genetic Algorithm (GA), which is one of the most used to solve the problem, and a fixed UAV random position to compare the performance of our proposal for UAV swarm deployment. In the fixed random position, all UAVs are positioned at random locations and remain in these positions during the simulation time [20].
The GA is a population based nondeterministic optimisation method that was developed by John Holland in the 1960s VOLUME 8, 2020 and first published in 1975 [61]. GA is a search algorithm inspired by the process of natural evolution. Similarly to living organisms adapting to their environment over generations, solutions in the GA also adapt to a fitness function over an iterative process using techniques such as inheritance, mutation, selection, and crossover [62]. This algorithm is typically used to generate useful solutions to optimisation and search problems.
In this work, we use the GA to simulate the evolution of a population of UAV positions adapting to the cost function. Using a similar solution designed for cellular automata, we divided the simulation area into square cells of 100 × 100m. So, in our implementation, we use an approximate cell decomposition of the simulation area using a 2D grid where each cell C in the position (x, y) of the matrix represents the number of users at that location. We consider that a cell cannot be occupied by more than one UAV. Considering a population of size P, in which each individual is formed by a chromosome of size N and N is the total number of UAVs in the scenario, each gene is an integer, representing the position (x, y) of a given UAV in the matrix, and together they characterize a possible solution.
The GA cost function should then maximise the number of UEs distributed in the cell C(x i , y i ) occupied by the UAV i and its eight immediately neighbouring cells (N, S, E, W, NE, NW, SE, SW), as in Fig. 5. We define our cost function as follows: In this work, GA is parameterised as follows: population sets to 200, and the number of chromosomes sets to 10, 20, or 30, according to the number of UAVs considered in the evaluated scenario. Other parameters such as crossover rate and mutation rate set to 0.8 and 0.1, respectively. After exhaustive testing, we set 1000 as the maximum number of generations. As stopping criteria, we consider: when the algorithm meets the maximum number of generations; or when the best fit of the population does not increase during 100 consecutive generations.
For all experiments, a simulation scenario in MATLAB has been built in order to show the effectiveness of the proposed solution. It is considered a functional terrestrial network in the area, composed of a macrocell, but the network operator identified the need to temporarily compensate for the quality of service parameters in that region of space.
For this scenario, it is considered that the operator chose to deploy UAV-BSs in a temporary mobile infrastructure as long as there is a need. Regarding the UAV-BSs positioning, three approaches are tested: fixing the UAV-BSs in random positions, deploying movable and intelligent UAV-BSs using the proposed multilayered cellular automata (MCA) solution or the genetic algorithm (GA) solution. We add a remark that, to the best of the author's knowledge, no similar approaches are using multilayered cellular automata or other simple computational models made for this purpose with the ability to exhibit complex behaviour in a real situation that copes with the changes in the environment and scalable enough.
We assume an area with a size of 2000m × 2000m. Within this area, one macrocell, up to 30 UAV-BSs, and up to 400 users are deployed. We consider all users as active users. We assume that an active user is one who has a downlink requirement to be served. The UAV-BSs are randomly dropped at the beginning of the simulation while the macrocell is located at the centre of the simulation area. The active users are distributed based on the random distribution function. Different users have different characteristics in terms of both mobility and downlink throughput requirements. The users move according to the random waypoint mobility model [63]. For variability, the speed is randomly selected in a range from 0 to 13.89 m/s. As the throughput can be calculated in terms of perceived SINR, as shown in (9), minimum throughput requirements are modelled as SINR requirements. A Constant Bit Rate (CBR) traffic is applied to all users. The minimum downlink throughput requirement interval varies from 0.5 to 2 Mbps. In the simulation, the generation of pseudo-random numbers follows a uniform distribution.
The COST 231 Walfisch-Ikegami [28] is used for the signal propagation from the macrocell to the user equipment. The air to ground channel model detailed in [29] is used from the flying base stations to the user equipment. We assume that both macrocell and UAV-BSs share the same frequency band. This means that UAV-BSs and macrocell interfere with each other. A frequency reuse factor of 1 is adopted.
We consider that macrocell and UAV-BSs are limited in both radio access network (RAN) and backhaul resources. Both macrocell and UAV-BSs have a bandwidth capacity of 20 MHz, which corresponds to 100 resource blocks (RBs), according to long-term evolution (LTE) parameters. We assume that UAV-BSs have a microwave link that connects to the macrocell and other UAV-BSs within a range of communication. In the simulation, the UAV-BSs backhaul capacity is 37.5 Mbps, while the macrocell has an ideal backhaul. Similar backhaul capacity is used in [20].
At the beginning of the simulation, the Macrocell, UAV-BSs, and users are initially deployed, as well as, their mobility model and throughput requirement are randomly loaded, the users are allocated to the base stations according to their SINR. If no base station has resource blocks enough to guarantee that the downlink throughput requirement is met, the user is considered to be out of coverage (in an outage). Also, users with SINR below the SINR threshold is considered to be in an outage.
The simulation area is divided into equal square cells of 100 × 100 m in order to solve using the multilayered cellular automata algorithm. A cell (subarea) cannot be occupied by more than one UAV-BS. As already mentioned, the proposed multilayered cellular automata have 3 layers: user layer, UAV-BS layer, and movement restriction layer. Each square cell is mapped into a cell with a state which  changes according to the transition rules, based on its state and the states of neighbouring cells. A Moore neighbourhood with 8 neighbours is adopted. Regarding the UAV-BSs movements, the aerial space is discretised in steps of 100 m in the horizontal plane (x and y dimensions). They fly at a fixed height of 100 m and we also assume that all the UAV-BSs are hovering at the same altitude. We consider that a UAV-BS occupies the centre of the square cell. A suburban environment was considered. Table 1 shows the simulation parameters while the multilayered cellular automata parameters are presented in Table 2. The main parameters were obtained from [20] and [57].
The simulation was run for 50 independent runs. Each run corresponds to a simulation time of 100 seconds. A discretisation of the environment is performed and so we divide each run into 100 snapshots of the network that changes every second. We take each snapshot as an episode. Therefore, each run also has a total of 100 episodes. User positions are updated according to their mobility model so that the mobility of users can be taken into account between episodes. On the other hand, each episode is divided into 100 iterations. During iterations of an episode, users are considered to be static, while the UAV-BSs try to find the best position according to the multilayered cellular automata algorithm. Every UAV-BS performs a certain number of iterations, according to the stopping criteria in order to find the best position for that episode. In the implemented algorithm, after all the UAV-BSs reach the stopping criteria, the episode is ended. At the end of each episode, a new user association is carried out according to the new SINR metrics perceived by users. All performance metrics are recorded. This process is repeated, and the numerical results are averaged out between different runs of the algorithm.
In terms of simulations, we consider a simplified UAV collision avoidance mechanism. In the proposed cellular automata, a region of space (100m × 100m square cell) can only be occupied by one UAV at a time. However, two UAVs can occupy neighbouring cells, their spacing between them varying from 100m to 142m (the UAVs are installed in the centre of the square cell). For this purpose, layer 3 of the cellular automata is responsible for mapping the neighbourhood of UAVs, including other UAVs and terrain obstacles whose height may cause a collision with the UAV, which flies at a fixed height. In the displacement phase, cells containing obstacles or UAVs are attached with a value of zero, indicating that movement in the direction of these cells is not allowed. As the UAVs' movements have been modelled in a two-dimensional space, the collision avoidance mechanism is quite unnoticed during simulations, whereas UAVs ''deviate'' from these cells in their path.

B. NUMERICAL RESULTS
In our simulations, the proposed algorithm for positioning flying cells is compared with a fixed random position and the Genetic Algorithm scheme. In order to verify the impact of adding new flying cells to the network, we also compared the results considering that the region of interest is served only by a macrocell. For MCA and fixed random position schemes, we adopt the same initial UAV-BSs positions, whereas, for the fixed random position scheme, the UAV-BSs will remain in the same position throughout the run. Fig. 6 shows an example of the simulation performed. Fig. 6(a) depicts a random distribution of 100 active users and 10 UAV-BSs locations under the random pattern, in the first episode, while Fig. 6(b) shows the initial allocation. Fig. 6(c) illustrates the dynamic process of the multilayered cellular automata (MCA) which results in the positioning of UAV-BSs according to the movement of users over episodes. Fig. 6(d) shows the final deployment of UAV-BSs, as well as the associations between them and users regarding episode 100 considering the MCA scheme. Fig. 6(e) presents the final allocation with the fixed random scheme. Finally, Fig. 6(f) presents the final deployment of UAV-BSs, as well as the associations between them and users regarding episode 100 considering the GA scheme. Fig. 6(d) shows that all users are associated with a base station and any UAV-BS is associated with no more than 20 UEs (the predefined threshold). All the UAV-BSs are under the communication range allowed. Fig. 6(e) shows the same scenario considering that the UAV-BSs remain in the same starting position. We can note that 5% of active users are in an outage. In Fig. 6(f) it is possible to observe that all users are associated with a base station with a GA scheme.
As an example, Fig. 7 illustrates the expectation of the maximum analytical SINR (in dB) at different locations of scenarios considered in Fig. 6. When evaluating the results of a cellular network deployment, the SINR parameters are usually analysed across the desired region. We use heatmaps to present graphically the expectation of the maximum analytical SINR (in dB) across the different deployments. The results can be interpreted as a signal strength map, that is quite similar to a coverage map, but they present the Signal to Interference plus Noise Ratio when graphically displayed and takes into account the position of the transmitters concerning all the points of the scenario and not just where the active users are. The higher the value, the better the user experience, transmission speed, and communication stability. Fig. 7(a) shows the performance situation when there is only macrocell deployed, while figures 7(b), 7(c) and 7(d) illustrate the performance situation of UAV-BSs deployment of figures 6(d)), 6(e) and 6(f), respectively, when 10 active UAV-BS are deployed with the MCA, fixed random position and GA solutions.
We can observe that positions of UAV-BSs not only influence the coverage of the area of interest but also impact the interference perceived at a certain point from different UAV-BSs. Fig. 8 helps us to interpret the results. Percentile is a statistical measure used to divide a sample of values, ordered in ascending order, into one hundred parts.
In Fig. 8 we observe from the 5th to the 95th percentile, a common interval in the analyses. The 50th percentile refers to the median value. That is, half of the values found are below this value, while the other half is above this value. Note that in general, the expectation of SINR in the scenario without UAV-BSs (only macrocell) is better, because in this case there is no interference problem. It is worth mentioning that in this work both macrocell and UAV-BSs share the same frequency band with a frequency reuse factor of 1. UAV-BSs and macrocell interfere with each other degrading the received signal level. This attenuation depends on the number of new transmitters in the scenario and the distance between them, as the signal strength decreases with distance.
It is noteworthy that the interference places challenges on the signal demodulation at the users' side because when the signal to interference and noise ratio is below a threshold, users cannot demodulate the intended signal. On the other hand, the only macrocell scenario is very limited in terms of capacity, as can be seen in Fig. 9. From Fig. 8 it is possible to notice that 5% of the samples are below 0.08, −6.12, −3.14 and −3.98 dB in scenarios A (only macrocell solution), B (fixed random position solution), C (Multilayered Cellular Automata solution) and D (Genetic Algorithm) respectively. The median value is 6.79, 0.79, 4.85, and 4.83 dB, while 75% of the samples are below 12.51, 7.0, 12.52, and 14.05 dB, respectively, in scenarios A, B, C, and D, this is because the UAV-BSs are better distributed in scenarios C and D compared to scenario B.
Although interference control is not included in the algorithm's programming, the algorithm's goal of tracking user density may cause the interference to decrease, improving  on-demand situations. Fig. 9 clearly shows this extra capacity presenting the average number of active users in outage per episode for each of the considered schemes. As it can be observed, both the approaches, MCA and GA, yield the best results, resulting in 1.57% and 3.65% of users in outage over the 100 episodes, on average. In the Fixed Random Position scheme, this average is 18.25%, whereas in the scenario where there is only one macrocell, on average 75% of users are not served.
The quality of service (QoS) required by users' applications can be measured using the so-called QoS parameters. One of the most commonly evaluated is the throughput, which indicates the data transmission rate in bits over a given time interval. For illustration purposes, Fig. 10 shows the results using heatmaps for the expectation of the throughput across the scenarios of Fig. 6 for scenarios A (only macrocell solution), B (fixed random position solution), C (MCA solution) and D (GA solution), respectively. For this, we calculated the maximum transmission rate of the channel from Shannon's theorem, expressed in equation (9), considering the bandwidth and the SINR. From Fig. 11 it is possible to notice that 5% of the samples are below 18, 5, 10, and 8.73 Mbps, in scenarios A, B, C, and D, respectively. The median values   We emphasise that despite scenario A (only macrocell) has a better throughput expectation compared to scenarios B, C, and D, the network capacity is very limited. Also, the throughput expectation is directly related to the SINR expectation and therefore suffers the effects of interference that is induced by aerial base stations deployment in reuse 1 of the cellular network.
The goal behind this presentation is to demonstrate that the average level of the throughput expectation over a cell area can correspond to the cell spectral efficiency of the respective area when we consider a uniform distribution of users or traffic. Although, in more realistic scenarios, with a non-uniform distribution, this is not necessarily true. Fig. 12   MCA and GA solutions perform better than the others that were also tested; this is because the network capacity is increased with UAV-BSs and their better positioning concerning scheme B increases the spectral efficiency of the network. It can be observed that the throughput improvement of MCA on average of individual episodes ranges from 37% to 56% when comparing with the Fixed Random Position given that the starting position of the UAV-BSs is the same in both schemes. The GA throughput improvement ranges from 36% to 49%.
The average percentage of users with downlink throughput requirements met per episode is shown in Fig. 13. According to the allocation policy adopted in this work, users are only associated with a base station if it has enough resource blocks to meet their download traffic requirements. As can be seen, MCA and GA solutions are the best performing strategies by a large margin. MCA and GA meet 98.43% and 96.35% of users with throughput requirements met, respectively. This is mainly since users in outages are considered 100% dissatisfied and the users served are 100% satisfied, according to the users' allocation policy. Fig. 14 and Fig. 15 present the average users served by UAV-BSs and by macrocell, respectively. The results highlight the importance of having an intelligent and movable solution. Keeping the UAV-BSs fixed results in poor performance. On the other hand, MCA and GA solutions can detect and track user movement, searching for the best position to be set for every episode. With MCA, we have a 24% increase in the number of users served by UAV-BS, while with GA this enhance is 23%. It is also possible to observe in Fig. 15 that a better positioning can increase the macrocell offload, having the same available resources of radio and UAV-BSs.
In order to verify the scalability and stability of solutions, Fig. 16     (h) 350 UEs, 30 UAVS, and (i) 400 UEs, 30 UAVs. To support the agility analysis, Tab. 4 shows the mean of iterations per episode to achieve the stopping criteria. We assume the coverage ratio as the ratio of the number of users connected to some base station to the total number of users in the scenario. Fig. 16 shows that MCA and GA perform better than Fixed Random Position in all evaluated scenarios. This is because MCA and GA can adapt to the changes in the environment, such as user density on the ground.
From tables 3 and 4 it is possible to observe that MCA and GA schemes perform better in quality, but MCA converges significantly faster. While the MCA takes less than 14 iterations, on average, to achieve the stopping criteria in all considered scenarios, GA takes 835 generations per episode, on average. Also, we observe that the larger the scale of the scenario, the greater the number of generations needed by GA to reach the stopping criteria. Note that MCA takes 59 times fewer iterations to achieve the same performance compared to GA, as demonstrated in the numerical results. By the stopping criteria, it is possible to say that the MCA takes on average 4 iterations to find the local maximum, presenting itself as a very agile algorithm. Figures 17 and 18 presents a graphical representation of the MCA and GA evolution over iterations and episodes, respectively. In Fig. 17, it is possible to observe that the first episode is the one that needs more iterations to converge, due to the randomisation of the scenario initialisation. Even so, it converges quickly, in less than 30 iterations. Other episodes are even faster, in less than 15 iterations, because the change in the users' position from one episode to another is not very sudden. It is noteworthy that the performance of our algorithm depends highly on the initial condition. In Fig. 18 we note that the same analysis cannot be done for GA, due to the nature of the algorithm, since with each new episode, a new population of size P is created, and the evolutionary process is restarted. Tab. 5 also shows the average backhaul throughput for the UAV-BS. The most important to note is that the backhaul capacity is not being exceeded, even in denser scenarios. The standard deviation helps to show that the backhaul throughput obtained is well below the maximum capacity of the backhaul. The average per UAV-BS was 24.27 Mbps in all scenarios. Also, we can infer that the backhaul capacity is not the bottleneck but the SINR. The higher the level of interference, the lower the SINR and the more RBs will be needed to meet the user's downlink throughput requirement. Given the limitation in terms of RAN, it is possible to observe that in denser scenarios in terms of the number of users per UAV-BS, there is a lower coverage ratio. Finally, from all the results discussed in this section, MCA presents itself as a scalable, agile, and stable scheme to respond in real time to urgent network changes in a distributed way.

C. COMPUTATIONAL LOAD RESULTS
In this work, simulations were carried out in a computer system with 2.5GHz processing (4 CPUs), 8 GB of RAM, and 4MB of cache memory. Both MCA and GA algorithms were tested under the same conditions and scenarios. When the proposed MCA was employed, it took about 33 milliseconds to run an episode, as shown in Tab. 6. With the GA, the mean running time was 4.92 seconds. Therefore, the proposed algorithm is 1478 faster than the GA to solve the same problem.   The computational load shown here corresponds to the computational effort required to run the UAV swarm deployment according to the user's density. Figures 19 and 20 show the running time when the number of users in the scenario is fixed at 100 and when varying the number of UAVs (10,15,20, and 30 UAVs) using the MCA and GA algorithms, respectively.  From Fig. 19 it is possible to infer that when multiplying the number of UAVs by 2, the running time is multiplied by 2.5 on average, and when multiplying the number of UAVs by 3, the running time is multiplied by 4 on average. In Table 6, when setting the number of UAVs in a given number (10, 20, or 30) and multiplying the number of users in the scenario by n, it is noted that the running time increases by a factor less than n. Thus, it is possible to conclude that for the MCA algorithm the variable number of UAVs is more determinant for the running time than the variable number of users. This analysis also allows us to empirically infer that the complexity of the MCA algorithm in terms of the number of users is not constant but has less complexity than the linear case. In terms of the number of UAVs, however, it presents greater complexity than the linear case, but less than the quadratic case.

VI. LIMITATIONS OF THE STUDY
The proposed approach and numerical results described in this paper shows how it is important to consider an intelligent, dynamic, and adaptable solution to respond to the urgent changes of the mobile networks. In the model currently implemented, the height of UAV-BSs is fixed. This assumption is somewhat restrictive because, in certain situations, the UAV-BS system performance can be improved by adjusting the height. In all simulations performed, we consider the initial positioning to be random. We noticed that the performance of our algorithm depends highly on the initial condition and various initial conditions lead to different results. Despite this, the results obtained showed that the network performance can be improved in a few iterations. Finally, we did not produce a model that would offer the optimal solution to the problem addressed. Moreover, we are aware that it is interesting to study how far locally optimal solutions obtained by the proposed method are from globally optimal solutions, which does not jeopardise the analysis of the results obtained, since the main objective of the article was met. Our model is fully flexible and suited to include, in future works, new analyses in order to mitigate the current limitations and make it more efficient and robust.

VII. CONCLUSION
In this work, a new method was proposed to contribute to the challenge of base stations installed on UAVs to serve as hot spots, based on a novel multilayered cellular automata for UAV swarm positioning, exploring the mobility of users and UAV-BSs as a flying network. The method was compared with a fixed random position and genetic algorithm schemes. We also compared the results considering that the region of interest is served only by a macrocell base station, in order to verify the impact of adding new flying cells to the original network. Although the fixed network of UAV-BSs added capacity to the network, this performance was limited, as UAV-BSs were not in the best position to add the best capacity to mobile users. Despite the genetic algorithm and MCA having similar performance in terms of quality of service, we reduced significantly the running time by developing the MCA as a solution for the UAV swarm deployment. One of the advantages of the proposal is the computational cost since self-organisation arises from an emerging pattern based on the application of simple rules in a defined neighbourhood. In practice, each UAV-BS computes its future location based on locally available data, resulting in lower overhead and delay in the system. Thus, the innovative methodology, proposed with the implementation of the MCA, proved to be a very competitive solution in a short computation time. The decision is distributed and able to respond in real time to urgent changes in the network. The results of the simulation with a promising performance in agility in decision making and movement in real time will be very useful for future traffic scenarios, such as, in the Internet of Things (IoT), eMBB, and others. However, we can cite as limitations that a study of the impact of the solutions found as possible optimal can be compared with the great classic ones. These comparisons are expected to be explored in the future. Finally, the proposed methodology is flexible and quick to be applied in several scenarios, giving as yet another option that can be proposed in the list of potential solutions to solve the coverage and traffic bottlenecks in future generation networks.