Next Article in Journal
Analysis of Horizontal Cylinder Load under Different Conditions in Regards to Waves and Flows
Previous Article in Journal
Prediction of Pile Running during Installation Using Deep Learning Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Ship Energy Consumption Prediction Method Based on TGMA Model and Feature Selection

by
Yuhang Liu
1,
Kai Wang
2,*,
Yong Lu
3,
Yongfeng Zhang
4,*,
Zhongwei Li
2,
Ranqi Ma
2 and
Lianzhong Huang
2
1
College of Transportation Engineering, Dalian Maritime University, Dalian 116026, China
2
Marine Engineering College, Dalian Maritime University, Dalian 116026, China
3
Changchun Shuangyang District Transportation Comprehensive Administrative Law Enforcement Brigade, Changchun 130699, China
4
Party and Government Affairs Office, Wuhan University of Technology, Wuhan 430063, China
*
Authors to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2024, 12(7), 1098; https://doi.org/10.3390/jmse12071098
Submission received: 31 May 2024 / Revised: 22 June 2024 / Accepted: 26 June 2024 / Published: 28 June 2024
(This article belongs to the Section Marine Pollution)

Abstract

:
Optimizing ship energy efficiency is a crucial measure for reducing fuel use and emissions in the ship** industry. Accurate prediction models of ship energy consumption are essential for achieving this optimization. However, external factors affecting ship fuel consumption have not been comprehensively investigated, and many existing studies still face efficiency and accuracy challenges. In this study, we propose a neural network model called TCN-GRU-MHSA (TGMA), which incorporates the temporal convolutional network (TCN), the gated recurrent unit (GRU), and multi-head self-attention mechanisms to predict ship energy consumption. Firstly, the characteristics of ship operation data are analyzed, and appropriate input features are selected. Then, the prediction model is established and validated through application analysis. Using the proposed model, the prediction accuracy of ship energy consumption can reach up to 96.04%. Comparative analysis results show that the TGMA model outperforms existing models, including those based on LSTM, GRU, SVR, TCN-GRU, and BP neural networks, in terms of accuracy. Therefore, the developed model can effectively predict ship fuel usage under various conditions, making it essential for optimizing and improving ship energy efficiency.

1. Introduction

Since the 21st century, the global trade volume has been rising, which has promoted the rapid prosperity and development of the ship** industry but has also led to rising carbon emissions [1,2], which have aggravated the pollution of the environment [3]. In recent years, with the promotion of energy saving and emission reduction policies around the world, the sustainability of the ship** industry has also received extensive attention from governments and related organizations [4,5]. As an important measure to reduce carbon emissions, optimizing the energy efficiency of ships depends on the accurate prediction of ship energy consumption [6]. Therefore, the key to the problem of efficiency improvement in ship operation is to develop a method to accurately predict ship energy consumption.
In order to accurately establish the map** relationship between ship operating parameters and energy consumption, a number of scholars have proposed white-box models for predicting ship energy consumption based on physical equations and empirical formulas. Yang et al. [7] proposed a speed correction model considering the influence of ocean currents based on the influence of ocean currents caused by the operation of the ship under the complex sea state conditions, so as to predict the ship’s fuel consumption. Taking into consideration the influence of the narrow canal in the channel and locks in canals, ** technology in recent years, has been widely used in research in the field of ships. Lv et al. [11] used the Bayesian optimization method to optimize the hyper-parameters of the gated recurrent unit, and used the attention mechanism for feature extraction, and proposed a wave energy prediction model based on the network of gated recurrent units. Zhang et al. [12] performed a cluster analysis on the ship trajectories to construct a set of trajectories in the normal sailing state and established a ship trajectory prediction model based on the BiGRU, so as to detect abnormal states during ship navigation. Sun et al. [13] used the PCA method to select the feature variables, and at the same time, proposed a BiLSTM network with parameter optimization using the improved slime mold algorithm, which achieved the prediction of the exhaust gas temperature trend of marine diesel engines. In addition, Zhang et al. [14] proposed a time series prediction model incorporating the improved whale algorithm, attention mechanism, and time convolutional neural network for real-time prediction of a ship’s motion state parameters, such as pitch angle, displacement, etc., and achieved better results. Moreover, Jiang et al. [15] proposed the method of using the attention mechanism for a ship’s trajectory prediction and compared the prediction performance of different attention mechanisms, which provided new ideas for the application of machine learning technology in ship engineering.
Generally, due to the complexity of the environment and the instability of the ship’s state, the ship’s energy consumption is not a stable time series. To address such a situation, Beşikçi et al. [16] proposed the artificial neural network (ANN) to predict the ship’s energy consumption. On this basis, Farag et al. [17] combined the artificial neural network and multiple regression (MR) technique pair to achieve the prediction of ship fuel consumption. Wang et al. [18] used LASSO to predict ship energy consumption. In addition, Li et al. [19] introduced the broad learning system into ship energy consumption prediction, and Chen et al. [20] compared the advantages and disadvantages of the prediction performances of SVR, RF, RR, and ANN models. Otherwise, some deep learning algorithms, such as the LSTM network, have also been applied in energy consumption prediction tasks [21,22]. This indicates that the high accuracy prediction of ship energy consumption under complex environmental conditions can be achieved by the artificial intelligence method using the ship’s operating parameters and environmental data.
Although many scholars have studied the prediction of energy consumption of ships, the accuracy of prediction is still a concern. In recent years, the temporal convolutional network (TCN) and the gated recurrent unit (GRU) have been widely used in various tasks with promising results [23,24,25,26,27]. In this paper, the advantages of these two models are used to propose a model based on the TCN-GRU and multi-head self-attention mechanism. Among them, the TCN can more accurately capture the effects of different features on ship energy consumption; the GRU can better characterize the cyclical trend of ship energy consumption; and the multi-head self-attention mechanism can further mine the relationship between features and sudden changes in ship energy consumption from different perspectives, and finally output the prediction data through a linear layer, so as to provide high-precision prediction of ship energy consumption.
The remainder of the paper is organized as follows: Section 2 describes the algorithms and correlation analysis metrics used in this paper. Then, in Section 3, the basic information about the data used in this paper is presented, and the characteristics of the data are analyzed. Section 4 establishes an energy consumption prediction model based on TGMA and examines the prediction performance of the model by comparing the algorithm proposed in this paper with five other different prediction algorithms. Finally, Section 5 concludes the research of this paper. All appearing models and their abbreviations are shown in Table 1.

2. Methods

2.1. Temporal Convolutional Network

The temporal convolutional network (TCN) is a new type of neural network for the task of time series prediction. Unlike the traditional one-dimensional convolutional neural network, the TCN uses causal inflationary convolution operations instead of pooling operations, so as to speed up the model output by parallel processing of large-scale input data. At the same time, the TCN can increase the memory length of the model by increasing the size of the receptive field to achieve the capture of the overall features of the long time series. The TCN is mainly composed of three modules: (1) causal convolution, (2) dilated convolution, and (3) residual connection.

2.1.1. Causal Convolution

The TCN adopts the causal convolution method, which makes the TCN rely only on the sequence data before the moment t when predicting the data at the moment t and solves the problem of future data leakage that may occur in time series prediction. The equation of causal convolution is as follows:
P ( x t ) = t = 1 T P ( x t x 1 , x 2 , x 3 , , x t 1 )
where P(xt) is the probability of prediction at moment t, and T is the length of the time series.

2.1.2. Dilated Convolution

Causal convolution can help neural networks to memorize information from past data. However, for longer time series data, the use of causal convolution alone will result in an increase in network depth, which reduces the efficiency of network training. For this reason, the TCN introduces the dilated convolution module, which enables feature extraction for long time series data. The dilated convolution module can obtain a larger sensory field range while maintaining a shallower network depth, thus making it easier to optimize and converge the network parameters.
The formula for the dilated convolution is as follows:
F ( x t ) = i = 0 k 1 f ( i ) x t d i
where F(xt) is the output of the dilated convolutional network at time t; f(i) is the filter; k denotes the size of the filter window; and d is the dilation factor. As the number of network layers increases, the perceptual field of the network increases exponentially, which enables the network to memorize more historical information and also avoids the problem of reduced efficiency associated with too many network layers. At the same time, t−di ensures that the network only inflates the convolution of historical data.

2.1.3. Residual Connection

The residual connectivity pass enables the input data to be passed directly to the subsequent output by connecting across layers. The output expression of the residual connection structure can be expressed as follows:
y = R ( h ( x ) + C o n v ( x ) )
where y represents the output of the residual connection; x represents the input; R represents the activation function; h(x) represents the output of the causally dilated convolutional layer; and Conv(x) represents the output of the one-dimensional convolutional layer.
The structure of residual connections can mitigate the problem of gradient explosion or gradient disappearance due to the increase in network depth. By introducing residual connections, the TCN can better remember historical information and improve the ability to predict long time series data.

2.2. Gated Recurrent Unit

The gated recurrent unit (GRU) is a variant of LSTM, which combines the forgetting gate and input gate of LSTM into an update gate zt and adds a reset gate rt, which is used to save valid information in the past and improves the ability of modelling long-time sequence information. The update gate is responsible for extracting short-term dependencies in the time series, so as to achieve the holistic mining of both long-term and short-term dependencies in the time series. The structure of the GRU is simple and reduces the training time compared with LSTM neural networks. The computational formula of the GRU is as follows:
r t = s i g m o i d ( w x r x t + w h r h t 1 + b r )
z t = s i g m o i d ( w x z x t + w h z h t 1 + b z )
h ˜ t = t a n h ( w x h x t + w h h ( r t × h t 1 ) )
h t = z t × h ˜ t + ( 1 z t ) × h t 1
where ht−1 denotes the hidden state at the previous time step; ht denotes the hidden state at time step t; and h ( ~ ) t denotes the candidate hidden state at time step t; w is the weight; and b is the bias coefficient.

2.3. Multi-Head Self-Attention Mechanism

During the sailing process, the sequence features at different moments have different impacts on the ship’s fuel consumption, and the importance of the time series features when the ship’s fuel consumption changes abruptly is greater than that when the fuel consumption is steady. The TCN and GRU networks may ignore the potential impacts of the features at these moments on the prediction of the fuel consumption. Therefore, the self-attention mechanism is proposed to mine the features from multiple perspectives, which is able to efficiently capture these long-distance dependencies, thus capturing features that are easily overlooked. In order to accelerate the convergence speed of the self-attention module, the multi-head self-attention mechanism is used to process the sequence data [28,29,30,31]. The structure of the multi-head self-attention mechanism is shown in Figure 1 and Figure 2.
The attention model is used to learn long-term dependencies in time series or sequential inputs, which include the following two steps:
Firstly, the attention layer is fed with three parameters in the form of vectors: query (q), key (k), and value (v).
After that, the attention model compares q with k and obtains the weight value of v to allocate attention.
In head h, the input sequence data are multiplied with the three weight matrices to obtain the three input vectors q, k, and v. The computational formula for this process is as follows:
q i h = W q h × m i
k i h = W k h × m i
v i h = W v h × m i
As shown in Figure 2, in the head h, the dot product attention value of the time series data can be represented as:
α i , δ h = q i h × k i h T d k
b i h = δ = 1 i S o f t m a x ( α i , δ h ) v i h
b i = L i n e a r C o n c a t ( b i 1 , b i 2 , L , b i P )
where δ = 1,2, …, t, and dk is a deflation factor that prevents the problem of vanishing gradients. The output bh in each header is the output through the concatenated layer (concat) and the linear layer (linear) to give the final output value.

2.4. Maximum Information Coefficient

The maximum information coefficient (MIC) is a correlation analysis algorithm based on mutual information [32], which can not only measure the linear and non-linear relationships between different data, but can also mine the non-functional dependencies between variables. Two columns of data M and N are formed into a two-dimensional dataset {mi, ni}, and the plane space where the two-dimensional data are located is partitioned into grids of I rows and J columns, and the data points fall into different grids; then, the probability distributions of the data in each subgrid are calculated, and the value of the maximum probability distribution is obtained in all grids:
M I ( I , J ) = M a x ( i I , j J P ( i , j ) l o g 2 P ( i , j ) i I P ( i , j ) j J P ( i , j ) )
Finally, the MI values are normalized to find the grid resolution that maximizes the normalized mutual information as the value of the MIC:
M I C = M a x I J < B ( M I ( I , J ) l o g 2 m i n ( I , J ) )
where T is the total number of data points and B is a function about T.

3. Data Analysis and Feature Selection

3.1. Data Acquisition and Processing

The energy consumption of a ship is affected by a series of parameters, which mainly include information on the ship’s operation status, such as the speed, direction, shaft power and shaft speed of voyage, as well as factors of the voyage environment. During the voyage, the data acquisition system will use the sensors to capture the corresponding data, which will then be sent and stored in the onboard database and the shore-based database. The onboard energy management system and the shore-based management system can display and monitor this information in real time for energy management during the voyage. The data acquisition process is shown in Figure 3.
In this paper, data from two voyages were selected for this research. Case 1 selected the data from the route from Caofeidian to St. Louis. Case 2 selected data on the ship’s voyage from 1 August 2016 to 31 August 2016. The bulk carrier ship studied in this paper and the routes are shown schematically in Figure 4 and Figure 5, respectively. Table 2 details the ship’s parameters, engine specifications, and navigation parameters. During the voyage, data on the sailing speed, heading, shaft power, shaft rotational speed, and fuel consumption of the ship’s main engine were collected using onboard sensors. The instruments used to acquire the data are shown in Table 3. The shaft power sensor is mounted on the main shaft to obtain the ship’s shaft power and shaft speed, the sailing position and speed information can be obtained from the GPS and speed log on the bridge, and the fuel consumption can be obtained from the fuel consumption sensor in the fuel lines. Additionally, the navigational environment information was obtained from the European Centre for Medium-Range Weather Forecasts (ECMWF), and data on real wind speed and real wind direction were derived through vector synthesis operations. During the whole voyage, the ship is under full load conditions without ballast water.
By establishing a predictive model for ship fuel consumption, the relationship between fuel usage and various influencing factors can be examined, enabling effective prediction and evaluation of fuel usage. Due to the different time scales of the collected fuel consumption data and the navigational environment data obtained from the meteorological center, data preprocessing is necessary. Firstly, the data collected every 10 min starting from 00:00 each day were converted into hourly ship fuel consumption data. Concurrently, the frequency of the meteorological data and sea state data, based on GPS and ECMWF data, was aligned with the data collected from the ships using a three-times B-spline interpolation algorithm. Additionally, to address outliers and noise in the collected data, a cleaning process was undertaken. This included handling missing data and anomalies caused by abnormal navigational environments to ensure the accuracy of the predictive model.
After data acquisition, a total of 12 ship operation features and navigation environment information features were obtained, and the features and their abbreviations are shown in Table 4. In order to eliminate the influence of the magnitude between the feature variables, the data were normalized. The histograms of feature probability density distribution after data cleaning are shown in Figure 6 and Figure 7.

3.2. Autocorrelation Analysis of Energy Consumption Data

In order to understand the time series characteristics of ship energy consumption data and to improve the accuracy of the ship fuel use prediction model, the ship energy consumption data were characterized using autocorrelation coefficients and partial autocorrelation coefficients [33,34]. Figure 8 and Figure 9 show the distribution of the autocorrelation function and partial autocorrelation function of fuel consumption data with a lag of 1 to 50 h. From the analysis of Figure 8a and Figure 9a, it can be seen that the correlation coefficients decrease almost linearly in the range of the 50 h lag, but overall, they are at a higher level. From the analysis of Figure 8b and Figure 9b, it can be seen that the partial autocorrelation coefficients remain high in the lag of 1 h, 2 h, and 3 h, and remain at a lower but recovered to a higher level in the range of the 22 h to 28 h lag, and also had a higher partial autocorrelation coefficient after 45 h. This indicates that the ship energy consumption data have time series characteristics, the ship energy consumption data still have some influence on the previous data within a certain lag range, and the value of the former moment data has a periodic influence on the value of the latter moment data. For this reason, this paper adopts the TCN neural network to extract the implied map** relationship in the data, then uses the GRU neural network to enhance the fitting effect, and finally, the multi-head self-attention mechanism is employed to further excavate the connection between the before and after input data, so as to predict the ship’s energy consumption.

3.3. Correlation Analysis and Feature Selection

During voyages, ships are subject to wind resistance and water resistance. Among them, the water resistance is divided into two parts: static resistance and wave-adding resistance.
The static resistance and the wave-adding resistance can be obtained, respectively, by Equations (16) and (17):
C S = C F ( 1 + k ) + C A + C W + C B + C S i + C R
C w a v e = 0.64 ζ c 2 B 2 k 2 ρ g / L
where CS is the static resistance, and CF is the frictional resistance. k is the viscous resistance factor, CA is the appendage resistance, CW is the wave-making resistance, CB is the bulbous bow additional resistance, and CSi and CR are the stern immersion additional resistance and the relevant resistance. Cwave is the wave-adding resistance, ζc is the characteristic wave height, B is the breadth of the ship, k2 is the block coefficient, ρ is the density of the sea water, and L denotes the length of the ship.
Wind resistance can be obtained by Equation (18):
C w i n d = 1 2 k 1 ρ a V w i n d 2 A s
where Cwave is the wind resistance, k1 is the air coefficient resistance, ρa is the density of air, Vwind is the wind speed, and As is the area of the ship’s positive projection on the water surface.
The total resistance includes static resistance, wave-adding resistance, and wind resistance:
C = C S + C w a v e + C w i n d
In order for a ship to continue sailing at a specific speed, the main engine must consume fuel and thus provide a certain amount of power to drive the propeller in order to generate thrust to propel the ship forward. The effective thrust of the propeller should balance the hull resistance, which suggests that the fuel consumption of a ship is affected by environmental factors, and that further analyses of this effect can improve the accuracy of the predictions.
Figure 10a–c and Figure 11a–c show the distribution of environmental characteristics during ship operation. Figure 10d and Figure 11d show the distribution of instantaneous fuel consumption at different moments during the ship’s voyage. It can be seen that both the environmental variables and the fuel consumption have a certain time series characteristic, and the environmental factors have a clearer influence on the fuel consumption of ships. In addition, there are significant differences in those parameters at different times and locations.
To further investigate the relationship between characteristic parameters and ship energy consumption during voyages, to screen characteristic input variables, and to improve prediction accuracy, the correlation analysis of the 12 characteristic variables and the ship fuel consumption rate was carried out. The Pearson correlation coefficient and the maximum information coefficient were selected as the correlation evaluation indexes, and the specific calculation methods of the maximum information coefficient are shown in Equations (14) and (15); the results of the correlation analyses are shown in Figure 12, Figure 13, Figure 14 and Figure 15. In Figure 12 and Figure 14, values larger than 0.5 are shown in white; in Figure 13 and Figure 15, values larger than 0.8 are shown in white.
From the results of the correlation analysis, it can be seen that the Pearson correlation coefficient between SS, SP, and FC is larger than the other features, indicating that there is a large linear correlation between these parameters, and the shaft speed and shaft power can directly reflect the changes in fuel consumption. There is a negative correlation between WH, WD, WS, and SOG, and the SOG will be reduced when the wave height and wind speed increase and the wind direction changes, which indicates that the navigational environmental factors have a certain influence on the ship speed, which in turn affects the ship’s fuel consumption, and that there exists a certain non-linear relationship between these characteristics and the fuel consumption. The correlation analysis of ship fuel usage and its multiple influencing parameters is of great significance to establish a prediction model of ship fuel usage.
In addition, since the actual wind speed is obtained by vector synthesis from the ECMWF data, this indicates that there exists a certain map** relationship between them, which will lead to the endogeneity problem of the model. At the same time, from Figure 10, the correlation between longitude and latitude and the other characteristic variables is relatively more obvious, taking into account that the strong correlation of the characteristic variables will result in the problem of multiple covariance in the input variables, which can easily cause the overfitting of the model. The four characteristic variables of longitude, latitude, the 10 m u component of wind, and the 10 m v component of wind are eliminated in this paper. The remaining seven variables are selected as feature inputs to predict the ship’s fuel consumption.

4. Energy Consumption Prediction Model Establishment and Analysis

4.1. Prediction Model Establishment

The complex sea conditions during voyages lead to drastic changes in the ship’s energy consumption, and for ship operators, timely and accurate knowledge of the ship’s instantaneous energy consumption and energy consumption distribution characteristics is beneficial to the ship’s energy-saving voyage.
After the data processing process, this paper finds that the ship’s energy consumption data are typical time series data, and the data of a certain moment are affected by the data of the previous moment, and there exists a certain degree of periodicity. For this reason, this paper establishes the ship energy consumption prediction model shown in Figure 16. In terms of prediction models, this paper proposes a combined prediction model based on the TCN-GRU and multi-head attention mechanism, in which the TCN and GRU modules achieve the extraction of time series features and the mining of map** relationships between different parameters; the multi-head self-attention mechanism extracts the implicit correlations in the data before and after, and finally realizes the accurate prediction of the ship energy consumption data. In terms of feature selection, this paper uses the self-attention mechanism, which is based on a combination of the TCN and GRU, and the multi-head self-attention mechanism (TGMA model). This paper uses the autocorrelation coefficient and partial autocorrelation coefficient to investigate the time series characteristics of ship energy consumption data, and to initially judge the relationship between the input features and ship energy consumption data through the spatial distribution, and then to further select the features through the maximum information coefficient and feature analysis. The flow of the model is as follows:
  • Acquisition of general parameters and fuel consumption data during the operation of the ship and the surrounding environmental parameters during the voyage;
  • Examine the distribution and spatial distribution characteristics of the data and perform a correlation analysis between the input features and the ship energy consumption data in order to select the input features for the model;
  • The pre-processed features and ship energy consumption data are input into the TGMA model, and the ship energy consumption data at future moments are obtained by learning the features from the training set.

4.2. Validation of the TGMA model

After feature selection and data processing, 1100 and 850 data were obtained for Case 1 and Case 2, respectively, after normalizing the data. This paper divides the dataset into the training set and the test set by an interleaved approach; the input features are SOG, COG, WH, WD, WS, SS, and SP, and the output data are the hourly rate of fuel consumption of the ship. The ship energy consumption prediction model was experimentally validated, and the TGMA prediction results are shown in Figure 17, Figure 18, Figure 19 and Figure 20.
The ship energy consumption prediction model was built using MATLAB R2023b. All the experiments were conducted on a 64-bit Windows 11 operating system with an Intel Core i5-10200H CPU, and the parameters of the model were set as in Table 5.
The analysis of the experiments shows that the predicted values of energy consumption using the TGMA model are highly consistent with the actual values. This result not only demonstrates the accuracy of the model in predicting ship fuel consumption, but also reflects the sensitivity of the model to sudden changes in fuel consumption. Through the sensitive responsiveness, the TGMA model could effectively capture the subtle dynamics of changes in speed due to changes in sea state, thus providing strong support for the prediction of fuel consumption during ship navigation. In complex sea conditions, this capability can help ships under navigation to accurately grasp the changes in fuel consumption and provide data support for energy efficiency optimization during ship operation. Therefore, the TGMA model proposed in this paper is not only innovative in theory, but also shows significant value in practical applications, providing new methods and ideas for future applications and research in a wider range of fields.

4.3. Comparison of Different Prediction Models

To objectively evaluate the accuracy of the prediction results, it is essential to select appropriate evaluation metrics that provide a precise and comprehensive description of the predictive performance. In this paper, the metrics used to assess prediction accuracy include mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), mean square error (MSE), and the coefficient of determination (R2). The specific calculation equations for these metrics are as follows:
M A E ( y , y ˜ ) = 1 m i = 1 m y i y ˜ i
R M S E ( y , y ˜ ) = 1 m i = 1 m ( y i y ˜ i ) 2
M A P E ( y , y ˜ ) = 1 m i = 1 m y i y ˜ i y i × 100 %
M S E ( y , y ˜ ) = 1 m i = 1 m ( y i y i ˜ ) 2
R 2 ( y , y ˜ ) = 1 i = 1 m ( y i y i ˜ ) 2 i = 1 m ( y i y ¯ i ) 2 × 100 %
where yi, y ~ i ,   y - i are the true, predicted, and average values, respectively.
To further verify the predictive performance of the TGMA model, comparative analyses are conducted using BP, SVR, LSTM, and TCN-GRU models. The training and test sets are kept consistent with those used for the TGMA model. The evaluation metrics of the prediction results from each model are compared to assess their accuracy. The prediction results for each energy consumption model are presented in Figure 21 and Figure 22, and the scatter plots of the prediction results for each algorithm are shown in Figure 23, Figure 24, Figure 25 and Figure 26.
The performance evaluation metrics of the various models in the testing phase are presented in Table 6 and Table 7. The analysis of the data shows that the TGMA model exhibits the best performance in the prediction task. In Case 1, compared to the BP neural network, SVR, LSTM, and GRU models, the MAE of the TGMA model decreased by 34%, 24%, 28%, and 23%; the RMSE decreased by 34%, 35%, 36%, and 26%; and the MAPE decreased by 35%, 24%, 28%, and 23%; and the MSE decreased by 56%, 57%, 59%, and 46%; while the R2 increased by 5.08%, 5.31%, 5.8%, and 3.34%, respectively. In Case 2, the MAE of the TGMA model decreased by 18%, 8%, 10%, and 12%; the RMSE decreased by 17%, 12%, 15%, and 14%; the MAPE decreased by 18%, 8%, 10%, and 17%; and the MSE decreased by 32%, 23%, 29%, and 26%; while the R2 increased by 2.86%, 1.88%, 2.49%, and 2.17%, respectively. It clearly shows that the TGMA model significantly outperforms the other comparative models in terms of accuracy and prediction performance, highlighting its strong capability in handling complex time series prediction tasks, which proves that the TGMA model successfully extracts the high-dimensional nonlinear map** relationship between various ship operating parameters and environmental parameters and their relationship with ship fuel consumption.
To verify the effectiveness of the MHSA mechanism in predicting fuel consumption under the same conditions, we further compared the prediction performance of the TGMA model with that of the TCN-GRU model. The results show that in Case 1, the MAE, RMSE, MAPE, and MSE of the TCN-GRU model incorporating the MHSA mechanism are reduced by 18%, 20%,18%, and 35%, respectively, while the R2 improves by 2.16% compared to the TCN-GRU. In case 2, the MAE, RMSE, MAPE, and MSE of the TGMA model are reduced by 12%, 9%, 12%, and 18%, respectively, while the R2 improves by 1.33%. This result illustrates the stability and applicability of MHSA in time series prediction. The analysis shows that the proposed TGMA model has outstanding applicability and stability by combining the GRU, TCN, and MHSA algorithms. The model significantly improves the prediction capability of time series data, enabling it to accurately capture the changes in fuel consumption during ship operation, thus ensuring the high accuracy and reliability of the prediction results.

5. Conclusions

In this paper, a ship energy consumption prediction model TCN-GRU-MHSA (TGMA) combining TCN, GRU, and multi-head self-attention algorithms is proposed to solve the problem of low accuracy and poor effect of ship energy consumption prediction. Firstly, the maximum information coefficient and the Pearson coefficient are used to select the input feature parameters of the ship energy consumption prediction model, and at the same time, the redundant feature data are eliminated according to the relationship between the features, so as to reduce the noise interference. After that, the TCN-GRU network is used to extract the time series features of multiple input data, which improves the prediction ability of the model, and finally, the multi-head self-attention mechanism is introduced to further explore the relationship between the features, so as to predict the energy consumption of ships with high accuracy.
The TGMA model was validated using voyage data, and the results demonstrate that the TGMA model outperforms BP, SVR, LSTM, GRU, and TCN-GRU models in prediction accuracy. Specifically, the TGMA model achieved a prediction accuracy of 96.04%, with a prediction error reduced to 0.00931. This indicates that the TGMA model can accurately predict the ship’s energy consumption during operation. Additionally, the model exhibits superior stability and applicability, providing valuable data support for optimizing ship energy efficiency and enabling intelligent control. Consequently, the TGMA model contributes to reducing carbon emissions during ship operations.
In this study, we did not obtain information on the ship’s trim and lateral heel, and at the same time, we did not take into account the effect of fouling on the ship’s operational status. In future research, we will introduce new features and develop additional models to enhance the performance of the model in forecasting energy consumption under various sea states and environmental conditions. We aim to improve the model’s generalization ability, thereby increasing the energy efficiency of ships and promoting the ship** industry in achieving energy savings and emission reductions.

Author Contributions

Conceptualization, Y.L. (Yuhang Liu) and K.W.; methodology, K.W.; software, Y.L. (Yuhang Liu) and Y.Z.; validation, Z.L., R.M. and K.W.; formal analysis, Y.L. (Yuhang Liu); investigation, K.W. and L.H.; resources, K.W. and Y.L. (Yong Lu); data curation, Y.L. (Yong Lu) and Y.Z.; writing—original draft preparation, Y.L. (Yuhang Liu) and Z.L.; writing—review and editing, K.W. and Y.Z.; visualization, L.H.; supervision, L.H.; project administration, R.M.; funding acquisition, K.W. and R.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key R&D Program of China (2022YFB4300803), the National Natural Science Foundation of China (52271305, 52071045), and Fundamental Research Funds for the Central Universities (3132023525, 3132024207).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets presented in this article are not readily available, as the data are part of an ongoing study.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Álvarez, P.S. From maritime salvage to IMO 2020 strategy: Two actions to protect the environment. Mar. Pollut. Bull. 2021, 170, 112590. [Google Scholar] [CrossRef] [PubMed]
  2. Wan, Z.; Zhou, X.; Zhang, Q.; Chen, J. Influence of sulfur emission control areas on particulate matter emission: A difference-in-differences analysis. Mar. Policy 2021, 130, 104584. [Google Scholar] [CrossRef]
  3. Wu, M.; Li, K.X.; ** sector: Drivers, challenges, and impacts. Mar. Policy 2022, 138, 104989. [Google Scholar] [CrossRef]
  4. Zhou, Y.; Li, X.; Yuen, K.F. Sustainable ship**: A critical review for a unified framework and future research agenda. Mar. Policy 2023, 148, 105478. [Google Scholar] [CrossRef]
  5. Ruan, Z.; Huang, L.; Wang, K.; Ma, R.; Wang, Z.; Zhang, R.; Zhao, H.; Wang, C. A novel prediction method of fuel consumption for wing-diesel hybrid vessels based on feature construction. Energy 2024, 286, 129516. [Google Scholar] [CrossRef]
  6. Yang, L.; Chen, G.; Zhao, J.; Rytter, N.G.M. Ship speed optimization considering ocean currents to enhance environmental sustainability in maritime ship**. Sustainability 2020, 12, 3649. [Google Scholar] [CrossRef]
  7. **e, W.; Xu, S.; Zhang, N.; Liu, J.; Yin, K.; Mao, L. Ship Speed Optimization Method in Canal Environments Considering Waiting Times for Crossing Locks. J. Mar. Sci. Eng. 2024, 12, 375. [Google Scholar] [CrossRef]
  8. Wang, K.; Xu, H.; Li, J.; Huang, L.; Ma, R.; Jiang, X.; Yuan, Y.; Mwero, N.A.; Sun, P.; Negenborn, R.R. A novel dynamical collaborative optimization method of ship energy consumption based on a spatial and temporal distribution analysis of voyage data. Appl. Ocean. Res. 2021, 112, 102657. [Google Scholar] [CrossRef]
  9. Wang, K.; Wang, J.; Huang, L.; Yuan, Y.; Wu, G.; **ng, H.; Wang, Z.; Wang, Z.; Jiang, X. A comprehensive review on the prediction of ship energy consumption and pollution gas emissions. Ocean. Eng. 2022, 266, 112826. [Google Scholar] [CrossRef]
  10. Lv, Z.; Wang, N.; Lou, R.; Tian, Y.; Guizani, M. Towards carbon Neutrality: Prediction of wave energy based on improved GRU in Maritime transportation. Appl. Energy 2023, 331, 120394. [Google Scholar] [CrossRef]
  11. Zhang, B.; Hirayama, K.; Ren, H.; Wang, D.; Li, H. Ship anomalous behavior detection using clustering and deep recurrent neural network. J. Mar. Sci. Eng. 2023, 11, 763. [Google Scholar] [CrossRef]
  12. Sun, J.; Zeng, H.; Ye, K. Short-Term Exhaust Gas Temperature Trend Prediction of a Marine Diesel Engine Based on an Improved Slime Mold Algorithm-Optimized Bidirectional Long Short-Term Memory—Temporal Pattern Attention Ensemble Model. J. Mar. Sci. Eng. 2024, 12, 541. [Google Scholar] [CrossRef]
  13. Zhang, B.; Wang, S.; Deng, L.; Jia, M.; Xu, J. Ship motion attitude prediction model based on IWOA-TCN-Attention. Ocean. Eng. 2023, 272, 113911. [Google Scholar] [CrossRef]
  14. Jiang, J.; Zuo, Y. Prediction of ship trajectory in nearby port waters based on attention mechanism model. Sustainability 2023, 15, 7435. [Google Scholar] [CrossRef]
  15. Beşikçi, E.B.; Arslan, O.; Turan, O.; Ölçer, A.I. An artificial neural network based decision support system for energy efficient ship operations. Comput. Oper. Res. 2016, 66, 393–401. [Google Scholar] [CrossRef]
  16. Farag, Y.B.; Ölçer, A.I. The development of a ship performance model in varying operating conditions based on ANN and regression techniques. Ocean. Eng. 2020, 198, 106972. [Google Scholar] [CrossRef]
  17. Wang, S.; Ji, B.; Zhao, J.; Liu, W.; Xu, T. Predicting ship fuel consumption based on LASSO regression. Transp. Res. Part D Transp. Environ. 2018, 65, 817–824. [Google Scholar] [CrossRef]
  18. Li, X.; Zuo, Y.; Jiang, J. Application of regression analysis using broad learning system for time-series forecast of ship fuel consumption. Sustainability 2022, 15, 380. [Google Scholar] [CrossRef]
  19. Chen, Z.S.; Lam, J.S.L.; **ao, Z. Prediction of harbour vessel fuel consumption based on machine learning approach. Ocean Eng. 2023, 278, 114483. [Google Scholar] [CrossRef]
  20. Wang, K.; Hua, Y.; Huang, L.; Guo, X.; Liu, X.; Ma, Z.; Ma, R.; Jiang, X. A novel GA-LSTM-based prediction method of ship energy usage based on the characteristics analysis of operational data. Energy 2023, 282, 128910. [Google Scholar] [CrossRef]
  21. Zhang, M.; Tsoulakos, N.; Kujala, P.; Hirdaris, S. A deep learning method for the prediction of ship fuel consumption in real operational conditions. Eng. Appl. Artif. Intell. 2024, 130, 107425. [Google Scholar] [CrossRef]
  22. Li, F.; Zuo, W.; Zhou, K.; Li, Q.; Huang, Y. State of charge estimation of lithium-ion batteries based on PSO-TCN-Attention neural network. J. Energy Storage 2024, 84, 110806. [Google Scholar] [CrossRef]
  23. Shi, T.; Li, P.; Yang, W.; Qi, A.; Qiao, J. Application of TCN-biGRU neural network in PM 2.5 concentration prediction. Environ. Sci. Pollut. Res. 2023, 30, 119506–119517. [Google Scholar] [CrossRef] [PubMed]
  24. Li, L.; Li, Y.; Mao, R.; Li, L.; Hua, W.; Zhang, J. Remaining useful life prediction for lithium-ion batteries with a hybrid model based on TCN-GRU-DNN and dual attention mechanism. IEEE Trans. Transp. Electrif. 2023, 9, 4726–4740. [Google Scholar] [CrossRef]
  25. Hu, X.; Zhou, X.; Liu, H.; Song, H.; Wang, S.; Zhang, H. Enhanced predictive modeling of hot rolling work roll wear using TCN-LSTM-Attention. Int. J. Adv. Manuf. Technol. 2024, 131, 1335–1346. [Google Scholar] [CrossRef]
  26. Ke, L.; Fang, L.; Meng, J.; Peng, J.; Wu, J.; Lin, M.; Stroe, D.-I. Identification of the aging state of lithium-ion batteries via temporal convolution network and self-attention mechanism. J. Energy Storage 2024, 84, 110999. [Google Scholar] [CrossRef]
  27. Kara, A. Multi-scale deep neural network approach with attention mechanism for remaining useful life estimation. Comput. Ind. Eng. 2022, 169, 108211. [Google Scholar] [CrossRef]
  28. Li, Z.; Li, L.; Chen, J.; Wang, D. A multi-head attention mechanism aided hybrid network for identifying batteries’ state of charge. Energy 2024, 286, 129504. [Google Scholar] [CrossRef]
  29. Zhao, F.; Feng, F.; Ye, S.; Mao, Y.; Chen, X.; Li, Y.; Ning, M.; Zhang, M. Multi-head self-attention mechanism-based global feature learning model for ASD diagnosis. Biomed. Signal Process. Control 2024, 91, 106090. [Google Scholar] [CrossRef]
  30. Wang, Z.; Liu, N.; Chen, C.; Guo, Y. Adaptive self-attention LSTM for RUL prediction of lithium-ion batteries. Inf. Sci. 2023, 635, 398–413. [Google Scholar] [CrossRef]
  31. Kinney, J.B.; Atwal, G.S. Equitability, mutual information, and the maximal information coefficient. Proc. Natl. Acad. Sci. USA 2014, 111, 3354–3359. [Google Scholar] [CrossRef] [PubMed]
  32. Wang, J.Q.; Du, Y.; Wang, J. LSTM based long-term energy consumption prediction with periodicity. Energy 2020, 197, 117197. [Google Scholar] [CrossRef]
  33. Jia, F.; Zhu, Z.; Dai, W. Short-term forecasting of streamflow by integrating machine learning methods combined with metaheuristic algorithms. Expert Syst. Appl. 2024, 245, 123076. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of multi-head self-attention.
Figure 1. Schematic diagram of multi-head self-attention.
Jmse 12 01098 g001
Figure 2. Schematic diagram of self-attention module.
Figure 2. Schematic diagram of self-attention module.
Jmse 12 01098 g002
Figure 3. The process of data acquisition.
Figure 3. The process of data acquisition.
Jmse 12 01098 g003
Figure 4. The diagram of the research objective.
Figure 4. The diagram of the research objective.
Jmse 12 01098 g004
Figure 5. The diagram of the sailing routes.
Figure 5. The diagram of the sailing routes.
Jmse 12 01098 g005
Figure 6. Frequency histogram of feature distribution for Case 1.
Figure 6. Frequency histogram of feature distribution for Case 1.
Jmse 12 01098 g006
Figure 7. Frequency histogram of feature distribution for Case 2.
Figure 7. Frequency histogram of feature distribution for Case 2.
Jmse 12 01098 g007
Figure 8. Results of autocorrelation analysis of energy consumption data for Case 1: (a) autocorrelation function; (b) partial autocorrelation function.
Figure 8. Results of autocorrelation analysis of energy consumption data for Case 1: (a) autocorrelation function; (b) partial autocorrelation function.
Jmse 12 01098 g008
Figure 9. Results of autocorrelation analysis of energy consumption data for Case 2: (a) autocorrelation function; (b) partial autocorrelation function.
Figure 9. Results of autocorrelation analysis of energy consumption data for Case 2: (a) autocorrelation function; (b) partial autocorrelation function.
Jmse 12 01098 g009
Figure 10. Distribution of environmental characteristics and fuel consumption (Case 1).
Figure 10. Distribution of environmental characteristics and fuel consumption (Case 1).
Jmse 12 01098 g010
Figure 11. Distribution of environmental characteristics and fuel consumption (Case 2).
Figure 11. Distribution of environmental characteristics and fuel consumption (Case 2).
Jmse 12 01098 g011
Figure 12. Pearson correlation analysis (Case 1).
Figure 12. Pearson correlation analysis (Case 1).
Jmse 12 01098 g012
Figure 13. Maximum information coefficient analysis (Case 1).
Figure 13. Maximum information coefficient analysis (Case 1).
Jmse 12 01098 g013
Figure 14. Pearson correlation analysis (Case 2).
Figure 14. Pearson correlation analysis (Case 2).
Jmse 12 01098 g014
Figure 15. Maximum information coefficient analysis (Case 2).
Figure 15. Maximum information coefficient analysis (Case 2).
Jmse 12 01098 g015
Figure 16. Structure of the model developed in this paper.
Figure 16. Structure of the model developed in this paper.
Jmse 12 01098 g016
Figure 17. Prediction results of the TGMA model (Case 1).
Figure 17. Prediction results of the TGMA model (Case 1).
Jmse 12 01098 g017
Figure 18. Prediction results of the TGMA model (Case 2).
Figure 18. Prediction results of the TGMA model (Case 2).
Jmse 12 01098 g018
Figure 19. Scatterplot of the distribution of TGMA’s prediction results (Case 1).
Figure 19. Scatterplot of the distribution of TGMA’s prediction results (Case 1).
Jmse 12 01098 g019
Figure 20. Scatterplot of the distribution of TGMA’s prediction results (Case 2).
Figure 20. Scatterplot of the distribution of TGMA’s prediction results (Case 2).
Jmse 12 01098 g020
Figure 21. Comparison of prediction results of different models (Case 1).
Figure 21. Comparison of prediction results of different models (Case 1).
Jmse 12 01098 g021
Figure 22. Comparison of prediction results of different models (Case 2).
Figure 22. Comparison of prediction results of different models (Case 2).
Jmse 12 01098 g022
Figure 23. Comparison of scatterplots of different prediction results for Case 1: (a) BP model; (b) SVR model; (c) LSTM model; (d) GRU model.
Figure 23. Comparison of scatterplots of different prediction results for Case 1: (a) BP model; (b) SVR model; (c) LSTM model; (d) GRU model.
Jmse 12 01098 g023
Figure 24. Comparison of scatterplots of different prediction results for Case 2: (a) BP model; (b) SVR model; (c) LSTM model; (d) GRU model.
Figure 24. Comparison of scatterplots of different prediction results for Case 2: (a) BP model; (b) SVR model; (c) LSTM model; (d) GRU model.
Jmse 12 01098 g024aJmse 12 01098 g024b
Figure 25. Scatterplot of TCN-GRU model prediction results (Case 1).
Figure 25. Scatterplot of TCN-GRU model prediction results (Case 1).
Jmse 12 01098 g025
Figure 26. Scatterplot of TCN-GRU model prediction results (Case 2).
Figure 26. Scatterplot of TCN-GRU model prediction results (Case 2).
Jmse 12 01098 g026
Table 1. Abbreviations.
Table 1. Abbreviations.
AbbreviationExplanation
LSTMLong Short-term Memory
MHSAMulti-head Self-attention
SVRSupport Vector Regression
BPBack Propagation
BiGRUBidirectional Recurrent Neural Network
BiLSTMBidirectional Long Short-term Memory
PCAPrincipal Component Analysis
LASSOLeast Absolute Shrinkage and Selection Operator
RFRandom Forest
RRRidge Regression
Table 2. General information about the ships studied in this paper.
Table 2. General information about the ships studied in this paper.
ItemsParameterItemsParameter
Length327 mDesign speed14.5 kn
Depth29 mNumber of blades5
Width55 mDiameter of propeller9.7 m
Deadweight297,959 tEngine rated power19,000 kW
Draft21.4 mEngine rated speed73 rpm
Table 3. The data acquisition methods.
Table 3. The data acquisition methods.
ItemAcquisition EquipmentOnboard Sensors
Sailing speed and positionGPSJmse 12 01098 i001
Sea mileage and ship speedSpeed logJmse 12 01098 i002
Shaft speed and shaft powerShaft power sensorJmse 12 01098 i003
Fuel consumptionFuel consumption sensorJmse 12 01098 i004
Table 4. The features obtained in this paper and their abbreviations.
Table 4. The features obtained in this paper and their abbreviations.
No.Feature VariablesAbbreviation
1Speed over groundSOG
2Course over groundCOG
3LongitudeLON
4LatitudeLAT
510 m u component of wind10U
610 m v component of wind10V
7Wave heightWH
8Wind directionWD
9Wind speedWS
10Shaft speedSS
11Shaft powerSP
12Fuel consumptionFC
Table 5. Parameters of TGMA model.
Table 5. Parameters of TGMA model.
ParametersValues
Epoch300
OptimizerAdam
Batch_size64
GRU_Layers100
Num_head2
Learning_rate0.005
Batch_sizeValues
GRU_Layers300
Table 6. The prediction accuracy of different models in Case 1.
Table 6. The prediction accuracy of different models in Case 1.
AlgorithmsMAERMSEMAPEMSER2
BP0.014190.018180.625%0.0003305190.96%
SVR0.012320.0183520.539%0.0003367890.73%
LSTM0.013010.0188380.57%0.0003548790.24%
GRU0.012180.0163020.535%0.0002657692.7%
TCN-GRU0.011350.0149210.497%0.0002226493.88%
TGMA0.009310.0120010.409%0.0001440396.04%
Table 7. The prediction accuracy of different models in Case 2.
Table 7. The prediction accuracy of different models in Case 2.
AlgorithmsMAERMSEMAPEMSER2
BP0.012930.017420.569%0.000303490.91%
SVR0.011570.0164540.507%0.0002707491.89%
LSTM0.011760.0170640.517%0.0002911791.28%
GRU0.012750.0167430.56%0.0002803291.60%
TCN-GRU0.012090.0158870.531%0.0002524192.44%
TGMA0.010620.0144190.466%0.0002079293.77%
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

Liu, Y.; Wang, K.; Lu, Y.; Zhang, Y.; Li, Z.; Ma, R.; Huang, L. A Ship Energy Consumption Prediction Method Based on TGMA Model and Feature Selection. J. Mar. Sci. Eng. 2024, 12, 1098. https://doi.org/10.3390/jmse12071098

AMA Style

Liu Y, Wang K, Lu Y, Zhang Y, Li Z, Ma R, Huang L. A Ship Energy Consumption Prediction Method Based on TGMA Model and Feature Selection. Journal of Marine Science and Engineering. 2024; 12(7):1098. https://doi.org/10.3390/jmse12071098

Chicago/Turabian Style

Liu, Yuhang, Kai Wang, Yong Lu, Yongfeng Zhang, Zhongwei Li, Ranqi Ma, and Lianzhong Huang. 2024. "A Ship Energy Consumption Prediction Method Based on TGMA Model and Feature Selection" Journal of Marine Science and Engineering 12, no. 7: 1098. https://doi.org/10.3390/jmse12071098

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