Coordinated Obstacle Avoidance of Multi-AUV Based on Improved Artiﬁcial Potential Field Method and Consistency Protocol

: Formation avoidance is one of the critical technologies for autonomous underwater vehicle (AUV) formations. To this end, a cooperative obstacle avoidance algorithm based on an improved artiﬁcial potential ﬁeld method and a consistency protocol is proposed in this paper for the local obstacle avoidance problem of AUV formation. Firstly, for the disadvantage that the traditional artiﬁcial potential ﬁeld method can easily fall into local minima, an auxiliary potential ﬁeld perpendicular to the AUV moving direction is designed to solve the problem that AUVs can easily have zero combined force in the potential ﬁeld and local minima. Secondly, the control law of AUV formation that keeps the speed and position consistent is designed for the problem that the formation will change during the local obstacle avoidance of the formation system. The control conﬂict problem of the combined algorithm of the artiﬁcial potential ﬁeld law and the consistency protocol is solved by adjusting the desired formation of the consistency protocol through the potential ﬁeld force. Finally, the bounded energy function demonstrates system convergence stability. The simulation veriﬁcation conﬁrmed that the AUV formation could achieve the convergence of the formation state under local obstacle avoidance.


Introduction
Autonomous underwater vehicles (AUVs) have recently become a new marine development tool for marine resource exploitation and environmental exploration operations [1]. They have the advantages of autonomy, independence, a tiny target and high applicability. However, it is difficult for a single underwater autonomous vehicle to meet the increasing mission requirements in the complex and broad ocean environment. Single unmanned underwater autonomous vehicles have a limited energy load, small range, low task performance efficiency and instability. With the multi-autonomous underwater vehicle (MAUV) system [2] coming into operation, the mutual coordination between single AUVs [3] more rationally compensates for the shortcomings of single AUVs.
In recent years, many researchers have investigated formation avoidance algorithms in complex environments [4]. Obstacle avoidance can be divided into path planning for global obstacle avoidance and path planning for local obstacle avoidance. If the global environment information is known, international path planning can be seen as a nonlinear optimization problem to find the optimal solution for global variables. Many scholars have proposed many standard global path-planning algorithms at home and abroad, for example, the A* algorithm (Dechter, R and Pearl, 1985) [5], genetic algorithm (Cobb and Grefenstette, 1993) [6], fast extended random tree (Cui, RX and Li, Y, 2016) [7], particle swarm algorithm (Eberhart and Kennedy, 1995) [8], ant colony algorithm [9] and so on. In addition, the local obstacle avoidance aspects are more applied such as the artificial potential field method [10], fuzzy decision making (Smith, SM and Ganesan, K, 1998) [11], neural network [12], reinforcement learning methods [13], etc.
In this paper, the artificial potential field method is chosen as the base algorithm for path planning. The advantages of the artificial potential field method are simple algorithms, fast operation, high safety performance and more suitability for the collaborative planning of multiple intelligences. It can be used not only as a path-planning method but also as a feedback control strategy. The potential field of obstacles can be used as the control rate of AUVs, which can better adapt to the changes in the target and dynamic obstacles in the environment, and is robust to control and sensing errors, so the artificial potential field method can be used as a real-time obstacle avoidance algorithm.
However, the artificial potential field method is prone to the problem of unreachable targets and easily falls into local minima in trajectory planning. To solve these problems, some improvements in the artificial potential field method are needed.
Due to the rapid change in the ocean environment and many uncertainties, although global path planning can plan a better path, the path cannot be used as the actual reference path of the AUV. Cheng Chun Lei considered the ocean current's force [14]. He synthesized the current's velocity with the AUV's velocity, combined with the artificial potential field method to overcome the influence of the ocean current on path planning. Song proposed an improved artificial potential field method by improving parameters such as angle limit to solve the problem that the artificial potential field algorithm can easily fall into a particular terrain and improve the algorithm's stability [15]. Zhao, ZY proposed a hybrid adaptive preference method based on the improved artificial potential field (HAP-IAPF) [16]. Adaptive weight control units are used to adjust the preference strategy. Cooperative multi-AUV hunting in dynamic underwater obstacle environments is achieved under weakly connected conditions. Wang SM combined the H-infinity controller with the artificial potential field method (APFM) for the subsea navigation of autonomous underwater vehicles (AUVs) [17]. Depth control and altitude control prevent AUVs from colliding with the seafloor or obstacles, and simulations and laboratory tests of various seafloor profiles show that the combination of the H-infinity controller and APFM is feasible and effective. Zhen, QZ addressed the attitude adjustment problem in AUV deployment and the detection of seafloor topographic undulations and proposed a finitetime position and attitude tracking control method combining artificial potential fields and virtual structures [18]. This control method ensures that AUVs avoid colliding with each other during the dive and form and change formations after reaching a set depth. Orozco-Rosas proposed a membrane-evolutionary artificial potential field method for solving the path-planning problem of mobile robots, which combines membrane computation with genetic algorithms (membrane-inspired evolutionary algorithms with a first-class membrane structure) and artificial potential field methods to find the parameters that generate feasible and safe paths [19].
The rest of this paper is organized as follows. Section 2 gives the AUV dynamic and kinetic model and the problem description. Section 3 presents the improved artificial potential field method and the consistency protocol. The flow and stability proof of the cooperative obstacle avoidance algorithm is given in Section 4. The simulation experiments are given in Section 5. The discussions are given in Section 6. Finally, the conclusions are obtained in Section 7.

Problem Description
The unknown underwater environment is characterized by complex terrains such as coral reefs, islands, trenches and valleys. The obstacles encountered by AUVs underwater vary in shape, complexity and number. In order to ensure the safety of the AUV and the successful completion of the mission, the AUV must be capable of avoiding the following complex obstacles [20]:

1.
Movement limitation: In the actual motion state, AUVs are limited by the performance of their equipment and so on. Therefore, it is necessary to consider the impact of the actual model of the AUV in the motion limitation function on track planning during AUV navigation.

2.
Obstacle types: When AUVs perform missions in unknown underwater environments, they encounter multiple obstacle types. In this paper, the threat values of each point of the obstacles to AUVs are represented uniformly for modeling the probabilistic threat environment. Grouping different types of obstacles under the same map helps improve the speed and stability of the algorithm.
where f , g and h are sufficiently smooth over the domain of definition D ⊂ R n . Then the mapping f : D → R n and the mapping g: D → R n are said to be vector fields over the definition domain D.
Output y is derived from the above equation: .
. h is the Lee derivative concerning f . The Lie derivative has an important role in differential geometry, mainly in the nature that the derivative f of a smooth function h(x) is still a smooth function. Therefore, the second-order Lie derivative of y can be expressed as Definition 2 ([22]). Relative order. For the system (7), if for all x, it can be expressed as Then the above nonlinear system is said to exist in region x ∈ D 0 with relative order ρ, For the multi-input multi-output nonlinear system shown in Equation (7) as a standard affine MIMO system, the definition is where for any 1 ≤ i ≤ p, there exists at least one B such that C. There also exists a non-singular matrix: Then the relative order of the system is defined as ρ = ρ 1 + ρ 2 + · · · + ρ p , where ρ i is the corresponding h i (x) of relative order.
Citation: For the affine multi-input multi-output nonlinear system shown in Equation (1), if the system satisfies the following conditions, the system can be linearized with feedback: (1) The nonlinear system input vector is equal in dimension to the output vector p = q; (2) Nonlinear systems exist of relative order ρ = ρ 1 + ρ 2 + · · · + ρ p ; (3) The dimensionality of the state vector of a nonlinear system is equal to the relative order of the system m = ρ.

AUV Movement Model
According to Figure 1, the dynamics of AUVs are usually modeled by a six-degreeof-freedom (DOF) model. However, AUVs do not have actuators for rolling control, so rolling motion is usually not considered. In the inertial coordinate system and its own fixed coordinate system, according to (Fossen, 2011) [23], the kinematic and dynamical model of the AUV can be represented by five degrees of freedom as follows [23]: where η = [x, y, z, θ, ψ] T , and v = [u, v, w, q, r] T . R(ψ, θ) is the Jacobian coefficient from the body-fixed frame to the earth-fixed frame. M is the inertia matrix, C(v) is the hydrodynamic Coriolis and centripetal force matrix, D(v) is the nonlinear fluid hydrodynamic damping matrix, g(η) is the restoring force (moment) vector, and T is the external force and external moment vector applied to the vehicle.
Then the relative order of the system is defined as Citation: For the affine multi-input multi-output nonlinear system shown in Equation (1), if the system satisfies the following conditions, the system can be linearized with feedback: (1) The nonlinear system input vector is equal in dimension to the output vector p q = ; (2) Nonlinear systems exist of relative order 1 2 p ρ ρ ρ ρ = + + +  ; (3) The dimensionality of the state vector of a nonlinear system is equal to the relative order of the system m ρ = .

AUV Movement Model
According to Figure 1, the dynamics of AUVs are usually modeled by a six-degreeof-freedom (DOF) model. However, AUVs do not have actuators for rolling control, so rolling motion is usually not considered. In the inertial coordinate system and its own fixed coordinate system, according to (Fossen, 2011) [23], the kinematic and dynamical model of the AUV can be represented by five degrees of freedom as follows [23]: , , , ,  The navigator system itself is strongly coupled and vulnerable to the influence of external waves and currents. The nonlinear characteristics of the navigator cause some The navigator system itself is strongly coupled and vulnerable to the influence of external waves and currents. The nonlinear characteristics of the navigator cause some difficulties in engineering processing, so this paper linearizes the model of the navigator with feedback.
First, the AUV dynamics can be expressed as a general nonlinear system [22]. .

x(t) = f(x(t)) + g(x(t))u(t) y(t) = h(x(t))
where x ∈ R m is the system state vector, u ∈ R p is the system control input vector, and y ∈ R q is the system output vector. f(x), g(x) and h(x) are the corresponding system vector coefficients.
Non-singular damping matrix M x can be defined as where M c ∈ R 5×5 stands for the hydrodynamic added mass of the related AUV model [22].
The system function f(x) and g(x) can be expressed as The output equation of the system can be defined as Based on the nonlinear model of an AUV and the principle of feedback linearization, the feedback control rate and the set of coordinate transformations are found to obtain the feedback linearization model of the unmanned aerial vehicle.
The system function vector f(x), h(x), g(x) can be obtained from the previous presentation.
where, 0 is a 5 × 5 zero matrix. Based on the Lee derivative [24] and the definition of g(x), for any 1 ≤ i ≤ 10, 1 ≤ j ≤ 10, it follows that By calculating the above equation, we can obtain the matrix is a non-singular matrix, and ρ 1 + ρ 2 + ρ 3 + ρ 4 + ρ 5 = 10. The relative order is the same as the system order, i.e., the nonlinear model of the navigator can be linearized by feedback. By transforming z = ϕ(x) by coordinates, it follows that Based on the definition of the Lee derivative, Control inputs in the new coordinate system: In the presence of a transformed coordinate system and feedback control inputs: To sum up, the standard feedback linearization dynamic second-order integral model of an AUV could be reorganized as follows: where x i ∈ R 5 , v i ∈ R 5 , and u i ∈ R 5 .

Formation Communication Topology
In the consistency control of the AUV formation, there are n AUVs among the formation members, and the communication relationship between the formations is represented as G(U, ε, A). U indicates a single member of the formation. ε denotes all communication chains. A denotes the adjacency matrix of the formation communication relationship. The Laplace matrix is defined as is the number of AUVs that can transmit information to any single U in the formation AUV. If the AUV formation members can communicate in both directions, based on the principle of the graph theory, it is indicated that graph A is an undirected graph, as shown in Figure 2 [24].
Control inputs in the new coordinate system: In the presence of a transformed coordinate system and feedback control inputs: To sum up, the standard feedback linearization dynamic second-order integral model of an AUV could be reorganized as follows:

Formation Communication Topology
In the consistency control of the AUV formation, there are n AUVs among the formation members, and the communication relationship between the formations is represented as ( , , ) denotes its entry-degree matrix. ( ) d i is the number of AUVs that can transmit information to any single U in the formation AUV. If the AUV formation members can communicate in both directions, based on the principle of the graph theory, it is indicated that graph A is an undirected graph, as shown in Figure 2 [24].

Probabilistic Threat Environment
To represent the threats to AUVs in complex subsea environments, probabilistic threat environment maps are defined in this paper to model them. The probabilistic threat

Probabilistic Threat Environment
To represent the threats to AUVs in complex subsea environments, probabilistic threat environment maps are defined in this paper to model them. The probabilistic threat map is a function of location and describes the threat probability of the threat sources at different locations to which the AUV is exposed [25]. It is an environment that shows the distribution of threats in the environment in a probabilistic form. Each location coordinate corresponds to a probability density value as an indication of the risk of AUV exposure to a threat source at that coordinate point. The following is a description of the probabilistic threat environment function model encountered by AUVs in this paper.
In the course of AUV formation navigation, underwater terrain and obstacle threats are threats that need to be completely avoided in the path-planning process. In this case, such threats are equated into a circular domain, and the probability threat value at each point decreases as it increases with the center of the circle. Therefore, a two-dimensional Gaussian distribution function model can be used to model the threat. For a threat source modeled by a Gaussian distribution, two characteristic parameters are needed to represent the threat source [26]: one that indicates the mean parameter of the centroid of the modeled threat source as µ and one that indicates the variance value of the modeled threat area of action K i . The threat source modeled by a Gaussian distribution can be expressed as Suppose there are m suspicious locations in the region, the threat probability for any location r in the region can be expressed as a multidimensional Gaussian probability function: The probabilistic threat environment represented by a multidimensional Gaussian probability function can be shown in Figure 3.
such threats are equated into a circular domain, and the probability threat value at each point decreases as it increases with the center of the circle. Therefore, a two-dimensional Gaussian distribution function model can be used to model the threat. For a threat source modeled by a Gaussian distribution, two characteristic parameters are needed to represent the threat source [26]: one that indicates the mean parameter of the centroid of the modeled threat source as μ and one that indicates the variance value of the modeled threat area of action i K . The threat source modeled by a Gaussian distribution can be expressed as where Suppose there are m suspicious locations in the region, the threat probability for any location r in the region can be expressed as a multidimensional Gaussian probability function: The probabilistic threat environment represented by a multidimensional Gaussian probability function can be shown in Figure 3.

Auxiliary Potential Field Repulsion Field Design for Obstacles
The artificial potential field method is widely used in the scenario of local obstacle avoidance, which has the advantages of good real time and does not rely on global information [27]. However, it has disadvantages such as the overlapping potential fields of adjacent obstacles and the fact that it can easily fall into local minima. This will prevent the AUV from obtaining the optimal path. During the control of the AUV, the time for the AUV obstacle avoidance operation command is insufficient due to the missing longitudinal control of the AUV. Based on the shortcomings of the traditional artificial potential field method, we designed an obstacle-assisted potential field on the traditional artificial potential field method to avoid falling into local minima due to zero combined forces.
According to Figure 4, the obstacle reference point in the same plane as the AUV is defined as p t (t) = (x(t), y(t), z(t)). The coordinate of the target point is defined as x tar (x tar , y tar , z tar ). The current position of the AUV is denoted as p l (t) = [x l (t), y l (t), z l (t)].  Obstacle-assisted potential energy function 2 ( ( )) req t U p t is designed as where 2 (1 )  β indicates the rotation angle, which is related to the speed of the AUV itself and the relative angle of the obstacle. As shown in Figure 3, at this point The direction of the potential field force is a / 2 π clockwise rotation of the current bow of the AUV in the direction of velocity.
The potential energy function based on the auxiliary potential field yields the following gradient function: where the unit vector of the current velocity direction of the navigator is denoted as v  n .
The repulsion control input ( ) req t F is denoted as The repulsive force generated by the obstacle point on the AUV is F o1 (t). The repulsive force generated by the auxiliary potential field on the AUV is F o2 (t). The attraction of the target point to the AUV is F att (t). The coordination control within the AUV is F in (t).
In a probabilistic threat environment, the probabilistic threat value of the obstacle also affects the potential energy function of the AUV. The potential energy function varies with the transformation of the probabilistic threat value at the current location. With a time-varying distance vector, the potential energy function at the current position of the AUV at the current time can be expressed as The potential energy function with reference to the barrier point: where γ denotes the potential energy function coefficient, K i is the diagonal matrix indicating the threat intensity at the obstacle reference point, l = |p l (t) − p t (t)| is expressed as the distance between the AUV and the obstacle reference point, and d is the radius of the potential field action. The potential energy function based on the reference barrier point yields the following gradient function: In order to prevent the AUV from falling into a local optimal solution, the artificial potential field method is improved here by constructing an obstacle-assisted potential field [28]. As shown in Figure 5, the direction of the potential field force of the auxiliary obstacle is perpendicular to the direction of travel of the AUV. The angle formed with the AUV is θ 1 .  Obstacle-assisted potential energy function 2 ( ( )) req t U p t is designed as where 2 (1 ) The potential energy function based on the auxiliary potential field yields the following gradient function: (29) where the unit vector of the current velocity direction of the navigator is denoted as v  n .
The repulsion control input ( ) req t F is denoted as Figure 5. Based on obstacle-assisted potential field artificial potential field method.
Obstacle-assisted potential energy function U req2 (p t (t)) is designed as where g v = k 2 o (1 + r n ) is the random adjustment gain of the auxiliary potential field function. k 2 o is the gain adjustment factor. 0 ≤ r n ≤ 1; r n indicates a random number between 0 and 1.
T is expressed as the potential field transformation β indicates the rotation angle, which is related to the speed of the AUV itself and the relative angle of the obstacle. As shown in Figure 3, at this point 0 < θ 1 − θ 2 < π/2. The direction of the potential field force is a π/2 clockwise rotation of the current bow of the AUV in the direction of velocity.
The potential energy function based on the auxiliary potential field yields the following gradient function: where the unit vector of the current velocity direction of the navigator is denoted as

Gravitational Field Design for Target Points
Based on the artificial potential field method, it is known that the target point will exert a gravitational effect on the AUV formation, and the potential energy function of the target point on the current AUV is denoted as where λ, κ denotes the positive coefficient of the potential energy function.
∇U att (p l (t)) = ∂U att (p l (t)) ∂ρ → n att (32) where → n att is the unit vector from the navigator to the target point: Gravity control input F att (t) is denoted as The potential energy gradient function of the target point can be regarded as a constant value because the target point is at a location far from the AUV, and the potential energy gradient function of the target point remains essentially constant.

Coordination and Control within the Formation
In order to ensure the overall robustness of the formation, it should be less likely to have obvious formation changes due to the disturbance of the external environment and obstacle avoidance behavior, the risk of AUVs colliding with each other within the formation should be reduced, it should be ensured that the AUVs can converge stably, based on the communication structure in the formation AUVs, and the coordination control force within the formation should be based on the position and velocity state information of each AUV [29].
where K in and ω denote the control gain of the formation coordination control input. a ij (t) and b ij (t) are the communication weights within the system. K p and K v denote the control gains in the position and velocity communication topologies, respectively. Based on the forces on the AUV in the potential field, the control input F(t) to the AUV can be expressed as

Algorithm Flow of Cooperative Obstacle Avoidance
The AUV formation is controlled by the formation clustering algorithm to complete the overall movement of the formation before the threat is perceived [30]. When a threatening obstacle is encountered, the above-mentioned obstacle avoidance algorithm is used to successfully avoid the high-threat obstacle by multi-beam sonar sensing, and the improved artificial potential field algorithm is used to return to the cluster formation control after removing the obstacle.
Based on (21), the second-order integral model of an AUV is denoted as The actual position and velocity state information during the AUV voyage can be expressed as D i (x) = [x i (t), v i (t)] T . The desired time-varying formation state is expressed The pre-command generates the initial desired formation, and the desired formation is modified by the modified artificial potential field method above when the AUV cluster system senses an obstacle. The corrected desired formation is denoted as The consistency protocol at this point is denoted as where K 1 = K in K p , K 2 = K in K v , and w ij indicates the coefficient of the effect of the current position on its motion state. The AUV formation cooperative obstacle avoidance algorithm flow is shown in Figure 6. The obstacle avoidance algorithm in this paper adopts the strategy of disbanding the formation and reconfiguring the formation to solve the control problem of the cluster before and after obstacle avoidance; that is, the AUV formation is controlled by the cluster formation algorithm to complete the control of the whole formation movement behavior when it does not encounter an obstacle; the AUV switches to the obstacle avoidance algorithm when it encounters an obstacle, and the AUV relies on its own sensor data and the artificial potential field algorithm to complete obstacle avoidance. After the AUV formation leaves the obstacle terrain, it returns to the cluster formation control and continues to perform operational tasks.

Stability Analysis
The different potential field effects due to the obstacle space produce different directional forces in the formation system. It causes the AUV to produce obstacle avoidance routes in different directions [31]. In this paper, the AUV formation system will form two small subsystems. The total number of AUVs in the two subsystems is m . The number of AUVs in the two subsystems is 1 m and 2 m , respectively, and 1 2 m m m + = . The stability of the system can be proven by constructing an energy function. The energy functions of the two systems are defined as 1 ( ( ), ( )) W V t X t and 2 ( ( ), ( )) W V t X t , respectively. ( ) V t is denoted as the velocity energy function, ( ) X t is denoted as the posi-

Stability Analysis
The different potential field effects due to the obstacle space produce different directional forces in the formation system. It causes the AUV to produce obstacle avoidance routes in different directions [31]. In this paper, the AUV formation system will form two small subsystems. The total number of AUVs in the two subsystems is m. The number of AUVs in the two subsystems is m 1 and m 2 , respectively, and m 1 + m 2 = m.
The stability of the system can be proven by constructing an energy function. The energy functions of the two systems are defined as W 1 (V(t), X(t)) and W 2 (V(t), X(t)), respectively. V(t) is denoted as the velocity energy function, X(t) is denoted as the position energy primary function, and η(V(t)) is denoted as the sum of the energies of the subsystem potential fields.
The two subsystems are similar in the formation process and the stability proof process. In this section, only one subsystem stability proof is carried out, and the conclusion is given. Theorem 1. The initial energy function of the system includes the velocity energy function, the position energy function and the sum of the energy of the potential field. Then, the initial energy function A of the system is bounded, and then the formation can be transformed by autonomous formation, and the following conclusion holds: in the process of formation avoidance, the splitting transformation of the formation is generated, and the subsystem always keeps converging.
Proof. The subsystem energy function is derived as follows: .
Since v i (t) and x i (t) are column vectors of the same dimension, there exists The derivative of the total potential energy function of the subsystem can be obtained from its definition.
According to the properties of the Laplacian matrix, it must be a vivacious semidefinite matrix. From this, it can be deduced that the formation must be able to converge stably.

Simulation Verification and Analysis
The following simulation example verifies the effectiveness of the research on the multi-AUV coordinated obstacle avoidance method based on the improved artificial potential field method and the consistency protocol algorithm. Since this paper conducts the study of the local obstacle avoidance problem of AUV formation, only local threat environment modeling is performed when designing the environment.
The simulation considers four AUV formation systems that can communicate with each other, and its communication topology is shown in Figure 2. Then, its Laplace matrix is The initial position status information of each AUV is x i ∈ [0, 50], y i ∈ [0, 140], and i ∈ {1, 2, 3, 4}. The initial velocity of the AUV is 0. Probabilistic threat intensity diagonal matrix K i is 0.002I 3×3 . Potential field coefficient γ = 1, κ = 0.1, λ = 1. Obstacles are randomly distributed in the map. The target points for the cooperative operation of the AUV formation are [300, y i , −5]. After reaching consistency, the distance between the formation AUVs is maintained at 10 m. Figure 7 gives the paths of the formation AUVs in the process of coordinated obstacle avoidance. The formation AUVs feel different threat levels and decelerate differently after entering the potential field area, but each keeps a relative distance between the formations, and no collision behavior occurs, and finally, the formation achieves consistency according to the consistency protocol. Figures 8-10 show the changes in position attitude and each velocity state during the formation dissolution, formation coordinated obstacle avoidance process and formation reconfiguration process of multi-AUVs in the face of obstacles, respectively. From Figure 8, it can be seen that the spatial position relationship of the AUV formation in the formation system can still converge after passing through the potential field region and generating the separation of obstacle avoidance actions. In Figures 9 and 10, the motion states of each AUV show a similar converge-separate-converge pattern as the potential field appears.   Figure  8, it can be seen that the spatial position relationship of the AUV formation in the formation system can still converge after passing through the potential field region and generating the separation of obstacle avoidance actions. In Figures 9 and 10, the motion states of each AUV show a similar converge-separate-converge pattern as the potential field appears.    Figures 8-10 show the changes in position attitude and each velocity state during the formation dissolution, formation coordinated obstacle avoidance process and formation reconfiguration process of multi-AUVs in the face of obstacles, respectively. From Figure  8, it can be seen that the spatial position relationship of the AUV formation in the formation system can still converge after passing through the potential field region and generating the separation of obstacle avoidance actions. In Figures 9 and 10, the motion states of each AUV show a similar converge-separate-converge pattern as the potential field appears.    Based on the comprehensive simulation results above, it can be judged that the algorithm based on the improved artificial potential field method and consistency protocol proposed in this chapter can effectively solve the problem of multi-AUV coordinated obstacle avoidance and ensure the convergence and stability of the formation while ensuring the formation avoidance of obstacles and formation change.

Discussion
The improved artificial potential field method presented in this paper is partially applicable to the obstacle avoidance control of a single AUV when the virtual gravitational force Fin(t) among the formation members is neglected. When the AUV formation faces multiple obstacles, different coverage circle domains can be constructed separately for the obstacles, and there may be an overlap of exclusion regions between the obstacles. In this way, the path of the formation is not optimal because the submersible cannot enter the w (m Based on the comprehensive simulation results above, it can be judged that the algorithm based on the improved artificial potential field method and consistency protocol proposed in this chapter can effectively solve the problem of multi-AUV coordinated obstacle avoidance and ensure the convergence and stability of the formation while ensuring the formation avoidance of obstacles and formation change.

Discussion
The improved artificial potential field method presented in this paper is partially applicable to the obstacle avoidance control of a single AUV when the virtual gravitational force F in (t) among the formation members is neglected. When the AUV formation faces multiple obstacles, different coverage circle domains can be constructed separately for the obstacles, and there may be an overlap of exclusion regions between the obstacles. In this way, the path of the formation is not optimal because the submersible cannot enter the region. Therefore, for the AUV formation path optimization problem in a complex obstacle environment, relevant algorithms for the real-time dynamic obstacle avoidance and path optimization of the submersible formation can be constructed in the future by combining the construction of a local path optimization algorithm with the improved artificial potential field method introduced above.

Conclusions
For the local obstacle avoidance problem of AUV formations, we proposed a cooperative obstacle avoidance algorithm based on an improved artificial potential field method and a consistency protocol. Firstly, for the disadvantage that the traditional artificial potential field method can easily fall into local minima, an auxiliary potential field perpendicular to the AUV moving direction was designed to solve the problem that AUVs can easily have zero combined force in the potential field and local minima. Secondly, for the problem that the formation will change during local obstacle avoidance, an AUV formation control method that keeps the speed and position consistent was designed. The control conflict problem of the combined algorithm of the artificial potential field law and the consistency protocol was solved by adjusting the desired formation of the consistency protocol through the potential field force. Finally, the stability of system convergence was demonstrated by a bounded energy function. We verified by simulation that the AUV formation can achieve convergence of the formation state in the case of the local obstacle avoidance method proposed in the paper. The effectiveness of the proposed algorithm is confirmed.
Author Contributions: Conceptualization, writing-review and editing, supervision, project administration, H.Y.; conceptualization, software, writing-original draft, writing-review and editing, visualization, L.N. All authors have read and agreed to the published version of the manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.