1. Introduction
During high altitude and low-speed flight, small fixed-wing UAVs may face a greater measurement noise environment than large aircraft because their smaller weight and size lead to faster response dynamics and are more sensitive to environmental factors such as wind field interference. Moreover, practical factors such as sensor cost control can also easily introduce additional measurement noise. These responses change as disturbances cause changes in the dynamic parameters of the UAV system, increasing the difficulty of controller design [
1,
2,
3]. Therefore, in the process of flight, if the aerodynamic characteristics and parameters of the UAV can be identified in real time, not only can the robustness and adaptability of the system be enhanced, but also the control accuracy can be effectively improved [
4,
5].
Traditional identification algorithms are mostly used for models with strong linearization. When the model is highly nonlinear or time-varying quickly, it is necessary to add high-order nonlinear terms. Since the model order of aerodynamic parameters is higher, the curves drawn by it may be more complex or have severe fluctuations and jumps, which will seriously affect the identification results of aerodynamic parameters. In this paper, the neural network can be used to fit any nonlinear function, and the NN-RLS combination identification algorithm is proposed. NN-RLS can not only train the network model offline but also use historical flight data to correct the model. It is also possible to directly use the trained network to quickly adjust the parameters when online so as to ensure the speed of parameter estimation while ensuring the accuracy of parameter estimation. In recent years, some scholars have conducted research on the identification algorithm.
In the literature [
6], Jiang’s method is only suitable for simple linear models and cannot be directly used for complex nonlinear motion models. However, the intelligent identification algorithm based on NN can fit nonlinear functions with arbitrary accuracy. In the literature [
7,
8], Yang and Zhang combined the arbitrary approximation characteristics of the backpropagation NN to conduct offline training of aerodynamic parameters. They used the results of NN training to identify the aircraft rudder effect parameters in real-time. However, compared with the research method of this article, without the process of correcting the original NN with real flight test data, the goal of lifelong learning cannot be achieved. In the literature [
9], Li proposed to use the least squares support vector machine (LS-SVM) to identify the nonlinear dynamical system when the aircraft is flying at a high angle of attack and use the method of network search and cross-validation to select the parameters of the support vector machine. The dynamic reference model of aircraft with a high angle of attack is established. However, compared with the research method of this article, the LS-SVM network takes a long time to learn. Additionally, it is difficult to realize online real-time identification due to the low speed of the support vector machine. In the literature [
10], the NN model based on the Gauss-based function is established by Wang to determine the structure and the input and output relations of the network. Then, the K-means algorithm is used to train the RBF to obtain the parameters of the network model, which is used to replace the dynamic model of the aircraft. Compared with the research method of this article, Wang’s method focuses on using an RBF neural network to replace the aircraft dynamics model and does not extend to fitting aerodynamic parameters. In the literature [
11], a sample expansion combined with a support vector machine and the online fast correction method for NN parameters is proposed by Pu. However, his method needs to use the SVM method for data expansion during the simulation process to reach an order of magnitude suitable for neural network training, which introduces data errors to a certain extent. In the literature [
12], the selection of the lateral–directional excitation signal and the design method of its parameters are established by Tai based on the requirements for the identifiability of the aerodynamic derivatives. Moreover, a step-by-step method for the identification of aerodynamic force and moment derivatives is established. This method simplifies the solution method for aerodynamic force and aerodynamic moment step by step. It is only suitable for offline simulation and does not have the characteristics of online identification. The algorithmic identification takes a long time.
The intelligent identification algorithm of nonlinear aerodynamic parameters is based on the data-driven multi-level deep learning network proposed in this paper. This approach uses the characteristics of the deep learning network to fit the nonlinear function with arbitrary precision and realizes the modeling of the nonlinear aerodynamic parameter model, which has stronger nonlinearity. The modeling ability can also learn the potential laws and characteristics in the input data and has better generalization ability [
13,
14]. In addition, the deep learning network performs model training based on the optimization algorithm of gradient descent, which can improve computational efficiency through batch calculation [
15]. Furthermore, this approach accounts for the deviation between the real aerodynamic data and the nominal aerodynamic data. The multi-level deep learning network is used to identify the deviation incremental compensation of the aerodynamic parameters so as to realize the accurate correction of the original aerodynamic parameters [
16]. The multi-level deep network can realize the weight matrix update iteration of the offline network driven by historical flight test data, which can adapt to different dataset characteristics and changes, better adapt to complex systems, and realize lifelong learning.
2. Offline Training of Aerodynamic Force and Moment NN Model
Since the NN was proposed, it has achieved great development and application in pattern recognition, perceptual learning, model building, and intelligent control. NN can approximate the input and output characteristics of nonlinear dynamical systems with arbitrary precision and is an effective tool for the identification and modeling of nonlinear dynamical systems. Using it as a nonlinear dynamical system identification model can better solve the identification modeling and problems of complex nonlinear dynamical systems. At present, the most widely used and relatively mature NN is the backpropagation NN, which is a typical feed-forward network in the NN. This is especially suitable for dealing with the nonlinearity, uncertainty, and approximation of the system or structural characteristics of the system, identifying functions, etc.
As shown in
Figure 1, the whole algorithm is divided into three stages. In the offline network training stage, the flight state data set of the fixed-wing UAV is obtained through the CFD simulation experiment. The multivariate orthogonal time-domain identification method is used to optimize the reference configuration. The offline NN is trained on the basis of the benchmark dynamic model. The mapping expression of the flight state data to the force coefficient and moment coefficient is established through the NN. The network takes the real-time flight status data as the input and the force and moment coefficients as the output. In the online compensation stage, online learning captures the time-varying deviation of the network model through the nonlinear recursive orthogonal time-domain identification method. In the offline correction stage, combined with historical flight data, a data-driven iterative correction method for offline learning network weights is carried out. With the accumulation of UAV flight test data, the mapping value of the flight state data to the force coefficient and moment coefficient in the offline NN is closer to the real value.
ANSYS Fluent in Pointwise V18.3 R1 software is used to obtain the aerodynamic data of the UAV model. The main operation process is as follows: First, the geometric model of the fixed-wing UAV is established using CATIA software and imported into the CFD software, and the body parameters are shown in
Table 1. Second, generate a computational mesh that matches the geometric model. Then, determine the boundary conditions of the simulation area and choose an appropriate flow model. In this paper, a single-component complete gas is selected. The Euler equation is used for the fluid properties. The specific heat ratio is 1.4, the molecular weight of the gas is 2.89 × 10
−2, and the initial partition number of the flow field is 5. CFD software is used to simulate the flow. Additionally, the CFD software solved the velocity, pressure, temperature, and other parameters of the flow field according to the selected flow model, grid, and boundary conditions. We extracted the required aerodynamic data, such as lift coefficient and pitching moment coefficient, from the simulation results. The UAV model established by CATIA software is shown in
Figure 2, and the CFD simulation process is shown in
Figure 3.
The process of training the deep learning network is a process of continuously correcting the network output and the expected output. This adjustment is achieved by backpropagating the error signal from the output end and continuously correcting the weighting coefficients during the propagation process until the output at the output end and the expected value approach to a certain extent. After the adjustment of the network weight coefficients is completed for the sample, it is sent to another sample mode for similar learning until the training and learning of all samples are completed. Finally, the dynamic NN model is obtained [
17].
The NN model is shown in the figure, and the given training set is the input value of the NN; is the output value of the NN. The NN can be regarded as a nonlinear function, and its input value and predicted value can be regarded as the independent variable and dependent variable of the function, respectively. When the number of input nodes is and the number of output nodes is , the NN is equivalent to the functional mapping relationship from independent variables to dependent variables.
For the output layer, its expression is:
In the formula,
is the activation function;
is the neuron in the hidden layer,
;
is the weight matrix from the hidden layer to the output layer;
represents the connection weight between the
neuron in the hidden layer and the
neuron in the input layer, then
can be written as:
The threshold
expression is:
The output layer
y can be written as:
where
is the activation function;
is the neuron in the input layer,
;
is the weight matrix from the input layer to the hidden layer; and
represents the connection weight between the
neuron in the input layer and the
neuron in the hidden layer, can be written as:
The threshold
expression is:
The above feed-forward NN’s expression is:
The activation functions
and
are selected as
function and linear function respectively.
can be expressed as:
The backpropagation of the error is to first calculate the output error of each layer of neurons from the output layer by layer. After calculating these errors, the weight and threshold of each layer are adjusted according to the error of the objective function so that the final output of the modified network can be close to the expected value. In this section, the objective function of the NN is proposed to be measured by the sum of mean square errors [
18].
For a training example,
, the mean square error is:
Then the total error for all training examples is:
where
is the number of training samples.
The training method of the NN in this project intends to adopt the L–M training method. The L–M algorithm is an improved Gauss–Newton method, and its form is as follows:
In the formula,
is the Hessian matrix of the function;
is the gradient. At this point, the Hessian matrix of the gradient and function can be expressed as:
is the Jacobian matrix of the function:
Through the above calculation, the L–M algorithm calculates
to update
at each step by approximating the Hessian matrix [
19], where
is:
We applied this method to repeat the reverse error propagation algorithm for all data, adjust the weights and thresholds of each layer, and complete the training of the NN.
3. Dynamic Model Configuration Optimization Based on Multivariate Orthogonal Function
The multivariate orthogonal function nonlinear aerodynamic coefficient modeling based on real-time flight data needs to solve two problems: First, the structure of the model needs to be determined. This requires removing items that have little influence on the model fitting effect from a large number of nonlinear items in the candidate function pool. The minimum prediction mean square error PSE criterion can meet the above requirements. Second, structural parameters need to be identified based on real-time data. The traditional method of parameter estimation based on least squares regression will lead to an ill-conditioned regression matrix due to the linear correlation between variables, resulting in inaccurate parameter estimation.
The coefficient
to be identified is used as the dependent variable, and the independent variables are
n-dimensional independent variables such as Mach number, angle of attack, rudder deflection angle, and flap deflection angle. A set of ordered positive integer sequences
is specified to obtain the candidate monomial set of independent variables, also known as regression factors:
In order to meet the conditions of the subsequent matrix orthogonal decomposition, the dimension of the initialization data here depends on the number of monomials .
We define
as the order of the monomial [
20].
where
represents the new sequence obtained by updating the
base sequence. All the index sequences are obtained through the above process, which can be inserted into the above formula to obtain the candidate monomial
.
Decompose
to obtain the initialized orthogonal function matrix
and coefficient matrix
:
The model to be identified can be represented by a linear combination of
:
In the formula, and .
The ultimate goal of orthogonal modeling is to obtain a set of optimal
values so that the least squares cost function
of the model is minimized [
21], where
Calculate the derivative of the cost function in the above formula with respect to
and solve the equation to obtain the optimal estimate of the unknown parameter
:
By transforming it into a matrix, we have:
The second part of the rapid modeling of aerodynamic coefficients is to iteratively update the orthogonal function pool based on real-time data. At the same time, update the influencing factors on the right side of the above formula. After acquiring the new data
, the new data are added to the last line of the above formula [
22]:
where
is the new dependent variable data. In order to ensure that the subsequent decomposition conditions are satisfied, the parameter matrix
must be transformed so that the last row is all zeros. The Givens transformation method is used to triangulate
, and the Givens matrix is defined as follows:
In the formula,
, by multiplying all the Givens matrices into the formula [
23], we have
The above formula is the result of completing a dataset update, in which the symbol with a superscript indicates that it contains information on new data.
indicates the residual of the new data, which is the residual information that the new data cannot be projected onto an orthogonal basis. In further iterations, it is necessary to replace the last row of the matrix with new data and repeat the above iterative process to update the orthogonal function pool. The whole iterative process only needs to perform simple matrix multiplication and does not need to repeat the orthogonal function generation process, which greatly improves the iterative efficiency. The multivariate orthogonal model screening flow chart is shown in
Figure 4.
When applied to data not used in the model identification process, the PSE criterion can be used to quantify the squared prediction error of the identified model. The PSE standard is as follows [
24]:
The previous term of PSE is the Mean Squared Fit Error (MSFE)
MSEF decreases monotonically with increasing orthogonal functions.
The second item is the Overfitting Principle (OFP), as follows:
OFP increases monotonically with the increase in the orthogonal function, which can prevent over-parameterization of the model and help improve the accuracy of the model prediction.
Since MSFE decreases monotonically and OFP increases monotonically, each time an orthogonal function is introduced, MSFE decreases and OFP increases. If each orthogonal function is sorted according to its degree of importance and the orthogonal functions are introduced in order, the PSE must have a global minimum. Selecting this point can determine the selected n orthogonal model functions, taking into account the minimum average square error and good predictive power [
25].
4. Online Incremental Compensation Dynamics Identification Method Based on Recursive Least Squares
As shown in
Figure 5, during the online identification process, the observation model is used to calculate the pitching moment coefficient and lift coefficient, and the difference between the online observation value and the offline network mapping value is calculated as the input value of the recursive least squares to identify the error increment.
For parameter estimation, the relationship between the measured output and the model parameters is more important. The model is called a linear parametric model if the output is given by the following equation:
For a given
and
, the best estimate is obtained by minimizing the weighted sum of the squared errors between the measured output and the model output.
Assuming
, the estimated parameters at the
moments are:
The recursive process starts at time
. In the process of actual use, with the increase in information, the positive definiteness of the information matrix is continuously reduced, and the improvement effect on new information is gradually equal to zero. This phenomenon is called the dataset saturation phenomenon. To solve this problem, a recursive algorithm that introduces the forgetting factor [
26] is proposed:
In the real flight process, the force and moment coefficients cannot be directly measured by sensors. However, they are calculated based on other observable parameters, so it is necessary to establish an observation model of observable parameters and force and moment coefficients.
where
is the pitching moment coefficient,
is the effective length, and
is the chord length.
is the pitch angular acceleration,
,
,
is the moment of inertia,
is the roll angular rate, and
is the yaw angular rate.
is the lift coefficient,
is the dynamic pressure,
is the reference area, and
is the acceleration in the
axial direction.
In the online real-time identification process, the sensor collects the flight state data in real-time to calculate the observed value of the pitch moment coefficient. It makes a difference with the offline NN mapping value to obtain the error increment of the pitch moment coefficient. According to the recursive least squares identification algorithm, the incremental identification value of each derivative item of the pitching moment coefficient is calculated:
We add the error incremental identification value of the derivative term to the reference value to obtain the identification incremental compensation pitching moment coefficient:
where
is the fitted value of the offline NN based on the flight status data.
5. Data-Driven NN Model Iterative Modification Method
This section is based on the intelligent identification of NN to realize the iterative correction of data-driven offline network weights. With the accumulation of flight test data, the mapping model of flight state data to force coefficient and moment coefficient in the offline learning network is continuously revised, and lifelong learning is finally realized.
Input layer [
27]:
.
Hidden layer: .
In the formula,
is the output of the hidden layer of the
step,
is the input of the hidden layer of the
step,
is the weight matrix for converting the output of the input layer into the input of the hidden layer, and
is the activation function of the hidden layer. is the hyperbolic tangent sigmoid function Tanh, and its expression is this:
Output layer: .
In the formula,
is the activation function of the output layer, which is specified as a sigmoid function, and the expression is:
5.1. Establish Loss Function
The update of the weight matrix of the NN should be guided by the minimum loss function
so that the error between the pitching moment coefficient/lift coefficient and the nominal pitching moment coefficient/lift coefficient of the offline mapping of the NN is minimized.
5.2. The Weight Matrix Update Algorithm from the Hidden Layer to the Output Layer of NN
The BP update algorithm of the weight matrix is reversed, so the weight matrix
from the hidden layer to the output layer needs to be updated first [
28]:
In the formula, we take the negative gradient direction, that is, , to seek the minimum value of the loss function ; is the learning rate; the last momentum item is added here: is the inertia coefficient; is the weight matrix correction amount of the step.
The weight matrix correction amount of the
step is:
The above formula is unknown; the following uses the chain rule to derive the expression of :
For
, the symbolic function is used to simplify the expression:
The bias produced by the sign function substitution is compensated by the learning rate and inertia coefficient [
29]. If the controlled quantity is torque,
.
According to the output layer activation function
and
and after approximation and substitution, it can be simplified [
30]:
The above formula is the output of the first hidden layer.
The final result is a dimensional matrix, where is the number of neurons in the hidden layer.
Then, the weight matrix correction amount
can be rewritten as:
5.3. Update the Algorithm of the Weight Matrix from the Input Layer to the Hidden Layer of NN
Comparing formula
, it is found that the following relational formula exists [
31]:
Therefore, the weight matrix correction value
from the input layer to the hidden layer of the
step can be written as:
where
6. Simulation Example
In order to verify the effectiveness of the method proposed in this paper, this section obtains aerodynamic data based on the aerodynamic function of a fixed-wing UAV and trains an offline NN, which reflects the mapping relationship between the flight state and the force and moment coefficients.
The form of the high-dimensional identification model established offline is as follows [
32]:
The form of the low-dimensional identification model after screening by the orthogonal model is as follows:
Based on the flight state data, an offline NN is built. Moreover, the NN is trained to map the pitching moment coefficient to the flight state data, such as angle of attack and rudder deflection. The fitting effect of the offline NN is measured by the fitting degree and the mean square error MSE, and the closer the fitting degree is to 1, the better the fitting effect is.
6.1. Simulation and Analysis of Offline Training of Aerodynamic Force and Aerodynamic Moment NN Model
Using Pointwise V18.3 R1 software from ANSYS Fluent to calculate the aerodynamic data set of the UAV, a total of 20,000 sets of data are used to build an offline deep learning network. The NN is trained to map the pitching moment coefficient to the flight state data, such as angle of attack and rudder deflection. An offline neural network is a feed-forward network composed of nonlinearly changing units. It is generally composed of five layers of neurons: one input layer, three hidden layers, and one output layer. The neurons in each layer form weighted interconnections, while the neurons located in the same layer have no connections and do not influence each other. Therefore, the neurons in each layer are only sensitive to the input of the neurons in the previous layer. The output of the neurons in each layer only affects the output of the next layer. The BP neural network structure is determined based on the characteristics of the fitted nonlinear function. This paper studies the nonlinear functions of the lift coefficient and pitching moment coefficient. It has five input parameters: angle of attack, full-motion tail, flap deflection angle, speed, and altitude, and two output parameters: lift coefficient and pitching moment coefficient. In this section, the nonlinear link of the hidden layer of the BP neural network uses the “sigmoid” nonlinear function, and the neuron type of the output layer is a linear output neuron. This algorithm selects 70% of the training data as the training set, and the verification set and the test set each account for 15% of the data. The fitting effect of the offline NN is measured by the fitting degree R
2 and the mean square error MSE, and the closer the fitting degree R
2 is to 1, the better the fitting effect is, as shown in
Figure 6.
The offline deep learning network was built according to the CFD flight status data. As shown as
Table 2, the fitting degree R
2 was 0.99948, and the mean square error of the training data was 10
−7, which indicated that the NN built offline had a good fitting mapping effect on the parameters to be estimated.
6.2. Simulation and Analysis of Dynamic Identification Based on Offline Network Learning and Online Compensation
Based on the benchmark NN model of aerodynamic force and aerodynamic moment established in the offline stage and the response data of the online process, the deviation data of the benchmark NN model is calculated and obtained. The increment in aerodynamic force and aerodynamic moment is obtained using the time domain recursive least squares identification method. In this section, we conduct an identification simulation analysis of the pitching moment coefficient and lift coefficient. This analysis is based on the dynamic identification method of offline network learning and online compensation. We evaluate the aspects of identification accuracy and identification efficiency, respectively.
It can be seen from
Figure 7 and
Figure 8 that, under the same conditions of identification accuracy, the force coefficient and moment coefficient identified by the hybrid intelligent method converge faster than the force coefficient and moment coefficient obtained by the traditional identification method.The residual and relative error curves of the pitching moment coefficient and lift coefficient are shown in
Figure 9 and
Figure 10.
In the offline process, the research method in this paper uses the QR decomposition matrix according to the multivariate orthogonal function. It uses the Givens matrix to iterate the data to determine the identification reference configuration. Compared with the traditional online iterative identification configuration, the time consumed by the online iterative process is greatly reduced. Moreover, online learning captures the time-varying deviation of the network model through the nonlinear recursive orthogonal time-domain identification method. These deviations are then integrated with the force coefficient and moment coefficient fitted by the NN, which improves the identification accuracy of the force coefficient and moment coefficient. As shown in
Table 3, it can be seen from the table that under the same identification conditions, the time-consuming task of identifying the moment coefficient is reduced from the original 0.438 s to 0.0674 s. Comparing the incremental compensation identification and the recursive least squares identification methods, the identification time-consuming of the force coefficient is reduced from the original 0.576 s to 0.0753 s.
6.3. Simulation and Analysis of an Iterative Learning Correction Method Based on a Data-Driven NN Model
This section considers using the flight test data of a real fixed-wing UAV to modify the weight matrix of the original NN offline so as to realize the iterative learning of the offline network. By updating and iterating the weight matrix of the NN, the fitting accuracy of the NN to the force coefficient and moment coefficient is greatly improved, thereby realizing lifelong learning for complex dynamic models.
Figure 11 and
Figure 12 are respectively the identification results of the pitching moment coefficient and lift coefficient after correction by the neural network.
The training data of the original NN were obtained through CFD tests, and there is a big difference with the real flight data. Therefore, it is necessary to correct the original NN weight matrix established offline through the network weight iterative correction algorithm based on the real flight test data. This adjustment ensures that the NN model established by it can better reflect the real dynamic model. According to the simulation results as shown in
Table 4, compared with the original NN, the variance of the mapping value of the modified network to the moment coefficient is reduced by 83.68%, and the residual error is reduced by 69.23%. After the correction, the variance of the mapping value of the network to the force coefficient is reduced by 39.63%, and the residual error is reduced by 89.89%.
7. Conclusions
In this paper, an intelligent identification method of aerodynamic parameters based on deep learning network correction and compensation is used to identify the pitching moment coefficient and lift coefficient. The CFD simulation data of fixed-wing UAVs are used to train the deep learning network offline. The network training dataset pair consists of flight state data, force coefficients, and moment coefficients. Secondly, based on the recursive orthogonal time-domain algorithm, the recursive least squares incremental identification compensation is performed according to the offline trained network mapping force coefficient, moment coefficient, and coefficients. Finally, the method of establishing a loss function is used to correct the output layer to the hidden layer and the weights from the hidden layer to the input layer. The deep learning networks are corrected offline according to the data collected in the real flight state so that the corrected NN mapping force coefficient and torque coefficient are closer to the real values.
Since the model established based on ground simulation data has errors and it is difficult to simulate uncertain factors such as complex real-world environments, this method improves the control performance of the UAV. It improves the fitting accuracy of network mapping force coefficients and torque coefficients. At the same time, the problem of reduced control accuracy caused by the existence of time-varying coupling is solved. In addition, flight tests have accumulated a large number of test flight data. It is of great significance to use test flight data to achieve model correction in real flight environments, laying the foundation for obtaining more accurate complex control models.