A ship motion model parameter optimization method, device, equipment and storage medium
By optimizing the parameter calculation method of the ship motion model and adjusting the model parameters using recursive and update relationships, the problem of deviation between model prediction data and actual navigation data in the existing technology is solved, and high-precision prediction and stability improvement are achieved under complex working conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN ENGINEERING UNIVERSITY SANYA NANHAI INNOVATION & DEVELOPMENT BASE
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing ship motion model parameters are derived from ideal operating conditions, neglecting the complex hydrodynamic coupling effects during ship motion. This leads to deviations between predicted data and actual navigation data, affecting the accuracy of model predictions.
By acquiring the previous moment's parameter vector, the current input information matrix, and the measured information vector of the ship motion model, the parameters are optimized using recursive and update relationships, including the calculation of the difference in predicted information vectors, the iterative correction matrix, and the error matrix. The model parameters are then gradually adjusted to approximate the real hydrodynamic characteristics.
It significantly improves the prediction accuracy and stability of ship motion models under complex working conditions, reduces model prediction bias, and enhances navigation safety and handling stability.
Smart Images

Figure CN122174374A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, device, and storage medium for optimizing parameters of a ship motion model. Background Technology
[0002] With the intelligent development of the shipping industry and the continuous advancement of marine engineering technology, ship motion models have become a core foundation in fields such as ship navigation, automatic control, navigation safety assurance, and marine engineering simulation. They serve as a crucial link between theoretical research and practical navigation applications. Their application scenarios have gradually expanded to several key areas, including intelligent ship autonomous navigation, collision avoidance, autopilot development and debugging, wave navigation simulation, and port operation optimization. These models deeply support the improvement of intelligent ship control levels and are of great significance for ensuring navigation safety, reducing operating costs, and improving shipping economics. Model parameters, as a core component of ship motion models, are the key elements determining whether the model can accurately represent the actual motion state of the ship. Their accuracy directly relates to the model's predictive effectiveness regarding the ship's navigation attitude and trajectory, and is a prerequisite for ensuring the model's practicality and reliability.
[0003] However, most of the parameters of existing ship motion models are derived from ship model tests or empirical formulas under ideal working conditions. They generally suffer from oversimplification of parameter settings and neglect of complex hydrodynamic coupling effects during ship motion. This leads to deviations between the predicted data output by the ship motion model and the actual data of the ship's actual navigation, affecting the accuracy of the ship motion model prediction. Summary of the Invention
[0004] The problem addressed by this invention is how to improve the accuracy of ship motion model predictions.
[0005] To address the aforementioned problems, this invention provides a method, apparatus, device, and storage medium for optimizing ship motion model parameters.
[0006] In a first aspect, the present invention provides a method for optimizing parameters of a ship motion model, comprising: Obtain the previous parameter vector and current input information matrix of the ship motion model at the previous moment, as well as the ship's current measured information vector; The current prediction information vector is obtained by multiplying the transpose of the current input information matrix and the previous parameter vector. The current prediction deviation vector is obtained based on the difference between the current measured information vector and the current predicted information vector; The current iterative correction matrix is obtained based on the current input information matrix through a preset recursive relationship; The current error matrix is obtained based on the current input information matrix and the iterative correction matrix through a preset update relationship; The current correction parameter vector is obtained by multiplying the current error matrix, the current input information matrix, and the current measured information vector.
[0007] Optionally, the recursive relation satisfies: ; Where L(t) is the current iteration correction matrix at the current time t, P(t-1) is the error matrix at the previous time t-1, Φ(p,t) is the current input information matrix at the current time t, α(t) is the weight coefficient at the current time t, and I p Let T be the predefined identity matrix, T be the transpose, and p be the number of multiple innovations.
[0008] Optionally, the update relationship satisfies: ; Wherein, P(t) is the current error matrix, α(t) is the weight coefficient corresponding to the current time t, P(t-1) is the error matrix corresponding to the previous time t-1, L(t) is the current iteration correction matrix corresponding to the current time t, Φ(p,t) is the current input information matrix corresponding to the current time t, T is the transpose, and p is the number of multiple innovations.
[0009] Optionally, the method for updating the weight coefficients includes: Based on the current prediction deviation vector and the current measured information vector, the mean relative prediction error is obtained by dividing each element and taking the average value. Based on the current modified parameter vector and the previous parameter vector, the parameter change value is obtained by calculating the difference between each element and taking the average value. The weighting coefficients for the next time step are obtained by nonlinear weighted superposition based on the mean relative prediction error and the parameter change value.
[0010] Optionally, the method further includes: Obtain the input information vector of the ship motion model with a preset multi-information length and the measured information vector of the ship; The corresponding evaluation value is obtained by means of the input information vector, the measured information vector and the current correction parameter vector through a preset evaluation relationship; In response to the evaluation value being greater than a preset threshold, it is determined that the current correction parameter vector meets the requirements; Otherwise, it is determined that the current modified parameter vector does not meet the requirements.
[0011] Optionally, the evaluation relationship satisfies: ; Where F is the evaluation value, Yi For the i-th measured information vector, Let X be the current correction parameter vector. i Let q be the i-th input information vector, and let q be the number of multiple information vectors in the preset multiple information length, that is, the number of input information vectors collected within the preset multiple information length. The number of input information vectors is equal to the number of measured information vectors.
[0012] Optionally, the method further includes: Based on the current corrected parameter vector, the inverse parameter vector is obtained through dynamic inverse learning; The candidate parameter vector is obtained by random mutation based on the inverse parameter vector; The optimized current corrected parameter vector is obtained by population selection and updating based on the candidate parameter vector.
[0013] Secondly, the present invention provides a device for optimizing ship motion model parameters, comprising: The acquisition module is used to acquire the previous parameter vector and the current input information matrix of the ship motion model at the previous moment, as well as the current measured information vector of the ship. The processing module is used to obtain the current prediction information vector by multiplying the transpose of the current input information matrix and the previous parameter vector; The comparison module is used to obtain the current prediction deviation vector based on the difference between the current measured information vector and the current predicted information vector; The recursive module is used to obtain the current iterative correction matrix based on the current input information matrix through a preset recursive relationship; The recursive relation satisfies: ; Where L(t) is the current iteration correction matrix at the current time t, P(t-1) is the error matrix at the previous time t-1, Φ(p,t) is the current input information matrix at the current time t, α(t) is the weight coefficient at the current time t, and I p Let T be the predefined identity matrix, T be the transpose, and p be the number of multiple innovations; The update module is used to obtain the current error matrix based on the current input information matrix and the iterative correction matrix through a preset update relationship; The update relationship satisfies: ; Wherein, P(t) is the current error matrix, α(t) is the weight coefficient corresponding to the current time t, P(t-1) is the error matrix corresponding to the previous time t-1, L(t) is the current iteration correction matrix corresponding to the current time t, Φ(p,t) is the current input information matrix corresponding to the current time t, T is the transpose, and p is the number of multiple innovations; The generation module is used to obtain the current correction parameter vector based on the product of the current error matrix, the current input information matrix, and the current measured information vector.
[0014] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the ship motion model parameter optimization method as described in the first aspect when executing the computer program.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the ship motion model parameter optimization method as described in the first aspect.
[0016] The beneficial effects of the ship motion model parameter optimization method of the present invention are as follows: Obtaining the parameter vector, current input information matrix, and current measured information vector of the ship motion model allows for the complete construction of the basic data system required for parameter identification, providing reliable data support for subsequent accurate prediction and iterative correction; multiplying the transposed current input information matrix by the parameter vector yields the current prediction information vector, enabling accurate mapping calculation of the ship's motion state based on existing model parameters, providing a benchmark prediction result for deviation quantification; and subtracting the current prediction information vector from the current measured information vector yields the current prediction deviation vector, which can intuitively and accurately quantify the error between the model's predicted value and the actual motion state. This system provides a clear error guide for parameter correction. The current iterative correction matrix is obtained by using the current input information matrix through a preset recursive relationship, enabling adaptive allocation of weights for input data at different times and improving the algorithm's ability to suppress time-varying conditions and noise interference. The current error matrix is obtained by updating the current input information matrix and the iterative correction matrix according to a preset update relationship, further refining the error distribution characteristics of multi-time-time data and enhancing the targeting and rationality of parameter correction. The current correction parameter vector is obtained by multiplying the current prediction deviation vector, the current input information matrix, and the current measured information vector, allowing for dynamic adjustment of model parameters based on actual errors, gradually approximating the actual hydrodynamic characteristics of the ship. Through a closed-loop process of data acquisition, prediction calculation, deviation quantification, matrix iteration, error analysis, and parameter correction, this system fully utilizes multi-time-series information to continuously optimize ship motion model parameters, significantly reducing model prediction deviation and effectively improving the prediction accuracy, stability, and generalization ability of the ship motion model under complex conditions, thereby achieving continuous improvement in model prediction accuracy. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a method for optimizing ship motion model parameters according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a ship motion model parameter optimization device according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0019] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0020] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0023] In related technologies, most existing ship motion model parameters rely on ship model experiments or empirical formula derivations under ideal working conditions. These parameters are generally oversimplified and neglect the complex hydrodynamic coupling effects during ship motion. The actual marine environment is complex and variable; external disturbances such as wind, waves, and currents, as well as the strong coupling effects between the ship's multi-degree-of-freedom motions, are not fully reflected in traditional parameter identification. Therefore, the model parameters obtained from these methods fail to accurately reflect the ship's dynamic characteristics under complex sea conditions. This directly leads to significant deviations between the predicted attitude, trajectory, and maneuvering response data output by the ship motion model and the actual ship's navigation state, severely weakening the accuracy of model predictions. Insufficient model prediction accuracy further causes problems such as deviations in intelligent navigation control commands, increased track tracking errors, and delayed obstacle avoidance decisions. This not only fails to provide a reliable basis for autonomous ship control but also reduces navigation safety and maneuvering stability, making it difficult to meet the high-precision and high-reliability application requirements of modern intelligent ships in complex marine environments.
[0024] To address the problems existing in the aforementioned related technologies, embodiments of the present invention provide a method, apparatus, device, and storage medium for optimizing ship motion model parameters.
[0025] like Figure 1 As shown in the figure, an embodiment of the present invention provides a method for optimizing ship motion model parameters, including: S110: Obtain the previous parameter vector and current input information matrix of the ship motion model at the previous moment, as well as the ship's current measured information vector.
[0026] Specifically, in the process of optimizing ship motion model parameters, three types of core vectors need to be obtained first: the parameter vector of the ship motion model at the previous moment, the current input information matrix, and the current measured information vector. The parameter vector of the ship motion model is the core parameter set of the ship dynamics model, composed of hydrodynamic coefficients to be identified, added mass coefficients, propeller and rudder force correlation coefficients, etc., used to quantify the influence weight of each input variable on the ship's motion state. As the basis for model prediction, the parameter vector and the input information matrix undergo linear operations to output the predicted value of the ship's motion state; simultaneously, it is also the direct optimization object of the multi-innovation identification algorithm, which iteratively corrects to approximate the actual hydrodynamic characteristics. Each element in the parameter vector corresponds to a model parameter to be identified, such as longitudinal / lateral hydrodynamic coefficients, yaw moment coefficients, added mass coefficients, etc., with dimensions consistent with the feature dimensions of the input information matrix. The unified vector form facilitates matrix operations and algorithm iteration, efficiently supporting model prediction, error calculation, and parameter correction, improving the feasibility and stability of the identification process.
[0027] The current input information matrix (multi-innovation regression matrix) is a matrix formed by concatenating the input information vectors from the current time step and the previous p-1 consecutive time steps, serving as the carrier of input information in multi-innovation identification. It integrates temporal information on ship state and control inputs such as rudder angle, speed, angular velocity, and propeller speed, providing multi-time step feature data for model prediction and calculating prediction bias together with the parameter vector. Structure and content: It is an n×p dimensional matrix, where n is the dimension of the input vector at a single time step (containing multiple different input features), and p is the multi-innovation length; each column corresponds to an n-dimensional input information vector at a single time step, and each row corresponds to the historical sequence of an input feature across p time steps. Utilizing input information from multiple time steps simultaneously effectively improves the noise resistance and stability of parameter identification, while the matrix form facilitates efficient computation with the covariance matrix and correction matrix in the algorithm.
[0028] The current measured information vector (multi-inspiration measured vector) is a column vector composed of the measured values (scalars) of the ship's motion state at the current time and the previous p-1 consecutive time steps. It serves as the carrier of output information in multi-inspiration identification. It provides measured data synchronized with the input information matrix for comparison with model predictions, calculating prediction deviations and providing a target basis for iterative correction of the parameter vector. Structure and content: It is a p-dimensional column vector, where each element is a single-dimensional measured scalar of the ship's motion state at the corresponding time step (e.g., roll rate, lateral velocity), corresponding to the number p of multi-inspirations in the multi-inspiration length. Matching the multi-time step structure of the input information matrix, it allows for the simultaneous calculation of prediction deviations across multiple time steps, fully utilizing temporal correlations to improve the accuracy and convergence efficiency of parameter correction.
[0029] For example, the parameter vector of the ship motion model is the core unknown to be identified, consisting of fixed parameters such as the ship's hydrodynamic derivative, damping coefficient, and the interaction coefficient between the propeller and rudder, always maintaining a column vector form. Ship motion models include response models (KT), decomposed models (Maneuvering Modeling Group, MMG), and holistic models (Abkowitz). Taking the more complex MMG model as an example: this model decomposes the hydrodynamic forces acting on the ship into hydrodynamic forces acting on the bare hull, propeller, and rudder, and then considers the mutual interference between the three. The MMG model formula is shown below: ; Among them, I x Let I be the moment of inertia relative to the X-axis. z Let m be the moment of inertia relative to the Z-axis. x This is the additional mass relative to the X-axis. m y J is the additional mass relative to the Y-axis. x J is the additional moment of inertia relative to the X-axis. z This refers to the additional rotational inertia relative to the z-axis, which can all be estimated using conventional empirical formulas. The focus will be on identifying the right-hand side of the model, specifically the hydrodynamic forces and moments acting on the hull, propeller, and rudder: X H For the longitudinal hydrodynamics of the hull, X P X represents the longitudinal thrust of the propeller. R The longitudinal component of the force generated by the rudder, Y H For the lateral hydrodynamics of the hull, Y P Y is the lateral induced force of the propeller. R For the lateral component of the force generated by the rudder, K H For the hydrodynamic moment of the ship's roll, K P K is the propeller roll induced torque. R The rolling moment generated by the rudder, N H For the hydrodynamic torque of the bow roll, NP For the propeller's nose-roll induced torque, N R The pitching torque generated by the rudder, This is the acceleration corresponding to the ship's longitudinal velocity. This is the acceleration corresponding to the ship's lateral velocity. This is the angular acceleration corresponding to the ship's roll rate. This is the angular acceleration corresponding to the ship's bow roll rate.
[0030] In the MMG model, damping force expressions are used to describe the forces or moments of the hull, allowing for the automatic construction of detailed components for different types of ships. Therefore, the damping model should be derived from a combination of existing results, and can be expressed as: ; Wherein, coefficient X uu X uuu , ..., X uvφφ These are the hydrodynamic derivatives (ship motion model parameters) that need to be identified.
[0031] Furthermore, X H Y H K H and N H Specifically, it can be expressed as: ; Where [a1, ..., a9] corresponds to X H Nine undetermined coefficients, [b1, ..., b 16 ] Corresponding to Y H The 16 undetermined coefficients, [c1, ..., c 16 Corresponding to K H The 16 undetermined coefficients, [d1, ..., d2] 16 ] Corresponding to N H The 16 undetermined coefficients are: u, the longitudinal velocity of the ship (bow-stern direction); v, the lateral velocity of the ship (port-to-port direction); r, the angular velocity of the ship's roll (angle of rotation about the vertical axis); and p, the angular velocity of the ship's roll. The ship's roll angle.
[0032] Propeller X p Y p K p N p And Rudder X R Y R K R N R The force and torque are expressed as follows: ; ; ; Among them, X p For the longitudinal thrust generated by the propeller, t p T(J) is the propeller thrust reduction factor. p ) represents the open-water thrust of the propeller, J p Y is the propeller advance coefficient. p K is the lateral force induced by the propeller. p The rolling moment is N. p For the initial rocking torque, X R The longitudinal component of the force generated by the rudder, Y R For the lateral component, K R The rolling moment is N. R For the initial rocking torque, t R F is the rudder thrust reduction factor. N The normal force of the rudder is δ, the rudder angle is a. H Z is the lateral force interference coefficient of the hull on the rudder force. HR Let x be the vertical coordinate of the point of application of the hull-rudder interference force. R x is the longitudinal coordinate of the point of application of the rudder force. H The equivalent longitudinal position of the hull to the rudder force interference, ρ is the seawater density, n is the propeller speed, and D p K is the diameter of the propeller. T (J p J0, J1, and J2 are the propeller thrust coefficients, which are obtained by polynomial fitting. J0, J1, and J2 are the polynomial fitting constants of the thrust coefficients, respectively.
[0033] Furthermore, standard ship maneuvering experiments were conducted, and experimental data was collected. The requirements were to incorporate weather forecast information to obtain the wind and wave environment and tidal conditions of the test sea area, selecting relatively calm waters and sea state level 3 for the actual ship maneuvering tests, such as full-turn experiments at various rudder angles, to obtain a real-scale ship maneuvering dataset. The ship maneuvering dataset mainly consisted of ship sensor data, including global navigation satellite system data, inertial navigation data, and radar data. Data affecting ship motion characteristics were extracted, including eight items: roll angle, bow angle, pitch speed, sway speed, position latitude and longitude, control command rudder angle, and speed. To filter out the influence of currents, completely calm conditions were almost impossible in a real ocean environment; there was usually some environmental interference. During the turning test, the trajectories could not coincide, and the environmental force would cause the ship to deviate in a certain direction. It was generally assumed that the environmental forces would not change significantly over a period of time; therefore, the environmental interference could be treated as an "environmental flow" applied to the ship, and corrections were made based on this "environmental flow" to obtain ship turning data similar to a still water test.
[0034] First, the tangent angle of the actual flight path needs to be calculated based on the position data (X, Y) collected from GPS data: ; in, For the actual tangent angle of navigation, (X) t Y t (X) represents the position at the current time t. t+1 Y t+1 () represents the position at the current time t+1.
[0035] Find the time when the next round of cutting angle is the same, and record the time for one round of rotation under this condition. If t is the positional offset within each revolution circle under the influence of the flow, then the average flow velocity at the current position can be calculated as follows: ; Among them, (V) cx V cy V is the average velocity vector of the ship over a period of time. cx V is the average longitudinal velocity component. cy The average lateral velocity component, Δt is the single sampling time step (time interval), i is the discrete time step index, i=0 is the start time of the calculation for this segment, (X i Y i ) represents the planar position coordinates of the ship at time i (X is the longitudinal coordinate, Y is the lateral coordinate), (X... i+Δt Y i+Δt ) represents the planar position coordinates of the ship at time i+Δt.
[0036] S120, the current prediction information vector is obtained by multiplying the transpose of the current input information matrix and the previous parameter vector.
[0037] S130, the current prediction deviation vector is obtained based on the difference between the current measured information vector and the current predicted information vector.
[0038] Specifically, data initialization includes initializing the multi-innovation length *p*, whose size is related to computational complexity, convergence speed, and stability. The multi-innovation length is determined by using the innovations from the current time step and *p* consecutive time steps in the historical data during each parameter update step; the number of consecutively used data points is *p*. The parameter vector to be identified is then initialized. The initial value is typically set to an order of magnitude close to zero or an empirical value; the covariance matrix P(0) is initialized, which is generally the identity matrix multiplied by a coefficient of one order of magnitude; the initial value of the variable forgetting factor λ0 (0 < λ0 < 1) is initialized; the weighting factor K for the influence of model error and parameter variation on the forgetting factor is initialized. E and K θ .
[0039] Furthermore, assuming a step size of 1 and a starting time of [time value missing], the deviation at time [time value missing] can be calculated. The current prediction deviation vector then satisfies: ; Where E(p,t) is the current prediction bias vector at time t. Let t be the previous parameter vector corresponding to the previous time t-1, i.e. the estimated value of the identification parameter θ, T be the transpose, Y(p,t) be the current measured information vector corresponding to the current time t, and Φ(p,t) be the current input information matrix corresponding to the current time t. The above vectors have been extended accordingly based on the length of the multiple information.
[0040] For example, the current measured information vector satisfies: ; Where y(t), y(t) 1), ..., y(t) (p+1) represents the single-dimensional measured output values at p consecutive time points, such as the ship's roll rate and lateral velocity. Each value is a scalar, corresponding to the measured results of the same motion state at different time points. R p It is a matrix composed of p-dimensional real vectors (column vectors).
[0041] The current input information matrix satisfies: ; in, This represents the regression vector (i.e., the information vector for each corresponding time step) from the current time step t. The expanded form of this current input information matrix can be an n×P matrix R, where n rows are the dimension of each regression vector and p are the columns (the number of multiple innovations). For example, the regression vector at the current time step t... It contains n data points, such as rudder angle, speed, angular velocity, and other ship status and control information.
[0042] S140, the current iterative correction matrix is obtained based on the current input information matrix through a preset recursive relationship.
[0043] Specifically, the generation of the current iteration correction matrix is the core step in parameter updating. This matrix quantifies the influence weights of current and historical input information on the parameter iteration direction and step size, providing a foundation for subsequent parameter vector correction. Based on a pre-defined recursive relationship, and combined with control parameters such as the variable forgetting factor or multiple innovation length, the input information matrix is updated and corrected using a recursive least squares algorithm (such as VFF-MIRLS) to finally obtain the current iteration correction matrix. This matrix reflects the statistical characteristics of the input data at different times, balances the influence of historical and current data on the identification results, effectively suppresses noise and outlier interference, provides a reliable basis for the direction and step size of subsequent parameter vector iteration correction, and improves the stability and convergence speed of model parameter identification.
[0044] Optionally, the recursive relation satisfies: ; Where L(t) is the current iteration correction matrix at the current time t, P(t-1) is the error matrix at the previous time t-1, Φ(p,t) is the current input information matrix at the current time t, α(t) is the weight coefficient at the current time t, and I p Let T be the predefined identity matrix, T be the transpose, and p be the number of multiple innovations.
[0045] S150, the current error matrix is obtained based on the current input information matrix and the iterative correction matrix through a preset update relationship.
[0046] Specifically, the generation of the current error matrix is a crucial step in the iterative parameter correction process. It constructs a quantified matrix reflecting the deviation between model predictions and measured data through a pre-defined update relationship between the current input information matrix and the iterative correction matrix, providing a basis for subsequent parameter calibration. Specifically, the current input information matrix contains multi-time-step sequences of ship state and control information such as rudder angle, speed, and angular velocity. The iterative correction matrix is a weight matrix obtained through recursive updates based on covariance. Both are processed using a pre-defined linear update relationship (such as the gain calculation rule in the multi-innovation recursive least squares algorithm). By combining the input information with the correction weights, the residual sequence between the model output and the measured data is calculated, ultimately forming the current error matrix. This matrix simultaneously reflects the prediction deviations of the current moment and historical multi-step data, effectively balancing noise interference and model dynamic changes, providing precise error guidance for the iterative correction of parameter vectors, and improving the stability and convergence efficiency of ship motion model parameter identification.
[0047] Optionally, the update relationship satisfies: ; Wherein, P(t) is the current error matrix, α(t) is the weight coefficient corresponding to the current time t, P(t-1) is the error matrix corresponding to the previous time t-1, L(t) is the current iteration correction matrix corresponding to the current time t, Φ(p,t) is the current input information matrix corresponding to the current time t, T is the transpose, and p is the number of multiple innovations.
[0048] S160, the current correction parameter vector is obtained by multiplying the current error matrix, the current input information matrix, and the current measured information vector.
[0049] Specifically, using the current error matrix as the error guide, and combining the current input information matrix and the current measured information vector, parameters are updated through a pre-defined matrix operation relationship, allowing the model parameters to gradually approximate the actual hydrodynamic characteristics of the ship. Specifically, the current error matrix represents the error sequence between the model's predicted output and the actual ship's measured motion state; the current input information matrix integrates ship state and control input features such as rudder angle, speed, and angular velocity at multiple times; and the current measured information vector provides actual ship motion state observation data synchronized with the input information time sequence. These three elements undergo matrix operations through a pre-defined update relationship. Utilizing the quantized error gradient and combining the statistical characteristics of the input matrix and the measured vector, the correction direction and step size are determined, resulting in the current corrected parameter vector. This corrected parameter vector effectively utilizes input and output information from multiple times, balances the influence of historical and current data on the identification results, suppresses noise and outlier interference, improves the convergence speed and stability of ship motion model parameter identification, and provides a reliable parameter foundation for improving subsequent model prediction accuracy.
[0050] For example, the current correction parameter vector satisfies: ; in, Let P(t) be the current correction parameter vector corresponding to the current time t, P(t) be the current error matrix corresponding to the current time t, Φ(p,t) be the current input information matrix corresponding to the current time t, and Y(t) be the current measured information vector corresponding to the current time t.
[0051] In this embodiment, obtaining the previous parameter vector, the current input information matrix, and the current measured information vector of the ship motion model allows for the complete construction of the basic data system required for parameter identification, providing reliable data support for subsequent accurate prediction and iterative correction. Transposing the current input information matrix and multiplying it by the previous parameter vector yields the current prediction information vector, enabling accurate mapping calculation of the ship's motion state based on existing model parameters, providing a benchmark prediction result for deviation quantification. Subtracting the current prediction information vector from the current measured information vector yields the current prediction deviation vector, which can intuitively and accurately quantify the error between the model's predicted value and the actual motion state, providing a basis for parameter correction. It provides a clear error guidance system; by utilizing the current input information matrix through a preset recursive relationship to obtain the current iterative correction matrix, it can adaptively allocate the weights of input data at each time step, improving the algorithm's ability to suppress time-varying operating conditions and noise interference; by obtaining the current error matrix through the current input information matrix and the iterative correction matrix according to a preset update relationship, it can further refine the error distribution characteristics of multi-time-step data, enhancing the pertinence and rationality of parameter correction; based on the product of the current error matrix, the current input information matrix, and the current measured information vector, it obtains the current correction parameter vector, which can dynamically adjust the model parameters according to the actual error, making the parameters gradually approximate the actual hydrodynamic characteristics of the ship. Through a closed-loop process of data acquisition, prediction calculation, deviation quantification, matrix iteration, error analysis, and parameter correction, it fully utilizes multi-time-step time-series information to continuously optimize the ship motion model parameters, significantly reducing model prediction deviation, and effectively improving the prediction accuracy, stability, and generalization ability of the ship motion model under complex operating conditions, thereby achieving a continuous improvement in model prediction accuracy.
[0052] Optionally, the method for updating the weight coefficients includes: Based on the current prediction deviation vector and the current measured information vector, the mean relative prediction error is obtained by dividing each element and taking the average value. Based on the current modified parameter vector and the previous parameter vector, the parameter change value is obtained by calculating the difference between each element and taking the average value. The weighting coefficients for the next time step are obtained by nonlinear weighted superposition based on the mean relative prediction error and the parameter change value.
[0053] For example, the weighting coefficients at the next time step satisfy: ; Where α(t) is the updated weight coefficient corresponding to the next time step t+1, λ0 is the preset baseline forgetting factor, and k EThe preset error term weighting factor is tanh(), which is the hyperbolic tangent activation function. p is the number of elements in the current prediction bias vector E(p,t), i.e., the number of corresponding multiple innovation elements. The number of elements in the current measured information vector Y(t) is related to the number of elements in the current prediction bias vector E(p,t). t The number of elements in E is equal. m,t Y is the m-th element in the current prediction deviation vector E(p,t) corresponding to the current time t. m,t Let k be the m-th element in the current measured information vector Y(p,t) corresponding to the current time t. θ Here, n represents the preset weighting coefficient for the parameter change rate term, and n is the number of parameters in the parameter vector. This refers to the g-th parameter in the current correction parameter vector corresponding to the current time t. It is the g-th parameter in the parameter vector corresponding to the previous time t-1.
[0054] In this optional embodiment, based on the current prediction deviation vector and the current measured information vector, the ratio of prediction deviation to measured information is calculated element by element, and then the average of all element ratios is taken to obtain the mean relative prediction error reflecting the overall fitting deviation of the model. Simultaneously, based on the current correction parameter vector and the previous parameter vector, the difference between the current parameter and the previous parameter is calculated element by element and divided by the corresponding previous parameter element, and then the average of the relative change rates of all parameters is taken to obtain the parameter change value reflecting the drasticness of parameter updates. Finally, the mean relative prediction error and the parameter change value are respectively subjected to nonlinear transformation by the hyperbolic tangent function, and then weighted and superimposed by preset error term weights and parameter term weights to synthesize the weight coefficients for the next time step, realizing adaptive weight update based on model prediction accuracy and parameter stability.
[0055] Optionally, the method further includes: Obtain the input information vector of the ship motion model with a preset multi-information length and the measured information vector of the ship; The corresponding evaluation value is obtained by means of the input information vector, the measured information vector and the current correction parameter vector through a preset evaluation relationship; In response to the evaluation value being greater than a preset threshold, it is determined that the current correction parameter vector meets the requirements; Otherwise, it is determined that the current modified parameter vector does not meet the requirements.
[0056] Optionally, the evaluation relationship satisfies: ; Where F is the evaluation value, Y i For the i-th measured information vector, Let X be the current correction parameter vector. i Let q be the i-th input information vector, and let q be the number of multiple information vectors in the preset multiple information length, that is, the number of input information vectors collected within the preset multiple information length. The number of input information vectors is equal to the number of measured information vectors.
[0057] In this optional embodiment, based on a preset multi-information length, ship motion state data for the current moment and the preceding q-1 consecutive historical moments are collected. This constructs a multi-information input information vector containing input quantities such as rudder angle, speed, and angular velocity, and a multi-information measured information vector containing measured values of ship motion state such as heading angle, lateral speed, and bow angle. This forms a multi-information data window corresponding to the current moment, providing data support for subsequent model prediction, error calculation, and parameter identification. Then, based on the current input vector, the current measured information vector, and the current corrected parameter vector, calculations are performed according to a preset evaluation relationship to obtain an evaluation value used to measure the parameter identification effect and model prediction accuracy. This evaluation value comprehensively reflects the degree of agreement between the model output after parameter correction and the measured state. Subsequently, this evaluation value is compared with a preset threshold. When the evaluation value is greater than the preset threshold, it indicates that the current corrected parameter vector has high accuracy and can accurately represent the actual motion characteristics of the ship, thus meeting the actual usage requirements. If the evaluation value is not greater than the preset threshold, it indicates that the current parameter identification accuracy is insufficient, the model prediction error is still large, and the current corrected parameter vector does not meet the requirements, necessitating further iterative optimization.
[0058] Optionally, the method further includes: Based on the current corrected parameter vector, the inverse parameter vector is obtained through dynamic inverse learning; The candidate parameter vector is obtained by random mutation based on the inverse parameter vector; The optimized current corrected parameter vector is obtained by population selection and updating based on the candidate parameter vector.
[0059] Specifically, firstly, based on the current corrected parameter vector, a reverse parameter vector is generated through a dynamic reverse learning mechanism. This process expands the search range by utilizing the reverse symmetric points of the current parameters in the solution space, enhancing the algorithm's ability to explore the solution space and avoiding getting trapped in local optima. Subsequently, a random mutation operation is performed based on the reverse parameter vector, generating candidate parameter vectors by introducing random perturbations, further enhancing the diversity of the population and reducing the risk of premature convergence. Finally, through a population optimization update strategy, the individual with the best fitness is selected from the set containing the current corrected parameter vector, the reverse parameter vector, and the candidate parameter vectors, and this is used to update the optimized current corrected parameter vector. This process effectively balances the algorithm's exploration and development capabilities by combining global exploration through reverse learning, diversity enhancement through random mutation, and directional convergence through population optimization, improving the convergence speed and global optimization ability of ship motion model parameter identification, and providing reliable parameter assurance for the continuous improvement of model prediction accuracy.
[0060] For example, the current correction parameter vector for the three key hydrodynamic coefficients of the ship's MMG model is as follows: ; The multiple information length p=5 is currently undergoing the t-th iteration optimization.
[0061] First, dynamic directional learning is performed. The core idea of reverse learning is to generate a "reverse" parameter vector within the feasible range of the current corrected parameters, to break out of the current local optimum and explore a better solution.
[0062] Assume the theoretical range of these three parameters is: Nv∈[-1.0,0], Nr∈[-1.5,0], Yv∈[-0.8,0] The formula for dynamic back-learning can be expressed as: ; Substitute numerical values into the calculation: ; Where b1 is the lower bound of the parameter and b2 is the upper bound of the parameter. This is the reverse parameter vector, which represents the reverse position of the current parameter vector within its value range, and is used to expand the search range.
[0063] Then, random mutation (such as Cauchy mutation) is performed. The purpose of random mutation is to introduce random perturbation on the basis of the inverse parameter vector to further explore the neighborhood space and avoid the algorithm from getting stuck.
[0064] Assume the mutation formula is: ; Where β is the variable length (e.g., 0.1), and randn is a random number that follows a standard normal distribution.
[0065] Substitute the inverse parameter vector into the calculation (assuming the random number is [0.05, ...). 0.03, 0.02]): ; Thus obtained It is the candidate parameter vector, which adds random variations to the inverse parameter and provides a new parameter candidate.
[0066] Finally, a population-based optimization update is performed. The core of the population-based optimization update is to compare the performance of the current corrected parameter vector and the candidate parameter vectors, and select the one with the smaller error as the new current parameter vector.
[0067] The estimation error satisfies: ; Among them, J e This is for estimating the error.
[0068] Then the current correction parameter vector The estimation error is 12.5. Candidate parameter vector The estimation error is 9.8%. Since 9.8 < 12.5, this indicates that the candidate parameter vector has a smaller prediction error and better performance. Therefore, the optimized current corrected parameter vector is: ; This completes a parameter optimization update based on reverse learning and random mutation.
[0069] Furthermore, it also includes PID control, which constructs a PID controller based on the optimized current correction parameter vector. The deviation between the setpoint of the ship's motion state and the multi-information measured output vector is used as input, and the control quantity is generated through proportional, integral, and derivative operations. The proportional, integral, and derivative coefficients of the PID controller are obtained by mapping the optimized correction parameter vector, and adaptive optimization of PID parameters is achieved by combining dynamic back learning, random mutation, and population selection mechanisms. The control quantity is applied to the controlled ship to generate new measured data, and the measured data is fed back to the multi-information identification stage to correct the model parameter vector, forming a closed-loop control process of "parameter identification - parameter optimization - PID control - data feedback". This eliminates the steady-state error of the system, suppresses dynamic overshoot and the influence of external disturbances, improves the accuracy of ship motion model parameter identification and control robustness, and achieves stable control of the ship's motion state under complex working conditions.
[0070] like Figure 2As shown in the figure, an embodiment of the present invention provides a ship motion model parameter optimization device 200, comprising: The acquisition module 210 is used to acquire the previous parameter vector and the current input information matrix of the ship motion model at the previous moment, as well as the current measured information vector of the ship. Processing module 220 is used to obtain the current prediction information vector based on the product of the transpose of the current input information matrix and the previous parameter vector; Comparison module 230 is used to obtain the current prediction deviation vector based on the difference between the current measured information vector and the current predicted information vector; The recursive module 240 is used to obtain the current iterative correction matrix based on the current input information matrix through a preset recursive relationship; The recursive relation satisfies: ; Where L(t) is the current iteration correction matrix at the current time t, P(t-1) is the error matrix at the previous time t-1, Φ(p,t) is the current input information matrix at the current time t, α(t) is the weight coefficient at the current time t, and I p Let T be the predefined identity matrix, T be the transpose, and p be the number of multiple innovations; The update module 250 is used to obtain the current error matrix based on the current input information matrix and the iterative correction matrix through a preset update relationship; The update relationship satisfies: ; Wherein, P(t) is the current error matrix, α(t) is the weight coefficient corresponding to the current time t, P(t-1) is the error matrix corresponding to the previous time t-1, L(t) is the current iteration correction matrix corresponding to the current time t, Φ(p,t) is the current input information matrix corresponding to the current time t, T is the transpose, and p is the number of multiple innovations; The generation module 260 is used to obtain the current correction parameter vector based on the product of the current error matrix, the current input information matrix and the current measured information vector.
[0071] The ship motion model parameter optimization device of this embodiment is used to implement the ship motion model parameter optimization method as described above. Its advantages over the prior art are the same as the advantages of the ship motion model parameter optimization method over the prior art, and will not be repeated here.
[0072] like Figure 3As shown, an electronic device 300 provided in this embodiment of the invention includes a memory 310 and a processor 320; the memory 310 is used to store a computer program; the processor 320 is used to implement the ship motion model parameter optimization method as described above when the computer program is executed.
[0073] Alternatively, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when the computer program is executed: Obtain the previous parameter vector and current input information matrix of the ship motion model at the previous moment, as well as the ship's current measured information vector; The current prediction information vector is obtained by multiplying the transpose of the current input information matrix and the previous parameter vector. The current prediction deviation vector is obtained based on the difference between the current measured information vector and the current predicted information vector; The current iterative correction matrix is obtained based on the current input information matrix through a preset recursive relationship; The current error matrix is obtained based on the current input information matrix and the iterative correction matrix through a preset update relationship; The current correction parameter vector is obtained by multiplying the current error matrix, the current input information matrix, and the current measured information vector.
[0074] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the ship motion model parameter optimization method described above.
[0075] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: Obtain the previous parameter vector and current input information matrix of the ship motion model at the previous moment, as well as the ship's current measured information vector; The current prediction information vector is obtained by multiplying the transpose of the current input information matrix and the previous parameter vector. The current prediction deviation vector is obtained based on the difference between the current measured information vector and the current predicted information vector; The current iterative correction matrix is obtained based on the current input information matrix through a preset recursive relationship; The current error matrix is obtained based on the current input information matrix and the iterative correction matrix through a preset update relationship; The current correction parameter vector is obtained by multiplying the current error matrix, the current input information matrix, and the current measured information vector.
[0076] The present invention will now be described an electronic device 300 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0077] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0078] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0079] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A method for optimizing parameters of a ship motion model, characterized in that, include: Obtain the previous parameter vector and current input information matrix of the ship motion model at the previous moment, as well as the ship's current measured information vector; The current prediction information vector is obtained by multiplying the transpose of the current input information matrix and the previous parameter vector. The current prediction deviation vector is obtained based on the difference between the current measured information vector and the current predicted information vector; The current iterative correction matrix is obtained based on the current input information matrix through a preset recursive relationship; The current error matrix is obtained by using the current input information matrix and the iterative correction matrix through a preset update relationship; The current correction parameter vector is obtained by multiplying the current error matrix, the current input information matrix, and the current measured information vector. The recursive relation satisfies: ; Where L(t) is the current iteration correction matrix at the current time t, P(t-1) is the error matrix at the previous time t-1, Φ(p,t) is the current input information matrix at the current time t, α(t) is the weight coefficient at the current time t, and I p Let T be the predefined identity matrix, T be the transpose, and p be the number of multiple innovations; The update relationship satisfies: ; Wherein, P(t) is the current error matrix, α(t) is the weight coefficient corresponding to the current time t, P(t-1) is the error matrix corresponding to the previous time t-1, L(t) is the current iteration correction matrix corresponding to the current time t, Φ(p,t) is the current input information matrix corresponding to the current time t, T is the transpose, and p is the number of multiple innovations.
2. The method for optimizing ship motion model parameters according to claim 1, characterized in that, The method for updating the weight coefficients includes: Based on the current prediction deviation vector and the current measured information vector, the mean relative prediction error is obtained by dividing each element and taking the average value. Based on the current modified parameter vector and the previous parameter vector, the parameter change value is obtained by calculating the difference between each element and taking the average value. The weighting coefficients for the next time step are obtained by nonlinear weighted superposition based on the mean relative prediction error and the parameter change value.
3. The method for optimizing ship motion model parameters according to claim 1, characterized in that, Also includes: Obtain the input information vector of the ship motion model with a preset multi-information length and the measured information vector of the ship; The corresponding evaluation value is obtained by means of the input information vector, the measured information vector and the current correction parameter vector through a preset evaluation relationship; In response to the evaluation value being greater than a preset threshold, it is determined that the current correction parameter vector meets the requirements; Otherwise, it is determined that the current modified parameter vector does not meet the requirements.
4. The method for optimizing ship motion model parameters according to claim 3, characterized in that, The evaluation relationship satisfies: ; Where F is the evaluation value, Y i For the i-th measured information vector, Let X be the current correction parameter vector. i Let q be the i-th input information vector, and let q be the number of multiple information vectors in the preset multiple information length, that is, the number of input information vectors collected within the preset multiple information length. The number of input information vectors is equal to the number of measured information vectors.
5. The method for optimizing ship motion model parameters according to claim 1, characterized in that, Also includes: Based on the current corrected parameter vector, the inverse parameter vector is obtained through dynamic inverse learning; The candidate parameter vector is obtained by random mutation based on the inverse parameter vector; The optimized current corrected parameter vector is obtained by population selection and updating based on the candidate parameter vector.
6. A device for optimizing parameters of a ship motion model, characterized in that, include: The acquisition module is used to acquire the previous parameter vector and the current input information matrix of the ship motion model at the previous moment, as well as the current measured information vector of the ship. The processing module is used to obtain the current prediction information vector by multiplying the transpose of the current input information matrix and the previous parameter vector; The comparison module is used to obtain the current prediction deviation vector based on the difference between the current measured information vector and the current predicted information vector; The recursive module is used to obtain the current iterative correction matrix based on the current input information matrix through a preset recursive relationship; The recursive relation satisfies: ; Where L(t) is the current iteration correction matrix at the current time t, P(t-1) is the error matrix at the previous time t-1, Φ(p,t) is the current input information matrix at the current time t, α(t) is the weight coefficient at the current time t, and I p Let T be the predefined identity matrix, T be the transpose, and p be the number of multiple innovations; The update module is used to obtain the current error matrix based on the current input information matrix and the iterative correction matrix through a preset update relationship; The update relationship satisfies: ; Wherein, P(t) is the current error matrix, α(t) is the weight coefficient corresponding to the current time t, P(t-1) is the error matrix corresponding to the previous time t-1, L(t) is the current iteration correction matrix corresponding to the current time t, Φ(p,t) is the current input information matrix corresponding to the current time t, T is the transpose, and p is the number of multiple innovations; The generation module is used to obtain the current correction parameter vector based on the product of the current error matrix, the current input information matrix, and the current measured information vector.
7. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the ship motion model parameter optimization method as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the parameter optimization method for the ship motion model as described in any one of claims 1 to 5.