Abstract
The authors continued their research on the development of an intelligent automatic ships pilot containing a controller based on fuzzy logic. Its features are determined by the optimizer based on a genetic algorithm. It also contains a modular unit of neural network models of ship navigation paths, as well as a neural network classifier. This paper is devoted to the description of a neural network classifier designed to classify the movement patterns of marine vessels to identify the peculiarities of the ship depending on its type and sailing conditions. The introduction of such classifier to an autopilot allows for more precise consideration of multivariate and difficult to formalize factors affecting the vessel while operating, such as varying weather conditions, irregular waves, hydrodynamic characteristics of the vessel, draft, water under the keel, rate of the vessel sailing, etc. The article outlines the technique concerning the development of a neural network classifier and the results of its computer modelling on the example of a refrigerated transport vessel type. The authors used such methods for obtaining and processing findings as spectral estimation, machine learning methods, in particular, neural network technology and computer or simulation modelling.
Introduction
The necessity to provide the safe navigation due to ever-increasing shipping activity, rising fuel prices for ship drives, enhancing the environmental issues of the maritime fleet maintenance, super ship and high-speed shipbuilding, an adequate ship control –all these elements require add-ins of automated navigation processes. The enhancement of automation will reduce the running time wastes, cut transport costs, reduce the number of crews, increase the equipment reliability, quality of operation management, and therefore, it is the most effective means of improving the performance of vessel characteristics and seafarers’ working conditions. Moreover, it is necessary to have an adaptive autopilot that adjusts the system parameters best of all for the automated solution of many navigation problems concerning ship collision avoidance actions when it is necessary to make certain maneuvers, when keeping the given ship course, or moving along any required sea path with forecasting of a possible consequence, etc. Such an adaptive autopilot should correct mathematical models of the ship and the outside forces that affect the ship at the moment.
A sea vessel as a controlled object is supposed to be a very complicated craft to construct a mathematical model [1]. A rigorous solution of the problem of ship movement control, which provides a synthesis of real-time control and a given quality in general, cannot be obtained through present day systems used for the automated ship course control with a traditional proportional –integral –derivative (PID) controller and the methods used to configure it. This results from the fact that during the system operation, parameters and external effects change randomly and over a broad range (wind strength and direction, wave height and wavelength, hydrodynamic characteristics of the vessel, draft, water under the keel, vessel speed, etc.).
Intelligent automatic pilots are developed as adaptive systems in order to enhance the capability to fulfill more complicated tasks in an uncertain environment with partial information available when solving a great number of ship navigation problems. Intelligent autopilots are considered to denote the autopilots using the mathematical apparatus of the theory of artificial intelligence systems, including machine learning (most often theories of artificial neural networks (NN) or genetic algorithms), systems based on fuzzy logic, or their combination, as such type of systems can better run the processes with complex, and difficult mathematical models to be formalized in various settings (non-stationary, nonlinear, with accidental external influences, etc.).
It is reasonable to use autopilots based on ma-chine learning algorithms as an intelligent autopilot due to a number of advantages over the standard autopilot, among them are proportional –derivative (PD) and PID autopilot systems [2, 3]: the ability to accomplish distributed patterns performing computations, which allows one to manage multivariate processes and systems without much time increment required to calculations to be done; the possibility of non-analytic representation of nonlinear controlled objects and descriptions of processes characterized by non-uniqueness /ambiguity and a large number of very diverse perturbance effect; the ability of autopilot parameters to self-organize to the best values, which makes it possible to do away with the need for entering of manual adjustments of autopilot parameters when the operation mode of the object changes; the robustness property of the system, i.e., when its asymptotical stability is provided within the acceptance range of parametrical perturbation; the possibility of practical implementation using modern hardware components; the ability to integrate individual data to define the patterns of the process of management.
At present, autopilot systems using machine learning algorithms capable of programming by examples, for instance, neural networks [4–7] are distinctively developing.
Numerous field or semi-field tests performed serve as a source of forming training samples for such algorithms. Many advantages are attributed to neural networks such as a simultaneous data processing mechanism/ machinery, the ability to predict input information changes, maintaining fault tolerance when neural network elements and connections partially fail, absolute and rapid convergence to one of the stable states influenced by an input signal entering the basin of attraction of this state, etc.
The disadvantage of neural networks is that they are not universal. Therefore, it is necessary to create a new internal system design mostly in order to reprogram a neural network to solve a new problem. However, such an increasing specialization of neural networks is compensated for their learning ability: the neural network acquires the ability to perform nearly all data transform with appropriate training.
Neural networks can be used in several ways for controlling a sea vessel: During the front-line development of the intelligent autopilots. When designing a tuner for the coefficients of a conventional, for example, a proportional plus integral plus derivative autopilot. When forming a neural network model of marine vessel traffic.
For example, in paper [8], the authors suggest a model of a neural network autopilot where an autopilot is a data computing system containing an information-analytical unit for forecasting and target-course generation control unit in its structure. Prediction is made using neural networks, such as neural networks with feed forward and backpropagation, simple recurrent neural networks and neural networks with radial basis activation functions.
In paper [9], the authors suggest an intelligent transportation control system where a regulator based on a wavelet neural network is used as a regulator. The suggested control system consists of a neural controller and an auxiliary compensation controller. Such operation strategies related to trajectory tracking have proven to be good especially in the following surveys [10, 11].
The positioning of an oil tanker-type vessel on heading is successfully kept using the regulator based on the Adaptive neural fuzzy interference system (ANFIS), as shown in paper [12].
The authors emphasize that for nonlinear and uncertain ship motion, ANFIS course keeping controller is designed to deal with the difficulty of parameters adjustment. The hybrid model of the intelligent autopilot, containing a Bang-Bang controller and a fuzzy artificial neural network controller, is observed in paper [13]. It also presents the results of a comparative analysis of the proposed autopilot, the one based on the fuzzy set theory, and the approach proposed has good control performance.
The intelligent approaches have been successfully applied to control air [14, 15] and submarine crafts [16]. In the studies [14, 15], the authors describe a powerful control mechanism for unmanned aerial vehicles/ unmanned drones based on a universal developing neuro-fuzzy controller and compare it with a standard PID regulator. In the study [16], the authors describe an approach to arrange multivariable control of an untethered submersible based on the adaptive structure of a neural network.
The authors of paper [17], who use density algorithm of spatial clustering algorithm with noise, devote it to solving the problem of predicting the marine vessel path using an artificial neural network. The survey [18] is devoted to a ship path tracking as well as predicting the ship behavior by the feedforward predicting model.
In addition to neural network technologies, machine learning algorithms such as genetic algorithms providing reinforcement learning can also be used [19]. Genetic algorithms and modified algorithms based on them have worked well in combinatorial optimization problems [20] and multi-depot vehicle routing problems [21].
Genetic algorithms for ships navigation can be used in the following ways: When identifying the parameters of the controlled object. To configure the parameters of conventional autopilots. To search for the optimal parameters of fuzzy or neural network autopilots.
So, in paper [22], the optimal coefficients of the proportional plus integral plus derivative autopilot are determined by a genetic algorithm with the following parameters: population size –20, maximum number of generations –100, probability of transposition –0.9, mutation probability –0.1, variation range/ turndown [0, 40]. Also, the researchers [23] studied some methods of forming the control law, including classical controllers tuned using genetic algorithms.
In publications [24, 25] the authors suggested a neural network model of setting coefficients for a PID autopilot. Besides, the researchers used a nonlinear activation function of artificial/digital neurons, and the neural network architecture contained 35 neurons in the input layer and 25 ones in the output layer. The methodology of using neural networks to optimize the fuzzy rule base productions for a controller based on the fuzzy logic of intelligent autopilot is presented in [26, 27].
In paper [28] we proposed and explored an autopilot for marine vessels containing a fuzzy controller. Its parameters are set up by a genetic algorithm based according to the corresponding neural network models of the trajectories of marine vessels. Using exactly a genetic algorithm to optimize the parameters of a fuzzy controller is caused by the following arguments. It is known that architecture has a decisive impact on the entire process of information processing by a neural network. Unfortunately, it is often selected by experts through trial and error. Designing an optimal neural network topology can be represented as seeking such an architecture that solves the given problem in the best way. This approach involves the search of the architecture space made up of all possible options and choosing the point from this space that is the best regarding the defined optimality criterion. In such an environment, the method of optimal generation of the neural network architecture for a specific problem would be very useful. As the most obvious way to combine a genetic algorithm with a neural network, there is an opportunity to encode the neural network topology in the genotype, indicating the number of neurons and links between them during the following evaluation of the network weights. It should also be noted that genetic algorithms provide a global view of the weight space and avoid local minima. Besides, they can be used in those problems where information about gradients is very difficult to obtain or found too expensive. As a result of the equal combination of genetic algorithms and neural networks, a very effective algorithm is found that combines the best qualities of both techniques.
When introducing a genetic algorithm as an optimizing component of neural network parameters, there is a requirement of corresponding chromosomal data representation, i.e. a method for genetic coding of all possible versions of neural networks should be developed. The typical cycle of genetic code/ algorithm includes the following stages: coding, the initial population generating, which allows one to get a variety of possible solutions to this problem; training of all types of neural networks of the original population; suitability assessment, suitability functions of individuals in the initial population are calculated based on the results of training these networks; reproduction, selection of chromosomes, i.e. the chromosomes to be reproduced are selected (the parent pool), whose individuals will form a population of descendants as a result of using genetic operators; a new generation development, crossing and mutation of selected individuals.
As a result of using genetic operators with the chosen method of chromosome selection, a new population of individuals (descendants) is generated. The next steps of the algorithm are repeated for the next population until the condition is completed. The best individual from the latest generation is considered to be the best set of weights, the best architecture, and the best neural network learning rule. A flowchart illustrating the evolution of a neural network is shown in Fig. 1.

Flow chart of neural network parameters evolution by a genetic optimization method.
The authors use the so-called hybrid approach in their research, consisting of combining two methods. First, using a genetic algorithm, a solution is found that is close enough to the optimal one, then the solution is refined using a random walk technique. The algorithm of differential evolution is also promising as an optimizer [29]. The application of it will be covered in further studies.
As noted earlier, the architecture of our researched intelligent autopilot includes a neural network classifier designed to classify marine vessel paths for identifying the vessel behavior on the course (the influence of weather conditions are considered implicitly, changes of the position of the rudder plates, etc.). The aim of this study is to continue the research reviewed in [28], which is to present a method for the synthesis of a neural network classifier included in the intelligent autopilot.
So a marine vessel has certain hydrodynamic characteristics that reflect ship handling ability and path keeping. These characteristics are determined primarily by the relative speed of the ship, the effectiveness of the rudder steering wheel impact, the ratio of length, width and draught of a ship hull, as well as weather factors including wind strength, height, wave duration and direction. Moreover, depending on the vessel load ratio, a mode of operation of the main energy unit and weather factors, the dynamic motion of the vessel on the heading is going to be different and therefore, autopilot settings have to be different as well to provide the best movement of the vessel ahead. The best setting of the autopilot in real-time seems to be too difficult because it is based on trial experiments with a real moving vessel and leads to additional waste of time, fuel, and can cause accidents.
The development and implementation of an intelligent classifier in the structure of the developed autopilot will allow one to take into account the peculiarities of the ship on the course for the best configuration of the regulator on the fuzzy logic of the autopilot. The scientific novelty of the intelligent classifier consists of using spectral analysis of the ship trajectory on the heading with the corresponding curve of the rudder steering wheel position change instructions. To carry out spectral analysis, the authors propose to use the discrete Fourier transformation (DFT).
When developing the neural network classifier of the intelligent autopilot, the authors apply several methods to obtain results. For example, spectral analysis methods are used to form criteria for which the intelligent classifier decides on optimal neural network models of ship trajectories, in particular, the DFT method. Computer simulations are performed on the signal simulator for autopilot IC-2005 (a certified IC-2005 simulator (Manufacturer: Engineering Center of Information and Control Systems, St. Petersburg, Russia)) to obtain neural network models of ship trajectories, and machine learning algorithms for the generation of appropriate parameters of neural network models. Machine learning algorithms are also used on the example of neural networks with radial-basis activation functions for the classification of the specified trajectories. Finally, simulation modeling is performed at different marine vessel speed and different weather conditions to test the function of the declared neural network classifier.
The methodology of spectral analysis for the motion paths of marine vessels consists of the following combination of steps.
In step 1, machine modeling is performed on a signal simulator for autopilot IC-2005 (a certified IC-2005 simulator (Manufacturer: Engineering Center of Information and Control Systems, St. Petersburg, Russia)).
In step 2, the curves/arcs of transient processes of the shipping traffic obtained from a signal simulator, enter a specially developed module, which implements the spectral data decomposition by the DTF. At the same time, the problem of selecting the number of harmonic is solved. On the one hand, they will provide sound renewal of the original vessel seaway path. On the other hand, they will allow forming a training sample of an appropriate size for the neural network classifier.
For example, the neural network used as a classifier contains 65 inputs in case of using 16 harmonic. It affects the speed of classification process greatly compared to 33 inputs for 8 harmonic.
In step 3, to verify the reliability of the spectral analysis, the ship path is rebounded through the in-verse Fourier transform and compared to the original ship seaway path, obtained from IC-2005 simulator used.
After verification, the data arrive at a signal generator developed by the authors. This module generates a signal at eight maximum harmonic (amplitude and frequency coefficients for eight maximum harmonic are identified) and specifies the corresponding integral component.
The signal generator meets the following requirements: an array of time samples of the signal is recorded from a text file obtained from the signal simulator for autopilot IC-2005; an array of time samples of the signal can hold up to 1000 values; after implementing the DTF, the signal is regenerated and its discrepancy with the original one is calculated; the amplitude and frequency coefficients for the eight maximum harmonics are determined (the calculation is made only for the eight maximum harmonics, although the soft-ware product can enter the required number of maximum harmonics independently).
The review of the conducted study has shown that each model of ship types has its unique spectrum patterns that qualify the movement of the vessel on the heading in certain weather conditions, which can serve as identification marks in the neural network classifier. The obtained results show that frequency range is both more varied and intense for low-displacement ships (a trawler) than for large capacity ones. The first two harmonics of the latter ones are the main, whether the main harmonics of small-tonnage vessels are not the first frequencies.
After carrying out a spectral analysis and obtaining eight maximum harmonic for each model of the marine vessel, integral criterion I is calculated. The study presents the possibility of using a smaller number of harmonic to identify the neural network model of ship paths contained in the knowledge base of the neural network classifier. Here, the main signal Y1 consists of the sum of eight components, and the compared signal Y2 consists of the sum of the investigated number of components:
Table 1 shows the values of integral components regarding the number of harmonic for six types of vessels (Automobile and Passenger vessel (APV), Passenger Coastal craft (PCC), Supertanker (ST), Tanker, Transport Refrigerator (TR), Trawler Ship) shown in Table 2. The modeling of them is possible in a signal simulator IC-2205.
Values of integral components
Values of integral components
Marine vessel characteristics for holding machine modeling
After computer modelling on the signal simulator for IC-2005 autopilots with models of six marine types of ships (their characteristics are given in Table 2) under four different weather conditions (wind speed from 1 to 2 m/s, wave height of 0.25 m; wind speed from 2 to 5 m/s, wave height 0.85 m; wind speed from 5 to 8 m/s, wave height 1.25 m; wind speed from 8 to 10 m/s, wave height 1.25 m) and discrete Fourier transform, vectors of stamps were obtained. They characterize the amplitude/peak factors of eight fundamental harmonic when the heading values, angular velocity on yaw, steering angle and masonry average linear rate (65 elements for each vector in total) change. The data analysis shows a measurable dependence of the integral component of the error I on the number of harmonic when modeling the vessel movement. If two or three harmonic may be enough for super ships, then eight harmonic are required for boats with small displacement. Furthermore, due to the analysis of the results, the authors conclude that the spectral characteristics of the ship models change as weather changes. This phenomenon is especially typical for low-displacement boats such as PCC and a trawler. For example, Fig. 2 shows a dependency graph of the integral component I on the number of harmonic for Transport Refrigerator for various navigation conditions (No. 1–4).

Dependency diagram of the integral component on the number of harmonic for Transport Refrigerator for diverse navigation conditions.
The studies for all considered models of marine vessels showed that the error in modeling various types of vessels depends on the number of harmonic involved. If the dependence for low-displacement boats is close to linear, then it is non-linear for more inertia heavy cargo ships, so it is possible to use fewer harmonic.
To classify marine vessel motion paths with spectral characteristics as criteria features, it is more beneficial to use neural networks with radial basis activation functions (RBF). The hybrid RBF neural network learning algorithm measures the position and width of a core using a clustering algorithm ‘with no teacher’ first, and then uses the mean-root square error minimization algorithm ‘with a teacher’, which determines the link weights between the hidden and output linear layers. After obtaining this first approximation, method of gradient descent is used to define the parameters of the NN. Mixed RBF NN training algorithm converges much faster than the backpropagation algorithm used for multilayered feedforward NN training. However, RBF NN contains too many hidden elements, so it results in a slower functioning of RBF NN than a multilayered feedforward NN.
The centers are located in accordance with the clusters that actually are available in the source data. The earlier spectral analysis made it possible to form a training sample for training a neural network with RBF, consisting of 96 samples. The data from the files are decoded, scaled and stored in an array.
Clustering is accomplished according to the k-means method of each kind into six clusters using the k-means function, so that each cluster has 24 objects. The used k-means algorithm tends to choose the optimal set of points that are the centroids of the clusters in the training data. Having k radial elements, their centers are located so that each training point corresponds to one center of the cluster and is located closer to it than to any other center; each center of the cluster is the centroid of the set of training points that are a part of this cluster.
The vectors of the cluster centroids are recorded in a special array. The next step is to measure the deviations of Gaussian function for each centroid of the clusters. For that purpose they use the most accurate and an efficient k-nearest neighbor method. The bell radius of each core is calculated as the average spacing to k = 3 (computer modeling shows that the NN error is the least when k = 3) of the nearest neighbor centroids and kept in the array. The result of such training are weighting factors –vectors of centroids and threshold layer levels –the array deviations. In the end, Gaussian function responses for each of the six types of marine vessels were obtained.
Figure 3 shows a flowchart for getting clusters that match the vessels shown in Table 2 types (the procedure for obtaining clusters for new types of vessels is similar).

Flow diagram of classification of ship trajectories.
Figures 4–7 shows the effect variables of the radial basis functions for Transport Refrigerator vessel (similar studies for other vessels from Table 2 were carried out and the corresponding results were obtained).

Cluster surface for Transport Refrigerator under various navigation conditions (wind speed from 1 to 2 m/s, wave height of 0.25 m).

Cluster surface for Transport Refrigerator under various navigation conditions (wind speed from 2 to 5 m/s, wave height 0.85 m).

Cluster surface for Transport Refrigerator under various navigation conditions (wind speed from 5 to 8 m/s, wave height 1.25 m).

Cluster surface for Transport Refrigerator under various navigation conditions (wind speed from 8 to 10 m/s, wave height 1.25 m).
The clusters shown in Figs. 4–7 are P j identification tags that correspond to a specific type of vessel under appropriate weather conditions and are used for classification.
After defining the criteria, the neural network classifier is trained, as a result of that, the classifier parameters are configured. In this case, P j identification tags are compared to A cond conditional parts of all C r classifiers. If the conditional parts match, the corresponding classifiers are declared active and participate in further calculations: each active classifier performs a sequence of procedures of the ‘fire-fighting team algorithm’, as a result of which the classifier with the maximum S r force is tested in operation.
Initially each classifier is set the force S
r
equal to one. Further, by comparing the conditional parts A
cond
all classifiers C
r
with identifier labels vector P
j
is change the force value. Furthermore, when all active classifiers have the same strength and/or the ‘fire-fighting team algorithm’ has performed 1000 iterations, a sequence of genetic algorithm procedures is performed on the conditional parts of the A
cond
classifiers of C
r
. Thus, in the particular case when none of the classifiers is declared active, the procedure is performed, according to which some characters are replaced by #-symbol in the identification mark P
j
vector and form vector
The result of the experiments and training of the neural network classifier is the knowledge base for 24 neural network models of various marine vessel paths under various navigation conditions.
A modeling is performed for all ship models to test the adaptation process of an intelligent autopilot, which contains a neural network classifier. The parameters of them at various speeds and weather pattern changes are shown in Table 2.
The cost function of the identification algorithm of the neural network model of the vessel pattern is to minimize the standard deviation of the instantaneous output value of the marine vessel model from the corresponding actual vessel heading.
To avoid the astatism effect, it is proposed to use the squared difference of the error derived from the heading of the neural network model of the vessel pattern and its actual heading as a cost function.
In this case, the search algorithm tends to minimize the discrepancy between the derivatives of the output signals at current times.
Figures 8–10 show the curves for the model of a Transport Refrigerator at the heading and entering a new heading with an adapted (using a neural network classifier) and non-adapted autopilot when the wind is from 8 to 10 m/s and a wave height of 1.25 meters.

Transport Refrigerator pass to 10 degrees course before adaptation.

Transport Refrigerator pass to 10 degrees after adaptation.

Transport Refrigerator movement on course 10 degrees before and after adaptation.
A significant result of the computer modeling analysis shows that the fuzzy logic controller requires some extra settings when the weather is bad. It also affirms a well-founded introduction of a neural network classifier with a knowledge base of neural network models of ship paths. The estimated values of the mean-square deviation of the instantaneous output value of the marine vessel model from the corresponding current vessel course prove positive influence of adaptation as a neural network classifier integrated in the structure of the intelligent autopilot.
The paper illustrates numerous examples of the effective use of machine learning algorithms for solving issues closely correlated to navigation: the development of autopilot steering systems containing both intelligent autopilots and those that contain standard (including PD or PID regulators) autopilots. The latter ones are set by machine learning algorithms. The authors suggest a model of an intelligent autopilot containing a neural network classifier to adapt the controller. The paper covers the results of a spectral analysis of ship seaway paths. They are used to generate criteria features. The neural network classifier selects the optimal neural network model of a marine ship path by means of them.
Using a certified signal simulator for autopilots, 32 ship movement trajectories were obtained (for different types of vessels, the characteristics are shown in Table 2, and under different navigation conditions), 79 neural networks were trained for each trajectory, differing in type, architecture and learning algorithm, i.e. the total number of synthesized NN models of ship movement under different weather conditions, speed and displacement of the vessel is equal to 2528. 8 neural networks were selected out of 79 that showed the best results (minimum values of mean square deviation reached up to the order of 10-7, a detailed report of the results presented in [28]) across the whole variety of neural network models of the vessel trajectories. Spectral analysis was carried out. The results of it indicate that only two or three harmonics may be enough for large-capacity vessels, while eight harmonics are required for small-displacement vessels, such as a trawler. Moreover, the data analysis allows the authors to conclude that the spectral characteristics of ship models change when weather conditions change, which is especially typical for low-tonnage vessels.
The neural network with radial basis activation functions is used to classify the marine vessel seaway paths according to their spectral characteristics. 96 examples are generated for its training. The survey includes the corresponding clusters for a Transport Refrigerator type vessel (the total knowledge base of the neural network classifier contains 24 neural network models of various marine vessel paths under different navigation conditions). Graph representations of a vessel pass to the 10 degree course before adaptation are given for the same type of a vessel (without using a neural network classifier) and after adaptation under environment navigation conditions: wind speed from 8 to 10 m/s, wave height 3%reliability 1.25 meters.
It is worth emphasizing that the first absolute advantage of the suggested intelligent autopilot is its modularity. In particular, the authors are going to study a modified genetic algorithm as an optimizer, while for other modules of the autopilot, it is only necessary to launch retraining to establish new internal coefficients. Secondly, there is an opportunity to re-train the system, i.e. after the system receives a new trajectory that is significantly different from those contained in the database; training is performed according to the selected eight best neural network architectures to find the best one that simulates the new trajectory.
The author’s further research will also be aimed at conducting full-scale tests of intelligent autopilot on a tuna vessel type within the waters of Amur Bay of Japanese Sea.
