Fault Tolerant Depth Control of the MARES AUV

Control theory has been applied to several domains where practical considerations are relevant. Robotics is a notable example of this. In most cases, mobile robotic systems are governed such that their behavior obeys to a defined motion. However, during their operations, it is conceivable that faults could occur. Indeed, this assumption has to be made in order to predict a possible malfunction and to take an appropriate action according to the fault, improving the robustness and the reliability of the system. This work tackles the problem of fault detection, identification and automatic reconfiguration of an autonomous underwater vehicle (AUV). Although our emphasis will be directed to an AUV, the methods and the tools that are employed in this chapter can be easily extended to other engineering problems beyond robotics. In this work, we will consider the MARES (Modular Autonomous Robot for Environment Sampling) (Fig. 1) Cruz & Matos (2008); Matos & Cruz (2009), a small-sized (1.5 meters long), torpedo shaped AUV weighting 32 kg, able to move at constant velocities up to 2.5 m/s. Its four thrusters provide four degrees of freedom (DOF), namely surge, heave, pitch and yaw. One of its main particularities is the capability to dive independently of the forward motion. The vertical through-hull thrusters provide heave and pitch controllability, while the horizontal ones ensure the surge and the yaw DOFs. The heave and pitch DOFs make the vertical plane control redundant when the vehicle is moving with surge velocities different from zero. In other words, the vehicle remains controllable if only one of these two DOFs is available. Such characteristic will be explored along this chapter in which the control of the nonlinear dynamics of the AUV Ferreira, Matos, Cruz & Pinto (2010); Fossen (1994) constitutes a challenging problem. By taking advantage of the distribution of the actuators on the vehicle, it is possible to decouple the horizontal and the vertical motion. A common approach in such systems is to consider reduced models in order to simplify the analysis and the derivation of the control law (see Ferreira, Matos, Cruz & Pinto (2010); Teixeira et al. (2010) or Fossen (1994), for example). In general, for topedo-shaped vehicles, coupling effects due to composed motions (e.g., simultaneous sway and heave motions) are clearly smaller than the self effects of decomposed motion (e.g., effect of the heave motion on the heave dynamics) and can therefore be considered disturbances in the reduced model in which they are not included. Thus, a reduced model will be considered to deal with the vertical motion taking surge, heave and pitch rate as state components. In order to make the detection and identification of possible faults, we present a method based on process monitoring by estimating relevant state variables of the system. See Frank & Ding (1997) for an overview on several techniques andZhang & Jiang (2002) for an application to a particular linear system. Wu et al. (2000) have developed an algorithm based on the two-stage 3


Introduction
Control theory has been applied to several domains where practical considerations are relevant. Robotics is a notable example of this. In most cases, mobile robotic systems are governed such that their behavior obeys to a defined motion. However, during their operations, it is conceivable that faults could occur. Indeed, this assumption has to be made in order to predict a possible malfunction and to take an appropriate action according to the fault, improving the robustness and the reliability of the system. This work tackles the problem of fault detection, identification and automatic reconfiguration of an autonomous underwater vehicle (AUV). Although our emphasis will be directed to an AUV, the methods and the tools that are employed in this chapter can be easily extended to other engineering problems beyond robotics. In this work, we will consider the MARES (Modular Autonomous Robot for Environment Sampling) (Fig. 1) Cruz & Matos (2008); Matos & Cruz (2009), a small-sized (1.5 meters long), torpedo shaped AUV weighting 32 kg, able to move at constant velocities up to 2.5 m/s. Its four thrusters provide four degrees of freedom (DOF), namely surge, heave, pitch and yaw. One of its main particularities is the capability to dive independently of the forward motion. The vertical through-hull thrusters provide heave and pitch controllability, while the horizontal ones ensure the surge and the yaw DOFs. The heave and pitch DOFs make the vertical plane control redundant when the vehicle is moving with surge velocities different from zero. In other words, the vehicle remains controllable if only one of these two DOFs is available. Such characteristic will be explored along this chapter in which the control of the nonlinear dynamics of the AUV Ferreira, Matos, Cruz & Pinto (2010); Fossen (1994) constitutes a challenging problem. By taking advantage of the distribution of the actuators on the vehicle, it is possible to decouple the horizontal and the vertical motion. A common approach in such systems is to consider reduced models in order to simplify the analysis and the derivation of the control law (see Ferreira, Matos, Cruz & Pinto (2010); Teixeira et al. (2010) or Fossen (1994), for example). In general, for topedo-shaped vehicles, coupling effects due to composed motions (e.g., simultaneous sway and heave motions) are clearly smaller than the self effects of decomposed motion (e.g., effect of the heave motion on the heave dynamics) and can therefore be considered disturbances in the reduced model in which they are not included. Thus, a reduced model will be considered to deal with the vertical motion taking surge, heave and pitch rate as state components. In order to make the detection and identification of possible faults, we present a method based on process monitoring by estimating relevant state variables of the system. See Frank & Ding (1997) for an overview on several techniques andZhang & Jiang (2002) for an application to a particular linear system. Wu et al. (2000) have developed an algorithm based on the two-stage Kalman filter to estimate deviations from expected input actuation for a linear system. Their approach consists in estimating the loss of control effectiveness factors that are added as entries of the state estimate, while guaranteeing that the corresponding estimate covariance lies in a defined interval. By imposing boundaries on the corresponding eigenvalues, it is possible to avoid impetuous corrections or to be insensitive to measurements. Inspired on the work by Zhang & Jiang (2002) and Wu et al. (2000), the present paper describes the implementation of an augmented state extended Kalman filter (ASEKF) to estimate the effectiveness of the control commands, detect and identify the possible faults. The present work focuses on the vertical motion considering faults on the vertical thrusters. The method for accomodation of the faults consists in three main steps: fault detection, fault diagnosis and decision. Fault detection is responsible for creating a warning whenever an abrupt or an incipient fault happens, while fault diagnosis distinguishes and identifies the fault. In the presence of faults, a decision must be taken, adopting a suitable control law to stabilize the vertical motion. In the presence of faults in one of the vertical thrusters, the heave motion will no longer be controllable. Consequently, a control law derived for normal operation could be inadequate or even turn the feedback system unstable when such a fault occurs. An algorithm has to be developed in order to make the behavior of the robotic system tolerant to faults. Making use of the pitch angle controllability, we will derive two control laws to drive the vehicle to a depth reference, possibly time variant. To achieve so, we make use of the Lyapunov theory, adopting the backstepping method Khalil (2002). Nevertheless, the presence of biases in steady state shifts the error at equilibrium away from zero. Those biases are commonly induced by unmodeled, neglected effects or external disturbances whose values are hard to observe or to estimate. The introduction of an integral term, under some assumptions, would solve the problem allowing the error to converge to zero as time goes to infinity. Based on the conditional integrators, extended by Singh & Khalil (2005) to more general control framework beyond sliding mode control Seshagiri & Khalil (2005), we present a control law that makes it possible to achieve asymptotic regulation of the vehicle depth error when operating with only one thruster. The method considers an integral component in the control law derived in the backstepping first step. Beyond the derivation and the particularization of the mathematical tools used here, we demonstrate our approach by illustrating the work with real experiments, voluntarily inducing faults on the system, and analyze the behavior of the dynamic system under such conditions. The organization of the chapter is as follow: the section 2 describes the MARES AUV and presents the main mathematical models under consideration here, namely the kinematic and the dynamic models. In section 3, we introduce the relevant concepts and formulate the ASEKF from a reduced model of the vertical dynamics and describe how to identify the fault. In section 4, we derive the control law to drive the depth error to zero making use of the tools described above. Finally, in 5, our solution is demonstrated through real experiments.

MARES
The MARES autonomous underwater vehicle was developed in 2006 at the Faculty of Engineering of the University of Porto (FEUP). Typical operations have been performed in the ocean and fresh water, collecting relevant data for surveys and environmental monitoring during several tens of missions to date. Its configuration was specially designed to dive vertically in the water column while its horizontal motion is controlled independently, resulting in truly decoupled vertical and horizontal motions.
Such characteristic is particularly appreciated in missions where the operation area is restricted or precise positioning is required. Parallel to the missions to collect data, the MARES AUV has also been used as a testbed for intensive research being performed in several problems related to robotics, specially on localization and control. Thus, besides the typical applications, several missions have been conducted to test and to verify implemented algorithms. Before presenting our method to detect a possible fault and to control the vehicle under such situation, let us first introduce the kinematics and dynamics concepts and equations. We assume an inertial earth-fixed frame {I} = {x I , y I , z I }, where x I , y I , z I ∈ R 3 are orthonormal vectors (in the marine literature, they are often made coincident with north, east and down directions, respectively), and a body-fixed frame {B} = {x B , y B , z B }, where x B , y B , z B ∈ R 3 are orthonormal vectors frequently refered to as surge, sway and heave directions, respectively (see Fig. 2). The absolute position and orientation of the vehicle is expressed in the inertial frame {I} through the vector η c =[η 1 , η 2 ] T =[x, y, z, φ, θ, ψ] T , where η 2 =[ φ, θ, ψ] T is the vector of euler angles with respect to x I , y I and z I , and [x, y, z] are the coordinate of the frame {B} expressed in {I}. The vehicle's velocity, expressed in the body frame {B}, is given by ν c =[ u, v, w, p, q, r] T , where p, q and r are the angular velocities along x B , y B and z B , respectively. The velocities in both referentials are related through the kinematic equation Fossen (1994) whereη c denotes the time derivative of η and J(η 2 )=block diag[J 1 , J 2 ] represents the rotation matrix, with J 1 , J 2 ∈ R 3×3 . Although this transformation is common in the literature to map vectors from a referential frame to another, it is not the only one. An alternative can be found in quaternions (see Zhang (1997), for an introduction and useful results), avoiding the singularity problems of the matrix J 2 . However, in this chapter, we will assume that the values of the angles that make the matrix J 2 singular (and J, consequently) are not reached. Moreover, since the water currents present in the ocean and in the rivers do not influence the development of the present work, they will not be considered for simplicity.

51
Fault Tolerant Depth Control of the MARES AUV www.intechopen.com

Fig. 2. Body frame and inertial frame referentials
As it is well known, rigid bodies moving in the three dimensional space are governed by nonlinear equations. For the particular case of underwater vehicles, such equations include the effect of the added mass, viscous damping, restoring and actuation forces and moments. Following the notation in Fossen (1994), the nonlinear second order, six dimensions equation is written as: where M c ∈ R 6×6 is the sum of the body inertia and added mass matrices, C c ∈ R 6×6 results from the sum of the Coriolis and centrifugal terms from body inertia and added mass, D c ∈ R 6×6 is the viscous damping matrix, g c ∈ R 6 is the vector of restoring forces and moments and τ c ∈ R 6 is the vector of actuation forces and moments. Such system is complex and the task of deriving control laws that ensure stability is not trivial, having led to order reduction in several works (see Ferreira, Matos, Cruz & IEEE (2010); Fossen (1994); Teixeira et al. (2010), for example). By taking advantage of the body shape symmetries and of the configuration of the actuators on the body, it is usual to decouple the complex motion in more elementary ones. However, this has consequences since some cross-coupling terms are eliminated but their influence is often small and can be neglected or considered disturbances. Such approach has been implemented in the MARES AUV and the corresponding performances were already demonstrated in Ferreira, Matos, Cruz & Pinto (2010). The current thruster configuration on the MARES makes it possible to decouple the motion into the vertical and the horizontal plane. Since the roll angle is stable (and φ ≈ 0) two reduced order models are extracted. See Ferreira, Matos, Cruz & Pinto (2010), for further details.

Fault detection and identification
Under normal operation, the vertical thrusters of MARES provide the capability to control almost independently the pitch and heave degrees of freedom (DOF). In the same way, the horizontal thrusters make possible the control on the surge and yaw DOFs. As it will be exposed later, the vehicle remains controllable if one of the vertical thrusters fails. As an aside, note that the same is not verified if one the two horizontal thrusters fails since the surge and the yaw motion can no longer be decoupled. The derivation of the control laws is left to the next section.
Several approaches for fault identification and detection have been proposed, commonly based on observation of the residuals Frank & Ding (1997) either by using state observers or by using accurate models. Our approach makes use of an extended Kalman filter to detect the faults, indirectly exploiting the residuals to estimate actuation bias variables additionally incorporated in the state. A similar approach was already carried out by Zhang & Jiang (2002) where they used a two stage Kalman filter to identify the faults on actuation of a linear system. The method presented here makes it possible not only to detect faults but also to identify the faulty actuator. By taking advantage of the cyclic predictions and corrections, the main idea behind our approach is to estimate the biases on the actuation (or deviation from the nominal value, commonly referred to as loss of control effectiveness factor in Wu et al. (2000); Zhang & Jiang (2002) whose values should theoretically equal zero when no fault is occuring.

Vertical plane dynamics
The implementation of the extended Kalman filter assumes the use of a reasonably accurate dynamics model that recreates mathematically the behavior of the system for the prediction step. As it was pointed out in the previous section, the use of the complete model of the vehicle dynamics is complex and computationally expensive. Thus, from 2, we derive the reduced model for the vertical motion, considering that cross-terms are negligible: The authors recommend Fossen (1994); Triantafyllou & Hover (2002) for details about the parameters above and their derivation, and Hoerner (1993); White (2008) for further details. Notice that f t (t) is the vector of forces applied by the thrusters that are generated according to a given control law, and f p , f r , f s and f b are scalars that represents the force applied by the port, starboard, stern and bow thrusters, respectively. We assume that such forces can be directly measured during operation. The inclusion of the surge velocity is required in this reduced order model due to the nonnegligible influence it has on the vertical plane dynamics. The parameters used in the reduced model are listed in the table 1.

Augmented state extended Kalman filter formulation
Our final goal in this section is to detect and to identify a fault occuring on one of the vertical thrusters. To this end, one aims to quantify the loss of control effectiveness of the referred actuators: The effective force applied by the vertical thrusters may differ from the commanded one. We will consider that f s and f b are the commanded forces, which may not correspond Vehicle's mass W 3.14 · 10 2 N Vehicle's weight B 3.16 · 10 2 N Vehicle's bouyancy z CB −4.40 · 10 −3 mz B of CB w.r.t CG Xu −1.74 · 10 0 kg Added mass longitudinal term Xq −3.05 · 10 −2 kg · m Added mass cross-term Zẇ −4.12 · 10 1 kg Added mass heave term Zq −1.23 · 10 −1 kg · m Added mass cross-term Mu −3.05 · 10 −2 kg · m Added mass cross-term Mẇ −1.23 · 10 −1 kg · m Added mass cross-term Mq −6.07 · 10 0 kg · m 2 Added mass pitch term X |u|u −1.04 · 10 1 kg · m −1 Drag longitudinal term Table 1. Reduced model terms to the effective applied force. Like in many other problems in robotics, it is often difficult or even impossible to measure such forces. Measuring relative or absolute motion variables then becomes an alternative and the choice of the state to be observed is directly influenced by the variables that can be actually measured. Therefore, we propose the following model for the fault free ideal system: where w x ∈ R 4 is a zero-mean Gaussian noise vector with autocorrelation matrix Q w (t), A l and f u (·) are easily derived from the kinematics model in 1 as assuming φ = 0, and f (·) results from the dynamics model 3 as Regarding the output y of 4, the dimension of the function h(x) depends on the measurements and consequently on the on-board sensors. Here, we will assume we are able to observe the depth z, the pitch angle θ and the pitch rate q. Thus it results The vector v n ∈ R 3 is the output noise, assumed to be zero-mean, Gaussian noise with autocorrelation matrix R v .
Notice that x 2 is the vector containing the last two entries of the velocity vector ν, i.e., ν = [u, x 2 ]. For simplicity of notation, in the expressions above we wrote ν instead of [u, x 2 ]. Recall that we assumed that u is a measured variable, or at least, it can be accurately estimated. Indeed, it could be included in the state in 4 but the complexity of this latter would increase without advantages in the approach. In order to model the possible loss of control effectiveness, let us define γ =[ γ s , γ b ] T as the vector of loss of control effectiveness factors, adopting the same notation as in Wu et al. (2000). Introducing these multiplicative factors in 4, the augmented state model results iṅ where w γ ∈ R 2 is a zero-mean, Gaussian noise vector with autocorrelation matrix Q γ , uncorrelated with w x , and As it can be seen in 5, γ is assumed to be driven only by the noise w γ . This comes from the fact that, in real scenarios, it is impossible to predict how the fault and, consequently, how γ evolve. In such situation, the most appropriate is to model the evolution with a noise vector w γ with a sufficiently large autocorrelation (see Wu et al. (2000)), whose entries can play an important role in the design of the augmented state estimator, as it will be seen later on.
The discrete time representation of 6 follows where β k represents the discrete time equivalent vector, or matrix, β at time t k . We assume that the process noise w sk and the output noise v k are uncorrelated, i.e., E{w sk v T k } = 0. The autocorrelation of the process noise and of the output are respectively given by The formulation of a Kalman filter assumes the use of a model of the process which is a mathematical representation of the dynamics. However, the mathematical translation of the dynamics of a given system may be inaccurate or may not describe entirely its behavior. This is the case in hydrodynamics, where the models are complex, difficult to extract. Moreover, there is no complete theory that allows for determining an accurate model and calculations of parameters mostly rely on empirical or semi-empirical formulas. Hence, we defineβ as the estimate of the generic vector, or matrix, β. The augmented state extended Kalman filter formulation follows now directly from Gelb (1974). During the prediction stage, the state estimate and the covariance matrix evolve according tô where F k stands for the Jacobian ofṡ evaluated atŝ k : The so-called Kalman gain and the updates of the estimate and of the covariance matrix are respectively given by From the state estimate, it is now possible to extract the vector γ k , whose entries constitute the base to determine whether a fault has occured or not.
As it was stated earlier, the autocorrelation matrix Q factors. For the sake of clarity, from 10 and 13 we can decompose P k as Thus, from 10 and 13, we can conclude where we used the fact that P k+1|k > 0. Hence, the autocorrelation matrix Q γ k can be set such that P γ lies in an interval, preventing state corrections to be excessive, when P γ is too large, or to be insufficient with slow convergence, when P γ is too small. Taking the eigenvalues λ γ of P γ as measures, we propose the following function where q γ is the autocorrelation of γ i , i = 1, 2 and λ max is a preset maximum constant.

Fault identification
The loss control effectiveness factors provide an estimate of the performances of the actuators. Ideally, a fault would be identified whenever the absolute value of one of the factors would rise above a preset threshold. However, model uncertainties will be directly reflected in these factors. Even in normal operation, with the actuators working perfectly, the loss of control effectiveness factors may diverge from zero, reflecting, for example, the effect of a damping force greater than the modeled. As these errors are frequently commited on the overall model, their effects are verified on all actuators either by increasing or decreasing the loss of control effectiveness factors. Hence, for the present case, a reasonable measure of the malfunction of one of the thrusters is given by the difference of the corresponding loss of control effectiveness factor estimate. On the other hand, taking a decision about the malfunction of a given thruster should also be based on the confidence of the factor estimate, which can be indirectly taken from the eigenvalues λ γ of P γ k , avoiding taking decisions on transient state, while considerable corrections on the state are being performed. Thus, we propose the following measure for fault detection: where f λ is a monotically increasing function of its argument. Whenever δ is greater than a preset threshold, a fault is detected and the identification is made according to the greater λ, i.e., if γ s > γ b then the stern thruster is faulty and vice-versa.

Control of MARES
In the presence of a faulty vertical thruster, the reconfiguration of the actuation is required. Otherwise, keeping the same actuation will likely lead to instability or to other pratical problems such as thruster dammage or large battery consumption, for example. Therefore, the control law for normal operation could be inadequate and another control law must take  over. In this section, we first start by deriving such controller and present the main concepts behind the derivation of the control for normal operation in order to make the result section clear.

Control under fault
We consider now the scenario in which only one of the vertical thrusters is available to control the motion of the vehicle. Under such situation, the heave DOF is no longer controllable but the depth is still controllable by manipulating pitch. Based on the Lyapunov theory we will derive a controller that makes it possible to control the vehicle's depth, while assuming that the absolute value of the surge velocity is sufficiently large to compensate the vehicle's flotation. The derivation of the controller employs the well know backstepping method as well as conditional integrators to achieve asymptotic regulation. As the final goal in this section is to control the vehicle depth, we will assume that roll angle is null (φ = 0), resulting:ż = −u sin θ + w cos θ Let us introduce the error variable e z = z − z d , which we want to drive to zero, and the quadratic Lyapunov function: whose time derivative resultṡ Although u, θ and z are measured by sensors or estimated, it is hard to accurately compute w due to model uncertainties and measurement noise. Thus we will assume that it constitutes a disturbance acting on the system, shifting the equilibrium point e z = 0 to an uncertain value. Throughout the following developments, we will consider that the surge velocity is maintained constant in order to simplify our approach. Indeed, in most missions the surge velocity is intended to be constant along the trajectory. Moreover, the limited actuation on the vertical thruster makes the pitch angular velocity to lie in a bounded interval. Hence, from the vertical dynamics, we can assume that there exists an upper bound on the absolute value of w ∈ [−w max , w max ].  Inspired by Singh & Khalil (2005), let us suppose we are able to handle θ directly through the virtual control law where ϕ(·) : R → R is the continuous infinitely differentiable sigmoid function which verifies xϕ(x) > 0, x = 0, and α(·) > 0 is a continuous function left to be determined later. Of course, handling θ directly and instantaneously is not realistic and such assumption will be lifted next. In opposition to Singh & Khalil (2005), we have selected a sigmoid function ϕ instead of a saturated linear function due to the differentiability characteristic. Let us take take ς = 2, which will make ϕ(·) equal to the hyperbolic tangent function. Assuming z d sufficiently smooth, u > 0 and imposing the time derivative of the Lyapunov function in 18 resultṡ where we used the fact that | cos θ|≤1 and w be bounded. By choosing appropriately α(·) and ϕ(·), the system can now be made pratically stable (see Singh & Khalil (2005)). Hence, let us define ε ∈ (0, 1) and take µ = Thus, the system is made pratically stable and the invariant set for which the error tends to can be made arbitrarily small by handling µ. However, a too small µ induces chattering phenomena which are intended to be minimal. Taking into account that V 1 is a strictly increasing function of e z from the last inequalities, we can state that the error enters a positively invariant set Ω = {e z ≤ 1}. However, due to non-null disturbances considered above, asymptotic stability can not be achieved. Therefore, following the same idea as in Singh & Khalil (2005), the conditional integrator is now introduced to obtain asymptotic convergence to the origin e z = 0. Modifiyng the control law in 19 to include an integral component, it results Since |φ(x)| < 1, ∀x ∈ R, it is easy to check that σ ≤ µ γ . In order to guarantee convergence to zero, one has to set γ and µ such that the maximum absolute value of the integral satisfies|σ| > µ|ϕ −1 w max K z |. Although conservative, this will allow the integral component to compensate the disturbance effect. By applying theorem 1 in Singh & Khalil (2005), convergence to e z = 0 as t → ∞ is ensured. So far, we have considered that we are able to handle θ directly, which is not true, as it was stated before. Thus, based on the backstepping method Khalil (2002), let us introduce the new error variable e θ = θ − θ d and the new augmented Lyapunov function as follows whose time derivative resultsV the time derivative of the augmented Lyapunov function satisfiesV 2 ≤V 1 − K θ e 2 θ . Taking into account the previous result about the convergence of e z to zero and the fact that V 1 is a class K ∞ function, we can deduce that V 2 → 0ast → ∞. Nevertheless, we are not able to handleθ directly and, as it can be seen from 1 and 2, a last step is required. Hence, we define e q = q − q d = S q ν − q d , with S q =[0, 0, 1], as the pitch rate Considering 3, the time derivative resultṡ where P i and f pi , i = {s, b}, are given as functions of the actuator configuration. When the vehicle is operating with only one thruster, either stern or bow thruster, P i and f pi are respectively given by Note that P i takes the form P =[P h |P vi ], where P h ∈ R 3×2 is the submatrix composed by the first two columns of P i and P vi ∈ R 3×1 is the last column of P i . Further, let us decouple the input vector into where f h ∈ R 2 is composed by the first two entries of f pi and f i is the last entry of this latter, which we can manipulate directly. By considering the decoupled form of P i , we can rewrite 28 aṡ Clearly S q M −1 P h f h = 0, which means that the horizontal thrusters have no direct influence on the pitch dynamics (see the entries of P s and P b ). Finally, defining the proportional gain K q > 0 and choosing the control law the time derivative of the Lyapunov function 28 becomeṡ Therefore, the convergence of the error e z to zero is then guaranteed by setting the input f i according to the control law 29. Note that Equation 29 gives the two control laws for either actuating with only stern or bow thruster, being different on the entries of P vi only.

Control without fault
Under normal operation, the two through-hull thrusters provide controllability on the heave and the pitch DOFs. We will not give emphasis to the derivation of this controller since it was previously derived in Ferreira, Matos, Cruz & Pinto (2010). We aim at exposing the main concepts that led to the control law, in order to better understand the results of the next section. The controller was derived using common backstepping with no integral terms. In opposition to the previous subsection, the errors considered for the control with the two thrusters are bidimensional vectors. Naturally, the error vector for vertical position comes

61
Fault Tolerant Depth Control of the MARES AUV www.intechopen.com assuming that θ, θ d = π/2. Following the same method as previously, a first Lyapunov function is defined as a quadratic function of the error e p and its time derivative is made negative definite by adequately choosingż andθ as virtual control variables to achieve asymptotic stability.
A new augmented Lyapunov function is then introduced by adding a quadratic term of the error and, from the reduced dynamics model 3, the control law for the two vertical thrusters f pv = χ(e ′ p , e ′ ν , u, η 2 ) ∈ R 2 is determined such that the time derivative of the augmented Lyapunov function is made negative definite.

Experiments and results
To validate the method described in the previous sections, several experimental tests were conducted. The results will be presented in a decoupled way in order to facilitate the exposition and the analysis. First, the results obtained from the ASEKF will be exposed for the system under normal operation with induced faults. Then the performances of the controller derived in the previous section will be presented.

Fault detection
Several tests were performed in order to verify the behavior of the fault detection and identification algorithm. Under normal operation, we have intentionally induced faults in the thrusters with the aim of analyzing the behavior of our approach. The following graphs expose the evolution of some of the most relevant variables referred in section 3. The model errors and uncertainties were not corrected so that we could observe behaviors similar to those occuring with real faults. Although not explicitly written, the units of the loss of control effectiveness factors, their difference, the eigenvalues of the corresponding covariance matrix as well as the fault measure are dimensionless, while angles and linear distances are expressed in radians and meters, respectively. The fault in one of the thruster can be simulated by a conteracting force in the same axis of force application, with an opposite direction. The following tests were carried out such that a force with an opposite direction was applied in an axis near the axis of force application along all the operation or along part of it. The fault measure computed and exposed in the graphs below was set, according to 15, equal to Fig. 5 presents the evolution of the state estimate in normal operation without conteracting forces. It can be seen in Fig. 5(a), however, that the loss of control effectiveness factors are non-null, in opposition to what would be expected. Indeed, such behavior is due to errors of model parameters, neglected dynamics effects, discretization errors as well as linearization in the extended Kalman filter formulation. Nevertheless, it can be seen they are limited and their differences in Fig. 5(b) are confined to a well defined interval. This effect is unavoidable since deviations of the mathematical model will be directly reflected in the loss of control effectiveness factors.
On the other hand, the eigenvalues of the submatrix P γ (Fig. 5(c)) are monotically increasing along the operation due to the reduced actuation, and consequently poor observability. In

62
Challenges and Paradigms in Applied Robust Control www.intechopen.com fact, the vertical thrusters are mainly compensating the difference between the weight and the bouyancy of the vehicle, which is less than 1.5 Newton, well below the maximum actuation (24N in each thruster). Although it is not shown in the graph, the eigenvalues would stabilize after some more time of operation. In Fig. 6, the graphs show the evolution of the variables during the operation for which 1.5N and 2.5N of force are opposing the vertical bow and stern thrusters, respectively. It can be seen that the eigenvalues (Fig. 6(c)) reach their "steady stade" after 40 seconds. In this case, the controller compensates the effects of the opposition force by increasing the actuation, which, in turn, makes the observability better than in the previous case (compare Fig. 6(c) with Fig.  5(c)). Regarding the loss of control effectiveness factors, one can observe that the bow thruster is more affected by the added forces than the stern one when compared with Fig. 5(a). This behavior is explained by the fact that the opposition forces were applied asymetrically with respect to the center of gravity of the vehicle. In Fig. 7 and Fig. 8, we present the same variables as in the previous figures, but now with a disturbance occuring at time t = 60s, approximately. The graphs in Fig. 7 are related to the disturbance applied in the stern thruster while the graphs in Fig. 8 corresponds to the disturbance in the bow thruster. Comparing the results in Fig. 5 and Fig. 6 with those in Fig. 7 and Fig. 8, the occurence of faults in the last two experiences is evident through simple analysis of Fig. 7(b) and Fig. 8(b). By comparing the results exposed in Fig. 5(d), 6(d), 7(d), 8(d), we can conclude that setting the threshold δ th = 7 would adequatly detect the occurence of a fault, while ensuring a sufficiently large margin to avoid false dectections. The choice of such threshold has to be made according to the sensitivity desired for the detections of faults which must be mainly related to the accuracy of the model. The identification is made according to the stated before, being the thruster with bigger |γ| the one that is identified as faulty. In both situations ( Fig. 7(a) and Fig. 8(a)), the faulty thruster is easily identifiable. Still, practical considerations have to be made at this stage: One can observe that δ reaches larger values in the initial transient instants due to small eigenvalues, which could lead to false detections (depending on the threshold). To avoid so, a possibility would be integrating the value of δ when it is above the threshold, while using a forgetting factor, and defining another threshold for the value of the integral. Nonetheless, the simple method with the threshold defined above would be sufficient for the present work, as it can be seen from the experiments. On the other hand, the relation between the actuation amplitude and the eigenvalues of the matrix P γ is now notable in Fig. 7(c) and Fig. 8(c). With the application of the disturbance, the controller increases the actuation and, as a consequence, the observability is made greater (see 7(c) and 8(c)).

Control
The control laws derived in section 4 were implemented in MARES and tested in real conditions. The results of the operations are shown in this section, being the analysis of the performances of the controllers the main topic. The vehicle missions were programed such that it navigates at a constant depth reference with a given constant orientation. We must highlight that several unconsidered disturbances have acted on the vehicle during operations: The vehicle was subject to more bouyancy than the assumed in the mathematical model; the fedback depth measurement is actually performed in the nose of MARES instead of the vehicle's center of gravity. Such disturbances induce undesired effects on the controllers. However, the following figures show the robustness of our approach. The variables shown in the graphs have the following units correspondence: Depth is expressed in meters, the pitch angle is expressed in radians while the surge velocity is expressed in meters per second. and one of the controllers for degraded mode with only one vertical thruster starts operating. The figures show the results for different surge velocities and for the two controllers. The Fig. 9 shows the variables directly measured from the sensors for a mission with a depth reference z d = 0.7m, only with bow thruster. One can verify that the depth (9(a)) is reasonably close the reference and the small oscillation is due to natural disturbances that the vehicle founds in practical operations. Moreover, the commanded forces are affected by delays and thruster model is subject to uncertainties, which certainly influence the behavior. On the other hand, the Fig. 11(a) shows that the oscillation amplitude is bigger than in Fig.  9(a) and 9(a), having been induced by more disturbances. Moreover, for stern-only control, more actuation is needed for the same pitch angle, in steady state. Such behavior is originated by the smaller distance at which the stern thruster is placed relatively to the center of gravity, comparing to the bow thruster (see Table 1). Figures 9 to 11 show the robustness of the control laws, independently of the surge velocity. Even in the presence of unconsidered disturbances naturally induced by the environment, the graphs 9(a), 10(a) and 11(a) demonstrate that the controllers provide satisfactory results in real operation.

Conclusions
In this work, we have presented a complete method for fault detection, identification and automatic reconfiguration of the MARES AUV. Although we have focused on this particular system, the concepts and ideas can easily be extended to other problems, even beyond robotics. Based on the dynamics and kinematics models, we have formulated a filter to estimate possible actuation biases. The augmented state extended Kalman filter was chosen to handle the problem, contemplating a reduced order model to simplify the analysis and the formulation. Bias variables were introduced in the state to be estimated as loss of control effectiveness factors whose values reflect the commanded underactuation/overactuation. Along with these estimated variables, the eigenvalues of the corresponding submatrix in the state estimate covariance matrix were taken to define a fault measure. Such measure was then used to generate a fault detection warning through comparison of its value with a given threshold. Finally, the faulty thruster is identified through analysis of the biases amplitude. When a fault occurs and the corresponding thruster is set off, a suitable control law has to take over to ensure that the on-going mission succeed. To achieve so, we have defined two control laws for which we have based the derivation on Lyapunov theory and on backstepping method and further applied conditional integrators in order to drive the vehicle depth to a given reference with a null error in steady state. At last, we demonstrated the performances of the developed method through real experiments in which we verified the operation of both estimator and controllers. Even in the presence of unconsidered disturbances, naturally induced by the environment, we have demonstrated that the controllers provide satisfactory results for several surge velocities and different thruster configurations. The main objective of this book is to present important challenges and paradigms in the field of applied robust control design and implementation. Book contains a broad range of well worked out, recent application studies which include but are not limited to H-infinity, sliding mode, robust PID and fault tolerant based control systems. The contributions enrich the current state of the art, and encourage new applications of robust control techniques in various engineering and non-engineering systems.