Unmanned aerial vehicle flight control method based on physical neural network prediction model
By introducing physical constraints into the loss function of the multi-layer perceptron neural network prediction model, the problem of lack of physical interpretability of the neural network model in drone flight control is solved, and more efficient and stable drone trajectory tracking control is achieved.
Patent Information
- Application Number
- CN202510227963.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The neural network prediction model in the prior art lacks physical interpretability in UAV flight control, resulting in the model parameters that do not directly correspond to the physical parameters of the system and lack physical significance.
Physical constraints are introduced into the loss function of the multi-layer perceptron neural network prediction model. By introducing the dynamic equations of the drone into the training of the neural network prediction model, the computational efficiency of the model's state prediction of system behavior and online optimization is improved.
It improves the physical interpretability of neural network prediction models, improves prediction accuracy and stability, and achieves more efficient drone trajectory tracking control.
Smart Images

Figure CN119739043A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle control, and in particular to a flight control method for an unmanned aerial vehicle based on a physical neural network prediction model. Background Art
[0002] In the field of UAV flight control, model-based control technology is highly dependent on the accuracy of the UAV dynamics model. In Model Predictive Control (MPC), the state prediction and online optimization of system behavior will also bring about the problem of "complexity explosion". In addition to numerical solution methods, more accurate dynamic modeling methods need to be explored. In recent years, data-driven modeling methods based on neural networks (NN) have been widely used, such as the use of corrected linear units, convolutional neural networks, recurrent neural networks, etc., which rely on input-output observations to describe the dynamic characteristics of the system. At the same time, neural networks are applied to MPC. This method can predict the future behavior of the system based on the dynamic model and incorporate it into the optimization process to determine the optimal trajectory of the operating variables. The trajectory tracking control method of neural network model predictive control has been applied in electrical engineering technology, wind power technology, robot control and other fields.
[0003] The Chinese invention patent application with publication number CN117555270A discloses a control method based on neural network prediction of aircraft model, which clarifies the uncertainties in the aircraft model, takes the uncertainties in the aircraft model as the output of the BP neural network, and determines the aircraft state information as the input of the BP neural network based on the correlation between the uncertainties and the aircraft state information; obtains sample data through mechanism modeling; pre-processes the sample data; establishes a BP neural network model; trains the BP neural network offline to obtain the mapping relationship between input and output; and predicts the aircraft model in real time through the trained neural network module, thereby adjusting the control parameters. However, the interpretability of the BP neural network model is poor, because the model parameters do not directly correspond to the physical parameters of the system and lack physical meaning. Therefore, how to provide a neural network prediction model with physical interpretability and use it for UAV flight control is a technical problem that urgently needs to be solved in this field. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a UAV flight control method based on a physical neural network prediction model. Based on the problem of poor physical interpretability of the neural network prediction model, physical constraints are introduced into the loss function of the multi-layer perceptron model, aiming to introduce the dynamic equations of the UAV into the training of the neural network prediction model, thereby improving the computational efficiency of the neural network prediction model for state prediction and online optimization of the system behavior, and realizing more efficient UAV trajectory tracking control.
[0005] The technical solution of the present invention is as follows: A UAV flight control method based on a physical neural network prediction model comprises the following steps: Step S1: Establish a multi-layer perceptron neural network prediction model; Step S2: designing a loss function of a multi-layer perceptron neural network prediction model, wherein the loss function is composed of data loss and physical loss; Step S3: Use the training data set to train the multi-layer perceptron neural network prediction model and verify the training effect; Step S4: Initialize the model predictive controller, set constraints, reference values and time steps, and establish a multi-objective optimization function; Step S5: Run the model predictive controller at the prediction time step At each moment, the multi-layer perceptron neural network prediction model predicts the control time step The predicted state value sequence of the UAV is obtained, and then the constraints are used to solve the multi-objective optimization function to obtain the optimal control input; Step S6: Based on the optimal control input, control the UAV to fly according to the reference trajectory.
[0006] Preferably, the input of the multi-layer perceptron neural network prediction model in step S1 is the current state value of the drone. and control input value , the output is the predicted state value of the drone at the next moment .
[0007] Preferably, the current state value , control input value , the predicted state value at the next moment , is the pitch angle of the drone, is the forward speed of the UAV in the ground coordinate system, is the normal velocity of the UAV in the ground coordinate system, is the pitch angular velocity of the UAV, is the deflection angle of the UAV rotor servo, is the rotational angular velocity of the UAV rotor motor, is the predicted pitch angle of the UAV, is the predicted forward speed of the UAV in the ground coordinate system, is the predicted normal velocity of the UAV in the ground coordinate system, is the predicted pitch angular velocity of the UAV.
[0008] Preferably, the multi-layer perceptron neural network prediction model consists of an input layer, a first fully connected layer, a first activation function layer, a second fully connected layer, a second activation function layer, and an output layer.
[0009] Preferably, in step S2, the loss function Due to data loss and physical losses Sum composition;
[0010] Data loss The expression is:
[0011] in, represents the number of samples, Indicates The data loss weight of each sample is Indicates The current state value of samples, Indicates The predicted state value of samples at the next moment; Physical damage The expression is:
[0012] in For the The physical loss weight of samples, For the The current state acceleration of samples, For the The predicted state acceleration of the next moment of samples.
[0013] Preferably, in step S4, the constraint conditions include state constraints and control constraints, and the reference value includes a reference state value and reference control value , the time step includes the prediction time step and control time step .
[0014] Preferably, in step S4, the multi-objective optimization function The expression is:
[0015] in, Indicates The moment i Step prediction state value, Indicates The moment i Step control input value, Indicates The state value at the moment, Indicates The first step predicted state value at time , Indicates The moment Step prediction state value, Indicates The control input value at time Indicates The first step at time controls the input value, Indicates The moment Step control input value, is the weight matrix of the state error, is the weight matrix of the control error, For the The future predicted by the multi-layer perceptron neural network prediction model at all times The predicted state value sequence of the step, For the Moment by The obtained control input value sequence, represents the lower bound of the state constraint, represents the upper bound of the state constraint, represents the lower bound of the control constraint, Represents the upper bound of the control constraint.
[0016] Preferably, the multi-layer perceptron neural network prediction model is expressed as:
[0017] in, Indicates The moment The predicted state acceleration obtained by differentiating the predicted state value of the step, Represents the NN model.
[0018] Preferably, in step S6, controlling the drone to fly according to the reference trajectory includes: Based on The optimal control input at time , , update the status of the drone:
[0019] in, Indicates The state acceleration at the moment, It is the system model of the UAV.
[0020] Preferably, the state of the drone is numerically integrated using the Euler method:
[0021] in, Indicates The state value at the moment, Represents the time step.
[0022] Compared with the prior art, the present invention has the following advantages: 1. Compared with the existing data-driven black box model, the multi-layer perceptron neural network prediction model of the present invention has physical interpretability because the dynamics principle is introduced into the loss function of the multi-layer perceptron neural network prediction model.
[0023] 2. The multi-layer perceptron neural network prediction model of the present invention has high prediction accuracy and good stability.
[0024] 3. The model predictive controller (MPC) in the present invention uses a multi-layer perceptron neural network prediction model to update the state in the control time domain, which can realize complex real-time calculations and is easy to implement in engineering.
[0025] 4. The UAV flight control method based on the physical neural network prediction model proposed in the present invention can achieve stable flight control for a given reference trajectory. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. The features and advantages of the present invention can be more clearly understood by referring to the drawings. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 It is a flow chart of the UAV flight control method based on the physical neural network prediction model of the present invention.
[0028] Figure 2 It is a structural diagram of the multi-layer perceptron neural network prediction model.
[0029] Figure 3 This is the overall technical concept of the UAV flight control method based on the physical neural network prediction model of the present invention.
[0030] Figure 4 It is the simulation result of multi-layer perceptron neural network prediction model training.
[0031] Figure 5 It is the simulation result of trajectory tracking by model predictive controller. DETAILED DESCRIPTION
[0032] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0034] The overall technical concept of the UAV flight control method based on the physical neural network prediction model proposed in this invention is as follows: Figure 3 As shown in the figure, it mainly includes three parts: modeling layer, planning layer and control layer. The modeling layer includes a multi-layer perceptron neural network prediction model, the planning layer includes reference trajectories and reference control inputs, and the control layer includes a rolling solution of multi-objective optimization functions and optimal control input sequences.
[0035] Example 1 A UAV flight control method based on a physical neural network prediction model, such as Figure 1 As shown, the following steps are included: Step S1: Establish a multi-layer perceptron neural network prediction model, which is used to predict the current state of the drone. and control input , predict the next moment state of the drone ; The multi-layer perceptron neural network prediction model only considers the longitudinal dynamics model of the tail-seat UAV. is the current state value of the drone, The two together serve as the input of the multi-layer perceptron neural network prediction model; the next moment prediction state value of the drone , as the output of the multi-layer perceptron neural network prediction model. Among them, is the pitch angle of the drone, The UAV is in the ground coordinate system Speed (ground coordinate system) of The axis points in the direction of the drone's heading in the ground plane. The axis is vertically downward, Axis vertical plane, determined by the right-hand rule), is the forward speed of the UAV in the ground coordinate system, is the normal velocity of the UAV in the ground coordinate system, is the pitch angular velocity of the UAV, is the deflection angle of the UAV rotor servo, is the rotational angular velocity of the UAV rotor motor, is the predicted pitch angle of the UAV, The UAV is in the ground coordinate system The predicted speed under is the predicted forward speed of the UAV in the ground coordinate system, is the predicted normal velocity of the UAV in the ground coordinate system, is the predicted pitch angular velocity of the UAV.
[0036] The multi-layer perceptron neural network prediction model consists of an input layer, a first fully connected layer, a first activation function layer, a second fully connected layer, a second activation function layer, and an output layer.
[0037] The first fully connected layer contains 10 hidden nodes, the second fully connected layer contains 8 hidden nodes, the first activation function layer and the second activation function layer are both tanh layers, and the hyperbolic tangent function tanh is used as the activation function. Figure 2 shown.
[0038] The input layer is a feature input layer. The input sequence has 6 features, corresponding to The four state variables in and The two control quantities in The output layer is used to convert the network parameters of the multi-layer perceptron neural network prediction model into the predicted state value at the next moment. .
[0039] Step S2: Design a loss function for the multi-layer perceptron neural network prediction model, where the loss function is derived from the data loss and physical losses Sum composition, data loss Used to ensure that the predicted value of the multi-layer perceptron neural network prediction model is consistent with the actual value, physical loss The dynamic principle is introduced to ensure that the predicted value conforms to the dynamic law.
[0040] in, ; Data loss It is used to measure the error between the predicted value and the true value, using the weighted mean absolute error:
[0041] in, represents the number of samples, For the The data loss weight of the sample is used to represent the The current state value of samples The importance of Indicates The predicted state value of the next moment of samples.
[0042] Physical damage The purpose is to ensure that the predicted value conforms to the law of dynamics, that is, the predicted value must satisfy the UAV dynamics equation:
[0043] in For the The physical loss weight of samples, For the The current state acceleration of samples, For the The predicted state acceleration of the next moment of samples.
[0044] Step S3: using the training data set obtained from the six-degree-of-freedom dynamics simulation of the UAV to train the multi-layer perceptron neural network prediction model and verify the training effect; Step S4: Initialize the model predictive controller (MPC), set constraints, reference values, time steps, and establish a multi-objective optimization function.
[0045] The constraint conditions include state constraints and control constraints, and the reference value includes a reference state value and reference control value , the time step includes the prediction time step (How many steps does MPC control) and the control time step (MPC performs state prediction for a certain number of future steps in each control step); the multi-objective optimization function is used to obtain the optimal control input according to the reference value in each control step.
[0046] In some embodiments, the prediction time step (MPC performs 10-step control), control time step (MPC predicts the state of the next three steps in each control step); set state constraints and control constraints as constraints, and construct the first Multi-objective optimization function at each moment :
[0047] in, Indicates The moment Step prediction state value, Indicates The moment Step control input value, Indicates The state value at the moment, Indicates The first step predicted state value at time , Indicates The moment Step prediction state value, Indicates The control input value at time Indicates The first step at time controls the input value, Indicates The moment Step control input value, is the weight matrix of the state error, is the weight matrix of the control error, For the The future predicted by the multi-layer perceptron neural network prediction model at all times The predicted state value sequence of the step, For the Moment by The obtained control input value sequence, represents the lower bound of the state constraint, represents the upper bound of the state constraint, represents the lower bound of the control constraint, Represents the upper bound of the control constraint.
[0048] Step S5: Run the model predictive controller at the prediction time step At each moment, the multi-layer perceptron neural network prediction model predicts the control time step The model predictive controller obtains the optimal control input through real-time rolling optimization, that is, the deflection angle of the UAV rotor servo. and the angular velocity of the drone rotor motor The optimal control quantity.
[0049] Wherein, the expression of the model predictive controller is:
[0050] in, Indicates The moment The predicted state acceleration obtained by differentiating the predicted state value of the step, Represents the NN model.
[0051] The core of MPC is to find an optimal control input sequence and make the UAV fly along the reference trajectory by minimizing the multi-objective optimization function. At this moment, MPC will find the current optimal control input , that is, Moments passed The control input sequence obtained The first item , which includes the deflection angle of the drone's rotor servo and the rotational angular velocity of the rotor motor, and applies it to the drone's system model to update the drone's status:
[0052] in, Indicates The state acceleration at the moment, It is the system model of the UAV.
[0053] In the actual update, due to and What is calculated is the first-order derivative of the drone's state, and the Euler method is used to numerically integrate the drone's state:
[0054] in, Indicates The state value at the moment, Represents the time step.
[0055] Finally, in order to verify the effectiveness of the UAV flight control method based on the physical neural network prediction model proposed in the present invention, a MATLAB simulation system of tail-seat UAV-NN-MPC trajectory tracking control was built.
[0056] In the training of the multi-layer perceptron neural network prediction model, 80% of the training data set is used for training, 19% for validation, and 1% for testing. The number of training set samples is 2124, the number of validation set samples is 89, the number of test set samples is 23, and the total number of network parameters is 194. The error probability density of the four state quantities output by the multi-layer perceptron neural network prediction model on the validation set is as follows: Figure 4 As shown, and They represent the mean and standard deviation of the normal distribution respectively. The prediction results are close to the true value, the variance is small, and the prediction is relatively stable.
[0057] Setting the prediction time step in a model predictive controller trajectory tracking simulation , controlling the time step , the simulation results of tracking the reference trajectory are as follows Figure 5 As shown, the result curve is smooth and can be tracked stably, which verifies that the UAV flight control method based on the physical neural network prediction model proposed in the present invention has good modeling accuracy and trajectory tracking effect.
[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A UAV flight control method based on a physical neural network prediction model, characterized in that: The following steps are involved: Step S1: Establish a multi-layer perceptron neural network prediction model; Step S2: designing a loss function of a multi-layer perceptron neural network prediction model, wherein the loss function is composed of data loss and physical loss; Step S3: Use the training data set to train the multi-layer perceptron neural network prediction model and verify the training effect; Step S4: Initialize the model predictive controller, set constraints, reference values and time steps, and establish a multi-objective optimization function; Step S5: Run the model predictive controller at the prediction time step At each moment, the multi-layer perceptron neural network prediction model predicts the control time step The predicted state value sequence of the UAV is obtained, and then the constraints are used to solve the multi-objective optimization function to obtain the optimal control input; Step S6: Based on the optimal control input, control the UAV to fly according to the reference trajectory.
2. The UAV flight control method according to claim 1, characterized in that: The input of the multi-layer perceptron neural network prediction model in step S1 is the current state value of the drone. and control input value , the output is the predicted state value of the drone at the next moment .
3. The UAV flight control method according to claim 2, characterized in that: Current state value , control input value , the predicted state value at the next moment , is the pitch angle of the drone, is the forward speed of the UAV in the ground coordinate system, is the normal velocity of the UAV in the ground coordinate system, is the pitch angular velocity of the UAV, is the deflection angle of the UAV rotor servo, is the rotational angular velocity of the UAV rotor motor, is the predicted pitch angle of the UAV, is the predicted forward speed of the UAV in the ground coordinate system, is the predicted normal velocity of the UAV in the ground coordinate system, is the predicted pitch angular velocity of the UAV.
4. The UAV flight control method according to claim 3, characterized in that: The multi-layer perceptron neural network prediction model consists of an input layer, a first fully connected layer, a first activation function layer, a second fully connected layer, a second activation function layer, and an output layer.
5. The UAV flight control method according to claim 4, characterized in that: In step S2, the loss function Due to data loss and physical losses Sum composition; Data loss The expression is: in, represents the number of samples, Indicates The data loss weight of each sample is Indicates The current state value of samples, Indicates The predicted state value of samples at the next moment; Physical damage The expression is: in For the The physical loss weight of samples, For the The current state acceleration of samples, For the The predicted state acceleration of the next moment of samples.
6. The UAV flight control method according to claim 5, characterized in that: In step S4, the constraint conditions include state constraints and control constraints, and the reference value includes a reference state value. and reference control value , the time step includes the prediction time step and control time step .
7. The UAV flight control method according to claim 6, characterized in that: In step S4, the multi-objective optimization function The expression is: in, Indicates The moment Step prediction state value, Indicates The moment Step control input value, Indicates The state value at the moment, Indicates The first step predicted state value at time , Indicates The moment Step prediction state value, Indicates The control input value at time Indicates The first step at time controls the input value, Indicates The moment Step control input value, is the weight matrix of the state error, is the weight matrix of the control error, For the The future predicted by the multi-layer perceptron neural network prediction model at all times The predicted state value sequence of the step, For the Moment by The obtained control input value sequence, represents the lower bound of the state constraint, represents the upper bound of the state constraint, represents the lower bound of the control constraint, Represents the upper bound of the control constraint.
8. The UAV flight control method according to claim 7, characterized in that: The expression of the multi-layer perceptron neural network prediction model is: in, Indicates The moment The predicted state acceleration obtained by differentiating the predicted state value of the step, Represents the NN model.
9. The UAV flight control method according to claim 8, characterized in that: In step S6, controlling the drone to fly according to the reference trajectory includes: Based on The optimal control input at time , , update the status of the drone: in, Indicates The state acceleration at the moment, It is the system model of the UAV.
10. The UAV flight control method according to claim 9, characterized in that: Use Euler's method to numerically integrate the drone's state: in, Indicates The state value at the moment, Represents the time step.
Citation Information
Patent Citations
Control method and controller for predicting aircraft model based on neural network
CN117555270A
Autonomous driving path tracking control method of crawler-type mobile robot
CN110286683A
Unmanned aerial vehicle obstacle avoidance and path planning method
CN113110592A
Unmanned aerial vehicle flight method and device based on neural network
CN113467512A
Four-rotor unmanned aerial vehicle target tracking method based on active visual perception
CN113674310A
Cited By
Synchronous data sensing method, device and equipment based on edge multipoint cooperation
CN120152006A
Wind field sensing and wind resistance control equipment and method for cross-domain unmanned aerial vehicle
CN120469243A
A wind field perception and anti-wind control device and method for cross-domain unmanned aerial vehicles
CN120469243B
Multi-stage cell culture-oriented adaptive mechanism fusion living cell density prediction method
CN121583333A
Adaptive mechanism fusion method for live cell density prediction oriented to multi-stage cell culture
CN121583333B