Ship real-time trim optimization method for energy efficiency optimization

By constructing a neural network model and combining the actual ship data for preprocessing and optimization, the problem of difficult ships to optimize trim in real time during actual navigation is solved, and refined management of energy consumption and energy efficiency optimization are achieved.

CN120217562APending Publication Date: 2025-06-27DALIAN SHIPBUILDING INDUSTRY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510443849.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art is difficult to consider meteorological and sea conditions factors in real time during the actual navigation of the ship, which makes it difficult to achieve trim optimization and cannot effectively reduce ship energy consumption.

Method used

By constructing a neural network model based on feature parameter sets, combining real ship operation data for data preprocessing, cleaning and standardization, a ship energy consumption prediction model is established, and the model parameters are optimized using the stochastic gradient descent algorithm to determine the optimal trim value of the ship in real time.

Benefits of technology

It realizes refined management of ship energy consumption under specific meteorological and sea conditions under different speeds and draft conditions, improves the accuracy and real-time performance of energy efficiency optimization, and reduces fuel consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005351936690000031
    Figure BDA0005351936690000031
  • Figure BDA0005351936690000034
    Figure BDA0005351936690000034
  • Figure BDA0005351936690000041
    Figure BDA0005351936690000041
Patent Text Reader

Abstract

The invention discloses a ship real-time trim optimization method for energy efficiency optimization, which comprises the following steps of: acquiring ship operation data, performing data dimension reduction, data cleaning and characteristic parameter extraction on the operation data, establishing a ship energy consumption model taking ship trim, navigational speed and meteorological data as input and taking host fuel consumption as output, and performing energy efficiency optimization on the ship energy consumption model. Respectively establishing an off-line trim optimization model and an on-line trim optimization model to obtain an optimal trim value before the course and an optimal trim value in the course process; the effects of calculating the optimal trim value of the ship at different navigational speeds and draft states and in specific weather and sea condition scenes in real time and guiding the ship to sail in the optimal trim attitude are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ship intelligence, and particularly relates to a real-time trim optimization method for ships for energy efficiency optimization. Background Technique

[0002] Facing the increasingly strict emission regulations, the issues of ship energy consumption and greenhouse gas emissions have become important concerns 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 conducting research and development work on ship operation energy efficiency-related technologies.

[0003] Currently, the research on ship operation energy efficiency optimization mainly focuses on route and speed optimization, and there is little research on trim optimization methods. However, trim optimization can also effectively reduce ship operation energy consumption and improve the ship energy consumption management level. By adjusting the trim and floating state, the underwater shape of the ship during navigation can be changed, which will effectively reduce the navigation resistance, reduce the main engine power demand, and reduce fuel consumption.

[0004] When the ship is at the designed speed and draft, there is generally a designed trim value to minimize the ship's navigation resistance. However, during actual ship navigation, the navigation state for most of the time is inconsistent with the designed speed and draft, resulting in the inapplicability of the designed trim value. In addition, the relevant trim optimization research is mainly based on the tank experiment method and the CFD simulation experiment method. These two methods are difficult to take into account the factors of the marine environment (meteorology and sea conditions), and the simulation time cost is high, making it difficult to meet the real-time and dynamic optimization requirements of intelligent ships. It is a certain challenge to determine the optimal trim value of the ship under different speeds and draft conditions in specific meteorological and sea condition scenarios. The real-time trim optimization method for ships established by this method will be applied to the T300K-103 methanol dual-fuel VLCC.

[0005] In the present invention, a neural network model is constructed based on a set of characteristic parameters. The basic principle of this neural network model refers to the book "43 Case Analyses of MATLAB Neural Networks". Summary of the Invention

[0006] The purpose of the present invention is to solve the problems existing in the prior art that during actual ship navigation, the navigation state for most of the time is inconsistent with the designed speed and draft, resulting in the inapplicability of the designed trim value. In addition, the relevant trim optimization research is mainly based on the tank experiment method and the CFD simulation experiment method. These two methods are difficult to take into account the factors of the marine environment (meteorology and sea conditions), and the simulation time cost is high, making it difficult to meet the real-time and dynamic optimization requirements of intelligent ships. It is a certain challenge to determine the optimal trim value of the ship under different speeds and draft conditions in specific meteorological and sea condition scenarios.

[0007] To solve the above problems, the present invention provides a real-time trim optimization method for ships for energy efficiency optimization, including:

[0008] S1: Establish a ship energy consumption prediction model;

[0009] S1-1: Obtain the actual ship operation data set;

[0010] The initial operation data of the ship under normal navigation conditions, including:

[0011] Navigation and communication equipment data, including: course CS collected by the gyrocompass, speed VS collected by the log, water depth DW collected by the fathometer, relative wind speed VW and relative wind direction DW collected by the anemometer and wind vane;

[0012] Engine room monitoring and alarm system data, including: main engine speed SME;

[0013] The fore and aft draft data TF and TA of the ship collected by the liquid level telemetry system;

[0014] Sensor data, including: main engine power PB collected by the shaft power meter, main engine inlet fuel consumption Qfin, main engine outlet fuel consumption Qfout, environmental data including flow direction DF, flow velocity VF, significant wave height H1 / 3;

[0015] The above data sets form the actual ship operation data set;

[0016] S1-2: Data preprocessing;

[0017] Combined with the knowledge of the ship operation field, perform data preprocessing on the actual ship operation data set in step S1-1; According to the generation mechanism of ship fuel consumption, the influencing factors affecting the main engine energy consumption of the ship include: course CS, speed VS, fore and aft draft TF and TA, trim TR, main engine power PB, main engine speed SME, main engine fuel consumption FOC; Environmental information: water depth D, wind direction DW, wind speed VW, flow direction DF, flow velocity VF, significant wave height H1 / 3; In actual implementation, the main engine fuel consumption needs to be calculated through the main engine inlet fuel mass flow rate and the main engine outlet fuel mass flow rate. The specific formula is;

[0018] Ship draft T = (T F + T A ) / 2

[0019] Trim T R = T F - T A ;

[0020] The calculation formula for the main engine fuel consumption FOC is:

[0021] FOC = Qf in - Qf out

[0022] Among them, FOC is the main engine fuel consumption, Qfin is the imported fuel consumption of the main engine, and Qfout is the imported fuel consumption of the main engine;

[0023] S1-3: Data cleaning;

[0024] For the data preprocessed in step S1-2, continue to remove duplicate values, missing values, and outliers to obtain high-quality ship operation data. The methods include:

[0025] For duplicate values, since the operation data is time-series data, that is, a unique time point corresponds to a specific data value, remove the data with duplicate timestamps based on the timestamp.

[0026] For missing values, due to weather and equipment reasons, data is lost, resulting in the ship's energy consumption or a certain characteristic value being empty during a certain period, making the data for that period unavailable, and directly delete it.

[0027] For outliers, first, according to domain knowledge, directly delete the data where the wind direction and flow direction are not within the range of 0-360° and the ship speed is not within the range of 10-30 kn.

[0028] Based on the ship propulsion principle, take [Q tmin ,Q tmax as the upper and lower limits of the main engine fuel consumption for outlier identification, so as to identify and eliminate the outlier data with excessive main engine fuel consumption, and try to avoid a large loss of normal data to obtain high-quality ship operation data. The specific formula is;

[0029] [Q tmin ,Q tmax =(1±α%)P B ·SFOC

[0030] Among them, [Q tmin ,Q tmax is the upper and lower limits of the main engine fuel consumption, α is the range parameter, P B is the main engine output power, and SFOC is the specific fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data. The SFOC curve of a specific main engine can be obtained from the main engine manufacturer;

[0031] S1-4: Feature parameter extraction;

[0032] For the high-quality ship operation data in step S1-3, perform feature parameter extraction through Spearman correlation analysis to obtain a feature parameter set;

[0033] The value range of the Spearman rank correlation coefficient is [-1,1]. A coefficient of 0 indicates that two features are not correlated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation. That is, the greater the absolute value, the stronger the correlation. The specific formula is:

[0034]

[0035] Where ρ c is the Spearman rank correlation coefficient, and N n is the number of samples; is the position of the data x of feature x1 1,i after being sorted in descending or ascending order, is the data of feature x2, and x 2,i is the position after being sorted in descending or ascending order;

[0036] S1-5: Data standardization;

[0037] Based on the feature parameter set in step S1-4, zero-mean standardization is performed to improve the model performance. The specific formula is:

[0038]

[0039]

[0040] Where s d is the standard deviation of feature x, N s is the number of samples, μ is the mean value of feature x, is the feature standardized value;

[0041] S1-6: Construct a ship energy consumption model;

[0042] Based on the feature parameter set, a neural network model is constructed. Set the input layer of each neural network model to 9. The formula is:

[0043]

[0044] Among them, is the output of the i-th neuron in the hidden layer, and x j (j = 9) represents the course CS, speed VS, draft data TF and TA, trim TR, wind direction DW, wind speed VW, flow direction DF, flow velocity VF, and significant wave height H1 / 3 in the feature parameter set. wij (1) represents the weight connecting the j-th neuron in the input layer and the i-th neuron in the hidden layer. σ is the sigmoid function, and bi (1) is the bias of the i-th neuron in the hidden layer;

[0045] The output layer is the main engine fuel consumption. The transfer function of the hidden layer is the sigmoid function. The formula from the hidden layer to the output layer is:

[0046]

[0047] Among them, is the output of the output layer, i.e., the predicted host fuel consumption, W i (2) is the weight connecting the i-th neuron in the hidden layer and the output layer, b (2) is the output layer bias;

[0048] The activation function of the output layer is the linear function. The neural network is trained to obtain a neural network model with initial values, where the sigmoid function is:

[0049]

[0050] S1-7: Optimization of ship energy consumption model parameters;

[0051] Define the mean square error loss function MSE loss as the model optimization objective, the mean square error function MSE loss measures the quality of the model by calculating the square of the predicted energy consumption and the actual energy consumption. That is, the closer the predicted energy consumption and the actual energy consumption are, the smaller the mean square deviation between the two. Finally, the optimal model is obtained, and the formula is:

[0052]

[0053] where, y i represents the actual fuel consumption, represents the predicted value of the model output, i.e., the predicted fuel consumption;

[0054] S1-8: Real-time data correction;

[0055] Take the ship's course CS, speed VS, draft data TF and TA, trim TR, wind direction DW, wind speed VW, flow direction DF, flow velocity VF, and significant wave height H1 / 3 collected during the real ship navigation process as inputs. After passing through the data processing flow from step S1-2 to step S1-5, input them into the ship energy consumption model to obtain the predicted ship energy consumption. Compare with the real ship collected values, and use the stochastic gradient descent algorithm SGD with additional momentum to continuously optimize the model accuracy;

[0056] S2: Obtain the optimal trim value;

[0057] Based on the ship energy consumption prediction model obtained in step S1, take the trim value TRi as a variable, keep other characteristic values unchanged, and enumerate the trim value range at an interval t, generally 0.1m. Predict the ship energy consumption under various enumerated trim states respectively, and find out the trim value TRi corresponding to the minimum energy consumption ECmin, that is, the optimal trim value. At the same time, to ensure the navigation safety of the ship, it is necessary to limit the maximum and minimum values of the ship trim optimization range in combination with the actual situation. The formula is:

[0058]

[0059] Among them, ECmin is the minimum energy consumption, TRi is the trim value, TRmin is the minimum trim value that meets the navigation safety, TRmax is the maximum trim value that meets the navigation safety, and CS, VS, T, DF, VF, DW, VW, and H1 / 3 are the course, speed, draft, flow direction, flow velocity, wind direction, wind speed, and significant wave height, respectively;

[0060] S3: Trim optimization implementation process;

[0061] S3-1 Offline trim optimization;

[0062] Based on the ship energy consumption model obtained in step S1, before departure, obtain the charter speed VSL of the current voyage, the expected draft TL of the ship loaded with goods, and the typical sea condition information in the route, including the flow direction DFL, flow velocity VFL, wind direction DWL, wind speed VWL, and significant wave height (H1 / 3)L. Set the safety range (TRmin, TRmax) of the trim value. Take the charter speed of the voyage, the expected draft of the ship, and the historical typical meteorological and sea condition information in the route as inputs. Use the enumeration method to enumerate the trim value at a fixed interval size t, generally 0.1 m, which can also be set according to the actual situation, within the trim boundary range, to obtain the corresponding values of different trims and energy consumption. Select the optimal trim corresponding to the lowest energy consumption as the optimal trim value to guide the crew for cargo stowage;

[0063] S3-2 Online trim optimization;

[0064] Since the navigation conditions and the external environment of the ship change dynamically during actual navigation, the optimal trim value of the ship also changes accordingly. At this time, online trim optimization is required;

[0065] Based on the ship energy consumption model obtained in step S1, during the ship's navigation, take the course CS, speed VS, draft T, flow direction DF, flow velocity VF, wind direction DW, wind speed VW, and significant wave height H1 / 3 collected by the sensors in real time as inputs; by setting the range of the trim (TRmin, TRmax), use the enumeration method to enumerate the trim value at a fixed interval size t, generally 0.1 m, which can also be set according to the actual situation, within the trim boundary range, to obtain the optimal trim value under the current course, speed, draft, and sea conditions.

[0066] In the preferred mode, use the stochastic gradient descent algorithm SGD with additional momentum to update the model parameters, including the weight wij from the input layer to the hidden layer (1) 、the bias bi of the hidden layer (1) 、the weight W from the hidden layer to the output layer i (2) 、the bias b of the output layer (2) 。

[0067] The Stochastic Gradient Descent (SGD) algorithm is an optimization algorithm based on gradients, which is used to find the model parameter configuration of the mean squared error loss function. This algorithm updates the parameters by calculating the gradients of each sample and randomly selects one or a batch of samples in each update.

[0068] Advantages of the present invention:

[0069] Based on the established comprehensive real-time prediction model of ship energy consumption, the optimal trim value of the ship under different speeds, draft conditions, and specific meteorological and sea condition scenarios is mined in real time, which is used to guide the ship to sail with the optimal trim attitude, thereby realizing the refined management of ship energy consumption and energy efficiency optimization. The ship energy consumption model involved in this method is constructed from the real-time collected navigation data, and dynamic learning is carried out through the incremental learning method without the need to learn a large amount of past data, and it can ensure that the system can accurately estimate the ship energy consumption according to the real-time ship performance.

[0070] Two methods of offline trim optimization and online trim optimization can calculate the optimal trim value of the ship in real time under different speeds, draft conditions, and specific meteorological and sea condition scenarios, and guide the ship to sail with the optimal trim attitude. By integrating empirical formulas and operation data and considering environmental factors such as hydrology and meteorology, the model accuracy is greatly improved; the model accuracy can be continuously optimized and iterated according to the actual situation. Brief Description of the Drawings

[0071] Figure 1 It is a schematic diagram of the construction process of the initial ship energy consumption model of the present invention;

[0072] Figure 2 It is a schematic diagram of the real-time correction process of the ship energy consumption model of the present invention;

[0073] Figure 3 It is a schematic diagram of the implementation process of trim optimization of the present invention. Detailed Description of the Invention

[0074] Example 1:

[0075] A real-time ship trim optimization method for energy efficiency optimization includes:

[0076] S1: Establish a ship energy consumption prediction model;

[0077] S1-1: Obtain the real ship operation data set;

[0078] The initial ship operation data under normal ship navigation conditions includes:

[0079] Navigation and communication equipment data, including: course CS collected by the gyrocompass, speed VS collected by the log, water depth DW collected by the fathometer, relative wind speed VW and relative wind direction DW collected by the anemometer and wind vane;

[0080] Data of the engine room monitoring and alarm system, including: main engine speed SME;

[0081] Draft data TF and TA of the bow and stern of the ship collected by the liquid level telemetry system;

[0082] Sensor data, including: main engine power PB collected by the shaft power meter, main engine inlet fuel consumption Qfin, main engine inlet fuel consumption Qfout collected by the flow meter, environmental data including flow direction DF, flow velocity VF, significant wave height H1 / 3;

[0083] The above data sets form the in-service ship operation data set;

[0084] S1-2: Data preprocessing;

[0085] Combined with the knowledge of the ship operation field, perform data preprocessing on the in-service ship operation data set in step S1-1; According to the generation mechanism of ship fuel consumption, the influencing factors affecting the energy consumption of the ship's main engine include: course CS, speed VS, bow and stern draft TF and TA, trim TR, main engine power PB, main engine speed SME, main engine fuel consumption FOC; Environmental information: water depth D, wind direction DW, wind speed VW, flow direction DF, flow velocity VF, significant wave height H1 / 3; In actual implementation, the main engine fuel consumption needs to be calculated through the main engine inlet fuel mass flow rate and the main engine outlet fuel mass flow rate. The specific formula is;

[0086] Ship draft T = (T F + T A ) / 2

[0087] Trim T R = T F - T A ;

[0088] The calculation formula for the main engine fuel consumption FOC is:

[0089] FOC = Qf in - Qf out

[0090] where FOC is the main engine fuel consumption, Qfin is the main engine inlet fuel consumption, and Qfout is the main engine inlet fuel consumption;

[0091] S1-3: Data cleaning;

[0092] For the data preprocessed in step S1-2, continue to remove duplicate values, missing values, and outliers to obtain high-quality ship operation data. The methods include:

[0093] For duplicate values, since the operation data is time series data, that is, a unique time point corresponds to a specific data value, remove the data with duplicate timestamps based on the timestamp;

[0094] For missing values, due to weather and equipment reasons, data loss occurs, resulting in the ship's energy consumption or a certain characteristic value being empty during a certain period, making the data for that period unavailable, and it is directly deleted;

[0095] For outliers, first, according to domain knowledge, data with wind direction and flow direction outside the range of 0 - 360° and ship speed outside the range of 10 - 30 kn are directly deleted;

[0096] Based on the ship propulsion principle, [Q tmin ,Q tmax is used as the upper and lower limits of the main engine fuel consumption for outlier identification, so as to identify and eliminate abnormal data with excessive main engine fuel consumption, and try to avoid a large loss of normal data, obtaining high-quality ship operation data. The specific formula is;

[0097] [Q tmin ,Q tmax =(1±α%)P B ·SFOC

[0098] Among them, [Q tmin ,Q tmax are the upper and lower limits of the main engine fuel consumption, α is the range parameter, P B is the main engine output power, SFOC is the specific fuel consumption rate of the main engine, which is a quadratic polynomial function obtained by fitting the main engine bench test data, and the SFOC curve of a specific main engine can be obtained from the main engine manufacturer;

[0099] S1 - 4: Feature parameter extraction;

[0100] For the high-quality ship operation data in step S1 - 3, feature parameter extraction is carried out through Spearman correlation analysis to obtain a set of feature parameters;

[0101] The value range of the Spearman rank correlation coefficient is [-1, 1]. A coefficient of 0 indicates that two features are not correlated, a positive value indicates a positive correlation, and a negative value indicates a negative correlation, that is, the greater the absolute value, the stronger the correlation. The specific formula is:

[0102]

[0103] In the formula, ρ c is the Spearman rank correlation coefficient, N n is the sample size; is the position of the data x 1,i of feature x1 after being sorted in descending or ascending order, is the data of feature x2, and x 2,i is the position after being sorted in descending or ascending order;

[0104] S1-5: Data standardization;

[0105] Based on the feature parameter set in step S1-4, perform zero-mean standardization to improve the model performance. The specific formula is:

[0106]

[0107] In the formula, s d is the standard deviation of feature x, N s is the number of samples, μ is the mean of feature x, is the standardized value of the feature;

[0108] S1-6: Construct a ship energy consumption model;

[0109] Construct a neural network model based on the feature parameter set. Set the input layer of each neural network model to 9. The formula is:

[0110]

[0111] Among them, is the output of the i-th neuron in the hidden layer, x j (j = 9), representing the course CS, speed VS, draft data TF and TA, trim TR, wind direction DW, wind speed VW, flow direction DF, flow velocity VF, and significant wave height H1 / 3 in the feature parameter set. wij (1) represents the weight connecting the j-th neuron in the input layer and the i-th neuron in the hidden layer. σ is the sigmoid function, and bi (1) is the bias of the i-th neuron in the hidden layer;

[0112] The output layer is the main engine fuel consumption. The transfer function of the hidden layer is the sigmoid function. The formula from the hidden layer to the output layer is:

[0113]

[0114] Among them, is the output of the output layer, that is, the predicted main engine fuel consumption, W i (2) is the weight connecting the i-th neuron in the hidden layer and the output layer, and b (2) is the output layer bias;

[0115] The activation function of the output layer is the linear function. Train the neural network to obtain a neural network model with initial values. Among them, the sigmoid function is:

[0116]

[0117] S1-7: Optimization of ship energy consumption model parameters;

[0118] Define the mean squared error loss function MSE loss As the model optimization objective, the mean squared error function MSE loss Measures the quality of the model by calculating the squares of the predicted energy consumption and the actual energy consumption. That is, the closer the predicted energy consumption and the actual energy consumption are, the smaller the mean squared error between them. Finally, the optimal model is obtained. The formula is:

[0119]

[0120] Where, y i Represents the actual fuel consumption, Represents the predicted value output by the model, that is, the predicted fuel consumption;

[0121] S1-8: Real-time data correction;

[0122] Taking the ship's course CS, speed VS, draft data TF and TA, trim TR, wind direction DW, wind speed VW, current direction DF, current velocity VF and significant wave height H1 / 3 collected during the actual ship navigation as inputs, after the data processing flow from step S1-2 to step S1-5, input them into the ship energy consumption model to obtain the predicted ship energy consumption. Compare with the actual ship collection value, and use the stochastic gradient descent algorithm SGD with additional momentum to continuously optimize the model accuracy;

[0123] S2: Obtain the optimal trim value;

[0124] Based on the ship energy consumption prediction model obtained in step S1, taking the trim value TRi as a variable and keeping other characteristic values unchanged, enumerate the trim value range at an interval t, generally 0.1m. Predict the ship energy consumption under various enumerated trim states respectively, and find out the trim value TRi corresponding to the minimum energy consumption ECmin, that is, the optimal trim value. At the same time, to ensure the navigation safety of the ship, it is necessary to limit the maximum and minimum values of the ship trim optimization range in combination with the actual situation. The formula is:

[0125]

[0126] Where, ECmin is the minimum energy consumption, TRi is the trim value, TRmin is the minimum trim value that meets the navigation safety, TRmax is the maximum trim value that meets the navigation safety, CS, VS, T, DF, VF, DW, VW, H1 / 3 are the course, speed, draft, current direction, current velocity, wind direction, wind speed, significant wave height respectively;

[0127] S3: Trim optimization implementation process;

[0128] S3-1 Offline trim optimization;

[0129] Based on the ship energy consumption model obtained in step S1, before departure, the charter speed VSL of the current voyage, the predicted draft TL of the ship loaded with goods, and the typical sea condition information in the route including the flow direction DFL, flow velocity VFL, wind direction DWL, wind speed VWL, significant wave height (H1 / 3)L are obtained. The safety range (TRmin, TRmax) of the trim value is set. The charter speed of the voyage, the predicted draft of the ship, and the historical typical meteorological and sea condition information in the route are used as inputs. The enumeration method is used to enumerate the trim value at a fixed interval size t, generally 0.1 m, which can also be set according to the actual situation within the trim boundary range, and the corresponding values of different trims and energy consumption are obtained. The optimal trim corresponding to the lowest energy consumption is selected as the optimal trim value to guide the crew in cargo stowage.

[0130] S3-2 Online trim optimization;

[0131] Since the navigation conditions and external environment of the ship change dynamically during actual navigation, the optimal trim value of the ship also changes accordingly. At this time, online trim optimization is required;

[0132] Based on the ship energy consumption model obtained in step S1, during the navigation of the ship, the course CS, speed VS, draft T, flow direction DF, flow velocity VF, wind direction DW, wind speed VW, and significant wave height H1 / 3 collected by the sensor in real time are used as inputs; by setting the range of trim (TRmin, TRmax), the enumeration method is used to enumerate the trim value at a fixed interval size t, generally 0.1 m, which can also be set according to the actual situation within the trim boundary range, and the optimal trim value under the current course, speed, draft and sea conditions is obtained.

[0133] Use the stochastic gradient descent algorithm SGD with additional momentum to update the model parameters, including the weight wij from the input layer to the hidden layer (1) and the bias bi of the hidden layer (1) and the weight W from the hidden layer to the output layer i (2) and the bias b of the output layer (2) .

[0134] The stochastic gradient descent algorithm SGD is an optimization algorithm based on the gradient, which is used to find the model parameter configuration of the mean square error loss function. This algorithm updates the parameters by calculating the gradient of each sample and randomly selects one or a batch of samples in each update.

[0135] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions of the present invention or make equivalent replacements, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A ship real-time trim optimization method for energy efficiency optimization, characterized in that: include: S1: Establish a ship energy consumption prediction model; S1-1: Obtain real ship operation data set; Initial ship operating data under normal sailing conditions, including: Communication and navigation equipment data, including: heading CS, speed VS, water depth DW, relative wind speed VW, relative wind direction DW; Engine room monitoring alarm system data, including: main engine speed SME; The ship’s bow and stern draft data TF and TA collected by the level telemetry system; Sensor data, including: main engine power PB, main engine inlet fuel consumption Qfin, main engine inlet fuel consumption Qfout, environmental data including flow direction DF, flow velocity VF, significant wave height H1 / 3; The above data sets form a real ship operation data set; S1-2: Data preprocessing; Combined with the knowledge of ship operation, the actual ship operation data set in step S1-1 is preprocessed. The main engine fuel consumption needs to be calculated by the main engine inlet fuel mass flow rate and the main engine outlet fuel mass flow rate. The specific formula is: Ship draft T = (T F +T A ) / 2 Trim T R =T F -T A ; The main engine fuel consumption FOC calculation formula is: FOC=Qf in -Qf out Among them, FOC is the main engine fuel consumption, Qfin is the main engine imported fuel consumption, and Qfout is the main engine imported fuel consumption; S1-3: Data cleaning; For the data preprocessed in step S1-2, duplicate values, missing values, and outliers are further removed to obtain high-quality ship operation data; [Q tmin ,Q tmax ] is used as the upper and lower limits of the main engine fuel consumption for abnormal value identification, and abnormal data with excessive main engine fuel consumption is identified and eliminated. The specific formula is: [Q tmin ,Q tmax ]=(1±α%)P B ·SFOC Among them, [Q tmin ,Q tmax ] is the upper and lower limits of the main engine fuel consumption, α is the range parameter, P B is the main engine output power, SFOC is the main engine specific fuel consumption rate, which is a quadratic polynomial function obtained by fitting the main engine bench test data. The SFOC curve of a specific main engine can be obtained from the main engine manufacturer; S1-4: feature parameter extraction; For the high-quality ship operation data in step S1-3, feature parameters are extracted by Spearman correlation analysis to obtain a feature parameter set; The Spearman rank correlation coefficient has a value 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 specific formula is: In the formula, ρ c is the Spearman rank correlation coefficient, N n is the sample size; The data x for feature x1 1,i After sorting in descending or ascending order, is the data of feature x2, x 2,i is the position after sorting in descending or ascending order; S1-5: Data standardization; Based on the feature parameter set in step S1-4, zero mean normalization is performed to improve model performance. The specific formula is: In the formula, s d is the standard deviation of feature x, N s is the number of samples, μ is the average value of feature x, xi * Normalize the values ​​for the features; S1-6: Construct ship energy consumption model; A neural network model is constructed based on the feature parameter set, and the input layer of each neural network model is set to 9. The formula is: in, is the output of the i-th neuron in the hidden layer, x j (j=9), represents the heading CS, speed VS, draft data TF and TA, trim TR, wind direction DW, wind speed VW, flow direction DF, flow speed VF and significant wave H1 / 3 in the characteristic parameter set, wij (1) represents the weight connecting the jth neuron in the input layer and the ith neuron in the hidden layer, σ is the sigmoid function, bi (1) is the bias of the i-th neuron in the hidden layer; The output layer is the fuel consumption of the main engine, the hidden layer transfer function is the sigmoid function, and the formula from the hidden layer to the output layer is: in, is the output of the output layer, i.e. the predicted fuel consumption of the main engine, W i (2) is the weight connecting the i-th neuron in the hidden layer and the output layer, b (2) is the output layer bias; The activation function of the output layer is a linear function. The neural network is trained to obtain a neural network model with initial values, where the sigmoid function is: S1-7: Ship energy consumption model parameter optimization; Define the mean square error loss function MSE loss is the model optimization target, mean square error function MSE loss The quality of the model is measured by calculating the square of the predicted energy consumption and the actual energy consumption. That is, the closer the predicted energy consumption is to the actual energy consumption, the smaller the mean square error between the two is. Finally, the optimal model is obtained, and the formula is: Among them, y i Indicates the actual fuel consumption, It indicates the model output prediction value, i.e. the predicted fuel consumption; S1-8: Real-time data correction; The ship's heading CS, speed VS, draft data TF and TA, trim TR, wind direction DW, wind speed VW, flow direction DF, flow velocity VF and significant wave H1 / 3 height collected during the actual ship's navigation are used as inputs, and after the data processing flow from step S1-2 to step S1-5, they are input into the ship energy consumption model to obtain the predicted energy consumption of the ship, and compared with the actual ship's collected values, the stochastic gradient descent algorithm SGD with additional momentum is used to continuously optimize the model accuracy; S2: Obtain the optimal trim value; Based on the ship energy consumption prediction model obtained in step S1, the trim value TRi is used as a variable, and other characteristic values ​​are kept unchanged. The trim value range is enumerated, and the ship energy consumption under the enumerated various trim states is predicted respectively. The trim value TRi corresponding to the minimum energy consumption ECmin is mined out, that is, the optimal trim value. At the same time, in order to ensure the navigation safety of the ship, the maximum and minimum values ​​of the ship trim optimization range need to be limited according to the actual situation. The formula is: Among them, ECmin is the minimum energy consumption, TRi is the trim value, TRmin is the minimum trim value under navigation safety, and TRmax is the maximum trim value under navigation safety; S3: Trim optimization implementation process; S3-1 offline trim optimization; Based on the ship energy consumption model obtained in step S1, before sailing, the charter speed VSL of the current voyage, the estimated ship draft TL of the loaded cargo weight, and the typical sea conditions in the route including the flow direction DFL, flow velocity VFL, wind direction DWL, wind speed VWL, and significant wave height (H1 / 3) L are obtained, and a safety range (TRmin, TRmax) of the trim value is set. The charter speed of the voyage, the estimated ship draft, and the historical typical weather and sea conditions in the route are used as inputs. The trim values ​​are enumerated at fixed intervals within the trim boundary range by using an enumeration method to obtain the corresponding values ​​of different trims and energy consumption, and the optimal trim corresponding to the lowest energy consumption is selected as the optimal trim value to guide the crew to load cargo; S3-2 online trim optimization; During the actual navigation process, the navigation conditions and external environment of the ship change dynamically, and the optimal trim value of the ship also changes accordingly. At this time, online trim optimization is required; Based on the ship energy consumption model obtained in step S1, during the navigation process, the ship takes the heading CS, speed VS, draft T, flow direction DF, flow velocity VF, wind direction DW, wind speed VW, and significant wave height H1 / 3 collected by the sensor in real time as input; by setting the trim range (TRmin, TRmax), the enumeration method is used to take the trim value within the trim boundary range to obtain the optimal trim value under the current heading, speed, draft and sea conditions.

2. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: Use the stochastic gradient descent algorithm SGD with additional momentum to update the model parameters, including the input layer to the hidden layer weights wij (1) , hidden layer bias bi (1) , the weight from hidden layer to output layer Output layer bias b (2) .

3. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: The fixed interval size t of enumeration of the trim values ​​within the trim boundary range is 0.1m.

4. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: The heading CS data is collected by the gyro compass, the speed VS is collected by the speed log, the water depth DW is collected by the depth sounder, and the relative wind speed VW and relative wind direction DW are collected by the wind speed and direction meter.

5. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: The main engine power PB in the sensor data is collected by the shaft power meter, and the main engine inlet fuel consumption Qfin, main engine inlet fuel consumption Qfout, and environmental data including flow direction DF, flow velocity VF, and significant wave height H1 / 3 are collected by the flow meter.

6. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: In step S1-3, for repeated values ​​in data cleaning, the operational data is time series data, that is, a unique time point corresponds to a specific data value, and the data with repeated timestamps are removed based on the timestamps.

7. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: In step S1-3, for missing values ​​in data cleaning, weather and equipment reasons lead to data loss, resulting in the ship energy consumption or one of its characteristic values ​​in a certain time period being empty, making the data in that time period unavailable and directly deleted.

8. The ship real-time trim optimization method for energy efficiency optimization according to claim 1, characterized in that: In step S1-3, in data cleaning, abnormal values, such as wind direction and flow direction not within the range of 0 to 360 degrees and ship speed not within the range of 10 to 30 kn, are directly deleted.