Next Article in Journal
Construction of a Real-Time Forecast Model for Coastal Engineering and Processes Nested in a Basin Scale Model
Previous Article in Journal
On the Stability of Rubble Mound Structures under Oblique Wave Attack
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Designing a Ship Autopilot System for Operation in a Disturbed Environment Using the Adaptive Neural Fuzzy Inference System

Department of Mechanical System Engineering, Gyeongsang National University, Tongyeong 53064, Republic of Korea
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2023, 11(7), 1262; https://doi.org/10.3390/jmse11071262
Submission received: 30 May 2023 / Revised: 13 June 2023 / Accepted: 18 June 2023 / Published: 21 June 2023
(This article belongs to the Section Ocean Engineering)

Abstract

:
Efficient ship guidance, fuel savings, and reduced human control have long been a key focus in developing intelligent controllers. The integration of neural networks and fuzzy logic control offers numerous advantages, creating a robust and adaptive system capable of handling complex dynamics and uncertainties. This intelligent control system learns from its environment and adjusts behavior, making it effective in challenging situations. Additionally, it improves system efficiency, reduces energy consumption, and minimizes human intervention, enhancing safety and reducing errors. This study presents an intelligent control approach, titled “Designing a Ship Autopilot System for Operation in a Disturbed Environment using the Adaptive Neural Fuzzy Inference System”, combining a neural network and fuzzy logic control to steer ships. A 6DOF dynamic model is constructed, simulating ship operations with noise signals. The ANFIS controller comprises six layers, with a distinct composition rule expressing conclusions as linear equations of input variables. Layer 1 has two input signals, layer 2 represents fuzzy rules with six nodes, and layers 3, 4, and 5 contain nine nodes each. Layer 6 combines output signals from layer 5, following the first-order Takagi–Sugeno fuzzy logic control model. Simulation results using MATLAB/Simulink demonstrate the superiority of the ANFIS controller over the PID controller, significantly improving stability and trajectory accuracy.

1. Introduction

To control a ship, one must consider the complex interactions between the ship’s motion and external factors such as currents, waves, and wind. These factors can cause the ship to deviate from its desired course, and the hydrodynamic forces acting on the hull and rudder further complicate the challenge of maintaining stability. Developing an effective autopilot system is therefore critical. In pursuit of this goal, a mathematical model of the ship in six degrees of freedom [1] was constructed and simulated using MATLAB [2]. The model was analyzed while taking into account the nonlinear factors that affect the ship’s behavior under the influence of external forces. To simplify the design process, some of the nonlinear factors were sometimes neglected. Additionally, the relationship between the steering gear and propeller was analyzed, as it directly affects the ship’s speed and direction. To provide the controller with an accurate representation of the ship’s operation and enable the testing of new control methods, the mathematical model was further refined to isolate the components that exclusively affect the course of the ship, such as the rudder, propeller, and hydrodynamic forces [3]. Test experiments were conducted on actual ships, and simulation techniques were utilized to determine the parameters of the model. Finally, the general principles of the navigation controller and the system of floating means on the sea were discussed in an overview.
The global maritime industry is an essential contributor to economic development, with a rich history as one of the earliest developed industries. Ships continue to evolve, becoming increasingly modern and capable of carrying larger loads to meet the growing demands of freight transport, tourism, and national defense. In light of advanced technology, there has been a heightened focus on developing automatic control systems for ships [4]. These complex systems are designed to replace human control and accomplish advanced tasks.
In the maritime industry, autopilot systems play a crucial role in ship control by allowing for precise direction control in the ship’s previous direction of travel [5]. The implementation of a well-designed autopilot system can significantly reduce crew workload and fuel consumption and shorten voyage times.
The benefits of automatic control [6], mentioned above, along with the significant advancements in wireless data transmission, have led to more sophisticated control requirements. Specifically, automatic mode control and remote monitoring capabilities enable operators to directly control ships from a distance or establish remote parameters for automatic control mode. These requirements are particularly necessary for ships that need to navigate complex and challenging marine terrain that is difficult for humans to access or in dangerous areas. Additionally, they are essential for the future of seafaring. Underwater vehicles, for instance, do not require human presence.
The maritime industry has made significant progress in ship autopilot technology since the installation of the first autopilot on the J.A. Moffet in 1920. Early autopilot systems used PID controllers in combination with other methods. Although the PID algorithm is simple and easy to apply, it has limitations as the optimal PID coefficients only work well under certain conditions, which are constantly changing during transport and affected by environmental factors. Hence, the use of PID controllers [7] in automatic ship steering systems is limited.
Until the 1980s, the application of computers and microcontrollers led to the development of new theories and various types of controllers, including fuzzy logic application controllers [8], neural networks [9], and expert systems. These controllers have gradually solved the limitations of PID controllers mentioned above. They are still a topic of interest to researchers due to their versatility and high flexibility. Therefore, it is crucial to research and apply modern control techniques [10] to the automatic ship steering system to adapt to changing working conditions. In response to this practical demand, the authors propose a study titled “Design and Control of an Autopilot System for Ships using an Intelligent Controller based on Adaptive Neuro Fuzzy Inference System”.
The use of Adaptive Neuro-Fuzzy Inference System (ANFIS) controllers [11,12,13] has been increasing in various fields, including control engineering, signal processing, and industrial automation. ANFIS controllers are widely used in applications such as robotics, aerospace systems, automotive control, and process control. In recent years, ANFIS controllers have gained attention in the field of marine engineering, particularly in ship autopilot control. ANFIS controllers are advantageous due to their ability to handle nonlinear and complex systems, which are prevalent in marine engineering. Some studies have shown that ANFIS controllers can improve the performance of ship autopilot control, such as reducing fuel consumption and improving the accuracy of the ship’s course. However, further research and development are still needed to optimize the ANFIS controller’s performance and ensure its reliability and robustness in real-world applications. Overall, the use of ANFIS controllers is a promising direction in the field of marine engineering and ship autopilot control. The basic structure of the study:
Part 1: Brief introduction to ROV and ANFIS.
Part 2: Building dynamics, controller, signal noise.
Part 3: Simulation results and discussion of the results.
Part 4: Making a conclusion.
The study results were simulated on MATLAB/Simulink, providing a more precise comparison and evaluation of the controller’s performance. This simulation also demonstrated the controller’s effectiveness when compared to a conventional PID controller.
After simulation, the following are some of the innovations of the ANFIS controller in ship control:
  • High flexibility: The ANFIS controller has the ability to adapt and learn from the conditions and parameters of the ship, making it work well in different conditions such as weather, waves, loads, speed, etc.
  • Ability to adjust accuracy: The ANFIS can adjust the accuracy of the control model based on the actual data collected, helping to optimize the control performance.
  • High availability: The ANFIS is a practical model and can be deployed on embedded computing devices such as microcontrollers, which reduces costs and increases the availability of ship control systems.
  • Reduce design load: The ANFIS controller can perform many functions, thereby reducing the load on the design and installation of ship control systems.
The author of this article presents the following:
Optimization of the ANFIS Model: Optimizing the ANFIS model can improve the control performance of the ship. Optimization algorithms such as genetic algorithms, particle swarm optimization, or simulated annealing can be used to adjust the parameters of the ANFIS model.
Multitasking of the ANFIS: The multitasking of the ANFIS can optimize the performance of the controller in different situations. By creating subtasks, such as speed control, direction control, and engine control, the compatibility and overall performance of the ANFIS controller can be simultaneously enhanced.

2. Materials and Methods

2.1. Autopilot System

The basic autopilot control system (Figure 1) [14] includes a digital compass system to position the ship’s direction, the sensor for the angular position of the rudder, a central controller to receive values from sensors and output the main motor control signal, a rudder angle motor, a control panel to select automatic control values, manual control, or control cease or start mode, and an interface screen to display the values as well as system parameters [15].
Compass: used to determine the direction of the ship relative to the physical axis of the Earth. This compass can be used to determine the course when the ship is operating in manual mode and to determine the direction of the ship when in automatic control mode. There are two basic types of compasses: digital compass and analog compass. The digital compass has a small cross-section, is easy to disassemble and connect, and is flexible during transportation, especially for digital communication, so it can easily communicate with digital control devices and control devices with current controllers. Analog compasses have a relatively large design, difficult to move but with high accuracy.
Steering wheel angle sensor: used to determine the current rotation of the rudder because of the actuators and mechanics. There will be a deviation between the control signal of the rudder angle and the actual value of the rudder angle. The angle sensor will help control the steering wheel better and match the desired value of the steering angle. The steering angle sensor can be an analog sensor or a digital sensor and using a positioning encoder will make the signal response more accurate and faster.
The Adaptive Neuro-Fuzzy Inference System (ANFIS) is regarded as a comprehensive and well-suited controller for the automatic control of maintaining a ship’s pre-set course. It is highly effective due to its precise learning capabilities and remarkable stability, achieved through rapid feedback responses aimed at minimizing errors.

2.2. Dynamic Model of the Ship

The proposed research advocates for the implementation of a 6DOF controller for ships due to its numerous advantages. Firstly, a 6DOF controller enhances maneuverability by granting control over six fundamental ship motions, enabling more effective navigation and adaptability to diverse operational circumstances. Secondly, the additional degrees of freedom provided by a 6DOF controller contribute to improved stability control, crucial for maintaining equilibrium and ensuring safety during complex maneuvers and challenging sea conditions. Thirdly, precise positioning of the ship, both horizontally and vertically, is facilitated by the capability to govern all six degrees of freedom, essential for critical activities such as docking, berthing, and navigating narrow channels. Moreover, a 6DOF controller equips ships with the necessary control capabilities to promptly respond to environmental variations, ensuring stability and responsiveness in dynamic marine environments. In summary, the implementation of a 6DOF controller surpasses the advantages of a 3DOF controller, empowering ships with enhanced control precision, stability, effective navigation, and adaptability to changing sea conditions. Thus, the authors chose 6DOF for simulation in this paper.
In order to describe the motion of a ship [16], a six-degrees-of-freedom kinematic model is commonly employed. Depending on the required accuracy and specifications, the number of degrees of freedom can be adjusted, but the current trend is to use a 3-degrees-of-freedom model with an absolute coordinate system and a system of relative coordinates. The ship’s position (x,y) and orientation (ψ) in the XEYEZE absolute coordinate system (the coordinate system associated with the Earth) are represented as the vector η = [x,y,ψ]T. The velocity along the vertical and horizontal axes, as well as the rotational velocity about the vertical axis, are represented by the vector ν = [u,v,r]T. The center of the XYZ relative coordinate system (the coordinate system attached to the ship) is located in the axial plane of the ship, at a distance of xG from the center of gravity. Figure 2 illustrates the ship’s coordinate system [16,17]. The motion components and kinematic parameters of the ship are presented in Table 1.
In which: Oxyz—Earth coordinate system: NED (North East Down) or Inertial Frame.
Obxbybzb—Coordinate system associated with the ship position in which the center of gravity of the ship coincides with the origin: BODY or body—Fixed Frame.
In this paper, to enhance the accuracy and reliability of the autopilot system, the authors propose a simulation using a 6-degrees-of-freedom model for ships. Ships are complex vehicles that operate in a challenging environment and are influenced by various unpredictable factors such as wind, waves, and currents. The dynamics of ship motion are governed by Newton’s laws, which consider the ship as a solid object moving in a fluid medium and describe the motion of the ship using six degrees of freedom (DOF) [17,18,19]. The six degrees of freedom (DOFs), depicted in Figure 2, encompass heave, sway, surge, roll, pitch, and yaw. The objective of this study is to examine the influence of these factors on ship motion and present a solution to enhance the stability and performance of the ship under different operational circumstances. The ship’s balancing motion at any position is shown in (1) [16,17,18,19].
M v ˙ + C ( v ) v + D ( v ) v + g ( η ) = τ
where:
τ —the thrust vector, which in this paper is supplied by the engines and steering systems of the vessel.
η—the position vector, used to orient with the Earth reference frame (n-frame) and is defined by the following components:
η = η 1 T , η 2 T T ,   η 1 = [ x , y , z ] T ,   η 2 = [ ϕ , θ , φ ] T
v—the velocity vector, the angular velocity vector in the body-fixed coordinate system, is determined by:
v = v 1 T , v 2 T T ,   v 1 = [ u , v , w ] T ,   v 2 = [ p , q , r ] T
The relationship between v and η is described by:
η ˙ = J ( η ) v
In which J(η)—the transformation matrix, which depends on Euler angles (φ, θ, ψ) and has the form [18].
J ( η ) = J 1 ( ϕ , θ , φ ) O 3 × 3 O 3 × 3 J 2 ( ϕ , θ , φ )
where:
J 1 ( ϕ , θ , φ ) = c ( φ ) c ( θ ) s ( φ ) c ( ϕ ) + c ( φ ) s ( θ ) s ( ϕ ) s ( φ ) s ( ϕ ) + c ( φ ) c ( ϕ ) s ( θ ) s ( φ ) c ( θ ) c ( φ ) c ( ϕ ) + s ( ϕ ) s ( θ ) s ( ϕ ) c ( φ ) s ( ϕ ) + s ( φ ) c ( ϕ ) s ( θ ) s ( θ ) c ( θ ) s ( ϕ ) c ( θ ) c ( ϕ )
J 2 ( ϕ , θ , φ ) = 1 s ( ϕ ) t ( θ ) c ( ϕ ) t ( θ ) 0 c ( ϕ ) s ( ϕ ) 0 s ( ϕ ) / c ( θ ) c ( ϕ ) / c ( θ )
where s(.) = sin(.), c(.) = cos(.) and t(.) = tan(.)
Matrix of inertia—M, determined by the formula:
M = M R B + M A
where MRB—the inertia matrix generated by the ship itself (treating the hydrodynamics of the ship as the mechanics of a rigid body), calculated by Formula (6) [18].
M R B = m 0 0 0 m z G m y G 0 m 0 m z G 0 m x G 0 0 m m y G m x G 0 0 m z G m y G I x I x y I x z m z G 0 m x G I y x I y y y z m y G m x G 0 I x x I z y I z
where:
m—the mass of the ship.
Ixx, Izz—the moment of inertia about the x0 and z0 axes.
x G , y G , z G —the center of gravity coordinates of the ship.
U, v—the velocity and lateral displacement of the ship.
MA—the added mass matrix, created by the forces and moments due to the fluid (water) inertia. Around the fluid, there is always movement, and this impact force is proportional to the velocity of the ship. The value of MA is determined according to (7) [20].
M A = X u ˙ X v ˙ X w ˙ X p ˙ X q ˙ X r ˙ Y u ˙ Y v ˙ Y w ˙ Y p ˙ Y q ˙ Y r ˙ Z u ˙ Z v ˙ Z w ˙ Z p ˙ Z q Z r ˙ K u ˙ K v ˙ K w ˙ K p ˙ K q ˙ K r ˙ M u ˙ M v ˙ M w ˙ M p ˙ M q ˙ M r ˙ N u ˙ N v ˙ N w ˙ N p ˙ N q ˙ N r ˙
With:
X u ˙ = X u ˙ , Y u ˙ = Y u ˙ , Z u ˙ = Z u ˙ , K u ˙ = K u ˙ , M u ˙ = M u ˙ , N u ˙ = N u ˙
X v ˙ = X v ˙ , Y v ˙ = Y v ˙ , Z v ˙ = Z v ˙ , K v ˙ = K v ˙ , M v ˙ = M v ˙ , N v ˙ = N v ˙
X w ˙ = X w ˙ , Y w ˙ = Y w ˙ , Z w ˙ = Z w ˙ , K w ˙ = K w ˙ , M w ˙ = M w ˙ , N w ˙ = N w ˙
X p ˙ = X p ˙ , Y p ˙ = Y p ˙ , Z p ˙ = Z p ˙ , K p ˙ = K p ˙ , M p ˙ = M p ˙ , N p ˙ = N p ˙
X q ˙ = X q ˙ , Y q ˙ = Y q ˙ , Z q ˙ = Z q ˙ , K q ˙ = K q ˙ , M q ˙ = M q ˙ , N q ˙ = N q ˙
X r ˙ = X r ˙ , Y r ˙ = Y r ˙ , Z r ˙ = Z r ˙ , K r ˙ = K r ˙ , M r ˙ = M r ˙ , N r ˙ = N r ˙
The Coriolis matrix—C(v), is determined by the following formula:
C ( v ) = C R B ( v ) + C A ( v )
where C R B v —the centripetal Coriolis matrix, characteristic of the hydrodynamics of solids, and determined according to (9) [14].
C R B ( v ) = 0 3 × 3 m S v 1 m S v 2 S r G m S v 1 + m S r G S v 2 S I 0 v 2
C R B ( v ) = 0 0 0 m y G q + z G r m x G q w m x G r + v 0 0 0 m y G p + w m z G r + x G p m y G r u 0 0 0 m z G p v m z σ q + u m x G p + y G q m y G q + z G r m y G p + w m z G p v 0 I y z q I s z p + I z r I z z r I x p p I y q m x G q w m z G r + x G p m z σ q + u I y z q + I x p I z r 0 I x r I x q + I s p m x G r + v m y G r u m x G p + y G q I y z r I x y p + I y q I s z r I x y q I x p 0
CA(v)—the Coriolis matrix generated by the added mass due to the forces and moments of fluid inertia, determined according to (10) [18].
C A ( v ) = 0 0 0 0 Z w ˙ w Y v ˙ v 0 0 0 Z w ˙ w 0 X u ˙ u 0 0 0 Y v ˙ v X u ˙ u 0 0 Z w ˙ w Y v ˙ v 0 N r ˙ r M q ˙ q Z w ˙ w 0 X u ˙ u N r ˙ r 0 K p ˙ p Y v ˙ v X u ˙ u 0 M q ˙ q K p ˙ p 0
Inertia-induced vibration matrix—D(v): The hydrodynamic forces of sway motion caused by the inertia of the liquid, mainly dependent on the friction between the water and the hull, water drift, and vortex, determined according to (11) [21,22].
D ( v ) = X o Y D Z D   v = X u 0 0 0 Y v Y r 0 N v N r   v
Force and moment of gravity vector—g(η): This force is generated by the gravity and buoyancy of the ship under the action of water on the hull. The force of gravity and buoyancy will act on the ship’s center of gravity and is determined according to (12) [18].
g ( η ) = ( W B ) sin θ ( W B ) cos θ sin ϕ ( W B ) cos θ cos ϕ ( y G W y B B ) cos θ cos ϕ + ( z G W z B B ) cos θ sin ϕ ( z G W z B B ) sin θ + ( x G W x B B ) cos θ cos ϕ ( x G W x B B ) cos θ sin ϕ ( y G W y B B ) sin θ
With:
W = mg submerged weight of the body;
B = ρ g buoyancy force;
ρ is the water density;
is the volume of fluid displaced by the ship;
g = 9.81 m/s2: gravitational acceleration;
x G , y G , z G : center of gravity coordinates of the ship;
x B , y B , z B : center of buoyancy coordinates of the ship.
Force vector and moment of the control signal: Described by the matrix—τ and determined by the following formula [19].
τ = X Y Z K M N T
τ consists of the following components:
τ = τ h y d + τ c s + τ p r o p + τ e x t
where:
τhyd—force and moment generated by the motion between the ship’s body and the water.
τcs—force and moment created by the action of the rudder and auxiliary rudder (fin).
τprop—force and moment created by the action of the main propulsion force.
τext—force and moment created by the impact of environmental disturbances: waves, wind, currents, etc.
The forces and moments generated by the rudder: The force due to the rudder action is calculated according to (13) [19,23].
X r u d = F u , V a v , v , r , δ sin ( δ ) Y r u d = F u , V a v , v , r , δ cos ( δ ) Z r u d = 0
δ—rudder angle: To ensure the forces and moments generated by the rudder, the angle of the rudder deflection is limited in magnitude by −δmaxδδmax, where δmax = 35° and the rate of deflection.
The moment generated by the rudder action is calculated according to (14).
K r u d   M r u d   N r u d T = ( C P ¯ C G ¯ ) X r u d   Y r u d   Z r u d T
where:
C G ¯ = X G Y G Z G are the coordinates of the vessel’s center of gravity.
C P ¯ = X C P Y C P Z C P are the coordinates of the center of pressure of the rudder forces in a fixed coordinate system (Figure 3), calculated according to Equation (14).
F = 1 2 ρ C F A r V a v 2 sin δ a t t a c k i f   δ a t t a c k < δ s t a l l 1 2 ρ C F A r V a v 2 sin π 2 δ a t t a c k δ s t a l l i f   δ a t t a c k < δ s t a l l
CF—lift coefficient; Ar—area of the rudder; Vav—average velocity of the flow acting on the rudder; δattack—angle of attack between the rudder and the flow; δstall—the rudder stall angle.
δ a t t a c k = δ δ flow = δ arctan v + X cp X G r u

2.3. ANFIS Controller

When using the ANFIS controller in the ship motion model, the differences from the traditional control model will be:
-
More accurate train control;
-
Error minimization;
-
Flexible ship control;
-
Optimized system performance.
With the ability to learn and self-correct, the ANFIS controller can make decisions based on fuzzy rules and input parameters, helping to optimize system performance and minimize errors in the control process. This makes ship control more precise and more responsive to control requirements.
In addition, the ANFIS controller also helps to control the train flexibly and respond well to different situations thanks to its ability to adapt to changing conditions during train operation. From there, it helps to optimize the ship’s performance and reduce the time it takes to complete the missions.
In this study, the proposed neural–fuzzy controller is a neural–fuzzy system based on Takagi and Sugeno’s Approach. It is also an Adaptive Neuro-Fuzzy Inference System (ANFIS) [24,25,26,27,28,29,30,31,32,33]. The proposed controller has two inputs, I 1 and I 2 , and one output: O .
O = f I 1 , I 2
The main difference of the composition rule (Figure 4) is that the conclusion of the rule takes the form of a linear equation of the input variables. The ANFIS controller consists of 6 layers. Layer 1 consists of 2 input signals, and layer 2 consists of 6 nodes representing the 6 rules of the fuzzy system. Layers 3, 4, and 5 all have 9 nodes, and, finally, layer 6 consists of 1 node that synthesizes the output signals from layer 5.
The ith control law of the ANFIS [24,25,26,27,28,29,30,31,32,33] controller:
According to the first-order Takagi–Sugeno model of fuzzy logic control:
y i = a i I 1 + b i I 2 + c i
where:
i = 1, 2, …, 9.
a i , b i , c i are coefficients.
The distribution of the membership function of the input and output variables is shown in Figure 5.
If I 1 is LW and I 2 is LW, then O will be S: y 1 = a 1 I 1 + b 1 I 2 + c 1 ;
If I 1 is M and I 2 is LW, then O will be S: y 2 = a 2 I 1 + b 2 I 2 + c 2 ;
If I 1 is H and I 2 is LW, then O will be F: y 3 = a 3 I 1 + b 3 I 2 + c 3 ;
If I 1 is LW and I 2 is M, then O will be S: y 4 = a 4 I 1 + b 4 I 2 + c 4 ;
If I 1 is M and I 2 is M, then O will be F: y 5 = a 5 I 1 + b 5 I 2 + c 5 ;
If I 1 is H and I 2 is M, then O will be VF: y 6 = a 6 I 1 + b 6 I 2 + c 6 ;
If I 1 is LW and I 2 is H, then O will be F: y 7 = a 7 I 1 + b 7 I 2 + c 7 ;
If I 1 is M and I 2 is H, then O will be VF: y 8 = a 8 I 1 + b 8 I 2 + c 8 ;
If I 1 is H and I 2 is H, then O will be VF: y 9 = a 9 I 1 + b 9 I 2 + c 9 ;
where:
-
(The output in the controller is the rudder angle of the ship and the main input is the error of the set value and the error speed;) w—the weight of the connections between neurons in the neural network (Figure 6).
LW: Low;
M: Medium;
H: High;
S: Slow;
F: Fast;
VF: Very fast.
The structure of the ANFIS controller consists of 6 layers.
Layer 1:
Linear TF (output = input)
1 o 1 = 1 I 1 = I 1 *
1 o 2 = 1 I 2 = I 2 *
Layer 2:
Fuzzification (µ)
Layer 3:
The firing strengths of the rules are calculated considering the products of µ values:
w 1 = µ L W I 1 * × µ L W I 2 *
w 2 = µ M I 1 * × µ L W I 2 *
w 3 = µ H I 1 * × µ L W I 2 *
w 4 = µ L W I 1 * × µ M I 2 *
w 5 = µ M I 1 * × µ M I 2 *
w 6 = µ H I 1 * × µ M I 2 *
w 7 = µ L W I 1 * × µ H I 2 *
w 8 = µ M I 1 * × µ H I 2 *
w 9 = µ H I 1 * × µ H I 2 *
Layer 4:
Calculate the normalized firing strength of each rule:
w n ¯ = w n i = 1 9 w i
where:
n = 1, 2, …. 9.
Layer 5:
The output is calculated as the product of normalized firing strength and output of the corresponding fired rule y
5 O n = w n ¯ × y n
where:
n = 1, 2, …, 9.
Layer 6:
Overall output:
6 O 1 = i = 1 9 w i ¯ y i
The error loss function E is given by:
E = 1 2 y m y
where:
y m is the actual output value.
y is the desired output value.
In step 5, use the gradient descent algorithm:
Gradient descent is an iterative optimization algorithm used for finding the minimum of a function. The formula for updating the parameters in each iteration is as follows:
θ n e w = θ o l d α × J θ o l d
where:
θ n e w : updated parameter values.
θ o l d : current parameter values.
α (alpha): learning rate, which determines the step size in each iteration.
J θ o l d : gradient of the cost function J with respect to the parameters θ o l d .
Building an ANFIS Controller using MATLAB (Algorithm 1):
Algorithm 1: ANFIS setting algorithm
% Create the initial FIS model from the training data
fis = genfis2(Inputmatrix, Outputmatrix, ANFIS_Controller_Ship.fis);
numObs = 5;
% Configure the ANFIS model
anfisConfig = anfisOptions(‘InitialFIS’, fis, ‘EpochNumber’, 100, ‘DisplayANFISInformation’, 0);
% Train the ANFIS model
[anfisOutput, trainError] = anfis([trainInput, trainOutput], anfisConfig);
% Predict the output for the testing set
testOutput = evalfis(testInput, anfisOutput);
% Evaluate the performance of the model
mse = immse(testOutput, testOutputExpected);
rsquared = 1 − mse/var(testOutputExpected);
observationInfo = rlNumericSpec([numObs 1]);
observationInfo.Name = ‘observations’;
numAct = 1;
actionInfo = rlNumericSpec([numAct 1]);
actionInfo.LowerLimit = −1;
actionInfo.UpperLimit = 1;
actionInfo.Name = ‘Control’;
actionInfo.Description = ‘Thurst’;
mdl = ‘ANFIS_ Controller_Ship’;
load_system(mdl);
blk = [mdl,’/RL Data’];

2.4. Disturbance

The high-frequency wave pattern is described as follows. When subjected to high-frequency interference, it primarily affects the ship model through first-order interference. The equation approximately demonstrates the linearity of the high-frequency interference spectrum [34]:
h ( s ) = K w s s 2 + 2 ξ ω 0 s + ω 0 2
With the coefficient Kw being dependent on the sea state Kw = 2zwsw, where sw is the coefficient describing the wave density, z is the relative damping factor, and w is the drift frequency (design parameter). The relative damping factor z can be chosen at random and z < 10.
The linear state space model when converted to the time variable of the transfer function h(s) is as follows:
h ( s ) = ξ ( s ) w ( s ) = K w s s 2 + 2 ξ ω 0 s + ω 0 2
ξ ( s ) s 2 + 2 ξ ω 0 ξ ( s ) s + ω 0 ξ ( s ) = K w w ( s ) s
ξ ¨ ( t ) + 2 ξ ω 0 ξ ˙ ( t ) + ω 0 2 ξ ( t ) = K w w ˙ ( t )
The ship’s high-frequency wave pattern in terms of forward, drift, and return motion can be described as the following differential equations [35]:
ξ ˙ x = x H
x ˙ H = 2 ξ ω 0 x H ω 0 2 ξ x + K w w x
ξ ˙ y = y H
y ˙ H = 2 ξ ω 0 y H ω 0 2 ξ y + K w w y
ξ ˙ ψ = ψ H
ψ ˙ H = 2 ξ ω 0 ψ H ω 0 2 ξ ψ + K w w ψ
where wx, wy, wΨ are Gaussian white noise processes. The relative damping factor and the chosen wave frequency are equal in the forward, reverse, and drift motions [36]. This is a good approximation in real life. The high-frequency wave model is written as an equation of state as follows:
x ˙ H = A H x H + E H w H
The low-frequency flow model is calculated as follows. It is assumed that the flow is constant in both direction and amplitude, such that the flow rate Vc and direction βc can be modeled as slowly varying parameters in the Earth axis system. The flow rate according to the hull axis system is obtained through the conversion of the shaft system.
u c = V c · cos ( β c ψ L ψ H )
v c = V c · sin ( β c ψ L ψ H )
Assume ΨL and ΨH are the rotational components of the low-frequency and high-frequency effects, respectively, in addition to uc, vc, and the rotational flow component rc.
The low-frequency wind model is presented as follows. The low-frequency wind speed Vw and direction βw are modeled as slowly varying quantities. It can represent this model as a state space, as follows:
τ w i n d = [ X w i n d , Y w i n d , N w i n d ] T
where Xwind, Ywind, and Nwind are given by the following formulae:
X w i n d = 0.5 C X g R ρ w V R 2 A T
Y w i n d = 0.5 C Y g R ρ w V R 2 A T
N w i n d = 0.5 C N g R ρ w V R 2 A L L
where Cx, Cy, and CN are the coefficients of drag and torque, AT and AL are the transverse and side projection areas, L is the length of the ship, and VR and gR are the wind speed and direction acting on the ship and are calculated as follows:
V R = V w
g R = β w ψ L ψ H
The noise simulated in MATLAB/Simulink is shown in Figure 7:

2.5. Stability of a Ship

-
Static Stability Point:
The static stability point of a ship refers to the condition where the ship is in a stable equilibrium and resists tilting or capsizing. It is determined by the metacentric height (GM) of the ship, which measures the distance between the center of gravity (G) and the metacenter (M) when the ship is inclined.
The formula to calculate the metacentric height (GM) is:
G M = G M t K B
where:
GMt is the metacentric height, which represents the distance between the metacenter and the keel base.
KB is the distance between the keel base and the center of gravity of the ship.
A positive GM indicates that the metacenter is above the center of gravity, providing stability to the ship. A higher GM value implies greater stability against tilting. On the other hand, a negative GM indicates an unstable condition, as the metacenter is below the center of gravity.
-
Dynamic Stability:
The dynamic stability of a ship refers to its ability to resist rolling motions and maintain a stable condition while in motion, particularly in response to external forces such as waves or wind. It is determined by factors such as the ship’s moment of inertia (I) and weight (W).
The period of roll is a key parameter used to assess the dynamic stability of a ship. It represents the time taken for the ship to complete one full cycle of rolling motion and return to its initial upright position. The formula to calculate the period of roll is:
R o l l = 2 π ( I / W )
where:
I is the moment of inertia of the ship, which quantifies its resistance to rotational motion. It depends on the mass distribution and shape of the ship.
W is the weight of the ship, which is the force acting vertically downward due to the ship’s mass.
A shorter period of roll indicates that the ship is more responsive to external forces and experiences faster rolling motions. On the other hand, a longer period of roll implies slower and more stable rolling motions, indicating better dynamic stability.
-
Righting Lever Curve:
The righting lever curve is typically plotted as a graph with the angle of heel on the x-axis and the righting lever or righting arm on the y-axis. The righting lever represents the horizontal distance between the center of gravity (G) and the center of buoyancy (B) of the ship at a specific angle of heel. It indicates the moment created by the buoyant force acting on the ship’s hull to counteract the heeling moment caused by external forces.
The shape of the righting lever curve provides important information about the ship’s stability. Key points on the curve include:
Initial Stability: At small angles of heel, the righting lever curve shows a positive slope, indicating that the ship has a righting moment that increases as the angle of heel increases. This initial positive slope signifies the ship’s initial stability.
Maximum Righting Lever: The point on the curve where the righting lever is at its maximum represents the maximum righting moment that the ship can generate. This point corresponds to the angle of heel at which the ship reaches its maximum stability.
Angle of Vanishing Stability: Beyond a certain angle of heel, the righting lever curve starts to decline, indicating a decrease in the righting moment. The angle at which the righting lever becomes zero or negative is known as the angle of vanishing stability or the angle of capsizing. It represents the point at which the ship becomes highly unstable and prone to capsizing.
-
Static Trim Moment:
The static trim moment of a ship refers to the moment created by a change in the ship’s draft or trim, resulting from a shift in weight or cargo distribution. It measures the force acting on the ship to bring it back to its desired trim condition.
The formula to calculate the static trim moment is:
Static   Trim   Moment = W KG
where:
W represents the weight of the ship or the total mass of the vessel, including cargo, fuel, ballast, equipment, and other components.
∆KG is the change in the vertical distance between the center of gravity (G) and the keel (K) of the ship due to a change in draft or trim.
The static trim moment reflects the tendency of the ship to return to a balanced trim condition when it is disturbed. If the static trim moment is positive, it means that the ship will experience a moment that tends to restore its trim to its original condition. Conversely, a negative static trim moment indicates that the ship will tend to maintain or further deviate from its existing trim.
-
Neutral Buoyancy Condition:
The neutral buoyancy condition of a ship refers to the state where the ship is in equilibrium, with the forces of buoyancy and weight balanced, resulting in no vertical acceleration or inclination. In this condition, the ship neither sinks nor rises in the water.
To achieve the neutral buoyancy condition, two primary factors need to be considered:
Center of Gravity (CG): The center of gravity is the point at which the entire weight of the ship can be considered to act vertically downward. It is determined by the distribution of the ship’s weight, including cargo, fuel, ballast, equipment, and other components.
Center of Buoyancy (CB): The center of buoyancy is the point at which the buoyant force acts vertically upward on the ship. It depends on the shape and volume of the underwater portion of the ship’s hull and is typically located at the geometric center of the underwater volume.
In the neutral buoyancy condition, the center of gravity and the center of buoyancy are aligned vertically, and their vertical forces balance each other out. This alignment ensures that there is no heeling moment or vertical acceleration acting on the ship.

2.6. Simulation in MATLAB/Simulink

A ship steering system applying ANFIS has the basic structure shown in the block diagram (Figure 8) below.
Trajectory Generator Block: the system generates cruise data with the input of weather data and information about the position and direction of the ship from the navigation system (Navigation System). The trip data of this block are input to the Main Control System. The controller unit will use data from the Trajectory Generator Block and the Navigation System Block such as current position, direction, and cruise data to generate commands for the steering unit and the propulsion system. The ANFIS block is responsible for reducing errors, making the control signal more accurate, and responding faster. Ship Block: The ship’s propulsion system and the ship’s steering system. Environmental Condition: The signal of the environment affecting the ship. Block Navigation System: The navigation system of the ship. The output in the ANFIS controller is the rudder angle of the ship, and the main input is the error of the set value and the error speed.
Figure 9 simulates the controller and ship dynamic 6DOF using MATLAB/Simulink based on the block diagram of the basic structure of the system.
The simulation in MATLAB/Simulink [41] includes the ship dynamics simulation, environmental impacts, the ship steering system, and the ANFIS [42,43,44] controller. In this simulation, we simulated the process of converting from a set signal and then converted by body rate and Euler rate with the ANFIS controller to the navigation angle of the ship. The controller is responsible for adjusting the ship’s direction to be closest to the set trajectory. The feedback signals in Figure 8 and Figure 9 indicate the feedback regarding the position coordinates of the ship. They reveal information about the deviation of the ship’s bow and the incorrect heading, prompting the controller to adjust the input signals in order to bring the ship back on track with the intended trajectory.
Working principle: first, set the initial values of angle and position, then the signal is sent to the controller as a set signal (controller input signal) through the variable controller. Convert the set signals into control signals such as rotation angle, position, and angular velocity, and then send the signal to the ANFIS. In the ANFIS unit, signals are learned and improved based on the trained learning data set required by the operator, then the signals are sent to the ship’s impact along with environmental influences. From here, signals are sent to the steering gear of the coordinate system used to steer and correct the course of the ship. Finally, the feedback signal is sent back to the controller to transform and learn at the ANFIS controller to have a controller that works correctly and suppresses noise.

3. Results and Discussion

The experiment was tested many times with real ships and model ship data [45]. The obtained results were found to be similar, and the simulation in the article chose a simulation model. The simulation data were taken at an approximately 1:2 scale of model ship RIB 760 of QuingDao HaoHai Boat Co., Ltd., Qingdao, Shandong, China.
Table 2 shows the parameters of the test ship model. It simplified the data in the simulation in the form of a model to match the experiment of the controlled evaluation study. In reality, there may be more complex data and more influencing factors.
In this study, the manual method was employed to select the PID coefficients. The following steps were taken:
  • Determine the control objective: The control objective in this research is to control the direction of movement.
  • Determine the Kp coefficient: Starting with the proportional coefficient, Kp, set an initial value of Kp to 0 and gradually increase it until the system achieves a stable response. If the system responds slowly or is unstable, increase Kp. If the system exhibits excessive oscillations or an overly aggressive response, decrease Kp. The authors found the optimal proportional coefficient to be 1.43.
  • Determine the Ki coefficient: After determining Kp, determine the integral coefficient, Ki. Begin with an initial value of Ki set to 0 and gradually increase it until the system achieves a stable response and minimizes the error between the output value and the desired value. In this article, a very small value of 0.00001 was chosen for the integral coefficient.
  • Determine the Kd coefficient: Finally, determine the derivative coefficient, Kd. Start with an initial value of Kd set to 0 and gradually increase it until the system achieves a stable response and minimizes oscillations or waveform distortions in the response. The desired response required a Kd coefficient of 0.25.
  • Testing and adjustment: After determining the Kp, Ki, and Kd coefficients, test the system to ensure that it meets the control requirements. Make adjustments to the coefficient values and retest until the best performance is achieved for the ship.
Therefore, the parameters of the PID controller sought to meet the purpose of ship control are P = 1.43, I = 0.00001, and D = 0.25.
The simulation was performed with two controllers, PID and ANFIS, to compare the results [46,47,48,49,50,51].
Figure 10 and Figure 11 demonstrate that the ANFIS controller exhibits significantly greater stability compared to the PID controller. It is evident that both the position and angle exhibit smaller variations and are closer to the stability line. Based on these observations, it can be concluded that the ANFIS controller is more effective in maintaining the ship’s direction. Regardless of external factors such as wind, waves, and water flow, the ANFIS controller consistently demonstrates superior noise suppression capabilities compared to the PID controller. This stability, as indicated by the obtained results, positions the ANFIS controller as a favorable choice for ensuring stable ship control. To further assess its efficiency, the authors conducted simulations and evaluated the results based on speed parameters, which are presented below.
In Figure 12 (vehicle speed along spatial axes) it is easy to see that the characteristic curves represent a larger amplitude speed and a shorter and more stable period representing a more highly responsive controller than the traditional PID controller. Similarly, Figure 12 and Figure 13 (the angular velocity of the ship in spatial coordinate axes) show that the speed response of the ANFIS controller is more efficient than the speed response of the PID controller. The speed controlled by the ANFIS controller has a larger amplitude than the speed controlled by the PID controller. This results in a faster response to noise and bias. From there, it can be seen that the ANFIS controller helps the ship to follow the trajectory better than the PID controller.
Since the input signal of the position and rotation angle set by the author is set, input = asin(0) + b is a straight line. When evaluating the stability, the initial amplitude, frequency, and phase angle of the input signal are evaluated, and the difference in the amplitude of the signal is compared to the set signal. From there, it can be seen that the signal of the ANFIS is more stable than that of the PID controller. In the simulation, the authors suppose that the input signal of position and rotation are sin (0). Figure 10a shows that for the ANFIS controller, the peak of the smallest error approximates 0, and the peak of the largest error is around 0.8. The cycle from the peak of the smallest error to the peak of the largest error and back to the peak of the smallest error again is approximately 150 s. On the other hand, for the PID controller, the peak of the smallest error is close to zero, and the peak value of the largest error is approximately 1.5. The cycle for the error to reach a steady state again is 150 s. In Figure 10b, the ANFIS controller has a minimum peak that is close to zero and a maximum peak of about 0.45. It runs along a straight line with zero slope. As for the PID controller, the minimum amplitude of the error is 0.1, while the maximum amplitude is approximately 0.8. In Figure 10c, the ANFIS controller has a minimum peak error of around 0.1 and a maximum peak error of 1. On the other hand, the PID controller has a minimum peak error of about 0.1 and a maximum peak error of 1.5. It is evident that the difference in error between the ANFIS controller and the input signal is smaller compared to the PID controller. Similarly, in Figure 11, it can be observed that the difference in the peak amplitude of the error for the PID controller compared to the setpoint signal is greater than that of the ANFIS controller. Hence, it can be concluded that the ANFIS controller provides better stability compared to the PID controller.
In order to verify the reliability of the controller, the authors conducted an additional simulation. This time, they simulated a single scenario that closely resembled the conditions of a real ship. The parameters used in the simulation were as follows: ship mass (m) = 10,000 kg, ship length (L) = 20 m, vessel width (B) = 5 m, and vessel depth (D) = 2 m. The initial velocity (v0) is 5 m/s, the initial rotation angle (psi0) is 0, the initial coordinates are (0,0), and the target destination coordinates are (1000, 500) operating under the influence of mild noise.
In Figure 14, under the influence of mild noise, it is easy to observe that when both controllers are operating, the ANFIS controller closely matches the desired signal, while the PID controller may have some minor deviations, but they are not significant.
Regarding the speed signal [42], the adaptability and fast response of the ANFIS controller can be seen. In both angular speed and speed, the response processing of the always-feedback speed of the ANFIS controller is higher than that of the PID controller.
According to the results obtained after simulation, it can be seen that the signals of waves, wind, and groundwater caused by the environment have been quickly suppressed thanks to the self-learning feature of the neural network and the fuzzy logic controller’s ability to argue so that the ship can operate more stably. However, there are some features worth discussing, such as:
Although the learning process is smart, it is still necessary to monitor whether or not it is going in the right direction needed for the problem.
Training time and computing resources are enormous, possibly up to several tens of gigabytes.
The research direction in this paper is an open direction that can study the mentioned issues more deeply for experimental verification and hope to get better results in the future.
Let us further examine the ANFIS controller when controlling a different object, as discussed in [35]. It can be observed that the controller’s quality is similar for both objects, despite their differences. The intelligent controller, which combines a neural network and fuzzy logic control, is effective in eliminating noise and has a fast response. This controller enhances the tracking performance of the ship trajectory, in particular, and the control of other objects in general, making it stronger and more accurate than the PID controller.
To be able to see the effectiveness of the controller proposed in this study more clearly, compare it with some typical papers on ship control when applying fuzzy controllers [37,38,39,40]. In the standard articles in the above discussion of ship control using fuzzy controllers, an ANFIS (Adaptive Neuro-Fuzzy Inference System) controller is not normally used. However, the advantages and disadvantages of a fuzzy controller with an ANFIS controller can be compared as follows:
Advantages of a fuzzy controller:
-
Simple and easy to deploy.
-
Ability to handle nonlinear systems.
-
Ability to handle noise and uncertainty.
-
The ability to interact between input variables in a sensitive way.
Disadvantages of a fuzzy controller:
-
It is necessary to design the fuzzy rules correctly to achieve the best performance.
-
Difficulty in accurately evaluating the parameters of the fuzzy controller.
-
The performance of the fuzzy controller can be reduced in the case of a complex nonlinear system.
Advantages of an ANFIS controller:
-
Ability to combine neural networks and fuzzy set systems.
-
Ability to learn and self-adjust the model’s parameters automatically.
-
Ability to handle complex nonlinear systems.
Disadvantages of ANFIS controller:
-
Requires a large amount of training data to achieve good results.
-
Difficulty in understanding and explaining the learning process of the ANFIS model.
-
Learning speed may be slower than other deep learning models.
In summary, both methods have their own pros and cons, but the ANFIS controller is normally more capable of handling complex nonlinear systems and automating the fine-tuning of the parameters than the fuzzy controller.
The ANFIS controller is an effective solution for ship control, providing stability and accuracy in maintaining the ship’s trajectory. The combination of an adaptive neural network and a fuzzy logic system in this controller enables the efficient handling of complex and uncertain factors in the ship control environment. Additionally, the learning and adjustment capabilities of the ANFIS controller enhance the flexibility and overall performance of the ship. Discussing the application and optimization of the ANFIS controller for ships holds great promise and potential in this field.

4. Conclusions

The ANFIS (Adaptive Neuro-Fuzzy Inference System) controller is a methodology that integrates artificial neural networks and fuzzy inference systems to address intricate challenges, primarily within the domain of automatic control in uncertain environments. The research initiative for employing the ANFIS controller in ship applications can be established upon the following principles:
-
Controlling a ship in a maritime environment is a multifaceted predicament necessitating the utilization of intelligent techniques and machine learning to facilitate optimal decision-making.
-
The ANFIS controller can be utilized to acquire control rules from input data encompassing parameters such as speed, direction, wave state, and weather conditions. These rules will enable more precise and efficient ship control.
-
The identification and collection of input and output parameters for the ANFIS controller should be performed from ship sensors and devices, including GPS positioning systems, accelerometer sensors, Kalman filters, as well as pressure and temperature sensors.
-
To ensure the stability and dependability of the ANFIS control system, it is imperative to test and evaluate parameters such as accuracy, response speed, and system stability.
-
Ultimately, the research initiative for the ANFIS controller in ship applications should be practically applied and validated to assess the efficacy and accuracy of the control system. These outcomes can be juxtaposed with traditional control systems to evaluate the innovation and breakthroughs achieved through this research initiative.
In the article, the authors have designed an autopilot system for ships using the neural–fuzzy method, and the experimental results obtained were compared with the classical PID method. The results show that:
  • The ANFIS controller with selected learning rules and weights of the learning process helps the ship to move in the preset direction in a short time and without oscillation. Furthermore, the system also responds quickly, reacting to external influences such as waves, wind, and currents to help the ship quickly return to the preset direction, moving more stably and optimally.
  • In terms of rudder responses to abrupt changes, testing shows that the rudder wobbles less and the quick response helps the ship maintain the desired course and consumes less energy, and these things present advantages over conventional PID controllers.

Author Contributions

D.-A.P.: formal analysis, software, resources, data curation, writing—original draft preparation, data collection and analysis, visualization; S.-H.H.; supervision, project administration, writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

Following are results of a study on the “Leaders in industry-university Cooperation 3.0” Project, supported by the Ministry of Education and National Research Foundation of Korea.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Do, K.D.; Pan, J. Control of Ships and Underwater Vehicles: Design for Underactuated and Nonlinear Marine Systems; Springer: London, UK, 2009; Volume 1. [Google Scholar]
  2. Perez, T.; Blanke, M. DCMV a Matlab/Simulink Toolbox for Dynamic and Control off marine vehicles. In IFAC Manocuvring and Control of Marine Craft; Elsevier: Amsterdam, The Netherlands, 2003. [Google Scholar]
  3. Akbari, M.; Asadi, P.; Aliha, M.R.M.; Berto, F. Modeling and Optimization of Process Parameters of the Piston Alloy-Based Composite Produced by Fsp Using Response Surface Methodology. Surf. Rev. Lett. 2023, 30, 2350041. [Google Scholar] [CrossRef]
  4. Van Amerongen, J.; Ten Cate, A.U. Model Reference Adaptive Autopilot for Ship. Automatica 1975, 11, 441–449. [Google Scholar] [CrossRef]
  5. Mohd, N.; Wan, N.; Mamat, M. Ship manoeuvring assessment by using numerical simulation approach. J. Appl. Sci. Res. 2012, 8, 1787–1796. [Google Scholar]
  6. Kallstrom, C.G. Identification and Adaptive Control Applied to Ship Steering. Ph.D. Thesis, Department of Automatic Control, Lund Institute of Technology, Lund, Sweden, 1970. [Google Scholar]
  7. Vo, D.D.; Pham, V.A.; Nguyen, P.H.; Nguyen, D.A. Designing a PID Controller for Ship Autopilot System. In AETA 2018—Recent Advances in Electrical Engineering and Related Sciences: Theory and Application; Springer International Publishing: Cham, Switzerland, 2018; pp. 618–627. [Google Scholar]
  8. Yu, F. Adaptive Fuzzy Design of Ship’s Autopilot with Input Saturation. In Proceedings of the International Conference on Information Technology and Applications, Chengdu, China, 16–17 November 2013. [Google Scholar]
  9. Jung, Y.-C. A Study on the Automatic Ship Control Based on Adaptive Neural Networks. Ph.D. Thesis, Korea Maritime University, Busan, Republic of Korea, 2007. [Google Scholar]
  10. Heo, J.; Chwa, D. Robust Tracking Control using Integral Sliding Mode Observer for Quadrotors Considering Motor and Propeller Dynamics and Disturbances. J. Electr. Eng. Technol. 2021, 16, 3247–3260. [Google Scholar] [CrossRef]
  11. Zhang, X.K.; Jin, Y.C.; Guo, G. ANFIS Applied to a Ship Autopilot Design. In Proceedings of the 2006 International Conference on Machine Learning and Cybernetics, Dalian, China, 13–16 August 2006; pp. 2233–2236. [Google Scholar] [CrossRef]
  12. Lee, S.D.; Tzeng, C.Y.; Huang, W.W. Ship Steering Autopilot Based on ANFIS Framework and Conditional Tuning Scheme. Mar. Eng. Front. (MEF) 2013, 1, 53–62. [Google Scholar]
  13. Sutton, R.; Taylor, S.; Roberts, G. Neuro-Fuzzy Techniques Applied to a Ship Autopilot Design. J. Navig. 1996, 49, 410–430. [Google Scholar] [CrossRef]
  14. Alessandri, A.; Donnarumma, S.; Vignolo, S.; Figari, M.; Martelli, M.; Chiti, R.; Sebastiani, L. System control design of autopilot and speed pilot for a patrol vessel by using LMIs. In Proceedings of the 16th International Congress of the International Maritime Association of the Mediterranean (IMAM 2015), Pula, Croatia, 21–24 September 2015. [Google Scholar]
  15. Akbari, M.; Rahimi Asiabaraki, H. Modeling and optimization of tool parameters in Friction Stir Lap Joining of Aluminum using RSM and NSGA II. Weld. Int. 2023, 37, 1–13. [Google Scholar] [CrossRef]
  16. Pérez, T.; Blanke, M. Mathematical Ship Modelling for Control Applications; Ørsted-DTU, Automation: Lyngby, Denmark, 2002. [Google Scholar]
  17. Fossen, T.I. A nonlinear unified state-space model for ship maneuvering and control in a seaway. Int. J. Bifurc. Chaos 2005, 15, 2717–2746. [Google Scholar] [CrossRef]
  18. Fossen, T.I. Marine Control Systems—Guidance, Navigation and Control of Ships, Rigs and Underwater Vehicles, 3rd ed.; Marine Cybernetics: Tiller, Norway, 2002. [Google Scholar]
  19. Fu, H.H.; Li, Z.J.; Li, G.W.; Jin, X.T.; Zhu, P.H. Modeling and controlling of engineering ship based on genetic algorithm. In Proceedings of the International Conference on Modelling, Identification and Control, Wuhan, China, 24–26 June 2012; IEEE: Piscataway, NJ, USA, 2012. [Google Scholar]
  20. Fossen, T.I. Guidance and Control of Ocean Vehicles. Ph.D. Thesis, University of Trondheim, Trondheim, Norway, 1999. [Google Scholar]
  21. Lauvdal, T.; Fossen, T.I. Rudder roll stabilization of ships subject to input rate saturation using a gain scheduled control law. IFAC Proc. Vol. 1998, 31, 111–116. [Google Scholar] [CrossRef]
  22. Perez, T. Ship Motion Control: Course Keeping and Roll Stabilisation Using Rudder and Fins; Springer Science & Business Media: New York, NY, USA, 2006. [Google Scholar]
  23. Holden, C. Model Ingand Control of Parametric Roll Resonance. Ph.D. Thesis, Norwegian University of Science and Technology, Trondheim, Norway, 2011. [Google Scholar]
  24. Gite, A.V.; Bodade, R.M.; Raut, B.M. ANFIS Controller And Its Application. Int. J. Eng. Res. Technol. (IJERT) 2013, 2, 1–5. [Google Scholar]
  25. Lin, C.T.; Lee, C.S.G. Neural Fuzzy Systems: A Neural Fuzzy Synergism to Intelligent Systems; Prentice Hall: Hoboken, NJ, USA, 1996. [Google Scholar]
  26. Zadeh, L.A. Fuzzy Logic, Neural Networks, and Soft Computing; LOTFI A. ZADEH, NASA Grant NCC 2-275, EPRI Agreement RP 8010-34, MICRO State Program No. 90-191 and the BISC (Berkeley Initiative in Soft Computing) Program; World Scientific: Singapore, 1996. [Google Scholar]
  27. Lin, C.T. A neural fuzzy control system with structure and parameter learning. Fuzzy Sets Syst. 1995, 70, 183–212. [Google Scholar] [CrossRef]
  28. Seng, T.L.; Khalid, M.B.; Yusof, R. Tuning of a neural fuzzy controller by genetic algorithm. Econ. Reliab. Rates IEEE Trans. Syst. Man Cybern. Part B (Cybern.) 1999, 29, 226–236. [Google Scholar] [CrossRef] [PubMed]
  29. Zadeh, L.A.; Aliev, R.A. Chapter 16: Adaptive Neuro-Fuzzy Inference Systems (ANFISs). In Fuzzy Logic Theory and Applications; World Scientific: Singapore, 2018; pp. 453–493. [Google Scholar]
  30. Zhang, Y.; Liu, Y. Guidance-Based Path Following of an Underactuated Ship Based on Event-Triggered Sliding Mode Control. J. Mar. Sci. Eng. 2022, 10, 1780. [Google Scholar] [CrossRef]
  31. Liu, K.; Wang, Y.; Wu, Z.; Pi, J.; Gho, W.M.; Zhou, B. Numerical Simulation on Dynamic Characteristics of Longitudinal Launching of Large Container Ships. J. Mar. Sci. Eng. 2022, 10, 1583. [Google Scholar] [CrossRef]
  32. Shao, Z.; Lyu, H.; Yin, Y.; Cheng, T.; Gao, X.; Zhang, W.; Jing, Q.; Zhao, Y.; Zhang, L. Multi-Scale Object Detection Model for Autonomous Ship Navigation in Maritime Environment. J. Mar. Sci. Eng. 2022, 10, 1783. [Google Scholar] [CrossRef]
  33. Song, X.; Liu, W.; Zhang, G. Research on Structural Response Characteristics of Trapezoidal Floating Body in Waves. J. Mar. Sci. Eng. 2022, 10, 1756. [Google Scholar] [CrossRef]
  34. Fang, M.C.; Lin, Y.H.; Wang, B.J. Applying the PD controller on the roll reduction and track keeping for the ship advancing in waves. Ocean Eng. 2012, 54, 13–25. [Google Scholar] [CrossRef]
  35. Liu, Y.; Liu, J.; Wang, Q.G.; Yu, J. Adaptive Command Filtered Backstepping Tracking Control for AUVs Considering Model Uncertainties and Input Saturation. IEEE Trans. Circuits Syst. II Express Briefs 2022, 70, 1475–1479. [Google Scholar] [CrossRef]
  36. Qin, J.; Du, J. Minimum-learning-parameter-based adaptive finite-time trajectory tracking event-triggered control for underactuated surface vessels with parametric uncertainties. Ocean Eng. 2023, 271, 113634. [Google Scholar] [CrossRef]
  37. The MathWorks, Inc. Fuzzy Logic Toolbox™ User’s Guide; Version 2.2.24 (Release 2016b); MathWorks: Natick, MA, USA, 2016. [Google Scholar]
  38. Truong, N.T.; Seo, T.I.; Nguyen, S.D. Bearing Fault Online Identification Based on ANFIS. Int. J. Control Autom. Syst. 2021, 19, 1703–1714. [Google Scholar] [CrossRef]
  39. Pham, D.-A.; Han, S.-H. Design of Combined Neural Network and Fuzzy Logic Controller for Marine Rescue Drone Trajectory-Tracking. J. Mar. Sci. Eng. 2022, 10, 1716. [Google Scholar] [CrossRef]
  40. Naresh, C.; Bose, P.S.C.; Rao, C.S.P. Artificial neural networks and adaptive neuro-fuzzy models for predicting WEDM machining responses of Nitinol alloy: Comparative study. SN Appl. Sci. 2020, 2, 314. [Google Scholar] [CrossRef] [Green Version]
  41. Nguyen, V.S.; Im, N.K. Automatic ship berthing based on fuzzy logic. Int. J. Fuzzy Log. Intell. Syst. 2019, 19, 163–171. [Google Scholar] [CrossRef] [Green Version]
  42. Dang, X.K.; Do, V.D.; Nguyen, X.P. Robust adaptive fuzzy control using genetic algorithm for dynamic positioning system. IEEE Access 2020, 8, 222077–222092. [Google Scholar] [CrossRef]
  43. Yang, Y.; Zhou, C.; Ren, J. Model reference adaptive robust fuzzy control for ship steering autopilot with uncertain nonlinear systems. Appl. Soft Comput. 2003, 3, 305–316. [Google Scholar] [CrossRef]
  44. van den Bremer, T.S.; Breivik, Ø. Stokes drift. Philos. Trans. R. Soc. A Math. Phys. Eng. Sci. 2018, 376, 20170104. [Google Scholar] [CrossRef] [Green Version]
  45. Roberts, P.H.; Glatzmaier, G.A. Geodynamo theory and simulations. Rev. Mod. Phys. 2000, 72, 1081. [Google Scholar] [CrossRef]
  46. Ueng, S.K.; Lin, D.; Liu, C.H. A ship motion simulation system. Virtual Real. 2008, 12, 65–76. [Google Scholar] [CrossRef]
  47. Ky, Q.P.; Anh, V.O.T.; Đăng, K.P.N.; Văn, C.N.; Lê Đức, B. Tính toán mô phỏng lực tác động lên tàu thủy ở chế độ đầy tải và không tải khi thay đổi tốc độ dòng chảy bao. Tạp Chí Khoa Học Công Nghệ Hàng Hải 2022, 72, 9–14. [Google Scholar]
  48. Liu, J.; Wang, Q.G.; Yu, J. Convex Optimization-based Adaptive Fuzzy Control for Uncertain Nonlinear Systems with Input Saturation using Command Filtered Backstepping. IEEE Trans. Fuzzy Syst. 2022, 31, 2086–2091. [Google Scholar] [CrossRef]
  49. Rezazadegan, F.; Shojaei, K.; Sheikholeslam, F.; Chatraei, A. A novel approach to 6-DOF adaptive trajectory tracking control of an AUV in the presence of parameter uncertainties. Ocean Eng. 2015, 107, 246–258. [Google Scholar] [CrossRef]
  50. Shojaei, K.; Dolatshahi, M. Line-of-sight target tracking control of underactuated autonomous underwater vehicles. Ocean Eng. 2017, 133, 244–252. [Google Scholar] [CrossRef]
  51. Qin, J.; Du, J.; Li, J. Adaptive finite-time trajectory tracking event-triggered control scheme for underactuated surface vessels subject to input saturation. IEEE Trans. Intell. Transp. Syst. 2023, 1–11. [Google Scholar] [CrossRef]
Figure 1. Autopilot system.
Figure 1. Autopilot system.
Jmse 11 01262 g001
Figure 2. The ship’s coordinate system.
Figure 2. The ship’s coordinate system.
Jmse 11 01262 g002
Figure 3. Description of rudder and flow relative angle.
Figure 3. Description of rudder and flow relative angle.
Jmse 11 01262 g003
Figure 4. Structure of the ANFIS controller.
Figure 4. Structure of the ANFIS controller.
Jmse 11 01262 g004
Figure 5. Membership function distributions of input variables and output variables.
Figure 5. Membership function distributions of input variables and output variables.
Jmse 11 01262 g005
Figure 6. Flow chart for the applied ANFIS method.
Figure 6. Flow chart for the applied ANFIS method.
Jmse 11 01262 g006
Figure 7. Signal noise acting on the ship when operating.
Figure 7. Signal noise acting on the ship when operating.
Jmse 11 01262 g007
Figure 8. Basic components of a steering system using the ANFIS controller [37,38,39,40].
Figure 8. Basic components of a steering system using the ANFIS controller [37,38,39,40].
Jmse 11 01262 g008
Figure 9. Simulation of the ANFIS controller controlling the ship’s course using MATLAB/Simulink.
Figure 9. Simulation of the ANFIS controller controlling the ship’s course using MATLAB/Simulink.
Jmse 11 01262 g009
Figure 10. Comparing the position error control of two PID controllers and ANFIS controllers. (a) X position error; (b) Y position error; (c) Z position error.
Figure 10. Comparing the position error control of two PID controllers and ANFIS controllers. (a) X position error; (b) Y position error; (c) Z position error.
Jmse 11 01262 g010
Figure 11. Comparing the control of the rotation angle error of two PID controllers and ANFIS controllers. (a) Roll rotation error; (b) pitch rotation error; (c) yaw rotation error.
Figure 11. Comparing the control of the rotation angle error of two PID controllers and ANFIS controllers. (a) Roll rotation error; (b) pitch rotation error; (c) yaw rotation error.
Jmse 11 01262 g011
Figure 12. Comparing the control of velocity of two PID controllers and ANFIS controllers. (a) u velocity (x-axis); (b) v velocity (y-axis); (c) w velocity (z-axis).
Figure 12. Comparing the control of velocity of two PID controllers and ANFIS controllers. (a) u velocity (x-axis); (b) v velocity (y-axis); (c) w velocity (z-axis).
Jmse 11 01262 g012
Figure 13. Comparing the control of rotational velocity of two PID controllers and ANFIS controllers. (a) p rotational velocity (x-axis).; (b) q rotational velocity (y-axis).; (c) r rotational velocity (z-axis).
Figure 13. Comparing the control of rotational velocity of two PID controllers and ANFIS controllers. (a) p rotational velocity (x-axis).; (b) q rotational velocity (y-axis).; (c) r rotational velocity (z-axis).
Jmse 11 01262 g013
Figure 14. Comparing the control of rotational velocity of two PID controllers and ANFIS controllers. (a) PID controller; (b) ANFIS controller.
Figure 14. Comparing the control of rotational velocity of two PID controllers and ANFIS controllers. (a) PID controller; (b) ANFIS controller.
Jmse 11 01262 g014
Table 1. Motion components and kinematic parameters of ships.
Table 1. Motion components and kinematic parameters of ships.
Numerical OrderMain MovementKinetic Parameter
PositionSpeech
NameSymbolNameSymbol
1Vertical Slide—Surge
(Move along the X-axis)
Vertical displacement
(reciprocating motion)
x0Vertical movement speedu
2Vertical Slide—Heave
(Z-axis Movement)
Vertical displacement
(sink)
z0Vertical displacement speedw
3Sideslip—Sway
(Move along the Y-axis)
Horizontal deviationy0Horizontal movement speedv
4Horizontal Shake—Roll
(Around X-axis)
Horizontal shake angleϕAngular velocity of the horizontalp
5Vertical Shake—Pitch
(Around Y-axis)
Vertical shake angleθVertical angular velocityq
6Return Shake—Yaw
(Around Z axis)
Steering angleψAngular speed of rotationr
Table 2. Ship simulation parameter.
Table 2. Ship simulation parameter.
ParameterAmountUnit
Length188cm
Height18cm
Width22cm
Mass1.5kg
Nitro engine4.6–7.5cc
Motor size40–42mm
Lipo battery4–6S
Steering wheel length16cm
Main motor voltage12V
Viscosity of seawater0.8~1.5 N s / m 2 × 10 3
Wave period20~40s
Wind speed1~5m/s
Engine speed2500rpm
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Pham, D.-A.; Han, S.-H. Designing a Ship Autopilot System for Operation in a Disturbed Environment Using the Adaptive Neural Fuzzy Inference System. J. Mar. Sci. Eng. 2023, 11, 1262. https://doi.org/10.3390/jmse11071262

AMA Style

Pham D-A, Han S-H. Designing a Ship Autopilot System for Operation in a Disturbed Environment Using the Adaptive Neural Fuzzy Inference System. Journal of Marine Science and Engineering. 2023; 11(7):1262. https://doi.org/10.3390/jmse11071262

Chicago/Turabian Style

Pham, Duc-Anh, and Seung-Hun Han. 2023. "Designing a Ship Autopilot System for Operation in a Disturbed Environment Using the Adaptive Neural Fuzzy Inference System" Journal of Marine Science and Engineering 11, no. 7: 1262. https://doi.org/10.3390/jmse11071262

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop