Collision Avoidance of External Obstacles for an Underwater Transportation System

— Underwater transportation using multiple autonomous vehicles with detection avoidance capability is useful for military applications. To ensure collision avoidance of external obstacles, sensor-based and path planning methods were investigated for a transportation system of four Hovering Autonomous Underwater Vehicles (HAUVs). In particular, sensor-based wall-following and hard-switching collision avoidance strategies and an offline RRT* path planning solution have been introduced. The sensor-based wall following method was found to be better than sensor-based hard switching method in terms of time and power efficiency. Moreover, the hard switching method produced higher yaw moments and required higher PID gains which were sensitive to even small variations. The comparison between the offline RRT* path planning and wall following methods showed that the fuel efficiency of the former is higher whilst its time efficiency is poorer.


INTRODUCTION
Underwater transportation is important for the military sector as it provides the opportunity to move a payload and avoid detection. Moreover, high precision can be achieved in path following as the wave effects are negligible which is important for the commercial underwater installations such as for oil and gas extraction rigs [1].
Payload transportation using multiple vehicles provides certain advantages compared to transportation using a single vehicle. For instance, a random shaped and sized payload can be transported which cannot be adjusted on a single vehicle. Moreover, there is flexibility in using the number of vehicles i.e. the number of vehicles could be increased or decreased according to the weight of the payload which is cost and fuelefficient. Furthermore, it provides fault tolerance as the transportation mission could still be carried out if few of the vehicles in the group have malfunctioned.
Due to the growing use of underwater vehicles for various applications [2]- [6], it is important that an optimal strategy is in place to avoid underwater obstacles. Significant research effort has been dedicated to develop collision avoidance strategies with robust controllers for the land and aerial vehicles [7]- [10]; however, it is important to identify how one or more of these strategies would respond in the underwater environment.
The development of a simulation model of an underwater system is complex than the land and aerial systems as the underwater environment is highly nonlinear and coupled. Also, it has significant hydrodynamic and hydrostatic parameters. The hydrostatic parameters can be precisely calculated as these are based on the selected weights and the buoyancy effects [11]. On the other hand, the hydrodynamic parameters which are calculated either empirically, numerically or even experimentally have uncertainties as these are calculated for certain conditions with assumptions.
In this research, remotely operated vehicles (ROVs) were assumed to be used autonomously (thus being referred to as Hovering Autonomous Underwater Vehicles (HAUVs)) to exploit their over-actuation and to deploy them for long-range slow-moving operations to ensure the stability of the payload [1]. The Minerva ROV was selected as this is a standard underwater vehicle which is operated by the Norwegian University of Science and Technology (NTNU). Several research studies have been accomplished on this vehicle [12]- [15] and the model manoeuvring coefficients are readily available.
There are two ways to develop a collision avoidance strategy. One way is to implement a sensor-based method which activates when the obstacle is encountered by the sensors on the vehicle [10]. The other way is to use a path planning method which helps to identify the safe path to be followed [7][8] [16]. The path planning could be offline or online. Offline path planning is carried out before the start of the mission and the generated trajectory can only avoid the previously known obstacles. Whereas online planning produces an incremental trajectory which allows the reaction to the changes in the environment, to the moving obstacle and the errors during motion [17].
Considering the importance of underwater obstacle avoidance and underwater environmental complexities (as discussed earlier), this paper contributes to explore the collision avoidance methods for the autonomous underwater transportation system. Both the sensor-based and path planning strategies are developed and implemented on the underwater transportation system. The merits and demerits of each method in comparison with other methods would provide a standard for the selection of an appropriate collision avoidance strategy. The rest of the paper is organised as follows. Section II describes the underwater transportation system for which the collision avoidance methods are explored. Section III explains the dynamic model of the transportation system. In Section IV, the sensor-based methods are developed i.e. the hard switching and wall following techniques; they are implemented on the transportation system encountering a single obstacle in Section 5. In Section 6, the wall following and RRT* path planning methods are implemented on the transportation system encountering four obstacles. Finally, concluding remarks are given in Section 7.

II TRANSPORTATION SYSTEM OF FOUR HAUVS
This analysis was performed for the transportation system of four HAUVs which are connected to a cubic payload via solid links, as shown in Fig. 1.
Each vehicle in the system was assumed to have one obstacle detection sensor which is installed at the end of the vehicle. The distance from the centre of the system to each sensor is 3.2m. This includes the length of the portion of the cubic payload (0.5m), the solid link (1m) and the length of the vehicle (1.52m).

III DYNAMIC MODELLING
A dynamic model was developed for the abovementioned transportation system to analyse the obstacles collision avoidance.
The dynamic model consists of the kinematics and kinetics. Kinematics describes the motion of the body without accounting for the forces and moments which are taken up by the kinetics [18]. Fossen's approach [19] was used to develop the dynamic model according to which the position and orientation are taken in the Earth-fixed frame (EFF) whereas, the velocities, forces and moments are expressed in the Bodyfixed frame (BFF). The vectorial representation of the dynamic model is given as ̇= . (1) is the vector of position and orientation of the system, given as (3) is the velocity vector in the BFF, written as is the transformation matrix to transform from BFF to EFF. is the mass matrix which is the sum of the rigid body mass ( ) and added mass ( ) matrices. ( ) is the Coriolis matrix which takes into account the rotational effect of BFF about the EFF. This consists of the rigid body Coriolis matrix ( ) and added mass Coriolis matrix ( ). ( ) is the damping matrix which consists of the linear and quadratic damping terms. ( ) is the vector of hydrostatic forces and moments.
The transformation matrix is written as Where is the transformation matrix to transform the translational terms and to transform the rotational terms, given as is the thrust vector which can be written as the product of thrust allocation matrix ( ) and vector of thrust forces applied by the thrusters on the system ( ), given as In this paper, the collision avoidance of the transportation system was analysed in the horizontal plane. Therefore, the dynamic model was reduced considering only ( , , ) coordinates.
The model parameters of the Minerva HAUV were acquired from reference [20] and were then modified to get their effect about the centre of the combined body, i.e. the centre of the payload [21].
For the manipulators and payload, the hydrodynamic parameters were calculated using a semi-empirical approach [11]. The buoyancy of the Minerva HAUV is slightly higher than its weight to bring the vehicle to the surface in case of an emergency. However, it is assumed to be neutrally buoyant in the simulations to ease the analysis [22]. Keeping into consideration the same requirement for the transportation system, the manipulator and payload were selected to make the whole system neutrally buoyant [1].
Moreover, the sea waves were ignored as the transportation system will be operating at a higher depth. The sea current effects and the hydrodynamic interaction with other underwater bodies were also ignored.

IV SENSOR-BASED COLLISION AVOIDANCE
Two sensor-based collision avoidance methods were developed for the transportation system, i.e. the hard switching and wall following.
In these methods, the obstacles are detected by the sensors on the system. The selection of the source of communication of the sensors is very important. For instance, the acoustic waves are good for long-range communication in water but they are not efficient at short-range due to low bit rates. In contrast, optical communication has higher bit rates which ensure higher propagation speed in the water, but it is highly affected by the turbidity of water over long ranges. Moreover, the Electromagnetic (EM) waves in the Radio Frequency (RF) range provides the highest bit rates in short ranges, but they are highly attenuated in water over long ranges [23]. There is significant on-going research to produce an efficient and effective underwater communication strategy by blending the ultrasonic and optic sources which would potentially cover both the short and long ranges [24].
Due to the requirement of short-range communication, the optical proximity sensors were assumed to be used on the transportation system. Any limitation in the communication was ignored.

A. Hard Switching
The strategy for the hard switching method is shown in Fig. 2. The two controllers which are applied are go-to-goal and avoid-obstacle controllers. The system moves towards the goal using the go-to-goal controller until the norm of the difference between the obstacle position ( ) and sensor position ( ) is less than or equal to the maximum allocated distance around the obstacle ( ) at which the avoid-obstacle controller gets activated. The thrust vectors are decided accordingly. For instance, when the condition for go-to-goal is met, go-to-goal thrust vector ( ) is applied and when the avoid obstacle controller is activated, avoid-obstacle thrust vector ( ) is implemented, given as

1) Go-to-Goal Controller
The control scheme is applied on the difference between the desired ( ) and actual position ( ) of the system. The outcome is given as desired thrust vector in EFF ( ) which is multiplied by the inverse of transformation matrix ( ) to get the effect in the BFF ( ). is multiplied by the inverse of thrust allocation matrix ( ) to get the desired force vector ( ). A saturation limit is applied on the thrust forces to get the actual thrust force vector ( ). This is then multiplied by to get the actual thrust vector ( ) which is given as control input to the dynamic model of the system and the actual position of the system ( ) is obtained. The process continues until the desired goal location is achieved or the controller switches to the avoidobstacle controller.

2) Avoid-Obstacle Controller
The avoid-obstacle controller turns the system clockwise by 90degrees when the obstacle is detected by the sensor on the vehicle. Therefore, the desired heading angle in the avoidobstacle condition becomes The control scheme is applied on the difference between the desired heading angle ( ) and actual heading angle ( ) to get the desired thrust moment ( ). The desired thrust vector to avoid the obstacle in EFF becomes is then multiplied by the inverse of to get the desired thrust vector in BFF ( ). This is then multiplied by the inverse of to get the desired thrust force vector ( ). The saturation limit is then applied to get the actual thrust force vector ( ) which is multiplied by to get the actual thrust vector ( ).
is then given as input to the dynamic model of the system which provides . The process continues until the system is out of the danger zone and the go-to-goal controller takes over.

B. Wall Following
A wall following strategy is developed in two phases for the go-to-goal and avoid-obstacle behaviours i.e. the planning and the tracking phases. In the planning phase, the desired velocity vector is achieved by applying a linear control law. In the tracking phase, the control scheme is applied to get the desired control input.
The complete wall following strategy is shown in Fig. 3.

1) Go-to-Goal a) Planning
In the planning phase, a linear feedback controller is applied on the difference between the goal and actual positions. This provides the desired velocity vector in EFF, given as is the go-to-goal gain matrix and is the goal location. To check the asymptotic stability, the error dynamics is taken as For the positive , the eigenvalues are all positive. Therefore, the error between the goal and current location of the system asymptotically goes to zero. This ensures the closed-loop stability of the system.

b) Tracking
From the planning, we get the desired velocity vector in EFF which is transformed in BFF by multiplying with the inverse of . The desired heading angle is worked out by taking the tangent inverse of the ratio between the sway and surge velocities. The control scheme is then applied to get the desired motion response.

2) Collision Avoidance a) Planning
In the planning phase, the velocity vector is directly calculated by multiplying a scalar gain matrix to the difference between the obstacle position and the actual position of the system. This provides the desired velocity to avoid the obstacle, given as ̇= ̇= .
Where is the position of the obstacle. is the avoidobstacle gain matrix which is positive definite, therefore, the eigenvalues are positive and the system is unstable. This is because the system is moving away from the obstacle. If there is no other controller, the system will keep on moving away from the obstacle till infinity. However, when the system is out of the obstacle influential area, the go-to-goal controller takes over. Therefore, this choice of the control input for the obstacle collision avoidance is acceptable.
Using ̇ mentioned in equation (14), the system can get trapped in the local minima i.e. the go-to-goal and the avoidobstacle velocity vectors could come directly opposite to each other. This is quite unlikely in reality, as a small amount of noise can avoid the system ending up at the local minima. However, to develop a safer algorithm, the avoid-obstacle velocity vector can be rotated by ±90 o . This way the system can follow the obstacle either clockwise or anticlockwise.
(16) is the scaling factor which must be carefully selected in the control system design, is the transformation matrix which can transform the velocity vector by clockwise or anticlockwise.
For clockwise, And for counter-clockwise, To decide which direction to transform the avoid-obstacle velocity vector, the dot product of the velocity vector in each clockwise (̇, ) and anticlockwise (̇, ) are taken with the go-to-goal velocity vector (̇). If the angle between the go-to-goal and any of the clockwise or anticlockwise velocity vectors is less than 90 o , its dot product will be positive and the distance between the system and goal will be lower. Therefore, it is desired to follow the obstacle in that direction. Moreover, it is required to specify when the system should stop following the wall. This is obtained by taking the dot product of the avoid-obstacle velocity vector (̇). and the go-to-goal velocity vector (̇). If the dot product is greater than zero then the go-to-goal controller gets activated. The flow chart of the algorithm is shown in Fig. 4. Like go-to-goal behaviour, the desired velocity vector and heading angle are worked out. Finally, the control scheme is applied to get the desired motion response which avoids the collision with the obstacle.

V IMPLEMENTATION OF THE HARD SWITCHING AND WALL FOLLOWING METHODS
The hard switching and wall following methods were implemented on the transportation system encountering a single circular obstacle which was positioned at (50m, 40m). The effective area of the obstacle was considered a sphere which has a radius of 20m. The range of obstacle detection by the sensor was assumed to be 5m. This makes a safe distance of 25m from the centre of the obstacle at which the avoid-obstacle controller gets activated. The goal location was considered at (100m,100m).

A. Hard Switching
The hard switching method was first implemented on the transportation system encountering the obstacle. The control scheme was selected to be the PID controller. The PID gains (i.e. Proportional ( ), Integral ( ) and Differential ( )) at which a suitable motion response was obtained are shown in TABLE 1. The decrease in these gains would result in instability whereas, any further increase would not improve the motion response.  Fig. 5(a), the transportation system avoids the obstacle. Fig. 5(b) shows the thrust response of the system. An initial axial and transverse thrust force of 130N and 129N are applied respectively to accelerate the system towards the goal location. The forces then start decreasing and reduce to zero at the point where the controller to avoid obstacle gets activated. At this point, the yaw moment of 313Nm is applied to turn the system around the circular obstacle. Due to the high yaw moment, the system takes a longer distance around the circular obstacle to reach the goal location.

B. Wall Following
The wall following method was then applied on the transportation system. Due to over actuated HAUVs, the heading angle was kept to zero throughout by applying a separate controller. This cannot be achieved in the hard switching method where avoid-obstacle controller only relies on the turning of the system. PID controllers were used for which the PID gains are shown in TABLE 2. The scaling factor was kept at 3. Whereas, the diagonal terms of the wall following gain matrices and were 1 and 0.5 respectively. From Fig. 6(a), the transportation system avoided the circular obstacle. The system starts moving towards the goal when one of the sensors on the system detects the circular obstacle and the system starts following it clockwise. Once clear of the obstacle, the system starts approaching the goal.  Fig. 6(b), the thrust forces of 150N and 250N are initially applied in surge and sway respectively to accelerate the system towards the goal. When one of the sensors on the system detects the obstacle, the axial thrust force first decreases to -54N to decelerate the system and then increases to 187N to get its pace around the obstacle. Whereas, the transverse thrust force increases to 487N to accelerate around the obstacle. The forces then decrease to zero gradually as the system approaches the goal location. No yaw moment is observed as a separate controller was applied to keep the heading angle to zero.

C. Comparison between Hard Switching and Wall Following
The comparison between hard switching and wall following methods has proved that wall following is better for the underwater transportation system due to the following: 1. The resultant distance travelled by the system in the wall following while avoiding the obstacle was slightly lower compared to the hard switching, as shown in TABLE 3. The difference is only 0.6m which is not significant. 2. However, the time taken by the system in the wall following is significantly lower than the hard switching. The wall following took around 350secs to reach the goal location whereas, the hard switching took around 500secs, as shown in Table 3. Therefore, the wall following is time-efficient. 3. The yaw moment which was produced to avoid the obstacle was very high i.e. 313Nm in the hard switching approach, as shown in Table 3. This produced high heading angles which could cause the system's instability. This could not be escaped as the avoid-obstacle controller completely rely on the yaw moment for turning the system. Whereas, no yaw moment was applied when the wall following method was implemented as no yaw moment was necessary to avoid the obstacle. Instead, the combination of surge and sway thrust forces would achieve the desired objective by taking advantage of the over-actuated HAUVs. This results in a smoother response of the transportation system. 4. Higher PID gains were required in the hard switching method which are also highly sensitive. A slight decrease in the go-to-goal controller gain or a slight increase in the avoid-obstacle controller gain would move the system unstably away from the goal which would result in the mission failure. On the other hand, a slight decrease in the avoid-obstacle controller gain or a slight increase in the go-to-goal controller gain would result in the system penetrating in the obstacle danger zone. Whereas, low PID gains were sufficient to accomplish the transportation task by the wall following. Also, the wall following method is not sensitive to the controller gains. 5. From the Root Mean Square ( ) values in Table 4, the net power consumption in the hard swithing method is higher than the wall following method. This is mainly due to very high power which was required to turn the system to avoid the obstacle in the hard switching method. To compare the wall following and RRT* path planning methods, they were implemented on the transportation system when encountering four circular obstacles of radius 1m each, placed at the positions as mentioned in Table 5. The detection range of the sensors was assumed to be 1m. The goal was located at (22m, 35m).

A. Wall Following
The wall-following method was applied using the PID gains, as shown in Table 6.   TABLE 6. PID GAINS FOR THE WALL FOLLOWING  ENCOUNTERING FOUR OBSTACLES   Go-to-goal  controller   Avoid-obstacle  controller  20  20  0  0  50  5  30  100  0  0  100  5  5 5 0 0 0 0 The diagonal gain terms of the wall following method were kept 0.1 and 1 for and respectively. The scaling factor was kept equal to 1 throughout. From Fig. 7(a), the transportation system reached the goal location while avoiding the obstacles. From Fig. 7(b), the thrust forces in both surge and sway initially increase to accelerate the system towards goal. At an interaction with the first obstacle, a negative axial thrust force of -29N and a positive transverse thrust force of 441N are applied by the system to prevent colliding it. Subsequently, at the third obstacle, the axial and transverse thrust forces of 93N and 154N are applied respectively to avoid it. At the fourth obstacle, an axial thrust force of 52N and a transverse thrust force of 4N are applied to pass by avoiding it before coming to zero at the goal location.

B. RRT* Path Planning
Path planning methods were also studied to generate a safe trajectory avoiding the obstacles. In this regard, RRT* planner was used to generate a safe path for the transportation system while avoiding the four obstacles which were positioned, as shown in TABLE 5. The RRT* method searches the map around the system and obtains the best possible route avoiding the obstacles. This method assumes the moving system to be a point mass, therefore, the obstacles are required to be inflated.
In this study, each obstacle was inflated to 4.2m radius to account for the size of the transportation system and obstacle. The path which was obtained is shown in Fig. 8. The waypoints which were obtained from RRT* generated path are shown in Table 7. These waypoints were used to develop a minimum snap trajectory. The PID controllers were then applied to follow the desired trajectory.  (22,35) The waypoints were used to generate a minimum snap trajectory [25]. The minimum snap trajectory joins the waypoints by a seventh order polynomial which is called a segment. The motion response depends on the segment time. Higher segment time though produces precise motion response but at the cost of a long time to complete the trajectory and the application of thrusters at lower and inefficient thrust ranges. Therefore, an optimised time is required to be worked out. The PID controllers were used in the control system design for the transportation system to follow the trajectory. The PID controllers were used as they were proved to be efficient for payload transportation [26]. The PID gains which were used for trajectory tracking are shown in Table 8. The higher derivative gains were required to avoid overshoot at the end of each segment of the trajectory. From Fig. 9(a), (b) and (c), the trajectory is followed as desired. The Root Mean Square Error ( ) of the actual and desired motion responses are shown in TABLE 9 which are quite low to ensure precise trajectory tracking. Fig. 9(d) shows the thrust forces which were applied to follow the trajectory in surge and sway. The forces are continuously changing within the reasonable thrust ranges to ensure precise tracking of the trajectory. The yaw moment was zero as the heading angle was controlled to be zero.

C. Comparison between Wall Following and Path Planning
Both the wall following and RRT* path planning methods have some pros and cons for collision avoidance, as mentioned below: 1. The wall following is based on sensor detection. Though the ultrasonic sensors have limitations as discussed earlier, the close-range detection of the obstacle's position can be relied on. This provides the advantage of online detection and avoidance of the obstacles. On the other hand, the path planning method which was used in this paper is the offline RRT* which generates the path based on the pre-knowledge of the obstacles in the underwater environment. However, any obstacle which was unidentified earlier would not be avoided. In that case, the mission will fail. 2. The controllers were applied on the transportation system to follow the trajectory which was based on the waypoints obtained from the RRT* path planner. However, the response of the transportation system could deviate from the planned path as the trajectory segments were independently decided by the trajectory generator and the control inputs would have time lags and errors. Therefore, the trajectory following by the transportation system could result in an uncontrolled collision with obstacle if the deviations in the above factors are slightly higher. On the other hand, the wall following does not have this issue as it is a compact strategy which has complete control over itself during going towards the goal and avoiding obstacles. 3. The time taken by the system to reach the goal location was higher in the path planning method at the optimised time compared to the wall following. This is because the trajectory tracking by the system must keep track of each segment separately which increases the overall distance travelled by the system. On the other hand, the wall following aims towards the goal and only avoids the obstacle when encounters one. 4. A comparison of the RMS of powers of the two methods is shown in Table 10. It can be seen that the power consumption in the wall following is higher than the path planning. This is because the thrust forces which were applied by the thrusters to accelerate the transportation system towards goal were abruptly increased or decreased to very high values when interacted with the obstacles in the wall following. On the other hand, the thrust forces were smoothly applied during each segment in the path planning.

VII CONCLUSIONS
In this paper, several collision avoidance methods were explored. The detailed comparison between different collision avoidance methods will help provide users detailed information for deciding the best strategy in practical situations.
In the sensor-based methods, the wall following method had higher time and fuel efficiency than the hard switching method. Higher yaw moment was produced in the hard switching method to avoid the obstacle which could result in higher heading angles and could cause instability of the system. Furthermore, in the hard switching method, the system required higher PID gains which were also sensitive to the slight increase and decrease of gain values. The wall following method was concluded to be better than hard switching in all aspects. The comparison between the wall following and offline RRT* path planning showed that the former ensures the obstacle avoidance whereas, the later does not guarantee it due to certain reasons. Firstly, due to offline planning, if an obstacle appears which was not identified earlier would not be avoided. Secondly, the controllers which were applied to follow the trajectory are not liable to avoid the obstacles as they were not mainly applied for avoiding the obstacles. Thirdly, the segments between the waypoints were independently decided by the trajectory generator and control inputs by the controllers have time lags and errors, therefore, the collision avoidance could be compromised. Also, the actual distance moved and the time taken to reach the goal location was higher in the path planning method than the wall following. However, the RMS of the power consumption showed that the fuel efficiency of the RRT* path planning method is higher than the wall following.
Some of the drawbacks in the analysis of this work could be improved in the future. For instance, the higher derivative gains of PID controllers in trajectory tracking which makes the system highly sensitive to noise can be overcome by using the optimal controllers such as Linear Quadratic Regulator (LQR). Moreover, the collision avoidance of the moving obstacles in the path planning method can be ensured by using the online path planning strategy.
One recommendation for the future work is to blend the offline RRT* path planning and wall following methods to get a complete strategy which would avoid both the stationary and moving obstacles. Moreover, a comparison will be required between the recommended strategy and the online path planning method to decide on the best approach.