Adaptive sliding mode control of autonomous underwater vehicles in the dive plane

The problem of controlling an autonomous underwater vehicle (AUV) in a diving maneuver is addressed. Having a simple controller which performs satisfactorily in the presence of dynamical uncertainties calls for a design using the sliding mode approach, based on a dominant linear model and bounds on the nonlinear perturbations of the dynamics. Nonadaptive and adaptive techniques are considered, leading to the design of robust controllers that can adjust to changing dynamics and operating conditions. The problem of using the observed state in the control design is addressed, leading to a sliding mode control system based on input-output signals in terms of drive-phase command and depth measurement. Numerical simulations using a full set of nonlinear equations of motion show the effectiveness of the proposed techniques. >


I. INTRODUCTION
ANEUVERING in the dive plane, depth changing and M depth keeping are essential performance requirements for any Autonomous Underwater Vehicle (AUV). Vehicle response depends heavily on its particular design and configuration, operating conditions, and environmental forces. While questions pertaining to fluid-body interaction and reliable prediction of hydrodynamic forces are still the subject of current research, design and installation of AUV controllers is a matter of immediate need. This is in response to AUV's being recognized as an alternative to manned submarines for a variety of underwater missions at minimal capital and no manpower expense.
Any automatic controller design for an AUV must satisfy two conflicting requirements: First, it has to be sophisticated enough to perform its mission in the realm of complicated and ever-changing vehicle/environment interactions; secondly, it has to be simple enough so that on-line implementation is possible by the onboard vehicle computer at a sufficiently high sample rate. This paper attempts an attack at the problem of the AUV dive-plane response. Section I presents two dynamical models for the AUV response in the vertical plane. A simple, linear model is used for control law design, whereas a more complicated nonlinear model is reserved for visual simulation and demonstration. The difference between the models simulates the differences that exist between any vehicle model and the real world. Section I1 is devoted to the control design using Manuscript revised March 27, 1990. This work was supported by the NPS R. Cristi  sliding modes, while Section I11 presents an adaptive version which compensates for uncertainties of the linearized dynamics. The issue of designing a sliding mode controller using estimated states is presented in Section IV. Numerical simulation results from a three-dimensional real-time simulation of the AUV are given in Section V, where vehicle motion is dynamically simulated from the complete set of equations of motion.
II. EQUATIONS OF MOTIONS An exact set of equations of motion for a rigid body moving in an ideal fluid can, at least in principle, be derived from the Kelvin-Kirchhoff hydromechanical equations. Such a formidable formulation, invaluable as it may be for force prediction and motion analysis, presents some technical drawbacks from the point of view of on-line control system design. Namely, the required computational time is so extensive that with today's technology it is not possible that the necessary calculations could be performed by the onboard vehicle computer at a sufficiently high sample rate. For this reason, various simplified models have been developed and used in the study and control of motions of underwater bodies. Assuming that the vehicle motions are relatively slow, an assumption which is valid for almost all usual maneuvers, the dynamics of the AUV can be described by a set of 12 nonlinear, coupled, first-order differential equations with constant coefficients [ 11. Several studies at the Naval Postgraduate School (NPS) [2] were based on a similar nonlinear model of the Swimmer Delivery Vehicle (SDV) designed at NCSC (Naval Coastal Systems Center) for which a complete set of hydrodynamic derivatives exists [3].
Restricting our attention to the dive plane, the equations of motion of a symmetrical body with horizontal plane-control surfaces at zero become: U.S. Government work not protected by U.S. copyright where the standard notation of [l] is adopted, and ZHEAVE and MPITCH represent the cross-flow drag terms [3]. Although these equations can be significantly simplified [4], they appear still to be very complex for this study.
Control of plants with such nonlinear and coupled models has been traditionally accomplished by linear controllers that may or may not be gain-scheduled. Recent work with sliding mode control [5] has been extremely promising because of added robustness inherent in the method. The most wellestablished approach is based on a canonical form of the plant dynamics and nonlinear state feedback. However, a difficulty arises in the direct application of the approach in [5] to (l), since these equations are coupled, nonlinear, and not in the canonical form: x " ( t ) = f ( X " -~, . . . , X 1 , X , t , U) on which most of the sliding mode control approaches [5], [6] are based.
A way to circumvent this problem while maintaining the robustness features of the sliding mode controller is to base the design on an approximate model, linearized around nominal flight-operating conditions. Assuming that the vehicle maintains forward motion (as opposed to the hovering mode of ROV operations), nominal conditions are determined on the basis of the nominal speed 00, pitch rate q, pitch 8 , and depth z signals. For the submersible under consideration, the heave velocity w has a negligible effect on q and 8 and can be considered as a disturbance acting on the depth z. Extensive water testing [9] confirmed the validity of this assumption.
As a consequence, we can separate the dynamic model (1) into its linear component and nonlinear state-dependent disturbance as where the termf(x) denotes the deviation from linearity. The linear part of the model is shown in Fig. l(a), where the feedback term K accounts for the restoring hydrostatic moment of the centers of gravity and buoyancy being displaced by a change in the pitch angle.
The parameters of a linear model can now be estimated by a standard recursive least squares or an instrumental variable algorithm by assuming an ARX discrete time model: .  Table I. The effect of the restoring moment (gain K ) being more dominant at lower speeds can be seen from the poles becoming complex.

SLIDING MODE CONTROL DESIGN
It is evident from the discussion in Section I1 that any vehicle description based on a set of differential equations of motion can only be approximate in nature.
The necessity of coping with uncertainties in the model calls for a robust control input U of the form: where 6 is determined on the basis of the nominal model, while il compensates for deviations from ideal performances due to uncertainties.
In current approaches to the control of a wide class of nonlinear plants, the nominal control term zi is determined by the full nonlinear model, in our case equation (1). This is the case found in computed torque techniques applied to the control of mechanical manipulators [7]. A similar approach of interest to our work has been presented for the control of submersibles is that it has to be associated with stable dynamics in the sense that a(x(t)) = 0, for all t > to + limx(t) = 0 (5) for any initial conditionsx(t0). The choice of a linear sliding surface: for some vectors E R3 allows the use of pole-placement techniques in the design of the nonlinear controller. By defining the Lyapunov function: we guarantee that the sliding surface a(x) = 0 is reached in a finite amount of time by the condition: Since a(x) =s'x, we can use (8) and (2) to get: ~'(AX S b u +f) = -qi(x)sign(a).

(9)
By knowing a bound v on the nonlinearity such that for all x , the condition (8) with 7 : = q2 -sTf is satisfied by chosing the control input: (11) As mentioned at the beginning of this section, it is important to recognize that the feedback control law U is composed of two parts. The first, is a linear feedback law based on the nominal model (1.2), whereas the second, is a nonlinear feedback with its sign toggling between plus and minus according to which side of the sliding plane the system is located in. Two comments are in order here: First, since U has to change its sign as the system crosses a(x) = 0, the sliding surface has to be a hyperplane (dimension of one less than the state space). Secondly, it is U which is mainly responsible for driving and keeping the system onto the sliding plane a(x) = 0 (where U = 0 as well). Provided that the gain v2 has been chosen large enough, U can provide the required robustness due to momentary disturbances and unmodeled dynamics without any compromise in stability. The linear feedback law (12) is designed such that the system has the desired dynamics on the sliding plane. Since a(x) = 0, in this case: and the closed-loop dynamics are given by where the gain vector k can be found from standard methods such as pole placement. The closed-loop dynamics matrix has eigenvalues specified for the desirable response. It should be mentioned that one of the eigenvalues of A c must be specified to be zero. This is consistent with our decomposition (1 1).
The linear feedback U provides the desired dynamics on the sliding plane only. Therefore, U has no effect in a direction perpendicular to a(x) = 0. With A c specified and k com-puted from pole placement, we can determine s as follows: From (14) and (15) Therefore sT is found as a left annihilator of A c, or s is a right eigenvector of (A c)*, which corresponds to the zero eigenvalue. With this choice of s, the sliding plane s*x = 0 and the feedback control law (1 1) are completely determined.
It should be pointed out that, in applications, the states X I , x2, and xg are to be interpreted as errors between the actual values of q, 8, and z and their set points.
The aforementioned procedure can be easily extended to the case of nonlinear systems, linear in the control effort of the form: Design of the sliding-surface coefficients can be based on the linearized version of (18) as in (17). Then the nonlinear feedback control law, should replace (11). In this work we designed and implemented the control law as in (1 1) based on the linear model, as if no information regarding nonlinear characteristics of the vehicle dynamics existed. This approach clearly constitutes a "worst case scenario" and enhances the demonstration of the robustness properties of the design.

IV. SLIDING MODE WITH ADAPTIVE CONTROL
In the previous section we addressed the problem of designing a robust controller for diving maneuvers based on dominant linear dynamics with known coefficients and knowledge of bounds on the uncertainties. However, the linearized behavior of the AUV (expressed by the A , b matrices in the dynamics (2)) has characteristics changing with operating conditions such as speed and depth. This uncertain behavior can easily be included in the perturbationf by increasing the magnitude of the coefficient q2 of the nonlinear control term ii.
From a different perspective, we can make use of adaptive control techniques to compensate for the linear uncertainties represent the desirable or nominal closed-loop dynamics of the system, with U forward velocity, assumed to be known. Then the dynamics of the AUV in the vertical motion can be written as 1 = A d +b(6 +KTx) +f (21) with K depending on the actual vehicle dynamics. On the basis of this model we can design an adaptive controller which yields a closed-loop stable behavior for any uncertainty on the vehicle dynamics. In particular, we can show the following:

a) Let (A, s T ) be a pair of real eigenvalue (A) and corre-
sponding left eigenvector of the matrixA in (20) such that sTb # 0 (assume sTb > 0). The existence of s is guaranteed by the pair (A m , b ) being completely controllable [ 141. b) Let a bound 1 ' on the nonlinearityf be defined by c) Let bounds on the coefficientsK in (21) be defined by with Ki, i = l , . . . , n the elements of K =

[ G , -, K n l T .
Then the control input: with a ( t ) =sTx(t) and the adaptive gains with [15] if Kim < Ki < K y a being a positive constant, is such that the closed-loop system is exponentially stable and limx(t) = 0 (28)

Proo$ From
and its time derivative along the trajectories of (29) can be computed as

sTb --K( t ) T y (It( t ) )
P It is easy to see from the definition of y in (29) that the right-most term in (31) is such that: which yields 3 5 0. Therefore R(t), a ( t ) are uniformly bounded, and furthermore, a ( t ) E L2, the set of signals square integrable. This fact and the boundedness of the derivative u(t) implies that a ( t ) -0 as t 4 W. Finally, x ( t ) + 0 is guaranteed by the choice of a stable sliding surface.
The control law (24) is basically analogous to (11) with the addition of the adaptive gains x(t) adjusted on-line on the basis of (26). They guarantee the convergence of the state vector to the sliding surface sTx = 0 in spite of uncertainties of the linear part of the vehicle dynamics. Notice that the nonlinear control part U is not affected by this uncertainty and is identical to (13).

V. SLIDING MODE CONTROL WITH ESTIMATED STATES
The control structures addressed thus far require the signals in the state vector to be available for measurements. In terms of the dive maneuver of the AUV, this implies that pitch rate and pitch angle signals are measured by the respective gyros, while depth is measured by a pressure cell.
In some cases it might be desirable to design a control system based on the measurements of a restricted set of signals. This is typically the case in two situations: (a) When we want to reduce the number of sensors (gyros in this case), or (b) to improve the reliability of the system by the design of a controller which is robust in the presence of failures of some of the sensors.
Most approaches to the sliding mode control available in the literature are based on the assumption of full state feedback. In this section we address the problem of designing a controller based on the observed state, and we show that global stability can still be guaranteed for a class of nonlinearities of interest. Consider still the system in (2) and assume we measure the signal y (say, the depth error (zz d ) ) in the form:  (7)Il.

(35) r g
In this section we show that given an observer for (33): with (A -Kc) having eigenvalues in the stable region, we can design a sliding mode controller which guarantees global stability and x ( t ) + 0, provided that the perturbationf satisfies (34) with IH1 I small enough. In particular: (a) Let x^ be the estimated state defined by (36); (b) let: be the sliding mode control designed on the basis of the system, withf such that: Note that since the linear mapping (39) is known and exponentially stable, if we know a bound on f we can easily determine a bound onf in (38) and design a sliding mode controller for (38); (c) letf satisfy (34); Then there exists an H* such that: provided thatf is such that IH1 I < H * .

Proof [lo]:
In order to show the results, define the state estimate error, x" = x -x^. Then it is easy to see that (38) and (39) are an equivalent state-space representation of the system (33) and its observer (36). Also, by the arguments in Section I1 applied to the system (39), the control input u in (37) ensures that the estimated state x^ tends to the sliding surfacesT$ = 0 and then: Therefore we can look at the mapping (39) as a feedback connection as in Fig. 2 we can see that the system x^ +x is BIB0 stable, provided that IHoIIH1 I < 1, which proves the results.
This result shows that a control system designed on the sliding mode approach using an estimated state is still stable provided that the perturbations in its dynamics are "small enough" in their L , norm. Greater degrees of robustness can be achieved by the use of robust observers such as the class introduced in [17], provided that the entry point of the perturbations is known. This is the case, for example, of a system with dynamical equations: In this case it will be shown in a forthcoming paper [lo] that a class of observers can be constructed with an arbitrary degree of robustness.

VI. SIMULATION RESULTS
The sliding mode compensator was designed along the lines of Section I1 based on the nominal linear model (33) and for the nominal speed of 6 ft/s. Closed-loop poles -0.25 and -0.27 were selected for the system on the sliding plane with the third pole at zero. The poles chosen for the observer were -4.5, -4.75, and -4.95. Equation (17)  Comparison of the two responses demonstrates the expected ability of the sliding mode compensator to handle unmodeled nonlinearities. It is interesting to note that since the nonlinear vehicle experiences speed loss while diving, it switched its dive planes from +0.4 to -0.4 earlier than the linear model. The next test for the compensator was its robustness to parameter variations and unmodeled dynamics. Sliding mode controllers are expected to outperform more conventional linear state feedback schemes with respect to their robustness. This is true for the following two reasons: First, choosing q2 sufficiently large will guarantee that the system approaches the sliding surface even for the off-design case. Secondly, since at the final stage the system evolves in a lower dimension state space (the sliding surface), it is naturally more robust than the original higher dimensionality system. Fig. 4  and observer poles at (-6.57, -6.85, -7.13). As can be seen from Fig. 4, even under a 24:l change in the coefficient of   (40) to the nonlinear vehicle model under a wide variation in certain essential hydrodynamic and hydrostatic parameters. Simulation results are presented in Figs. 5-7 for the following system/model mismatch cases: The hydrodynamic coefficient M S is proportional to the pitch moment generated by the dive planes and is directly related to the gain margin of the system. As can be seen from the simulation results, the compensator provided stable response and performed consistently at different parameter values and coefficient mismatch. The adaptive algorithm presented in the previous sections has been simulated in several diving maneuvers, using the model developed in [2], [3], [12]. Figs. 8 and 9 compare actual and desired depth at 500 and 300 rpm, together with the adaptive gains and the signal (T =sTx in (25) driving the controller. From these and various simulations it can be seen that the tracking of the depth signal is obtained for different operating conditions. The adaptive gains provide the necessary stabilizing action, together with the variable structure input.

VII. CONCLUSIONS
A control algorithm for the diving maneuver of a submersible vehicle has been presented. Its main feature is that it combines the adaptivity of a direct adaptive control algorithm with the robustness of a sliding mode controller. At the same time, its implementation is simple enough to be attractive for on-line realization using commercial microprocessors. Also, it is shown that the controller presented in its nonadaptive form can be combined with a standard Luenberger observer designed on the basis of a nominal dynamic model.