Ship resistance forecasting method and system based on physical information neural network

By applying a physical information neural network in ship resistance forecasting, combining the Navistox equation and ship resistance formula as physical constraints, the problems of traditional forecasting are solved, and efficient and accurate ship resistance forecasting are achieved.

CN119442487AActive Publication Date: 2025-02-14WUHAN RIANG TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510024873.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-02-14
Estimated Expiration
2045-01-08

Smart Images

  • Figure CN119442487A_ABST
    Figure CN119442487A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent forecasting of ship performance, and discloses a ship resistance forecasting method and system based on a physical information neural network. The method comprises the following steps: carrying out numerical simulation on the direct navigation motion of a ship in still water to obtain a pressure field and a speed field of a watershed and ship resistance information during the direct navigation motion; constructing and forming a total data set, and establishing a training set, a test set and a verification set; establishing a PINN neural network model fused with physical knowledge; obtaining a neural network model based on physical information; generating a random forest model and training; and performing bidirectional verification on the neural network model based on the physical information by using a random forest model to form a network model for ship resistance forecasting. According to the method, the reliability of the forecasting result in the physical level is effectively improved, and the training efficiency of the neural network model is improved, so that the forecasting efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent prediction of ship performance, and in particular relates to a ship resistance prediction method and system based on physical information neural network. Background Art

[0002] Digital transformation is the only way for future industrial development. As an important tool to promote industrial transformation and development, digital twin technology has formed a generally adaptable theoretical and technical system and has been deeply applied in the shipbuilding industry. On this premise, in order to meet the future intelligent development needs of independent industrial software in my country's shipbuilding field, it is necessary to carry out theoretical research on efficient and intelligent forecasting.

[0003] Designing ships with good resistance performance can effectively improve transportation efficiency, reduce economic costs, and protect the marine environment. Therefore, accurate prediction of ship resistance is an important part of ship design and hydrodynamic performance research. Traditional prediction methods of ship resistance are mainly divided into three categories: theoretical research method, model test method and numerical simulation method. The theoretical research method is in the initial stage of ship design. Due to the incomplete data on the main scale, hull lines and other related data for calculating resistance performance, it can only summarize and analyze a large number of ship model tests and actual ship tests, and then apply empirical formulas and basic knowledge of fluid mechanics to make an approximate estimate of ship resistance. Model tests are generally carried out under simplified typical working conditions, which cannot fully simulate the complex sea conditions in actual navigation. During the test, certain errors will also occur due to scale effects, blocking effects and measurement accuracy. The numerical simulation method simulates the viscous flow field around the hull through a computer, which can show the information of the flow field around the hull in detail and predict the hydrodynamic performance of the ship. However, there are often large calculation errors and long calculation times for different ship types or watersheds, so it is necessary to re-estimate different ships at different speeds or different watersheds.

[0004] In the traditional solution prediction of ship speed, it is difficult to achieve good results in both speed and accuracy, and it cannot meet the real-time and efficient computing requirements. In recent years, machine learning has been more and more widely used in ships. A large amount of ship model test data is used to train neural networks. This artificial intelligence method based on actual motion data can improve the prediction accuracy, but it lacks physical meaning and has poor generalization ability. In order to improve the interpretability and applicability of deep learning networks in solving partial differential equation systems, the physical information neural network (PINN) as a new intelligent solution algorithm has been partially verified in solving Maxwell's equations, Poisson's equations and Navier-Stokes equations. In terms of the calculation of the underlying physical quantities related to ship speed, the integration of mathematical equations and artificial intelligence will provide new ideas for the real-time intelligent prediction of ship performance, which is necessary and important for research.

[0005] Through the above analysis, the problems and defects of the existing technology are as follows: the existing technology takes a long time to predict different watersheds in the traditional prediction of ship resistance, and the artificial intelligence method based only on actual data lacks physical meaning and has poor generalization ability, and the real-time solution prediction accuracy of ship resistance is low. Summary of the invention

[0006] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a ship resistance prediction method and system based on physical information neural network. The present invention is used for predicting the navigation resistance of a certain ship.

[0007] The technical solution is as follows: A ship resistance prediction method based on a physical information neural network, the method comprising: S1, numerical simulation of the ship's straight-line motion in still water to obtain the pressure of the basin during straight-line motion , velocity field , Ship resistance information ;in, for The velocity field in the direction, for The velocity field in the direction, for Velocity field in direction; S2, construct a total data set by combing the acquired data , build a training set , test set and validation set ; S3, determine the number of layers of the PINN neural network model and the number of neurons in each layer, initialize the weight and bias of the PINN neural network model; design the loss function of the PINN neural network model for ship resistance prediction, add control equations as physical constraints in the loss function, and the control equations include the Navier-Stokes equations and the ship resistance formula; select the fully connected neural network as the basic model of the algorithm, select the activation function and design multiple intelligent optimizers, and establish the PINN neural network model integrating physical knowledge; S4, the training set Substituting the data into the PINN neural network model integrating physical knowledge for training, to obtain a neural network model based on physical information; S5, based on the pressure field obtained With velocity field , taking the velocity field as the input feature and the ship resistance as the output feature, setting parameters to control the prediction process of random forest; and obtaining the training set Random sampling is used to form multiple sub-training sets, and each decision tree is trained based on the randomly selected sample subset. The decision trees generated by each sub-training set are integrated by voting to generate a random forest model, and the average of all decision tree prediction results is taken as the final output result. S6, the training set The data is substituted into the random forest model for training, and the validation set is used The data was used to verify the accuracy of the random forest model. The mean square error was used to evaluate the accuracy of the random forest model, and the parameters were adjusted according to the evaluation results to obtain a mean square error of less than 5%; S7, using the random forest model to perform bidirectional verification on the neural network model based on physical information to form a network model for ship resistance prediction.

[0008] In step S1, the straight-line motion of the ship in still water is numerically simulated, including: numerical simulation is performed through CFD software STARCCM+ and the finite volume method, first the fluid region to be solved is volumetrically controlled and discretized, each control volume integral is solved in the form of calculation grid units, and the physical quantity interpolation of the grid calculation nodes is performed to obtain the value of the entire calculation area; the straight-line motion of the ship is simulated through experiments, a target ship model is provided, and the target ship model is gridded and the watershed is set; the ship is placed in a watershed where a set relative speed is reached and stabilized, the velocity field and pressure field values ​​around the ship are monitored, the hull resistance is defined as the force required to tow the ship at a constant speed in still water, a monitoring image of the resistance performance changing with time is created, and the ship resistance value is obtained.

[0009] In step S3, a PINN neural network model integrating physical knowledge is established, including: (1) In the PINN neural network model, based on the TensorFlow deep learning framework, a fully connected neural network framework was constructed using the Python programming language on the PyCharm platform. The control equations were constructed through the Navier-Stokes equations to solve the watershed information, thereby improving the interpretability of the PINN neural network model results at the physical level. (2) In the PINN neural network model, the input value is the speed of the control surface far behind the ship. and ship speed The output value is the ship's sailing resistance , based on the ship resistance equation, the loss function used to perform physical constraints is defined; the loss function includes: control equation loss and the network prediction loss , the control equation loss is used to constrain the PINN framework to satisfy the Navier-Stokes equations and the ship resistance equation; the network prediction loss is the mean square error between the network output value and the true value, which is used to constrain the update of the PINN neural network model weights.

[0010] In step (1), when hour, is the fluid viscosity coefficient, is a constant; the differential equation of motion for viscous compressible Newtonian fluid is the Navier-Stokes equation, and its vector form is as follows: ; In the formula, is the fluid velocity, is the external force term, is the fluid density, is the gradient operator, is the Laplace operator; In rectangular coordinates, the scalar form is: ; ; ; In the formula, They are External forces in three directions, is the space-time coordinate, is the viscosity coefficient; For an incompressible fluid, we have , the loss function definition for physical constraints based on the simplified Navier-Stokes equations is as follows: ; ; ; In the formula, They are all loss function terms; The input is the space-time coordinates and ship speed , output the flow field velocity in the current space and time And pressure ; Obtain the watershed information when the ship is sailing, and construct the PINN network structure for obtaining the ship's sailing resistance R based on the basic principle of the Jones wake measurement method.

[0011] Further, the wake measurement method includes: (1) The momentum loss in the wake plane behind the ship is entirely due to viscosity; (2) There is no energy loss between the measuring plane near the rear of the hull and the plane twice the length of the ship behind the ship, that is, there is no total pressure head loss; there are no waves at the control surface; from step (1), we know that Viscous force on a micro area It is equal to the momentum loss per unit time on the area, and the expression is: ; In the formula, is the micro area on the control surface, is the viscous force on a micro area, is the speed on the far rear control surface of the vessel; The viscous drag on the hull is divided along the entire control area to give: ; In the formula, is the ship resistance, For the control surface.

[0012] In step (2), the loss function used for physical constraints is defined based on the ship resistance equation as follows: ; In the formula, is the loss function term, is the ship resistance, is the fluid density, is the speed on the far rear control surface of the ship, is the ship speed, For the control surface, is the micro area on the control surface.

[0013] In step (2), the control equation loss is obtained by the mean square error of the control equation error, and the network prediction loss is obtained by the mean square error between the training set data, i.e., the basin velocity, pressure, and ship resistance data, and the output results of the fully connected network. The loss function It is expressed by the following formula: ; Represents the error between the network fitting value and the true value, and the expression is: ; In the formula, is the total number of sample data, Indicates samples, Input features to the network, Input features to another network, For the The true value of the samples, Predict data for the network, is real data; Represents the error between the network fitting value and the physical law, and the expression is: ; In the formula, is the total number of samples, Input data features to the network, Input features to another network, is the loss function of the physical equation.

[0014] In step S4, the training process of the PINN neural network model integrating physical knowledge is as follows: Substitute the data of the training set into the PINN neural network model that integrates physical knowledge, initialize the PINN neural network model that integrates physical knowledge to generate weights and corresponding output values, and calculate the loss function value between the output value and the true value; wherein the loss function is composed of a statistical function and a control equation, the statistical function is used to measure the error between the output value and the corresponding true value in the training set, and the control equation is used to physically constrain the result; The result of the loss function is optimized by gradient descent, and the optimized correction value is forward propagated to the hidden layer according to the chain rule to correct the weights. After multiple rounds of iterations and weight updates, the model training is completed, and the intelligent prediction of ship resistance that integrates mathematical equations and artificial intelligence is realized, and a neural network model based on physical information is obtained.

[0015] Another object of the present invention is to provide a ship resistance prediction system based on physical information neural network, the system implements the ship resistance prediction method based on physical information neural network, the system comprises: Numerical simulation module, used to simulate the straight-line motion of a ship in still water, and obtain the pressure field and velocity field of the watershed and the ship resistance information during the straight-line motion; The data partitioning module is used to construct a total data set by combing the acquired data, and to establish a training set, a test set, and a validation set; The PINN neural network model building module integrating physical knowledge is used to determine the number of layers of the PINN neural network model and the number of neurons in each layer, initialize the weights and biases of the PINN neural network model, select the fully connected neural network as the basic model of the algorithm, select the activation function and design multiple intelligent optimizers, and build the PINN neural network model integrating physical knowledge; A neural network model acquisition module based on physical information, used for substituting the data of the training set into the PINN neural network model integrating physical knowledge for training, so as to obtain a neural network model based on physical information; The random forest model generation module is used to set parameters to control the prediction process of the random forest based on the acquired data, taking the velocity field as the input feature and the ship resistance as the output feature; and the training set obtained from step S2 Random sampling is used to form multiple sub-training sets, where each decision tree is trained based on a randomly selected sample subset; the decision trees generated by each sub-training set are integrated by voting to generate a random forest model, and the average of all decision tree prediction results is taken as the final output result; A random forest model training module is used to substitute the data of the training set into the random forest model for training, and use the validation set data to verify the accuracy of the random forest model, wherein the mean square error is used to evaluate the accuracy of the random forest model, and the parameters are adjusted according to the evaluation results to obtain a mean square error within a range of less than 5%; The bidirectional verification module is used to bidirectionally verify the neural network model based on physical information using the random forest model to form a network model for ship resistance prediction.

[0016] Furthermore, the ship resistance prediction system based on physical information neural network is carried on a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by the processor, it can realize the functions of the above-mentioned ship resistance prediction system based on physical information neural network.

[0017] Combining all the above technical solutions, the beneficial effects of the present invention are as follows: the present invention aims at the problem of intelligent prediction of ship resistance, studies the underlying physical properties involved in the rapidity of ships to ensure their accuracy and universality, and then conducts in-depth research on physical information neural network methods to form a parameterized solution method for the Navier-Stokes equations, and further proposes a network model that combines mathematical equations with artificial intelligence technology to solve and predict ship resistance in real time. Finally, based on the above research foundation, the watershed around the ship is inverted and predicted, thereby achieving high-precision prediction of ship resistance. This method is of great significance for providing sufficient and accurate real sea data and the ship's own data for the ship's digital twin model.

[0018] Compared with the prior art, the present invention effectively solves the problems of difficult grid division, high computational cost and low computational efficiency in the CFD method used in traditional numerical simulation by applying physical information neural network to ship resistance prediction, effectively increases the reliability of the prediction results at the physical level, accelerates the training efficiency of the neural network model, and thus improves the prediction efficiency. The random forest model is used to perform bidirectional verification on the physical information-based neural network model, and ultimately realizes the intelligent prediction of ship resistance that integrates mathematical equations and artificial intelligence.

[0019] This invention not only improves the accuracy and computational efficiency of ship resistance prediction by introducing an intelligent prediction algorithm that combines physical information neural network (PINN) and random forest model, but also effectively reduces the high computational cost of traditional CFD methods. This technology can be widely used in fields such as ship design, shipping scheduling and marine engineering, providing shipping companies and ship manufacturers with more accurate resistance predictions, thereby improving ship fuel efficiency, reducing carbon emissions, and bringing considerable commercial value and long-term benefits to the industry in the context of increasingly stringent global environmental regulations. In addition, the intelligent prediction system based on this technology can also provide strong data support for ship performance optimization and intelligent decision-making, thereby promoting the digital transformation of the shipbuilding industry.

[0020] Traditional ship resistance prediction methods mostly rely on numerical simulation based on CFD, but they face problems such as difficult grid division, high computational cost and low efficiency. The present invention combines physical information neural network (PINN) with machine learning technology, innovatively combines physical constraints with artificial intelligence algorithms, breaks the bottleneck of traditional technology, and fills the gap in the field of ship resistance prediction technology based on the integration of deep learning and physical information at home and abroad. In addition, the two-way verification mechanism of the random forest model also improves the credibility and robustness of the prediction to a certain extent, further consolidating the technical advantages of the present invention.

[0021] The present invention solves many pain points of traditional CFD methods in ship resistance prediction, especially the problems of high computing cost and low computing efficiency. Previously, although a lot of research has been invested in ship resistance prediction technology based on numerical simulation, it is difficult to achieve real-time and accurate prediction due to the limitation of computing resources. However, the present invention not only greatly improves the computing efficiency by integrating physical information neural network, but also provides high-precision prediction results while ensuring physical consistency, breaking through the dilemma that traditional technology cannot efficiently solve this problem, and has significant technical advantages.

[0022] The present invention overcomes the long-standing over-reliance on traditional numerical simulation methods in the field of ship resistance prediction. Although traditional numerical simulation methods are accurate in theory, they are highly dependent on complex grid division and computing resources, which often leads to low computing efficiency and the limitation of being unable to process real-time data. The present invention combines physical information neural networks and machine learning algorithms to achieve intelligent prediction in a data-driven manner, overcomes the prejudice against traditional methods, and promotes the development of ship resistance prediction technology in a more intelligent and real-time direction. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure; Figure 1It is a network structure diagram of velocity field and pressure field prediction by a physical information neural network provided by an embodiment of the present invention; Figure 2 This is a network structure diagram of predicting ship resistance using a physical information neural network provided by an embodiment of the present invention; Figure 3 It is a mechanism diagram of the velocity field and pressure field prediction loss function provided by an embodiment of the present invention; Figure 4 It is a diagram of the mechanism of the ship resistance prediction loss function provided by an embodiment of the present invention; Figure 5 A comparison diagram of the BP neural network provided by an embodiment of the present invention and the PINN neural network model of the present invention; Figure 6 It is a schematic diagram of a ship resistance prediction method based on a physical information neural network provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0025] The innovation of the present invention is that the present invention effectively integrates physical constraints and flow field information into the training process of the neural network by optimizing the loss function design. By adding physical laws and fluid dynamics constraints to the loss function, the model can not only minimize the prediction error, but also ensure the rationality and consistency of the prediction results at the physical level, thereby significantly improving the prediction accuracy and calculation efficiency, and overcoming the high calculation cost and low efficiency of traditional methods in ship resistance prediction. At the same time, by introducing the random forest model for two-way verification, the reliability of the prediction results is further improved.

[0026] The present invention constructs a ship resistance prediction model based on physical information neural network, and uses a random forest model to perform bidirectional verification on the model, so as to provide a method combining mathematical equations with artificial intelligence technology to solve and predict ship resistance in real time.

[0027] Embodiment 1: The ship resistance prediction method based on physical information neural network provided by the embodiment of the present invention includes: S1, numerical simulation of the ship's straight-line motion in still water to obtain the pressure of the basin during straight-line motion , velocity field , Ship resistance information ;in, for The velocity field in the direction, for The velocity field in the direction, for Velocity field in direction; Use CFD software to numerically simulate the straight-line motion of the ship in still water, mesh the target ship model, set the watershed, and collect the initial data required for the network physical information neural network training; For the initial data acquisition of network training: numerical simulation is performed using CFD software STARCCM+ and the finite volume method. The fluid region to be solved is first discretized by volume control, and each control volume integral is solved in the form of calculation grid units, and the physical quantity of the grid calculation nodes is interpolated to obtain the value of the entire calculation area. Through experiments, the direct navigation of the ship is simulated, the target ship model is provided, the target ship model is meshed and the watershed is set. By placing the ship in a watershed with a flow velocity at a set relative speed and monitoring the velocity field and pressure field values ​​around the ship after stabilization, the hull resistance is defined as the force required to tow the ship at a constant speed in still water, and a monitoring image of the resistance performance changing over time is created to obtain the ship resistance value.

[0028] To obtain the velocity and pressure of the watershed, data points are extracted in the calculation area. By determining the collection range, i.e., the point-taking method, a large number of data points are constructed in the watershed to capture the information in the flow field, ensure the training intensity of the physical information neural network, and improve the calculation speed and accuracy of the network.

[0029] S2, construct a total data set by combing the acquired data , build a training set , test set and validation set ; Among them, the training set is used for model generation training, the test set is used to verify the accuracy of the model, and the validation set is used to assist in adjusting the series parameters of the model. The total data set needs to be fully sampled to ensure that the training set can reflect the characteristics of the total data set.

[0030] S3, determine the number of layers of the PINN neural network model and the number of neurons in each layer, initialize the weight and bias of the PINN neural network model; design the loss function of the PINN neural network model for ship resistance prediction, add control equations as physical constraints in the loss function, and the control equations include the Navier-Stokes equations and the ship resistance formula; select the fully connected neural network as the basic model of the algorithm, select the activation function and design multiple intelligent optimizers, and establish the PINN neural network model integrating physical knowledge; Among them, the PINN neural network model (physical information neural network) adopts a multi-layer neural network structure, whose main components include input layer, hidden layer and output layer. The input layer receives physical variables, the hidden layer contains multiple fully connected neurons, uses nonlinear activation functions (such as ReLU or tanh) to process data, and the output layer provides prediction results. The network's loss function combines data loss, physical loss and boundary condition loss, so that the network's output can not only fit the observed data, but also follow the laws of physics, thereby ensuring the physical consistency of the model. The functional principle of physical information neurophysics is to combine physical models with deep learning, and by introducing physical equations (such as partial differential equations) as constraints, the neural network not only relies on data during training, but also follows the laws of physics. The network adaptively learns solutions that conform to the laws of physics by minimizing the loss function and optimizing the model parameters.

[0031] The control equations are added to the loss function of the PINN neural network model as physical constraints. The control equations include the Navier-Stokes equations and the ship resistance formula.

[0032] Specifically, in the construction of the PINN neural network model, parameters such as the number of hidden layers, the number of neurons, the learning rate, and the optimization method are set. In addition, mathematical equations are added to the error function of the PINN neural network model as physical constraints to reduce the discreteness of the data. The number of PINN layers and the number of neurons in each layer are determined, and the adaptive moment estimation (Adam) optimization method and the local minimization (Limited-memory BFGS-Bound, L-BFGS-B) optimization method are used to perform multiple optimizations on the network. The goal of the optimization process is to minimize the loss function and adjust the weights and biases of the network to obtain the best model fitting effect and physical consistency. The ADAM optimization method can more effectively update the model parameters under different parameters and gradients by jointly adjusting the momentum and adaptive learning rate. Compared with the traditional gradient descent algorithm, it combines the characteristics of the momentum method and the adaptive learning rate, and has better convergence and generalization ability. The L-BFGS-B optimization method uses limited storage technology to retain the most recent gradient information, thereby reducing memory consumption. The combination of the two can further optimize the network weights more finely. The two optimization algorithms will gradually reduce the function value of the loss function, while updating the weights and bias values ​​of the fully connected neural network. When the function value of the loss function is reduced to a minimum value, the PINN framework at this time satisfies both the control equation and the network prediction, and can accurately simulate the fluid movement process around the hull.

[0033] In the PINN neural network model, based on the TensorFlow deep learning framework, the Python programming language is used to build a fully connected neural network framework on the PyCharm platform. The control equations are constructed through the Navier-Stokes equations (NS equations) to solve the watershed information, so as to enhance the physical interpretability of the model results. The Navier-Stokes equations are one of the most important control equations in computational fluid dynamics. The differential equations of motion for a viscous, compressible Newtonian fluid are called the Navier-Stokes equations, and their vector form is as follows: ; In the formula, is the fluid velocity, is the external force term, is the fluid density, For pressure, is the gradient operator, is the Laplace operator; In rectangular coordinates, its scalar form is: ; ; ; In the formula, They are External forces in three directions, is the space-time coordinate, for The velocity field in the direction, for The velocity field in the direction, for The velocity field in the direction, is the viscosity coefficient; For an incompressible fluid, we have , the loss function definition for physical constraints based on the simplified Navier-Stokes equations is as follows: ; ; ; In the formula, are loss function terms, For pressure; According to the number of variables of the three-dimensional Navier-Stokes equation, we can construct Figure 1 The network structure of the physical information neural network for predicting velocity field and pressure field is shown in the PINN network structure suitable for obtaining watershed information, where the input is the time and space coordinates and ship speed , output the flow field velocity in the current space and time And pressure ; Obtain the watershed information when the ship is sailing, and construct the PINN network structure for obtaining the ship's sailing resistance R based on the basic principle of the Jones wake measurement method.

[0034] The partial derivatives in the equation can be calculated using automatic differentiation technology. Automatic differentiation combines the characteristics of symbolic differentiation and numerical differentiation. It can calculate the derivatives of any complex function while maintaining numerical stability and accuracy. Automatic differentiation regards the calculation process of the function as a combination of a series of basic operations, and then calculates and solves the function by numerically substituting and retaining the intermediate results.

[0035] According to the above method, the watershed information of the ship can be obtained when it is sailing. Further, according to the basic principle of Jones wake measurement method, the following is constructed: Figure 2 The PINN network structure used to obtain the ship's navigation resistance R. In recent years, when studying the classification of hull resistance, the hull resistance is usually divided into two parts: wave-making resistance and viscous resistance. The former can be determined by wave type analysis, and the latter can generally be measured by wake measurement. This method assumes the following: (1) The momentum loss in the wake plane behind the ship is completely caused by viscosity; (2) There is no energy loss between the measurement plane near the rear of the hull and the plane at twice the length of the ship behind the ship, that is, there is no total pressure head loss. At the control surface, it can be assumed that there are no waves. From assumption (1), we know that Viscous force on a micro area It should be equal to the momentum loss per unit time on the area, that is: ; In the formula, is the micro area on the control surface, is the viscous force on a micro area, is the speed on the far rear control surface of the vessel; The viscous drag on the hull is divided along the entire control area to give: ; In the formula, is the ship resistance, is the fluid density, is the ship speed, For the control surface.

[0036] In this PINN neural network model, the input value is the speed on the control surface far behind the ship. and ship speed , the output value is the ship's sailing resistance R. Based on the ship's resistance calculation formula, the loss function used for physical constraints is defined as follows: ; In the formula, is the loss function term, For the control surface.

[0037] It is understandable that the formula in the full text The corresponding formula is the loss function formula of the present invention designed based on the existing theorem formula, and the technical effects are as follows: The loss function design in the physical information neural network plays a key role, ensuring that the model output is consistent with the observed data and follows the basic physical laws. The loss function is usually composed of data loss, physical loss and boundary condition loss, which can adaptively balance data-driven learning with physical constraints, thereby improving the convergence speed and enhancing the generalization ability of the model. This design enables the model to maintain good performance on unseen test data, while improving the interpretability, so that the prediction results are not only the product of data fitting, but also can be understood from a physical perspective. In short, the loss function in PINN not only promotes effective learning and optimization, but also ensures physical consistency and reliability.

[0038] In the embodiment of the present invention, the loss function includes two parts, namely, the control equation loss and the network prediction loss , the control equation loss is the root mean square error of the above control equation loss function, which is used to constrain the PINN framework to satisfy the NS equation and the ship resistance equation. The network prediction loss is the mean square error between the network output value and the true value, which is used to constrain the PINN network weight update.

[0039] The physical control equation loss is obtained by the mean square error of the control equation error in this step; the network prediction loss is obtained by the mean square error of the training set data in step S2, namely the watershed velocity, pressure, and ship resistance data, and the output result of the fully connected network. The loss function of this embodiment can be expressed by the following formula: ; Represents the error between the network fitting value and the true value, and the expression is: ; In the formula, is the total number of sample data, Indicates samples, Input features to the network, Input features to another network, For the The true value of the samples, Predict data for the network, is real data; Represents the error between the network fitting value and the physical law, and the expression is: ; In the formula, is the total number of samples, Input data features to the network, Input features to another network, is the loss function of the physical equation.

[0040] S4, the training set Substituting the data into the PINN neural network model integrating physical knowledge for training, to obtain a neural network model based on physical information; Substitute the data of the training set into the PINN neural network model integrating physical knowledge for training, and obtain a neural network model based on physical information; the training process of the PINN neural network model integrating physical knowledge is as follows: substitute the data of the training set into the PINN neural network model integrating physical knowledge, initialize the PINN neural network model integrating physical knowledge to generate relevant weights and corresponding output values, calculate the loss function value between the output value and the true value, wherein the loss function is composed of a statistical function and a control equation, the statistical function is used to measure the error between the output value and the corresponding true value in the training set, and the control equation is used to physically constrain the result; perform gradient descent optimization on the result of the loss function, forward propagate the optimized correction value to the hidden layer according to the chain rule, and correct the weight; after multiple rounds of iterations and weight updates, complete the training of the model, realize the intelligent prediction of ship resistance integrating mathematical equations and artificial intelligence, and obtain the neural network model based on physical information.

[0041] Another exemplary specific training process is: randomly initialize the weights and biases of the network; forward propagate the input data through the network to obtain the output result; use the loss function to calculate the difference between the predicted result and the target output, and obtain the loss value; calculate the gradient, that is, the derivative of the network parameter to the loss, through back propagation according to the loss value; use the optimizer to update the weights and biases of the network according to the gradient and learning rate. Repeat the steps after the weight and bias initialization until the predetermined number of training iterations is reached or the condition for stopping training is reached. After multiple rounds of iterative updates, the PINN neural network model for ship resistance prediction is obtained, that is, the neural network model based on physical information.

[0042] S5, based on the pressure field obtained With velocity field , taking the velocity field as the input feature and the ship resistance as the output feature, setting parameters to control the prediction process of random forest; and obtaining the training set Random sampling is used to form multiple sub-training sets, and each decision tree is trained based on the randomly selected sample subset. The decision trees generated by each sub-training set are integrated by voting to generate a random forest model, and the average of all decision tree prediction results is taken as the final output result. As another example, the random forest algorithm is an ensemble learning algorithm based on decision trees, which provides more accurate predictions by constructing multiple decision trees and combining their results. It has good prediction performance and robustness, does not suffer from overfitting, and does not require data pruning.

[0043] In the construction of the random forest model, parameters are set to control the behavior of the random forest, such as the number of trees in the forest, that is, the number of base estimators. The larger the parameter value, the more time and memory are consumed, and the effect of this parameter on the accuracy of the random forest model is monotonic. After the number of decision trees increases to the decision boundary, the accuracy of the random forest will not increase. Therefore, it is set to the default value and adjusted in the subsequent training process to achieve a balance between training difficulty and model effect.

[0044] S6, the training set The data is substituted into the random forest model for training, and the validation set is used The data was used to verify the accuracy of the random forest model. The mean square error was used to evaluate the accuracy of the random forest model, and the parameters were adjusted according to the evaluation results to obtain a mean square error of less than 5%; The smaller the mean square error, the better the performance, and a mean square error not exceeding 5% is set as an acceptable range.

[0045] Exemplarily, the data of the training set is substituted into the random forest model for training, and the accuracy of the random forest model is verified using the validation set data. If the accuracy is met, the model of step S5 is output, otherwise the model parameters are adjusted to retrain the model, wherein the mean square error is used to evaluate the accuracy of the prediction model.

[0046] S7, using the random forest model to perform bidirectional verification on the neural network model based on physical information to form a network model for ship resistance prediction; The PINN model is used to predict the ship resistance and obtain preliminary results. The random forest model is used to predict the same data set to obtain the second set of prediction results. The two prediction results are compared and their differences are analyzed. The difference between the two prediction results is set as the evaluation index, and a threshold is designed to determine whether the prediction result is reliable. Through two-way verification, the accuracy of the PINN model under physical constraints can be ensured, and the nonlinear regression ability of the random forest model can be used to improve the overall prediction performance and robustness.

[0047] Exemplarily, based on the validation set of step S2, the models trained in step S4 and step S6 are used to predict the ship resistance respectively. The prediction results are verified by the physical information neural network algorithm and the machine learning algorithm. If the results of the two algorithms are not much different and the evaluation indicators perform well, then the prediction results can be considered reliable, and the two-way verification of the physical information neural network model is achieved, and finally a network model for ship resistance prediction is formed.

[0048] Among them, BP neural network is one of the most widely used artificial neural network models and has been applied in the research of ship field. The typical BP neural network consists of three layers: input layer, hidden layer and output layer. The Bayesian regularization function is selected as the training function, the mean square error regularization function is the performance function, the hidden layer transfer function is the hyperbolic tangent S-shaped function, and the output layer transfer function is the linear function. A ship resistance prediction model based on the three-layer BP neural network model can be constructed.

[0049] The above two algorithms were used to carry out resistance prediction tests respectively, and the ship resistance data obtained by CFD software simulation was taken as the true value to obtain the resistance prediction errors of 20 groups of different data set samples. The average values ​​of the prediction errors of the two were compared to obtain Table 1. Figure 5 ; Table 1 Comparison of ship resistance prediction errors

[0050] In this embodiment, compared with the resistance prediction method based on BP neural network, the ship resistance prediction method based on physical information neural network improves the prediction accuracy, has a more stable output, and can be used to predict the navigation resistance of a certain ship.

[0051] For example, Figure 6 As shown, the principle of the ship resistance prediction method based on physical information neural network provided by an embodiment of the present invention.

[0052] Embodiment 2: The embodiment of the present invention provides a ship resistance prediction system based on a physical information neural network, comprising: Numerical simulation module, used to simulate the straight-line motion of a ship in still water, and obtain the pressure field and velocity field of the watershed and the ship resistance information during the straight-line motion; The data partitioning module is used to construct a total data set by combing the acquired data, and to establish a training set, a test set, and a validation set; The PINN neural network model building module integrating physical knowledge is used to determine the number of layers of the PINN neural network model and the number of neurons in each layer, initialize the weights and biases of the PINN neural network model, select the fully connected neural network as the basic model of the algorithm, select the activation function and design multiple intelligent optimizers, and build the PINN neural network model integrating physical knowledge; A neural network model acquisition module based on physical information, used for substituting the data of the training set into the PINN neural network model integrating physical knowledge for training, so as to obtain a neural network model based on physical information; The random forest model generation module is used to set parameters to control the prediction process of the random forest based on the acquired data, taking the velocity field as the input feature and the ship resistance as the output feature; and the training set D obtained from step S2 train Random sampling is used to form multiple sub-training sets, where each decision tree is trained based on a randomly selected sample subset; the decision trees generated by each sub-training set are integrated by voting to generate a random forest model, and the average of all decision tree prediction results is taken as the final output result; A random forest model training module is used to substitute the data of the training set into the random forest model for training, and use the validation set data to verify the accuracy of the random forest model, wherein the mean square error is used to evaluate the accuracy of the random forest model, and the parameters are adjusted according to the evaluation results to obtain a mean square error within a range of less than 5%; The bidirectional verification module is used to bidirectionally verify the neural network model based on physical information using the random forest model to form a network model for ship resistance prediction.

[0053] This invention has a variety of application scenarios in the shipping industry, covering many aspects from the design stage to operational monitoring, fault diagnosis and environmental assessment. Shipping companies hope to monitor the resistance of ships in different sailing conditions in real time so as to dynamically adjust the speed and route and optimize fuel efficiency. By collecting sensor data during actual sailing and updating the PINN and random forest models, resistance can be predicted under real-time conditions, thereby providing dynamic decision support for shipping companies and achieving lower operating costs and emissions.

[0054] During the ship design phase, engineers need to evaluate the impact of different design parameters (such as hull shape, size and material) on ship resistance in order to optimize the design. Using CFD simulation data to generate flow field data for a variety of hull designs, combined with physical information neural networks and random forest models, the resistance of different designs can be predicted, helping engineers select the best solution to achieve higher performance and fuel efficiency.

[0055] During ship design and operation, it is necessary to evaluate the impact of different environmental conditions (such as waves, wind speed and current) on resistance in order to formulate corresponding operation strategies. Through CFD simulation to generate flow field data under various environmental conditions, combined with PINNs and random forest models, the change of resistance can be predicted, thereby providing data support for the best navigation strategy of ships in complex waters and improving efficiency and safety.

[0056] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. A ship resistance prediction method based on physical information neural network, characterized in that: The method includes: S1, numerical simulation of the ship's straight-line motion in still water to obtain the pressure of the basin during straight-line motion , velocity field , Ship resistance information ;in, for The velocity field in the direction, for The velocity field in the direction, for Velocity field in direction; S2, construct a total data set by combing the acquired data , build a training set , test set and validation set ; S3, determine the number of layers of the PINN neural network model and the number of neurons in each layer, initialize the weight and bias of the PINN neural network model; design the loss function of the PINN neural network model for ship resistance prediction, add control equations as physical constraints in the loss function, and the control equations include the Navier-Stokes equations and the ship resistance formula; select the fully connected neural network as the basic model of the algorithm, select the activation function and design multiple intelligent optimizers, and establish the PINN neural network model integrating physical knowledge; S4, the training set Substituting the data into the PINN neural network model integrating physical knowledge for training, to obtain a neural network model based on physical information; S5, based on the pressure field obtained With velocity field , taking the velocity field as the input feature and the ship resistance as the output feature, setting parameters to control the prediction process of random forest; and obtaining the training set Random sampling is used to form multiple sub-training sets, and each decision tree is trained based on the randomly selected sample subset. The decision trees generated by each sub-training set are integrated by voting to generate a random forest model, and the average of all decision tree prediction results is taken as the final output result. S6, the training set The data is substituted into the random forest model for training, and the validation set is used The data was used to verify the accuracy of the random forest model. The mean square error was used to evaluate the accuracy of the random forest model, and the parameters were adjusted according to the evaluation results to obtain a mean square error of less than 5%; S7, using the random forest model to perform bidirectional verification on the neural network model based on physical information to form a network model for ship resistance prediction.

2. The ship resistance prediction method based on physical information neural network according to claim 1 is characterized in that: In step S1, the straight-line motion of the ship in still water is numerically simulated, including: numerical simulation is performed through CFD software STARCCM+ and the finite volume method, first the fluid region to be solved is volumetrically controlled and discretized, each control volume integral is solved in the form of calculation grid units, and the physical quantity interpolation of the grid calculation nodes is performed to obtain the value of the entire calculation area; the straight-line motion of the ship is simulated through experiments, a target ship model is provided, and the target ship model is gridded and the watershed is set; the ship is placed in a watershed where a set relative speed is reached and stabilized, the velocity field and pressure field values ​​around the ship are monitored, the hull resistance is defined as the force required to tow the ship at a constant speed in still water, a monitoring image of the resistance performance changing with time is created, and the ship resistance value is obtained.

3. The ship resistance prediction method based on physical information neural network according to claim 1 is characterized in that: In step S3, a PINN neural network model integrating physical knowledge is established, including: (1) In the PINN neural network model, based on the TensorFlow deep learning framework, a fully connected neural network framework was constructed on the PyCharm platform using the Python programming language. The control equations were constructed through the Navier-Stokes equations to solve the watershed information, thus improving the interpretability of the PINN neural network model results at the physical level. (2) In the PINN neural network model, the input value is the speed of the control surface far behind the ship. and ship speed The output value is the ship's sailing resistance , based on the ship resistance equation, the loss function used to perform physical constraints is defined; the loss function includes: control equation loss and the network prediction loss , the control equation loss is used to constrain the PINN framework to satisfy the Navier-Stokes equations and the ship resistance equation; the network prediction loss is the mean square error between the network output value and the true value, which is used to constrain the update of the PINN neural network model weights.

4. The ship resistance prediction method based on physical information neural network according to claim 3 is characterized in that: In step (1), when hour, is the fluid viscosity coefficient, is a constant; the differential equation of motion for viscous compressible Newtonian fluid is the Navier-Stokes equation, and its vector form is as follows: ; In the formula, is the fluid velocity, is the external force term, is the fluid density, is the gradient operator, is the Laplace operator; In rectangular coordinates, the scalar form is: ; ; ; In the formula, They are External forces in three directions, is the space-time coordinate, is the viscosity coefficient; For an incompressible fluid, we have , the loss function definition for physical constraints based on the simplified Navier-Stokes equations is as follows: ; ; ; In the formula, They are all loss function terms; The input is the space-time coordinates and ship speed , output the flow field velocity in the current space and time And pressure ; Obtain the watershed information when the ship is sailing, and construct the PINN network structure for obtaining the ship's sailing resistance R based on the basic principle of the Jones wake measurement method.

5. The ship resistance prediction method based on physical information neural network according to claim 4 is characterized in that: Wake measurement methods, including: (1) The momentum loss in the wake plane behind the ship is entirely due to viscosity; (2) There is no energy loss between the measuring plane near the rear of the hull and the plane twice the length of the ship behind the ship, that is, there is no total pressure head loss; there are no waves at the control surface; from step (1), we know that Viscous force on a micro area It is equal to the momentum loss per unit time on the area, and the expression is: ; In the formula, is the micro area on the control surface, is the viscous force on a micro area, is the speed on the far rear control surface of the vessel; The viscous drag on the hull is divided along the entire control area to give: ; In the formula, is the ship resistance, For the control surface.

6. The ship resistance prediction method based on physical information neural network according to claim 3 is characterized in that: In step (2), the loss function used for physical constraints is defined based on the ship resistance equation as follows: ; In the formula, is the loss function term, is the ship resistance, is the fluid density, is the speed on the far rear control surface of the ship, is the ship speed, For the control surface, is the micro area on the control surface.

7. The ship resistance prediction method based on physical information neural network according to claim 3 is characterized in that: In step (2), the control equation loss is obtained by the mean square error of the control equation error, and the network prediction loss is obtained by the mean square error of the training set data, i.e., the basin velocity, pressure, and ship resistance data, and the output result of the fully connected network. The loss function It is expressed by the following formula: ; Represents the error between the network fitting value and the true value, and the expression is: ; In the formula, is the total number of sample data, Indicates samples, Input features to the network, Input features to another network, For the The true value of the samples, Predict data for the network, is real data; Represents the error between the network fitting value and the physical law, and the expression is: ; In the formula, is the total number of samples, Input data features to the network, Input features to another network, is the loss function of the physical equation.

8. The ship resistance prediction method based on physical information neural network according to claim 1 is characterized in that: In step S4, the training process of the PINN neural network model integrating physical knowledge is as follows: Substitute the data of the training set into the PINN neural network model that integrates physical knowledge, initialize the PINN neural network model that integrates physical knowledge to generate weights and corresponding output values, and calculate the loss function value between the output value and the true value; wherein the loss function is composed of a statistical function and a control equation, the statistical function is used to measure the error between the output value and the corresponding true value in the training set, and the control equation is used to physically constrain the result; The result of the loss function is optimized by gradient descent, and the optimized correction value is forward propagated to the hidden layer according to the chain rule to correct the weights. After multiple rounds of iterations and weight updates, the model training is completed, and the intelligent prediction of ship resistance that integrates mathematical equations and artificial intelligence is realized, and a neural network model based on physical information is obtained.

9. A ship resistance prediction system based on physical information neural network, characterized in that: The system implements the ship resistance prediction method based on physical information neural network according to any one of claims 1 to 8, and the system comprises: Numerical simulation module, used to simulate the straight-line motion of a ship in still water, and obtain the pressure field and velocity field of the watershed and the ship resistance information during the straight-line motion; The data partitioning module is used to construct a total data set by combing the acquired data, and to establish a training set, a test set, and a validation set; The PINN neural network model building module integrating physical knowledge is used to determine the number of layers of the PINN neural network model and the number of neurons in each layer, initialize the weights and biases of the PINN neural network model, select the fully connected neural network as the basic model of the algorithm, select the activation function and design multiple intelligent optimizers, and build the PINN neural network model integrating physical knowledge; A neural network model acquisition module based on physical information, used for substituting the data of the training set into the PINN neural network model integrating physical knowledge for training, so as to obtain a neural network model based on physical information; The random forest model generation module is used to set parameters to control the prediction process of the random forest based on the acquired data, taking the velocity field as the input feature and the ship resistance as the output feature; and the training set obtained from step S2 Random sampling is used to form multiple sub-training sets, where each decision tree is trained based on a randomly selected sample subset; the decision trees generated by each sub-training set are integrated by voting to generate a random forest model, and the average of all decision tree prediction results is taken as the final output result; A random forest model training module is used to substitute the data of the training set into the random forest model for training, and use the validation set data to verify the accuracy of the random forest model, wherein the mean square error is used to evaluate the accuracy of the random forest model, and the parameters are adjusted according to the evaluation results to obtain a mean square error within a range of less than 5%; The bidirectional verification module is used to bidirectionally verify the neural network model based on physical information using the random forest model to form a network model for ship resistance prediction.

10. The ship resistance prediction system based on physical information neural network according to claim 9 is characterized in that: The ship resistance prediction system based on physical information neural network is carried on a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it can realize the functions of the above-mentioned ship resistance prediction system based on physical information neural network.

Citation Information

Patent Citations

  • CFD-based ship energy-saving device performance extrapolation forecasting method

    CN117473652A

  • Underwater full-rotation navigation body resistance prediction method and optimization system based on physical information neural network

    CN118520778A

  • Ship ice load forecasting method based on physical information neural network

    CN118586295A

  • Method and system for ship stability prediction by weighted fusion of radial basis function neural network and random forest based on gradient descent

    US12093616B1

  • Adaptive design and optimization using physics-informed neural networks

    US20230062600A1

Cited By

  • Fluid velocity pressure field deduction method and system based on fusion network

    CN119692252A

  • A method and system for deducing fluid velocity and pressure fields based on fusion network

    CN119692252B

  • Method and system for forecasting coupling stress of ocean wind turbine platform

    CN119720864A

  • Supercritical water transient spraying machine learning prediction method and system

    CN119940162A

  • Intelligent ship resistance forecasting method and system

    CN120196902A