A dual-fuel main engine fuel consumption model construction method and system
Through the construction method of dual-fuel main engine fuel consumption model, real-time navigation data and environmental information are used, combined with Spearman correlation analysis and stochastic gradient descent algorithm, the problem that the ship fuel consumption model in the existing technology cannot be accurately predicted, and high precision is achieved fuel and alternative fuel consumption forecasts.
Patent Information
- Application Number
- CN202411280366.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-13
AI Technical Summary
The prior art ship fuel consumption model does not take into account ship parameters and ship-machine-pad matching relationship, and cannot be constructed through real-time navigation data, resulting in the inability to accurately estimate ship fuel consumption.
The construction method of dual-fuel host fuel consumption model includes data acquisition, classification, preprocessing, feature extraction, K-fold cross-validation and neural network model training. The model is optimized by real-time navigation data and environmental information, and the Spearman correlation analysis and randomization are used. Gradient descent algorithm optimizes model parameters.
Improve model accuracy, enable accurate estimates of fuel and alternative fuel consumption based on real-time ship performance and environmental factors, reduce data volume, and continuously optimize model accuracy through real-time corrections.
Smart Images

Figure CN118780321B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of fuel consumption model construction, and in particular relates to a dual-fuel main engine fuel consumption model construction method and system. Background Art
[0002] Facing increasingly stringent emission regulations, ship energy consumption and greenhouse gas emissions have become a major concern for shipowners and shipyards. As a key supporting technology for green and intelligent ships, major shipyards, universities and research institutions at home and abroad are developing and researching technologies related to ship operation energy efficiency.
[0003] Driven by environmental pollution and energy shortage, dual-fuel engines are gaining increasing attention for their clean, efficient and economical advantages. The ship's dual-fuel main engine can switch between full fuel mode and full gas mode according to the working conditions to keep the ship in the best operating state. Full diesel operation mode means that the dual-fuel main engine uses diesel as the main fuel in this mode, and full gas operation mode means that the dual-fuel main engine uses natural gas as the main fuel and diesel as pilot oil in this mode, in which the supply of pilot oil and gas are controlled by the fuel supply system. In general, the amount of pilot oil should be less than 1% of the total fuel in the full fuel operation mode under the calibrated working conditions.
[0004] Greenhouse gases emitted in ship transportation are closely related to fuel consumption, and the research on ship fuel consumption data is of great significance. In recent years, in order to accurately evaluate the emission of greenhouse gases in ship transportation, it has become a common method to establish a fuel consumption prediction model for ships through ship fuel consumption data. The research methods of the fuel consumption model of a single fuel main engine of a ship in the prior art can be roughly divided into three categories: the first category is a white box model based on the analysis of the relationship between the physical quantities of the main and auxiliary engines of the ship, but this model is only used to analyze the relationship between internal physical quantities in the ship design stage and has a good effect; the second category is a black box model that directly models the data relationship, but a large number of structural parameters need to be set for the neural network; the third category is a gray box model that combines the two. The black box model can save the complex physical changes in the energy consumption model. Its main advantage is that it gives a relatively accurate energy consumption model based on the number, multiple factors, and comprehensiveness of the ship operation data, but it requires a large number of structural parameters, a large amount of calculation, and high-dimensional data. Therefore, it is necessary to introduce a gray box model that combines the two, determine the initial characteristic parameters through empirical formulas, and train the model through historical operation data.
[0005] The existing fuel consumption model construction method does not take into account the physical relationship basis such as ship parameters, ship-engine-propeller matching relationship, etc., and is not constructed through real-time collected navigation data. It requires a large amount of data and cannot accurately estimate the ship's fuel consumption based on real-time ship performance. Summary of the invention
[0006] The present invention aims to solve the problems that the fuel consumption model construction method in the prior art does not consider the physical relationship basis such as ship parameters, ship-engine-propeller matching relationship, etc., is not constructed through real-time collected navigation data, requires a large amount of data, and cannot accurately estimate the ship fuel consumption according to the real-time ship performance. A dual-fuel main engine fuel consumption model construction method is provided, which includes the following steps:
[0007] S1: Data acquisition: Acquire the initial ship operation data of the dual-fuel ship under normal sailing conditions;
[0008] S2: Data classification: According to the fuel mode indication of the dual-fuel main engine, the actual ship operation data set is divided into the initial fuel mode data set and the initial alternative fuel mode data set;
[0009] S3: Data preprocessing: performing data dimension reduction, data cleaning, correlation analysis and data standardization on the initial fuel mode data set and the initial alternative fuel mode data set in turn;
[0010] The data dimension reduction is calculated through the actual ship operation data set:
[0011] Ship draft T = ;
[0012] Trim ;
[0013] in: T F and T A They are the bow and stern draft data of the ship respectively;
[0014] Engine fuel consumption FOC The calculation formula is:
[0015]
[0016] in: Qf in Import fuel consumption for the main engine; Qf out The fuel consumption at the main engine outlet; M F It is the indicator of the host operation mode; Qg in Importing alternative fuel consumption for the main engine;
[0017] The data cleaning is to remove duplicate values, missing values, and outliers from the modeling data set after data dimension reduction. The upper and lower limits of the main engine fuel consumption are used as outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid the loss of a large number of normal data, and finally obtain the modeling data set after data cleaning;
[0018]
[0019] In the formula, The upper and lower limits of the main engine fuel consumption, is the range parameter, is the host output power, SFOC is the fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data and obtained from the main engine manufacturer. SFOC curve;
[0020] The correlation analysis: The modeling data set after data cleaning is subjected to Spearman correlation analysis to extract characteristic parameters and obtain C S , Speed V S , Draft T , Pitch T R , Flow direction D F , flow rate V F ,wind direction D W , wind speed V W , Youyi Bogao H 1 / 3 , Engine fuel consumption FOC The characteristic parameter set composed of: the formula of the Spearman correlation analysis is:
[0021]
[0022] In the formula, is the Spearman rank correlation coefficient, is the sample size, Features Data After sorting in descending or ascending order, Features Data After being arranged in descending or ascending order, the Spearman rank correlation coefficient has a numerical range of [-1,1]. A coefficient of 0 indicates that the two features are unrelated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the larger the absolute value, the stronger the correlation.
[0023] The data standardization is to perform zero-mean standardization on the modeling data set after correlation analysis to improve model performance. The zero-mean standardization formula is:
[0024]
[0025]
[0026] are the extracted feature parameters, where i= 1, 2 , … n ; Features x The standard deviation of is the sample size; Features x The average value of Normalize the values for the features;
[0027] S4: Feature parameter extraction: Based on the data preprocessed in S3, feature parameter extraction is performed to obtain an initial fuel mode feature parameter set and an initial alternative fuel mode feature data set;
[0028] S5: K Cross-validation: Based on the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set of S4, K Fold cross validation to obtain test sets and training sets to improve model performance;
[0029] S5-1: randomly divide the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set obtained in step S4 into K The first one is used as the validation set, and the rest K -1 as training set;
[0030] S5-2: Use the second copy as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification, the test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and the test set 2 and training set 2 are obtained through the initial alternative fuel mode characteristic data set. K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results;
[0031] S6: Neural network model training: based on S5 K The training set obtained by cross-validation is used to train the neural network model;
[0032] S6-1: Based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set, use KThe training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network and obtain a neural network model with initial values. sigmoid The function is:
[0033]
[0034] S7: predicting fuel consumption and predicting alternative fuel consumption: obtaining predicted fuel consumption and predicted alternative fuel consumption after training the S6 neural network model;
[0035] S8: Model performance evaluation: Pass K The test set of fold cross validation is based on S5 K The model performance is evaluated by using the test set 1 and test set 2 obtained by cross-validation, and the predicted fuel consumption and predicted alternative fuel consumption: Define the mean square error loss function Optimize the model objective using stochastic gradient descent with momentum SGD To update the model parameters, where:
[0036]
[0037] is the actual fuel consumption, which represents the actual fuel consumption or the actual alternative fuel consumption; To predict fuel consumption, it means predicting fuel consumption or predicting alternative fuel consumption. i =1,2,... n ; Mean square error function The quality of the model is measured by calculating the square of the predicted fuel consumption and the actual fuel consumption; that is, the closer the predicted fuel consumption is to the actual fuel consumption, the smaller the mean square error between the two is, and based on this, the optimal model is obtained;
[0038] Stochastic Gradient Descent SGD It is a gradient-based optimization algorithm used to find the mean square error loss function Model parameter configuration; Stochastic gradient descent algorithm SGD Update the parameters by computing the gradient for each sample and randomly selecting one or a batch of samples in each update;
[0039] S9: Establish a dual-fuel main engine fuel consumption model: The optimal model obtained from the S8 model performance evaluation is used to perform real-time data correction on the optimal model to optimize the model accuracy: the data collected during the actual ship's voyage is used as input, and after the S2~S8 data preprocessing process, the model accuracy is continuously optimized to establish a dual-fuel main engine fuel consumption model.
[0040] In a preferred manner, in step S1, the initial operating data of the dual-fuel ship under normal navigation conditions obtained includes: communication and navigation equipment data, engine room monitoring and alarm system data, sensor data, and environmental data.
[0041] In a preferred embodiment, the navigation equipment data includes: heading data collected by a gyrocompass; C S , speed recorded by the speedometer V S , water depth collected by the depth sounder D , wind speed collected by anemometer V W ,wind direction D W ;
[0042] The cabin monitoring alarm system data, i.e., AMS data, includes: main engine speed S ME , Host operation mode indicator M F ; Ship bow and stern draft data collected by the liquid level telemetry system T F and T A ;
[0043] The sensor data includes: the host output power collected by the shaft power meter P B , Main engine imported fuel consumption collected by flow meter Qf in , Main engine export fuel consumption Qf out and main engine import substitution fuel consumption Qg in ;
[0044] The environmental data includes: D F , flow rate V F , Youyi Bogao H 1 / 3 .
[0045] In a preferred embodiment, in step S5, the ship's heading, speed, draft, trim, wind direction, wind speed, flow direction, flow speed and significant wave height collected during the actual ship's navigation are used as inputs, and after the data preprocessing process of step S3, they are input into the initial dual-fuel fuel consumption model of step S5-2 to obtain the predicted fuel consumption or the predicted alternative fuel consumption. The fuel consumption calculated by the model is compared with the fuel consumption collected by the actual ship, and the model parameters are updated using the stochastic gradient algorithm with additional momentum to define the mean square error loss function Optimize the model objectives and further optimize the model accuracy.
[0046] In a preferred manner, in step S9, the ship's heading, speed, draft and trim are set according to the route information, the time and route longitude and latitude information are provided to the meteorological company, and the environmental information in the future time provided by the meteorological company is obtained. The above parameters are used as input and processed by the dual-fuel main engine fuel consumption model to obtain the predicted fuel consumption and predicted alternative fuel consumption.
[0047] In a preferred manner, the environmental information in the future time includes the wind direction, wind speed, flow direction, flow speed and significant wave height on the route in the future time.
[0048] A dual-fuel main engine fuel consumption model construction system includes the following modules: data acquisition module, data classification module, data processing module, data extraction module, K Fold verification module, training module, performance evaluation module;
[0049] M1: Data acquisition: The data acquisition module acquires the initial ship operation data under normal sailing conditions of the dual-fuel ship;
[0050] M2: Data classification: The data classification module divides the actual ship operation data set into an initial fuel mode data set and an initial alternative fuel mode data set according to the fuel mode indication of the dual-fuel main engine;
[0051] M3: Data preprocessing: The data processing module performs data dimension reduction, data cleaning, correlation analysis and data standardization on the initial fuel mode data set and the initial alternative fuel mode data set in turn;
[0052] The data dimension reduction is calculated through the actual ship operation data set:
[0053] Vessel draught T = ;
[0054] Trim T R = T F - T A ;
[0055] in:T F and T A They are the bow and stern draft data of the ship respectively;
[0056] Engine fuel consumption FOC The calculation formula is:
[0057]
[0058] in: Qf in Import fuel consumption for the main engine; Qf out The fuel consumption at the main engine outlet; M F It is the indicator of the host operation mode; Qg in Importing alternative fuel consumption for the main engine;
[0059] The data cleaning is to remove duplicate values, missing values, and outliers from the modeling data set after data dimension reduction. The upper and lower limits of the main engine fuel consumption are used as outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid the loss of a large number of normal data, and finally obtain the modeling data set after data cleaning;
[0060]
[0061] In the formula, The upper and lower limits of the main engine fuel consumption, is the range parameter, is the host output power, SFOC is the fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data and obtained from the main engine manufacturer. SFOC curve;
[0062] The correlation analysis: The modeling data set after data cleaning is subjected to Spearman correlation analysis to extract characteristic parameters and obtain C S , Speed V S , Draft T , Pitch T R , Flow direction D F , flow rate V F ,wind direction D W , wind speed V W , Youyi Bogao H 1 / 3 , Engine fuel consumptionFOC The characteristic parameter set composed of: the Spearman correlation analysis formula is:
[0063]
[0064] In the formula, is the Spearman rank correlation coefficient, is the sample size, Features Data After sorting in descending or ascending order, Features Data After being arranged in descending or ascending order, the Spearman rank correlation coefficient has a numerical range of [-1,1]. A coefficient of 0 indicates that the two features are unrelated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the larger the absolute value, the stronger the correlation.
[0065] The data standardization is to perform zero-mean standardization on the modeling data set after correlation analysis to improve model performance. The zero-mean standardization formula is:
[0066]
[0067]
[0068] are the extracted feature parameters, where i= 1, 2 , … n ; Features x The standard deviation of is the sample size; Features x The average value of Normalize the values for the features;
[0069] M4: Feature parameter extraction: Based on the data preprocessed by M3, the data extraction module extracts feature parameters to obtain the initial fuel mode feature parameter set and the initial alternative fuel mode feature data set;
[0070] M5: K Cross-validation: Based on the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set of M4, K fold cross validation, K The fold validation module obtains the test set and training set to improve the model performance;
[0071] M5-1: Randomly divide the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set obtained in M4 into KThe first one is used as the validation set, and the rest K -1 as training set;
[0072] M5-2: Use the second copy as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification, the test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and the test set 2 and training set 2 are obtained through the initial alternative fuel mode characteristic data set. K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results;
[0073] M6: Neural network model training: based on M5 K The training set obtained by cross-validation is used to train the neural network model;
[0074] M6-1: The training module is based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set. K The training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network and obtain a neural network model with initial values. sigmoid The function is:
[0075]
[0076] M7: Predicted fuel consumption and predicted alternative fuel consumption: The predicted fuel consumption and predicted alternative fuel consumption are obtained after training the M6 neural network model;
[0077] M8: Model performance evaluation: The performance evaluation module is passed K The test set of fold cross validation is based on M5 K The model performance is evaluated by using the test set 1 and test set 2 obtained by cross-validation, and the predicted fuel consumption and predicted alternative fuel consumption: Define the mean square error loss function Optimize the model objective using stochastic gradient descent with momentum SGD To update the model parameters, where:
[0078]
[0079] is the actual fuel consumption, which represents the actual fuel consumption or the actual alternative fuel consumption; To predict fuel consumption, it means predicting fuel consumption or predicting alternative fuel consumption. i =1,2,... n ; Mean square error function The quality of the model is measured by calculating the square of the predicted fuel consumption and the actual fuel consumption; that is, the closer the predicted fuel consumption is to the actual fuel consumption, the smaller the mean square error between the two is, and based on this, the optimal model is obtained;
[0080] Stochastic Gradient Descent SGD It is a gradient-based optimization algorithm used to find the mean square error loss function Model parameter configuration; Stochastic gradient descent algorithm SGD Update the parameters by computing the gradient for each sample and randomly selecting one or a batch of samples in each update;
[0081] M9: Establish a dual-fuel main engine fuel consumption model: The optimal model obtained from the M8 model performance evaluation is used to perform real-time data correction on the optimal model to optimize the model accuracy: the data collected during the actual ship's voyage is used as input, and after the M2~M8 data preprocessing process, the model accuracy is continuously optimized to establish a dual-fuel main engine fuel consumption model.
[0082] Beneficial effects of the present invention:
[0083] 1. The present invention divides the actual ship operation data set into an initial fuel mode data set and an initial alternative fuel mode data set according to the fuel mode indication of the dual-fuel main engine, and obtains a fuel model and an alternative fuel model respectively. After data preprocessing, the data volume is reduced.
[0084] 2. The present invention integrates empirical formulas and operational data, taking into account environmental factors such as hydrology and meteorology, and greatly improves the accuracy of the model through real-time collection of navigation data and environmental information.
[0085] 3. The model of the present invention adopts K The cross-fold method is used to build a neural network model for training. The optimal fuel model and alternative fuel model can be continuously optimized and iterated according to the actual heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed and significant wave height. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 Construct a flow chart for the dual-fuel main engine fuel consumption model;
[0087] Figure 2 Real-time correction flow chart for dual-fuel main engine fuel consumption model;
[0088] Figure 3This is the fuel consumption prediction flow chart for dual-fuel main engine. DETAILED DESCRIPTION
[0089] Preferred Embodiments
[0090] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0091] like Figure 1 As shown: A method for constructing a dual-fuel main engine fuel consumption model comprises the following steps:
[0092] S1: Data acquisition: Acquire the initial ship operation data of the dual-fuel ship under normal sailing conditions;
[0093] S2: Data classification: According to the fuel mode indication of the dual-fuel main engine, the actual ship operation data set is divided into the initial fuel mode data set and the initial alternative fuel mode data set;
[0094] S3: Data preprocessing: performing data dimension reduction, data cleaning, correlation analysis and data standardization on the initial fuel mode data set and the initial alternative fuel mode data set in turn;
[0095] The data dimension reduction is calculated through the actual ship operation data set:
[0096] Vessel draught T = ;
[0097] Trim ;
[0098] in: T F and T A They are the bow and stern draft data of the ship respectively;
[0099] Engine fuel consumption FOC The calculation formula is:
[0100]
[0101] in: Qf in Import fuel consumption for the main engine; Qf out The fuel consumption at the main engine outlet; M F It is the indicator of the host operation mode; Qg in Importing alternative fuel consumption for the main engine;
[0102] The data cleaning is to remove duplicate values, missing values, and outliers from the modeling data set after data dimension reduction. The upper and lower limits of the main engine fuel consumption are used as outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid the loss of a large number of normal data, and finally obtain the modeling data set after data cleaning;
[0103]
[0104] In the formula, The upper and lower limits of the main engine fuel consumption, is the range parameter, is the host output power, SFOC is the fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data and obtained from the main engine manufacturer. SFOC curve;
[0105] The correlation analysis: The modeling data set after data cleaning is subjected to Spearman correlation analysis to extract characteristic parameters and obtain C S , Speed V S , Draft T , Pitch T R , Flow direction D F , flow rate V F ,wind direction D W , wind speed V W , Youyi Bogao H 1 / 3 , Engine fuel consumption FOC The characteristic parameter set composed of: the formula of the Spearman correlation analysis is:
[0106]
[0107] In the formula, is the Spearman rank correlation coefficient, is the sample size, Features Data After sorting in descending or ascending order, Features Data After being arranged in descending or ascending order, the Spearman rank correlation coefficient has a numerical range of [-1,1]. A coefficient of 0 indicates that the two features are unrelated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the larger the absolute value, the stronger the correlation.
[0108] The data standardization is to perform zero-mean standardization on the modeling data set after correlation analysis to improve model performance. The zero-mean standardization formula is:
[0109]
[0110]
[0111] For each feature parameter extracted, such as Represents the heading, represents the speed of the ship, where i= 1, 2 , … n ; Features x The standard deviation of is the sample size; Features x The average value of Normalize the values for the features;
[0112] S4: Feature parameter extraction: Based on the data preprocessed in S3, feature parameter extraction is performed to obtain an initial fuel mode feature parameter set and an initial alternative fuel mode feature data set;
[0113] S5: K Cross-validation: Based on the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set of S4, K Fold cross validation to obtain test sets and training sets to improve model performance;
[0114] S5-1: randomly divide the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set obtained in step S4 into K The first one is used as the validation set, and the rest K -1 as training set;
[0115] S5-2: Use the second copy as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification, the test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and the test set 2 and training set 2 are obtained through the initial alternative fuel mode characteristic data set. K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results;
[0116] S6: Neural network model training: based on S5 KThe training set obtained by cross-validation is used to train the neural network model;
[0117] S6-1: Based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set, use K The training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network and obtain a neural network model with initial values. sigmoid The function is:
[0118]
[0119] S7: Predicted fuel consumption and predicted alternative fuel consumption: After training the S6 neural network model, the predicted fuel consumption and predicted alternative fuel consumption are obtained; alternative fuel refers to non-fuel such as LNG, methanol, liquid ammonia, etc. Dual-fuel main engine has two operating modes: fuel oil / gas (or other alternative fuels), so it is necessary to consider the predicted fuel consumption and predicted alternative fuel consumption separately;
[0120] S8: Model performance evaluation: Pass K The test set of fold cross validation is based on S5 K The model performance is evaluated by using the test set 1 and test set 2 obtained by cross-validation, and the predicted fuel consumption and predicted alternative fuel consumption: Define the mean square error loss function Optimize the model objective using stochastic gradient descent with momentum SGD To update the model parameters, where:
[0121]
[0122] is the actual fuel consumption, which represents the actual fuel consumption or the actual alternative fuel consumption; To predict fuel consumption, it means predicting fuel consumption or predicting alternative fuel consumption. i =1,2,... n ; Mean square error function The quality of the model is measured by calculating the square of the predicted fuel consumption and the actual fuel consumption; that is, the closer the predicted fuel consumption is to the actual fuel consumption, the smaller the mean square error between the two is, and based on this, the optimal model is obtained;
[0123] Stochastic Gradient Descent SGDIt is a gradient-based optimization algorithm used to find the mean square error loss function Model parameter configuration; Stochastic gradient descent algorithm SGD Update the parameters by computing the gradient for each sample and randomly selecting one or a batch of samples in each update;
[0124] S9: Establish a dual-fuel main engine fuel consumption model: The optimal model obtained from the S8 model performance evaluation is used to perform real-time data correction on the optimal model to optimize the model accuracy: the data collected during the actual ship's voyage is used as input, and after the S2~S8 data preprocessing process, the model accuracy is continuously optimized to establish a dual-fuel main engine fuel consumption model.
[0125] In step S1, the initial operating data of the dual-fuel ship under normal navigation conditions obtained include: communication and navigation equipment data, engine room monitoring and alarm system data, sensor data, and environmental data.
[0126] The navigation equipment data includes: heading collected from the gyro compass C S , speed recorded by the speedometer V S , water depth collected by the depth sounder D , wind speed collected by anemometer V W ,wind direction D W ;
[0127] The cabin monitoring alarm system data, i.e., AMS data, includes: main engine speed S ME , Host operation mode indicator M F ; Ship bow and stern draft data collected by the liquid level telemetry system T F and T A ;
[0128] The sensor data includes: the host output power collected by the shaft power meter P B , Main engine imported fuel consumption collected by flow meter Qf in , Main engine export fuel consumption Qf out and main engine import substitution fuel consumption Qg in ;
[0129] The environmental data includes: D F , flow rate V F , Youyi BogaoH 1 / 3 .
[0130] In step S5, the ship's heading, speed, draft, trim, wind direction, wind speed, flow direction, flow speed and significant wave height collected during the actual ship's voyage are used as inputs. After the data preprocessing process in step S3, they are input into the initial dual-fuel fuel consumption model of step S5-2 to obtain the predicted fuel consumption or the predicted alternative fuel consumption. The fuel consumption calculated by the model is compared with the fuel consumption collected by the actual ship, and the model parameters are updated using the stochastic gradient algorithm with additional momentum. The mean square error loss function is defined Optimize the model objectives and further optimize the model accuracy.
[0131] In step S9, the ship's heading, speed, draft and trim are set according to the route information, the time and route longitude and latitude information are provided to the meteorological company, and the environmental information in the future time provided by the meteorological company is obtained. The above parameters are used as input and processed by the dual-fuel main engine fuel consumption model to obtain the predicted fuel consumption and predicted alternative fuel consumption.
[0132] The environmental information in the future time includes the wind direction, wind speed, flow direction, flow speed and significant wave height on the route in the future time.
[0133] A dual-fuel main engine fuel consumption model construction system includes the following modules: data acquisition module, data classification module, data processing module, data extraction module, K Fold verification module, training module, performance evaluation module;
[0134] M1: Data acquisition: The data acquisition module acquires the initial ship operation data under normal sailing conditions of the dual-fuel ship;
[0135] M2: Data classification: The data classification module divides the actual ship operation data set into an initial fuel mode data set and an initial alternative fuel mode data set according to the fuel mode indication of the dual-fuel main engine;
[0136] M3: Data preprocessing: The data processing module performs data dimension reduction, data cleaning, correlation analysis and data standardization on the initial fuel mode data set and the initial alternative fuel mode data set in turn;
[0137] The data dimension reduction is calculated through the actual ship operation data set:
[0138] Ship draft T = ;
[0139] Trim T R = T F - T A ;
[0140] in: T F and T A They are the bow and stern draft data of the ship respectively;
[0141] Engine fuel consumption FOC The calculation formula is:
[0142]
[0143] in: Qf in Import fuel consumption for the main engine; Qf out The fuel consumption at the main engine outlet; M F It is the indicator of the host operation mode; Qg in Importing alternative fuel consumption for the main engine;
[0144] The data cleaning is to remove duplicate values, missing values, and outliers from the modeling data set after data dimension reduction. The upper and lower limits of the main engine fuel consumption are used as outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid the loss of a large number of normal data, and finally obtain the modeling data set after data cleaning;
[0145]
[0146] In the formula, The upper and lower limits of the main engine fuel consumption, is the range parameter, is the host output power, SFOC is the fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data and obtained from the main engine manufacturer. SFOC curve;
[0147] The correlation analysis: The modeling data set after data cleaning is subjected to Spearman correlation analysis to extract characteristic parameters and obtain C S , Speed V S , Draft T , Pitch T R , Flow direction D F , flow rate V F ,wind direction D W , wind speed V W , Youyi BogaoH 1 / 3 , Engine fuel consumption FOC The characteristic parameter set composed of: the Spearman correlation analysis formula is:
[0148]
[0149] In the formula, is the Spearman rank correlation coefficient, is the sample size, Features Data After sorting in descending or ascending order, Features Data After being arranged in descending or ascending order, the Spearman rank correlation coefficient has a numerical range of [-1,1]. A coefficient of 0 indicates that the two features are unrelated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the larger the absolute value, the stronger the correlation.
[0150] The data standardization is to perform zero-mean standardization on the modeling data set after correlation analysis to improve model performance. The zero-mean standardization formula is:
[0151]
[0152]
[0153] are the extracted feature parameters, where i= 1, 2 , … n ; Features x The standard deviation of is the sample size; Features x The average value of Normalize the values for the features;
[0154] M4: Feature parameter extraction: Based on the data preprocessed by M3, the data extraction module extracts feature parameters to obtain the initial fuel mode feature parameter set and the initial alternative fuel mode feature data set;
[0155] M5: K Cross-validation: Based on the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set of M4, K fold cross validation, K The fold validation module obtains the test set and training set to improve the model performance;
[0156] M5-1: Randomly divide the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set obtained in M4 into K The first one is used as the validation set, and the rest K -1 as training set;
[0157] M5-2: Use the second copy as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification, the test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and the test set 2 and training set 2 are obtained through the initial alternative fuel mode characteristic data set. K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results;
[0158] M6: Neural network model training: based on M5 K The training set obtained by cross-validation is used to train the neural network model;
[0159] M6-1: The training module is based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set. K The training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network and obtain a neural network model with initial values. sigmoid The function is:
[0160]
[0161] M7: Predicted fuel consumption and predicted alternative fuel consumption: The predicted fuel consumption and predicted alternative fuel consumption are obtained after training the M6 neural network model;
[0162] M8: Model performance evaluation: The performance evaluation module is passed K The test set of fold cross validation is based on M5 K The model performance is evaluated by using the test set 1 and test set 2 obtained by cross-validation, and the predicted fuel consumption and predicted alternative fuel consumption: Define the mean square error loss function Optimize the model objective using stochastic gradient descent with momentum SGD To update the model parameters, where:
[0163]
[0164] is the actual fuel consumption, which represents the actual fuel consumption or the actual alternative fuel consumption; To predict fuel consumption, it means predicting fuel consumption or predicting alternative fuel consumption. i =1,2,... n ; Mean square error function The quality of the model is measured by calculating the square of the predicted fuel consumption and the actual fuel consumption; that is, the closer the predicted fuel consumption is to the actual fuel consumption, the smaller the mean square error between the two is, and based on this, the optimal model is obtained;
[0165] Stochastic Gradient Descent SGD It is a gradient-based optimization algorithm used to find the mean square error loss function Model parameter configuration; Stochastic gradient descent algorithm SGD Update the parameters by computing the gradient for each sample and randomly selecting one or a batch of samples in each update;
[0166] M9: Establish a dual-fuel main engine fuel consumption model: The optimal model obtained from the M8 model performance evaluation is used to perform real-time data correction on the optimal model to optimize the model accuracy: the data collected during the actual ship's voyage is used as input, and after the M2~M8 data preprocessing process, the model accuracy is continuously optimized to establish a dual-fuel main engine fuel consumption model.
[0167] In step S5, the fuel mode characteristic parameter set and the initial alternative fuel characteristic data set are respectively K Fold cross validation:
[0168] First, the fuel mode characteristic parameter set and the initial alternative fuel characteristic data set obtained in step S4 are randomly divided into K The first one is used as the validation set, and the rest K -1 as the training set, and the second as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification: Test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and test set 2 and training set 2 are obtained through the initial alternative fuel characteristic data set; K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results;
[0169] K Fold cross validation ( K =1, 2, ...), the value depends on the amount of data, and an example is given ( K =5):
[0170] 1. Divide the modeling dataset into 5 subsets;
[0171] 2. For each subset, use it as a validation set and the remaining 4 subsets as training sets;
[0172] 3. Train the model, evaluate it on the validation set, and record the performance of the model;
[0173] 4. Repeat steps 2 and 3 until each subset serves as a validation set, resulting in 5 models with different performances.
[0174] 5. Select the optimal initial dual-fuel consumption model.
[0175] In step S6, based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic parameter set, use K The training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network to obtain a neural network model with initial values;
[0176] sigmoid The function is:
[0177] .
[0178] The basic principles of this neural network model refer to the book "MATLAB Neural Network 43 Case Studies".
[0179] K The cross-fold training first randomly divides the training data set into K The first set is used as the validation set, and the remaining K-1 sets are used as the training set. Then the second set is used as the validation set, and the remaining K-1 sets are used as the training set. Repeat this step to make K Training and K Verification.
[0180] In step S8, the predicted fuel consumption and the predicted alternative fuel consumption obtained in step S7 are used to calculate the fuel consumption and the predicted alternative fuel consumption. K Fold the cross-test set 1 and test set 2 to evaluate the model performance: define the mean square error loss function
[0181] .
[0182] In step S9, the ship's heading, speed, draft, trim, wind direction, wind speed, flow direction, flow speed and significant wave height collected during the actual ship's navigation are used as inputs. After the data preprocessing process in step S3, they are input into S6 for neural network model training to obtain predicted fuel consumption or predicted alternative fuel consumption. The fuel consumption calculated by the model is compared with the fuel consumption collected by the actual ship, and the model parameters are updated using the stochastic gradient algorithm with additional momentum to define the mean square error loss function The model optimization goal uses the stochastic gradient descent algorithm SGD with additional momentum to update the model parameters and further optimize the model accuracy. The ship's heading, speed, draft and trim are set according to the route information, and the time and route longitude and latitude information are provided to the meteorological company. The environmental information in the future time provided by the meteorological company is obtained, and the above parameters are used as input. After being processed by the dual-fuel main engine fuel consumption model, the predicted fuel consumption and predicted alternative fuel consumption are obtained. The environmental information in the future time includes the wind direction, wind speed, flow direction, flow speed and significant wave height on the route in the future time.
[0183] The main engine fuel consumption model for single fuel prediction in the present invention has been applied on the T300K-99 ship built by Dalian Shipbuilding for China Merchants Shipping in January 2023. The fuel consumption model established by the present invention has high accuracy after verification by actual ship application. The dual-fuel main engine fuel consumption model established this time will be applied to the T300K-103 methanol dual-fuel VLCC.
[0184] The above description is only a preferred embodiment of the present invention and is not intended to limit the patent of the present invention. Any modifications, equivalent substitutions and improvements made within the patent of the present invention should be included in the protection scope of the patent of the present invention.
Claims
1. A method for constructing a dual-fuel main engine fuel consumption model, characterized in that: The following steps are involved: S1: Data acquisition: Acquire the initial ship operation data of the dual-fuel ship under normal sailing conditions; S2: Data classification: According to the fuel mode indication of the dual-fuel main engine, the actual ship operation data set is divided into the initial fuel mode data set and the initial alternative fuel mode data set; S3: Data preprocessing: performing data dimension reduction, data cleaning, correlation analysis and data standardization on the initial fuel mode data set and the initial alternative fuel mode data set in turn; The data dimension reduction is calculated through the actual ship operation data set: Vessel draught T = ; Trim ; in: T F and T A They are the bow and stern draft data of the ship respectively; Engine fuel consumption FOC The calculation formula is: in: Q in Import fuel consumption for the main engine; Q out The fuel consumption at the main engine outlet; M F It is the indicator of the host operation mode; Q in Importing alternative fuel consumption for the main engine; The data cleaning is to remove duplicate values, missing values, and outliers from the modeling data set after data dimension reduction. The upper and lower limits of the main engine fuel consumption are used as outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid the loss of a large number of normal data, and finally obtain the modeling data set after data cleaning; In the formula, The upper and lower limits of the main engine fuel consumption, is the range parameter, is the host output power, SFOC is the fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data and obtained from the main engine manufacturer. SFOC curve; The correlation analysis: The modeling data set after data cleaning is subjected to Spearman correlation analysis to extract characteristic parameters and obtain C S , Speed V S , Draft T , Pitch T R , Flow direction D F , flow rate V F ,wind direction D W , wind speed V W , Youyi Bogao H 1 / 3 , Engine fuel consumption FOC The characteristic parameter set composed of: the formula of the Spearman correlation analysis is: In the formula, is the Spearman rank correlation coefficient, is the sample size, Features Data After sorting in descending or ascending order, Features Data After being arranged in descending or ascending order, the Spearman rank correlation coefficient has a numerical range of [-1,1]. A coefficient of 0 indicates that the two features are unrelated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the larger the absolute value, the stronger the correlation. The data standardization is to perform zero-mean standardization on the modeling data set after correlation analysis to improve model performance. The zero-mean standardization formula is: are the extracted feature parameters, where i= 1, 2 , … n ; Features x The standard deviation of is the sample size; Features x The average value of Normalize the values for the features; S4: Feature parameter extraction: Based on the data preprocessed in S3, feature parameter extraction is performed to obtain an initial fuel mode feature parameter set and an initial alternative fuel mode feature data set; S5: K Cross-validation: Based on the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set of S4, K Fold cross validation to obtain test sets and training sets to improve model performance; S5-1: randomly divide the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set obtained in step S4 into K The first one is used as the validation set, and the rest K -1 as training set; S5-2: Use the second part as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification, the test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and the test set 2 and training set 2 are obtained through the initial alternative fuel mode characteristic data set. K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results; S6: Neural network model training: based on S5 K The training set obtained by cross-validation is used to train the neural network model; S6-1: Based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set, use K The training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network and obtain a neural network model with initial values. sigmoid The function is: S7: predicting fuel consumption and predicting alternative fuel consumption: obtaining predicted fuel consumption and predicted alternative fuel consumption after training the S6 neural network model; S8: Model performance evaluation: Pass K The test set of fold cross validation is based on S5 K The model performance is evaluated by using the test set 1 and test set 2 obtained by cross-validation, and the predicted fuel consumption and predicted alternative fuel consumption: Define the mean square error loss function Optimize the model objective using stochastic gradient descent with momentum SGD To update the model parameters, where: is the actual fuel consumption, which represents the actual fuel consumption or the actual alternative fuel consumption; To predict fuel consumption, it means predicting fuel consumption or predicting alternative fuel consumption. i =1,2,... n ; Mean square error function The quality of the model is measured by calculating the square of the predicted fuel consumption and the actual fuel consumption; that is, the closer the predicted fuel consumption is to the actual fuel consumption, the smaller the mean square error between the two is, and based on this, the optimal model is obtained; Stochastic Gradient Descent SGD It is a gradient-based optimization algorithm used to find the mean square error loss function Model parameter configuration; Stochastic gradient descent algorithm SGD Update the parameters by computing the gradient for each sample and randomly selecting one or a batch of samples in each update; S9: Establish a dual-fuel main engine fuel consumption model: The optimal model obtained from the S8 model performance evaluation is used to perform real-time data correction on the optimal model to optimize the model accuracy: the data collected during the actual ship's voyage is used as input, and after the S2~S8 data preprocessing process, the model accuracy is continuously optimized to establish a dual-fuel main engine fuel consumption model.
2. The method for constructing a dual-fuel main engine fuel consumption model according to claim 1, characterized in that: In step S1, the initial operating data of the dual-fuel ship under normal navigation conditions obtained include: communication and navigation equipment data, engine room monitoring and alarm system data, sensor data, and environmental data.
3. A dual-fuel main engine fuel consumption model construction method according to claim 2, characterized in that The navigation equipment data includes: heading collected from the gyrocompass C S , speed recorded by the speedometer V S , water depth collected by the depth sounder D , wind speed collected by anemometer V W ,wind direction D W ; The cabin monitoring alarm system data, i.e., AMS data, includes: main engine speed S ME , Host operation mode indicator M F ; Ship bow and stern draft data collected by the liquid level telemetry system T F and T A ; The sensor data includes: the host output power collected by the shaft power meter P B , Main engine imported fuel consumption collected by flow meter Q in , Main engine export fuel consumption Q out and main engine import substitution fuel consumption Q in ; The environmental data include: D F , flow rate V F , Youyi Bogao H 1 / 3 .
4. The method for constructing a dual-fuel main engine fuel consumption model according to claim 3, characterized in that In step S5, the ship's heading, speed, draft, trim, wind direction, wind speed, flow direction, flow speed and significant wave height collected during the actual ship's navigation are used as inputs, and after the data preprocessing process in step S3, they are input into the initial dual-fuel fuel consumption model of step S5-2 to obtain the predicted fuel consumption or the predicted alternative fuel consumption. The fuel consumption calculated by the model is compared with the fuel consumption collected by the actual ship, and the model parameters are updated using the stochastic gradient algorithm with additional momentum, and the mean square error loss function is defined Optimize the model objectives and further optimize the model accuracy.
5. The method for constructing a dual-fuel main engine fuel consumption model according to claim 4, characterized in that In step S9, the ship's heading, speed, draft and trim are set according to the route information, the time and route longitude and latitude information are provided to the meteorological company, and the environmental information in the future time provided by the meteorological company is obtained. The above parameters are used as input and processed by the dual-fuel main engine fuel consumption model to obtain the predicted fuel consumption and predicted alternative fuel consumption.
6. The method for constructing a dual-fuel main engine fuel consumption model according to claim 5, characterized in that : The environmental information in the future time includes the wind direction, wind speed, flow direction, flow speed and significant wave height on the route in the future time.
7. A dual-fuel main engine fuel consumption model building system, characterized in that: It includes the following modules: data acquisition module, data classification module, data processing module, data extraction module, K Fold verification module, training module, performance evaluation module; M1: Data acquisition: The data acquisition module acquires the initial ship operation data under normal sailing conditions of the dual-fuel ship; M2: Data classification: The data classification module divides the actual ship operation data set into an initial fuel mode data set and an initial alternative fuel mode data set according to the fuel mode indication of the dual-fuel main engine; M3: Data preprocessing: The data processing module performs data dimension reduction, data cleaning, correlation analysis and data standardization on the initial fuel mode data set and the initial alternative fuel mode data set in turn; The data dimension reduction is calculated through the actual ship operation data set: Vessel draught T = ; Trim T R = T F - T A ; in: T F and T A They are the bow and stern draft data of the ship respectively; Engine fuel consumption FOC The calculation formula is: in: Q in Import fuel consumption for the main engine; Q out The fuel consumption at the main engine outlet; M F It is the indicator of the host operation mode; Q in Importing alternative fuel consumption for the main engine; The data cleaning is to remove duplicate values, missing values, and outliers from the modeling data set after data dimension reduction. The upper and lower limits of the main engine fuel consumption are used as outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid the loss of a large number of normal data, and finally obtain the modeling data set after data cleaning; In the formula, The upper and lower limits of the main engine fuel consumption, is the range parameter, Host output power, SFOC is the fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data and obtained from the main engine manufacturer. SFOC curve; The correlation analysis: The modeling data set after data cleaning is subjected to Spearman correlation analysis to extract characteristic parameters and obtain C S , Speed V S , Draft T , Pitch T R , Flow direction D F , flow rate V F ,wind direction D W , wind speed V W , Youyi Bogao H 1 / 3 , Engine fuel consumption FOC The characteristic parameter set composed of: the Spearman correlation analysis formula is: In the formula, is the Spearman rank correlation coefficient, is the sample size, Features Data After sorting in descending or ascending order, Features Data After being arranged in descending or ascending order, the Spearman rank correlation coefficient has a numerical range of [-1,1]. A coefficient of 0 indicates that the two features are unrelated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the larger the absolute value, the stronger the correlation. The data standardization is to perform zero-mean standardization on the modeling data set after correlation analysis to improve model performance. The zero-mean standardization formula is: are the extracted feature parameters, where i= 1, 2 , … n ; Features x The standard deviation of is the sample size; Features x The average value of Normalize the values for the features; M4: Feature parameter extraction: Based on the data preprocessed by M3, the data extraction module extracts feature parameters to obtain the initial fuel mode feature parameter set and the initial alternative fuel mode feature data set; M5: K Cross-validation: Based on the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set of M4, K fold cross validation, K The fold validation module obtains the test set and training set to improve the model performance; M5-1: Randomly divide the initial fuel mode characteristic parameter set and initial alternative fuel mode characteristic data set obtained in M4 into K The first one is used as the validation set, and the rest K -1 as training set; M5-2: Use the second copy as the validation set, and the rest K -1 as the training set, repeat this step, and do K Training and K Second verification, the test set 1 and training set 1 are obtained through the initial fuel mode characteristic parameter set, and the test set 2 and training set 2 are obtained through the initial alternative fuel mode characteristic data set. K fold cross validation, from K The optimal initial dual-fuel fuel consumption model is selected from the cross-validation results; M6: Neural network model training: based on M5 K The training set obtained by cross-validation is used to train the neural network model; M6-1: The training module is based on the initial fuel mode characteristic parameter set and the initial alternative fuel mode characteristic data set. K The training set 1 and training set 2 obtained by cross-folding are used for model training, and the neural network models are constructed respectively. The input layer of each neural network model is set to 9, representing the heading, speed, draft, trim, flow direction, flow velocity, wind direction, wind speed, and significant wave height in the feature parameter set. The output layer is the main engine fuel consumption or alternative fuel consumption. The hidden layer transfer function is sigmoid function; the activation function of the output layer is linear Function, train the neural network and obtain a neural network model with initial values. sigmoid The function is: M7: Predicted fuel consumption and predicted alternative fuel consumption: The predicted fuel consumption and predicted alternative fuel consumption are obtained after training the M6 neural network model; M8: Model performance evaluation: The performance evaluation module is passed K The test set of fold cross validation is based on M5 K The model performance is evaluated by using the test set 1 and test set 2 obtained by cross-validation, and the predicted fuel consumption and predicted alternative fuel consumption: Define the mean square error loss function Optimize the model objective using stochastic gradient descent with momentum SGD To update the model parameters, where: is the actual fuel consumption, which represents the actual fuel consumption or the actual alternative fuel consumption; To predict fuel consumption, it means predicting fuel consumption or predicting alternative fuel consumption. i =1,2,... n ; Mean square error function The quality of the model is measured by calculating the square of the predicted fuel consumption and the actual fuel consumption; that is, the closer the predicted fuel consumption is to the actual fuel consumption, the smaller the mean square error between the two is, and based on this, the optimal model is obtained; Stochastic Gradient Descent SGD It is a gradient-based optimization algorithm used to find the mean square error loss function Model parameter configuration; Stochastic gradient descent algorithm SGD Update the parameters by computing the gradient for each sample and randomly selecting one or a batch of samples in each update; M9: Establish a dual-fuel main engine fuel consumption model: The optimal model obtained from the M8 model performance evaluation is used to perform real-time data correction on the optimal model to optimize the model accuracy: the data collected during the actual ship's voyage is used as input, and after the M2~M8 data preprocessing process, the model accuracy is continuously optimized to establish a dual-fuel main engine fuel consumption model.
