DUR MUHAMMAD PATHAN*, MUKHTIAR ALI UNAR**, AND ZEESHAN ALI MEMON*
RECEIVED ON 09.12.2011 ACCEPTED ON 15.03.2012
ABSTRACT
This paper proposes a fuzzy logic controller for design of autopilot of a ship. Triangular membership
functions have been use for fuzzification and the centroid method for defuzzification. A nonlinear
mathematical model of an oil tanker has been considered whose parameters vary with the depth of
water.
The performance of proposed controller has been tested under both course changing and trajectory
keeping mode of operations. It has been demonstrated that the performance is robust in shallow as well
as deep waters.
Key Words: Ship, Trajectory Tracking, Control, Fuzzy Logic.
* Assistant Professor, Department of Mechanical Engineering, Mehran University of Engineering & Technology, Jamshoro. * * Professor, Department of Computer Systems Engineering, Mehran University of Engineering & Technology, Jamshoro.
D
esign of ship control system has been great challenge since long time, because the dynamics of ship are not only nonlinear but change with operating conditions (depth of water and speed of vehicle). These are also highly influenced by unpredictable external environmental disturbances like winds, sea currents and wind generated waves. IFAC (International Federation of Automatic Control) has identified the ship control system as one of the benchmark problems, which are difficult to solve [1].In 1911 Elmer Sperry constructed first automatic steering mechanism by developing a closed loop system for a ship [2-3]. Minorsky [4] extended the work of Sperry by giving detailed analysis of position feedback control and formulated three term control law which is referred to as PID (Proportional Integral Derivative) control. Until the 1960s this type of controller was extensively used but after that other linear autopilots like LQG and H∞ have been reported [5-7].
Nonlinear control schemes such as state feedback linearizaton, backstepping, output feedback control, Lyapunov methods and sliding mode control [8-12] have also been proposed. Applications of nonlinear control techniques depend on exact knowledge of plant dynamics to be controlled. Since the marine vehicle dynamics are highly nonlinear and are coupled with hydrodynamics therefore it is difficult to obtain exact dynamic model of a marine vehicle. To overcome these difficulties, the model free control strategies like Fuzzy Logic and Neural Networks are proved considerably useful.
Yang, et. al. [13-14] discussed the application of fuzzy control for nonlinear systems and applied Takagi-Sugeno type autopilot for a ship to maintain its heading. Santos, et. al. [15] proposed the fuzzy autopilot along with PID controller for control of vertical acceleration for fast moving ferries. Velagic, et. al. [16] developed ship autopilot for
track keeping by using Sugeno type fuzzy system.
Gerasimos, et. al. [17] worked on adaptive Fuzzy control
for ship steering. Seo, et. al. [18] worked for ship steering control by using ontology-based fuzzy support agent. Yingbing, et. al. [19] used fuzzy logic for improving the performance of PID controller. Yanxiang, et. al. [20] developed ship steering autopilot by combing the neural network and fuzzy logic techniques. Xiaoyun, et. al. [21] have discussed the advantages of using fuzzy controller along with PID controller for track keeping ship control system. Guo, et. al. [22] presented combination of neural
and fuzzy controller for modeling and control of ship.
The above mentioned work is based on the integration of fuzzy logic with other techniques. Moreover, none of the authors have taken the depth of water into consideration. In this work a fuzzy logic controller is proposed which yields robust performance at different depths of sea water.
2.
DYNAMICS OF SHIP
Marine vehicles consist of submersible and surface vehicles. The maneuverability of marine vehicles is completely described by their dynamics; dynamics of marine vehicles consist of kinematics and kinetics. The study of kinematics provides the complete description of motion of vehicles. It develops relation between the body fixed linear and angular velocities and earth fixed linear and angular velocities. The kinetics studies dynamic response when forces and moments are applied to it. It studies the rigid body and hydrodynamic forces and moments acting on the body.
Motion of marine vehicles is described as six degree of freedom of motion because six independent coordinates (surge, sway, heave, yaw, roll and pitch) are required to specify the complete motion of vehicles as given in
Table 1, where the first three co-ordinates and their time derivatives describe the position and translational motion along x-, y-, and z-axis. The last three coordinates and their time derivatives correspond to orientation and rotational motion of the vehicle.
2.1
Heading Motion of Ship
The motion of ship is regarded as surface motion and its motion is confined in course of earth fixed XE-YE plane instead of space, hence the heading motion of ship is considered to be three degree of freedom motion because only three independent coordinates (sway, yaw and psi) are required to specify the heading motion of vehicle as shown in Fig. 1.
2.2
The ESSO 190000 dwt Tanker
The ESSO is a large size tanker of 304.8m length. The mathematical model describing the maneuverability of this tanker is given in [23]. The parameters of ESSO are listed below [7]:
Length between perpendiculars = 304.8m
Beam = 47.17m
Draft to design waterline = 18.46m Displacement = 220000 m3
Block coefficient = 0.83 Design speed = 16 knots Nominal Propeller = 80 rpm
TABLE 1. COMPONENTS OF MARINE VEHICLE
DOF Motion Components Forces and Moments Linear and Angular Velocities Position and Angles
1 Motion in x-Direction (surge) X u x
2 Motion in y-Direction (sway) Y v y
3 Motion in z-Direction (heave) Z w z
4 Rotation about x-axis (roll) K p φ
5 Rotation about y-axis (pitch) M q θ
6 Rotation about z-axis (yaw) N r ψ
The model of the tanker is represented as:
Bu x A
x&= + (1)
where x=[u v r] is the state vector of the ship, A is the system matrix, B is the input matrix and u=[δr] is input component i.e rudder deflection. The purpose of this
investigation is to develop a fuzzy logic control system that yields satisfactory performance for any reference
heading angles from ±3o to+45o and also provides
satisfactory performance for a predefined trajectory by providing series of heading angles. The performance index
is that the ship should track the desired heading with reasonable accuracy. The difference between the desired
heading and actual heading (i.e the heading error) should not exceed ±3o and the control signal (rudder angle) should
not reach the maximum value of ±35o.
3.
DEVELOMENT OF FUZZY LOGIC
CONTROLLER
The central idea of fuzzy logic control methodology is to map the input states for a particular output. This can be
done by using FIS (Fuzzy Inference System). FIS is a tool to formulate the mapping from a given input to specific
output using fuzzy logic. This mapping provides the basis from which decisions are made.
Fuzzy controller consists of an input, processing and output stages. The input stage contains membership functions, where the crisp input is mapped to an
appropriate membership function and truth value is assigned to crisp input. The processing stage consists of
set of rules. This stage invokes each appropriate rule and generates results for each rule, then combines the results of the active rules. The output stage consists of
defuzzifacation function, where combined result of the fuzzy rules is converted into crisp output.
Generally the development of control system consists of the following steps:
Selection of appropriate inputs and output variables for control system.
Selection of appropriate ranges for inputs and output variables.
Selection of appropriate membership function for each fuzzy input and output.
Development of subsets of input and output variables and labeling each of subset into linguistic (fuzzy) variables
Development of appropriate rules and processing of rules.
Defuzzification of output of the system into crisp output.
3.1
Inputs and Outputs for Control System
The component which affects the heading motion of ship
is known as rudder. The states which are significantly
affected by rudder deflection (δr) are heading/yaw angle
(ψ), heading rate/yaw rate (r) and sway velocity (v). The
performance of the controller is based on minimization of
the difference between desired and actual states (i.e error).
The desired states are generated from desired model by
using second order differential equation. Hence inputs of
the fuzzy controller are heading angle error (ψ_error) and
heading rate error (r_error). The output of controller is
chosen as rudder deflection (δr).
3.2
Ranges for Input and Output
In ranges for variables are selected as; from -3o to +3o for
heading error and -35o to +35o for rudder deflection.
Starting from these limits, the values for ranges of input
and output variables are obtained by trial and error
(Table 2). Ranges are selected from negative to positive
so that ship may attain clockwise or anticlockwise
3.3
Membership Function
Membership function is a function which assigns the input a value between 0 and 1. It exhibits degree of membership of a member in a particular fuzzy set. In this work triangular
function is used for fuzzification, which gives smooth transition from initial to final state. A function theoretic
form of triangular function is given by Equation (2). The Equation (2) is derived in such a manner that it assigns any input a value between 0-1.
(
)
⎪
⎪
⎪
⎩
⎪⎪
⎪
⎨
⎧
≥ ≤ − − = ≥ ≤ − − > < = c error x b b c error x c b error x b error x a a b a error x c error x a error x c b a error x 1 , 0 , , , μ (2)where xerror are crisp values of input state errors, 'μ' is membership value assigned to input, 'a' and 'c' describe the limits of function, 'b' is core (having membership of one) of triangular membership. The values of limits and core for different variables are given in Tables 3-5.
3.4
Subsets of Ranges and Fuzzy Variables
Each of the universal sets of inputs (ψ_error and r_error)
and ouput (δr) are divided into seven subsets. Each subset
is labeled by linguistically defined fuzzy variables: BN
(Big Negative), MN (Medium Negative), SN (Small
Negative), ZE (Zero), SP (Small Positive), MP (Medium
Positive) and BP (Big Positive). The ranges of subsets are
defined is such a manner that their values overlap each
other as given in Tables 3-5.
Equation (2) is used to map each of these subsets to a triangular membership function as shown in Fig. 2, where the crisp input is assigned a value between 0 and 1. It
exhibits degree of membership of particular input to particular fuzzy sets. As the value of variable changes,
its membership to particular fuzzy subset varies from 0-1 and then from 1-0. Because of overlapping the particular
TABLE 5. FUZZY VARIABLES AND SUBSETS OF RUDDER DEFLECTION
Fuzzy Rudder deflection (δr)
Subsets a b C
BN -1.0670 -0.8000 -0.5333 MN -0.8000 -0.5333 -0.2667 SN -0.5333 -0.2667 0.0000 ZE -0.2667 0.0000 0.2667 SP 0.0000 0.2667 0.5333 M P 0.2667 0.5333 0.8000 BP 0.5333 0.8000 1.0670
TABLE 3. FUZZY VARIABLES AND SUBSETS OF HEADING_ERROR
Fuzzy Heading error (ψ_error)
Subsets a b c
BN -0.530 -0.400 -0.266 MN -0.400 -0.266 -0.133 SN -0.266 -0.133 0.000 ZE -0.133 0.000 0.133 SP 0.000 0.133 0.2660 M P 0.133 0.266 0.400
BP 0.266 0.400 0.530
TABLE 4. FUZZY VARIABLES AND SUBSETS OF HEADING_RATE_ERROR
Fuzzy Heading rate error (r_error)
Subsets a b c
BN -0.133300 -0.010000 -0.006665 MN -0.010000 -0.006665 -0.003335 SN -0.006665 -0.003330 0.000000 ZE -0.003335 0.000000 0.003335 SP 0.000000 0.003335 0.006665 M P 0.003335 0.006665 0.010000
BP 0.006665 0.010000 0.133300
TABLE 2. UNIVERSAL SETS FOR RANGES OF INPUT AND OUTPUT VARIABLES
Input Vector
heading error ψ_error -0.4to -0.4deg.
( xerror) heading rate error r_error -0.01to -0.01deg./
second
value of the subset can be member of more than one fuzzy subset. As the value of variable changes the
membership value tracks from one fuzzy set to another. This interpolation between the fuzzy sets helps to make
decisions.
3.5
Rules and Processing of Rules
The processing stage of fuzzy controller is the collection
of rules. These rules are written in the form of IF THEN
statements. IF part of the rule is called Antecedent, while
THEN part is called Consequent. If there are more than
one inputs or outputs, then they are combined by fuzzy
logical operators generally AND (min) or OR (max). The
number of rules depends upon the number of inputs,
number of subset/membership functions and number of
output.
In this work the controller consists of two inputs and
one output. Each input and output variable is divided
into seven subsets. It is observed that the square
number of rules (Table 6) helps to maintain the
structural symmetry of the system. For the proposed
controller, 7x7=49 rules are developed. Some of the
rules are given below:
Rule 1: IF r_error is big negative AND ψ_error is big
negative THEN δr is big negative
Rule 2: IF r_error is medium negative AND ψ_error is big
negative THEN δr is big negative
Rule 3: IF r_error is small negative AND ψ_error is big negative THEN δr is medium negative
Rule 4: IF r_error is zero AND ψ_error is big negative THEN δr is medium negative
Rule 5: IF r_error is small positive AND ψ_error is big negative THEN δr is small negative
Rule 6: IF r_error is medium positive AND ψ_error is big negative THEN δr is small negative.
.
.
and so on
A summary of complete 49 rules can be written in fuzzy associative matrix form as given in Table 6.
In Table 6, it is observed that the main diagonal of the table consists of zeros and on the either side of this diagonal the fuzzy variables change gradually having the opposite signs. This condition maintains the structural symmetry of the plant under consideration.
TABLE 6. SUMMARY OF RULES
r_error
BN MN SN ZE SP M P BP
ψ_error
BN BN BN MN MN SN SN ZE MN BN MN MN SN SN ZE SP SN MN MN SN SN ZE SP SP ZE MN SN SN ZE SP SP M P SP SN SN ZE SP SP M P M P M P SN ZE SP SP M P M P BP BP ZE SP SP M P M P BP BP
3.6
Defuzzification
Defuzzification is a process of converting the aggregated
output of the rule into a single crisp value. Various methods
of defuzzificaion are available. In this work centroid method
is used. In this method the centre of area under the curve
is calculated by using Equation (3).
∫ ∫ =
dz z
dz z z u
) (
. ). (
μ μ
(3)
where 'z' is aggregated output of active rules and 'u' is crisp output of fuzzy controller.
4.
SIMULATION OF FUZZY CONTROL
SYSTEM
In this section simulation results are presented. The
simulations are carried by developing a closed loop system consisting of desired system model, fuzzy
controller and model of the ship as shown in Fig. 3. From desired model desired states are generated by step
command input, however the actual states generated by ship model are fed back to comparison element. From
where the error signals are generated which are fed to the fuzzy controller to minimize the error and regulate the
ship in the desired direction. Simulations are carried out
in MATLAB Version 7.
In simulation studies test conditions are set by changing the depth of water to observe the effectiveness of the
controller.
For model of the tanker, deep and confined waters are
described by a parameter called depth ratio (ζ). This ratio
is calculated by Equation (4) [7]:
T h
T
− =
ζ (4)
where h is water depth and T is draft to design waterline. Water depth should be greater than the draft. The relation between ζ and h provides a transition point where hydrodynamic coefficient Yuvζ changes value and it obeys the following condition:
if ζ is less than 0.8, then Yuvζ = 0
if ζ is greater than or equal to 0.8, then Yuvζ = -0.85(1-0.8/ζ) [7,19-20].
By analyzing this relation it is observed that at depth greater than 100m, the depth ratio ζ does not vary considerably. Therefore two depth regions (i.e greater and less then 100m) are normally considered for test conditions,
where the dynamics of the vehicle changes.
In this work, the simulations are carried out for various command angles in shallow water at 24m depth and deep
water at 200m depth of water.
5.
RESULTS AND DISCUSSION
Various simulation are carried out by using the closed loop system, the graphical results are presented in Figs. 4-6.
(a) DESIRED RESPONSE AND ACTUAL RESPONSE FOR 45O
COMMAND ANGLES
(b) DIFFERENCE BETWEEN DESIRED AND ACTUAL HEADING (I.E HEADING ERROR)
(c) CONTROL COMPONENT EFFORT (RUDDER DEFLECTION)
FIG. 4. SIMULATION RESULTS AT 45O COMMAND HEADING
ANGLE AT 24M DEPTH OF WATER
5.1
Simulation for Heading Control at
Shallow and Deep Waters
Results presented in Figs. 4-5 show the performance of
heading controller for 45o command angles. The
simulations are carried out for shallow and deep waters. In
Figs. 4(a)-5(a), the dashed lines show the desired heading
and solid lines represent the actual output of the controller.
Figs. 4(b)-5(b) represent the difference between the desired
and actual heading (heading error). Figs. 4(c)-5(c) show
the behaviour of the rudder in response to command
angles.
Fig. 5 evaluates the performance of controller at 45o
command heading angles in shallow waters (24m depth).
In Fig. 5 it is observed that the actual response follows the
desired response. The maximum errors calculated for 45o
command heading angles is -2.8o.
However, Fig. 5 exhibits the performance of the controller
for same command angle in deep waters (200m depth). In
Fig. 5 it is observed that the actual response follows the
desired response with some oscillations on either side of
the actual response. However, maximum values of errors
remain within the specified limits.
5.2
Simulation for Trajectory Tracking
Control at Continuous Varying Depth
of Water
Fig. 6 shows the results of the controller for trajectory
tracking by providing a series of 10, 20 and -5o of heading
commands at continuous varying depths. Fig. 6(a)
represents the desired trajectory by dashed lines and
actual trajectory by solid lines. Fig. 6(b) represents the
difference between the desired and actual trajectory (error).
Fig. 6(c) shows the behaviour of the rudder in response to
series of command angles. Fig. 6(d) represents
(a) 45O DESIRED AND ACTUAL HEADING ANGLE
(b) DIFFERENCE BETWEEN DESIRED AND ACTUAL HEADING (I.E HEADING ERROR)
(c) CONTROL COMPONENT EFFORT (RUDDER DEFLECTION)
FIG. 5. SIMULATION RESULTS AT 45O COMMAND HEADING
ANGLE AT 200 M DEPTH OF WATER
5.3
Observation and Result Discussion
From Figs. 4(a)-5(a), it is observed that the tanker takes
approximately 2000 seconds to reach the steady state
position. This is because of the large size of the
vehicle.
Results show that in shallow water the actual response
tracks the desired response smoothly; however in deep
sea water the actual response oscillates around the
desired response, this is because of variation in
dynamics of ship due to change in depth of water.
Despite the change of dynamics of the ship, the
performance of the fuzzy controller remains robust and
response converges to steady state condition within a
limited time. Similarly for trajectory tracking the error
remains within the specified limits.
6.
CONCLUSION
In this paper a Fuzzy logic controller is designed for
heading and trajectory tracking control of a tanker. The
development of the controller is based on Mamdani type
FIS. The controller is designed in such a manner that the
tanker can turn on both sides starboard and port of the
vehicle. The performance of the controller is tested in
shallow waters and deep sea waters. It is concluded that
the overall performance of the controller is satisfactory
both in course changing and course keeping. The error in
all the cases remains within the specified limits and
controller has capability to cope with variations in
dynamics of the system.
ACKNOWLEDGEMENTS
The first author acknowledges the Higher Education
Commission of Pakistan for awarding funds to conduct
this research at Mehran University of Engineering &
FIG. 6. RESULTS OF CONTROLLER FOR TRAJECTORY TRACKING AT CONTINUOUS VARYING DEPTH FROM 24-200 M. (a) TRAJECTORY TRACKING A SERIES OF COMMAND
ANGLES (IE 10O, 20O AND -5O)
(b) DIFFERENCE BETWEEN DESIRED AND ACTUAL HEADING (IE HEADING ERROR)
(c) CONTROL COMPONENT EFFORT (RUDDER DEFLECTION)
(d) VARYING DEPTH OF WATER FROM 24-200M DEPTH
REFERENCES
[1] Smith, R.M., “IFAC Benchmark Problems”, McGraw Hill, 1994.
[2] Allensworth, T., "A Short History of Sperry Marine", 1999. http://www.sperry marine.com/pages/history.html.
[3] Fossen, T.I., "A Survey on Nonlinear Ship Control", Plenary Talk IFAC MCMC, Aalborg, Denmark, 2000.
[4] Minorsky, N., "Directional Stability of Automatically Steered Bodies", Journal of American Society of Naval Engineers, Volume 34, pp. 280-309, 1922.
[5] Koyama, T., "On the Optimum Automatic Steering System of Ships at Sea", Journal of Society of Naval Architecture, Volume 122, pp. 18-35, Japan, 1967.
[6] Norrbin, N.H., "Theory and Observation on Use of Mathematical Model for Ship Maneuvering in Deep and Confined waters", Proceedings of 8th Symposium on Naval Hydrodynamics, pp. 807-904, Pasadena, USA, 1970.
[8] Fang, Y., Zergeroglu, E., deQueiroz, M., and Dawson, D.M., "Global Output Feedback Control of Dynamically Poitioned Surface Vessel: An Adaptive Control Approach", Mechatronics, Volume 14, pp. 341-356, 2004.
[9] McGookin, E.W., "Optimisation of Sliding Mode Controller for Marine Applications: A Case Study of Methods and Implementations Issues", Ph.D. Thesis, University of Glasgow, Scotland, 1997.
[10] Zhang, R., Chen, Y., Sun, Z., Sun, F., and Xu, H., "Path Control of Surface Ship in Restricted Waters Using Sliding Mode", IEEE Transaction on Control System Technology, Volume 8, No. 4, pp. 722-732, 2000.
[11] Fang, M.C., and Luo, J.H., "The Nonlinear Hydrodynamic Model for Simulating a Ship Steering in Waves with Autopilot System", Ocean Engineering Volume 32, pp. 1486-1502, 2005.
[12] Do, K.D., Jiang, Z.P., and Pan, J., "Robust Adaptive Path Following of Underactuated Ships", Automatica, Volume 40, pp. 929-944, 2004.
[13] Yang, Y., and Zhou, C., "Adaptive Fuzzy Control of Ship Autopilot with Uncertain Nonlinear Systems", Proceedings of IEEE Conference on Cybernetics and Intelligent Systems, Singapore, 2004.
[14] Yang, Y., "Direct Robust Adaptive Fuzzy Control (DRAFC) for Uncertain Nonlinear Systems Using Small Gain Theorm", Fuzzy Sets and Systems, Volume 151, pp. 79-97, 2005.
[15] Santos, M., Lopez, R., and Cruz, J.M., "Fuzzy Control of the Vertical Acceleration of Fast Ferries", Control Engineering. Practice Volume 13, 2005, pp. 305-313, 2005.
[16] Velagic, J., Vukic, Z., and Omerdic, E., "Adaptive Fuzzy Ship Autopilot for Track Keeping," Control Engineering Practice, Volume.11, pp. 433-443, 2005.
[17] Rigatos, G., and Tzafestas, S., "Adaptive Fuzzy Control for the Ship Steering Problem", Mechatronics, Volume 16, pp. 479-489, 2006.
[18] Seo, K.Y., Park, G.K., Lee, C.S., and Wang, M.H., "Ontology-Based Fuzzy Support Agent for Ship Steering Control", Fuzzy System with Applications, Volume 36, pp. 755-765, 2009.
[19] Zhou, Y., Pan, W., and Xiao, H., "Design of Ship Course Controller Based on Fuzzy Adaptive Active Disturbance Rejection Technique", Proceedings of the IEEE International Conference on Automation and Logistics, Hong Kong and Macau, August 16-20 2010.
[20] Wu, Y., Xue, M., and Wu, P., " Study on Fuzzy Neural Network-Based Ship Autopilot", Sixth International Conference on Natural Computation, 2010.
[21] Zhang, X., Sun, Y., Li, S., and Wang, Y., "Research on a Direct Track Intelligent Control Method of Large Ship", Proceedings of the IEEE International Conference on Automation and Logistics Shenyang, China, August, 2009.
[22] Di, G., Yang, W., and Chen, G., "Dynamic Fuzzy Neural Intelligent Control for Ship Course Tracking", Proceedings of the 8th World Congress on Intelligent Control and Automation; Jinan, China, July 6-9 2010.