Ship motion adaptive prediction method based on fuzzy inference and bayesian optimization

An adaptive prediction method combining fuzzy inference and Bayesian optimization solves the problems of accuracy and real-time performance in predicting uncertainties in ship motion response, achieving efficient and accurate adaptive prediction to meet the needs of maritime safety decision-making.

CN122287359APending Publication Date: 2026-06-26CCCC FOURTH HARBOR ENG INST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CCCC FOURTH HARBOR ENG INST CO LTD
Filing Date
2026-04-01
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies struggle to balance high accuracy and real-time performance in predicting uncertainties in ship motion response, lack online adaptive capabilities, and have insufficient uncertainty interpretability, thus failing to meet the needs of maritime safety decision-making.

Method used

By combining fuzzy inference and Bayesian optimization methods, an adaptive fuzzy prediction system is constructed. The confidence interval parameters are dynamically adjusted through a fuzzy rule base and Bayesian optimization to achieve online adaptive prediction.

Benefits of technology

It achieves efficient and accurate prediction of ship motion response, has online self-learning capabilities, strong interpretability, and can adaptively track complex time-varying environments, meeting real-time and accuracy requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122287359A_ABST
    Figure CN122287359A_ABST
Patent Text Reader

Abstract

This invention discloses an adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization. The method first constructs an adaptive fuzzy prediction system, outputting interpretable point prediction values ​​based on inputs of ship motion-related physical quantities. Next, a parameterized confidence interval model is established and controlled by upper and lower bound parameters. Then, an optimization objective function is constructed through real-time data acquisition. Finally, the confidence interval parameters are dynamically corrected using Bayesian optimization, and the final prediction result with adaptive confidence intervals is output. This invention integrates the good interpretability of fuzzy inference systems with the efficient adaptability of Bayesian optimization, achieving accurate online quantitative assessment of the uncertainty of ship motion response. It also possesses advantages such as high computational efficiency and embedding into real-time systems, significantly improving the navigation safety and intelligent decision-making level of ships in complex sea conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent ships and marine engineering technology, and more specifically, to an adaptive prediction method for ship motion based on fuzzy reasoning and Bayesian optimization. Background Technology

[0002] When ships navigate at sea, their motion responses (such as roll, pitch, and heave) are strongly influenced by complex environmental loads such as waves, wind, and currents. Accurately predicting ship motion, especially assessing the uncertainty of the prediction results, is crucial for ensuring navigational safety, optimizing route planning, and improving operational efficiency. Currently, mainstream methods for predicting the uncertainty of ship motion responses have the following limitations: First, there's the probabilistic forecasting method based on Monte Carlo simulations. While theoretically rigorous and capable of fully describing uncertainty, this method is computationally extremely expensive, requiring the use of costly numerical models for each simulation, thus failing to meet the needs of real-time online decision-making for ships. Furthermore, this method lacks an online adaptive mechanism, unable to dynamically adjust the prediction model and uncertainty range using real-time observation data, leading to rapid prediction failure under time-varying sea conditions.

[0003] Secondly, the uncertainty presented by Bayesian neural network-based methods is a mixture of model-driven cognitive uncertainty and inherent random uncertainty in the data, which is difficult to separate clearly. This limits its application in safety-critical systems where the sources of risk need to be clearly identified. Furthermore, the training and inference processes are computationally complex, the model exhibits "black box" characteristics, and the sources of uncertainty are difficult to trace and explain, reducing its credibility in maritime safety decision-making.

[0004] Secondly, there are methods based on traditional interval analysis or fuzzy logic. However, these methods typically rely on fixed parameters or rules, making model adjustment difficult. Furthermore, the given intervals are often too conservative or lack adaptability, making it difficult to accurately track dynamically changing environments.

[0005] In summary, existing technologies face core bottlenecks in predicting uncertainties in ship motion response: the need for both high-precision methods and real-time requirements is difficult to balance; most methods lack mechanisms for online adaptation using real-time data; and data-driven methods provide insufficient interpretability of uncertainties, failing to meet the stringent safety requirements of traceable and reliable decision support information. Therefore, there is an urgent need in this field for a novel prediction method that can efficiently and accurately quantify and predict uncertainties while possessing online self-learning capabilities and good interpretability. Summary of the Invention

[0006] The purpose of this invention is to provide an adaptive prediction method for ship motion based on fuzzy reasoning and Bayesian optimization, in order to solve the above-mentioned problems existing in the prior art.

[0007] The application is as follows: In a first aspect, the present invention provides an adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization, comprising the following steps: S1. Construct an adaptive fuzzy prediction system: Based on the input of physical quantities related to ship motion, establish an interpretable nonlinear prediction model that includes fuzzification, fuzzy rule base, fuzzy inference and defuzzification, and output one or more point prediction values ​​of ship motion response; S2. Define and initialize the confidence interval parameters based on fuzzy output: Establish a parameterized confidence interval model for the predicted point value, wherein the confidence interval is controlled by an upper bound parameter and a lower bound parameter, and perform initial value assignment; S3. Real-time data acquisition and prediction error calculation: Collect measured values ​​of ship motion, calculate prediction error, evaluate coverage based on the confidence interval of the previous moment, and construct an optimization objective function to optimize the confidence interval parameters; S4. Dynamically adjust confidence interval parameters based on Bayesian optimization and output prediction: Using the Bayesian optimization method, with the goal of maximizing the optimization objective function, the confidence interval parameters are dynamically optimized online. The surrogate model is iteratively updated by accumulating historical evaluation data, and the next set of parameters to be evaluated is determined based on the acquisition function to obtain the optimized confidence interval parameters. The optimized confidence interval parameters are substituted into the confidence interval model to generate the predicted values ​​of the motion response points at future times and their corresponding adaptive confidence intervals as the final prediction results. S5. System Update and Loop Execution: Store new data and optimized parameters into the historical dataset, and return to step S1 in the next prediction cycle to form a closed-loop adaptive prediction system.

[0008] Furthermore, step S1 further includes: S11. Fuzzification of input and output variables: Select physical quantities related to ship motion as input variables of the fuzzy prediction system. The physical quantities related to ship motion include at least significant wave height, average wave period, encounter angle, and ship speed. Select one or more motion responses of the ship as output variables. The motion responses are at least one of the six degrees of freedom motion of the ship. Define multiple linguistic values ​​and corresponding membership functions for each input and output variable. S12. Constructing a fuzzy rule base: Construct a fuzzy rule base based on ship hydrodynamics knowledge, expert experience, or historical data. The rule base contains multiple rules in the form of "If-Then". The antecedent of each rule is composed of the linguistic values ​​of the input variables, and the consequent is the linguistic value corresponding to the output variable. S13. Fuzzy Inference and Defuzzification: For a given real-time input vector, for each output variable, calculate the activation degree of each corresponding rule's antecedent; generate the consequent output linguistic value based on the activated rule; use the centroid method to aggregate the consequents of all activated rules to obtain the final point prediction value of the output variable. The operation is performed independently or in parallel on each output variable to obtain one or more point prediction values.

[0009] Furthermore, the parameterized confidence interval model described in step S2 is defined in the following form:

[0010] Among them, L t and U t These are the lower and upper bound parameters of the confidence interval, respectively. Let σ be the predicted value of the point, α be the baseline uncertainty obtained based on historical prediction error statistics, and α be the predicted value of the point. t and β t The positive real confidence interval parameters to be optimized are used to dynamically adjust the offset of the lower and upper bound parameters of the confidence interval relative to the point prediction. The baseline uncertainty σ is estimated by the standard deviation of the prediction error sequence within the sliding time window and is periodically updated during system operation to reflect the overall fluctuation level of the prediction error.

[0011] Furthermore, the objective function described in step S3 is constructed as follows: Define the coverage indicator function I t If the currently measured value of the ship's motion If the value falls within the confidence interval of the previous time step, the value is 1; otherwise, it is 0. Construct the objective function:

[0012] Among them, U t -L t This indicates the current confidence interval width, used to penalize excessively wide forecast uncertainties; It is used to penalize prediction errors that do not cover the true values; γ is a configurable tradeoff coefficient used to adjust the balance between confidence interval width and coverage accuracy.

[0013] Furthermore, the Bayesian optimization described in step S4 specifically includes the following process: S41. Proxy Model Construction and Update: The objective function J(α,β) is modeled using a Gaussian process; based on the historical parameter evaluation dataset composed of the accumulated historical evaluation data, the hyperparameters of the Gaussian process are inferred and updated using Bayesian methods to form its posterior distribution; S42. Acquisition Function Calculation: The expected improvement function is used as the acquisition function. This function is calculated based on the posterior distribution of the current surrogate model. The expression of the expected improvement function EI(α,β) is:

[0014] in Evaluate the optimal objective function value in the dataset for the current historical parameters; S43. Execute iterative optimization loop: At each optimization time t, execute the following closed-loop process: a) Maximize the desired improved acquisition function using an optimization algorithm to solve for the next set of candidate values ​​for the confidence interval parameters to be evaluated. ; b) Candidate values ​​of confidence interval parameters The confidence interval model applied to the current time step calculates the corresponding objective function value J based on the measured data. t ; c) Transfer new data points Incorporate historical parameter evaluation dataset; In the iterative optimization mode, steps a to c) are executed repeatedly until the preset convergence condition is met; in the single-step update mode, steps a to c are executed only once.

[0015] Furthermore, the preset convergence conditions of the iterative optimization mode include at least one of the following: the average absolute improvement of the objective function value J in multiple consecutive iterations is less than a first threshold; the global maximum value of the expected improvement function EI(α,β) is less than a second threshold; and the number of iterations reaches a preset upper limit.

[0016] Furthermore, in step S5, a sliding time window of finite length is used to save the measured data, prediction results and optimization parameters for a recent period of time, and to update the historical parameter evaluation dataset.

[0017] Secondly, the present invention provides a ship motion adaptive prediction system based on fuzzy inference and Bayesian optimization, comprising the following functional modules: The sensor data acquisition module is used to collect real-time physical quantities related to ship motion and measured values ​​of ship motion. An adaptive fuzzy inference prediction module, connected to the sensor data acquisition module, is used to calculate and output one or more point prediction values ​​of the ship motion response based on the physical quantity input and through a fuzzy inference rule base. The parameterized confidence interval generation module is connected to the adaptive fuzzy inference prediction module and is used to generate parameterized confidence intervals based on the point prediction value, the baseline uncertainty, and the upper and lower bound parameters to be optimized. The Bayesian optimization control module is connected to the sensor data acquisition module, the adaptive fuzzy inference prediction module, and the parameterized confidence interval generation module. It is used to execute the Bayesian optimization process based on the Gaussian process surrogate model, dynamically solve the optimized confidence interval parameters, and output the optimized confidence interval parameters to the parameterized confidence interval generation module. A sliding time window storage module, connected to the Bayesian optimization control module, is used to store and manage historical parameter evaluation data sequences of finite length.

[0018] Thirdly, the present invention provides a ship, the ship including the aforementioned ship motion adaptive prediction system based on fuzzy inference and Bayesian optimization.

[0019] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned ship motion adaptive prediction method based on fuzzy inference and Bayesian optimization.

[0020] Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects: This invention combines a highly interpretable adaptive fuzzy inference system with an efficient Bayesian optimization method, achieving significant technological advancements. On one hand, the white-box prediction framework based on fuzzy rules makes the ship's motion response and its uncertainties clearly traceable, overcoming the poor interpretability of traditional black-box models. On the other hand, by dynamically adjusting the confidence interval parameters online using a Bayesian optimization algorithm, the prediction interval can adaptively track complex time-varying environments, maintaining interval compactness while ensuring coverage reliability. This method, while maintaining its ability to handle the highly nonlinear characteristics of ship motion, also boasts advantages such as high computational efficiency and embedding into real-time systems, effectively solving the technical challenges of balancing accuracy and efficiency, and the lack of online adaptive capabilities in existing technologies. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating an adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization provided in an embodiment of the present invention. Detailed Implementation

[0022] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments given herein are for illustration and explanation only and are not intended to limit the present invention.

[0023] It should be noted that many specific details are set forth in the following description in order to provide a full understanding of the present invention. However, the present invention may have other embodiments, and therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0024] Example 1

[0025] Firstly, refer to the appendix Figure 1 As shown in the figure, this embodiment provides an adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization. The specific steps include: S1. Construct an adaptive fuzzy prediction system: Based on the input of ship motion-related physical quantities, establish an interpretable nonlinear prediction model that includes fuzzification, a fuzzy rule base, fuzzy inference, and defuzzification, and output one or more point prediction values ​​of the ship motion response. Specifically, this includes: S11. Fuzzification of input and output variables: In specific implementation, it is first necessary to determine the input and output variables of the system.

[0026] The input variables should be physical quantities related to ship motion, including, in this embodiment, the significant wave height H. s : Reflects the energy state of ocean waves; mean wave period T z : Characterizes the frequency characteristics of the wave; encounter angle μ: the angle between the ship's direction of travel and the wave's propagation direction; ship speed V: the ship's current speed.

[0027] The output variable is the ship's motion response to be predicted. This embodiment uses the roll angle φ as an example, but this method is also applicable to other degrees of freedom motions such as pitch and heave. In actual implementation, one or more output variables can be selected for prediction as needed.

[0028] Each variable needs to have 3-5 linguistic values ​​defined. In this example, "small," "medium," and "large" are defined, and corresponding membership functions are configured. In practice, a triangular membership function can be used for initial configuration, and its mathematical expression is:

[0029] Where a, b, and c are the parameters of the trigonometric function. Alternatively, a Gaussian membership function can be chosen based on the characteristics of the actual data distribution.

[0030] S12. Construct a fuzzy rule base: Based on ship hydrodynamics knowledge, expert experience, or historical data analysis, construct fuzzy rules in the form of "IF-THEN".

[0031] in, This corresponds to the language value. The rule base typically consists of tens to hundreds of rules, the exact number depending on the system's complexity and accuracy requirements. Before actual deployment, rule parameters can be optimized and adjusted offline using historical data.

[0032] S13. Fuzzy Inference and Defuzzification: For the real-time acquired input vector X t =[H s ,Tz [,μ,V], perform the following calculation process: First, fuzzy matching is performed, that is, the activation degree ω of the antecedent of each rule is calculated. i Taking the aforementioned rule as an example, the activation level is calculated using the minimum operation (min):

[0033] Then, the consequent of the rules is derived, and each activated rule produces a corresponding consequent output. For the zero-order Takagi-Sugeno model, the consequent is the sharpness value (e.g., "small" corresponds to 2 degrees, "medium" corresponds to 5 degrees, etc.); for the first-order TS model, the consequent can be represented as a linear function of the input variables.

[0034] Finally, after defuzzification, the centroid method is used to aggregate the consequents of all activation rules to obtain the final point prediction value. :

[0035] Where R is the total number of rules, y i Let be the consequent center value of the i-th rule.

[0036] S2. Define and initialize the confidence interval parameters based on fuzzy output: Establish a parameterized confidence interval model for the predicted point value, wherein the confidence interval is controlled by an upper bound parameter and a lower bound parameter, and perform initial value assignment; First, a parameterized confidence interval model is established. To avoid complex probability calculations, this invention designs a simple parameterized confidence interval model. For point prediction values... Define the confidence interval [L] t U t ]for:

[0037] Among them, L t and U t These are the lower and upper bound parameters of the confidence interval, respectively, where σ is the baseline uncertainty obtained based on historical prediction error statistics, and α is the upper bound parameter. t and β t The positive real confidence interval parameters to be optimized are used to dynamically adjust the offset of the lower and upper bound parameters of the confidence interval relative to the point prediction. When the system starts, the parameters need to be initially assigned values. In this embodiment, the initial values ​​of the confidence interval parameters are set to α0=β0=2, constructing a relatively conservative initial confidence interval. The baseline uncertainty σ can be calculated from historical data or typical operating condition data before system startup.

[0038] S3. Real-time data acquisition and prediction error calculation: Collect measured values ​​of ship motion, calculate prediction error, evaluate coverage based on the confidence interval of the previous moment, and construct an optimization objective function to optimize the confidence interval parameters; First, data acquisition and error calculation are performed. In each prediction cycle (e.g., once per second), the ship's motion measurement value y is collected in real time by the ship's onboard sensors. t Calculate the instantaneous prediction error .

[0039] Then define the overlay indicator function I. t This is used to determine whether the measured value falls within the confidence interval predicted at the previous time step:

[0040] If the current measured value of ship motion If the value falls within the confidence interval of the previous time step, then the indicator function I is covered. t The value is 1 if it is not 0 otherwise.

[0041] Finally, a multi-objective optimization function is constructed. This invention designs an objective function that comprehensively considers interval width and coverage accuracy:

[0042] Among them, U t -L t This indicates the current confidence interval width, used to penalize excessively wide prediction uncertainty and prompt the system to provide a more compact prediction. This is used to penalize prediction errors that do not cover the true values; γ is a configurable tradeoff coefficient used to adjust the balance between confidence interval width and coverage accuracy. It can be adjusted according to actual application requirements. In safety-critical systems, a larger value can be set to prioritize coverage capability; in efficiency-priority scenarios, a smaller value can be set to pursue interval compactness.

[0043] S4. Dynamically adjust confidence interval parameters based on Bayesian optimization and output prediction: Using the Bayesian optimization method, with the goal of maximizing the optimization objective function, the confidence interval parameters are dynamically optimized online. The surrogate model is iteratively updated by accumulating historical evaluation data, and the next set of parameters to be evaluated is determined based on the acquisition function to obtain the optimized confidence interval parameters. The optimized confidence interval parameters are substituted into the confidence interval model to generate the predicted values ​​of the motion response points at future times and their corresponding adaptive confidence intervals as the final prediction results. Specific steps include: S41. Surrogate Model Construction and Update: The problem of adjusting the confidence interval parameters is modeled as a black-box optimization problem, using a Bayesian optimization framework. A Gaussian process is used as a surrogate model to model the objective function J(α,β).

[0044] A Gaussian process is defined by its mean function and covariance function (kernel function). This embodiment uses the quadratic exponential kernel function:

[0045] Where x=[α,β] is the input vector (a point in the two-dimensional parameter space). For another input vector, Let l be the signal variance and l be the length scale. For noise variance, It is the Dirac delta function.

[0046] Evaluate dataset D based on historical parameters {1:t} ={(α1,β1,J1),...,(α t ,β t J t The hyperparameters of the Gaussian process are updated by maximum a posteriori estimation or Markov chain Monte Carlo method to form the posterior distribution.

[0047] S42. Acquisition Function Calculation: The expected improvement function is used as the acquisition function. This function is calculated based on the posterior distribution of the current surrogate model. The expression of the expected improvement function EI(α,β) is:

[0048] in To evaluate the optimal objective function value in the current historical parameter evaluation dataset, the EI function is calculated based on the mean and variance predictions provided by the Gaussian process.

[0049] S43. Execute iterative optimization loop: Depending on real-time requirements, two execution modes can be adopted: Iterative optimization mode (suitable for scenarios with high accuracy requirements): Within each optimization cycle, the following steps are executed repeatedly until the convergence condition is met: a) Based on the current posterior distribution of the Gaussian process, candidate values ​​for the confidence interval parameters are obtained by maximizing the EI function using a sequential quadratic programming algorithm. ; b) Candidate values ​​of confidence interval parameters The confidence interval model applied to the current time step calculates the corresponding objective function value J based on the measured data. t ; c) Transfer new data points Incorporate historical parameter evaluation dataset; Check convergence conditions: if the objective function improves by less than 0.01 for 5 consecutive iterations, or the maximum EI value is less than 0.001, or the number of iterations reaches 50. Single-step update mode (suitable for scenarios with high real-time requirements): At each prediction time, steps a through c above are executed only once to quickly generate parameter adjustments.

[0050] Finally, the optimized confidence interval parameters will be... Substitute the values ​​into the confidence interval model and combine them with the point prediction values ​​output by the fuzzy system. Generate the final prediction result: Point prediction value:

[0051] Confidence interval: [L {t+1} U {t+1} ],in .

[0052] S5. System Update and Loop Execution: Store new data and optimized parameters into the historical dataset, and return to step S1 in the next prediction cycle to form a closed-loop adaptive prediction system.

[0053] A sliding time window mechanism is employed, retaining only historical data from the most recent period (e.g., the past hour). New data is continuously added to the window, while old data is automatically removed, ensuring the system always makes decisions based on the latest information. The data in the window includes: original input variables, measured motion responses, predicted values, confidence interval parameters, and objective function values. This data is used to: update the calculation of the baseline uncertainty σ; provide training data for Bayesian optimization; and monitor system performance and detect anomalies. In the next prediction cycle, the system automatically returns to step S1, using the latest data to start a new prediction-optimization cycle, achieving continuous adaptive learning.

[0054] Secondly, this embodiment provides an adaptive prediction system for ship motion based on fuzzy inference and Bayesian optimization. The prediction system can be implemented using a distributed architecture, and the functional modules are deployed as follows: 1. Sensor Data Acquisition Module: Used for real-time acquisition of physical quantities related to ship motion and measured values ​​of ship motion. Specifically includes: Wave Radar Sensor Interface: for acquiring effective wave height H. s Mean wave period T z Compass / GPS interface: Acquires ship's heading and position information, calculates encounter angle μ; Speedometer interface: Acquires ship's speed V; Attitude sensor interface: Acquires measured values ​​y of ship's roll, pitch, heave, and other motion responses. t ; It also includes a data preprocessing unit, which performs preprocessing on the raw sensor data, such as filtering, noise reduction, and time synchronization. 2. Adaptive Fuzzy Inference Prediction Module: Connected to the sensor data acquisition module, this module calculates and outputs one or more point prediction values ​​of the ship's motion response based on the physical quantity input and using a fuzzy inference rule base. Specifically, it includes: Fuzzy unit: converts clear input variable values ​​into membership degrees; Rule base storage: Stores fuzzy rules in the form of "IF-THEN"; Inference engine: performs fuzzy matching and rule activation calculation; Defuzzification unit: The centroid method is used to aggregate the fuzzy output into the predicted value of the clear point.

[0055] 3. Parameterized Confidence Interval Generation Module: Connected to the adaptive fuzzy inference prediction module, this module generates parameterized confidence intervals based on the predicted point values, baseline uncertainty, and the upper and lower bound parameters to be optimized. Specific implementation includes: Interval calculation unit: Calculates the boundaries of confidence intervals; Benchmark Uncertainty Estimator: Dynamically estimates benchmark uncertainty based on the prediction error sequence within a sliding time window; Parameter interface: Receives optimization confidence interval parameters from the Bayesian optimization control module.

[0056] 4. Bayesian Optimization Control Module: Connected to the sensor data acquisition module, adaptive fuzzy inference prediction module, and parameterized confidence interval generation module, this module executes a Bayesian optimization process based on a Gaussian process surrogate model, dynamically solves for the optimized confidence interval parameters, and outputs these parameters to the parameterized confidence interval generation module. Specifically, it includes: Objective function calculation unit: Calculates the coverage indicator function and constructs the optimized objective function based on the measured values, point prediction values, and historical confidence intervals; Gaussian process modeling unit: Uses Gaussian processes to perform proxy modeling of the objective function and maintains historical parameter evaluation datasets; Acquisition function optimization unit: Calculates the expected improvement function based on the Gaussian process posterior distribution, and solves the confidence interval parameter that maximizes EI through optimization algorithm; Mode Controller: Selects either iterative optimization mode or single-step update mode based on system configuration.

[0057] 5. Sliding Time Window Storage Module: Connected to the Bayesian optimization control module, it stores and manages historical parameter evaluation data sequences of finite length. Specifically, it includes: Time series databases: store all relevant data by timestamp; Data Rolling Updater: Maintains a fixed-length data window, automatically removing expired data when new data is added; Query interface: Provides efficient data retrieval services for other modules.

[0058] Example 2 Taking a large container ship sailing in the North Atlantic as an example, this system is used to predict the roll angle: During system deployment, the initial configuration was performed based on the ship type's historical navigation data: Fuzzy rule base construction: Combining the seakeeping model test data of this ship type and the ship handling experience of senior captains, a fuzzy rule base containing 127 rules was established, covering various sea conditions from calm to severe.

[0059] Initial parameter settings: Confidence interval parameters are initialized to The baseline uncertainty σ is calculated based on data from the same ship type in similar navigation areas over the past 30 days and is set at 2.8°.

[0060] System operation mode: Considering that the ship has sufficient computing resources and requires high prediction accuracy, the iterative optimization mode is selected, and the convergence condition is set to the improvement amount of less than 0.01° for 5 consecutive iterations or the maximum number of iterations is 30.

[0061] Specific implementation process Phase 1: System startup and initial adaptation (2 hours before flight) Time point T1 (30 minutes after startup): Environmental parameters collected by the sensor: significant wave height H s =2.1m, average wave period T z =6.5s, encounter angle μ=30°, speed V=18 knots. The fuzzy inference system activates rule clusters related to "moderate sea state, oblique waves" in the rule base based on the input parameters, and outputs the predicted roll angle value after weighted calculation. =4.2°. The Bayesian optimization module calculates the confidence interval based on the initial parameters: [4.2-2.0×2.8, 4.2+2.0×2.8]=[-1.4°, 9.8°]. The measured roll angle is 3.8°, which falls within the prediction interval, covering the indicator function I. t =1, and the objective function J is calculated to be -7.84. Since this is the first run and the historical dataset is small, Bayesian optimization only performs a single-step update, with parameters fine-tuned to α=1.95 and β=1.98.

[0062] Time point T2 (90 minutes after startup): Current environmental parameters: H s =3.5m, T z =7.2s, μ=45°, V=19 segments. The system has accumulated 60 sets of historical data, and Bayesian optimization has begun to show adaptability. After 3 rounds of iterative optimization, the parameters were adjusted to α=1.72, β=1.80. Point prediction values =6.5°, the confidence interval was updated to [6.5-1.72×2.8,6.5+1.80×2.8]=[1.7°,11.5°], with an interval width of 9.8°. The measured value of 5.9° was successfully covered, and the system recorded this good performance, with the objective function value improved to -8.21.

[0063] Phase Two: Dynamic Adaptation to Complex Sea Conditions (5th-8th hour of the voyage) Time point T3 (6th hour of sailing): Significant changes in environmental parameters: H s =5.8m (large waves), T z =8.5s, μ=60° (increased transverse wave component), V=16 knots (for safe deceleration). The fuzzy system activates the "large wave, transverse wave" related rules, and the output point prediction... =12.3°. At this point, the historical dataset had accumulated 360 sets of data. The Bayesian optimizer detected the abrupt change in the environment and first executed an exploratory strategy: sampling in a region far from the parameter space and evaluating multiple (α,β) combinations. After 8 iterations, the optimal parameters were determined to be α=1.65 and β=1.88. Analysis showed that the β value increased, reflecting the system's awareness of the increased uncertainty in prediction under the transverse wave condition. A confidence interval was generated: [12.3-1.65×2.8,12.3+1.88×2.8]=[7.7°,17.6°], with a width of 9.9°. The measured roll angle of 14.2° fell within the interval but was close to the upper boundary. The system recorded this "critical coverage" situation, providing important information for subsequent optimization.

[0064] Time point T4 (7.5 hours into the voyage): Sea conditions remain rough but relatively stable: H s =6.2m, T z =8.8s, μ=55°, V=15 segments. The system utilizes the "critical coverage" information from the previous time step to specifically adjust the optimization strategy. The tradeoff coefficient γ in the objective function is automatically adjusted from the default value of 1.0 to 1.5, strengthening the penalty for coverage failure. After 5 iterations, the parameters α=1.60, β=1.95 are obtained. Point prediction. =13.1°, confidence interval: [13.1-1.60×2.8, 13.1+1.95×2.8]=[8.6°, 18.6°]. The measured value of 15.8° is more reliably covered in the middle of the interval, and the system performance is verified.

[0065] Phase 3: Optimization effects become apparent and stable operation is achieved (after the 10th hour of the flight). Time point T5 (12 hours of sailing): After nearly half a day of continuous learning, the system has fully adapted to the current sea state characteristics of the navigation area, with a historical dataset of 720 sets, covering various operating conditions from calm to severe. The baseline uncertainty σ has been recalculated based on the latest data and updated to 2.5° (accuracy improvement).

[0066] Current environment: H_s=4.5m, T_z=7.8s, μ=40°, V=17 knots. System performance: Point Prediction =8.9°, with an error of only 0.2° compared to the measured value of 9.1°. The optimized parameters converged to α=1.28, β=1.35, reflecting the improved confidence level of the system's prediction for the current operating condition. Confidence interval: [8.9-1.28×2.5, 8.9+1.35×2.5]=[5.7°, 12.3°], with a width of only 6.6°. Compared to the traditional fixed 3σ interval (width approximately 15.0°), the accuracy is improved by more than 56%.

[0067] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0068] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. Any of the claimed embodiments can be used in any combination.

Claims

1. An adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization, characterized in that, Includes the following steps: S1. Construct an adaptive fuzzy prediction system: Based on the input of physical quantities related to ship motion, establish an interpretable nonlinear prediction model that includes fuzzification, fuzzy rule base, fuzzy inference and defuzzification, and output one or more point prediction values ​​of ship motion response; S2. Define and initialize the confidence interval parameters based on fuzzy output: Establish a parameterized confidence interval model for the predicted point value, wherein the confidence interval is controlled by an upper bound parameter and a lower bound parameter, and perform initial value assignment; S3. Real-time data acquisition and prediction error calculation: Collect measured values ​​of ship motion, calculate prediction error, evaluate coverage based on the confidence interval of the previous moment, and construct an optimization objective function to optimize the confidence interval parameters; S4. Dynamically adjust confidence interval parameters based on Bayesian optimization and output prediction: Using the Bayesian optimization method, with the goal of maximizing the optimization objective function, the confidence interval parameters are dynamically optimized online. The surrogate model is iteratively updated by accumulating historical evaluation data, and the next set of parameters to be evaluated is determined based on the acquisition function to obtain the optimized confidence interval parameters. The optimized confidence interval parameters are substituted into the confidence interval model to generate the predicted values ​​of the motion response points at future times and their corresponding adaptive confidence intervals as the final prediction results. S5. System Update and Loop Execution: Store new data and optimized parameters into the historical dataset, and return to step S1 in the next prediction cycle to form a closed-loop adaptive prediction system.

2. The adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization according to claim 1, characterized in that, Step S1 further includes: S11. Fuzzification of input and output variables: Select physical quantities related to ship motion as input variables of the fuzzy prediction system. The physical quantities related to ship motion include at least significant wave height, average wave period, encounter angle, and ship speed. Select one or more motion responses of the ship as output variables. The motion responses are at least one of the six degrees of freedom motion of the ship. Define multiple linguistic values ​​and corresponding membership functions for each input and output variable. S12. Construct a fuzzy rule base: Construct a fuzzy rule base based on ship hydrodynamics knowledge, expert experience, or historical data. The rule base contains multiple "If-Then" rules. The antecedent of each rule is composed of the linguistic values ​​of the input variables, and the consequent is the linguistic value corresponding to the output variable. S13. Fuzzy Inference and Defuzzification: For a given real-time input vector, for each output variable, calculate the activation degree of each corresponding rule's antecedent; generate the consequent output linguistic value based on the activated rule; use the centroid method to aggregate the consequents of all activated rules to obtain the final point prediction value of the output variable. The operation is performed independently or in parallel on each output variable to obtain one or more point prediction values.

3. The adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization according to claim 1, characterized in that, The parameterized confidence interval model described in step S2 is defined in the following form: Among them, L t and U t These are the lower and upper bound parameters of the confidence interval, respectively. Let σ be the predicted value of the point, α be the baseline uncertainty obtained based on historical prediction error statistics, and α be the predicted value of the point. t and β t The positive real confidence interval parameters to be optimized are used to dynamically adjust the offset of the lower and upper bound parameters of the confidence interval relative to the point prediction. The baseline uncertainty σ is estimated by the standard deviation of the prediction error sequence within the sliding time window and is periodically updated during system operation to reflect the overall fluctuation level of the prediction error.

4. The adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization according to claim 1, characterized in that, The objective function to be optimized in step S3 is constructed as follows: Define the coverage indicator function I t If the current measured value of the ship's motion If the value falls within the confidence interval of the previous time step, the value is 1; otherwise, it is 0. Construct the objective function: Among them, U t -L t This indicates the current confidence interval width, used to penalize excessively wide forecast uncertainties; It is used to penalize prediction errors that do not cover the true values; γ is a configurable tradeoff coefficient used to adjust the balance between confidence interval width and coverage accuracy.

5. The adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization according to claim 1, characterized in that, The Bayesian optimization described in step S4 specifically includes The following process: S41. Proxy Model Construction and Update: The objective function J(α,β) is modeled using a Gaussian process; based on the historical parameter evaluation dataset composed of the accumulated historical evaluation data, the hyperparameters of the Gaussian process are inferred and updated using Bayesian methods to form its posterior distribution; S42. Acquisition Function Calculation: The expected improvement function is used as the acquisition function. This function is calculated based on the posterior distribution of the current surrogate model. The expression of the expected improvement function EI(α,β) is: in Evaluate the optimal objective function value in the dataset for the current historical parameters; S43. Execute iterative optimization loop: At each optimization time t, execute the following closed-loop process: a) Maximize the desired improved acquisition function using an optimization algorithm to solve for the next set of candidate values ​​for the confidence interval parameters to be evaluated. ; b) Candidate values ​​of confidence interval parameters The confidence interval model applied to the current time step calculates the corresponding objective function value J based on the measured data. t ; c) Transfer new data points Incorporate historical parameter evaluation dataset; In the iterative optimization mode, steps a to c) are executed repeatedly until the preset convergence condition is met; in the single-step update mode, steps a to c are executed only once.

6. The adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization according to claim 5, characterized in that, The preset convergence conditions of the iterative optimization mode include at least one of the following: the average absolute improvement of the objective function value J in multiple consecutive iterations is less than a first threshold; the global maximum value of the expected improvement function EI(α,β) is less than a second threshold; and the number of iterations reaches a preset upper limit.

7. The adaptive prediction method for ship motion based on fuzzy inference and Bayesian optimization according to claim 1, characterized in that, In step S5, a sliding time window of finite length is used to save the measured data, prediction results and optimization parameters for the most recent period, and to update the historical parameter evaluation dataset.

8. A ship motion adaptive prediction system based on fuzzy inference and Bayesian optimization, characterized in that, Includes the following functional modules: The sensor data acquisition module is used to collect real-time physical quantities related to ship motion and measured values ​​of ship motion. An adaptive fuzzy inference prediction module, connected to the sensor data acquisition module, is used to calculate and output one or more point prediction values ​​of the ship motion response based on the physical quantity input and through a fuzzy inference rule base. The parameterized confidence interval generation module is connected to the adaptive fuzzy inference prediction module and is used to generate parameterized confidence intervals based on the point prediction value, the baseline uncertainty, and the upper and lower bound parameters to be optimized. The Bayesian optimization control module is connected to the sensor data acquisition module, the adaptive fuzzy inference prediction module, and the parameterized confidence interval generation module. It is used to execute the Bayesian optimization process based on the Gaussian process surrogate model, dynamically solve the optimized confidence interval parameters, and output the optimized confidence interval parameters to the parameterized confidence interval generation module. A sliding time window storage module, connected to the Bayesian optimization control module, is used to store and manage historical parameter evaluation data sequences of finite length.

9. A ship, characterized in that, This includes the ship motion adaptive prediction system based on fuzzy inference and Bayesian optimization as described in claim 8.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the ship motion adaptive prediction method based on fuzzy inference and Bayesian optimization as described in any one of claims 1 to 7.