Next Article in Journal
Investigation of Microwave Electromagnetic Fields in Open and Shielded Areas and Their Possible Effects on Biological Structure
Next Article in Special Issue
Underwater Rescue Target Detection Based on Acoustic Images
Previous Article in Journal
Proposal of Mapping Digital Twins Definition Language to Open Platform Communications Unified Architecture
Previous Article in Special Issue
An Underwater Human–Robot Interaction Using a Visual–Textual Model for Autonomous Underwater Vehicles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Trajectory Planning of Autonomous Underwater Vehicles Based on Gauss Pseudospectral Method

1
Logistics Engineering College, Shanghai Maritime University, Shanghai 201306, China
2
School of Mechanical Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(4), 2350; https://doi.org/10.3390/s23042350
Submission received: 31 January 2023 / Revised: 15 February 2023 / Accepted: 18 February 2023 / Published: 20 February 2023
(This article belongs to the Special Issue Sensors, Modeling and Control for Intelligent Marine Robots)

Abstract

:
This paper aims to address the obstacle avoidance problem of autonomous underwater vehicles (AUVs) in complex environments by proposing a trajectory planning method based on the Gauss pseudospectral method (GPM). According to the kinematics and dynamics constraints, and the obstacle avoidance requirement in AUV navigation, a multi-constraint trajectory planning model is established. The model takes energy consumption and sailing time as optimization objectives. The optimal control problem is transformed into a nonlinear programming problem by the GPM. The trajectory satisfying the optimization objective can be obtained by solving the problem with a sequential quadratic programming (SQP) algorithm. For the optimization of calculation parameters, the cubic spline interpolation method is proposed to generate initial value. Finally, through comparison with the linear fitting method, the rapidity of the solution of the cubic spline interpolation method is verified. The simulation results show that the cubic spline interpolation method improves the operation performance by 49.35% compared with the linear fitting method, which verifies the effectiveness of the cubic spline interpolation method in solving the optimal control problem.

1. Introduction

With the increasing attention to marine resources, underwater exploration and development technology have become hotspots in marine research in various countries. The autonomous underwater vehicle (AUV) has become an important tool for marine resources development due to its strong autonomy and controllability, low operational risk, economic advantages and other performance characteristics [1]. In a complex and limited marine environment, an AUV should avoid obstacles by moving forward and backward, traversing, floating and sinking, while completing tasks such as maintenance [2], underwater search [3] and detection [4]. As it is difficult for an AUV to supplement energy in the process of performing tasks, it is of great practical significance to find an optimal trajectory with low energy consumption and autonomous obstacle avoidance capability.
The trajectory planning problem is also called the trajectory optimization problem. It is essentially a nonlinear optimal control problem, which satisfies state constraints, control constraints and path constraints. According to the given starting point and destination, a trajectory is planned that satisfies the task requirements in time and space [5]. At present, most of the research results of motion trajectory planning theory originate from the fields of aircraft [6], industrial robots [7], unmanned aerial vehicles [8] and autonomous vehicles [9], while research on trajectory planning in the field of AUVs is still in the initial exploration stage. Trajectory optimization is usually solved in two steps: trajectory optimization model transformation and parameter optimization.
The main methods of trajectory optimization model transformation are the indirect and the direct methods [10]. The indirect methods solve the optimal control problem using the maximum principle. Although their calculation accuracy is high, there are some problems, such as the cumbersome derivation of the optimal solution and the difficult estimation of the covariant initial values. The process of computing problems with complex constraints is very difficult, and no relevant research has been found in the field of AUV trajectory planning. The direct methods have received wide attention. Among these methods, the pseudospectral method has been the hotspot of trajectory planning research in recent years [11]. There are three main types of traditional pseudospectral methods: the Legendre pseudospectral method (LPM), the Gauss pseudospectral method (GPM) and the Radau pseudospectral method (RPM). The differences lie in the selection and configuration of the collocation points, which affect the accuracy of the optimal solution, the convergence speed and the calculation efficiency [12]. In [13], a solution strategy based on the GPM was presented to optimize the fuel-efficient winglet retractable climb trajectory for near-space variable-wing aircraft. In [14], a multi-objective excavation trajectory optimization framework based on the RPM is proposed for the trajectory planning of the unmanned electric shovel in autonomous mining scenarios. In [15], the trajectory optimization problem is numerically solved via a hp-pseudospectral sequential convex programming method, which iteratively solves a sequence of second-order cone programming subproblems until convergence is attained. The hp-adaptive pseudospectral method combines the finite element method with the traditional pseudospectral method. It can adjust the position and the number of discrete points adaptively, and has a high solving accuracy and speed [16]. In [17], the hp-adaptive pseudospectral method was applied to the unmanned aerial vehicle trajectory planning and the minimum fuel consumption and minimum climb time obtained were optimized. However, in the field of trajectory planning of underwater vehicles, most of the existing methods do not take into account the dynamic characteristics and constraints of the controlled object in trajectory planning, which makes it difficult to track the planned trajectory and to achieve real optimization.
For parameter optimization problems, common methods include the sequential quadratic programming (SQP) algorithm, the dynamic programming algorithm, Pontragin’s method, etc. At present, the SQP algorithm is usually used to solve nonlinear programming problems [18]. Pontryagin’s method allows for control based on the comparison of the current attitude to a time-varying desired attitude, allowing for much better use of control effort and command over slew orientation [19]. In [20], where the simulation was compiled using both sinusoidal and Pontryagin trajectories, Pontryagin’s method produced an autonomous trajectory that was more optimal than the sinusoidal autonomous trajectory. The Gauss Pseudospectral Optimization Software (GPOPS), which is based on the quadratic programming algorithm, is the most widely used toolbox for the optimization of trajectory parameters [21]. In [22], the MATLAB software package Sparse Nonlinear Optimizer (SNOPT) was used to solve the nonlinear programming problem. However, in the process of parameter optimization, the existing research focuses more on the accuracy of motion trajectory solutions. Because the position and constraint conditions of an AUV are dynamic, it requires that the AUV trajectory planning must be a rolling optimization method based on time windows, and its parameter optimization must have a rapid solution speed.
With the aim of addressing the above problems, combined with the working characteristics of AUVs, a multi-constraint trajectory optimization model is constructed and solved. The main work of this paper is as follows:
(1)
The motion model and the obstacle model are established, in which low energy consumption and short time are considered as the joint optimization objectives. The GPM and SQP are used to optimize the obstacle avoidance trajectory of AUVs, and the trajectory satisfying the optimization objectives and constraints is obtained.
(2)
Considering the dynamic characteristics of AUVs in the complex underwater environments, the mathematical model of AUV trajectory planning is improved by introducing dynamic constraints. The navigation trajectory obtained by the solution is more in line with the actual requirements and has better traceability.
(3)
When solving the trajectory planning problem based on the GPM, cubic spline interpolation is used to generate the initial values of variables. The search cost is reduced, the calculation speed is increased, the motion trajectory obtained by solving is smoother and the fitting effect is better.
The main structure of this paper is as follows: In Section 2, the trajectory planning problem of AUVs is introduced, and the motion model, the obstacle constraint model, the energy consumption and sailing time optimization model of AUVs are established. The trajectory optimization problem of AUVs is described by a mathematical model. In Section 3, the principle and process of the GPM and the SQP algorithm used to solve the trajectory planning problem are introduced. The initial value is generated by cubic spline interpolation and the optimal solution of the trajectory planning problem is obtained by iterative calculation. In Section 4, a motion trajectory satisfying the optimization objective and multiple constraints is obtained through simulation. The effectiveness of the proposed method for the trajectory planning is verified. Section 5 summarizes the research conclusions of this paper.

2. Problem Description

The trajectory planning problem of autonomous underwater vehicles (AUVs) in this paper can be described as follows: under the condition that the motion constraints and obstacle avoidance constraints are satisfied, finding the appropriate control amount, so that the AUV has the lowest energy consumption and the shortest sailing time when it reaches the target point. In contrast with path planning, the mathematical model of trajectory planning is generally expressed as a function related to time. Moreover, when the Gauss pseudospectral method (GPM) is used to solve the optimal control problem, the functions and equations describing the trajectory planning problem must be continuous and differentiable. Therefore, the motion constraints and obstacle constraints in the trajectory planning model need to meet the continuously differentiable conditions.

2.1. Motion Model of Underwater Robot

Under water, the motion of an AUV is generally 6 degrees of freedom, which can be decoupled into horizontal and vertical plane motion. This paper only discusses the horizontal motion of an AUV. An AUV’s mathematical model mainly includes the kinematics model and the dynamics model. The kinematics model mainly describes the relationship between the position, velocity, acceleration and time. The dynamic model mainly describes the motion characteristics of an AUV according to its mass and force.
If the rolling and pitching motions of the AUV are ignored, the kinematic model of the AUV in the horizontal motion plane can be expressed as follows:
x ˙ = u cos ψ v sin ψ , y ˙ = u sin ψ + v cos ψ , ψ ˙ = r .
where x, y and ψ represent the position and the direction angle of an AUV in a fixed coordinate system, and u, v and r represent the velocity and the angular velocity of an AUV in a moving coordinate system.
An AUV is mainly subject to thrust, self-gravity and buoyancy when moving underwater. The dynamic equations of an AUV in the horizontal motion plane are expressed as follows [23]:
m u u ˙ = m v v r d u u + T u , m u v ˙ = m u u r d v v + T v , m r r ˙ = m uv u v d r r + T r .
m u = m X u ˙ , m v = m Y v ˙ , m r = I z N r ˙ , m uv = m u m v , d u = X u X u u u , d v = Y v Y v v v , d r = N r N r r r .
where m is the mass of the AUV; I z is the moment of inertia; ( u , v , r ) T is the velocity vector; X(·), Y(·) and N(·) are the hydrodynamic coefficients; and T = ( T u , T v , T r ) T is the system input consisting of thrust and thrust torque.

2.2. Obstacle Constraint Model

Considering the complexity of entity modelling and the real-time computing ability of a computer, the underwater dangerous area and obstacle models are abstracted into several simple geometric figures in this study. As mentioned earlier, the function used to describe obstacles in trajectory planning must be continuous. Therefore, the function of approximate shape is used to define obstacles. At present, most of the mathematical models describing obstacles use the P criterion method. This method can conveniently represent circles, rectangles, squares, etc. [24]. Although p = 2 can be used to describe spherical or cylindrical obstacles, a larger p value should be selected in practical application to make the obstacle description more accurate. However, an excessive p value will increase computational cost, and the solution of complex dynamic equations may be not convergent [25]. In this paper, p = 2 is selected to represent the shape of obstacles with circular or elliptical envelopes.
The position relationship between the trajectory points of the AUV and the obstacle can be expressed as follows:
h i = x t x i a 2 + y t y i b 2 1 , i = 1 , , n
where (x(t), y(t)) represent the trajectory coordinates of the AUV, and (xi, yi) represent the center position of the i-th obstacle. The radius of the obstacle in both directions is defined by a and b. Changing a and b can adjust the size of the obstacle.
Any point (x, y) that makes h = 0 is on the boundary of the obstacle. When planning the obstacle avoidance trajectory of the AUV, the point (x, y) must be outside the obstacle to ensure that h > 0.

2.3. Energy Consumption and Sailing Time Optimization Model

When performing tasks, an AUV carries limited energy. To ensure the safe recovery of an AUV, energy consumption must be considered. The structural design, sailing time, sailing distance and propeller affect energy consumption, and establishing an appropriate energy consumption model is essential to achieve energy consumption optimization. The working area of an AUV is continuously changing, and the sailing speed also changes with time, so the model can be solved in the form of an integral. Another optimization objective in the trajectory planning problem is the sailing time. In numerical analysis and calculation, the position, attitude, velocity and acceleration of an AUV can be expressed as a function or equation of sailing time.
The goal of trajectory planning in this paper is to realize the joint optimization of energy consumption and sailing time, and to calculate the trajectory of an AUV reaching the destination with the lowest energy consumption and the shortest sailing time. In order to achieve the dynamic balance of the two types of objectives, weight coefficients ω1 and ω2 are introduced, and the weighted coefficient method is used to construct the joint optimization objective function as follows:
J = ω 1 t f + ω 2 0 t f T u 2 + T v 2 + T r 2 d t
where ω1 + ω2 = 1 and tf represent the terminal time of navigation, and T u , T v , T r represent the thrust and torque generated by the propeller.
To meet the navigation planning of different requirements, the weight coefficients ω1 and ω2 of the energy consumption and navigation time should be adjusted according to the actual situation. When ω1 = 1 or ω2 = 1, the trajectory planning achieves the single objective of the shortest sailing time or the lowest energy consumption, respectively.

3. Motion Trajectory Planning

The Gauss pseudospectral method (GPM) studied in this paper is a kind of collocation method, which uses a global interpolation polynomial to approximate the trajectory of state variables and control variables on a series of Legendre-Gauss (LG) points. Compared with the general collocation method, the GPM can obtain higher solution accuracy and faster convergence speed with fewer nodes when solving optimal control problems [26]. Trajectory planning based on the GPM mainly includes two parts: optimal control problem transformation and nonlinear programming problem solving.

3.1. Transformation of Optimal Control Problem

The direct method to solve the trajectory planning problem is to transform it into a nonlinear programming (NLP) problem through discretization [27]. Because the collocation points of the GPM are all distributed on the interval [−1,1], the time variable τ [−1,1] is introduced. The interval t [ t 0 , t f ] is discretized to [−1,1] and the transformation form is represented as follows:
τ = 2 t t f t 0 t f + t 0 t f t 0
N LG points and the initial time τ 0 = 1 are selected as the collocation points and the state variables are approximated by N + 1 degree Lagrange interpolation polynomials.
x τ X τ = i = 0 N L i τ x τ i
where the interpolation basis function L i τ i = 0 , 1 , 2 , , N is defined as follows:
L i τ = j = 0 , j i N τ τ j τ i τ j
The control variable is approximated by the N degree Lagrange interpolation polynomial.
u τ U τ = i = 1 N L i ˜ τ U τ i
where the interpolation basis function L i ¯ τ i = 1 , 2 , , N is defined as follows:
L i τ = j = 1 , j i N τ τ j τ i τ j
Differentiating Equation (7), x ˙ τ k can be obtained as follows:
x ˙ τ k X ˙ τ = i = 0 N L i ˙ τ k X τ i = i = 0 N D k i X τ i
The differential of the Lagrange polynomial at the LG points can be determined by off-line calculation of the differential approximation matrix D R N × N + 1 .
The state variables on each LG point are represented as X 1 N , X 2 N , X 3 N , X 4 N , X 5 N , X 6 N R N , where X1N, X2N, X3N represent the position (x, y) and heading angle ψ of AUV, respectively, and X4N, X5N, X6N represent velocity (u, v) and angular velocity r, respectively. The control variables are represented as U1N, U2N and U3N. The dynamic constraints of the optimal control problem are transformed into algebraic constraints through the differential approximation matrix, and the integral form of the state equation is obtained as follows:
D X 1 N = t f t 0 2 X 4 N cos X 3 N X 5 N sin X 3 N D X 2 N = t f t 0 2 X 4 N sin X 3 N + X 5 N cos X 3 N D X 3 N = t f t 0 2 X 6 N D X 4 N = t f t 0 2 m v X 5 N X 6 N d u X 4 N + U 1 N / m u D X 5 N = t f t 0 2 m u X 4 N X 6 N d v X 5 N + U 2 N / m u D X 6 N = t f t 0 2 m uv X 4 N X 5 N d r X 6 N + U 3 N / m r
The terminal state X f is approximated by the Gauss integral in discretization.
X f = X 0 + t f t 0 2 k = 1 N ω k f X τ k , U τ k , τ k , t 0 , t f
where τ k 1 , 2 , , N is the LG point and ω k = 1 1 L i τ d τ is the Gauss weight.
The obstacle constraint is expressed as follows:
X 1 N i x i a 2 + X 2 N i y i b 2 1 0
The performance index function obtained by the Gauss integral approximation is expressed as follows:
J = ω 1 t f + t f t 0 2 ω 2 k = 1 N ω k T u 2 + T v 2 + T r 2
So far, the GPM has transformed the optimal control problem into an algebraically constrained nonlinear programming problem through discretization.

3.2. Rapid Solution Method of Trajectory

Based on the above numerical approximation method, the continuous optimal control trajectory planning problem is discretized and transformed into a nonlinear programming problem, whose solution is an approximate solution of the continuous Bolza problem. The nonlinear programming problem can be solved by SQP, which essentially transforms the nonlinear optimization problem into a series of quadratic programming sub-problems.
According to Equations (12)–(15), the transformed NLP constraint problem is described as follows:
min J = ω 1 t f + t f t 0 2 ω 2 k = 1 N ω k T u 2 + T v 2 + T r 2 s . t .   D X 1 N t f t 0 2 X 4 N cos X 3 N X 5 N sin X 3 N = 0 D X 2 N t f t 0 2 X 4 N sin X 3 N + X 5 N cos X 3 N = 0 D X 3 N t f t 0 2 X 6 N = 0 D X 4 N t f t 0 2 m v X 5 N X 6 N d u X 4 N + U 1 N / m u = 0 D X 5 N t f t 0 2 m u X 4 N X 6 N d v X 5 N + U 2 N / m u = 0 D X 6 N t f t 0 2 m uv X 4 N X 5 N d r X 6 N + U 3 N / m r = 0 X f X 0 + t f t 0 2 k = 1 N ω k f X τ k , U τ k , τ k , t 0 , t f = 0 X 1 N i x i a 2 + X 2 N i y i b 2 1 0
Taylor expansion is used to simplify the nonlinear constraint problem into a linear function, and the following quadratic programming problem is obtained as follows:
min 1 2 d k T B k d k + J T d k s . t . C e x T d k + C e x = 0 C i x T d k + C i x = 0
where C e , C i represent the equality constraints and inequality constraints in Equation (16), respectively.
The search direction is obtained by solving Equation (17), and the iterative equation is calculated step by step to obtain the optimal solution to the original problem.
When solving based on the GPM, the selection of the initial value is very important for the real-time or fast calculation of optimization problems. A prerequisite for real-time or fast optimization is an efficient initial value generation algorithm. Random initial values or initial values without any processing will increase the computational cost. If the calculation is performed with poor quality initial values, then the optimization problem may not converge to a feasible solution.
For discrete points between the start and target points, a simple way to obtain values is linear fitting. A straight line connects the discrete points, and the initial value is obtained by taking values with equal intervals in the interval. Because the linear fitting function is not smooth enough, the solution calculation speed is slow when the initial value is substituted into the trajectory planning problem, and the resulting navigation trajectory is more complicated. Therefore, the cubic spline interpolation method is considered to calculate the initial value of variables. The variable value [X0, Xf] from the initial state to the terminal state is divided into n intervals [ ( x 0 , x 1 ) , ( x 1 , x 2 ) , , ( x n 1 , x n ) ] , with a total of n + 1 points, where x 0 = X 0 , x n = X f . In the interval, the constructed cubic spline function is defined as follows:
S i x = a i + b i x + c i x 2 + d i x 3 i = 0 , , n
It can be seen from Equation (18) that each interval has four unknowns, and the cubic spline equation of each interval satisfies the following conditions:
S ( x i ) = y i S i ( x i + 1 ) = y i + 1 S i + 1 ( x i + 1 ) = y i + 1 S i ( x i + 1 ) = S i + 1 ( x i + 1 ) S i ( x i + 1 ) = S i + 1 ( x i + 1 ) S ( x 0 ) = S ( x n ) = 0
The spline coefficients a i , b i , c i , d i are solved by Equation (19), and the cubic spline function in each interval is obtained after substituting a i , b i , c i , d i into S i ( x ) . The values at the LG points are taken as the initial values for solving the trajectory planning problem. By introducing the cubic spline interpolation method, the fitted curve trajectory is smoother and more realistic, and the initial value of the interpolation calculation can improve the solution speed of the optimization problem.

4. Simulation Analysis

In order to verify the effectiveness of the above trajectory planning algorithm, this paper conducts an optimization simulation for the joint objective of low energy consumption and short sailing time. The starting state of the autonomous underwater vehicle (AUV) is set to X 0 = 0 , 0 , π / 3 , 0 , 0 , 0 and the target state is set to X f = 25 , 25 , π / 6 , 0 , 0 , 0 . The constraints of state variables and control variables during sailing are expressed as follows:
0   m x t 30   m 0   m y t 30   m π ψ ( t ) π 1   m / s u t 1   m / s 1   m / s v t 1   m / s π / 6   rad / s r t π / 6   rad / s
53   N m τ u 74   N m 53   N m τ v 74   N m 53   N m τ r 74   N m
The relevant parameters in the kinetic constraints are shown in Table 1.
The obstacle parameters in the navigation environment are shown in Table 2, and there are four obstacles in total.
In the above simulation environment, 50 LG points are selected to discretize the model and then an SQP algorithm is used to solve the problem.
Scenario 1: The shortest sailing time is set as the objective function. The cubic spline interpolation method is used to calculate the initial value for the solution. After the simulation calculation, the navigation trajectory of the AUV and the change trend of the control variables and state variables are obtained as shown in Figure 1. The whole simulation calculation takes 16.581 seconds.
In Figure 1a, the planned trajectory can complete the navigation from the starting point to the destination and avoid collision with obstacles. Due to the requirement of the objective function of the shortest sailing time, the AUV’s navigation path tends to be smooth. The sailing time is 73.002 seconds. In Figure 1b, under the condition of meeting the requirements of the AUV’s own thrust and torque, the thrust Tu in the control variable is always in the upper limit during the whole navigation process. In Figure 1c, within the limit of speed, the power generated by thrust and torque forces the AUV to sail at the upper limit of speed. Thus, the AUV can reach the destination with the shortest sailing time.
Scenario 2: Similarly to scenario 1, the shortest sailing time is still set as the objective function. However, the difference is that the initial value is generated by linear fitting that takes values at equal intervals between the start point and the end point. After substituting the initial value for calculation, the convergence solution of the optimal control problem can be obtained. The obtained trajectory is shown in Figure 2. The whole simulation calculation takes 24.763 seconds.
Figure 2a shows that the AUV can achieve obstacle avoidance navigation. The whole navigation path is generally smooth, but after bypassing the last obstacle, the AUV’s course deviates. The sailing time is 70.713 seconds. In Figure 2b, the change trend of Tu in the control variables is generally smooth. Within the limits of thrust, the AUV is driven to sail with the upper limit of thrust. The values of control variables Tv and Tr have obvious fluctuations, which affected the speed change of the AUV. During the whole voyage, the speed fluctuates frequently, as shown in Figure 2c.
By comparing the simulation results of scenario 1 and scenario 2, it can be concluded that the initial values generated by the cubic spline interpolation method and the linear fitting method, respectively, can be used to find the convergent solution. The trajectory planned from the starting point to the target point can avoid collision with obstacles, and the control variables can be optimized within the range of variable constraints. However, the average values of control variables and the average values of the speed of the two methods are significantly different, as shown in Figure 3.
In Figure 3a, the thrust Tu in the linear fitting method is 21.769 N higher than that in the cubic spline interpolation method. In Figure 3b, the change of thrust makes the speed Vy in the linear fitting method 0.147 m/s higher than that in the cubic spline interpolation method. In the case of similar sailing time, the thrust and speed calculated by the cubic spline interpolation method can reduce energy consumption and optimize the control variable value.
Under the same simulation environment, the calculation time of the initial value obtained by the cubic spline interpolation method is shorter than that of the initial value obtained by taking the values at equal intervals. The solution time of the optimal control problem is reduced from 24.763 s to 16.581 s, and the calculation speed is increased by 49.35%. The calculation results meet certain accuracy requirements, which can verify the validity and applicability of the GPM in trajectory planning applications, with the initial value obtained by the cubic spline interpolation method.
Scenario 3: Short time taken and low energy consumption are considered as the joint optimization objectives, and the cubic spline interpolation method is used to generate the initial value. The motion trajectory obtained after solving is shown in Figure 4. The whole simulation calculation takes 16.427 s.
The navigation trajectory in Figure 4a shows that the solved motion trajectory is smoother with the joint objectives of short time taken and low energy consumption than that in scenario 1 and scenario 2. The whole sailing distance is shorter. After bypassing the obstacles, the AUV sailed almost in a straight line. In Figure 4b, the control variable Tu is stable at about 15 N. The sailing time is 199.305 s. It can be seen that the reduction in energy consumption is at the expense of increased sailing time.
By comparing scenario 1 and scenario 3, it can be seen that the calculation results of the optimal control quantity are different with different set objective functions, as shown in Figure 5. When the AUV is required to reduce energy consumption, the average value of the control variable Tu is only 14.291 N from the starting point to the destination, and the total distance is the shortest in these three cases. The calculation times of scenario 1 and scenario 3 are similar, which also proves that the initial value generated by the cubic spline interpolation method can improve the speed of solving the optimal control problem.
From the above simulation results, it can be concluded that these two methods of generating initial values can quickly calculate the motion trajectory and the values of the optimal control variables. Under different objective function scenarios, the obtained trajectories can meet the requirements of obstacle avoidance. In the same simulation environment, the solution speed of the cubic spline interpolation method is faster than that of the linear fitting method. When the objective function is changed and the cubic spline interpolation method is used simultaneously, the thrust distribution results are significantly different. When only focusing on the goal of sailing time, the propeller drives the AUV to sail with the upper limit of thrust to ensure that it reaches the destination in the shortest time.

5. Conclusions

In this paper, the problem of autonomous underwater vehicles (AUVs) motion trajectory planning based on the GPM is studied, and low energy consumption and short sailing time are considered as joint optimization objectives. At the same time, dynamic constraints are added to the model to make the planned trajectory more reasonable and more trackable. The optimal solution of the control variables can be obtained after solving the trajectory optimization problem. The planned trajectory of the AUV can meet the requirements of obstacle avoidance. The model can be solved according to different objective functions, and the value of control variables can be adjusted to meet the actual requirements of underwater navigation.
In the process of parameter optimization, the selection of the initial value affects the speed of solving the optimal control problem. The linear fitting method and the cubic spline interpolation method are proposed to calculate the initial value. The simulation results show that the calculation time of the cubic spline interpolation method is less than that of the linear fitting method under the same simulation environment. Compared with the linear fitting method, the cubic spline interpolation method reduces the global calculation amount of the trajectory optimization problem and improves the computational performance by 49.35%. Moreover, the trajectory calculated by the cubic spline interpolation method is smoother and the control variable value is more stable.
As a rapid solution for the optimal control problem, the simulation results verify the effectiveness of the initial value generated by the cubic spline interpolation method, which provides a useful reference for the real-time planning of a trajectory. In future work, in accordance with the rapidity of the solution of this model, we will embed this model into the AUV control system to verify the effectiveness of real-time planning and realize online planning.

Author Contributions

Conceptualization, W.G.; Funding acquisition, W.G. and Z.C.; Methodology, W.G. and Z.C.; Software, L.S.; Validation, L.S.; Writing—original draft, L.S.; Writing—review & editing, Z.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China under Grant U2006228, 52171313, 51839004, and in part by the Key Laboratory Foundation of Underwater Robot Technology under Grant 6142215200305.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AUVAutonomous Underwater Vehicle
GPMGauss Pseudospectral Method
SQPSequential Quadratic Programming
LPMLegendre Pseudospectral Method
RPMRadau Pseudospectral Method
GPOPSGauss Pseudospectral Optimization Software
SNOPTSparse Nonlinear Optimizer
LG pointsLegendre-Gauss points
NLPNonlinear Programming

Nomenclatures

The following nomenclatures are used in this manuscript:
xCoordinate position in x direction
yCoordinate position in y direction
ψDirection angle of the AUV
uVelocity in x direction
vVelocity in y direction
rAngular velocity of the AUV
mMass of the AUV
IzMoment of inertia
X(·)Hydrodynamic coefficient
Y(·)Hydrodynamic coefficient
N(·)Hydrodynamic coefficient
TuThrust generated by the propeller
TvThrust generated by the propeller
TrThrust torque generated by the propeller
tfTerminal time of navigation
hiObstacle function
aRadius of the obstacle
bRadius of the obstacle
JObjective function
ω1Weight coefficient
ω2Weight coefficient
τTime variable
Li(τ)Interpolation basis function
DDifferential approximation matrix
x(τ)State variable function
u(τ)Control variable function
XfTerminal state
τkLG points
ωkGauss weight
CeEquality constraints
CiInequality constraints
aiSpline coefficient
biSpline coefficient
ciSpline coefficient
diSpline coefficient
Si(x)Cubic spline function

References

  1. Xiao, Q. Research status and trend analysis of underwater robots. Ind. Innov. 2021, 20, 25–27. [Google Scholar]
  2. Tang, Z.; Shao, H.; Zhang, B. Overview of inspection technology for submarine optical cable. Digit. Ocean Underw. Warf. 2020, 3, 499–503. [Google Scholar] [CrossRef]
  3. Zhu, D.; Pang, W.; Ren, K. Research status and prospect of multi-autonomous underwater vehicle cooperative search control. J. Univ. Shanghai Sci. Technol. 2022, 44, 417–428. [Google Scholar] [CrossRef]
  4. Chu, Z.; Wang, F.; Lei, T.; Luo, C. Path planning based on deep reinforcement learning for autonomous underwater vehicles under ocean current disturbance. IEEE Trans. Intell. Veh. 2023, 8, 108–120. [Google Scholar] [CrossRef]
  5. Kim, Y.; Kim, B. Time-optimal trajectory planning based on dynamics for differential- wheeled mobile robots with a geometric corridor. IEEE Trans. Ind. Electron. 2017, 64, 5502–5512. [Google Scholar] [CrossRef]
  6. Qu, W.; Zhang, H.; Wu, L.; You, Y.; Dong, Y. The trajectory design on the captive flight test of booster rocket and the combined-cycled aircraft based on segmented gaussian pseudo-spectral method. Aerosp. Control 2021, 39, 28–35. [Google Scholar]
  7. Wang, G.; Li, W.; Jiang, C.; Zhu, D.; Li, Z.; Xu, W.; Zhao, H.; Ding, H. Trajectory planning and optimization for robotic machining based on measured point cloud. IEEE Trans. Robot. 2022, 38, 1621–1637. [Google Scholar] [CrossRef]
  8. Li, Z.; Chen, J.; Peng, B. UAV Cluster Path Planning Based on Pseudo-spectral Method. Air Space Def. 2021, 4, 52–59. [Google Scholar]
  9. Tang, X.; Yang, L.; Yuan, J. Study on the states of autonomous vehicle based on gaussian pseudo-spectral method. Automot. Eng. 2020, 42, 567–573. [Google Scholar]
  10. Yao, H.; Qi, R. A research progress of trajectory optimization and guidance for mars lander. Aerosp. Control 2021, 39, 3–12. [Google Scholar]
  11. Mahmoudi, M.; Ghovatmand, M.; Skandari, M.H.N. A new convergent pseudospectral method for delay differential equations. Iran J. Sci. Technol. Trans. Sci. 2020, 44, 203–211. [Google Scholar] [CrossRef]
  12. Ross, M.; Karpenko, M. A review of pseudospectral optimal control: From theory to flight. Annu. Rev. Control 2012, 36, 182–197. [Google Scholar] [CrossRef]
  13. Xu, W.; Jiang, J.; Jiang, S. Scale optimization of wings in the climbing section of a near-space morphing hypersonic aircraft. J. Harbin Eng. Univ. 2019, 40, 1–9. [Google Scholar]
  14. Zhang, T.; Fu, T.; Song, X.; Qu, F. Multi-objective excavation trajectory optimization for unmanned electric shovels based on pseudospectral method. Autom. Constr. 2022, 136, 104176.1–104176.16. [Google Scholar] [CrossRef]
  15. Xia, W.; Wang, W.; Gao, C. Trajectory optimization with obstacles avoidance via strong duality equivalent and hp-pseudospectral sequential convex programming. Optim. Control Appl. Methods 2022, 43, 566–587. [Google Scholar] [CrossRef]
  16. Zhong, X.; Shao, X.; Xu, L.; Sun, G. Free-floating space manipulator trajectory optimization based on adaptive radau pseudospectral method. J. Harbin Inst. Technol. 2018, 50, 49. [Google Scholar]
  17. Song, X.; Yao, X.; Ye, S. Trajectory optimization of small supersonic unmanned aerial vehicle based on pseudo-spectral method. J. Zhejiang Univ. (Eng. Sci.) 2022, 56, 193–201. [Google Scholar]
  18. Sun, Z.; Liu, Z.; Zhang, P. Mars entry trajectory quick optimization method for lifting vehicle based on adaptive GPM. Chin. J. Space Sci. 2020, 40, 547–553. [Google Scholar]
  19. Sandberg, A.; Sands, T. Autonomous trajectory generation algorithms for spacecraft slew maneuvers. Aerospace 2022, 9, 135. [Google Scholar] [CrossRef]
  20. Raigoza, K.; Sands, T. Autonomous trajectory generation comparison for de-orbiting with multiple collision avoidance. Sensors 2022, 22, 7066. [Google Scholar] [CrossRef]
  21. Garg, D.; Hager, W.; Rao, A. Pseudospectral methods for solving infinite-horizon optimal control problems. Automatica 2011, 47, 829–837. [Google Scholar] [CrossRef]
  22. Zhang, L.; Wang, Z.; Yang, X.; Song, Q. Ascent Trajectory Planning for Stratospheric Airship Based on Gauss Pseudospectral Method. J. Shanghai Jiaotong Univ. 2013, 47, 1205–1209+1216. [Google Scholar]
  23. Ma, L.; Cui, W. Path following control of autonomous underwater vehicle based upon fuzzy hybrid control. Control Theory Appl. 2006, 3, 341–346. [Google Scholar]
  24. Gatzke, B. Trajectory Optimization for Helicopter Unmanned Aerial Vehicles; Naval Postgraduate School: Monterey, CA, USA, 2010; Available online: http://hdl.handle.net/10945/5315 (accessed on 16 October 2021).
  25. Meng, S.; Xiang, J.; Luo, Z.; Ren, Y. Optimal trajectory planning for small-scale unmanned helicopter obstacle avoidance. J. Beijing Univ. Aeronaut. Astronaut. 2014, 40, 246–251. [Google Scholar] [CrossRef]
  26. Zhang, Y.; Zhang, W.; Chen, J.; Shen, L. Air-to-ground weapon delivery trajectory planning for UCAVs using Gauss pseudospectral method. Acta Aeronaut. Et Astronaut. Sin. 2011, 32, 1240–1251. [Google Scholar]
  27. Huang, J.; Liu, Z.; Liu, Z.; Wang, Q. Pseudo-spectral method for optimal control problem: Theory and application. Electron. Opt. Control 2020, 27, 63–70. [Google Scholar] [CrossRef]
Figure 1. Result of each state in scenario 1: (a) Trajectory planning of the AUV; (b) Variation diagram of thrust; (c) Diagram of velocity change in x and y directions.
Figure 1. Result of each state in scenario 1: (a) Trajectory planning of the AUV; (b) Variation diagram of thrust; (c) Diagram of velocity change in x and y directions.
Sensors 23 02350 g001
Figure 2. Result of each state in scenario 2: (a) Trajectory planning of the AUV; (b) Variation diagram of thrust; (c) Diagram of velocity change in x and y directions.
Figure 2. Result of each state in scenario 2: (a) Trajectory planning of the AUV; (b) Variation diagram of thrust; (c) Diagram of velocity change in x and y directions.
Sensors 23 02350 g002
Figure 3. Average value of control variables and state variables in scenario 1 and scenario 2: (a) Average value of thrust and torque; (b) Average value of speed in x and y directions.
Figure 3. Average value of control variables and state variables in scenario 1 and scenario 2: (a) Average value of thrust and torque; (b) Average value of speed in x and y directions.
Sensors 23 02350 g003
Figure 4. Result of each state in scenario 3: (a) Trajectory planning of the AUV; (b) Variation diagram of thrust; (c) Diagram of velocity change in x and y directions.
Figure 4. Result of each state in scenario 3: (a) Trajectory planning of the AUV; (b) Variation diagram of thrust; (c) Diagram of velocity change in x and y directions.
Sensors 23 02350 g004
Figure 5. Comparison diagram of control variables in scenario 1 and scenario 3.
Figure 5. Comparison diagram of control variables in scenario 1 and scenario 3.
Sensors 23 02350 g005
Table 1. Parameters related to dynamic constraints.
Table 1. Parameters related to dynamic constraints.
NameValueNameValue
X u ˙ −30 kg N r ˙ −30 kg∙m2
X u −70 kg/s N r −50 kg∙m/s
X | u | u −100 kg/m N | r | r −100 kg/m
Y v ˙ −80 kg I z 50 kg∙m2
Y v −100 kg/sm185 kg
Y | v | v −200 kg/m
Table 2. Obstacle parameters.
Table 2. Obstacle parameters.
Obstacle AreaCenter CoordinatesRadius
1(10 m, 10 m)2
2(12 m, 15 m)1
3(17 m, 14 m)1
4(20 m, 20 m)2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gan, W.; Su, L.; Chu, Z. Trajectory Planning of Autonomous Underwater Vehicles Based on Gauss Pseudospectral Method. Sensors 2023, 23, 2350. https://doi.org/10.3390/s23042350

AMA Style

Gan W, Su L, Chu Z. Trajectory Planning of Autonomous Underwater Vehicles Based on Gauss Pseudospectral Method. Sensors. 2023; 23(4):2350. https://doi.org/10.3390/s23042350

Chicago/Turabian Style

Gan, Wenyang, Lixia Su, and Zhenzhong Chu. 2023. "Trajectory Planning of Autonomous Underwater Vehicles Based on Gauss Pseudospectral Method" Sensors 23, no. 4: 2350. https://doi.org/10.3390/s23042350

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop