Ship oil consumption prediction method based on DBO optimization

By using BiLSTM-Attention network model and DBO optimization algorithm in ship fuel consumption modeling, the problem of difficulty in finding parameters and low prediction accuracy in ship fuel consumption modeling is solved, and more accurate fuel consumption prediction is achieved.

CN119272004APending Publication Date: 2025-01-07DALIAN MARITIME UNIVERSITY +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411334782.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the existing ship fuel consumption modeling methods, the problem of difficulty in finding parameters and low prediction accuracy, especially the uncertainty and assumptions of the white box model affect the accuracy. The black box model requires a lot of experiments, and the extrapolation ability of the gray box model can be used. Weak explanation.

Method used

The BiLSTM-Attention network model based on DBO optimization is adopted. By acquiring and preprocessing the historical navigation data of the ship, a BiLSTM-Attention network model is established, and the DBO optimization algorithm is used to optimize the ship's fuel consumption prediction model to improve the prediction accuracy.

Benefits of technology

It improves the accuracy and speed of ship fuel consumption prediction, solves the problems of difficulty in finding parameters and low prediction accuracy, and achieves more accurate fuel consumption prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272004A_ABST
    Figure CN119272004A_ABST
Patent Text Reader

Abstract

The invention discloses a DBO optimization-based ship fuel consumption prediction method. The method comprises the following steps: S1, acquiring historical navigation data of a ship; s2, preprocessing the historical navigation data of the ship to obtain processed ship data; s3, establishing a ship fuel consumption prediction model; s4, optimizing the ship fuel consumption prediction model to obtain an optimized ship fuel consumption prediction model; s5, training the ship fuel consumption prediction model to obtain a trained ship fuel consumption prediction model; and S6, testing the trained ship oil consumption prediction model based on the test set to obtain a final ship oil consumption prediction model, and predicting the ship oil consumption based on the final ship oil consumption prediction model. According to the method, the BiLSTM-Attention network model is established and serves as the ship oil consumption prediction model, the oil consumption prediction precision is improved, meanwhile, the ship oil consumption prediction model is optimized based on the DBO optimization algorithm, and the technical problems that in the existing ship oil consumption modeling process, parameter searching is difficult, and the prediction precision is not high are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship fuel consumption prediction, and in particular to a ship fuel consumption prediction method based on DBO optimization. Background Art

[0002] In recent years, with the development of the world's population and economy, the proportion of shipping in the world's transportation industry has increased year by year along with the continuous development of global trade.

[0003] According to different technical routes, the ship fuel consumption modeling methods mainly include three categories: white box model, black box model, and gray box model. Among them, the white box model is a commonly used system modeling method. It uses the physical logical relationship and empirical formula between the internal and external parameters of the system to establish the physical connection between the input and output of the system, but there are problems such as uncertainty and assumptions that affect the accuracy of the prediction. It requires prior knowledge and has a low accuracy rate. The black box model is a physical logical relationship that is separated from the internal and external parameters of the system. It does not require any prior knowledge of ship performance, but requires a large number of experiments to establish a more accurate prediction model. The gray box model uses basic physical principles and measurement data to effectively combine the advantages of the white box model and the black box model, but it has weak extrapolation ability and poor interpretability. Summary of the invention

[0004] The present invention provides a ship fuel consumption prediction method based on DBO optimization, so as to overcome the technical problems that parameters are difficult to find and the prediction accuracy is low in the existing ship fuel consumption modeling process.

[0005] In order to achieve the above object, the technical solution of the present invention is:

[0006] A ship fuel consumption prediction method based on DBO optimization, characterized in that the specific steps include:

[0007] S1: Obtain historical navigation data of the ship;

[0008] S2: preprocessing the historical ship navigation data to obtain processed ship data, and dividing the processed ship data into a training set and a test set;

[0009] S3: Establish a BiLSTM-Attention network model and use it as a ship fuel consumption prediction model;

[0010] S4: Optimizing the ship fuel consumption prediction model based on the DBO optimization algorithm to obtain an optimized ship fuel consumption prediction model;

[0011] S5: training the ship fuel consumption prediction model based on the training set to obtain a trained ship fuel consumption prediction model;

[0012] S6: The trained ship fuel consumption prediction model is tested based on the test set. When the prediction accuracy of the trained ship fuel consumption prediction model meets the requirements, the final ship fuel consumption prediction model is obtained, and the ship fuel consumption is predicted based on the final ship fuel consumption prediction model.

[0013] Furthermore, in S3, the established BiLSTM-Attention network model includes an input layer, a BiLSTM layer, an Attention layer, and an output layer connected in sequence;

[0014] The input layer is used to extract and convert the input data to obtain a feature sequence, and transmit it to the BiLSTM layer;

[0015] The BiLSTM layer calculates the hidden states of the forward layer and the backward layer at the current moment based on the feature sequence, and concatenates the hidden states of the forward layer and the backward layer at the current moment to obtain a neuron output value;

[0016] The Attention layer is used to calculate the weight of the feature sequence at each moment, and perform weighted summation on the obtained weight and the neuron output value to obtain a weighted feature vector;

[0017] The output layer uses a linear activation function to perform a linear transformation on the weighted feature vector and adds a bias to obtain a predicted value of ship fuel consumption.

[0018] Furthermore, in S2, the process of preprocessing the historical navigation data of the ship is:

[0019] 1) Detect and remove data outliers in historical ship navigation data;

[0020] 2) Use the Lagrange interpolation method to interpolate the breakpoint data in the historical navigation data of the ship after removing the outliers to obtain complete data;

[0021] 3) Using kernel principal component analysis to reduce the dimension of the complete data.

[0022] Furthermore, in S1, the historical navigation data of the ship includes: ship fuel consumption, main engine speed, propeller speed, wind speed, ground speed, wave height, bow draft, stern draft, port draft, and starboard draft.

[0023] Further, in S4, the process of optimizing the ship fuel consumption prediction model based on the DBO optimization algorithm is:

[0024] S41: Initialize the parameters of the ship fuel consumption prediction model and the DBO optimization algorithm, and set the dung beetle population and the maximum number of iterations. The dung beetle population includes rolling dung beetles, female dung beetles, larval dung beetles, and stealing dung beetles;

[0025] S42: Initializing a dung beetle population, calculating an initial fitness value of the dung beetle population, and sorting the initialized dung beetle population according to the size of the fitness value to obtain dung beetles with the optimal fitness value;

[0026] S43: Based on the dung beetles with the optimal fitness value, the positions of the initially generated dung beetle population are updated according to the formulas of rolling behavior, dancing behavior, breeding behavior, foraging behavior and stealing behavior, including:

[0027] The ball-rolling dung beetle updates its position through ball-rolling and dancing behaviors, which specifically include:

[0028] The rolling dung beetle updates its position by rolling the ball, and the position update formula is:

[0029] x i (t+1)=x i (t)+k*a*x i (t-1)+b*Δ x (1)

[0030] Δ x =|x i (t)-X w | (2)

[0031] When the ball-rolling dung beetle encounters an obstacle and cannot move forward, it updates its position through dancing behavior to adjust its direction of advance. At this time, the position update formula of the ball-rolling dung beetle is:

[0032] x i (t+1)=x i (t)+tanθ|x i (t)-x i (t-1)| (3)

[0033] Where: t is the current iteration number; α is a natural coefficient, indicating whether it deviates from the original direction, and its value is -1 or 1; k is the deflection coefficient; b is a constant; X w represents the global worst position; Δx is a reference object used to simulate the change of light intensity; θ is the deflection angle in the tangent function, and θ∈[0,π], at 0, When π, the position remains unchanged;

[0034] The female dung beetle updates its position through reproductive behavior, which specifically includes:

[0035] Set the upper and lower boundaries of the female dung beetle's egg-laying area to determine the egg-laying area, expressed as:

[0036] Lb * =max(X * *(1-R), Lb) (4)

[0037] Ub * =min(X * *(1+R),Ub) (5)

[0038] R=1-T max (6)

[0039] Where: X * is the current optimal hyperparameter combination, Lb * ,Ub * are the upper and lower bounds of the spawning area, Ub and Ub are the upper and lower bounds of the hyperparameter search space, T max is the maximum number of iterations;

[0040] The female dung beetle reproduces in the egg-laying area to update its position. Assuming that each female dung beetle only lays one egg in each iteration, the position update formula of the female dung beetle is:

[0041] B i (t+1)=X * +β 1 *(B i (t)-Lb * )+β 2 *(B i (t)-Ub * ) (7)

[0042] Where: B i (t) is the i-th spawning position at the t-th iteration; β is a random vector of size 1*Q, and Q is the number of parameters to be optimized;

[0043] The larval dung beetle updates its position through foraging behavior, which specifically includes:

[0044] Establish the optimal foraging area, expressed as:

[0045] Lb b =max(X b *(1-R), Lb) (8)

[0046] Ub b =min (X b *(1+R), Ub) (9)

[0047] In the optimal foraging area, the position update formula of the larval dung beetle is:

[0048]

[0049] Where: X b is the optimal parameter combination, is a random vector following a normal distribution, is a random vector with a value range of (0, 1); Lb b and Ub b They are the upper and lower limits of the larval dung beetle's foraging area;

[0050] The stealing dung beetle updates its position through stealing behavior, which specifically includes:

[0051] Let X b Is the best food source, so X b The surroundings are the optimal locations for competing for food. The thieving mantis updates the location of the best food source through stealing behavior, thereby updating the location. The position update formula of the thieving mantis is:

[0052] x i (t+1)=X b +S*ω*(|x i (t)-X * |+|x i (t)-X b |) (11)

[0053] Where: S is a constant, ω is a random vector following a normal distribution;

[0054] S44: recalculating the fitness value of the dung beetle population according to the updated position of the dung beetle population, and sorting the recalculated dung beetle population according to the size of the fitness value to obtain the optimal fitness value, and using the optimal fitness value as the number of hidden neurons and the learning rate of the ship fuel consumption prediction model, and then inputting the training set into the ship fuel consumption prediction model for prediction to obtain the predicted value, and calculating the average absolute error between the true value and the predicted value in the training set;

[0055] S45: Determine whether the mean absolute error meets the set requirements. If so, the optimal number of hidden neurons and learning rate are obtained, and the optimization process ends; otherwise, repeat S43-S45 until the optimal number of hidden neurons and learning rate are obtained.

[0056] Beneficial effects: The present invention establishes a BiLSTM-Attention network model and uses it as a ship fuel consumption prediction model. An attention mechanism is added to the model built based on BiLSTM to strengthen the correlation between input features and output features, thereby improving the prediction accuracy of fuel consumption. At the same time, the ship fuel consumption prediction model is optimized based on the DBO optimization algorithm, which can more accurately and quickly find the optimal parameter combination to obtain the optimized ship fuel consumption prediction model, thereby solving the technical problems of difficult parameter finding and low prediction accuracy in the existing ship fuel consumption modeling process. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0058] Figure 1 It is a flow chart of a ship fuel consumption prediction method based on DBO optimization in the present invention;

[0059] Figure 2 It is a speed sequence diagram after preliminary processing in an embodiment of the present invention;

[0060] Figure 3 It is a wind speed sequence diagram after preliminary processing in an embodiment of the present invention;

[0061] Figure 4 It is a sequence diagram of the main engine speed after preliminary processing in an embodiment of the present invention;

[0062] Figure 5 It is a fuel consumption sequence diagram of the main engine after preliminary processing in an embodiment of the present invention;

[0063] Figure 6 A ship fuel consumption prediction graph obtained based on a ship fuel consumption prediction model in an embodiment of the present invention;

[0064] Figure 7 This is a fuel consumption prediction graph obtained based on the LSTM model in an embodiment of the present invention;

[0065] Figure 8 This is a fuel consumption prediction graph obtained based on the BiLSTM model in an embodiment of the present invention;

[0066] Fig. 9 It is a comparison diagram of experimental results of three models in the embodiment of the present invention;

[0067] Fig.10 It is a comparison chart of various performance indicators of three models in the embodiment of the present invention;

[0068] Fig.11 is the R of the three models in the embodiment of the present invention 2 Line chart. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0070] This embodiment provides a ship fuel consumption prediction method based on DBO optimization, such as Figure 1 As shown, the specific steps include:

[0071] S1: Obtain historical navigation data of the ship;

[0072] In a specific embodiment, in S1, the historical navigation data of the ship includes: ship fuel consumption, main engine speed, propeller speed, wind speed, ground speed, wave height, bow draft, stern draft, port draft, and starboard draft.

[0073] S2: pre-processing the historical ship navigation data to obtain processed ship data, and dividing the processed ship data into a training set and a test set;

[0074] In a specific embodiment, in S2, the process of preprocessing the historical navigation data of the ship is:

[0075] 1) Detect and remove data outliers in historical ship navigation data;

[0076] 2) Use the Lagrange interpolation method to interpolate the breakpoint data in the historical navigation data of the ship after removing the outliers to obtain complete data;

[0077] 3) Using the kernel principal component analysis method to reduce the dimension of the complete data, including:

[0078] The complete data is standardized to conform to the standard normal distribution, and the overall mean of the data is 0;

[0079] The kernel function is used to calculate the similarity between the standardized data to form a kernel matrix;

[0080] Calculate the covariance matrix based on the kernel matrix;

[0081] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvectors and eigenvalues;

[0082] Select the eigenvectors corresponding to the first k largest eigenvalues ​​as the principal components, k≠0;

[0083] The selected principal components are used to reduce the dimension of the standardized data to obtain the reduced-dimensional data. S3: Establish a BiLSTM-Attention network model and use it as a ship fuel consumption prediction model;

[0084] In a specific embodiment, in S3, the established BiLSTM-Attention network model includes an input layer, a BiLSTM layer, an Attention layer and an output layer connected in sequence; the input layer is used to extract and convert the input data to obtain a feature sequence, and transmit it to the BiLSTM layer; the BiLSTM layer calculates the hidden states of the forward layer and the backward layer at the current moment based on the feature sequence, and concatenates the hidden states of the forward layer and the backward layer at the current moment to obtain the neuron output value; the Attention layer is used to calculate the weight of the feature sequence at each moment, and performs weighted summation of the obtained weight and the neuron output value to obtain a weighted feature vector; the output layer uses a linear activation function to perform a linear transformation on the weighted feature vector, and adds a bias to obtain a predicted value of ship fuel consumption.

[0085] Specifically, BiLSTM includes a forward LSTM layer and a backward LSTM layer. Each LSTM layer is a chain structure composed of many repeated basic units. The basic unit contains three gate structures: forget gate, input gate, and output gate, as well as the basic unit state. Information can be deleted or added to the basic unit state through calculations of the three gates, including:

[0086] The information to be forgotten is selected through the forget gate. The mathematical expression of the forget gate is:

[0087]

[0088] Where: W f , U f , b f are the recurrent weight, input weight, and bias of the forget gate σ layer respectively; σ is the sigmoid activation function; S t-1 is the hidden state of the LSTM layer at the previous time step; X t is the feature sequence of the input at the current moment.

[0089] The new information to be added is selected through the input gate. First, the input gate selects the information to be updated i t , while the tanh layer creates new candidate vectors Then input the value i t With candidate vector Multiplication updates the cell state, and the mathematical expression of the input gate is:

[0090]

[0091] Where: W i , U f , b i are the recurrent weight, input weight, and bias of the input gate σ layer respectively; W c , U f , b c are the loop weight, input weight, and bias of the tanh layer respectively; C t For long-term status;

[0092] The output value of the neuron is calculated through the output gate, and the mathematical expression of the output gate is:

[0093]

[0094] h t =o t *tanhC t

[0095] Where W o , U o , b o are the loop weight, input weight, and bias of the output gate σ layer respectively; the output gate determines which part of the cell state is output through a σ layer, processes the cell state through tanh, obtains a value between (-1,1), and adds this value to o t Multiply them together to get the short-term state h t ;

[0096] The forward LSTM layer and the backward LSTM layer have the same network structure but different weight matrices and bias items. The output of the forward LSTM layer is calculated at each moment. and the output of the backward LSTM layer Will and Combined, we get the output of BiLSTM O t , that is, the neuron output value, is calculated as:

[0097]

[0098] Where f(·) is the forward information extraction function; b(·) is the backward information extraction function; W f is the weight matrix of the forward LSTM layer; b f is the bias of the forward LSTM layer; W b is the weight matrix of the backward LSTM layer; b b is the bias of the backward LSTM layer; W y is the weight matrix of BiLSTM prediction output; b y is the bias of the BiLSTM prediction output.

[0099] The operation process of the Attention layer is divided into three stages. In the first stage, the output of BiLSTM at each moment is calculated by the scoring function. t The attention score is calculated as:

[0100] u t =tanh(O t ·θ+b)

[0101] In the second stage, the softmax layer is used to normalize the attention scores of the first stage to find the corresponding weight value at each moment. The calculation formula is:

[0102]

[0103] In the third stage, the weight value at each moment is weighted and summed with the output of BiLSTM to obtain the output of the Attention layer, that is, the weighted feature vector Y t , the calculation formula is:

[0104] Y t =∑ t α t O t

[0105] Where θ and b are the weight matrix and bias term of the scoring function respectively.

[0106] Specifically, the output layer uses the sigmoid function to weight the feature vector Y t After linear transformation and adding bias, the predicted value of ship fuel consumption δ is obtained, which is expressed as:

[0107] δ=sigmoid(Y t ·θ')+b'

[0108] Where θ' and b' are the weight matrix and bias term of the sigmoid function, respectively.

[0109] S4: Optimizing the ship fuel consumption prediction model based on the DBO optimization algorithm to obtain an optimized ship fuel consumption prediction model;

[0110] In a specific embodiment, in S4, the process of optimizing the ship fuel consumption prediction model based on the DBO optimization algorithm is:

[0111] S41: Initialize the parameters of the ship fuel consumption prediction model and the DBO optimization algorithm, and set the dung beetle population and the maximum number of iterations. The dung beetle population includes rolling dung beetles, female dung beetles, larval dung beetles, and stealing dung beetles;

[0112] S42: Initializing a dung beetle population, randomly generating an initial position of the dung beetle population in the hyperparameter space, calculating an initial fitness value of the dung beetle population, and sorting the initialized dung beetle population according to the size of the fitness value to obtain a dung beetle with an optimal fitness value;

[0113] S43: Based on the dung beetles with the optimal fitness value, the positions of the initially generated dung beetle population are updated according to the formulas of rolling behavior, dancing behavior, breeding behavior, foraging behavior and stealing behavior, including:

[0114] The ball-rolling dung beetle updates its position through ball-rolling and dancing behaviors, which specifically include:

[0115] The rolling dung beetle updates its position by rolling the ball, and the position update formula is:

[0116] x i (t+1)=x i (t)+k*a*x i (t-1)+b*Δ x (1)

[0117] Δ x =|x i (t)-X w | (2)

[0118] When the ball-rolling dung beetle encounters an obstacle and cannot move forward, it updates its position through dancing behavior to adjust its direction of advance. At this time, the position update formula of the ball-rolling dung beetle is:

[0119] x i (t+1)=x i (t)+tanθ|x i (t)-x i (t-1)| (3)

[0120] Where: t is the current iteration number; α is a natural coefficient, indicating whether it deviates from the original direction, and its value is -1 or 1; k is the deflection coefficient, which is set to 0.1 in this embodiment; b is a constant, which ranges from 0 to 1, and is set to 0.3 in this embodiment; X w represents the global worst position; Δx is a reference object used to simulate the change of light intensity; θ is the deflection angle in the tangent function, and θ∈[0,π], at 0, When π, the position remains unchanged;

[0121] The female dung beetle updates its position through reproductive behavior, which specifically includes:

[0122] In order to improve the exploration efficiency, the upper and lower boundaries of the female dung beetle's egg-laying area are set to determine the egg-laying area, which is expressed as:

[0123] Lb* =max(X * *(1-R), Lb) (4)

[0124] Ub * =min(X * *(1+R),Ub) (5)

[0125] R=1-T max (6)

[0126] Where: X * is the current optimal hyperparameter combination, Lb * ,Ub * are the upper and lower bounds of the spawning area, Lb and Ub are the upper and lower bounds of the hyperparameter search space, T max is the maximum number of iterations;

[0127] The female dung beetle reproduces in the egg-laying area to update its position. Assuming that each female dung beetle only lays one egg in each iteration, the position update formula of the female dung beetle is:

[0128] B i (t+1)=X * +β 1 *(B i (t)-Lb * )+β 2 *(B i (t)-Ub * ) (7)

[0129] Where: B i (t) is the i-th spawning position at the t-th iteration; β is a random vector of size 1*Q, and Q is the number of parameters to be optimized;

[0130] The larval dung beetle updates its position through foraging behavior, which specifically includes:

[0131] Establish the optimal foraging area, expressed as:

[0132] Lb b =max(X b *(1-R), Lb) (8)

[0133] Ub b =min(X b *(1+R),Ub) (9)

[0134] In the optimal foraging area, the position update formula of the larval dung beetle is:

[0135]

[0136] Where: Xb is the optimal parameter combination, is a random vector following a normal distribution, is a random vector with a value range of (0, 1); Lb b and Ub b They are the upper and lower limits of the larval dung beetle's foraging area;

[0137] The stealing dung beetle updates its position through stealing behavior, which specifically includes:

[0138] Let X b Is the best food source, so X b The surroundings are the optimal locations for competing for food. The thieving mantis updates the location of the best food source through stealing behavior, thereby updating the location. The position update formula of the thieving mantis is:

[0139] x i (t+1)=X b +S*ω*(|x i (t)-X * |+|x i (t)-X b |) (11)

[0140] Where: S is a constant, ω is a random vector following a normal distribution;

[0141] S44: recalculating the fitness value of the dung beetle population according to the updated position of the dung beetle population, and sorting the recalculated dung beetle population according to the size of the fitness value to obtain the optimal fitness value, and using the optimal fitness value as the number of hidden neurons and the learning rate of the ship fuel consumption prediction model, and then inputting the training set into the ship fuel consumption prediction model for prediction to obtain the predicted value, and calculating the average absolute error between the true value and the predicted value in the training set;

[0142] S45: Determine whether the mean absolute error meets the set requirements. If so, the optimal number of hidden neurons and learning rate are obtained, and the optimization process ends; otherwise, repeat S43-S45 until the optimal number of hidden neurons and learning rate are obtained.

[0143] S5: training the ship fuel consumption prediction model based on the training set to obtain a trained ship fuel consumption prediction model;

[0144] S6: The trained ship fuel consumption prediction model is tested based on the test set. When the prediction accuracy of the trained ship fuel consumption prediction model meets the requirements, the final ship fuel consumption prediction model is obtained, and the ship fuel consumption is predicted based on the final ship fuel consumption prediction model.

[0145] In this embodiment, in order to verify the effectiveness of the method proposed in this embodiment, a container ship sailing in the ocean is selected as the research object, and the voyage data of the ship from January to February 2021 are obtained, with a total of 36439 data. 10 characteristic data such as ship fuel consumption, main engine speed, propeller speed, wind speed, ground speed, wave height, bow draft, stern draft, port draft, and starboard draft are selected for experimental verification, and the data are screened and processed. Specifically, since the sensor signal is easily interfered during the navigation of the ship, some data exceed the normal threshold. In order to ensure the accuracy of the experiment, the theoretical maximum and minimum values ​​of the experimental ship are used as the basis for eliminating the data. The range of some thresholds is shown in Table 1. If there are missing values ​​in the eliminated data, the data is supplemented by interpolation.

[0146] Table 1 Partial threshold range

[0147] parameter scope Speed ​​on water (kn) 0~15 Wind speed (m / s) 0~33 Main engine speed (r / s) 0~80 Draft(m) 5~15

[0148] Some of the time series data after preliminary processing are as follows Figures 2 to 5 As shown by Figure 5 It can be seen that the data after preliminary processing has good time series integrity and can be used for preliminary model training. However, some navigation parameters overlap. In order to ensure the prediction performance of the model, the overlapping parts need to be reduced in dimension. Therefore, a multidimensional matrix is ​​constructed, and the multidimensional feature matrix is ​​nonlinearly reduced in dimension according to the kernel principal component analysis method to obtain uncorrelated low-dimensional data. The contribution rate of each principal component after dimensionality reduction is shown in Table 2.

[0149] Table 2 Contribution rate of each principal component after dimensionality reduction

[0150]

[0151] In the table: f is the ship's fuel, n is the ship's rotation speed, V is the water speed, and D is the ship's draft.

[0152] When the principal component contribution rate reaches 80%, it indicates that the principal component can be used as the required information. After the above data preprocessing process, a total of 7305 data are obtained, and the data set is divided into a training set and a test set according to 8:2, that is, the first 5840 are used as the training set, and the last 1465 are used as the test set.

[0153] Set the dung beetle population to 30, the optimization iteration number to 100, the search range of the number of neurons to [10, 100], and the search range of the learning rate to [0.001, 0.5]. After updating and foraging, the maximum number of iterations is reached, and the optimization ends after stabilization. The optimized number of forward propagation neurons and back propagation neurons and the learning rate are assigned to the ship fuel consumption prediction model. In this embodiment, the value range of the neurons is set between 50 and 300, and the learning rate is between 0.001 and 0.05. The training set is input into the ship fuel consumption prediction model for prediction, and the prediction value obtained is as follows: Figures 6 to 9 As shown. Fig. 9 It can be seen that the prediction results of the model constructed according to the method proposed in this embodiment are good. Some prediction results are lower than the actual value because the prediction is limited by the iterative optimization. If a new optimal group is not generated at present, it will fall into the local optimum, resulting in lower data in some predictions. However, in the prediction process, when the fuel consumption changes greatly due to bad weather, the model can respond to the real value in time, and the error is within an acceptable range, indicating that the prediction model has a good effect.

[0154] In order to further verify the effect of the model proposed in this embodiment on predicting ship fuel consumption, fuel consumption prediction models based on LSTM and BiLSTM were established for comparative verification. The first 9 time series of the standardized feature data were used as input, and the 10th time series was used as output. A time series feature set was constructed according to the time sliding window. The first 80% was used as the training set, and the last 20% was used as the test set. The experimental prediction results are shown in Figure 2. Figure 8 and Fig. 9 As can be seen from the figure, the fuel consumption prediction model based on the BiLSTM model has better prediction effect than LSTM. The predicted value basically fluctuates around the true value, has good robustness, and basically achieves the prediction effect. However, there are also certain shortcomings. The prediction of some time series is far from the true value, which has a great impact on the entire prediction result. Fig.10 It can be seen that among the three models, the model based on the improved BiLSTM has the best prediction effect, while there is a large gap between the actual value and the predicted value of the model based on LSTM and BiLSTM. In order to intuitively evaluate the experimental prediction results, the determination coefficient, mean absolute error and root mean square error are calculated as a basis for judging and verifying the prediction accuracy of the three models. The larger the determination coefficient, the smaller the mean absolute error and root mean square error, the better the experimental prediction results. The specific calculation results are as follows: Fig.11 As shown by Fig.11 It can be seen that the R of the fuel consumption prediction model based on DBO optimization 2 The method proposed in this embodiment continuously searches and updates in the hyperparameter space, so that individuals reach the optimal combination to optimize the model, which is superior in prediction. However, it is difficult to find the optimal parameter combination based on LSTM and BiLSTM, and no optimal results are produced.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A ship fuel consumption prediction method based on DBO optimization, characterized in that: The specific steps include: S1: Obtain historical navigation data of the ship; S2: preprocessing the historical ship navigation data to obtain processed ship data, and dividing the processed ship data into a training set and a test set; S3: Establish a BiLSTM-Attention network model and use it as a ship fuel consumption prediction model; S4: Optimizing the ship fuel consumption prediction model based on the DBO optimization algorithm to obtain an optimized ship fuel consumption prediction model; S5: training the ship fuel consumption prediction model based on the training set to obtain a trained ship fuel consumption prediction model; S6: The trained ship fuel consumption prediction model is tested based on the test set. When the prediction accuracy of the trained ship fuel consumption prediction model meets the requirements, the final ship fuel consumption prediction model is obtained, and the ship fuel consumption is predicted based on the final ship fuel consumption prediction model.

2. The ship fuel consumption prediction method based on DBO optimization according to claim 1 is characterized in that: In S3, the established BiLSTM-Attention network model includes an input layer, a BiLSTM layer, an Attention layer, and an output layer connected in sequence; The input layer is used to extract and convert the input data to obtain a feature sequence, and transmit it to the BiLSTM layer; The BiLSTM layer calculates the hidden states of the forward layer and the backward layer at the current moment based on the feature sequence, and concatenates the hidden states of the forward layer and the backward layer at the current moment to obtain a neuron output value; The Attention layer is used to calculate the weight of the feature sequence at each moment, and perform weighted summation on the obtained weight and the neuron output value to obtain a weighted feature vector; The output layer uses a linear activation function to perform a linear transformation on the weighted feature vector and adds a bias to obtain a predicted value of ship fuel consumption.

3. The ship fuel consumption prediction method based on DBO optimization according to claim 2 is characterized in that: In S2, the process of preprocessing the historical navigation data of the ship is as follows: 1) Detect and remove data outliers in historical ship navigation data; 2) Use the Lagrange interpolation method to interpolate the breakpoint data in the historical navigation data of the ship after removing the outliers to obtain complete data; 3) Using kernel principal component analysis to reduce the dimension of the complete data.

4. The ship fuel consumption prediction method based on DBO optimization according to claim 3 is characterized in that: In S1, the historical navigation data of the ship includes: ship fuel consumption, main engine speed, propeller speed, wind speed, ground speed, wave height, bow draft, stern draft, port draft, and starboard draft.

5. The ship fuel consumption prediction method based on DBO optimization according to claim 4 is characterized in that: In S4, the process of optimizing the ship fuel consumption prediction model based on the DBO optimization algorithm is as follows: S41: Initialize the parameters of the ship fuel consumption prediction model and the DBO optimization algorithm, and set the dung beetle population and the maximum number of iterations. The dung beetle population includes rolling dung beetles, female dung beetles, larval dung beetles, and stealing dung beetles; S42: Initializing a dung beetle population, calculating an initial fitness value of the dung beetle population, and sorting the initialized dung beetle population according to the size of the fitness value to obtain dung beetles with the optimal fitness value; S43: Based on the dung beetles with the optimal fitness value, the positions of the initially generated dung beetle population are updated according to the formulas of rolling behavior, dancing behavior, breeding behavior, foraging behavior and stealing behavior, including: The ball-rolling dung beetle updates its position through ball-rolling and dancing behaviors, which specifically include: The rolling dung beetle updates its position by rolling the ball, and the position update formula is: x i (t+1)=x i (t)+k*a*x i (t-1)+b*Δ x (1) Δ x =|x i (t)-X w | (2) When the ball-rolling dung beetle encounters an obstacle and cannot move forward, it updates its position through dancing behavior to adjust its direction of advance. At this time, the position update formula of the ball-rolling dung beetle is: x i (t+1)=x i (t)+tanθ|x i (t)-x i (t-1)| (3) Where: t is the current iteration number; α is a natural coefficient, indicating whether it deviates from the original direction, and its value is -1 or 1; k is the deflection coefficient; b is a constant; X w represents the global worst position; Δx is a reference object used to simulate the change of light intensity; θ is the deflection angle in the tangent function, and θ∈[0,π], at 0, When π, the position remains unchanged; The female dung beetle updates its position through reproductive behavior, which specifically includes: Set the upper and lower boundaries of the female dung beetle's egg-laying area to determine the egg-laying area, expressed as: Lb * =max(X * *(1-R),Lb) (4) Ub * =min(X * *(1+R), Ub) (5) R=1-T max (6) Where: X * is the current optimal hyperparameter combination, Lb * ,Ub * are the upper and lower bounds of the spawning area, Lb and Ub are the upper and lower bounds of the hyperparameter search space, T max is the maximum number of iterations; The female dung beetle reproduces in the egg-laying area to update its position. Assuming that each female dung beetle only lays one egg in each iteration, the position update formula of the female dung beetle is: B i (t+1)=X * +β1*(B i (t)-Lb * )+β2*(B i (t)-Ub * ) (7) Where: B i (t) is the i-th spawning position at the t-th iteration; β is a random vector of size 1*Q, and Q is the number of parameters to be optimized; The larval dung beetle updates its position through foraging behavior, which specifically includes: Establish the optimal foraging area, expressed as: Lb b =max(X b *(1-R),Lb) (8) Ub b =min(X b *(1+R), Ub) (9) In the optimal foraging area, the position update formula of the larval dung beetle is: Where: X b is the optimal parameter combination, is a random vector following a normal distribution, is a random vector with a value range of (0, 1); Lb b and Ub b They are the upper and lower limits of the larval dung beetle's foraging area; The stealing dung beetle updates its position through stealing behavior, which specifically includes: Let X b Is the best food source, so X b The surroundings are the optimal locations for competing for food. The thieving mantis updates the location of the best food source through stealing behavior, thereby updating the location. The position update formula of the thieving mantis is: x i (t+1)=X b +S*ω*(|x i (t)-X * |+|x i (t)-X b |) (11) Where: S is a constant, ω is a random vector following a normal distribution; S44: recalculating the fitness value of the dung beetle population according to the updated position of the dung beetle population, and sorting the recalculated dung beetle population according to the size of the fitness value to obtain the optimal fitness value, and using the optimal fitness value as the number of hidden neurons and the learning rate of the ship fuel consumption prediction model, and then inputting the training set into the ship fuel consumption prediction model for prediction to obtain the predicted value, and calculating the average absolute error between the true value and the predicted value in the training set; S45: Determine whether the mean absolute error meets the set requirements. If so, the optimal number of hidden neurons and learning rate are obtained, and the optimization process ends; otherwise, repeat S43-S45 until the optimal number of hidden neurons and learning rate are obtained.

Citation Information

Cited By

  • Ship navigation oil consumption estimation system based on deep learning

    CN120408041A