Two-stage meteorological route optimization method based on ship seakeeping model and related equipment

By using a two-stage meteorological route optimization method based on a three-degree-of-freedom ship seakeeping model, the problems of low energy consumption estimation accuracy and low computational efficiency in traditional meteorological route planning are solved. This method enables dynamic matching and energy efficiency optimization of ships in complex environments, thereby improving navigation accuracy and safety.

CN121480031APending Publication Date: 2026-02-06WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511558773.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-02-06

Smart Images

  • Figure CN121480031A_ABST
    Figure CN121480031A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of ship intelligent navigation and energy management, in particular to a two-stage meteorological route optimization method based on a ship seakeeping model. The method comprises the following steps: constructing a three-degree-of-freedom ship seakeeping model, comprehensively considering the motion characteristics of surging, swaying and yawing, carrying out discretization processing on meteorological parameters and ship motion states, generating a corresponding state node set and a meteorological state set, calculating motion primitive sets under different meteorological conditions, and constructing a state grid space, so as to obtain a seakeeping state of the ship. Optimal path planning is carried out through a heuristic search algorithm, and a navigation path with the lowest energy consumption is obtained. Further, segmentation and speed optimization are performed on the path segment, and the optimal propulsive force and speed profile are output in combination with acceleration constraint. According to the method, collaborative optimization of route planning and dynamic performance is realized, and route optimization calculation efficiency and intelligence and practicability of route planning are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent navigation and energy management of ships, and in particular to a two-stage weather route optimization method based on a ship seakeeping model and related equipment. BACKGROUND

[0002] In related technologies, with the continuous development of the energy-saving and emission-reducing trend of the shipping industry, weather route optimization as an effective energy-saving means has attracted more and more attention. Traditional weather route planning methods are mostly based on the assumption of preset speed and constant heading, and on this basis, the route is selected by the shortest path or minimum time principle. However, this kind of method generally ignores the interference of wind, wave, current and other environmental factors in the actual motion process of the ship, as well as the power response and energy consumption fluctuation caused by the acceleration change of the ship, resulting in low accuracy of energy consumption estimation of the final planning result. In addition, the existing method usually treats weather information as a static input or a single constraint, and does not realize dynamic matching with the ship motion response, so it is difficult to adjust the sailing strategy according to the real-time sea conditions, thereby causing the problems of high energy consumption or untimely risk avoidance. At the same time, in the traditional weather route planning method, due to the separation of path planning and speed optimization, as well as the simplified processing of weather conditions and ship dynamics, the calculation efficiency is often low, and the energy-saving effect is not ideal.

[0003] In summary, the technical problems in related technologies need to be improved. SUMMARY

[0004] The main purpose of the embodiments of the present application is to propose a two-stage weather route optimization method based on a ship seakeeping model and related equipment, so as to realize the collaborative optimization of route and speed, thereby improving the accuracy and calculation efficiency of energy consumption estimation, and ensuring that the generated route is dynamically feasible and energy-efficient optimal.

[0005] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application proposes a two-stage weather route optimization method based on a ship seakeeping model, characterized in that the method comprises the following steps: obtaining weather parameters and ship motion state parameters of a target navigation area; constructing a three-degree-of-freedom ship seakeeping model; based on the three-degree-of-freedom ship seakeeping model, discretizing the weather parameters and the ship motion state parameters to generate a ship motion state node set and a weather state set corresponding to the ship motion state node set; calculating a motion primitive set under different weather conditions according to the ship motion state node set and the weather state set; constructing a grid state space based on a state grid according to the motion primitive set; According to the lattice state space, an optimal path planning is performed by using a preset heuristic search algorithm to generate an optimal navigation path; Based on the optimal navigation path, a path segment is processed in segments, and each segmented path is optimized in speed in combination with acceleration constraints to output an optimal propulsion force and a speed profile.

[0006] In some embodiments, the three-degree-of-freedom ship seakeeping model includes three degrees of freedom of surge, sway and yaw and a dynamic equation, the surge, sway and yaw are transformed in coordinate system attitude by constructing a rotation matrix between a ship body fixed coordinate system and an NED coordinate system, and the dynamic equation is established based on an added mass matrix, a Coriolis centripetal matrix and a fluid damping matrix.

[0007] In some embodiments, based on the three-degree-of-freedom ship seakeeping model, the weather parameters and the ship motion state parameters are discretized to generate a ship motion state node set and a weather state set corresponding to the ship motion state node set, including: Based on the three-degree-of-freedom ship seakeeping model, the weather parameters are analyzed for features, the wind speed, wind direction, significant wave height, wave period and current speed in the weather parameters are divided into intervals according to a preset accuracy to form a weather state set; According to the dynamic equation of the three-degree-of-freedom ship seakeeping model, the heading, position and speed in the ship motion state are discretized according to angle and spatial interval to form a ship motion state node set.

[0008] In some embodiments, the ship motion state node set and the weather state set are used to calculate a motion primitive set under different weather conditions, including: According to the ship motion state node set and the weather state set, an initial state and a target state of the ship are set; According to the initial state and the target state of the ship, a propulsion power optimization model is established, the propulsion power optimization model is used to optimize the propulsion power of the ship; Based on the three-degree-of-freedom ship seakeeping model, the weather state set is input as an external excitation into the propulsion power optimization model to couple and solve the weather disturbance and the ship dynamics response by the propulsion power optimization model to generate an optimized solution example set; Based on the optimized solution example set, a numerical optimal control algorithm is used to solve the propulsion power optimization model to obtain an optimal control input and a track parameter with minimum propulsion power under different weather conditions; generating the set of motion primitives based on the optimal control input and the track parameters; the set of motion primitives comprises representative trajectories under different weather conditions, each motion primitive comprising a heading change, a sailing time, a propulsion force and a unit energy consumption.

[0009] In some embodiments, the optimization variables of the propulsion power optimization model comprise the propulsion force, the sailing time and the speed, and the control input constraints are defined by the propulsion force amplitude and the heading angle change rate.

[0010] In some embodiments, the grid state space comprises position nodes, heading nodes and speed nodes, and adjacent nodes are connected by motion primitives under different weather conditions, the adjacent nodes being adjacent state transition nodes of the position nodes in combination with the heading nodes and the speed nodes.

[0011] In some embodiments, the preset heuristic search algorithm evaluates the cumulative energy consumption of motion primitives between adjacent nodes in the grid state space, taking the propulsion power consumption as a cost function, to search for an optimal path with minimum energy consumption; the cost function comprises a sailing time weight term, an energy consumption weight term and a weather safety weight term.

[0012] In some embodiments, the optimal sailing path is segmented, and each segmented path is subjected to speed optimization in combination with acceleration constraints to output an optimal propulsion force and speed profile, comprising: determining a path segmentation standard based on the optimal sailing path, the path length, the weather condition change rate and the ship attitude change characteristics; dividing the complete path into a plurality of sub-path segments according to the path segmentation standard; decoupling a three-degree-of-freedom ship seakeeping model based on the plurality of sub-path segments to obtain a one-degree-of-freedom sub-model in the surge direction and a two-degree-of-freedom coupled sub-model in the sway- yaw direction; establishing a speed optimization model with the objective of minimizing propulsion power based on the one-degree-of-freedom sub-model and the two-degree-of-freedom coupled sub-model, introducing an acceleration constraint term and a propulsion force boundary condition, and solving the speed optimization model using the Pontryagin maximum principle to obtain an optimal control law for each path segment; allocating a speed to each of the sub-path segments based on the optimal control law, and splicing the optimization results of each of the sub-path segments to output a propulsion force and speed profile optimal for the overall voyage.

[0013] In some embodiments, the optimal control law in the Pontryagin maximum principle includes three stages, including an acceleration segment, a uniform speed segment and a deceleration segment, which correspond to a propulsion force saturation interval, a steady state interval and a power decay interval respectively, and the control input and time distribution of each stage are obtained analytically.

[0014] To achieve the above object, another aspect of the embodiment of the present application provides a two-stage weather route optimization device based on a ship seakeeping model, the device comprising: An acquisition module is configured to acquire weather parameters and ship motion state parameters of a target navigation area. A first construction module is configured to construct a three-degree-of-freedom ship seakeeping model. A discretization processing module is configured to perform discretization processing on the weather parameters and the ship motion state parameters based on the three-degree-of-freedom ship seakeeping model, to generate a ship motion state node set and a weather state set corresponding to the ship motion state node set. A calculation module is configured to calculate a motion primitive set under different weather conditions according to the ship motion state node set and the weather state set. A second construction module is configured to construct a grid state space based on a state grid according to the motion primitive set. A planning module is configured to perform optimal path planning by using a preset heuristic search algorithm according to the grid state space, to generate an optimal navigation path. A segmented optimization module is configured to perform segmented processing on path segments based on the optimal navigation path, and to perform speed optimization on each path segment after the segmented processing in combination with acceleration constraints, to output an optimal propulsion force and speed profile.

[0015] To achieve the above object, another aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0016] To achieve the above object, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.

[0017] To achieve the above object, another aspect of the embodiment of the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the above method.

[0018] The embodiments of this application include at least the following beneficial effects: This application provides a two-stage meteorological route optimization method based on a ship seakeeping model. This method, by constructing a three-degree-of-freedom ship seakeeping model, can accurately describe the ship's motion response characteristics in complex wave environments, considering the coupling effects of motion such as pitch, roll, and heave. This provides a more realistic dynamic basis for subsequent meteorological route optimization and significantly improves the accuracy of navigation simulation. By discretizing meteorological parameters and ship motion state parameters, a high-resolution set of state nodes and a meteorological state set are established, realizing the organic coupling between different meteorological conditions and the ship's dynamic response. This provides a multi-dimensional input space for the subsequent optimization model, enhancing the model's adaptability and generalization ability. A propulsion power optimization model based on minimizing propulsion power can obtain the optimal set of motion primitives under different meteorological conditions, effectively reducing fuel consumption and navigation energy consumption, and achieving energy conservation and emission reduction goals, while balancing navigation safety and economy. The use of a grid-based state space and a preset heuristic search algorithm for path planning not only enables rapid searching of the globally optimal route in complex meteorological fields but also avoids the problem of traditional methods easily getting trapped in local optima, improving the stability and real-time performance of path search. After generating the optimal route, the speed of the route segment is further optimized by combining acceleration constraints to generate a smooth propulsion and speed profile, ensuring that the ship's power changes are continuous and its attitude is stable during execution, thereby improving navigation comfort and safety. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating a two-stage meteorological route optimization method based on a ship seakeeping model provided in an embodiment of this application. Figure 2 This is a schematic diagram of the architecture of a two-stage meteorological route optimization method based on a ship seakeeping model provided in an embodiment of this application; Figure 3 This is a schematic diagram of a ship's three-degree-of-freedom seakeeping model provided in an embodiment of this application; Figure 4 This is a schematic diagram of the generated motion primitives provided in the embodiments of this application; Figure 5 This is a schematic diagram of multiple motion trajectories with a heading of 0 in the motion primitive provided in the embodiments of this application; Figure 6 This is a schematic diagram illustrating the relationship between the propulsion required for ship navigation and the navigation time under multiple motion trajectories with a heading of 0 in the motion element provided in this application embodiment; Figure 7 This is a schematic diagram of a two-stage meteorological route optimization device based on a ship seakeeping model provided in an embodiment of this application. Detailed Implementation

[0020] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and not intended to limit the present application. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with embodiments of the present application. They are merely examples of apparatuses and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0021] It can be understood that the terms "first", "second" and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information, without departing from the scope of the embodiments of the present application. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon determination" or "in response to a determination".

[0022] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0024] The embodiment of the application provides a two-stage weather route optimization method based on a ship seakeeping model and related equipment, which constructs a three-degree-of-freedom ship seakeeping model, accurately describes the motion response characteristics of the ship in a complex wave environment under the condition of considering the coupling influence of pitching, rolling and heaving, provides a real dynamic basis for weather route optimization, and significantly improves the simulation accuracy. By discretizing the weather parameters and the ship motion state parameters, a high-resolution state node set and a weather state set are established, the coupling of different weather conditions and ship dynamic responses is realized, and the adaptability and generalization ability of the model are enhanced. Based on the propulsion power optimization model of minimizing propulsion power, the optimal motion element set under different weather conditions can be obtained under the premise of considering safety and economy, so as to reduce fuel consumption and energy consumption, realize energy saving and emission reduction. The grid state space based on the state grid and the preset heuristic search algorithm are used for path planning, the global optimal route in the complex weather field can be quickly searched, the local optimum is avoided, and the planning stability and real-time performance are improved. Finally, the speed of the path segment is optimized in combination with the acceleration constraint, a smooth propulsion force and speed profile is generated, the dynamic change is continuous, the attitude is stable, the navigation comfort and safety are improved.

[0025] The two-stage weather route optimization method based on a ship seakeeping model and related equipment provided by the embodiment of the application relates to the technical field of intelligent navigation and energy management of a ship. The two-stage weather route optimization method based on a ship seakeeping model and related equipment provided by the embodiment of the application can be applied to a terminal, can be applied to a server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited to this; the server end can be configured as a stand-alone physical server, can be configured as a server cluster or a distributed system formed by multiple physical servers, can be configured as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms, and the server can also be a node server in a blockchain network; the software can be an application that implements a two-stage weather route optimization method based on a ship seakeeping model, and the like, but is not limited to the above forms.

[0026] The application is operable in a multitude of generic or specific computer system environments or configurations. Examples include personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media including memory storage devices.

[0027] Referring to Figures 1-7 The application relates to a two-stage weather route optimization method based on a ship seakeeping model.

[0028] Figure 1 An optional flowchart of a two-stage weather route optimization method based on a ship seakeeping model provided by the application is shown in the figure, Figure 2 The architecture schematic diagram is shown in the figure, Figures 1-2 The method in the figure can include but is not limited to steps S1 to S7.

[0029] A two-stage weather route optimization method based on a ship seakeeping model, the method includes but is not limited to the following steps: S1: Obtain weather parameters and ship motion state parameters of a target navigation area; S2: Construct a three-degree-of-freedom ship seakeeping model; The three-degree-of-freedom ship seakeeping model includes three degrees of freedom of surge, sway and yaw and a dynamic equation; the surge, sway and yaw are subjected to attitude transformation of coordinate systems through construction of a rotation matrix between a ship body fixed coordinate system and an NED coordinate system; and the dynamic equation is obtained based on an added mass matrix, a Coriolis centripetal matrix and a fluid damping matrix.

[0030] In this embodiment, a sea state dataset covering different seasons and meteorological conditions is selected to suit the actual operating environment of the target navigation area. Meteorological parameters include wind speed, wind direction, wave height, wave direction, wave period, and ocean current speed. Motion response data of the target vessel under similar sea states is collected, including longitudinal speed, lateral speed, bow angular velocity, heel angle, heading angle, and hull attitude information. This response data can be obtained through sea trial measurements, shipborne inertial navigation system (INS), and attitude reference system (AHRS), and is filtered and denoised to eliminate sensor drift and undulation errors.

[0031] After data preparation, a fixed hull coordinate system and a North-East-Down (NED) coordinate system are established. The fixed hull coordinate system describes the ship's motion characteristics relative to itself, while the NED coordinate system expresses the ship's attitude and position changes in the geographical environment. Through the rotational relationship between the two coordinate systems, attitude coupling and coordinate transformation between different degrees of freedom of motion can be achieved.

[0032] This embodiment selects sway, roll, and pitch as the three degrees of freedom to describe the main motions of a ship under wave action. Sway reflects the ship's translational motion in the forward and backward direction, roll reflects the ship's drifting motion in the left and right direction, and pitch reflects the ship's rotational motion about its vertical axis. To accurately capture the coupling effects caused by waves, the interaction between the above three degrees of freedom is considered, enabling the model to describe the nonlinear dynamic response characteristics of the ship under complex wave fields.

[0033] In the model construction process, the influence of hydrodynamic added mass, fluid damping, Coriolis force, and centripetal force of the hull were also comprehensively considered. Added mass is used to reflect the additional effect of fluid inertia caused by the motion of the hull, fluid damping describes the energy loss between the water flow and the hull surface, while the Coriolis and centripetal force terms are used to compensate for the inertial deviation caused by curvilinear motion and rotational motion.

[0034] By fitting experimental or simulation data under different wave directions and frequencies, the variation patterns of various hydrodynamic parameters in the frequency and time domains can be obtained, and corresponding functions or lookup tables can be established. Based on these parameters, by combining external meteorological excitation with the inherent response characteristics of the ship, a three-degree-of-freedom seakeeping dynamic model can be obtained to describe the ship's seakeeping performance under the coupled effects of pitch, sway, and bow roll.

[0035] In this embodiment, a three-degree-of-freedom ship seakeeping model is constructed, such as... Figure 3 As shown.

[0036] It should be noted that, Figure 3 This demonstrates the ship's coordinate system in the geographic coordinate system. ) and meteorological input (wind speed) , wave direction between them.

[0037] The horizontal axis E (east) and the vertical axis N (north) together form a geographical reference coordinate system, while the ship coordinate system takes the center of the ship as the origin, and the bow direction as , and the transverse direction as . The angle parameters in the figure are: : the heading angle (the angle between the ship coordinate system and the north direction); : the wind direction angle; : the wave direction angle.

[0038] These direction parameters are used together to establish the coupling relationship between the external excitation (wind, wave, current) and the ship attitude in the three-degree-of-freedom ship seakeeping dynamics model.

[0039] The position and attitude of the ship are generally described by the attitude vector in the NED coordinate system, where N and E represent the position of the ship in the north and east directions, and represents the yaw angle. The rate of change of the attitude vector is determined by the velocity vector in the body-fixed coordinate system, where u, v, and r correspond to surge, sway, and yaw rate, respectively. The rotation matrix is shown in equations (1) and (2): Equation (1); Equation (2); The influence of the meteorological environment on the ship motion is described in the body-fixed coordinate system. Assuming that the sea current is non-rotational, its velocity directly affects the relative velocity of the ship, as shown in equation (3): Equation (3); Further, the thrust and moment of the wind , the thrust and moment of the wave are obtained. The thrust and moment experienced by the ship determine the rate of change of the relative velocity , as shown in equation (4): Equation (4); where M is the rigid body added mass matrix, C is the Coriolis centripetal matrix, and D is the fluid dynamic damping matrix.

[0040] The ship resistance is generally divided into static water resistance, wind resistance, and wave additional resistance, so the forces and moments generated by the meteorological environment are considered from the three-degree-of-freedom (surge, sway, and yaw) direction. The current force and moment are considered in the fluid dynamic damping D matrix, as shown in equation (5): Equation (5); wherein , , , and denote the hydrodynamic coefficients. The static water resistance in the surge direction is determined by . The wind force and moment acting on the three-DOF seakeeping model are calculated by the ship speed , the wind speed and the attack angle , as shown in Equation (6) and Equation (7): Equation (6); Equation (7); wherein denotes the air density, and denote the ship's frontal and lateral projected areas, denotes the ship's length.

[0041] The wave-induced force and moment depend on the wave characteristics and the ship motion state. The JONSWAP wave spectrum characterized by the significant wave height , the wave period , and the wave direction is used to describe the wave energy distribution in open sea.

[0042] S3: based on the three-DOF ship seakeeping model, discretize the meteorological parameters and the ship motion state parameters to generate a ship motion state node set and a meteorological state set corresponding to the ship motion state node set; wherein, based on the three-DOF ship seakeeping model, discretize the meteorological parameters and the ship motion state parameters to generate a ship motion state node set and a meteorological state set corresponding to the ship motion state node set, comprising: based on the three-DOF ship seakeeping model, perform feature analysis on the obtained meteorological parameters, and divide the wind speed, wind direction, significant wave height, wave period and current speed in the meteorological data into intervals according to a preset accuracy to form a meteorological state set; according to the dynamics equation of the three-DOF ship seakeeping model, discretize the heading, position and speed in the ship motion state according to angle and spatial interval to form a ship motion state node set.

[0043] In this embodiment, to realize the organic coupling of meteorological conditions and ship dynamics response, the historical meteorological parameters and ship motion state are discretely modeled to generate a set of state nodes and meteorological states that can be used for optimal control solution.

[0044] Firstly, the historical meteorological parameters of the target navigation area are preprocessed. The collected data includes key environmental elements such as sea current velocity , wind speed , wind attack angle , significant wave height , wave period and wave direction . In view of the differences in time resolution and spatial resolution of the original meteorological parameters, a space-time interpolation algorithm is used for uniformization processing to form a continuous meteorological field data set. Subsequently, the meteorological conditions are discretely processed according to the empirical interval: the wind direction is divided into 16 direction intervals with an interval of 22.5°; the significant wave height and wave period are divided into several discrete levels according to the sea state level standard; the wave direction is consistent with the wind direction or is set to a correction interval within the difference of ±45°, thereby forming a high-resolution meteorological state set. This discretization method can balance data accuracy and computational feasibility, ensuring that the dynamic response under different meteorological conditions is distinguishable and representative.

[0045] Secondly, the ship motion state parameters are discretized. Considering that meteorological parameters are usually stored in grid form, the ship's motion state is also discretized with corresponding spatial resolution. Specifically, the position components of the ship in the north direction (N) and the east direction (E) are discretized with an interval of 45° to form a node direction set; to simplify the state space size, it is assumed that the longitudinal velocity of the ship remains constant within the local navigation section, and the initial lateral velocity and yaw angle velocity are set to zero, thereby reducing the computational complexity. Each discrete node contains state information such as ship position, heading, speed level, etc., forming a complete set of ship motion state nodes.

[0046] In addition, to establish the mapping relationship between meteorological states and ship response, this embodiment associates corresponding ship response characteristics on each meteorological state node, including changes in surge and sway velocity, yaw angle change rate, and propulsion power response. Through multi-source interpolation and sample statistical methods, a corresponding matrix is formed between the meteorological state set and the motion state node set, which is used to describe the motion coupling characteristics of the ship under different sea conditions.

[0047] Finally, by integrating the above processing steps, a multi-dimensional coupled state node set and meteorological state set are generated. This discretization structure provides a discrete input space for the subsequent propulsion power optimization model, enabling the model to perform fast search and energy consumption evaluation among limited nodes, thereby laying a data foundation for the generation of motion primitives and path optimization.

[0048] S4: calculating a set of motion primitives under different weather conditions according to the set of ship motion state nodes and the set of weather states; The calculating of the set of motion primitives under different weather conditions according to the set of ship motion state nodes and the set of weather states comprises: S41: setting an initial state and a target state of the ship according to the set of ship motion state nodes and the set of weather states; S42: establishing a propulsion power optimization model according to the initial state and the target state of the ship, the propulsion power optimization model being used for optimizing the propulsion power of the ship; In this embodiment, a starting node is selected from the set of ship motion state nodes as the initial state of the ship, and a target node is selected as the termination state of the voyage.

[0049] On this basis, the current voyage environment is determined according to the wind speed, wave height, wave direction and other parameters in the set of weather states, and a propulsion power optimization model is established with the minimization of the propulsion power as the optimization objective.

[0050] The optimization variables include the propulsion force, the voyage time and the speed, and the constraints of the control input are defined by the amplitude range of the propulsion force and the rate of change of the heading angle.

[0051] For example, when the weather condition is relatively complex, the system automatically tightens the rate of change of the heading angle constraint to avoid energy consumption fluctuations caused by excessive maneuvering; in smooth sea conditions, a wider speed change range is allowed to speed up the search efficiency.

[0052] More specifically, the initial state and the final motion state of the ship are set as shown in formula (8) and formula (9): Formula (8); Formula (9); Wherein, , and represent the initial state, , and represent the final state, represents the constant speed under the selected propulsion force, represents the ship voyage time.

[0053] The ship control input constraints are shown in formula (10) and formula (11): Formula (10); Formula (11); In this optimal control problem, the optimization objective is the energy consumption of the ship, which is the voyage time , control input and speed The expression is shown in equation (12): Equation (12) S43: Based on the three-degree-of-freedom ship seakeeping model, input the set of weather states as external excitation to the propulsion power optimization model to couple the weather disturbance and the ship dynamics response by the propulsion power optimization model to generate a set of optimization solution examples; In this embodiment, in order to fully consider the nonlinear influence of weather factors on ship power response, the wind speed, wave height, wave direction, flow rate and wave spectrum distribution characteristics in the set of weather states are input as external excitation to the three-degree-of-freedom ship seakeeping model.

[0054] First, according to the relationship between the sea state level and the wind and wave direction, the weather parameters are normalized and interpolated to keep consistent with the time scale and spatial resolution of the ship state node.

[0055] Secondly, in the solving process, the weather excitation term is decomposed into periodic wave excitation and random disturbance components, which respectively drive the dynamic response process of the three degrees of freedom of surge, sway and yaw. Through the time step control strategy, the weather input of each discrete time step is dynamically updated to simulate the non-steady state motion of the ship in the continuously changing sea state.

[0056] To ensure the accuracy and stability of the calculation results, this embodiment uses parallel multi-scene simulation to solve different weather combinations. Each simulation example corresponds to a specific weather condition, and the output content includes: the speed change curve of the ship under the weather condition; the instantaneous consumption characteristics of the propulsion power; the ship attitude response (heel angle, yaw angle); the deviation of the track and the attitude correction requirement.

[0057] Through the above process, a large number of weather-dynamics response samples are obtained to form a set of optimization solution examples. The example set reflects the propulsion energy consumption law and attitude response characteristics of the ship under different weather conditions, and provides a real and calculable data basis for the subsequent optimal control algorithm.

[0058] S44: Based on the set of optimization solution examples, use the numerical optimal control algorithm to solve the propulsion power optimization model to obtain the optimal control input and track parameters with the minimum propulsion power under different weather conditions; In this embodiment, based on the set of optimization solution examples, the numerical optimal control algorithm is used to globally and locally optimize and solve the propulsion power minimization problem.

[0059] Firstly, the ship response data of different weather cases are pre-screened to eliminate abnormal samples with divergent attitude or out-of-limit propulsion, ensuring the physical feasibility of the input data. Then the optimization process is divided into two stages: The first stage (coarse optimization stage): a global search strategy based on dynamic programming is adopted to traverse the combination of discrete control inputs (propulsion and rudder angle rate of change) to quickly obtain the approximate optimal control path under different weather conditions. The results of this stage are used to determine the approximate value range of the control variables and the energy consumption distribution trend.

[0060] The second stage (fine optimization stage): based on the first stage, a numerical optimization method combining gradient descent and iterative correction is used to fine-tune the control variables in the continuous domain. By calculating the propulsion power gradient and the rate of change of the flight path in real time, the control input is gradually corrected, and the energy consumption curve gradually converges to the local optimum.

[0061] At the same time, the robustness of the optimal solution under different weather disturbances is analyzed to ensure that the optimal control input has high energy efficiency and attitude stability in adjacent weather fields.

[0062] Finally, the output results of the algorithm include: optimal propulsion time distribution under different weather conditions; corresponding speed profile; heading adjustment strategy and attitude stability interval; energy consumption and propulsion efficiency indicators under each weather condition.

[0063] These optimization output data are structured as input for the motion primitive set in the subsequent steps, providing a directly reusable dynamic optimal strategy template for path planning.

[0064] S45: generating the motion primitive set according to the optimal control input and flight path parameters; the motion primitive set includes representative trajectories under different weather conditions, and each motion primitive includes heading change, sailing time, propulsion, and unit energy consumption. In this embodiment, after determining the initial state, final state, and weather characteristics of ship motion, the optimal control is used to obtain motion primitives composed of representative trajectories under various weather conditions, as shown in Figure 4 .

[0065] It should be noted that Figure 4 The longitude (LON) and latitude (LAT) are used as coordinate axes to display multiple representative motion primitive trajectories generated by the ship under different heading angles (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°).

[0066] The blue pentagram represents the start point, the red pentagram represents the end point, the green arrow represents the wave direction, and the brown arrow represents the current direction.

[0067] The distribution of different color curves in the figure reflects the feasible track shape of the ship from the central start point to different end points under different meteorological conditions and heading angle control.

[0068] Figure 4 The spatial distribution of the motion primitive set obtained based on the three-degree-of-freedom ship seakeeping model and optimal control solution is explained, which provides input basis for the subsequent connection of Lattice state grid nodes and path planning.

[0069] Among them, the trajectory with heading information is used to connect adjacent nodes. Taking the motion primitive with initial heading angle of 0 as an example, along different trajectories, three adjacent nodes can be reached, and the required propulsion and sailing time of the ship under each trajectory are calculated, as shown in Figure 5 and Figure 6 .

[0070] It should be noted that in Figure 5 , the horizontal axis is identified as LON, indicating the longitudinal position of the ship in the track planning.

[0071] It corresponds to the east-west displacement or position coordinate of the ship in the NED coordinate system.

[0072] In the constructed Lattice state grid, each node contains the geographical position, heading angle and speed information of the ship.

[0073] Therefore, LON represents the spatial discrete position change of the ship along the east-west direction between different nodes.

[0074] LON<0: indicates that the ship is located in the discrete position west of the initial node (center); LON>0: indicates that the ship is located in the discrete position east of the initial node.

[0075] In summary, LON is the spatial coordinate discrete result of the path node in the longitudinal direction, used to describe the east-west movement trajectory of the ship in the state grid.

[0076] Figure 5 In the longitudinal direction, the horizontal axis is identified as LAT, indicating the latitude direction position of the ship in the track planning.

[0077] It corresponds to the south-north displacement or position coordinate of the ship in the geographical coordinate system, used to reflect the latitude distribution of the ship under different trajectories.

[0078] In the Lattice State Grid, the position (LON, LAT) of each node collectively defines the spatial state of the ship in the grid of the sea area.

[0079] Therefore, LAT represents the trend of the ship's track change in the north-south direction.

[0080] High LAT: indicates that the ship's track deviates to the north (or upwards); Low LAT: indicates that the ship's track deviates to the south (or downwards).

[0081] The figure shows multiple representative motion primitive trajectories generated under different weather conditions (exa_tra_0 to exa_tra_8 as shown in the legend). The horizontal axis LON and the vertical axis LAT correspond to the spatial discrete node coordinates of the ship in the longitude and latitude directions, respectively. Each curve represents a feasible trajectory of the ship extending in different directions from the center node (LON=0, LAT≈0) under specific weather conditions and control inputs.

[0082] It should be noted that in Figure 6 : Horizontal axis (Time): represents the sailing time in seconds (s), which characterizes the time variation process of the ship sailing along the representative motion primitive trajectories under different weather conditions and control inputs. This time axis reflects the dynamic response characteristics of each trajectory segment with time in the optimal control solution.

[0083] Vertical axis (Propulsion Force): represents the propulsion force in kilonewtons (kN), which describes the actual propulsion force output by the ship to resist different weather disturbances and fluid resistance while maintaining a heading of 0. This propulsion force is one of the optimization variables of the optimal control model and is obtained by numerical optimal control algorithms to achieve the minimum propulsion power objective.

[0084] Different colored curves in the figure correspond to multiple representative motion primitive trajectories under different weather state combinations with the same heading condition.

[0085] As can be seen from the figure, under different weather conditions, the ship's propulsion force shows different dynamic variation trends over time. Some trajectories show a power decline trend in the middle of the voyage, indicating that the system automatically reduces propulsion power to reduce energy consumption under optimal control constraints. In trajectories with more complex sea conditions or increased resistance, the propulsion force slightly increases over time to maintain attitude stability and speed continuity.

[0086] S5: Constructing a grid state space based on a state grid according to the set of motion primitives; S6: According to the grid state space, an optimal path is planned using a preset heuristic search algorithm to generate an optimal sailing path. The lattice state space based on the state lattice includes position nodes, heading nodes and velocity nodes, and the nodes are connected by motion primitives under different weather conditions, and the cost function between the nodes is composed of propulsion power consumption, sailing time and weather penalty term. The preset heuristic search algorithm adopts A* search algorithm, and the propulsion power consumption is taken as the cost function in the lattice state lattice to evaluate the cumulative energy consumption of the motion primitives between the nodes, and the optimal path with the minimum energy consumption is searched; the cost function includes sailing time weight term, energy consumption weight term and weather safety weight term.

[0087] In the embodiment, first, a lattice state lattice model for path planning is constructed according to the motion primitive set. The lattice state lattice adopts a three-dimensional state description method, each node contains the geographical position, heading angle and speed information of the ship, and is used to represent the possible motion state of the ship under different weather conditions and dynamic constraints.

[0088] In the construction process of the state space, first, the entire navigation area is discretized by using the geographical coordinate system according to the geographical boundary of the target navigation area and the start and end points of the navigation task. Each position node corresponds to a geographical grid unit in the navigation area; the heading angle is further discretized on each position node to generate a plurality of heading nodes at a certain angle resolution (for example, 5° or 10°); a plurality of speed level nodes are divided on each heading node to form a three-dimensional state node structure. The discrete structure can comprehensively reflect the possible spatial and dynamic distribution state of the ship under complex weather conditions.

[0089] Then, the nodes are connected in a direction by using motion primitives under different weather conditions. Each connection edge represents a feasible trajectory of the ship under a certain control input and weather action from one state node to another state node. The motion primitive is generated from the simulation results under different wind and wave combinations, propulsion power and steering angle conditions, so each connection edge corresponds to a motion behavior under a specific weather condition. In this way, the lattice state lattice can reflect the feasibility and dynamic continuity of the navigation path in structure.

[0090] In the path search process, a comprehensive cost function is constructed to evaluate the energy consumption and risk of the connection between the nodes. The cost function mainly consists of three parts: Energy consumption weight term: used to measure the propulsion power consumption of the ship when executing the motion primitive, reflecting the energy cost of navigation; Sailing time weight term: used to describe the sailing time of the path, ensuring that the timeliness of the overall task is considered while saving energy; Weather safety weight term: used to punish the path passing through the severe weather area or high-risk wave area, so as to avoid the safety hazard in the strong wind wave area.

[0091] In the path planning, the A* search algorithm takes the propulsion power consumption as the core cost function, and performs heuristic search on all nodes in the Lattice state grid. The algorithm first starts from the starting node, expands the adjacent nodes in turn according to the motion primitive connection, calculates the cumulative cost value of each feasible node, and combines the distance of the target point and the weather risk level to build a heuristic evaluation function. By preferentially selecting the node with lower cumulative cost and smaller heuristic cost for expansion, the algorithm can gradually approach the global optimal solution.

[0092] During the search process, the system accumulates the propulsion energy consumption, sailing time and weather risk of each candidate path in real time, and when the end node is searched, the optimal sailing path that meets the propulsion power minimization and weather safety constraint is obtained. This path can be further used for speed optimization and energy consumption allocation calculation in the subsequent steps.

[0093] Through the above implementation, the Lattice state grid structure can realize efficient modeling of the multi-dimensional state space of the ship in a complex weather environment, and the A* search algorithm can realize global optimal path planning of sailing energy consumption under the premise of ensuring sailing safety and stability. This method takes into account the calculation efficiency and result accuracy, and is suitable for route optimization tasks of various ship types and different sailing areas.

[0094] S7: based on the optimal sailing path, segment processing is performed on the path segments, and speed optimization is performed on each path segment after segment processing in combination with acceleration constraints, to output the optimal propulsion force and sailing speed profile.

[0095] The method for performing speed optimization on the path segments based on the optimal sailing path and outputting the optimal propulsion force and sailing speed profile comprises the following steps: S71: based on the optimal sailing path, determining a path segmentation standard according to the path length, weather condition change rate and ship attitude change characteristics; and dividing the complete path into a plurality of sub-path segments according to the path segmentation standard; S72: based on the plurality of sub-path segments, decoupling a three-degree-of-freedom ship seakeeping model to obtain a one-degree-of-freedom sub-model in the surge direction and a two-degree-of-freedom coupled sub-model in the sway and yaw directions; In this embodiment, in order to improve the real-time performance and stability of speed optimization calculation, the aforementioned three-degree-of-freedom ship seakeeping model is decoupled to enable the dynamic responses in different directions to be solved and controlled respectively.

[0096] Specifically, the motion equations of three degrees of freedom, i.e., surge, sway and yaw, are analyzed independently. Since the surge direction is mainly related to the propulsion system and the longitudinal wave resistance, it is less disturbed by the outside and has a relatively independent response, so it is extracted separately to form a one-degree-of-freedom sub-model, which is mainly used to describe the relationship between the speed change of the ship in the heading direction and the thrust response in the wave environment.

[0097] The sway and yaw directions have obvious coupling characteristics when subjected to lateral waves or oblique waves. In order to accurately reflect the lateral drift and heading stability of the ship, these two degrees of freedom are constructed as a two-degree-of-freedom coupled sub-model. This sub-model considers the mutual influence of the lateral hydrodynamic force, the wave excitation moment and the rudder angle correction term, and is used to simulate the lateral drift and heading movement dynamic response of the ship in the asymmetric wave field.

[0098] In the decoupling process, the three-dimensional dynamic equation is decomposed into independent low-dimensional systems by introducing a directional disturbance factor and an attitude response weight, thereby significantly reducing the computational complexity. In this way, the longitudinal sub-model mainly supports the propulsion control and speed optimization, while the sway-yaw sub-model is used to real-time correct the coupling influence of heading stability and energy loss.

[0099] In addition, in each path segment, the system dynamically adjusts the coupling strength weight of the two sub-models according to the weather state (such as wave height gradient and wave direction angle). When the angle between the wave direction and the heading is small, the longitudinal model dominates the control; when the oblique wave or lateral wave is significant, the coupling weight of the sway-yaw is increased, realizing hierarchical adaptive decoupling control. This strategy can ensure the stability and convergence of the speed optimization model in complex sea conditions.

[0100] S73: Based on the one-degree-of-freedom sub-model and the two-degree-of-freedom coupled sub-model, a speed optimization model with the objective of minimizing the propulsion power is established, and an acceleration constraint term and a propulsion force boundary condition are introduced. The speed optimization model is solved by using the Pontryagin maximum principle to obtain the optimal control law of each path segment; the optimal control law in the Pontryagin maximum principle includes three stages, and each stage includes an acceleration segment, a uniform speed segment and a deceleration segment. The acceleration segment, the uniform speed segment and the deceleration segment correspond to the propulsion force saturation interval, the steady state interval and the power decay interval respectively, and the control input and time allocation of each stage are obtained by analysis.

[0101] In this embodiment, in order to realize fine speed regulation of each sub-path segment, the system fully considers the dynamic constraints, weather constraints and physical limitations of the propulsion device when establishing the speed optimization model.

[0102] Firstly, in the one-degree-of-freedom sub-model of surge direction, the system minimizes the propulsion power as the core optimization objective, combines the longitudinal resistance curve with the weather correction coefficient, and determines the energy consumption characteristics in each speed interval. By taking the actual acceleration upper limit (such as the propeller's bearable torque, the ship's inertia response limit, etc.) as the constraint condition, the ship's longitudinal oscillation or the rudder overload caused by too fast speed change is prevented.

[0103] Secondly, in the two-degree-of-freedom coupled sub-model of sway- yaw direction, the system introduces the weather coupling stability index, and monitors the wave direction, wave height change rate and heading deviation angle in real time. When the system detects that the lateral wave energy is enhanced or the yaw angle deviation is increased, the distribution proportion of the propulsion force is automatically adjusted, so that the speed change process takes into account the heading stability and energy economy.

[0104] In the optimization solving process, the navigation control is divided into three stages: Acceleration section: the system gradually increases the propulsion power according to the sea conditions at the starting point of the path and the thrust margin, so that the ship smoothly accelerates to the predetermined cruising speed within the allowable acceleration range. In this stage, the acceleration is dynamically adjusted according to the longitudinal resistance change and the wave height prediction result, so as to prevent the ship's bow from lifting or diving excessively.

[0105] Constant speed section: in the middle section of the voyage, the system maintains stable propulsion force output, automatically fine-tunes the speed by monitoring the wind and wave changes in real time, ensures the balance between energy consumption and speed, and suppresses the periodic attitude disturbance caused by wave excitation.

[0106] Deceleration section: in the last section of the path or when entering the severe weather area, the system gradually reduces the propulsion power, so that the ship smoothly decelerates within the safe acceleration range, preventing attitude instability or energy waste caused by excessive inertia.

[0107] In the whole speed optimization process, the system takes energy consumption, time and safety as the comprehensive evaluation index, and obtains the optimal propulsion force distribution and speed time sequence control strategy of each path section through iterative solving. Finally, the output control law not only reflects the propulsion power distribution law of the ship in different sea conditions, but also provides dynamic reference for the automatic driving and energy management system, realizing intelligent energy-saving navigation control.

[0108] S74: based on the optimal control law, the speed of each sub-path section is allocated, the optimization results of each sub-path section are spliced, and the optimal propulsion force and speed profile of the whole voyage are output.

[0109] For reference Figure 7 The embodiment of the application also provides a two-stage weather route optimization device based on a ship seakeeping model, and the device comprises: An acquisition module 710 is configured to acquire weather parameters and ship motion state parameters of a target navigation area. The first construction module 720 is configured to construct a three-degree-of-freedom ship seakeeping model. The discretization processing module 730 is configured to perform discretization processing on the meteorological parameters and the ship motion state parameters based on the three-degree-of-freedom ship seakeeping model, to generate a ship motion state node set and a meteorological state set corresponding to the ship motion state node set. The calculation module 740 is configured to calculate a motion primitive set under different meteorological conditions according to the ship motion state node set and the meteorological state set. The second construction module 750 is configured to construct a grid point state space based on a state grid according to the motion primitive set. The planning module 760 is configured to perform optimal path planning on the grid point state space by using a preset heuristic search algorithm, to generate an optimal sailing path. The segmented optimization module 770 is configured to perform segmented processing on path segments based on the optimal sailing path, and perform speed optimization on each path segment after the segmented processing in combination with acceleration constraints, to output an optimal propelling force and a speed profile.

[0110] It can be understood that the contents in the above method embodiments are all applicable to the device embodiments, the device embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0111] The embodiment of the application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.

[0112] It can be understood that the contents in the above method embodiments are all applicable to the device embodiments, the device embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0113] The embodiment of the application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.

[0114] It can be understood that the contents in the above method embodiments are all applicable to the storage medium embodiments, the storage medium embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0115] The embodiment of the application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the above method.

[0116] It can be understood that the contents in the above method embodiments are all applicable to the present program product embodiments, the present program product embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0117] In summary, the two-stage weather route optimization method based on ship seakeeping model and related equipment provided by the embodiments of the present application can accurately describe the motion response characteristics of the ship under complex wave field by constructing a ship seakeeping dynamics model including three degrees of freedom of surge, sway and yaw, comprehensively considering nonlinear factors such as added mass, fluid damping and Coriolis force, and providing a high-fidelity dynamics basis for weather route optimization. By discretizing the weather parameters and ship state parameters, a multi-dimensional state node set and a weather state set are established, the coupling modeling of weather disturbance and ship response is realized, and reliable input is provided for the propulsion power optimization model. Based on the two-stage optimal control solution of the minimum propulsion power target, the propulsion force and heading can be adaptively adjusted under different weather conditions, and the optimal distribution of global and local energy consumption is realized. By using the Lattice state grid based on the motion primitive and the A* search algorithm for path planning, the optimal route can be generated under the premise of considering energy consumption, time and weather safety, and the stability and intelligence of path planning are improved. Further combining the model decoupling and acceleration constraint speed optimization strategy, the segmented optimal propulsion force and speed profile are obtained by using the Pontryagin maximum principle, the unification of energy consumption minimization and attitude stability is realized, and the navigation energy saving and safety performance are significantly improved.

[0118] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0119] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures shown, or combine certain steps or different steps.

[0120] Those skilled in the art can understand that all or some steps in the above disclosed method, functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.

[0121] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of these terms herein is to be construed to cover the possibility where more than one of the similar elements can be employed, for example, where a first element can be construed as a similar element or the same element as second element. Furthermore, the meaning of "first", "second", "third", "fourth" and the like can depend on the context in which they are used in a claim and no special significance should be read into them. Such terms can refer to an element employed in some order other than that specified in the claims, or they can refer to some "plain" or ordinary meaning of the element and such a construction can depend on the description given to that element in the specification.

[0122] The preferred embodiments of the application described above are illustrative only and not restrictive of the scope of the application. Any modification, equivalent replacement or improvement not departing from the scope and spirit of the preferred embodiments of the application should be within the scope of the application.

Claims

1. A two-stage meteorological route optimization method based on a ship seakeeping model, characterized in that, The method includes the following steps: Acquire meteorological parameters and ship motion status parameters for the target navigation area; Construct a three-degree-of-freedom ship seakeeping model; Based on the three-degree-of-freedom ship seakeeping model, the meteorological parameters and the ship motion state parameters are discretized to generate a set of ship motion state nodes and a meteorological state set corresponding to the set of ship motion state nodes. Calculate the set of motion primitives under different meteorological conditions based on the set of ship motion state nodes and the set of meteorological states; Construct a grid-based state space based on the set of motion primitives; Based on the grid state space, a preset heuristic search algorithm is used to plan the optimal path and generate the optimal navigation path. Based on the optimal navigation path, the path segment is divided into segments, and combined with acceleration constraints, the speed of each segment is optimized to output the optimal thrust and speed profile.

2. The method according to claim 1, characterized in that, The three-degree-of-freedom ship seakeeping model includes three degrees of freedom: pitch, sway, and bow, and dynamic equations. The pitch, sway, and bow are transformed by constructing a rotation matrix between the ship's fixed coordinate system and the NED coordinate system. The dynamic equations are established based on the added mass matrix, the Coriolis centripetal matrix, and the fluid damping matrix.

3. The method according to claim 2, characterized in that, The method based on the three-degree-of-freedom ship seakeeping model discretizes the meteorological parameters and the ship motion state parameters to generate a set of ship motion state nodes and a corresponding set of meteorological states, including: Based on the three-degree-of-freedom ship seakeeping model, the acquired meteorological parameters are characterized and analyzed. The wind speed, wind direction, significant wave height, wave period, and ocean current speed in the meteorological parameters are divided into intervals according to a preset precision to form a meteorological state set. Based on the dynamic equations of the three-degree-of-freedom ship seakeeping model, the heading, position, and speed in the ship's motion state are discretized according to angles and spatial intervals to form a set of ship motion state nodes.

4. The method according to claim 1, characterized in that, The step of calculating the set of motion primitives under different meteorological conditions based on the set of ship motion state nodes and the set of meteorological states includes: Based on the set of ship motion state nodes and the set of weather states, the initial state and target state of the ship are set; A propulsion power optimization model is established based on the initial state and the target state of the ship, and the propulsion power optimization model is used to optimize the ship's propulsion power; Based on the three-degree-of-freedom ship seakeeping model, the meteorological state set is used as an external excitation input to the propulsion power optimization model, so as to couple the solution of meteorological disturbance and ship dynamic response through the propulsion power optimization model and generate an optimization solution example set; Based on the aforementioned set of optimization examples, the propulsion power optimization model is solved using a numerical optimal control algorithm to obtain the optimal control input and trajectory parameters that minimize propulsion power under different weather conditions. The set of motion primitives is generated based on the optimal control input and trajectory parameters; the set of motion primitives includes representative trajectories under different weather conditions, and each motion primitive includes heading change, travel time, propulsion force and unit energy consumption.

5. The method according to claim 4, characterized in that, The optimization variables of the propulsion power optimization model include propulsion force, travel time and speed, and the control input constraints are limited by the propulsion force amplitude and the rate of change of the heading angle.

6. The method according to claim 1, characterized in that, The grid state space includes position nodes, heading nodes, and velocity nodes. Adjacent nodes are connected by motion primitives under different weather conditions. The state transition nodes between adjacent position nodes are the state transition nodes of adjacent heading nodes and velocity nodes.

7. The method according to claim 1, characterized in that, The preset heuristic search algorithm evaluates the cumulative energy consumption of motion primitives between adjacent nodes in the grid state space using propulsion power consumption as the cost function, and searches for the optimal path with the minimum energy consumption; the cost function includes a flight time weight term, an energy consumption weight term, and a weather safety weight term.

8. The method according to claim 1, characterized in that, The process of segmenting the path based on the optimal navigation path, and combining acceleration constraints, to optimize the speed of each segmented path and output the optimal thrust and speed profile includes: Based on the optimal navigation path, the path segmentation criteria are determined according to the path length, the rate of change of meteorological conditions, and the characteristics of ship attitude change. The complete path is divided into several sub-path segments according to the aforementioned path segmentation criteria; Based on several of the aforementioned sub-path segments, the three-degree-of-freedom ship seakeeping model is decoupled to obtain a one-degree-of-freedom sub-model in the pitch direction and a two-degree-of-freedom coupled sub-model in the sway-bow direction. Based on the one-degree-of-freedom sub-model and the two-degree-of-freedom coupled sub-model, a velocity optimization model with the goal of minimizing propulsion power is established. Acceleration constraints and propulsion boundary conditions are introduced, and the velocity optimization model is solved using the Pontryagin maximum principle to obtain the optimal control law for each path segment. Based on the optimal control law, the speed of each sub-path segment is allocated, and the optimization results of each sub-path segment are spliced ​​together to output the overall optimal propulsion and speed profile.

9. The method according to claim 8, characterized in that, The optimal control law in the Pontryagin maximum principle includes three stages: an acceleration stage, a constant speed stage, and a deceleration stage. The acceleration stage, the constant speed stage, and the deceleration stage correspond to the propulsion saturation interval, the steady state interval, and the power decay interval, respectively. The control input and time allocation for each stage are obtained analytically.

10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 9.