A ship motion modeling method based on sensitivity driving and improved sparrow algorithm

By adopting a ship motion modeling method based on sensitivity-driven and improved sparrow algorithm, the problems of model instability and local optima in complex sea conditions of traditional gray box identification technology are solved, and high-precision ship motion modeling and prediction are achieved.

CN122426366APending Publication Date: 2026-07-21DALIAN MARITIME UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN MARITIME UNIVERSITY
Filing Date
2026-04-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional gray box identification techniques are prone to high-order extrapolation instability due to model structural redundancy under complex sea conditions, and parameter identification is prone to getting trapped in local optima, making it difficult to adaptively characterize nonlinear coupling effects and improve prediction accuracy.

Method used

The ship motion modeling method based on sensitivity-driven and improved sparrow search algorithm constructs a generalized polynomial structure model and a time-domain sensitivity loss function, removes redundant cross terms, and introduces the enhanced sparrow search algorithm (ESSA) for parameter identification, thereby realizing the construction of a global sensitivity surface and accurate identification of hydrodynamic parameters.

Benefits of technology

It improves the structural stability and parameter identification accuracy of the model, enabling high-precision ship motion prediction under extreme sea conditions. It also has cross-condition generalization capability and small-sample anti-drift extrapolation capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122426366A_ABST
    Figure CN122426366A_ABST
Patent Text Reader

Abstract

The application discloses a ship motion modeling method based on sensitivity driving and improved sparrow algorithm, and the method comprises the following steps: constructing a generalized polynomial structure model of a third-order hydrodynamic basic candidate library comprising ship operation data; constructing a global average sensitivity loss function corresponding to a global sensitivity surface for representing nonlinear hydrodynamic parameters; obtaining core hydrodynamic parameters satisfying a preset loss threshold value according to a loss value of the global average sensitivity loss function; obtaining a simplified model based on the generalized polynomial structure model and the obtained core hydrodynamic parameters; identifying the core hydrodynamic parameters in the simplified model based on an enhanced sparrow search algorithm to obtain a ship motion identification model, and then realizing ship motion modeling based on sensitivity driving and the improved sparrow algorithm. The application solves the problem that the existing method is difficult to self-adaptively depict the nonlinear coupling effect under complex navigation conditions, and limits the prediction accuracy and generalization ability of the model under severe sea conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship gray box identification and modeling technology, and in particular to a ship motion modeling method based on sensitivity-driven and improved sparrow algorithm. Background Technology

[0002] With globalization and technological innovation, the shipping industry is undergoing rapid digital and intelligent transformation. Ship motion mathematical models, as a key tool connecting maritime practice and intelligent control, provide core scientific basis for ship control and route optimization. Establishing high-precision ship maneuvering motion mathematical models is generally divided into mechanistic modeling and identification modeling. Compared to mechanistic modeling, system identification modeling (i.e., gray-box or black-box modeling) only requires some ship dimensions and motion data to establish a high-precision model, offering advantages such as fewer required experiments and less computation, and has become a research hotspot in this field.

[0003] Traditional gray box identification technology often relies heavily on [the following] in practical applications. Rigid mathematical structures such as models or MMG-separated models are used. However, in real marine environments, ship motion is deeply coupled with complex natural environmental disturbances such as wind, waves, and currents. These traditional mechanistic models with fixed priors, due to the introduction of many still water assumptions in their derivation, are difficult to adaptively characterize the nonlinear coupling effects under complex navigation conditions, thus limiting the model's prediction accuracy and generalization ability under severe sea conditions.

[0004] Existing ship ash box identification and modeling technologies face two major technical bottlenecks that urgently need to be overcome in practical engineering applications: (1) Redundancy in model structure can easily lead to instability in higher-order extrapolations (model topology rigidity problem). Traditional fixed models (such as...) The model contains a large number of high-order Taylor expansions. Under complex sea conditions, these redundant nonlinear cross terms are prone to overfitting environmental noise (such as wind and wave excitation forces) as effective hydrodynamic characteristics. When the model is used for long-term simulations or generalization of unknown operating conditions, these redundant structures can lead to severe error accumulation and distortion of dynamic response, and may even cause integral divergence.

[0005] (2) Parameter identification under strong interference is prone to getting trapped in local optima (a multidimensional, multi-peak solution space optimization problem). Ship hydrodynamic parameter identification is essentially a non-stationary, high-dimensional, complex optimization problem. Under actual ship navigation or extremely harsh sea conditions (such as anchor dragging), the data is coupled with strong nonlinear mutation features, resulting in a highly non-convex and ill-conditioned solution space. Traditional swarm intelligence optimization algorithms (such as the original Sparrow Search Algorithm (SSA) and Particle Swarm Optimization Algorithm (PSO)) are prone to losing population diversity in the later stages of iteration, getting trapped in local minima, causing the calculated hydrodynamic parameters to deviate from the actual physical base, resulting in prediction failure. Summary of the Invention

[0006] This invention provides a ship motion modeling method based on sensitivity-driven and improved sparrow algorithm to overcome the above-mentioned technical problems.

[0007] To achieve the above objectives, the technical solution of the present invention is as follows: A method for modeling ship motion based on sensitivity-driven and improved sparrow algorithm, comprising the following steps: S1: By introducing unconstrained ship motion functional equations, a generalized polynomial structure model of a third-order hydrodynamic fundamental candidate library including ship operation data is constructed. The ship's operational data includes forward speed, lateral speed, bow turning rate, rudder angle, heading, and main engine speed; S2: Based on the generalized polynomial structure model, construct the time-domain sensitivity loss function for the coordinated three degrees of freedom of ship motion; and based on the time-domain sensitivity loss function, construct the global sensitivity surface for characterizing nonlinear hydrodynamic parameters, and the corresponding global average sensitivity loss function. S3: Based on the loss value of the global average sensitivity loss function, obtain the core hydrodynamic parameters of the ship's three degrees of freedom that satisfy the preset loss threshold, and obtain a simplified model based on the core hydrodynamic parameters obtained from the generalized polynomial structure model. S4: Construct an enhanced sparrow search algorithm by improving the sparrow algorithm; identify the core hydrodynamic parameters in the simplified model based on the enhanced sparrow search algorithm to obtain the ship motion identification model, and then realize ship motion modeling based on sensitivity drive and improved sparrow algorithm.

[0008] Furthermore, the generalized polynomial structure model of the third-order hydrodynamic fundamental candidate library constructed in S1, which includes ship operation data, is as follows:

[0009]

[0010] In the formula: This represents the output of the functional equations for ship motion. express The first derivative; This represents the candidate pool for third-order hydrodynamic foundations; Indicates forward speed; Indicates lateral speed; Indicates the angular velocity of the bow turn; Represents the rudder angle; Indicates the course; Indicates the engine speed; This represents the matrix of coefficients to be identified using the iterative least squares method to determine the distribution. Represents the elements of the coefficient matrix to be identified; express The first derivative; C This represents the design constant.

[0011] Furthermore, step S2 specifically includes the following steps: S21: Based on the generalized polynomial structure model, the time-domain sensitivity loss function for the coordinated three degrees of freedom of ship motion is constructed as follows:

[0012] In the formula: These represent the forward velocity, lateral velocity, and turning angular velocity, respectively, for the first... Sensitivity loss function for hydrodynamic parameters; Represents the discrete sampling time in the ship motion time series data and ; Represents the period of discrete sampling time; This represents the ship's actual motion state in the time domain; Indicates when the first After the hydrodynamic coefficient changes, the solution obtained by numerical integration of the ship's motion differential equations is the first... The reconstructed predicted value at the sampling time; These represent the values ​​applied to the forward, lateral, and turning degrees of freedom after being changed according to preset percentages. Hydrodynamic coefficient; S22: Based on the time-domain sensitivity loss function, a global sensitivity surface is constructed to characterize nonlinear hydrodynamic parameters. The corresponding global average sensitivity loss function is:

[0013] In the formula: The numbers representing the forward velocity, lateral velocity, and turning angular velocity are respectively... The average sensitivity loss function of the hydrodynamic parameters; These represent the forward speed at the th... The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; These represent the lateral velocity at the th... The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; These represent the turning angular velocities at the twentieth minute. The sensitivity loss function corresponding to the changes in the hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively.

[0014] Furthermore, step S3 specifically includes the following steps: S31: Obtain the loss sequence table for the three degrees of freedom of ship motion based on the loss value of the global average sensitivity loss function and sort them in descending order according to the loss value; S32: Based on the loss sequence list, set a preset loss threshold; and obtain the core hydrodynamic parameters of the ship's three degrees of freedom that satisfy the preset loss threshold according to the loss sequence list; S33: Based on the generalized polynomial structure model, only the core hydrodynamic parameters are retained while the rest of the hydrodynamic parameters are discarded, so as to obtain a simplified model containing only the core hydrodynamic parameters.

[0015] Furthermore, the method in S4 for identifying core hydrodynamic parameters in the simplified model based on the enhanced sparrow search algorithm specifically includes the following steps: S41: Treat each core hydrodynamic parameter in the simplified model as an individual population and initialize the algorithm parameters; the algorithm parameters include at least the population size and the maximum number of iterations; the population size includes the discoverer subpopulation, the joiner subpopulation and the vigilant subpopulation divided based on the preset subpopulation ratio parameter; S42: Obtain the fitness values ​​of individuals in each subpopulation of the initial population according to the fitness function, and obtain the global optimal solution of the initial population; the global optimal solution is the population individual corresponding to the optimal individual fitness value, and the expression of the fitness function is:

[0016] In the formula: Represents the fitness function; This represents the true value indicating the ship's motion state; This represents the predicted value of the ship's motion state corresponding to the simplified model; Indicates the number of individuals in the population; Based on the position update formula, the positions of individuals in each subpopulation of the initial population are updated according to the global optimal solution to obtain a new generation of individuals; Furthermore, the position update formulas include a discoverer position update formula reconstructed based on a nonlinear elastic folding factor, a joiner position update formula reconstructed based on a fluid damping approximation mechanism to control joiner behavior, and a watchdog position update formula. S43: Obtain the current global optimal solution and the current global worst solution of the corresponding new generation population individual according to the fitness function; and perform a local mutation operation on the current global optimal solution based on the dynamic local development strategy of Gauss-Cauchy distribution to obtain a new solution after mutation; after replacing the current global worst solution of the new generation population individual with the new solution after mutation by adopting a greedy retention mechanism, reconfirm the global optimal solution of the corresponding new generation population individual as the final global optimal solution.

[0017] Furthermore, the discoverer position update formula based on nonlinear elastic folding factor reconstruction described in S5 is as follows:

[0018]

[0019] In the formula: Indicates the nonlinear elastic folding factor; Indicates the maximum number of iterations; Indicates the current iteration number; Indicates the first During the nth iteration Only one sparrow was in the first The position of the dimension; Indicates the individual sparrow's serial number; Represents a random number that follows a normal distribution; Indicates that all elements are 1 matrix; Indicates the dimension of the variable; This represents a constant greater than 1, used to adjust the exponential decay rate; This indicates the preset warning value and its range. ; Indicates the preset safety value and its range. ; The reconstructed participant position update formula based on the fluid damping approximation mechanism for controlling participant behavior is as follows:

[0020]

[0021] In the formula: This represents a damping term exhibiting random oscillation characteristics; express Uniform random numbers within a certain range are used to generate random oscillation characteristics; Indicates the first The new position of the joiner in the next iteration; Indicates the first The global optimal position at the next iteration; Indicates the first The optimal position occupied by the producer in the next iteration; The formula for updating the location of the vigilant is:

[0022] In the formula: Indicates the first The new position of the vigilant in the next iteration; Indicates the first The global optimal position at the next iteration; This represents the random step size control parameter that follows a standard normal distribution; express Uniformly distributed random numbers within a given range; Indicates the current number Only the fitness value and fitness function value of the vigilant; This represents the current global best fitness value; This represents the current worst-case fitness value globally. This represents a constant that avoids a denominator of zero. The expression for the dynamic local exploitation strategy based on Gaussian-Cauchy distribution is:

[0023]

[0024] In the formula: This refers to the new candidate solution generated after performing Gaussian-Cauchy mutation on the current global optimal solution, i.e., the new solution after mutation; This represents a random vector that follows a standard normal distribution. express Uniformly distributed random numbers within a given range; This represents the Hadamard product operator. This represents the probability of using Gaussian mutation for local search; Indicates the first The global optimal position at the next iteration; This represents the dynamic scaling step size that decreases as the iteration process progresses.

[0025] Beneficial Effects: This invention provides a ship motion modeling method based on sensitivity-driven and improved sparrow algorithm. By proposing the SDA sensitivity-driven topology optimization mechanism, which designs a time-domain sensitivity loss function for the three degrees of freedom of ship motion based on a generalized polynomial structure model, and constructs a global average sensitivity loss function corresponding to a global sensitivity surface characterizing nonlinear hydrodynamic parameters based on the time-domain sensitivity loss function, this method can adaptively remove redundant cross-terms with weak physical coupling from a vast pool of hydrodynamic candidate terms. This mechanism breaks through the dependence on traditional preset fixed equation structures, fundamentally achieving physical noise reduction, avoiding overfitting caused by the model absorbing environmental noise, and significantly improving the structural stability of the model. Furthermore, by improving the sparrow algorithm and constructing the Enhanced Sparrow Search Algorithm (ESSA), the dynamic balance between global exploration and local exploitation of the population is reshaped by introducing a nonlinear elastic folding factor, a fluid damping approximation mechanism, and a dynamic local exploitation strategy based on Gaussian-Cauchy distribution. Even in highly chaotic spaces dominated by excitation forces in extreme sea states, the ESSA algorithm can still extract the optimal solution to the extreme, accurately anchor hydrodynamic parameters with real physical meaning, and suppress the parameter identification error of each degree of freedom to an extremely low level. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 The flowchart shows the ship motion modeling method based on sensitivity-driven and improved sparrow algorithm of the present invention. Figure 2 This is a schematic diagram of the basic framework and core structure of the ship motion modeling method based on sensitivity-driven and improved sparrow algorithm in this embodiment; Figure 3 This is a flowchart of the sensitivity-driven topology optimization mechanism in this embodiment; Figure 4 This is a flowchart of the enhanced sparrow search algorithm in this embodiment; Figure 5 This is a diagram showing the ship motion prediction results under a water tank test using the method described in this embodiment; Figure 6 This is a diagram showing the cross-condition prediction results of the method described in this embodiment under normal sea conditions on a real ship; Figure 7 This is a diagram showing the long-term forecast results of the method described in this embodiment under extreme sea conditions. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] This embodiment provides a method for ship motion modeling based on sensitivity-driven and improved sparrow algorithm, such as... Figures 1 to 2 As shown, the specific steps include: S1: In order to break the traditional single model (such as...) The fixed structure assumption of the MMG model is replaced by an unconstrained ship motion functional equation in this embodiment. A generalized polynomial structural model is constructed that includes a third-order hydrodynamic fundamental candidate library of ship operation data; and the ship operation data includes forward speed, lateral speed, bow turning angular velocity, rudder angle, heading, main engine speed and their cross-coupling terms. Specifically, the generalized polynomial structure model is as follows:

[0030]

[0031] In the formula: This represents the output of the functional equations for ship motion. express The first derivative; express i A candidate library of third-order hydrodynamic fundamentals of ×1; Indicates forward speed; Indicates lateral speed; Indicates the angular velocity of the bow turn; Represents the rudder angle; Indicates the course; Indicates the engine speed; This indicates that during the initialization phase, the distribution's unidentified coefficient matrix is ​​determined using the iterative least squares method; Represents the elements of the coefficient matrix to be identified; express The first derivative; C Indicates design constants; S2: Based on the generalized polynomial structure model, a time-domain sensitivity loss function for the coordinated three degrees of freedom of ship motion is constructed; and based on the time-domain sensitivity loss function, a global sensitivity surface for characterizing nonlinear hydrodynamic parameters is constructed, and the corresponding global average sensitivity loss function is as follows: Figure 3As shown, the specific steps include: S21: To accurately quantify the sensitivity of each candidate hydrodynamic term to the system's dynamic response, redundant terms with weak physical coupling are removed. Based on the generalized polynomial structure model, the time-domain sensitivity loss function for the coordinated three degrees of freedom of ship motion is constructed as follows:

[0032] In the formula: These represent the forward velocity, lateral velocity, and turning angular velocity, respectively, for the first... Sensitivity loss function for hydrodynamic parameters; Represents the discrete sampling time in the ship motion time series data and ; Represents the period of discrete sampling time; This represents the ship's actual motion state in the time domain; Indicates when the first After the hydrodynamic coefficient changes, the solution obtained by numerical integration of the ship's motion differential equations is the first... The reconstructed predicted value at the sampling time; Indicates the first The percentage change imposed by the hydrodynamic coefficient itself, and ; These represent the values ​​applied to the forward, lateral, and turning degrees of freedom after being changed according to preset percentages. Hydrodynamic coefficient; S22: To comprehensively characterize the global sensitivity surface of nonlinear hydrodynamic parameters, this embodiment employs a multi-gradient directional large-range perturbation strategy to force individual candidate hydrodynamic coefficients to undergo large-amplitude step changes of -50%, +50%, -90%, and +90% sequentially, and calculates the comprehensive average sensitivity benchmark: that is, based on the time-domain sensitivity loss function, a global sensitivity surface is constructed to characterize the nonlinear hydrodynamic parameters, and the corresponding global average sensitivity loss function is:

[0033] In the formula: The numbers representing the forward velocity, lateral velocity, and turning angular velocity are respectively... The average sensitivity loss function of the hydrodynamic parameters; These represent the forward speed at the th... The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; These represent the lateral velocity at the th... The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; These represent the turning angular velocities at the twentieth minute. The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; S3: Based on the loss value of the global average sensitivity loss function, obtain the core hydrodynamic parameters of the ship's three degrees of freedom that satisfy the preset loss threshold, and obtain a simplified model based on the obtained core hydrodynamic parameters using the generalized polynomial structure model. The specific steps include: S31: Obtain the loss sequence table for the three degrees of freedom of ship motion based on the loss value of the global average sensitivity loss function and sort them in descending order according to the loss value; S32: Based on the loss sequence list, set a preset loss threshold; and obtain the core hydrodynamic parameters of the ship's three degrees of freedom that satisfy the preset loss threshold according to the loss sequence list; S33: Based on the generalized polynomial structure model, only the core hydrodynamic parameters are retained while the rest of the hydrodynamic parameters are discarded, so as to obtain a simplified model containing only the core hydrodynamic parameters.

[0034] In this embodiment, based on the benchmark, redundant terms with low sensitivity can be adaptively discarded, while core hydrodynamic terms located in the sensitivity head region are retained, thereby constructing a simplified core topology for ship motion. Its mathematical expression is still as follows: In this embodiment, a sensitivity-driven topology optimization (SDA) mechanism is used to achieve adaptive dimensionality reduction of the model structure. S4: Construct an enhanced sparrow search algorithm by improving the sparrow algorithm, such as... Figure 4 As shown; based on the enhanced sparrow search algorithm, the core hydrodynamic parameters in the simplified model are identified to obtain the ship motion identification model, thereby realizing ship motion modeling based on sensitivity-driven and improved sparrow algorithm; in this embodiment, after establishing the simplified topology, the enhanced sparrow search algorithm (ESSA) with multi-strategy fusion is used to identify each hydrodynamic coefficient contained in the simplified model with high precision in the non-stationary solution space, and the constructed enhanced sparrow search algorithm is used to overcome the problems of the standard sparrow algorithm (SSA) being prone to getting trapped in local optima and insufficient convergence accuracy in the later stage of optimization; Specifically, the method for identifying core hydrodynamic parameters in a simplified model based on the enhanced sparrow search algorithm in this embodiment includes the following steps: S41: Treat each core hydrodynamic parameter in the simplified model as an individual population and initialize the algorithm parameters; the algorithm parameters include at least the population size and the maximum number of iterations; the population size includes the discoverer subpopulation, the joiner subpopulation and the vigilant subpopulation divided based on the preset subpopulation ratio parameter; S42: Obtain the fitness values ​​of individuals in each subpopulation of the initial population according to the fitness function, and obtain the global optimal solution of the initial population; the global optimal solution is the population individual corresponding to the optimal individual fitness value, and the expression of the fitness function is:

[0035] In the formula: Represents the fitness function; This represents the true value indicating the ship's motion state; This represents the predicted value of the ship's motion state corresponding to the simplified model; Indicates the number of individuals in the population; Based on the position update formula, the positions of individuals in each subpopulation of the initial population are updated according to the global optimal solution to obtain a new generation of individuals; Furthermore, the position update formulas include a discoverer position update formula reconstructed based on a nonlinear elastic folding factor, a joiner position update formula reconstructed based on a fluid damping approximation mechanism to control joiner behavior, and a watchdog position update formula. In a specific embodiment, a nonlinear elasticity factor based on a combination of cosine mapping and time squared terms is constructed to balance global exploration and local exploitation. This factor is then used to reconstruct the discoverer's position update formula. The discoverer's position update formula reconstructed based on the nonlinear elasticity folding factor is as follows:

[0036]

[0037] In the formula: Indicates the nonlinear elastic folding factor; Indicates the maximum number of iterations; Indicates the current iteration number; Indicates the first During the nth iteration Only one sparrow was in the first The position of the dimension; Indicates the individual sparrow's serial number; Represents a random number that follows a normal distribution; Indicates that all elements are 1 matrix; Indicates the dimension of the variable; This represents a constant greater than 1, used to adjust the exponential decay rate; This indicates the preset warning value and its range. ; Indicates the preset safety value and its range. ; In a specific embodiment, to prevent followers from overtaking the optimal solution or causing solution stacking, the physical process of an individual approaching the optimal solution in a viscous fluid is simulated. A damping term with random oscillation characteristics is added, and the position update formula of the follower is reconstructed by incorporating this damping term. That is, the behavior of the follower is controlled based on the fluid damping approximation mechanism. The reconstructed position update formula of the follower is:

[0038]

[0039] In the formula: This represents a damping term exhibiting random oscillation characteristics; express Uniform random numbers within a certain range are used to generate random oscillation characteristics; Indicates the first The new position of the joiner in the next iteration; Indicates the first The global optimal position at the next iteration; Indicates the first The optimal position occupied by the producer in the next iteration; In a specific embodiment, a certain proportion (usually 10%–20%) of individuals are randomly selected from the sparrow population as watchdogs. When a watchdog detects danger, it will move towards the globally optimal position or away from the worst position. The watchdog position update formula is as follows:

[0040] In the formula: Indicates the first The new position of the vigilant in the next iteration; Indicates the first The global optimal position at the next iteration; This represents the random step size control parameter that follows a standard normal distribution; express Uniformly distributed random numbers within a given range; Indicates the current number Only the fitness value and fitness function value of the vigilant; This represents the current global best fitness value; This represents the current worst-case fitness value globally. This represents a constant that avoids a denominator of zero. S43: Obtain the current global optimal solution and the current global worst solution for the corresponding new generation of individuals based on the fitness function; and perform a local mutation operation on the current global optimal solution based on the dynamic local development strategy of Gauss-Cauchy distribution to obtain a new solution after mutation; Specifically, in this embodiment, a dynamic local exploitation strategy based on the Gaussian-Cauchy distribution is used to perform limit exploitation on the global optimal solution at the end of the iteration, defining a dynamic scaling step size that decreases with the iteration process. With a high probability High-precision local fine-grained search is performed using Gaussian mutation with a low probability. The expression for the dynamic local exploitation strategy based on Gaussian-Cauchy distribution, which employs Cauchy mutation to generate large-step perturbations to prevent stagnation, is as follows:

[0041]

[0042] In the formula: This refers to the new candidate solution generated after performing Gaussian-Cauchy mutation on the current global optimal solution, i.e., the new solution after mutation; This represents a random vector that follows a standard normal distribution. express Uniformly distributed random numbers within a given range; This represents the Hadamard product operator. This represents the probability of using Gaussian mutation for local search; Indicates the first The global optimal position at the next iteration; This indicates the dynamic scaling step size that decreases as the iteration process progresses; By employing a greedy retention mechanism to replace the current global worst solution of a new generation of individuals in the population with the mutated new solution, the global optimal solution of the corresponding new generation of individuals is reconfirmed as the final global optimal solution. In this embodiment, the mutated new solution replaces the worst individual in the population, i.e., the global optimal solution, using a greedy retention mechanism. Finally, the ESSA algorithm outputs the hydrodynamic parameters with the highest optimization accuracy, completing the mapping from strongly disturbed data to the physical laws of the system and establishing... The adaptive mathematical model for ship motion, as described in this embodiment, abandons the absolute dependence on prior truncation equations and deeply introduces the idea of ​​data-driven sparse recognition, thereby realizing high-precision adaptive modeling of ship maneuvering motion.

[0043] In view of the above-mentioned technical defects, the method described in this embodiment has the following significant beneficial effects: (1) Physical noise reduction and overfitting prevention are achieved, effectively suppressing the distortion of dynamic response in long-term model extrapolation: The method described in this embodiment breaks through the dependence on the traditional fixed equation structure. By proposing the SDA sensitivity-driven topology optimization mechanism and designing a three-degree-of-freedom synergistic time-domain sensitivity loss function, it can adaptively remove redundant cross terms with weak physical coupling from the massive hydrodynamic candidate library. This mechanism achieves physical noise reduction from the root, avoids overfitting caused by the model absorbing environmental noise, and greatly improves the structural stability of the model.

[0044] (2) Significantly improves the parameter decoding accuracy in the ill-conditioned solution space and completely avoids the local optimum trap: The method described in this embodiment deeply reconstructs the original Sparrow Search Algorithm (ESSA). By introducing a nonlinear elastic folding factor, a fluid damping approximation mechanism, and a dynamic local exploitation strategy based on Gaussian-Cauchy distribution, it reshapes the dynamic balance between global exploration and local exploitation of the population. Even in a highly chaotic space dominated by extreme sea state excitation forces, the ESSA algorithm can still extract the optimal solution to the extreme, accurately anchor hydrodynamic parameters with real physical meaning, and suppress the parameter identification error of each degree of freedom to an extremely low level.

[0045] (3) It possesses excellent cross-condition generalization ability and strong small-sample anti-drift extrapolation prediction ability: The method described in this embodiment The integrated framework establishes a theoretical pathway from noisy training data to the system's true physical foundation. Experiments confirm this. Figures 5 to 7 As shown, the method described in this embodiment can accurately predict transient responses and steady turns under normal sea states. Even under extreme conditions such as a Category 10 Beaufort typhoon dragging anchor, it can achieve high-precision, anti-drift forecasts of the subsequent 75% of unknown long-term trajectories using only 25% of prior short-sequence data. All comprehensive errors (MAE, MAPE, MSE, RMSE) are globally optimal, providing a highly reliable engineering paradigm for ship motion forecasting under severe sea states with limited sample sizes.

[0046] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for modeling ship motion based on sensitivity-driven and improved sparrow algorithm, characterized in that, Specifically, the following steps are included: S1: By introducing unconstrained ship motion functional equations, a generalized polynomial structure model of a third-order hydrodynamic fundamental candidate library including ship operation data is constructed. The ship's operational data includes forward speed, lateral speed, bow turning rate, rudder angle, heading, and main engine speed; S2: Based on the generalized polynomial structure model, construct the time-domain sensitivity loss function for the coordinated three degrees of freedom of ship motion; and based on the time-domain sensitivity loss function, construct the global sensitivity surface for characterizing nonlinear hydrodynamic parameters, and the corresponding global average sensitivity loss function. S3: Based on the loss value of the global average sensitivity loss function, obtain the core hydrodynamic parameters of the ship's three degrees of freedom that satisfy the preset loss threshold, and obtain a simplified model based on the core hydrodynamic parameters obtained from the generalized polynomial structure model. S4: Construct an enhanced sparrow search algorithm by improving the sparrow algorithm; Based on the enhanced sparrow search algorithm, the core hydrodynamic parameters in the simplified model are identified to obtain the ship motion identification model, thereby realizing ship motion modeling based on sensitivity-driven and improved sparrow algorithm.

2. The ship motion modeling method based on sensitivity-driven and improved sparrow algorithm according to claim 1, characterized in that, The generalized polynomial structure model of the third-order hydrodynamic fundamental candidate library constructed in S1, which includes ship operation data, is as follows: In the formula: This represents the output of the functional equations for ship motion. express The first derivative; This represents the candidate pool for third-order hydrodynamic foundations; Indicates forward speed; Indicates lateral speed; Indicates the angular velocity of the bow turn; Represents the rudder angle; Indicates the course; Indicates the engine speed; This represents the matrix of coefficients to be identified using the iterative least squares method to determine the distribution. Represents the elements of the coefficient matrix to be identified; express The first derivative; C denoted by ; T denotes the design constant; T denotes the transpose.

3. The ship motion modeling method based on sensitivity-driven and improved sparrow algorithm according to claim 2, characterized in that, S2 specifically includes the following steps: S21: Based on the generalized polynomial structure model, the time-domain sensitivity loss function for the coordinated three degrees of freedom of ship motion is constructed as follows: In the formula: These represent the forward velocity, lateral velocity, and turning angular velocity, respectively, for the first... Sensitivity loss function for hydrodynamic parameters; Represents the discrete sampling time in the ship motion time series data and ; Represents the period of discrete sampling time; This represents the ship's actual motion state in the time domain; Indicates when the first After the hydrodynamic coefficient changes, the solution obtained by numerical integration of the differential equations of ship motion is the first... The reconstructed predicted value at the sampling time; These represent the values ​​applied to the forward, lateral, and turning degrees of freedom after being changed according to preset percentages. Hydrodynamic coefficient; S22: Based on the time-domain sensitivity loss function, a global sensitivity surface is constructed to characterize nonlinear hydrodynamic parameters. The corresponding global average sensitivity loss function is: In the formula: The numbers representing the forward velocity, lateral velocity, and turning angular velocity are respectively... The average sensitivity loss function of the hydrodynamic parameters; These represent the forward speed at the th... The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; These represent the lateral velocity at the th... The sensitivity loss function corresponding to the changes in hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively; These represent the turning angular velocities at the twentieth minute. The sensitivity loss function corresponding to the changes in the hydrodynamic parameters by +50%, -50%, +90%, and -90%, respectively.

4. The ship motion modeling method based on sensitivity-driven and improved sparrow algorithm according to claim 3, characterized in that, S3 specifically includes the following steps: S31: Obtain the loss sequence table for the three degrees of freedom of ship motion based on the loss value of the global average sensitivity loss function and sort them in descending order according to the loss value; S32: Based on the loss sequence list, set a preset loss threshold; and obtain the core hydrodynamic parameters of the ship's three degrees of freedom that satisfy the preset loss threshold according to the loss sequence list; S33: Based on the generalized polynomial structure model, only the core hydrodynamic parameters are retained while the rest of the hydrodynamic parameters are discarded, so as to obtain a simplified model containing only the core hydrodynamic parameters.

5. The ship motion modeling method based on sensitivity-driven and improved sparrow algorithm according to claim 4, characterized in that, The method for identifying core hydrodynamic parameters in the simplified model based on the enhanced sparrow search algorithm in S4 includes the following steps: S41: Treat each core hydrodynamic parameter in the simplified model as an individual population and initialize the algorithm parameters; the algorithm parameters include at least the population size and the maximum number of iterations; the population size includes the discoverer subpopulation, the joiner subpopulation and the vigilant subpopulation divided based on the preset subpopulation ratio parameter; S42: Obtain the fitness values ​​of individuals in each subpopulation of the initial population according to the fitness function, and obtain the global optimal solution of the initial population; the global optimal solution is the population individual corresponding to the optimal individual fitness value, and the expression of the fitness function is: In the formula: Represents the fitness function; The true value representing the ship's motion state; This represents the predicted value of the ship's motion state corresponding to the simplified model; Indicates the number of individuals in the population; Based on the position update formula, the positions of individuals in each subpopulation of the initial population are updated according to the global optimal solution to obtain a new generation of individuals; Furthermore, the position update formulas include the discoverer position update formula reconstructed based on the nonlinear elastic folding factor, the joiner position update formula reconstructed based on the fluid damping approximation mechanism controlling the joiner behavior, and the guard position update formula. S43: Obtain the current global optimal solution and the current global worst solution of the corresponding new generation population individual according to the fitness function; and perform a local mutation operation on the current global optimal solution based on the dynamic local development strategy of Gauss-Cauchy distribution to obtain a new solution after mutation; after replacing the current global worst solution of the new generation population individual with the new solution after mutation by adopting a greedy retention mechanism, reconfirm the global optimal solution of the corresponding new generation population individual as the final global optimal solution.

6. The ship motion modeling method based on sensitivity-driven and improved sparrow algorithm according to claim 5, characterized in that, The discoverer position update formula based on nonlinear elastic folding factor reconstruction described in S5 is as follows: In the formula: Indicates the nonlinear elastic folding factor; Indicates the maximum number of iterations; Indicates the current iteration number; Indicates the first During the nth iteration Only one sparrow was in the first The position of the dimension; Indicates the individual sparrow's serial number; Represents a random number that follows a normal distribution; Indicates that all elements are 1 matrix; Indicates the dimension of the variable; This represents a constant greater than 1, used to adjust the exponential decay rate; This indicates the preset warning value and its range. ; Indicates the preset safety value and its range. ; The reconstructed participant position update formula based on the fluid damping approximation mechanism for controlling participant behavior is as follows: In the formula: This represents a damping term exhibiting random oscillation characteristics; express Uniform random numbers within a certain range are used to generate random oscillation characteristics; Indicates the first The new position of the joiner in the next iteration; Indicates the first The global optimal position at the next iteration; Indicates the first The optimal position occupied by the producer in the next iteration; The formula for updating the location of the vigilant is: In the formula: Indicates the first The new position of the vigilant in the next iteration; Indicates the first The global optimal position at the next iteration; This represents the random step size control parameter that follows a standard normal distribution; express Uniformly distributed random numbers within a given range; Indicates the current number Only the fitness value and fitness function value of the vigilant; This represents the current global best fitness value; This represents the current worst-case fitness value globally. This represents a constant that avoids a denominator of zero. The expression for the dynamic local exploitation strategy based on Gaussian-Cauchy distribution is: In the formula: This refers to the new candidate solution generated after performing Gaussian-Cauchy mutation on the current global optimal solution, i.e., the new solution after mutation; This represents a random vector that follows a standard normal distribution. express Uniformly distributed random numbers within a given range; This represents the Hadamard product operator; This represents the probability of using Gaussian mutation for local search; Indicates the first The global optimal position at the next iteration; This represents the dynamic scaling step size that decreases as the iteration process progresses.