Vehicle-Fixed-Frame Adaptive Controller and Intrinsic Nonlinear PID Controller for Attitude Stabilization of a Complex-Shaped Underwater Vehicle

Corresponding Author: Chanaka Thushitha Bandara, Department of Mechanical Engineering, University of Delaware, Newark, DE 19716, USA E-mail: chanaka@udel.edu Abstract: In this study we present attitude stabilization using a vehiclefixed-frame adaptive controller and an intrinsic nonlinear PID controller for a low-speed Autonomous Underwater Vehicle (AUV), of complex shape. Controlling an AUV poses a huge challenge because of the non-linearity, time variance and unpredictable external disturbance, as well as because its dynamics and hydrodynamic parameters are difficult to identify due to its geometry. First, a vehicle-fixed-frame adaptive controller is implemented to stabilize the attitudes given. The stability of this desired state-dependent, regressor, matrix-based controller is verified using Lyapunov’s direct approach. Second, an intrinsic nonlinear PID controller is implemented based on the attitude error represented as rotation matrices, to stabilize the attitudes given. This controller requires only an approximate estimate of the inertia tensor of the device. Both the controllers adopt quaternions to indicate the attitude errors to avoid representation of the singularities that occur when the Euler angle description of the orientation is used. Finally, the results imply that the intrinsic nonlinear PID controller has more stability and shorter settling time than does the vehicle-fixed-frame adaptive controller.


Introduction
Over the last two decades, Autonomous Underwater Vehicles (AUVs) have come in a wide variety of types and shapes and exerted a great influence on underwater applications. Areas inaccessible by even the Remote Operating Vehicles (ROVs) and Human Occupied Vehicles (HOVs) can be reached by the small-sized, complex-shaped AUVs because of their greater flexibility. These AUVs are also operable in highly hazardous environments and high-risk regions. Meanwhile, the complex-shaped AUVs have more numbers of Degrees of Freedom (DOF) than do the conventional torpedo-shaped ones, in terms of raising the maneuverability in complex underwater spaces.
As the AUV applications are increasing, the need for its autonomy is also escalating. Among the pivotal ways the AUV autonomy can be enhanced is to raise the dynamic working of its motion control system. Yamamoto (2001) demonstrated that a model-based control system is more effective when the AUV dynamics are known, at least to some degree. Furthermore, as Ferreira et al. (2012) observed an empirical model most frequently fails to illustrates the AUV dynamics over an extensive operating region. Therefore, to achieve an accurate hydrodynamic model of the complex-shaped AUVs it becomes important to design a controller. In order to model the hydrodynamics of these underwater vehicles, the scaled and full-scale experiments and computational approaches available at present, are the methods being used. However, scaled and full-scale experiments involve the use of costly devices like towing tanks, which makes them very expensive methods to employ (Berge and Fossen, 1997) and also, the computational approaches are required high computational 255 time because of its complexity (Phillips et at., 2010). Building a suitable controller for the AUVs is a complicated process because of the complexity of the hydrodynamic parameters.
Several control systems are proposed to track the attitudes and trajectories to enable the AUV to behave as a highly refined machine for oceanic cruising and operation (Ismail et al., 2016;Xiang et al., 2017). The sliding mode controller is well known for its robustness, as all the relevant facts regarding the input nonlinearities and disturbances are unknown. In fact, Cui et al. (2016) suggested an adaptive, dynamic, anti-wind-up, sliding mode, attitude controller, on the basis of a simplified second-order dynamics and the use of a nonlinear disturbance observer and an auxiliary dynamic compensator were proposed for the situation of deadzone nonlinearity and rudder. To offset the ocean currents-induced unreliability in the hydrodynamics and unpredictable disturbance effects, a second-order sliding mode controller was developed by Joe et al. (2014). For tracking the desired trajectories, it was Eng et al. (2008) who addressed the horizontal tracking control for the AUVs on the basis of a nonlinear sliding mode incremental feedback model. Employing the Line Of Sight (LOS), Wang et al. (2012) initiated a feedback controller for the purpose of tracking the trajectories specified in the presence of ocean currents; In their work, Repoulias and Papadopoulos (2007) introduced a sliding mode controller, centered on the approach of the LOS as well as cross-track error.
However, as the chattering phenomenon is one of the major drawbacks of the conventional sliding mode controller, the adaptive concept can be utilized to minimize it (Zhang et al., 2014). In the presence of constant and ocean disturbance, Dong et al. (2015) in their study, suggested a state feedback-based, backstepping control algorithm. Further improvement of the controller was done to raise the steady-state performance, through an additional integral action, using the expression of the relationship between the heading angle and direction angle of the ocean current. Just as Smith et al. (2010) emphasized the desired trajectories were tracked by a wheeled robot which was controlled by utilizing a linearized fuzzy adaptive controller provided with backstepping feedback. With the help of the adaptive tracking controller, based on the Radial Basis Function Neural Network (RBF-NN) (Chwa, 2011), the trajectory tracking of the AUVs was accomplished. In fact, Bian et al. (2012) utilized the Dynamic Surface Control (DSC) and Minimal Learning Parameters (MLP), based on the robust adaptive neural network tracking control for underwater vehicles. In order to model the stability and robustness of the adaptive controller for a nonholonomic robot, Miao et al. (2013) adopted the learning method of the neural network. In their study, Bandara et al. (2019a) proposed the trajectory tracking and path planning algorithm based on an adaptive control law to facilitate the operation of a complexshaped low-speed Autonomous Underwater Vehicle (AUV) under challenging environmental conditions.
The PID controller is one of the most widely used controllers in underwater vehicle motion control. The VORTEX underwater vehicle was experimented upon using an improved nonlinear PID to subdue the nonlinearity and overcome the external interference, as addressed by Perrier and Canudas-De-Wit (1996). The results of this study were compared with the conventional PID controller. A PID depth controller based on the nonlinear model of an underwater vehicle was designed by Adhami-Mirhosseini et al. (2011). The 3-D path was suggested by Tian et al. (2011) following the controller of the underactuated AUV in the in the tack which followed the designs of the guidance function and PID controller. The fuzzy logic theory was adopted for improvement of the guidance function. In fact, Liu et al. (2005) applied a PID controller having the capacity to reject the shallow water wave disturbance to the ODIN underwater vehicle. Considering the effects of the ocean currents on the MKII underwater vehicle, a PID controller was implemented by Refsnes et al. (2007).
In the literature reports are available on techniques that are recommended for following the attitudes and trajectory tracking methods in the AUVs. However, in the course of designing suitable controllers, the main difficulties encountered include the uncertainty of the hydrodynamic parameters, such as the non-linear hydrodynamic effects, variations in the parameters and disturbances due to the ocean currents, as well as the nonlinear dynamics of the AUV. To maneuver the AUV in the desired manner, a controller that can overcome such problems is required.
In the present work, for the simulations the complexshaped AUV employed is displayed in Fig. 1, while the details of the configuration are given in Table 1. This study presents a vehicle-fixed-frame adaptive controller and an intrinsic nonlinear PID controller for a complex-shaped AUV to stabilize the attitudes given. In Section AUV modeling, AUV modeling and standard notions for marine vehicles are introduced. To track the desired attitudes in the presence of hydrodynamic uncertainties, two Sections, namely Vehicle-fixed-frame adaptive controller and Intrinsic nonlinear PID controller focus on the development of a vehicle-fixed frame adaptive controller and an intrinsic nonlinear PID controller, respectively. Finally, in the Conclusion Section, the conclusions drawn are included, based on the performance comparison of both the controllers used, in Section Performance comparison of the vehicle-fixed-frame adaptive controller and Intrinsic nonlinear PID controller.

AUV Modeling
In this section the AUV kinematics and dynamics are clearly depicted, indicating the highly non-linear and coupled terms, which poses a challenge for the mathematical model. It was Fossen (2002) who, for convenience, introduced the North East Down (NEDframe) and Body fixed frame (B-frame) as the two coordinate frames for marine systems, as seen in Fig. 2.
It was Fossen (2002) who proposed the AUV dynamics based on the marine vehicle formulation; further, Fossen (1994) and the Society of Naval Architects and Marine Engineers (SNAME) (SNAME, 1950). In Table 2, the positions, angles, linear and angular velocities, force and moment are clearly evident. To ensure clarity, we have defined the position vector (), velocity vector (v) and force vector (), as shown below: The AUV can be modeled as a rigid body because the relative distance between the particles remains fixed. The AUV dynamics as given by Euler's rigid body equation of motion, are defined as follows: (4) and (5) for the linear motion and rotational motion, respectively: where, M is the mass, I is the moment of inertia defined in the B-frame, X is the center of mass defined in the B-Frame and 1 and 2 are the external disturbance force and moment defined in the B-frame, respectively. (3)

B I R SO
is the rotation matrix with respect to the NED-frame: The AUV kinematics is defined as follows: The rotation matrix satisfies , is explicitly expressed as: The assumption taken to model the AUV given in Fig. 1 is noted, as follows.
Assumption: The origin of the B-frame (Ob) coincides with the center of the mass of the AUV; then X is equal to [0 0 0 ] T .

Vehicle-Fixed-Frame Adaptive Controller
From the data in (4) and (5), the dynamics of the AUV denoted reveal the uncertainty of the parameters and unmodeled dynamics. The design was created to compensate for these uncertainties; therefore, to achieve consistent AUV performance a vehicle-fixed-frame adaptive controller is suggested to estimate and control the uncertain parameters. Using the by the adaption mechanism, adjustment of the parameters in the control law is done. The design of the adaptive controller proposed is capable of forcing the AUV to maintain, in the presence of parameter uncertainty, the attitudes desired. To accomplish this, the regression matrix is defined.
The vehicle-fixed variables, are considered, as given: where the quaternion-based attitude error is given by , 2d is the desired attitude and v2d is the desired angular velocity of the AUV in the body-fixed frame.
The error vector is given by: where,  is a positive definite matrix. The vehicle regressor matrix is: The adaptive control law can be defined as expressed below: Such that: On xn

NED-frame
Zn yn 258 where, KD is the (33) positive definite matrix. The parameter estimate  is updated by: where,  is a suitable positive definite matrix of appropriate dimension and is selected in such a manner that the tuning law provides the convergent characteristics.
In the equation, the adaptive law proposed can drive the AUV in the desired direction, thus guaranteeing the AUV stability. In light of the discussion mentioned above, the structure of the proposed control law is depicted in the block diagram given in Fig. 3.

Stability of the Vehicle-Fixed-Frame Adaptive Controller
The following Lyapunov candidate function is used to examine the stability of the system: where,   In reality, the system is asymptotically stable in the sense of Lyapunov because V(t) conforms to the conditions stated above. The time derivative of (15) is expressed as given below: where, 0     , as  is a constant definite vector By the substitution of (10) in (18) Therefore, Equation (17) becomes: Substituting control input (2) into (26): Substituting  from (14) in (29)     Equation 31, with the use of a stable controller, complies with the Lyapunov criterion of the stability of the AUV dynamics. Therefore, the adaptive control law proposed in (12) provides a closed system which is stable.

Intrinsic Nonlinear PID Controller
This intrinsic nonlinear PID controller is implemented to recompense the uncertainty of the parameters and unmodeled dynamics, included in the AUV dynamics, denoted in (4) and (5). Implementing the controller necessitates knowing only the inertia tensor of the device. However, a broad estimation of the parameters of the system will enable the identification of a suitable gain set, using simulation.
The rotational motion dynamics given by (5) can be rearranged as (32) to simplify the control algorithm: where, 2 = IT u represents the control moments generated by the thrust of the rotors. The 2 = IT term includes both the uncertainty of the parameters and external disturbances: According to Somasiri et al. (2015), R t SO , the following explicit controller described, has the capacity to locally, exponentially and almost globally stabilize an adequately smooth reference trajectory: The structure of the control law proposed, as discussed above, is depicted in Fig. 4.

Performance Comparison of the Vehicle-Fixed-Frame Adaptive Controller and Intrinsic Nonlinear PID Controller
In this section, to identify the stability of the proposed controllers, simulations for the AUV given in Fig. 1 were conducted, in the presence of external disturbances.
For this simulation, four DOF are considered: Surge, roll, pitch and yaw. The force required to maneuver the AUV in the xb direction and maintain a given velocity is manually set to the desired value. The added mass acting in the xb direction when the AUV operates at low speed can be neglected compared to its mass (Bandara et al., 2019b). The details of the AUV configuration and damping torques, which can be identified as the external disturbances (2) applied to it, can be listed as (38) and The desired attitudes and heading velocity are defined in Table 4. The roll DOF () behaves like a selfstabilizer, so that the desired roll DOF (d) is equal to zero throughout the given time period.

The Control Law Parameters of the Vehicle-Fixedframe Adaptive Controller
is the control input of this controller, as defined in (12). Its gain matrices are selected to be, as Table 5, In the event of using the regression matrix (), the AUV model shown in (5) can be given in terms of linear parameters. To implement it in real-time, it must be understood that the regression matrix, which is statedependent, is needed to calculate, in each control cycle (Bandara et al., 2019a). The regression matrix defined in (11) can be given as shown below:

The Control Law Parameters of the Intrinsic Nonlinear PID Controller
As defined in (37), T u = -kpE-kde-kii is the control input of this controller. The inertia tensor (I) according to (38)  The number of simulations is performed for the desired attitudes given in Table 4 to check the performance of the proposed controllers. Fig. 5a and 5b show the comparison between the actual attitudes and desired attitudes with each controller and elaborate that the intrinsic nonlinear PID controller shows the low settling time and greater stability than the vehicle-fixed-frame adaptive controller.    In Fig. 6a and 6b, it is evident that the NED-frame angular velocities of the AUV with the intrinsic nonlinear PID controller asymptotically converge to zero faster than does the vehicle-fixed-frame adaptive controller.
In Fig. 7a and 7b, at the beginning of each desired attitude, the control moments have certain definite values indicating that the AUV reaches to the required angular acceleration. After that, the control moments asymptotically converge to zero, as the angular accelerations decrease to zero, proposing that each controller accurately and smoothly commands the AUV to follow the desired attitudes. The control outputs are constrained between -50 Nm and 50 Nm given that all the thrusters have limitations on proving the maximum propulsion moments.

Conclusion
This study considers the problems of attitude stabilization for a complex-shaped AUV, in the presence of external disturbances. Moreover, Euler's rigid body equations of motion used to model the AUV can easily handle the linear and rotational motions, separately. Also, the quaternion representation of the attitudes guarantees avoidance of the singularities. The simulation results demonstrate the comparison between the attitude stabilization of the vehicle-fixed-frame adaptive controller and the intrinsic nonlinear PID controller to be effective and robust to external disturbances. Lyapunov's direct approach is used to confirm the stability of the vehicle-fixed-frame adaptive controller, which is rather more complicated than the intrinsic nonlinear PID controller, which only requires a rough estimation of the inertia tensor. From these results it is evident that the intrinsic nonlinear PID controller has faster convergence and greater stabilization than does the vehicle-fixed-frame adaptive controller. Also, to the best of our knowledge, this intrinsic nonlinear PID controller provides the best simulation results reported for an attitude stabilization controller, implemented for a complex-shaped underwater vehicle.