# Modifications of Control Loop to Improve the Depth Response of Autonomous Underwater Vehicles

Authors: Sheng-Ping Hsu; Tzong-Shi Liu
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

During a constant depth maneuver of an autonomous underwater vehicle (AUV), its pitch attitude and stern plane deflections create forces and moments to achieve equilibrium in the vertical plane. If an AUV has a proportional controller only in its depth control loop, then different weights or centers of gravity will cause different steady-state depth errors at trimmed conditions. In general, a steady-state depth error can be eliminated by adding an integral controller in the depth control loop. However, an improper integrator may lead to a bad transient response, even though the steady-state depth error can finally be eliminated. To remove the steady-state depth error, this study proposes methods that adjust the depth command and add a switching integral controller in the depth control loop. Simulation results demonstrate that the steady-state depth error can be eliminated and the transient response can be improved.


---

## Body

## 1. Introduction

Autonomous underwater vehicles (AUVs) are self-contained vehicles with enough self-power that can carry out tasks with minimal human interventions. In recent years, more and more AUVs have been used for different applications, such as research, business, and military operations.In general, an AUV’s buoyancy is almost equal to its weight. For safety considerations, it is common to design an AUV to be positively buoyant to ensure that in case power fails or a mission is completed it will float to the surface. AUV shapes are varied depending on their purposes. In general, a slender and streamlined AUV looks like a submarine or a torpedo. Because control surfaces are ineffective if the forward speed of the streamlined AUV is low, the AUV must move forward at a sufficient speed so as to maneuver stably and maintain suitable control performance [1]. However, if a slender-shaped AUV is not equipped with vertical and horizontal thrusters but equipped with a variable buoyancy system (VBS) [2–4] or a moving mass actuator (MMA) [1], then it can hover at low forward speeds.The dynamics of an AUV is complex and highly nonlinear [5], especially when subject to environmental disturbances, such as ocean currents and waves. In conventional designs of proportional-integral-derivative (PID) controllers, we first simplify the nonlinear dynamics of a system to linear dynamics about an operating point to obtain the transfer functions of the system and then design the controllers. Healey and Lienard [6] suggested that 6-degree-of-freedom (DOF) linear equations of motion for an underwater vehicle can be divided into four noninteracting (or lightly interacting) subsystems for speed, steering, diving, and roll control. Controllers are, in turn, designed for each subsystem separately. Fossen [7] linearized models of the vehicles to obtain the transfer function for steering and pitch controllers. Shi [8] introduced an integral controller applied in a sliding mode control law to eliminate the steady-state error. To eliminate the steady-state error of an AUV, Hong et al. [9] proposed a dual loop design with inner sliding mode control with an integrator effect and outer proportional control with a feedforward controller. Woods et al. [10] reduced the steady-state depth error and pitch angle error by proposing a variable ballast system controller to shift the center of gravity along a body-fixed axis.In industry, PID is the most commonly used controller scheme, which has been popularly applied in process control. More than 95% of the control loops are of PID type [11]. In general, steady-state errors in a control system can be eliminated by the integral controller. However, it suffers significant loss of performance due to integrator windup with actuator saturation. The conventional antiwindup methods include (1) back-calculation (in which the difference between the actual process input and the controller output is fed back to the integral term), which is the classical method; (2) conditional-integration (in which the value of the integrator is frozen when certain conditions are satisfied); (3) hybrid scheme of back-calculation and conditional-integration [12]. The back-calculation dynamically reduces the integral term if the output of integral controller saturates. Therefore, if the output of integral term is smaller than the saturation value, the antiwindup method by using the back-calculation method will not work. However, not only integral windup but also the output of the integral term when it is smaller than the saturation value can cause the response overshoot. Accordingly, for reducing the overshoot, the conditional-integration method, which switches off the integral action when certain conditions are satisfied, seems to be more suitable than the back-calculation method.Much work has been done for an AUV depth control; however, in our impressions, there is no literature published on eliminating the steady-state depth error for an AUV subject to different payloads. This study is primarily concerned with the diving subsystem of an AUV and the objectives are to improve the transient response and to eliminate the steady-state depth error of the AUV by modifying its depth control loop.This paper is arranged as follows: AUV motion modeling in the vertical plane is presented in Section2. AUV depth and pitch control architecture is discussed in Section 3. Sea trial and 6-DOF simulation results of the AUV depth control are presented in Section 4. Modifications of the depth control loop for eliminating the steady-state depth error are proposed in Section 5. Simulation results are presented in Section 6. Finally, Section 7 concludes this paper.


## 2. AUV Motion Modeling in Vertical Plane

As shown in Figure1, two coordinate frames are used to model the AUV motion, which are Earth-fixed frame (XE,YE,ZE) and body-fixed frame (XB,YB,ZB). The position (x,y,z) and orientation (ϕ,θ,ψ) of an AUV are described with respect to the Earth-fixed frame. Euler angles including roll ϕ, pitch θ, and yaw ψ are described by defining the orientation of the body-fixed frame with respect to the Earth-fixed frame. The linear and angular velocities of an AUV are described by (u,v,w,p,q,r) in the body-fixed frame. Figure 1 also shows the force and moment diagram of an AUV in the vertical plane. The buoyancy B acts at the center of buoyancy (CB). The gravitational force W acts at the center of gravity (CG). F(R) and F(α) are hydrodynamic forces. F(P) represents a force due to the main propeller. N(α) represents a moment induced from the hydrodynamics. F(δs) captures the effects of a stern plane with deflection δs. N(δs) represents a moment induced from deflection δs in the stern plane. α denotes the angle of attack.Figure 1
Reference frames and force/moment diagram of AUV.The restoring force(Fx,Fy,Fz) and moment (Mx,My,Mz) vectors of an AUV in the body-fixed coordinate system are written as
(1)gcg=[FxFyFzMxMyMz]=[-(W-B)sinθ(W-B)cos⁡θsinϕ(W-B)cos⁡θcos⁡ϕ(ygW-ybB)cos⁡θcos⁡ϕ-(zgW-zbB)cos⁡θsinϕ-(zgW-zbB)sinθ-(xgW-xbB)cos⁡θcos⁡ϕ(xgW-xbB)cos⁡θsinϕ+(ygW-ybB)sinθ].
If the gravitation and buoyancy forces are computed at CB, (1) is reduced to
(2)gcb=[-(W-B)sinθ(W-B)cos⁡θsinϕ(W-B)cos⁡θcos⁡ϕycg-cbWcos⁡θcos⁡ϕ-zcg-cbWcos⁡θsinϕ-zcg-cbWsinθ-xcg-cbWcos⁡θcos⁡ϕxcg-cbWcos⁡θsinϕ+ycg-cbWsinθ],
where xcg-cb, ycg-cb, and zcg-cb denote CG distances from CB in the body-fixed frame. When an AUV is at the trimmed condition, that is, θ≅0 and ϕ≅0, (2) becomes
(3)gcb=[00W-Bycg-cbW-xcg-cbW0].
Equation (3) shows that the restoring force and moment in the horizontal plane are zero, but the restoring force and moment cannot be neglected in the vertical plane.In the vertical plane, the restoring force and moment of an AUV areW-B and -Wxcg-cb, respectively. If the magnitude of B is greater than W, a positive net buoyancy (B-W) will induce an upward heave motion. Thus, in order to maintain depth, the AUV has to pitch down a certain angle nearly equal to the angle of attack. The restoring moment acting on the vehicle will depend on the distance between CG and CB. Hence, different payloads will induce different force and moment effects in the vertical plane. On the other hand, if the net buoyancy is negative, the AUV has to pitch up at a certain angle (nearly equal to the angle of attack) to maintain a constant depth. As a result, regardless of whether the net buoyancy is positive or negative, there must be force and moment equilibrium in the vertical plane when the AUV is at the trimmed condition.In order to reduce the hydrodynamic resistance during navigation, when the AUV maintains a constant depth, the angle of attack and the stern plane deflection should be as small as possible (so as to decrease the resistance induced from the hydrodynamics and to increase the operation range of the stern plane). Kinematic equations of an AUV motion for heave(z,w) and pitch (θ,q) are written as
(4)z˙=-usinθ+vcos⁡θsinϕ+wcos⁡θcos⁡ϕ,θ˙=qcos⁡θ-rsinϕ.In order to determine a depth plane equation of motion, all unrelated termsv, p, r, yg, and xg are set to zero. Using Newton’s law, the system equations of AUV motion for heave w and pitch (θ,q) are obtained as [13]
(5)m(w˙+xcg-cbq˙-uq)=ΣZ,Iyq˙+m(u˙zcg-cb+xcg-cb(w-uq))=ΣM,
where
(6)ΣZ=Zw˙w˙+Zww+Zq˙q˙+Zqq+Zδsδs+(W-B)cos⁡θcos⁡ϕ,(7)ΣM=Mw˙w˙+Mww+Mq˙q˙+Mqq+Mδsδs-(zgW-zbB)sinθ-(xgW-xbB)cos⁡θcos⁡ϕ+M(Fth),(8)M(Fth)=Fth(zthcos⁡θthcos⁡ψth+xthsinθth),
where M(Fth) is a moment induced from Fth, which denotes propulsion from propellers. θth and ψth denote propulsion inclination angles with respect to pitch and yaw in the body-fixed frame, respectively. xth and zth denote acting positions of propulsion in the body-fixed frame.It is difficult to design the controller directly from the above equations because the dynamic equations of an AUV are nonlinear and coupled. Therefore, it is necessary to simplify them at the operating point based on assumptions, which are as follows.(1)
The AUV navigates at a constant speed and depth. The pitch angle is small enough to be ignored.(2)
The roll angle and roll angle rate are under control and near zero, such that terms concerning rolling can be neglected.(3)
The roll, pitch, and yaw control loops are designed to be independent. Since AUV body is symmetric, the products of inertia are treated as zero.During an AUV’s constant depth maneuver with assumptions of small pitch angleθ and small roll angle ϕ, (4) can be linearized as
(9)z˙=-uθ+w,θ˙=q.From the dynamic analysis in the vertical plane with respect to CB and with assumptions of small pitch angleθ and small roll angle ϕ, (6) becomes
(10)ΣZ=Zw˙w˙+Zww+Zq˙q˙+Zqq+Zδsδs+(W-B).
In addition, if there is no inclination of propulsion (θth=0, ψth=0, and zth=0), (7) becomes
(11)ΣM=Mw˙w˙+Mww+Mq˙q˙+Mqq+Mδsδs-xcg-cbW.
Assuming that W≅B, xcg-cb≅0, and zcg-cb≅0, by employing (10) and (11), (5) is linearized to become
(12)m(w˙-uq)=Zw˙w˙+Zww+Zq˙q˙+Zqq+Zδsδs,Iyyq˙=Mw˙w˙+Mww+Mq˙q˙+Mqq+Mδsδs.
Equation (12) can be rewritten as
(13)[w˙q˙]=[bacaef][wq]+[dag]δs,
where
(14)a=(m-Zw˙-Zq˙Mw˙Iyy-Mq˙),b=Zw+Zq˙MwIyy-Mq˙,c=mu+Zq˙MqIyy-Mq˙+Zq,d=Zq˙MδsIyy-Mq˙+Zδs,e=1Iyy-Mq˙(bMw˙a+Mw),f=1Iyy-Mq˙(cMw˙a+Mq),g=1Iyy-Mq˙(dMw˙a+Mδs).
Taking Laplace transforms of (12) yields
(15)[(m-Zw˙)s-Zw]w(s)-[Zq˙s+(mu+Zq)]q(s)=Zδsδs(s),-[Mw˙s+Mw]w(s)+[(Iyy-Mq˙)s-Mq]q(s)=Mδsδs(s).
From (15), the AUV transfer function is expressed by
(16)qδs(s)=Ds+EAs2+Bs+C,
where
(17)A=(m-Zw˙)(Iy-Mq˙)-Mw˙Zq˙,B=-Zw(Iy-Mq˙)-Mq(m-Zw˙)-Mw˙(mu+Zq)-MwZq˙,C=MqZw-Mw(mu+Zq),D=Mw˙Zδs+Mδs(m-Zw˙),E=MwZδs-MδsZw.


## 3. AUV Depth and Pitch Control Architecture

As depicted in Figure2, the control block diagram represents a dual loop control methodology with an inner pitch control loop and an outer depth control loop, which is commonly used in AUV depth control. The depth controller generates a desired pitch angle θc, which becomes the input to the pitch control loop. The pitch controller results in the stern plane deflection δs based on the pitch angle difference (θc-θf).Figure 2
Dual loop control of an AUV for depth subsystem.In Figure2, a proportional depth controller kp is adopted and the pitch controller can be a traditional PID controller [9, 14] or a sliding mode controller [4, 10]. In this paper, the pitch controller is designed with root locus and pole-zero assignment methods [15]. The pitch controller is expressed as k((ls+n)/(ts+h)) in terms of Laplace variable s. Therefore, the DC gain of the pitch control loop is kn/h.When an AUV is at the trimmed condition, it achieves the force and moment equilibrium in the vertical plane under specific stern plane deflectionδs and pitch attitude θf. According to Figure 2, the pitch command θc and the stern plane deflection δsequ when trimmed can be written as
(18)θc=kp(depthf-depthc)=kpdepthe,(19)δsequ=knh(θc-θf),
where depthf denotes the depth feedback from the depth gauge, depthc denotes the depth command, and depthe denotes the depth error. From (18) and (19), one has
(20)θckp=depthf-depthc=(δsequ(h/kn)+θf)kp.The ideal case in depth control isdepthf=depthc, which means that the steady-state error is zero; that is, θc=0. δsequ=(-θf)× DC gain of the pitch control loop. However, the DC gain of the pitch control loop is constant; therefore, when the AUV is subject to different payloads, the force and moment equilibrium in the vertical plane is varied. Thus, the pitch attitude and the stern plane deflection must vary so as to make the force and moment achieve equilibrium in the vertical plane. As shown in (19), the pitch command and pitch attitude will determine the stern plane deflection in equilibrium, which is needed to maintain the AUV at the trimmed condition. Its pitch attitude is determined by the net buoyancy and a specific stern plane deflection, which will keep its force and moment equilibrium in the vertical plane. Under such circumstances, the AUV is forced to keep a constant depth with a steady-state error which can be calculated by (20). If an AUV undergoes a constant depth maneuver at a constant speed, the velocity and angular terms of motion in the vertical plane are considered null. Thus, w=w˙=q=q˙=0 and ΣM=0. Therefore, (11) can be rewritten as
(21)ΣM=Mδsequδsequ-xcg-cbW=0.
Equation (21) results in
(22)δsequ=xcg-cbWMδsequ.
Combining (20) and (22) leads to
(23)depthf-depthc=(((xcg-cbW)/Mδsequ)(h/kn)+θf)kp.
Therefore, the stern plane deflection at the trimming condition can be determined by (22). Equation (23) shows that W and xcg-cb affect the steady-state depth error under the control architecture as shown in Figure 2. If W and xcg-cb in (22) are not altered, the steady-state error in (23) will remain constant; that is, the AUV will keep a constant depth run with a depth offset (depthf-depthc). In order to reduce the stern plane deflection when trimmed, either W or xcg-cb in (22) must be altered. If W or xcg-cb decreases, the restoring pitch moment from the center of gravity also decreases. As a consequence, the stern plane (22) and depth offset (23) will decrease.


## 4. Sea Trial and 6-DOF Simulation Results of AUV Depth Control

Figures3 and 4 show the sea trial results of an AUV developed by Chung Shan Institute of Science and Technology (CSIST) in April 2011. The AUV was navigated at 6.17 m/s. Its depth control architecture is shown in Figure 2 and the depth command is 9 m in this time interval. However, its actual depth is deeper than the depth command; that is, the steady-state depth error cannot be eliminated, which verifies that there exists the steady-state depth error derived from the previous section in (23). It means that the AUV is forced to keep force and moment equilibriums in the vertical plane under the control architecture shown in Figure 2. The mean stern plane deflection remains the same value as shown in (22). Thus, the stern plane deflection seems to be stuck at this trimming condition, and the steady-state depth error cannot be reduced. After the sea trial, we tried to tune the hydrodynamic coefficients and simulated the sea trial with a 6-DOF simulation program again. Simulation results depicted in Figures 3 and 4 show that the depth remains deeper than the command even if time increases. Similarly, the pitch command is also greater than the pitch angle and the mean stern plane deflection almost keeps constant as the sea trial result did. Figures 3 and 4 also show that the differences between the mean values of the sea trial and the 6-DOF model are small. Accordingly, the phenomenon that happened in the sea trial can reappear when using the 6-DOF simulation program. This result validates that the 6-DOF simulation program, taking into account AUV dynamics, is useful before sea trials.Figure 3
Sea trial and 6-DOF simulation results of depth control of an AUV.Figure 4
Sea trial and 6-DOF simulation results of depth control of an AUV.


## 5. Modifications of Depth Control Loop for Eliminating the Steady-State Depth Error

In the previous section, it has been shown that an AUV with only a proportional` depth controller may generate a steady-state depth error. In order to eliminate the steady-state error, a common approach is adding an integrator in the depth control loop as shown in Figure5, where kp is prescribed as 2.6 to avoid overshoot in the depth response. However, the stern plane servo may contain a relay nonlinearity, which would cause limit cycles if an integrator is included [14] and the control performance will be dramatically influenced by the gain ki of the integrator. Different ki will yield different depth responses. Figure 6 shows simulation results of depth control under different ki. This study prescribes ki=0.018 to eliminate the steady-state error successfully without affecting the transient response. But an improper ki=0.5 leads to a bad transient response, which causes a large overshoot when the AUV changes its depth. When the actual depth of the AUV is consistent with the desired depth, the pitch command cannot be zero immediately due to the integral term in the depth control loop. The pitch command also cannot reverse its value immediately when the AUV crosses the desired depth. Consequently, the pitch command will keep its original tendency to lead to the overshoot in depth. Therefore, it is important to use a proper ki to reduce the steady-state error without worsening the transient response.Figure 5
Dual loop control of an AUV for depth subsystem with an integral controller in the depth control loop.Figure 6
Depth responses of an AUV under differentki of an integral controller.In this section, two methods that modify the depth control loop are proposed to eliminate the steady-state error.


### 5.1. Method 1: Altering Depth Command from Different Steady-State Depth Errors

During an AUV’s constant depth run, it is necessary to achieve the force and moment equilibrium in the vertical plane under a specific pitch attitude and stern plane deflection. From (23), in order to reduce the steady-state depth error, there are two ways that can be adopted by changing the design of depth and pitch control loop. One is keeping the depth command but changing the stern plane deflection so as to change the force and moment equilibrium. However, this way cannot be done if the depth controller kp keeps the same value and the DC gain (kn/h) of the depth controller is fixed. Another way is changing the depth command.We first define the depth error as the mean value of depth minus the depth command. On one hand, if the steady-state depth error is positive, it means that the AUV’s pitch attitude and stern plane deflection make the force and moment equilibrium in deeper water. Since the steady-state depth error can be seen as an offset, we can deduct it from the original depth command. The new depth command will be thus smaller than the original. As a result, the pitch command will increase such that the stern plane deflection will also increase to vary the force and moment equilibriums in the vertical plane. Finally, the AUV will ascend to a shallower depth. On the other hand, if the steady-state depth error is negative, it means that the AUV pitch attitude and stern plane deflection make the force and moment equilibriums at shallower water. Since the steady-state depth error can be seen as an offset, we can again subtract it from the original depth command and thus the new depth command will be larger than the original one. As a consequence, the pitch command will decrease such that the stern plane deflection will also decrease to change the force and moment equilibrium state in the vertical plane and the AUV will descend to a deeper depth.Equation (23) can be rewritten as
(24)depthforiginal-depthcdesired=depthoffset.
Let
(25)depthcnew=depthcdesired-depthoffset.
Substituting (25) into (23) leads to
(26)depthfnew=depthcnew+depthoffset=depthcdesired-depthoffset+depthoffset=depthcdesired.
Therefore, the new depth feedback (depthfnew) of an AUV under the depth offset (depthoffset) deducted from the original depth command (depthcdesired) will be equal to the desired depth (depthcdesired) at a trimmed condition.According to (22) and the dynamics view point, because the weight and CG of the AUV are not varied, the pitch attitude and the stern plane deflection will keep the same values as before the depth command was varied. Figure 7 shows the new depth and pitch control loops. All the designs are the same as Figure 2 except that the depth command is changed by deducting a depth offset (depthoffset).Figure 7
Dual control loop for depth subsystem of an AUV with depth offset deducted from the depth command.


### 5.2. Method 2: Modifying Depth Control Loop by Adding a Conditional Integrator to Pitch Command

As mentioned in the previous section, the depth overshoot in the step response is caused by an improper gain of the integrator in the depth control loop. If the depth error is too large, an improper integrator will lead to a large pitch command, which cannot reverse immediately when the AUV crosses the desired depth. The output of the integrator can then be assumed as a very large value. Consequently, it will lead to a big depth overshoot in the transient response, which requires time to return to the desired depth. In order to improve the transient response, we modify the acting timing of the integrator to avoid too large output from the integral term. Instead of integrating the depth error all the time as shown in Figure5, Figure 8 shows that the integrator is modified to provide integral action only inside a threshold by adding a switching action, which switches off the integrator if the depth error exceeds a certain threshold, that is, only “conditionally.” Hence, the steady-state depth error can be reduced by the integral effect and the depth overshoot is decreased by reducing the pitch command contributed from the integral term. The modified block diagram for adding a conditional integrator in the depth control loop is depicted in Figure 8, in which the integral term is actuated by a switch when the depth error is equal to or less than the threshold.Figure 8
Dual loop control for depth subsystem of an AUV with modified integral controller added in the depth control loop.


## 5.1. Method 1: Altering Depth Command from Different Steady-State Depth Errors

During an AUV’s constant depth run, it is necessary to achieve the force and moment equilibrium in the vertical plane under a specific pitch attitude and stern plane deflection. From (23), in order to reduce the steady-state depth error, there are two ways that can be adopted by changing the design of depth and pitch control loop. One is keeping the depth command but changing the stern plane deflection so as to change the force and moment equilibrium. However, this way cannot be done if the depth controller kp keeps the same value and the DC gain (kn/h) of the depth controller is fixed. Another way is changing the depth command.We first define the depth error as the mean value of depth minus the depth command. On one hand, if the steady-state depth error is positive, it means that the AUV’s pitch attitude and stern plane deflection make the force and moment equilibrium in deeper water. Since the steady-state depth error can be seen as an offset, we can deduct it from the original depth command. The new depth command will be thus smaller than the original. As a result, the pitch command will increase such that the stern plane deflection will also increase to vary the force and moment equilibriums in the vertical plane. Finally, the AUV will ascend to a shallower depth. On the other hand, if the steady-state depth error is negative, it means that the AUV pitch attitude and stern plane deflection make the force and moment equilibriums at shallower water. Since the steady-state depth error can be seen as an offset, we can again subtract it from the original depth command and thus the new depth command will be larger than the original one. As a consequence, the pitch command will decrease such that the stern plane deflection will also decrease to change the force and moment equilibrium state in the vertical plane and the AUV will descend to a deeper depth.Equation (23) can be rewritten as
(24)depthforiginal-depthcdesired=depthoffset.
Let
(25)depthcnew=depthcdesired-depthoffset.
Substituting (25) into (23) leads to
(26)depthfnew=depthcnew+depthoffset=depthcdesired-depthoffset+depthoffset=depthcdesired.
Therefore, the new depth feedback (depthfnew) of an AUV under the depth offset (depthoffset) deducted from the original depth command (depthcdesired) will be equal to the desired depth (depthcdesired) at a trimmed condition.According to (22) and the dynamics view point, because the weight and CG of the AUV are not varied, the pitch attitude and the stern plane deflection will keep the same values as before the depth command was varied. Figure 7 shows the new depth and pitch control loops. All the designs are the same as Figure 2 except that the depth command is changed by deducting a depth offset (depthoffset).Figure 7
Dual control loop for depth subsystem of an AUV with depth offset deducted from the depth command.


## 5.2. Method 2: Modifying Depth Control Loop by Adding a Conditional Integrator to Pitch Command

As mentioned in the previous section, the depth overshoot in the step response is caused by an improper gain of the integrator in the depth control loop. If the depth error is too large, an improper integrator will lead to a large pitch command, which cannot reverse immediately when the AUV crosses the desired depth. The output of the integrator can then be assumed as a very large value. Consequently, it will lead to a big depth overshoot in the transient response, which requires time to return to the desired depth. In order to improve the transient response, we modify the acting timing of the integrator to avoid too large output from the integral term. Instead of integrating the depth error all the time as shown in Figure5, Figure 8 shows that the integrator is modified to provide integral action only inside a threshold by adding a switching action, which switches off the integrator if the depth error exceeds a certain threshold, that is, only “conditionally.” Hence, the steady-state depth error can be reduced by the integral effect and the depth overshoot is decreased by reducing the pitch command contributed from the integral term. The modified block diagram for adding a conditional integrator in the depth control loop is depicted in Figure 8, in which the integral term is actuated by a switch when the depth error is equal to or less than the threshold.Figure 8
Dual loop control for depth subsystem of an AUV with modified integral controller added in the depth control loop.


## 6. Simulation Results

This study carries out computer simulations for a 6-DOF AUV. Assuming that the streamlined AUV is symmetric, that is, all the products of inertia are zero, the AUV parameters are listed in Table1.Table 1
AUV parameters.
Parameters
Value
Length
2.75 m
Buoyancy (B)
208.3 kg
Center of buoyancy (xcb) (from the tip of nose)
1.25 m
Moment of inertia (Ixx)
2.636 kg·m2
Moment of inertia (Iyy)
90.89 kg·m2
Moment of inertia (Izz)
90.89 kg·m2
Proportional controller (kp)
2.6
Distance between CG and CB (zcg–cb)
3.5 mm
Distance between CG and CB (ycg–cb)
0.0 mm
Operating speed
12 knIn this study, only 6.17 m/s is considered and all the simulations are carried out at this speed. Assume that the mass of the AUV is 183.6 kg. Hydrodynamic parameters used in simulation are(27)Zw˙=-190.64kg,Zw=-997.32kg/s,Zq˙=-3.86kgm/rad,Zq=-1130.87kgm/srad,Zδs=-1294.08kgm/s2rad,Mw˙=-3.86kgm,Mw=46.86kgm/s,Mq˙=-88.31kgm2/rad,Mq=-1347.87kgm2/srad,(28)Mδs=1635.98kgm2/s2rad.From (13) and (14), the linear system of the AUV at 6.17 m/s in the form of x˙=Ax without driving inputs is written as
(29)[w˙q˙]=[-2.6680.08280.3190-7.525][wq],
where
(30)x=[wq],A=[-2.6680.31900.0828-7.525].
Two symmetric positive definite matrices P and Q are prescribed as
(31)P=[0.18780.00360.00360.0665],Q=[1.00.00.01.0],
where P and Q satisfy the Lyapunov equation
(32)ATP+PA=-Q.
A Lyapunov function V for the linear system can be expressed by
(33)V=xTPx.
Hence, the linear system is asymptotically stable.The plant stability can also be investigated based on the transfer function depicted in (16). The transfer function (q/δs)(s) of the AUV at 6.17 m/s is
(34)qδs(s)=9.06s+25.19s2+10.19s+20.02.
Accordingly, the poles are −2.66 and −7.53, which are all located in the open left-half complex plane. Therefore, this plant in the vertical plane is strictly stable.The pitch controller in Figure2 is designed with root locus and pole-zero assignment methods. The pitch controller is k((ls+n)/(ts+h)), where k=3.2, l=2.2, n=1.8, t=3.7, and h=4.1. The DC gain of the pitch control loop is written as kn/h=1.405. The value of k will be adjusted according to different forward speeds of the AUV with interpolation by gain scheduling [16].Assume that the transfer function of the pitch sensor is(7463.89/(s2+120.95s+7463.89)) (with the form of (wn2/(s2+2ζwns+wn2)), wn=86.39 rad/s, and ζ=0.7). Thus, the characteristic equation of the inner closed loop is
(35)1+(7.04s+5.763.7s+4.1)(9.06s+25.19s2+10.019s+20.02)(1s)×(7463.89s2+120.95s+746389)=0.
From (35), the numerator of the characteristic equation is written as
(36)3.7s6+488.69s5+32711.05s4+321297.82s3+1344933.87s2+2325374.93s+1082935.8=0.The stability of the control system at 6.17 m/s can be investigated by using the Routh-Hurwitz stability criterion [15]. Routh’s array is written ass63.732711.051344933.871082935.8s5488.69321297.822325374.930s430278.421327327.8510082935.80s3299874.912307896.480s21094299.161082935.800s12011135.510s01082935.8Since there are no sign changes in the first column of this array, the roots are all in the left-half complex plane, and the closed loop system is stable.In this paper, suppose that the weight and distance between the center of gravity and center of buoyancy(xcg-cb) are varied with different payloads, which are shown in Table 2.Table 2
x
cg–cb and mref under different payloads.
With payload 1
With payload 2
With payload 3
x
cg–cb
20
−40
80
Weight (kg)
203.6
206.5
198.3Table3 shows the depth command of the AUV. Table 4 shows the corresponding mean steady-state depth errors of AUV under different payloads.Table 3
Time variation of depth command.
Time (s)
Depth command (m)
0 to 60
1.0
60 to 240
10.0
240 to 420
20.0
420 to 600
10.0Table 4
Mean steady-state depth errors under different payloads.
Mean steady-state error (m)
With payload 1
0.09
With payload 2
−0.75
With payload 3
0.73Figure9(a) shows the resulting depth control performance. Figures 9(b), 9(c), and 9(d) depict the pitch angle, stern plane deflection, and pitch command with three different payloads under the same control loop as shown in Figure 5. Figures 9(a) and 9(b) depict that the pitch angle is very close to the pitch command and the steady-state depth error is 0.09 m. Figures 9(a) and 9(c) depict that the pitch command is smaller than the pitch angle (the stern plane deflection will be negative) and the AUV’s depth is shallower than the depth command for 0.75 m. Figures 9(a) and 9(d) depict that the pitch command is bigger than the pitch angle (the stern plane deflection will be positive) and the depth is deeper than the depth command for 0.73 m. It is evident that the proportional controller is more suitable for payload 1 than for payload 2 and payload 3. When the AUV is in steady-state condition, whether there exists a steady-state error or not, there must be force and moment equilibrium in the vertical plane.(a) Depth response of an AUV under three different payloads. (b) Pitch angle and stern plane deflectionδs of an AUV under payload 1. (c) Pitch angle and stern plane deflection δs of an AUV under payload 2. (d) Pitch angle and stern plane deflection δs of an AUV under payload 3.
(a)
(b)
(c)
(d)In this section, we will demonstrate that the steady-state performance can be improved by the methods proposed in Section4. The mean steady-state depth error depthoffset is calculated at 50 s in this study.


### 6.1. Method 1: Altering Depth Command from Different Steady-State Depth Errors

From (23), it can be seen that the bigger the kp, the smaller the steady-state depth error. However, the steady-state depth error still exists no matter what value of kp is chosen. In Figure 6, it can be seen that, no matter what value of kp is chosen, the steady-state depth error can be finally eliminated by modifying the depth command according to (25). In simulation, the depth command is modified after 60 s with this method and Figure 10 shows that the steady-state depth error is immediately eliminated under different payloads and different kpvalues.Figure 10
Depth response of an AUV by altering the depth command under different payload 2 and payload 3.


### 6.2. Method 2: Modifying Depth Control Loop by Adding a Conditional Integrator to Pitch Command

The modified integral control loop, as shown in Figure8, acts only when the depth error is below a certain threshold. In simulation, the pitch command limitation is 45 deg and the stern plane deflection limitation is 18 deg. However, if the threshold is selected smaller than the steady-state depth error, the integrator will not work. Therefore, to ensure that the threshold is selected adequately, a threshold larger than the steady-state depth error is necessary. In this paper, we set it to be 1.2 times the mean steady-state depth error. In simulation, the mean steady-state depth error can be obtained at 50 s. Figure 11(a) shows the depth response under different conditions. The blue solid curve depicts the desired depth and the black solid curve depicts the depth response of proportional control (kp=2.0) and integral control (ki=0.5) with payload 3 under the control architecture as shown in Figure 5. The other curves are simulated under the control architecture as shown in Figure 8. Comparing the black solid curve and the pink solid curve, it is obvious that the overshoot or undershoot caused by the integrator in the black solid curve is dramatically decreased in the pink solid curve. The other curves show that the transient responses are improved and the steady-state depth errors can be eliminated through the conditional-integration, as shown in Figure 8.(a) Depth response of an AUV with a modified integral control loop. (b) Depth response and pitch command of an AUV with different integrators.
(a)
(b)Figure11(b) depicts the depth response and pitch command of an AUV with different types of integrators. Depth overshoot or undershoot caused by the integrator can be dramatically reduced by a conditional integrator and the pitch command can be reduced as well. Figure 11(b) also shows that the pitch commands do not exceed the pitch command limitation; this means that integral windup does not happen during the AUV depth control. Therefore, the overshoot or undershoot of the depth response caused by the integrator will not be reduced if a traditional back-calculation scheme is used in the depth control loop. Simulation results show that, by using a conditional integrator, not only can the overshoot be reduced but also the steady-state depth error is eliminated.Figures12(a) and 12(b) depict the pitch angle and the stern plane deflection, respectively, for an AUV with the two different methods used to eliminate the steady-state depth error (with payload 2). The blue dashed curve depicts with a proportional controller (kp=2.0) only. The green solid curve depicts the results using method 1 (kp=2.0). The red dotted curve shows the results from method 2 (kp=2.0,ki=0.5). Because the weight and buoyancy of the AUV are not altered, simulation results demonstrate that the pitch angles and the stern plane deflections remain the same, which validates (22).(a) Simulation results of pitch angle with different methods. (b) Simulation results of stern plane deflection with different methods.
(a)
(b)


## 6.1. Method 1: Altering Depth Command from Different Steady-State Depth Errors

From (23), it can be seen that the bigger the kp, the smaller the steady-state depth error. However, the steady-state depth error still exists no matter what value of kp is chosen. In Figure 6, it can be seen that, no matter what value of kp is chosen, the steady-state depth error can be finally eliminated by modifying the depth command according to (25). In simulation, the depth command is modified after 60 s with this method and Figure 10 shows that the steady-state depth error is immediately eliminated under different payloads and different kpvalues.Figure 10
Depth response of an AUV by altering the depth command under different payload 2 and payload 3.


## 6.2. Method 2: Modifying Depth Control Loop by Adding a Conditional Integrator to Pitch Command

The modified integral control loop, as shown in Figure8, acts only when the depth error is below a certain threshold. In simulation, the pitch command limitation is 45 deg and the stern plane deflection limitation is 18 deg. However, if the threshold is selected smaller than the steady-state depth error, the integrator will not work. Therefore, to ensure that the threshold is selected adequately, a threshold larger than the steady-state depth error is necessary. In this paper, we set it to be 1.2 times the mean steady-state depth error. In simulation, the mean steady-state depth error can be obtained at 50 s. Figure 11(a) shows the depth response under different conditions. The blue solid curve depicts the desired depth and the black solid curve depicts the depth response of proportional control (kp=2.0) and integral control (ki=0.5) with payload 3 under the control architecture as shown in Figure 5. The other curves are simulated under the control architecture as shown in Figure 8. Comparing the black solid curve and the pink solid curve, it is obvious that the overshoot or undershoot caused by the integrator in the black solid curve is dramatically decreased in the pink solid curve. The other curves show that the transient responses are improved and the steady-state depth errors can be eliminated through the conditional-integration, as shown in Figure 8.(a) Depth response of an AUV with a modified integral control loop. (b) Depth response and pitch command of an AUV with different integrators.
(a)
(b)Figure11(b) depicts the depth response and pitch command of an AUV with different types of integrators. Depth overshoot or undershoot caused by the integrator can be dramatically reduced by a conditional integrator and the pitch command can be reduced as well. Figure 11(b) also shows that the pitch commands do not exceed the pitch command limitation; this means that integral windup does not happen during the AUV depth control. Therefore, the overshoot or undershoot of the depth response caused by the integrator will not be reduced if a traditional back-calculation scheme is used in the depth control loop. Simulation results show that, by using a conditional integrator, not only can the overshoot be reduced but also the steady-state depth error is eliminated.Figures12(a) and 12(b) depict the pitch angle and the stern plane deflection, respectively, for an AUV with the two different methods used to eliminate the steady-state depth error (with payload 2). The blue dashed curve depicts with a proportional controller (kp=2.0) only. The green solid curve depicts the results using method 1 (kp=2.0). The red dotted curve shows the results from method 2 (kp=2.0,ki=0.5). Because the weight and buoyancy of the AUV are not altered, simulation results demonstrate that the pitch angles and the stern plane deflections remain the same, which validates (22).(a) Simulation results of pitch angle with different methods. (b) Simulation results of stern plane deflection with different methods.
(a)
(b)


## 7. Conclusion

In this study, two methods have been proposed to eliminate the steady-state depth errors by modifying the depth control loop for AUVs. The first method deducts the mean steady-state depth error that is regarded as an offset from the depth command. The depth response thus will not suffer oscillatory motion due to the effect of any integrator term. The second method uses a switching integrator to replace a conventional integrator, which acts only when the depth error is below a certain threshold. In this study, the threshold is set greater than the mean depth error to ensure that the integrator can actually act. Accordingly, overshoot or undershoot in the transient response caused by the integral effect can be avoided. The effectiveness of the proposed methods considering an AUV subject to different payloads has been validated in simulation. Its transient response can be improved and the steady-state depth error can be eliminated effectively.



---

*Source: 324813-2014-08-12.xml*