Frigate Speed Estimation Using CODLAG Propulsion System Parameters and Multilayer Perceptron Procjena brzine fregate pomoću parametara CODLAG pogonskog sustava i višeslojnog perceptrona

Authors present a Multilayer Perceptron (MLP) artifi cial neural network (ANN) method for the purpose of estimating a speed of a frigate using a combined diesel-electric and gas (CODLAG) propulsion system. Dataset used is publicly available, as condition-based maintenance of naval propulsion plants dataset, out of which GT Compressor decay state coeffi cient and GT Turbine decay state coeffi cient are unused, while 15 features are used as input and ship speed is used as dataset output. Data set consists of 11934 data points out of which 8950 (75%) are used as a training set and 2984 (25%) are used as a testing set. 26880 MLPs, with 8960 diff erent parameter combinations are trained using a grid search algorithm, quality of each solution being estimated with coeffi cient of determination (R2) and mean absolute error (MAE). Results show that a high-quality estimation can be made using an MLP, with best result having an error of just 3.4485x10 -5 knots (absolute error of 0.00014% of the range). This result was achieved with a MLP with three hidden layers containing 100 neurons each, logistic activation function, LBFGS solver, constant learning rate of 0.1 and no L2 regularization


INTRODUCTION / Uvod
Nowadays, a signifi cant increase of energy effi ciency requirements for the worldwide fl eet can be noticed. One of approaches which off er a signifi cant increase in ships energy effi ciency is to utilize proper method for ship speed estimation [1].
The standard approach to estimation is to use mathematical models for simulating the ship performances [2] or to use Kalman fi ltering [3]. In some studies researchers used propulsion system parameters to estimate the ship propulsion performances. The authors of research presented in [4] have proposed the solution for marine diesel engine performances estimation. In this research, the vessel speed is used for the estimation of eff ective power, fuel consumption and emission of marine diesel engine. In [5], the estimation of exhaust emission of various ocean-going vessels based on the ship speed is of aforementioned dataset have proposed the machine learning-based solutions for condition-based maintenance of CODLAG propulsion system component, its compressor and gas turbine [32 -34]. As presented in [32], the dataset is created by using data obtained from numerical simulations of naval CODLAG propulsion system. It can be noticed that such propulsion system contains one gas turbine (GT) in combination with two electrical motors powered by diesel generators, as shown in Figure 1. Power generated with GT and electrical motors is transmitted to frigate propellers through the system that contains three gearboxes and four clutches. GT used in this propulsion system is based on two-shaft design, as shown in Figure 2.
This GT design is based on one compressor and two GTs: high pressure (HP) one and low pressure (LP) one. HP turbine is used only for compressor drive, while the LP is used for ship propulsion. Connection of HP and LP is achieved by the fl ue gasses only. In such confi gurations, HP together with combustion chamber and compressor can also be called "gas generator" [35]. CODLAG propulsion system parameters and their ranges, that are used for frigate speed estimation are presented in Table 1 together with frigate speed. performed. From the presented papers, it can be seen that such estimations are based on mathematical models and simulations that are often complex and time-consuming. As an alternative approach to ship speed estimation, machine learning (ML) algorithms are imposed [6] [7]. ML is one of the most propulsive branches of computer science today. More recent research studies have presented the possibility of ML utilization in various fi elds of science and technology, ranging from medicine [8], through robotics [9] [10] and computer vision [11], to power plants [12]. It can be noticed that high regression performances are achieved if artifi cial neural networks (ANN) are utilized for solving problems in the fi elds of power plants and propulsion systems [13] [14]. It is shown that when multilayer perceptron (MLP) is utilized for solving similar problems it off ers the most stabile regression performances [15] [16].
From literature overview, it can be noticed that the majority of modern ship propulsion systems are based on various types of diesel engines [17] [18]. The data obtained from the aforementioned propulsion systems is then used for design of various numerical models that are used in simulations of diesel engines. Such simulations are performed with the aim of engines optimization [19], emissions reduction [20] [21], analysis of operational parameters [22], etc.
On the other hand, in some parts of shipping industry such as the transport of liquefi ed natural gas (LNG) steam propulsions systems still represent a dominant choice [23] [24]. It can be noticed that such propulsion systems are based on steam turbines [25] [26] and other components [27] which are necessary for proper performances of such propulsion system. However, the use of diesel engines in this part of the industry is rapidly increasing [28].
Together with diesel and steam propulsion systems, there are various new propulsion systems under development. The aforementioned systems are based on the combination of one or more diesel engines, steam and gas turbine [29] [30]. One of these complex propulsion systems is combined with the dieselelectric and gas (GODLAG) propulsion systems. Such propulsion system is based on the combination of electrical motor and gas turbine. Electrical power for electrical motors is produced by using diesel generators [31]. From the presented literature overview, some questions could be asked: -is it possible to estimate the ship speed by using CODLAG propulsion system parameters, -is MLP a suitable regression algorithm for ship speed estimation and -which confi guration of MLP hyperparameters achieves the best regression performances? In this paper, an MLP-based method for vessel speed estimation is presented. A frigate with CODLAG propulsion system is analyzed and its speed is estimated by using propulsion system parameters. Dataset used in this research is publicly available as a part of UCI Machine Learning Repository.

DATASET DESCRIPTION / Opis skupa podataka
As mentioned in previous section, the dataset used in this research is publicly available and published online. The authors

Multilayer perceptron / Višeslojni perceptron
MLP is a type of a feed-forward artifi cial neural network, which can be used for regression or classifi cation tasks [36]. In this paper MLP is used as a regressor, in an attempt to determine the value of ship speed from diff erent variables. MLP consists of multiple layers, each containing neurons. Neurons can be thought of as a node that provides the weighted sum of the inputs. Each input of a neuron is the output of a neuron in a previous layer, multiplied with the weight of their connection. With that, each neuron will have a vector of inputs X and Θ per [37] (2) where n is the number of inputs of a given neuron. With the above, the output variable of a neuron in a neural network can be calculated using where F (X k · Θ) represents the activation function of a neuron. Activation functions are functions that transform the weighted sum of neurons inputs [38]. They are commonly used for mapping the values of a neuron to a given range (e.g. tanh or sigmoid activation functions), or to eliminate certain, unwanted values (e.g. ReLU activation function). Activation functions used in our research are: identity which maps the input directly to output (F (x) = x), ReLU which maps positive values directly, but turns negative values to zero (F (x) = max (0, x)), logistic activation function which maps input values into a range of [0,1] and Tanh which maps input values to a range of [-1,1] [39,40]. Used activation functions are shown in Figure 3.
Each MLP consists of at least three layers of neurons. First is the input layer which consists of as many neurons as there are input variables, and values of those neurons are the input variables of the data point that is being propagated through the neural network. Final layer is the output layer which, for a regressor, consists of a single neuron. The value of that neuron is the output of the neural network for the values of the input neurons. Each MLP consists of at least one or more hidden layers. The number of hidden layers and neurons inside them greatly aff ects the results achieved by the neural network [41]. An example of the neural network can be seen in Figure 4.
Before using MLP to regress the speed from input variables neural network needs to be trained. Training of the neural network is done using a larger part of the dataset (in this instance 75%) -from now on referred to as the "training set". Training the neural network consists of two parts -forwards propagation and backwards propagation. Before explaining these processes it is necessary to defi ne the vector Y as Where ŷ k is the result of the neural network for the k-th set of input. During the forward propagation, values of each data point in the training set are placed as values of the input layer of the neural network. At the beginning the vector Θ containing weights of all connections is set to random values, and the input values are propagated forward trough the MLP, which allows us to calculate the value ŷ k This value is then compared to the real value of the output for this dataset y k . In our research this means that the value y k represents the real, measured speed of the ship obtained from the dataset, while the ŷ k is an attempt of the neural network algorithm at correctly calculating that value given the inputs of the k-th data point. It can be expected that there will be a diff erence between the real and predicted value. This diff erence is caused by the ill-defi ned weights of connections between the neurons [37,42]. To achieve a smaller error weights need to be adjusted, which is done during the backpropagation process. For the backpropagation process it is necessary to defi ne the cost function J(Θ), usually mean square error (MSE) given as [43] (5) With this value calculated the gradient of a connection is calculated as a partial derivation [44] Once the gradient is calculated the existing weights need to be adjusted, depending on its value. Due to the usage of the derivation higher error will mean a greater change, while smaller error will cause smaller change in weights. New values of the weights are calculated per (7) where m is the number of data points in the dataset, and α is the learning rate [37,45]. Higher learning rate will allow the neural network to learn faster, but if too high the backpropagation could fail to converge towards the error of zero. With a multitude of data points MLP is trained over many iterations and its weights are adjusted. The quality of the achieved result greatly depends on the parameters of neural network (so called hyperparameters).

Hyperparameter adjustment / Podešavanje hiperparametra
In the presented research the hyperparameters are adjusted by utilizing a grid search algorithm. Grid search takes multiple values for each hyperparameter being adjusted and trains the neural network for each of the combinations [46]. Hyperparameters that we adjusted during the training were [47]: -Hidden Layers -the number of hidden layers and number of neurons in each layer. Presented with a tuple, in which each layer is presented with a positive integer equaling number of neurons in that layer, -Activation function -the activation function of the neurons in the MLP, -Solver -algorithm that will be used for calculating the weight values during backpropagation, -α -initial learning rate for backpropagation. This is the value that adjusts the initial speed of ANN weight adjustments. Higher value of the learning rate will cause the ANN to converge to a solution faster, as weights will be changed more quickly, but setting it too high can cause the ANN to diverge instead of converge as it will skip over the weights that will cause the convergence to a solution. Setting the learning rate too low will cause the neural network too converge extremely slowly -or, more problematically, not to converge at all due to the runtime (number of iterations) being too high for realistic applications [48]. -α Adjustment -adjustment of learning rates through the training. Constant keeps the learning rate the same as starting throughout training, while adaptive and inverse scaling adjust it depending on the weight gradient value, and -L2 -regularization parameter, larger value of which penalizes the aff ect of variables that have a larger infl uence [49,50]. Hyperparameters that are adjusted and their possible values can be seen in the Table 2.   (16,16), (32,32), (16,32,16), (32,32,32), (16,16,16,16), (16,32,32,16), (32,32,32,32), (32,50,50,32) Hyperparameter choices, including solver, learning rate and others, are usually randomized, but since this adds to complexity by increasing the search space the possible values are selected based on authors previous experience with similar problems in which similar hyperparameter choices and combinations provided good results [8,11,48].
Total combinations of parameter combinations in grid search are 8960. Additionally, each combination of parameters is run 3 times, which is done to avoid poor results stemming from poorly chosen starting random connection weights. With this process a total of 26880 networks are trained. Each solution is then evaluated using two metrics.

Solution evaluation / Procjena rješenja
Every trained neural network is evaluated on the remaining part of the dataset (henceforward referred to as the training set). Each datapoint of the training set is used as an input, and the result that is obtained from the MLP is compared to the actual data to evaluate the quality of the regression for that network.
No backpropagation is performed, as the goal is just to test the performance of the ANN, as opposed to adjusting its weights [51].
Two metrics used to compare the predicted solution vector Ŷ and the real result vector Y are coeffi cient of determination (R 2 ) and mean absolute error (MAE).
Mean average error calculates the diff erence for each element of the two solution vectors, measures their absolute error per each element. It can be calculated using [52,53] (8) R 2 , or coeffi cient of determination is a value, in range [0,1] that defi nes how well is the variance of the real results represented by the predicted results. Higher values represent a better fi tting solution. R2 can be calculated as a factor of total and residual sum of squares as [54,55] Where is the mean of the data results calculated per (10) Each solution is fi rst evaluated using R 2 . Coeffi cient of determination is given in range of [0,1], with higher values being better [56]. If the coeffi cient of determination value is higher than 0.99 the model is stored and evaluated again using MAE where a smaller MAE is considered better.

RESULTS / Rezultati
Out of the total 26880 solutions 7373 solutions have satisfi ed the condition of R 2 value larger than 0.99. Out of these 7373 solutions 4751 solutions have achieved MAE that is less than 0.026 which is 1% of the total range of speeds contained within the dataset. The worst (largest) achieved MAE is 0.67 knots or 2.81%. Best achieved solution has R 2 of 1 and MAE of 3.4485x10 -5 knots (absolute error of 0.00014% of the range). Hyperparameters of the MLP that achieved these results are shown in the Table 3. The graphs given below show how many of the best 7373 solutions each parameter has. Figure 5. shows that 5876 of the solutions that satisfi ed the given condition used lbfgs solver, while 1497 used the adam solver. Figure 6. shows that relu activation was used by 3523 of the networks, tanh was used by 1282, logistic by 1121 and identity activation by 1447. The scaling type for the learning rate was distributed in a way where 2552 had a constant learning rate, 2410 used adaptive and 2411 used inverse scaling learning rate, which is shown in Figure 7. Initial learning rates were distributed in a way that 1470 models had learning rate of 0.5, 1546 had a learning rate of 0.1, 1574 had a learning rate of 1574 and 2783 had a learning rate of 0.00001. This is shown in Figure 8. When it comes to L2 regularization parameter 1590 solutions used the value of 0.1, 1514 had used a value of 0.01, 1528 the value of 0.001, 1501 the value of 0.0001 and 1240 solutions used the value of 0, and this distribution is shown in Figure 9. Finally, when it comes to hidden layers most solutions had chosen a single hidden layer with the number of neurons equaling 16 (1460 solutions) and 32 (1754 solutions). There were no solutions that used the hidden layer confi guration of (16,16,16,16) , (32,32,32,32) and (100,100,100,100). Full distribution is shown in Figure 10.

DISCUSSION / Rasprava
The results show a successful regression of the speed value from the parameters contained within the dataset. Best solution achieved has an extremely small error, and a large number of MLPs trained show the ability of regressing the value with a low (<1%) error.
When observing the solutions with the R 2 value larger than 0.99, observations can be made about the number of solutions that had certain parameter values. It can be seen

CONCLUSION / Zaključak
The research done shows the possibility of regressing the speed of a vessel from propulsion system parameters. It is also shown that MLP is a suitable algorithm for such a task, due to low error and high coeffi cient of determination achieved by it. Research shows that satisfactory results can be achieved with relatively simple MLP architectures. Best regression performance is achieved by the MLP which uses three hidden layers with 100 neurons in each, a logistic activation function with lbfgs solver while using the learning rate of 0.1 throughout the training process and performing no regularization. Such a solution achieved a minimal MAE of 3.44854x10 -5 knots (~0.00014% of the total speed range contained in the dataset).