Ship motion response prediction model training method and device

By introducing the physical constraints of the ship's six-degree-of-freedom equation in the ship's motion response forecast model training, the problems of degradation of model generalization performance and overfitting in the prior art are solved, and the forecasting effect and stability are significantly improved.

CN120145869AActive Publication Date: 2025-06-13SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510367059.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-06-13
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

The existing ship motion response forecast model training methods rely on data quantity and quality, resulting in the generalization performance of the model deteriorates when there are limited data or measurement errors, and the overfitting phenomenon is serious, especially under non-steady-state navigation conditions, which affects the model's extrapolation ability and forecasting effect.

Method used

By obtaining the trained ship motion input data, a ship motion loss function based on the preset ship's six-degree-of-freedom equation is constructed, and the initial ship motion response forecast model is used to model the initial ship motion response forecast model to determine the trained target ship motion response forecast model. This method introduces physical constraints into the model training process to improve the generalization ability and forecasting effect of the model.

Benefits of technology

By introducing physical constraints, the generalization ability of the ship motion response forecast model is improved, the dependence on data volume and quality is reduced, and the forecasting effect and stability of the model is significantly improved, especially in the face of unknown environments and dynamic changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145869A_ABST
    Figure CN120145869A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for training a ship motion response forecasting model, which are used for solving the problem that the forecasting effect of the model is poor due to the existing method for training the ship motion response forecasting model. The method comprises the following steps: acquiring training ship motion input data, inputting the training ship motion input data into an initial ship motion response forecasting model for forecasting, and generating training ship motion state output data; constructing a ship motion loss function according to a preset ship six-degree-of-freedom equation; and based on the ship motion loss function, performing model training on the initial ship motion response forecasting model by adopting the training ship motion state output data and the training ship motion input data, and determining a trained target ship motion response forecasting model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship navigation, and particularly to a method and device for training a ship motion response prediction model. Background Technique

[0002] Ship motion response prediction is an important research direction in the fields of ship engineering and ocean engineering, which involves the cross - application of multiple aspects such as wave theory, ship hydrodynamics, numerical simulation technology, and experimental methods. Wave theory is the basis of ship motion response prediction. Among them, linear wave theory is used to describe the ship motion response in regular waves, while nonlinear wave theory is applicable to the complex motion analysis in irregular waves or extreme sea conditions.

[0003] Ship motion shows significant complexity, dynamic changes, and irregularity. Especially when facing unknown environmental threats, sudden disasters may occur, thus posing a serious threat to the lives of crew members and ship assets. With the introduction of artificial intelligence and big data technologies, ship motion response prediction is developing towards intelligence. By analyzing and modeling historical data through machine learning algorithms, the accuracy and adaptability of prediction have been further improved.

[0004] The existing methods for training ship motion response prediction models mainly adopt data - driven machine learning methods. Their technical path is to collect historical ship motion data and construct a nonlinear mapping relationship between ship motion response and input variables based on algorithms such as neural networks, support vector machines, or random forests. However, these methods overly rely on the quantity and quality of data. When the number of training samples is limited or there are measurement errors, the model is prone to problems such as a decline in generalization performance and overfitting. Especially in the prediction of motion response under non - steady navigation conditions, data noise and feature loss will seriously affect the extrapolation ability of the model, resulting in poor prediction effects of the model. Summary of the Invention

[0005] The present invention provides a method and device for training a ship motion response prediction model, which is used to solve the problem that the existing methods for training ship motion response prediction models lead to poor prediction effects of the models.

[0006] A method for training a ship motion response prediction model provided in the first aspect of the present invention includes:

[0007] Obtain training ship motion input data, and input the training ship motion input data into an initial ship motion response prediction model for prediction to generate training ship motion state output data;

[0008] Construct a ship motion loss function according to a preset ship six - degree - of - freedom equation;

[0009] Based on the ship motion loss function, the initial ship motion response prediction model is trained using the training ship motion state output data and the training ship motion input data to determine the trained target ship motion response prediction model.

[0010] Optionally, the training of the initial ship motion response prediction model using the training ship motion state output data and the training ship motion input data based on the ship motion loss function to determine the trained target ship motion response prediction model includes:

[0011] Input the training ship motion state output data and the training ship motion input data into the ship motion loss function and take the derivative to determine the model gradient;

[0012] Use the model gradient to update the model parameters of the initial ship motion response prediction model to determine an intermediate ship motion response prediction model, and count the model update times in real time;

[0013] Judge whether the model update times reach a preset training times threshold;

[0014] If it reaches, use the intermediate ship motion response prediction model as the trained target ship motion response prediction model.

[0015] Optionally, it further includes:

[0016] If the model update times do not reach the preset training times threshold, use the intermediate ship motion response prediction model as a new initial ship motion response prediction model;

[0017] Based on the ship motion loss function, use the new initial ship motion response prediction model to determine the model gradient according to the training ship motion input data;

[0018] Use the model gradient to update the model parameters of the new initial ship motion response prediction model to determine an intermediate ship motion response prediction model, and count the model update times in real time until the model update times reach the preset training times threshold;

[0019] Use the intermediate ship motion response prediction model determined when the model update times reach the preset training times threshold as the trained target ship motion response prediction model.

[0020] Optionally, the preset ship six-degree-of-freedom equation is specifically:

[0021] ;

[0022] Wherein, is the moment acting on the ship in the x - direction from an external source; is the moment of inertia of the hull about the rolling axis; is the time derivative of the angular velocity vector of the ship's roll; is the damping coefficient of the ship's roll motion; is the angular velocity of the ship's roll; is the restoring moment coefficient of the ship's roll; is the angle of the ship's roll; is the moment acting on the ship in the y - direction from an external source; is the moment of inertia of the hull about the pitch axis; is the time derivative of the angular velocity vector of the ship's pitch; is the damping coefficient of the ship's pitch motion; is the angular velocity of the ship's pitch; is the restoring moment coefficient of the ship's pitch; is the angle of the ship's pitch; is the moment acting on the ship in the z - direction from an external source; is the moment of inertia of the hull about the yaw axis; is the time derivative of the angular velocity vector of the ship's yaw; is the damping coefficient of the ship's yaw motion; is the angular velocity of the ship's yaw; is the restoring moment coefficient of the ship's yaw; is the angle of the ship's yaw; is the force acting on the ship in the lateral direction from an external source; m is the mass of the hull; is the second - order time derivative of sway, representing the first - order time derivative of the ship's lateral velocity; is the damping coefficient of the ship's lateral motion; is the time derivative of sway, representing the time derivative of the ship's lateral velocity; is the force acting on the ship in the longitudinal direction from an external source; is the second - order time derivative of surge, representing the first - order time derivative of the ship's longitudinal velocity; is the damping coefficient of the ship's longitudinal motion; is the time derivative of surge, representing the time derivative of the ship's longitudinal velocity; is the force acting on the ship in the vertical direction from an external source; is the second - order time derivative of heave, representing the first - order time derivative of the ship's vertical velocity; is the damping coefficient of the ship's vertical motion; is the time derivative of heave, representing the time derivative of the ship's vertical velocity.

[0023] Optionally, the training ship motion input data includes wave parameters, ship speed parameters, and time parameters; the training ship motion state output data includes surge, sway, heave, roll, pitch, and yaw of the ship; the ship motion loss function is specifically:

[0024] ;

[0025] ;

[0026] ;

[0027] where MSE is the loss value corresponding to the ship motion loss function; Data Loss is the loss value corresponding to the data loss function; Equation Loss is the loss value corresponding to the equation loss function; N is the number of data points selected for training, that is, the number of training ship motion input data; is the weight of the residual of the ship's six-degree-of-freedom motion equation; M is the number of residual points of the ship's six-degree-of-freedom motion equation; f is the residual of the pitch equation; g is the residual of the roll equation; h is the residual of the yaw equation; i is the residual of the surge equation; j is the residual of the sway equation; k is the residual of the heave equation; H is the wave parameter; u is the ship speed parameter; t is the time parameter; d x is the sway of the ship; d y is the surge of the ship; d z is the heave of the ship; is the pitch of the ship; is the roll of the ship; is the yaw of the ship.

[0028] Optionally, after the step of training the initial ship motion response prediction model with the training ship motion state output data and the training ship motion input data based on the ship motion loss function to determine the trained target ship motion response prediction model, it includes:

[0029] Obtain the ship motion input data to be measured;

[0030] Input the ship motion input data to be measured into the trained target ship motion response prediction model for prediction to generate the target ship motion state output data.

[0031] A ship motion response prediction model training device provided in the second aspect of the present invention includes:

[0032] An acquisition module, configured to acquire training ship motion input data and input the training ship motion input data into an initial ship motion response prediction model for prediction to generate training ship motion state output data;

[0033] A construction module for constructing a ship motion loss function according to a preset six-degree-of-freedom equation of the ship.

[0034] A training module for training the initial ship motion response prediction model based on the ship motion loss function, using the training ship motion state output data and the training ship motion input data to determine a trained target ship motion response prediction model.

[0035] A computer device provided in the third aspect of the present invention includes a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor executes the steps of the ship motion response prediction model training method described in any one of the above.

[0036] A computer-readable storage medium provided in the fourth aspect of the present invention stores a computer program thereon. When the computer program is executed, it implements the steps of the ship motion response prediction model training method described in any one of the above.

[0037] A computer program product provided in the fifth aspect of the present invention includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the steps of the ship motion response prediction model training method described in any one of the above.

[0038] It can be seen from the above technical solutions that the present invention has the following advantages:

[0039] The above technical solution of the present invention provides a method for training a ship motion response prediction model. First, obtain training ship motion input data, input the training ship motion input data into the initial ship motion response prediction model for prediction, and generate training ship motion state output data. Then, construct a ship motion loss function according to a preset six-degree-of-freedom equation of the ship. Finally, based on the ship motion loss function, use the training ship motion state output data and the training ship motion input data to train the initial ship motion response prediction model to determine a trained target ship motion response prediction model. Based on the above solution, in the process of constructing a ship motion loss function according to a preset six-degree-of-freedom equation of the ship and training the initial ship motion response prediction model by combining the generated training ship motion state output data and the obtained training ship motion input data to determine a trained target ship motion response prediction model, the present invention couples the preset six-degree-of-freedom equation of the ship into the loss function of the ship motion response prediction model, improves the generalization ability of the ship motion response prediction model by adding physical constraints, reduces the dependence on the size and quality of the data volume, and thus improves the prediction effect of the model. Description of the Drawings

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0041] Figure 1 It is a flowchart of the steps of a method for training a ship motion response prediction model provided in Embodiment 1 of the present invention;

[0042] Figure 2 It is a schematic diagram of the network framework of the ship motion response prediction model provided in Embodiment 1 of the present invention;

[0043] Figure 3 It is a schematic diagram for comparing the trim prediction results provided in Embodiment 1 of the present invention;

[0044] Figure 4 It is a schematic diagram of the trim MSE error in the training stage provided in Embodiment 1 of the present invention;

[0045] Figure 5 It is a schematic diagram of the trim MSE error in the prediction stage provided in Embodiment 1 of the present invention;

[0046] Figure 6 It is a schematic diagram of the trim prediction results in the 4 - 6s stage provided in Embodiment 1 of the present invention;

[0047] Figure 7 It is a schematic diagram of the trim prediction results in the 6 - 7.5s stage provided in Embodiment 1 of the present invention;

[0048] Figure 8 It is a schematic diagram of the trim MSE results in the 4 - 6s stage provided in Embodiment 1 of the present invention;

[0049] Figure 9 It is a schematic diagram of the trim MSE results in the 6 - 7.5s stage provided in Embodiment 1 of the present invention;

[0050] Figure 10 It is a schematic diagram of the heave prediction results in the 6 - 7.5s stage provided in Embodiment 1 of the present invention;

[0051] Figure 11 It is a schematic diagram of the heave MSE results in the 6 - 7.5s stage provided in Embodiment 1 of the present invention;

[0052] Figure 12 It is a schematic diagram of the steps for making a prediction using the trained target ship motion response prediction model provided in Embodiment 2 of the present invention;

[0053] Figure 13 This is a structural block diagram of a training device for a ship motion response prediction model provided in Embodiment 3 of the present invention. Detailed implementation manners

[0054] Embodiments of the present invention provide a method and device for training a ship motion response prediction model, which are used to solve the problem that the existing method for training a ship motion response prediction model results in poor prediction effects of the model.

[0055] To make the objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0056] Please refer to Figure 1 , Figure 1 This is a flowchart of the steps of a method for training a ship motion response prediction model provided in Embodiment 1 of the present invention.

[0057] A method for training a ship motion response prediction model provided by the present invention includes:

[0058] Step 101: Obtain training ship motion input data, and input the training ship motion input data into an initial ship motion response prediction model for prediction to generate training ship motion state output data.

[0059] It should be noted that, please refer to Figure 2 , the ship motion response prediction model uses 3 inputs (i.e., ship motion input data). This model is a preset three-layer fully connected neural network, with 80 neurons preset in each layer, and outputs 6 parameters (i.e., ship motion state output data). The 3 inputs include three input variables (H, u, t), namely wave parameters (wave height / wavelength) H, ship speed parameter u, and time parameter t, as inputs. The 6 outputs are respectively ship pitch, ship roll, ship yaw, ship surge d y , ship sway d x , and ship heave d z .

[0060] Among them, Figure 2 in is the symbol of norm, which is used to calculate the error; u data represents the true value used for training the neural network; u PINN represents the predicted value obtained through the neural network; I is the inertia matrix of the ship, which represents the inertial characteristics of the ship rotating around its center of mass; is the angular velocity vector of the ship; C rot is the damping matrix, which describes the influence of damping forces on the rotational motion of the ship. These damping forces may come from the viscosity of water, the hull shape, and other factors; K is the stiffness matrix, representing the influence of the restoring moment on the rotational motion of the ship. For example, the restoring moment generated due to the ship deviating from the equilibrium position; M is the external excitation moment vector, which may include moments under the action of wind, waves, and other external forces; here, and represent the derivative (acceleration) and the angular velocity vector itself of the angular velocity vector respectively, while M represents the external moment acting on the ship; m represents the mass, which is the mass of the object; u is the displacement of the object in a certain direction; is the second derivative of the displacement u with respect to time, representing acceleration; C lin is the damping coefficient, which represents the influence of the damping force on the motion; is the first derivative of the displacement u with respect to time, representing velocity.

[0061] It is worth mentioning that the present invention embeds physical equations in the loss function of the ship motion response prediction model. During the training iteration of the ship motion response prediction model, it will follow the embedded physical equations, and the finally output results will conform to the expected physical equations. For the relevant calculations in the neural network (ship motion response prediction model), based on numerical calculation software, the computational fluid dynamics principle is combined with the six-degree-of-freedom motion equation of the ship to calculate the forces F x (N), F y (N) and F z (N) in the x, y, and z directions of the ship under known wave parameters H, ship speed parameter u (m / s), and time parameter t (s); the velocity u (m) and acceleration u t (m / s 2 ) in the x direction; the velocity v (m) and acceleration v t (m / s 2 ) in the y direction; the velocity w (m) and acceleration w t (m / s 2 ) in the z direction; the angular velocity (rad / s) and angular acceleration (rad / s 2 ) in the x direction; the angular velocity (rad / s) and angular acceleration (rad / s 2 ) in the y direction; the angular velocity (rad / s) and angular acceleration (rad / s 2 ) in the z direction; the moment Mx in the x direction ( ); the moment My in the y direction ( )The moment Mz in the z direction ( ), pitch (rad), roll (rad) and heave dz (m). Among them, H in the present invention is the (wave height / wavelength) constant, and it can also be other parameters representing wave characteristics.

[0062] Step 102: Construct a ship motion loss function according to the preset six-degree-of-freedom equation of the ship.

[0063] It should be noted that the six-degree-of-freedom motion equation of the ship (preset six-degree-of-freedom equation of the ship) is embedded in the loss function of the ship motion response prediction model in the form of an ordinary differential equation, that is, the six-degree-of-freedom equation of the ship is coupled into the loss function of the ship motion response prediction model, and finally the ship motion loss function is obtained; among them, the preset six-degree-of-freedom equation of the ship is specifically:

[0064] ;

[0065] Among them, is the moment exerted externally on the ship in the x direction; is the moment of inertia of the hull about the rolling axis direction; is the time derivative of the angular velocity vector of the ship's roll; is the motion damping coefficient of the ship's roll; is the angular velocity of the ship's roll; is the restoring moment coefficient of the ship's roll; is the angle of the ship's roll; is the moment exerted externally on the ship in the y direction; is the moment of inertia of the hull about the pitch axis direction; is the time derivative of the angular velocity vector of the ship's pitch; is the damping coefficient of the ship's pitch motion; is the angular velocity of the ship's pitch; is the restoring moment coefficient of the ship's pitch; is the angle of the ship's pitch; is the moment exerted externally on the ship in the z direction; is the moment of inertia of the hull about the yaw axis direction; is the time derivative of the angular velocity vector of the ship's yaw; is the damping coefficient of the ship's yaw motion; is the angular velocity of the ship's yaw; is the restoring moment coefficient of the ship's yaw; is the angle of the ship's yaw; is the force exerted externally on the ship in the transverse direction; m is the mass of the hull; is the second time derivative of sway, representing the first time derivative of the ship's lateral velocity; is the damping coefficient of the ship in lateral motion; is the time derivative of sway, representing the time derivative of the ship's lateral velocity; is the external force acting on the ship longitudinally; is the second time derivative of surge, representing the first time derivative of the ship's longitudinal velocity; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, representing the time derivative of the ship's longitudinal velocity; is the external force acting on the ship vertically; is the second time derivative of heave, representing the first time derivative of the ship's vertical velocity; is the damping coefficient of the ship in vertical motion; is the time derivative of heave, representing the time derivative of the ship's vertical velocity.

[0066] Step 103: Based on the ship motion loss function, use the training ship motion state output data and the training ship motion input data to train the initial ship motion response prediction model, and determine the trained target ship motion response prediction model.

[0067] Specifically, Step 103 may include the following sub-steps S31 - S34:

[0068] Step S31: Input the training ship motion state output data and the training ship motion input data into the ship motion loss function and take the derivative to determine the model gradient;

[0069] Step S32: Use the model gradient to update the model parameters of the initial ship motion response prediction model, determine the intermediate ship motion response prediction model, and count the model update times in real time;

[0070] Step S33: Determine whether the model update times reach the preset training times threshold;

[0071] Step S34: If so, take the intermediate ship motion response prediction model as the trained target ship motion response prediction model.

[0072] The training ship motion input data includes wave parameters, ship speed parameters, and time parameters.

[0073] The training ship motion state output data includes ship surge, ship sway, ship heave, ship roll, ship pitch, and ship yaw.

[0074] It should be noted that after constructing the physical information neural network framework based on the six-degree-of-freedom motion equation of the ship, namely the ship motion loss function and the ship motion response prediction model, the wave conditions are obtained, that is, the training ship motion input data for model training, and the ship motion parameters (that is, the training ship motion state output data for model training) are collected as the input and output of the initial ship motion response prediction model. Based on the ship motion loss function, the initial ship motion response prediction model is trained using the input and output data. The input and output data are collected during the voyage, the data set is updated, and training iterations are performed to obtain a real-time target ship motion response prediction model, so as to predict the surge, sway, heave, roll, pitch, and yaw of the ship.

[0075] Among them, the ship motion loss function includes the MSE of pitch , roll and heave and the residual of the six-degree-of-freedom motion equation; the ship motion loss function is specifically:

[0076] ;

[0077] ;

[0078] ;

[0079] Among them, MSE is the loss value corresponding to the ship motion loss function; Data Loss is the loss value corresponding to the data loss function; Equation Loss is the loss value corresponding to the equation loss function; N is the number of data points selected for training, that is, the number of training ship motion input data; is the weight of the residual of the six-degree-of-freedom motion equation of the ship; M is the number of residual points of the six-degree-of-freedom motion equation of the ship; f is the residual of the pitch equation (that is, ); g is the residual of the roll equation (that is, ); h is the residual of the yaw equation (that is, ); i is the residual of the surge equation (that is, ); j is the residual of the sway equation ( ); k is the residual of the heave equation ( ); H is the wave parameter; u is the ship speed parameter; t is the time parameter; d x is the sway of the ship; d y is the surge of the ship; d z is the heave of the ship; is the pitch of the ship; is the roll of the ship; is the yaw of the ship.

[0080] Optionally, it further includes:

[0081] If the number of model updates does not reach the preset training times threshold, the intermediate ship motion response prediction model is used as the new initial ship motion response prediction model;

[0082] Based on the ship motion loss function, the new initial ship motion response prediction model is used to determine the model gradient according to the training ship motion input data;

[0083] The model parameters of the new initial ship motion response prediction model are updated using the model gradient to determine the intermediate ship motion response prediction model, and the number of model updates is counted in real time until the number of model updates reaches the preset training times threshold;

[0084] The intermediate ship motion response prediction model determined when the number of model updates reaches the preset training times threshold is used as the trained target ship motion response prediction model.

[0085] It should be noted that if the number of model updates does not reach the preset training times threshold, the intermediate ship motion response prediction model is used as the new initial ship motion response prediction model; the training ship motion input data is input into the new initial ship motion response prediction model for prediction to generate new training ship motion state output data, and step S31 is executed until the number of model updates reaches the preset training times threshold; the intermediate ship motion response prediction model determined when the number of model updates reaches the preset training times threshold is used as the trained target ship motion response prediction model.

[0086] To verify the effect of the initial ship motion response prediction model trained based on the constructed ship motion loss function proposed by the present invention, the invention uses CFD software (Computational Fluid Dynamics) to calculate the motion response data of the ship under different sea conditions for the training of the prediction model. Five working conditions of data are calculated under the conditions of a ship length of 1.8 m, a ship speed of 1.455 - 2.182 m / s, and a wave height of 0.05 m.

[0087] Further, load the data of (H, u, t, , ) in a stable period. Select enough data points from the data as training data for prediction in time and prediction of unknown working conditions. The present invention only needs a small amount of data, so there is no need to set batch training. The original data is used for prediction, and the MSE error from the real data is directly calculated. The learning rates during the training process are 1e-3, 5e-4, 1e-4, 1e-5, and 1e-6 respectively, and the corresponding number of iteration steps are 5e4, 5e4, 1e5, 1e5, and 2e5 respectively.

[0088] For the prediction results in terms of time: To compare the effects of the physics-informed neural network (ship motion response prediction model) and the ordinary fully-connected neural network, the data from 10 to 13 s are used for training to predict the pitching trend from 13 to 13.7 s. Among them, the time interval is 0.001 s, so the training data are 3000, and the working conditions of 700 time points are predicted. The weight of the equation loss function in the PINN method is 0.00005, and the weight of the data loss function is 1. The fully-connected neural network without physical constraints only has a data loss function.

[0089] Please refer to Figure 3 , the prediction results of pitching show the performance of different neural network models in the training and prediction stages. The data in the training stage are used to test the effect of the model. The blue curve in the figure represents the prediction result of the ordinary fully-connected neural network (FCNN), the red curve represents the prediction result of the physics-informed neural network (PINN), and the black curve is the true value. It can be clearly seen from the figure that PINN performs better than the ordinary fully-connected neural network in both the training stage and the prediction stage. Especially in the prediction stage (13 - 13.7 s), the prediction result of PINN is very close to the true value, and the accuracy is significantly higher than that of the FCNN model. The predicted value of the FCNN model shows an obvious deviation in this time period, while PINN can better capture the change trend of the true value, proving the improvement effect of physical constraints on the prediction performance of the neural network. This result indicates that the PINN model has stronger generalization ability when dealing with physics-related problems and can make more accurate predictions based on physical laws without more data. Especially in the face of complex unsteady working conditions, PINN shows better performance than traditional neural networks and can effectively improve the prediction accuracy of the model.

[0090] Please refer to Figure 4, which is the MSE of the trim in the prediction stage. The black curve in the figure represents the MSE error (Mean Squared Error) in the prediction stage of the ordinary fully connected neural network (FCNN, Fully Connected Neural Network), and the red curve represents the MSE error in the prediction stage of the physics-informed neural network (PINN, Physics-Informed Neural Network). It can be clearly seen from the figure that as time progresses, the MSE error of the red curve (PINN) always remains within a small range, showing high prediction accuracy and stability. In contrast, the error of the black curve (FCNN) increases rapidly during the prediction process, especially after 13.4 s, the error rises sharply, indicating that when dealing with time-domain prediction, FCNNs lack the guidance of physical constraints, making their prediction results quickly lose accuracy over time. This phenomenon shows that the physics-informed neural network (PINN) can better capture the actual physical laws by introducing physical constraints, resulting in smaller and more stable errors in long-term prediction. In contrast, the ordinary fully connected neural network (FCNN) lacks this physical guidance, so when facing the prediction of time-varying systems, its error gradually increases and its prediction ability is limited. In summary, Figure 3 shows the obvious advantage of the physics-informed neural network (PINN) in time-domain prediction. By introducing physical constraints, PINN can maintain a small prediction error and still make stable predictions over time, while FCNNs quickly lose prediction accuracy. Therefore, PINN has higher stability and accuracy when dealing with time-domain prediction tasks related to physical systems.

[0091] Please refer to Figure 5 , which is the MSE of the trim in the prediction stage. The black curve in the figure represents the MSE error in the prediction stage of the ordinary fully connected neural network (FCNN), and the red curve represents the MSE error in the prediction stage of the physics-informed neural network (PINN). It can be clearly seen from the figure that as time progresses, the MSE error of the red curve (PINN) always remains within a small range, showing high prediction accuracy and stability. In contrast, the error of the black curve (FCNN) increases rapidly during the prediction process, especially after 13.4 s, the error rises sharply, indicating that when dealing with time-domain prediction, FCNNs lack the guidance of physical constraints, making their prediction results quickly lose accuracy over time. This phenomenon shows that the physics-informed neural network (PINN) can better capture the actual physical laws by introducing physical constraints, resulting in smaller and more stable errors in long-term prediction. In contrast, the ordinary fully connected neural network (FCNN) lacks this physical guidance, so when facing the prediction of time-varying systems, its error gradually increases and its prediction ability is limited. In summary, Figure 4It shows the obvious advantages of the Physics-Informed Neural Network (PINN) in time-domain prediction. By introducing physical constraints, PINN can maintain a small prediction error and still make stable predictions over time, while the FCNN quickly loses prediction accuracy. Therefore, PINN has higher stability and accuracy in dealing with time-domain prediction tasks related to physical systems.

[0092] In summary, the Physics-Informed Neural Network (PINN) combined with the six-degree-of-freedom motion equation of a ship has shown significant advantages in predicting the ship's motion response over time. Traditional neural network models usually rely on a large amount of training data and complex parameter optimization. However, when facing the motion prediction of complex systems such as ships, pure data-driven methods often cannot fully capture the complexity of physical laws. By integrating the six-degree-of-freedom motion equation of the ship as a physical constraint into the neural network model (ship motion response prediction model), PINN can effectively combine physical information and data-driven characteristics to provide more accurate and stable prediction results. Especially when facing unknown time and dynamic environmental changes, PINN shows stronger robustness in predicting the ship's motion response through the introduction of physical constraints. Physical constraints can guide the training process of the neural network, thereby reducing the model's sensitivity to noise and improving its generalization ability under different working conditions. In addition, physical constraints help the neural network avoid overfitting problems, making the model more stable and reliable. This research result has important practical significance for the dynamic prediction of ships and other complex systems. By adopting the PINN method, accurate prediction of the ship's motion response can be achieved in actual engineering, helping designers optimize the ship's control and design processes to ensure its safety and efficiency under different environmental conditions. This provides a new and effective prediction tool for the ship industry and other similar fields, having a profound impact on improving the safety and efficiency of ship operation.

[0093] Prediction results under unknown working conditions: Under the condition of a wave height of 0.05 m, working conditions with ship speeds of 1.455 m / s, 1.637 m / s, 1.818 m / s, 2.002 m / s, and 2.182 m / s were calculated. The data from 4 to 6 s of 4 working conditions of 1.455 m / s, 1.637 m / s, 2.002 m / s, and 2.182 m / s were used for training to predict an unknown working condition with a ship speed of 1.818 m / s. The time interval for each data is 0.005 s, and there are 3200 training data in total, predicting the pitch and heave from 6 to 7.5 s.

[0094] For the analysis of the pitch results: Please refer to Figure 6, which shows the predicted results of the trim in the unknown working condition during the 4 - 6 s stage. The black curve in the figure represents the true value, the blue curve represents the predicted results of the ordinary fully - connected neural network (FCNN) during the training stage, and the red curve represents the predicted results of the physics - informed neural network (PINN) during the same stage. It can be seen from the figure that both the red curve (PINN) and the blue curve (FCNN) fluctuate near the black curve, and can better predict the basic trend and range of the trim. The predicted results of both during the training stage are relatively close to the true value, indicating that both of these two neural networks have a certain prediction ability. In particular, both the blue curve (FCNN) and the red curve (PINN) can capture the overall trend of the trim change to a certain extent, although their predicted results are slightly different. Generally speaking, during the training stage, the physics - informed neural network (PINN) and the ordinary fully - connected neural network (FCNN) have similar robustness and accuracy.

[0095] Please refer to Figure 7 , which shows the predicted results of the trim in the unknown working condition during the 6 - 7.5 s stage. It can be clearly seen from the figure that the predicted results of the red curve (PINN) always remain within a small error range and are relatively close to the true value. This indicates that when the physics - informed neural network (PINN) processes the prediction of this stage, it can better capture the actual trim change trend and stably track the true value. In contrast, as time progresses, the error of the blue curve (FCNN) gradually increases and gradually deviates from the true value. This shows that without physical constraints, the ordinary fully - connected neural network (FCNN) is difficult to accurately predict the change of the trim. Especially in long - term prediction, the error gradually increases and the prediction accuracy decreases. This result indicates that the physics - informed neural network (PINN) has better prediction ability compared with the traditional fully - connected neural network (FCNN). Especially when dealing with time - varying systems, the introduction of physical constraints significantly improves the prediction accuracy and stability of the model. PINN can more accurately perform long - term prediction without relying on a large amount of data through the constraint of physical laws.

[0096] Please refer to Figure 8, which is the MSE result of the longitudinal inclination prediction in the unknown working condition during the 4 - 6s stage. In the figure, the black curve represents the MSE error during the prediction stage of the ordinary fully - connected neural network (FCNN), and the red curve represents the MSE error during the prediction stage of the physics - informed neural network (PINN). It can be seen from the figure that the fluctuation range of the red curve is slightly higher than that of the black curve, but the overall error level is close. It can be seen from the figure that the fluctuation range of the MSE error of the red curve (PINN) is slightly higher than that of the black curve (FCNN). This difference may be due to the fact that the unsteady motion response does not fully satisfy the six - degree - of - freedom motion equation throughout the entire time period, resulting in the superposition of the system between the equilibrium and non - equilibrium states. This situation will cause larger error fluctuations in some time periods, especially when the physics - informed neural network (PINN) needs to combine physical constraints in a complex time - varying system, the error may increase. Nevertheless, the overall error level of the red curve is close to that of the black curve, indicating that the PINN with physical constraints has a similar error level to the ordinary fully - connected neural network (FCNN) in long - term prediction. Generally speaking, the physics - informed neural network can enhance the stability and accuracy of prediction through its physical constraints. Although there may be fluctuations in errors at some moments, in the long run, the performance of PINN is still relatively stable and can provide effective prediction results. This result shows that in the face of unsteady working conditions and complex motion responses, although the physics - informed neural network (PINN) may produce larger error fluctuations in some time periods, it can generally better capture the actual physical laws and provide relatively stable and accurate prediction results.

[0097] Please refer to Figure 9 , which is the MSE result of the longitudinal inclination prediction in the unknown working condition during the 6 - 7.5s stage. It can be seen from the figure that the MSE error of the red curve (PINN) always remains at a low level, showing strong stability and high prediction accuracy. While the error of the black curve (FCNN) increases rapidly over time, indicating that the ordinary fully - connected neural network (FCNN) without physical constraints gradually loses accuracy in long - term prediction. Especially when the time period is close to 7s, the error of FCNN rises sharply, reflecting the prediction instability caused by the lack of physical constraints in this model. This result is consistent with the effect shown in the previous prediction results, further verifying the superiority of the physics - informed neural network (PINN) compared with the ordinary fully - connected neural network (FCNN) during the prediction stage. By introducing physical constraints, PINN can maintain a low error level and provide more stable and accurate predictions when facing time - varying systems and complex dynamic responses. This shows that in complex physical problems, physical constraints have a significant promoting effect on the performance of neural network models.

[0098] In summary, the Physics-Informed Neural Network (PINN) has demonstrated significant advantages in predicting the trim of a ship under unknown operating conditions. By integrating the physical constraints of the ship, particularly the six-degree-of-freedom motion equations, into the neural network model, PINN can effectively capture the true laws of ship motion. Under unknown operating conditions, PINN can not only accurately predict the trend and range of ship trim, but also maintain a high degree of consistency between its prediction results and the true values. This method can provide reliable predictions in practical engineering, especially in a dynamically changing environment, where it can maintain high accuracy and stability.

[0099] For the analysis of heave results: Please refer to Figure 10 , which shows the heave prediction results under unknown operating conditions in the 6 - 7.5 s stage. As can be seen from the figure, the prediction results of the red curve (PINN) are significantly closer to the true values. In contrast, the prediction results of the blue curve (FCNN) deviate more from the true values in this stage. Especially in the time period without data influence, PINN shows better performance. Since physical constraints are introduced during the training of PINN, it can better capture the dynamic characteristics of the system, avoiding the deviation caused by the lack of physical model guidance in ordinary fully connected neural networks (FCNN). This result indicates that when facing unknown operating conditions, the Physics-Informed Neural Network (PINN) can provide more accurate predictions. Especially in the time period without data influence, the prediction accuracy of PINN is significantly better than that of traditional fully connected neural networks (FCNN). By introducing physical constraints, PINN can effectively enhance the stability and accuracy of the model, improving the prediction ability for complex dynamic systems.

[0100] In summary, the Physics-Informed Neural Network (PINN) combined with the six-degree-of-freedom motion equations of a ship has demonstrated significant advantages in predicting the motion response of a ship under unknown sea conditions. Traditional fully connected neural networks (FCNN) usually rely on a large amount of training data to make predictions by learning the patterns in the samples. However, when the ship enters unknown sea conditions or complex environments, the prediction ability of FCNNs will significantly decline because they cannot effectively take into account the constraints of physical laws. In contrast, by introducing the six-degree-of-freedom motion equations of the ship as physical constraints, PINN can not only capture complex dynamic characteristics, but also accurately predict the ship motion outside the training time stage. Especially under unseen sea conditions, the prediction effect is better than that of traditional FCNNs.

[0101] The introduction of physical constraints provides the neural network with necessary prior knowledge, enabling the network to effectively avoid overfitting and improve the generalization ability of the model. In this way, PINN has stronger prediction ability and robustness when facing dynamic changes and nonlinear systems. In the motion prediction of ships, especially in complex and unforeseen sea conditions, PINN can effectively reduce the prediction error and improve the accuracy, which makes it have greater potential in practical applications. Therefore, this prediction method based on physics-informed neural network has important practical significance. It can not only enhance the safety and stability of ships in complex sea conditions, but also be applied to fields such as ship design and operation optimization, providing a reliable tool for related industries. By combining physical constraints with data-driven methods, PINN opens up a new direction for the dynamic prediction of ships and other complex systems, with broad application prospects.

[0102] For the heaving MSE results, please refer to Figure 11 , which are the MSE results of heaving prediction in the 6 - 7.5 s stage for longitudinal motion under unknown working conditions. It can be clearly seen from the figure that the error of the physics-informed neural network (PINN) remains at a relatively low level throughout the prediction stage, showing strong stability and prediction accuracy. In contrast, the error of the ordinary fully connected neural network (FCNN) gradually increases with the passage of time, especially after approaching 7 s, the error increases significantly. This indicates that under unknown working conditions, FCNN lacks the guidance of physical constraints, resulting in a decline in prediction performance and the error gradually deviating from the true value. This result further proves that the physics-informed neural network (PINN) has stronger prediction ability when dealing with unknown working conditions. By incorporating the constraints of the physical model, PINN can more accurately adapt to the complex system dynamics, thus maintaining a low error level during long-term prediction. Compared with FCNN, PINN not only has a smaller error during the prediction process, but also can maintain higher stability, which shows the important role of physical constraints in improving prediction accuracy.

[0103] In summary, the physics-informed neural network (PINN) has demonstrated excellent performance in predicting the heaving of ships under unknown working conditions. By embedding the physical laws of ships, especially the six-degree-of-freedom motion equations, into the neural network model, PINN can effectively integrate physical constraints and data-driven learning methods. This enables PINN to not only accurately predict the trend and range of ship heaving, but also maintain a high prediction accuracy when facing different and unknown working conditions. Compared with the true value, PINN can better capture the dynamic changes of ship heaving and provide reliable prediction results.

[0104] In this embodiment, after constructing the physics-informed neural network framework (PINN) based on the six-degree-of-freedom motion equation of the ship, namely the ship motion loss function and the ship motion response prediction model, it is used for the prediction of ship motion responses. The present invention demonstrates the prediction ability in terms of time under a single working condition. 3000 data from 10 to 13 s are used for training, and the motion responses at 700 time points from 13 to 13.7 s are inferred. The results show that the PINN method can infer the longitudinal inclination trend and fluctuation range of the ship with high accuracy in terms of time. Subsequently, 1600 data from 4 to 6 s under 4 working conditions are used for training to predict the motion responses of an unknown working condition from 6 to 7.5 s. The predicted ranges of longitudinal inclination and heave are very close to the true values, indicating that the physically constrained model can effectively reflect the heave change interval of the ship. The PINN method of the present invention can provide a reliable motion response interval. At 6 to 7.5 s, the traditional FCNN method fails, while the PINN method has a reliable prediction effect. Therefore, the physics-informed neural network proposed by the present invention can provide an effective ship motion response trend and interval with less data, providing an efficient prediction means for ship development and performance design.

[0105] As a comparison of technical effects, it can be referred to in combination with the prior art. Ship motion exhibits significant complexity, dynamic changes, and irregularities. When facing unknown environmental threats, sudden disasters may occur, thus posing a serious threat to the lives of crew members and ship assets.

[0106] In the prior art, artificial intelligence models have been widely studied and applied to the prediction of ship motion. However, when dealing with non-stationary and non-linear ship motion sequences, it is difficult to accurately capture the complex feature information therein. Simply relying on integrated models or increasing the complexity of the model to improve accuracy is not sufficient to solve the problem. The lack of physical constraints leads to a high dependence on the size and quality of the data volume.

[0107] In view of the above problems, the present invention proposes a method for training a ship motion response prediction model. By means of numerical simulation and experimental measurement, the motion response data of the ship under various working conditions are obtained, that is, the wave conditions, which are the training ship motion input data for model training. After constructing a physics-informed neural network framework based on the six-degree-of-freedom motion equation of the ship, namely the ship motion loss function and the ship motion response prediction model, the six-degree-of-freedom equation of the ship is coupled into the loss function of the initial ship motion response prediction model. The initial ship motion response prediction model inputs wave parameters, ship speed parameters, and time parameters, and outputs ship motion response parameters (training ship motion state output data), and a large model capable of predicting ship motion response is trained (that is, the trained target ship motion response prediction model). This method improves the prediction accuracy and generalization ability of the neural network by adding physical constraints, and realizes real-time and accurate prediction of ship motion response. The present invention is applicable to ship design, navigation state estimation, path planning, etc. At the same time, the present invention can predict the motion response of a sailing ship under different sail working conditions under preset sea conditions, which is convenient for ship design, operation, and automatic control.

[0108] In an embodiment of the present invention, a method for training a ship motion response prediction model is provided. First, training ship motion input data is obtained, and the training ship motion input data is input into an initial ship motion response prediction model for prediction to generate training ship motion state output data. Then, a ship motion loss function is constructed according to a preset six-degree-of-freedom equation of the ship. Finally, based on the ship motion loss function, the initial ship motion response prediction model is trained using the training ship motion state output data and the training ship motion input data to determine the trained target ship motion response prediction model. Based on the above solution, in the process of constructing a ship motion loss function according to a preset six-degree-of-freedom equation of the ship and training the initial ship motion response prediction model by combining the generated training ship motion state output data and the obtained training ship motion input data to determine the trained target ship motion response prediction model, the present invention couples the preset six-degree-of-freedom equation of the ship into the loss function of the ship motion response prediction model, improves the generalization ability of the ship motion response prediction model by adding physical constraints, reduces the dependence on the size and quality of the data volume, and thus improves the prediction effect of the model.

[0109] For better illustration, refer to Figure 12 , which shows a schematic diagram of the steps for prediction using the trained target ship motion response prediction model provided in the second embodiment of the present invention. This process may include the following steps:

[0110] Step 1201, obtain the motion input data of the ship to be measured.

[0111] Step 1202: Input the input data of the ship motion to be measured into the trained target ship motion response prediction model for prediction, and generate the output data of the target ship motion state.

[0112] The input data of the ship motion to be measured is the input data during actual prediction, including wave parameters, ship speed parameters, and time parameters.

[0113] The output data of the target ship motion state is the output data during actual prediction, including surge, sway, heave, roll, pitch, and yaw of the ship.

[0114] In the embodiment of the present invention, the trained target ship motion response prediction model is used to predict the surge, sway, heave, roll, pitch, and yaw of the ship. The present invention can predict the motion response of a sailing ship under different sail condition conditions under preset sea condition conditions, which is convenient for ship design, operation, and automatic control.

[0115] Please refer to Figure 13 , Figure 13 which is the structural block diagram of a ship motion response prediction model training device provided in Embodiment 3 of the present invention.

[0116] A ship motion response prediction model training device provided by the present invention includes:

[0117] An acquisition module 1301, configured to acquire the training ship motion input data, and input the training ship motion input data into the initial ship motion response prediction model for prediction, and generate the training ship motion state output data;

[0118] A construction module 1302, configured to construct a ship motion loss function according to the preset six-degree-of-freedom equation of the ship;

[0119] A training module 1303, configured to perform model training on the initial ship motion response prediction model based on the ship motion loss function, using the training ship motion state output data and the training ship motion input data, and determine the trained target ship motion response prediction model.

[0120] Further, the training module 1303 is specifically configured to

[0121] Input the training ship motion state output data and the training ship motion input data into the ship motion loss function and take the derivative to determine the model gradient;

[0122] Update the model parameters of the initial ship motion response prediction model using the model gradient, determine the intermediate ship motion response prediction model, and count the number of model updates in real time;

[0123] Determine whether the number of model updates reaches the preset training times threshold;

[0124] If it is achieved, the intermediate ship motion response prediction model is used as the trained target ship motion response prediction model.

[0125] If the number of model updates does not reach the preset training times threshold, the intermediate ship motion response prediction model is used as the new initial ship motion response prediction model;

[0126] Based on the ship motion loss function, the new initial ship motion response prediction model is used to determine the model gradient according to the training ship motion input data.

[0127] The model parameters of the new initial ship motion response prediction model are updated using the model gradient to determine the intermediate ship motion response prediction model, and the number of model updates is counted in real time until the number of model updates reaches the preset training times threshold.

[0128] The intermediate ship motion response prediction model determined when the number of model updates reaches the preset training times threshold is used as the trained target ship motion response prediction model.

[0129] Furthermore, the preset six-degree-of-freedom equation of the ship is as follows:

[0130] ;

[0131] where is the moment acting on the ship in the x direction by an external force; is the moment of inertia of the hull about the rolling axis; is the time derivative of the angular velocity vector of the ship's roll; is the motion damping coefficient of the ship's roll; is the angular velocity of the ship's roll; is the restoring moment coefficient of the ship's roll; is the angle of the ship's roll; is the moment acting on the ship in the y direction by an external force; is the moment of inertia of the hull about the pitch axis; is the time derivative of the angular velocity vector of the ship's pitch; is the damping coefficient of the ship's pitch motion; is the angular velocity of the ship's pitch; is the restoring moment coefficient of the ship's pitch; is the angle of the ship's pitch; is the moment acting on the ship in the z direction by an external force; is the moment of inertia of the hull about the yaw axis; is the time derivative of the angular velocity vector of the ship's yaw; is the damping coefficient of the ship's yaw motion; is the angular velocity of the ship's yaw; is the restoring moment coefficient of the ship's yaw; is the angle of the ship's yaw; is the external force acting on the ship transversely; m is the mass of the hull; is the second time derivative of sway, representing the first time derivative of the ship's transverse velocity; is the damping coefficient of the ship in transverse motion; is the time derivative of sway, representing the time derivative of the ship's transverse velocity; is the external force acting on the ship longitudinally; is the second time derivative of surge, representing the first time derivative of the ship's longitudinal velocity; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, representing the time derivative of the ship's longitudinal velocity; is the external force acting on the ship vertically; is the second time derivative of heave, representing the first time derivative of the ship's vertical velocity; is the damping coefficient of the ship in vertical motion; is the time derivative of heave, representing the time derivative of the ship's vertical velocity.

[0132] Furthermore, the training ship motion input data includes wave parameters, ship speed parameters, and time parameters; the training ship motion state output data includes ship surge, ship sway, ship heave, ship roll, ship pitch, and ship yaw; the ship motion loss function is specifically:

[0133] ;

[0134] ;

[0135] ;

[0136] where MSE is the loss value corresponding to the ship motion loss function; Data Loss is the loss value corresponding to the data loss function; Equation Loss is the loss value corresponding to the equation loss function; N is the number of data points selected for training, that is, the number of training ship motion input data; is the weight of the residual of the ship's six-degree-of-freedom motion equation; M is the number of residual points of the ship's six-degree-of-freedom motion equation; f is the residual of the pitch equation; g is the residual of the roll equation; h is the residual of the yaw equation; i is the residual of the surge equation; j is the residual of the sway equation; k is the residual of the heave equation; H is the wave parameter; u is the ship speed parameter; t is the time parameter; d x is the ship's sway; d y is the ship's surge; d zis the heave motion of the ship; is the pitch motion of the ship; is the roll motion of the ship; is the yaw motion of the ship

[0137] In an alternative device embodiment, it further includes:

[0138] A first module, configured to obtain the input data of the motion of the ship to be measured;

[0139] A second module, configured to input the input data of the motion of the ship to be measured into the trained target ship motion response prediction model for prediction, and generate the output data of the target ship motion state.

[0140] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described device and module can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0141] The embodiment of the present invention also provides a computer device, including a memory and a processor, and a computer program is stored in the memory; when the computer program is executed by the processor, the processor executes the steps of the ship motion response prediction model training method in any of the above embodiments.

[0142] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program / instruction is stored, and when the computer program / instruction is executed by the processor, the steps of the ship motion response prediction model training method in any of the above embodiments are implemented.

[0143] The embodiment of the present invention also provides a computer program product, including a computer program / instruction, and when the computer program / instruction is executed by the processor, the steps of the ship motion response prediction model training method in any of the above embodiments are implemented.

[0144] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. 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, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0145] The unit described as the separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A ship motion response prediction model training method, characterized in that: include: Acquiring training ship motion input data, and inputting the training ship motion input data into an initial ship motion response prediction model for prediction, to generate training ship motion state output data; According to the preset six-degree-of-freedom equation of the ship, the ship motion loss function is constructed; Based on the ship motion loss function, the initial ship motion response prediction model is trained using the training ship motion state output data and the training ship motion input data to determine a trained target ship motion response prediction model.

2. The ship motion response prediction model training method according to claim 1, characterized in that: include: The method of performing model training on the initial ship motion response prediction model based on the ship motion loss function and using the training ship motion state output data and the training ship motion input data to determine a trained target ship motion response prediction model includes: Inputting the training ship motion state output data and the training ship motion input data into the ship motion loss function and taking derivatives to determine the model gradient; The model parameters of the initial ship motion response prediction model are updated using the model gradient, an intermediate ship motion response prediction model is determined, and the number of model updates is counted in real time; Determine whether the model update times reaches a preset training times threshold; If achieved, the intermediate ship motion response prediction model is used as the trained target ship motion response prediction model.

3. The ship motion response prediction model training method according to claim 2 is characterized in that: Also includes: If the model update times do not reach the preset training times threshold, the intermediate ship motion response prediction model is used as a new initial ship motion response prediction model; Based on the ship motion loss function, using the new initial ship motion response prediction model according to the training ship motion input data, determining a model gradient; The model parameters of the new initial ship motion response prediction model are updated by using the model gradient, an intermediate ship motion response prediction model is determined, and the number of model updates is counted in real time until the number of model updates reaches the preset training number threshold; The intermediate ship motion response prediction model determined when the model update times reaches the preset training times threshold is used as the trained target ship motion response prediction model.

4. The ship motion response prediction model training method according to claim 1, characterized in that: The preset six-degree-of-freedom equation of the ship is specifically: ; in, is the external moment acting on the ship in the x direction; is the moment of inertia of the hull around the rolling axis; is the time derivative of the angular velocity vector of the ship's roll; is the motion damping coefficient of the ship's rolling; is the angular velocity of the ship's roll; is the restoring moment coefficient of ship rolling; is the ship's rolling angle; is the external moment acting on the ship in the y direction; is the moment of inertia of the hull around the pitch axis; is the time derivative of the angular velocity vector of the ship's pitch; is the damping coefficient of the ship's pitching motion; is the angular velocity of the ship's pitch; is the restoring moment coefficient of the ship's pitching; is the pitch angle of the ship; is the external moment acting on the ship in the z direction; is the moment of inertia of the hull around the yaw axis; is the time derivative of the angular velocity vector of the ship's yaw; is the damping coefficient of the ship's yaw motion; is the angular velocity of the ship’s yaw; is the restoring moment coefficient of the ship's yaw; is the yaw angle of the ship; is the external force acting on the ship in the transverse direction; m is the mass of the hull; is the time second derivative of sway, which represents the time first derivative of the ship’s lateral velocity; is the damping coefficient of the ship in lateral motion; is the time derivative of sway, which represents the time derivative of the ship’s lateral velocity; is the external force acting in the longitudinal direction of the ship; is the time second derivative of surge, which represents the time first derivative of the longitudinal velocity of the ship; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, which indicates the time derivative of the longitudinal velocity of the ship; is the external force acting on the ship in the vertical direction; is the time second-order derivative of heave, which represents the time first-order derivative of the vertical velocity of the ship; is the damping coefficient of the ship in vertical motion; is the time derivative of heave, which represents the time derivative of the vertical velocity of the ship.

5. The ship motion response prediction model training method according to claim 1, characterized in that: The training ship motion input data includes wave parameters, ship speed parameters and time parameters; the training ship motion state output data includes ship surge, ship sway, ship heave, ship roll, ship pitch and ship yaw; the ship motion loss function is specifically: ; ; ; Among them, MSE is the loss value corresponding to the ship motion loss function; data Loss is the loss value corresponding to the data loss function; equation Loss is the loss value corresponding to the equation loss function; N is the number of data points selected for training, that is, the number of input data for training ship motion; is the weight of the residual of the ship's six-degree-of-freedom motion equation; M is the number of residual points of the ship's six-degree-of-freedom motion equation; f is the residual of the pitch equation; g is the residual of the roll equation; h is the residual of the yaw equation; i is the residual of the pitch equation; j is the residual of the roll equation; k is the residual of the heave equation; H is the wave parameter; u is the ship speed parameter; t is the time parameter; d x The ship is rolling; y For the ship to swing; z For the ship to swing; For the pitch of the ship; The ship rolls; Yawing the ship.

6. The ship motion response prediction model training method according to claim 1, characterized in that: After the step of training the initial ship motion response prediction model based on the ship motion loss function by using the training ship motion state output data and the training ship motion input data to determine the trained target ship motion response prediction model, the method includes: Obtaining input data of the ship motion to be tested; The input data of the ship motion to be measured is input into the trained target ship motion response prediction model for prediction, and the target ship motion state output data is generated.

7. A ship motion response prediction model training device, characterized in that: include: An acquisition module is used to acquire training ship motion input data, and input the training ship motion input data into an initial ship motion response prediction model for prediction, thereby generating training ship motion state output data; A construction module, used for constructing a ship motion loss function according to a preset ship six-degree-of-freedom equation; A training module is used to perform model training on the initial ship motion response prediction model based on the ship motion loss function, using the training ship motion state output data and the training ship motion input data, and determine a trained target ship motion response prediction model.

8. A computer device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the ship motion response prediction model training method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the ship motion response prediction model training method as described in any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, wherein when the program instructions are executed by a computer, the computer executes the ship motion response prediction model training method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Ship body beam load forecasting method based on ship motion monitoring data

    CN117494568A

  • Ship swaying motion forecasting method based on physical information neural network

    CN119623306A