Adaptive fuzzy control for the ship steering problem

Adaptive fuzzy control for the ship steering problem

Mechatronics 16 (2006) 479–489 Adaptive fuzzy control for the ship steering problem Gerasimos Rigatos a, Spyros Tzafestas b b,* a Unit of Industria...

250KB Sizes 10 Downloads 548 Views

Mechatronics 16 (2006) 479–489

Adaptive fuzzy control for the ship steering problem Gerasimos Rigatos a, Spyros Tzafestas b

b,*

a Unit of Industrial Automation, Industrial Systems Institute, 26504 Rion Patras, Greece Intelligent Robotics and Automation Laboratory, National Technical University of Athens, Zografou Campus, 15773 Athens, Greece

Received 20 July 2004; accepted 28 January 2006

Abstract Adaptive fuzzy H1 control is proposed for the ship steering problem. The objective is to keep the influence of the modelling errors and the external disturbances on the tracking error below an arbitrary desirable level. The method is compared to nonlinear backstepping control. Simulation tests show the method’s efficiency.  2006 Elsevier Ltd. All rights reserved.

1. Introduction In the recent years, sophisticated ship autopilots have been proposed, based on advanced control engineering concepts. These include model reference adaptive control, self-tuning control, optimal control and neural control [1–4]. In this paper, adaptive fuzzy H1 control will be used to design a ship autopilot. This method will be compared to nonlinear backstepping control. In adaptive fuzzy H1 control the overall control signal consists of two elements: (i) the equivalent control which is used for the linearization of the plant through feedback of the state vector. The equivalent control includes neurofuzzy approximators of the unknown parts of the plant’s model, (ii) the supervisory control consists of an H1 term which compensates for parametric uncertainties of the plant and external disturbances. Nonlinear backstepping is related to feedback linearization. Backstepping control is based on a change of coordinates (diffeomorfism). The transformed system is decomposed in two cascaded subsystems and a stabilizing function is introduced to the first one [5]. The stability proof is recursive, i.e., starting from the second subsystem

*

Corresponding author. Tel.: +30 1 772 1257; fax: +30 1 772 2490. E-mail addresses: [email protected] (G. Rigatos), [email protected]. ntua.gr (S. Tzafestas). 0957-4158/$ - see front matter  2006 Elsevier Ltd. All rights reserved. doi:10.1016/j.mechatronics.2006.01.003

and moving backwards. Unlike adaptive fuzzy H1 control, backstepping control assumes knowledge of the dynamic model of the plant. The structure of the paper is as follows: In Section 2 the ship steering problem is discussed. In Section 3 the principles of adaptive fuzzy H1 control are presented. In Section 4, neurofuzzy approximators for adaptive fuzzy H1 control are discussed. In Section 5 the stability analysis of adaptive fuzzy H1 control is presented. In Section 6, the concept of backstepping control for SISO nonlinear systems is explained and stability analysis for the ship steering problem is provided. In Section 7 the performance of the aforementioned control approaches is tested on the problem of the ship autopilot. Finally, in Section 8 concluding remarks are stated. 2. The ship steering problem 2.1. The ship steering problem The complete dynamic model of the ship stems from Euler–Lagrange dynamic analysis [6]. The mathematical model relating the rudder angle d of the ship to the heading / (Fig. 1) was proposed by Norbin (1963) [1,7]: € þ K  H N ð/Þ _ ¼ K  d; T/ _ ¼ n3 /_ 3 þ n2 /_ 2 þ n1 /_ þ n0 ; H N ð/Þ

ð1Þ

480

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

where f(x, t), g(x, t) are unknown nonlinear functions and d~ is an unknown additive disturbance. The objective is to force the system’s output y = x to follow a given bounded reference signal xd. In the presence of non-Gaussian disturbances w, successful tracking of the reference signal is denoted by the H1 criterion Z T Z T eT Qe dt 6 q2 wT w dt; ð8Þ 0

Fig. 1. Kinematic model of the ship.

_ is the nonlinear maneuvering characteristic. where H N ð/Þ For a course unstable ship n1 < 0, whereas a course-stable ship satisfies n1 > 0. For single-screwed ships (one propeller) n0 5 0. Similarly, symmetry in the hull implies that n2 = 0. Usually, the bias term n0 cannot be identified accurately due to the influence of the environmental disturbances (wind, _ can be found waves and currents). The function H N ð/Þ, from the relationship between d and / in steady state, such € ¼ /_ ¼ d_ ¼ 0. An experiment known as the spiral test that / _ can be approximated by [8,9] has shown that H N ð/Þ _ _ ¼ n3 /_ 3 þ n1 /. H N ð/Þ

ð2Þ

In the above equations K is a gain (s1), and T is a time constant (s). These parameters are function of ship’s forward velocity and its length. The state-space model of the ship can be written as x_1 ¼ x2 ; ð3Þ K K x_2 ¼  H ðx2 Þ þ u; T T where y = x1 and u = d. Setting x1 = / and x2 ¼ /_ the state equation of the ship is obtained:        0 1 x1 0 x_ 1 ~ ¼ þ ðf ðx; tÞ þ gðx; tÞu þ dÞ; ð4Þ 0 0 1 x2 x_ 2   x1 ; ð5Þ y ¼ ð1 0Þ x2 where d~ stands for the external disturbances while the nonlinear functions f(x, t) and g(x, t) are given by f ðx; tÞ ¼  gðx; tÞ ¼

K _ _ ¼  K fn3 /_ 3 þ n1 /g; H N ð/Þ T T

K . T

ð6Þ

3.1. Problem statement The following nonlinear SISO system is considered x

~ ¼ f ðx; tÞ þ gðx; tÞu þ d;

where q is the attenuation level and corresponds to the maximum singular value of the transfer function G(jx) of the linearized equivalent of Eq. (7) [10,11]. The H1 approach to nonlinear systems control consists of two steps: (i) the unknown system dynamics are approximated by neural or fuzzy estimators, (ii) feedback linearization is applied, (iii) an H1 control term, is employed to compensate for estimation errors and external disturbances [12]. Variances in the design of adaptive fuzzy controllers, suitable for the ship steering problem can be also found in [13–15]. 3.2. Transformation of the tracking problem to a regulation problem In nonlinear control the following cases can be distinguished: (i) the system’s model is known and the state vector is measurable, while the system is subject to additive disturbances. In that case, feedback linearization and a simple switching control law suffice to succeed convergence to the desirable set-point [16,17], (ii) the system’s model is unknown, the state vector is available and the system is subject to external disturbances. In that case the unknown part of the system dynamics can be approximated with the use of indirect adaptive control, while the external disturbances can be compensated through the application of a supervisory control term (such as H1 or sliding mode control) [18,19]. For measurable state vector x and uncertain functions f(x, t) and g(x, t) an appropriate control law for (7) would be u¼

i 1 h ðnÞ ^ xd  f ðx; tÞ þ K T e þ uc ; g^ðx; tÞ

ð9Þ T

with KT = [kn, kn1, . . . , k1], eT ¼ ½e; e_ ; €e; . . . ; eðn1Þ  such that the polynomial e(n) + k1e(n1) + k2e(n2) +    + kne is Hurwitz. The control law of Eq. (9) results into ~ eðnÞ ¼ K T e þ uc þ ½f ðx; tÞ  f^ ðx; tÞ þ ½gðx; tÞ  g^ðx; tÞu þ d; ð10Þ

3. Adaptive fuzzy H‘ control

ðnÞ

0

ð7Þ

where the supervisory control term uc aims at the compensation of the approximation error w ¼ ½f ðx; tÞ  f^ ðx; tÞ þ ~ ½gðx; tÞ  g^ðx; tÞu, as well as of the additive disturbance d. The above relation can be written in a state-equation form. The state vector is taken to be eT ¼ ½e; e_ ; . . . ; eðn1Þ , which yields

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

481

e_ ¼ Ae  BK T e þ Buc þ Bf½f ðx; tÞ  f^ ðx; tÞ ~ þ ½gðx; tÞ  g^ðx; tÞu þ dg )

e_ ¼ ðA  BK T Þe þ Buc þ Bf½f ðx; tÞ  f^ ðx; tÞ ~ þ ½gðx; tÞ  g^ðx; tÞu þ dg

)

e_ ¼ ðA  BK T Þe þ Buc þ Bf½f ðx; tÞ  f^ ðx; tÞ ~ þ ½gðx; tÞ  g^ðx; tÞu þ dg; T

e1 ¼ C e;

ð11Þ ð12Þ

where 0

0

B 0 B B B B A¼B B B B @ 0 0

0





0

1



0 C C C  C C C;  C C C  1 A



 



 

0 0

1

B 0 C B C B C BC B C B ¼ B C; BC B C B C @ 0 A

1

1

0

0

0

0



0

  0 0 k 1 0 B k C B 1 C C B B  C C B K¼B C; B  C C B C B @ k n2 A

1

Fig. 2. Neurofuzzy approximator: Gi Gaussian basis function, Ni normalization unit.



k n1

linear models. The above model is a Takagi–Sugeno model of order 1. Setting wli ¼ 0 results in the zero order Takagi– Sugeno model. The estimations of f(x, t) and g(x, t) are 0

1

1

ð13Þ

f^ ðxjhf Þ ¼ hTf /ðxÞ;

where /(x) are kernel functions with elements Yn llAi ðxi Þ l / ðxÞ ¼ XL i¼1 ; l ¼ 1; 2; . . . ; L. Yn l l ðx Þ i l¼1 i¼1 Ai

B 0 C B C B C BC B C C ¼ B C; BC B C B C @ 0 A 0

where e1 denotes the output error e1 = x  xm. Eqs. (11) and (12) describe a regulation problem. The additional term uc which appeared in Eq. (9) is introduced to compensate for: ~ • The external disturbances d. • The approximation error of the nonlinear functions f(x, t) and g(x, t), denoted as w ¼ ½f ðx; tÞ  f^ ðx; tÞ þ ½gðx; tÞ  g^ðx; tÞu. The control signal uc consists of the H1 control term, ua ¼  1r BT Pe for the compensation of d and w. 4. Neurofuzzy approximators for adaptive fuzzy H‘ control

ð15Þ

with mhf and mhg positive constants. The values of hf and hg for which optimal approximation is succeeded are    ^ hf ¼ arg min sup jf ðxÞ  f ðxjhf Þj ; hf 2M hf

hg ¼ arg min



x2U x

 sup jgðxÞ  g^ðxjhg Þj . x2U x

The variation ranges of x and ^x are the compact sets U x ¼ fx 2 Rn : kxk 6 mx < 1g; U ^x ¼ f^x 2 Rn : k^xk 6 m^x < 1g. The approximation error of f(x, t) and g(x, t) is given by

The approximation of functions f(x, t) and g(x, t) of Eq. (7) can be carried out with Takagi–Sugeno neurofuzzy networks (Fig. 2). The Takagi–Sugeno fuzzy model consists of rules of the form: IF x1 is Al1 AND x2 is Al2 AND    AND xn is Aln n X THEN y l ¼ wli xi þ bl ;

gðxjhg Þ  gðx; tÞu w ¼ ½f^ ðxjhf Þ  f ðx; tÞ þ ½^ n o ) w ¼ ½f^ ðxjhf Þ  f ðxjhf Þ þ ½f ðxjhf Þ  f ðx; tÞ n o þ ½^ gðxjhg Þ  gðxjhg Þ þ ½gðxjhg Þ  gðx; tÞu ; where

i¼1

l

ð14Þ

It is assumed that that the weights hf and hg vary in the bounded areas M hf and M hg which are defined as   M hf ¼ hf 2 Rh : khf k 6 mhf ;   M hg ¼ hg 2 Rh : khg k 6 mhg

hg 2M hg

Rl:

g^ðxjhg Þ ¼ hTg /ðxÞ;

T

l = 1, 2, . . . , L, where R is the lth rule, x = [x1, x2, . . . , xn] is the input (antecedent) variable, y is the output (consequent) variable, and wli , bl are the parameters of the local

• f^ ðxjhf Þ is the approximation of f for the best estimation hf of the weights’ vector hf. • g^ðxjhg Þ is the approximation of g for the best estimation hg of the weights’ vector hg.

482

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

The approximation error w can be decomposed into wa and wb, where wa ¼ ½f^ ðxjhf Þ  f^ ðxjhf Þ þ ½^ gðxjhg Þ  g^ðxjhg Þu; gðxjh Þ  gðx; tÞu. wb ¼ ½f^ ðxjh Þ  f ðx; tÞ þ ½^ f

g

Finally, the following two parameters are defined: ~ hf ¼ hf  hf ;

~ hg ¼ hg  hg .

ð16Þ

The following weight adaptation laws are considered ( c1 eT PB/ðxÞ if khf k < mhf ; ð19Þ h_ f ¼ 0 if khf k P mhf ; ( c2 eT PB/ðxÞuc if khg k < mhg ; h_ g ¼ ð20Þ 0 if khg k P mhg . To set h_ f and h_ g equal to 0, when khf k P mhf , and khg k P mhg the projection operator is employed [18]:

5. Stability analysis of adaptive fuzzy H‘ control The adaptation law of the weights hf and hg as well as of the supervisory control term uc are derived by the requirement for negative definiteness of the Lyapunov function 1 1 ~T ~ 1 ~T ~ h hf þ h hg . V ¼ eT Pe þ ð17Þ 2 2c1 f 2c2 g Substituting Eq. (11) into Eq. (17) and differentiating results into 1 1 1 T ~_ 1 T ~_ V_ ¼ e_ T Pe þ eT P e_ þ ~ hf hf þ ~ h hg 2 2 c1 c2 g 1 T ~ T Pe ) V_ ¼ feT ðA  BK T Þ þ Bðuc þ w þ dÞg 2 1 ~ þ eT P fðA  BK T Þe þ Bðuc þ w þ dÞg 2 1 T ~_ 1 T ~_ hf h f þ ~ h hg þ ~ c1 c2 g 1 T ) V_ ¼ feT ðA  BK T Þ P þ P ðA  BK T Þge 2 1 T ~_ _ ~ þ1~ hf þ ~ hTf ~ h hg þ BT Peðuc þ w þ dÞ c1 c2 g 1 T ) V_ ¼ eT fðA  BK T Þ P þ P ðA  BK T Þge 2 1 T ~_ _ ~ þ1~ hf þ ~ hTf ~ h hg : þ BT Peðuc þ w þ dÞ c1 c2 g Assumption 1. For given positive definite matrix Q there exists a positive definite matrix P, which is the solution of the following matrix equation:   2 1 T T T ðA  BK Þ P þ P ðA  BK Þ  PB  2 BT P þ Q ¼ 0. r q ð18Þ Substituting Eq. (18) into V_ yields   _V ¼  1 eT Qe þ 1 eT PB 2  1 BT Pe þ BT Peuc 2 2 r q2 1 1 T ~_ _ hf þ ~ hTf ~ h hg þ BT Peðw þ dÞ þ ~ c1 c g  2  1 T 1 T 2 1 _ ) V ¼  e Qe þ e PB  2 BT Pe þ BT Pe 2 2 r q 1 1 ~T ~_ 1 ~T ~_ hf þ h hg .  eT PB þ BT Peðw þ dÞ þ h r c1 f c2 g _ _ hg ¼ h_ g  h_  ¼ h_ g . It holds that ~ hf ¼ h_ f  h_  ¼ h_ f and ~ f

g

P fc1 eT PB/ðxÞg ¼ c1 eT PB/ðxÞ þ c1 eT PB

hf hTf khf k

P fc1 eT PB/ðxÞuc g ¼ c1 eT PB/ðxÞuc þ c1~eT PB

2

/ðxÞ;

hf hTf khf k2

/ðxÞuc .

The update of hf stems from a LMS algorithm on the 2 cost function 12 ðf  f^ Þ . The update of hg is also of the LMS type, while uc implicitly tunes the adaptation gain c2. Substituting Eqs. (19) and (20) in V_ gives 1 1 1 1 V_ ¼  eT Qe þ eT PBBT Pe  2 eT PBBT Pe  eT PBBT Pe 2 r 2q r T T T T T þ B Peðw þ dÞ  e PBh~ /ðxÞ  e PB~h /ðxÞuc ; f

g

i.e., 1 1 V_ ¼  eT Qe  2 eT PBBT Pe þ eT PBðw þ dÞ 2 2q T

T

 eT PBðhf  hf Þ /ðxÞ  eT PBðhg  hg Þ /ðxÞuc 1 1 ) V_ ¼  eT Qe  2 eT PBBT Pe þ eT PBðw þ dÞ 2 2q n o T ^ gðxjhg Þ  g^ðxjh Þuc þ e PB ½f ðxjhf Þ  f^ ðxjh Þ þ ½^ f

g

1 1 ) V_ ¼  eT Qe  2 eT PBBT Pe þ eT PBðw þ dÞ þ eT PBwa ; 2 2q where wa ¼ ½f^ ðxjhf Þ  f^ ðxjhf Þ þ ½^ gðxjhg Þ  g^ðxjhg Þuc . The control scheme is depicted in Fig. 3. The two blocks appearing inside the dashed rectangular denoted as Controller constitute the control law of Eq. (9). The two boxes f^ ðx; tÞ and g^ðx; tÞ appearing in the bottom of the diagram denote the neurofuzzy approximations of functions f(x, t) and g(x, t) which are obtained through the adaptation rules of Eqs. (19) and (20). Denoting w1 = w + d + wa one gets 1 1 V_ ¼  eT Qe  2 eT PBBT Pe þ eT PBw1 2 2q or equivalently, 1 1 1 1 V_ ¼  eT Qe  2 eT PBBT Pe þ eT PBw1 þ wT1 BT Pe: 2 2q 2 2 Lemma. The following inequality holds: 1 T 1 1 1 e PBw1 þ wT1 BT Pe  q2 eT PBBT Pe 6 q2 wT1 w1 . 2 2 2 2

ð21Þ

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

483

Fig. 3. The proposed H1 control scheme.

Proof. The

binomial



qa  q1 b

2

P0

is

considered.

Expanding the left part of the above inequality one gets 1 2 b  2ab P 0 q2 1 2 2 1 q a þ 2 b2  ab P 0 2 2q 1 2 1 2 2 ab  2 b 6 q a 2q 2 1 1 1 1 ab þ ab  2 b2 6 q2 a2 . 2 2 2q 2

q2 a2 þ ) ) )

Z



)

T 2 kekQ dt 0

2V ðT Þ  2V ð0Þ 6 

Z

1 þ q2 2

Z

)

2V ðT Þ þ

0

ð23Þ

2

kw1 k dt

Lf hðxÞ ¼

0

T 2 kekQ dt

where x = [x1, . . . , xn]T, it holds that y_ ¼ ohðxÞ ½f ðxÞ þ x_ ¼ ohðxÞ ox ox gðxÞu ¼ Lf hðxÞ þ Lg hðxÞu, where the Lie derivatives are defined as

T

þq

2

Z

0

Z

y ¼ hðxÞ;

ð22Þ

Hence, the H1 performance criterion is satisfied. The integration of V_ from 0 to T gives

0

6.1. Nonlinear backstepping

x_ ¼ f ðxÞ þ gðxÞu;

1 1 V_ 6 eT Qe þ q2 wT1 w1 . 2 2

Z

6. SISO nonlinear backstepping control

For the nonlinear system

The previous inequality is used in V_ , and results into

1 V_ ðtÞ dt 6  2

2

kekQ dt 6 2V ð0Þ þ q2 M w .

R1 2 Thus, the integral 0 kekQ dt is bounded and using Barbalat’s Lemma limt!1e(t) = 0.

1 T T 1 1 1 w B Pe þ eT PBw1  2 eT PBBT P 2 e 6 q2 wT1 w1 : 2 1 2 2q 2

T

1 0

The substitutions a = w1 and b = eTPB are carried out and the previous relation becomes

Z

It is assumed R 1 that there exists a positive constant Mw >R 0T such that 0 kw1 k2 dt 6 M w . Therefore for the integral 0 kek2Q dt one gets

T

kek2Q dt 6 2V ð0Þ þ q2

T

0

Lg hðxÞ ¼

ohðxÞ gðxÞ. ox

2

kw1 k dt

0

Z

ohðxÞ f ðxÞ; ox

T

kw1 k2 dt.

To apply SISO nonlinear backstepping control, the system of Eq. (23) has to be written in a SISO strict feedback form, which means the following lower triangular form:

484

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

It holds that zTS(x)z = 0 "x, z and K(z) > 0 thus for V n ðzÞ ¼ 12 zT z one gets V_ n ðzÞ ¼ zT KðzÞz < 0.

x_ 1 ¼ f1 ðx1 Þ þ g1 ðx1 Þx2 ; x_ 2 ¼ f2 ðx1 ; x2 Þ þ g2 ðx1 ; x2 Þx3 ; x_ 3 ¼ f3 ðx1 ; x2 ; x3 Þ þ g3 ðx1 ; x2 ; x3 Þx4 ; ... x_ n1 ¼ fn1 ðx1 ; x2 ; . . . ; xn1 Þ

ð24Þ

The nonlinear ship model is given by Eq. (1), i.e.,

þ gn1 ðx1 ; x2 ; . . . ; xn1 Þxn ; x_ n ¼ fn ðx1 ; x2 ; . . . ; xn Þ þ gn ðx1 ; x2 ; . . . ; xn Þu;

€ þ H N ð/Þ _ ¼ Kd; T/ H N ð/Þ ¼ n3 /_ 3 þ n2 /_ 2 þ n1 /_ þ n0 .

y ¼ hðx1 Þ. It is considered that y = h(x1) = x1 and that the error is e = y  yd = x1  yd. The objective is to succeed limt!1e(t) ! 0. The following theorem holds [20]: Theorem (Nth order backstepping control law). The nth order SISO backstepping controller is given by 1 a1 ¼ ½_y d  Lf1 hðx1 Þ  k 1 z1  n1 ðz1 Þz1 ; Lg1 hðx1 Þ 1 ½a_ 1  f2 ðx1 ; x2 Þ  Lg1 hðx1 Þz1  k 2 z2  n2 ðz2 Þz2 ; a2 ¼ g2 ðx1 ; x2 Þ ... 1 ½a_ i  fi ðx1 ; . . . ; xi Þ ai ¼ gi ðx1 ; x2 ; . . . ; xi Þ  gi1 ðx1 ; x2 ; . . . ; xi1 Þzi1  k i zi  ni ðzi Þzi ; ... 1 an ¼ ½a_ n1  fn ðx1 ; . . . ; xn Þ gn ðx1 ; x2 ; . . . ; xn Þ  gn1 ðx1 ; x2 ; . . . ; xn2 Þzn1  k n zn  nn ðzn Þzn ; u ¼ an ; ð25Þ where z1 = h(x1)  yd, zi = xi  ai1 (i = 2, . . . , n) and the stabilizing functions ai are selected so as to compensate for all nonlinearities. This control law leads asymptotically the system of Eq. (23) to the equilibrium z = 0. The controller gains are ki > 0 and ni(zi) P 0 for i = 1, . . . , n. Denoting z = [z1, . . . , zn]T, the resulting error dynamics is given by z_ ¼ KðzÞz þ SðxÞz

ð26Þ

0

B L ðx Þ B g1 1 B B 0 B B .. SðxÞ ¼ B . B B B 0 B B @ 0 0

Lg1 ðx1 Þ

0

0 g2 ðx1 ; x2 Þ g2 ðx1 ; x2 Þ  .. .. . . 0 0

The SISO backstepping controller is designed in two steps [5]: Step 1: The error is defined as e = /  /d. Thus z1 ¼ e;

z_ 1 ¼ /_  /_ d ;

ð28Þ

where y = a1 + z2, thus z_ 1 ¼ a1 þ z2  /_ d .

ð29Þ

The stabilizing function a1 is selected so as to assure that z1 ! 0. Therefore, a1 ¼ /_ d  k 1 z1  n1 ðz1 Þz1 .

ð30Þ

Then, using Eqs. (29) and (30) one gets: z_ 1 ¼ /_ d  k 1 z1  n1 ðz1 Þz1 þ z2  /_ d )

z_ 1 ¼ ½k 1 þ n1 ðz1 Þz1 þ z2 ;

where k1 and n1(z1) P 0 are design parameters. A candidate Lyapunov function for z1 is 1 V 1 ¼ z21 2 ) V_ 1 ¼ z1 z_ 1 ) V_ 1 ¼ ½k 1 þ n1 ðz1 Þz2 þ z1 z2 . 1

Step 2: For the stabilization of the dynamics of z2 one has €  a_ 1 ¼ K d  1 H N ð/Þ _  a_ 1 . z_ 2 ¼ / T T

with K(z) = diag{k1 + n1(z1), k2 + n2(z2), . . . , kn + nn(zn)},

0

6.2. Design of the ship autopilot using backstepping control



0

0

 0 .. . 

0 0 .. . 0

0 0 .. . gn1 ðx1 ; . . . ; xn1 Þ

0

0

   gn1 ðx1 ; . . . ; xn1 Þ

0

0



0

0 gn ðx1 ; . . . ; xn Þ

0

1

0C C C 0C C .. C C . C. C 0C C C 0A 0

ð31Þ

ð27Þ

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

The second candidate Lyapunov function is

and

1 V 2 ¼ V 1 þ z22 2 ) V_ 2 ¼ V_ 1 þ z2 z_ 2

X16 f^ ðx; tÞ ¼

) V_ 2 ¼ ½k 1 þ n1 ðz1 Þz21 þ z1 z2 þ z2 z_ 2   K 1 2 _ _ ) V 2 ¼ ½k 1 þ n1 ðz1 Þz1 þ z2 z1 þ d  H N ð/Þ  a_ 1 . T T The objective is to find the rudder’s angle d for which V2 will become negative definite. The SISO backstepping control law is given by a1 ¼ /_ d  k 1 z1  n1 ðz1 Þz1 ;   T 1 a1  z1 þ H N ðx2 Þ  k 2 z2  n2 ðz2 Þz2 ; u¼ K T

485

ð32Þ

_ and k2 > 0, n2(z2) P 0 are design where x1 = / and x2 ¼ /, parameters. Thus, one gets

  K T V_ 2 ¼ ½k 1 þ n1 ðz1 Þz21 þ z2 z1 þ fa_ 1  ½k 2 þ n2 ðz2 Þz2  z1g T K K 1 1 _  H N ðwÞ _  a_ 1 þ H N ðwÞ T K T ) V_ 2 ¼ ½k 1 þ n1 ðz1 Þz21  ½k 2 þ n2 ðz2 Þz22 < 0; 8z1 6¼ 0; z2 6¼ 0.

For the application of the SISO backstepping control to the ship steering problem, knowledge of the nonlinear _ is needed. On the contrary, in adaptive function H N ð/Þ fuzzy H1 control this knowledge is obtained through neurofuzzy approximators.

Y2 f^ l i¼1 llAi ðxi Þ . Y2 l l ðx Þ i l¼1 i¼1 Ai

Xl¼1 16

ð35Þ

ðlÞ

The centers ci , i = 1, 2 and the variances v(l) of each rule are as follows: Rule

c1

ðlÞ

c2

ðlÞ

v(l)

R(1) R(2) R(3) R(4) R(5) R(6)  R(16)

1.0 1.0 1.0 1.0 0.5 0.5  1.0

0.3 0.1 0.1 0.3 0.3 0.1  0.3

3 3 3 3 3 3  3

The estimation g^ðx; tÞ was derived in a similar way. The overall simulation time was ts = 30 s. In the first half of the simulation time the training of the neurofuzzy approximators was carried out. In the second half, the estimated functions f^ ðx; tÞ and g^ðx; tÞ were used in the controller. The simulation results for a seesaw set-point are depicted in Figs. 4–6. 7.2. Calculation of the SISO backstepping nonlinear controller

7. Simulation tests

The system of Eq. (1) is written in a SISO strict feedback form, according to Eq. (24)

7.1. Calculation of the adaptive fuzzy H1 controller

x_ 1 ¼ x2 ;

The sampling period was taken to be Ts = 0.01 s. The following parameter values were chosen: K = 1.0 s1, T = 1.0 s, n3 = 102, n1 = 103. The learning rates of the neurofuzzy approximators were taken to be c1 = 0.015, c2 = 0.035. The controller’s gain was K = [10.0, 2.6]T. The disturbance d~ was considered to be the sinusoidal signal d(t) = a(t) sin(2pft) with a(t) = 0.05 and f = 0.1 Hz. For r = 0.1 and q = 0.235 the solution of Eq. (18) resulted into the positive definite matrices     12 2 48 4:4 P¼ ; Q¼ . ð33Þ 2 0:8 4:4 1:44 The basis functions used the estimation of f(x, t) and

^xcj in 2 g(x, t) were lAj ð^xÞ ¼ e r , j = 1, . . . , 4. Since there are two inputs x1 and x_ 1 and the associated universes of discourse consist of 4 fuzzy sets there will be 16 fuzzy rules of the form: Rl:

IF ^x1 is Al1 AND ^x_ 1 is Al2 THEN f^ l is bl

ð34Þ

1 K x_ 2 ¼  ½n3 x32 þ n1 x2  þ u; T T

where f2 ðx1 ; x2 Þ ¼  T1 ½n3 x32 þ n2 x22 þ n1 x2 þ n0  and g2 ðx1 ; x2 Þ ¼ KT . Therefore, n = 2 and the SISO backstepping controller is given by the following relations: a1 ¼

1 ½_y d  Lf1 hðx1 Þ  k 1 z1  g1 ðz1 Þz1 ; Lg1 hðx1 Þ

a2 ¼

1 ½a_ 1  f2 ðx1 ; x2 Þ  Lg1 hðx1 Þz1  k 2 z2  g2 ðz2 Þz2 ; g2 ðx1 ; x2 Þ

u ¼ a2 .

ð36Þ

It holds that Lg1 hðx1 Þ ¼

ohðx1 Þ ox1 g1 ðx1 Þ ¼ 1 ¼ 1; ox1 ox1

ohðx1 Þ ox1 Lf1 hðx1 Þ ¼ f1 ðx1 Þ ¼ 0¼0 ox1 ox1

ð37Þ

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

0.5

0.5

0.4

0.4 angle (rad)

angle (rad)

486

0.3

0.2

0.3

0.2

0.1

0.1

0

0

–0.1 0

5

10

15 time (sec)

20

25

30

–0.1 0

5

10

(a)

15 time (sec)

20

25

30

(b)

Fig. 4. Heading / (continuous line) and desirable heading /d (dashed line) of the ship when tracking a see-saw set-point: (a) using adaptive fuzzy H1 control and (b) using nonlinear backstepping control.

0.4

0.4

0.2

0.2 angular velocity (rad/sec)

angular velocity (rad/sec)

0.6

0

–0.2

–0.4

–0.6

–0.8 0

0

–0.2

–0.4

–0.6

5

10

15 time (sec)

20

25

30

–0.8 0

5

10

15 time (sec)

(a)

20

25

30

(b)

Fig. 5. Angular velocity /_ (continuous line) and desirable angular velocity /_d (dashed line) of the ship when tracking a see-saw set-point: (a) using adaptive fuzzy H1 control and (b) using nonlinear backstepping control.

thus, a1 ¼ ½_y d  k 1 z1  g1 ðz1 Þz1 ;   T 1 _ _ a1 þ H N ð/Þ  1  z1  k 2 z2  g2 ðz2 Þz2 ; a2 ¼ K T

7.3. Simulation results

ð38Þ

u ¼ a2 ; i.e., a1 ¼ ½_y d  k 1 z1  g1 ðz1 Þz1 ;   T 1 a_1  z1 þ H N ðx_2 Þ  k 2 z2  g2 ðz2 Þz2 ; a2 ¼ K T

ð39Þ

u ¼ a2 . The following gains were used k1 = 2.0, k2 = 2.0, n1(z1) = 1.5 and n2(z1) = 1.2.

The performance of adaptive fuzzy H1 control has been compared to the performance of backstepping nonlinear control in the case of a see-saw set-point and the results are depicted in Figs. 4 and 5. The control input to the ship model generated by adaptive fuzzy H1 control and nonlinear backstepping control is depicted in Fig. 6. The approximation of the unknown nonlinear functions f^ ðx; tÞ and g^ðx; tÞ that were obtained by the neurofuzzy approximators in the case of a see-saw set-point using adaptive fuzzy H1 control are shown in Fig. 7. The performance of adaptive fuzzy H1 control was also examined in the case of a sinuoidal set-point. The simulation results are given in Fig. 8. To further increase the sim-

2

2

1

1

0

0

control input

control input

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

–1

–2

–1

–2

–3

–3

–4

–4

–5 0

5

10

15 time (sec)

20

25

–5

30

487

0

5

10

(a)

15 time (sec)

20

25

30

(b)

Fig. 6. Control input (rudder angle d) of the ship when tracking a see-saw set-point: (a) using adaptive fuzzy H1 control and (b) using nonlinear backstepping control.

0.06

1.6

0.05

1.4

0.04

1.2

0.03 function g

function f

1 0.02 0.01

0.8 0.6

0 0.4

–0.01

0.2

–0.02 –0.03 0

5

10

15 time (sec)

20

25

30

(a)

0 0

5

10

15 time (sec)

20

25

30

(b)

Fig. 7. Tracking of a see-saw set-point with adaptive fuzzy H1 control: (a) approximation f^ ðx; tÞ (continuous line) of function f(x, t) (dashed line) and (b) approximation g^ðx; tÞ (continuous line) of function g(x, t) (dashed line).

ulation difficulty, measurement noise was considered. Specifically, a random sequence was added to the measurement _ of the ship’s heading angle / and to the ship’s velocity /. The noise in the measurement of / varied in the interval [1.0, +1.0], while the noise in the measurement of the change of the ship’s heading /_ varied in the interval [0.3/s, 0.3/s]. The tracking of a sinusoidal set-point in the presence of measurement noise is depicted in Fig. 9. From the simulation tests the following remarks can be made: (i) In Fig. 4 it can be observed that adaptive fuzzy H1 control succeeds tracking of the reference angle /d that is comparable to that of nonlinear backstepping control. Overshooting depends on the selection of the feedback gain K. (ii) From Fig. 5 it is clear that both control methods result in excellent tracking of the reference angular velocity /_ d . (iii) In Fig. 6 the variation of the control input

appeared to be more abrupt in the case of adaptive fuzzy H1 control. This was due to the selection of the feedback gain K. (iv) From Fig. 7 it can be seen that the neurofuzzy networks succeed good approximations of the unknown functions f(x, t) and g(x, t). The accuracy in the estimation of g(x, t) is critical for the convergence of the control algorithm. (v) In Fig. 8 the excellent performance of adaptive fuzzy H1 control is verified in the case of sinusoidal setpoints. (vi) Finally, in Fig. 9 the performance of adaptive fuzzy H1 control and nonlinear backstepping control is evaluated in case that measurement noise is added to the ship’s state vector. It can be observed that both controllers maintain the output of the closed-loop system within acceptable levels. Comparing to nonlinear backstepping control, the advantages of adaptive fuzzy H1 control are summarized

488

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489 0.6

0.4 0.3

0.4 0.2

angle velocity (rad/sec)

angle (rad)

0.2

0

–0.2

–0.4

0.1 0 –0.1 –0.2 –0.3 –0.4

–0.6

–0.5 –0.8

0

5

10

15 time (sec)

20

25

–0.6 0

30

5

10

(a)

15 time (sec)

20

25

30

(b)

0.6

0.6

0.4

0.4

0.2

0.2

0

0

angle (rad)

angle (rad)

_ Fig. 8. Tracking of a sinusoidal set-point (dashed line) with adaptive fuzzy H1 control: (a) angle / and (b) angular velocity /.

–0.2

–0.2

–0.4

–0.4

–0.6

–0.6

–0.8 0

0.5

time (sec)

1

1.5

(a)

–0.8 0

0.5

time (sec)

1

1.5

(b)

Fig. 9. Tracking of a sinusoidal set-point in the presence of disturbance and measurement noise: (a) adaptive fuzzy H1 control and (b) nonlinear backstepping control.

in the following: (i) removal of any dependence upon identification of the mathematical model expressing the dynamics of the ship, (ii) since training of the neurofuzzy approximators contained in the adaptive fuzzy H1 controller is repeatedly undertaken in every control cycle, any changes to the ship dynamics can be identified on-line, and hence the control strategy is useful for time varying ship models. Moreover regarding operation under external disturbances and measurement noise, the adaptive fuzzy H1 controller performs equally well to the nonlinear backstepping controller. 8. Conclusions In this paper adaptive fuzzy H1 control was applied to the ship steering problem. The objective was to keep the influence of the modelling errors and the external disturbances on the tracking error below an arbitrary desirable

level. Neurofuzzy approximators were used to identify the nonlinear dynamics of the plant. Adaptive fuzzy H1 control was compared to nonlinear backstepping control. In adaptive fuzzy H1 control, the supervisory control signal contained an H1 control term which compensated for modelling inaccuracies and external disturbances. Lyapunov stability analysis provided the learning law for the neurofuzzy approximators, as well as the supervisory control term for disturbance and modelling error rejection. The backstepping control was based on a change of coordinates (diffeomorfism). The transformed system was decomposed in two cascaded subsystems and a stabilizing function was introduced to the first one. The stability proof was recursive, i.e., starting from the second subsystem and moving backwards to the first one. The performance of the aforementioned control methods was tested through simulation examples and was found to be equivalent. Unlike adaptive fuzzy H1 control, in

G. Rigatos, S. Tzafestas / Mechatronics 16 (2006) 479–489

nonlinear backstepping control knowledge of the dynamic model of the plant is required. The closed-loop system was robust to modelling inaccuracies and external disturbances and excellent tracking performance was succeeded. References [1] Fossen TI, Grovlen A. Nonlinear output feedback control of dynamically positioned ships using vectorial observer backstepping. IEEE Trans Control Syst Technol 1998;6(1):121–8. [2] Tzeng CY. An internal model control approach to the design of yawrate-control ship steering autopilot. IEEE J Ocean Eng 1999;24(4): 507–13. [3] Skjetne R, Fossen TI. Nonlinear maneuvering and control of ships. In: Proceedings of OCEANS 2001 MTS/IEEE conference and exhibition. p. 1808–15. [4] Zhang Y, Hearn GE, Sen P. A neural network approach to ship track-keeping control. IEEE J Ocean Eng 1996;21(4):513–27. [5] Fossen TI, Strand JP. A tutorial on nonlinear backstepping application to ship control. Model Identificat Control 1999;20(2):83–135. [6] Loria A, Fossen TI, Panteley E. A separation principle for dynamic positioning of ships: theoretical and experimental results. IEEE Trans Control Syst Technol 2000;8(2):332–43. [7] Layne JR, Passino KM. Fuzzy model reference learning control for ship steering. IEEE Control Syst Mag 1993;13(6):23–34. [8] Fossen TI, Strand JP. Nonlinear ship control. In: IFAC conference on control applications in marine systems (CAMS’98), Fukuoka, Japan, October 1998. [9] Yang Y, Zhou C. Adaptive fuzzy H1 stabilization for strict-feedback canonical nonlinear systems via backstepping and small-gain approach. IEEE Trans Fuzzy Syst 2005;13(1).

489

[10] Lublin L, Athans M. An experimental comparison of and designs for interferometer testbed. In: Francis B, Tannenbaum A, editors. Feedback control, nonlinear systems and complexity. Lectures notes in control and information sciences, LNCIS. Berlin: Springer; 1995. p. 150–72. [11] Kurylowicz A, Jaworska I, Tzafestas SG. Robust stabilizing control: an overview. In: Tzafestas SG, editor. Applied control: current trends and modern methodologies. New York: Marcel Dekker; 1993. p. 289–324. [12] Chen BS, Lee CH, Chang YC. H1 tracking design of uncertain nonlinear SISO systems: adaptive fuzzy approach. IEEE Trans Fuzzy Syst 1996;4(1):32–43. [13] Yang Y, Ren J. Adaptive fuzzy robust tracking controller design via small gain approach and its application. IEEE Trans Fuzzy Syst 2003;11(6):783–95. [14] Lee KR, Kim JH, Jeung ET, Park HB. Output feedback robust H1 control of uncertain fuzzy dynamic systems with time-varying delay. IEEE Trans Fuzzy Syst 2000;8(6):657–64. [15] Lo JC, Lin ML. Observer-based robust H1 control for fuzzy systems using two-step procedure. IEEE Trans Fuzzy Syst 2004;12(3): 350–9. [16] Rigatos GG, Tzafestas CS, Tzafestas SG. Mobile robot motion control in partially unknown environments using a sliding-mode fuzzy-logic controller. Robot Auton Syst 2000;33(1):1–11. [17] Rigatos GG. Fuzzy stochastic automata for intelligent vehicle control. IEEE Trans Ind Electron 2003;50(1):76–9. [18] Wang LX. Adaptive fuzzy systems and control: design and stability analysis. Englewood Cliffs, NJ: Prentice Hall; 1994. [19] Ge SS, Lee TH, Harris CJ. Adaptive neural network control of robotic manipulators. Singapore: World Scientific; 1998. [20] Krstic M, Kanellakopoulos I, Kokotovic PV. Nonlinear and adaptive control design. New York: J. Wiley and Sons, Ltd.; 1995.