Unmanned underwater vehicle obstacle avoidance control method based on neural network model prediction

By constructing the kinematic and dynamic equations of UUV, combining the recursive least squares limit learning machine to optimize the neural network model, and compensate for dynamic errors and external interference in real time, the problem of insufficient adaptability and robustness of traditional UUV obstacle avoidance control in complex environments is solved, and high-precision obstacle avoidance and path tracking is achieved.

CN120540290APending Publication Date: 2025-08-26NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510478343.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

Traditional unmanned underwater vehicle (UUV) obstacle avoidance control methods are difficult to achieve high-precision obstacle avoidance and path tracking when facing nonlinear, unknown interference and dynamic changes in complex marine environments, especially in dynamic environments, which are difficult to adapt and robust.

Method used

Adopting obstacle avoidance control method based on neural network model, by constructing kinematics and dynamic equations of UUV, combining recursive least squares limit learning machine (RLS-ELM) to optimize the neural network model, compensate dynamic model errors and external interference in real time, construct obstacle avoidance control strategies to achieve online updates and optimizations.

Benefits of technology

It improves the accuracy and robustness of UUVs in complex environments, ensures that UUVs can efficiently plan paths and avoid obstacles independently in dynamic marine environments, and improves the stability and autonomous navigation capabilities of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120540290A_ABST
    Figure CN120540290A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned underwater vehicle (UUV) obstacle avoidance control method based on neural network model prediction. The method comprises the following steps: constructing kinematics and dynamics equations of a UUV; constructing a nominal UUV system without modeling error and external interference and a UUV motion model with disturbance compensation; constructing a cost function based on the state vector and the control vector; obstacle avoidance control strategies corresponding to the nominal UUV system and the UUV motion model with disturbance compensation are constructed in combination with a cost function and a preset constraint condition; constructing a neural network for performing disturbance compensation prediction on the UUV motion model with disturbance compensation; a recursive least square method and an extreme learning machine are combined to update the output weight of the neural network online, the output weight is used to determine the output of the neural network, and a control vector for driving the UUV to move is obtained in combination with an obstacle avoidance control strategy. According to the method, the unmanned underwater vehicle (UUV) is ensured to stably run along the expected path, and the accuracy and robustness of obstacle avoidance control are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of obstacle avoidance control of unmanned underwater vehicles, and in particular to an obstacle avoidance control method for unmanned underwater vehicles based on neural network model prediction. Background Art

[0002] Unmanned underwater vehicles (UUVs) have been widely used in ocean exploration, resource exploration, and environmental monitoring due to their efficient underwater operations, long endurance, and reusability. With technological advancements, autonomous obstacle avoidance capabilities for UUVs have become a key research focus to ensure their safety and mission success. In complex marine environments, UUV motion control faces numerous challenges, such as hydrodynamic nonlinearity, strong coupling, unknown external interference, and complex obstacle environments. This has made high-precision obstacle avoidance control a research hotspot.

[0003] Traditional methods for obstacle avoidance control in UUVs include artificial potential fields, virtual force fields, fuzzy control, and proportional-integral-differential control. These methods can achieve obstacle avoidance for UUVs to a certain extent. However, due to the complexity of the UUV's dynamic model and the presence of uncertainties such as unmodeled dynamics and environmental disturbances, traditional methods struggle to meet the real-time obstacle avoidance requirements in complex environments. For example, while PID control is simple and easy to implement, it struggles to handle the UUV's nonlinear characteristics and external interference. Furthermore, obstacle avoidance strategies based on artificial potential fields can experience local optimality, making it difficult for the UUV to successfully avoid obstacles.

[0004] The motion control problem of unmanned underwater vehicles (UUVs) is highly complex due to their nonlinear, strongly coupled, and environmentally uncertain characteristics. In a two-dimensional horizontal plane, a UUV primarily moves in forward and lateral directions, subject to the influence of hydrodynamic disturbances, unknown environmental obstacles, and flow disturbances. The mathematical model of a UUV involves multiple parameters that are difficult to precisely describe, resulting in significant model uncertainty. Furthermore, when performing their missions, UUVs often need to avoid obstacles in their environment, and uncertain disturbances further affect the accuracy of their motion control, increasing the difficulty of obstacle avoidance control. To improve the obstacle avoidance capabilities of UUVs in complex environments, researchers have proposed a variety of advanced control methods, such as adaptive control, sliding mode control, backstepping control, and neural network control. These methods can enhance the robustness and stability of the system to a certain extent. However, in environments with highly nonlinear, unknown disturbances, and complex obstacles, it is still difficult to achieve optimal obstacle avoidance performance using traditional control methods alone. Traditional model predictive control (MPC) algorithms can perform path planning and tracking tasks at a fixed frequency, but their adaptability to dynamically changing environments is poor. Especially in rapidly changing environments, traditional MPC may be unable to adjust control strategies in a timely manner, resulting in significant deviations between the planned path and the actual desired path. UUV motion models typically have multiple degrees of freedom and significant coupling, making their mathematical models more complex and difficult to accurately describe. UUVs are subject to interference from various external factors during navigation, making obstacle avoidance control even more challenging. Summary of the Invention

[0005] The purpose of the present invention is to provide an unmanned underwater vehicle obstacle avoidance control method based on neural network model prediction, which can maintain low overshoot and steady-state error during the obstacle avoidance process, thereby ensuring the smooth operation of the unmanned underwater vehicle UUV along the desired path and improving the accuracy and robustness of obstacle avoidance control.

[0006] In order to achieve the above tasks, the present invention adopts the following technical solutions:

[0007] The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction includes:

[0008] Construct the kinematic and dynamic equations of the UUV;

[0009] Construct a nominal UUV system without modeling errors and external disturbances, and a UUV motion model with disturbance compensation;

[0010] Constructing a cost function based on the state vector and the control vector; combining the cost function with the preset constraints to construct obstacle avoidance control strategies corresponding to the nominal UUV system and the UUV motion model with disturbance compensation;

[0011] A neural network is constructed to perform disturbance compensation prediction for the UUV motion model with disturbance compensation. A method combining recursive least squares method and extreme learning machine is used to update the output weights of the neural network online. The output weights are used to determine the output of the neural network, and the control vector that drives the UUV motion is obtained in combination with the obstacle avoidance control strategy.

[0012] Furthermore, the kinematic and dynamic equations of the UUV are constructed as follows:

[0013]

[0014] Among them, q1 represents the horizontal X-axis displacement in the ground coordinate system, q2 represents the horizontal Y-axis displacement, q3 represents the UUV heading angle attitude; v1 represents the X-axis displacement in the vehicle coordinate system B Axial velocity, v2 represents Y B Axial velocity, v3 represents the yaw angular velocity of the UUV, the superscript T represents the transpose, and the superscript dot of the parameter represents the first-order differential of the parameter; m is the mass of the UUV, I z represents the moment of inertia of the UUV around the vertical axis, X u' , Y v' , N r' is the additional mass term for forward, sideways and yaw rotation, X u , Y v , N r are the linear damping coefficients for forward, lateral and yaw rotations, corresponding to, are the nonlinear damping coefficients for forward, lateral and yaw rotations.

[0015] Furthermore, the nominal UUV system without modeling errors and external disturbances is as follows:

[0016]

[0017] Where x is the state vector of the generalized coordinate column vector q and velocity column vector v, and u represents the control vector;

[0018]

[0019] A k is the Jacobian matrix of the system state, B k is the Jacobian matrix of the control input, X represents the forward thrust component, and N represents the steering torque component.

[0020] Furthermore, the UUV motion model with disturbance compensation is expressed as:

[0021]

[0022] Among them, y1(t k ),y2(tk )、y3(t k ) are t k X coordinates of the carrier at the moment B Axial speed compensation, Y B Axial velocity compensation, UUV yaw rate compensation.

[0023] Furthermore, constructing a cost function based on the state vector and the control vector includes:

[0024]

[0025] Where X(t) and N(t) represent the forward thrust component and steering torque component at time t, respectively; q1(t), q2(t), and q3(t) represent the horizontal X-axis displacement, horizontal Y-axis displacement, and UUV heading angle attitude at time t; v1(t), v2(t), and v3(t) represent the X-axis displacement at time t. B Axial speed, Y B Axial velocity and UUV yaw angular velocity; u(t) and x(t) represent the control vector and state vector at time t, respectively. u(t k +k|t k ) represents the time t k Prediction of the control vector for the kth step in the future; x(t k +k|t k ) represents the prediction of the state vector of the kth step in the future at time tk, R is the control force weight matrix, M is the control input change weight matrix, Q is the state deviation weight matrix, x ref represents the reference state, i.e. the preset path expected to be tracked; T is the length of the prediction time domain, J1(t k )、J2(t k )、J3(t k ) are three cost functions, J(t k ) is the total cost function.

[0026] Furthermore, the obstacle avoidance control strategy of the nominal UUV system without modeling errors and external disturbances is as follows:

[0027]

[0028] in

[0029] v 1min <v1(t)<v 1max

[0030] v 2min <v2(t)<v 2max

[0031] v 3min <v3(t)<v3max

[0032] q 1min <q1(t)<q 1max

[0033] q 2min <q2(t)<q 2max

[0034] |X(t)|<X max

[0035] |N(t)|<N max

[0036] x(t k |t k )=x(t k ),u(t k |t k )=u(t k )

[0037] Among them, u * (t k ) represents t k The optimal control vector predicted at each moment is Indicates the actual t of UUV k The state vector at time t, x(t) and u(t) represent the state vector and control vector at time t respectively, x(t k |t k )、u(t k |t k ) represents the time t k Prediction of the state vector and control vector at step 0; v 1min 、v 1max X B Minimum and maximum axial speed; v 2min 、v 2max Y B Minimum and maximum axial speed; v 3min 、v 3max are the minimum and maximum values ​​of the UUV yaw angular velocity, respectively; X(t) and N(t) represent the forward thrust component and steering torque component at time t; t∈[t k ,t k +T], t represents time, t k represents the current moment, T represents the forecast range, X max 、N max Represent the maximum values ​​of the forward thrust component and the steering torque component respectively.

[0038] Furthermore, the obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation is based on the obstacle avoidance control strategy of the nominal UUV system without modeling error and external interference. Replace with get.

[0039] Furthermore, the neural network includes an input layer, a hidden layer and an output layer;

[0040] The input of the neural network is x(t k -1)、u(t k -X in 1) B Axial speed, Y B Vector x consisting of axial velocity, UUV yaw velocity, forward thrust component, and steering torque component:

[0041] x=[v1(t k -1)v2(t k -1)v3(t k -1)X(t k -1)N(t k -1)]

[0042] The input tags are:

[0043]

[0044] Among them, v′1(t k -1)、v′2(t k -1)、v′3(t k -1) represents the nominal UUV system at the previous moment. Under the constraints of the kinematic and dynamic equations, the cost function is combined to solve the obstacle avoidance control strategy of the nominal UUV system without modeling error and external interference. B Axial speed, Y B Axial velocity, UUV yaw rate; Represents the UUV motion model with disturbance compensation at the previous moment. Under the constraints of kinematic and dynamic equations, combined with the cost function, the vehicle coordinate X is obtained by solving the obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation. B Axial speed, Y B Axial velocity, UUV yaw rate;

[0045] The output layer of the neural network outputs the current time t k The output weight β under k , and then use the weight to calculate the predicted value y = β at the current moment k TH; take the predicted value as [y1(t)y2(t)y3(t)] and put it into the obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation to obtain a series of x(t k )、u(t k ); the first u(t k ) is used to drive the navigation system of the UUV.

[0046] Furthermore, the output layer outputs the current time t k The output weight β under k The solution process is as follows:

[0047] (1) Normalize the network input x to eliminate dimensional differences; nom Represents the normalized network input;

[0048] (2) When the neural network is initialized, the weight matrix W of the hidden layer of the neural network is generated by the SVD orthogonalization method; the activation function of the hidden layer adopts the Leaky ReLU activation function H k :

[0049] H k =max(0.01·(Wx norm ),Wx norm )

[0050] (3) Construct the current time t k The error vector is as follows:

[0051]

[0052] Under the premise of minimizing the error vector, β is updated by recursive least squares k :

[0053] The recursive least squares update expression is:

[0054]

[0055] Wherein, the subscript k represents the current time t k , K k 、P k Represents the current time t k The corresponding gain matrix and covariance matrix, λ represents the attenuation factor; clip represents the truncation operation.

[0056] A terminal device includes a processor, a memory, and a computer program stored in the memory; when the processor executes the computer program, the unmanned underwater vehicle obstacle avoidance control method based on neural network model prediction is implemented.

[0057] A computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the unmanned underwater vehicle obstacle avoidance control method based on neural network model prediction is implemented.

[0058] Compared with the prior art, the present invention has the following technical features:

[0059] 1. The present invention optimizes the neural network model through recursive least squares extreme learning machine to compensate for the uncertainty of traditional model predictive control in the modeling process. RLS-ELM can learn and correct the errors of the UUV dynamic model in real time, especially for environmental interference and nonlinear dynamic characteristics that are difficult to accurately model. The trained neural network is used to optimize the prediction model of MPC online, so that the system can adaptively adjust according to real-time data, improving the robustness of obstacle avoidance control and trajectory tracking accuracy. In addition, the optimized neural network prediction model is embedded in the cost function of MPC to ensure that the UUV can achieve efficient path planning and autonomous obstacle avoidance in a complex two-dimensional horizontal plane environment, thereby improving the operation capability and stability of the UUV in a dynamic ocean environment.

[0060] 2. In the MPC control framework of the present invention, the horizontal plane kinematic and dynamic models of the UUV are introduced to achieve an accurate description of the UUV's motion characteristics. Based on this model, an objective function for the integrated path tracking and obstacle avoidance control task is designed, so that the control system can optimize the control input and dynamically balance between obstacle avoidance and path tracking. In order to ensure the stability and feasibility of the obstacle avoidance strategy, the present invention introduces the UUV's state constraints and control input constraints, including actuator saturation constraints and safety distance constraints, to prevent excessive control inputs from causing the vehicle to become unstable or obstacle avoidance failure. This optimization method can ensure the robustness of the control system while ensuring the UUV's efficient obstacle avoidance, enabling the UUV to operate stably and perform tasks in complex marine environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 Schematic diagram of the planar motion of the unmanned underwater vehicle UUV;

[0062] Figure 2 A diagram showing the structure of a neural network constructed in the present invention;

[0063] Figure 3 This is the structure diagram of the model predictive control based on neural network;

[0064] Figure 4 The navigation trajectories under the traditional MPC and the MPC improved by the neural network in the present invention;

[0065] Figure 5 The motion trajectories under traditional MPC and the MPC improved by using neural network in the present invention. DETAILED DESCRIPTION

[0066] This invention provides an obstacle avoidance control method for an unmanned underwater vehicle (UUV) based on neural network model prediction. First, a kinematic and dynamic model of an underactuated underwater vehicle (UUV) is established. The UUV's dynamic characteristics are simplified for two-dimensional horizontal scenarios, ignoring the coupling between horizontal and vertical motion to reduce computational complexity and improve real-time control performance. To enhance the control system's adaptability in complex underwater environments, the invention introduces a recursive least squares extreme learning machine (RLS-ELM) to optimize the model predictive control framework. The improved neural network can learn and update the UUV's dynamic model online, compensating for prediction errors and thus improving the system's modeling accuracy and control performance. A recursive least squares extreme learning machine (RLS-ELM) is used to adjust the neural network's weights in real time to compensate for the prediction errors of the MPC, resulting in more accurate and stable obstacle avoidance control. Compared to traditional model predictive control methods, this invention optimizes the neural network model through RLS-ELM, providing higher-precision obstacle avoidance control in the presence of modeling uncertainty and external interference. Furthermore, this method dynamically adjusts the control strategy along a preset path to address real-time obstacle avoidance, ensuring the UUV's autonomous obstacle avoidance capabilities in complex marine environments, significantly enhancing its autonomous navigation and mission execution capabilities. The method of the present invention comprises the following steps:

[0067] Step 1: Construct the kinematic and dynamic equations of the UUV.

[0068] In order to facilitate the subsequent study of obstacle avoidance control strategies, the kinematic and dynamic models of the UUV are first established to ensure that the designed control method can generate a safe collision-free obstacle avoidance trajectory; the ground coordinate system and the vehicle coordinate system are usually used to describe the motion characteristics of the UUV, such as Figure 1 As shown; the origin O of the ground coordinate system is fixed on the ground, and it is stipulated that OX is positive in the north and OY is positive in the east; the origin O of the vehicle coordinate system B Set at the center of buoyancy of the UUV, specify O B X B Along the longitudinal direction of the UUV, O B Y B The positive direction is perpendicular to the right side of the axis.

[0069] Define the generalized coordinate column vector q and velocity column vector v as:

[0070]

[0071] Among them, q1 represents the horizontal X-axis displacement in the ground coordinate system, q2 represents the horizontal Y-axis displacement, q3 represents the UUV heading angle attitude; v1 represents the X-axis displacement in the vehicle coordinate system B Axial velocity, v2 represents Y BAxial velocity, v3 represents the UUV yaw angular velocity, and the superscript T represents transposition, the same below.

[0072] Ignoring the coupling effect between the horizontal and vertical motions of the under-actuated UUV, the horizontal three-degree-of-freedom motion equation of the under-actuated UUV is established; its kinematic and dynamic models on the horizontal plane can be expressed as:

[0073]

[0074] Wherein, the dot above the parameter indicates the first-order differential of the parameter, the same below; X represents the forward thrust component, N represents the steering torque component, M is the inertia matrix (including the inertia of the UUV itself and the added mass effect), C is the Coriolis centripetal force matrix (describing the inertial coupling effect in motion), and D is the damping matrix (representing the viscosity and form resistance of the fluid on the UUV motion). u The control vector includes the input force on the three degrees of freedom, the thrust generated by the thrusters, and the control force generated by the control surfaces;

[0075] The transformation matrix R is used to describe the transformation of velocity between different coordinate systems:

[0076]

[0077] The expression of M is:

[0078]

[0079] The antisymmetric mass matrix Ma is defined as:

[0080]

[0081] Where m is the mass of UUV, I z represents the moment of inertia of the UUV around the vertical axis, X u' , Y v' , N r' is the additional mass term for forward, lateral and yaw rotation, which describes the additional inertial effect of water on the UUV motion; the expression of C is:

[0082]

[0083] The expression of D is:

[0084]

[0085] X u , Y v , N r is the linear damping coefficient, corresponding to the linear hydrodynamic resistance of forward, lateral and yaw rotation, which plays a dominant role at low speed. is the nonlinear damping coefficient, suitable for high-speed motion.

[0086] Therefore, the kinematic and dynamic equations of the UUV are expressed as follows:

[0087]

[0088] Step 2: Construct a nominal UUV system without modeling errors and external disturbances, as well as a UUV motion model with disturbance compensation.

[0089] 2.1 The nominal UUV system without modeling errors and external interference is as follows:

[0090]

[0091] Where x is the state vector of the generalized coordinate column vector q and velocity column vector v, and u represents the control vector;

[0092]

[0093] A k is the Jacobian matrix of the system state, which represents the dependence of the system state on the state variables; B k is the Jacobian matrix of the control input, which represents the dependence of the system state on the control input; A k and B k Determined by the kinematic and dynamic equations of the UUV on the horizontal plane.

[0094] 2.2 UUV motion model with disturbance compensation.

[0095] Since the actual UUV motion is disturbed by the uncertain environment, adding disturbance compensation to the nominal UUV system can reduce the prediction error and improve the model accuracy. The UUV motion model with disturbance compensation is designed, and its state space expression is:

[0096]

[0097] Among them, y1(t k ) is t k X at the moment B Axial velocity compensation, y2(t k ) is t k Time Y B Axial velocity compensation, y3(t k ) is t k UUV yaw rate compensation at this moment.

[0098] Step 3: construct a cost function based on the state vector and the control vector; combine the cost function with the preset constraints to construct the obstacle avoidance control strategies corresponding to the nominal UUV system and the UUV motion model with disturbance compensation.

[0099] In UUV motion control, the realization of obstacle avoidance mainly depends on state constraints and control constraints, ensuring that the UUV can both track the preset trajectory and avoid obstacles within the prediction time domain.

[0100] The state constraint of obstacle avoidance is mainly reflected in the fact that the UUV cannot enter the obstacle range. Let the plane position of the i-th obstacle in the ground coordinate system be (o 1,i ,o 2,i ), the position of UUV is (q1(t),q2(t)), and the minimum safety distance is d safe ,but:

[0101]

[0102] This constraint ensures that the UUV always stays outside the safe range of obstacles in the prediction time domain, where t represents time and t k represents the current moment, T represents the prediction range, q1(t) and q2(t) represent the horizontal X-axis displacement and the horizontal Y-axis displacement in the ground coordinate system, respectively.

[0103] For general convex polygon obstacles, a linear inequality is used to express the feasible area of ​​UUV obstacle avoidance. Assume that the obstacle is a convex polygon surrounded by N boundary lines, where the two-dimensional coordinates of the normal vector of the mth edge are (A m ,B m ), offset is C m , then the UUV cannot enter the interior of the polygon, and the constraints are as follows:

[0104]

[0105] Among them, the normal vector in this solution is the normal vector pointing to the outside of the polygon, which can ensure that the UUV will not enter the inside of the polygon.

[0106] The above two constraints are expressed uniformly as:

[0107] q 1min <q1(t)<q 1max

[0108] q 2min <q2(t)<q 2max

[0109] Among them, q 1min ,q 1max are the minimum and maximum values ​​of the horizontal X-axis displacement in the ground coordinate system, respectively, 2min ,q 2max are the minimum and maximum values ​​of the horizontal Y-axis displacement in the ground coordinate system, respectively.

[0110] To prevent the UUV from approaching obstacles at too high a speed, set:

[0111] v 1min <v1(t)<v 1max

[0112] v 2min <v2(t)<v 2max

[0113] v 3min <v3(t)<v 3max

[0114] Among them, v 1min 、v 1max X B Minimum and maximum axial speed; v 2min 、v 2max Y B Minimum and maximum axial speed; v 3min 、v 3max are the minimum and maximum values ​​of the UUV yaw angular velocity, respectively.

[0115] Taking into account the actuator capabilities, the control input should satisfy:

[0116]

[0117] Among them, X(t) and N(t) represent the forward thrust component and steering torque component at time t, t∈[t k ,t k +T];X max 、N max Represent the maximum values ​​of the forward thrust component and the steering torque component respectively.

[0118] By setting the UUV state and control constraints and introducing them into the model predictive control framework, the feasibility and safety of the UUV are ensured at all times during the obstacle avoidance process.

[0119] The goal of the UUV motion control strategy is to find a collision-free path to the destination and calculate the control quantity within the predicted horizon. When generating the motion control strategy, in order to obtain a collision-free trajectory, the initial point and the target route centerline are set in advance, and reasonable motion states and control constraint inequalities are formulated to ensure that no collision occurs. Path planning and UUV obstacle avoidance control are performed under the premise of ensuring that no collision occurs. The definition of the cost function needs to comprehensively consider the control cost and drive stability, and its expression is:

[0120]

[0121] Where X(t) and N(t) represent the forward thrust component and steering torque component at time t, respectively; q1(t), q2(t), and q3(t) represent the horizontal X-axis displacement, horizontal Y-axis displacement, and UUV heading angle attitude at time t; v1(t), v2(t), and v3(t) represent the X-axis displacement at time t. B Axial speed, Y B Axial velocity and UUV yaw angular velocity; u(t) and x(t) represent the control vector and state vector at time t, respectively. u(t k +k|t k ) represents the time t k Prediction of the control vector for the kth step in the future; x(t k +k|t k ) represents the time t k For the prediction of the state vector in the kth step in the future, R is the control force weight matrix, which is used to adjust the importance of the control input. A larger R means more emphasis on reducing the control force. M is the control input change weight matrix, which is used to smooth the change of the control input and prevent sudden changes. Q is the state deviation weight matrix, which is used to adjust the importance of tracking the reference state. The larger Q is, the tighter the tracking is. ref represents the reference state, i.e. the preset path expected to be tracked; T is the length of the prediction time domain, J1(t k )、J2(t k )、J3(t k ) are three cost functions, J(t k ) is the total cost function, which needs to be minimized; (t k +k|t k ) indicates that at time t k Prediction of the control vector or state vector for the kth step in the future; when designing a controller, it is necessary to balance the cumulative control input size, control input change and state tracking error within the time domain length T.

[0122] 3.1 Obstacle avoidance control strategy for the nominal UUV system without modeling errors and external interference:

[0123]

[0124] in

[0125]

[0126] Among them, u * (t k ) represents t k The optimal control vector predicted at each moment is Indicates the actual t of UUV k The state vector at the moment, x(t k |tk )、u(t k |t k ) represents the time t k Prediction of the state vector and control vector at step 0.

[0127] 3.2 Obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation:

[0128]

[0129] in

[0130]

[0131] By solving Equation 5 and Equation 6 for model predictive control, we can obtain k Time prediction [t k ,t k +T] interval a series of state vectors and control vectors; the first control vector u(t k ) is used as the solution result to control the UUV movement, thereby tracking the preset path and avoiding obstacles; then the system state is retrieved at the next moment and the above process is repeated for rolling optimization.

[0132] In the optimization problem, the final solution is the optimal control vector u * (t k ), by optimizing u(t), the acceleration, steering and other dynamic behaviors of the UUV are indirectly determined; the core of the present invention is the unified implementation of path planning and trajectory tracking through model predictive control: at each moment t k , based on the current state vector and the system dynamics model to predict the state and control input of the next T steps, and minimize the total cost function J(t k ), generate the optimal control sequence, and through rolling time domain optimization, only execute the optimal control input at the current moment, and re-optimize at the next moment to correct the obstacle avoidance path in real time. Control quantity u(t k ) directly affects the UUV’s dynamic model, thus changing its future trajectory. The path planning algorithm is directly integrated into the MPC framework, using the UUV motion model to predict the future state, and the state deviation vector x(t k +k|t k )-x ref The driving trajectory follows the preset path, and constraints such as speed and steering angle ensure the path is safe.

[0133] Step 4: Construct a neural network for disturbance compensation prediction of the UUV motion model with disturbance compensation; use a combination of recursive least squares method and extreme learning machine to update the output weights of the neural network online, use the output weights to determine the output of the neural network, and combine the obstacle avoidance control strategy to obtain the control vector that drives the UUV motion.

[0134] Among them, the neural network includes an input layer, a hidden layer, and an output layer;

[0135] The input of the neural network is x(t k -1)、u(t k -X in 1) B Axial speed, Y B Vector x consisting of axial velocity, UUV yaw velocity, forward thrust component, and steering torque component:

[0136] x=[v1(t k -1)v2(t k -1)v3(t k -1)X(t k -1)N(t k -1)]

[0137] The input tags are:

[0138]

[0139] Among them, v′1(t k -1)、v′2(t k -1)、v′3(t k -1) represents the nominal UUV system equation 2 at the previous moment. Under the constraints of kinematic and dynamic equations 1, combined with the cost function equation 4, the vehicle coordinate X is obtained by solving the expression 5 of the collision avoidance strategy of the nominal UUV system. B Axial speed, Y B Axial velocity, UUV yaw rate; The UUV motion model with neural network disturbance compensation at the previous moment is expressed in Equation 3. Under the constraints of kinematic and dynamic equations, Equation 1 is combined with the cost function Equation 4. The vehicle coordinate X is obtained by solving the expression 6 of the collision avoidance strategy of the non-nominal UUV system. B Axial speed, Y B Axial velocity, UUV yaw rate.

[0140] The output layer of the neural network outputs the current time t k The output weight β under k , and then use the weight to calculate the predicted value y = β at the current moment k T H=[y1(tk ),y2(t k ),y3(t k )] T ; Substitute the predicted value into Equation 6 as [y1(t)y2(t)y3(t)] and solve to obtain a series of x(t k )、u(t k ); the first u(t k ) is used to drive the navigation system of the UUV.

[0141] Among them, the current time t output by the output layer k The output weight β under k The solution process is as follows:

[0142] (1) Normalize the network input x to eliminate dimensional differences and accelerate convergence. The expression is:

[0143]

[0144] μ x =mean(x),σ x =std(x)

[0145] Among them, x nom represents the normalized network input, μ x represents the data mean, σ x represents the standard deviation of the data, mean(·) represents the mean, and std(·) represents the standard deviation.

[0146] (2) When the neural network is initialized, the weight matrix W of the hidden layer of the neural network is generated by the SVD orthogonalization method to ensure the independence of the input features, avoid gradient disappearance or explosion, and keep it fixed during the training process. Compared with pure random initialization, orthogonalization reduces the sensitivity of the model to the initial weights; the hidden layer activation function uses the Leaky ReLU activation function H k , allowing small negative gradients to alleviate the problem of neuron death:

[0147] H k =max(0.01·(Wx norm ),Wx norm )

[0148] (3) Construct the current time t k The error vector is as follows:

[0149]

[0150] Under the premise of minimizing the error vector, β is updated by recursive least squares k :

[0151] The recursive least squares update expression is:

[0152]

[0153] Wherein, the subscript k represents the current time t k , K k 、P k Represents the current time t k The corresponding gain matrix and covariance matrix, λ represents the attenuation factor; clip represents the truncation operation.

[0154] At each update, the old weight is multiplied by a decay factor β k-1 , making it close to zero, can be understood as adding a penalty on the square of the L2 norm of β in the minimization objective, which is equivalent to penalizing the size of the parameter in each iteration, encouraging small parameters, and preventing overfitting, also known as weight decay. L2 regularization prevents overfitting of the output weight; the forgetting factor λ is used to balance the influence of historical data and new samples, enhancing the adaptability of the UUV to the time-varying obstacle avoidance system. The covariance matrix P k Used to avoid numerical divergence.

[0155] (4) Then the predicted value y at the current moment = β k T H=[y1(t k ),y2(t k ),y3(t k )] T .

[0156] Example:

[0157] To evaluate the performance of the neural network-based MPC algorithm, a comparative analysis of the obstacle avoidance control performance of an unmanned underwater vehicle was conducted using both traditional MPC and neural network-based MPC. The results highlighted the improved adaptability and responsiveness of the proposed strategy, achieving better results in UUV motion control.

[0158] The experimental scenario is a two-dimensional horizontal environment with several obstacles. The UUV is required to avoid obstacles and ultimately return to the preset route while maintaining path tracking accuracy. The target path is the preset path (black dashed line); the neural network uses a recursive least squares extreme learning machine to optimize the MPC model to adapt to the uncertainty of the system. In the simulation environment, a neural network-based MPC algorithm is used to generate the obstacle avoidance path. The predicted trajectory and control sequence are periodically calculated at each time step. At each time step, the algorithm calculates a predicted path and a series of control actions aimed at guiding the UUV's navigation. The main control task is initially focused on driving the UUV. Subsequently, at each time step, a new predicted trajectory is generated based on the collision avoidance strategy, and the iterative process continues until the UUV successfully enters the target path. At each time step, appropriate control forces are applied to the UUV to obtain the actual obstacle avoidance trajectory.

[0159] In the simulation, the prediction step size is configured to 30. In the simulation experiment, the initialization factor is 1000, which is used to initialize the covariance matrix to ensure the stability of the initial calculation. The forgetting factor is 0.99, which controls the weight decay of historical data and is used to recursively update the least squares weight to ensure smooth weight changes. The L2 regularization coefficient is 0.001 to prevent overfitting and limit the size of the weights from the hidden layer to the output layer. The number of neurons in the input layer is 5, and the number of neurons in the output layer is 3. While ensuring path tracking control, the system's adaptability and anti-interference ability are improved. UUV uses different control methods in the obstacle avoidance process to show different trajectories: when the preset path is y = 0 and the obstacle is located at x = 10m, the simulation results are as follows Figure 4 shown.

[0160] As can be seen from the figure, the two control methods exhibit different effects during obstacle avoidance. The maximum offset of the neural network-based model predictive controller is smaller than that of the traditional model predictive controller, meaning that the deviation from the preset path (black dashed line) during obstacle avoidance is smaller. This demonstrates that the neural network-compensated MPC can minimize trajectory deviation while avoiding obstacles, thereby improving path tracking accuracy.

[0161] Furthermore, the neural network-based model predictive controller (MPC) returns to the desired path more quickly after avoiding an obstacle, while the traditional MPC trajectory still exhibits significant deviations and converges more slowly after obstacle avoidance. This demonstrates that the neural network-compensated MPC strategy is superior, enabling the vehicle to return to the desired trajectory more quickly after obstacle avoidance, reducing unnecessary path deviations, thereby lowering energy consumption and improving motion efficiency.

[0162] The trajectory curvature corresponding to the neural network-based model predictive controller changes more gradually, indicating that the improved algorithm reduces control mutations, resulting in a smoother obstacle avoidance trajectory and improved motion stability. Furthermore, the neural network-based model predictive controller deviates from the preset path earlier to avoid obstacles, demonstrating that the neural network-compensated MPC can identify obstacles earlier and make appropriate obstacle avoidance decisions, reducing collision risk and improving safety.

[0163] Modify the preset path and reset the obstacles (at x=10m and x=25m). The simulation results are as follows Figure 5 shown.

[0164] As can be seen from the figure, the neural network-based model predictive controller deviates from the preset path before approaching the obstacle, taking evasive action in advance, sensing the obstacle's impact earlier and making appropriate adjustments. After the obstacle avoidance is complete, the neural network-enhanced MPC returns to the preset path faster than the traditional model predictive controller, with less deviation, reducing unnecessary detours and improving obstacle avoidance efficiency.

[0165] The neural network-modified MPC obstacle avoidance trajectory is smoother. In contrast, the traditional MPC controller exhibits greater curvature variation and slower convergence during the obstacle avoidance process. This phenomenon is primarily attributed to the traditional MPC algorithm's lack of adaptability to the uncertainties of the real environment. Due to this limitation, traditional algorithms may struggle to maintain their obstacle avoidance control effectiveness in dynamic scenarios, adversely affecting system performance.

[0166] The method proposed in this invention effectively compensates for model uncertainty by incorporating a real-time tracking feedback mechanism, while dynamically adjusting the planned path, significantly enhancing the robustness and applicability of the control strategy. By introducing the online learning capabilities of a neural network, the model can quickly adapt to environmental changes, ensuring that the vehicle can safely avoid obstacles and maintain stable navigation. This method can quickly adapt to changes in a dynamic environment, thereby ensuring further improvements in system performance. This design, combining real-time feedback with dynamic adjustment, effectively enhances the obstacle avoidance capabilities of unmanned underwater vehicles. It provides new ideas for addressing the application limitations of traditional MPC in complex environments and provides important reference value for subsequent research.

[0167] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. An obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction, characterized in that: include: Construct the kinematic and dynamic equations of the UUV; Construct a nominal UUV system without modeling errors and external disturbances, and a UUV motion model with disturbance compensation; Construct a cost function based on the state vector and the control vector; Combining the cost function with the preset constraints, the obstacle avoidance control strategies corresponding to the nominal UUV system and the UUV motion model with disturbance compensation are constructed respectively; Construct a neural network for disturbance compensation prediction of UUV motion model with disturbance compensation; A method combining recursive least squares method and extreme learning machine is used to update the output weights of the neural network online. The output weights are used to determine the output of the neural network, and the control vector that drives the UUV motion is obtained in combination with the obstacle avoidance control strategy.

2. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 1, characterized in that: The kinematic and dynamic equations of the UUV are expressed as follows: Among them, q1 represents the horizontal X-axis displacement in the ground coordinate system, q2 represents the horizontal Y-axis displacement, q3 represents the UUV heading angle attitude; v1 represents the X-axis displacement in the vehicle coordinate system B Axial velocity, v2 represents Y B Axial velocity, v3 represents the yaw angular velocity of the UUV, the superscript T represents the transpose, and the superscript dot of the parameter represents the first-order differential of the parameter; m is the mass of the UUV, I z represents the moment of inertia of the UUV around the vertical axis, X u' , Y v' , N r' is the additional mass term for forward, sideways and yaw rotation, X u , Y v , N r are the linear damping coefficients for forward, lateral and yaw rotations, corresponding to, are the nonlinear damping coefficients for forward, lateral and yaw rotations.

3. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 1, characterized in that: The nominal UUV system without modeling errors and external disturbances is as follows: Where x is the state vector of the generalized coordinate column vector q and velocity column vector v, and u represents the control vector; A k is the Jacobian matrix of the system state, B k is the Jacobian matrix of the control input, X represents the forward thrust component, and N represents the steering torque component.

4. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 1, characterized in that: The UUV motion model with disturbance compensation is expressed as: Among them, y1(t k ),y2(t k )、y3(t k ) are t k X coordinates of the carrier at the moment B Axial speed compensation, Y B Axial velocity compensation, UUV yaw rate compensation.

5. The obstacle avoidance control method for unmanned underwater vehicles based on neural network model prediction according to claim 1, characterized in that: The cost function is constructed based on the state vector and the control vector, including: Where X(t) and N(t) represent the forward thrust component and steering torque component at time t, respectively; q1(t), q2(t), and q3(t) represent the horizontal X-axis displacement, horizontal Y-axis displacement, and UUV heading angle attitude at time t; v1(t), v2(t), and v3(t) represent the X-axis displacement at time t. B Axial speed, Y B Axial velocity and UUV yaw angular velocity; u(t) and x(t) represent the control vector and state vector at time t, respectively. u(t k +k|t k ) represents the time t k Prediction of the control vector for the kth step in the future; x(t k +k|t k ) represents the time t k The prediction of the state vector for the kth step in the future, R is the control force weight matrix, M is the control input change weight matrix, Q is the state deviation weight matrix, x ref represents the reference state, i.e. the preset path expected to be tracked; T is the length of the prediction time domain, J1(t k )、J2(t k )、J3(t k ) are three cost functions, J(t k ) is the total cost function.

6. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 5, characterized in that: The obstacle avoidance control strategy of the nominal UUV system without modeling errors and external disturbances is as follows: in v 1min <v1(t)<v 1max v 2min <v2(t)<v 2max v 3min <v3(t)<v 3max q 1min <q1(t)<q 1max q 2min <q2(t)<q 2max |X(t)|<X max |N(t)|<N max x(t k |t k )=x(t k ),u(t k |t k )=u(t k ) Among them, u * (t k ) represents t k The optimal control vector predicted at each moment is Indicates the actual t of UUV k The state vector at time t, x(t) and u(t) represent the state vector and control vector at time t respectively, x(t k |t k )、u(t k |t k ) represents the time t k Prediction of the state vector and control vector at step 0; v 1min 、v 1max X B Minimum and maximum axial speed; v 2min 、v 2max Y B Minimum and maximum axial speed; v 3min 、v 3max are the minimum and maximum values ​​of the UUV yaw angular velocity, respectively; X(t) and N(t) represent the forward thrust component and steering torque component at time t; t∈[t k ,t k +T], t represents time, t k represents the current moment, T represents the forecast range, X max 、N max Represent the maximum values ​​of the forward thrust component and the steering torque component respectively.

7. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 6, characterized in that: The obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation is based on the obstacle avoidance control strategy of the nominal UUV system without modeling error and external interference. Replace with get.

8. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 1, characterized in that: The neural network includes an input layer, a hidden layer and an output layer; The input of the neural network is x(t k -1)、u(t k -X in 1) B Axial speed, Y B Vector x consisting of axial velocity, UUV yaw velocity, forward thrust component, and steering torque component: x=[v1(t k -1)v2(t k -1)v3(t k -1)X(t k -1)N(t k -1)] The input tags are: Among them, v1′(t k -1)、v2′(t k -1)、v3′(t k -1) represents the nominal UUV system at the previous moment. Under the constraints of the kinematic and dynamic equations, the cost function is combined to solve the obstacle avoidance control strategy of the nominal UUV system without modeling error and external interference. B Axial speed, Y B Axial velocity, UUV yaw rate; Represents the UUV motion model with disturbance compensation at the previous moment. Under the constraints of kinematic and dynamic equations, combined with the cost function, the vehicle coordinate X is obtained by solving the obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation. B Axial speed, Y B Axial velocity, UUV yaw rate; The output layer of the neural network outputs the current time t k The output weight β under k , and then use the weight to calculate the predicted value y = β at the current moment k T H; take the predicted value as [y1(t)y2(t)y3(t)] and put it into the obstacle avoidance control strategy corresponding to the UUV motion model with disturbance compensation to obtain a series of x(t k )、u(t k ); the first u(t k ) is used to drive the navigation system of the UUV.

9. The obstacle avoidance control method for an unmanned underwater vehicle based on neural network model prediction according to claim 8, characterized in that: The current time t output by the output layer k The output weight β under k The solution process is as follows: (1) Normalize the network input x to eliminate dimensional differences; nom Represents the normalized network input; (2) When the neural network is initialized, the weight matrix W of the hidden layer of the neural network is generated by the SVD orthogonalization method; the activation function of the hidden layer adopts the Leaky ReLU activation function H k : H k =max(0.01·(Wx norm ),Wx norm ) (3) Construct the current time t k The error vector is as follows: Under the premise of minimizing the error vector, β is updated by recursive least squares k : The recursive least squares update expression is: Wherein, the subscript k represents the current time t k , K k 、P k Represents the current time t k The corresponding gain matrix and covariance matrix, λ represents the attenuation factor; clip represents the truncation operation.

10. A terminal device comprising a processor, a memory, and a computer program stored in the memory; characterized in that: When the processor executes the computer program, it implements the unmanned underwater vehicle obstacle avoidance control method based on neural network model prediction according to any one of claims 1 to 9.