Implementation of Sliding Mode Observer Based Reconfiguration in an Autonomous Underwater Vehicle

This paper looks at the implementation of a Sliding Mode Observer (SMO) based Reconfiguration algorithm to deal with sensor faults within the context of navigation controllers for Autonomous Underwater Vehicle (AUV). In this paper the reconfigurability aspects are considered for the heading controller. Simulation responses are used to illustrate that the Sliding Mode Observer is able to give state information to the controller when there is a fault in the AUV’s sensor package. Comparisons are made between the Sliding Mode Controller with and without reconfigurability for a number of different sensor failures, e.g. bias errors in or the complete loss of the heading data, and the robustness of the Sliding Mode Observer is investigated through the introduction of disturbances into the system.


Introduction
Autonomous Underwater Vehicles (AUVs) are submersible robots that operate independently without human intervention [1,2,3].These vehicles have a multitude of uses including maintenance, diver support, pipeline inspection and geological surveying.As many of these tasks require the AUV to operate in close proximity to obstacles and hazards, it is imperative that their motion is accurately controlled.This requires that the particular control system designs must be robust and reliable [1,2,3].Automatic control of this type would enable the AUV to hold its position or manoeuvre accurately with minimal adverse influence from the external disturbances present in the hostile subsea environment e.g.ocean currents.
The performance of any controller relies on accurate feedback from sensors [4].Unfortunately, this aspect is not always present within a system due to system failures.There are two possible methods that can be implemented to deal with the sensor faults that are dealt with in this paper.The first is to have redundancy built into the system by having multiple sensors for each state to be measured.This incurs the problems of added costs, weight and reduced battery life, none of which are desirable in an AUV.The second method is to reconstruct the output of the faulty sensor from the responses of the remaining good sensors.This is achieved by using an observer to estimate what the faulty signal should actually be reading and then replacing the faulty signal with this estimate of the true value.It is this second method that is presented in this paper.
The control method that will be used is nonlinear Sliding Mode Control.This control structure has been used in numerous papers where it has been shown to be robust and reliable for submersible vehicle control [1,2,3].The advantage of Sliding Mode control over linear control structures is that there is an extra nonlinear switching term that is able to overcome the matched unmodelled dynamics present in the system.
The reconfiguration method that is used in this paper makes use of a nonlinear Sliding Mode Observer (SMO) [4,5,6].The theory and design of SMOs for reconfiguration is given by Edwards and Spurgeon [5] and Utkin and Guldner [6], and this is furthered by McGookin [4] who looks into their use in submarine control reconfiguration.This paper continues that research by looking into their use in AUVs.
This paper is split into 5 sections.The first looks at the type of AUV model used in this paper.The second describes the control structure used for the AUV.The third gives an overview of SMOs and how they are designed for reconfiguration.The fourth section gives results of the SMOs reconfiguring the system against faults injected into the system before the final section gives the conclusions.

System model
The simulations used in this paper make use of a nonlinear 6 degrees of freedom (DOF) model to give as accurate a representation of the real system as possible.A diagram of the AUV model used is shown in Fig. 1, annotated with the main f .y .In Fig. 1 it can be seen that the AUV has vertical and horizontal control surfaces at both the bow and stern.For the work in this paper only the stern control surfaces are used to control the AUV and the bow surfaces are set to their trim values of 0°.The control surfaces are limited to ±20°, the thrusters ±1500RPM and all the actuator signals are passed through a first order filter to limit the actuator rates [1,2].
The state space form of the nonlinear equations of motion is given below [2]. where where x = [n h] T .This can then be linearised to give the following standard state equation: Here A is the system matrix and B is the input matrix.

Disturbances
To test the controllers and reconfiguration in a realistic simulation environment, ocean current disturbances have been modelled.Ocean currents are the turbulent flows within bodies of water [2,7].For an AUV working near the seabed and in close proximity to objects, the ocean-currents would be highly turbulent, as the objects shed vortices into the stream.
To model the sea currents it is required to know the velocity of the current flow, V c , angle of attack, a c , and sideslip angle, b c , of the current in the Earth-fixed reference frame.For this paper a c is set to a predefined values of 0°and then V c , and b c are varied randomly.Fig. 2 shows graphically the relationship between the sea current's velocity and the Earth fixed axes.
The three terms are then converted into velocities in the Earth-fixed reference frame using the following equations: These can then be changed using Euler transforms to give the velocities in the body-fixed reference frame u c , v c , w c .These values are then used to create the vector ( ) 3 Controller design

Decoupled controller design
Since most manoeuvres preformed by AUVs can be broken down into 3 basic manoeuvres [1,2,7], i.e. change in speed, change in direction and change in depth, the lower level of control will be made up of 3 decoupled controllers.For each of these controllers a submodel of the AUV dynamics is generated by reducing the full 6 DOF model to smaller ones that are based on the dominant states for each manoeuvre [1,2,7].This process of isolating specific dynamics is called decoupling.For this paper only the heading submodel is considered and this is made up of the yaw rate, r, and the heading angle, y.The sway velocity, v, can also be used in the heading submodel, but this is found to reduce the disturbance rejection abilities of the controller and so is omitted in this study.The control actuator that is used for altering the heading is the rudder at the stern, d r .

Sliding mode control
The sliding mode controllers used here is SIMS (Single Input Multiple State) [1,2,7].Sliding Mode controllers are made up of two parts, the Equivalent term, u eq , and the Switching term, u sw [1,2,7].The Equivalent term is a linear controller that is optimised around a specific operating condition.The Switching term is the nonlinear part of the controller and works by giving the extra control action required to drive the system back to the operating condition for which the Equivalent term is valid.The Equivalent term used in this study is of the state feedback gain controller form [1,2,3,7,8]: where k is the feedback gain calculated using robust pole placement techniques, [1,2,8], and x is the sub-system state vector.In this project all pole placement has been carried out using the place command in MATLAB that uses an iterative method to place the poles [8].
The switching term is calculated from the equation for the sliding surface, given in [1,2] as: with Dx being the state tracking error.This equation can then be expanded to give the following equation, [1,2,3,7].

Fig. 2: Diagram showing disturbance in Earth-fixed reference frame
Here h is the right eigenvector of A c = Abk T , with A and b being the system and input matrices defined previously and $ ( ) f x is an estimation of the nonlinearities in the system, which for this paper is set to zero.
As the above equation uses the signum function, sgn(s), which has only three outputs, -1, 0 and 1, this leads to chattering when the system is on the sliding surface [1,2,3,7].To get around this problem the sgn(s) term is replaced by the hyperbolic tangent function tanh(s/f) where f is the boundary layer size, [1,2,3,7].This gives the response a much smoother transition across the sliding surface while still giving the full control effort outside the boundary layer.Bringing the two terms together and making the aforementioned changes gives the full control structure that is used in this paper and is shown below.

Guidance
The second method of guidance that has been implemented is a simple Line-of-Sight (LOS) waypoint following guidance [2].Instead of having a fixed list of course and time data as its input, this guidance has a list of waypoints, depths and approach velocities.The guidance then calculates the direction that the AUV should take in order to head towards the waypoint.The AUV continues towards the waypoint until it enters a "Sphere of Acceptance" around the waypoint at which point the guidance moves on to the next waypoint.A graphical representation of the AUV heading towards a waypoint is given in Fig. 3.
The equations to calculate the desired values that the controllers require are given below, [1,7].

Reconfiguration
A Sliding Mode Observer based reconfiguration method is used in this study.This utilises a sliding mode observer to follow the system, and when a fault is detected the output of the SMO is then substituted into the system in place of the faulty signal [4,5,6].Again, as with the control structure, submodels are used to split the full system into smaller decoupled systems.The submodel used for the heading observer is, however, different from that used in the controller design in that it has the sway velocity, v, included in it to make it a three state system.The extra state is used to give a better performance of the observer as it allows the observer to operate with two faultless states when estimating the heading.The equations for a SMO in the case of an LTI system are shown below [4,5].
where A s and b s are the subsystem's system matrix and input distribution vector respectively, $ x s is the estimated unflawed subsystem states[ ] v r T , y s is the subvector of the system output, [y], $ y s is the observers output [y], u s is the input to the subsystem [d r ], N is the sliding mode gains and v 0 is the switching term.The switching term gives the observer the extra action to overcome the nonlinearities and matched unmodelled dynamics present in the system.When fault free, the switching term v 0 is defined as the sign of the difference between the actual system output and observer output [4].The switching term is defined as [4,5]: Here y so is the output of the actual system that is equivalent to the output of the observer, i.e. for the heading submodel y so would be the heading angle, y.The problem, however, is that when there is a fault in this signal the observer would follow the faulty signal.To get around this problem the switching term is altered so that it uses a comparable signal that is unflawed.For the heading observer the yaw rate, r, is used to replace the faulty y for its switching term as this is approxi- mately the derivative of the heading angle [4].To reduce chattering effect [4,5] soft switching in the form of a hyperbolic tangent function with a boundary layer f 0 thick replaces the signum function in the switching terms.The switching terms are then written as: A diagram of the complete control structure for the reconfigurable heading controller is shown in Fig. 4.

Results
To get the following results a zigzag pattern of waypoints is laid out for the AUV to follow.This allows the AUV to perform both right and left turns and should highlight any asymmetry in its handling characteristics.The two faults that the reconfiguration is tested for are a complete failure of the heading sensor where the heading output is 0°and for a bias of 10°a dded into the heading sensor.Both of these faults are simulated to happen after 115 seconds and the fault are detected 3 seconds after that.All of the simulations have been carried out using the full 6-DOF model at a depth of 40 m and with the AUV travelling at 1.7 m/s.
The first graph, Fig. 5, shows how the AUV acts if there is a complete failure in the heading sensor when no reconfiguration is present in the system.From this it can be seen that the AUV loses the ability to follow the desired heading completely with the model of the AUV breaking down just after 200 s has elapsed.This break down in the model is the result of the speed controller trying to compensate for the cross coupling that becomes noticeable when the actuators are at full deflection.Fig. 6 gives a view looking down on the path that the AUV takes, starting in the top right of the graph and travelling towards the waypoints that are denoted as circles with a radius the size of the sphere of acceptance.From this it can be seen that the failure in the heading sensor, which happens just after the AUV has passed through the first waypoint, causes it to lose direction and snake from side to side before the simu-lation becomes unstable and the AUV appears to shoot off into infinity.
Figs. 7 and 8 show the response of the AUV when a bias error is added to the heading sensor without reconfiguration.In the Yaw angle response in Fig. 7 it can be seen that the AUV continues to follow accurately the value that is given by the sensor.The large spike in the rudder actuation is caused by the controller suddenly being presented with a 10°error in the heading angle and trying to correct for that.The problem caused by this bias error in the sensor is noticeable in Fig. 8, where the AUV misses the next waypoint.This is caused by the error bias being large enough that the AUV is being directed on a course that misses the sphere of acceptance around the waypoint.
Fig. 9 shows the heading and rudder responses when the SMO based reconfiguration is implemented in the system.From the yaw response it can be seen that there is a small deviation from the commanded heading immediately after the fault but this is quickly brought under control.Also of note from this graph is the accuracy of the SMO in estimating the heading angle, after the fault has been detected the output from the sensor is overwritten with the data from the observer.It can be seen in the graph that the actual and observed (the sensed line after the fault) heading angles lie on top of one another.In the rudder response it can be seen that there is a very large spike in the required value around the time of the fault.This is caused by the sudden step of 150°appears in the error signal sent to the controller when the sensed heading suddenly becomes 0°.In the actual AUV these large spikes would cause undue stress and wear on the actuators, reducing their lifespan and possibly even damaging them directly.
From Fig. 10 it can be seen that even though there is a fault in the heading sensor the AUV is still able to reach the next waypoint and then head in the direction of the waypoint after that.This would suggest that even with this complete heading sensor failure the AUV would be able to complete its mission.The heading and rudder responses for a 10°bias failure when reconfiguration is present are given in Fig. 11.From these it can be seen that the SMO is able to accurately reconstruct the faulty signal and is again able to follow the actual response very closely.As with the complete failure case, the actuator response around the time of the fault is characterised by large spikes as the step response inputs of the fault and then the reconfiguration cause the controller to react violently in an attempt to follow its input signal.From the view looking down on the AUV in Fig. 12 it can be seen that the AUV is again able to continue on its mission even with one signal being faulty.
The ocean current based disturbances were then added to the system to test how well the observer would be able to cope in a more realistic environment.For this paper the currents were set to vary between 0 and 0.1 m/s, with a constant a c of 0°a nd varying b c .From Fig. 13 it can be seen that there is no visible degradation in the ability of the SMO to follow the actual heading when there is a complete failure of the sensor with the disturbances in the system.The view in Fig. 14 shows that the AUV is also able to continue on its mission with a failed heading sensor as it is still able to direct itself with accuracy towards the desired waypoints.
In Fig. 15 the yaw response again shows that the introduction of disturbances when a bias error fault occurs in the heading sensor also has very little impact.The response is again very similar to Fig. 11 where no disturbance is present.In Fig. 16 it can be noted that again, the AUV is able to continue on its mission as the reconfiguration is able to overcome the effects of the failure and guide the AUV to the next waypoint.

Conclusions
In conclusion it can be seen that the Sliding Mode Observers perform well as a method of reconfiguration.Without any reconfiguration it can be seen that the AUV is unable to continue on its mission when either a complete failure or a bias error occurs in the heading sensor.With the SMO based re-configuration the AUV is able to accurately track its desired heading and continue with its mission.Even when disturbances are introduced into the system the SMOs are able to accurately estimate the heading of the AUV.One problem, rooted in the high gain nature of the Sliding Mode controllers, is the large spikes in the actuator signals when the faults first appear and are then dealt with.A possible solution to this would be to place a filter either on the input or the output of the controller to reduce the stress that this would inflict on the actuators although this would degrade the recovery performance of the system.

Fig. 1 :
Fig. 1: Graphical representation of AUV showing reference frames added by the principle of superposition to the AUV model by altering the simulations equations as shown below.

Fig. 5 :Fig. 6 :Fig. 7 :
Fig. 5: Heading angle and rudder usage responses with complete failure of the heading sensor

Fig. 8 :
Fig. 8: XY position plot showing movement of AUV when heading sensor has 10°bias error Fig. 13: Heading angle and rudder usage responses with complete failure of the heading sensor with reconfiguration and disturbances present