Iterative Self-Tuning Minimum Variance Control of a Nonlinear Autonomous Underwater Vehicle Maneuvering Model

This paper addresses the problem of control design for a nonlinear maneuvering model of an autonomous underwater vehicle. The control algorithm is based on an iteration technique that approximates the original nonlinear model by a sequence of linear time-varying equations equivalent to the original nonlinear problem and a self-tuning control method so that the controller is designed at each time point on the interval for trajectory tracking and heading angle control. This work makes use of self-tuning minimum variance principles. The benefit of this approach is that the nonlinearities and couplings of the system are preserved, unlike in the cases of control design based on linearized systems, reducing in this manner the uncertainty in the model and increasing the robustness of the controller. The simulations here presented use a torpedo-shaped underwater vehicle model and show the good performance of the controller and accurate tracking for certain maneuvering cases.


Introduction
The use of underwater vehicles has grown to a great extent over the last few decades [1]. The so-called unmanned underwater vehicles (UUVs) and the autonomous underwater vehicles (AUVs) are of paramount importance in applications and procedures for underwater exploration, inspection, and maintenance of offshore structures. One sector that has significantly contributed to the state of the art of unmanned systems is the defense sector. A new generation of UUVs has been incorporated into the security sector for hazardous or high-risk missions such as mine clearance pathways, anti-submarine warfare, perimeter defense, surface warfare, and support for special operations forces [2]. This variety of applications and missions usually includes a basic maneuver, the well-known course-keeping maneuver, which is implemented by means of an autopilot or heading control.
In underwater vehicle autopilot design, the existing literature ranges from the application of PID and classical control [3] techniques to the application of modern techniques such as H-infinite [4], sliding model control [5][6][7][8][9][10], fuzzy control [11][12][13][14], neural networks [15], output feedback [16], linearization via state feedback [17], adaptive control [18], predictive control [19,20], and backstepping control [21,22]. These control methods provide good results in the cited references but are-in most cases-restricted to a certain operational condition. Furthermore, most of these contributions consider simplified models avoiding nonlinearities or variable couplings. In marine control applications, where the dynamics of the vehicle to be controlled are not sufficiently well-known and vary with the operating condition [23], self-tuning control may be used advantageously. Two of the most popular areas for the application of selftuning control are chemical and marine engineering; both are often characterized by unknown, nonlinear, and time-varying dynamics. On the other hand, there exist some contributions that apply self-tuning control theory to marine vehicles based on generalized minimum variance (GMV) principles. Goheen [24] presented a multivariable selftuning autopilot for autonomous and remotely operated underwater vehicles with satisfactory results but considers a linearization of the nonlinear maneuvering model for the application of the self-tuning control method. Similarly, in Idenawa [25,26], a linear model of a ship for the application a GMV control method is presented. In recent years, a nonlinear generalized minimum variance (NGMV) methodology has been used in order to achieve a reduction in roll dynamics and the coursekeeping motion in waves of ships [27,28], where a decoupled linear model for the application of the method was considered.
The aim of this work is to design a control method for a nonlinear maneuvering model of an underwater vehicle without performing any simplification in the model's nonlinearities or variable couplings differing from the contributions previously indicated or other recent ones related to ships that consider a simplified version of the model, such as Fan [29] and Zhang [30,31]. For this purpose, the authors propose the combination of an iteration technique used to accurately represent the original nonlinear system with a self-tuning minimum variance control method. The interesting aspect of this approach is that although, in general, linear control methods are not applicable in a successful manner to nonlinear systems, by applying this iteration method (Section 2), the nonlinear system is approached by a sequence of linear time-varying systems whose solutions converge to the nonlinear system. If the nonlinear system satisfies a mild Lipschitz condition, it is possible to apply a linear theory, such as self-tuning minimum variance (SMV). The iteration method was initially presented in Tomas-Rodriguez [32] and extended further in Tomas-Rodriguez [33].
It has been used in a broad spectrum of nonlinear systems applications, for example, observer design for nonlinear systems [34], optimal tracking control of super-tankers [35], range identification for perspective dynamic systems [36], the optimal attitude maneuver of nonlinear flexible spacecraft [37], spectrum reconstruction of nonlinearly distorted periodic signals [38], nonlinear optimal position control design for a two-link RR-robot manipulator [39], nonlinear passive system stability and convergence analysis [40], flight dynamics eigen structure assignment [41], nonlinear quadratic optimal control problems using Chebyshev polynomials [42], control of nonlinear distributed parameter systems [43], optimal control of nonlinear systems with input constraints [44], model reference adaptive control for nonlinear systems [45], and control of active suspension systems with a nonlinear actuator [46].
The main advantage of the cited iteration technique is that it maintains the inherent nonlinear characteristics of the system's behavior, providing the grounds for a robust control implementation where modeling uncertainties are removed. Furthermore, the application of a SMV method enables the system to adapt to the operating condition of the underwater vehicle, as indicated above, in the presence of noise.
The present article is organized as follows. Section 2 revises the theoretical background of the iteration technique to tackle a nonlinear system by means of a sequence of linear time-varying systems. Section 3 describes the nonlinear torpedo-type maneuvering model for the underwater vehicle used in this work; the thruster model is described, and the control and propulsion force distribution are also presented. Section 4 contains the methodology used to design a self-tuning minimum variance controller. Section 5 describes the vehicle's nonlinear dynamics control from the implementation point of view. Section 6 contains the simulations, results, and guidance for further research.

Nonlinear Systems Approximation by Iteration
In this section, an iteration approach for nonlinear systems is revised. It contains a description of its implementation, and its convergence theorem is described although it can be found in Appendix A.
This approach states that a general nonlinear problem can be substituted by a sequence of linear time-varying systems whose solutions converge (in the space of continuous functions) to the solution of the nonlinear system under a mild Lipschitz condition [32].
Formally, a nonlinear system is given in the form: whose initial conditions are Note that the nonlinear matrix A[ξ(t)] ∈ ℝ × is locally Lipschitz, and ξ(t) is the vector containing the system's states, which can be approximated by a sequence of linear time-varying equations where the vector of states ξ(t) in A[ξ(t)] and B[ξ(t)] is substituted at each iteration "i" by the states obtained in the previous iteration ξ (i−1) (t). u(t) is the control law. This is: for any i ≥ 1 and t ∈ [0, τ]. The limit of this sequence of solutions, ξ (i) (t)], converges to the solution of the nonlinear system ξ(t) given in (1): The convergence of this sequence is stated in the following theorem and its convergence proof can be found in Tomas-Rodriguez [32] and Tomas-Rodriguez [33], where the global convergence is extended to time intervals t ∈ [0, ∞]. The reader is referred to these for a detailed mathematical proof of convergence and stability. See Appendix A for the theorem statement.
After just a few iterations, an accurate representation of the nonlinear solution is reached. Nonlinear systems satisfying the local Lipschitz requirement (note this a mild assumption as it is an assumed condition for the uniqueness of solution [32])) can be now controlled by means of linear control methods and achieve stability. The exact number of iterations needed to achieve convergence to the nonlinear system depends on the choice of initial conditions, in other words: it depends on the initial states of the system to be controlled. For further details on the choice of the number of iterations and computational efficiency, the reader is referred to [33]. This technique represents a good alternative to most of the traditional linearization methods; the couplings and nonlinear characteristic behavior of the system are retained, being in this way a robust modeling method such that model uncertainties are reduced.
Note that the set of Equations (2a) and (2b) use the same set of initial conditions, coinciding with the original nonlinear system's initial conditions (1b). The iteration technique would work well with a different set of initial conditions, but convergence would take longer to achieve, which would imply a longer computing time.

Nonlinear Maneuvering Model
The underwater vehicle considered in this work is a torpedo-shaped type as shown in Figure 1 (the reader is referred to Appendix A for further details on the model). This vehicle has a maximum length of 1.65 m and a radius of 0.17 m. In this vehicle, three engines are mounted: two horizontal engines are fitted at the center of the vehicle to provide surge and yaw motions and a vertical engine is fitted for depth control. In order to describe the underwater vehicle's motion, a total of six degrees of freedom are needed: three translational (x, y, z) and three rotational (φ, θ, ψ). Two reference systems are used to represent the vehicle's displacement. One of them is fixed to the vehicle (the b-frame) [47], and it defines the vehicle's translational and rotational dynamics. The second one is located on the Earth (the n-frame), such that it describes the vehicle's position and orientation.
The nonlinear maneuvering model can be represented by the following differential equations [48]: where η = [x, y, z, φ, θ, ψ] T is the generalized positions and Euler angles vector, ν = [u, v, w, p, q, r] T is the vector of linear and angular speeds, τ = [X, Y, Z, K, M, N ] T is the vector of forces and moments, M is the added mass matrix, C(ν)ν represents the Coriolis term, G(η) is the restoring coefficients' matrix, J(η) is the rotation matrix, and D(ν)ν represents the hydrodynamic damping forces that are a combination of both linear and nonlinear terms.
In this paper, the study is restricted to the horizontal plane for simplicity, only sway and yaw degrees of freedom are taken into account, and the mathematical model used is the one of [49] in which nonlinear damping terms were taken into account. The matrices defined in Equation (5) are as follows: where m is the ship's mass, I 1 is the z-axis inertia moment, x + is the distance in the x axis from the center of gravity to the b-frame, and U is the nominal speed. The kinematics represented in Equation (4) cover the geometrical aspects of the vehicle's displacement without considering mass and forces. According to the degrees of freedom considered in (6), the corresponding kinematic model is as follows [3]:

Thruster Model
The thrust of the propulsion system of the vehicle can be modeled as: where ρ is the water density, Dh is the propeller's diameter, n is the propeller's angular speed expressed in revs per second (r.p.s), T 6 is the thrust provided by the l th thruster, t is the thrust deduction factor (typical values range from 0.05 to 0.2), and KT is the dimensionless coefficient [48]. By considering the two central thrusters as in Figure 1, one at port, Tp, and another at starboard, Ts, the total yaw moment induced by them is: where τ :,;7 is the yaw moment induced by the thrusters, this is the last component of vector τ in Equation (5), dp is the distance from the b-frame to the propeller, T ? is the starboard thrust, and T = is the port thrust.

Nonlinear State-Dependent Model Representation
In order to apply the control methodology proposed in this paper, first it is necessary to rearrange Equations (4) and (5) such that they are in the nonlinear state-dependent form similar to Equation (1a) in which the system's matrix depends on the system's states.
This work considers only horizontal displacements; therefore, the variable corresponding to the vertical displacement is not considered, the state vector is ξ t = [v r ψ xn yn] T , ξ ∈ ℝ 5 , and the control is u(t) = τ :,;7 .
The nonlinear matrices A[ξ(t)], B[ξ(t)] constitute the nonlinear dynamical model of the system under study:

Propulsion and Control Forces Distribution
The vehicle considered in this work has two horizontal thrusters, which provide the starboard thrust T ? and the port thrust T = (see Appendix B). In this particular case, there are two control inputs (np = revolutions of the port thruster, ns = revolutions of the starboard thruster) and one controllable degree of freedom, τ :,;7 (the yaw moment).
For underwater vehicles where the number of inputs is equal to or greater than the number of controllable degrees of freedom (DOF), as in the case of the vehicle that is the object of study in this work, it is possible to find an optimal distribution of the control energy for each degree of freedom as stated in Fossen [48]. This is the so-called control allocation system that can be implemented by calculating the generalized inverse for the specific case when all the inputs are equality weighted: If the Moore-Penrose pseudo inverse is considered, the control signals can be computed by: Finally, the control inputs for the starboard and the port thrusters are: n = = sign>u QS t @Tu QS t (13) n ? = sign>u QU t @Tu QU t where n = are the revolutions of the port propeller, n ? are the revolutions of the starboard propeller, u QS is the first component of the u Q (t) vector, and u QU is the second component of the u Q (t) vector.

Waves Model
The model defined in Section 3.2 is going to be excited with first-and second-order wave effects. According to Fossen [48], a state-space model of linear wave spectra can be defined as for the first-order effects: where w is the wave dominant frequency, ζ is the wave damping coefficient, Kw is a parameter used to adjust the wave amplitude, and w S is a Gaussian white noise sequence.
Moreover, the second-order wave drift forces `a are modeled as slowly varying bias terms (Wiener processes): where w U is a sequence of white noises.
The model defined in Equation (1a) with matrices defined in (10) is corrupted with waves by adding first-and second-order wave effects to the following vectors: ξ t = v r ψ + y W x y b u(t) = τ :,;7 + d W .

Self-Tuning Minimum Variance Controller Design
In order to design the control system, the authors have made use of a self-tuning minimum variance (SMV) approach based on the matrix inversion lemma and recursive least squares (RLS) [50]. The standard minimum variance approach leads to a self-tuning algorithm in which the controller parameters are directly estimated by RLS (see Appendix C).
First, recall the generalized system pseudo-output: This can be expressed as the sum of two uncorrelated terms, where only the first of them is influenced by the control action u(t): The polynomials F, G, and H are obtained from The generalized controller is of the form: The parameters n p and n Q are the dimensions of the polynomials A and C, respectively.

Underwater Vehicle Nonlinear Dynamics Control
The well-known term 'autopilot' refers to two important purposes: course-keeping and change of course [3]. In the first case, the vehicle tracks a desired trajectory by following a reference constant heading, rψ (t) = ψ(t). In the second case, the control objective is to achieve accurate heading changes without introducing large response oscillations and within the minimum time. In both cases, the control system's performance must be satisfactory despite the presence of possible external factors/disturbances. Keeping these objectives in mind, this is achieved in this work by designing a controller that combines the iteration technique presented in Section 2 with a self-tuning minimum variance controller in the presence of noise (described in Section 4). The logical process is summarized in Figure 2.

Iteration Technique Approximation of the Nonlinear Vessel Model
The equations of motion of the system are nonlinear and are written in the state-dependent form (1) where the state matrices are given in (10): where ξ(t) is the vector containing the vehicle states, λ(t) is the output vector, C ℝ 1xn , and the control u(t, Θ r ) will be designed by using MV methods as presented in Section 3. Now, the system (18) is approximated by the following sequence of linear time-varying systems: For each of these "i" linear time-varying equations, a control action signal u (i) (t, Θ r(i) ) is designed following a self-tuning minimum variance algorithm. Once the last iteration is obtained, as the sequence of solutions converges to the nonlinear solution, Limi→∞ [ξ (i) (t)] → ξ(t), the last designed control signal u (i) (t, Θ r (i) ) can be applied to the original nonlinear model, achieving satisfactory trajectory control: For further details on this method and the mathematical proof, the reader is referred to Tomas-Rodriguez [32].

Algorithm Implementation
The heading control algorithm is implemented as a loop that is repeated as many times as "i" iterations are needed for convergence.
A brief outline of the algorithm is described in the lines below. The notation used is as follows: ξ are the initial states values, Θ r are the initial controller values, t0 is the initial time instant, tf is the final time instant, h is the sampling time, tol u are the tolerances of the states ξ, P0 is the initial covariance matrix, P, Q, and R are the self-tuning minimum variance constants (see Equation (16)), χ0 is the initial regression vector, d is the lag, and k0 is the initial time instant.

Simulations and Results
The control objective in this work is to design a control signal u(t) such that the underwater vehicle under consideration sustains a straight course-keeping trajectory. For this purpose, a step function reference signal is used, rψ (t), so that if adequately followed, it should lead to accurate course-tracking by the ship's nonlinear model. The simulations here presented were run in Matlab and a time step of h = 0.03s was used. In order to verify the robustness of the controller, two different scenarios were considered: in the former, the simulated data were corrupted with noise levels of standard instrumentation; and, in the latter, simulations were run under the influence of the first-and second-order wave effects indicated in Section 3.4.
The simulations followed the same logic and rationale as the theory previously presented in this article. First, the nonlinear system (Equations (4) and (5) Secondly, the iteration method in Section 2 was applied to the nonlinear system and several linear time-varying (LTV) systems were generated. A minimum variance method based on a RLS algorithm was implemented in Matlab so that for each iterated LTV system, it estimates the required control parameters, Θ (i) = [f0, g0, g1, g2, h0] (i) . Finally, in the case here studied for the nonlinear model in (5), after a few iterations, there was an evident convergence of the states' vector towards the prescribed head angle trajectory (step function). Therefore, the last iterated control law u (i)( t, Θ r ) was applied to the original nonlinear system and it is shown how this approach is effective in controlling the heading angle to achieve the desired course-keeping trajectory.
The following figures show these results for a typical course-keeping or heading control maneuver to test the performance of the proposed controller for the first scenario. Figure 3 shows the heading angle time response for various iterations, ψ (i) (t), i = (1 . . . 9), when for each of these iterations the corresponding control law u (i)( t, Θ r ) is designed by estimating the RLS parameters Θ r(i) . It must be noted that the controller's performance for a sustained zig-zag trajectory would be similar to the one shown in Figure 3. We include one change in the step input from a positive to a negative value, which is enough to show the change of course characteristics provided by the controller. Moreover, Figure 4b shows a zoomed-in view of the final seconds of the time interval in which the convergence can be observed. In fact, from the fifth iteration onwards, the convergence is clear. In this case, in order to ensure stability, the authors decided to choose the ninth iteration as the one to provide the controller's parameters to control the nonlinear system.
The time history of each of the control parameters estimated for the ninth iteration is shown in Figure 5. Additionally, Figure 6 shows the control law designed in the ninth iteration. This signal was later applied to the original nonlinear system (11).
Finally, Figure 7 shows the nonlinear system's heading angle following an alternating step input reference signal once it has been controlled by the final iterated control. Clearly, this is a valid approach to control the vehicle's trajectory as is shown in Figure 8, where two maneuvers of straight course-keeping are shown. Figures 9 and 10 show the results for the second scenario considered in this work under the influence of first-and second-order wave effects. The parameters of the wave model defined in Section 3.4 were tuned considering low wave effects for the operational conditions of the underwater vehicle indicated in Appendix A, in which the effects induced by waves are expected to be low. This was done by tuning the cited parameters until a magnitude of 2 degrees in yaw was obtained (see [48]). Figure 9 shows how the controller is capable of compensating for first-and second-order wave effects, since the oscillations are low and the system is able to follow the step reference, respectively. The zoomed view of Figure 10b exhibits the convergence with similar results to the first scenario. A clear convergence is seen from the fifth iteration, although the ninth was chosen in order to have a small enough error with respect to the reference signal. The results given in the first and second scenario indicate that the nonlinear adaptative control methodology with the iteration technique is robust.

Conclusions
This article introduces a nonlinear adaptative control methodology for an underwater vehicle's trajectory tracking. The method here proposed is based on approaching the nonlinear vehicle's dynamics by using an iteration technique such that the control is designed by using adaptive methods for the last iteration. This control will then be applied to the original nonlinear problem. The iteration technique, by generating a sequence of linear time-varying equations that approximate the original nonlinear dynamics, allows for the possibility of applying linear control techniques. This is a good advantage since linear control methods are usually simpler and computationally cheaper to implement. The simulation results for a course-keeping maneuver show a good performance considering two different scenarios under the presence of noise in the measurement and wave effects.
The authors are currently working on adapting the iteration technique for real-time controller implementation. This requires transforming the iteration technique into a recursive method. Then, it Heading Angle (t)(rad) could be tested in sea trials under different operational conditions. Findings using experimental data are expected to be obtained as a second phase of this work and developed in further research.