Intelligent ship control method and system based on state machine and event triggering

CN122837441APending Publication Date: 2026-09-29WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611152968.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

这类方法虽能实现基本的路径跟踪,但是传统PID控制难以处理多约束耦合问题,在复杂环境下的跟踪精度与稳定性有限

Benefits of technology

1、本申请的智能船舶控制方法,通过构建 Fossen 三自由度船舶模型精准刻画船舶位置、航向、航速耦合运动规律,同步建立包括执行机约束环境安全约束的控制约束体系,可将全部物理、环境约束统一纳入控制求解框架,提升复杂海岛水域路径跟踪精度与运动稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122837441A_ABST
    Figure CN122837441A_ABST
Patent Text Reader

Abstract

The application provides an intelligent ship control method and system based on a state machine and event triggering, relates to the technical field of ship control, and comprises the following steps: a Fossen three-degree-of-freedom ship model is constructed, and a control constraint system is established; when it is determined that the current is in a navigation stage, current ship state and surrounding target perception data are acquired, state errors with a reference track and real-time minimum distances with surrounding targets are calculated; if it is determined that MPC event triggering conditions are met, candidate trajectory sets are determined based on the Fossen three-degree-of-freedom ship model and the control constraint system with the current ship state as a starting point, an MPC algorithm is used to optimize and calculate a current optimal trajectory, and a first-step control instruction of the optimal trajectory is output; when it is detected that the current is in a meeting scene, the candidate trajectory sets are filtered based on the type of the meeting scene, and then the current optimal trajectory is solved. The scheme improves the complex island water area path tracking precision and motion stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ship control technology, and in particular to an intelligent ship control method and system based on state machine and event triggering. Background Technology

[0002] With the widespread application of intelligent ships in tasks such as marine monitoring, resource exploration, and deep-sea operations, the issue of limited endurance has become increasingly prominent. Collaborative replenishment at sea has become a key technology for ensuring long-duration, large-scale operations. In complex island environments, collaborative replenishment missions involving multiple intelligent ships are characterized by a large number of targets, complex environmental constraints, and significant mission phases. At the control level, not only is high-precision path tracking required, but also issues such as collision avoidance between ships and obstacle constraints must be addressed.

[0003] Existing intelligent ship control methods mainly employ PID control. While these methods can achieve basic path tracking, traditional PID control struggles to handle multi-constraint coupling problems, resulting in limited tracking accuracy and stability in complex environments. Summary of the Invention

[0004] In view of this, this application proposes an intelligent ship control method and system based on state machine and event triggering.

[0005] Firstly, this application provides an intelligent ship control method based on state machines and event triggering, including: Construct a Fossen three-degree-of-freedom ship model and establish a control constraint system that includes actuator constraints and environmental safety constraints; Once it is determined that the ship is currently in a navigation phase, the current ship status and surrounding target perception data are acquired, and the state error between the current ship status and the reference track and the real-time minimum distance to surrounding targets are calculated. If the MPC event triggering condition is met based on the state error and the real-time minimum distance, starting from the current ship state, a set of candidate trajectories is determined based on the Fossen three-degree-of-freedom ship model and the control constraint system. The MPC algorithm is used to optimize and calculate the current optimal trajectory, output the first step control command of the optimal trajectory, and continuously update the ship state. When an encounter scenario is detected, a trajectory selection strategy is determined based on the type of the encounter scenario and international maritime collision avoidance rules. The candidate trajectory set is then filtered for consistency before the current optimal trajectory is solved.

[0006] In one embodiment, acquiring the current ship state and surrounding target perception data, and calculating the state error between the current ship state and the reference track, as well as the real-time minimum distance to surrounding targets, includes: Acquire the ship's current planar position, heading angle, and speed status, as well as the position and motion status data of surrounding targets within the perception range; Read the coordinates of the reference track node corresponding to the current path index, calculate the expected heading angle with latitude correction in combination with the real-time position of the ship, and determine the reference state quantity for track tracking; The difference between the actual state of the ship and the reference state is used to calculate the position tracking error and the heading tracking error, which together form the state error set for track tracking. Calculate the planar Euclidean distances between the ship and each surrounding target, and select the minimum value as the real-time minimum distance at the current moment.

[0007] In one embodiment, the step of determining a set of candidate trajectories based on the Fossen three-degree-of-freedom ship model and the control constraint system, starting from the current ship state, and using the MPC algorithm to optimize and calculate the current optimal trajectory includes: Using the current real-time motion state of the ship as the initial starting point for trajectory deduction, the state evolution relationship is constructed based on the Fossen three-degree-of-freedom ship model; Based on the state evolution relationship, multiple initial heading changes are uniformly selected within the maximum steering angle constraint range, and multiple candidate navigation trajectories are generated by combining the heading change exponential decay rule. Each candidate navigation trajectory is sequentially checked for actuator constraints and environmental safety constraints, and a set of candidate trajectories that meet all constraints is obtained. Based on a comprehensive evaluation function that includes heading deviation cost and terminal distance cost, the comprehensive evaluation value of each candidate trajectory is solved through the entire process, and the trajectory with the minimum comprehensive cost is selected as the current optimal trajectory.

[0008] In one embodiment, the trajectory selection strategy based on the type of encounter scenario and international maritime collision avoidance rules includes: Obtain the encounter characteristic parameters between the ship and surrounding target ships, and determine the corresponding encounter scenario type based on the encounter characteristic parameters. The encounter characteristic parameters include relative bearing angle and heading difference, and the encounter scenario type includes three types of encounter scenarios: face-to-face, crossing, and overtaking. Based on the navigation avoidance requirements of various scenarios according to the International Maritime Collision Prevention Code, when the encounter scenario type is determined to be a face-to-face encounter scenario, the trajectory screening strategy is determined to eliminate left-turn and straight-ahead trajectories and retain right-turn candidate trajectories. When the encounter scenario is determined to be an intersection scenario, the trajectory filtering strategy is to eliminate left-turn trajectories and retain right-turn and straight-going candidate trajectories. When the encounter scenario type is determined to be a chase scenario, the trajectory filtering strategy is determined to filter candidate trajectories that exceed the offset threshold.

[0009] In one embodiment, the intelligent ship control method further includes: If the MPC event triggering condition is not met based on the state error and the real-time minimum distance, the normal closed-loop control mode is maintained, the reference waypoint coordinates and the real-time position of the ship corresponding to the current path index are obtained, the expected heading angle with latitude correction is calculated, and the heading tracking error between the actual heading and the expected heading is obtained. Based on the maximum steering angle constraint of the actuator and the heading tracking error, a segmented heading correction is performed, and a first-order acceleration smoothing model is used to complete the speed adjustment, generating heading and speed control commands that conform to the actuator constraints. The control commands under the normal control mode are output to the ship's actuators, the ship's motion state is updated based on the Fossen three-degree-of-freedom ship model, the next control cycle is entered, and the MPC event triggering conditions are continuously monitored.

[0010] In one embodiment, the intelligent ship control method further includes: When it is determined that the current ship is in the resupply phase, the current speed control target is fixed at zero, and active collision avoidance steering is prohibited.

[0011] In one embodiment, the intelligent ship control method further includes: In the current outbound phase, the three constraints of distance error, path index, and heading attitude are checked. When all three constraints are met, the resupply initiation event is triggered. During the resupply phase, the resupply timer is continuously accumulated. When the timer reaches the preset timer threshold, the resupply completion event is triggered. After resupply is completed, return reference waypoints are generated in reverse order, and the system switches to return flight mode. During the return journey, the distance error between the return point and the initial starting point is continuously monitored. When the distance is less than a preset threshold, the mission is considered complete and the control process is terminated.

[0012] Secondly, this application also provides an intelligent ship control system based on state machines and event triggering, including: The module is used to build a Fossen three-degree-of-freedom ship model and establish a control constraint system that includes actuator constraints and environmental safety constraints. The acquisition module is used to acquire the current ship status and surrounding target perception data when it is determined that the ship is currently in the navigation phase, and to calculate the state error between the current ship status and the reference track and the real-time minimum distance to the surrounding targets. The tracking module is used to determine the MPC event triggering condition based on the state error and the real-time minimum distance, starting from the current ship state, based on the Fossen three-degree-of-freedom ship model and the control constraint system, determine the candidate trajectory set, use the MPC algorithm to optimize and calculate the current optimal trajectory, output the first step control command of the optimal trajectory, and continuously update the ship state. The collision avoidance module is used to determine the trajectory selection strategy based on the type of the encounter scenario and international maritime collision avoidance rules when it detects that the current encounter scenario is in progress. The candidate trajectory set is filtered for rule consistency before the current optimal trajectory is solved.

[0013] Thirdly, this application also provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the intelligent ship control method based on state machine and event triggering as described in the first aspect.

[0014] Fourthly, this application also provides a non-transitory computer storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the intelligent ship control method based on state machine and event triggering as described in the first aspect.

[0015] The intelligent ship control method based on state machine and event triggering proposed in this application has the following advantages over related technologies: 1. The intelligent ship control method of this application accurately describes the coupled motion law of ship position, heading and speed by constructing a Fossen three-degree-of-freedom ship model, and simultaneously establishes a control constraint system including actuator constraints and environmental safety constraints. It can unify all physical and environmental constraints into the control solution framework, thereby improving the path tracking accuracy and motion stability in complex island waters.

[0016] 2. By collecting real-time perception data of the ship itself and surrounding targets during the navigation phase, the trajectory status error and real-time minimum distance are calculated simultaneously as trigger criteria. MPC trajectory optimization is only initiated when the error exceeds the limit or when the ship enters a dangerous area. During periods without risk, simple routine control is maintained, which greatly reduces redundant optimization calculations. Under the premise of ensuring timely tracking and collision avoidance response, the overall computing load of the cluster is reduced, making it suitable for computing power-constrained scenarios of multi-ship long-range collaborative replenishment.

[0017] 3. When the current encounter scenario is detected, before optimizing the candidate trajectory, the encounter type is first determined and the corresponding trajectory filtering strategy is matched. The candidate trajectory is filtered by rules before the optimal navigation trajectory is solved. This ensures that all output control actions fully comply with maritime passage regulations, eliminates the collision avoidance logic conflict when multiple ships are replenishing and sailing, and improves navigation safety in complex island multi-target encounter scenarios. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating an intelligent ship control method based on state machine and event triggering in one embodiment of this application. Figure 2 This is a schematic diagram illustrating the principle of the MPC algorithm for optimizing and calculating the current optimal trajectory in one embodiment of this application; Figure 3 This is a schematic diagram of different types of encounter scenarios in one embodiment of this application; Figure 4 This is a schematic diagram illustrating a scenario in one embodiment of this application where intelligent ships travel to their assigned resupply platforms; Figure 5 This is a schematic diagram illustrating a scenario in which an intelligent ship uses MPC to track its trajectory at a turning point, according to one embodiment of this application. Figure 6 This is a schematic diagram of a scenario in which the cross-encounter interface uses ship collision avoidance rules to avoid collisions, according to one embodiment of this application. Figure 7 This is a schematic diagram illustrating a scenario in which an intelligent ship arrives at a supply platform for resupply, according to one embodiment of this application. Figure 8 This is a schematic diagram of a scenario in one embodiment of this application where an intelligent ship returns after completing resupply. Figure 9 This is a schematic diagram of a scenario where an intelligent ship is controlled by MPC while navigating narrow waterways, according to one embodiment of this application. Figure 10 This is a schematic diagram illustrating the scenario in one embodiment of this application where all intelligent ships complete the entire round-trip resupply process; Figure 11 This is a comparative schematic diagram of the trajectories of the path tracking control algorithm in one embodiment of this application; Figure 12 This is a comparative diagram of the tracking errors of various types of algorithms in one embodiment of this application; Figure 13 This is a comparative schematic diagram of the heading angle errors of various types of algorithms in one embodiment of this application; Figure 14 This is a comparative diagram of the path tracking speeds of various algorithm types in one embodiment of this application; Figure 15 This is a comparative diagram showing the resource consumption of the algorithm in one embodiment of this application; Figure 16This is a schematic diagram of the structure of an intelligent ship control system based on state machine and event triggering in one embodiment of this application. Detailed Implementation

[0020] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0021] In some embodiments, such as Figure 1 As shown, this application provides an intelligent ship control method based on state machine and event triggering, including the following steps S101 to S104.

[0022] S101: Construct a Fossen three-degree-of-freedom ship model and establish a control constraint system that includes actuator constraints and environmental safety constraints.

[0023] The Fossen three-degree-of-freedom (3-DOF) ship model, proposed by Norwegian scholar T.I. Fossen, is a standard dynamic model for the planar maneuvering of unmanned surface vessels / ships. It is specifically designed to describe the horizontal plane motion of a ship. Focusing on horizontal plane motion, the Fossen model ignores small-amplitude undulations such as heave, roll, and pitch, retaining only the three core degrees of freedom: sway, roll, and bow. It establishes a kinematic transformation relationship between the geodetic coordinate system and the ship's body coordinate system, and constructs dynamic equations based on the inertia matrix, Coriolis force matrix, and damping matrix. This model can characterize the nonlinear coupled maneuvering characteristics between changes in ship speed and heading. Actuator constraints limit the maximum single-step turning angle and the attenuation of heading changes, while environmental safety constraints define safe distance thresholds between the ship and surrounding vessels, supply platforms, and island obstacles. This integrates the ship's physical maneuvering limitations and the maritime environmental safety boundaries into the control solution framework.

[0024] In the application, the current state of the intelligent ship can be set as follows:

[0025] in, This indicates the planar position of the intelligent ship. For heading angle, For speed, based on the discrete-time Fossen three-degree-of-freedom ship model, in the prediction time domain... Internally constructed state evolution relationship:

[0026] in, Let be the step size in the discrete time interval. This indicates the change in heading at the current step.

[0027] Actuator constraints include maximum steering angle constraints. and heading change :

[0028]

[0029] in, The attenuation coefficient is used to obtain a set of candidate state sequences in the prediction time domain, which provides a basis for subsequent objective function evaluation and constraint screening.

[0030] Environmental safety constraints define safe distance thresholds between intelligent ships and other ships, supply platforms, and island obstacles:

[0031] in, This indicates the current location of the intelligent ship under control. Indicates the first An external target at time The location. For A security limit threshold also needs to be set. When the ship's real-time minimum distance to surrounding targets This indicates that the intelligent ship has entered a potential interaction or conflict zone, and the MPC algorithm needs to be activated to assess the future trajectory safety.

[0032] S102: When it is determined that the ship is currently in a navigation phase, acquire the current ship status and surrounding target perception data, calculate the state error between the current ship status and the reference track, and the real-time minimum distance to surrounding targets.

[0033] It is understandable that after confirming that the ship is currently in the navigation phase through state determination, the system collects real-time ship status data consisting of the ship's position, heading, and speed, as well as target perception data corresponding to surrounding obstacles and other ships. Based on the ship's actual state and the expected state corresponding to the reference track, the system calculates the track tracking state error. At the same time, it combines the position information of the ship and each surrounding target to solve for the real-time minimum distance between them. By continuously acquiring the above two types of key feature quantities, the system can achieve synchronous monitoring of track tracking deviation and potential collision risks.

[0034] S103: If the MPC (Model Predictive Control) event triggering conditions are met based on the state error and the real-time minimum distance, starting from the current ship state, a set of candidate trajectories is determined based on the Fossen three-degree-of-freedom ship model and control constraint system. The MPC algorithm is used to optimize and calculate the current optimal trajectory, output the first step control command of the optimal trajectory, and continuously update the ship state.

[0035] Specifically, a state error threshold and a safe distance threshold can be preset as judgment criteria. Each control cycle compares the real-time calculated trajectory tracking state error with the state error threshold, and compares the real-time minimum distance between the ship and surrounding targets with the safe distance threshold. When the trajectory tracking state error exceeds the state error threshold, or the real-time minimum distance is less than the safe distance threshold, the MPC event trigger condition is determined to be met, thus initiating the subsequent candidate trajectory generation and model predictive control optimization process. The rolling optimization selection process is as follows: Figure 2 As shown. If neither of the two conditions is met, the MPC optimization operation will not be triggered, and the normal control mode will continue to run. The event triggering criteria are summarized as follows: Defined as:

[0036]

[0037] in =1 indicates that the MPC algorithm is used for path tracing, which corresponds to step S103. This indicates the tracking error. This represents the state error threshold. =0 indicates that the normal control mode is maintained.

[0038] It is understandable that if the MPC event triggering conditions are met based on the state error and the real-time minimum distance, the model predictive control optimization process is initiated. The ship's current motion state is used as the initial starting point for trajectory prediction. The evolution law of ship motion is deduced based on the Fossen three-degree-of-freedom ship model. In conjunction with the control constraint system that includes actuator constraints and environmental safety constraints, trajectory screening is carried out to construct a set of feasible candidate trajectories. The MPC algorithm is used to find the current optimal navigation trajectory within the candidate trajectory set according to the preset evaluation index. Only the first step control command corresponding to the optimal trajectory is extracted and sent to the ship's actuators. The ship's state is updated in a rolling manner based on the ship's motion law. The trajectory optimization calculation is initiated as needed through the event triggering mechanism, which reasonably reduces the continuous computing overhead of the control system while ensuring path tracking accuracy and navigation safety.

[0039] S104: When it is detected that the current encounter scenario is in progress, a trajectory selection strategy is determined based on the type of encounter scenario and international maritime collision avoidance rules. The candidate trajectory set is filtered for rule consistency before the current optimal trajectory is solved.

[0040] It should be noted that, as Figure 3 As shown, according to the International Regulations for Preventing Collisions at Sea (ICCMS), encounters between motorized vessels under mutual visibility conditions are categorized into three types: head-on encounters, cross encounters, and overtaking encounters. In a head-on encounter, both vessels have a duty to avoid each other and should turn to starboard to pass each other on their port sides. In a cross encounter, if another vessel is located on the starboard side of the vessel, the vessel acts as the yielding vessel and must not cross the bow of the other vessel. In an overtaking encounter, the overtaking vessel continues to bear the responsibility of avoiding collisions. The control system identifies the encounter type by solving for the relative bearing and heading differences between vessels and matches the corresponding avoidance maneuver requirements to form a trajectory screening standard. This eliminates candidate navigation trajectories that violate collision avoidance rules, ensuring that the planned navigation maneuvers meet maritime navigation regulations and preventing logical contradictions in avoidance during multi-vehicle interactions.

[0041] It is understandable that by identifying the encounter situation between the vessel and surrounding target vessels and determining the current encounter scenario, different encounter types such as face-to-face encounter, cross encounter, and overtaking are distinguished based on relative heading and bearing characteristics. A dedicated trajectory screening strategy is formed by matching the avoidance obligations and maneuvering requirements corresponding to various situations in the International Maritime Collision Avoidance Rules. This screening strategy is used to conduct compliance screening on the generated candidate trajectory set, eliminating navigation trajectories that violate navigation avoidance rules, and retaining only feasible trajectories that meet the rule constraints. Then, the calculation of the optimal navigation trajectory is initiated, thereby ensuring that the final output control and maneuvering actions comply with maritime passage rules and avoid navigation risks caused by avoidance logic conflicts during multi-vehicle interactions.

[0042] The aforementioned intelligent ship control method based on state machines and event triggering accurately characterizes the coupled motion laws of ship position, heading, and speed by constructing a Fossen three-degree-of-freedom ship model. Simultaneously, it establishes a control constraint system including actuator constraints and environmental safety constraints, unifying all physical and environmental constraints into the control solution framework, thus improving path tracking accuracy and motion stability in complex island waters. By collecting real-time perception data of the ship itself and surrounding targets during navigation, and simultaneously calculating the trajectory state error and real-time minimum distance as trigger criteria, MPC trajectory optimization is only initiated when the error exceeds the limit or the ship enters a dangerous area. During risk-free periods, simple conventional control is maintained, significantly reducing redundant optimization calculations. This reduces the overall computational load of the cluster while ensuring timely tracking and collision avoidance responses, making it suitable for computationally limited scenarios involving multi-ship long-range collaborative replenishment. When an encounter scenario is detected, before optimizing the candidate trajectory, the encounter type is first determined and the corresponding trajectory filtering strategy is matched. After the candidate trajectory is filtered by rules, the optimal navigation trajectory is solved to ensure that all output control actions fully comply with maritime passage regulations, eliminate the collision avoidance logic conflict when multiple ships are replenishing and sailing, and improve navigation safety in complex island multi-target encounter scenarios.

[0043] In some embodiments, acquiring current ship status and surrounding target perception data, and calculating the state error between the current ship status and the reference track, as well as the real-time minimum distance to surrounding targets, includes: acquiring the ship's current planar position, heading angle, and speed status quantities, as well as the position and motion status data of surrounding targets within the perception range; reading the coordinates of the reference track node corresponding to the current path index, calculating the expected heading angle with latitude correction in combination with the ship's real-time position, and determining the reference state quantity for track tracking; subtracting the actual ship status from the reference state quantity, calculating the position tracking error and heading tracking error respectively, and forming a set of state errors for track tracking; and calculating the planar Euclidean distance between the ship and each surrounding target, and selecting the minimum value as the real-time minimum distance at the current moment.

[0044] In the application, real-time state variables characterizing the ship's motion, such as planar position, heading angle, and speed, are collected. Simultaneously, the position and motion status information of surrounding obstacles and target ships within the sensing and detection range are acquired. The coordinates of reference track nodes matched by the current path index are retrieved, and the desired heading angle pointing to the target track node is calculated based on the geodetic coordinate latitude correction relationship, constructing reference state variables for track tracking control. The deviations between the ship's real-time actual state and the obtained reference state variables are calculated item by item to obtain position tracking error and heading tracking error, which are then integrated to form a complete set of track tracking state errors. The planar Euclidean distances between the ship and all surrounding targets are calculated sequentially, and the minimum value among all distance values ​​is selected to obtain the real-time minimum distance between the ship and surrounding targets at the current moment. This allows for the simultaneous acquisition of track tracking deviation indicators and collision risk characteristics, providing complete real-time observation data for subsequent MPC event trigger condition judgment.

[0045] In some embodiments, starting from the current ship state, a set of candidate trajectories is determined based on the Fossen three-degree-of-freedom ship model and control constraint system. The MPC algorithm is used to optimize and calculate the current optimal trajectory, including: taking the current real-time motion state of the ship as the initial starting point for trajectory derivation, constructing a state evolution relationship based on the Fossen three-degree-of-freedom ship model; uniformly selecting multiple sets of initial heading changes within the maximum steering angle constraint range based on the state evolution relationship, and generating multiple candidate navigation trajectories by combining the heading change exponential decay rule; sequentially verifying the actuator constraints and environmental safety constraints of each candidate navigation trajectory, and filtering to obtain a set of candidate trajectories that meet all constraints; and based on a comprehensive evaluation function that includes heading deviation cost and terminal distance cost, iterating through and solving the comprehensive evaluation value of each candidate trajectory, and selecting the trajectory with the minimum comprehensive cost as the current optimal trajectory.

[0046] Using the ship's current real-time motion state as the initial state benchmark for trajectory derivation, the state evolution relationship of the ship's horizontal plane motion is established based on the Fossen three-degree-of-freedom ship model; on this basis, according to the physical constraint of the ship's maximum steering angle, within the interval... Uniform selection within Each initial heading change corresponds to... Several candidate trajectories are generated, and the course change is iteratively updated exponentially using a decay coefficient between 0 and 1 within the prediction time domain, resulting in multiple candidate navigation trajectories that conform to the ship's maneuvering characteristics. The course change is updated using an exponential decay method within the prediction time domain as follows:

[0047]

[0048] in, This is the attenuation coefficient.

[0049] Then, multi-constraint compliance checks are performed on all candidate navigation paths layer by layer, eliminating invalid paths that exceed the ship's hardware maneuvering limits or do not meet navigation safety distance requirements. For each candidate path... Calculate its heading deviation cost Cost of End-to-End Distance Construct a comprehensive evaluation function:

[0050]

[0051] in, , The evaluation function is selected from the set of candidate trajectories that satisfy the constraints of the implementing agency, environmental safety, and COLREGs (Convention on Preventing Collisions at Sea) rules, using the weighting coefficients. The trajectory with the smallest minimum value is taken as the current optimal trajectory.

[0052] Finally, rolling control output is performed: only the first step control input of the optimal trajectory (i.e., the heading change and speed command of the current step) is executed, and the above monitoring and optimization process is repeated in the next moment, thereby realizing the rolling time domain control closed loop of "monitoring-triggering-prediction-filtering-execution".

[0053] In some embodiments, determining a trajectory selection strategy based on the type of encounter scenario and international maritime collision avoidance rules includes: acquiring encounter characteristic parameters between the vessel and surrounding target vessels; determining the corresponding encounter scenario type based on the encounter characteristic parameters; and, based on the navigation avoidance requirements for various scenarios according to international maritime collision avoidance rules, determining the trajectory selection strategy as follows: when the encounter scenario type is determined to be a face-to-face encounter scenario, the trajectory selection strategy is to eliminate left-turn and straight-ahead trajectories and retain right-turn candidate trajectories; when the encounter scenario type is determined to be an intersection scenario, the trajectory selection strategy is to eliminate left-turn trajectories and retain right-turn and straight-ahead candidate trajectories; and when the encounter scenario type is determined to be an overtaking scenario, the trajectory selection strategy is to filter candidate trajectories that exceed the offset threshold. The encounter characteristic parameters include relative bearing angle and heading difference, and the encounter scenario types include three types: face-to-face, intersection, and overtaking.

[0054] In application, according to the International Regulations for Preventing Collisions at Sea (COCRS), encounters are categorized into three types: head-on encounters, crossovers, and overtaking.

[0055] in, The bearing of the target vessel relative to this vessel. For relative heading difference, Refer to item 13 of COLREGs for setting the 22.5° discrimination interval for overtaking scenarios. , , It involves appropriately introducing a safety margin for control based on the defined angular domain.

[0056] In COLREGs, encounter scenarios are analyzed and categorized into three types: direct encounter, intersection, and overtaking. This indicates a confrontation situation, with the heading within the range of [-10°, 10°]. , This indicates a crossover on the port side and a crossover on the starboard side, with the angles of travel within the range of (10°, 112.5°) and (247.5°, 350°). This indicates the overtaking situation, with the hull angle within the range of (112.5°, 247.5°).

[0057] The trajectory selection strategies for different encounter scenarios are as follows: In a head-on encounter scenario, when two ships are directly ahead of each other with their headings within the range of [-10°, 10°], the rules require both ships to turn to the right. Therefore, the trajectory selection strategy is to retain all right-turn trajectories, except for left-turn and straight-ahead trajectories. In a cross-encounter scenario, when the other ship is on the starboard side of the ship, the ship, as the yielding vessel, should actively give way. Therefore, the trajectory selection strategy is to eliminate all left-turn trajectories and retain right-turn and straight-ahead trajectories. In an overtaking scenario, when two ships are traveling in the same direction, they should maintain safe passage. Therefore, the trajectory selection strategy is to limit the lateral offset of the candidate trajectories.

[0058] After being filtered by geometric safety constraints, candidate trajectories are further constrained by COLREG rules, ultimately forming a set of safe trajectories with consistent rules.

[0059] In some embodiments, the intelligent ship control method further includes: if the MPC event triggering condition is not met based on the state error and the real-time minimum distance, maintaining the conventional closed-loop control mode, obtaining the reference waypoint coordinates and the ship's real-time position corresponding to the current path index, calculating the desired heading angle with latitude correction, and obtaining the heading tracking error between the actual heading and the desired heading; performing segmented heading correction based on the actuator's maximum steering angle constraint and the heading tracking error, using a first-order acceleration smoothing model to complete the speed adjustment, and generating heading and speed control commands that conform to the actuator constraints; outputting the control commands under the conventional control mode to the ship's actuators, updating the ship's motion state based on the Fossen three-degree-of-freedom ship model, entering the next control cycle, and continuously monitoring the MPC event triggering condition.

[0060] Among them, the conventional control mode adopts a direct correction method based on heading error:

[0061] Let the current reference point be The current location of the USV is Then the expected heading angle The calculation is as follows:

[0062] The actual heading angle is The desired heading angle is Actual heading angle The deviation from the desired heading angle is defined as , This indicates the maximum permissible steering angle within a single time step.

[0063] Speed ​​control uses a first-order acceleration smoothing model:

[0064] It is understandable that when the preset MPC event triggering conditions are not met, it indicates that the current ship track tracking deviation is within the allowable range and there is no collision risk in the navigation environment. The system maintains the conventional closed-loop control mode with low computing power consumption and continues to operate. In this mode, the system retrieves the reference waypoint coordinates corresponding to the current path index in real time, combines the ship's real-time planar position information, and introduces a latitude correction algorithm to eliminate geographical deviations in the geodetic coordinate system. It accurately solves the expected heading angle of the ship pointing to the target waypoint, and obtains the real-time heading tracking error by comparing the deviation between the ship's actual heading and the expected heading. To ensure smooth ship handling and not exceed the hardware operating limits, the system combines the maximum steering angle constraint of the actuator to perform segmented differentiated heading correction on the heading tracking error. At the same time, it uses a first-order acceleration smoothing model to continuously and smoothly adjust the ship's speed, effectively suppressing sudden changes in handling and speed jitter, thereby generating heading control commands and speed control commands that perfectly match the physical constraints of the ship's actuators. Subsequently, the control commands generated in the conventional control mode are sent to the ship's actuators to complete the real-time control output, and the current motion state information of the ship is iteratively updated based on the Fossen three-degree-of-freedom ship model to complete the closed-loop control process of a single control cycle. The system then enters the next control cycle to continuously collect ship status and environmental perception data, and cyclically monitor MPC event triggering conditions to achieve continuous, stable, and low-power trajectory tracking control under normal and stable navigation conditions.

[0065] In some embodiments, the intelligent ship control method further includes: when it is determined that the ship is currently in a resupply phase, controlling the current speed control target to be fixed at zero and prohibiting the execution of active collision avoidance steering steps.

[0066] In applications, a finite state machine for collaborative resupply intelligent ships can be designed. The state machine is defined as follows:

[0067] in, It is a discrete set of states, corresponding to three states: outbound voyage state, resupply operation state, and resupply disengagement state. This is an event set matrix, which includes distance-triggered events, time-triggered events, task completion events, etc. yes × State transition mapping; It is a continuous state-space matrix, mainly containing variables such as position, heading, speed, and path index; The set of control inputs corresponds to the commands for thrusters and steering.

[0068] The first-level state is defined as: , In the outbound state, the process of path tracking, collision avoidance, and deceleration approach is executed; In the replenishment state, the functions of stationary maintenance and replenishment timing are executed; In return mode, the intelligent vessel disengages from control and embarks on its return journey. For example... Figures 4 to 10 As shown, Figures 4 to 10 The results of a visual simulation of the cluster replenishment process are presented.

[0069] The second-level state is defined as: These correspond to normal cruising, deceleration approach, static hold, and acceleration driving modes, respectively. The second-level state does not change the mission phase but can be used to adjust the intelligent ship's driving behavior in each state to better fit real-world scenarios.

[0070] It is understandable that when the system confirms through phase status determination that the ship is currently in the phase of maritime collaborative replenishment operation, it will automatically switch to dedicated replenishment steady-state control logic, cancel the dynamic speed tracking target and fix the ship's speed control target to zero, so that the ship maintains a stationary navigation state of hovering at a fixed point, in order to meet the positional stability conditions required for maritime material docking, equipment replenishment and collaborative operations. At the same time, it will shield the active collision avoidance and steering control authority in the navigation phase and prohibit the system from performing any autonomous active collision avoidance and steering operations, so as to avoid the ship's attitude deviation and positional jitter caused by small collision avoidance maneuvers and minor course adjustments during the replenishment process. This effectively prevents the ship from being misaligned, swaying or docking from the replenishment platform, ensuring the attitude stability and operational safety of the multi-ship collaborative replenishment process, and realizing precise partitioning switching of control logic between the replenishment phase and the navigation phase.

[0071] In some embodiments, the intelligent ship control method further includes: when the ship is currently in the outbound phase, verifying three constraints: distance error, path index, and heading attitude; triggering a resupply initiation event when all three constraints are met; continuously accumulating resupply time during the resupply phase; triggering a resupply completion event after the time reaches a preset time threshold; generating return reference waypoints in reverse order after resupply, switching to the return voyage state; continuously monitoring the distance error from the initial starting point during the return phase; determining that the task is completed when the distance is less than a preset threshold; and terminating the control process.

[0072] In application, the criterion for determining the transition from outbound to resupply status is designed as follows: the intelligent ship transitions from outbound status... Switch to supply status At this time, three conditions must be met simultaneously: spatial, path, and attitude. Spatially, the location of the supply target point is set as follows: The current location of the intelligent ship is Then the distance error is defined as When satisfied Distance event triggered at time ,in To replenish the security domain radius, the current path index is set to [value]. The total number of path nodes is Then it requires This ensures that the intelligent ship has completed tracking of the predetermined trajectory. The heading error is defined in terms of attitude as... when At the time, it was believed that intelligent ships already met the resupply requirements.

[0073] The criterion for determining the supply status is designed as follows: Supply status In a typical time-driven state, during the resupply phase, the intelligent ship no longer uses a propulsion path index, and the speed control target is fixed at zero. A resupply timer is introduced. ,when Time event triggered ,in This is the preset supply duration.

[0074] The criterion for determining the state from resupply completion to return is designed as follows: After the resupply process is completed, the state machine must execute the following steps: Supply status reached The transition to the return journey requires reversing the outbound path; ensuring the desired heading points directly to the return journey's starting point to avoid small-angle oscillations; and adding a small offset at the beginning of the initial heading or path. This prevents the trajectories of intelligent ship swarms from completely overlapping, thus obscuring the tracking performance of the control algorithm.

[0075] The criteria for the end of the return journey and the termination of the task are designed as follows: the termination condition of the return journey phase corresponds to that of the outbound journey phase. Let the target point of the return journey phase be... When satisfied Trigger task completion event The state machine terminates.

[0076] Design a state-dependent predictive control performance index function, which is used to dynamically switch control objectives under different replenishment stages:

[0077] in, Indicates the first The path tracking error of the step, For heading error, For speed error; , , These are the weighting coefficients that change with the state. In the outbound and return states, and Choose a larger value to ensure path tracking accuracy and heading stability; in resupply mode, The dominant weight is determined by a single fixed weight function, with the remaining weights approaching zero, thus forcing low-speed maintenance at the control level. During the outbound and return disengagement phases, path tracking accuracy and heading stability are the primary objectives; during the resupply phase, position maintenance and velocity convergence are the primary objectives, thereby avoiding control objective conflicts arising from a single fixed weight function in multi-stage tasks.

[0078] In conjunction with the above embodiments, in the first-level downhill state, both path tracking and collision avoidance rules are enabled. CETMPC control adopts an event-triggered approach, with the control objective focusing on path convergence and navigation safety. At this time, the candidate trajectory prediction and optimal decision-making mechanism of step S103 is used to continuously calculate the deviation between the reference track and the actual position, and adjustments are made based on the deviation information. On this basis, a fused COLREGs dynamic collision avoidance mechanism is introduced to identify encounter scenarios and filter trajectories for other vessels within the perception range.

[0079] In Level 1, resupply path tracking is disabled, collision avoidance rules switch to monitoring mode, MPC control is completely disabled, and the control objective focuses on attitude maintenance. Path tracking is completely disabled: the state machine no longer provides valid reference waypoint indices to the path tracking module, and the path index... Stop incrementing, path tracking error The USV no longer participates in control calculations; simultaneously, candidate trajectory prediction and optimal decision-making mechanisms are suspended in this state, and the USV no longer uses the propulsion path node as the control target. The COLREGs dynamic collision avoidance mechanism no longer outputs avoidance steering commands, but still maintains real-time calculation and early warning monitoring of the distance to surrounding vessels; when an intruding vessel is detected entering the collision zone, only an alarm signal is output without performing active steering to prevent collision avoidance actions from interfering with the stability of the resupply and docking process; the MPC control module is completely disabled: the event triggering criterion E(k) is forcibly set to 0 in this state, candidate trajectory generation and rolling optimization calculations are all suspended, and the controller does not output any heading change commands.

[0080] In the first-level state, the return state, path tracking and collision avoidance rules are reactivated, and MPC control resumes event-triggered operation, with the control objective focusing on a smooth exit. When there is a potential conflict between collision avoidance decisions and state constraints, the state machine has a higher logical priority, ensuring the continuity and determinism of the resupply task at the system level. The logical priority of the state machine is higher than that of MPC control and collision avoidance rules: that is, when the state machine determines that the current state is a resupply state... At this time, regardless of the steering command output by the collision avoidance rule module, the controller will forcibly block the command to ensure that the continuity of the resupply operation is not disturbed. When the state machine determines that the current state is the outbound journey... Or return trip Furthermore, when the aforementioned conflicts occur, the state constraints of the state machine are treated as hard constraints during the candidate trajectory generation stage. Candidate trajectories that violate the state constraints are directly eliminated from the trajectory search space, thereby seeking the optimal feasible solution that satisfies the collision avoidance rules while ensuring the determinism of the replenishment task. State-dependent predictive control performance index function. The weighting coefficients are automatically adjusted based on the current first-level status: for both outbound and return trips. and Take a larger value to enhance path tracking and heading stability, during resupply. Dominance is used to force low-speed maintenance and position convergence, thereby enabling dynamic switching and smooth transition of control targets at different task stages.

[0081] Figures 11 to 15 The simulation comparison diagrams show different types of path tracking control algorithms. It should be noted that CET-MPC in the diagram represents the path tracking control algorithm of this application, while MPC represents a conventional model predictive control algorithm. Simulation results demonstrate that, in complex island environments and multi-intelligent ship collaborative replenishment scenarios, the CET-MPC control method proposed in this invention, compared to traditional PID and conventional MPC control methods, can effectively reduce path tracking error and heading angle error, and significantly reduce computational resource consumption. It exhibits comprehensive advantages in path tracking accuracy, collision avoidance safety, control smoothness, and real-time performance.

[0082] In some embodiments, please refer to Figure 16 This application provides an intelligent ship control system 160 based on state machine and event triggering, including: a construction module 161, an acquisition module 162, a tracking module 163 and a collision avoidance module 164.

[0083] Module 161 is used to build a Fossen three-degree-of-freedom ship model and establish a control constraint system that includes actuator constraints and environmental safety constraints.

[0084] The acquisition module 162 is used to acquire the current ship status and surrounding target perception data when it is determined that the ship is currently in a navigation phase, and to calculate the state error between the current ship status and the reference track and the real-time minimum distance to the surrounding targets.

[0085] The tracking module 163 is used to determine the MPC event triggering conditions based on the state error and the real-time minimum distance, starting from the current ship state, to determine the candidate trajectory set based on the Fossen three-degree-of-freedom ship model and control constraint system, to optimize and calculate the current optimal trajectory using the MPC algorithm, to output the first step control command of the optimal trajectory, and to continuously update the ship state.

[0086] The collision avoidance module 164 is used to determine the trajectory selection strategy based on the type of the encounter scenario and international maritime collision avoidance rules when it detects that the current encounter scenario is in a scenario. It then performs rule consistency filtering on the candidate trajectory set before solving for the current optimal trajectory.

[0087] It should be noted that the intelligent ship control system 160 based on state machine and event triggering provided in this application embodiment and the intelligent ship control method based on state machine and event triggering provided in this application embodiment are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned intelligent ship control method based on state machine and event triggering, and the repeated parts will not be described again.

[0088] In some embodiments, an electronic device provided in this application includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the above-described intelligent ship control method based on state machine and event triggering.

[0089] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.

[0090] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0091] This application also provides a non-transitory computer storage medium storing a computer program thereon. When executed by a processor, this program implements the aforementioned intelligent ship control method based on state machines and event triggering. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method as described in the embodiments of this application.

[0092] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.

[0093] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0094] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application, even if such combinations or combinations are not explicitly described in this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A smart ship control method based on state machine and event triggering, characterized in that, include: Construct a Fossen three-degree-of-freedom ship model and establish a control constraint system that includes actuator constraints and environmental safety constraints; Once it is determined that the ship is currently in a navigation phase, the current ship status and surrounding target perception data are acquired, and the state error between the current ship status and the reference track and the real-time minimum distance to surrounding targets are calculated. If the MPC event triggering condition is met based on the state error and the real-time minimum distance, starting from the current ship state, a set of candidate trajectories is determined based on the Fossen three-degree-of-freedom ship model and the control constraint system. The MPC algorithm is used to optimize and calculate the current optimal trajectory, output the first step control command of the optimal trajectory, and continuously update the ship state. When an encounter scenario is detected, a trajectory selection strategy is determined based on the type of the encounter scenario and international maritime collision avoidance rules. The candidate trajectory set is then filtered for consistency before the current optimal trajectory is solved.

2. The intelligent ship control method based on state machine and event triggering as described in claim 1, characterized in that, The process of acquiring current ship status and surrounding target perception data, and calculating the state error between the current ship status and the reference track, as well as the real-time minimum distance to surrounding targets, includes: Acquire the ship's current planar position, heading angle, and speed status, as well as the position and motion status data of surrounding targets within the perception range; Read the coordinates of the reference track node corresponding to the current path index, calculate the expected heading angle with latitude correction in combination with the real-time position of the ship, and determine the reference state quantity for track tracking; The difference between the actual state of the ship and the reference state is used to calculate the position tracking error and the heading tracking error, respectively, thus forming a set of state errors for track tracking. Calculate the planar Euclidean distances between the ship and each surrounding target, and select the minimum value as the real-time minimum distance at the current moment.

3. The intelligent ship control method based on state machine and event triggering as described in claim 1, characterized in that, Starting from the current ship state, a set of candidate trajectories is determined based on the Fossen three-degree-of-freedom ship model and the control constraint system. The current optimal trajectory is then optimized using the MPC algorithm, including: Using the current real-time motion state of the ship as the initial starting point for trajectory deduction, the state evolution relationship is constructed based on the Fossen three-degree-of-freedom ship model; Based on the state evolution relationship, multiple initial heading changes are uniformly selected within the maximum steering angle constraint range, and multiple candidate navigation trajectories are generated by combining the heading change exponential decay rule. Each candidate navigation trajectory is sequentially checked for actuator constraints and environmental safety constraints, and a set of candidate trajectories that meet all constraints is obtained. Based on a comprehensive evaluation function that includes heading deviation cost and terminal distance cost, the comprehensive evaluation value of each candidate trajectory is solved through the entire process, and the trajectory with the minimum comprehensive cost is selected as the current optimal trajectory.

4. The intelligent ship control method based on state machine and event triggering as described in claim 1, characterized in that, The trajectory selection strategy based on the type of encounter scenario and international maritime collision avoidance rules includes: Obtain the encounter characteristic parameters between the ship and surrounding target ships, and determine the corresponding encounter scenario type based on the encounter characteristic parameters. The encounter characteristic parameters include relative bearing angle and heading difference, and the encounter scenario type includes three types of encounter scenarios: face-to-face, crossing, and overtaking. Based on the navigation avoidance requirements of various scenarios according to the International Maritime Collision Prevention Code, when the encounter scenario type is determined to be a face-to-face encounter scenario, the trajectory screening strategy is determined to eliminate left-turn and straight-ahead trajectories and retain right-turn candidate trajectories. When the encounter scenario is determined to be an intersection scenario, the trajectory filtering strategy is to eliminate left-turn trajectories and retain right-turn and straight-going candidate trajectories. When the encounter scenario type is determined to be a chase scenario, the trajectory filtering strategy is determined to filter candidate trajectories that exceed the offset threshold.

5. The intelligent ship control method based on state machine and event triggering as described in claim 1, characterized in that, The intelligent ship control method also includes: If the MPC event triggering condition is not met based on the state error and the real-time minimum distance, the normal closed-loop control mode is maintained, the reference waypoint coordinates and the real-time position of the ship corresponding to the current path index are obtained, the expected heading angle with latitude correction is calculated, and the heading tracking error between the actual heading and the expected heading is obtained. Based on the maximum steering angle constraint of the actuator and the heading tracking error, a segmented heading correction is performed, and a first-order acceleration smoothing model is used to complete the speed adjustment, generating heading and speed control commands that conform to the actuator constraints. The control commands under the normal control mode are output to the ship's actuators, the ship's motion state is updated based on the Fossen three-degree-of-freedom ship model, the next control cycle is entered, and the MPC event triggering conditions are continuously monitored.

6. The intelligent ship control method based on state machine and event triggering as described in claim 1, characterized in that, The intelligent ship control method also includes: When it is determined that the current ship is in the resupply phase, the current speed control target is fixed at zero, and active collision avoidance steering is prohibited.

7. The intelligent ship control method based on state machine and event triggering as described in claim 6, characterized in that, The intelligent ship control method also includes: In the current outbound phase, the three constraints of distance error, path index, and heading attitude are checked. When all three constraints are met, the resupply initiation event is triggered. During the resupply phase, the resupply timer is continuously accumulated. When the timer reaches the preset timer threshold, the resupply completion event is triggered. After resupply is completed, return reference waypoints are generated in reverse order, and the system switches to return flight mode. During the return journey, the distance error between the return point and the initial starting point is continuously monitored. When the distance is less than a preset threshold, the mission is considered complete and the control process is terminated.

8. An intelligent ship control system based on state machine and event triggering, characterized in that, include: The module is used to build a Fossen three-degree-of-freedom ship model and establish a control constraint system that includes actuator constraints and environmental safety constraints. The acquisition module is used to acquire the current ship status and surrounding target perception data when it is determined that the ship is currently in the navigation phase, and to calculate the state error between the current ship status and the reference track and the real-time minimum distance to the surrounding targets. The tracking module is used to determine the MPC event triggering condition based on the state error and the real-time minimum distance, starting from the current ship state, based on the Fossen three-degree-of-freedom ship model and the control constraint system, determine the candidate trajectory set, use the MPC algorithm to optimize and calculate the current optimal trajectory, output the first step control command of the optimal trajectory, and continuously update the ship state. The collision avoidance module is used to determine the trajectory selection strategy based on the type of the encounter scenario and international maritime collision avoidance rules when it detects that the current encounter scenario is in progress. The candidate trajectory set is filtered for rule consistency before the current optimal trajectory is solved.

9. An electronic device, characterized in that, It includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the intelligent ship control method based on state machine and event triggering as described in any one of claims 1 to 7.

10. A non-transitory computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the intelligent ship control method based on state machine and event triggering as described in any one of claims 1 to 7.