Online ship motion nonparametric modeling method suitable for multiple ships and multiple working conditions
By introducing a hybrid nuclear-related vector machine and a four-degree of freedom model in ship motion modeling, the problems of applicability and rolling influence of non-parametric modeling under multiple ships and multi-working conditions are solved, and efficient and real-time non-parametric identification of ship motion is achieved.
Patent Information
- Application Number
- CN202510071070.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
It is difficult for the prior art to establish applicable non-parametric modeling of online ship motion under multiple ships and multi-working conditions, and the traditional model does not consider the impact of roll on ship stability and maneuverability. The hyperparametric acquisition takes a long time and cannot meet the requirements of online non-parametric identification.
A hybrid core correlation vector machine is used, combining Gaussian kernel function and Sigmoid kernel function, a four-degree of freedom ship motion model is established, and a non-parametric identification model is obtained through adaptive training to realize online non-parametric modeling of ship motion.
An adaptive non-parametric identification model suitable for various types of ships is realized, taking into account the impact of roll on ship stability, improving the applicability and generalization ability of the model, reducing training time, and meeting the requirements of online non-parametric identification.
Smart Images

Figure CN119989530A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship motion identification and modeling, and in particular to an online ship motion non-parametric modeling method suitable for multiple ships and multiple working conditions. Background Art
[0002] In order to ensure navigation safety and complete navigation tasks, ships will sail at three different speeds: low speed, half speed and full speed. When ships sail at different speeds in different environments, the maneuverability they exhibit is different. Therefore, studying the ship motion prediction under different maneuvering conditions and environments can provide prior information for safe navigation. In addition, ship motion prediction also plays a key role in autonomous collision avoidance, transshipment and berthing and unberthing operations.
[0003] Based on the mathematical model of ship motion, the ship maneuvering simulator can simulate the test data under different sea conditions, which can not only reflect the motion characteristics of the real ship under different maneuvers and environments, but also lay the foundation for crew training and navigation safety assessment. Traditional modeling algorithms rely on data and mathematical methods to establish parametric models, which are mainly used to determine unknown model parameters when the system structure is known. For example, mechanism modeling is an important method for ship motion modeling, but it cannot be carried out when the main scale and design parameters of the ship are unknown. In addition, due to the establishment of new ships, the empirical formulas used are also not applicable. Non-parametric modeling of ship motion is different from mechanism modeling and parameter identification modeling. It does not require the main scale parameters, model framework and empirical formulas of the ship, but establishes a non-parametric model by analyzing the ship motion data, that is, it is a data-driven model. Data-driven models usually use emerging intelligent identification modeling algorithms. These methods are more flexible and suitable for processing complex motion systems.
[0004] At present, most of the research only considers non-parametric identification modeling for one type of ship, which is not suitable for the establishment of adaptive non-parametric models of multiple ships under multiple working conditions. As a result, the established non-parametric models have poor applicability and generalization in various motion scenarios. It takes time to retrain the non-parametric identification model of each ship, and most non-parametric models only consider three-degree-of-freedom ship motion, which can be used to describe the planar motion of the ship, but does not consider the impact of roll on the stability, maneuverability and navigation safety of the ship. At the same time, in the non-parametric modeling process, it usually takes a long time to obtain hyperparameters using optimization algorithms or other solutions, so it generally cannot meet the requirements of online non-parametric identification. Summary of the invention
[0005] The present invention provides an online non-parametric modeling method for ship motion under multiple ships and multiple working conditions, so as to overcome the technical problems that the prior art can only establish a non-parametric model for a single ship type, does not consider the influence of roll, and it usually takes a long time to obtain hyperparameters.
[0006] In order to achieve the above object, the technical solution of the present invention is:
[0007] An online non-parametric modeling method for ship motion under multiple ship and multiple working conditions, the specific steps include:
[0008] S1: obtaining a four-degree-of-freedom ship motion data set based on simulation tests and actual ship tests, wherein the four-degree-of-freedom ship motion data set includes straight-line speed, lateral speed, bow angular velocity, and roll angular velocity under multiple ships and multiple working conditions;
[0009] S2: establishing a four-degree-of-freedom ship motion model, and establishing a non-parametric identification model based on the four-degree-of-freedom ship motion model;
[0010] S3: Establishing a hybrid kernel relevance vector machine, and using a Gaussian kernel function and a Sigmoid kernel function as kernel functions of the hybrid kernel relevance vector machine;
[0011] S4: Adaptively training the non-parametric identification model based on the hybrid kernel correlation vector machine and the four-degree-of-freedom ship motion data set to obtain a trained non-parametric identification model to complete the online ship motion non-parametric modeling process.
[0012] Furthermore, in S2, the process of establishing a four-degree-of-freedom ship motion model and establishing a non-parametric identification model based on the four-degree-of-freedom ship motion model is as follows:
[0013] The established four-degree-of-freedom ship motion model is expressed as:
[0014]
[0015] Where m is the mass of the ship, m x and m y is the additional mass, W is the displacement of the ship; u, v, r, and p are the straight-line speed, lateral speed, bow angular velocity, roll angle and roll angular velocity respectively; X H and Y H are the longitudinal force and transverse force acting on the bare hull, N H and K H is the pitch moment and roll moment acting on the bare hull; K P and Y P are the longitudinal and lateral forces acting on the propeller, N P and K P is the pitch moment and roll moment acting on the propeller; X R and Y R are the longitudinal and lateral forces acting on the rudder; N R and K Rare the pitch and roll moments acting on the rudder; α y is m x The center coordinate on the x-axis, l x and l y m x and m y The center coordinate on the z-axis, I xx and I zz is the moment of inertia, J xx and J zz is the additional moment of inertia, is the initial stability height of the ship;
[0016] The Euler forward difference discretization method is used to discretize equation (1) to obtain a non-parametric identification model, which is expressed as:
[0017]
[0018] In the formula, f u (·),f v (·),f r (·) and f p (·) are the non-parametric identification models of straight-line speed, lateral speed, bow angular velocity and roll angular velocity, respectively; h is the sampling time; δ is the rudder angle, and h is the sampling time.
[0019] Further, in S3, the established hybrid kernel relevance vector machine is expressed as:
[0020] t=F(x)+ε (3)
[0021]
[0022] Where F(x) is the logistic mapping function obtained based on the nonparametric identification model in equation (1); ε is the error vector, and ε = {ε1, ε2, …ε n} T , w is the weight vector, and w={w1,w2,…w n} T , k a (x,x i ) is the kernel function; w0 is the bias, N is the total number of training samples; x is the input data of the nonparametric identification model, and t is the target value in the training sample;
[0023] The Gaussian kernel function and the Sigmoid kernel function are used as the kernel function of the hybrid kernel RVM, which is expressed as:
[0024] Kernel function k a (x,x i ) is expressed as:
[0025] ka (x,x i )=λk g (x,x i )+(1-λ)k s (x,x i ) (5)
[0026] In the formula, λ is the weight coefficient of the kernel function, k g (x,x i ) and k s (x,x i ) represent Gaussian kernel function and Sigmoid kernel function respectively.
[0027] Further, in S4, the process of adaptively training the non-parametric identification model based on the hybrid kernel relevance vector machine and the four-degree-of-freedom ship motion data set is:
[0028] S41: Obtain training samples and test samples based on a four-degree-of-freedom ship motion dataset;
[0029] S42: inputting the training sample into the hybrid kernel relevance vector machine based on the set time window length to obtain prediction data;
[0030] S43: Compare and determine whether the root mean square error between the predicted data and the test sample in the time window exceeds the set threshold. If yes, save the predicted data, select the data of the first M seconds of the test sample in the current time window according to the current iteration time sequence as the new training sample, and then execute S44; otherwise, save the predicted data and execute S45;
[0031] S44: Repeat S42-S43;
[0032] S45: Determine whether the test sample has been iterated. If so, end the prediction. Otherwise, use the predicted data as new input and continue to slide the time window to obtain new predicted data.
[0033] Furthermore, in S42, the training samples are input into the hybrid kernel relevance vector machine to obtain the prediction data in the following process:
[0034] Assuming that the target values in the training samples are independently distributed, the likelihood estimation probability of the four-degree-of-freedom ship motion dataset is expressed as:
[0035]
[0036] In the formula, Φ={φ(x1),φ(x2),…φ(x n )} T ;φ(x n )={1,k a (xn ,x1)1,…k a (x n ,x N ) n} T ; σ 2 is the variance;
[0037] The prior distribution of the weight vector w is expressed as:
[0038]
[0039] Where α is the hyperparameter of the nonparametric identification model, and α={α0,α1,…α n} T ;
[0040] Combining the prior distribution and Bayesian inference, and performing hyperparameter estimation based on the four-degree-of-freedom ship motion dataset, the posterior distribution of the weight vector w is obtained, which is expressed as:
[0041]
[0042] The likelihood function for a given hyperparameter is expressed as:
[0043]
[0044] in,
[0045]
[0046] Let the derivative of formula (9) be 0, and the update formula of the hyperparameters is:
[0047]
[0048] In the formula, γ i For the corresponding w i The degree to which it is accurately determined by the data, and γ i ≡1-α i Σ ii ;
[0049] Based on the hyperparameters, prior distribution and posterior distribution determined by the hyperparameter update formula, the target value t of the ship motion test data is obtained. * The distribution of is:
[0050]
[0051] In the formula, α MP and are the maximum possible values,
[0052] Based on equations (6)-(12), the four-degree-of-freedom motion data prediction data is obtained, which is expressed as:
[0053] y * =μ T φ(x * ) (13)
[0054] In the formula, x * is the test sample data input into the nonparametric identification model.
[0055] Furthermore, in the training process of the non-parametric identification model, the mean square error MSE, root mean square error RMSE and mean absolute error MAE are used to evaluate the accuracy of the predicted data output by the non-parametric identification model, which are expressed as:
[0056]
[0057] In the formula, is the estimated value of the test data for the nonparametric identification model.
[0058] Furthermore, the root mean square error between the predicted data and the test sample is expressed as:
[0059] Err=RMSE s / 3 (15)
[0060] Where Err is the final calculation error, RMSE s It is the sum of the root mean square error values of the ship's four-degree-of-freedom motion prediction.
[0061] Beneficial effects: The present invention proposes a method for establishing an adaptive non-parametric identification model that can be applied to various types of ships, which makes up for the limitation of modeling only a single ship type in previous studies, and demonstrates the effectiveness and broad application prospects of the model under different ships and different working conditions. In the modeling of ship motion, the influence of roll is considered, which supplements the shortcomings of the traditional planar motion model, thereby more comprehensively reflecting the key factors of ship motion; through the proposed hybrid kernel correlation vector machine, using two kernel functions, it can better handle the nonlinear problems in ship motion, and has stronger sparsity and generalization capabilities than other algorithms. At the same time, in the process of training the non-parametric identification model, the method of adaptively updating the training samples can reduce the training time and ensure that the non-parametric identification modeling of four-degree-of-freedom ship motion can be carried out in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0063] Figure 1 It is a flow chart of an online non-parametric modeling method of ship motion applicable to multiple ships and multiple working conditions in the present invention;
[0064] Figure 2 This is a diagram showing the prediction result of the straight flight speed in an embodiment of the present invention;
[0065] Figure 3 This is a diagram showing the prediction result of the lateral speed in an embodiment of the present invention;
[0066] Figure 4 This is a diagram showing the bow angular velocity prediction result in an embodiment of the present invention;
[0067] Figure 5 This is a graph showing the roll angular velocity prediction result in an embodiment of the present invention;
[0068] Figure 6 1 is a graph showing the online prediction result of the roll angle in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] This embodiment provides an online non-parametric modeling method for ship motion under multiple ship and multiple working conditions, such as Figure 1 As shown, the specific steps include:
[0071] S1: obtaining a four-degree-of-freedom ship motion data set based on simulation tests and actual ship tests, wherein the four-degree-of-freedom ship motion data set includes straight-line speed, lateral speed, bow angular velocity, and roll angular velocity under multiple ships and multiple working conditions;
[0072] Specifically, in this embodiment, a slender ship and the Yukun research ship were selected as research objects, and the four-degree-of-freedom motion data of the two ships were collected. The ship type of the Yukun ship is different from that of the simulation ship, and the test data are also significantly different. In addition, the real ship test data is disturbed by the random ocean environment and has a strong randomness. The use of such data can also reflect the effectiveness and universality of the method proposed in this embodiment.
[0073] S2: establishing a four-degree-of-freedom ship motion model, and establishing a non-parametric identification model based on the four-degree-of-freedom ship motion model;
[0074] S3: Establishing a hybrid kernel relevance vector machine, and using a Gaussian kernel function and a Sigmoid kernel function as kernel functions of the hybrid kernel relevance vector machine;
[0075] Specifically, due to the nonlinear hydrodynamic phenomena and the coupling effects between various ship motion states that occur during the navigation process, the ship motion is a highly nonlinear system. Therefore, in order to obtain a high-precision four-degree-of-freedom ship motion non-parametric identification model, a weighted Gaussian kernel function and a Sigmoid kernel function are introduced into the correlation vector machine, and a hybrid kernel correlation vector machine method is established, which can significantly improve the prediction accuracy and applicability of the correlation vector machine.
[0076] S4: Adaptively training the non-parametric identification model based on the hybrid kernel correlation vector machine and the four-degree-of-freedom ship motion data set to obtain a trained non-parametric identification model to complete the online ship motion non-parametric modeling process.
[0077] In a specific embodiment, the mathematical model of ship motion is a mathematical equation that describes the kinematic and dynamic behavior of a ship in a marine environment, and its accuracy directly affects the effect of navigation simulation and ship motion control. Usually, the motion of a ship is described by a geodetic coordinate system and an attached coordinate system. The three-degree-of-freedom ship motion model decomposes the fluid dynamics and torque acting on the ship into forces and torques acting on the bare hull, propeller, rudder and their mutual influence according to the physical meaning. The comparison with the self-propulsion model test or the actual ship test data shows that the three-degree-of-freedom ship motion model has a good fit. However, the three-degree-of-freedom ship motion mathematical model is usually used to describe the planar motion of the ship, and in fact, the roll has a greater impact on the stability, maneuverability and navigation safety of the ship. Therefore, this embodiment constructs a four-degree-of-freedom ship motion mathematical model based on the three-degree-of-freedom ship motion model. Specifically, in S2, the process of establishing a four-degree-of-freedom ship motion model and establishing a non-parametric identification model based on the four-degree-of-freedom ship motion model is:
[0078] The established four-degree-of-freedom ship motion model is expressed as:
[0079]
[0080] Where m is the mass of the ship, m x and m y is the additional mass, W is the displacement of the ship, and W = mg; u, v, r, and p are the straight-line speed, lateral speed, bow angular velocity, roll angle and roll angular velocity respectively; X H and Y H are the longitudinal force and transverse force acting on the bare hull, N H and K H is the pitch moment and roll moment acting on the bare hull; X P and Y P are the longitudinal and lateral forces acting on the propeller; X R and Y R are the longitudinal and lateral forces acting on the rudder, N P and K P is the pitch moment and roll moment acting on the propeller; N R and K R are the pitch and roll moments acting on the rudder; α y is m x The center coordinate on the x-axis, l x and l y m x and m y The center coordinate on the z-axis, I xx and I zz is the moment of inertia, J xx and J zz is the additional moment of inertia, is the initial stability height of the ship;
[0081] The right side of equation (1) expresses a nonlinear function related to the ship's motion state, rudder angle and rotation speed, where Y P =N P =K P = 0, which means that only the longitudinal motion is affected by the propeller. The forces and moments acting on the ship are not only related to u, v, r, and p, but also to Related.
[0082] The Euler forward difference discretization method is used to discretize equation (1) to obtain a non-parametric identification model, which is expressed as:
[0083]
[0084] In the formula, f u (·),f v (·),f r (·) and f p(·) are the non-parametric identification models of straight-line speed, lateral speed, bow angular velocity and roll angular velocity, respectively; v is the rudder angle, and h is the sampling time.
[0085] Specifically, in the ship motion modeling, by adding the consideration of the roll effect, the deficiencies of the traditional planar motion model are supplemented, thereby more comprehensively reflecting the key factors of ship motion.
[0086] In a specific embodiment, in S3, the established hybrid kernel relevance vector machine is expressed as:
[0087] t=F(x)+ε (3)
[0088]
[0089] Where F(x) is the logistic mapping function obtained based on the nonparametric identification model in equation (1); ε is the error vector and obeys the Gaussian distribution, and ε = {ε1,ε2,…ε n} T , w is the weight vector, and w={w1,w2,…w n} T , k a (x,x i ) is the kernel function; w0 is the bias, N is the total number of training samples; x is the input data of the non-parametric identification model, and t is the target value in the training sample;
[0090] The Gaussian kernel function and the Sigmoid kernel function are used as the kernel function of the hybrid kernel RVM, which is expressed as:
[0091] Kernel function k a (x,x i ) is expressed as:
[0092] k a (x,x i )=λk g (x,x i )+(1-λ)k s (x,x i ) (5)
[0093] In the formula, λ is the weight coefficient of the kernel function, k g (x,x i ) and k s (x,x i ) represent Gaussian kernel function and Sigmoid kernel function respectively.
[0094] Specifically, the hybrid kernel relevance vector machine can better handle the nonlinear problems in ship motion and has stronger sparsity and generalization capabilities.
[0095] In a specific embodiment, in S4, the process of training the non-parametric identification model based on the hybrid kernel relevance vector machine and the four-degree-of-freedom ship motion data set is:
[0096] S41: Obtain training samples and test samples based on a four-degree-of-freedom ship motion dataset;
[0097] Specifically, in this embodiment, the number of training samples selected is 100. Although more training data can improve the accuracy of the prediction model, the training time will also increase accordingly. Since the online non-parametric model has strict requirements on time, there are limitations in selecting training samples. Setting the number of training samples to 100 can save training time while ensuring prediction accuracy, and train the constructed non-parametric identification model based on the training samples and the hybrid kernel correlation vector machine to obtain the trained non-parametric identification model.
[0098] S42: inputting the training sample into the hybrid kernel relevance vector machine based on the set time window length to obtain prediction data;
[0099] S43: Based on the RMSE evaluation standard established by formula (15), compare and judge whether the root mean square error between the predicted data and the test sample in the time window exceeds the set threshold, and select the data of the first M seconds of the test sample in the current time window according to the current iteration time sequence as the new training sample, M=100, so that the model can accurately reflect the characteristics and change trends of the data, and then execute S44; otherwise, save the predicted data and execute S45;
[0100] Specifically, since the root mean square error RMSE can accurately describe the difference between the predicted value and the actual value, RMSE is used in this embodiment to determine whether the model needs to be updated. If the threshold is set too small, the model update frequency will increase; if it is set too large, the prediction accuracy will decrease. Based on multiple experimental results, the threshold is set to 0.08.
[0101] S44: Repeat S42-S43;
[0102] S45: Determine whether the test sample has been iterated. If so, end the prediction. Otherwise, use the predicted data as new input and continue to slide the time window to obtain new predicted data.
[0103] Specifically, in this embodiment, the time-consuming optimization of the optimization algorithm is compensated by adaptively updating the training samples, and because the training samples are relatively small, the training time of the non-parametric identification model is significantly reduced, and the efficiency of non-parametric identification modeling is improved, so that complex ship motion identification can be completed in real time, which is suitable for online applications. At the same time, the four-degree-of-freedom ship motion data set used to train the non-parametric identification model in this embodiment contains motion data under various working conditions, and through the adaptive update of the training samples, an online non-parametric identification model suitable for multi-ship motion prediction under multiple working conditions can be obtained.
[0104] Specifically, in this embodiment, the analysis method of capturing local features and change trends by sliding a fixed-size time window in the time series data provides a flexible and effective means for processing real-time data streams, so that modeling can be performed in a more flexible and real-time manner. Specifically, in this embodiment, based on the selected 100 training samples, the length of the sliding time window is set to 100. This allows the non-parametric identification model to be continuously updated according to the changes in the ship motion data, thereby ensuring the accuracy of long-term predictions.
[0105] Specifically, the root mean square error between the predicted data and the test sample is expressed as:
[0106] Err=RMSE s / 3 (15)
[0107] Where Err is the final calculation error, RMSE s It is the sum of the root mean square error values of the ship's four-degree-of-freedom motion prediction.
[0108] In a specific embodiment, in S42, the training sample is input into the hybrid kernel relevance vector machine to obtain the prediction data in the following process:
[0109] Assuming that the target values in the training samples are independently distributed, the likelihood estimation probability of the four-degree-of-freedom ship motion dataset is expressed as:
[0110]
[0111] In the formula, Φ={φ(x1),φ(x2),…φ(x n )} T ;φ(x n )={1,k a (x n ,x1)1,…k a (x n ,x N ) n} T ; σ 2 is the variance;
[0112] The prior distribution of the weight vector w is expressed as:
[0113]
[0114] Where α is the hyperparameter of the nonparametric identification model and is independent of each other, and α={α0,α1,…α n} T ;
[0115] Combining the prior distribution and Bayesian inference and performing hyperparameter estimation based on the four-degree-of-freedom ship motion dataset, the posterior distribution of the weight vector w is obtained, which is expressed as:
[0116]
[0117] The likelihood function for a given hyperparameter is expressed as:
[0118]
[0119] in,
[0120]
[0121] Let the derivative of formula (9) be 0, and the update formula of the hyperparameters is:
[0122]
[0123] In the formula, γ i For the corresponding w i The degree to which it is accurately determined by the data, and γ i ≡1-α i Σ ii ;
[0124] Based on the hyperparameters, prior distribution and posterior distribution determined by the hyperparameter update formula, the target value t of the ship motion test data is obtained. * The distribution of is:
[0125]
[0126] In the formula, α MP and are the maximum possible values,
[0127] Based on equations (6)-(12), the four-degree-of-freedom motion data prediction data is obtained, which is expressed as:
[0128] y * =μ T φ(x * ) (13)
[0129] In the formula, x* is the test sample data input into the nonparametric identification model.
[0130] In a specific embodiment, during the training process of the non-parametric identification model, the mean square error MSE, the root mean square error RMSE and the mean absolute error MAE are used to evaluate the accuracy of the predicted data output by the non-parametric identification model, which are respectively expressed as:
[0131]
[0132] In the formula, is the estimated value of the test data for the nonparametric identification model.
[0133] In order to verify the superiority of the method proposed in this embodiment, the motion data predicted by the non-parametric identification model established based on this method is compared with the motion data predicted by the model established using non-adaptive updating. Figure 2-Figure 6 As shown, from Figure 2-Figure 6 It can be seen from the figure that the non-parametric identification model proposed in the present invention can adaptively update the non-parametric model according to the change of data type, thereby enhancing the robustness. In contrast, the non-adaptive update scheme only learns the features of the first 100 training samples and can maintain a certain prediction accuracy for similar types of data. However, when the data changes significantly, the prediction accuracy of the non-adaptive update scheme will decrease significantly. Figure 3 and Figure 4 It can be seen from the prediction results that when the data type is a standard Z-shaped test (100s to 500s), the non-adaptive update scheme can still maintain a certain degree of accuracy. When the data type changes to a cyclic test, the model cannot make accurate predictions. Figure 2 It can be seen that due to the addition of the effect of rotation speed on the straight-line speed prediction, when the maneuvering conditions and ship types change, the proposed adaptive update scheme can obtain an accurate prediction result in a short time. However, the prediction result accuracy of the non-adaptive update scheme is poor, and even under-fitting occurs. Therefore, the theoretical analysis and simulation experimental results show that the non-parametric identification model established by the method of the present invention can accurately perform online prediction of four-degree-of-freedom ship motion data.
[0134] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, 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. An online non-parametric modeling method for ship motion under multiple ship and multiple working conditions, characterized in that: The specific steps include: S1: obtaining a four-degree-of-freedom ship motion data set based on simulation tests and actual ship tests, wherein the four-degree-of-freedom ship motion data set includes straight-line speed, lateral speed, bow angular velocity, and roll angular velocity under multiple ships and multiple working conditions; S2: establishing a four-degree-of-freedom ship motion model, and establishing a non-parametric identification model based on the four-degree-of-freedom ship motion model; S3: Establishing a hybrid kernel relevance vector machine, and using a Gaussian kernel function and a Sigmoid kernel function as kernel functions of the hybrid kernel relevance vector machine; S4: Adaptively training the non-parametric identification model based on the hybrid kernel correlation vector machine and the four-degree-of-freedom ship motion data set to obtain a trained non-parametric identification model to complete the online ship motion non-parametric modeling process.
2. The online non-parametric modeling method for ship motion under multiple ship and multiple working conditions according to claim 1 is characterized in that: In S2, a four-degree-of-freedom ship motion model is established, and a process of establishing a non-parametric identification model based on the four-degree-of-freedom ship motion model is as follows: The established four-degree-of-freedom ship motion model is expressed as: Where m is the mass of the ship, m x and m y is the additional mass, W is the displacement of the ship; u, v, r, and p are the straight-line speed, lateral speed, bow angular velocity, roll angle and roll angular velocity respectively; X H and Y H are the longitudinal force and transverse force acting on the bare hull, N H and K H is the pitch moment and roll moment acting on the bare hull; X P and Y P are the longitudinal and lateral forces acting on the propeller, N P and K P is the pitch moment and roll moment acting on the propeller; X R and Y R are the longitudinal and lateral forces acting on the rudder; N R and K R are the pitch and roll moments acting on the rudder; α y is m x The center coordinate on the x-axis, l x and l y m x and m y The center coordinate on the z-axis, I xx and I zz is the moment of inertia, J xx and J zz is the additional moment of inertia, is the initial stability height of the ship; The Euler forward difference discretization method is used to discretize equation (1) to obtain a non-parametric identification model, which is expressed as: In the formula, f u (·),f v (·),f r (·) and f p (·) are the non-parametric identification models of straight-line speed, lateral speed, bow angular velocity and roll angular velocity, respectively; h is the sampling time; δ is the rudder angle, and h is the sampling time.
3. The online non-parametric modeling method for ship motion under multiple ship and multiple working conditions according to claim 2 is characterized in that: In S3, the established hybrid kernel correlation vector machine is expressed as: t=F(x)+ε (3) Where F(x) is the logistic mapping function obtained based on the nonparametric identification model in equation (1); ε is the error vector, and ε = {ε1, ε2, ...ε n } T , w is a weight vector, and w={w1,w2,...w n } T , k a (x,x i ) is the kernel function; w0 is the bias, and N is the total number of training samples; x is the input data of the nonparametric identification model, and t is the target value in the training sample; The Gaussian kernel function and the Sigmoid kernel function are used as the kernel function of the hybrid kernel RVM, which is expressed as: Kernel function k a (x,x i ) is expressed as: k a (x, x) i )=λk g (x, x) i )+(1-λ)k s (x, x) i ) (5) In the formula, λ is the weight coefficient of the kernel function, k g (x,x i ) and k s (x,x i ) represent Gaussian kernel function and Sigmoid kernel function respectively.
4. The online non-parametric modeling method for ship motion under multiple ship and multiple working conditions according to claim 3 is characterized in that: In S4, the process of adaptively training the non-parametric identification model based on the hybrid kernel relevance vector machine and the four-degree-of-freedom ship motion data set is: S41: Obtain training samples and test samples based on a four-degree-of-freedom ship motion dataset; S42: inputting the training sample into the hybrid kernel relevance vector machine based on the set time window length to obtain prediction data; S43: Compare and determine whether the root mean square error between the predicted data and the test sample in the time window exceeds the set threshold. If yes, save the predicted data, select the data of the first M seconds of the test sample in the current time window according to the current iteration time sequence as the new training sample, and then execute S44; otherwise, save the predicted data and execute S45; S44: Repeat S42-S43; S45: Determine whether the test sample has been iterated. If so, end the prediction. Otherwise, use the predicted data as new input and continue to slide the time window to obtain new predicted data.
5. The online non-parametric modeling method for ship motion under multiple ship and multiple working conditions according to claim 4 is characterized in that: In S42, the training samples are input into the hybrid kernel relevance vector machine to obtain the prediction data in the following process: Assuming that the target values in the training samples are independently distributed, the likelihood estimation probability of the four-degree-of-freedom ship motion dataset is expressed as: In the formula, Φ={φ(x1), φ(x2),...φ(x n )} T ;φ(x n )={1,k a (x n , x1)1,...k a (x n , x N ) n } T ; σ 2 is the variance; The prior distribution of the weight vector w is expressed as: Where α is the hyperparameter of the nonparametric identification model, and α={α0,α1,...α n } T ; Combining the prior distribution and Bayesian inference, and performing hyperparameter estimation based on the four-degree-of-freedom ship motion dataset, the posterior distribution of the weight vector w is obtained, which is expressed as: The likelihood function for a given hyperparameter is expressed as: in, Let the derivative of formula (9) be 0, and the update formula of the hyperparameters is: In the formula, γ i For the corresponding w i The degree to which it is accurately determined by the data, and γ i ≡1-α i ∑ ii ; Based on the hyperparameters, prior distribution and posterior distribution determined by the hyperparameter update formula, the distribution of the target value t* of the ship motion test data is obtained as follows: In the formula, α MP and are the maximum possible values, Based on equations (6)-(12), the four-degree-of-freedom motion data prediction data is obtained, which is expressed as: y * =μ T φ(x * ) (13) Where x* is the test sample data input into the nonparametric identification model.
6. The online non-parametric modeling method for ship motion under multiple ship and multiple working conditions according to claim 5 is characterized in that: In the training process of the non-parametric identification model, the mean square error MSE, root mean square error RMSE and mean absolute error MAE are used to evaluate the accuracy of the predicted data output by the non-parametric identification model, which are expressed as: In the formula, is the estimated value of the test data for the nonparametric identification model.
7. The online non-parametric modeling method for ship motion under multiple ship and multiple working conditions according to claim 6 is characterized in that: The root mean square error between the predicted data and the test sample is expressed as: Err=RMSE s / 3 (15) Where Err is the final calculation error, RMSE s It is the sum of the root mean square error values of the ship's four-degree-of-freedom motion prediction.