APP下载

Fuzzy Optimal Control Design for Ship Steering

2019-08-01EJAZMuhammadCHENMou

EJAZ Muhammad,CHEN Mou

College of Automation Engineering,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,P.R.China

Abstract: This paper presents a method to design a control scheme for nonlinear systems using fuzzy optimal control.In the design process,the nonlinear system is first converted into local subsystems using sector non-linearity approach of Takagi-Sugeno(T-S)fuzzy modeling. For each local subsystem,an optimal control is designed. Then,the parameters of local controllers are defuzzified to construct a global optimal controller. To prove the effectiveness of this control scheme,simulations are performed using the mathematical model of Esso Osaka tanker ship for set-point regulation with and without disturbance and reference tracking. In addition,the simulation results are compared with that of a PID controller for further verification and validation. It has been shown that the proposed optimal controller can be used for the nonlinear ship steering with good rise time,zero steady state error and fast settling time.

Key words: Takagi-Sugeno(T-S) fuzzy modeling; optimal control; optimal linear quadratic tracker (LQT); ship steering

0 Introduction

With the advancement in the field of automation,the demand of autonomous marine vessels is also increasing. One challenge is to control the heading of a ship. The PID controller was introduced in Ref.[1],which improved the control capabilities of a ship and had been used for a long time. Nowadays,most of the control systems are also based on PID control technique. However,the quality of control is dependent upon the choice of PID parameters. Moreover,the tuning of these parameters is difficult by trial and error due to a lot of combinations and vague relations among the parameters[2].Various control techniques had been proposed to steer a ship and their results had been studied[3-9]. In Ref.[3],a sliding mode control(SMC)had been proposed using a linear steering model and it was compared with a PD controller. Fuzzy SMC had been presented for heading control and regulation in Refs.[4-5]. An improved fuzzy logic controller based upon“IOR”operator had been designed for ship steering using linear first order Nomoto’s model in Ref.[6]. Fuzzy model reference learning control(FMRLC)had been constructed in Ref.[7]and simulation results were compared with model reference adaptive control(MRAC)using the mathematical model of a cargo ship. In Ref.[8],an adaptive fuzzy H∞controller was designed for ship steering and the results were compared with a backstepping controller. An online trained neural controller had been studied in Ref.[9]for ship course keeping control and results were compared to that of a PID controller. In Ref.[10],SMC is used for steering control of a ship in the presence of input saturation. As the steering system of a ship is nonlinear,more research is required to design an efficient control system which should also be easy to implement.

Many optimal control schemes had been designed in order to obtain the most efficient steering control of a ship[2,11-15]. In Ref.[2],an ant colony optimization was used to optimize the parameters of a PID controller for ship steering control. In Ref.[11],an optimal steering control had been designed using sequential gradient-restoration algorithm. A SMC optimized by genetic algorithm(GA)had been used for steering of a ship in Refs.[12-13].In Ref.[14]and Ref.[15],two types of backstepping control schemes optimized by GA,were implemented and the results compared to that of a PD controller. However,more research in this field is still required.

Takagi-Sugeno(T-S) fuzzy identification of systems was first introduced in Ref.[16]. T-S models can be obtained by three methods:(1)It can be identified from measurement or simulation,(2)can be constructed by an approximation of a nonlinear system or(3)can exactly represent a nonlinear system. The first method is good for systems which are too difficult to be represented by an analytical model[17]. For the second method,a dynamic linearization had been studied in Ref.[18]. In Ref.[19],sufficient conditions for T-S fuzzy systems as universal approximators had been published. Optimal speed control of a ship had been done using linearization with predator-prey pigeon inspired optimization(PPPIO)algorithm in Ref.[20]. Exact representation used to simplify complex nonlinear systems is called sector nonlinear approach of T-S fuzzy modeling. This has a benefit that it can represent the exact fuzzy representation of a nonlinear system with bounded state variables[21]. Fuzzy modeling via sector nonlinearity has been first introduced in Ref.[22]. In this approach,a nonlinear model is represented by“if-then”rules and each rule represents a linear local subsystem. Since most of the physical systems are nonlinear in nature,it is difficult to apply linear control directly with good results. In the proposed methodology since the subsystems are linear,any type of controller can be used.

Various control methods have been used to control different systems and these control systems should be efficient. Therefore,the demand for efficient control scheme is increasing which opens a door to the field of optimal control. Linear quadratic regulator(LQR)is the fundamental part of optimal control. Furthermore,it is simple to design and guarantee closed-loop stability and stability robustness[23]. The design procedure has become quite fast and convenient with the help of an interactive computer-aided software[24]. However,a drawback is that it can only be used for linear systems,which justifies the need for this research work. Optimal linear quadratic tracker(LQT) control scheme has been combined with T-S fuzzy modeling to extend its application to nonlinear systems. This method is easy to design,implement,and has low computational cost. In this paper,an optimal control scheme like LQT has been used for nonlinear ship steering via T-S fuzzy modeling using sector nonlinearity approach.

1 Mathematical Modeling of Ship Steering

The maneuvering model known as sway-yaw subsystem for a ship moving with a constant surge speed u0can be written as[25]

where ν= [v,r]Tis the state vector for sway and yaw velocity,τ the force and moment in sway and yaw directions,respectively.And

where m and xgare the mass of the ship and distance between the center of gravity(CoG)and the origin of the ship, along the x-axis, respectively;Yv,Yr,Nv,and Nrthe linear damping coefficients;Xandthe hydrodynamic added mass defined by Society of Naval Architects and Marine Engineers(SNAME)[25];Izis the moment of inertia about the z-axis. Choosing the yaw rate r as output and taking Laplace transform yields

where δ is the deflection angle of the rudder;K and Ti(i=1,2,3) are the gain and the time constants,respectively. Eq.(4)is known as Nomoto’s second order model[26]. This model can be approximated to Nomoto’s first order model by defining the equivalent time constant T0as

Therefore,we have

To include the effect of static nonlinearity,this model can be converted into the nonlinear model of Norrbin as[27]

where n0,n1,n2and n3are the parameters of the ship. If it is assumed that the hull of the ship is symmetric,the terms n2and n0can be neglected and Eq.(7)can be written as

2 Fuzzy Modeling and Control Scheme Design

2.1 Fuzzy modeling technique

In Ref.[22],a fuzzy modeling technique is presented which is called T-S sector nonlinearity. The advantage of sector nonlinearity is that it guarantees to represent the smooth nonlinear function globally or semi-globally[22]. Most affine nonlinear systems can be written in the form of

where x ∈R2and u ∈R are the state and control input variables, respectively. Furthermore,f (x) ∈R2and g(x)∈R2are nonlinear functions of x. In some cases,the system in the above equation can be rewritten as

where zi(i=1,2,3,4) and wj( j=1,2) are the nonlinear functions of x. In the next step,the maximum and minimum values of ziand wjare calculated to design the membership functions as

There is no standard way to design the membership functions. Let Mi1and Mi2be the membership functions for ziand similarly Nj1and Nj2for wj.These can be designed as normalized functions shown in Figs.1,2 which satisfy[21]

Fig.1 Membership functions for zi

Fig.2 Membership functions for wj

Mathematically,these can be calculated as[21]

These can be named as“high”and“low”,“big”and“small”,etc. These nonlinear functions can be represented as

where i=1,2,3,4 and j=1,2. The number of rules used in T-S fuzzy can be determined by 2p,where p is the number of variables in the nonlinear system[21].The rules can be designed as follows[17]

Model rule 1:

Model rule 2:

By that analogy,we have more rules,and the last rule can be written as follows.

Model rule 64:

If z1is M12,z2is M21,z3is M31,and z4is M42;w1is N12and w2is N22

The membership functions for every rule k can be computed as

The defuzzification process gives the crisp output as[21]

2.2 Control scheme design

The value of an optimal gain Kkfor every rule or subsystem is found by calculating the parameters of LQT control of that subsystem. This optimal LQ tracker is designed for each local subsystem by choosing the values of state weighting matrix Q ≥0 and control weighting matrix R >0. Now we consider the time invariant version of the optimal tracking control designed to minimize the following infinite horizon performance index with initial time t0=0 and final time T=∞[28]

where k=1,2,…,64. This minimization can be performed by solving the following algebraic Riccati equation(ARE)for Sk[28]

where Skis assumed as positive semidefinite matrix.Thus,optimal local gain Kkreaches the steady state value[28]

In order to design the control system,the consequent part for every rule is replaced by their respective optimal LQ tracking controllers as follows:

Model rule 1:

If z1is M11,…,and z4is M41;w1is N11and w2is N21,u=-K1x+

Model rule 2:

If z1is M12,…,and z4is M41;w1is N11and w2is

Model rule 64:

If z1is M12,…,and z4is M42;w1is N12andSkxdand xdis the desired value.

All these local controllers are defuzzified into a global optimal controller by the method of weighted average. This concludes the control system design,and this method can be used for optimal control design of most affine nonlinear systems. The design procedure can be more clearly understood by the flowchart in Fig.3.

Fig.3 Process flow diagram of the proposed control scheme

2.3 Control design for ship steering

Finally,all the parameters of the local LQ tracking controllers are defuzzified using weighted average to get the optimal global controller as

Fig.4 Membership functions of fuzzy variable

where ωk=Skxd. Sudden changes in the desired heading can produce very large values after derivation,which are difficult to be handled by the controller. To overcome this hurdle,a reference heading and its derivation can be generated by a second order low pass filter. These can be obtained by substituting the desired ship heading ψdin the following reference model

where ψzand rzare the reference ship heading and yaw rates to be provided to the controller. The parameters,undamped natural frequency ωnand damping ratio ζ are to be designed.

The effectiveness of the proposed algorithm can be proved by selecting a performance index.Thus,we choose the performance index J based on integral of time-weighted absolute value of error(ITAE),so that the initial error is minimized and the final error is emphasized. This cost function also includes the control input and it can be expressed as

where L1and L2are the constants to be chosen and t is the instantaneous time variable.

3 Numerical Simulation

The simulation is performed in Simulink(MATLAB)and the response of the proposed controller is compared with that of a PID controller.For experimentation and validation of various control and guidance systems,the actual“Esso Osaka”tanker has been scaled down by the ratio 1∶100(k=100)to make a model ship. Its physical model is located at the Unit of Marine Technology and Engineering in Lisbon,Portugal[29]. Some of the physical parameters of this model are presented in Table 1[30].

Let us assume that the maximum deflection of

Table 1 “Esso Osaka”model parameters[10,30]

The values of the traditional PID controller are chosen as Kp= -0.8,Ki= 0 and Kd=-3. To validate the controllers the following cases can be considered. The parameters for the LQT controller has been calculated as

3.1 Linear desired heading

3.1.1 Without disturbance

For this scenario,the ship is required to reach a constant heading of -0.4 radians and maintain it and at time 100 s,the desired heading is changed to constant 0.4 rad. The transient responses for traditional and proposed controllers for this scenario are shown in Fig.5. The control input curve can be seen in Fig.6. Fig.7 shows the difference between the desired and instantaneous headings. This error for the proposed algorithm is lower than the traditional PID algorithm. In these figures,it can be seen that the results of the fuzzy optimal control are much better than the results of the PID controller. Moreover,it can be observed that using the proposed procedure a linear controller can be used for nonlinear systems and good results can be obtained.

Fig.5 Comparison of the response of fuzzy LQT and PID controllers for linear desired heading

Fig.6 Control input(rudder angle)for linear desired heading

Fig.7 Error curves ψ-ψd for linear desired heading

3.1.2 With disturbance

Keeping the same scenario,a sine wave disturbance having amplitude 0.2 N and frequency 1 rad/s is added to the system for both controllers. The results are shown in Figs.8—10. From these results,we can see that the performance of the proposed controller is better than the traditional controller.

However,these controllers are not designed keeping in view the disturbance.

Fig.8 Comparison of the response of fuzzy LQT and PID controllers for linear desired heading with disturbance

Fig.9 Control input (rudder angle) for linear desired heading with disturbance

Fig.10 Error curve ψ-ψd for linear desired heading with disturbance

3.2 Nonlinear desired heading

To further analyze the results of the proposed method,a sine wave has been used as the desired output. Similar to the previous case,the simulation results are shown in Figs.11—13. The transient response is shown in Fig.11 and the output of the controller is shown in Fig.12. In Fig.13,we can see that the error for the proposed controller is usually less than the error of the traditional controller. From these simulation results,it can be inferred that the proposed controller is performing much better than the traditional PID controller. However,it can be claimed that the PID control results can be improved but its parameters are usually tuned by trial and error,which is a cumbersome task. On the other hand,the proposed controller does not require any type of tuning.

Fig.11 Comparison of the response of fuzzy LQT and PID controllers for nonlinear desired heading

Fig.12 Control input (rudder angle) for nonlinear desired heading

Fig.13 Error curves ψ-ψd for nonlinear desired heading

The performance of the traditional and proposed algorithms is shown by Eq.(23). L1and L2are selected as 1 and 0.5,respectively. Therefore,index values are shown in Table 2.

From this table,we can declare that the proposed algorithm is much better than the traditional PID algorithm for linear and nonlinear references in the presence and absence of disturbance. As thiscost function incorporates control input,thus the proposed method is also considered more efficient than the traditional one.

Table 2 Performance index of the traditional and proposed algorithm

4 Conclusions

An optimal control scheme is presented for nonlinear systems by using T-S fuzzy modeling. This proposed control scheme can be considered as one of the nonlinear extension to optimal control especially LQ tracker. Numerical simulation has been performed to verify its applicability for linear and nonlinear desired headings with and without disturbance. It can be observed from the simulation results that this method is easy to design and implement. Moreover,it shows that the proposed control method is better than the traditional control scheme i.e. PID. As future research work,the proposed controller can be improved to make it capable enough so that it can be used in the presence of real world phenomena like input saturation,model uncertainty,effects of wind,waves and currents,internal disturbances,system faults etc.

AcknowledgementsThis work was supported in part by the National Natural Science Foundation of China (No.61751210),the Jiangsu Natural Science Foundation of China (No. BK20171417),and the Fundamental Research Funds for the Central Universities(No.NG2019002).

AuthorsDr. EJAZ Muhammad received the B.S. electrical engineering from University of Engineering and Technology(UET),Peshawar,Pakistan in 2007. He completed his M.S. degree in mechatronics from National University of Science and Technology(NUST),Islamabad,Pakistan in 2009. In 2017,he was awarded Ph.D. in the field of control theory and control engineering from Nanjing University of Aeronautics and Astronautics(NUAA),Nanjing,China.His research has focused on control and automation of marine vessels.

Prof. CHEN Mou received the B.S. degree in material science and engineering in 1998 and the M.S. and Ph.D. degrees in automatic control engineering from NUAA,Nanjing,China,in 2004. He is currently a Professor with the College of Automation Engineering,Nanjing University of Aeronautics and Astronautics. He was an academic visitor with the Department of Aeronautical and Automotive Engineering,Loughborough University,Loughborough U.K.,from 2007 to 2008. From 2008 to 2009,he was a research fellow with the Department of Electrical and Computer Engineering,National University of Singapore,Singapore. In 2014,he was a senior academic visitor with the School of Electrical and Electronic Engineering,University of Adelaide,Adelaide,SA,Australia,for six months. His current research interests include nonlinear system control,intelligent control,and flight control.

Author contributionsDr. EJAZ Muhammad suggested the main idea,performed the study,simulated the algorithms and wrote the manuscript. Prof. CHEN Mou guided the research work and documentation.

Competing interestsThe authors declare no competing interests.