Dynamic Positioning of Underwater Robotic Vehicles with Thruster Dynamics Compensation

The development of accurate control systems for underwater robotic vehicles relies on the adequate compensation of thruster dynamics. Without compensation, the closed-loop positioning system can exhibit limit cycles. This undesired behaviour may compromise the overall system stability. In this work, a fuzzy sliding-mode compensation scheme is proposed for electrically actuated bladed thrusters, which are commonly employed in the dynamic positioning of underwater vehicles. The boundedness and convergence properties of the tracking error are analytically proven. The numerical results suggest that this approach shows a greatly improved performance when compared with an uncompensated counterpart.


Introduction
The dynamic behaviour of a remotely operated underwater vehicle (ROV) can be greatly influenced by the nonlinear dynamics of the vehicle thrusters. In this way, the implementation of a proper control strategy for the thruster subsystem is essential for the accurate control of the entire robotic vehicle.
A growing number of papers dedicated to the dynamic positioning of ROVs confirms the necessity of the development of a controller, that could deal with the inherent nonlinear system dynamics, imprecise hydrodynamic coefficients, and external disturbances [4]. Many of these works [12,[25][26][27] address the problem of the influence of thruster dynamics on overall vehicle behaviour, and the importance of considering this effect in the dynamic positioning system.
Traditionally, some mathematical models of the thruster are used directly to estimate, in a feed-forward manner, the required voltage (or current) to produce the desired thrust force. This strategy has simplicity as an advantage and the fact that it does not require the angular velocity of the propeller to be measured. On the other hand, it can only be used with a precise mathematical model of the thruster system. The adoption of a standard model, available in the literature but not perfectly suited to the actual thrusters, is in many situations the reason for the poor tracking performance of a ROV. It has been previously reported [27], that this approach can lead to limit cycles in the closed-loop positioning system. As also shown in [27], this degradation in the controller performance is specially critical during low-speed manoeuvres with the vehicle. In such cases, the dynamic behaviour of underwater robotic vehicles can be dominated by thruster dynamics.
An alternative approach that may be considered, specially when a precise mathematical model for the thruster system cannot be obtained, is the design of a feedback compensation scheme for thruster dynamics. In this work, a sliding-mode compensator with fuzzy gain is proposed to calculate the required voltage for each thruster. The choice of a variable gain, defined by a fuzzy inference system, makes a better trade-off between reaching time and tracking precision possible.
The adoption of a saturation function (instead of a relay function) within the control law leads to a boundary layer, that can minimize or, when desired, even completely eliminate chattering. Through a Lyapunov-like analysis, the boundedness and convergence properties of the closed-loop compensation subsystem is proven.
Numerical simulations are carried out to demonstrate the robustness and improved performance of the compensation strategy.

Vehicle Dynamics Model
An adequate model to describe the dynamic behaviour of an underwater robotic vehicle must include the rigid-body dynamics of the vehicle and a representation of the surrounding fluid dynamics. In this context, the ideal mathematical model would be composed of a system of ordinary differential equations, to represent rigid-body dynamics, and partial differential equations to represent fluid dynamics.
In order to overcome the computational problem of solving a system with this degree of complexity, in the majority of publications [1,3,4,7,[13][14][15][16]23, 28] a lumped-parameters approach is employed to approximate the vehicle's dynamic behaviour.
The equations of motion for underwater vehicles can be presented with respect to an inertial reference frame or with respect to a body-fixed reference frame, Fig. 1. On this basis, the equations of motion for underwater vehicles can be expressed, with respect to the body-fixed reference frame, in the following vectorial form: is the vector of linear and angular velocities in the body-fixed reference frame, x = [x, y, z, α, β, γ] represents the position and orientation with respect to the inertial reference frame, M is the inertia matrix, which accounts not only for the rigid-body inertia but also for the so-called hydrodynamic added inertia, k(ν) is the vector of generalized Coriolis and centrifugal forces, h(ν) represents the hydrodynamic quadratic damping, g(x) is the vector of generalized restoring forces (gravity and buoyancy) and τ is the vector of control forces and moments.
It should be noted that in the case of remotely operated underwater vehicles (ROVs), the metacentric height is sufficiently large to provide the self-stabilization of roll (α) and pitch (β) angles. This particular constructive aspect also allows the order of the dynamic model to be reduced to four degrees of freedom, x = [x, y, z, γ], and the vertical motion (heave) to be decoupled from the motion in the horizontal plane. This simplification can be found in the majority of works presented in the literature [4, 8, 11, 13-15, 19, 28, 29]. Thus, the positioning system of a ROV can be divided in two different parts: depth control (concerning variable z), and control in the horizontal plane (variables x, y and γ).
In this context, considering that control forces and moments are produced by the thrusters of the vehicle, the dynamic model of the thruster subsystem is discussed in the following subsection.

Dynamic Thruster Model
The steady-state axial thrust (T) produced by marine thrusters is commonly presented as proportional to the square of the angular velocity Ω of the propeller [18]. This quadratic relationship can be conveniently represented by where C t is a function of the advance ratio and depends on the constructive characteristics of each thruster.
Taking the dynamical behaviour of the thruster system into account, Yoerger et al. [27] presented a first order nonlinear dynamic thruster model with propeller angular velocity as the state variable. This dynamic model, that can be represented by Eq. (3) and Eq. (4), is referred to here as Model 1.
where J msp is the motor-shaft-propeller inertia, K v stays for a model parameter, and Q m is the input motor torque.
In later works [2,10,12], more accurate models employing lift and drag curves, and that also incorporate some other hydrodynamic effects, such as those caused by the rotational fluid velocity, are proposed. In all of these models, a second order dynamic system with propeller angular velocity and axial fluid velocity as state variables is used. However, during real operations with an underwater robotic vehicle, the axial fluid velocity cannot be measured with the required precision, which compromises its application for control purposes as a model state variable.
Nevertheless, if the following physically justified assumptions could be made: However, considering recent experimental results, marine thrusters may also exhibit non-smooth nonlinearities such as dead-zones. A dead-zone is a hard nonlinearity, frequently encountered in many industrial actuators, and its presence can drastically reduce control system performance and lead to limit cycles in a closed-loop system. The experiments were carried out in a wave channel with the thruster units of a small remotely operated underwater vehicle, developed at the Institute of Mechanics and Ocean Engineering of the Hamburg University of Technology. The ROV is equipped with eight thrusters for dynamic positioning and a passive arm for position and attitude measurement. A picture of the experimental underwater vehicle is presented in Fig. 2.
Therefore, taking the experimental data into account, we propose a variation of Model 1 by incorporating some limitations of the actuator. This modified version, identified here as Model 2, can be mathematically represented by equations (5)- (6): where V m is the input voltage and D(Ω|Ω|) represents a dead-zone nonlinearity with a quadratic input Ω|Ω| and output T, which can be mathematically described by: The experimental remotely operated underwater vehicle.
The constants K t and R m , which represent the motor torque constant and winding resistance, respectively, can be obtained from the data-sheet. The values of K v1 , K v2 , K l , K r , δ l and δ r depend on the constructive characteristics of each thruster and must be experimentally determined. For control purposes, these parameters are treated here as constants for each thruster unit. This simplification is acceptable, as shown in the next section, due to the robustness of the proposed controller to parametric uncertainties.
By incorporating the term K v1 Ω in Eq. (5), Model 2 takes the back electromotive force and the viscous damping, due to mechanical sealing, into account.
The term K v2 Ω|Ω| represents the propeller rotational torque due to hydrodynamic loading. By adopting Eq. (6) to describe the relationship between the propeller's angular velocity and thrust force, the modified model also considers friction losses during the propeller's rotation. In the majority of works, the effect of friction losses is neglected.
The experimental data obtained in a wave channel with the thruster unit of the ROV can be used to validate the proposed modifications to Model 1. Figure 3 shows a comparative analysis between Model 1 [27], Model 2 (modified model) and the experimental thruster's response. The required parameters for both models are obtained using the Levenberg-Marquadt algorithm [17].
As observed in Fig. (3), Model 2 is better suited than Model 1 to representing the response of the thruster unit. This improvement is due to the incorporation of some of the thruster's electro-mechanical characteristics and the effect of friction losses during the propeller's rotation in the model. Such effects, that probably may be neglected in optimized thrusters, must be considered with the application of low-cost units.

Dynamic Positioning System
The dynamic positioning of underwater robotic vehicles is essentially a multivariable control problem. Nevertheless, as demonstrated by Slotine [21], the variable structure control methodology allows different controllers to be separately designed for each degree of freedom (DOF).   Over the past decades, decentralized control strategies have been successfully applied to the dynamic positioning of underwater vehicles [6,8,15,20,23,28].
Considering that the control law for each degree of freedom can be easily designed with respect to the inertial reference frame, Eq. (1) should be rewritten in this coordinate system.
Remembering thatẋ where J(x) is the Jacobian transformation matrix, it can be directly implied that Therefore, the equations of motion of an underwater vehicle, with respect to the inertial reference frame, becomesMẍ +k +h =τ (10) In order to develop the control law with a decentralized approach, Eq. (10) can be rewritten as follows: For notational simplicity the index i will be suppressed in Eq. (11) and, in this way, the equation of motion for each degree of freedom (DOF) becomes: In order to facilitate the analysis of the influence of thruster dynamics on the overall system behaviour, a 1-DOF underwater vehicle model with exactly known parameters is considered here. Otherwise, the actual effect of thruster dynamics over the vehicle dynamics would be masked by some variable parameters and cross-coupling effects.
Therefore, based on the assumption of well-known parameters and to highlight the influence of thruster dynamics, a feedback linearization approach is adopted for the dynamic positioning of the underwater robotic vehicle. The proposed control law can be written as where x d is the desired trajectory,x = x − x d is the tracking error and λ is a positive constant.
For this closed-loop system, composed by Eq. (12)-(13), we have the following error dynamics: with coefficients that satisfy a Hurwitz polynomial and ensure exponential convergence to zero. Now, considering the required thrust to make the vehicle follow a prescribed trajectory, defined by Eq. 13, we can calculate the desired force that should be produced by each thruster by T d = τ/N T , where N T is the available number of thrusters to actuate within the desired direction.
Finally, considering Eq. (6), a dead-zone inverse is used to compute the desired propeller angular velocity Ω d . It should be highlighted that, in order to define the dead-zone inverse, parameters K l , K r , δ l and δ r must be exactly known. If these parameters are uncertain or could not be experimentally obtained, a robust dynamic positioning system [3,4] or a dead-zone compensation scheme [5] should be taken into account.

Thruster Dynamics Compensation
In order to develop the compensation scheme, Eq. (5) can be rewritten as follows: where u is the input voltage and a, b and c are variable but positive and bounded parameters. If these parameters were perfectly known, then the following compensator would be enough to deal with the thruster's dynamic: Considering that only the estimatesâ,b andĉ are available, let the compensation problem be treated in Filippov's way [9], defining a law composed by an equivalent controlû = b Ω +ĉ Ω|Ω| +âΩ d and a discontinuous term −K sgn(s): where s =Ω = Ω − Ω d , Ω d is the desired propeller angular velocity, K is the compensator gain (which in this work is variable and determined by a fuzzy inference system), and sgn(·) is defined by Regarding the development of the control law, the following assumption must be made:

Assumption 1. The desired propeller angular acceleration (Ω d ) is continuous, available and with known bounds.
In this work, the desired propeller angular acceleration (Ω d ) is estimated using the backward difference method.
The compensator established in Eq. (17) is based on the classical sliding-mode control that originally appeared in Soviet literature [24]. It is able to deal with the parametric uncertainties but, as a drawback, leads to high control activity and chattering. To overcome these limitations, the relay function sgn(·) in Eq. (17) can be replaced by a saturation function [22], defined as: The substitution of sgn(·) by sat(·) leads to the appearance of a boundary layer (Φ) with width φ, which turn perfect tracking into a tracking with guaranteed precision problem.
In order to demonstrate that the proposed compensation scheme can deal with unstructured uncertainties, the term bΩ is treated as unmodelled dynamics and not taken into account within the design of the control law: Figure 4 shows the block diagram of the resulting dynamic positioning system.
On this basis, a variable gain, defined by a fuzzy inference system, is chosen in order to make a better trade-off between reaching time and tracking precision. The adopted fuzzy inference system is the zero order TSK (Takagi-Sugeno-Kang), whose rules can be stated in a linguistic manner as follows: If |s| is S n then k n = K n ; n = 1, 2, . . . , N where S n are fuzzy sets, and K n is the output value of each one of the N fuzzy rules, with K n > K n−1 . Triangular (in the middle) and trapezoidal (at the edges) membership functions could, for instance, be adopted for the fuzzy sets.
Considering that each rule defines a numerical value as output K n , the final output K can be computed by a weighted average: where w n is the firing strength of each rule.

Lemma 1. Let the fuzzy gain K be defined by Eq. (19), then
Proof. Equation (19)  Proof. To establish boundedness of the closed-loop signals, let us first define a Lyapunov function candidate V, where and s φ is a measure of the distance of the current state to the boundary layer (Φ), that can be defined as Noting that s φ = 0 inside the boundary layer andṡ φ =ṡ, we haveV(t) = 0 inside Φ, and outside: If the parameters a, b and c are unknown but assumed to be positive and bounded, which is physically coherent, and their estimatesâ andĉ are both positive constants, so that |f − f | ≤ F and α −1 ≤â/a ≤ α, where α = √ a max /a min , then we have: >From Lemma 1, defining K min = F +âαη +â(α − 1)|Ω d |, with η being a positive constant related to the convergence time, implies that K ≥ K min and thaṫ (26) implying that V(t) ≤ V(0), and, therefore, that s φ is bounded. From the definition of s φ , Eq. (21), we can conclude that s is also bounded. Considering Eq. (22), Lemma 1 and Assumption 1, it can be easily verified thatṡ is also bounded.
Integrating both sides of (26) between 0 and t reach , where s φ (t reach ) = 0, shows that Φ = { Ω | |Ω| ≤ φ} will be reached in a finite time smaller than This ensures the finite time convergence to the boundary layer and the boundedness of the closed-loop signals, completing the proof.
Theorem 1 also implies that the boundary layer is an invariant set, i.e., every system trajectory which starts from a point in Φ remains in Φ for ∀t ≥ 0. Inside the boundary layer Φ, the error dynamics takes the following form:

Simulation Results
The simulation studies were performed with a numerical implementation in C, with sampling rates of 500 Hz for ROV states and 1 kHz for propeller rotational velocity. The chosen parameters for the thruster model are:  Figure 5 shows some comparative results between FSMC and SMC. Figure 5 shows that the fuzzy sliding-mode compensator (FSMC) is capable of providing the stabilization of the desired propeller angular velocity even in the presence of both structured and unstructured uncertainties. It could also be observed that the FSMC shows a better and almost constant rising time for different values of Ω d , without increasing control activity and chattering. Now, in order to demonstrate the improved performance of the dynamic positioning system with the FSMC over the commonly adopted feed-forward approach, we show a comparison of both strategies for two different trajectories: (Fig. 6) and x d = 0.25[1 − cos(0.5πt)] (Fig. 7). In both cases, the input voltage in the feed-forward approach was directly estimated, based on thruster Model 2, with u =b Note that despite the better suited parameters of the feed-forward approach (M2BC), the proposed compensation scheme (FSMC) shows an improved performance. This is due to the ability of the FSMC to track the necessary angular velocity for the propeller, Fig. 6(c) and Fig. 7(c). Comparing Fig. 6(b) with Fig. 7(b), it could also be verified that the degradation in the controller performance, caused by the influence of thruster dynamics, is specially critical during low-speed manoeuvres with the vehicle. This result confirms that, in such cases, the dynamic behaviour of an underwater robotic vehicle can be dominated by thruster dynamics.

Concluding Remarks
The present work addresses the compensation of thruster dynamics in the dynamic positioning system of underwater robotic vehicles. A sliding-mode compensator with fuzzy gain is proposed to enhance the tracking performance.
The boundedness of the closed-loop signals' compensation subsystem, as well as the finite time convergence of the error to the boundary layer, is proven using Lyapunov's stability theory. By means of numerical simulations, the improved performance and the robustness to both structured and unstructured uncertainties, namely parametric uncertainties and unmodelled dynamics, are confirmed. Accordingly, this step can only be carried out if the matching procedure was already performed for the first error image. Therefore, only areas that were not removed during the first matching procedure are extended by corresponding areas of the subsequent error images. Otherwise, the noise (falsely detected areas) would cause an enlargement of incorrectly detected areas. The red short dashed rectangles in Figure 8 mark 2 examples of such corresponding areas. Resulting areas that are too large are removed from the error images I n and I n+1 . This is indicated by the areas in the right lower corner of error image I n in Figure 8. As can be seen, the resulting error image I n from Figure 8 is used as input (error image I n ) in Figure 7. Without the extension of the areas, the midmost candidate in Figure 7 would have been rejected.
As some real moving objects are sometimes not detected in an error image as a result of an inaccurate optical flow calculation or (radial) distortion, the temporal matching would fail. This could already be the case if only one area in one error image is missing. Thus, candidates that were detected once in 3 temporal succeeding error images and 4 greyscale images (original images), respectively, are stored for a sequence of 3 error images subsequent to the image where the matching was successful, cf. Figure 9(a). Their coordinates are updated for the succeeding error images by using the optical flow data. As a consequence, they can be seen as candidates for moving objects in the succeeding images, but they are not used within the matching procedure as input. If within this sequence of images a corresponding area is found again, it is stored for a larger sequence of images (more than 3) and its coordinates are updated for every succeeding error image. The number of sequences depends on the following condition: where c is the number of found corresponding areas and c is the number of missing corresponding areas for one candidate starting with the image where the candidate was found again. If ξ < 0 ∨ ξ > 10, the candidate is rejected. Moreover, the candidate is no longer stored if it was detected again in 3 temporal succeeding images. In this case, it is detected during the matching procedure. An example concerning to this procedure is shown in Figure 9(b). As one can imagine, error image I n in Figure 9(a) is equivalent (except area-extension) to I n+1 in Figure 7, whereas error image I n in Figure 9(b) is equivalent to I n+2 in Figure 9(a).
For a further processing of the data, only the position (shown as small black crosses in the left lower corners of the rectangles in Figures 7 and 9) and size of the rectangles marking the candidates are of relevance. Thus, for every error image the afore mentioned information is stored for candidates that were detected during the matching procedure, for candidates that were detected up to 3 error images before and for candidates that were found again (see above  Figure 9. Preventing rejection of candidates for moving objects that were detected only in a few sequences. (a) Storage of candidates for which a further matching fails. These candidates are marked by a blue dotdashed rectangle. The green dashed rectangle marks a candidate for which a corresponding area was found again and the red short-dashed rectangle marks a candidate with successful matching. (b) Storage of candidates for which a corresponding area was found again. The 2 areas drawn with transparency in error image I n indicate the position of the candidates, but they are not part of the error image.