3.2. Upper Layer of IIFDS Navigation Controller Design
The algorithm is based on a variational approach, where the perturbation effect of obstacles on the flow field is represented using a modified quantization matrix
, resulting in a perturbed flow field [
13]. The introduction of tangential velocity in [
14] expands the physical characteristics of the fluid, making the perturbed streamlines more suitable for AUV operation. Prior to planning the path, all obstacles are defined according to the formula in Equation (
13). The position of the destination point is set as
and the number of obstacles is denoted as
K. If there are no obstacles in the current path, the original streamlines go directly from the initial position to the target point with a velocity magnitude of
V just as
Figure 5 shown. Hence, the initial flow field velocity
can be represented by Equation (
14), where
u represents the flow velocity. Subsequently, the perturbation effect of obstacles on the flow field is quantified using the modification matrix
M. Finally, the initial flow field is corrected to obtain the perturbed flow field. This perturbed flow field remains stable, meaning that the flow streamlines can avoid obstacles and eventually reach the target point.
The design process of the proposed method can be summarized as follows:
- Step 1.
Calculate the initial fluid field by considering the current position and the destination.
In the algorithm,
represents the initial flow field at each computed sampling point during the operation of the AUV. This initial flow field evolves continuously as the position changes. Here,
V denotes the confluence velocity and
represents the distance between the AUV position
P and the target position
.
- Step 2.
Calculate the disturbance modification matrix based on the presence of static or moving obstacles.
If there are
K obstacles present in the environment, then the perturbed flow field velocity is obtained by modifying the initial flow field velocity
using the modification matrix
for each obstacle.
where
represents the weight factor of the
obstacle.
where
and
represent the expressions for the
and
obstacles, respectively, calculated according to Equation (
13). Due to the condition
, it is necessary to normalize the weight of each obstacle at each position. The normalized weight of the
obstacle is given by
With this normalization, Equation (
16) can be written as follows,
Building upon the original IFDS [
13], the introduction of the tangential matrix incorporates the perturbation matrix. Therefore,
represents the modification matrix for the
obstacle.
where
is the repulsion coefficient,
is the saturation coefficient, and
is the tangential coefficient. These three factors collectively determine the avoidance time and sensitivity in obstacle avoidance.
where
is the repulsion factor of the
obstacle,
is the tangential factor of the
obstacle,
is the distance between the AUV object and the target point,
is the distance between the AUV and the surface of the
obstacle,
I represents the identity matrix of order three, and
is the outward normal vector to the surface of the
obstacle perpendicular to it.
As for the other variables, is the repulsive matrix, is a tangential matrix, and is the horizontal tangent vector, which can be obtained using the following expression. The tangent coordinate system is defined by setting , , and as the , , and axes, respectively. The calculation process of is as follows:
Define two mutually orthogonal vectors,
and
, which are also orthogonal to
,
By using
,
, and
as the basis vectors for a new coordinate system, any unit vector in the plane perpendicular to
can be expressed in the form
where
is the tangential direction factor. This angle represents the angle between any tangent vector and the
axis. It determines the angle of avoidance direction. The
axis is obtained through rotation. Therefore, in the inertial coordinate system,
is transformed to the
standard coordinate system by using the tangent coordinate axis transformation matrix,
where
is the transformation matrix from the tangent coordinate system to the inertial coordinate system,
and
,
,
,
,
.
- Step 3.
Compute the final perturbed fluid field using the results obtained from the previous two steps.
After modifying the initial flow field velocity
, the perturbed flow field velocity becomes
During the actual operation of the AUV, it encounters not only static obstacles but also dynamic obstacles. In such cases, the velocity of dynamic obstacles needs to be considered in the flow field [
15]. To incorporate the dynamic obstacle velocity, the process involves calculating the relative positions based on the static flow field, adding perturbation flow field effects, and finally incorporating the dynamic obstacle velocity.
The total velocity
of a dynamic obstacle is a combination of the obstacle’s velocity and its weight factor. If there is only one obstacle, the weight factor
can be calculated according to Equation (
17) as mentioned earlier. Assuming the velocity of the
obstacle is
, its reference motion velocity is given by
- Step 4.
Calculate the velocity of the dynamic obstacle under the action of the flow field.
The total vector velocity of the obstacle can be calculated using the following formula,
Here, represents the actual velocity of the obstacle at position P at a specific time point. is the corresponding weight, where a higher value indicates a shorter time frame for the AUV to avoid the obstacle.
- Step 5.
Finally, determine the next position at the subsequent time step by considering the sample time and the current position.
Velocity and position of the final perturbed flow field are
Among them, is the sampling control period. A smaller value of leads to more accurate results, but it also increases computational complexity. The parameters , , and shape the streamlines. Adjusting and avoids stagnation points and traps.
In IIFDS, the tangential matrix enables fluid flow in multiple directions around obstacles.
determines the path plane; when it is close to 0 or
, the path is horizontal (Path 1, Path 5), favoring side avoidance. When it is close to
, the path is vertical (Path 3), favoring top avoidance, as in
Figure 6.
For the parameters
and
, which represent the tangential reaction coefficient and repulsion coefficient, respectively, the larger their values, the earlier the planned path avoids obstacles, and the AUV stays farther away from obstacles, making the planned path safer, as in
Figure 7 and
Figure 8.
In the case of a moving obstacle environment, as shown in
Figure 9, the parameter
is a positive value. A larger value indicates that the AUV avoids obstacles earlier, reacts faster, and achieves better avoidance effects. However, when the AUV is farther away from the obstacles, the relative reference velocity increases. This increases the possibility of collision between the AUV and the obstacles. In other words, the higher the difficulty level of avoiding obstacles for the AUV, the greater the associated risk. This is because the moving obstacles appear relatively stationary in the frame of reference of the navigation vector field.
In general, randomly selected parameters affect the length of the path and the distance from obstacles, potentially rendering the path planning infeasible. Therefore, parameter optimization is crucial for the performance of the system. By selecting appropriate parameters, the IIFDS method can always strike a balance between safety and smoothness, effectively avoiding obstacles.
3.3. Bottom Layer of NMPC-Based Trajectory Tracking Controller Design
The reference path is planned using the outer-loop path planning layer, and the reference path can be described in the following form,
The path tracking error is
and the control object is to guarantee the deviation of the position to converge to zero, i.e.,
. The reference path dynamically changes based on the movement of the plant and the distance between obstacles. If there are any dynamic obstacles present, the corresponding fluid velocity is adjusted accordingly. The inner-loop NMPC controller then follows the receding path. This process can be described in the following steps:
- Step 1.
Express the model in the nonlinear state space equation.
The nonlinear state model can be described as follows:
and the first deviating equation consists of state, control input, and disturbance,
The Nonlinear MPC model’s function is
- Step 2.
Prediction process.
Regarding the state space of the nonlinear model, the next state can be determined using the Runge–Kutta (RK) method. In the prediction process, both the fourth-order and sixth-order RK methods can be employed. However, it is crucial to strike a balance between computational cost and accuracy. Considering this trade-off, utilizing the RK4 method is deemed sufficient [
28].
The characteristics of nonlinear AUV dynamics are captured during each time step of model prediction. Furthermore, the prediction is based on the actual state and control variables , , rather than operating points , . This grants Nonlinear Model Predictive Control (NMPC) a natural advantage over other control strategies that rely on linear approximations. Additionally, the controller prediction model incorporates the propeller characteristics and disturbances from the ROV dynamics Ordinary Differential Equations (ODEs). Therefore, the discrete model possesses the capability to predict nonlinear ROV dynamics in the presence of 6DOFdisturbances. This implies that NMPC can better adapt to the actual dynamic characteristics and disturbances of the ROV system, rather than being limited to a specific operating point and linear approximation. Such features make NMPC particularly effective in complex, real-time control environments.
- Step 3.
Control object and the cost function.
According to the NMPC frame, the path tracking problem can be seen as a constraint optimization problem, as it is for the cost function, and
N is the predictive time domain [
29],
Just as in Equation (
40),
are the corresponding weight matrices to position deviation
and the velocity deviation
,
is the weight matrix on control
, and
,
, and
. These three control objectives the nonlinear MPC would like to achieve at the same time. Firstly, the objective of the cost function is to minimize the tracking error, ensuring that the AUV approaches and stably maintains as close as possible to the reference position. The cost function adopts a formulation represented by
, which penalizes the disparity between the current state and the positional reference. Secondly, during underwater operations, angular velocity and linear velocity need to be maintained at zero after reaching the target point. Consequently,
is likewise set to
. Last but equally significant, the optimal controller is subject to three constraints. The first two constraints, respectively, ensure stable path-keeping and remaining stationary. The design of the optimal controller aims at minimizing the overall control effort. The intermediate cost
J constitutes the sum of all control variables, governed by the optimal control strategy
to minimize the control effort of the AUV. The reference control variables
are set to
.
During the path tracking process of an AUV, both the operational state and control variables of the AUV are subject to certain constraints. These constraints consist of both hard and soft limits. It is imperative to adhere to these constraints, with particular emphasis on the hard constraints, as they must be strictly followed for safety reasons. The system state
and the control variables
are constrained as follows:
where
are the lower bound of the state vector and the control input, and
are the upper bound of the state vector and the control value. In the control process, the bound domain can be rewritten as
The aforementioned NMPC equations undergo optimization at each time step, with only the first optimized control signal being applied to the AUV. The system’s new control trajectory is optimized in a receding horizon manner. In other words, after the AUV sends the first control signal, the prediction horizon transitions from to .
In summary, the objective of this controller is to enable the AUV to track the reference position, ultimately stabilizing at a stationary state while achieving optimal control.