An Introduction of Real-time Embedded Optimisation Programming for UAV Systems under Disaster Communication

For disaster communications, it is very challenging for the contemporary wireless technology and infrastructure to meet the demands for connectivity. Modern wireless networks should be developed to satisfy the increasing demand of quality-of-service (QoS) in mission-critical communications for disaster management which are currently faced with the challenges of limited spectrum, expensive resources, reliable and green communication. There is a tremendous need for optimisation techniques in the study and design of the key functionalities of wireless systems. Until now, almost current optimisation scenarios are often carried out on large timescales (e.g., minutes or hours) without strict time constraints for solving the problems. With the improvement of computational speed, efficient algorithms and advanced coding approaches, a framwork of real-time optimisation programming, which plays a major role in the trend of modern engineering such as mission-critical communications, is introduced for the first time in this paper in the context of natural disaster. In particular, we propose an introduction of embedded convex optimisation programming for unmanned ariel vehicles (UAVs) communications in disaster networks with the strict supervision of executive time in real-time scenarios.


Introduction
Major disasters usually result in damage to communication and power supply networks which are vital services in those early hours of rescue, thus making prompt restoration and network sustainability a formidable task [4,18].In addition, it may take long time to grasp the destructive situation when a disaster actually occurs.Thus, it is a huge challenge to accurately evaluate the situation of the entire regions in real time, which can consequently cause the loss of thousands of lives in the surrounding communities [13,17].
To overcome this serious problem, emerging wireless technologies [6,16,27,28,31] based on Internet-of-thing (IoT) platform consisting of deviceto-device (D2D) communications, wireless sensor networks (WSN) and the unmanned aerial vehicles (UAVs) enabled communication [12,15] are used to communicate in disaster environments controlled by Ground Control Stations (GCSs) for supporting disaster management.With flexible configuration and the mobility nature, UAVs will be very efficient and inexpensive for deployment that is critical in the disaster-prone areas [14,22].UAVs can easily gather information, manipulate physical objects, or engage some equipment in remote or dangerous places as in the disaster events [9,20,32].In order to provide adequate network coverage for particular areas affected by the disaster, there are many optimisation problems which should be considered and solved in real-time scenarios for exploiting and controlling the UAV systems.This will ensure the ultra-low network latencies transmission traffic so this enables the real-time applications in the disaster scenarios [13,22].These optimisation problems have often been associated with many efficient (linear and nonlinear) methods and algorithms such as filter design, resource allocation, and transmission strategies.These methods are chosen such that the network performance is optimised corresponding to the demand of network services via optimisation problems.
In many scenarios of communication system with the constantly changing environment, optimisation application is used to optimise the problems which need to be solved in online applications, i.e., channel estimation, dynamic resource allocation, and video streaming.The strict real-time deadline is the most important requirement for online applications.In all current optimised scenarios, the processing time solving for the convex optimisation problem is achieved in minutes or hours even longer than that.In fact, the traditional convex optimisation methods have been considered computationally expensive which require plenty of time for evaluation.On the other hand, the modern optimisation problems are potentially formed in expensive and complex problems such as the combination of continuous and integer decision variables, multiple decision making for multi-objective, large-scale problems and unknown objectives information.
Fortunately, the rapidly increasing of powerful computers, efficient algorithms, and novel approaches have promised an enormous degradation of calculation time in optimisation algorithms for the embedded convex optimisation programming, which deliver for solving modern optimisation problems on the strict time deadlines of microsecond or millisecond timescales [19,22].In fact, some modest-sized optimisation problems can be handled by the on-line algorithms in the fast speed processing and a sufficient amount of computer memory size [19,22].Moreover, in the near future, efficient methods using parallel computing are applicable to real-time applications for solving large-scale problems.Another potential approach for real-time optimisation is to interplay the frontier of modern optimisation and machine learning techniques such as low-rank minimization, sparsity methods, decomposition techniques or statistically learning models.

Practical convex optimisation in real-time scenarios
Over many past years, convex optimisation theory has demonstrated its important role in signal processing and wireless communication systems.The variety of classes of convex optimisation programming has allowed the convex optimisation applications in a larger number of wireless communication problems.Together with the explosion of wireless communication, convex optimisation has become the most potential trend for the design, analysis and deployment of wireless infrastructures.Convex optimisation methods are used to provide a good heuristic suboptimal solution or bound to non-convex problems.Furthermore, there are many available optimisation software which can efficiently solve the convex optimisation problems.Meanwhile, there is a lack of efficient methods and software for solving the non-convex problem since there would be no guarantee that the optimal solution can be explicitly found in the non-convex problems.In contrast, convex optimisation methods often bring the insight of the optimal solution models which are relevant to the original problems of wireless communications.
Each of optimisation applications is the balance and trade-off of analysing and designing strategies by developers.However, there is a huge gap between the optimisation theory and optimisation implementation in their applications.In addition, it is still a lack of research to link the theory and implementation of optimisation.As shown Fig. 1, the decision of optimisation application in reality is a complicated decision making of the environment models, characteristics of the problem (variables, objectives), appropriate methods and the trade-offs for an expected solution.
Real-time convex optimisation: The role of processing time, which depends on how fast the optimisation problems are solved, is very crucial in signal processing of wireless communication.However, traditional convex optimisation methods are currently still expensive and implementing them can be extremely timeconsuming.This calls for the development of novel strategies, which could be particularly beneficial when applied at times of mission-critical communications such as natural disasters.A real-time optimisation process has to respond to these questions: • how to deal with the executive time of optimisation problems in real-time scenarios?
• how to face with the large-scale and/or high complexity of problems in on-line applications?
• how to embed advanced algorithms of real-time optimisation in the real systems?
In this context, the practical optimisation problems can be transformed into the mathematical optimisation models.Then these problems can be programmed in embedded systems with online solutions.However, the practical optimisation problems in wireless networks are frequently non-linear programming, largescale problems with massive data, high-complex problems with multi-objective, high-dimensional stochastic problems, and hybrid resource allocation problems.An online solution should satisfy the demand of the strict deadline in the implementation.Fast optimisation decisions are used to calibrate the weights to improve the transmission strategy, optimise network performance or other objectives in wireless communications.Nevertheless, in the sense that "faster is better" [19], there are many challenges which will also generate opportunities for the deployment of real-time optimisation.

UAV-enabled networks under disaster communications
UAV has been emerging as a major trend in the next generation wireless networks [1,11,23].With flexible configuration and high mobility nature, UAVs can easily gather information, manipulate physical objects, or engage some equipment in remote or dangerous places.With a wide variety of vehicle types and operational environments, UAVs can be easily deployed in ground, space, water, or underground [25].As a result, there are many types of applications that UAVs can be exploited such as environmental remediation, navigation to gather data, military applications, transportation of goods, performing dangerous tasks, and so on [25].In addition, UAVs can be utilized for governmental or non-governmental purposes in rescue operations such as public protection, disaster recovery.Some good examples are surveillance and reconnaissance, homeland security, environmental monitoring, agriculture, construction industry, and goods transportations.For a real-time application, the tracking results will be collected at the UAVs and reported to the central system within given strict time deadlines [24].
In natural disasters, keeping communication connectivity provides a lifeline.The lack of communications in remote areas and poor conditions for communications in developing countries can have detrimental effects.One of the most feasible technology, the online algorithms could be integrated within UAVs, which could be of great help in situations where networks are congested, and there is a lack of power supply.Therefore, the real-time optimisation in UAV communications to tackle time constraint will play a crucial role in disaster scenarios.In these cases, UAVs that are flying above the affected area could help first responders to assess the situation and deliver a coverage based cellular network as quickly as possible.To develop practical optimisation in emergency situations, developers should focus on the ways of reducing the execution time and computational complexity of optimisation programming in the realtime scenarios.

The challenges of UAV-enabled communications
There are many issues to solve in order to provide effective, stable and reliable UAV networks.The efficient deployment and operation of UAV communications is very important yet challenging to meet the promising high capability and capacity [11].The control of UAVs might depend heavily on sensors, communication devices, onboard processing power, and appropriate existing models.The modeling of UAVs has led to interest in areas such as nonlinear system and artificial intelligence [25].The UAVs working on space often move in organized swarms in three dimensions with a rapid change of network trajectory.For example, a change in the relative positions of UAVs may leads to some UAVs losing their trajectory and power, and thus, they need to be brought down for redesigning and recharging.Furthermore, UAVs may malfunction or interrupt network, causing the network links to vanish and changing nodes' postions [5,26,29].
On the other hand, UAV devices typically have limited energy storage for flying operations.The energy constraints will be much tighter in the long-term operation of UAV networks.Otherwise, almost signals are transmitted under lower power and thus the outage probability is high because the links might be intermittent.More importantly, these nodes would dynamically work to frequently reorganizing the network.This means their routing protocols need to verify changes over time and use more energy to prolong the network stability.Therefore, the deployment and resource allocation should be considered for efficient utility in UAV-based applications.
A fully autonomous multi-UAV network will require a robust inter-UAV network to cooperate in keeping the network organized.The ability of self-organizing is essential in UAV networks to change the MAC and network layers, be tolerant to delays enable flexible and automatic control as well as employing efficient energy saving schemes.Therefore, the UAV systems must be more dynamic and wise.The machine learning context is a potential trend for UAV networks by lending efficient robust algorithms, low-complexity estimates, supporting self-organizing system.Finally, real-time optimisation for embedded UAV systems is a promising research direction for the modern wireless communications.

Characteristics of UAV communications
In this section, we consider the general characteristics of UAV-based wireless communication.The general communication model consists of cellular base stations (BSs), UAV-drones, and ground terminals (GTs).
3D location.Within the completion time T and trajectory design, UAVs' location is denoted as as q(t) = [x(t), y(t), H(t)] T ∈ R 3 at time t.We assume that the initial and final time of UAVs' location follow by t (0) = 0, t (N ) = T .By introducing the elemental time-slot length δ t , the horizon time T is divided into M timeslots, e.g., T = Mδ t .The elemental time-slot length is chosen so that the location of UAVs and ground terminals (GTs) are approximately assumed constants within each slot.Otherwise, 3D (three-dimensional) location of the UAV in time-slot m can be rewritten as Channel model.Due to the higher chance of line-of-sight (LoS) propagation via 3D location, the air-to-ground (ATG) channel differs from the terrestrial channel [7].In these scenarios, the effect of the environment on LoS occurrence becomes critical.However, the effects of propagation blockage [2], e.g., building blockage, still exist for the complete channel models.As a result, large-scale Rayleigh and free-space fading models are appropriate for the ATG channels.
For an arbitrary elemental time-slot, the distance between the UAV located at (x, y, H) and the kth GT is denoted as 2 is the horizontal distance between the UAV and the kth GT and x k , y k is the location of the kth GT.The simple distance path loss between the UAV and the kth GT is denoted as [21] where f c is carrier frequency (Hz), c is the speed of light (m/s), α ≥ 2 is the path loss exponent.On the other hand, the probability of LoS is given by [3, 7] where a, b are constants depending on environment.Thus, one has P N LoS = 1 − P LoS .
Then the total path loss expression from UAV to kth GT is as where η LoS and η N LoS are average additional losses for LoS and NLoS, respectively.
Free-space model: We assume LoS-dominated in free-space path loss model (α = 2) [30].For time-slot t, the channel gain in the free-space model is defined as where β 0 is the channel power gain at reference distance is the distance between the UAV and the kth GT at the time-slot t.
For a constant transmit power (P U ) at the UAV, the received power at the kth GT can be addressed as Thus, the total received power at the kth GT in the period of time (T ) is given as The trajectory of UAV in a typical timeslot is defined as For a constant of velocity (a cc [m] = 0) and allowable maximum velocity of the UAV (V max ), the trajectory constraints of the UAV are as where ] T is the initial horizontal location of the UAV.

The practical embedded optimisation programming for UAV systems
In [19], the embedded convex optimisation programming is able to solve many optimisation problems at the level of fast time scales.In fact, in real-time scenarios, the solving of optimisation problem not only has to solve the problem with an optimal feasible point but also mention the solving time of the problem with a strict time limit (deadline time constraint).A diagram  of embedded convex optimisation system is proposed in Fig. 2. Efficient methods are used for solving the problem which is exploited on a type of computer (CPU, GPU, FPGA) applying the novel approaches for realtime optimisation programming.Finally, a custom code platform is produced by automatic code generation by an embedded software.
For an instance, Fig. 3

Some applications for embedded UAV systems
To give the reader a better appreciation for the performance of the embedded optimisation, some basic evaluations of the UAV network with the embedded optimisation programming are implemented in this work by using CVXPY 1.0.6 package [8] in Python and CVX 2.1 [10] in Matlab.The computational platform with the Laptop using Intel Core(TM) i7, CPU @2.80GHz and 16GB memory is used for performing.
EXAMPLE 1: (optimal network coverage) In the first example, the location of UAV-drones is to optimise for supporting as much as possible number of GTs.An example of the considered model is provided in Fig. 4. The system consists a UAV with the fixed altitude at H and K users (UEs) which are randomly distributed in a given coverage network.Firstly, we assume the 3D location of the UAV is as (x, y, H).The location of GTs is as (x k , y k ) for k = 1, ..., K.We also define the ratio of altitude and coverage network of the UAV is as φ = H/r cov (11) where r cov is the radius of network coverage of UAV.
In this work, we choose the value of φ at 1 (e.g.unbar scenarios) which means H = r cov .Hence, the kth GT will be served by the UAV if Our target is to maximize the number of GTs that the UAV can support at the same time.The considered problem is given by max x min ≤ x ≤ x max (12c) where λ is chosen as a specific value such that it is larger than the maximum network area that we consider.(x min , x max ) and (y min , y max ) are the lower and upper bounds of the horizontal and vertical range of UAV, respectively.Note that the problem in ( 18) is mixed-integer (binary) quadratic programming which is non-convex program.Fortunately, a Pythonembedded optimisation programming (CVXPY) can solve the problem (18) effectively.For a simulation, we assume the coverage is a square area with the length of side of 300m.(x min , x max ) and (y min , y max ) and H are set as (−300, 300), (−300, 300) and 100 in meter, respectively.There are K = {10, 20, 30} GTs in the considered network.For this example, the problem ( 12) is transformed into a mixed-integer programming with 10, 20, 30 binary variables and 15, 25, 35 inequality constraints, respectively.Then, the Python code generated by CVXPY solves this problem in approximately 69, 362, 703 ms corresponding to 10, 20, 30 GTs, respectively.
EXAMPLE 2: (tracking and routing plan) With natural mobility and flexible configuration, UAV is developed for the tracking targets or routing plan.In this work, the trajectory of a UAV is designed in the data collection for wireless sensor network.An example of considered model is provided in Fig. 5 in where a number of sensors is distributed in a network area.We assume the UAV operates with the constant of altitude as H.There are total K + 1 of time slot corresponding to K sensor nodes which need to collect their data and an initial time slot.At the initial point (k = 0), we assume the horizontal location of the UAV at q[0] = [0, 0] and kth timeslot is as The Euclidean distance between the UAV and sensor k at the time slot k is as where (x k , y k ) represents the location of kth sensor node.Each of sensors should forward its data with size (D k ) and transmission rate (C k ) to the UAV for collecting.Thus, the flying time of UAV over sensor node k (T k ) for completing the data collection should be followed the inequality For convenience, the coverage of UAV can be its altitude for the urban scenarios.UAV can only collect the data from sensor nodes when the sensor node belongs in its coverage Next, the following constraint of flying time of UAV between two adjacent time slots is as where V is the constant flight speed of the UAV.
Our target is to minimize the total flying time that the UAV need to spent for collecting the data from K sensor nodes.The considered problem is given by min 15), ( 16), ( 17) (18b) For measurement simulation, the number of sensor nodes is horizontally distributed in a rectangle network area with the width and height of 5000m and 200m.The altitude of the UAV is set as H = 50m.The flight speed of the UAV is constant at all time with V = 10m/s.The size data and transmission data rate at all sensor nodes are the same at D = 400bits and C = 200bits/s.There are K = [20, 60, 100] sensors in the considered network.For 100 sensor nodes, the problem ( 18) is transformed into a QP programming with 300 variables and 700 inequality constraints.The Python code generated by CVXPY solves the problem (18) in approximately 600 milliseconds while CVX tool solves the problem in 6 seconds as shown in Table 1.EXAMPLE 3: (relay-assisted network) In this example, a UAV is used as a relay node to serve multiple users who cannot be directly served from the BS by block fading such as building blockage.Due to the block fading, there is no direct link between the BS and GTs.The location of UAV-drones is to optimise for supporting multiple users.An example of considered model is provided in Fig. 6.Utilizing the high chance LOS propagation of the UAV deployment, we consider that the link between the BS and the UAV and the link  between the UAV and the GTs are dominated by LOS links.
For presenting the mathematical formulation of the problem, we assume the locations of the BS and the UAV are (x BS , y BS , H BS ) and (x U , y U , H U ), respectively.Then the distance between the BS and the UAV is expressed as where 2 , H BS and H U are the antenna altitude of the BS and the UAV.We assume the antenna altitude of the UAV is also the altitude of the UAV.Thus, the free-space path loss channel can be used for the BS and the UAV link as follow: g BU = β 0 R −2 BU .And the free-space path loss channel for the UAV and kth GT link is g U k = β 0 R −2 U k , where R U k = d 2 U k + H 2 U and d U k = (x U − x k ) 2 + (y U − y k ) 2 , (x k , y k ) is the location of the kth GT.
In this work, our target is to optimise the position of the UAV to maximize the total channel gain of the considered system including the BS-UAV link and UAV-GTs links.Hence, the considered problem is as follow: For simulation, we assume a coverage network with circle radius of 500m.The location of MBS is (−300, 0, 30) while the location of GTs are randomly distributed in the coverage network.(x min , x max ), (y min , y max ) and (H min , H max ) are set as (−500, 500), (−500, 500) and (47, 122) in meter, respectively.There are K = {10, 20, 30} UEs in the considered network which are located at the opposite of BS.For implementation, the problem (21), which is transformed into a QP programming, is solved by generating Python code in our platform in approximately {131, 325, 361}ms using CVXPY and {1.54, 1.92, 2.35}s using CVX, respectively.

Conclusions
This paper has introduced the practical optimisation programming related to real-time applications and proposed the basic theory of the UAV systems based on the development of optimisation field for the disaster communications in real-time scenarios.This work opens a novel trend of optimisation context for the modern wireless communication systems.As a result, there are many issues and future works to study and necessarily call the novel solutions in the real-time optimisation for critical mission wireless networks.

Figure 1 .
Figure 1.How to choose a good (best) decision for practical optimisation application?

3
EAI Endorsed Transactions on Industrial Networks and Intelligent Systems 11 2018 -12 2018 | Volume 5 | Issue 17| e5 An Introduction of Real-time Embedded Optimisation Programming for UAV Systems under Disaster Communication

)
Routing and trajectory designs.We consider three fundamentals of the trajectory of UAVs including trajectory location {q[m]} M m=1 , speed {v[m]} M m=1 and acceleration {a cc [m]} M m=1 .For the fixed altitude of UAV at H, the trajectory location of UAVs in the mth time-slot can simply as the horizontal location q[m] = [x[m], y[m]] T , m = 1, ..., M where M is the final time-slot at the end of trajectory.

Figure 2 .
Figure 2. The diagram of embedded optimisation system in UAVenabled communication.
presents a general model of UAV communication in where multiple embedded UAV kits operate under a ground station for exchanging the network information via backhaul connections, e.g., channel state information, energy harvesting and autocode generation of embedded convex optimisation.The ground station can be represented as a central computing for controlling a group of UAV-drones communication networks.The UAV-drone can apply real-time optimisation applications on the testing stage by learning-based optimisation algorithms on training stage from the ground station.

Figure 3 .
Figure 3.A practical model of UAV communication system with a ground station and a flying station.

Figure 4 .
Figure 4.A network coverage of an embedded UAV-drone.

Figure 5 .
Figure 5.A model of routing UAV for data collection from sensor networks.

Figure 6 .
Figure 6.A relay network of an embedded UAV-drone.

Table 1 .
(18)average executive time results in different tools for solving the problem(18).