Unmanned aerial vehicle obstacle avoidance navigation control method and system based on adaptive neural model
By separating the UAV obstacle avoidance navigation control method into offline and online stages, and utilizing neural network learning and parameter adaptation technology, the computational complexity and adaptability problems in the UAV obstacle avoidance navigation control are solved, and fast and safe obstacle avoidance navigation control is achieved.
Patent Information
- Application Number
- CN202510983982.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-17
AI Technical Summary
Existing drone obstacle avoidance navigation control methods have high computational complexity in multi-obstacle or unstructured environments. Traditional methods take a long time to calculate, and neural network methods have poor adaptability, making it difficult to accelerate online calculations while ensuring system safety.
A UAV obstacle avoidance navigation control method based on an adaptive neural model is adopted. The control process is divided into two stages: offline and online. The optimal value function and sensitivity are learned offline using a neural network and embedded into the short-sighted model predictive control. A parameter-adaptive neural value function is constructed, the online prediction step is shortened, and the learning accuracy and stability are improved by updating the data set.
It significantly reduces the MPC online calculation time, improves the real-time performance and security of the control system, adapts to changes in UAV model parameters, and ensures practicality and safety in complex environments.
Smart Images

Figure CN120802987A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicle control, and particularly relates to an unmanned aerial vehicle obstacle avoidance navigation control method and system based on an adaptive neural model. BACKGROUND
[0002] Model Predictive Control (MPC) has been widely applied in unmanned aerial vehicle search and rescue, obstacle avoidance navigation, and material transportation. In these applications, ensuring system safety is crucial, but safe control in a multi-obstacle or unstructured environment still faces challenges. Traditional methods such as the dynamic window method, pre-computed motion primitive library, and collision-free flight corridor perform poorly in fast-flying unmanned aerial vehicles or complex environments. Recent research has focused on Control Barrier Functions (CBFs), which have forward invariance and safety guarantee characteristics, and have been successfully applied to safety-critical control fields such as biped robots, mobile robots, and unmanned aerial vehicles. The CBF-MPC framework formed by integrating CBFs with MPC provides a general solution for safe control, however, as the model complexity, system safety constraints, and online prediction step increase, CBF-MPC can result in huge computation time, affecting actual control performance. Therefore, there is an urgent need to improve the computational efficiency of MPC.
[0003] Explicit Model Predictive Control is a potential solution that establishes an explicit mapping from the system state to the control input of the unmanned aerial vehicle by solving the optimal control problem offline. However, for high-dimensional systems such as unmanned aerial vehicles, its improvement effect is limited, and in the nonlinear case, it cannot obtain an accurate mapping expression. With the development of machine learning and neural network technology, Approximate Model Predictive Control (AMPC) based on neural networks has become an effective solution, which can significantly reduce computation time by avoiding online optimization, but usually loses the guarantee of explicit constraint satisfaction. Therefore, accelerating MPC online computation while ensuring strict system safety is still a difficult problem to be solved.
[0004] Another challenge is the poor adaptability of learning-based methods, which require relearning strategies when the unmanned aerial vehicle model parameters change, resulting in a significant increase in offline computation cost. To address this issue, existing technologies include data augmentation, which reduces offline cost by enriching the data set; meta-learning, which achieves rapid adaptation with knowledge transfer; and domain adaptation, which reduces data set dependence by cross-domain strategy generalization. However, the above methods cannot avoid offline retraining, and the improvement effect is limited. In addition, adaptive methods such as online optimization warm start and reinforcement learning retraining of neural networks are not suitable for quadcopters that require real-time control.
[0005] CBF-MPC has been widely applied in safety fields such as autonomous driving and UAV control, but it still faces many limitations that need to be further improved. The main challenge is the computational complexity: the CBF condition is usually a nonlinear constraint, and the MPC relies on the mathematical model of the system to roll out the optimization of the control input for multiple future time steps. After the combination of the two, with the increase of the number of constraints, the complexity of the model and the prediction step, the online computation time may increase significantly, thereby affecting the actual safety control effect. Although the neural network approximation can speed up the calculation, the safety and generalization will be greatly reduced. SUMMARY
[0006] The purpose of the present application is to overcome the defects of the prior art and provide a UAV obstacle avoidance navigation control method and system based on an adaptive neural model.
[0007] The purpose of the present application can be achieved by the following technical solutions:
[0008] According to one aspect of the present application, a UAV obstacle avoidance navigation control method based on an adaptive neural model is provided, the method comprising an offline stage and an online stage;
[0009] The offline stage step comprises:
[0010] S11, simplifying modeling of the required control UAV, and building a CBF-MPC controller based on the modeling;
[0011] S12, based on a preset sampling strategy, solving the CBF-MPC controller to obtain a data set;
[0012] S13, based on the data set, learning the optimal value function of the CBF-MPC controller using a first neural network to obtain a neural value function, and learning the sensitivity of the value function of the CBF-MPC controller with respect to the parameter using a second neural network to obtain a neural sensitivity function;
[0013] The online stage step comprises:
[0014] S21, based on the neural value function and the neural sensitivity function obtained in the offline stage, constructing a parameter-adaptive neural value function; shortening the online prediction step of the CBF-MPC controller to obtain a short-sighted model predictive controller;
[0015] S22, embedding the parameter-adaptive neural value function into the short-sighted model predictive controller to obtain a BAN-MPC controller;
[0016] S23, solving the BAN-MPC controller and aggregating the new data set obtained in the data set to update the data set;
[0017] The preset round S13, S21-S23 steps are circulated, so as to complete the BAN-MPC controller training, solve the trained BAN-MPC controller, and complete the obstacle avoidance navigation control of the unmanned aerial vehicle by using the current solution.
[0018] As a preferred technical solution, the specific process of S11 in the offline stage comprises:
[0019] S111, acquiring the required control unmanned aerial vehicle basic parameters, and performing stress analysis on the basic parameters;
[0020] S112, based on the basic parameters and the stress analysis results, building a nonlinear state space model;
[0021] S113, discretizing the built nonlinear state space model, so as to obtain a discrete-time nonlinear system model;
[0022] S114, based on the discrete-time nonlinear system model, building a CBF-MPC controller.
[0023] As a preferred technical solution, the CBF-MPC controller in S12 comprises an optimal value function, a constraint condition and a control barrier function, and the specific formula is:
[0024]
[0025] x0=x,
[0026] -ΔH(x k ,u k )-γH(x k )≤0.
[0027] Wherein, V MPC (x) is the optimal value function; N represents the prediction time domain length; and are time series of state and input decision variables respectively; sets and respectively represent the generalized state and input constraints; L is the total cost parameter, V MPC (x) represents the optimal value function, -ΔH(x k ,u k )-γH(x k )≤0 is a safety constraint defined by CBF; x is a preset initial state; γ is a constraint parameter, γ∈(0,1].
[0028] As a preferred technical solution, the data set in S12 is a state-action-value data set, and the specific formula is:
[0029]
[0030] Wherein, is the data set, x i is the system state of the UAV at the i-th sample moment; is the control input; V MPC (x i ) is the optimal value function; n tr is the number of training samples.
[0031] As a preferred technical solution, in S13, when the first neural network is used to learn the optimal value function of the CBF-MPC controller, the neural value function is iteratively updated. The specific formula is:
[0032] V i+1 =β i V * +(1-β i )V i+1 ;
[0033] Among them, V i+1 is the updated neural value function; β i is the weighting coefficient, V * is the initial neural value function.
[0034] As a preferred technical solution, in S13, when using the first neural network to learn the optimal value function of the CBF-MPC controller, the mean square error is used as the loss function, and its specific formula is:
[0035]
[0036] in, is the loss function; n tr is the number of training samples, V(x i ; φ) is the neural value function; V MPC (x i ) is the optimal value function.
[0037] As a preferred technical solution, in S13, when learning the sensitivity of the value function of the CBF-MPC controller with respect to the parameters, the second data set in the data set is used, and the second data set is a state-sensitivity data set, and its specific formula is:
[0038]
[0039] in, is the second data set; x i is the system state of the UAV at the i-th sample moment; is the control input; V MPC (x i ) is the optimal value function; n tr is the number of training samples; θ is the actual dynamics parameter.
[0040] As a preferred technical solution, the parameter adaptive neural value function in S21 uses nominal dynamic parameters to approximate the optimal value function, and predicts the trend of the value function with actual dynamic parameters by a prediction factor given by neural sensitivity, and the specific formula of the parameter adaptive neural value function is:
[0041]
[0042] Wherein, V BAN-MPC (x,θ) is a parameter adaptive neural value function; V NN (x) is a neural value function; is a neural sensitivity; θ nom is a nominal dynamic parameter; θ is an actual dynamic parameter.
[0043] As a preferred technical solution, the BAN-MPC controller in S22 includes an optimization objective and an obstacle avoidance constraint embedded with a neural value function and a neural sensitivity, and the specific formula is:
[0044]
[0045] x0=x,
[0046] -ΔH(x k ,u k )-γH(x k )≤0;
[0047] Wherein, represents an optimization objective embedded with a neural value function and a neural sensitivity; -ΔH(x k ,u k )-γH(x k )≤0 represents an obstacle avoidance constraint defined by CBF; is a state sequence; is an input sequence; M represents the length of the shortened prediction time domain; x k+1 is a state transition equation; sets and respectively represent generalized state and input constraints; x is a preset initial state, and γ is a constraint parameter, γ∈(0,1].
[0048] According to another aspect of the present application, an unmanned aerial vehicle obstacle avoidance navigation control system based on an adaptive neural model is provided, which comprises a model modeling module, an offline training module, an online control module and a data updating module;
[0049] The model modeling module is used to construct an unmanned aerial vehicle dynamic model, and design a CBF-MPC controller according to the model;
[0050] The offline training module is used for generating training data, and training the neural value function and the neural sensitivity function by using the training data, and outputting the neural value function and the neural sensitivity function;
[0051] The online control module is used for constructing and solving the BAN-MPC controller, and generating the control instruction; the module inputs include the neural value function, the neural sensitivity function and the current system state of the unmanned aerial vehicle, and the output is the unmanned aerial vehicle control instruction;
[0052] The data updating module is used for aggregating new data and updating the training data set.
[0053] Compared with the prior art, the present application has the following beneficial effects:
[0054] 1、The method divides the control process into offline and online stages, so that the control has real-time performance and high safety, in the offline stage, the first neural network is used to learn the optimal value function, the second neural network is used to learn the sensitivity, and the sensitivity is embedded into the optimization objective of the short-sighted MPC, the online calculation bottleneck caused by the long-time domain optimization of the traditional MPC is solved, the online calculation time of the MPC is significantly reduced, the calculation complexity is low, and the real-time performance requirement of the unmanned aerial vehicle obstacle avoidance navigation is fully met, in the online stage, for the safety critical task of the unmanned aerial vehicle obstacle avoidance navigation, the BAN-MPC controller is built, the control barrier function and the model predictive control are deeply cooperated, the control barrier function provides strict safety guarantee, the model predictive control realizes long field prediction, and the practicability and safety of the control method in a complex environment are significantly enhanced.
[0055] 2、In the training of the neural network, the new data set is aggregated in the data set, so that the data set is updated, through the enhanced data set aggregation method, the iterative mixed expert model and the learning model are reduced, the error propagation caused by the distribution mismatch is reduced, and the distribution deviation is reduced, and the efficient unbiased learning of the neural network is realized.
[0056] 3、In the present application, when the first neural network is used to learn the optimal value function of the CBF-MPC controller, the neural value function is iteratively updated, and the initial neural value function and the current learning result are balanced by the weighting coefficient. The iterative updating mechanism enables the neural value function to gradually approximate the optimal value function, and improves the learning accuracy and stability.
[0057] 4、The present application considers the actual unmanned aerial vehicle mass change, rotor size change and the like, and integrates the second data set into the data set learning the sensitivity of the value function of the CBF-MPC controller with respect to the parameters, and the second data set is a state-sensitivity data set, and the adaptive adjustment of the control strategy is realized by using the parameter sensitivity method, without the need to retrain the neural network.
[0058] 5、In the application, by combining the neural value function and the neural sensitivity, the parameter adaptive neural value function is constructed, so that it is adjusted in real time according to the difference between the actual dynamic parameters and the nominal parameters. This adaptive mechanism enables the controller to maintain good control performance when facing the parameter changes of the unmanned aerial vehicle or external disturbances.
[0059] 6、In the application, by using the mean square error as the loss function to train the first neural network, the difference between the neural value function and the real optimal value function can be intuitively measured, which helps the network to quickly converge to the optimal solution and ensures the accuracy of the neural value function. BRIEF DESCRIPTION OF DRAWINGS
[0060] Figure 1 The flow chart of the unmanned aerial vehicle obstacle avoidance navigation control method based on adaptive neural model predictive control in the application;
[0061] Figure 2 The structure block diagram of the unmanned aerial vehicle obstacle avoidance navigation control system based on adaptive neural model predictive control in the application;
[0062] Figure 3 The simplified model diagram of the quadrotor unmanned aerial vehicle in the embodiment;
[0063] Figure 4 The structure block diagram of the hardware-in-the-loop experiment of the unmanned aerial vehicle obstacle avoidance navigation based on adaptive neural model predictive control in the embodiment;
[0064] Figure 5a The unmanned aerial vehicle obstacle avoidance navigation trajectory profile under different control strategies in the embodiment;
[0065] Figure 5b The unmanned aerial vehicle obstacle avoidance navigation trajectory profile after modifying the model parameters of the unmanned aerial vehicle under different control strategies in the embodiment;
[0066] Figure 6 The schematic diagram of the enhanced value function data set aggregation algorithm proposed in the embodiment. DETAILED DESCRIPTION
[0067] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor should belong to the protection scope of the application.
[0068] Embodiment 1
[0069] In the embodiment, a UAV obstacle avoidance navigation control method based on adaptive neural model predictive control (Barrier-integrated Adaptive Neural Model Predictive Control, BAN-MPC) is applied; the method flow is as shown in Figure 1 The method flow includes an offline stage and an online stage.
[0070] The offline stage includes the following steps:
[0071] S11, simplifying modeling of a UAV to be controlled, and building a CBF-MPC controller (Control Barrier Function-Model Predictive Control) based on the modeling;
[0072] S12, solving the CBF-MPC controller based on a preset sampling strategy, so as to obtain a data set;
[0073] S13, learning an optimal value function of the CBF-MPC controller by using a first neural network based on the data set, obtaining a neural value function, and learning a sensitivity of the value function of the CBF-MPC controller with respect to a parameter by using a second neural network, obtaining a neural sensitivity function;
[0074] The online stage includes the following steps:
[0075] S21, constructing a parameter-adaptive neural value function based on the neural value function and the neural sensitivity function obtained in the offline stage, and shortening an online prediction step of the CBF-MPC controller, so as to obtain a short-sighted model predictive controller;
[0076] S22, embedding the parameter-adaptive neural value function into the short-sighted model predictive controller, so as to obtain a BAN-MPC controller;
[0077] S23, solving the BAN-MPC controller, and aggregating a new data set obtained in the solving into the data set, so as to complete data set updating;
[0078] Repeating the steps S13, S21-S23 for a preset number of times, so as to complete BAN-MPC controller training, solve the trained BAN-MPC controller, and complete UAV obstacle avoidance navigation control by using a current solution.
[0079] The specific process of S11 in the offline stage includes the following steps:
[0080] S111, obtaining basic parameters of a UAV to be controlled, and performing force analysis on the basic parameters;
[0081] S112, build a nonlinear state space model based on the basic parameters and the stress analysis results;
[0082] S113, discretize the built nonlinear state space model to obtain a discrete-time nonlinear system model;
[0083] S114, build a CBF-MPC controller based on the discrete-time nonlinear system model.
[0084] The CBF-MPC controller in S12 includes an optimal value function, a constraint condition and a control barrier function, and its specific formula is:
[0085]
[0086] x0=x,
[0087] -ΔH(x k ,u k )-γH(x k )≤0.
[0088] Wherein, V MPC (x) is the optimal value function; N represents the prediction time domain length; and are the time series of state and input decision variables respectively; sets and respectively represent the generalized state and input constraints; L is the total cost parameter, V MPC (x) represents the optimal value function, -ΔH(x k ,u k )-γH(x k )≤0 is the safety constraint defined by CBF; x is the preset initial state; γ is the constraint parameter, γ∈(0,1].
[0089] The data set in S12 is a state-action-value data set, and its specific formula is:
[0090]
[0091] Wherein, is the data set, x i is the system state of the unmanned aerial vehicle at the i-th sample time; is the control input; V MPC (x i ) is the optimal value function; n tr is the number of training samples.
[0092] In S13, when the first neural network is used to learn the optimal value function of the CBF-MPC controller, the neural value function is updated iteratively, and its specific formula is:
[0093] V i+1 =β i V * +(1-β i )V i+1 ;
[0094] wherein, V i+1 is the updated neural value function; β i is the weighting coefficient, V * is the initial neural value function.
[0095] In S13, when learning the optimal value function of the CBF-MPC controller using the first neural network, the mean square error is used as the loss function, and the specific formula is as follows:
[0096]
[0097] wherein, is the loss function; n tr is the number of training samples, V(x i ; φ) is the neural value function; V MPC (x i ) is the optimal value function.
[0098] In S13, when learning the sensitivity of the value function of the CBF-MPC controller with respect to the parameters, the second data set in the data set is used, and the specific formula of the second data set is as follows:
[0099]
[0100] wherein, is the second data set; x i is the system state of the unmanned aerial vehicle at the i-th sample time; is the control input; V MPC (x i ) is the optimal value function; n tr is the number of training samples; θ is the actual dynamic parameter.
[0101] The parameter adaptive neural value function in S21 uses the nominal dynamic parameter to approximate the optimal value function, and predicts the trend of the value function with the actual dynamic parameter by a prediction factor given by the neural sensitivity, and the specific formula of the parameter adaptive neural value function is as follows:
[0102]
[0103] wherein, V BAN-MPC (x, θ) is the parameter adaptive neural value function; V NN (x) is the neural value function; is the neural sensitivity; θ nom is the nominal dynamics parameter; θ is the actual dynamics parameter.
[0104] The BAN-MPC controller in S22 includes an optimization objective and an obstacle avoidance constraint embedded with neural value function and neural sensitivity, and the specific formula is:
[0105]
[0106] x0=x,
[0107] -ΔH(x k ,u k )-γH(x k )≤0;
[0108] wherein, represents an optimization objective embedded with neural value function and neural sensitivity; -ΔH(x k ,u k )-γH(x k )≤0 represents an obstacle avoidance constraint defined by CBF; is a state sequence; is an input sequence; M represents the length of the shortened prediction horizon; x k+1 is a state transition equation; set and respectively represent generalized state and input constraints; x is a preset initial state, and γ is a constraint parameter, γ∈(0, 1].
[0109] The method is aimed at the safety-critical task of unmanned aerial vehicle obstacle avoidance navigation, and a deep collaborative mechanism of control barrier function and model predictive control is proposed, the control barrier function provides strict safety guarantee, the model predictive control realizes long field of view prediction, and the practicability and safety of the control system in complex environment are significantly enhanced. The neural network is used to learn the optimal value function offline, and the optimal value function is embedded into the optimization objective of the short-sighted MPC, so that the online calculation bottleneck caused by the long-time domain optimization of the traditional MPC is solved, the online calculation time of the MPC is significantly reduced, and the real-time demand of the fast flight unmanned aerial vehicle obstacle avoidance navigation is fully met.
[0110] In view of the possible model parameter change of the unmanned aerial vehicle, the weight change and the rotor size change of the unmanned aerial vehicle in the actual situation are considered, the adaptive adjustment of the control strategy is realized by using the parameter sensitivity method, and the neural network does not need to be retrained.
[0111] Embodiment 2
[0112] In this embodiment, an unmanned aerial vehicle obstacle avoidance navigation control system based on adaptive neural model predictive control is applied; as Figure 2As shown, the control system includes two parts of offline stage and online stage. In order to accelerate the online calculation of the control barrier function-model predictive control (CBF-MPC), a neural network is integrated into the framework.
[0113] In the offline stage, unlike the approximate model predictive control, the neural network approximate MPC strategy is adopted, and the goal is to learn the optimal value function offline. Based on the CBF-MPC framework, the training data is collected, and the neural network V NN (x) is used to approximate the optimal value function in CBF-MPC. In order to further improve the adaptability of the control strategy, an adaptive method is extended, and a second neural network is constructed: The sensitivity of the offline learned value function to the parameters is learned. When the model parameters of the unmanned aerial vehicle change, the neural sensitivity The adaptive adjustment of the neural network V NN (x) can be realized without retraining the value function.
[0114] In the online stage, by shortening the online prediction step of CBF-MPC, it is converted into a short-time domain model predictive controller to minimize the online calculation time, and the long-view prediction performance is realized by the parameter adaptive neural value function:
[0115]
[0116] Where V BAN-MPC is the adaptive predictive control neural model; V NN is the first neural network; is the second neural network; θ is the model parameter; θ nom is the nominal dynamic parameter.
[0117] Finally, in the hardware-in-the-loop (HIL) system, the CBF-MPC embedded with the parameter adaptive neural value function is used to complete the obstacle avoidance navigation task of the unmanned aerial vehicle.
[0118] Based on the design method of the above control system:
[0119] A kind of unmanned aerial vehicle obstacle avoidance navigation system based on adaptive neural model predictive control is constructed,
[0120] The system implementation includes the following steps:
[0121] (1) according to the simplified quadrotor shown in Figure 3 , a 6-DOF rigid body is modeled as a quadrotor model, and the diagonal rotational inertia matrix is:
[0122] J = diag(J x ,J y ,J z )
[0123] where J is the diagonal moment of inertia matrix; J x ,J y ,J z are the moments of inertia of the rigid body about the x, y and z axes respectively.
[0124] The control input u is the rotor thrust The position of the quadrotor in the world frame is denoted by p WB , its attitude state by q WB , its linear velocity in the world frame by v WB , and its angular velocity by ω B . The total thrust T B and body torque τ B on the quadrotor are obtained by modeling the thrust on each rotor as:
[0125]
[0126] where T B is the total thrust on the quadrotor; τ B is the body torque; d x and d y denote the displacement of the rotor center of mass; c τ denotes the rotor drag torque constant; T i is the rotor thrust,
[0127] The nonlinear state space model of the system is 13-dimensional, and its dynamics are given by:
[0128]
[0129] x = [p WB , q WB , v WB , ω B ] T ;
[0130] g W = [0, 0, -9.81ms -2 ] T ;
[0131] where x is the state vector; g W denotes the earth's gravity; p WB is the position of the quadrotor in the world frame; q WB is the attitude state of the quadrotor in the world frame; v WBis the linear velocity of the quadrotor in the world coordinate system; ω B is the angular velocity of the quadrotor in the world coordinate system; T B is the total thrust on the quadrotor; τ B is the body torque.
[0132] To integrate these dynamics into the discrete-time algorithm, a 4th-order f RK4 The explicit Runge-Kutta method (a numerical method for solving initial value problems of ordinary differential equations) for a given initial state x k , input u k and the integration step δt Integrating, we obtain the discrete dynamics:
[0133] x k+1 =f RK4 (x k ,u k ,δt);
[0134] (2) It is necessary to establish a CBF-MPC controller, considering the discrete-time nonlinear system:
[0135]
[0136] in, Indicates the system status of the drone, Is the control input at the current time t. Function f: is a continuous dynamic function. The total thrust T on the quadrotor is the nominal dynamic parameters, such as the mass of the drone, the size of the rotor, etc. B and body torque τ B The security encoding of is the function H: Super level set
[0137]
[0138] Next, we define the control barrier function. If there exists γ∈(0,1] such that for all If the following conditions are met, then the function H(x): is defined as a control barrier function.
[0139]
[0140] Where H(x) is the control obstacle function; x k is the system status of the drone; u k is the control input; γ is the constraint parameter.
[0141] According to the above definition, a forward invariant safety condition can be established, given the discrete-time nonlinear system, a safe encoding super-level set and a control barrier function H(x): For all system states of the UAV Control input satisfy the following conditions, then the safety set of the discrete-time nonlinear system is forward invariant:
[0142]
[0143] where, is the set of control inputs that satisfy the CBF constraint; u k is the control input applied to the UAV at discrete time k; is the global allowable set of control inputs; ΔH(x k , u k ) is the change in the barrier function when the control is applied to the state; the constraint parameter, γ ∈ (0, 1]; H(x k ) is the control barrier function.
[0144] Integrate the CBF as a constraint into the MPC framework, and the generated CBF-MPC realizes strict safety control through forward prediction, which can be expressed as:
[0145]
[0146] x0=x,
[0147] -ΔH(x k , u k )-γH(x k )≤0.
[0148] where k represents the discrete-time index of the optimal control problem (OCP); N represents the total horizon length; and are time series of state and input decision variables; sets and represent generalized state and input constraints; represents the total cost; V MPC (x) represents the optimal value function; -ΔH(x k , u k )-γH(x k )≤0 is the safety constraint defined by the CBF.
[0149] CBF-MPC has been widely applied in safety fields such as autonomous driving and UAV control, but it still faces many limitations that need to be further improved. The main challenge is the computational complexity: CBF conditions are usually nonlinear constraints, and MPC relies on the mathematical model of the system to roll out the optimization of control inputs for multiple future time steps. After the combination of the two, with the increase of the number of constraints, model complexity and prediction steps, the online calculation time may increase significantly, which affects the actual safety control effect. Although the calculation speed can be accelerated by neural network approximation, the safety and generalization will be greatly reduced.
[0150] (3) In order to speed up the online calculation speed of CBF-MPC, neural networks are integrated into the framework, which is divided into offline and online two stages;
[0151] In the offline stage, the generated CBF-MPC realizes strict safety control through forward prediction, collects training data, and uses neural network V NN (x) to approximate the optimal value function V MPC (x). The adaptive method based on parameter sensitivity is expanded, and a second neural network is used to learn the sensitivity of the value function to the parameters. When the parameters of the UAV model change, the neural sensitivity can be used to adjust V NN (x) without retraining the value function.
[0152] In the online stage, the online prediction step of safety control is shortened to M (M << N), and the prediction performance of the subsequent N-M steps is realized by the parameter adaptive neural value function; It becomes a short-sighted model predictive controller, BAN-MPC, with a shorter online prediction range, so as to reduce the online calculation time, and the specific formula of the parameter adaptive neural value function is:
[0153]
[0154] The proposed BAN-MPC is represented as:
[0155]
[0156] x0=x,
[0157] -ΔH(x k ,u k )-γH(x k )≤0.
[0158] where, represents the optimization objective embedded with neural value function and neural sensitivity, -ΔH(x k ,u k )-γH(xk )≤0 represents the obstacle avoidance constraint defined by CBF.
[0159] (4) Model predictive control that only considers the cost of a shorter prediction horizon can significantly reduce the complexity of the CBF-MPC problem and speed up the solution, but this will lead to short-sighted consequences, causing a significant decrease in control performance. Therefore, by embedding the cost function of the MPC problem learned by the neural network, namely the neural value function, into the short-sighted model predictive control, the solution speed can be accelerated without reducing the control performance. As the complexity of the model increases, the training data is difficult to cover the data distribution in the actual deployment. Due to distribution shift, the behavioral cloning method will lead to performance degradation, causing the learned model to deviate from the optimal value function. Inspired by dataset aggregation, the expert model and the learning model are iteratively mixed to reduce the error propagation caused by distribution mismatch and alleviate distribution shift.
[0160] In order to adjust the training of the neural value function, an enhanced dataset aggregation algorithm is developed when training the neural network. It iteratively mixes the expert model and the learning model to reduce the error propagation caused by distribution mismatch and alleviate the distribution offset, thus achieving efficient and unbiased learning of the neural network. This algorithm matches the proposed controller model and solves the distribution offset problem while ensuring seamless integration. Figure 6 As shown. In each iteration, the dataset with the current neural value function generated by the CBF-MPC strategy is aggregated into the original dataset, and then the value function is learned on the enhanced dataset and iteratively integrated with the initial neural value function to ensure that the learned neural value function remains close to the value function of the original CBF-MPC problem. Specifically, the original training dataset is collected by solving the CBF-MPC (expert MPC) problem with a long prediction horizon offline under an appropriate sampling strategy. The optimal state-action-value dataset is obtained, denoted as Among them, n tr Represents the number of training samples, using this data set to learn the initial neural value function V * , where the mean square error is used as the loss function:
[0161]
[0162] Among them, φ represents the parameters of neural network learning. At each iteration, the current neural value function V i Embedded into the short-sighted MPC, thus constructing the BAN-MPC strategy π i By strategy π i Newly generated dataset D i Aggregate with the original dataset to form an enhanced dataset D. Neural value function V i+1The re-training is then performed on this augmented dataset D, again using mean squared error as the loss function. To better approximate the value function of the expert MPC, the neural value function V i+1 :
[0163] V i+1 = β i V * + (1 - β i )V i+1 ;
[0164] where V i+1 is the updated neural value function; β i is the weighting coefficient, and V * is the initial neural value function.
[0165] Due to insufficient training data, the learned value function can deviate from the optimal value function V MPC of the expert MPC during the initial iterations, but after sufficient iterations, the learned neural value function V NN will be very close to the optimal value function V MPC .
[0166] When the parameters of the UAV model change, the original neural network-based policy can fail and need to be re-trained, which incurs a large amount of offline computational cost. The parameter sensitivity of the MPC problem is used to predict how the optimal value function responds to the parameter change online, thus avoiding the re-training of the neural network. The nominal dynamics parameters θ nom are selected and the neural value function is learned according to the above method. The value function of the CBF-MPC is denoted as V MPC (x, θ nom ), while the learned neural value function is denoted as V NN (x). In addition, a second neural network is used to learn the sensitivity of the value function with respect to the parameters θ The corresponding training dataset is denoted as The neural sensitivity is learned using the dataset aggregation method, denoted as Using the two neural networks V NN (x) and , the parameter-adaptive neural value function can be obtained as
[0167]
[0168] The parameter-adaptive neural value function uses the nominal dynamics parameters to approximate the optimal value function and predicts how the value function changes with respect to the parameters θ , and the prediction factor is given by the neural sensitivity
[0169] As Figure 4As shown, a hardware-in-the-loop experimental system is introduced in this embodiment to facilitate the implementation of the UAV obstacle avoidance navigation system on embedded devices. The system consists of a PC (personal computer) host and an embedded device. The PC converts the offline trained PyTorch neural network model (i.e., neural value function and neural sensitivity) into an embeddable CasADi symbolic expression for value function integration. Subsequently, the neural network model, the dynamics model, and the test data are deployed to the embedded development platform. The embedded device is pre-configured with Ubuntu 18.04 (an open-source version of the Linux operating system), Torch 1.10 (a version of the PyTorch deep learning framework), and CasADi 3.5 (a software library for automatic differentiation and optimization computation), which enables real-time computation of the BAN-MPC and returns the test results to the PC for data processing and visualization. Secure remote communication based on SSH and Xftp (a file transfer tool software supporting SFTP and other protocols) that supports SFTP (a file transfer protocol based on SSH, which can ensure the secure transmission of files between different systems) can ensure reliable two-way data transmission between the two systems. In the comparative experiment, all learning-based controllers are implemented using neural networks with three hidden layers, each consisting of 32 neurons, and using tanh as the activation function. The nonlinear solver is used to solve the optimization problems involved in these controllers. For data generation, 10 7 samples are generated offline for the quadrotor model. The data generation process is carried out on a workstation with 128 cores and an AMD Ryzen 9 5995WX. The specific task of the UAV obstacle avoidance navigation is to navigate the quadrotor (modeled as a sphere with a radius of 0.5 meters) from the starting point to the target point while avoiding six spherical obstacles. As Figure 5aTrajectory profiles of quadrotor flight under different control strategies, as well as the corresponding two-dimensional projections onto the xy, xz, and yz planes, are shown. In the figure, the circular gray area is the obstacle set in the scene, the blue solid dot is the starting point of the quadrotor flight task, the red solid dot is the target point of the quadrotor flight task, the orange dot is the collision point of the quadrotor with the obstacle, the blue line is the flight trajectory of the quadrotor when the control barrier function-model predictive control (CBF-MPC) strategy is adopted, the yellow line is the flight trajectory of the quadrotor when the myopic model predictive control (Myopic MPC) strategy is adopted, the green line is the flight trajectory of the quadrotor when the adaptive model predictive control (AMPC) strategy is adopted, and the purple line is the flight trajectory of the quadrotor when the BAN-MPC strategy is adopted. Due to its myopic control characteristics, the short-sighted MPC deviates significantly from the trajectory of the CBF-MPC, resulting in poor performance. At the same time, the AMPC cannot ensure the safety of the unsampled points, resulting in collisions. In contrast, the BAN-MPC closely follows the trajectory of the baseline CBF-MPC, demonstrating excellent performance. To evaluate the adaptability of the BAN-MPC, the mass parameter of the quadrotor is modified from 1 kg to 1.2 kg. The results are shown in Figure 5b Trajectory profiles of quadrotor flight under different control strategies, as well as the corresponding two-dimensional projections onto the xy, xz, and yz planes, are shown. In the figure, the circular gray area is the obstacle set in the scene, the blue solid dot is the starting point of the quadrotor flight task, the red solid dot is the target point of the quadrotor flight task, the orange dot is the collision point of the quadrotor with the obstacle, the blue line is the flight trajectory of the quadrotor when the control barrier function-model predictive control (CBF-MPC) strategy is adopted, the yellow line is the flight trajectory of the quadrotor when the myopic model predictive control (Myopic MPC) strategy is adopted, the green line is the flight trajectory of the quadrotor when the adaptive model predictive control (AMPC) strategy is adopted, and the purple line is the flight trajectory of the quadrotor when the BAN-MPC strategy is adopted. Due to its myopic control characteristics, the short-sighted MPC deviates significantly from the trajectory of the CBF-MPC, resulting in poor performance. At the same time, the AMPC cannot ensure the safety of the unsampled points, resulting in collisions. In contrast, the BAN-MPC closely follows the trajectory of the baseline CBF-MPC, demonstrating excellent performance. To evaluate the adaptability of the BAN-MPC, the mass parameter of the quadrotor is modified from 1 kg to 1.2 kg. The results are shown in
[0170] Table 1 Detailed indicators of the unmanned aerial vehicle obstacle avoidance navigation hardware-in-the-loop experiment based on adaptive neural model predictive control
[0171]
[0172] Domain safety reflects the overall safety of quadrotors in state space, quantified by randomly sampling 10,000 points and calculating the remaining proportion that stays in the safety set. Boundary safety reflects the obstacle avoidance near the safety boundary, quantified by sampling 10,000 points within 0.5m of the obstacle and calculating the proportion that stays in the safety set. Domain safety focuses on overall safety, while boundary safety involves safety near the key or specific boundary. The computation time represents the time required to solve each step of the control input, while the resource occupation represents the average CPU usage for computing the control input. The system maintains excellent safety performance on both personal computers and embedded platforms. It is worth noting that on the Jetson Nano @ 1.42GHz, the average computation time is as low as 9.6x10 -3 s, highlighting the advantages of parallel computing and CUDA acceleration for neural networks. The test results also show that the method occupies no more than 26% of the hardware resources on the Jetson Nano, and parallel computing effectively allocates resources to maximize performance, fully meeting the computing needs of the quadrotor flight control system, proving that BAN-MPC can achieve safe and fast control on resource-constrained embedded platforms.
[0173] In this embodiment, a hardware-in-the-loop experimental system based on Jetson Nano is built, and a special computing architecture for unmanned aerial vehicle control is developed. With the advantages of parallel computing and CUDA acceleration for neural networks, the efficient operation of the adaptive neural model predictive control algorithm is guaranteed, and the whole control system can achieve safe, fast and adaptive control at low development cost, which has industrial application potential.
[0174] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A UAV obstacle avoidance navigation control method based on an adaptive neural model, characterized in that: The method includes offline and online phases; The offline phase steps include: S11. Simplify the model of the drone to be controlled and build a CBF-MPC controller based on the model; S12, solving the CBF-MPC controller based on a preset sampling strategy to obtain a data set; S13. Based on the data set, using the first neural network to learn the optimal value function of the CBF-MPC controller to obtain a neural value function, and using the second neural network to learn the sensitivity of the value function of the CBF-MPC controller with respect to the parameters to obtain a neural sensitivity function; The online stage steps include: S21, constructing a parameter-adaptive neural value function based on the neural value function and the neural sensitivity function obtained in the offline stage; shortening the online prediction step size of the CBF-MPC controller to obtain a myopic model predictive controller; S22, embedding the parameter-adaptive neural value function into the myopic model predictive controller to obtain a BAN-MPC controller; S23, solving the BAN-MPC controller and aggregating the obtained new data set into the data set, thereby completing the data set update; The preset rounds of steps S13, S21-S23 are repeated to complete the BAN-MPC controller training, solve the trained BAN-MPC controller, and use the current solution to complete the obstacle avoidance navigation control of the UAV.
2. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 1, characterized in that: The specific process of S11 in the offline stage includes: S111. Obtain the basic parameters required to control the UAV and perform force analysis on it; S112. Build a nonlinear state space model based on basic parameters and force analysis results; S113, discretizing the constructed nonlinear state space model to obtain a discrete-time nonlinear system model; S114. Build a CBF-MPC controller based on the discrete-time nonlinear system model.
3. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 1, characterized in that: The CBF-MPC controller in S12 includes an optimal value function, constraints, and a control barrier function, and its specific formula is: x0=x, -ΔH(x k ,u k )-γH(x k )≤0. Among them, V MPC (x) is the optimal value function; N represents the length of the prediction time domain; and are the time series of decision variables for states and inputs respectively; the set and denote the generalized state and input constraints respectively; L is the total cost parameter, V MPC (x) represents the optimal value function, -ΔH(x k ,u k )-γH(x k )≤0 is the safety constraint defined by CBF; x is the preset initial state; γ is the constraint parameter, γ∈(0,1].
4. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 1, characterized in that: In S13, when using the first neural network to learn the optimal value function of the CBF-MPC controller, the first data set in the data set is used. The first data set is a state-action-value data set, and its specific formula is: in, is the first data set, x i is the system state of the UAV at the i-th sample moment; is the control input; V MPC (x i ) is the optimal value function; n tr is the number of training samples.
5. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 4, characterized in that: In S13, when the first neural network is used to learn the optimal value function of the CBF-MPC controller, the neural value function is iteratively updated. The specific formula is: V i+1 =β i V * +(1-β i )V i+1 ; Among them, V i+1 is the updated neural value function; β i is the weighting coefficient, V * is the initial neural value function.
6. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 5, characterized in that: In S13, when the first neural network is used to learn the optimal value function of the CBF-MPC controller, the mean square error is used as the loss function, and its specific formula is: in, is the loss function; n tr is the number of training samples, V(x i ; φ) is the neural value function; V MPC (x i ) is the optimal value function.
7. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 4, characterized in that: In S13, when learning the sensitivity of the value function of the CBF-MPC controller with respect to the parameters, the second data set in the data set is used. The second data set is a state-sensitivity data set, and its specific formula is: in, is the second data set; x i is the system state of the UAV at the i-th sample moment; is the control input; V MPC (x i ) is the optimal value function; n tr is the number of training samples; θ is the actual dynamics parameter.
8. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 1, characterized in that: The parameter-adaptive neural value function in S21 uses nominal dynamic parameters to approximate the optimal value function, and uses a prediction factor to predict the change trend of the value function with the actual dynamic parameters. The prediction factor is given by the neural sensitivity. The specific formula of the parameter-adaptive neural value function is: Among them, V BAN-MPC (x,θ) is the parameter-adaptive neural value function; V NN (x) is the neural value function; is the neural sensitivity; θ nom is the nominal kinetic parameter; θ is the actual kinetic parameter.
9. The method for obstacle avoidance and navigation control of a UAV based on an adaptive neural model according to claim 8, characterized in that: The BAN-MPC controller in S22 includes an optimization objective and obstacle avoidance constraint embedded in the neural value function and neural sensitivity, and its specific formula is: x0=x, -ΔH(x k ,u k )-γH(x k )≤0; in, represents the optimization objective of embedding neural value function and neural sensitivity; -ΔH(x k ,u k )-γH(x k )≤0 indicates the obstacle avoidance constraint defined by CBF; is a state sequence; is the input sequence; M represents the shortened prediction time domain length; x k+1 is the state transition equation; the set and represent the generalized state and input constraint respectively; x is the preset initial state, γ is the constraint parameter, γ∈(0,1].
10. An unmanned aerial vehicle obstacle avoidance navigation control system based on an adaptive neural model, characterized in that: The system applies the unmanned aerial vehicle obstacle avoidance navigation control method based on the adaptive neural model as described in any one of claims 1 to 9, and the system includes a model building module, an offline training module, an online control module and a data update module; The model building module is used to construct a UAV dynamics model and design a CBF-MPC controller based on the model; The offline training module is used to generate training data, and use the training data to train the neural value function and the neural sensitivity function, and output the neural value function and the neural sensitivity function; The online control module is used to construct and solve the BAN-MPC controller and generate control instructions. The module inputs include the neural value function, the neural sensitivity function and the current system state of the UAV, and the output is the UAV control instruction. The data updating module is used to aggregate new data and update the training data set.
Citation Information
Cited By
Humanoid robot whole body control reinforcement learning method and system based on parallel computing
CN121589834A