Jtam-A4.dvi JOURNAL OF THEORETICAL AND APPLIED MECHANICS 54, 3, pp. 987-1000, Warsaw 2016 DOI: 10.15632/jtam-pl.54.3.987 ADAPTIVE FUZZY CONTROL FOR A CLASS OF CONSTRAINED NONLINEAR SYSTEMS WITH APPLICATION TO A SURFACE VESSEL Mehrnush Sadat Jamalzade, Hamid Reza Koofigar, Mohammad Ataei Department of Electrical Engineering, University of Isfahan, Isfahan, Iran e-mail: koofigar@eng.ui.ac.ir In this paper, adaptive control for a class of uncertain nonlinear systems with input con- straints is addressed. The main goal is to achieve a self-regulator PID controller whose coefficients are adjusted by using some adaptive fuzzy rules. The constraints on the control signal are taken into account as a saturation operator. The stability of the closed-loop sys- tem is analytically proved by using the Lyapunov stability theorem. The proposed method is then applied to a surface vessel with uncertain dynamic equations. The simulation results show the effectiveness of the proposed control strategy. Keywords: self-regulator, fuzzy PID controller, constraint nonlinear systems, uncertainty, fuzzy estimation 1. Introduction Dealing with the control problem of uncertain systems, various algorithms have been developed ensuring the robust stability and performance (Petersen and Tempo, 2014). Robust adapti- ve control has been formulated for a class of uncertain nonlinear systems by output feedback control (Xu and Huang, 2010; Lee, 2011). For nonlinear systems in the strict-feedback form with unknown static parameters, a robust adaptive control law was designed by Montaseri andMohammad (2012), which guarantees the asymptotic output tracking despite matched and unmatched uncertainties. The neural-network-based robust control design, via an adaptive dy- namic programming approach, was investigated in (Wang et al., 2014) to obtain the optimal performance under a specified cost function. Some applications have been also introduced in the literature, in the presence of time-varying uncertainties and disturbances (Koofigar and Ame- lian, 2013). Nevertheless, taking the input constraint in the controller design procedure is still highly desired. In the last decade, a considerable attention has been paid to robust control of nonlinear systemswith input constraints (Chen et al., 2010, 2014; Lu andYao, 2014). In such cases, fuzzy logic and neural networks may be some alternative solutions. A direct adaptive fuzzy control approach has been presented for uncertain nonlinear systems in the presence of input saturation by incorporating a new auxiliary design system and Nussbaum gain functions (Li et al., 2013). The problem of adaptive fuzzy tracking control for a class of pure-feedback nonlinear systems with input saturation was studied by Wang et al., (2013a,b). Muñoz and Marquardt (2013) focused on the control design for input-output feedback linearizable nonlinear systems with bounded inputs and state constraints. An indirect adaptive fuzzy control schemewas developed for a wider class of nonlinear systems with the input constraint and unknown control direction byWuxi et al. (2013) andYongming et al. (2014). To this end, a barrier Lyapunov function and an auxiliary design systemwere employed. From an application viewpoint, the surface vessels with uncertain nonlinear dynamics may be adopted to demonstrate the effectiveness of various control schemes. Nonlinear strategies 988 M.S. Jamalzade et al. (Daly et al., 2012), adaptive control (Fang et al., 2004), and neural networks (Dai et al., 2015) are samples of control algorithms in the previous investigations. Removing some drawbacks of such works, adaptive intelligent methods as adaptive neural networks, were presented by Li et al. (2015). In this study, an adaptive fuzzy algorithm is proposed to achieve the advantages of both intelligent and adaptive mechanisms for ensuring the robustness properties and taking the constraints into account. Briefly discussing, there may exist some main restrictions in the previous investigations as, i) the fuzzy rules have been designed off-line and the stability and performancemay be lost with changing the circumstances, ii) the stability analysis has not been presented in an analytical form, and iii) to ensure the stability of the closed-loop system, the initial value for the controller parametersmust be set. To eliminate the aforementioned limitations, a self-regulator fuzzy PID controller is proposed in this paper, which guarantees the robustness properties against the system uncertainties and external disturbances. This paper is organized as follows. In Section 2, the problem formulation and the constraints on input signal are introduced. In Section 3, an adaptive fuzzy controller is designed for a class of uncertain nonlinear systems with constrained input and the stability proof is given. The proposed method is applied to a surface vessel in Section 4 and the simulation results are presented. The concluding remarks are finally given in Section 5. 2. Problem formulation Consider a class of nonlinear systems, represented by the state-space description Ẋ1 =X2 Ẋ2 =X3 ... Ẋn−1 =Xn Ẋn =F(X1,X2, . . . ,Xn)+G(X1,X2, . . . ,Xn)p(u)+d(t) Y=X1 (2.1) whereX∈ Rn×m denotes the vector of state variables, d(t) represents the external disturbance, and p(u)∈Rm is the vector of constrained inputs. Fig. 1. Block diagram of p(u) As schematically depicted in Fig. 1, the nonlinear operator p(u) acts as a saturation con- straint as p(ui)=    αuu for ui ­uu αui for ul ¬ui ¬uu αul for ui ¬ul i=1,2, . . . ,m (2.2) where uu, ul and α denote the parameters of saturation operator. The saturation operator p(ui) is described here as p(ui)= a(ui)ui+ b(ui) (2.3) Adaptive fuzzy control for a class of constrained nonlinear systems... 989 where a(ui) and b(ui) are given by a(ui)=    0 for ui ­uu α for ul ¬ui ¬uu 0 for ui ¬ul b(ui)=    αuu for ui ­uu 0 for ul ¬ui ¬uu αul for ui ¬ul (2.4) Incorporating description (2.3) into (2.1), yields Ẋ1 =X2 Ẋ2 =X3 ... Ẋn−1 =Xn Ẋn =F+Gb(u)+Ga(u)u+d(t)=F+Gb(u)+Ĝuu+d(t) Y=X1 (2.5) Remark 1. The only information about the systemmodel is that the invertible matrix Ĝu(·), as an estimate of Gu(·) =G(·)a(u), is available, see Mclain et al. (1999). The control objective is to design the control input u such that Y tracks the smooth reference trajectory Yd. Define the tracking error vector E= [e1, . . . ,em] T as E=X1−Yd =Y−Yd (2.6) A PID control structure is adapted here as ui = kPiei+kIi t∫ 0 ei(τ)dτ +kDi dei dt i=1,2, . . . ,m (2.7) where ei is the i-th component of the error vector E, and kPi, kIi and kDi denote respec- tively the proportional, integral and derivative coefficients. 3. Adaptive fuzzy controller design 3.1. Fuzzy estimation In this Section, the l-th fuzzy rule of the fuzzy controller for estimating theunknown function H(x) is formed by (Shaocheng et al., 2000) Rl : if x1 =A l 1 ∧ x2 =A l 2 → H(x)= θl (3.1) where x = [x1,x2] T denotes the input vector, Ali is the membership function of each input. The fuzzy model for describing H(x) is Mamdani, and the output of the fuzzy system can be obtained by H(x)= N∑ l=1 θl 2∏ i=1 µAl i (xi) N∑ l=1 2∏ i=1 µAl i (xi) (3.2) 990 M.S. Jamalzade et al. where uF l i is the fuzzy membership function and N is the number of rules. Now, form the unknown function as H(x)=Φ(x)Tθ (3.3) where Φ(x)= [φ1(x),φ2(x), . . . ,φN(x)] T φl(x)= 2∏ i=1 µAl i (xi) N∑ l=1 2∏ i=1 µAl i (xi) θ= [θ1,θ2, . . . ,θN] T (3.4) 3.2. Controller design To facilitate the designing procedure, new state variables are defined here as Z1 = t∫ 0 E(τ) dτ Z2 =E Z3 = dE dt ... Zn+1 = dn−1E dtn−1 (3.5) by which the dynamic equations (2.1) may be rewritten as Ż1 =Z2 Ż2 =Z3 ... Żn =Zn+1 Żn+1 =Ft+Ĝuu (3.6) where Ft =F− dnYd dtn +Gb(u)+(Gu−Ĝu)u+d(t) (3.7) Hence, input signal (2.7) may be given by u=KIZ1+KPZ2+KDZ3 (3.8) where KP = diag [ kP1 kp2 · · · kpm ] KI = diag [ kI1 kI2 · · · kIm ] KD = diag [ kD1 kD2 · · · kDm ] (3.9) Now, define an ideal control signal u∗ as u ∗ =ΦTTΘ ∗ = Ĝ−1u (−Ft−K1Z1−K2Z2− . . .−Kn+1Zn+1) (3.10) where u∗ is obtained from the feedback linearization of system (3.6). Adaptive fuzzy control for a class of constrained nonlinear systems... 991 Remark 2. Ki, i=1, . . .,n+1, is chosen such that Acl =   0 Im 0 · · · 0 0 0 Im ... ... ... ... ... ... 0 0 0 · · · 0 Im −K1 −K2 · · · −Kn −Kn+1   (3.11) is negative semi-definite. The input signal u∗ is not implementable, as Ft is unknown. Instead, an approximation of the ideal signal u∗ is generated as û=ΦTTΘ̂ (3.12) where Θ̂ is an approximation of Θ∗. Then, replacing (3.12) in (3.6), yields Żn+1 =Ft+ĜuΦ T TΘ̂ (3.13) By adding and subtracting ĜuΦ T TΘ ∗ in (3.13), one can write Żn+1 =Ft+ĜuΦ T TΘ̂−ĜuΦ T TΘ ∗+ĜuΦ T TΘ ∗ =Ft+ĜuΦ T TΘ̃+ĜuΦ T TΘ ∗ (3.14) where Θ̃= Θ̂−Θ∗ (3.15) denotes the parameter estimation error. By substituting (3.10) into (3.14), one obtains Żn+1 =−K1Z1−K2Z2− . . .−Kn+1Zn+1+ĜuΦ T TΘ̃ (3.16) and Ż=AclZ+BclΦ T TΘ̃ (3.17) where Z= [Z1,Z2, · · ·,Zn+1] T Bcl = [0,0, . . . ,Ĝu] T (3.18) Remark 3. Acl in (3.11) is a negative semi-definite matrix, so the positive definite symmetric matrix P can be found that satisfy the algebraic Lyapunov equation A T clP+PAcl =−Q (3.19) for any positive definite symmetric matrixQ. Theorem. Consider constrained nonlinear system (3.6). By applying the control input u=ΦTTΘ and adaptive law ˙̂ Θ = −2ΓTΦTB T clPZ, the closed loop stability and tracking performance are guaranteed. 992 M.S. Jamalzade et al. More precisely u=   u1 u2 ... um   =   ΦTT1Θ1 ΦTT2Θ2 ... ΦTTmΘm   =   ΦTT1 0 0 0 0 ΦTT2 0 0 0 ... ... 0 0 0 0 ΦTTm     Θ1 Θ2 ... Θm   =ΦTTΘ (3.20) and ui =Φ T i θpiZ2i+Φ T i θIiZ1i+Φ T i θDiZ3i =ΦTi T Θi (3.21) in which ΦTi = [ΦiZ1i,ΦiZ2i,ΦiZ3i] T Θi = [θIi,θpi,θDi] (3.22) and kpi = gpi ( ei, dei dt ) =ΦTi θpi kIi = gIi ( ei, dei dt ) =ΦTi θIi kDi = gDi ( ei, dei dt ) =ΦTi θDi (3.23) Remark 4. The nonlinear functions gpi(·), gIi(·) and gDi(·) may be obtained by a formulation as H(x) in (3.2). Proof. Choose the Lyapunov function candidate V (Z,Θ̃)=ZTPZ+ 1 2 Θ̃ T Γ −1 Θ̃ Γ> 0 (3.24) withP> 0 andΓ> 0. The time derivative of V is given by V̇ (Z,Θ̃)= ŻTPZ+ZTPŻ+ 1 2 ˙̃ Θ T Γ −1 Θ̃+ 1 2 Θ̃ T Γ −1 ˙̃ Θ (3.25) By replacing (3.17) into (3.25) and somemanipulations, one can obtain V̇ (Z,Θ̃)=ZT(ATclP+PAcl)Z+2Z T PBclΦ T TΘ̃+ ˙̃ Θ T Γ −1 Θ̃ =−ZTQZ+(2ZTPBclΦ T T + ˙̃ Θ T Γ −1)Θ̃ (3.26) Then, by adopting the adaptation law ˙̂ Θ=−2ΓTΦTB T clPZ (3.27) one can conclude V̇ (Z,Θ̃)=−ZTQZ< 0 (3.28) Thus, Barbalat’s Lemma (Sastry and Shankar, 1999; Åström and Wittenmark, 2013) en- sures that the vector Z is asymptotically converged to zero. Adaptive fuzzy control for a class of constrained nonlinear systems... 993 Fig. 2. Surface vessel in the inertial fixed and body fixed frames 4. Simulation In this Section, the performanceof the controller is evaluated in two situations, and the proposed method is applied to a surface vessel schematically shown in Fig. 2. Such a three-input three-output system may be described by (Fang et al., 2004) m11v̇x+d11vx = τ1 m22v̇y +m23ẇ+d22vv+d23w= τ2 m33ẇ+m23v̇y +d23vy +d33w= τ3 (4.1) in which (x,y) and θ are respectively the surface vessel position and yaw angle in the inertial coordinate systemand (vx,vy), andw denote respectively the surface vessel speed and rotational speed in the body coordinate system. Dynamical equations (4.1) with using a set of simple mathematical operations can be rew- ritten in the form M(q)q̇+C(q, q̇)q̇+G(q, q̇)= τ∗ (4.2) where q= [x,y,θ]T M(q) =    m11cos 2θ+m22 sin 2θ −mdcosθsinθ −m23 sinθ −mdcosθ sinθ m22cos 2θ+m11 sin 2θ m23cosθ −m23 sinθ m23cosθ m33    C(q, q̇)=   θ̇(mdcosθsinθ) θ̇(m11cos 2θ+m22 sin 2θ) 0 −θ̇(m22cos 2θ+m11 sin 2θ) −θ̇(mdcosθsinθ) 0 −θ̇(m23cosθ) −θ̇(m23 sinθ) 0   G(q, q̇)=K(q)q̇ K(q) =    d11cos 2θ+d22 sin 2θ −ddcosθsinθ −d23 sinθ −ddcosθ sinθ d22cos 2θ+d11 sin 2θ d23cosθ −d23 sinθ d23cosθ d33    (4.3) and τ ∗ = [τ1,τ2,τ3] (4.4) To facilitate the designing procedure, choose the state variables as X1 =q X2 = q̇ X1,X2 ∈ R 3 (4.5) 994 M.S. Jamalzade et al. The state space representation may be as Ẋ1 =X2 Ẋ2 =F(X1,X2)+Gu(X1,X2)u (4.6) where F(X1,X2)=−M −1(X1)[C(X1,X2)X2+G(X1,X2)] Gu(X1,X2)=M −1(X1) (4.7) and u= τ∗ u∈ R3 (4.8) The numerical values of the model parameters in equation (4.1) are given in Table 1, as given by Fang et al. (2004). Table 1.Model parameter values for the surface vessel Parameter Value Parameter Value Parameter Value m11 [kg] 1.0852 m33 [kg] 0.2153 d11 [kg/s] 0.08656 m22 [kg] 2.0575 d11 [kg] 0.08656 d22 [kg/s] 0.0762 d33 [kg/s] 0.0031 d23 [kg/s] 0.151 d32 [kg/s] 0.0151 The initial values and eigenvalues of the matrixAcl ∈ R 9×9 are selected as X10 = [1,−1,0.3] T X20 = [0,0,0] T λ= [−1,−1,−1,−1,−1,−1,−1,−1,−1] (4.9) Thematrix Γ, constant scalars γi, i=1,2,3 andmembership functions are chosen here as Γ=   γ1IL 0 0 0 γ2IL 0 0 0 γ3IL   γ1 = γ2 =10 γ3 =103 (4.10) Fig. 3. (a)Membership function of the tracking error, (b) membership function of the derivative of the tracking error Case I. The tracking performance of the proposed constrained control scheme is evaluated here and compared with that of the existing sliding mode method, see Zeinali and Leila (2010). Assume the reference position and the saturation limits are respectively given by [xd(t),yd(t),θd(t)] T = [3.5m,2m,0rad]T and −2<τi < 2, i=1,2,3. The external disturbance d(t)= (sin(t)+1)[1,1,1]T also perturb the system at time t=5s. Adaptive fuzzy control for a class of constrained nonlinear systems... 995 Figures 4a and 4b show that the tracking of the reference positions forx and y is obtained in the presence of disturbance. Figure 5 shows the capability of the proposed scheme in disturbance rejection comparedwith the slidingmode control byZeinali andNotash (2010). The convergence of the controller coefficients Kp,KD,KI for tracking xd(t), yd(t) and θd(t) are demonstrated in Figs. 6 and 7. The control efforts in the proposed adaptive fuzzymethod and the existing sliding controller are illustrated in Fig. 8. Fig. 4. (a)X direction and (b) Y direction tracking of the surface vessel Fig. 5. Tracking of the pitch θ of the surface vessel Fig. 6. Convergence of the controller parameters in (a) the x direction, (b) the y direction 996 M.S. Jamalzade et al. Fig. 7. Convergence ofKp,KD,KI for the yaw controller Fig. 8. Control signals in the proposed algorithm and the sliding control Tomakea comparisonbetween thedesignedadaptive fuzzy controller and the existing sliding control (Zeinali and Leila 2010), consider a cost function as J = tf∫ 0 (‖e(t)‖2+‖u(t)‖2) dt (4.11) The lower cost of the proposed controller, as reported in Table 2, shows the advantage of the proposed approach. Table 2.The costs of controllers in Case I Controller Slidingmode Proposed method J 117.1378 61.3327 Adaptive fuzzy control for a class of constrained nonlinear systems... 997 Case II. In this case, the reference signal and the saturation operator parameters are considered respectively as   xd(t) yd(t) θd(t)  =   sin(0.5t) cos(0.5t) 0   and −2<τi < 2 i=1,2,3 The simulation results, illustrated in Figs. 9 and 10, show that the proposed method gives smoother responses with less tracking error, compared with the sliding mode control (Zeinali and Leila, 2010). In the tracking of the reference output on the channel y, the sliding mode algorithm is unstable, while the proposed method is stable and the tracking error is converged to zero. Figure 11 shows that the control effort of the proposedmethod is much lower than that in the other method. Unlike the sliding mode, the control signal is zero in the steady state for the proposed method. Comparing the results may be also possible by adopting cost function (4.11), as numerically reported in Table 3. Fig. 9. Tracking error of the (a) the x direction, (b) the y direction Fig. 10. Tracking error of pitch θ Table 3.The cost of controllers in Case II Proposed method Slidingmode Controller J 16933.4 77.8 998 M.S. Jamalzade et al. Fig. 11. Control signals 5. Conclusion Focusing on the constraints on the inputs of nonlinear systems, the problem of robust tracking is investigated here. To solve the problem, an adaptive fuzzy algorithm is proposed for which the robust stability is proved using the Lyapunov stability theorem. As a practical situation, the problem is formulated for a surface vessel, taking the limitations on the control input into account. The designed controller is applied and the simulation results are presented to show the benefitsof themethod.Theexisting slidingcontrol is alsoapplied to thevessel andacost function is defined to compare the results with the proposed scheme. In addition to demonstrations, a cost function is defined, and a numerical comparison is also made to show the benefits of the adaptive fuzzy algorithm. References 1. Åström K.J., Wittenmark B., 2013,Adaptive control, Courier Corporation 2. Chen M., Ge S.S., How B.V.E., 2010, Robust adaptive neural network control for a class of uncertainMIMOnonlinear systemswith inputnonlinearities,NeuralNetworks, IEEETransactions, 21, 5, 796-812 3. Chen M., Zhou Y., Guo W.W., 2014 Robust tracking control for uncertain MIMO nonlinear systems with input saturation using RWNNDO, Neurocomputing, 144, 436-447 4. Dai S.L., Wang M., Wang C., 2015, Neural learning control of marine surface vessels with guaranteed transient tracking performance, IEEE Transactions on Industrial Electronics, DOI 10.1109/TIE.2015.2504553 Adaptive fuzzy control for a class of constrained nonlinear systems... 999 5. Daly J.M., Tribou M.J., Waslander S.L., 2012, A nonlinear path following controller for an underactuated unmanned surface vessel, IEEE/RSJ International Conference of Intelligent Robots and Systems (IROS), 82-87 6. Fang Y., Zergeroglu E., de Queiroz M.S., Dawson D.M., 2004, Global output feedback control of dynamically positioned surface vessels: an adaptive control approach,Mechatronics, 14, 4, 341-356 7. Koofigar H.R., Amelian S., 2013, Robust adaptive vibration control for a general class of structures in the presence of time-varying uncertainties and disturbances, Journal of Theoretical and Applied Mechanics, 51, 3, 533-541 8. Lee H., 2011, Robust adaptive fuzzy control by backstepping for a class of MIMO nonlinear systems,Fuzzy Systems, IEEE Transactions, 19, 2, 265-275 9. Li G., Li W., Hildre H.P., Zhang H., 2015, Online learning control of surface vessels for fine trajectory tracking, Journal of Marine Science and Technology, in press, DOI 10.1007/s00773- -015-0347-9 10. Li Y., Li T., Jing X., 2014, Indirect adaptive fuzzy control for input and output constrained nonlinear systems using a barrier Lyapunov function, International Journal of Adaptive Control and Signal Processing, 28, 2, 184-199 11. Li Y., Tong S., Li T., 2013, Direct adaptive fuzzy backstepping control of uncertain nonlinear systems in the presence of input saturation,Neural Computing and Applications, 23, 5, 1207-1216 12. Lu L., Yao B., 2014, Online constrained optimization based adaptive robust control of a class of MIMOnonlinear systemswithmatched uncertainties and input/state constraints,Automatica, 50, 3, 864-873 13. Mclain R.B., Henson M.A., Pottmann M., 1999, Direct adaptive control of partially known nonlinear systems, IEEE Transactions on Neural Networks, 10, 3, 714-721 14. Montaseri G., YazdanpanahM.J., 2012Adaptive control of uncertain nonlinear systems using mixed backstepping andLyapunov redesign techniques,Communications in Nonlinear Science and Numerical Simulation, 17, 8, 3367-3380 15. Muñoz D.A., Marquardt W., 2013, Robust control design of a class of nonlinear input-and state-constrained systems,Annual Reviews in Control, 37, 2, 232-245 16. Petersen I.R., TempoR., 2014,Robust control of uncertain systems: classical results and recent developments,Automatica, 50, 5, 1315-1335 17. Sastry S., 1999,Nonlinear Systems: Analysis, Stability, and Control, 10, New York: Springer 18. Shaocheng T., Jiantao T., Tao W., 2000, Fuzzy adaptive control of multivariable nonlinear systems,Fuzzy Sets and Systems, 111, 2, 153-167 19. Wang D., Liu D., Li H., Ma H., 2014, Neural-network-based robust optimal control design for a class of uncertain nonlinear systems via adaptive dynamic programming, Information Sciences, 282, 167-179 20. Wang H.Q., Chen B., Lin C., 2013a, Adaptive neural tracking control for a class of stocha- stic nonlinear systems with unknown dead-zone, International Journal of Innovative Computing, Information and Control, 9, 8, 3257-3269 21. Wang H., Chen B., Liu X., Liu K., Lin C., 2013b, Robust adaptive fuzzy tracking control for pure-feedbackstochasticnonlinear systemswith inputconstraints,Cybernetics, IEEETransactions, 43, 6, 2093-2104 22. Wuxi S., Hongquan W., Furong L., Xiangyu W., 2013, Adaptive fuzzy control for a class of nonlinear systems with input constraint and unknown control direction, Control and Decision Conference (CCDC), 2013 25th Chinese. IEEE 1000 M.S. Jamalzade et al. 23. Xu D., Huang J., 2010, Robust adaptive control of a class of nonlinear systems and its applica- tions,Circuits and Systems I: Regular Papers, IEEE Transactions, 57, 3, 691-702 24. ZeinaliM.,NotashL., 2010,Adaptive slidingmode controlwith uncertainty estimator for robot manipulators,Mechanism and Machine Theory, 45, 1, 80-90 Manuscript received June 5, 2015; accepted for print January 13, 2016