A method for predicting ship fuel consumption by combining mechanism model and data-driven model
By combining the weighted superposition method of mechanism models and multiple data-driven models, the problem of insufficient accuracy, robustness and adaptability of ship fuel consumption prediction is solved, and a higher accuracy and stable prediction effect is achieved.
Patent Information
- Application Number
- CN202410900823.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The existing ship fuel consumption prediction technology has shortcomings in accuracy, robustness and adaptability. Mechanical models are difficult to deal with complex environmental variables. Data-driven models rely on data quality and lack interpretation capabilities.
Combining mechanism models and multiple data-driven models (GA-BP neural network, PSO-BP neural network, RF random forest regression model), a comprehensive prediction model is generated through a classification weighted superposition method, and the advantages of each model are used to improve prediction accuracy and robustness, and adapt to complex navigation conditions.
It significantly improves the accuracy and robustness of ship fuel consumption prediction, enhances the adaptability and flexibility of the model in complex environments, and can dynamically adjust the weighted weights to adapt to new working conditions.
Smart Images

Figure CN118861860B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ship engineering, and in particular relates to a method for predicting ship fuel consumption by combining a mechanism model and a data-driven model. Background Art
[0002] As global trade continues to expand, the shipping industry, as the core of international logistics, is becoming increasingly significant in global energy consumption and greenhouse gas emissions. Statistics show that the shipping industry accounts for nearly 3% of global carbon emissions. In response to this environmental challenge, regulatory bodies such as the International Maritime Organization (IMO) have formulated a number of policies and regulations to limit ship emissions and promote the transition to clean energy. For example, in July 2023, the 80th session of the IMO Marine Environment Committee adopted a revised "Strategy for Reducing Greenhouse Gas Emissions from Ships," proposing to peak greenhouse gas emissions from international shipping as soon as possible and, taking into account different national conditions, achieve net zero emissions by 2050 or earlier. Furthermore, the EU's "EU 2030 Climate and Energy Framework" also sets a target of reducing greenhouse gas emissions by at least 40%.
[0003] To comply with these policies and regulations and reduce operating costs, ship operators must improve energy efficiency and reduce fuel consumption, making ship fuel consumption prediction technology particularly important. This technology can provide technical support for operators to optimize routes and reduce transportation costs.
[0004] In practical applications, mechanistic models face numerous challenges, such as the difficulty in accurately reflecting a ship's maintenance and operational status in real time. Data-driven models, on the other hand, can be affected by data bias and lack the ability to explain the ship's operating mechanisms. To improve the accuracy, robustness, and adaptability of fuel consumption models, it is crucial to develop a comprehensive ship fuel consumption prediction model that combines the advantages of both mechanistic and data-driven models. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for predicting ship fuel consumption by combining a mechanism model and a data-driven model, thereby improving prediction accuracy, enhancing model robustness, and achieving adaptability and flexibility to working conditions.
[0006] To solve the above technical problems, the technical solution of the present invention is: a method for predicting ship fuel consumption by combining a mechanism model and a data-driven model, comprising the following steps:
[0007] Collect historical ship operation data and divide it into training and test sets in a certain proportion; the historical operation data at least includes water speed, ship load, ship draft, channel depth, wave height, wind direction, relative wind speed and ship fuel consumption;
[0008] A mechanism fuel consumption prediction model is established based on the basic ship parameters and the training set of historical operation data, with water speed, ship load, ship draft, channel depth, wave height, wind direction angle, and relative wind speed as input parameters, and ship fuel consumption as output parameter;
[0009] Establish a data-driven fuel consumption prediction model based on a neural network algorithm and import historical operating data for training and testing;
[0010] Multiple sets of input parameters from the historical operating data test set are imported into the mechanism fuel consumption prediction model and the drive fuel consumption prediction model, each generating multiple sets of fuel consumption prediction values. For each fuel consumption prediction value, the absolute error between it and the ship consumption in the historical operating data test set is calculated, and the absolute errors between each fuel consumption prediction value and the ship consumption in the historical operating data test set are ranked according to their magnitude.
[0011] Based on the sorting results, the input working conditions corresponding to each input parameter are classified according to the preset classification standard, and a classification label of the input working condition corresponding to each input parameter is generated;
[0012] The input parameters and classification labels in the test set are used as a data set, and a random forest algorithm optimized by a particle swarm algorithm is used to train a classification prediction model for predicting the fuel consumption model with the minimum and maximum absolute errors when predicting the input operating conditions corresponding to each input parameter.
[0013] The fuel consumption prediction model with the minimum and maximum absolute errors is determined based on the input parameters of the classification prediction model, and the fuel consumption prediction values predicted by each fuel consumption prediction model are weighted to obtain the final fuel consumption prediction value.
[0014] The fuel consumption prediction method of the mechanism fuel consumption prediction model is as follows:
[0015] Establish a mechanism fuel consumption prediction model based on basic ship parameters, and input the input parameters into the mechanism fuel consumption prediction model;
[0016] According to the input parameters, the total resistance of the ship is calculated;
[0017] The effective power of the ship is calculated based on the basic parameters of the ship and the total resistance of the ship;
[0018] Determine the main engine power of the ship based on the effective power of the ship;
[0019] The fuel consumption prediction value under the fuel consumption prediction model is calculated based on the ship's main engine power.
[0020] The data-driven fuel consumption prediction model includes at least a GA-BP neural network regression model, a PSO-BP neural network regression model, and an RF random forest regression model; among them,
[0021] The modeling method of the GA-BP neural network regression model is as follows: normalize the data in the training set and the test set, and scale the normalized data to the range of [0, 1]; establish a BP neural network model, define the number of hidden layer nodes as 5, and set the training parameters, which include at least the maximum number of iterations, error threshold and learning rate; set the optimization parameters of the genetic algorithm GA, define the genetic generation, population size and optimization variable boundary, and generate the initial population; perform genetic algorithm optimization to obtain the optimal parameters and assign them to the neural network; train the BP neural network model based on the normalized training set data to obtain the GA-BP neural network regression model; use the GA-BP neural network regression model to make predictions on the training set and the test set, and denormalize the prediction results;
[0022] The modeling method of the PSO-BP neural network regression model is as follows: normalize the data in the training set and the test set; define the number of nodes in the input layer, hidden layer and output layer, establish a BP neural network model, and set the training parameters; initialize the PSO algorithm parameters, which include at least the learning factor, the number of population updates, the population size, the speed and the boundary; initialize the population and speed, calculate the fitness value, and determine the individual extreme value and the group extreme value; in the iterative process, update the speed and population position, and adaptively mutate; continuously update the individual optimal value and the group optimal value, and record the optimal fitness value; extract the optimal initial weight and threshold, and assign them to the neural network; train the BP neural network model based on the normalized training set data to obtain the PSO-BP neural network regression model; use the PSO-BP neural network regression model to make predictions on the training set and the test set, and denormalize the prediction results;
[0023] The modeling method of the RF random forest regression model is as follows: normalize the data in the training set and the test set; transpose the normalized data to fit the model, set the number of decision trees, the minimum number of leaves, the error calculation and the feature importance options, and train the RF random forest regression model based on the normalized training set data; make predictions on the training set and the test set through the RF random forest regression model, and denormalize the prediction results.
[0024] The method for calculating the effective power of a ship based on the basic parameters of the ship and the total resistance of the ship is:
[0025] EP=(R T ×V s ) / η t
[0026] Among them, EP is the effective efficiency of the ship, R T is the total resistance of the ship, V sis the ship’s speed through water, η t For transmission efficiency.
[0027] The method for determining the main engine power of a ship based on the effective power of the ship is:
[0028] BP=EP / η m
[0029] Where BP is the main engine power of the ship, η m For host efficiency.
[0030] The method for calculating the fuel consumption prediction value under the fuel consumption prediction model based on the ship's main engine power is:
[0031]
[0032] Among them, F c is the fuel consumption prediction value, SFOC is the fuel consumption rate of the engine, T y For the sailing time.
[0033] For each fuel consumption prediction value, the absolute error between it and the ship consumption in the historical operation data test set is calculated, and the absolute error between each fuel consumption prediction value and the ship consumption in the historical operation data test set is ranked according to the size. The specific method is:
[0034] For each fuel consumption prediction value, first calculate the determination coefficient R of each fuel consumption prediction model 2 , whose range is [0, 1], is expressed as:
[0035]
[0036] Among them, y is the mean value of ship consumption in the historical operation data test set, y i is the actual value of the i-th observation in the historical operating data test set, is the fuel consumption prediction value of the i-th observation;
[0037] For each fuel consumption prediction value, calculate the absolute error E between it and the ship consumption in the historical operating data test set:
[0038]
[0039]
[0040] Among them, E GA-BP 、E PSO-BP 、E RF 、E MECH The fuel consumption prediction values are calculated by GA-BP neural network regression model, PSO-BP neural network regression model, RF random forest regression model, and mechanism fuel consumption prediction model respectively. The absolute error between the consumption of ships in the test set and the historical operating data;
[0041] According to the absolute error E of the fuel consumption prediction value of each fuel consumption prediction model and the ship consumption in the historical operation data test set, they are sorted from small to large. If the absolute errors of the two groups are equal, the coefficient of determination R is used. 2 The larger ones are sorted first, expressed as:
[0042] E (1) ,E (2) ,E (3) ,E (4)
[0043] Among them E (k) Represents the i-th smallest error value after sorting, k∈1,2,3,4.
[0044] The classification labels and their classification standards are as follows:
[0045] (1) Label Category A:
[0046] If the absolute error of the mechanism fuel consumption prediction model is the smallest and the absolute error of the GA-BP neural network regression model is the largest, the label is A1;
[0047] If the absolute error of the mechanism fuel consumption prediction model is the smallest and the absolute error of the PSO-BP neural network regression model is the largest, the label is A2;
[0048] If the absolute error of the mechanism fuel consumption prediction model is the smallest and the absolute error of the RF random forest regression model is the largest, the label is A3;
[0049] (2) Label Class B:
[0050] If the absolute error of the GA-BP neural network regression model is the smallest and the absolute error of the mechanism fuel consumption prediction model is the largest, the label is B1;
[0051] If the absolute error of the GA-BP neural network regression model is the smallest and the absolute error of the PSO-BP neural network regression model is the largest, the label is B2;
[0052] If the absolute error of the GA-BP neural network regression model is the smallest and the absolute error of the RF random forest regression model is the largest, the label is B3;
[0053] (3) Label C:
[0054] If the absolute error of the PSO-BP neural network regression model is the smallest and the absolute error of the mechanism fuel consumption prediction model is the largest, the label is C1;
[0055] If the absolute error of the PSO-BP neural network regression model is the smallest and the absolute error of the GA-BP neural network regression model is the largest, the label is C2;
[0056] If the error of the PSO-BP neural network regression model is the smallest and the error of the RF random forest regression model is the largest, the label is C3;
[0057] (4) Tag Category D:
[0058] If the error of the RF random forest regression model is absolutely the smallest and the error of the mechanism fuel consumption prediction model is absolutely the largest, the label is D1;
[0059] If the error of the RF random forest regression model is the absolute minimum and the absolute error of the GA-BP neural network regression model is the maximum, the label is D2;
[0060] If the absolute error of the RF random forest regression model is the smallest and the absolute error of the PSO-BP neural network regression model is the largest, the label is D3.
[0061] The weighting strategy for weighting the fuel consumption prediction values obtained by each fuel consumption prediction model is:
[0062] Establish a Gaussian process regression model to approximate the target function;
[0063] Use the expected improvement acquisition function to select the next sampling point;
[0064] Find the optimal weighted ratio combination by optimizing the acquisition function;
[0065] Iteratively update the model until the optimal weighted ratio is found;
[0066] The above process is expressed as:
[0067] w opt =argmax w f(w)
[0068] Among them, w opt Represents the optimal weighted ratio combination, argmax w represents the value of w that maximizes the function f(w), which is the performance function of the weighted combination model.
[0069] A computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0070] Compared with the prior art, the present invention has the following beneficial effects:
[0071] 1. Improve forecast accuracy:
[0072] This method significantly improves the accuracy of ship fuel consumption prediction by combining a mechanistic model with a data-driven model, utilizing a weighted classification overlay method. Specifically, the mechanistic model, based on the ship's dynamic characteristics, provides a prediction framework based on physical laws. The data-driven model, on the other hand, draws on extensive real-world operational data to capture complex nonlinear relationships and adapt to changing operating environments. By weighted overlaying the predictions from these two models, the respective strengths of the mechanistic and data-driven models are leveraged, resulting in predictions that are closer to reality.
[0073] 2. Enhance model robustness:
[0074] This method integrates multiple prediction models and fuses different algorithms, such as GA-BP neural networks, PSO-BP neural networks, and random forests, to leverage their respective strengths, thereby improving the robustness of the overall model. This allows the prediction model to maintain stability and effective performance in the face of uncertainty, noise, or external disturbances. Furthermore, by weighting and superimposing the prediction results of each model through Bayesian optimization, this approach not only improves the stability of the model but also effectively reduces the impact of outliers and data bias on the prediction results.
[0075] 3. Achieve adaptability and flexibility in working conditions:
[0076] To adapt to varying sailing conditions, this method incorporates a classification prediction algorithm. By continuously classifying and labeling the model, the model can dynamically adjust weights, ensuring rapid adaptation to new conditions. This dynamic adjustment capability enables the model to maintain high prediction accuracy despite varying environmental conditions, such as frequently changing speeds and significant fluctuations in load. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 Schematic diagram of a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0078] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0079] This method aims to address the shortcomings of existing ship fuel consumption prediction technologies in terms of accuracy, robustness, and adaptability to complex environmental conditions. The shortcomings of existing technical solutions are as follows:
[0080] 1. Model prediction accuracy is not high
[0081] While existing mechanistic models can predict fuel consumption based on physical laws, they often fail to account for complex environmental variables and the uncertainty of actual sea conditions, leading to deviations in prediction results in practical applications and resulting in low accuracy. Data-driven models can improve their adaptability to actual operating conditions by learning from historical data, but their predictions often depend on the quality and scope of the data used, and some models, such as neural networks, may have the risk of overfitting, which in turn affects the model's generalization ability.
[0082] 2. The prediction model is less robust
[0083] A single type of data-driven model (such as neural network, tree or regression algorithms) may be more sensitive to specific types of data or outliers, lack robustness, and may degrade in performance under the influence of complex actual sea conditions and random factors.
[0084] 3. The predictive model is not adaptable and flexible enough
[0085] In view of the irregularity and uncertainty of the navigation environment, the mechanism model cannot accurately handle these complex factors through physical means.
[0086] This method builds a collaborative, integrated prediction model framework that integrates mechanistic models and multiple data-driven models. It then uses a classification prediction model to classify input operating condition data into labels, and employs a Bayesian model to optimize the weighted proportions of each classification label. Finally, by weightedly superimposing the prediction results from the four models, it addresses the aforementioned issues and provides a more accurate, robust, and adaptable fuel consumption prediction solution for ships under complex, time-varying operating conditions.
[0087] The technical solution of the present invention is:
[0088] A method for predicting ship fuel consumption by combining mechanism model and data-driven model through classification weighted superposition is proposed. Figure 1 As shown, the following steps are included:
[0089] 1. Data Collection and Preprocessing
[0090] This method collects historical ship operating data. Input parameters include water speed (km / h), deadweight (tons), draft (meters), channel depth (meters), wave height (meters), wind direction (degrees), and relative wind speed (meters / second). The output parameter is the ship's fuel consumption. The first 80% of this data is used to train the fuel consumption prediction model, and the remaining 20% is used to verify the prediction model's performance.
[0091] 2. Modeling of the mechanism fuel consumption prediction model
[0092] A mechanism model was established using Matlab / Simulink. The model was built using the basic ship parameters, with specific parameters being fixed and held constant. The model's input variables primarily included the ship's speed, deadweight, draft, channel depth, wave height corresponding to the wind level, relative wind speed, and wind direction. The model's output was the ship's fuel consumption. Based on the established MATLAB / Simulink model, the ship's fuel consumption was simulated and calculated. The corresponding calculation steps are as follows:
[0093] (1) Set the input parameters of the prediction model, such as water speed V s 、Load m cargo ,, channel depth H. Among them, the calculated size of the wave height is determined by the wind force level of the inland waterway.
[0094] (2) Calculate the total resistance R of the ship based on the input prediction model parameters total , including the hydrostatic resistance R T and ship wind resistance R wind , Shallow water resistance increase R shallow and wave resistance R wave .
[0095] To continue to complete the establishment of the ship fuel consumption prediction model, the ship fuel consumption is calculated through the following calculation steps and formulas:
[0096] (3) Calculation of effective power (EP) of a ship refers to the power required to overcome the total resistance, which can be calculated using the following formula:
[0097] EP=(R T ×V s ) / η t
[0098] where R T represents the total resistance (calculated in step (2)), V s is the ship’s speed through water, η t It is the transfer efficiency, usually around 90%, representing the efficiency loss of power from the engine to the propeller.
[0099] (4) Determine the ship's main engine power (Brake Power, BP), which is the output power of the engine. BP is usually greater than the effective power required to act on the propeller to ensure that the total resistance can be overcome, and the main engine power also includes the power required to maintain the operation of other equipment on the ship. It can be calculated using the following formula:
[0100] BP=EP / τ m
[0101] where τ mIt is the main engine efficiency, which takes into account efficiency factors such as friction loss and heat loss inside the engine.
[0102] (5) Based on the main engine power, this method can estimate the fuel consumption of the ship. Generally, the specific fuel oil consumption (SFOC) of the engine refers to the fuel consumption per a certain power consumption, and the unit is usually g / kWh. Fuel consumption can be calculated using the following formula:
[0103]
[0104] Among them F c is the fuel consumption, expressed in tons, BP is the main engine power (kW), and the voyage time T y Measured in seconds.
[0105] 3. Data-driven fuel consumption prediction model development
[0106] (1) GA-BP neural network regression model
[0107] First, the data is imported. It is then split into a training set and a test set at a ratio of 4:1. The data is normalized to scale to the [0, 1] range. A BP neural network model is established, with the number of hidden layer nodes defined as 5. Training parameters are set, including the maximum number of iterations, error threshold, and learning rate. Furthermore, genetic algorithm (GA) optimization parameters are set, including the number of generations, population size, and optimization variable boundaries, to generate an initial population. The GA is optimized to obtain the optimal parameters, which are then assigned to the neural network. The model is trained using the normalized training set data. After training, the model performs predictions on both the training and test sets, and the prediction results are denormalized.
[0108] (2) PSO-BP neural network regression model
[0109] First, import the data. Then, divide the data into training and test sets at a ratio of 4:1 and perform data normalization. Define the number of nodes in the input, hidden, and output layers, establish a BP neural network model, and set training parameters, including the maximum number of iterations, target error, and learning rate. Next, initialize the parameters of the PSO algorithm, including the learning factor, number of population updates, population size, speed, and boundary. Initialize the population and speed, calculate the fitness value, and determine the individual and group extremes. During the iteration process, update the speed and population position, and adaptively mutate. Continuously update the individual and group optimal values, and record the optimal fitness value. Extract the optimal initial weights and thresholds and assign them to the neural network. Open the training window and train the network using the normalized training set data. After training, perform simulation predictions on the training and test sets, and denormalize the prediction results.
[0110] (3) RF random forest regression model
[0111] First, import the data. Then, split the data into training and test sets at a 4:1 ratio and perform data normalization. Transpose the data to fit the model. Set the number of decision trees, minimum number of leaves, error calculation, and feature importance options. Train a random forest regression model using the training data. After training, perform simulations on the training and test sets, and denormalize the predictions.
[0112] 4. Preliminary prediction ranking
[0113] Using the collected historical data, input the operating condition values into four regression prediction models: where x is the input operating condition value, Fuel consumption prediction values generated for the four models respectively.
[0114] For each set of predicted values, first calculate the coefficient of determination R of each model 2 Also known as the coefficient of determination or goodness of fit, it is a statistic that measures how well a model explains the overall variation in the variables. It ranges from 0 to 1. The formula is as follows:
[0115]
[0116] Among them, y is the mean value of ship consumption in the historical operation data test set, y i is the actual value of the i-th observation in the historical operating data test set, is the fuel consumption prediction value of the i-th observation value; R 2 The closer it is to 1, the better the explanatory power of the model, that is, the model can fit the data well. 2 The closer it is to 0, the weaker the explanatory power of the model.
[0117] For each predicted value, calculate its difference with the actual historical fuel consumption data y The absolute error E between
[0118]
[0119]
[0120] According to the absolute error E between the predicted value and the actual value of each model, the predictions are sorted from small to large. If the two sets of absolute error values are equal, the coefficient R is used to determine the difference. 2 Larger first:
[0121] E (1) ,E (2) ,E (3) ,E (4)
[0122] Among them E(k) Indicates the i-th smallest error value after sorting.
[0123] 5. Determination of working condition classification labels
[0124] According to the sorting results, each input condition corresponding to the prediction result is classified. The classification criteria are as follows: (1) Label Class A:
[0125] If the error of the mechanism model is the smallest and the error of the GA-BP neural network is the largest, the label is A1
[0126] If the error of the mechanism model is the smallest and the error of the PSO-BP neural network is the largest, the label is A2
[0127] If the error of the mechanism model is the smallest and the error of the RF random forest regression model is the largest, the label is A3
[0128] (2) Label Class B:
[0129] If the error of the GA-BP neural network is the smallest and the error of the mechanism model is the largest, the label is B1
[0130] If the error of the GA-BP neural network is the smallest and the error of the PSO-BP neural network is the largest, the label is B2
[0131] If the error of the GA-BP neural network is the smallest and the error of the RF random forest regression model is the largest, the label is B3
[0132] (3) Label C:
[0133] If the error of the PSO-BP neural network is the smallest and the error of the mechanism model is the largest, the label is C1
[0134] If the error of the PSO-BP neural network is the smallest and the error of the GA-BP neural network is the largest, the label is C2
[0135] If the error of the PSO-BP neural network is the smallest and the error of the RF random forest regression model is the largest, the label is C3
[0136] (4) Tag Category D:
[0137] If the error of the RF random forest regression model is the smallest and the error of the mechanism model is the largest, the label is D1
[0138] If the error of the RF random forest regression model is the smallest and the error of the GA-BP neural network is the largest, the label is D2
[0139] If the error of the RF random forest regression model is the smallest and the error of the PSO-BP neural network is the largest, the label is D3
[0140] 6. Training of classification prediction models
[0141] The aforementioned input data (including water speed, vessel load, vessel draft, channel depth, wave height, wind direction, and relative wind speed) and output labels were used as a dataset for training using a PSO-RF classification prediction model (a random forest algorithm optimized by a particle swarm optimization algorithm). This model is able to predict classification labels based on the input operating conditions. These labels indirectly indicate which of the four fuel consumption prediction models has the highest and lowest errors under the corresponding operating conditions.
[0142] The PSO algorithm is used to optimize the hyperparameters of random forest, including the number of trees ntrees and the number of layers nlayer.
[0143] Define the objective function:
[0144] fobj(x)=fun(x,P train ,t train )
[0145] Perform PSO optimization:
[0146] [Best s core,Best p os,curve]=PSO(pop,Max i ter,lb,ub,dim,fobj)
[0147] Extract the optimal parameters from the PSO results:
[0148] n trees =round(Best p os(1))n layer =round(Best p os(2))
[0149] Train a random forest model using the optimal parameters:
[0150] model=classRF t rain(P train ,t train ,n trees ,n layer )
[0151] Use the trained model to make predictions:
[0152] [T sim1 ,Vote1]=classRF p redict(P train ,model)
[0153] [T sim2,Vote2]=classRF p redict(P test ,model)
[0154] 7. Weighting strategy and final prediction
[0155] Based on the labels predicted by the PSO-RF classification prediction model, the model with the smallest and largest errors is determined, and the prediction values of the four fuel consumption prediction models are weighted and accumulated. The weighting strategy is as follows:
[0156] The key steps to calculate the optimal weighted ratio of the four groups of models using the Bayesian Optimization algorithm include:
[0157] (1) Establish a Gaussian process regression model to approximate the objective function.
[0158] (2) Use acquisition functions such as expected improvement (EI) to select the next sampling point.
[0159] (3) Find the optimal weighted ratio combination by optimizing the acquisition function.
[0160] (4) Iteratively update the model until the optimal weighted ratio is found.
[0161] This process can be expressed mathematically as:
[0162] w opt =argmax w f(w)
[0163] Among them, w opt Represents the optimal weighted ratio combination, argmax w represents the value of w that maximizes the function f(w), which is the performance function of the weighted combination model.
[0164] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for predicting ship fuel consumption by combining a mechanism model and a data-driven model, characterized in that: The following steps are involved: Collect historical ship operation data and divide it into training and test sets in a certain proportion; the historical operation data at least includes water speed, ship load, ship draft, channel depth, wave height, wind direction, relative wind speed and ship fuel consumption; A mechanism fuel consumption prediction model is established based on the basic ship parameters and the training set of historical operation data, with water speed, ship load, ship draft, channel depth, wave height, wind direction angle, and relative wind speed as input parameters, and ship fuel consumption as output parameter; Establish a data-driven fuel consumption prediction model based on a neural network algorithm and import historical operating data for training and testing; Multiple sets of input parameters from the historical operating data test set are imported into the mechanism fuel consumption prediction model and the drive fuel consumption prediction model, each generating multiple sets of fuel consumption prediction values. For each fuel consumption prediction value, the absolute error between it and the ship consumption in the historical operating data test set is calculated, and the absolute errors between each fuel consumption prediction value and the ship consumption in the historical operating data test set are ranked according to their magnitude. Based on the sorting results, the input working conditions corresponding to each input parameter are classified according to the preset classification standard, and a classification label of the input working condition corresponding to each input parameter is generated; The input parameters and classification labels in the test set are used as a data set, and a random forest algorithm optimized by a particle swarm algorithm is used to train a classification prediction model for predicting the fuel consumption model with the minimum and maximum absolute errors when predicting the input operating conditions corresponding to each input parameter. The fuel consumption prediction model with the minimum and maximum absolute errors is determined based on the input parameters of the classification prediction model, and the fuel consumption prediction values predicted by each fuel consumption prediction model are weighted to obtain the final fuel consumption prediction value.
2. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 1, characterized in that: The fuel consumption prediction method of the mechanism fuel consumption prediction model is as follows: Establish a mechanism fuel consumption prediction model based on basic ship parameters, and input the input parameters into the mechanism fuel consumption prediction model; According to the input parameters, the total resistance of the ship is calculated; The effective power of the ship is calculated based on the basic parameters of the ship and the total resistance of the ship; Determine the main engine power of the ship based on the effective power of the ship; The fuel consumption prediction value under the fuel consumption prediction model is calculated based on the ship's main engine power.
3. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 1, characterized in that: The data-driven fuel consumption prediction model includes at least a GA-BP neural network regression model, a PSO-BP neural network regression model, and an RF random forest regression model; among them, The modeling method of the GA-BP neural network regression model is as follows: normalize the data in the training set and the test set, and scale the normalized data to the range of [0, 1]; establish a BP neural network model, define the number of hidden layer nodes as 5, and set the training parameters, which include at least the maximum number of iterations, error threshold and learning rate; set the optimization parameters of the genetic algorithm GA, define the genetic generation, population size and optimization variable boundary, and generate the initial population; perform genetic algorithm optimization to obtain the optimal parameters and assign them to the neural network; train the BP neural network model based on the normalized training set data to obtain the GA-BP neural network regression model; use the GA-BP neural network regression model to make predictions on the training set and the test set, and denormalize the prediction results; The modeling method of the PSO-BP neural network regression model is as follows: normalize the data in the training set and the test set; define the number of nodes in the input layer, hidden layer and output layer, establish a BP neural network model, and set the training parameters; initialize the PSO algorithm parameters, which include at least the learning factor, the number of population updates, the population size, the speed and the boundary; initialize the population and speed, calculate the fitness value, and determine the individual extreme value and the group extreme value; in the iterative process, update the speed and population position, and adaptively mutate; continuously update the individual optimal value and the group optimal value, and record the optimal fitness value; extract the optimal initial weight and threshold, and assign them to the neural network; train the BP neural network model based on the normalized training set data to obtain the PSO-BP neural network regression model; use the PSO-BP neural network regression model to make predictions on the training set and the test set, and denormalize the prediction results; The modeling method of the RF random forest regression model is as follows: normalize the data in the training set and the test set; transpose the normalized data to fit the model, set the number of decision trees, the minimum number of leaves, the error calculation and the feature importance options, and train the RF random forest regression model based on the normalized training set data; make predictions on the training set and the test set through the RF random forest regression model, and denormalize the prediction results.
4. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 2, characterized in that: The method for calculating the effective power of a ship based on the basic parameters of the ship and the total resistance of the ship is: EP=(R T ×V s ) / η t Among them, EP is the effective efficiency of the ship, R T is the total resistance of the ship, V s is the ship’s speed through water, η t For transmission efficiency.
5. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 4, characterized in that: The method for determining the main engine power of a ship based on the effective power of the ship is: BP=EP / τ m Among them, BP is the main engine power of the ship, τ m For host efficiency.
6. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 5, characterized in that: The method for calculating the fuel consumption prediction value under the fuel consumption prediction model based on the ship's main engine power is: Among them, F c is the fuel consumption prediction value, SFOC is the fuel consumption rate of the engine, T y For the sailing time.
7. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 3, characterized in that: For each fuel consumption prediction value, the absolute error between it and the ship consumption in the historical operation data test set is calculated, and the absolute error between each fuel consumption prediction value and the ship consumption in the historical operation data test set is ranked according to the size. The specific method is: For each fuel consumption prediction value, first calculate the determination coefficient R of each fuel consumption prediction model 2 , whose range is [0, 1], is expressed as: in, is the mean value of ship consumption in the historical operation data test set, y i is the actual value of the i-th observation in the historical operating data test set, is the fuel consumption prediction value of the i-th observation; For each fuel consumption prediction value, calculate the absolute error E between it and the ship consumption in the historical operating data test set: Among them, E GA-BP 、E PSO-BP 、E RF 、E MECH The fuel consumption prediction values are calculated by GA-BP neural network regression model, PSO-BP neural network regression model, RF random forest regression model, and mechanism fuel consumption prediction model respectively. The absolute error between the consumption of ships in the test set and the historical operating data; According to the absolute error E of the fuel consumption prediction value of each fuel consumption prediction model and the ship consumption in the historical operation data test set, they are sorted from small to large. If the absolute errors of the two groups are equal, the coefficient of determination R is used. 2 The larger ones are sorted first, expressed as: AND (1) ,AND (2) ,AND (3) ,AND (4) Among them E (k) Represents the i-th smallest error value after sorting, k∈1,2,3,4.
8. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 7, characterized in that: The classification labels and their classification standards are as follows: (1) Label Category A: If the absolute error of the mechanism fuel consumption prediction model is the smallest and the absolute error of the GA-BP neural network regression model is the largest, the label is A1; If the absolute error of the mechanism fuel consumption prediction model is the smallest and the absolute error of the PSO-BP neural network regression model is the largest, the label is A2; If the absolute error of the mechanism fuel consumption prediction model is the smallest and the absolute error of the RF random forest regression model is the largest, the label is A3; (2) Label Class B: If the absolute error of the GA-BP neural network regression model is the smallest and the absolute error of the mechanism fuel consumption prediction model is the largest, the label is B1; If the absolute error of the GA-BP neural network regression model is the smallest and the absolute error of the PSO-BP neural network regression model is the largest, the label is B2; If the absolute error of the GA-BP neural network regression model is the smallest and the absolute error of the RF random forest regression model is the largest, the label is B3; (3) Label C: If the absolute error of the PSO-BP neural network regression model is the smallest and the absolute error of the mechanism fuel consumption prediction model is the largest, the label is C1; If the absolute error of the PSO-BP neural network regression model is the smallest and the absolute error of the GA-BP neural network regression model is the largest, the label is C2; If the error of the PSO-BP neural network regression model is the smallest and the error of the RF random forest regression model is the largest, the label is C3; (4) Tag Category D: If the error of the RF random forest regression model is absolutely the smallest and the error of the mechanism fuel consumption prediction model is absolutely the largest, the label is D1; If the error of the RF random forest regression model is the absolute minimum and the absolute error of the GA-BP neural network regression model is the maximum, the label is D2; If the absolute error of the RF random forest regression model is the smallest and the absolute error of the PSO-BP neural network regression model is the largest, the label is D3.
9. The method for predicting ship fuel consumption by combining a mechanism model and a data-driven model according to claim 1, characterized in that: The weighting strategy for weighting the fuel consumption prediction values obtained by each fuel consumption prediction model is: Establish a Gaussian process regression model to approximate the target function; Use the expected improvement acquisition function to select the next sampling point; Find the optimal weighted ratio combination by optimizing the acquisition function; Iteratively update the model until the optimal weighted ratio is found; The above process is expressed as: w opt =argmax w f(w) Among them, w opt Represents the optimal weighted ratio combination, argmax w represents the value of w that maximizes the function f(w), which is the performance function of the weighted combination model.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Ship route optimization method based on oil consumption prediction
CN118095600A
Method for predicting fuel consumption of wing-aided ship based on meta-learning enhancement
CN118153750A