A quadrotor unmanned aerial vehicle control method and system of a verifiable neural network

By decomposing the quadrotor UAV system into an outer position loop and an inner attitude loop, and combining the joint design and formal verification of neural networks and Lyapunov functions, the stability problem of quadrotor UAVs in complex environments was solved, and efficient control performance and stability verification were achieved.

CN122308226APending Publication Date: 2026-06-30HARBIN INST OF TECH AT WEIHAI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INST OF TECH AT WEIHAI
Filing Date
2026-04-13
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing quadcopter UAV control methods are ill-suited to the complex and ever-changing maritime environment. Neural network control lacks rigorous stability proofs, and current verification methods are difficult to extend to high-dimensional systems.

Method used

The quadrotor UAV system is decoupled into a slow-timescale position outer loop and a fast-timescale attitude inner loop using singular perturbation theory. A neural network state feedback controller and a Lyapunov function are constructed respectively, and the stability is verified by joint iterative training and formal verification tools, outputting the maximum stability region.

Benefits of technology

This improves the safety and reliability of neural network control methods, reduces the difficulty of controller design and stability verification for high-dimensional nonlinear systems, and enhances the control performance and stability of complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122308226A_ABST
    Figure CN122308226A_ABST
Patent Text Reader

Abstract

This invention discloses a verifiable neural network-based control method and system for a quadrotor unmanned aerial vehicle (UAV). The method includes: constructing a dynamic model of the quadrotor UAV and decoupling it into a slow-timescale outer loop for position and a fast-timescale inner loop for attitude; constructing a neural network state feedback controller and a Lyapunov function, respectively; performing joint iterative training of the neural network state feedback controller and the Lyapunov function in the outer and inner loops, and verifying their offline stability, outputting the certified maximum stability regions of the outer and inner loops for position and attitude; calculating the total thrust, desired attitude Euler angles, and three-axis torque commands; calculating the rotational speeds of each motor based on the total thrust and three-axis torque commands, driving the UAV, and feeding back the real-time outputs of position, velocity, attitude, and angular velocity of the UAV to the outer and inner loops for position and attitude, respectively, forming a closed-loop control. This invention can improve system stability while ensuring control performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aircraft control technology, and in particular to a control method and system for a quadcopter unmanned aerial vehicle with verifiable neural networks. Background Technology

[0002] The development of intelligent maritime defense systems and cross-domain sea-air collaborative technologies has led to the increasingly important role of quadcopter drones in maritime reconnaissance, material transport, and emergency rescue. However, quadcopter drones possess complex nonlinear dynamic characteristics, and the maritime environment is complex, making traditional control methods inadequate for handling such challenging conditions. Neural network controllers, with their powerful nonlinear function approximation and learning capabilities, have demonstrated significant advantages in handling complex control tasks and have become an important tool for designing high-performance control laws. However, neural networks suffer from "black box" characteristics, lacking rigorous theoretical proof of stability, resulting in significant shortcomings in practical engineering applications.

[0003] In verifying the stability of neural networks, existing work largely relies on computationally expensive solvers, such as sum-of-squares programming, mixed-integer programming, and satisfiability modular theory. However, these methods are only applicable to the stability analysis of low-dimensional systems and are difficult to extend to high-dimensional complex nonlinear dynamic systems.

[0004] Therefore, there is a lack of a control framework in the existing technology that can both leverage the advantages of neural network controllers in handling complex nonlinear dynamics and provide a formal proof of Lyapunov stability, making it applicable to high-dimensional systems such as quadcopter drones. Summary of the Invention

[0005] To address the challenges of existing quadrotor UAV control methods in handling complex and ever-changing maritime environments, the lack of rigorous stability proofs for neural network control, and the difficulty in extending current verification methods to high-dimensional systems, this invention proposes a verifiable neural network-based quadrotor UAV control method and system.

[0006] On the one hand, to achieve the above objectives, the present invention provides a control method for a quadcopter unmanned aerial vehicle with verifiable neural networks, comprising: Obtain the full state information and target hovering point of the quadrotor UAV, and construct a dynamic model of the quadrotor UAV; Based on the singular perturbation theory, the dynamic model of the quadcopter UAV is decoupled into a slow-time-scale position outer loop and a fast-time-scale attitude inner loop. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the position outer loop and the attitude inner loop, respectively. In the outer position loop and the inner attitude loop, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained, and a formal verification tool is used to perform offline stability verification on the trained closed-loop system, outputting the certified maximum stability region of the outer position loop and the maximum stability region of the inner attitude loop. Based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller, the total thrust and the desired attitude Euler angle are calculated, and based on the maximum stability domain of the inner ring of the attitude, the three-axis torque command is calculated. Based on the total thrust and the three-axis torque command, the rotational speed of each motor is calculated to drive the UAV. The position, speed, attitude and angular velocity output by the UAV in real time are fed back to the outer position loop and the inner attitude loop respectively to form a closed loop control.

[0007] Preferably, after obtaining the slow-timescale position outer loop, the method further includes decoupling the position outer loop into three independent single-axis subsystems, and designing neural network state feedback controllers and Lyapunov functions for the x-axis, y-axis, and z-axis respectively.

[0008] Preferably, the state equation of the single-axis subsystem is a third-order continuous-time state equation, and it is discretized using the first-order Euler method.

[0009] Preferably, the Lyapunov function is in the form of a parameterized quadratic form or a neural network quadratic form, wherein the Lyapunov function in the parameterized quadratic form is specifically as follows: ; In the formula, The value of the Lyapunov function. This represents the current system state. For the desired system state, For small parameters, It is the identity matrix. T To transpose the matrix representing the difference between the desired system state and the actual system state, R It is a trainable matrix.

[0010] Preferably, the joint iterative training includes: A set of candidate state points is pre-sampled in the state space to guide the expansion of the level set of the Lyapunov function; The projected gradient descent algorithm is used to search for counterexample state points that violate the Lyapunov derivative condition within the currently estimated stability region; The parameters of the neural network are updated based on gradient descent, and the total loss function is minimized. The total loss function includes a stability loss term for eliminating counterexamples, an expansion loss term for expanding the stable region, and an L1 regularization term.

[0011] Preferably, the joint iterative training adopts a progressive region expansion strategy, first setting a small scaling factor as the initial training region, and gradually increasing the scaling factor to expand the training region after the training converges, and performing counterexample-guided iterative optimization in each region stage.

[0012] Preferably, a pre-training initialization step is included before the joint iterative training, specifically: The dynamic model of the quadrotor UAV is linearized at the hovering equilibrium point, and the linear quadratic regulator is solved to obtain the optimal gain matrix and the solution of the Riccati equation. The matrix parameters of the Lyapunov function are initialized using the solution to the Riccati equation; The neural network controller is pre-trained by minimizing the mean square error of the linear quadratic regulator control law.

[0013] Preferably, the formal verification tool is a branch-and-bound neural network verifier, used to verify whether the Lyapunov derivative condition holds within the maximum stability region.

[0014] On the other hand, to achieve the above objectives, the present invention also provides a quadcopter unmanned aerial vehicle control system capable of verifying neural networks, comprising: The dynamic modeling unit is used to acquire the full state information and target hovering point of the quadcopter UAV, construct the dynamic model of the quadcopter UAV, and decouple the model into an outer position loop and an inner attitude loop based on the singular perturbation theory. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the outer position loop and the inner attitude loop, respectively. The position control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the position outer loop, and to perform joint iterative training of the neural network state feedback controller and the corresponding Lyapunov function in the position outer loop. The formal verification tool is used to perform offline stability verification of the trained closed-loop system, and outputs the certified maximum stability region of the position outer loop. The calculation unit is used to calculate the total thrust and the desired attitude Euler angle based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller. The attitude control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the attitude inner loop. Based on the desired attitude Euler angles output by the solution unit, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained in the attitude inner loop. A formal verification tool is used to perform offline stability verification on the trained closed-loop system, output the certified maximum stability region of the attitude inner loop, and calculate the triaxial torque command based on the maximum stability region of the attitude inner loop. The drive and feedback unit is used to calculate the rotational speed of each motor according to the total thrust and the three-axis torque command, drive the UAV to run, and feed back the position, speed, attitude and angular velocity output by the UAV in real time to the outer position loop and the inner attitude loop respectively to form a closed loop control.

[0015] The present invention also provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the aforementioned quadcopter unmanned aerial vehicle control method with verifiable neural network.

[0016] Compared with the prior art, the present invention has the following advantages and technical effects: (1) This invention combines a neural network controller with a Lyapunov function and a formal verification method to provide stability proof for the closed-loop control system of a quadcopter UAV, thereby improving the safety and reliability of the neural network control method.

[0017] (2) This invention uses singular perturbation theory to decompose the quadcopter UAV system into an outer position loop and an inner attitude loop, and further decouples the outer position loop, thereby reducing the difficulty of controller design and stability verification of high-dimensional nonlinear systems.

[0018] (3) This invention combines the control capability of neural networks for complex nonlinear systems with the theoretical verifiability of formal methods, and can improve system stability while ensuring control performance.

[0019] (4) This invention improves the feasibility of neural network control methods for such complex systems by decomposing the quadcopter UAV system and designing controllers and verifying stability separately. Attached Figure Description

[0020] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of a verifiable neural network quadcopter unmanned aerial vehicle control system according to an embodiment of the present invention; Figure 2 This is a convergence curve of the Lyapunov value of the position loop in an embodiment of the present invention; Figure 3 This is a diagram showing the attitude loop convergence curve of an embodiment of the present invention; Figure 4 This is a two-dimensional slice diagram of the stability region according to an embodiment of the present invention; Figure 5 This is a flowchart of a quadcopter drone control method with verifiable neural networks according to an embodiment of the present invention. Detailed Implementation

[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0023] This embodiment proposes a verifiable neural network-based control method for quadrotor unmanned aerial vehicles (UAVs), such as... Figure 5 ,include: Obtain the full state information and target hovering point of the quadrotor UAV, and construct a dynamic model of the quadrotor UAV; Based on the singular perturbation theory, the dynamic model of the quadcopter UAV is decoupled into a slow-time-scale position outer loop and a fast-time-scale attitude inner loop. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the position outer loop and the attitude inner loop, respectively. In the outer position loop and the inner attitude loop, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained, and a formal verification tool is used to perform offline stability verification on the trained closed-loop system, outputting the certified maximum stability region of the outer position loop and the maximum stability region of the inner attitude loop. Based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller, the total thrust and the desired attitude Euler angle are calculated, and based on the maximum stability domain of the inner ring of the attitude, the three-axis torque command is calculated. Based on the total thrust and the three-axis torque command, the rotational speed of each motor is calculated to drive the UAV. The position, speed, attitude and angular velocity output by the UAV in real time are fed back to the outer position loop and the inner attitude loop respectively to form a closed loop control.

[0024] Specifically, this embodiment utilizes singular perturbation theory to separate the fast and slow time scales of the high-dimensional nonlinear dynamics model of the quadrotor UAV, decoupling the position loop from the attitude loop and reducing the training dimensionality. A neural network controller and a trained Lyapunov function are jointly trained to perform formal stability verification on the closed-loop system, ensuring that the system possesses Lyapunov stability proofs.

[0025] Furthermore, the full-state information of the quadcopter drone, including its position... linear velocity Posture Euler angles and body angular velocity Determine the hovering point of the drone target based on mission requirements.

[0026] Furthermore, after obtaining the slow-timescale position outer loop, the process further includes decoupling the position outer loop into three independent single-axis subsystems, and defining them as follows: x axis, y axis, z Axis design of neural network state feedback controller and Lyapunov function.

[0027] Specifically, the state equation of the single-axis subsystem is a third-order continuous-time state equation, and it is discretized using the first-order Euler method.

[0028] The specific third-order continuous-time state equation of a single axis is as follows: ; In the formula, For location, For speed, To control the input, For speed, It is acceleration.

[0029] The y-axis and z-axis have the same structure. The system is discretized using the first-order Euler method.

[0030] Furthermore, the Lyapunov function is in the form of a parameterized quadratic form or a neural network quadratic form, wherein the Lyapunov function in the parameterized quadratic form is specifically as follows: ; In the formula, The value of the Lyapunov function. This represents the current system state. For the desired system state, For small parameters, It is the identity matrix. T To transpose the matrix representing the difference between the desired system state and the actual system state, R It is a trainable matrix.

[0031] Furthermore, a pre-training initialization step is included before the joint iterative training, specifically: The dynamic model of the quadrotor UAV is linearized at the hovering equilibrium point, and the linear quadratic regulator is solved to obtain the optimal gain matrix and the solution of the Riccati equation. The matrix parameters of the Lyapunov function are initialized using the solution to the Riccati equation; The neural network controller is pre-trained by minimizing the mean square error of the linear quadratic regulator control law.

[0032] Specifically, pre-training initialization is performed on the designed controller and Lyapunov function. The system is linearized at the hovering equilibrium point, and an approximately linear quadratic regulator is used to obtain better initial parameters for the controller and observer, facilitating subsequent training. After completion, iterative training is performed jointly with the Lyapunov function to find the maximum stability region.

[0033] Further, the joint iterative training is performed, including: A set of candidate state points is pre-sampled in the state space to guide the expansion of the level set of the Lyapunov function; The projected gradient descent algorithm is used to search for counterexample state points that violate the Lyapunov derivative condition within the currently estimated stability region; The parameters of the neural network are updated based on gradient descent, and the total loss function is minimized. The total loss function includes a stability loss term for eliminating counterexamples, an expansion loss term for expanding the stable region, and an L1 regularization term.

[0034] Specifically, the joint iterative training adopts a progressive region expansion strategy. A small scaling factor is first set as the initial training region. After the training converges, the scaling factor is gradually increased to expand the training region. In each region stage, iterative optimization guided by counterexamples is performed.

[0035] Furthermore, formal verification tools are used to perform offline stability verification on the trained neural network controller and the closed-loop system defined by the Lyapunov function, and the certified maximum stability region is output.

[0036] The formal verification tool is a branch-and-bound neural network verifier, used to verify whether the Lyapunov derivative condition holds within the maximum stability region.

[0037] Furthermore, based on the obtained stable region of the position loop, the total thrust required by the quadcopter UAV is calculated. And the desired posture Euler angle This serves as the attitude reference command for the inner attitude loop. The attitude loop is also verified, and the three-axis torque commands in the stable region are calculated. .

[0038] Based on the output total thrust and torque commands, the speed of each motor is calculated, the driving dynamics equations are executed, and the system output position is recorded. ,speed ,attitude and angular velocity Feedback is sent to the outer position loop and the inner attitude loop respectively, forming a complete closed-loop control system.

[0039] This embodiment also provides a verifiable neural network-based quadcopter unmanned aerial vehicle (UAV) control system, such as... Figure 1 ,include: The dynamic modeling unit is used to acquire the full state information and target hovering point of the quadcopter UAV, construct the dynamic model of the quadcopter UAV, and decouple the model into an outer position loop and an inner attitude loop based on the singular perturbation theory. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the outer position loop and the inner attitude loop, respectively. The position control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the position outer loop, and to perform joint iterative training of the neural network state feedback controller and the corresponding Lyapunov function in the position outer loop. The formal verification tool is used to perform offline stability verification of the trained closed-loop system, and outputs the certified maximum stability region of the position outer loop. The calculation unit is used to calculate the total thrust and the desired attitude Euler angle based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller. The attitude control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the attitude inner loop. Based on the desired attitude Euler angles output by the solution unit, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained in the attitude inner loop. A formal verification tool is used to perform offline stability verification on the trained closed-loop system, output the certified maximum stability region of the attitude inner loop, and calculate the triaxial torque command based on the maximum stability region of the attitude inner loop. The drive and feedback unit is used to calculate the rotational speed of each motor according to the total thrust and the three-axis torque command, drive the UAV to run, and feed back the position, speed, attitude and angular velocity output by the UAV in real time to the outer position loop and the inner attitude loop respectively to form a closed loop control.

[0040] A computer device includes a processor and a memory, the memory storing a computer program, characterized in that the computer program, when executed by the processor, implements the verifiable neural network-based quadcopter unmanned aerial vehicle control method.

[0041] To more clearly illustrate the technical solution of the present invention, specific embodiments are provided below for description: Example 1 A verifiable neural network-based control method for a quadrotor UAV, specifically implemented by the following steps: S1: Establish a dynamic model of the quadcopter UAV and determine the hovering working point.

[0042] S1.1, Dynamics Modeling of Quadrotor UAV: The full-state information of a quadcopter drone includes its position in the inertial coordinate system. linear velocity Posture Euler angles and body angular velocity .

[0043] The translational and rotational dynamic equations of the quadrotor UAV are as follows: ; ; In the formula, For the quality of drones, It is the acceleration due to gravity. For total thrust, Let be the rotation matrix from the body coordinate system to the inertial coordinate system. Here is the rotational inertia matrix. It is a triaxial torque. For position acceleration, This refers to the angular acceleration of the machine body.

[0044] S1.2, Separation of inner and outer loops based on singular perturbation theory: The position dynamics of a quadcopter UAV are determined by both thrust and attitude angles, and its response speed is limited by mass inertia, classifying it as slow dynamics. In contrast, attitude dynamics are directly driven by torque, resulting in a much faster response speed, classifying it as fast dynamics. Based on this time-scale separation characteristic, singular perturbation theory is used to decompose the system into a slow-timescale outer position loop and a fast-timescale inner attitude loop. The rotation matrix... Expanding on this, the translational and rotational dynamic equations for each axis are as follows: ; In the formula, Let x be the acceleration along the x-axis. The acceleration is the position along the y-axis. Let z be the acceleration at the z-axis position. This is the input quantity for the x-axis dynamic equation. The input quantity for the y-axis dynamic equation. This is the input for the z-axis dynamic equation; As can be seen from the above equations, the position acceleration of each axis is related to the attitude angle. and total thrust Coupling. The coupling between total thrust and attitude angle is considered as input to each axis. Therefore, the position outer loop can treat the three axes as independent single-axis subsystems and design control laws separately.

[0045] Based on the requirements of shipborne landing missions, the target hovering point is determined to be the desired location above the landing deck. The hovering equilibrium state is defined as: linear velocity... angular velocity attitude angle The position converges to the target point, at which point the equilibrium thrust is... The balancing torque is .

[0046] S2: Design a neural network controller and Lyapunov functions.

[0047] S2.1 Design a neural network controller: For the single-axis subsystem and attitude loop constructed in S1, since both position and velocity can be directly measured by sensors, a state feedback structure is used to design the control law, and a neural network is used to parameterize the control strategy. : ; In the formula, For system input, For input state, control strategy In the target state Generate control input target , To input the lower limit, This is the upper limit of the input. The controller output is saturated and limited using the clamp function to ensure that the control command remains within the physically feasible range. Inside.

[0048] S2.2 Design Lyapunov functions: For the state feedback scenario, the Lyapunov candidate function can be a parameterized quadratic form or a neural network quadratic form: Neural network quadratic form: ; Parametric quadratic form: ; In the formula, For neural networks, A very small constant to ensure positive definiteness, For trainable matrix parameters, The value of the Lyapunov function. This represents the current system state. For the desired system state, For small parameters, It is the identity matrix. T This is the matrix transpose of the difference between the desired system state and the actual system state.

[0049] The function satisfies the positive definite condition: when , , .

[0050] S3: Joint training of neural network controller and Lyapunov function.

[0051] Based on the S2-designed neural network controller and Lyapunov function, a counterexample-guided inductive synthesis framework, combined with a candidate state point guidance strategy, is used to jointly train and validate the neural network controller and Lyapunov function.

[0052] S3.1 Pre-training and Candidate State Initialization: The system is linearized at the hovering equilibrium point, and the linear quadratic regulator is solved for the linearized system to obtain the optimal gain matrix. Solutions to the Ricardi equation .

[0053] The initial value of the matrix is ​​obtained by adjusting the matrix. Koleski decomposition yielded: ,by initialization matrix.

[0054] The weights of the controller network are minimized by the LQR control law. The mean squared error between the two values ​​is used for pre-training, enabling the neural network controller to achieve near-LQR performance in the early stages of training. Control input target, K The state feedback gain matrix, x This refers to the system status.

[0055] To guide the training process to expand the stability region as much as possible, a set of candidate points is sampled in the state space before training begins. These points can be sampled based on the Lyapunov level set of the reference linear controller. The obtained candidate points serve as anchor points to guide the outward expansion of the Lyapunov function level set during subsequent training.

[0056] S3.2 Joint training based on counterexample-guided induction: This embodiment employs a counterexample-guided inductive synthesis framework and a two-layer optimization loop to update network parameters. The inner optimization uses the projected gradient descent method within the currently estimated stability region. The internal search violates the Lyapunov derivative condition. Or a state point that violates the invariance condition.

[0057] The outer optimization accumulates all violation samples and minimizes the total loss function. Update the controller and Lyapunov function parameters. The loss function includes: 1. Stability loss Calculate the degree to which the counterexample state points violate the stability condition. By minimizing this loss, the network parameters are forced to iterate in the direction of eliminating the violation and satisfying the stability condition.

[0058] 2. Stability region expansion loss ( ): Calculate the value of the Lyapunov function at the candidate points selected in S4.1 when it exceeds the threshold. To the extent that the Lyapunov function is reduced at these candidate state points, it satisfies the level set condition (i.e., This allows the range of the stability region estimation defined by the level set to expand outward in space, ultimately including these candidate state points and maximizing the stability region.

[0059] 3. L1 regularization: Apply L1 regularization to the weights of the controller network to reduce the Lipshitz constant of the neural network.

[0060] The total loss function is shown in the following formula: ; In the formula, For the total loss function, As candidate points, For the threshold, and Given a positive number, For the stability region extended loss, For stability loss, This is for L1 regularization.

[0061] The training process employs a progressive region expansion strategy: initially, a small scaling factor is set as the initial training region, and after training converges, the scaling factor is gradually increased to expand the training region. Within each region stage, iterative optimization guided by counterexamples is performed.

[0062] The counterexample-guided iterative optimization involves: firstly, searching for the most severe adversarial examples that violate the Lyapunov diminishing condition within the region using projected gradient descent, accumulating these adversarial examples in the empirical buffer, and then jointly optimizing and updating the parameters of the controller and the Lyapunov function.

[0063] S4: Formal stability verification.

[0064] After S3 training converges, offline stability verification is performed using a formal verification tool. A large number of initial points are uniformly sampled within the final verification region. Multi-step projective gradient descent is used to search for adversarial examples within the constraint region that most severely violate the Lyapunov diminishing condition. If the maximum violation of all adversarial examples approaches zero, the system is considered to have passed stability verification, and the verified maximum stability region and its corresponding value are output. value.

[0065] S5: Construct the solution module and attitude inner loop.

[0066] The acceleration command output by the xyz three-axis position controller Converted into total thrust Euler angles of the desired posture The attitude inner loop controller receives the desired attitude angle and the current attitude state. Feedback to calculate triaxial torque commands The attitude loop also employs a neural network controller and Lyapunov stability training and verification framework. Following the same training and verification process as the position loop, it obtains a certified attitude control law and a stable region. For example... Figure 2 The Lyapunov value convergence curve of the location loop is shown in the figure. Figure 3 The attitude loop convergence curve is shown below. Figure 4 This is a two-dimensional slice diagram of the stability region.

[0067] Total thrust and torque command Calculate the speed of each motor, run the driving dynamics equations, and output the position of the system. ,speed ,attitude and angular velocity Feedback is sent to the outer position loop and the inner attitude loop respectively, forming a complete closed-loop control system.

[0068] Example 2 A verifiable neural network-based quadcopter unmanned aerial vehicle (UAV) control system includes: The dynamic modeling unit is used to acquire the full state information and target hovering point of the quadcopter UAV, construct the dynamic model of the quadcopter UAV, and decouple the model into an outer position loop and an inner attitude loop based on the singular perturbation theory. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the outer position loop and the inner attitude loop, respectively. The position control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the position outer loop, and to perform joint iterative training of the neural network state feedback controller and the corresponding Lyapunov function in the position outer loop. The formal verification tool is used to perform offline stability verification of the trained closed-loop system, and outputs the certified maximum stability region of the position outer loop. The calculation unit is used to calculate the total thrust and the desired attitude Euler angle based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller. The attitude control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the attitude inner loop. Based on the desired attitude Euler angles output by the solution unit, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained in the attitude inner loop. A formal verification tool is used to perform offline stability verification on the trained closed-loop system, output the certified maximum stability region of the attitude inner loop, and calculate the triaxial torque command based on the maximum stability region of the attitude inner loop. The drive and feedback unit is used to calculate the rotational speed of each motor according to the total thrust and the three-axis torque command, drive the UAV to run, and feed back the position, speed, attitude and angular velocity output by the UAV in real time to the outer position loop and the inner attitude loop respectively to form a closed loop control.

[0069] Example 3 A computer device includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the verifiable neural network-based quadcopter unmanned aerial vehicle control method.

[0070] Example 4 A computer program product is provided, the program being stored in a computer-readable medium, which, when executed by a processor, implements the control method steps described in Embodiment 1. The program can be implemented using programming languages ​​such as Python, and by calling deep learning frameworks and verification libraries, it implements the training and verification loop in S3, generating a verified neural network controller model file.

[0071] Example 5 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in Embodiment 1. This storage medium may be a hard disk, solid-state drive, ROM, RAM, USB flash drive, or other portable media.

[0072] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A control method for a quadrotor unmanned aerial vehicle with verifiable neural networks, characterized in that, include: Obtain the full state information and target hovering point of the quadrotor UAV, and construct a dynamic model of the quadrotor UAV; Based on the singular perturbation theory, the dynamic model of the quadcopter UAV is decoupled into a slow-time-scale position outer loop and a fast-time-scale attitude inner loop. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the position outer loop and the attitude inner loop, respectively. In the outer position loop and the inner attitude loop, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained, and a formal verification tool is used to perform offline stability verification on the trained closed-loop system, outputting the certified maximum stability region of the outer position loop and the maximum stability region of the inner attitude loop. Based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller, the total thrust and the desired attitude Euler angle are calculated, and based on the maximum stability domain of the inner ring of the attitude, the three-axis torque command is calculated. Based on the total thrust and the three-axis torque command, the rotational speed of each motor is calculated to drive the UAV. The position, speed, attitude and angular velocity output by the UAV in real time are fed back to the outer position loop and the inner attitude loop respectively to form a closed loop control.

2. The quadrotor UAV control method with verifiable neural networks according to claim 1, characterized in that, After obtaining the location outer loop of the slow time scale, the method further includes decoupling the location outer loop into three independent single-axis subsystems, and designing neural network state feedback controllers and Lyapunov functions for the x-axis, y-axis and z-axis respectively.

3. The quadrotor UAV control method with verifiable neural networks according to claim 2, characterized in that, The state equation of the single-axis subsystem is a third-order continuous-time state equation, and it is discretized using the first-order Euler method.

4. The quadrotor UAV control method with verifiable neural networks according to claim 1, characterized in that, The Lyapunov function is in parametric quadratic form or neural network quadratic form, wherein the parametric quadratic form Lyapunov function is specifically as follows: ; In the formula, The value of the Lyapunov function. This represents the current system state. For the desired system state, For small parameters, It is the identity matrix. T To transpose the matrix representing the difference between the desired system state and the actual system state, R It is a trainable matrix.

5. The quadrotor UAV control method with verifiable neural networks according to claim 1, characterized in that, The joint iterative training includes: A set of candidate state points is pre-sampled in the state space to guide the expansion of the level set of the Lyapunov function; The projected gradient descent algorithm is used to search for counterexample state points that violate the Lyapunov derivative condition within the currently estimated stability region; The parameters of the neural network are updated based on gradient descent, and the total loss function is minimized. The total loss function includes a stability loss term for eliminating counterexamples, an expansion loss term for expanding the stable region, and an L1 regularization term.

6. The quadrotor UAV control method with verifiable neural networks according to claim 5, characterized in that, The joint iterative training adopts a progressive region expansion strategy. A small scaling factor is first set as the initial training region. After the training converges, the scaling factor is gradually increased to expand the training region. In each region stage, iterative optimization guided by counterexamples is performed.

7. The quadrotor UAV control method with verifiable neural networks according to claim 1, characterized in that, The pre-training initialization step is included before the joint iterative training, specifically as follows: The dynamic model of the quadrotor UAV is linearized at the hovering equilibrium point, and the linear quadratic regulator is solved to obtain the optimal gain matrix and the solution of the Riccati equation. The matrix parameters of the Lyapunov function are initialized using the solution to the Riccati equation; The neural network controller is pre-trained by minimizing the mean square error of the linear quadratic regulator control law.

8. The quadrotor UAV control method with verifiable neural networks according to claim 1, characterized in that, The formal verification tool is a branch-and-bound neural network verifier, used to verify whether the Lyapunov derivative condition holds within the maximum stability region.

9. A quadcopter unmanned aerial vehicle (UAV) control system with a verifiable neural network, used to implement the quadcopter UAV control method with a verifiable neural network as described in any one of claims 1-8, characterized in that, include: The dynamic modeling unit is used to acquire the full state information and target hovering point of the quadcopter UAV, construct the dynamic model of the quadcopter UAV, and decouple the model into an outer position loop and an inner attitude loop based on the singular perturbation theory. A neural network state feedback controller and a Lyapunov function for stability determination are constructed for the outer position loop and the inner attitude loop, respectively. The position control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the position outer loop, and to perform joint iterative training of the neural network state feedback controller and the corresponding Lyapunov function in the position outer loop. The formal verification tool is used to perform offline stability verification of the trained closed-loop system, and outputs the certified maximum stability region of the position outer loop. The calculation unit is used to calculate the total thrust and the desired attitude Euler angle based on the maximum stability domain of the outer ring of the position and the acceleration command output by the corresponding neural network controller. The attitude control and verification unit is used to construct a neural network state feedback controller and a Lyapunov function for stability determination for the attitude inner loop. Based on the desired attitude Euler angles output by the solution unit, the neural network state feedback controller and the corresponding Lyapunov function are jointly iteratively trained in the attitude inner loop. A formal verification tool is used to perform offline stability verification on the trained closed-loop system, output the certified maximum stability region of the attitude inner loop, and calculate the triaxial torque command based on the maximum stability region of the attitude inner loop. The drive and feedback unit is used to calculate the rotational speed of each motor according to the total thrust and the three-axis torque command, drive the UAV to run, and feed back the position, speed, attitude and angular velocity output by the UAV in real time to the outer position loop and the inner attitude loop respectively to form a closed loop control.

10. A computer device comprising a processor and a memory, the memory storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the quadcopter unmanned aerial vehicle control method of the verifiable neural network as described in any one of claims 1-8.