A ship motion response prediction model training method and device

By introducing the six-degree-of-freedom equation to construct the loss function in the ship motion response prediction model, the problem of decreased generalization performance of the existing model under non-steady-state conditions is solved, and higher prediction accuracy and stability are achieved.

CN120145869BActive Publication Date: 2025-09-23SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing ship motion response prediction model training methods rely on data quantity and quality, which leads to decreased model generalization performance and overfitting under non-steady-state navigation conditions, affecting the prediction effect.

Method used

By introducing the six-degree-of-freedom equation of the ship to construct the loss function, the model is trained based on the training data, and physical constraints are embedded to improve the model's generalization ability.

Benefits of technology

It improves the prediction accuracy and stability of the model under non-steady-state conditions, reduces the dependence on data quantity and quality, and enhances the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145869B_ABST
    Figure CN120145869B_ABST
Patent Text Reader

Abstract

The present invention discloses a ship motion response prediction model training method and device, which are used to address the poor prediction results of existing ship motion response prediction model training methods. The method comprises obtaining training ship motion input data, inputting the training ship motion input data into an initial ship motion response prediction model for prediction, and generating training ship motion state output data; constructing a ship motion loss function based on a preset six-degree-of-freedom ship equation; and, based on the ship motion loss function, using the training ship motion state output data and the training ship motion input data to train the initial ship motion response prediction model, thereby determining a trained target ship motion response prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship navigation technology, and in particular to a ship motion response prediction model training method and device. Background Art

[0002] Predicting ship motion response is a key research area in naval architecture and ocean engineering, involving the interdisciplinary application of wave theory, ship hydrodynamics, numerical simulation techniques, and experimental methods. Wave theory is the foundation of ship motion prediction. Linear wave theory is used to describe ship motion response in regular waves, while nonlinear wave theory is applicable to analyzing complex motions in irregular waves or extreme sea conditions.

[0003] Ship motion exhibits significant complexity, dynamics, and irregularities. This can lead to unexpected disasters, especially when faced with unknown environmental threats, posing serious threats to crew safety and ship assets. With the introduction of artificial intelligence and big data technologies, ship motion response forecasting is becoming increasingly intelligent. Machine learning algorithms, combined with the analysis and modeling of historical data, are further improving forecast accuracy and adaptability.

[0004] Existing methods for training ship motion response prediction models primarily employ data-driven machine learning approaches. These techniques involve collecting historical ship motion data and constructing a nonlinear mapping relationship between the ship motion response and input variables using algorithms such as neural networks, support vector machines, or random forests. However, these methods are overly dependent on the amount and quality of data. When the number of training samples is limited or measurement errors exist, the models are prone to poor generalization performance and overfitting. This is particularly true for motion response prediction under unsteady navigation conditions, where data noise and missing features can severely impact the model's extrapolation capabilities, resulting in poor prediction results. Summary of the Invention

[0005] The present invention provides a ship motion response prediction model training method and device, which are used to solve the problem that the existing ship motion response prediction model training method leads to poor prediction effect of the model.

[0006] A first aspect of the present invention provides a ship motion response prediction model training method, comprising:

[0007] 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;

[0008] According to the preset six-degree-of-freedom equation of the ship, the ship motion loss function is constructed;

[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 a trained target ship motion response prediction model.

[0010] Optionally, the 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:

[0011] 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 a model gradient;

[0012] Using 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 number of model updates in real time;

[0013] Determine whether the model update times reaches a preset training times threshold;

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

[0015] Optionally, it also includes:

[0016] 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;

[0017] 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;

[0018] Using a model gradient to update the model parameters of the new initial ship motion response prediction model, determine an intermediate ship motion response prediction model, and count the number of model updates in real time until the number of model updates reaches the preset training number threshold;

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

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

[0021] ;

[0022] 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 yawing 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 ship’s longitudinal velocity; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, which represents the time derivative of the ship’s longitudinal velocity; is the external force acting on the ship in the vertical direction; is the time second derivative of heave, which represents the time first 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.

[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 ship surge, ship sway, ship heave, ship roll, ship pitch and ship yaw; the ship motion loss function is specifically:

[0024] ;

[0025] ;

[0026] ;

[0027] 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 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 The ship is rolling sideways; d y For the ship to swing; d z For the ship to swing; For the pitch of the ship; The ship rolls; Yawing of the ship.

[0028] Optionally, after the step of performing 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 to determine a trained target ship motion response prediction model, the method further includes:

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

[0030] 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.

[0031] A second aspect of the present invention provides a ship motion response prediction model training device, comprising:

[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, thereby generating training ship motion state output data;

[0033] A construction module, used for constructing a ship motion loss function based on a preset six-degree-of-freedom equation of the ship;

[0034] 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.

[0035] A third aspect of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, 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 the above items.

[0036] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the ship motion response prediction model training method as described in any one of the above items.

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

[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, 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 ship six-degree-of-freedom equation; 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 a trained target ship motion response prediction model; based on the above scheme, a ship motion loss function is constructed according to a preset ship six-degree-of-freedom equation, and the initial ship motion response prediction model is trained in combination with the generated training ship motion state output data and the obtained training ship motion input data to determine a process of determining a trained target ship motion response prediction model. The present invention couples the preset ship six-degree-of-freedom equation to 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, and thus improves the prediction effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A flowchart of the steps of a ship motion response prediction model training method provided in Example 1 of the present invention;

[0042] Figure 2 A schematic diagram of the network framework of the ship motion response prediction model provided in the first embodiment of the present invention;

[0043] Figure 3 A schematic diagram showing a comparison of the pitch prediction results provided in the first embodiment of the present invention;

[0044] Figure 4 A schematic diagram of the pitch MSE error during the training phase provided by the first embodiment of the present invention;

[0045] Figure 5 A schematic diagram of the MSE error of the trim in the prediction phase provided by the first embodiment of the present invention;

[0046] Figure 6 A schematic diagram of the prediction results of the 4-6s stage pitch provided in the first embodiment of the present invention;

[0047] Figure 7 This is a schematic diagram of the prediction results of the 6-7.5s stage pitch provided in the first embodiment of the present invention;

[0048] Figure 8 Schematic diagram of the MSE result of the 4-6s pitch provided in Example 1 of the present invention;

[0049] Figure 9 This is a schematic diagram of the MSE results of the 6-7.5s trim phase provided by the first embodiment of the present invention;

[0050] Figure 10 A schematic diagram of the prediction results of heave during the 6-7.5s period provided in the first embodiment of the present invention;

[0051] Figure 11 Schematic diagram of the MSE results of heave during the 6-7.5s period provided in Example 1 of the present invention;

[0052] Figure 12 A schematic diagram of the steps for performing prediction using a trained target ship motion response prediction model provided in the second embodiment of the present invention;

[0053] Figure 13 This is a structural block diagram of a ship motion response prediction model training device provided in Example 3 of the present invention. DETAILED DESCRIPTION

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

[0055] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0056] See also Figure 1 , Figure 1 This is a flowchart of the steps of a ship motion response prediction model training method provided in Example 1 of the present invention.

[0057] The present invention provides a ship motion response prediction model training method, comprising:

[0058] Step 101: 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.

[0059] Please note that Figure 2 The ship motion response prediction model uses three inputs (i.e., ship motion input data). The model is a pre-set three-layer fully connected neural network with 80 neurons in each layer, and outputs six parameters (i.e., ship motion state output data). The three inputs include three input variables (H, u, t) of wave parameters (wave height / wavelength), ship speed parameters u, and time parameters t. The six outputs are ship pitch, ship roll, ship yaw, ship surge d y , the ship swings x , the ship swings z .

[0060] in, Figure 2 in is the symbol of the norm, used to calculate the error; u data Represents the true value used to train the neural network; u PINN represents the predicted value obtained by the neural network; I is the ship's inertia matrix, 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 shape of the hull, and other factors. K is the stiffness matrix, which represents the influence of restoring moments on the rotational motion of the ship, for example, the restoring moments generated by the deviation of the ship from the equilibrium position. M is the external excitation torque vector, which may include the moments under the action of wind, waves, and other external forces. Here, and They represent the derivative (acceleration) of the angular velocity vector and the angular velocity vector itself, respectively, while M represents the external torque acting on the ship; m represents mass, which is the mass of the object; u is the displacement of the object in a certain direction; is the second-order derivative of displacement u with respect to time, representing acceleration; C lin is the damping coefficient, which represents the effect of the damping force on the motion; It is the first derivative of displacement u with respect to time and represents velocity.

[0061] It is worth mentioning that the present invention embeds physical equations in the loss function of the ship motion response prediction model. The embedded physical equations will be followed during the iteration of ship motion response prediction model training, and the final output result 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 principles of computational fluid dynamics are combined with the six-degree-of-freedom motion equation of the ship to calculate the forces F in the x, y and z directions of the ship under known wave parameters H, ship speed parameters u (m / s) and time parameters t (s). x (N), F y (N) and F z (N); velocity u (m) and acceleration u in the x direction t (m / s 2 ); velocity v (m) and acceleration v in the y direction t (m / s 2 ); velocity w (m) and acceleration w in the z direction t (m / s 2 ); angular velocity in the x direction (rad / s) and angular acceleration (rad / s 2 ); angular velocity in the y direction (rad / s) and angular acceleration (rad / s 2 ); Angular velocity in the z direction (rad / s) and angular acceleration (rad / s 2 ); The torque 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). Wherein, H in the present invention is a (wave height / wavelength) constant, and may also be other parameters representing wave characteristics.

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

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

[0064] ;

[0065] 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 yawing 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 ship’s longitudinal velocity; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, which represents the time derivative of the ship’s longitudinal velocity; is the external force acting on the ship in the vertical direction; is the time second derivative of heave, which represents the time first 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.

[0066] Step 103: 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.

[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 derive the derivative to determine the model gradient;

[0069] Step S32: using the model gradient to update the model parameters of the initial ship motion response prediction model, determining the intermediate ship motion response prediction model, and counting the number of model updates in real time;

[0070] Step S33: determine whether the number of model updates reaches a preset training number threshold;

[0071] Step S34: If the target ship motion response prediction model is reached, the intermediate ship motion response prediction model is used as the trained target ship motion response prediction model.

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

[0073] The output data of the training ship motion state include 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 ship's six-degree-of-freedom motion equation, that is, the ship motion loss function and the ship motion response prediction model, the wave conditions, that is, the training ship motion input data for model training, are obtained, 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 input and output data are used to train the initial ship motion response prediction model, the input and output data are collected during navigation, the data set is updated, and the training is iterated to obtain a real-time target ship motion response prediction model, thereby predicting ship surge, ship sway, ship heave, ship roll, ship pitch, and ship yaw.

[0075] Among them, the ship motion loss function includes pitch , roll and Chuidang The MSE 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 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 pitch equation (i.e. ) residual; g is the roll equation (i.e. ) residual; h is the yaw equation (i.e. ) residual; i is the longitudinal equation (i.e. ) residual; j is the sway equation ( ) residual; k is the heave equation ( ) residual; H is the wave parameter; u is the ship speed parameter; t is the time parameter; d x The ship is rolling sideways; d y For the ship to swing; d z For the ship to swing; For the pitch of the ship; The ship rolls; Yawing of the ship.

[0080] Optionally, it also includes:

[0081] If the model update times do 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, a 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 number threshold;

[0084] The intermediate ship motion response prediction model determined when the number of model updates reaches a preset training number 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 number threshold, the intermediate ship motion response prediction model will be used as the new initial ship motion response prediction model; the training ship motion input data will be input into the new initial ship motion response prediction model for prediction, and new training ship motion state output data will be generated, and step S31 will be jumped to execute until the number of model updates reaches the preset training number threshold; the intermediate ship motion response prediction model determined when the number of model updates reaches the preset training number threshold will be used as the trained target ship motion response prediction model.

[0086] To verify the effectiveness of the proposed method for training an initial ship motion response prediction model based on a constructed ship motion loss function, the researchers used CFD (Computational Fluid Dynamics) software to calculate ship motion response data under different sea conditions. Data was calculated for five conditions: a ship with a length of 1.8 m, a speed of 1.455–2.182 m / s, and a wave height of 0.05 m.

[0087] Furthermore, the loading stability period (H, u, t, , ) data, selecting sufficient data points as training data for time-based prediction and prediction of unknown conditions. This method requires only a small amount of data, eliminating the need for batch training. Prediction is performed using the original data, directly calculating the mean square error (MSE) with the real data. During training, learning rates were set at 1e-3, 5e-4, 1e-4, 1e-5, and 1e-6, corresponding to iterations of 5e4, 5e4, 1e5, 1e5, and 2e5, respectively.

[0088] Regarding temporal prediction results: To compare the performance of the physical information neural network (ship motion response prediction model) with a conventional fully connected neural network, training was performed using data from 10 to 13 seconds, predicting the trim trend from 13 to 13.7 seconds. The time interval was 0.001 seconds, resulting in 3000 training data points and predictions for 700 time points. The equation loss function in the PINN method had a weight of 0.00005, and the data loss function had a weight of 1. A fully connected neural network without physical constraints only has a data loss function.

[0089] See also Figure 3 The pitch prediction results show the performance of different neural network models during the training and prediction phases. Data from the training phase was used to test the model's effectiveness. The blue curve in the figure represents the prediction results of a conventional fully connected neural network (FCNN), the red curve represents the prediction results of a physical information neural network (PINN), and the black curve represents the ground truth. The figure clearly shows that the PINN outperforms the conventional fully connected neural network in both the training and prediction phases. In particular, during the prediction phase (13–13.7 seconds), the PINN predictions are very close to the ground truth, with significantly higher accuracy than the FCNN model. The FCNN model's predictions show significant deviations during this period, while the PINN model better captures the changing trends of the ground truth, demonstrating the role of physical constraints in improving the prediction performance of the neural network. This result demonstrates that the PINN model has stronger generalization capabilities when dealing with physics-related problems and can provide more accurate predictions based on physical laws even when more data is scarce. In particular, when faced with complex unsteady conditions, the PINN model demonstrates superior performance compared to traditional neural networks, effectively improving the model's prediction accuracy.

[0090] See also Figure 4, is the MSE of the pitch in the prediction stage. The black curve in the figure represents the MSE error (Mean Squared Error) of the prediction stage of the ordinary fully connected neural network (FCNN), and the red curve represents the MSE error of the prediction stage of the physical information 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 in 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.4s, the error rises sharply, indicating that FCNN lacks the guidance of physical constraints when processing time domain predictions, causing its prediction results to lose accuracy rapidly over time. This phenomenon shows that the physical information neural network (PINN) can better capture the actual physical laws by introducing physical constraints, thereby making the error smaller and more stable in long-term predictions. 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 This study demonstrates the clear advantages of a physical-informed neural network (PINN) for time-domain prediction. By incorporating physical constraints, PINN is able to maintain a small prediction error and maintain stable predictions over time, whereas FCNNs rapidly lose accuracy. Consequently, PINN offers superior stability and accuracy when handling time-domain prediction tasks related to physical systems.

[0091] See also Figure 5 , is the MSE of the pitch in the prediction stage. The black curve in the figure represents the MSE error of the ordinary fully connected neural network (FCNN) in the prediction stage, and the red curve represents the MSE error of the physical information neural network (PINN) in the prediction stage. It can be clearly seen from the figure that as time goes on, the MSE error of the red curve (PINN) always remains in 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.4s, the error rises sharply, indicating that FCNN lacks the guidance of physical constraints when processing time domain predictions, causing its prediction results to lose accuracy rapidly over time. This phenomenon shows that the physical information neural network (PINN) can better capture the actual physical laws by introducing physical constraints, so that the error is smaller and more stable in long-term predictions. In contrast, the ordinary fully connected neural network (FCNN) lacks this physical guidance, so when faced with the prediction of time-varying systems, its error gradually increases and its prediction ability is limited. In summary, Figure 4This study demonstrates the clear advantages of a physical-informed neural network (PINN) for time-domain prediction. By incorporating physical constraints, PINN is able to maintain a small prediction error and maintain stable predictions over time, whereas FCNNs rapidly lose accuracy. Consequently, PINN offers superior stability and accuracy when handling time-domain prediction tasks related to physical systems.

[0092] In summary, a physical-informed neural network (PINN) model that incorporates the ship's six-degree-of-freedom equations of motion demonstrates significant advantages in predicting the temporal motion response of ships. Traditional neural network models typically rely on extensive training data and complex parameter optimization. However, when predicting the motion of complex systems such as ships, purely data-driven approaches often fail to fully capture the complexity of physical laws. By incorporating the ship's six-degree-of-freedom equations of motion as physical constraints into a neural network model (a ship motion response prediction model), PINN effectively combines physical information and data-driven features, providing more accurate and stable prediction results. The introduction of physical constraints in PINN makes the neural network more robust in predicting ship motion responses, especially when faced with unknown temporal and dynamic environmental changes. Physical constraints guide the neural network's training process, reducing the model's sensitivity to noise and improving its generalization ability under diverse operating conditions. Furthermore, physical constraints help the neural network avoid overfitting, making the model more stable and reliable. These findings have important practical implications for the dynamic prediction of ships and other complex systems. By employing the PINN method, accurate predictions of ship motion responses can be achieved in practical engineering applications, helping designers optimize ship control and design processes, ensuring safety and efficiency under varying environmental conditions. This provides a new and effective prediction tool for the shipbuilding industry and other similar fields, with far-reaching implications for improving the safety and efficiency of ship operations.

[0093] Prediction results for unknown conditions: With a wave height of 0.05 m, the system calculated ship speeds of 1.455 m / s, 1.637 m / s, 1.818 m / s, 2.002 m / s, and 2.182 m / s. Training was performed using data from four conditions, each with a speed of 4 to 6 seconds. The system then predicted an unknown condition, with a ship speed of 1.818 m / s. The time interval between each data point was 0.005 seconds, resulting in a total of 3200 training data points. The system predicted pitch and heave over a period of 6 to 7.5 seconds.

[0094] For analysis of trim results: see Figure 6Figure 1 shows the prediction results for pitch under unknown conditions during the 4-6 s period. The black curve represents the ground truth, the blue curve represents the prediction results of a conventional fully connected neural network (FCNN) during the training phase, and the red curve represents the prediction results of a physical information neural network (PINN) during the same phase. As can be seen from the figure, both the red curve (PINN) and the blue curve (FCNN) fluctuate near the black curve, effectively predicting the basic trend and range of pitch. The predictions of both during the training phase are relatively close to the ground truth, indicating that both neural networks have some predictive power. In particular, both the blue curve (FCNN) and the red curve (PINN) are able to capture the overall trend of pitch changes to a certain extent, although their predictions differ slightly. Overall, during the training phase, the physical information neural network (PINN) and the conventional fully connected neural network (FCNN) exhibit similar robustness and accuracy.

[0095] See also Figure 7 The figure shows the prediction results for pitch under unknown conditions from 6 to 7.5 seconds. The figure clearly shows that the predictions of the red curve (PINN) consistently remain within a small error range and relatively close to the true value. This demonstrates that the physics-informed neural network (PINN) is able to better capture the actual pitch trend and stably track the true value during this period. In contrast, the error of the blue curve (FCNN) increases over time and gradually deviates from the true value. This indicates that conventional fully connected neural networks (FCNNs) struggle to accurately predict pitch changes without physical constraints, especially in long-term predictions, where the error increases and the prediction accuracy decreases. This result demonstrates that the physics-informed neural network (PINN) has superior prediction capabilities compared to conventional fully connected neural networks (FCNNs), especially when dealing with time-varying systems. The introduction of physical constraints significantly improves the model's prediction accuracy and stability. PINNs can more accurately perform long-term predictions by leveraging the constraints of physical laws without relying on large amounts of data.

[0096] See also Figure 8Figure 2 shows the MSE results for longitudinal pitch prediction under unknown conditions during the 4-6 s period. The black curve represents the MSE error during the prediction phase using a conventional fully connected neural network (FCNN), while the red curve represents the MSE error during the prediction phase using a physical information neural network (PINN). The figure shows that the red curve has a slightly higher fluctuation range than the black curve, but the overall error levels are similar. The figure also shows that the MSE error fluctuation range for the red curve (PINN) is slightly higher than that for the black curve (FCNN). This difference may be due to the unsteady motion response not fully satisfying the six-degree-of-freedom equations of motion throughout the entire time period, resulting in a superposition of equilibrium and non-equilibrium states. This situation can lead to large error fluctuations during certain periods, especially when the physical information neural network (PINN) requires the incorporation of physical constraints in complex time-varying systems, where 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 achieves similar error levels as the conventional fully connected neural network (FCNN) in long-term predictions. Overall, the physical information neural network (PINN) enhances the stability and accuracy of predictions through its physical constraints. Although errors may fluctuate at certain moments, in the long run, the performance of the PINN remains relatively stable and provides effective predictions. This result demonstrates that when faced with unsteady conditions and complex motion responses, while the physical information neural network (PINN) may produce large error fluctuations at certain times, it can generally better capture the actual physical laws and provide relatively stable and accurate predictions.

[0097] See also Figure 9 , which shows the MSE results for pitch prediction under unknown conditions during the 6-7.5s period. As can be seen from the figure, the MSE error of the red curve (PINN) remains consistently low, demonstrating strong stability and high prediction accuracy. In contrast, the error of the black curve (FCNN) increases rapidly over time, indicating that the conventional fully connected neural network (FCNN) without physical constraints gradually loses accuracy in long-term predictions. In particular, the FCNN error rises sharply near the 7s time period, reflecting the prediction instability caused by the lack of physical constraints. This result is consistent with the results shown in the previous prediction results and further validates the superiority of the physical information neural network (PINN) over the conventional fully connected neural network (FCNN) in the prediction stage. By introducing physical constraints, the PINN is able to maintain a low error level when dealing with time-varying systems and complex dynamic responses, providing more stable and accurate predictions. This demonstrates that physical constraints significantly improve the performance of neural network models in complex physical problems.

[0098] In summary, the Physical Information Neural Network (PINN) demonstrates significant advantages in predicting ship trim under unknown operating conditions. By incorporating the ship's physical constraints, particularly the six-degree-of-freedom equations of motion, into the neural network model, the PINN effectively captures the true laws of ship motion. Under unknown operating conditions, the PINN not only accurately predicts the trend and range of the ship's trim, but also maintains a high degree of consistency with the true value. This approach can provide reliable predictions in practical engineering applications, especially in dynamically changing environments, with high accuracy and stability.

[0099] For heave results analysis: see Figure 10 , showing the heave prediction results under unknown operating conditions from 6 to 7.5 seconds. As can be seen from the figure, the prediction results of the red curve (PINN) are significantly closer to the true value. In comparison, the prediction results of the blue curve (FCNN) deviate significantly from the true value during this period. PINN demonstrates particularly superior performance during periods without data influence. Because PINN introduces physical constraints during training, it can better capture the dynamic characteristics of the system and avoid the biases that occur in conventional fully connected neural networks (FCNNs) due to the lack of physical model guidance. This result demonstrates that the physical information neural network (PINN) can provide more accurate predictions when faced with unknown operating conditions, especially during periods without data influence, where PINN's prediction accuracy significantly outperforms traditional fully connected neural networks (FCNNs). By introducing physical constraints, PINN can effectively enhance the stability and accuracy of the model, improving its predictive capabilities for complex dynamic systems.

[0100] In summary, the Physical Information Neural Network (PINN) that incorporates the ship's six-degree-of-freedom equations of motion demonstrates significant advantages in predicting a ship's motion response in unknown sea conditions. Traditional fully connected neural networks (FCNNs) typically rely on large amounts of training data, learning patterns from samples to make predictions. However, when a ship enters unknown sea conditions or complex environments, the predictive power of FCNNs declines significantly because they cannot effectively account for the constraints of physical laws. In contrast, by introducing the ship's six-degree-of-freedom equations of motion as physical constraints, PINNs not only capture complex dynamic characteristics but also accurately predict ship motion beyond the training phase. This performance is particularly superior to traditional FCNNs in unseen sea conditions.

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

[0102] For heave MSE results, see Figure 11 , which shows the MSE results for the longitudinal heave prediction under unknown conditions from 6 to 7.5 seconds. The figure clearly shows that the error of the physical information neural network (PINN) remains low throughout the prediction phase, demonstrating strong stability and prediction accuracy. In contrast, the error of the conventional fully connected neural network (FCNN) gradually increases over time, especially after 7 seconds, when the error increases significantly. This indicates that under unknown conditions, the FCNN lacks the guidance of physical constraints, resulting in degraded prediction performance and a gradual deviation of the error from the true value. This result further demonstrates the enhanced predictive capability of the physical information neural network (PINN) when handling unknown conditions. By incorporating the constraints of the physical model, the PINN can more accurately adapt to complex system dynamics, thereby maintaining a low error level over long prediction periods. Compared with the FCNN, the PINN not only achieves lower error but also maintains higher stability during the prediction process, demonstrating the important role of physical constraints in improving prediction accuracy.

[0103] In summary, the Physical Information Neural Network (PINN) demonstrates outstanding performance in predicting ship heave under unknown operating conditions. By embedding the physical laws of the ship, particularly the six-degree-of-freedom equations of motion, into the neural network model, PINN effectively integrates physical constraints with data-driven learning methods. This enables PINN to not only accurately predict the trend and range of ship heave, but also maintain high prediction accuracy under diverse and unknown operating conditions. Compared with the actual values, PINN can better capture the dynamic changes in ship heave, providing reliable prediction results.

[0104] In this example, the present invention constructs a physical information neural network (PINN) framework based on the ship's six-degree-of-freedom equations of motion, including a ship motion loss function and a ship motion response prediction model, for ship motion prediction. The present invention demonstrates temporal prediction capabilities under a single operating condition. Using 3,000 data points spanning 10 to 13 seconds for training, the PINN method infers motion responses at 700 time points between 13 and 13.7 seconds. The results show that the PINN method can accurately infer the ship's trim trend and fluctuation range. Subsequently, using 1,600 data points spanning 4 to 6 seconds for training from four operating conditions, the PINN method predicts the motion response of an unknown operating condition spanning 6 to 7.5 seconds. The predicted trim and heave ranges closely match the true values, demonstrating that the physical constraint model effectively reflects the ship's heave variation range. The PINN method provides a reliable motion response range. At 6 to 7.5 seconds, the traditional FCNN method fails, while the PINN method provides reliable predictions. Therefore, the proposed physical information neural network can provide effective ship motion response trends and ranges using relatively little data, providing an efficient prediction tool for ship development and performance design.

[0105] As a comparison of technical effects, we can refer to existing technologies. Ship motion is significantly complex, dynamic, and irregular. When faced with unknown environmental threats, sudden disasters may occur, posing a serious threat to the safety of crew members and ship assets.

[0106] Existing artificial intelligence models have been widely studied and applied to ship motion prediction. However, they struggle to accurately capture the complex characteristics of non-stationary and nonlinear ship motion sequences. Simply relying on integrated models or increasing model complexity to improve accuracy is insufficient, as the lack of physical constraints makes them highly dependent on the amount and quality of data.

[0107] To address the above-mentioned issues, the present invention proposes a method for training a ship motion response prediction model. This method uses numerical simulation and experimental measurement to obtain ship motion response data under various operating conditions, specifically wave conditions, which serve as training ship motion input data for model training. A physical information neural network framework based on the ship's six-degree-of-freedom equations of motion is constructed, including a ship motion loss function and a ship motion response prediction model. The six-degree-of-freedom equations are then coupled to 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). This training yields a large model capable of predicting ship motion responses (i.e., the trained target ship motion response prediction model). This method improves the prediction accuracy and generalization capability of the neural network by adding physical constraints, enabling real-time and accurate prediction of ship motion responses. The present invention is applicable to ship design, navigation state estimation, and path planning. In practice, the present invention can predict the motion response of a sailboat under different sail operating conditions under preset sea conditions, facilitating ship design, maneuvering, and automatic control.

[0108] In an embodiment of the present invention, the present invention provides a ship motion response prediction model training method, first, obtaining training ship motion input data, and inputting the training ship motion input data into the initial ship motion response prediction model for prediction, generating training ship motion state output data; then, constructing a ship motion loss function according to a preset ship six-degree-of-freedom equation; 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 scheme, according to the preset ship six-degree-of-freedom equation, a ship motion loss function is constructed, and the initial ship motion response prediction model is trained in combination with 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. In the process, the present invention couples the preset ship six-degree-of-freedom equation to 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, and thus improves the prediction effect of the model.

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

[0110] Step 1201: Obtain input data of the ship motion to be measured.

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

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

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

[0114] In this embodiment, a trained target ship motion response prediction model is used to predict ship surge, sway, heave, roll, pitch, and yaw. This method can predict the motion response of a sailboat under different sail operating conditions under preset sea conditions, facilitating ship design, maneuvering, and automated control.

[0115] See also Figure 13 , Figure 13 This is a structural block diagram of a ship motion response prediction model training device provided in Example 3 of the present invention.

[0116] The present invention provides a ship motion response prediction model training device, comprising:

[0117] An acquisition module 1301 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;

[0118] A construction module 1302 is used to construct a ship motion loss function based on a preset six-degree-of-freedom equation of the ship;

[0119] The training module 1303 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 the trained target ship motion response prediction model.

[0120] Furthermore, the training module 1303 is specifically used 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] The model gradient is used to update the model parameters of the initial ship motion response prediction model, 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 number 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 model update times do 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, a 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 number threshold;

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

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

[0130] ;

[0131] 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 yawing 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 ship’s longitudinal velocity; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, which represents the time derivative of the ship’s longitudinal velocity; is the external force acting on the ship in the vertical direction; is the time second derivative of heave, which represents the time first 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.

[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] 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 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 The ship is rolling sideways; d y For the ship to swing; d zFor the ship to swing; For the pitch of the ship; The ship rolls; Yawing the ship

[0137] In an optional embodiment of the device, the device further comprises:

[0138] The first module is used to obtain the input data of the ship motion to be measured;

[0139] The second module is used to 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 target ship motion state output data.

[0140] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0141] An embodiment of the present invention also provides a computer device, including a memory and a processor, wherein 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 as described in any of the above embodiments.

[0142] An embodiment of the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of the ship motion response prediction model training method as described in any of the above embodiments are implemented.

[0143] An embodiment of the present invention further provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the ship motion response prediction model training method of any of the above embodiments.

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

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

[0146] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the 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 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; 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; is the residual of the longitudinal wave equation; j is the residual of the transverse wave equation; k is the residual of the heave wave equation; H is the wave parameter; u is the ship speed parameter; t is the time parameter; d x The ship is rolling sideways; d y For the ship to swing; d z For the ship to swing; For the pitch of the ship; The ship rolls; Yawing of the ship.

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 a model gradient; Using 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 number of model updates in real time; Determine whether the model update times reaches a training times threshold; If it is 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, characterized in that: Also includes: If the model update times do not reach the 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; Using a model gradient to update the model parameters of the new initial ship motion response prediction model, determine an intermediate ship motion response prediction model, and count the number of model updates in real time until the number of model updates reaches the training number threshold; The intermediate ship motion response prediction model determined when the number of model updates reaches the training number 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 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 the ship's 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 yawing 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 ship’s longitudinal velocity; is the damping coefficient of the ship in longitudinal motion; is the time derivative of surge, which represents the time derivative of the ship’s longitudinal velocity; is the external force acting on the ship in the vertical direction; is the time second derivative of heave, which represents the time first 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: After the step of 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, the method includes: Obtaining input data of the ship motion to be measured; 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.

6. A ship motion response prediction model training device, applied to the ship motion response prediction model training method according to claim 1, characterized in that: include: 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, thereby generating training ship motion state output data; A construction module, used for constructing a ship motion loss function based on the ship's 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.

7. A computer device, characterized in that: It includes 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 according to any one of claims 1 to 5.

8. 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 according to any one of claims 1 to 5 is implemented.

9. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer is caused to execute the ship motion response prediction model training method according to any one of claims 1 to 5.

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