An unmanned aerial vehicle formation fault-tolerant distributed nonlinear predictive control method and system based on a graph neural network

CN122593408APending Publication Date: 2026-08-18NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610919961.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,如何将图神经网络在线故障估计、分布式非线性模型预测控制以及多目标约束(包括编队保持与安全避障)有机融合,构建一个统一的分布式容错协同控制框架,现有技术仍缺乏有效解决方案

Benefits of technology

本发明提出一种基于图神经网络的无人机编队故障容错分布式非线性预测控制方法及系统,通过在无人机动力学模型中显式引入时变推力损失系数,并基于编队通信拓扑构建图结构,利用图神经网络聚合邻居状态特征来在线估计推力损失系数,同时设计带有阻尼项的自适应权重更新律,有效提高了故障估计的实时性与精确性;将实时估计的故障系数引入预测模型,形成故障补偿预测模型,使得分布式非线性模型预测控制器能够在优化框架内主动补偿推力损失故障;通过构建包含轨迹跟踪误差、编队保持误差、控制能耗和基于高阶控制障碍函数的安全代价的统一目标函数,实现了多个控制目标的协调优化,尤其利用高阶控制障碍函数构造软约束,在保证避障安全性的同时避免了硬约束导致的优化不可行问题;通过终端代价函数和终端约束集的设计,保证了滚动时域优化的递归可行性和闭环系统的稳定性,最终实现了在存在执行器推力损失故障和外部扰动条件下的高精度轨迹跟踪、稳定编队保持与安全避障控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122593408A_ABST
    Figure CN122593408A_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned aerial vehicle formation fault tolerance distributed nonlinear predictive control method and system based on graph neural network;First, the fault dynamics model including time-varying thrust loss coefficient and external disturbance is established, and the formation topology graph is constructed based on communication distance;The graph neural network is used to model the formation state with graph structure and neighbor feature aggregation, and the thrust loss coefficient is estimated online, and the network output layer weight is updated based on speed prediction error;The estimated fault coefficient is introduced into the distributed nonlinear model predictive controller to construct a fault compensation prediction model, the stage cost function integrates trajectory tracking, formation keeping, control energy consumption and obstacle avoidance soft constraint based on high-order control barrier function, and the terminal cost and constraint set are added to form finite time domain optimal control;Each unmanned aerial vehicle solves optimization independently;The application can ensure the stable flight, accurate trajectory tracking and safe obstacle avoidance of formation under actuator thrust loss, external disturbance and obstacle environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of UAV cooperative control and intelligent autonomous system technology, specifically to a fault-tolerant distributed nonlinear predictive control method and system for UAV formation based on graph neural networks. Background Technology

[0002] With the rapid development of UAV technology, the collaborative execution of complex tasks such as reconnaissance, transportation, and search by multi-UAV formations has become an important research direction. Among formation control methods, Model Predictive Control (MPC) is widely favored because it can explicitly handle system nonlinear dynamics, state constraints, and control constraints. In particular, Nonlinear Model Predictive Control (NMPC) can directly predict future states based on nonlinear dynamic models and obtain optimal control inputs through finite-time rolling optimization. By adopting a distributed architecture, each UAV only uses its own and its neighbors' information to solve local optimization problems, significantly reducing the computational and communication burden and improving the system's scalability and robustness.

[0003] However, in real-world flight environments, UAV actuators may experience thrust loss failures due to mechanical wear, motor overheating, and other reasons, often accompanied by external disturbances such as aerodynamic disturbances and sensor errors. These uncertainties can significantly alter the dynamic characteristics of UAVs, leading to decreased accuracy in preset trajectory tracking, disruption of formation, and even collisions between UAVs or with obstacles. Existing fault-tolerant control methods mostly employ centralized fault diagnosis and isolation techniques or model-based adaptive parameter estimation, but these methods fail to fully utilize the structured information inherent in the UAV formation communication topology to improve the accuracy and real-time performance of fault estimation. Graph Neural Networks (GNNs) possess the ability to extract node and neighborhood features from non-Euclidean graph structured data, making them suitable for fault parameter estimation in distributed systems. However, existing technologies still lack effective solutions for organically integrating online fault estimation using GNNs, distributed nonlinear model predictive control, and multi-objective constraints (including formation maintenance and safe obstacle avoidance) to construct a unified distributed fault-tolerant cooperative control framework. Meanwhile, traditional obstacle avoidance methods often incorporate the minimum safe distance as a hard constraint directly into the optimization problem. When environmental obstacles are dense or the state changes abruptly, this can easily lead to optimization becoming infeasible, thereby endangering flight safety.

[0004] Therefore, there is an urgent need to provide a control method that can accurately estimate actuator thrust loss online, make full use of formation communication topology information, and simultaneously achieve trajectory tracking, formation maintenance, control energy minimization, and reliable obstacle avoidance in a distributed architecture, so as to meet the needs of safe, stable, and cooperative flight of UAV formations in complex environments. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a fault-tolerant distributed nonlinear predictive control method and system for UAV formation based on graph neural networks.

[0006] To achieve the above objectives, the present invention provides the following technical solution: This application provides a fault-tolerant distributed nonlinear predictive control method for UAV formation based on graph neural networks, including the following steps: A dynamic model for each UAV is established, and a time-varying thrust loss coefficient and external disturbances are introduced into the velocity dynamics to obtain a fault dynamic model describing the thrust decay of the actuator. A formation communication topology is constructed based on the communication distance between drones. A communication connection is established when the distance between any two drones is less than the communication radius, and the set of neighboring drones for each drone is determined. A graph neural network is used to model the state information of each UAV and its neighbors, and to aggregate features. The thrust loss coefficient is estimated online based on the final layer node features obtained by aggregation. At the same time, a velocity prediction error is constructed, and the output layer weights of the graph neural network are updated using the velocity prediction error. A distributed nonlinear model predictive controller is constructed, and a fault compensation prediction model is formed using the online estimated thrust loss coefficient; a stage cost function is designed, which includes a trajectory tracking error term, a formation holding error term, a control energy consumption term, and an obstacle avoidance soft constraint cost term constructed based on a higher-order control obstacle function; a terminal cost function and a terminal constraint set are introduced to construct a finite-time optimal control problem. Each UAV measures its own state at the current moment, receives state information from neighboring UAVs, uses the graph neural network to obtain the thrust loss coefficient estimate, solves the finite-time optimal control problem, applies the first control variable in the obtained optimal control sequence to the corresponding UAV, and repeats the above process at the next sampling moment to achieve distributed fault-tolerant predictive control.

[0007] Preferably, the velocity dynamics equation of the fault dynamics model is:

[0008] in, Let represent the derivative of the velocity vector of the i-th UAV with respect to time. ∈R 3 Let be the velocity vector of the i-th UAV in the inertial coordinate system. Indicates the mass of the i-th drone. (t) represents the total thrust input calculated by the control system of the i-th UAV. Let represent the attitude rotation matrix of the i-th UAV from the machine system to the inertial coordinate system. = Let be the attitude angle vector of the i-th UAV, including the roll angle. Pitch angle and yaw angle , =(0,0,1) T Let g be a unit vector pointing vertically upwards, and g be the acceleration due to gravity. (t)∈[0,1) represents the time-varying thrust loss coefficient of the i-th UAV. When (t)=0, it indicates that the actuator is working normally; 0< A thrust loss fault is indicated when (t) < 1. (t) represents the unknown external disturbance experienced by the i-th drone.

[0009] Preferably, the graph neural network performs feature propagation through multi-layer neighbor feature aggregation, and the feature update formula for the (l+1)th layer node is:

[0010] in, This represents the feature vector of the i-th UAV node in the l-th layer of the graph neural network. This represents the feature vector of the j-th neighboring drone node in the l-th layer. Let i represent the set of neighboring drones of the i-th drone. Let be the weight matrix of the linear transformation of the features of the l-th layer. Let be the weight matrix for aggregating the features of the neighbors in the l-th layer. σ is the normalization coefficient. ) is a non-linear activation function.

[0011] Preferably, the online estimation of thrust loss coefficients is achieved through the final layer node features. The linear mapping yields:

[0012] in, W represents the final layer feature vector of the i-th drone node after propagation through an L-layer graph neural network. o b is the output layer weight vector. o This is the bias parameter.

[0013] Preferably, the speed prediction error is ,in This represents the predicted speed of the i-th drone. This represents the actual speed of the i-th drone. This represents the speed prediction error; the predicted speed value is obtained by the following formula:

[0014] in, This represents the derivative of the predicted velocity value with respect to time. The gain matrix is ​​positive definite; the update law for the weights of the output layer of the graph neural network is:

[0015] in, This represents the derivative of the output layer weight estimation error with respect to time. For the output layer weight estimation error, For the final layer node features of the graph neural network, As an intermediate variable, For speed prediction error, >0 represents the learning rate. >0 represents the damping parameter.

[0016] Preferably, the fault compensation prediction model is expressed in the discrete time domain as follows:

[0017] in, This represents the state vector of the i-th UAV at the k-th discrete time step, which includes the position vector. Velocity vector Attitude angle vector and angular velocity vector , This represents the control input vector of the i-th UAV at the k-th discrete time step, containing the total thrust. and control torque , For the online estimated thrust loss coefficient, f( ) represents the discrete state transition function; the stage cost function is:

[0018] in, This represents the stage cost of the i-th drone at the k-th prediction step. This represents the reference state vector of the i-th UAV at the k-th prediction step. This represents the position vector of the i-th UAV at the k-th prediction step. This represents the position vector of the j-th neighboring UAV at the k-th prediction step. Let i represent the set of neighboring drones of the i-th drone. Let represent the expected relative position vector between the i-th drone and the j-th drone. The state tracking weight matrix is ​​positive definite. The formation error weight matrix is ​​positive definite. The control input weight matrix is ​​positive definite. >0 represents the neighbor coordination weight between the i-th drone and its neighboring j-th drone. This represents the square of the weighted Euclidean norm. A value greater than 0 indicates an obstacle penalty weight. Let be the obstacle safety cost function.

[0019] Preferably, the obstacle safety cost function is constructed based on a higher-order control obstacle function: Define security functions ,in, This represents the position vector of the i-th UAV at the k-th prediction step. This represents the position vector of the obstacle. As a preset safe distance, | | represents the Euclidean norm; make , ,in, For intermediate variables of higher-order control barrier functions, This represents the derivative of the security function with respect to time. Positive design parameters; Obstacle avoidance constraints are ,in express The derivative with respect to time; The obstacle safety cost function .

[0020] Preferably, the terminal cost function is:

[0021] in, This represents the terminal cost of the i-th drone. This represents the state vector of the i-th UAV at the N-th step in the prediction time domain terminal. Let represent the reference state vector of the i-th UAV at the N-th step of the prediction time-domain terminal. 0 represents a positive definite terminal weight matrix; the terminal constraint set is... , A set of positive invariant values ​​that ensures the state remains unchanged under the terminal control law; The finite-time optimal control problem is:

[0022] in, Let i represent the overall optimization objective function for the i-th UAV. To predict the control input sequence to be optimized in the time domain, k=0,1,...,N-1 is the prediction step number, and N is the prediction time domain length; the optimization problem satisfies the prediction model. State constraints Control input constraints and terminal constraints , where X represents the state feasible region and U represents the control input feasible region.

[0023] A fault-tolerant distributed predictive control system for UAV formation based on graph neural networks, comprising: The dynamic modeling module is used to establish a fault dynamics model that incorporates thrust loss coefficients and external disturbances; The communication topology construction module is used to construct a fleet communication topology graph based on communication distance and determine the neighbor set. The graph neural network fault estimation module is used to aggregate graph structure features of multiple UAV states, output thrust loss coefficient estimates online, and update the weights of the network output layer using velocity prediction errors. The distributed nonlinear model predictive control module is used to receive the thrust loss coefficient estimate, construct a fault compensation prediction model, and construct a finite-time domain optimization problem based on the stage cost function and the terminal cost. The stage cost function includes trajectory tracking cost, formation keeping cost, control cost, and obstacle avoidance soft constraint cost based on a higher-order control obstacle function. By solving the optimization problem, the optimal control sequence is obtained, and distributed fault-tolerant control is implemented for the UAV formation.

[0024] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the above-described method.

[0025] Compared with the prior art, this application has the following beneficial effects: This invention proposes a fault-tolerant distributed nonlinear predictive control method and system for UAV formation based on graph neural networks. By explicitly introducing time-varying thrust loss coefficients into the UAV dynamics model and constructing a graph structure based on the formation communication topology, the method utilizes graph neural networks to aggregate neighbor state features to estimate the thrust loss coefficients online. Simultaneously, an adaptive weight update law with damping terms is designed, effectively improving the real-time performance and accuracy of fault estimation. The real-time estimated fault coefficients are introduced into the predictive model to form a fault compensation predictive model, enabling the distributed nonlinear model predictive controller to actively compensate for thrust loss faults within the optimization framework. By constructing a unified objective function that includes trajectory tracking error, formation holding error, control energy consumption, and safety costs based on higher-order control obstacle functions, coordinated optimization of multiple control objectives is achieved. In particular, the use of higher-order control obstacle functions to construct soft constraints ensures obstacle avoidance safety while avoiding optimization infeasibility problems caused by hard constraints. Through the design of terminal cost functions and terminal constraint sets, the recursive feasibility of rolling time-domain optimization and the stability of the closed-loop system are guaranteed. Ultimately, high-precision trajectory tracking, stable formation holding, and safe obstacle avoidance control are achieved under conditions of actuator thrust loss faults and external disturbances. Attached Figure Description

[0026] Figure 1 A flowchart illustrating a nonlinear predictive control method in an exemplary embodiment of this disclosure is shown schematically. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Furthermore, in this invention, an element referred to as fixed to or disposed on another element may be directly disposed on the other element, or there may be an intermediate element. When an element is considered to be connected to another element, it may be directly connected to the other element, or there may be an intermediate element present simultaneously. The terms vertical, horizontal, left, right, and similar expressions used herein are for illustrative purposes only and do not represent the only possible implementation.

[0029] Example 1 See Figure 1 This application provides a fault-tolerant distributed nonlinear predictive control method for UAV formation based on graph neural networks, including the following steps S1-S5: Step S1. Establish a dynamic model for each UAV, introduce time-varying thrust loss coefficient and external disturbance into velocity dynamics, and obtain a fault dynamic model describing actuator thrust decay; For the i-th quadcopter UAV, its state variable is defined as follows: ,in The position vector in the inertial coordinate system. For velocity vector, For including roll angle Pitch angle and yaw angle The attitude angle vector, Let be the angular velocity vector in the machine system. The control input is defined as... , For total thrust, This is the three-axis control torque.

[0030] The dynamic model of a UAV consists of position kinematics, velocity dynamics, attitude kinematics, and angular velocity dynamics.

[0031]

[0032]

[0033]

[0034] in, Let g be the mass of the drone, and g be the acceleration due to gravity. , The time-varying thrust loss coefficient, Unknown external disturbance; attitude rotation matrix Euler angle mapping matrix Inertia matrix .

[0035] The above velocity dynamics equations are obtained by introducing With disturbance This constitutes a fault dynamics model describing the attenuation of actuator thrust.

[0036] Step S2. Construct a formation communication topology based on the communication distance between drones. Establish a communication connection when the distance between any two drones is less than the communication radius, and determine the set of neighboring drones for each drone. The formation system is represented as a graph. Node set For all UAVs, the edge set E is determined based on the communication distance; define the adjacency matrix. When the Euclidean distance between drones i and j Smaller than the communication radius hour, Otherwise, it is 0. The set of neighbor nodes of the i-th drone is denoted as . This topology graph is used to support the information aggregation and distributed control of subsequent graph neural networks.

[0037] Step S3. Use a graph neural network to perform graph structure modeling and feature aggregation on the state information of each UAV and its neighbors, and estimate the thrust loss coefficient online based on the final layer node features obtained by aggregation; at the same time, construct the velocity prediction error, and use the velocity prediction error to update the output layer weights of the graph neural network. The drone formation state is constructed as a graph structure data, and the initial feature of each node i is taken as its state vector, i.e. (k is the current discrete time step); Feature propagation and aggregation are performed through an L-layer graph neural network; The feature update of the node in the (l+1)th layer consists of its own feature transformation and the aggregation of neighbor features:

[0038] in, and Let be the weight matrix of the l-th layer. Here, σ is the normalization coefficient, and σ is the nonlinear activation function; after propagation through L layers, the final layer node features By incorporating neighbor topology information, the thrust loss coefficient estimate is obtained through a linear output layer:

[0039] This is the output layer weight vector. For bias.

[0040] To achieve online adaptive estimation, velocity prediction values ​​are constructed. Its dynamic equation is:

[0041] in For speed prediction error, The prediction error is a positive definite gain matrix; this prediction error is used to drive the output layer weight update:

[0042] In the formula, For the output layer weight estimation error, , For learning rate, The damping parameter is used; this update law is executed in each sampling period to make the estimated thrust loss coefficient approximate the true value in real time.

[0043] Step S4. Construct a distributed nonlinear model predictive controller and use the online estimated thrust loss coefficient to form a fault compensation predictive model; design a stage cost function, which includes a trajectory tracking error term, a formation holding error term, a control energy consumption term, and an obstacle avoidance soft constraint cost term constructed based on a higher-order control obstacle function; introduce a terminal cost function and a terminal constraint set to construct a finite-time optimal control problem.

[0044] First, using the estimated thrust loss coefficient Construct a fault compensation prediction model. Multiply the thrust component in the control input by... To compensate, the discrete prediction model is as follows:

[0045] Where k=0,1,…,N-1 is the prediction step, and N is the prediction time domain length; the state transition function f can be obtained by discretizing the continuous model using the fourth-order Runge-Kutta method.

[0046] Cost function in the definition phase , It is the sum of four parts:

[0047] Each item corresponds to the trajectory tracking error cost, formation keeping error cost, control energy consumption cost, and obstacle avoidance soft constraint cost, in turn.

[0048] Obstacle avoidance costs are designed based on higher-order obstacle control functions: for obstacle positions and safe distance Define security functions ,make , Construct constraints ,in , The parameter is positive. The cost of converting this constraint into a soft constraint is:

[0049] To ensure closed-loop stability, the terminal cost is designed. and terminal constraint set , It is obtained from the algebraic Riccati equation. It is a positive invariant set.

[0050] Each UAV solves the following finite-time optimal control problem at each sampling time:

[0051] And satisfy the prediction model and state constraints. Control input constraints and terminal constraints.

[0052] Step S5. Each UAV measures its own state at the current moment, receives the state information of neighboring UAVs, uses the graph neural network to obtain the thrust loss coefficient estimate, solves the finite time domain optimal control problem, applies the first control variable in the obtained optimal control sequence to the corresponding UAV, and repeats the above process at the next sampling moment to achieve distributed fault-tolerant predictive control.

[0053] At each sampling moment, each drone uses its onboard sensors to acquire its own state. Receive neighbor status through communication network The forward propagation of the graph neural network in step S3 yields... And update the weights; then Substituting the prediction model from step S4, we solve the optimization problem to obtain the optimal control sequence. Only The process is applied to the actuator; the process is repeated at the next moment to form a rolling time-domain closed-loop control.

[0054] In a preferred embodiment, the velocity dynamics equation of the fault dynamics model is:

[0055] in, Let represent the derivative of the velocity vector of the i-th UAV with respect to time. ∈R 3 Let be the velocity vector of the i-th UAV in the inertial coordinate system. Indicates the mass of the i-th drone. (t) represents the total thrust input calculated by the control system of the i-th UAV. Let represent the attitude rotation matrix of the i-th UAV from the machine system to the inertial coordinate system. = Let be the attitude angle vector of the i-th UAV, including the roll angle. Pitch angle and yaw angle , =(0,0,1) T Let g be a unit vector pointing vertically upwards, and g be the acceleration due to gravity. (t)∈[0,1) represents the time-varying thrust loss coefficient of the i-th UAV. When (t)=0, it indicates that the actuator is working normally; 0< A thrust loss fault is indicated when (t) < 1. (t) represents the unknown external disturbance experienced by the i-th UAV; this equation fully describes the impact of thrust loss and external disturbance on the speed dynamics of the UAV.

[0056] In a preferred embodiment, the graph neural network performs feature propagation through multi-layer neighbor feature aggregation, and the feature update formula for the (l+1)th layer node is:

[0057] In the formula, Let i be the feature vector of node i in the l-th layer; Let j be the feature vector of the l-th layer neighbor node j; Let i be the set of neighbors of node i; The weight matrix is ​​a linear transformation of the features of the l-th layer itself. The weight matrix for aggregating the features of the neighbors in the l-th layer; The normalization coefficient can be taken as... σ( ) is a non-linear activation function, which can be ReLU or tanh; by stacking multiple of the above layers, the network can propagate and fuse local neighbor information layer by layer to obtain node representations containing formation space structure information.

[0058] In a preferred embodiment, the online estimation of thrust loss coefficients is achieved through the final layer node features. The linear mapping yields:

[0059] in, This represents the final layer feature vector of the i-th drone node after propagation through an L-layer graph neural network. This is the output layer weight vector; The bias parameter is used; this linear output layer maps high-dimensional features that aggregate state information of itself and its neighbors into scalar thrust loss coefficient estimates.

[0060] In a preferred embodiment, the velocity prediction error is ,in This represents the predicted speed of the i-th drone. This represents the actual speed of the i-th drone. This represents the speed prediction error; the predicted speed value is obtained by the following formula:

[0061] in, This represents the derivative of the predicted velocity value with respect to time. The positive definite gain matrix is ​​used to introduce error feedback to correct the predicted values; the error between this prediction model and the actual velocity dynamics is... The update law for the weights of the output layer of a graph neural network is:

[0062] in, This represents the derivative of the output layer weight estimation error with respect to time. For the output layer weight estimation error, For the final layer node features of the graph neural network, As intermediate variables related to the current thrust and attitude, For speed prediction error, >0 represents the learning rate. >0 represents the damping parameter; this update law utilizes velocity prediction error. Driven by weight learning, and simultaneously through To prevent the weights of the correction term from growing indefinitely and to ensure the stability of the estimate.

[0063] In a preferred embodiment, the fault compensation prediction model is expressed in the discrete time domain as follows:

[0064] in, Let be the state vector of the i-th UAV at the k-th discrete time step, containing its position. ,speed Attitude angle and angular velocity ; This is the control input vector for the k-th step, containing the total thrust. and control torque ; For online estimation of thrust loss coefficient; f( ) is a discrete state transition function, which can be obtained by discretizing the continuous dynamics model using the fourth-order Runge-Kutta method.

[0065] The stage cost function is:

[0066] in, This represents the stage cost of the i-th drone at the k-th prediction step. This represents the reference state vector of the i-th UAV at the k-th prediction step. This represents the position vector of the i-th UAV at the k-th prediction step. This represents the position vector of the j-th neighboring UAV at the k-th prediction step. Let i represent the set of neighboring drones of the i-th drone. Let represent the expected relative position vector between the i-th drone and the j-th drone. The state tracking weight matrix is ​​positive definite. The formation error weight matrix is ​​positive definite. The control input weight matrix is ​​positive definite. >0 represents the neighbor coordination weight between the i-th drone and its neighboring j-th drone. This represents the square of the weighted Euclidean norm. A value greater than 0 indicates an obstacle penalty weight. The obstacle safety cost function is defined as follows: This cost function achieves multi-objective integrated optimization of trajectory tracking, formation maintenance, energy-saving control, and obstacle avoidance.

[0067] In a preferred embodiment, the obstacle safety cost function is constructed based on a higher-order control obstacle function: Define security functions ,in, This represents the position vector of the i-th UAV at the k-th prediction step. This represents the position vector of the obstacle. As a preset safe distance, | | represents the Euclidean norm; make , ,in, For intermediate variables of higher-order control barrier functions, This represents the derivative of the security function with respect to time. Positive design parameters; Obstacle avoidance constraints are ,in express The derivative with respect to time; The obstacle safety cost function .

[0068] When the HOCBF (Higher-Order Control Barrier Function) constraint is satisfied, F=0; when there is a violation of the trend, F generates a positive cost, guiding the optimizer to adjust the control quantity to achieve obstacle avoidance.

[0069] In a preferred embodiment, the terminal cost function is:

[0070] in, This represents the terminal cost of the i-th drone. This represents the state vector of the i-th UAV at the N-th step in the prediction time domain terminal. Let represent the reference state vector of the i-th UAV at the N-th step of the prediction time-domain terminal. 0 represents a positive definite terminal weight matrix; the terminal constraint set is... , A set of positive invariant values ​​that ensures the state remains unchanged under the terminal control law; Terminal constraint set ∈ , To achieve localized sedation control laws A set of positive invariant sets that maintains the state under certain conditions.

[0071] The finite-time optimal control problem is:

[0072] in, Let i represent the overall optimization objective function for the i-th UAV. To predict the control input sequence to be optimized in the time domain, k=0,1,...,N-1 is the prediction step number, and N is the prediction time domain length; state constraints. Control input constraints and terminal constraints , where X represents the state feasible region and U represents the control input feasible region.

[0073] The optimization problem satisfies the prediction model

[0074] Where X is the state feasible region and U is the control input feasible region, which respectively contain physical constraints on position, velocity, attitude angular rate, thrust, torque, etc.; by solving this optimization problem online, a control sequence that satisfies all constraints and minimizes the overall cost is obtained.

[0075] A fault-tolerant distributed predictive control system for UAV formation based on graph neural networks, comprising: The dynamic modeling module is used to establish a fault dynamics model that incorporates thrust loss coefficients and external disturbances; The communication topology construction module is used to construct a fleet communication topology graph based on communication distance and determine the neighbor set. The graph neural network fault estimation module is used to aggregate graph structure features of multiple UAV states, output thrust loss coefficient estimates online, and update the weights of the network output layer using velocity prediction errors. The distributed nonlinear model predictive control module is used to receive the thrust loss coefficient estimate, construct a fault compensation prediction model, and construct a finite-time domain optimization problem based on the stage cost function and the terminal cost. The stage cost function includes trajectory tracking cost, formation keeping cost, control cost, and obstacle avoidance soft constraint cost based on a higher-order control obstacle function. By solving the optimization problem, the optimal control sequence is obtained, and distributed fault-tolerant control is implemented for the UAV formation.

[0076] The detailed working principles of each module correspond to the aforementioned method implementation methods, and will not be repeated here. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described fault-tolerant distributed nonlinear predictive control method for UAV formation based on graph neural networks.

[0077] The storage medium may include ROM, RAM, disk, or optical disk. Running this computer program on the UAV's onboard computing platform allows for real-time execution of fault estimation and distributed nonlinear model predictive control algorithms based on graph neural networks, enabling fault-tolerant collaborative control of UAV formations; the specific program flow is completely consistent with the aforementioned method implementation.

[0078] Example 2 Based on the above embodiment 1, this embodiment takes a formation system consisting of 3 quadcopter UAVs as an example to illustrate the specific application process of the method of the present invention in an environment with actuator thrust loss failure and obstacles; the formation task requires the three UAVs to maintain a triangular formation, track their respective reference trajectories, and avoid building obstacles during flight.

[0079] First, set the system parameters: the mass of each drone is [missing information]. =1.5kg, inertia matrix =diag(0.03,0.03,0.05)kg·m 2 , communication radius =50m; the desired geometric configuration of the formation is an isosceles triangle, and the desired relative position vectors between the UAVs are respectively taken as... m, m, m; the reference trajectory is provided by the task planner and is a straight line or circular arc path in space; the obstacle is a cylindrical building with a radius of 2m, and its center position is... m, safe distance m; Initially, all UAVs have normal thrust, i.e., thrust loss coefficient. External disturbances The simulation is based on an amplitude of 0.1 m / s. 2 Random wind disturbances.

[0080] Step S1: Establish a fault dynamics model that considers thrust loss.

[0081] Define a state vector for the i-th UAV. Control input Introduce a time-varying thrust loss coefficient into the velocity dynamics equation. and external disturbances The fault model is obtained as follows:

[0082] In the simulation, the model is discretized using the fourth-order Runge-Kutta method with a sampling period of Δt = 0.05 s to obtain the prediction model. This serves as the basis for subsequent distributed model predictive control. During flight, it is assumed that UAV 2 experiences a thrust loss failure at t=10s, and its thrust loss coefficient is... The value jumps from 0 to 0.3, and a small time-varying component is superimposed to simulate the actual degradation process, while the rest of the UAV remains normal.

[0083] Step S2: Construct the formation communication topology.

[0084] The distance between the three drones was less than the communication radius. m, therefore the communication topology is a fully connected graph; adjacency matrix elements The neighbor sets of each drone are as follows: Each drone can obtain real-time information on the position, speed, attitude, and angular velocity of its neighbors through the inter-drone communication module.

[0085] Step S3: Use a graph neural network to estimate the thrust loss coefficient online.

[0086] A 3-layer graph neural network is deployed on each drone, with ReLU activation function used between layers and normalized coefficients. The initial feature of each node is taken as the current state of the drone: ;Through the layer-by-layer feature propagation formula:

[0087] Extracting neighbor information, the third layer outputs the final features. Then through linear mapping We obtain the thrust loss coefficient estimate; simultaneously, we construct a velocity predictor:

[0088] Calculate prediction error And according to the update law:

[0089] Adaptively adjust the output layer weights, where the learning rate... Take 0.01, damping parameter The value is set to 0.001; this mechanism enables the graph neural network of UAV 2 to accurately estimate the fault within approximately 0.3 seconds after the fault occurs. ≈0.3, providing a basis for subsequent compensation control.

[0090] Step S4: Construct a distributed nonlinear model predictive controller and solve the optimization problem.

[0091] Each UAV will estimate the thrust loss coefficient (t) is used to construct a fault compensation prediction model:

[0092] The prediction time domain N is set to 10, meaning the state evolution within 0.5 seconds is predicted; the stage cost function includes four terms: trajectory tracking error, etc. Weighted; formation maintains error Weighted, neighbor coordination weight Controlling energy consumption Weighted obstacle avoidance soft constraints are constructed using higher-order control obstacle functions, with parameters... Obstacle penalty weight For security functions When the drone's position approaches an obstacle, it causes At that time, the cost function F(x) incurs a penalty, guiding the optimizer to adjust its course in advance; the terminal weight matrix The terminal constraint set is obtained by offline solution of the linearized system algebraic Riccati equations. It is the positive invariant set under the action of the terminal stabilization control law.

[0093] At each sampling time, each UAV uses its own state and the states of its neighbors to solve the finite-time optimal control problem:

[0094] It satisfies the prediction model, state and control constraints, and terminal constraints; the solution adopts the interior point method, and the single solution time on the airborne embedded computing platform is about 8ms, which meets the real-time requirements.

[0095] Step S5: Implement distributed fault-tolerant control online on a rolling basis.

[0096] At time t=0, each UAV initializes its graph neural network weights and begins executing the control loop. Within each sampling period, the UAV measures its own state and receives the states of its neighbors; it then performs the graph neural network forward computation and weight update in step S3 to obtain... Update the prediction model with this estimate, construct and solve the optimization problem in step S4, and obtain the optimal control sequence; only the first control variable of the sequence is used. The process is applied to the motor and servo motor; the process is repeated at the next sampling time.

[0097] Simulation results show that when the thrust of UAV 2 is reduced by 30%, its trajectory tracking position error increases slightly at the moment of failure. However, thanks to the rapid activation of the fault compensation mechanism, the maximum deviation does not exceed 0.15m and recovers to within 0.05m within 2s. The formation configuration error remains less than 0.1m, and the formation does not undergo significant distortion. When the formation flies near a building, the HOCBF soft constraint cost term of each UAV is activated, and the optimizer automatically generates a smooth lateral maneuver, making the closest distance between the three UAVs and the obstacle greater than 5.2m. After passing safely, they successfully return to the reference trajectory and formation configuration. The communication volume of the entire process is only the neighbor state exchange, and the computational load is evenly distributed, which verifies the effectiveness of the method of the present invention.

[0098] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0099] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A fault-tolerant distributed nonlinear predictive control method for UAV formation based on graph neural networks, characterized in that, Includes the following steps: A dynamic model for each UAV is established, and a time-varying thrust loss coefficient and external disturbances are introduced into the velocity dynamics to obtain a fault dynamic model describing the thrust decay of the actuator. A formation communication topology is constructed based on the communication distance between drones. A communication connection is established when the distance between any two drones is less than the communication radius, and the set of neighboring drones for each drone is determined. A graph neural network is used to model the state information of each UAV and its neighbors, and to aggregate features. The thrust loss coefficient is estimated online based on the final layer node features obtained by aggregation. At the same time, a velocity prediction error is constructed, and the output layer weights of the graph neural network are updated using the velocity prediction error. A distributed nonlinear model predictive controller is constructed, and a fault compensation prediction model is formed using the online estimated thrust loss coefficient; a stage cost function is designed, which includes a trajectory tracking error term, a formation holding error term, a control energy consumption term, and an obstacle avoidance soft constraint cost term constructed based on a higher-order control obstacle function; a terminal cost function and a terminal constraint set are introduced to construct a finite-time optimal control problem. Each UAV measures its own state at the current moment, receives state information from neighboring UAVs, uses the graph neural network to obtain the thrust loss coefficient estimate, solves the finite-time optimal control problem, applies the first control variable in the obtained optimal control sequence to the corresponding UAV, and repeats the above process at the next sampling moment to achieve distributed fault-tolerant predictive control.

2. The method according to claim 1, characterized in that, The velocity dynamics equation of the fault dynamics model is: in, Let represent the derivative of the velocity vector of the i-th UAV with respect to time. ∈R 3 Let be the velocity vector of the i-th UAV in the inertial coordinate system. Indicates the mass of the i-th drone. (t) represents the total thrust input calculated by the control system of the i-th UAV. Let represent the attitude rotation matrix of the i-th UAV from the machine system to the inertial coordinate system. = Let be the attitude angle vector of the i-th UAV, including the roll angle. Pitch angle and yaw angle , =(0,0,1) T Let g be a unit vector pointing vertically upwards, and g be the acceleration due to gravity. (t)∈[0,1) represents the time-varying thrust loss coefficient of the i-th UAV. When (t)=0, it indicates that the actuator is working normally; 0< A thrust loss fault is indicated when (t) < 1. (t) represents the unknown external disturbance experienced by the i-th drone.

3. The method according to claim 1, characterized in that, The graph neural network performs feature propagation through multi-layer neighbor feature aggregation, and the feature update formula for the (l+1)th layer node is: in, This represents the feature vector of the i-th UAV node in the l-th layer of the graph neural network. This represents the feature vector of the j-th neighboring drone node in the l-th layer. Let i represent the set of neighboring drones of the i-th drone. Let be the weight matrix of the linear transformation of the features of the l-th layer. Let be the weight matrix for aggregating the features of the neighbors in the l-th layer. σ is the normalization coefficient. ) is a non-linear activation function.

4. The method according to claim 3, characterized in that, The online estimation of thrust loss coefficient is achieved through the final layer node features. The linear mapping yields: in, W represents the final layer feature vector of the i-th drone node after propagation through an L-layer graph neural network. o b is the output layer weight vector. o This is the bias parameter.

5. The method according to claim 1, characterized in that, The speed prediction error is ,in This represents the predicted speed of the i-th drone. This represents the actual speed of the i-th drone. This represents the speed prediction error; the predicted speed value is obtained by the following formula: in, This represents the derivative of the predicted velocity value with respect to time. The gain matrix is ​​positive definite; the update law for the weights of the output layer of the graph neural network is: in, This represents the derivative of the output layer weight estimation error with respect to time. For the output layer weight estimation error, For the final layer node features of the graph neural network, As an intermediate variable, For speed prediction error, >0 represents the learning rate. >0 represents the damping parameter.

6. The method according to claim 1, characterized in that, The fault compensation prediction model is expressed in the discrete time domain as follows: in, This represents the state vector of the i-th UAV at the k-th discrete time step, which includes the position vector. Velocity vector Attitude angle vector and angular velocity vector , This represents the control input vector of the i-th UAV at the k-th discrete time step, containing the total thrust. and control torque , For the online estimated thrust loss coefficient, f( ) represents the discrete state transition function; the stage cost function is: in, This represents the stage cost of the i-th drone at the k-th prediction step. This represents the reference state vector of the i-th UAV at the k-th prediction step. This represents the position vector of the i-th UAV at the k-th prediction step. This represents the position vector of the j-th neighboring UAV at the k-th prediction step. Let i represent the set of neighboring drones of the i-th drone. Let represent the expected relative position vector between the i-th drone and the j-th drone. The state tracking weight matrix is ​​positive definite. The formation error weight matrix is ​​positive definite. The control input weight matrix is ​​positive definite. >0 represents the neighbor coordination weight between the i-th drone and its neighboring j-th drone. This represents the square of the weighted Euclidean norm. A value greater than 0 indicates an obstacle penalty weight. Let be the obstacle safety cost function.

7. The method according to claim 6, characterized in that, The obstacle safety cost function is constructed based on a higher-order control obstacle function: Define security functions ,in, This represents the position vector of the i-th UAV at the k-th prediction step. This represents the position vector of the obstacle. As a preset safe distance, | | represents the Euclidean norm; make , ,in, For intermediate variables of higher-order control barrier functions, This represents the derivative of the security function with respect to time. Positive design parameters; Obstacle avoidance constraints are ,in express The derivative with respect to time; The obstacle safety cost function .

8. The method according to claim 1, characterized in that, The terminal cost function is: in, This represents the terminal cost of the i-th drone. This represents the state vector of the i-th UAV at the N-th step in the prediction time domain terminal. Let represent the reference state vector of the i-th UAV at the N-th step of the prediction time-domain terminal. 0 represents a positive definite terminal weight matrix; the terminal constraint set is... , A set of positive invariant values ​​that ensures the state remains unchanged under the terminal control law; The finite-time optimal control problem is: in, Let i represent the overall optimization objective function for the i-th UAV. To predict the control input sequence to be optimized in the time domain, k=0,1,...,N-1 is the prediction step number, and N is the prediction time domain length; the optimization problem satisfies the prediction model. State constraints Control input constraints and terminal constraints , where X represents the state feasible region and U represents the control input feasible region.

9. A fault-tolerant distributed predictive control system for UAV formation based on graph neural networks, characterized in that, include: The dynamic modeling module is used to establish a fault dynamics model that incorporates thrust loss coefficients and external disturbances; The communication topology construction module is used to construct a fleet communication topology graph based on communication distance and determine the neighbor set. The graph neural network fault estimation module is used to aggregate graph structure features of multiple UAV states, output thrust loss coefficient estimates online, and update the weights of the network output layer using velocity prediction errors. The distributed nonlinear model predictive control module is used to receive the thrust loss coefficient estimate, construct a fault compensation prediction model, and construct a finite-time domain optimization problem based on the stage cost function and the terminal cost. The stage cost function includes trajectory tracking cost, formation keeping cost, control cost, and obstacle avoidance soft constraint cost based on a higher-order control obstacle function. By solving the optimization problem, the optimal control sequence is obtained, and distributed fault-tolerant control is implemented for the UAV formation.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 8.