Online Identiﬁcation-Veriﬁcation-Prediction Method for Parallel System Control of UAVs

: In order to solve the problem of how to efﬁciently control a large-scale swarm Unmanned Aerial Vehicle (UAV) system, which performs complex tasks with limited manpower in a non-ideal environment, this paper proposes a parallel UAV swarm control method. The key technology of parallel control is to establish a one-to-one artiﬁcial UAV system corresponding to the aerial swarm UAV on the ground. This paper focuses on the computational experiments algorithm for artiﬁcial UAV system establishment, including data processing, model identiﬁcation, model veriﬁcation and state prediction. Furthermore, this paper performs a comprehensive ﬂight mission with four common modes (climbing, level ﬂighting, turning and descending) for veriﬁcation. The results of the identiﬁcation experiment present a good consistency between the outputs of the reﬁned dynamics model and the real ﬂight data. The prediction experiment results show that the prediction method in this paper can basically guarantee that the prediction states error is kept within 10% about 16 s. tasks to the UAV swarm, is transformed into the parallel control mode, in which tasks are both assigned to the actual system and the parallel system at the same time. The parallel UAV system optimizes top-level tasks in real-time according to the predicted system status and uploads the optimized tasks to the ground control station. This can reduce the burden on the operator while ensuring the effectiveness of UAV control over the swarm, and improve the control capability of the UAV swarm.


Introduction
Unmanned Aerial Vehicle (UAV) swarm has become a frontier hot spot in the field of UAV research. A common swarm control method is that the operator issues top-level tasks to the swarm and supervises the execution of the UAV's tasks in real-time. This control method has higher requirements for the operator, not only requires the operator to monitor the status of the swarm at all times, but also requires the operator to have good accident response and handling capabilities. However, this will put a greater burden on operators. As the scale of the swarm expands and swarm tasks become more complex and diversified, it will undoubtedly require huge labor costs to complete swarm tasks. Moreover, this method is more dependent on the timeliness and reliability of link transmission. When link interruption or packet loss occurs, it is difficult to ensure the effectiveness of control. This paper draws on the theory of parallel systems and proposes a parallel control method, which provides a new way to solve the problem of swarm control. Feiyue Wang proposed a parallel intelligent computing and control theory that integrates Artificial Systems, Computational Experiments and Parallel Execution [1] to cut down system complexity and diversity, ease the control and improve experiment repeatability in real natural social systems. The core idea of this theoretical system is to build a data-driven artificial system for carrying out computing experiments under a complex and changeable system environment [2], so as to normalize the interaction between the actual system and the artificial system. Thus, a quantitative, implementable and real-time computing experiments can be realized for the complex actual situation, and the bottleneck of the complex system can be effectively solved.
In recent years, parallel theory and methods have been successfully applied to traffic management [3][4][5], unmanned vehicle control [6][7][8], social computing [9][10][11][12][13][14], intelligent computing and parallel intelligence and constructed an artificial cyber interactive behavior of message publishing [9,10]. Wang a namic programming and analytical intelligence and proposed the namic programming to improve the planning efficiency of deep [17]. Wang and Yang proposed parallel networks to provide new the allocation, management and utilization of network resources tended the parallel theory into the computer vision field and pr basic framework of Parallel Vision [19]. Moreover, Kang studied method of plant, which optimizes profitability, productivity and The basic framework of a parallel UAV system is establishe There is a one-to-one artificial UAV system corresponding to th the ground, while each artificial UAV system contains a baseline and a controller model consistent with the airborne. The artific time axis is several control cycles ahead of the real system. On th optimized artificial system is developed by making continuo based on the real system operating status data returned by the d actual system. Furthermore, the future trend and possible accide can be predicted by combining with the environmental data. The in which the operator directly assigns tasks to the UAV swarm parallel control mode, in which tasks are both assigned to the ac allel system at the same time. The parallel UAV system optimize time according to the predicted system status and uploads the ground control station. This can reduce the burden on the oper effectiveness of UAV control over the swarm, and improve the UAV swarm. The method in this paper uses a parallel UAV system as an au layer and decouples the control problem of UAV swarms, a comp with the support of huge computing resources on the ground. Mo revised parallel UAV model also guarantees the effectiveness of control method proposed in this article is expected to greatly red and material costs, and find a new solution to the large-scale UA lem. The method in this paper uses a parallel UAV system as an auxiliary decision-making layer and decouples the control problem of UAV swarms, a complex time-varying system, with the support of huge computing resources on the ground. Moreover, the continuously revised parallel UAV model also guarantees the effectiveness of the control. The swarm control method proposed in this article is expected to greatly reduce the time, manpower and material costs, and find a new solution to the large-scale UAV swarm control problem.

Problem Statement
In order to realize the parallel control of the UAV swarm through a parallel UAV system, it is necessary to study the modeling method, state prediction method and real-time task replanning method, which can meet the requirements of parallel control accuracy. This paper mainly studies the modeling method and state prediction method of parallel UAV.
The key to realizing a parallel UAV system is to obtain a real-time and accurate parallel UAV model. The traditional accurate modeling method needs a wind tunnel experiment, which is expensive and complex. Therefore, a more practical, real-time and available modeling method with accuracy that satisfies parallel prediction and parallel control is needed. The system identification has the characteristics of simplicity, efficiency and low cost, so this paper uses the system identification method to model the parallel UAV.
System identification has three elements: identification data, model structure and identification criterion. The identification criterion is determined by the identification method. The identification data can be obtained by collecting flight data from the actual UAV system.
Hence, the identification data collected from the actual UAV system can be defined as where x i,m denotes the multivariable observations at a particular time step, x i,1 , x i,2 , . . . , x i,M is the value of the variable at time step i, and M is the number of UAVs in the UAV swarm. Then, the structure of the identification model needs to be determined. Common model structures are the state space model, the differential equation model and the transfer function model. The UAV system is a typical multiple-input multiple-output (MIMO) system, and the state-space model can well reflect the actual physical characteristics of the MIMO system. Therefore, the identification model can be defined as Among them, x is the state vector of the system, y is the output vector of the system, u is the input vector of the system, n is the noise vector, and ABCD is the coefficient matrix of the system.
In order to improve the identification effect, the lateral and longitudinal identification models of UAV are established in this paper.
In the longitudinal drone model, there are where V x is the speed along the x-axis in the airframe coordinate system, V z is the speed along the z-axis in the airframe coordinate system, Q is the pitch angular velocity, θ is the pitch angle, δ elev is the elevator deflection angle, and δ thr is the throttle control amount.
In the lateral drone model, there are where φ is the roll angle, ψ is the yaw angle, P is the roll angular velocity, R is the yaw angular velocity, V y is the speed along the y-axis in the airframe coordinate system, δ ail is the aileron deflection angle, and δ rud is the rudder deflection angle.

Model Identification
The subspace identification method is often used to identify the dynamic model of aircraft and can obtain a relatively good MIMO model without the initial model of the system. However, on the one hand, due to the lack of optimal process, the model identified by the subspace identification method is often sub-optimal. In order to obtain the optimal solution, the results need to be further optimized. On the other hand, when identifying highorder MIMO system models, the optimization-based identification algorithm is sensitive to the initial conditions, and generally, it is necessary to use the approximate optimal model as the initial conditions. Thus, in order to obtain better identification results, this paper proposes a two-step data-driven identification method: firstly, given the absence of the initial model of the system, the UAV dynamic model can be obtained directly from the identification data through the subspace identification method. Then, on the basis of the identification results in the first step, the prediction error identification method based on the optimization algorithm is used to further optimize the results for optimal solution.
Firstly, the subspace identification algorithm is used for identification. The subspace identification method integrates system theory, linear algebra and statistics, and can directly estimate the state-space model of the MIMO system from input-output data [21][22][23]. The basic idea is to obtain the model parameters from the row subspace and column subspace of the input-output Hankel matrix projection.
Suppose the discrete state space equation of the system is Equation (2). Assuming that the noise n is not related to the inputs u and the above system is controllable and observable, Make: U q (k) and N q (k) are defined in the same way as Y q (k). Then: where: O q is the extended observability matrix of the system: Γ q is the lower triangular Toeplitz matrix: Then make: One can then get: Then, the orthogonal basis of U can be defined as: Multiply both sides of Equation (10) by Π ⊥ U H to get: Singular value decomposition of YΠ ⊥ U H : where U s is the singular value vector, Σ s is the corresponding singular value. The column space of YΠ ⊥ U H and O q is the same [23]. Thus, YΠ ⊥ U H and O q have the same singular value. Therefore, the estimate of O q can be calculated bŷ Then, combining Equations (7) and (14) can directly obtain the estimated valueÂ,Ĉ of A, C.
According to the following formula, the estimated valueB,D of B, D can be obtained by solving the least square problem: where I is the Identity matrix, x 0 is the initial state, and δ(t) is unit pulse input at time 0. Then, the identification result of the subspace identification algorithm will be obtained, which will be used as the initial model of the prediction error method.
Define error vector: Among them, Y is the actual measured value, andŶ is the model's estimated value.
The objective function is defined as In order to obtain the best fitting model with the experimental data, the objective function J should be minimized. The estimation parameters can be obtained by the Newton-Raphson method [24] and the identification model can be obtained.

Data Preprocessing
Since the actual data communication process may cause data packet loss and communication delay, in order to make the collected data reflect the flight status of the UAV as truly as possible, the collected flight data must be preprocessed (including time-stamp calibration and interpolation correction).
The data collected from the actual system contain time information. Therefore, taking the pitch angle data θ as an example, it can be defined as: where data θ (i) is the specific value of pitch angle and time θ (i) is the data collection time.
Firstly, time calibration is performed on these data. Then, the Lagrange interpolation method is used to complete the data lost during transmission.
For example: For the known n + 1 sampling points (a 0 , b 0 ) . . . (a n+1 , b n+1 ), the Lagrange interpolation formula is: Part of the data lost during the transmission process can be supplemented by Formula (20), so as to solve the problem of data packet loss and time delay during the data transmission process.

Sliding Time Window Method
A critical problem that usually exists in online identification is "data saturation", which indicates that the ever-growing data collected during experiments may be overwhelmed by old data [25]. This may cause the parameter estimates to fail to track changes in timevarying parameters, resulting in a gradual loss of correction ability of the algorithm. This is because, if the identification algorithm gives the same reliability to both new and old data, then the amount of information obtained from the new data decreases accordingly.
To solve this, the sliding time window [26] method is developed. The sliding time window method only identifies the latest N data each time, and all the previous data are abandoned, as shown in Figure 2.
For example, when T = i, the identification data are: Then, when T = i + 1, a new data point data(i + 1) is added and an old data data(i − N + 1) point is eliminated: In this way, it is maintained that only the latest N data are taken for calculation each time, thereby ensuring that the information provided by the new data will not be overwhelmed by the old data, so the algorithm can always correct the model.

Model Verification
To guarantee that the artificial UAV system is always up to date corresponding to the physical UAV system, it is necessary to perform model verification on the identification results. The validation of the identification model was performed by comparing the model response with the real flight data.
In previous literature, various model quality metrics have been put forward to evaluate the quality of the identified model. The normalized root mean square error (NRMSE) is often used to measure the deviation between the estimated value and the actual value. Thus, this paper uses NRMSE as the fit metric of the model response and the flight data to judge the quality of the identification model. The calculation formula of NRMSE fitness value is:

Model Verification
To guarantee that the artificial UAV system is always up to date corresponding to the physical UAV system, it is necessary to perform model verification on the identification results. The validation of the identification model was performed by comparing the model response with the real flight data.
In previous literature, various model quality metrics have been put forward to evaluate the quality of the identified model. The normalized root mean square error (NRMSE) is often used to measure the deviation between the estimated value and the actual value.
Thus, this paper uses NRMSE as the fit metric of the model response and the flight data to judge the quality of the identification model. The calculation formula of NRMSE fitness value is: where y is the actual flight data,ŷ is the model estimation data, and y is the mean value of y. f it varies between −∞ (bad fit) and 100 (perfect fit). When the f it is greater than 0, the model fits the data better than the sample mean of the output, so the identification result is acceptable.

State Prediction
The UAV system is a typical causal system, whose outputs are only related to the current states and inputs. When the system is at the moment k, ignoring the output noise, its state outputs can be defined as: Then, the predicted output is: where: which is: x(k + n) = A n x(k) + A n−1 Bu(k) + A n−2 Bû(k + 1) + · · · + ABû(k + n − 2) + Bû(k + n − 1) (26) wherex(•) is the prediction value of states,û(•) is the prediction value of inputs. x(k) and u(k) are the actual system states and inputs at moment k.
Then, to obtain the predicted outputs value, the predicted inputs value needs to be obtained. For the UAV system in this article, the inputs are the control amount of the rudder surface and the throttle, which are calculated by the flight controller according to the status and route of the UAV. Therefore, by simply sending the state prediction valuê x(k + n − 1) to the controller, the inputsû(k + n) are obtained.
This article uses two identical flight controllers as the flight controllers for the actual UAV system and the artificial UAV system, which loads them with the same mission route. The state prediction process is shown in Figure 3: Then, to obtain the predicted outputs value, the predicted inputs value needs to be obtained. For the UAV system in this article, the inputs are the control amount of the rudder surface and the throttle, which are calculated by the flight controller according to the status and route of the UAV. Therefore, by simply sending the state prediction value ˆ( 1) x kn  to the controller, the inputs ˆ() u kn  are obtained. This article uses two identical flight controllers as the flight controllers for the actual UAV system and the artificial UAV system, which loads them with the same mission route. The state prediction process is shown in Figure 3: First, by using the system inputs () u k and the states () x k , the predicted states ˆ( 1) x k  and the predicted outputs ˆ() y k are calculated according to Formula (24). Then, the predicted states ˆ( 1) x k  of the UAV system are sent to the flight controller, and the  First, by using the system inputs u(k) and the states x(k), the predicted stateŝ x(k + 1) and the predicted outputsŷ(k) are calculated according to Formula (24). Then, the predicted statesx(k + 1) of the UAV system are sent to the flight controller, and the control information returned by the flight controller is used as the predicted inputsû(k + 1). The process above is cyclic; thus, the predicted states of the system can be obtained by repeating the process.

Method Overview
The method overview of this article is as follows: through Computational Experiment, after processing the flight states data of the actual UAV system, the model identification method is used to identify the system model, and the result is used as the model of the artificial system after the model is verified to be qualified, and the modeling of the artificial UAV system is realized. Finally, the predicted states of the actual UAV system can be obtained through the state prediction method of the artificial UAV system, as Figure 4 shows. First, by using the system inputs () u k and the states () x k , the predicted states ˆ( 1) x k  and the predicted outputs ˆ() y k are calculated according to Formula (24). Then, the predicted states ˆ( 1) x k  of the UAV system are sent to the flight controller, and the control information returned by the flight controller is used as the predicted inputs ˆ( 1) u k  . The process above is cyclic; thus, the predicted states of the system can be obtained by repeating the process.

Method Overview
The method overview of this article is as follows: through Computational Experiment, after processing the flight states data of the actual UAV system, the model identification method is used to identify the system model, and the result is used as the model of the artificial system after the model is verified to be qualified, and the modeling of the artificial UAV system is realized. Finally, the predicted states of the actual UAV system can be obtained through the state prediction method of the artificial UAV system, as Figure 4 shows.   In order to improve the accuracy of system identification, it is necessary to preprocess the flight data. To solve the data saturation problem, the sliding time window method is used to process flight data. Then, a two-step data-driven identification method is applied to identify model parameters. Finally, model verification is performed and the threshold is set. The data fitting value is calculated. If Fit_value is greater than , the qualified model is used for state prediction. Otherwise, model identification is performed again.

Experimental Setup
To verify the feasibility and effectiveness of our proposed method, we build a UAV hardware-in-the-loop (HITL) real-time simulation system [27] and conduct the flight simulation experiments based on this system. As shown in Figure 5, the established HITL simulation system is composed of an X-Plane flight simulation software, a qgroundcontrol (QGC) ground control station, and two pixhawks flight controllers. X-plane is a professional flight simulation software with highly realistic airplane models. Pixhawk is a common UAV flight controller, widely used in flight control of fixed-wing UAV and rotary-wing UAV. QGC is a UAV ground control station software. The UAV HITL real-time simulation system based on X-Plane, pixhawk and QGC works well on simulating a real UAV flight and is free of environmental conditions when conducting flight test and data collection. There are many modes in UAV mission flight. In this paper, the four most common modes (including climbing, descending, turning and level flighting) are selected for experiments. Therefore, this paper designs a mission flight route that includes all four modes (as shown in Figure 6). There are many modes in UAV mission flight. In this paper, the four most common modes (including climbing, descending, turning and level flighting) are selected for experiments. Therefore, this paper designs a mission flight route that includes all four modes (as shown in Figure 6). There are many modes in UAV mission flight. In this paper, the four most co modes (including climbing, descending, turning and level flighting) are selected periments. Therefore, this paper designs a mission flight route that includes a modes (as shown in Figure 6).

Model Identification Experiment
In this paper, a subspace identification method and a two-step data-driven id cation method are used to identify the dynamic model of UAV in flight. Take th speed as an example: Figure 7 shows the comparison between the actual data a model estimation of the two identification results. The yellow line refers to the actua data corresponding to state, the red line indicates the estimated value Firststep_model, and the blue line shows the estimated value of the Qualified_m can be seen intuitively that the model estimation of the Qualified_model is closer real data than the estimation of the Firststep_model. This shows that the identif model obtained by the two-step data-driven identification method can reflect the p characteristics of the actual model better than the identification model obtained subspace method. This proves the effectiveness of the two-step data-driven identif method.

Model Identification Experiment
In this paper, a subspace identification method and a two-step data-driven identification method are used to identify the dynamic model of UAV in flight. Take the UAV speed as an example: Figure 7 shows the comparison between the actual data and the model estimation of the two identification results. The yellow line refers to the actual flight data corresponding to state, the red line indicates the estimated value of the Firststep_model, and the blue line shows the estimated value of the Qualified_model. It can be seen intuitively that the model estimation of the Qualified_model is closer to the real data than the estimation of the Firststep_model. This shows that the identification model obtained by the two-step data-driven identification method can reflect the physical characteristics of the actual model better than the identification model obtained by the subspace method. This proves the effectiveness of the two-step data-driven identification method. A quantitative analysis of the two identification results is given below: 100 identification experiments were carried out in four flight modes, and the results were statistically analyzed. Figure 8 shows the box diagram of both the NRMSE fitness value of each state of subspace identification method and the two-step data-driven identification method proposed in this paper. Among them, the red diamond refers to the result of the two-step data-driven identification method, and the blue diamond is the result of the subspace identification method. It can be seen that the fit value of the two-step data-driven identification method is significantly greater than the fit value of the subspace identification method, indicating that the two-step data-driven identification method can better identify the actual model than the subspace identification method.  A quantitative analysis of the two identification results is given below: 100 identification experiments were carried out in four flight modes, and the results were statistically analyzed. Figure 8 shows the box diagram of both the NRMSE fitness value of each state of subspace identification method and the two-step data-driven identification method proposed in this paper. Among them, the red diamond refers to the result of the two-step data-driven identification method, and the blue diamond is the result of the subspace identification method. It can be seen that the fit value of the two-step data-driven identification method is significantly greater than the fit value of the subspace identification method, indicating that the two-step data-driven identification method can better identify the actual model than the subspace identification method. of subspace identification method and the two-step data-driven identification method proposed in this paper. Among them, the red diamond refers to the result of the two-step data-driven identification method, and the blue diamond is the result of the subspace identification method. It can be seen that the fit value of the two-step data-driven identification method is significantly greater than the fit value of the subspace identification method, indicating that the two-step data-driven identification method can better identify the actual model than the subspace identification method.

State Prediction Experiment
According to the state prediction method proposed in this paper, the identification model based on the two-step data-driven identification method is used to predict the flight states of the UAV.

State Prediction Experiment
According to the state prediction method proposed in this paper, the identification model based on the two-step data-driven identification method is used to predict the flight states of the UAV. Figure 9a shows the comparison of mission route, actual trajectory and predicted trajectory for 60 s from a certain moment. The blue line is the given mission route, the red line is the actual flight trajectory and the yellow line is the predicted flight trajectory. Figure 9b shows the relative error between the predicted value and the actual value of the spatial location. Then, this paper conducted 20 prediction experiments and counted the times when the relative error was less than 10%. Figure 9c shows the boxplot of the time when the relative error is less than 10% in 20 prediction experiments. When the relative error is less than 10%, it can be seen that the time fluctuates around 20 s. Taking the lower quartile of the above statistical results of 16.5 s as the prediction confidence value, this paper considers that the parallel system and state prediction method proposed can basically guarantee that the prediction states error is kept within 10% for about 16 s. If there is a communication interruption, the predicted state of the parallel UAV system can be maintained at about 10% within the first 16 s of the communication interruption. Then, according to the parallel control method, the parallel UAV system can use these predicted states to find out unexpected situations that may occur, and promptly generate dangerous disposal plans, which improves the efficiency of emergency handling of dangerous events and thus improves the effectiveness of cluster control. cally guarantee that the prediction states error is kept within 10% for about 16 s. If there is a communication interruption, the predicted state of the parallel UAV system can be maintained at about 10% within the first 16 s of the communication interruption. Then, according to the parallel control method, the parallel UAV system can use these predicted states to find out unexpected situations that may occur, and promptly generate dangerous disposal plans, which improves the efficiency of emergency handling of dangerous events and thus improves the effectiveness of cluster control.

Conclusions and Future Work
In order to solve the problem of how to improve the effectiveness of UAV swarm control in non-ideal environments, this paper proposes a parallel swarm control method and studies the model identification and state prediction methods. The experimental results of model estimation and state prediction show that the model outputs obtained by the identification method have a good consistency with the actual flight data, and the state prediction error can be kept below 10% about 16 s, indicating that the effectiveness of swarm control can be guaranteed within 16 s of communication interruption.
In the future, the real-time task replanning method will be further studied based on the parallel artificial UAV system. Combined with the existing research results, the parallel UAV system is improved to provide a new solution for UAV swarm control.

Conclusions and Future Work
In order to solve the problem of how to improve the effectiveness of UAV swarm control in non-ideal environments, this paper proposes a parallel swarm control method and studies the model identification and state prediction methods. The experimental results of model estimation and state prediction show that the model outputs obtained by the identification method have a good consistency with the actual flight data, and the state prediction error can be kept below 10% about 16 s, indicating that the effectiveness of swarm control can be guaranteed within 16 s of communication interruption.
In the future, the real-time task replanning method will be further studied based on the parallel artificial UAV system. Combined with the existing research results, the parallel UAV system is improved to provide a new solution for UAV swarm control.