A SWITCHING PATH FOLLOWING CONTROLLER FOR AN UNDERACTUATED MARINE VEHICLE Giovanni Indiveri * ,1 Antonio Pascoal **
* DII - Department of Innovation Engineering, University **
of Lecce, via Monteroni, 73100 Lecce, Italy Instituto Superior Tecnico, ISR-Torre Norte 8, Av. Rovisco Pais 1, 1049-001 Lisboa, Portugal
Abstract: Building on previous work of Aicardi et al.(Aicardi et al. , 2001) a path following controller for underactuated planar vehicles is designed by adopting a polar-like kinematic model of the system. The proposed solution does not generally guarantee null asymptotic path following error, but only its boundedness below an adjustable upper threshold. However , knowledge of the spatial derivative of the paths' curvature is not necessary, thus resulting in a much easier solution to implement when compared to the alternatives available in the literature . Indeed, controllers achieving perfect path following usually require not only the use of the paths' curvature, but also of its derivative with respect to the curvilinear abscissa. Furthermore, the proposed solution may be used to solve the path following problem for unicycle models as well as underactuated marine vehicle models or to master-slave coordinated maneuvering of two vehicles. Simulation results illustrate the performance of the proposed control law. Copyright©2004 IFAC. Keywords: Path following , guidance control, marine systems.
1. INTRODUCTION
Designing path following and trajectory tracking controllers for underactuated marine vehicles is a challenging task that has received wide attention in the past few years. Trajectory tracking deals with the case where a vehicle must track a timeparameterized reference. Path following refers to the problem of making a vehicle converge to and follow a given path, without any temporal specifications. A guidance controller to accomplish this task generates angular and linear velocity commands that are then transformed into actuator references by a lower level control system. The guidance regulator is thus designed based on a kinematic model of the vehicle only whereas the 1
lower level actuator control system takes care of the dynamics of the plant. The necessary state estimates to implement the guidance and control levels are generated by a navigation subsystem that processes sensor outputs. Overall this architecture is known as navigation, guidance and control (NGC) in the literature. The present paper will focus on a guidance law for path following. Among the most relevant recent results in this field, a backstepping control design technique is employed in (Fossen et al., 1998) for a surface vessel having an aft and a lateral propeller along the surge and sway axis, respectively. In this work, control system design is done based on a full nonlinear dynamic model of the ship. The resulting tracking control law is static (i.e. time invariant) and guarantees global convergence of
Corresponding author ,
[email protected]
CAMS 2004
489
x s
<
y Fig. 1. The model the position error to zero in spite of constant unknown environmental force disturbances, but the orientation of the vehicle is left in open loop. In (Pettersen and Nijmeijer, 1998a) the kinematics of a surface vehicle are considered and a timevarying control law for the surge and yaw inputs is designed such that the pose (i.e. position and orientation) error of the vehicle with respect to a reference trajectory of constant curvature is practically globally exponentially stabilized to zero. Remarkably it is not necessary for the reference linear speed to be nonzero, i.e. the same control law guarantees global practical stabilization if the reference trajectory should degenerate to a constant pose. In (Pettersen and Nijmeijer, 1998b) a similar model is considered and a static control law is designed that guarantees exponential, semi-global convergence of the surface vessel to a desired reference trajectory. The major limitation of this solution is that the reference angular velocity is required to be always nonzero, namely straight lines are not valid reference courses. In (Encarna<;ao et al., 2000a) a 2D path following controller is designed for the dynamic model a marine vehicle. This static solution takes explicitly into account constant but unknown currents and it guarantees global convergence of the pose error to zero. As explicitly shown in (Encarna<;ao et al., 2000b), reference paths are not required to have constant curvature. Remarkably the same design methodology may be extended to solve also the 3D path following problem as addressed in (Encarna<;ao and Pascoal, 2000). In (Indiveri et al., 2000) a static solution to the 2D problem of stabilizing the kinematic model of a marine vehicle on a linear course is proposed. The control law is designed exploiting a potential field -like idea which has been successfully employed to solve
490
also the unicycle pose regulation problem (Aicardi et al., 2000). Convergence to the reference linear course is global and has exponential rate , but environmental disturbances are not explicitly taken into account. In (Berge et al., 1998) (Berge et al., 1999) a position (not pose) tracking law is designed for the dynamic model of a surface vessel having a stern propeller and a rudder. The solution is static and explicitly takes into account a constant unknown disturbance force. Interestingly the idea behind the design of this solution is quite close to the one adopted in this paper: a virtual reference point (VRP) is defined at the bow or ahead of the vessel and the error variable that is globally exponentially stabilized to zero is precisely the distance between the VRP and a reference point moving along the reference path. The heading of the vessel is left in open loop , thus the vessel may rotate around if the VRP is not suitably chosen with respect to the center of mass of the vessel. Some of the above references refer to trajectory tracking controllers and others to path following ones, but all share the ambitious control objective of perfect tracking (viz. perfect path following) . This might be a quite demanding and often unrealistic goal in real applications. Indeed the resulting control laws are difficult to be experimentally implemented as they generally require knowledge not only of the reference path's curvature, but also its spatial derivative. By relaxing the control objective from perfect path following to convergence inside a "tube" of non null diameter centered on the reference path as done in (Aicardi et al., 2001) , the control design is considerably simplified and the synthesized law does not make use of the reference paths derivative. Indeed in the great majority of real applications perfect path
CAMS 2004
following is actually not necessary and in marine application it would not be practically realizable anyhow because of the limited accuracy of the vehicles position relative to the reference path. The path following guidance law presented in (Aicardi et al., 2001), although effective, forced the marine vehicle to follow the reference path with an unnatural heading, even when the reference curve was a straight line: the present paper builds on those results solving this issue. For the sake of simplicity ocean currents are not considered. The basic idea is to consider a virtual point moving on the reference path and to stabilize its distance from the marine vehicle to a target value. It turns out that the proposed controller may be also considered for master-slave coordinated guidance of two vehicles where a master vehicle replaces the virtual point on the path and the slave vehicle implements the guidance law here designed. The paper is organized as follows. Section 2 describes the model of a marine vehicle that will serve as a focal point for the work that follows . In Section 3 the path following problem is formulated for that vehicle and in Section 4 the corresponding control design is addressed. Section 5 provides results of simulations and, finally, Section 6 contains the main conclusions.
2. VEHICLE MODEL In the absence of currents, the vehicle kinematics are described by:
= u cos '!j; + v sin '!j;
(1)
if = u sin '!j; - v cos '!j;
(2)
'!j;=r.
(3)
:i;
where, following standard notation, u (surge speed) and v (sway speed) are the body fixed frame < B > components of the vehicle's velocity relative to the water, x and y are the Cartesian coordinates of its center of mass with respect to an inertial frame < I >, '!j; defines its orientation, and r is the vehicle's angular speed . Notice that angles and angular speeds are positive when counter clockwise. With reference to figure (1), consider a target frame < T > moving at velocity s along a desired reference path having curvature '" = w r / S : 1",1 < 1/ R for some positive R, where Wr = ~ is the angular velocity of the target frame. The evolution of the position and orientation of the underactuated vehicle with respect to the target frame may be described by the polar like variables e = x 2 + y2, a,
J
(4)
CAMS 2004
The state variables are e, a, (J and v and their dynamics are given by:
e = -u cos a + v sin a + S cos (J . u sin a v cos a s sin (J a=-r+--+ - - - - e e •_ u sin a v cos a (J --w r + - - + - e e v = -a u r - kvv - kvlvlvlvl
-
e s-sin-(J e
(5)
(6) (7) (8)
where a = mll/m22, kv = IYvl/m22, k v1vl = IYvlvll/m22. The symbols mll and m22 capture the effect of mass and added mass terms, whereas Yv and Y v1vl are hydrodynamic derivatives (Fossen, 1994). Notice ~hat not only the equations (6) and (7) for Qc and (J are singular in e = 0, but a and (J are themselves not defined at e = O. The control inputs are surge u and yaw r, while sway is not actuated.
3. PATH FOLLOWING PROBLEM FORMULATION The standard 2D "perfect" path following problem formulation for the kinematic model of a vehicle may be expressed as follows:
PFl: Given a bounded curvature path parameterized in curvilinear coordinates and given the projection Pp of the vehicle's position P on the reference path (that is, the point on the path that is closest to the vehicle) , find a feedback law u = fu(P,pp ,.) , r = fr(P,pp ,·) for the system's linear and angular velocities such that limt_oo liP - Ppll = 0 and limt_oo '!j;(Pp)
491
a switching law S between them will be designed such that:
Fig. 2. Standard path following problem formulation lation is considered :
PF2: With reference to figure (1), given a vehicle with body fixed frame < B > and origin in point OB, given a bounded curvature path and a point OT (origin of the target frame < T > ) moving on it with assigned speed s : s( t) "Io \j t, find a feedback law for the system's linear and angular velocities u and r such that :3 t* : e(t) ::; ~ \j t;::: t* for some arbitrary ~ > 0 being e = IIOT - OB II· The above formulation does not make any use of projections of the vehicle 's position on the path and it does not specify the desired behaviour of the vehicle's heading: in (Aicardi et al., 2001) a solution to PF2 was found that implied limt-->oo a = o. While this guarantees to asymptotically approach maximal control authority on e by u and to minimize the effect of ungoverned sway speed on e (see eq. (5)), it does leave in open loop making theoretically possible configurations with large values of e and a ;::::: 0, namely situations in which the controller tends to drive the vehicle with a velocity "opposite" to s. Moreover even without such extreme situations occurring, namely even if the reference path would be such as to leave e bounded, by example when it is a straight line, imposing a --> 0 without guaranteeing that also e --> 0 ends up in forcing the vehicle to navigate with an unnatural heading angle (refer to figure (1) and equation (4) for a geometrical interpretation of these issues).
• Cl solves problem PF2 in the domain VI := {(e,a,e) : e ;::: eth} where eth E (O,~) and it guarantees limt-->oo a( t) = 0 if the state should continuously evolve in VI. • C2 solves problem PF2 in the domain V 2 := {(e,a , e): e;::: eth U lal ~ ath} for some fixed arbitrary ath E (0,7r/2) , eth E (O,~) and it guarantees limt-->oo a(t) - e(t) = 0 if the state should continuously evolve in V 2 . • C3 is a bounded control law implemented in the domain V3 := {(e,a,e) : e < eth given eth E (O,~)} as control laws Cl and C2 are not defined if e = 0 and could produce unacceptably large responses in its neighbor hood. • S guarantees that if e(t*) ::; ~, which will be shown to always occur by implementing law Clover a sufficiently long time, then e(t) ~ ~ \j t > t* in spite of any possible switching sequence to the other defined control laws. The rationale behind this approach is to point straight at the target (Cl law, a --> 0 as in (Aicardi et al., 2001)) when far from it and to "relax" the steering action (C 2 law, 'ljJ --> rp) trying to navigate parallel to the reference path when closer to it (and a "I- 7r/2). In addition the switching law among the controllers must assure that e(t) remains bounded by a desired threshold ~, yet strictly greater than zero. Controller C3 has the only purpose of avoiding the use of laws Cl and C2 in a neighborhood of the polar coordinate model singularity in e = o.
e
The most natural behaviour of the vehicle's heading once the condition 0 < e(t) ::; ~ should have been reached (and not earlier) appears to be 'ljJ = rp, i.e. to navigate parallel to the target point OT, exactly as commonly done when driving a car having the center lane line as a reference path. In the light of equation (4) this actually corresponds to imposing a = e when 0 < e(t) ::; ~ , whatever the value of a should be, rather than a = O. On the basis of these ideas, in the following sections three separate nonlinear controllers Cl , C2 , C3 and
492
4. CONTROL DESIGN First the design of Cl is addressed:
4·1
Cl design
With reference to the model given by equations (5 - 8) and assuming for the moment that e(t) > o\j t, consider the Lyapunov like function:
and its time derivative
·
V;
(
u sin a
=a -r+ - -
+ hl(e -
s e)
v cos a +- - -sin - + e
l e e
e) (-ucosa + vsina + scos e) (10)
The above suggests the choice
CAMS 2004
r
1 e
= - (u sin a + v cos a - s sin () ) + 11 a+
4.4 S design
Calling d a fixed positive constant to be specified 1 - cosa] (11) later and denoting with Cj f--+ (tjk' Ck ) the tran+hl(e-e) [v~+scos() a sition among controllers Cj : j, k E {I, 2, 3} at time tjk, these are defined as follows: u = kl (e - e) cos a + s cos () : 11, kl > 0 sina
1...."'1 <
that implies
ath : N ch> 1
Nch
and
The Cl control law given by equation (11) guarantees that limt->oo a(t) = 0 and limt->oo e(t) = e if the state should evolve in domain V l := {(e,a,()): e 2: eth} where eth E (O,~).
4. 2
and e 2: eth
C2 design
Consider the following Lyapunov like function:
and its time derivative
V2 = (a -
+ e) (-ucosa + vsina + scos())(.l4)
()) ( - r + wr )
+ h2(e -
Assuming the state to be in domain V 2 := {( e, a, ()) : e 2: eth U lal :S ath} where ath E (0, 71"/2),eth E (O,~), one may chose r =
C2
Wr
+ 12 (a -
()) : 12, k2 > 0
:
(15)
()
{ u =
k2 (e - e) cos a
+ s cos + v cos a
tan a
-,2 (a - ())2
+ h2k2(e - e)2
cos 2 a :S 0 (16)
and guarantees that limt->oo a(t) = ()(t), namely that 'lj; --> 4>, and limt->oo e( t) = e as long as the state stays in domain V 2 .
4·3 C3 design
When the distance to the target e should be smaller than a given threshold value eth, i.e. in V3 := {(e,a , ()) : e < eth given eth E (O,~)}, the vehicle's linear and angular velocities may be chosen to be simply equal to the target ones, namely r
C3
CAMS 2004
Notice that if controller Cj for j E {I, 2} is continuously active in the time interval [TOj, Tjxl for j, x E {I, 2}, then the distance to the target satisfies:
le(t) - el :S
that yields
V2 =
Besides the condition on V2 in (18), that as outlined below is necessary to assure boundedness of e(t) over time, the switching law among Cl and C2 is driven by a: if lal 2: ath : ath < 71"/2 then C2 , being singular in lal = 71"/2, is inhibited and Cl is made active (19). The term Nch used in (18) to eventually hand back the control activity to C2 is chosen to be strictly larger than 1 (rather than equal to 1 which would be otherwise fine) to avoid chattering in the switching among Cl and C2 .
:
= Wr (17)
{
u =
s
Assuming for the moment that e(t) 2: eth V t, namely that C3 is never activated, C2 can be active only when the state is in V 2 , i.e. where C2 is properly defined. Being C2 active , if the transition to Cl should never take place, then problem PF2 would be trivially solved by asymptotically converging to a distance e (eg. chose e < ~) from the target point and (asymptotically) navigating parallel to the reference path. Similarly if Cl should always be active at all times, problem PF2 would be solved (as in (Aicardi et al., 2001)) by asymptotically converging to a distance e (eg. chose e < ~) from the path, but heading (asymptotically) always to the target point (a --> 0). Notice that this situation, yet possible for specific reference paths, is highly unlikely as the convergence of a to zero and of e to e will trigger the transition Cl f--+ (t12, C2 ) according to (18). The likelihood of this transition can be increased by increasing the value of the h2
493
gain. If the transition Cl f--t (h2,C2) should take place at time t12 = t* in compliance with (18), as long as C2 will remain active for all t ? t*, the distance to the path will be bounded by:
le(t) - el ::;
(22)
Theorem: Given the model described by equations (5-8) and
ath
(0, 7r /2)
(28)
0< eth < e < ~
(29)
d = e - eth
(30)
E
h min = min{h l , h 2 }, hI, h2 > 0 At last if the control action should be switched back to Cl, namely if a sequence of the kind Cl f--t (t12,C 2) f--t (t21,C I ) should occur being (t12,C 2 ) f--t (t21,Cd triggered by la l hitting the boundary value ath as by (19) , then the following would hold:
le(t) - el ::;
ath hI
+ d2
t
?
t21
2
(32)
problem PF2 is solved by the control law described in equations (11,15,17) and (18-20).
(23)
(24)
problem PF2 would be solved thanks to (18-19) if e(t) ? eth at all times. Finally, lets consider the influence of controller C3 if e should be e < eth: the transitions Cl f--t (tI3, C3) and C2 f--t (t23, C3) cannot make e > ~ as by definition eth < ~ . To guarantee that problem PF2 is actually solved we need only to guarantee that the eventual transitions C3 f--t (t 31' Cl) and C3 f--t (t32' C2) leave e smaller than ~. Calling (25) and recalling once again equation (21), it follows that: 47r 2 hmin
-
+ (eth
- e)2
(26)
\f t E (t3x, tXj) : x,j E {1 , 2}
where the term 47r 2 is an upper bound of (a - 0)2 and a 2 . Thus in order for the condition e ::; ~ to hold, it is sufficient that (27)
that needs to be satisfied together with equation (24) for problem PF2 to be solved. Noticing that condition (27) would imply (24) if d = e - eth, the following result holds:
494
- e)
5. SIMULATION RESULTS \f
As a consequence of this analysis, by choosing the positive design parameters hI, ath, d and e such that
le(t) - el::;
47r hmin
- - + (eth
(31)
2VI (t21) < hI 2
<
2
The simulation results reported refer to a reference path that was generated by a unicycle kinematic model having constant linear speed S = l[m/8] and wr(t) = 7r/6 exp(-4t/T)sin(~ t) with T = 180[8]. In all figures concerning the simulation results, data points referring to controller Cl are plotted with a circle (mostly viewed as a thick line given the resolution), and data referring to C2 is plotted with a thin solid line. This allows to visually evaluate the effect of controllers Cl and C2 during their respective activity. As expected, the activity of controller C2 is most useful in forcing the heading of the vehicle parallel to the reference heading as opposed to the effect of Cl that , while assuring maximal control authority over e( t) on behalf of u(t) and while preventing that C2 ever reaches its singular value lal = 7r /2, tends to impose an unnatural sideslip to the vehicle (refer to the heading plots). The plots of e(t) (e := 3[m]) and of the paths (solid line for the vehicle, dashed for the reference) reveal that the control objective of converging in a ~-ball centered on the reference path is indeed achieved without danger of reaching the singular value e = 0 (actually e is always larger than eth and the control law C3 is never active). In the plot of a(t) the four boundary values -ath , -ath / Nch, ath/ Nch, ath being ath = 70°, Nch = 10 are reported (solid lines parallel to the x-axis) allowing to visualize the geometrical meaning of the switching law S. Notice that if Nch should be continuously red uced to 1, the oscillations of a(t) visible from approximately t = 15[8] to t = 60[8], driven by the Cr C2 switching, would have ever increasing frequency (and decreasing amplitude) ending up in infinite frequency chattering when Nch = 1. Hence the relevance of the Nch parameter. The discontinuity of signals u and r is due to the kinematic nature of the model adopted for the design.
CAMS 2004
a . . - - - --"":!-----,-
tOO
I 2Qt
r-----.....---
'I
'~t
:r
\1
E l
~ ·:r ~10~
\ 1
!
,
:j . ...•.. . . . . . . ~. . .
<. x (m)
..
..
I
~J
fO .... .......•
.00
.. ..........~..............
·,Go······
120
'<0
11",.,(5)
• and ebar :SO ' ..- - ..
. ,..
,
;
--·"f-----..r ·-----~!'"· ~-----·~-----··,.__----,,-----.,._---'-----'1 t
. ,.
.•
,
osi. i
({( -~( 10
cD
eo
10
lOO
120
Ilme['J
t ..
o
t.
,to
Fig. 3. Simulation results.
6. CONCLUSIONS A steering controller for an underactuated marine vehicle is designed to drive and keep the vehicle within a wanted distance from a given reference path. The closed loop control solution does not require knowledge of the spatial derivative of the reference path curvature as opposed to most controllers designed for perfect path following. Once that a (virtual) target point Pp moving on the desired path is defined, the steering control action is a function of the linear and angular velocities of Pp and of the pose of the vehicle with respect to Pp only. This makes the proposed approach suitable also for master-slave coordinated control of two vehicles, i.e. a master vehicles plays the role of
CAMS 2004
the target point Pp and a slave one implements the steering law here designed. Future work should focus on extending the presented approach to the case where current or wind disturbances should be present as well as consider the effect of the vehicle's dynamics on the convergence and stability properties of the overall closed loop system.
REFERENCES Aicardi, M., G. Cannata, G. Casalino and G. Indiveri (2000). On the stabilization of the unicycle model projecting a holonomic solution. In: 8th Int. Symposium on Robotics with Applications, ISORA 2000. Maui, Hawaii, USA.
495
. i ,~~r- -I SMyspeed
G.I ,--- --~ --~-_,___-·_r----"T'"""---"""T"----,·- ---·-,.--~
. , \f \
.
r'. , ~
....
.. ' .. 4'0 "'" ......~.....
····"~···············i~· ······· ···· ;·~
timer.)
Pettersen, K. Y. and H. Nijmeijer (1998a). Global practical stabilization and tracking for an underactuated ship - a combined averaging and backstepping approach. In: IFAC Conf. on Systems Structure and Control. Nantes, France. pp. 59- 64. Pettersen, K. Y. and H. Nijmeijer (1998b). Tracking control of an underactuated surface vessel. In: 31h Conference on Decision and Control, CDC '9S. Tampa, Florida, USA. pp. 45614566 .
..
,
Fig. 4. Sway speed. Aicardi, M., G. Casalino, G. Indiveri, A. Aguiar, P. Encarna<;ao and A. Pascoal (2001). A planar path following controller for underactuated marine vehicles. In: 9th IEEE Mediterranean Conference on Control and Automation. Dubrovnik, Croatia. Berge, S. P., K. Ohtsu and T. 1. Fossen (1998). Nonlinear control of ships minimizing the position tracking errors. In: IFAC Conf. on Control Applications in Marine Systems, CAMS'9S. Fukuoka, Japan. pp. 83-89. Berge, S. P., K. Ohtsu and T. I. Fossen (1999). Nonlinear control of ships minimizing the position tracking errors. Mode ling, Identification and Control 20(3), 177- 187. Encarna<;ao, P., A. Pascoal and M. Arcak (2000a). Path following for autonomous marine craft. In: 5th IFAC Conference on Marine Craft Maneuvering and Control, MCMC2000. Aalborg, Denmark. pp. 117-122. Encarna<;ao, P., A. Pascoal and M. Arcak (2000b) . Path following for marine vehicles in the presence of unknown currents. In: 6th IFAC Symposium on Robot Control, SYROCO'OO. Vienna, Austria. pp. 469- 474. Encarna<;ao, P. and A. Pascoal (2000). 3D path following for autonomous underwater vehicle. In: 3ffh IEEE Conference on Decision and Control CDC'2000. Sydney, Australia. pp. 2977- 2982. Fossen, T. I. (1994). Guidance and Control of Ocean Vehicles. John Wiley & Sons, England. Fossen, T. I., J. M. Godhavn, S. P. Berge and K. P. Lindegaard (1998). Nonlinear control of underactuated ships with forward speed compensation. In: IFAC NOLCOS'9S. Enschede, The Netherlands. pp. 121- 127. Indiveri, G., M. Aicardi and G. Casalino (2000) . Nonlinear time-invariant feedback control of an underactuated marine vehicle along a straight course. In: 5th IFAC Conference on Marine Craft Maneuvering and Control, MCMC2000. Aalborg, Denmark. pp. 221226.
496
CAMS 2004