Dynamic prediction method for motion of sailboat based on grey wolf optimization and kernel extreme learning machine

Through the three-degree of freedom motion prediction method based on gray wolf optimization and nuclear extreme learning machine, combined with sail force decomposition and ship motion model, high-precision dynamic prediction of sail assisted ships under different wind conditions is achieved, solving the nonlinear and coupling effect problems of sailing ship motion prediction in traditional methods, and improving prediction accuracy and timeliness.

CN120408550APending Publication Date: 2025-08-01DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510350935.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the ship's motion state in sail-assisted ships, especially under strong wind conditions. Traditional methods cannot effectively consider the nonlinear and coupling effects of sail thrust and sail lateral forces on ship movement. The data-driven model has high computational complexity and low accuracy, so it is impossible to deal with changes in the navigation environment in real time.

Method used

The three-degree of freedom motion prediction method based on gray wolf optimization and nuclear extreme learning machine is adopted. By establishing a sailing boat motion model, combining sailing force decomposition and ship motion model, the hyperparameters of the nuclear extreme learning machine are optimized using the gray wolf optimization algorithm, and the model is adaptively updated through the sliding time window to achieve dynamic modeling and prediction.

Benefits of technology

It improves the prediction accuracy and timeliness of sail-aising ship maneuvering motion state, can accurately predict ship motion under different wind conditions, simplifies the model solution process, improves the generalization ability and stability of the model, and adapts to real-time changes during ship navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408550A_ABST
    Figure CN120408550A_ABST
Patent Text Reader

Abstract

The invention discloses a sailboat motion dynamic prediction method based on grey wolf optimization and a kernel extreme learning machine. The method comprises the following steps: establishing a three-degree-of-freedom motion prediction model based on a grey wolf optimization algorithm and a kernel extreme learning machine algorithm; determining input characteristics and three-degree-of-freedom output response of the three-degree-of-freedom motion prediction model, and dividing the model into a training set and a verification set according to a proportion; performing preliminary training on the three-degree-of-freedom motion prediction model based on the training data set to obtain a preliminarily trained three-degree-of-freedom motion prediction model; testing the preliminarily trained three-degree-of-freedom motion prediction on the verification set, and iteratively searching a parameter position for reducing the fitting fitness of the three-degree-of-freedom motion model by adopting a grey wolf optimization algorithm to obtain a trained three-degree-of-freedom motion prediction model; and based on the trained three-degree-of-freedom motion prediction model, dynamic prediction of ship control motion is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ships, and relates to a dynamic prediction method for the movement of a sailboat based on grey wolf optimization and kernel extreme learning machine. Background Technique

[0002] Accurately predicting the ship motion state is crucial for ship navigation control and energy efficiency optimization research. When modeling the motion of a new ship equipped with propulsion devices such as sails, it is necessary to consider the influence of sail thrust and sail side force on the ship motion state, and combine the ship propeller speed and steering angle to accurately predict the motion performance of the sailboat under different maneuvering conditions. This can help guide ship staff to perform reasonable sail control according to the change of ship motion performance.

[0003] At present, most of the research on ship motion focuses on ships using traditional propulsion methods, while ignoring the unique challenges faced by ships using auxiliary propulsion devices such as sails. For such ships, the change of sail attitude will affect their maneuverability, especially under strong wind conditions. The empirical formula of ship motion based on hydrodynamics analysis often cannot fully consider the nonlinear and coupling effects brought by the maneuvering control of these special devices, and the mathematical formula modeling method has high requirements for the ship structure size information and the parameter information of equipment such as propellers and rudders. This not only increases the difficulty of constructing a ship motion prediction model, but also is difficult to achieve an ideal prediction accuracy.

[0004] The current ship motion prediction models using data-driven mainly adopt an offline modeling strategy and cannot cope with the influence of real-time changes in the navigation environment on the ship motion performance. In addition, due to problems such as a significant increase in computational complexity and a significant decrease in learning rate when prediction models such as support vector machines process massive data, and at the same time facing problems such as large model calculations and difficulty in multi-output, it seriously affects the prediction accuracy and computational cost of the model and is not conducive to the application in ship motion online prediction. Summary of the Invention

[0005] In order to solve the above problems, the technical solution adopted by the present invention is: a dynamic prediction method for the movement of a sailboat based on grey wolf optimization and kernel extreme learning machine, including the following steps:

[0006] Establish a ship dynamics model;

[0007] Obtain ship static data and dynamic data;

[0008] Establish a three-degree-of-freedom motion prediction model based on grey wolf optimization algorithm and kernel extreme learning machine algorithm;

[0009] Standardize the static and dynamic data of the ship, determine the input features and three-degree-of-freedom output responses of the three-degree-of-freedom motion prediction model, and divide them into a training set and a validation set according to a ratio;

[0010] Based on the training data set, preliminarily train the three-degree-of-freedom motion prediction model to obtain a preliminarily trained three-degree-of-freedom motion prediction model;

[0011] Test the preliminarily trained three-degree-of-freedom motion prediction on the validation set, and use the grey wolf optimization algorithm to iteratively search for the parameter positions that reduce the fitness of the three-degree-of-freedom motion model fitting to obtain a trained three-degree-of-freedom motion prediction model;

[0012] Based on the trained three-degree-of-freedom motion prediction model, realize the dynamic prediction of the ship's maneuvering motion.

[0013] Furthermore: when the ship is a sail ship, the process of obtaining the structure of the sail ship motion prediction model is as follows:

[0014] By combining the decomposition of the sail force with the input-output structure in the ship motion model, within the non-parametric modeling framework of sail-assisted ship maneuvering motion, the regression function of the three-degree-of-freedom motion prediction model structure of the sail ship and the mapping relationship between the input and output states are as follows:

[0015]

[0016] The three-degree-of-freedom motion prediction model of sail-assisted ship motion establishes the mapping relationship between the sail force coefficient, rudder angle, propeller speed and ship motion response under different wind conditions;

[0017] u(t), v(t), r(t), n(t), δ(t), V wind (t), C L (t), C D (t) and CM Z (t) are the total input representations of the three-degree-of-freedom motion prediction model of sail ship maneuvering motion, and u(t + 1), v(t + 1) and r(t + 1) are those of the three-degree-of-freedom motion prediction model of sail ship maneuvering motion; According to the information on ship navigation conditions, sail control, sail wind tunnel test results and sail force analysis, calculate the coefficients C L (t), C D (t) and CM Z (t) for constructing the input state variables of the three-degree-of-freedom motion prediction model of the sail ship.

[0018] Furthermore: the process of testing the preliminarily trained three-degree-of-freedom motion prediction model on the validation set and using the grey wolf optimization algorithm to iteratively search for the parameter positions that reduce the fitness of the three-degree-of-freedom motion model fitting is as follows:

[0019] Step 1: Population initialization

[0020] First, initialize a pre-determined number of grey wolf individuals to obtain an initial population. For each individual in the grey wolf population, randomly generate the initial values of the hyperparameters. Subsequently, use the KELM kernel extreme learning machine model obtained from the training set to calculate the fitness of various hyperparameter configurations corresponding to each individual.

[0021] Step 2: Grey wolf position update

[0022] According to the fitness evaluation results, select the grey wolf with the minimum fitness as the α, β, and δ wolves; the positions of the α, β, and δ wolves in the wolf pack will also be updated accordingly, and the individual positions will be updated according to the optimization rules. Use the hyperparameters corresponding to the updated grey wolf individual positions to calculate their fitness values on the validation set, and further update the positions of the α, β, and δ wolves in the wolf pack.

[0023] Step 3: Iterative search

[0024] Through iterative search, iteratively optimize the values of each hyperparameter. When the maximum number of iterations or the convergence adaptation critical value is reached and the termination condition is satisfied, the algorithm terminates. At this time, output the optimal hyperparameter combination.

[0025] Furthermore: The hyperparameters of the three-degree-of-freedom motion prediction model include σ 2 representing the variance parameter and the regularization parameter c.

[0026] According to any one of the above-mentioned methods for dynamic prediction of the motion of a sailboat based on grey wolf optimization and kernel extreme learning machine,

[0027] Use a sliding time window to adaptively update the non-parametric three-degree-of-freedom motion prediction model of the ship's maneuvering motion, and automatically update the motion model according to the cumulative error situation, so as to realize the dynamic modeling and prediction of the sailboat motion.

[0028] Furthermore: The cumulative error uses the ship's trajectory deviation and the heading angle deviation as the objects for setting the error thresholds;

[0029] The ship's trajectory is divided into longitudinal displacement and lateral displacement, and the calculation method of the prediction error is as follows:

[0030]

[0031] Set the trajectory threshold ε xy and the heading angle threshold When e xy > ε xy or it indicates that the prediction error of the dynamic three-degree-of-freedom motion prediction model of the ship's maneuvering motion is too large.

[0032] Furthermore, the process of adaptively updating the dynamic non-parametric three-degree-of-freedom prediction model of ship maneuvering motion using a sliding time window, automatically updating the three-degree-of-freedom prediction model according to the cumulative error condition, and thus realizing the dynamic modeling and prediction of wind-sailboat motion further includes:

[0033] When predicting the ship motion, select the data of the nearest m seconds as the training data of the dynamic prediction model of the ship's three-degree-of-freedom motion, and align the sliding window with a length of m with the training data;

[0034] Use the trained dynamic prediction model of the ship's three-degree-of-freedom motion to predict the ship motion state at the next time step, and then move the sliding window backward for subsequent continuous prediction;

[0035] After reaching the specified error calculation period, calculate the ship motion prediction error. If the prediction error exceeds the set threshold, the three-degree-of-freedom motion prediction model of the ship will be re-modeled and continue to predict.

[0036] A dynamic prediction method for wind-sailboat motion based on grey wolf optimization and kernel extreme learning machine provided by the present invention has the following advantages:

[0037] Based on the analysis of the sail force and the modeling of the sail-assisted ship motion, a dynamic modeling method for ship motion using kernel extreme learning machine (KELM) regression is proposed. This method uses the grey wolf optimizer (GWO) algorithm to optimize the hyperparameters of the kernel function, and combines a sliding time window for dynamic model update, combining the efficient learning mechanism of KELM with the global search ability of GWO, effectively improving the prediction accuracy and timeliness. Taking the actual ship data of the sail-assisted ship as an example, the results show that the GWO-KELM modeling method shows robustness and high prediction accuracy, significantly improving the prediction performance of the maneuvering motion state of the sail-assisted ship.

[0038] This application decomposes the force on the sail to obtain the influence characteristics of the sail on the ship's maneuvering performance. A dynamic prediction method for ship motion based on KELM regression is proposed. This method comprehensively considers the changes in sail maneuvering and the ship's maneuverability state, can incorporate the influence of different sail conditions on the ship's maneuvering performance into the non-linear mapping of the model, and dynamically updates the model according to the prediction error range of the three-degree-of-freedom motion prediction model of the wind-sailboat, which is beneficial to the practical application during the ship's navigation.

[0039] We use KELM as the basic model. Due to the mapping structure of ELM and the introduction of kernel functions in KELM, compared with traditional prediction models, KELM not only maintains the non-linear mapping ability but also greatly improves the model's solution speed. At the same time, we use the Grey Wolf Optimizer to optimize the hyperparameter settings of the kernel function in the KELM model based on the validation data, effectively improving the generalization ability and stability of the ship motion prediction model. Compared with traditional ship modeling algorithms, GWO-KELM combines the efficient learning mechanism of KELM and the powerful global search ability of GWO, greatly simplifying and accelerating the solution process and improving the timeliness of the ship's three-degree-of-freedom motion prediction 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 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 is the wind-sailboat coordinate system;

[0042] Figure 2 is the force decomposition diagram of the sail;

[0043] Figure 3 is the non-parametric modeling flowchart of the wind-sailboat motion;

[0044] Figure 4 is the ELM structure diagram;

[0045] Figure 5 is the GWO-KELM hyperparameter optimization flowchart;

[0046] Figure 6 is the sliding window graph based on error;

[0047] Figure 7 is the prediction result of the 35° left turn test, where (a) is the predicted comparison curve of the surge speed u, (b) is the predicted comparison curve of the sway speed v, (c) is the predicted comparison curve of the yaw angular velocity r, and (d) is the predicted comparison curve of the ship's trajectory;

[0048] Figure 8 is the prediction result of the 35° right turn test, where (a) is the predicted comparison curve of the surge speed u, (b) is the predicted comparison curve of the sway speed v, (c) is the predicted comparison curve of the yaw angular velocity r, and (d) is the predicted comparison curve of the ship's trajectory;

[0049] Figure 9It is the zigzag motion prediction result, where (a) is the predicted comparison curve of the surge speed u, (b) is the predicted comparison curve of the sway speed v, (c) is the predicted comparison curve of the yaw angular velocity r, and (d) is the predicted comparison curve of the ship's trajectory. Detailed implementation mode

[0050] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the drawings and in combination with the embodiments.

[0051] To make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and in no way restricts the present invention and its application or use. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0052] A dynamic non-parametric modeling method for the maneuvering motion of a sailboat based on grey wolf optimization and kernel extreme learning machine includes the following steps:

[0053] S1: Establish a ship dynamics model;

[0054] S2: Obtain the static data and dynamic data of the ship;

[0055] S3: Establish a three-degree-of-freedom motion prediction model based on the grey wolf optimization algorithm and the kernel extreme learning machine algorithm;

[0056] S4: Standardize the static data and dynamic data of the ship, determine the input features and three-degree-of-freedom output responses of the three-degree-of-freedom motion prediction model, and divide them into a training set and a validation set according to a ratio;

[0057] S5: Conduct preliminary training on the three-degree-of-freedom motion prediction model based on the training data set to obtain a preliminarily trained three-degree-of-freedom motion prediction model;

[0058] S6: Test the preliminarily trained three-degree-of-freedom motion prediction on the validation set, and use the grey wolf optimization algorithm to iteratively search for the parameter positions that reduce the fitting fitness of the three-degree-of-freedom motion model to obtain a trained three-degree-of-freedom motion prediction model;

[0059] S7: Based on the trained three-degree-of-freedom motion prediction model, implement the dynamic prediction of the ship's maneuvering motion. Steps S1 / S2 / S3 / S4 / S5 / S6 / S7 are executed in sequence;

[0060] Furthermore, the establishment process of the ship dynamics model is as follows:

[0061] In most ship motions, the surge motion in the forward direction dominates, accompanied by sway and yaw motions. The ship motions studied in this paper include: surge, sway, and yaw. The forces considered include hull resistance, rudder force, propeller thrust, environmental disturbances, and sail force.

[0062] In the research on ship motion modeling, the earth-fixed coordinate system o0-x0y0z0 and the body-fixed coordinate system o-xyz are used to describe ship motion, as Figure 1 shown. Among them, x0, y0, and z0 represent the spatial position of the ship in o0-x0y0z0; the Euler angles (pitch, roll, and yaw) are represented by θ and ψ; the translational velocities (surge, sway, and heave) are represented by u, v, and ω; the angular velocities (pitch, roll, and yaw) are represented by p, q, and r. The analysis is carried out in the o-xyz coordinate system, and the center of gravity of the ship is used as the origin of the two coordinate systems. The 3-DOF coordinate transformation relationship of the ship is represented by formula (1):

[0063]

[0064] Among them: and represent the displacement velocities of the ship in the x0 and y0 directions in the inertial coordinate system, is the angular velocity of the ship in the inertial coordinate system.

[0065] Figure 1 is the wind-sailboat coordinate system;

[0066] The establishment process of the wind-sailboat dynamics model is as follows:

[0067] According to the MMG modeling theory (Maneuvering Model Group), the 3-DOF (3-Degree-Of-Freedom) dynamic model of the wind-sailboat under the o-xyz coordinate axes can be obtained as follows:

[0068]

[0069] In the above formula, m represents the mass of the sail-assisted ship, m x and m y represent the added masses of the ship on the x-axis and y-axis of o-xyz, the moment of inertia of the ship about the z-axis and the added moment about the z-axis are represented by I zz and J zz respectively. The subscripts H, P, R, Wind, and Wing represent the hull, propeller, rudder, air disturbance, and sail respectively, N H , N P , N R , NWind ,N wing represents the turning moment generated by influencing factors such as the hull, propeller, rudder, air interference force, and sail, X H ,X P ,X R ,X Wind ,X wing and Y H ,Y P ,Y R ,Y Wind ,Y wing represent the acting forces generated by influencing factors such as the hull, propeller, rudder, air interference force, and sail on the x-axis and y-axis respectively.

[0070] Expand and simplify Equation (3). The viscous hydrodynamic model of the ship adopts the Kojima model, and the calculation equations for the velocity derivatives of u, v, and r are obtained as follows:

[0071]

[0072] In Equation (3), X uu u 2 is the straight-ahead resistance part of the ship, X vv v 2 , X vr vr, X rr r 2 is the viscous resistance generated by the ship's motion; Y v v, Y r r, N v v, N r r are the linear hydrodynamic forces and moments; Y |v|v |v|v, Y |r|r |r|r, Y vvr v 2 r, Y vrr vr 2 and N |v|v |v|v, N |r|r |r|r, N vvr v 2 r, N vrr vr 2 are the non-linear hydrodynamic forces and moments. ρ is the density of seawater, and n is the propeller speed. D p is the propeller diameter, K T is the propeller thrust coefficient, F N is the rudder force, δ is the rudder angle, t R is the thrust deduction coefficient of the rudder, a H is the correction factor for the lateral force of the hull induced by steering, x H is the distance from the acting center of the lateral force of the hull induced by steering to the center of gravity of the ship, x Ris the coordinate of the center of the lateral force acting on the rudder on the ship's ox-axis.

[0073] The process of non-parametric modeling is as follows:

[0074] It can be seen that the ship motion model mainly involves the calculation of forces and moments related to the ship, rudder, and propeller, and environmental factors such as wind also need to be considered. Therefore, when establishing the ship motion model, it is necessary to consider simplifying the model structure. During actual navigation, the ship is also affected by wave forces, making its motion state time-varying. Compared with parametric modeling, the data-driven non-parametric modeling method is beneficial for establishing the internal relationship between the ship's maneuvering motion state variables under different navigation environments. In the research of ship motion modeling, using the Euler difference equation to discretize and integrate the acceleration in the ship motion model is an effective method, and the acceleration can be expressed as follows:

[0075]

[0076] In formula (5), h represents the sampling time interval, and t + 1 represents the next sampling time point adjacent to t. Combining the acceleration equation with the velocity equation, it can be converted into the input-output form of the model. The input data set includes environmental information such as the relative wind speed V wind , the rudder angle δ, the propeller speed n, and the control state information. The input-output response model is as follows:

[0077]

[0078] In formula (5), (f1 - f3) represents the response function of the variable. Using an appropriate algorithm based on the system structure configuration of the three-degree-of-freedom motion prediction model, a non-linear response relationship can be accurately established between the motion state, control information, and environmental variables.

[0079] In the case where it is difficult to obtain accurate and comprehensive hydrodynamic coefficients and rudder force coefficients, non-parametric modeling provides a fast and direct method for developing a ship motion prediction model. For traditional ship types, the ship motion state can usually be effectively analyzed based on information such as speed, angle, rudder angle, and propeller speed. However, for a sail-assisted ship, the added sail structure on the deck will amplify the impact of the wind on the ship's motion and also introduce the influence of human operation, such as sail operation. In this case, it is necessary to analyze the forces acting on the sails to establish an effective and accurate sail-assisted ship maneuvering model.

[0080] The process of the three-degree-of-freedom motion prediction model for the sail-assisted ship maneuvering motion is as follows:

[0081] First, calculate the sail force, which is specifically as follows:

[0082] The lift coefficient of the airfoil sail is superior to that of traditional sails such as square sails and circular arc sails, showing excellent aerodynamic characteristics, so it is widely used. According to the aerodynamic principle of the sail, when the ship is sailing at sea, the sail will experience a relative wind force composed of the actual wind force and the apparent wind force of the ship. When the wind blows against the sail at a certain angle of attack, a lift force perpendicular to the relative wind direction and a drag force along the relative wind direction will be generated, and these two forces will change with the change of the angle of attack.

[0083] As Figure 2 shown in the force decomposition of the sail, α represents the angle of attack of the sail, θ represents the angle of the relative wind, and V a represents the magnitude of the relative wind speed. This speed is the vector sum of the apparent wind speed V caused by the ship and the true wind speed Vt. F L represents the lift force acting on the sail, while F D represents the drag force received by the sail. Their corresponding relationships are defined as follows:

[0084]

[0085] In formulas (6) and (7), C L and C D represent the lift coefficient and the drag coefficient respectively, ρ represents the air density, and S w represents the projected area of the sail. The lift and drag of the sail can be decomposed into a propulsive force in the forward direction of the ship and a lateral drift force perpendicular to the forward direction. Their corresponding relationships are as follows:

[0086] X W = F L ·sinθ - F D ·cosθ (8)

[0087] Y W = F L ·cosθ + F D ·sinθ (9)

[0088] The sail propulsive force and the lateral force coefficient are respectively expressed as:

[0089] C X = C L ·sinθ - C D ·cosθ (10)

[0090] C Y = C L ·cosθ + C D ·sinθ (11)

[0091] Under the action of the wind, the sail will also generate a bow yaw moment N Wing , and this moment is related to the sail moment coefficient CM Z and the chord length L of the sailxs It is related. The force exerted by the sail on the ship can be decomposed into the following formula:

[0092]

[0093] Based on the calculation of the sail force, the decomposition of the sail force is combined with the input-output structure in the ship motion model. Within the non-parametric modeling framework of sail-assisted ship maneuvering, the mapping relationship between the regression function and the input and output states is as follows:

[0094]

[0095] It can be seen that the three-degree-of-freedom motion prediction model for sail-assisted ship maneuvering control establishes the mapping relationship between the sail force coefficient, rudder angle, propeller speed, and ship motion response under different wind conditions. The framework of the sail-assisted ship motion model constructed in this study is as Figure 3 shown. The total input of the three-degree-of-freedom motion prediction model for the maneuvering motion of the sailboat is represented by u(t), v(t), r(t), n(t), δ(t), V wind (t), C L (t), C D (t) and CM Z (t), and the total output of the three-degree-of-freedom motion prediction model for the maneuvering motion of the sailboat is represented by u(t + 1), v(t + 1), and r(t + 1). According to the information on ship navigation conditions, sail control, sail wind tunnel test results, and the above sail force analysis, the coefficients C L (t), C D (t) and CM Z (t) are calculated and used to construct the input state variables of the three-degree-of-freedom motion prediction model for the maneuvering motion of the sailboat.

[0096] In the response functions (f1 - f3) in formula (13), the kernel extreme learning machine optimized by grey wolves is used here to construct a three-degree-of-freedom motion prediction model that can calculate the motion state according to the input information. The process of establishing the three-degree-of-freedom motion prediction model based on the grey wolf optimization algorithm and the kernel extreme learning machine algorithm is as follows:

[0097] The specific process of the KELM kernel extreme learning machine algorithm is as follows:

[0098] ELM (extreme learning machine) is a feedforward neural network based on randomization. Its characteristic is to randomly generate hidden neurons and adjust the output weights by regularized least squares. Compared with SVM, ELM has faster and more superior generalization ability. The structure of ELM is as Figure 4 shown.

[0099] Given the training data where \(m\) represents the number of input layer units, \(n\) represents the number of output layer units, \(N\) represents the sample size, and \(\mathbf{x}\) i represents the feature vector, and \(\mathbf{y}\) i represents the corresponding response value. For an ELM with \(L\) hidden layer units, the function of the ELM can be expressed as follows:

[0100]

[0101] where \(H(\mathbf{x})\) represents the output matrix from the hidden layer, and \(\boldsymbol{\beta}\) i represents the output weights from the hidden layer to the output layer. The output matrix is obtained by multiplying the input layer units with the input weight vectors, adding the bias, and then passing through a non - linear mapping function. \(H(\mathbf{x})\) can be defined as:

[0102]

[0103] \(h\) i (\mathbf{x}) = g(\boldsymbol{\omega}\) i \mathbf{x}+\mathbf{b}\) i , \(\boldsymbol{\omega}\) i \in\mathbb{R}\) m , \(\mathbf{b}\) i \in\mathbb{R}^{(16)}\)

[0104] where the matrix \(\boldsymbol{\omega}\) i represents the randomly assigned weight vectors, the matrix \(\mathbf{b}\) i represents the bias, and the matrix \(g(\cdot)\) represents the activation function. The ELM model solves for the connection weights \(\boldsymbol{\beta}\) by minimizing the output error. By satisfying the equation \(H\boldsymbol{\beta}=\mathbf{y}\), the weights \(\boldsymbol{\beta}=H^{\dagger}\mathbf{y}\), where \(H^{\dagger}\) + is the Moore - Penrose pseudoinverse of the matrix \(H\). The calculation process is as follows: + H^{\dagger}=H^{T}(HH^{T})^{-1}\)

[0105] H^{\dagger}\) + = H^{T}(HH^{T})^{-1}\) T (HH^{T})^{-1}\) T ) -1 ^{(17)}\)

[0106] In the learning stage of ELM, it is similar to solving the linear system \(H\boldsymbol{\beta}=\mathbf{y}\), and the optimal output weights \(\boldsymbol{\beta}\) are obtained by calculating the minimum norm least squares solution.

[0107] However, since the prediction performance of ELM is vulnerable to the influence of random input weights and biases, it shows a certain degree of instability. To solve this problem, the kernel extreme learning machine (KELM) generated by introducing the kernel function in ELM significantly improves the stability of the model. Different from ELM, KELM replaces the random mapping with the kernel function in the training stage, so that the model not only improves the generalization performance but also maintains an excellent training speed. At this time, the weight vector \(\boldsymbol{\beta}\) can be obtained by using the regularization coefficient \(c\) in the optimization stage.

[0108]

[0109] The symbol I represents the N - dimensional identity matrix. In KELM, the kernel function is denoted by HH T and is defined as follows:

[0110] Ω KELM = h(x i )·h(x j ) = HH T = K(x i , x j ) (19)

[0111] Here, K(,) is the kernel function. For a data set the predicted output is as follows:

[0112]

[0113] In this study, the Gaussian kernel function was adopted according to Mercer's theorem and is defined as follows:

[0114]

[0115] where: the parameter σ 2 represents the variance parameter. σ 2 and the regularization parameter c play crucial roles in improving the performance of KELM, so they are used as hyperparameters for optimizing KELM.

[0116] Furthermore, the process of the GWO algorithm is as follows:

[0117] The GWO algorithm is a swarm intelligence optimization method, known for its strong convergence performance and excellent global search and local optimization capabilities (Mirjalili et al., 2014). In this algorithm, the priorities of gray wolves are divided into four levels: α - wolf, β - wolf, δ - wolf, and ω - wolf. The wolf pack hunts under the leadership of the α - wolf, including three stages: tracking and approaching, hunting, and attacking. The encircling and capturing behaviors of wolves are defined as follows:

[0118]

[0119] In the above formula, t represents the number of iterations, represents the distance vector from the wolf to the prey, represents the position vector of the prey, represents the position vector of the wolf, and both represent random values within the interval [0 - 1], represents the convergence factor. Subsequently, the ω - wolf encircles the prey under the leadership of the α, β, δ - wolves. The mathematical model describing this behavior is as follows:

[0120]

[0121] Here, respectively represent the ranges from α, β, δ to other wolves; represents the current positions of α, β, δ; and is a random vector; while represents the position of wolf ω. When the prey stops moving, the wolves will launch an attack to complete the hunting process. At this time, the algorithm will iterate continuously to reach the optimal solution.

[0122] Testing the preliminarily trained three-degree-of-freedom motion prediction on the validation set, the process of using the grey wolf optimization algorithm to iteratively search for the parameter positions that reduce the fitness of the three-degree-of-freedom motion model fitting is as follows:

[0123] Step 1: Population initialization

[0124] First, initialize a predetermined number of grey wolf individuals as the initial population of potential solutions. For each individual in the grey wolf population, randomly generate the initial values of the hyperparameters. Subsequently, using the KELM kernel extreme learning machine model obtained from the training set, calculate the fitness of each individual corresponding to various hyperparameter configurations.

[0125] The calculation formula of the fitness function is as follows, where y’ represents the result predicted by the model and y represents the true value.

[0126]

[0127] Step 2: Grey wolf position update

[0128] According to the fitness evaluation results, select the grey wolf with the minimum fitness as the α, β, and δ wolves. The positions of the α, β, and δ wolves in the wolf pack will also be updated accordingly, and the individual positions will be updated according to the optimization rules. Using the hyperparameters corresponding to the updated grey wolf individual positions, calculate their fitness values on the validation set, and further update the positions of the α, β, and δ wolves in the wolf pack.

[0129] Step 3: Iterative search

[0130] Through iterative search, iteratively optimize the values of each hyperparameter, aiming to find a model with better performance. When the maximum number of iterations or the convergence adaptation critical value is reached and the termination condition is satisfied, the algorithm terminates. At this time, output the optimal hyperparameter combination.

[0131] Figure 5 Shows the modeling process of the three-degree-of-freedom motion prediction model using the grey wolf optimization-kernel extreme learning machine method (GWO-KELM).

[0132] The ship state data includes rudder angle, propeller speed, ship speed, ship heading angle, turning speed and navigation estimation;

[0133] The environmental data includes relative wind direction, wind speed, sail height / angle;

[0134] When using the KELM offline model for prediction, using difference equations will lead to the accumulation of model errors, thus affecting the long-term prediction of ship motion. To solve this problem, a sliding time window is used to adaptively update the model. According to the cumulative error situation after a certain period of time, the motion model is automatically updated, thus realizing the dynamic modeling and prediction of the wind-sail ship motion. The effectiveness of this method has been verified by actual ship data.

[0135] During actual navigation, wind-sail ships often exhibit non-steady behaviors. Changes in the navigation environment and sail maneuvers will lead to changes in the motion characteristics of wind-sail ships. Due to the effect of the sail, compared with traditional ships, wind-assisted ships are more vulnerable to the influence of wind. Therefore, it is necessary to establish a dynamic modeling method suitable for wind-sail ships.

[0136] When using the KELM model for prediction, by comparing the error between the predicted value and the actual value, the change in prediction accuracy can be evaluated. Setting an error threshold for the model can determine whether the model needs to be updated. When the prediction error of the model is lower than the error threshold, it can be considered that the accuracy of the model meets the application requirements. On the contrary, if the prediction error exceeds the set threshold, a new motion model needs to be constructed using the sliding time window method, as Figure 6 shown.

[0137] The sliding time window is an effective dynamic update method, which improves the model accuracy by iteratively updating the training samples.

[0138] When predicting ship motion, the most recent m seconds of data are selected as the training data for the ship's three-degree-of-freedom motion model, and the sliding window of length m is aligned with the training data.

[0139] Using the trained ship's three-degree-of-freedom motion model, predict the ship motion state at the next time step, and then move the sliding window backward for subsequent continuous prediction;

[0140] After reaching the specified error calculation period, the ship motion prediction error will be calculated. If the prediction error exceeds the set threshold, the ship's three-degree-of-freedom motion model will be re-modeled and continue to predict.

[0141] Given that there is a strong correlation between the future ship motion state and the motion states at adjacent moments, new samples play a crucial role in improving prediction accuracy.

[0142] The prediction results of ship motion include response outputs in multiple degrees of freedom. Since the amplitudes of these responses vary, it is challenging to establish a unified comparison threshold. Therefore, this application uses the ship trajectory deviation and the heading angle deviation as the objects for setting the error threshold. The ship trajectory is divided into longitudinal displacement and lateral displacement, and the calculation method of the prediction error is as follows:

[0143]

[0144] Set the trajectory threshold ε xy and the heading angle threshold When e xy > ε xy [[ID=I4]]or ]>it indicates that the prediction error of the model is too large. According to the latest data within the sliding window, the model is dynamically updated. The advantage of dynamic learning with a sliding time window is that it can adapt to the dynamic changes in the ship motion state and avoid the problem of increased computational complexity due to too large matrix dimensions. By updating the training samples, the model can obtain the latest information in a timely manner, thereby improving the prediction accuracy.

[0145] To verify the performance of the dynamic modeling of ship motion in three degrees of freedom in engineering applications, we predicted the maneuvering motion of a sail-assisted ship under actual navigation conditions. The focus of the experiment was the zigzag motion and turning motion specified in the IMO maneuverability test rules. Specifically, the experimental data included the 35° turning maneuver data of a full-scale sailboat with sails raised and the zigzag sailing data with sails lowered. These experimental data were obtained through sensor acquisition and corresponding calculations during the actual ship navigation test.

[0146] Due to the presence of a large amount of noise in the sensor data, which will have an adverse impact on the model performance, it is necessary to obtain a dataset rich in excitation information so that the model can capture a wider range of motion characteristics. To verify the generality and practicality of the GWO-KELM dynamic prediction model in practical applications, we selected the experimental data of a 35° turning maneuver under sail-raising conditions and a zigzag sailing under sail-lowering conditions as the test dataset. Since it is challenging to obtain ship maneuvering data of 10° and 20° zigzag motions for a long time, various motion data at different rudder angles (such as 5°, 10°, and 15°) were selected from the ship navigation records to establish the training dataset. The training dataset includes 700 samples, and the ratio of training data to validation data is 8:2; the test dataset includes 120 samples for each of the left and right turning maneuvers and 100 samples for zigzag sailing. To facilitate the dynamic update of the GWO-KELM model, the first hyperparameter optimization result of the GWO-KELM model was used as the parameter setting for the subsequent KELM dynamic update to improve the model update speed. Due to the limitations of actual ship conditions, the sampling interval of the sensor data is 10 seconds. Since there is a large amount of measurement noise and a small number of outliers in the real ship dataset, the data was first subjected to cubic spline smoothing and normalization before model training, and then model testing was carried out to evaluate the stability and robustness of the proposed ship motion modeling method in practical applications.

[0147] The control instruction settings and environmental conditions for the turning test are as follows: sailing with a 35° rudder angle, the main engine speed is 40 rpm / min, the relative wind speed of the environment is 7.0 - 8.5 m / s, and the average draft of the ship is 20 meters. Figure 7 and Figure 8 respectively show the prediction results of the wind-assisted ship's left and right turns at a 35° rudder angle.

[0148] Figure 7 is the prediction result of the 35° left-turn test, where (a) is the predicted comparison curve of the surge speed u, (b) is the predicted comparison curve of the sway speed v, (c) is the predicted comparison curve of the yaw angular velocity r, and (d) is the predicted comparison curve of the ship's trajectory;

[0149] Figure 8 is the prediction result of the 35° right-turn test, where (a) is the predicted comparison curve of the surge speed u, (b) is the predicted comparison curve of the sway speed v, (c) is the predicted comparison curve of the yaw angular velocity r, and (d) is the predicted comparison curve of the ship's trajectory;

[0150] For a sail-assisted ship, when the sail is in the lowered position, due to changes in the center of gravity and environmental disturbances such as wind, its motion dynamics are different from when the sail is raised. Subsequently, the zigzag sailing motion under sail-lowered conditions was predicted. The control instructions and environmental conditions are as follows: the main engine running speed is 40 revolutions per minute (rpm / min), the average relative wind speed is 10.0 m / s, the sail angle is set at 90°, and the average draft of the ship is 20 m. The prediction results are as Figure 9 shown, where (a) is the predicted comparison curve of the surge speed u, (b) is the predicted comparison curve of the sway speed v, (c) is the predicted comparison curve of the yaw angular velocity r, and (d) is the predicted comparison curve of the ship's trajectory..

[0151] The motion prediction model of the sailboat constructed using GWO-KELM demonstrates more superior prediction ability. It can quickly and accurately predict the motion states at multiple future time steps, thus partially meeting the prediction requirements for the motion of sail-assisted ships. This is of great significance for the research on optimizing the sailing state and energy efficiency of sail-assisted ships, providing a new solution for in-depth research in this field.

[0152] For sail-assisted ships, traditional parametric modeling methods may be difficult to accurately predict the ship's motion under complex conditions, unable to help with the full utilization of wind energy, and unreasonable maneuvering motions may increase fuel consumption and environmental impacts; while traditional methods with lower prediction efficiency such as SVM may lead to decision-making delays and pose safety hazards in emergency situations. Using the GWO-KELM method can quickly and accurately predict the motion state of the sailboat, helping to optimize the use of the sail and improve the wind energy utilization efficiency. At the same time, accurate motion prediction can support the intelligent planning of the route, reduce fuel consumption, improve the sailing efficiency, and provide key inputs for the autopilot system to improve its performance and reliability. In addition, it helps to improve the safety of ship navigation, avoiding collisions and groundings, especially in complex waters or adverse weather conditions.

[0153] The proposed GWO-KELM three-degree-of-freedom motion prediction model has obvious advantages in the case of real ship motion data. It has multi-output prediction ability, and its modeling time is also greatly shortened compared with models such as SVM. This benefits from the model architecture of KELM retaining the multi-output prediction ability and modeling speed of ELM, thus reducing the number of parameter adjustments in the parameter optimization process of KELM and improving the robustness and generalization ability of the model. It can be seen that the performance of the model optimized by GWO is more robust, helping to address the motion prediction problem under unknown environments and being able to provide reliable support for the motion prediction of sail-assisted ships.

[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; 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 perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dynamic prediction method for wind-sailboat motion based on grey wolf optimization and kernel extreme learning machine, characterized in that: Including the following steps: Establish a ship dynamics model; Obtain static and dynamic data of the ship; Establish a three-degree-of-freedom motion prediction model based on the Grey Wolf Optimization algorithm and the Kernel Extreme Learning Machine algorithm; Standardize the static and dynamic data of the ship, determine the input features and three-degree-of-freedom output responses of the three-degree-of-freedom motion prediction model, and divide them into a training set and a validation set according to a ratio; Preliminarily train the three-degree-of-freedom motion prediction model based on the training data set to obtain a preliminarily trained three-degree-of-freedom motion prediction model; Test the preliminarily trained three-degree-of-freedom motion prediction on the validation set, and use the Grey Wolf Optimization algorithm to iteratively search for the parameter positions that reduce the fitness of the three-degree-of-freedom motion model fitting to obtain a trained three-degree-of-freedom motion prediction model; Based on the trained three-degree-of-freedom motion prediction model, realize the dynamic prediction of ship maneuvering motion.

2. A dynamic prediction method for wind-sailboat motion based on grey wolf optimization and kernel extreme learning machine according to claim 1, characterized in that: When the ship is a sail ship, the process of obtaining the structure of the sail ship motion prediction model is as follows: By combining the decomposition of the sail force with the input-output structure in the ship motion model, within the non-parametric modeling framework of sail-assisted ship maneuvering motion, the mapping relationship between the regression function of the three-degree-of-freedom motion prediction model structure of the sail ship and the input and output states is as follows: It can be seen that the three-degree-of-freedom motion prediction model of sail-assisted ship motion establishes the mapping relationship between the sail force coefficient, rudder angle, propeller speed and ship motion response under different wind conditions; u(t), v(t), r(t), n(t), δ(t), V wind (t), C L (t), C D (t) and CM Z (t) is the total input representation of the three - degree - of - freedom motion prediction model for the maneuvering motion of a sailboat. u(t + 1), v(t + 1) and r(t + 1) are the total output representations of the three - degree - of - freedom motion prediction model for the maneuvering motion of a sailboat. According to the information on ship navigation conditions, sail control, sail wind tunnel test results and sail force analysis, the coefficient C L (t), C D (t) and CM Z (t) are used to construct the input state variables of the three - degree - of - freedom motion prediction model of the sailboat.

3. A dynamic prediction method for windsurfing movement based on grey wolf optimization and kernel extreme learning machine according to claim 1, characterized in that: The process of testing the preliminarily trained three-degree-of-freedom motion prediction model on the validation set and using the Grey Wolf Optimization algorithm to iteratively search for the parameter positions that reduce the fitness of the three-degree-of-freedom motion model fitting is as follows: Step 1: Population initialization; First, initialize a pre-determined number of Grey Wolf individuals to obtain an initial population. For each individual in the Grey Wolf population, randomly generate the initial values of the hyperparameters; Subsequently, use the KELM kernel extreme learning machine model obtained from the training set to calculate the fitness of each individual corresponding to various hyperparameter configurations; Step 2: Grey Wolf position update; According to the fitness evaluation results, select the Grey Wolf with the minimum fitness as the α, β, and δ wolves; the positions of the α, β, and δ wolves in the wolf pack will also be updated accordingly, and the individual positions will be updated according to the optimization rules; use the hyperparameters corresponding to the updated Grey Wolf individual positions to calculate their fitness values on the validation set, and further update the positions of the α, β, and δ wolves in the wolf pack; Step 3: Iterative search Through iterative search, iteratively optimize the values of each hyperparameter. When the maximum number of iterations or the convergence adaptation critical value is reached and the termination condition is met, the algorithm terminates. At this time, output the optimal hyperparameter combination.

4. A dynamic prediction method for wind-sailboat motion based on grey wolf optimization and kernel extreme learning machine according to claim 1, characterized in that: The hyperparameters of the three-degree-of-freedom motion prediction model include σ2 representing the variance parameter and the regularization parameter c.

5. The dynamic prediction method of sail ship motion based on Grey Wolf Optimization and Kernel Extreme Learning Machine according to any one of claims 1-4, characterized in that: Use a sliding time window to adaptively update the non-parametric three-degree-of-freedom motion prediction model of ship maneuvering motion, and automatically update the motion model according to the cumulative error situation, so as to realize the dynamic modeling and prediction of sail ship motion.

6. The dynamic prediction method of windsurfing boat movement based on grey wolf optimization and kernel extreme learning machine according to any one of claims 5, characterized in that: The cumulative error uses the ship trajectory deviation and the heading angle deviation as the objects for setting the error thresholds; The ship trajectory is divided into longitudinal displacement and lateral displacement, and the calculation method of the prediction error is as follows: Set the trajectory threshold ε xy and the course angle threshold When e xy > ε xy or it indicates that the prediction error of the dynamic three-degree-of-freedom motion prediction model of ship maneuvering motion is too large.

7. The dynamic prediction method of windsurfing based on grey wolf optimization and kernel extreme learning machine according to any one of claims 5, characterized in that: The process of adaptively updating the three-degree-of-freedom prediction model of the ship's maneuvering motion with a sliding time window and automatically updating the motion prediction model according to the cumulative error situation to achieve dynamic modeling and prediction of the wind-sailboat motion further includes: When predicting the ship motion, select the nearest m seconds of data as the training data for the three-degree-of-freedom motion dynamic prediction model of the ship, and align the sliding window with a length of m with the training data; Use the trained three-degree-of-freedom motion dynamic prediction model of the ship to predict the ship motion state at the next time step, and then move the sliding window backward for subsequent continuous prediction; After reaching the specified error calculation period, calculate the ship motion prediction error. If the prediction error exceeds the set threshold, the three-degree-of-freedom motion prediction model of the ship will be re-modeled and continue to predict.