Ship trim optimization method and device, computer equipment and storage medium

By obtaining water static test sailing data to train the propulsion power prediction model and using particle swarm optimization algorithm, the problem of high cost and time-consuming optimization of ship trim optimization is solved, automation, real-time and efficient are achieved, significantly reducing fuel consumption and improving navigation efficiency.

CN119312685APending Publication Date: 2025-01-14WUHAN HAILAN RUIHAI MARINE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411473569.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-14

Smart Images

  • Figure CN119312685A_ABST
    Figure CN119312685A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of ships, and discloses a ship trim optimization method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining still water trial navigation data of a target ship; training a propulsive power prediction model taking the navigational speed, the draft and the trim as target input and the propulsive power as target output based on the correlation between each data in the still water trial flight data and the propulsive power; performing particle swarm optimization on the propulsive power prediction model by taking minimization of propulsive power as a target, and in the process of particle swarm optimization, searching an optimal trim which enables the propulsive power to be minimum at each navigational speed and under eating water based on each particle in a particle swarm to obtain a trim optimization result of the target ship; a particle swarm optimization mode is adopted to minimize a method for calculating an optimal trim value based on an established ship propulsion power prediction model, and the optimal trim value of the ship under multiple drains and navigational speeds can be automatically calculated, so that the propulsion efficiency of the ship is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship technology, and in particular to a ship trim optimization method, device, computer equipment and storage medium. Background Art

[0002] In recent years, with the rapid development of the global shipping industry, ship energy efficiency and environmental protection have become important areas of research and practice. The trim state of a ship is one of the many factors that affect the energy efficiency of a ship, which can affect the ship's navigation performance, including the demand for propulsion power, fuel consumption, and navigation speed. Therefore, optimizing the trim state of a ship can not only improve navigation efficiency, but also reduce fuel consumption, thereby achieving the goal of energy conservation and emission reduction.

[0003] Ship trim optimization is an important research area that aims to reduce fuel consumption, improve navigation efficiency and reduce environmental impact by adjusting the ship's posture in the water. Although the fuel saving of trim optimization is relatively small compared to speed optimization, its importance in ship operation cannot be ignored. According to a report by the Global Maritime Energy Efficiency Partnerships (GloMEEP), optimizing trim can significantly reduce the fuel consumption of ships. For ships operating at full load, the main engine fuel consumption can be reduced by about 0.5% to 3% by precisely adjusting the trim. For ships operating at partial load, such as container ships or ro-ro ships, the reduction in fuel consumption may even be as high as 5%. As a meticulous and efficient technical means, trim optimization can play an important role in overall energy-saving measures and help ships achieve higher operational efficiency and sustainable development.

[0004] Traditional trim optimization methods mainly rely on experience and experiments. Although they have positive effects to a certain extent, they also have many limitations. For example, high test costs, limited data coverage, and poor real-time performance make these traditional methods challenging in practical applications.

[0005] With the improvement of computing power, computational fluid dynamics (CFD) has become an important tool for studying ship trim optimization. CFD can more accurately predict the resistance and propulsion efficiency under different trim states by numerically simulating the flow field of the hull in the water. However, although the CFD method can reduce the dependence on physical experiments and provide high-resolution data support, its large amount of calculation and high time cost are still a major challenge.

[0006] Therefore, there is an urgent need to propose a ship trim optimization method to solve the technical problems of high cost and long time consumption in related technologies. Summary of the invention

[0007] In view of this, the present invention provides a ship trim optimization method to solve the technical problems of high cost and long time consumption in the related art for ship trim optimization.

[0008] In a first aspect, the present invention provides a method for optimizing ship trim, comprising: obtaining still water sea trial data of a target ship; wherein the still water sea trial data comprises a trial sea speed, a trial sea propulsion power, a trial sea draft and a trial sea trim; based on the correlation between each data in the still water sea trial data and the propulsion power, training a propulsion power prediction model with speed, draft and trim as target inputs and propulsion power as target output; performing particle swarm optimization on the propulsion power prediction model with the goal of minimizing the propulsion power, and in the process of particle swarm optimization, searching for the optimal trim that minimizes the propulsion power at each speed and draft based on each particle in the particle swarm, to obtain the trim optimization result of the target ship.

[0009] As an exemplary embodiment, the particle swarm optimization of the propulsion power prediction model with the goal of minimizing the propulsion power includes: randomly generating each particle in the particle swarm, and initializing the position, speed, fitness threshold, and number of iterations of each particle; wherein each particle is used to represent multiple trim values ​​at the current speed and draft, and the fitness threshold is used to represent the target value of the propulsion power prediction model; determining the initial individual optimal position of each particle and the initial global optimal position of the particle swarm based on the randomly generated particles; controlling the particle swarm to perform multiple rounds of iterations according to the position and the speed with the individual optimal position and the global optimal position to obtain the trim optimization result of the target ship.

[0010] As an exemplary embodiment, the controlling of the particle swarm for multiple rounds of iterations with the individual optimal position and the global optimal position includes: in each round of iteration, updating the position and the speed of each particle, and using a pre-constructed objective function to calculate the fitness value of each iterative particle after iteration; wherein the fitness value is used to represent the iterative propulsion power under the longitudinal tilt value corresponding to each iterative particle; traversing each iterative particle, if the fitness value of the iterative particle is greater than the first fitness corresponding to the individual optimal position, updating the individual optimal position of the iterative particle to the current position of the iterative particle; if the fitness value of the iterative particle is greater than the second fitness corresponding to the global optimal position, updating the global optimal position of the particle swarm to the current position of the iterative particle.

[0011] As an exemplary embodiment, the updating of the position and the speed of each particle includes:

[0012]

[0013] In the formula, represents the velocity of the particle in the current iteration round, represents the velocity of the particle in the previous iteration, w is the inertia weight; r1, r2 are random numbers, c1, c2 are acceleration constants, pBest i represents the individual optimal position, and gBest represents the global optimal position;

[0014]

[0015] In the formula, represents the position of the particle in the current iteration round, represents the position of the particle in the previous iteration round, Indicates the velocity of the particle in the current iteration.

[0016] As an exemplary embodiment, the propulsion power prediction model with speed, draft and trim as target input and propulsion power as target output is trained based on the correlation between each data in the still water trial data and the propulsion power, including: performing correlation analysis on the trial speed, trial propulsion power, trial draft and trial trim in the still water trial data to obtain correlation analysis results; constructing a preset prediction model and data set based on the correlation analysis results and the still water trial data; inputting the data set into the preset prediction model for model training until the model converges to obtain the propulsion power prediction model.

[0017] As an exemplary embodiment, the preset prediction model includes multiple preset tree models, and the inputting of the data set into the preset prediction model for model training includes: dividing the data set into a training set and a test set according to a preset ratio; inputting the training set into each of the preset tree models for model training, and using grid search to optimize the model parameters of each of the preset tree models; inputting the training set into each of the preset tree models after model parameter optimization for model training until the model converges, and obtaining a first prediction error of each of the preset tree models based on the training set; wherein the first prediction error includes at least one of mean square error, mean absolute error, R square, and root mean square logarithmic error; using the test set to test each of the trained preset tree models, and obtaining a second prediction error of each of the preset tree models based on the test set; wherein the second prediction error includes at least one of mean square error, mean absolute error, R square, and root mean square logarithmic error; based on the first prediction error and the second prediction error, the preset tree model is selected as the preset prediction model.

[0018] As an exemplary embodiment, the method also includes: constructing a training data set based on the trim optimization results and their corresponding optimized speed and optimized draft; training a trim optimization model with draft and speed as input and trim optimization results as target values ​​based on the training data set; and in the process of model training, learning the corresponding relationship between draft and speed and trim optimization results.

[0019] In a second aspect, the present invention provides a ship trim optimization device, the ship trim optimization device comprising: an acquisition module, used to acquire still water sea trial data of a target ship; wherein the still water sea trial data comprises a trial sea speed, a trial sea propulsion power, a trial sea draft and a trial sea trim; a propulsion power prediction model training module, used to train a propulsion power prediction model with speed, draft and trim as target inputs and propulsion power as target output based on the correlation between each data in the still water sea trial data and the propulsion power; a particle swarm optimization module, used to perform particle swarm optimization on the propulsion power prediction model with the goal of minimizing the propulsion power, and in the process of the particle swarm optimization, based on each particle in the particle swarm, searching for the optimal trim that minimizes the propulsion power at each speed and draft, to obtain the trim optimization result of the target ship.

[0020] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the ship trim optimization method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the ship trim optimization method of the first aspect or any corresponding embodiment thereof.

[0022] The method of the present invention obtains still water sea trial data of a target ship; wherein the still water sea trial data includes sea trial speed, sea trial propulsion power, sea trial draft and sea trial trim; based on the correlation between each data in the still water sea trial data and the propulsion power, a propulsion power prediction model with speed, draft and trim as target input and propulsion power as target output is trained; with minimizing propulsion power as the goal, particle swarm optimization is performed on the propulsion power prediction model, and in the process of particle swarm optimization, the optimal trim that minimizes the propulsion power at each speed and draft is searched based on each particle in the particle swarm, to obtain the trim optimization result of the target ship; and Compared with traditional methods and CFD, machine learning has the advantages of automation, real-time and high efficiency in ship trim optimization. The ship propulsion power prediction model based on XGBoost performs best and has strong generalization ability. Moreover, as a tree model, XGBoost does not require scaling of input features, which is very beneficial for subsequent optimization work. Furthermore, based on the established ship propulsion power prediction model, the method of minimizing propulsion power and calculating the optimal trim value using particle swarm optimization can automatically calculate the optimal trim value of the ship at multiple drafts and speeds, thereby improving the propulsion efficiency of the ship. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 is a correlation heat map of the still water trial data measured during the still water trial;

[0025] Figure 2 is a flow chart of a ship trim optimization method according to an embodiment of the present invention;

[0026] Figure 3 This is a 5-fold cross-validation learning curve diagram of the four tree models;

[0027] Figure 3 (a) is a learning curve diagram of a decision tree model according to an embodiment of the present invention;

[0028] Figure 3 (b) is a learning curve diagram of a random forest model according to an embodiment of the present invention;

[0029] Figure 3 (c) is a learning curve diagram of a gradient boosting tree model according to an embodiment of the present invention;

[0030] Figure 3 (d) is a graph of an extreme gradient boosting tree model learning curve according to an embodiment of the present invention;

[0031] Figure 4 This is a test effect diagram of the four tree models obtained through training on the test set;

[0032] Figure 4 (a) is a prediction effect diagram of a decision tree model test set according to an embodiment of the present invention;

[0033] Figure 4 (b) is a graph showing the prediction effect of a random forest model test set according to an embodiment of the present invention;

[0034] Figure 4 (c) is a prediction effect diagram of a gradient boosting tree model test set according to an embodiment of the present invention;

[0035] Figure 4 (d) is a prediction effect diagram of an extreme gradient boosting tree model test set according to an embodiment of the present invention;

[0036] Figure 5 is a structural block diagram of a ship trim optimization device according to an embodiment of the present invention;

[0037] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0039] Propulsion power is an important indicator to measure the performance of a ship's propulsion system, which directly affects the ship's fuel consumption and sailing speed. The ship's propulsion power can be quantitatively described by the following formula:

[0040]

[0041] In the above formula, P is the propulsion power, ρ is the water density, S is the wetted area of ​​the hull, and C t is the total resistance coefficient, which is a dimensionless coefficient that includes the friction resistance coefficient C f and the pressure resistance coefficient C p , V is the ship speed.

[0042] The above formula shows that the propulsion power of a ship is proportional to the cube of the speed. This means that an increase in speed will lead to a significant increase in the propulsion power required by the ship. If the speed doubles, the propulsion power will increase by about eight times.

[0043] The draft of a ship refers to the depth of the ship immersed in the water, which affects the wetted area S of the hull and the friction resistance coefficient C. f , an increase in draft usually leads to an increase in the wetted area S, which increases the friction resistance and thus requires greater propulsion power.

[0044] Trim refers to the difference in draft depth between the front and rear of a ship, that is, the relative height difference between the bow and the stern, which is divided into bow trim and stern trim. Trim affects the hydrodynamic characteristics of the hull and the wetted area of ​​the hull, thereby affecting resistance and propulsion efficiency. Different trims will change the interaction between the hull and the water flow, affecting pressure resistance and friction resistance. Reasonable trim can optimize the hydrodynamic performance of the hull, reduce resistance, and at a certain speed, reduce the propulsion power required by the ship. For example, Hirano's research found that within a certain range, appropriate stern trim can reduce the wave resistance of the hull, thereby increasing the speed.

[0045] In order to verify the influence of trim on propulsion power, the inventor selected still water trial data of the ship during still water trial, further constructed a correlation matrix based on the still water trial data, and obtained a correlation heat map of the still water trial data.

[0046] In one embodiment, the still water trial data includes power, speed, average draft and trim; wherein, the average draft data range is selected from 13m to 16m, and the data interval is 0.1m; the speed data range is selected from 16kn to 24kn, and the data interval is 0.5kn; the trim range is selected from -2m to 2m, and the data interval is 0.25m.

[0047] Further, after selecting the above-mentioned static water trial data, a correlation matrix is ​​constructed based on the static water trial data to obtain a correlation heat map of the static water trial data; illustratively, Figure 1 is a correlation heat map of the still water trial data measured during the still water trial; Figure 1 As shown, the correlation between speed, propulsion power, draft and trim is as follows:

[0048] Speed ​​and propulsion power: The correlation coefficient is 0.98, indicating that there is a strong correlation between speed and propulsion power.

[0049] Draft and propulsion power: The correlation coefficient is 0.15, indicating that the draft depth has little effect on the propulsion power.

[0050] Trim and propulsion power: The correlation coefficient is 0.01, indicating that trim has limited effect on propulsion power.

[0051] Speed ​​and draft: The correlation coefficient is 0.00, indicating that there is no linear relationship between the two.

[0052] Speed ​​and trim: The correlation coefficient is 0.00, indicating that there is no linear relationship between the two.

[0053] Trim and draught: The correlation coefficient is 0.00, indicating that there is no linear relationship between the two.

[0054] Based on the above correlation analysis, although the fuel saving of trim optimization is relatively small compared with speed optimization, its importance in ship operation cannot be ignored.

[0055] However, traditional trim optimization methods mainly rely on experience and experiments. Although they have positive effects to a certain extent, they also have many limitations. For example, high test costs, limited data coverage, and poor real-time performance make these traditional methods challenging in practical applications.

[0056] With the improvement of computing power, computational fluid dynamics (CFD) has become an important tool for studying ship trim optimization. CFD can more accurately predict the resistance and propulsion efficiency under different trim states by numerically simulating the flow field of the hull in the water. Although the CFD method can reduce the dependence on physical experiments and provide high-resolution data support, its large amount of calculation and high time cost are still a major challenge.

[0057] In recent years, the application of machine learning and artificial intelligence technologies in ship trim optimization has been increasing. Through the training of a large amount of historical data, machine learning models can quickly and accurately predict the propulsion power under different trim states. Combined with advanced optimization algorithms, these technologies can easily optimize ship trim. Compared with traditional methods and CFD, machine learning has shown significant advantages in ship trim optimization. Its automation, real-time and high efficiency make it a very promising technical means.

[0058] In view of this, according to an embodiment of the present invention, an embodiment of a ship trim optimization method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0059] In this embodiment, a ship trim optimization method is provided. Figure 2 is a flow chart of a ship trim optimization method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0060] Step S101, obtaining still water sea trial data of the target ship; wherein the still water sea trial data includes sea trial speed, sea trial propulsion power, sea trial draft and sea trial trim.

[0061] In this embodiment, the still water trial data includes trial power, trial speed, trial draft and trial trim; among them, the trial draft data range is selected from 13m to 16m, and the data interval is 0.1m; the trial speed data range is selected from 16kn to 24kn, and the data interval is 0.5kn; the trial trim range is selected from -2m to 2m, and the data interval is 0.25m.

[0062] Step S102, based on the correlation between each data in the still water sea trial data and the propulsion power, a propulsion power prediction model is trained with the ship speed, draft and trim as target inputs and the propulsion power as target output.

[0063] Exemplarily, after obtaining the still water sea trial data, a correlation analysis is performed on the sea trial speed, sea trial propulsion power, sea trial draft and sea trial trim in the still water sea trial data to obtain a correlation analysis result.

[0064] As a possible implementation method, the correlation analysis results can be reflected by a correlation matrix. Specifically, a correlation matrix is ​​constructed based on the static water trial data, and the following is obtained: Figure 1 Correlation heat map of the still water trial data shown;

[0065] Furthermore, a preset prediction model and data set are constructed based on the correlation analysis results and the still water sea trial data.

[0066] In one embodiment, the preset prediction model selects a tree model, which has strong nonlinear fitting ability and good interpretability, does not require feature scaling, is applicable to data of different scales, and is suitable for processing complex ship operation data.

[0067] In one embodiment, the preset prediction model includes multiple preset tree models, and the data set is input into the preset prediction model for model training, including: dividing the data set into a training set and a test set according to a preset ratio; using grid search to optimize the model parameters of each preset tree model; inputting the training set into each preset tree model after model parameter optimization for model training until the model converges, and obtaining a first prediction error of each preset tree model based on the training set; wherein the first prediction error includes at least one of mean square error, mean absolute error, R square, and root mean square logarithmic error; using the test set to test each trained preset tree model, and obtaining a second prediction error of each preset tree model based on the test set; wherein the second prediction error includes at least one of mean square error, mean absolute error, R square, and root mean square logarithmic error; based on the first prediction error and the second prediction error, the preset tree model is selected as the preset prediction model.

[0068] As a possible implementation, the data set is divided into a training set and a test set according to a preset ratio; as a possible implementation, in order to consider subsequent optimization and the tree model does not require feature scaling, the preset ratio may be 4:1.

[0069] As a possible implementation method, the preset prediction model may include multiple preset tree models, and the preset tree model may include at least one of a decision tree (DT), a random forest (RF), a gradient boosting tree (GBDT), and an extreme gradient boosting tree (XGBoost); wherein, DT is a tree-structured model, which forms a tree structure by recursively dividing the data set into smaller subsets, and the model is easy to understand and explain; RF is composed of multiple decision trees, and improves the stability and generalization ability of the model by averaging or voting the results of multiple trees, and has a strong anti-overfitting ability; GBDT improves model performance by gradually constructing multiple weak learners, each learner corrects the errors of the previous learner, and the model prediction accuracy is high; wherein, weak learners may include decision trees; XGBoost is an efficient gradient boosting algorithm with faster training speed and stronger performance optimization capabilities, and performs well when processing large-scale data sets.

[0070] As a possible implementation method, after dividing the data set into training set and test set, grid search is used to optimize the model parameters of the above four preset tree models, and cross-validation method is used to evaluate the model performance.

[0071] For example, Figure 3It is a 5-fold cross-validation learning curve diagram of four tree models, where Figure 3 (a) is a learning curve diagram of a decision tree model according to an embodiment of the present invention, Figure 3 (b) is a random forest model learning curve diagram according to an embodiment of the present invention, Figure 3 (c) is a learning curve diagram of a gradient boosting tree model according to an embodiment of the present invention, Figure 3 (d) is a graph of an extreme gradient boosting tree model learning curve according to an embodiment of the present invention; Figure 3 In each learning curve graph, the horizontal axis represents the training sample, and the vertical axis represents the mean square error (MSE). The lower the MSE, the better the model performance.

[0072] Depend on Figure 3 It can be seen that as the number of training samples increases, the training score of the DT model gradually increases, indicating that the model may be overfitting on the training data. As the number of training samples increases, the model may become too complex and cannot be generalized well to new data, resulting in an increase in the score.

[0073] The training score of the RF model decreases as the number of training samples increases, indicating that the performance of the model on the training set improves as the number of samples increases, and the cross-validation score also decreases as the number of training samples increases, and gradually stabilizes, indicating that the generalization ability of the model gradually improves. In the initial stage (when the number of samples is small), the training error and cross-validation error are relatively high. As the number of training samples increases, the cross-validation error decreases significantly, indicating that the performance of the model on new data continues to improve. In general, increasing the number of training samples can effectively reduce the mean square error of the model and improve its overall performance.

[0074] The training scores of the GBDT model and the XGBoost model are almost maintained at a low level. The stability of the training scores means that the model has a strong ability to fit the training data and there is no obvious overfitting phenomenon. The cross-validation score decreases significantly with the increase in the number of training samples and tends to stabilize after a certain sample size, which means that the generalization ability of the model on the validation set gradually improves and no longer improves significantly after the sample size reaches a certain level. The green shaded area in the figure represents the range of variation of the cross-validation score. The smaller the range, the higher the stability of the model.

[0075] Overall, the learning curves of the GBDT model and the XGBoost model show that the GBDT model and the XGBoost model work well together on the training and validation sets, and exhibit good generalization capabilities with high model stability.

[0076] Further, Figure 4This is a test result diagram of the four tree models obtained through training on the test set, where: Figure 4 (a) is a prediction effect diagram of a decision tree model test set according to an embodiment of the present invention, Figure 4 (b) is a diagram showing the prediction effect of a random forest model test set according to an embodiment of the present invention. Figure 4 (c) is a prediction effect diagram of a gradient boosting tree model test set according to an embodiment of the present invention, Figure 4 (d) is a prediction effect diagram of an extreme gradient boosting tree model test set according to an embodiment of the present invention; Figure 4 As shown in the figure, the prediction effects of the four selected tree models are good, but the prediction effects of the GBDT model and the XGBoost model are significantly better than those of the DT model and the RF model.

[0077] For example, after obtaining four tree models, MSE, mean absolute error (MAE), R-squared (R 2 ) and root mean square logarithmic error (RMSLE) are used as metrics for evaluating the performance of the propulsion power prediction model.

[0078] Specifically, Table 1 shows the first prediction errors of the four tree models on the training set:

[0079]

[0080] Table 1 The first prediction error of the four tree models on the training set Specifically, Table 2 is the second prediction error of the four tree models on the test set:

[0081]

[0082] Table 2 Second prediction error of four tree models on the test set

[0083] As shown in Table 1 and Table 2, the prediction effects of the GBDT model and the XGBoost model are both very good and can complete the current prediction task well. However, the first prediction error and the second prediction error of the XGBoost model are both smaller than the preset values, and its prediction effect is the best. The RF model is also relatively good. The DT model has the worst prediction effect and may have overfitting.

[0084] In summary, the prediction effect of the XGBoost model on both the training set and the test set is the best, and from the cross-validated learning curve, it can be seen that the generalization ability of the model is very good and there is no overfitting. Therefore, in the present invention, the XGBoost model is selected as the propulsion power prediction model.

[0085] Step S103, particle swarm optimization is performed on the propulsion power prediction model with the goal of minimizing the propulsion power. During the particle swarm optimization process, the optimal trim that minimizes the propulsion power at each speed and draft is searched based on each particle in the particle swarm, and the trim optimization result of the target ship is obtained.

[0086] After obtaining the propulsion power prediction model based on the XGBoost model, the propulsion power under different trim states can be quickly and accurately predicted through the XGBoost model; on this basis, the embodiment of the present invention adopts a particle swarm optimization algorithm to achieve the optimization of ship trim; compared with traditional methods and CFD, the use of the XGBoost model combined with the particle swarm optimization algorithm has shown significant advantages in ship trim optimization, and it has the characteristics of automation, real-time and high efficiency.

[0087] Specifically, Particle Swarm Optimization (PSO) is an optimization algorithm based on swarm intelligence, originally proposed by Kennedy and Eberhart in 1995; it is inspired by the foraging behavior of bird flocks, and uses the information sharing of individuals in the group to make the movement of the entire group evolve from disorder to order in the problem-solving space, thereby obtaining the optimal solution.

[0088] In this embodiment, each particle in the particle group represents a plurality of different trim values ​​at the current speed and the current draft, and the target optimal solution of each particle is set to the target trim value corresponding to the particle at the target position, and the propulsion power of the target ship is minimum.

[0089] Exemplarily, in the initialization stage of particle swarm optimization, each particle in the particle swarm is randomly generated, and the position, speed, fitness threshold and number of iterations of each particle are initialized; wherein the fitness threshold and the number of iterations are the termination conditions of the particle swarm optimization, that is, during the optimization process, when any termination condition of reaching the number of iterations or the fitness of a particle reaches within the threshold is met, the particle swarm optimization is confirmed to be terminated.

[0090] As a possible implementation, the fitness threshold may be set to the propulsion power obtained by the particle at a certain position.

[0091] Among them, the fitness threshold is the target value of the propulsion power prediction model, that is, the fitness threshold is the propulsion power output by the propulsion power prediction model; it should be understood that the smaller the target value, the better the fitness.

[0092] After initialization, the initial individual optimal position of each particle and the initial global optimal position of the particle group are determined based on the randomly generated particles.

[0093] Among them, the fitness value of each particle can be calculated, the current position of each particle can be evaluated according to the fitness threshold and the objective function, and the position of the optimal particle with the smallest propulsion power corresponding to each randomly generated particle can be further used as the initial individual optimal position of other particles and the initial global optimal position of the particle group.

[0094] Furthermore, the particle swarm is controlled by the individual optimal position and the global optimal position to perform multiple rounds of iterations according to the position and the speed to obtain a trim optimization result of the target ship.

[0095] As an exemplary embodiment, the individual optimal position and the global optimal position are used to control the particle swarm to perform multiple rounds of iterations according to the position and the speed to obtain the trim optimization result of the target ship, including:

[0096] In each round of iteration, the position and the speed of each particle are updated, and the fitness value of each iterated particle after the iteration is calculated using a pre-constructed objective function;

[0097] Traversing each of the iterative particles, if there is an optimal iterative particle whose fitness value is better than the first fitness corresponding to the individual optimal positions of the current iterative particle and other iterative particles, then updating the individual optimal positions of the optimal iterative particle and the current iterative particle to the current position of the iterative particle;

[0098] Furthermore, if there is an optimal iterative particle whose fitness value is greater than the second fitness corresponding to the global optimal position, the global optimal position of the particle group is updated to the current position of the optimal iterative particle.

[0099] As a possible implementation, when the particle swarm is controlled to perform multiple rounds of iterations according to the position and the speed using the individual optimal position and the global optimal position, the speed of each particle can be updated by the following formula in each round of iteration:

[0100]

[0101] in, represents the velocity of the particle in the current iteration round, represents the velocity of the particle in the previous iteration, w is the inertia weight; r1, r2 are random numbers, c1, c2 are acceleration constants, pBest i represents the individual optimal position, and gBest represents the global optimal position.

[0102] By setting the random numbers of r1 and r2, randomness is introduced into the particle update, making the search process more diverse.

[0103] The position of each particle can be updated by the following formula:

[0104]

[0105] in, represents the position of the particle in the current iteration round, represents the position of the particle in the previous iteration round, Indicates the velocity of the particle in the current iteration.

[0106] After the trim value is obtained by particle swarm optimization, in the present invention, three draft schemes are designed to quantify the optimization efficiency of trim optimization; illustratively, the three draft schemes are empty draft, half-loaded draft and full-loaded draft as comparison schemes for trim optimization; wherein the draft depths of empty draft, half-loaded draft and full-loaded draft are 13m, 14.5m and 16m respectively, and the three schemes are designed to use a flat draft with a trim value of zero at different speeds as a comparison scheme, and the average optimization efficiency of the best trim of the three schemes at speeds of 16kn, 18kn, 20kn, 22kn and 24kn is calculated by using the best trim value obtained by particle swarm optimization as the trim optimization scheme, and the average optimization efficiency of the best trim is obtained as shown in Table 3:

[0107]

[0108] Table 3 Average optimization efficiency of optimal trim

[0109] As shown in Table 3, the optimization efficiency is the highest in the no-load draft (13m) state, averaging 2.22%, followed by the half-load draft (14.5m) state, averaging 0.9%, and the lowest in the full-load draft (16m) state, averaging only 0.38%. These data reflect that the draft depth has an impact on the optimal trim angle of the ship, and the speed also has a great impact on the optimal trim angle of the ship, especially in the half-load draft state, the optimization efficiency of the optimal trim angle at low speed is significantly higher than that at high speed.

[0110] In the no-load draft state, the trim adjustment of the ship has the most significant effect on reducing navigation resistance and improving energy efficiency. This may be because at a smaller draft, the underwater shape and hydrodynamic characteristics of the ship are more sensitive to changes in the trim angle, so the optimization effect is more obvious. In contrast, the optimization efficiency is lower in the half-loaded draft and full-loaded draft states. This may be because in these two states, the trim adjustment of the ship has a relatively small impact on resistance and energy efficiency.

[0111] Based on this, on the basis of the pre-established ship propulsion power prediction model, particle swarm optimization is used to obtain the optimal trim value of the target ship, and the trim optimization result can improve the propulsion efficiency of the target ship.

[0112] Compared with traditional methods and CFD, the above method of the present invention has the advantages of automation, real-time and high efficiency in machine learning in ship trim optimization. The ship propulsion power prediction model established based on XGBoost performs best, with a mean absolute error (MAE) of only 19.411 on the test set, and the model has strong generalization ability; and, as a tree model, XGBoost does not require scaling of input features, which is very beneficial for subsequent optimization work; further, the particle swarm optimization method is used to minimize the method of calculating the optimal trim value based on the established XGBoost model, which can automatically calculate the optimal trim value of the ship under multiple drafts and speeds, thereby improving the propulsion efficiency of the ship.

[0113] In the above embodiments, the determination of the optimal trim value is often based on fixed draft data and speed data, that is, the optimal trim value under multiple fixed draft data and speed data is obtained. In order to make the optimization of the trim value have a wider scope of application (applicable to more uncertain draft data and speed data), so that more different types of ships and different types of ships can navigate with the optimal trim value and optimal propulsion efficiency in different navigation scenarios, in an optional embodiment, a data sample can be constructed for the optimal trim values ​​under multiple drafts and speeds obtained by the above method optimization, and at the same time, a trim optimization result is used as output, and the corresponding speed data and draft data are used as input to construct a trim value optimization model, so that more different types of ships and different types of ships can navigate with the optimal trim value and optimal propulsion efficiency in different navigation scenarios.

[0114] Specifically, a training data set is constructed based on the trim optimization result and its corresponding optimized speed and optimized draft; a trim optimization model is trained based on the training data set, with the draft and speed as input and the trim optimization result as the target value; in the process of model training, the corresponding relationship between the draft and speed and the trim optimization result is learned. In this embodiment, the trim optimization model is trained based on the trim optimization result, the optimized speed, the optimized draft and the trim optimization result. During the operation of the target ship, the target draft and target speed of the target ship in the navigation plan can be obtained, and the target draft and target speed are further input into the trim optimization model to obtain the trim value corresponding to the target draft and target speed, so that the target speed can improve the propulsion efficiency through the trim value during navigation.

[0115] As another implementation, after obtaining the optimal trim value and the optimized propulsion power, the above method can be used to optimize the optimized propulsion power at multiple drafts and speeds to construct data samples, and then a relatively optimized propulsion power can be given when any set of draft and speed is input.

[0116] Specifically, the optimized propulsion power corresponding to the trim optimization result is obtained; a training data set is constructed based on the optimized propulsion power and its corresponding optimized speed and optimized draft; an optimal propulsion power prediction model is trained based on the training data set with draft and speed as input and optimized propulsion power as target value; in the process of model training, the corresponding relationship between draft and speed and optimized propulsion power is learned. In this embodiment, the optimal propulsion power prediction model is obtained based on the optimal propulsion power, optimized speed, optimized draft and optimized propulsion power training. During the operation of the target ship, the target draft and target speed of the target ship in the navigation plan can be obtained, and the target draft and target speed are further input into the optimal propulsion power prediction model to obtain the optimal propulsion power corresponding to the target draft and target speed, so as to calculate or predict the optimal propulsion power of the target ship.

[0117] In order to make the application scope of the optimization of the trim value wider, so that more different types of ships and different types of ships can use the optimal trim value in different navigation scenarios, and the optimal propulsion efficiency of the ship in the current navigation scenario can be determined, in an optional embodiment, a data sample can be constructed for the optimal trim values ​​and optimal propulsion power at multiple drafts and speeds obtained by the above method optimization, and an optimal propulsion power prediction model is constructed with the trim optimization results and the optimal propulsion power as output and the corresponding speed data and draft data as input, so that more different types of ships and different types of ships can navigate with the optimal trim value and optimal propulsion efficiency in different navigation scenarios.

[0118] Specifically, the ship trim optimization method also includes: obtaining the optimized propulsion power corresponding to the trim optimization result; constructing a training data set based on the trim optimization result, the optimized propulsion power and its corresponding optimized speed and optimized draft; training an optimal propulsion power prediction model with draft and speed as input and the trim optimization result and the optimized propulsion power as target values ​​based on the training data set; in the process of model training, learning the corresponding relationship between draft and speed and the trim optimization result and optimized propulsion power.

[0119] In this embodiment, the trim optimization model is obtained based on the trim optimization results, optimized speed, optimized draft and optimized propulsion power training. During the operation of the target ship, the target draft and target speed of the target ship in the navigation plan can be obtained, and the target draft and target speed are further input into the trim optimization model to obtain the trim value corresponding to the target draft and target speed, so that the target speed can improve the propulsion efficiency through the trim value during navigation.

[0120] In another embodiment, when the propulsion power prediction model is subjected to particle swarm optimization with the goal of minimizing the propulsion power, the model parameters of the propulsion power prediction model can be changed based on the particle swarm optimization results, so that the propulsion power prediction model can give its corresponding optimal trim value and optimized propulsion power when any set of draft and speed data is input; in an optional embodiment, a data sample can be constructed for the optimal trim values ​​and optimal propulsion power at multiple drafts and speeds obtained by the above method optimization, and the model parameters of the propulsion power prediction model are modified with the trim optimization results and the optimal propulsion power as output and the corresponding speed data and draft data as input.

[0121] Specifically, the particle swarm optimization of the propulsion power prediction model with the goal of minimizing the propulsion power also includes: constructing a training data set based on the trim optimization result, the optimized propulsion power and its corresponding optimized speed and optimized draft; optimizing the propulsion power prediction model trained based on the still water trial data based on the training data set; during the optimization process, changing the model parameters of the propulsion power prediction model so that the model can learn the corresponding relationship between the draft and speed and the trim optimization result and the optimized propulsion power, so as to obtain the optimal propulsion power prediction model.

[0122] This embodiment provides a ship trim optimization device, such as Figure 5 As shown, including:

[0123] The acquisition module 501 is used to acquire the still water sea trial data of the target ship; wherein the still water sea trial data includes the sea trial speed, the sea trial propulsion power, the sea trial draft and the sea trial trim;

[0124] A propulsion power prediction model training module 502 is used to train a propulsion power prediction model with ship speed, draft and trim as target inputs and propulsion power as target output based on the correlation between each data in the still water sea trial data and the propulsion power;

[0125] The particle swarm optimization module 503 is used to perform particle swarm optimization on the propulsion power prediction model with the goal of minimizing the propulsion power. During the particle swarm optimization process, the optimal trim that minimizes the propulsion power at each speed and draft is searched based on each particle in the particle swarm to obtain the trim optimization result of the target ship.

[0126] It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0127] It should be noted that the above modules as part of the device can be implemented by software or hardware, wherein the hardware environment includes a network environment.

[0128] An embodiment of the present invention also provides a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus, the memory is used to store a computer program; the processor is used to execute a method in any of the above embodiments by running the computer program stored in the memory.

[0129] Figure 6 is a structural block diagram of an optional computer device according to an embodiment of the present application, such as Figure 6 As shown, it includes a processor 10, a communication interface 20, a memory 30 and a communication bus 40, wherein the processor 10, the communication interface 20 and the memory 30 communicate with each other through the communication bus 40, wherein:

[0130] A memory 30, for storing computer programs;

[0131] The processor 10 is used to implement the method for constructing a disease database as described in any of the above embodiments when executing the computer program stored in the memory 30.

[0132] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0133] The communication interface is used for communication between the above-mentioned computer device and other devices.

[0134] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0135] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0136] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0137] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only. The device for implementing any one of the methods in the above embodiments may be a terminal device, which may be a smart phone (such as an Android phone, an IOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations shown.

[0138] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.

[0139] As an exemplary embodiment, the present application also provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute any one of the method steps of the present embodiment when running.

[0140] Optionally, in this embodiment, the above-mentioned storage medium can be used to execute the program code of the method steps of the embodiment of the present application.

[0141] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.

[0142] Optionally, in this embodiment, the storage medium is configured to store data for executing the method in the above embodiment.

[0143] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.

[0144] Optionally, in this embodiment, the storage medium may include but is not limited to: a U disk, a ROM, a RAM, a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0145] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0146] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers or network devices, etc.) to execute all or part of the steps of the method in the above embodiments.

[0147] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0149] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0150] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0151] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A ship trim optimization method, characterized in that: include: Acquire still water sea trial data of the target ship; wherein the still water sea trial data includes sea trial speed, sea trial propulsion power, sea trial draft and sea trial trim; Based on the correlation between each data in the still water sea trial data and the propulsion power, a propulsion power prediction model is trained with the ship speed, draft and trim as target inputs and the propulsion power as target output; The propulsion power prediction model is optimized by particle swarm optimization with the goal of minimizing the propulsion power. In the process of particle swarm optimization, the optimal trim that minimizes the propulsion power at various speeds and drafts is searched based on each particle in the particle swarm, and the trim optimization result of the target ship is obtained.

2. The ship trim optimization method according to claim 1, characterized in that: The particle swarm optimization of the propulsion power prediction model with the goal of minimizing the propulsion power includes: Randomly generate each particle in the particle swarm, and initialize the position, speed, fitness threshold and iteration number of each particle; wherein each particle is used to represent multiple trim values ​​at the current speed and draft, and the fitness threshold is used to represent the target value of the propulsion power prediction model; Determining an initial individual optimal position of each particle and an initial global optimal position of a particle swarm based on each randomly generated particle; The particle swarm is controlled by the individual optimal position and the global optimal position to perform multiple rounds of iterations according to the position and the speed, so as to obtain the trim optimization result of the target ship.

3. The ship trim optimization method according to claim 2, characterized in that: The controlling the particle swarm to perform multiple rounds of iterations using the individual optimal position and the global optimal position includes: In each round of iteration, the position and the speed of each particle are updated, and the fitness value of each iterative particle after the iteration is calculated using a pre-constructed objective function; wherein the fitness value is used to represent the iterative propulsion power under the pitch value corresponding to each iterative particle; Traversing each of the iterative particles, if there is an optimal iterative particle whose fitness value is better than the first fitness corresponding to the individual optimal positions of the current iterative particle and other iterative particles, then updating the individual optimal positions of the optimal iterative particle and the current iterative particle to the current position of the optimal iterative particle; Furthermore, if there is an optimal iterative particle whose fitness value is greater than the second fitness corresponding to the global optimal position, the global optimal position of the particle group is updated to the current position of the optimal iterative particle.

4. The ship trim optimization method according to claim 3, characterized in that: The updating of the position and the speed of each particle includes: In the formula, represents the velocity of the particle in the current iteration round, represents the velocity of the particle in the previous iteration, w is the inertia weight; r1, r2 are random numbers, c1, c2 are acceleration constants, pBest i represents the individual optimal position, and gBest represents the global optimal position; In the formula, represents the position of the particle in the current iteration round, represents the position of the particle in the previous iteration round, Indicates the velocity of the particle in the current iteration.

5. The ship trim optimization method according to claim 1, characterized in that: The training of a propulsion power prediction model based on the correlation between each data in the still water sea trial data and the propulsion power, with the ship speed, draft and trim as target inputs and the propulsion power as target output, comprises: Performing a correlation analysis on the sea trial speed, sea trial propulsion power, sea trial draft and sea trial trim in the still water sea trial data to obtain a correlation analysis result; Constructing a preset prediction model and data set based on the correlation analysis results and the still water sea trial data; The data set is input into the preset prediction model for model training until the model converges to obtain the propulsion power prediction model.

6. The ship trim optimization method according to claim 5, characterized in that: The preset prediction model includes a plurality of preset tree models, and the step of inputting the data set into the preset prediction model for model training includes: Dividing the data set into a training set and a test set according to a preset ratio; Optimizing the model parameters of each of the preset tree models using grid search; The training set is input into each of the preset tree models after model parameter optimization for model training until the model converges, and a first prediction error of each of the preset tree models based on the training set is obtained; wherein the first prediction error includes at least one of mean square error, mean absolute error, R square, and root mean square logarithmic error; The trained preset tree models are tested using the test set to obtain a second prediction error of each preset tree model based on the test set; wherein the second prediction error includes at least one of a mean square error, a mean absolute error, an R-square, and a root mean square logarithmic error; The preset tree model is selected as the preset prediction model based on the first prediction error and the second prediction error.

7. The ship trim optimization method according to claim 1, characterized in that: The method further comprises: Constructing a training data set based on the trim optimization results and their corresponding optimized speed and optimized draft; Based on the training data set, a trim optimization model is trained with the draft and the ship speed as input and the trim optimization result as the target value; in the process of model training, the corresponding relationship between the draft and the ship speed and the trim optimization result is learned.

8. A ship trim optimization device, characterized in that: The ship trim optimization device comprises: An acquisition module is used to acquire still water sea trial data of a target ship; wherein the still water sea trial data includes sea trial speed, sea trial propulsion power, sea trial draft and sea trial trim; A propulsion power prediction model training module, used for training a propulsion power prediction model with ship speed, draft and trim as target inputs and propulsion power as target output based on the correlation between each data in the still water sea trial data and the propulsion power; The particle swarm optimization module is used to perform particle swarm optimization on the propulsion power prediction model with the goal of minimizing the propulsion power. During the particle swarm optimization process, the optimal trim that minimizes the propulsion power at each speed and draft is searched based on each particle in the particle swarm to obtain the trim optimization result of the target ship.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the ship trim optimization method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the ship trim optimization method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Intelligent energy efficiency optimization method and system for ship

    CN120595596A

  • System, method and device for simulating and restoring floating state of floating body to static draft

    CN121920545A