- Email: [email protected]

Discrete-time Sliding Mode Control for Guidance of an Unmanned Surface Vehicle M. Bibuli ∗ G. Bruzzone ∗ M. Caccia ∗ G. Ippoliti ∗∗ S. Longhi ∗∗ G. Orlando ∗∗ G.M. Pelusi ∗∗ ∗

CNR-ISSIA Genova, Via De Marini 6, 16149 Genova, Italy (e-mail: {marco.bibuli, gabriele.bruzzone, massimo.caccia}@ge.issia.cnr.it). ∗∗ Dipartimento di Ingegneria dell’Informazione, Universit` a Politecnica delle Marche, Via Brecce Bianche 12, 60131 Ancona, Italy (e-mail: {gianluca.ippoliti, sauro.longhi, giuseppe.orlando}@univpm.it). Abstract: This paper discusses the Navigation, Guidance and Control (NGC) system of an Unmanned Surface Vehicle (USV) through extended numerical tests carried out with the prototype autonomous catamaran Charlie. A cascade control scheme is proposed which provides accurate straight line following performance with an USV equipped only with a GPS, a compass and an extended Kalman filter to estimate the vehicle position and speed. In the considered solution an outer Discrete-Time Sliding Mode Control (DTSMC) loop is designed for the guidance of the USV and an inner PI-based gain scheduling control loop regulates the vehicle linear and angular speed. Reported numerical tests show that the adopted control scheme produces good performance for straight lines following tasks. Keywords: Autonomous vehicles, Marine systems, Guidance systems, Discrete-time sliding-mode control, Robust control. 1. INTRODUCTION In the last years, a growing number of Unmanned Surface Vehicles (USVs) have been developed for military, environmental and robotic research applications. In particular, these vehicles proved their capabilities in mine countermeasures (MCM), water sampling, bathymetric survey and supporting Autonomous Underwater Vehicle (AUV) operations acting as communication relays. In this context, the design and implementation of an accurate and reliable navigation, guidance and control system, able to operate with only linear and angular position measurements, is fundamental for the development of relatively cheap remotely controlled vehicles for civil applications. According to the approach discussed in Caccia et al. (2005), where basic automatic guidance capabilities, i.e. PD auto-heading and line-of-sight (LOS) guidance, proved to be sufficient for an unmanned catamaran to satisfactorily accomplish its operational goal, this paper demonstrates how a cascade control scheme based on a PI gain scheduling velocity controllers and a Sliding Mode (SM) guidance laws at the kinematic level, can enable a small unmanned catamaran to perform basic accurate manoeuvres. In particular, numerical tests carried out with the 2005-evolution of the Charlie prototype USV (Caccia et al., 2006), developed by CNR-ISSIA Genova, demonstrate the effectiveness of a SM guidance law in following a straight line overcoming errors introduced by sea current disturbances and system parameter variations. In recent years, a widely and successfully applied nonlinear control approach is the Sliding Mode Control (SMC) method (Utkin et al., 1999; Sabanovic et al., 2002). It is ©2012 IFAC

441

well known that SMC methods provide noticeable robustness and invariance properties to matched uncertainties (Utkin et al., 1999), and are computationally simpler with respect to other robust control approaches. SMC schemes are typically based on high frequency switching of the control signal which gives problems to cascade control structures. As stated in (Utkin et al., 1999), for the outer control loop SMC techniques cannot be applied, since the reference input of the inner control loop should have bounded time derivatives. A possible solution is presented in this paper, where a control system based on Discrete-Time SMC (DTSMC) (Corradini et al., 2012a,b,c; Corradini and Orlando, 1997; Furuta, 1993; Kaynak and Denker, 1993; Lee and Oh, 1998) is designed. The introduction of DTSMC, in fact, allows to take directly into account the issue of control law digitalization and to ensure robustness with respect to disturbances and model uncertainties. Accurate control of USV also requires the knowledge of the vehicle position and speed. In this paper an extended Kalman filter is adopted to estimate the vehicle position and speed on the basis of GPS and compass measurements and of a practical dynamic model for the prediction of the vehicle speed with respect to the water. Summing up, the features of the DTSMC techniques for the external kinematic guidance control loop combined with the internal velocity control loop are exploited in this work to demonstrate the feasibility of adopting, also for a USV equipped only with GPS and compass, a dual-loop guidance and control architecture, already satisfactorily employed on ROVs (Caccia and Veruggio, 2000).

10.3182/20120919-3-IT-2046.00075

IFAC MCMC 2012 September 19-21, 2012. Arenzano, Italy

The paper is organized as it follows. A practical model of system dynamics and kinematics, as experimentally determined in (Caccia et al., 2006), is presented in Section 2, while the model-based extended Kalman filters for heading, position and speed estimation are discussed in Section 3. The adopted PI gain scheduling design of angular and linear velocity controllers is reminded in Section 4, while Section 5 deals with the SMC-based linefollowing technique. Numerical results are discussed in Section 6. 2. MODELING Referring to Figure 1 and assuming that the vessel motion is restricted to the horizontal plane, i.e. neglecting pitch and roll, two reference frames are considered: an inertial, earth-fixed frame < e >, where position and orientation [x y z]T of the vessel are usually expressed, and a bodyfixed frame < b >, where surge and sway velocities ([u v]T absolute, [ur vr ]T with respect to the water), yaw rate r and forces and moments [X Y N ]T are represented. Denoting with [x˙ C y˙ C ]T the sea current, supposed to be irrotational, the vehicle kinematic is usually modeled with the following equations, which are expressed in the earthfixed frame: x˙ = ur cos ψ − vr sin ψ + x˙ C y˙ = ur sin ψ + vr cos ψ + y˙ C ψ˙ = r.

(1)

For dynamic description, a practical model for the vehicle

Fig. 1. Vehicle’s kinematic modeling has been defined, where practical stands for consistent, from the point of view of degree of accuracy, quality in terms of noise and sampling rate of the measurements. The result is that the sway speed can be neglected and the dynamics can be reduced to: k˜u2r u2r

m ˜ u u˙ r = k˜u ur + + k˜n2 δ2 n δ + n I˜r r˙ = k˜r r + k˜r|r| r|r| + k˜n2 n2 + n2 δ 2 2

2

(2)

(3) where n is the propeller revolution rate, δ is the rudder angle, m ˜ u and I˜r are the inertia terms, k˜u , k˜u2r , k˜r and k˜r|r| are the drag coefficients, k˜n2 δ2 represents the resistance due to the rudder and k˜n2 takes into account the vessel longitudinal asymmetries. More information on the modeling of the Charlie vehicle can be found in Caccia et al. (2006). 442

3. NAVIGATION The vehicle motion is estimated on the basis of measurements of heading and linear position and of the reference rudder angle and normalized propeller revolution rate only. Anyway, although simplified, a model of the surge and yaw dynamics of the vehicle is available and can be used as a kind of virtual sensor for yaw and surge derivative measurements in order to increase the filter performance in terms of smoothness and delay of the estimates. As far as yaw motion is concerned, the heading measurements ψm = ψ+ξψ are provided by the vehicle compass (ξψ represents the measurement noise). Since the vessel longitudinal asymmetries change with the payload configuration, the system state [ψ r k˜n2 ]T includes also the parameter k˜n2 in addition to the vehicle heading ψ and yaw rate r. On the other hand, the vehicle linear motion is described by the following equations: x˙ = (ur + ξur ) cosψ + x˙ C y˙ = (ur + ξur ) sinψ + y˙ C

(4)

x ¨C = ξx˙ C y¨C = ξy˙ C where ξur , ξx˙ C and ξy˙ C model the system noise errors in surge estimate and the slow sea current variations. It is clear that, when only position and heading measurements are available, it is not possible to discriminate between the vehicle speed with respect to the water and the sea current, thus having the possibility of estimating only the vessel absolute speed. Anyway, the open-loop integration of (2) can provide an estimate of the vehicle surge with respect to the water. In spite of the errors due to the always present mismatches between nominal and actual vehicle parameters, this estimate of the vehicle surge proved its usefulness in reducing the delay and increasing the smoothness in the linear motion estimates. The result is that the vehicle surge speed with respect to the water ur is estimated on the basis of the normalized propeller revolution rate and rudder deflection by online integrating (2), i.e. implementing a kind of virtual velocity sensor consisting of an open-loop model-based predictor. Once the vehicle heading and surge are estimated by the yaw motion EKF and the virtual speed sensor respectively, assumed the system state as [x y x˙ C y˙ C ]T and the state equations given by (4), the linear motion of the vehicle, given the GPS measurements of its position, can be estimated by conventional complementary or Kalman filter. 4. CONTROL In order to design linear and angular velocity controllers, a simplified version of the above-presented model has been considered, neglecting, i.e. considering as external disturbances, the resistance due to the rudder and the vessel longitudinal asymmetries as well as the sea current. The result is the following generic 1-dof model for surge and yaw motion: m ˜ ξ ξ˙ = k˜ξ ξ + k˜ξ|ξ| ξ|ξ| + τ (5) ˜ ˜ where m ˜ ξ , kξ and kξ|ξ| , τ represent inertia and drag coefficients and control action respectively. On this basis, a PI gain scheduling controller of the type

IFAC MCMC 2012 September 19-21, 2012. Arenzano, Italy

Introduce the following assumption: Assumption 1. It is assumed that variable ur (k) and v(k) are slowly varying and that: |∆ur (k)| = |ur (k + 1) − ur (k)| ≤ ρu (11) |∆v(k)| = |v(k + 1) − v(k)| ≤ ρv being ρu , ρv known positive constants. Remark 2. Assumption 1 holds considering that the sea current is almost constant and the vehicle has a low surge speed.

already used for the control of remotely operated vehicles Caccia and Veruggio (2000) can be adopted, obtaining a closed-loop transfer function of the linearized system with the following form: 2σs + σ 2 + ωn2 ξ(s) = 2 . (6) s + 2σs + σ 2 + ωn2

Considering that the given reference distance from the target line is assumed to be equal to zero, the following discrete-time sliding surface can be introduced: sd (k) = d(k + 1) + λ1 d(k) + λ2 d(k − 1) = 0 (12) where λ1 , λ2 are such that z 2 + λ1 z + λ2 is a Schur polynomial. As well known (Furuta, 1993; Corradini and Orlando, 1997; Corradini et al., 2012a,b,c), the achievement of a quasi sliding motion on sd (k) = 0 guarantees the boundedness of the variable d(k). Moreover, define the following quantities:

5. GUIDANCE

f1 (k) = d(k) + Tc ur (k) sin β(k) + Tc v(k) + λ2 d(k)

Fig. 2. Line-following nomenclature

In the proposed dual-loop control architecture, the guidance module performs position control at the kinematic level generating suitable velocity references according to the desired task. Following this scheme, it is up to the dynamics controllers to ensure that the actual rotational and linear speed of the vehicle track the references with sufficient precision. The design of guidance task functions at the kinematic level is usually very simple as well as the tuning of the kinematic and dynamic controller parameters on the basis of empirical considerations as discussed in (Caccia, 2007).

+ λ1 [d(k) + Tc ur (k) sin β(k) + Tc v(k)]

(13)

w(k) = sin(β(k + 1)) (14) and assume that a known positive constant ρ exists such that: |f1 (k)| ≤ ρ. The following Theorem can be stated: Theorem 3. The control law: arcsin (w(k)) − β(k) r∗ (k) = (15) Tc where: weq (k) + wn (k) (16) w(k) = Tc ur (k) being:

5.1 Line-following The task of steering the vessel to follow a straight line in the desired versus given the vehicle surge speed with respect to the water, ur > 0, is addressed. In other words, the guidance goal is to zero the range d from the vessel and the target line, while maintaining the angle β = ψ − γL between the desired line orientation γL and the vehicle heading ψ in (− π2 , π2 ) (see Fig. 2 for linefollowing notation and nomenclature). Thus, since the small prototype catamaran considered in this paper can be modeled, from the kinematics point of view, neglecting the sway speed with respect to the water (Caccia et al., 2006), denoting with v the almost constant sea current in the direction orthogonal to the target line, the following state equations hold: ˙ = ur (t) sin β(t) + v(t) d(t) ˙ = r(t). β(t)

(7)

d(k + 1) = d(k) + Tc ur (k) sin β(k) + Tc v(k)

(9)

β(k + 1) = β(k) + Tc r(k) where k = 1, 2, . . . are the sampling time instants.

(10)

(8) The discretization of the state Eqs. (7) and (8) with a sampling time Tc according to standard techniques gives:

443

weq (k) = −f1 (k) |s (k)| − ρd θn d if |sd (k)| ≥ ρd ρv 1+ wn (k) = ur (k) 0 if |sd (k)| < ρd

(17) (18)

with |θn | ≤ 1, and with ρd = Tc ρv + ρρu , guarantees the achievement of a quasi sliding mode on (12). Proof. Considering (12), (13), (14), one has: sd (k + 1) = f1 (k) + Tc [∆v(k) + (ur (k) + ∆ur (k))w(k)].

(19)

Replacing (16), (17) in (19), one obtains: ∆ur (k) sd (k + 1) = f2 (k) + 1 + wn (k) (20) ur (k) where f2 (k) = Tc ∆v(k) − ∆ur (k)f1 (k) is such that |f2 (k)| < ρd . Imposing the condition |sd (k + 1)| < |sd (k)| which guarantees the achievement of a quasi sliding motion on sliding surface sd (k) = 0 (Furuta, 1993), expression (18) is obtained. Remark 4. It is worth noting that, since w(k) = sin(β(k + 1)), a saturation block needs to be inserted, in order to guarantee that w(k) ∈ (−1, 1).

IFAC MCMC 2012 September 19-21, 2012. Arenzano, Italy

Thus, the resulting line-following guidance law is constituted by three control modes: • if β ∈ / − π2 , π2 the vehicle rotates at constant yaw rate towards the β¯ orientation; • if |d| > d¯ the vehicle approaches the desired straight ˙ line with a constant d; • if |d| < d¯ the vehicle follows the line with a SM guidance law.

A first scenario is simulated zeroing sea currents, in order to observe the behavior of the guidance module configured with c1 = 0.985 and c2 = 0.985. The motion of the vehicle is reported in Figure 3 where it is possible to notice the precise convergence to the first (eastward oriented) reference line. When the second (westward oriented) reference line is commanded, the vehicle performs the U-turn manoeuvre; the overshoot in the convergence to the line is due to the dynamical and kinematical constraints of the vehicle. As it can be noticed, after the U-turn the vehicle reduces the distance and converges to and maintains its motion over the reference line. Figure 4 reports, in the upper 40

20

0

−20 x [m]

Remark 5. Observing Eqs. (13), (15), (16) and (17) it is clear that, for large values of d, the control system could require efforts such as the vehicle starts to rotate around itself. This problem can be heuristically faced by observing that the vehicle can stop to rotate around itself if r∗ (k) = 0. Therefore, denoting with β¯ the desired angle the vessel has to approach the target line in absence of sea current and imposing the condition r∗ (k) = 0 in Eq. (15) with wn (k) = 0, after some computation, a value d¯ for ¯ and considering a constant d is obtained. Thus, if d > d, ur (·), the vessel is forced to approach the target line with a constant d˙ such as r∗ (k) = 0. It is worth to notice that the value of d˙ depends from the choice of β¯ and the considered constant value for ur (·). In the case the vessel is oriented such that β ∈ / − π2 , π2 , before to applied the SM guidance law, it is forced to rotate in the versus which minimizes the way to the desired starting orientation β¯ ∈ − π2 , π2 .

−40

−60

−80

−100

−200

−180

−160

−140 y [m]

−120

−100

−80

6. NUMERICAL RESULTS Due to time and weather constraints, only simulative results will be reported in this section, relying on the hardware-in-the-loop simulator of the Charlie USV. Experimental trials at sea will be carried out with the aim of reporting at-field results, employing the Charlie USV or new very shallow water USV class SWAP II, currently under development at CNR-ISSIA. For the tests proposed in this section, the model of Charlie USV proposed and identified in Caccia et al. (2008) and Miskovic et al. (2011) has been considered. Two consecutive parallel reference lines were required to be followed by the vehicle, the first in eastward direction and the second in westward direction, thus requiring also a U-turn manoeuvre to move from the first to the second reference line; the two lines are posed at the distance of 10 m one with respect to the other. A constant thrust force of fu = 36 were imposed during all the tests, in order to reach a cruise speed of about 1 m/s during the straight transects. With reference to the Guidance Section 5 the maximum approach angle β¯ has been set to the value of 60 deg, while the maximum yaw rate reference value is imposed up to 5 deg/s. In order to impose the desired dynamics of the guidance module, two parameters, c1 and c2 can be set thus defining the values of the sliding surface characteristic frequencies λ1 and λ2 . In particular, being c1 and c2 the solutions of the associated equation of the sliding surface (eq. 12), the characteristic frequency values are given by: λ1 = −(c1 + c2 ) (21) λ2 = c1 c2 . 444

Fig. 3. Vehicle motion during a sea current free scenario; c1 = 0.985 and c2 = 0.985 plot, the commanded (red) and actual (blue) heading profiles, while in the lower plot the commanded rudder action. The heading profile shows, after transitories, how the motion orientation has the same direction of the line, i.e no external disturbance (sea current) is perturbing the motion of the vehicle during the line following. Moreover, the controller based on Sliding Mode techniques are known to be affected by chattering effects on the output signals; rudder command profile shows a high frequency oscillatory effect that however is confined within an amplitude of 5 degrees, thus not providing mechanical stress on the steering device. A second test is carried out with the same settings of the previous one, but introducing a constant southward directed sea current at the speed of 0.3 m/s. In Figure 5 the motion of the vehicle during the test is depicted and it is possible to notice how the vehicle maintains the motion over the reference line, zeroing the distance by assuming a proper orientation to counteract the current drift effect. In this test, the overshoot effect during the U-turn manoeuvre is reduced thanks to the current effect that in someway “helps” the vehicle to steer close to the reference line. The orientation assumed by the vehicle to counteract the current effect, during straight motion, can be noticed in Figure 6 where a difference from the line orientation and the vehicle’s heading of about 15 degrees is present. As previously introduced in the paper, this orientation effect proves the capability of the Sliding Mode based guidance module to counteract effects induced by constant sea currents. In the third test presented in this paper, a current free scenario is analyzed again, but

IFAC MCMC 2012 September 19-21, 2012. Arenzano, Italy

100

0 −100 −200 50

100

150

200

250

0 −50 −100

300

20

20

10

10

rudder [deg]

rudder [deg]

50

heading [deg]

heading [deg]

100

0 −10 −20 50

100

150

200

250

50

100

150

200

250

300

0

50

100

150 time [s]

200

250

300

0 −10 −20

300

0

time [s]

Fig. 4. Vehicle’s reference and actual heading profiles (upper plot) and commanded rudder action, for the first test

Fig. 6. Vehicle’s reference and actual heading profiles (upper plot) and commanded rudder action, for the second test 40

20

20

0

0

−20

−20

x [m]

x [m]

40

−40

−40

−60

−60

−80

−80

−100

−200

−180

−160

−140 y [m]

−120

−100

−100

−80

−200

−180

−160

−140 y [m]

−120

−100

−80

Fig. 5. Vehicle motion during a 0.3 m/s sea current affected scenario; c1 = 0.985 and c2 = 0.985

Fig. 7. Vehicle motion during a sea current free scenario; c1 = 0.98 and c2 = 0.98

with a change in the guidance dynamics characteristic. The guidance module parameters are set to: c1 = 0.98 and c2 = 0.98. As it can be noticed in Figure 7, the converges is affected by an increased overshoot effect. Heading profile and rudder action for the third test are reported in Figure 8. A fourth test is also reported, changing again the guidance module dynamic characteristic, setting the parameters to: c1 = 0.99 and c2 = 0.99. Figure 9 reports the motion of the USV, this time affected by a slower convergence rate to the reference line. Heading profile and rudder action for the fourth test are reported in Figure 10.

approach, supported by numerical trials, demonstrate the robustness of the control technique with respect to model uncertainties and external disturbances.

7. CONCLUSIONS In this paper a discrete-time sliding mode based guidance module for an USV has been designed and developed, proving through numerical results the validity of the approach. A cascade control scheme, as well as motion estimation algorithms, allow the achievement of high precision performance in line-following tasks. The theoretical 445

REFERENCES Caccia, M. (2007). Vision-based ROV horizontal motion control: near-seafloor experimental results. Control Engineering Practice, 15(6), 703 – 714. Caccia, M., Bono, R., Bruzzone, G., Spirandelli, E., Veruggio, G., Stortini, A., and Capodaglio, G. (2005). Sampling sea surfaces with SESAMO: an autonomous craft for the study of sea-air interactions. IEEE Robotics Automation Magazine, 12(3), 95 – 105. Caccia, M., Bruzzone, G., and Bono, R. (2006). Modelling and identification of the Charlie2005 ASC. In 14th Mediterranean Conference on Control and Automation, 2006. MED ’06., 1 –6. Caccia, M., Bruzzone, G., and Bono, R. (2008). A practical approach to modeling and identification of small autonomous surface craft. IEEE Journal of Oceanic Engineering,, 33(2), 133 –145.

IFAC MCMC 2012 September 19-21, 2012. Arenzano, Italy

100

100

heading [deg]

heading [deg]

200

0 −100 −200

0

50

100

150

200

250

0 −100 −200

300

0 −20 −40

0

50

100

150 time [s]

200

250

100

150

200

250

300

0

50

100

150 time [s]

200

250

300

40

20

0

x [m]

−20

−40

−60

−80

−200

−180

−160

−140 y [m]

−120

−100

0 −20 −40

300

Fig. 8. Vehicle’s reference and actual heading profiles (upper plot) and commanded rudder action, for the third test

−100

50

20 rudder [deg]

rudder [deg]

20

0

−80

Fig. 9. Vehicle motion during a sea current free scenario; c1 = 0.99 and c2 = 0.99 Caccia, M. and Veruggio, G. (2000). Guidance and control of a reconfigurable unmanned underwater vehicle. Control Engineering Practice, 8(1), 21 – 37. Corradini, M.L. and Orlando, G. (1997). A discrete adaptive variable-structure controller for MIMO systems, and its application to an underwater ROV. IEEE Transactions on Control Systems Technology, 5(3), 349–359. Corradini, M.L., Fossi, V., Giantomassi, A., Ippoliti, G., Longhi, S., and Orlando, G. (2012a). Discrete time sliding mode control of robotic manipulators: Development and experimental validation. Control Engineering Practice, 20(8), 816 – 822.

446

Fig. 10. Vehicle’s reference and actual heading profiles (upper plot) and commanded rudder action, for the fourth test Corradini, M., Ippoliti, G., Longhi, S., Marchei, D., and Orlando, G. (2012b). A quasi-sliding mode observer-based controller for PMSM drives. Asian Journal of Control, 1–8. doi:10.1002/asjc.555. URL http://dx.doi.org/10.1002/asjc.555. Corradini, M., Ippoliti, G., Longhi, S., and Orlando, G. (2012c). A quasi-sliding mode approach for robust control and speed estimation of PM synchronous motors. IEEE Transactions on Industrial Electronics, 59(2), 1096 –1104. Furuta, K. (1993). VSS type self-tuning control. IEEE Transactions on Industrial Electronics, 40(1), 37–44. Kaynak, O. and Denker, A. (1993). Discrete-time sliding mode control in the presence of system uncertainty. Int. J. Contr., 57(5), 1177–1189. Lee, P.M. and Oh, J.H. (1998). Improvements on VSStype self-tuning control for a tracking controller. IEEE Trans. Ind. Electron., 45(2), 319–325. Miskovic, N., Vukic, Z., Bibuli, M., Bruzzone, G., and Caccia, M. (2011). Fast in-field identification of unmanned marine vehicles. Journal of Field Robotics, Wiley InterScience, Wiley Periodicals Inc., 28(1), 101– 120. Sabanovic, A., Jezernik, K., and Sabanovic, N. (2002). Sliding modes applications in power electronics and electrical drives. In X. Yu and J.X. Xu (eds.), Variable Structure Systems: Towards the 21st Century, volume 274, 223–251. Springer-Verlag, Berlin,Germany. Utkin, V.I., Guldner, J., and Shi, J. (1999). Sliding mode control in electromechanical systems. Systems and Control. CRC Press LLC, Florida, USA.