Gas-electric hybrid power ship energy management method and system based on sodat swarm algorithm

An improved energy management method based on the sand cat swarm algorithm solves the problem of balancing real-time performance and accuracy in the energy management of gas-electric hybrid ships, extends the life of power batteries, adapts to complex marine conditions, and improves overall energy utilization efficiency.

CN121799580APending Publication Date: 2026-04-07HUANGGANG POLYTECHNIC COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing energy management strategies for gas-electric hybrid ships struggle to simultaneously balance ECMS real-time performance, power allocation accuracy, and battery life. Traditional sand cat swarm optimization algorithms are prone to getting trapped in local optima and have low computational efficiency, making them unsuitable for complex maritime navigation conditions.

Method used

An improved energy management method based on the sand cat swarm algorithm is adopted. By establishing a system model, a discretized equivalent natural gas consumption minimization strategy is constructed. An optimization algorithm with temperature decay mechanism, random disturbance and boundary constraints is introduced and the power battery life decay model is integrated to adjust the power distribution in real time.

Benefits of technology

It improves the real-time performance and optimization accuracy of energy management strategies, reduces natural gas consumption, extends the lifespan of power batteries, adapts to complex navigation conditions, and achieves a balance between fuel economy and battery durability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121799580A_ABST
    Figure CN121799580A_ABST
Patent Text Reader

Abstract

The invention provides a gas-electric hybrid power ship energy management method and system based on a sodat swarm algorithm, electronic equipment and a storage medium, and the method comprises the steps: building a complete system model, building a discretized equivalent natural gas consumption minimum strategy based on the system model, and deducing the analysis relation of the equivalent natural gas consumption, so as to achieve the energy management of a gas-electric hybrid power ship. Discretizing a power distribution optimization problem into limited key points, and calculating equivalent natural gas consumption of each point to determine optimal output power of an engine and a motor; optimizing equivalent factors in a discretization strategy and balancing the global search and local optimization capability of the algorithm by adopting an improved salat swarm optimization algorithm which introduces a temperature attenuation mechanism, random disturbance, boundary constraint and dynamic parameter adjustment; meanwhile, a power battery life attenuation model is integrated in a discretization strategy, the battery life loss percentage is instantaneously expressed, and related penalty factors are added; and according to the optimal equivalent factor and the optimal output power, power distribution of the engine and the motor is adjusted in real time, and energy collaborative management is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy management technology for gas-electric hybrid ships, and more particularly to a method and system for energy management of gas-electric hybrid ships based on the sand cat swarm algorithm. Background Technology

[0002] In the field of hybrid-electric ships, gas-electric hybrid technology has become a research hotspot in recent years due to its "dual-engine complementarity" advantage. This technology achieves power coupling between the natural gas engine and the electric motor through a gearbox, with both outputting torque to drive the propeller. The natural gas engine exhibits high thermal efficiency, low-speed high torque characteristics, and safety performance, while the electric motor provides excellent speed regulation performance, overload capacity, and operating efficiency. Together, they achieve efficient power output.

[0003] Energy management and control strategies are the core of the overall control of hybrid-electric ships and directly affect the overall system performance. In the architecture of gas-electric hybrid ships, the battery acts as an energy buffer unit, adapting to different operating conditions through dynamic power allocation: when power demand is high, the natural gas engine and battery work together to share the engine power load; when power demand is low, the natural gas engine charges the battery.

[0004] From a control logic perspective, the equivalent factor of the natural gas engine control module plays a crucial role in the operating mode: when the equivalent factor is too large, the module tends to prioritize charging the power battery, causing the ship to enter a pure natural gas engine drive mode for most of the voyage. In this case, the ECMS strategy will force the use of the natural gas engine drive mode because the cost of electricity is significantly higher than that of natural gas. It should be noted that the ECMS algorithm is mainly applied to battery-maintaining hybrid vessels, and its core control objective is to reduce the deviation between the initial and final state of charge (SOC) of the battery, stabilizing the SOC within a preset constraint range. To improve actual operating performance, the equivalent factor also needs to be adjusted online in conjunction with the ship's real-time navigation conditions (such as wind and wave disturbances, dynamic load changes) to avoid overcharging and discharging of the battery while achieving an optimal balance between fuel consumption and power response.

[0005] Currently, energy management strategies for gas-electric hybrid ships are mainly divided into three categories: rule-based, optimization control, and intelligent control algorithm-based strategies. Among them, the rule-based CD-CS (Charge Depleting / Charge Sustaining) strategy has been widely used in the field of hybrid electric vehicles due to its advantages of good real-time performance and simple implementation, but its application in the field of gas-electric hybrid ships is relatively limited, and it has the obvious drawback of being highly dependent on the experience of engineering technicians.

[0006] To improve this situation, scholars have proposed using the ECMS strategy for energy management of gas-electric hybrid ships. However, this strategy suffers from poor real-time performance, making it difficult to meet the needs of practical engineering applications. Currently, most energy management methods in the gas-electric hybrid field do not simultaneously consider the issues of poor ECMS real-time performance and short battery life. During actual navigation, if the battery operates under high load for extended periods or experiences frequent start-stop cycles, the membrane electrode assembly (MEA) is prone to accelerated degradation, shortening its lifespan. However, simplifying the algorithm to optimize ECMS real-time performance leads to reduced power allocation accuracy, thereby increasing fuel consumption. Due to the harsh marine environment and the complex and variable operating conditions of ships, existing energy control strategies cannot simultaneously address the demands of real-time performance, fuel economy, and battery lifespan. Therefore, there is an urgent need to construct a novel energy management strategy that can synergistically balance these three aspects to fill the gap between current research and engineering applications. Summary of the Invention

[0007] This invention provides an energy management method, system, electronic device, and storage medium for gas-electric hybrid ships based on the sand cat swarm algorithm. This addresses the technical problems in the current energy management of gas-electric hybrid ships, such as the difficulty in balancing ECMS real-time performance and power allocation accuracy, the tendency of traditional sand cat swarm optimization algorithms to get trapped in local optima and low computational efficiency, the failure of most strategies to consider the lifespan degradation of power batteries under high load, frequent start-stop and variable load conditions, and the inability to simultaneously balance real-time performance, fuel economy, and power battery lifespan.

[0008] In a first aspect, embodiments of the present invention provide an energy management method for gas-electric hybrid ships based on the sand cat swarm algorithm, comprising: S1. Establish a system model for a gas-electric hybrid power ship, which includes a natural gas engine model, an electric motor model, a power battery model, a transmission system model, and a propeller-engine mathematical model. S2. Based on the system model, construct the Discrete Equivalent Natural Gas Consumption Minimum Strategy (D-ECMS). By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key power points. The equivalent natural gas consumption of each key power point is calculated to determine the optimal output power of the natural gas engine and motor. S3. An improved sand cat swarm optimization algorithm is used to optimize the equivalent factor in the discretized equivalent natural gas consumption minimization strategy. The improved sand cat swarm optimization algorithm introduces a temperature decay mechanism, random perturbation and boundary constraints, and dynamic parameter adjustment to balance global search and local optimization and obtain the optimal equivalent factor. S4. Integrate the power battery life degradation model into the discretized equivalent natural gas consumption minimization strategy, express the battery life loss percentage instantaneously, and add a penalty factor related to battery life to simultaneously optimize natural gas consumption and battery life. S5. Adjust the power distribution between the natural gas engine and the electric motor in real time according to the optimal equivalent factor and the optimal output power.

[0009] Preferably, in step S1, the natural gas engine model is constructed using an experimental modeling method. The natural gas engine model is a steady-state model that ignores dynamic processes and is used to characterize the functional relationship between the engine's speed, torque, fuel consumption rate, and operating efficiency under steady-state conditions. The power battery model includes a voltage model and a degradation model; The voltage model, based on the electrical characteristic parameters of the power battery, determines the correspondence between the output voltage and output current of the power battery. The degradation model calculates the degradation rate of the power battery based on its historical operating parameters and determines the end of the battery's lifespan based on the degree of voltage decay.

[0010] Preferably, in S2, the discretized equivalent natural gas consumption minimization strategy discretizes the output power of the natural gas engine into multiple key power points, including the zero power point, the first power inflection point, the optimal power point, the maximum output power point, and the ship's required power point. If it is determined that the ship's required power is not greater than its maximum output power, calculate the equivalent natural gas consumption at the zero power point, the first power inflection point, the optimal power point, the maximum output power point, and the ship's required power point. When the ship's power demand exceeds its maximum output power, calculate the equivalent natural gas consumption at the zero power point, the first power inflection point, the optimal power point, and the maximum output power point. In step S2, after determining the optimal output power, the method further includes: Based on the correspondence between power, torque, and speed, the optimal output power is converted into the corresponding optimal output torque to generate torque commands for controlling the natural gas engine and motor.

[0011] Preferably, in step S3, the improved sand cat swarm optimization algorithm is implemented through the following mechanism: The temperature decay mechanism uses a preset initial temperature, a cooling coefficient, and a suboptimal solution acceptance strategy based on a probability function. The random perturbation and boundary constraints include updating the population individuals according to a preset period and restricting the search parameters to a feasible region; The dynamic parameter adjustment includes dynamically adjusting the search range parameter and randomly generating the search direction; The termination condition is reaching the maximum number of iterations or the quality of the solution no longer improves.

[0012] Preferably, in step S4, the power battery life degradation model is a preset model based on the battery output current rate, throughput, and temperature. The instantaneous percentage of battery life loss is calculated in real time using the output current, operating time, and total throughput of the power battery.

[0013] Preferably, the transmission system model includes a main reduction mechanism and a power output reduction mechanism, and uses a torque synthesis device to synthesize the input torque of the natural gas engine and the motor into a final output torque for driving the propeller.

[0014] As a preferred option, it also includes: S6. Adaptively correct the optimal equivalent factor based on the real-time state of charge (SOC) of the power battery. When the SOC deviates from the preset SOC range, change the energy usage strategy by adjusting the size of the optimal equivalent factor, thereby maintaining the SOC within the preset SOC range.

[0015] Secondly, embodiments of the present invention provide an energy management system for gas-electric hybrid power ships based on the sand cat swarm algorithm, comprising: The system modeling module is used to establish a system model of a gas-electric hybrid power ship. The system model includes a natural gas engine model, an electric motor model, a power battery model, a transmission system model, and a machine-propeller mathematical model. The strategy construction module is used to construct a discretized equivalent natural gas consumption minimization strategy (D-ECMS) based on the system model. By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key power points, and the equivalent natural gas consumption of each key power point is calculated to determine the optimal output power of the natural gas engine and motor. The optimization calculation module is used to optimize the equivalent factor in the discretized equivalent natural gas consumption minimization strategy using an improved sand cat swarm optimization algorithm. The improved sand cat swarm optimization algorithm introduces a temperature decay mechanism, random perturbation and boundary constraints, and dynamic parameter adjustment to balance global search and local optimization and obtain the optimal equivalent factor. The lifespan optimization module is used to integrate the power battery lifespan degradation model into the discretized equivalent natural gas consumption minimization strategy. It represents the battery lifespan loss percentage instantaneously and adds a penalty factor related to battery lifespan to simultaneously optimize natural gas consumption and battery lifespan. The power distribution module is used to adjust the power distribution between the natural gas engine and the electric motor in real time based on the optimal equivalence factor and the optimal output power.

[0016] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the gas-electric hybrid power ship energy management method based on the sand cat swarm algorithm as described in the first aspect of the present invention.

[0017] Fourthly, embodiments of the present invention provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the gas-electric hybrid power ship energy management method based on the sand cat swarm algorithm as described in the first aspect of the present invention.

[0018] This invention provides an energy management method, system, electronic equipment, and storage medium for gas-electric hybrid ships based on the sand cat swarm algorithm. First, a complete system model is established, encompassing the gas engine, motor, power battery, transmission system, and engine-propeller system of the gas-electric hybrid ship, providing a foundation for energy management optimization. Then, based on this system model, a discretized strategy for minimizing equivalent natural gas consumption is constructed. By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key points. The equivalent natural gas consumption at each point is calculated to determine the optimal output power of the engine and motor, solving the problem of balancing real-time performance and accuracy in traditional strategies. Subsequently, an improved sand cat swarm optimization algorithm, incorporating a temperature decay mechanism, random perturbations and boundary constraints, and dynamic parameter adjustment, is used to optimize the equivalent factor in the discretized strategy, balancing the algorithm's global search and local optimization capabilities, avoiding the shortcomings of traditional algorithms that are prone to local optima and low efficiency. Simultaneously, a power battery life decay model is integrated into the discretized strategy. By instantaneously representing the percentage of battery life loss and adding relevant penalty factors, multi-objective optimization of natural gas consumption and battery life is achieved. Finally, based on the optimal equivalent factor and optimal output power, the power allocation of the engine and motor is adjusted in real time to complete coordinated energy management. The solution of this invention can effectively improve the real-time performance and optimization accuracy of energy management strategies, reduce natural gas consumption to improve fuel economy, avoid premature convergence of algorithms to ensure optimization reliability, extend the service life of power batteries to reduce operating costs, adapt to complex navigation conditions at sea, and achieve comprehensive performance improvement of energy management for gas-electric hybrid ships. Attached Figure Description

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

[0020] Figure 1 This is a flowchart of an energy management method for gas-electric hybrid ships based on the sand cat swarm algorithm according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the specific implementation process of the equivalent gas consumption minimization strategy according to an embodiment of the present invention. Figure 3 This is a flowchart of the improved sand cat swarm optimization algorithm according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the process of solving for the optimal equivalent factor according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the energy management system for a gas-electric hybrid power ship based on the sand cat swarm algorithm according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the physical structure according to an embodiment of the present invention. Detailed Implementation

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

[0022] In the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0024] This invention provides an energy management method for gas-electric hybrid ships based on the sand cat swarm algorithm, such as... Figure 1 As shown, it includes: S1. Establish a system model for a gas-electric hybrid power ship, which includes a natural gas engine model, an electric motor model, a power battery model, a transmission system model, and a propeller mathematical model.

[0025] Among them, gas-electric hybrid ships refer to ships that use natural gas engines and electric motors as dual power sources to achieve efficient navigation through power coupling. They are suitable for scenarios such as inland waterway transportation and near-shore shipping, and need to cope with complex operating conditions such as wind and wave disturbances and dynamic load changes. The natural gas engine model is constructed using experimental modeling methods and does not consider dynamic characteristics. It focuses on steady-state energy flow and can accurately describe the relationship between engine speed, torque, gas consumption rate and working efficiency, matching the energy analysis requirements of ships during long-term steady-state navigation. The motor in the electric motor model can switch between electric (driving the ship) and generator (charging the battery) modes, adapting to the switching between high-power demand (such as acceleration and wind and wave resistance) and low-power demand (such as cruising) operating conditions of ships. The power battery model includes a voltage model (calculating the output voltage based on parameters such as open-circuit voltage and internal resistance), a degradation model (considering the impact of low-power operation time, high-power operation time, cumulative load change power, and start-stop number on battery life), and a SOC (State of Charge) model (reflecting the battery's state of charge), which fits the actual scenario of frequent battery charging and discharging and large operating condition fluctuations during ship navigation. The transmission system model adopts the main reduction ratio and PTI (Power Transmission Instructions). The dual reduction ratio design of the take-in (power input) gearbox enables the superposition of engine and motor torques through a parallel gearbox, ensuring efficient power transmission to the propeller. The engine-propeller mathematical model correlates ship speed, sailing resistance with propeller torque and speed, and can quantify the impact of wind and waves on the ship's power demand.

[0026] In this embodiment, a complete system model covering the core components of the gas-electric hybrid ship's power system and the power transmission link is first constructed to provide a precise mathematical basis for the design and optimization of subsequent energy management strategies. This avoids the subsequent power allocation optimization from deviating from actual operating conditions due to missing or inaccurate models, ensuring the feasibility and reliability of energy management strategies and providing support for energy analysis in complex navigation scenarios of ships.

[0027] S2. Based on the system model, a discretized equivalent natural gas consumption minimization strategy (D-ECMS) is constructed. By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key power points. The equivalent natural gas consumption of each key power point is calculated to determine the optimal output power of the natural gas engine and motor.

[0028] Among them, the Discrete Equivalent Consumption Minimum Strategy (D-ECMS) is an improved strategy based on the traditional ECMS (Equivalent Consumption Minimum Strategy). By converting the electrical energy consumed by the battery into equivalent natural gas consumption, it achieves a unified quantitative comparison of the energy consumption of natural gas engines and electric motors, adapting to the energy consumption optimization needs of ships with dual power sources. The analytical relationship of equivalent natural gas consumption refers to the mathematical correlation between the total equivalent natural gas consumption and the output power of the two motors, derived based on the power-energy consumption characteristics of the natural gas engine and the electric motor. The key power point refers to the characteristic point within the feasible power domain of the natural gas engine.

[0029] In this embodiment, the system model built based on S1 deduces analytical relationships to discretize the complex continuous power allocation optimization problem into a calculation problem of a finite number of key power points. Then, by comparing the equivalent natural gas consumption of each key power point, the optimal output power of the natural gas engine and motor is determined. This solves the contradiction between the poor real-time performance of traditional ECMS strategies (large amount of continuous optimization calculation) and the low power allocation accuracy caused by simplified algorithms (increased fuel consumption). While ensuring optimization accuracy, it significantly reduces the amount of calculation, improves the real-time performance of the strategy, and can quickly respond to the dynamic changes in the ship's navigation conditions.

[0030] S3. An improved sand cat swarm optimization algorithm is used to optimize the equivalent factor in the discretized equivalent natural gas consumption minimization strategy. The improved sand cat swarm optimization algorithm introduces a temperature decay mechanism, random perturbation and boundary constraints, and dynamic parameter adjustment to balance global search and local optimization and obtain the optimal equivalent factor.

[0031] Among them, the improved sand cat swarm optimization algorithm is an intelligent optimization algorithm improved on the basis of the traditional sand cat swarm optimization algorithm (simulating the exploration-exploitation behavior of sand cats hunting), and is adapted to the complex multi-peak problem of equivalent factor optimization in ship energy management. The equivalent factor is the core parameter in the D-ECMS strategy that measures the conversion efficiency of natural gas and electricity. Its value determines the strategy's priority selection of natural gas engines and electric motors (a large value tends to use natural gas, and a small value tends to use electricity), which directly affects the power allocation result. The temperature decay mechanism introduces the idea of ​​simulated annealing. By setting the initial temperature and cooling coefficient, it is based on a probability function (according to the suitability of the new solution and the historical best solution). The algorithm accepts suboptimal solutions (stress difference and current temperature) to avoid getting trapped in local optima. In random perturbation and boundary constraints, random perturbation refers to randomly replacing one individual in the population every 5 generations to maintain population diversity. Boundary constraints refer to forcibly restricting the algorithm parameters within the feasible region (such as the reasonable range of equivalent factors) to avoid invalid solutions occupying computational resources. Dynamic parameter adjustment adjusts the sand cat's hearing range through a linear decay formula (achieving a smooth transition from global exploration to local development) and uses random angles from 0 to 360° to generate multidimensional search directions to avoid search direction deviations and adapt to the dynamic changes in optimization objectives caused by the changing ship operating conditions.

[0032] In this embodiment, to address the optimization requirements of the equivalent factor in the D-ECMS strategy, an improved sand cat swarm optimization algorithm is adopted. Through the synergistic effect of temperature decay, random disturbances and boundary constraints, and dynamic parameter adjustment, the algorithm balances its global search (finding a better solution space) and local optimization (refining the optimal solution) capabilities, ultimately obtaining the optimal equivalent factor that is suitable for the current navigation conditions. This solves the problems of traditional sand cat swarm optimization algorithms being prone to getting trapped in local optima, having low computational efficiency, and being sensitive to initial parameters. The obtained optimal equivalent factor can more accurately guide the power allocation of the D-ECMS strategy, enabling the strategy to maintain excellent optimization performance under different navigation conditions and avoiding fuel waste or excessive battery consumption caused by unreasonable equivalent factors.

[0033] S4. Integrate the power battery life degradation model into the discretized equivalent natural gas consumption minimization strategy, express the battery life loss percentage instantaneously, and add a penalty factor related to battery life to simultaneously optimize natural gas consumption and battery life.

[0034] Among them, the power battery life degradation model is a model built based on a semi-empirical formula, which considers the impact of battery output rate (high current discharge when the ship has high power demand), throughput (cumulative charge and discharge capacity of the battery), and ambient temperature (temperature fluctuations inside the ship's cabin) on the battery capacity loss rate, and can quantify the battery life loss under different operating conditions; the instantaneous battery life loss percentage is calculated by the ratio of battery output current, sampling time and battery throughput, to calculate the percentage of battery life loss per unit time, realizing real-time monitoring of battery life degradation, and adapting to the analysis needs of dynamic battery life degradation during long-term ship voyages; the battery life-related penalty factor adds life weight to the optimization objective of the D-ECMS strategy. When the battery is under high load, frequent start-stop and other accelerated degradation conditions, the power distribution is adjusted through the penalty factor to reduce battery wear.

[0035] In this embodiment, the power battery life degradation model is integrated into the D-ECMS strategy. Real-time quantification of battery degradation is achieved by instantaneously converting the percentage of life loss into actual value. A penalty factor is introduced to incorporate battery life into the optimization objective, so that the strategy considers both fuel consumption and battery life loss when calculating equivalent natural gas consumption, ultimately achieving synergistic optimization of both. This solves the problem that existing energy management strategies often only focus on fuel economy and ignore power battery life. It reduces the accelerated degradation of membrane electrodes caused by long-term high-load operation, frequent start-stop or load changes, effectively extends battery life, reduces the operating costs of ships due to battery replacement, and achieves multi-objective optimization of fuel economy and battery durability.

[0036] S5. Adjust the power distribution between the natural gas engine and the electric motor in real time according to the optimal equivalent factor and the optimal output power.

[0037] Among them, the optimal equivalent factor is a parameter obtained by improving the sand cat swarm optimization algorithm in step S3, which determines the conversion priority of natural gas and electric energy in the D-ECMS strategy and can be dynamically adjusted according to the real-time operating conditions of the ship (such as SOC status and power demand); the optimal output power is the power allocation benchmark of natural gas engine and motor calculated by key power point in step S2, which ensures that the equivalent natural gas consumption is minimized under the current operating conditions; real-time adjustment refers to continuously updating the optimal equivalent factor and optimal output power according to the dynamic changes of the ship's navigation conditions (such as the increase in resistance caused by wind and waves and load fluctuations), and adjusting the power output of the dual power sources accordingly to adapt to the actual scenario of continuous changes in the ship's navigation conditions.

[0038] In this embodiment, the optimal output power obtained in S2 is used as the basis for allocation, and the optimal equivalent factor obtained in S3 is used to guide the priority of gas-electric conversion. In response to changes in the ship's operating conditions during real-time navigation (such as adjustments in power demand caused by changes in wind speed and wave height, and changes in electrical energy availability caused by changes in battery SOC), the output power of the natural gas engine and the output power (or charging power) of the electric motor are dynamically adjusted to achieve coordinated energy allocation between the two power sources. This ensures that the gas-electric hybrid ship can maintain an optimized state of low fuel consumption and low battery loss under different navigation conditions (such as cruising, acceleration, wind and waves, and low-speed charging), taking into account the real-time performance and economy of energy management and the durability of the power battery, and significantly improving the overall energy utilization efficiency and operational economy of the ship.

[0039] Based on the above embodiments, as a preferred implementation, in step S1, the natural gas engine model is constructed using an experimental modeling method. The natural gas engine model is a steady-state model that ignores dynamic processes, used to characterize the functional relationships between engine speed, torque, fuel consumption rate, and operating efficiency under steady-state conditions. Specifically, the main functional relationships of the model are:

[0040]

[0041]

[0042]

[0043]

[0044]

[0045] In the above formula, It is a proportional-integral controller for controlling the speed of a gas engine; The target rotational speed of the gas engine is given in r / min. The actual power of the gas engine is expressed in kW. Gas engine fuel consumption rate, g / (kW) h); The actual rotational speed of the gas engine is given in r / min. The actual torque of the gas engine is N. m; The external characteristic torque of the gas engine is N. m; To improve the working efficiency of the gas engine; The calorific value of natural gas is expressed in MJ / g. For energy consumption of gas engines, MJ; The actual power of the gas engine is expressed in kW. The running time of the gas engine is in hours (h).

[0046] Specifically, the main functional relationships of the motor model are as follows:

[0047]

[0048]

[0049]

[0050] In the above formula, N represents the operating efficiency of the motor. m is the actual motor speed, r / min; N is the actual torque of the motor. m; The external characteristic torque of the motor is expressed in N·m. Motor current, A; The voltage of the motor is V; The actual operating power of the motor is expressed in kW. t represents the energy consumption of the motor (MJ); t represents the motor running time (h).

[0051] The power battery model includes a voltage model and a degradation model.

[0052] The voltage model, based on the electrical characteristic parameters of the power battery, determines the correspondence between the output voltage and output current of the power battery.

[0053] The degradation model calculates the degradation rate of the power battery based on its historical operating parameters and determines the end of the battery's lifespan based on the degree of voltage decay.

[0054] Specifically, in the equivalent circuit of a power battery, the output voltage U fc With current I fc The relationship can be determined by the open-circuit voltage of the power battery. Uoc fc The voltage loss of each part is obtained, and its calculation formula is:

[0055] in, N This refers to the number of solar cells; A Let the slope be Tafel; I 0 represents the exchange current; R fc This is the internal resistance of the power battery.

[0056] The degradation model of power batteries shows that as power batteries operate, their components inevitably degrade. This is generally manifested as a decrease in battery voltage and is mainly affected by four operating conditions: high and low power operation, load variation, and start-stop. Therefore, its degradation rate is as follows:

[0057] In the above formula, T low , T high , N tran , N ss These represent the low-power and high-power operating time of the power battery, the cumulative variable load power, and the number of start-stop cycles, respectively. d 1~ d The number 4 indicates the degradation rate of the power battery under four different operating conditions. V ini This is the initial voltage value of a single power battery cell. When the voltage degradation reaches 20% of the initial voltage, the battery is considered to have reached the end of its lifespan.

[0058] The battery model ignores the effect of temperature and uses a toroidal model to model the battery, resulting in expressions for the battery's SOC and output power:

[0059]

[0060] In the above formula, This refers to the battery's state of charge (SOC) change rate. U oc This is the battery open-circuit voltage; R b This refers to the battery's internal resistance. Q This is the maximum battery capacity; P bat This refers to the battery's output power.

[0061] The transmission system model uses a dual reduction ratio to transmit power, namely the main reduction ratio and the PTI reduction ratio:

[0062] In the above formula, T 2 and n 2 represents the output torque and speed; T 1 and n 1 represents the input torque and speed. i This refers to the transmission ratio of the transmission system. A parallel gearbox is used as the torque synthesis device. In this case, only the superposition of torques is considered. The modeling is as follows:

[0063] In the above formula,T in1 and T in2 It is the input torque; T out It refers to the output torque.

[0064] The mathematical model of the propeller and the ship's motion equations are as follows:

[0065]

[0066] In the above formula, vs It is the speed of the ship, in m / s; Rt It is the resistance of the ship, N; Mp This is the torque output by the natural gas engine, in N·m; Mf It is the drag torque, N·m; i’ It is the reduction ratio of the gearbox.

[0067] R t = f ( v s ) In the above formula, In the formula This is the ship resistance coefficient. It is a constant.

[0068] Based on the above embodiments, as a preferred implementation, in S2, the discretized equivalent natural gas consumption minimization strategy discretizes the output power of the natural gas engine into multiple key power points, including the zero power point, the first power inflection point, the optimal power point, the maximum output power point, and the ship's required power point.

[0069] In the ECMS strategy, the energy consumption of electricity is equivalent to the corresponding natural gas consumption. This coefficient, called the equivalence factor, largely determines the performance of the ECMS. The equivalence factor represents the efficiency of the conversion between natural gas and electricity. The equivalence factor is crucial in the ECMS strategy; its value determines the equivalent natural gas consumption. When the equivalence factor is too small, the control strategy will favor using electric motors to drive the ship, stopping the natural gas engines. In this case, electricity is cheaper, so more electricity is preferred, leading to a sharp decrease in battery charge and the battery SCO (Solar Oxygen Scale) reaching its minimum level. When the equivalence factor is too large, it indicates an increase in equivalent natural gas consumption. In this case, electricity is more expensive, and the control strategy will tend to stop the electric motors and use the natural gas engines for power, resulting in increased natural gas consumption. To reduce the deviation between the battery reference SOC and the actual SOC, a penalty factor for the battery SOC deviation is used to correct the equivalence factor. When the battery SOC is low, the equivalence factor is increased as much as possible to make the control strategy use less electricity and more natural gas; when the battery SOC is high, the equivalence factor is decreased as much as possible to make the control strategy use more electricity and less natural gas. When the equivalence factor of the natural gas engine control module is too large, the natural gas engine control module tends to charge the battery, in which case the power required by the ship is provided by the engine.

[0070] The equivalent factor *s* in the ECMS function, within a certain range, tends to operate only in natural gas engine mode when the equivalent factor is large, and only in electric motor mode when the equivalent factor is small. The equivalent factor can be used to adjust energy consumption and natural gas consumption. For example, if the State of Charge (SOC) is high, more energy is consumed by decreasing the equivalent factor; otherwise, more natural gas is consumed by increasing the equivalent factor. In the ECMS control strategy, the battery's equivalent natural gas consumption is divided into charging and discharging scenarios. When the battery is charging, the equivalent natural gas consumption is negative, and the output power is also negative. To maintain the battery's SOC, the battery will discharge at some point in the future. When the battery is discharging, the equivalent natural gas consumption is positive, and the system will charge the battery at some point to compensate for the consumed energy. Therefore, the battery's equivalent natural gas consumption is expressed by the following formula:

[0071] In the above formula, m Batt This is the equivalent gas consumption of the battery. V Batt Battery voltage; I Batt This refers to the battery current. dis This refers to the battery discharge efficiency.

[0072] The time required to charge the battery at some point in the future is closely related to the average efficiency of the natural gas engine, and the equivalence factor is expressed by the following formula:

[0073] In the above formula, chg Improving the charging efficiency of natural gas engines; MC Let be the motor discharge efficiency; s(t) dis s(t) is the equivalent factor during discharge. chg The charging equivalence factor; GC This refers to the generator's power generation efficiency.

[0074] While ensuring the ship's overall power requirements are met, it's necessary to adjust the gas turbine to operate within its high-efficiency range, minimizing natural gas consumption. The goal is to consistently minimize the sum of the gas turbine's gas consumption and the motor's equivalent natural gas consumption. The specific implementation process of this minimum equivalent gas consumption strategy is as follows: Figure 2 As shown.

[0075] Discrete Equivalent Minimum Natural Gas Consumption Strategy (D-ECMS), Natural Gas Engine Natural Gas Consumption Power P ef It is expressed as follows:

[0076] In the above formula, P e P is the output power of the natural gas engine. ef This marks the first turning point; P e_opt The highest power point; P e_max To output maximum output power: a el a e2 a e3 b el b e2 b e3 denoted as the linear fitting coefficients for each segment, where the fitting coefficients are a function of velocity.

[0077] Because the current in a motor is opposite during the motoring and generating processes, the motor power P S It can be represented as:

[0078] In the above formula, P s P is the motor output power. m The generator output power; a m+ b m+ , where is the fitting coefficient for the input and output power of the motor during motor drive; a m- b m-The fitting coefficients are the input and output power of the motor when it is generating electricity.

[0079] The power required for a ship's navigation is equal to the sum of the output power of the electric motor and the output power of the natural gas engine:

[0080] In the above formula, P req Power required for ship navigation; P e P is the output power of the natural gas engine. s This refers to the output power of the motor.

[0081] The equivalent natural gas consumption of hybrid power can be expressed as:

[0082] Combined with natural gas engine natural gas consumption power and motor power P S available:

[0083] Since both the natural gas engine model and the electric motor model are piecewise linear functions, the above equation can be further written in piecewise function form. Based on the range of power demand, it can be divided into the following four cases: (1)

[0084]

[0085] (2)

[0086] =

[0087] (3)

[0088]

[0089] (4)

[0090]

[0091] If it is determined that the ship's required power is not greater than its maximum output power, calculate the equivalent natural gas consumption at the zero power point, the first power inflection point, the optimal power point, the maximum output power point, and the ship's required power point.

[0092] When the ship's power demand exceeds its maximum output power, calculate the equivalent natural gas consumption at the zero power point, the first power inflection point, the optimal power point, and the maximum output power point.

[0093] Specifically, when determining the equivalence factor, speed, and power requirements, the piecewise linear function of the natural gas engine power is the equivalent natural gas consumption. According to relevant mathematical knowledge, the minimum value of the piecewise linear function can be found at the very end of each segment. Therefore, the optimal output power of the natural gas engine ( It should conform to the following formula:

[0094] at the same time, The following constraints must be met:

[0095] The results obtained above have achieved the discretization objective. The above equations represent the control variables obtained after discretization under the constraint of minimum equivalent natural gas consumption. Therefore, it is essential to achieve the minimum equivalent natural gas consumption at these critical points.

[0096] When the maximum output power of the natural gas engine exceeds the ship's required power, only 5 points of equivalent natural gas consumption need to be calculated; when the maximum output power of the natural gas engine cannot meet the required power, at most 4 points of equivalent natural gas consumption need to be calculated. For the hybrid drive mode of natural gas engine and electric motor, the optimal torque distribution is obtained by comparing the equivalent natural gas consumption of up to 5 points using the results derived above.

[0097] In step S2, after determining the optimal output power, the method further includes: Based on the correspondence between power, torque, and speed, the optimal output power is converted into the corresponding optimal output torque to generate torque commands for controlling the natural gas engine and motor.

[0098] Specifically, when the maximum output power of the natural gas engine is less than the required power, only a maximum of four points of equivalent gas consumption need to be calculated. Because the control method for the motor and natural gas engine is torque control, for ease of study, the discrete power points mentioned above are converted into torque points. The power of the natural gas engine is related to torque and speed, as shown in the following formula:

[0099] When the rotational speed is constant, power and torque have a one-to-one relationship; the power consumption of natural gas in a natural gas engine... This can be rewritten in torque form:

[0100] In the formula: It was the first turning point; This is the maximum torque value; This is the maximum output torque. Optimal natural gas engine torque. The following constraints must be met:

[0101] In the above formula, This is the actual minimum torque limit for a natural gas engine; This refers to the actual maximum torque limit of the natural gas engine. An analytical formula for equivalent natural gas consumption is derived, and constraints for the optimal solution are designed to achieve discretization within the search domain of the control variables, thereby significantly improving the algorithm's computational speed. If the analytical formula is accurate, the discretized solution should be identical to the solution to the original problem. In a gas-electric hybrid drive mode, based on the above derivation, the optimal torque distribution can be obtained by calculating the equivalent gas consumption at a maximum of 5 points. This strategy is defined as the Discretized Equivalent Natural Gas Consumption Minimum Strategy (D-ECMS).

[0102] Based on the above embodiments, as a preferred implementation, the improved logic flow of the sand cat swarm optimization algorithm is as follows: Figure 2 As shown. The process of solving for the optimal equivalence factor is as follows. Figure 3 As shown. In S3, the improved sand cat swarm optimization algorithm is implemented through the following mechanism: The Sand Cat Swarm Optimization algorithm, proposed by Seyyedabbasi and Kiani in 2022, is a metaheuristic algorithm inspired by the natural hunting behavior of sand cats. Its core mechanism simulates the sand cat's "exploration" (prey search) and "development" (prey attack) behaviors to balance global search and local optimization performance. The specific process is as follows: Population generation. In a d-dimensional optimization problem, the initial position vector of each individual in the sand cat population is: And it satisfies the upper and lower bound constraints [1b, ub]. Uniform distribution or Latin hypercube sampling is typically used to generate the initial population to improve diversity; therefore, the maximum number of iterations needs to be set in the algorithm. Sensitivity range parameters (Simulating the hearing ability of a sand cat), adaptive parameters (Control the search scope.)

[0103] 2) Exploration phase (searching for prey), when random vectors When the value is greater than 1, the sand cat enters a global search mode, using low-frequency noise to detect the location of its prey.

[0104] ① Calculate the auditory range of a sand cat. The formula for dynamic adjustment during iteration is:

[0105] ② Generate random parameters. The random parameter R and the sensitivity range r are calculated using the following formula: r= ×rand(0,1) ③ Position update, based on the current best individual The formula for updating the position with random perturbation is as follows: X

[0106] 3) Development phase (attacking prey): When |R|≤1, the sand cat enters the local development phase and completes the attack by getting close to the prey.

[0107] ① Generate a random position vector based on the current optimal position. Generate random vectors:

[0108] ② Angle perturbation, introducing random angles (0~360°) Simulates the movement path of a sand cat around its prey, avoiding getting trapped in local optima.

[0109] ③ Position update: Update the individual position by combining the optimal position and angle perturbation.

[0110] 4) Termination condition: The algorithm iterates repeatedly until one of the following conditions is met, which means the maximum number of iterations has been reached. Or the fitness value converges (e.g., the optimal solution does not change significantly for several consecutive times).

[0111] The traditional Sand Cat Swarm Optimization (SCSO) algorithm has three key limitations: first, insufficient global convergence, making it prone to getting trapped in local optima; second, low computational efficiency, with fixed search patterns leading to redundant iterations; and third, weak robustness, being highly sensitive to initial parameters. To address these issues, the improved algorithm achieves performance enhancements through a multi-dimensional mechanism design, as detailed below: The temperature decay mechanism uses a preset initial temperature, a cooling coefficient, and a suboptimal solution acceptance strategy based on a probability function.

[0112] Specifically, the concept of simulated annealing is introduced, setting an initial temperature T and a cooling coefficient α, and using a probability function... The decision to accept or reject a suboptimal solution is made during the fitness update phase. If the fitness of a new solution is worse than that of the historical best solution, it is still accepted with probability P, effectively preventing premature convergence of the algorithm. This mechanism combines the parallel search advantages of swarm intelligence with the probabilistic escape capability of simulated annealing, significantly improving the optimization effect on complex multimodal problems.

[0113] The random perturbation and boundary constraints include updating the population individuals according to a preset period and restricting the search parameters within the feasible domain.

[0114] Specifically, random individual injection: every 5 generations (satisfying (mod(iter,5)=0)), one individual in the population is randomly replaced, breaking the homogeneity of the population through chaotic perturbation and maintaining the diversity of the population.

[0115] Boundary reflection mechanism: After the individual position is updated, the parameters are forcibly constrained within the feasible region to avoid invalid solutions occupying computing resources and accelerate the convergence of the algorithm to the global optimal region.

[0116] The dynamic parameter adjustment includes dynamically adjusting the search range parameters and randomly generating the search direction.

[0117] Specifically, the dynamic decay of sound intensity: during the iteration process, through the formula By dynamically adjusting parameters, the algorithm can smoothly transition from the exploration phase (global search) to the development phase (local optimization).

[0118] Angular random perturbation: using It generates multi-dimensional search directions to replace the traditional roulette wheel strategy, avoids search direction deviation, and meets the dual needs of global exploration in the early stage and local fine-tuning search in the later stage through nonlinear parameter adjustment.

[0119] The termination condition is reaching the maximum number of iterations or the quality of the solution no longer improves.

[0120] Based on the above embodiments, as a preferred implementation, in step S4, the power battery life degradation model is a preset model based on the battery output current rate, throughput, and temperature.

[0121] The instantaneous percentage of battery life loss is calculated in real time using the output current, operating time, and total throughput of the power battery.

[0122] Specifically, this embodiment first addresses the problem of the change in the efficiency characteristics of power batteries with degradation by introducing an adaptive objective function mechanism and designing an adaptive equivalent hydrogen consumption minimization strategy (AECMS). Then, for power battery durability optimization, degradation is introduced into the optimization objective function to establish a discrete adaptive equivalent gas consumption minimization strategy (D-AECMS) that considers the degradation of power battery life.

[0123] Traditional energy management strategies typically focus solely on natural gas consumption. However, since parallel gas-electric hybrid ships involve multiple energy sources, practical engineering applications may require consideration of multiple optimization objectives, such as gas engine consumption and battery life loss. Failing to account for the impact of high-rate acceleration on the battery can lead to increased battery cycle life loss. This design aims to extend battery life by establishing a semi-empirical battery life loss model:

[0124] In the above formula, Battery capacity loss rate; A set of Boolean expressions; For battery throughput; Where B is the output rate of the battery, and z are parameters obtained from experiments; The battery output rate is The activation energy at time T is given by R, the gas constant, and the temperature.

[0125] Based on the above embodiments, as a preferred implementation, the transmission system model includes a main reduction mechanism and a power output reduction mechanism, and uses a torque synthesis device to synthesize the input torque of the natural gas engine and the motor into a final output torque for driving the propeller.

[0126] Based on the above embodiments, as a preferred implementation, it further includes: S6. Adaptively correct the optimal equivalent factor based on the real-time state of charge (SOC) of the power battery. When the SOC deviates from the preset SOC range, change the energy usage strategy by adjusting the size of the optimal equivalent factor, thereby maintaining the SOC within the preset SOC range.

[0127] Specifically, the instantaneous percentage of battery life loss is expressed as follows:

[0128] In the above formula, This represents the instantaneous percentage of battery life loss. Indicates the battery output current; This indicates the battery's throughput.

[0129] The constraints of the dynamic system are shown in the following equation:

[0130] In the above formula, The maximum variable load of the power battery per unit time; and It is divided into upper and lower limits of the power battery output power. , These represent the upper and lower limits of the state of charge of the power battery, respectively.

[0131] Secondly, embodiments of the present invention provide an energy management system for gas-electric hybrid power ships based on the sand cat swarm algorithm, such as... Figure 5 As shown, it includes: The system modeling module 510 is used to establish a system model of a gas-electric hybrid power ship. The system model includes a natural gas engine model, an electric motor model, a power battery model, a transmission system model, and a machine-propeller mathematical model. The strategy construction module 520 is used to construct a discretized equivalent natural gas consumption minimization strategy (D-ECMS) based on the system model. By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key power points, and the equivalent natural gas consumption of each key power point is calculated to determine the optimal output power of the natural gas engine and motor. The optimization calculation module 530 is used to optimize the equivalent factor in the discretized equivalent natural gas consumption minimization strategy using an improved sand cat swarm optimization algorithm. The improved sand cat swarm optimization algorithm introduces a temperature decay mechanism, random perturbation and boundary constraints, and dynamic parameter adjustment to balance global search and local optimization to obtain the optimal equivalent factor. The lifespan optimization module 540 is used to integrate the power battery lifespan degradation model into the discretized equivalent natural gas consumption minimization strategy, by instantaneously representing the battery lifespan loss percentage and adding a penalty factor related to battery lifespan, so as to simultaneously optimize natural gas consumption and battery lifespan. The power distribution module 550 is used to adjust the power distribution between the natural gas engine and the electric motor in real time according to the optimal equivalence factor and the optimal output power.

[0132] Based on the same concept, this invention also provides a schematic diagram of a physical structure, such as... Figure 6 As shown, the server may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions stored in the memory 630 to execute the steps of the gas-electric hybrid power ship energy management method based on the sand cat swarm algorithm described in the above embodiments.

[0133] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0134] Based on the same concept, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program containing at least one piece of code that can be executed by a master control device to control the master control device to implement the steps of the gas-electric hybrid power ship energy management method based on the sand cat swarm algorithm as described in the above embodiments.

[0135] Based on the same technical concept, this application also provides a computer program, which, when executed by a main control device, is used to implement the above-described method embodiments.

[0136] The program may be stored, in whole or in part, on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.

[0137] Based on the same technical concept, this application also provides a processor for implementing the above-described method embodiments. The processor can be a chip.

[0138] The various embodiments of the present invention can be combined arbitrarily to achieve different technical effects.

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

Claims

1. A method for energy management of gas-electric hybrid ships based on the sand cat swarm algorithm, characterized in that, include: S1. Establish a system model for a gas-electric hybrid power ship, which includes a natural gas engine model, an electric motor model, a power battery model, a transmission system model, and a propeller-engine mathematical model. S2. Based on the system model, construct the Discrete Equivalent Natural Gas Consumption Minimum Strategy (D-ECMS). By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key power points. The equivalent natural gas consumption of each key power point is calculated to determine the optimal output power of the natural gas engine and motor. S3. An improved sand cat swarm optimization algorithm is used to optimize the equivalent factor in the discretized equivalent natural gas consumption minimization strategy. The improved sand cat swarm optimization algorithm introduces a temperature decay mechanism, random perturbation and boundary constraints, and dynamic parameter adjustment to balance global search and local optimization and obtain the optimal equivalent factor. S4. Integrate the power battery life degradation model into the discretized equivalent natural gas consumption minimization strategy, express the battery life loss percentage instantaneously, and add a penalty factor related to battery life to simultaneously optimize natural gas consumption and battery life. S5. Adjust the power distribution between the natural gas engine and the electric motor in real time according to the optimal equivalent factor and the optimal output power.

2. The energy management method for gas-electric hybrid ships based on the sand cat swarm algorithm according to claim 1, characterized in that, In S1, the natural gas engine model is constructed using an experimental modeling method. The natural gas engine model is a steady-state model that ignores dynamic processes and is used to characterize the functional relationship between the engine's speed, torque, fuel consumption rate and working efficiency under steady-state conditions. The power battery model includes a voltage model and a degradation model; The voltage model, based on the electrical characteristic parameters of the power battery, determines the correspondence between the output voltage and output current of the power battery. The degradation model calculates the degradation rate of the power battery based on its historical operating parameters and determines the end of the battery's lifespan based on the degree of voltage decay.

3. The energy management method for gas-electric hybrid power ships based on the sand cat swarm algorithm according to claim 1, characterized in that, In S2, the discretized equivalent natural gas consumption minimization strategy discretizes the output power of the natural gas engine into multiple key power points, including the zero power point, the first power inflection point, the optimal power point, the maximum output power point, and the ship's required power point. If it is determined that the ship's required power is not greater than its maximum output power, calculate the equivalent natural gas consumption at the zero power point, the first power inflection point, the optimal power point, the maximum output power point, and the ship's required power point. When the ship's power demand exceeds its maximum output power, calculate the equivalent natural gas consumption at the zero power point, the first power inflection point, the optimal power point, and the maximum output power point. In step S2, after determining the optimal output power, the method further includes: Based on the correspondence between power, torque, and speed, the optimal output power is converted into the corresponding optimal output torque to generate torque commands for controlling the natural gas engine and motor.

4. The energy management method for gas-electric hybrid ships based on the sand cat swarm algorithm according to claim 1, characterized in that, In step S3, the improved sand cat swarm optimization algorithm is implemented through the following mechanism: The temperature decay mechanism uses a preset initial temperature, a cooling coefficient, and a suboptimal solution acceptance strategy based on a probability function. The random perturbation and boundary constraints include updating the population individuals according to a preset period and restricting the search parameters to a feasible region; The dynamic parameter adjustment includes dynamically adjusting the search range parameter and randomly generating the search direction; The termination condition is reaching the maximum number of iterations or the quality of the solution no longer improves.

5. The energy management method for gas-electric hybrid power ships based on the sand cat swarm algorithm according to claim 1, characterized in that, In S4, the power battery life degradation model is a preset model based on the battery output current rate, throughput and temperature. The instantaneous percentage of battery life loss is calculated in real time using the output current, operating time, and total throughput of the power battery.

6. The energy management method for gas-electric hybrid ships based on the sand cat swarm algorithm according to claim 1, characterized in that, The transmission system model includes a main reduction mechanism and a power output reduction mechanism, and uses a torque synthesis device to combine the input torque of the natural gas engine and the motor into the final output torque to drive the propeller.

7. The energy management method for gas-electric hybrid power ships based on the sand cat swarm algorithm according to claim 1, characterized in that, Also includes: The optimal equivalent factor is adaptively corrected based on the real-time state of charge (SOC) of the power battery. When the SOC deviates from the preset SOC range, the energy usage strategy is changed by adjusting the size of the optimal equivalent factor, thereby maintaining the SOC within the preset SOC range.

8. An energy management system for gas-electric hybrid power ships based on the sand cat swarm algorithm, characterized in that, include: The system modeling module is used to establish a system model of a gas-electric hybrid power ship. The system model includes a natural gas engine model, an electric motor model, a power battery model, a transmission system model, and a machine-propeller mathematical model. The strategy construction module is used to construct a discretized equivalent natural gas consumption minimization strategy (D-ECMS) based on the system model. By deriving the analytical relationship of equivalent natural gas consumption, the power allocation optimization problem is discretized into a finite number of key power points, and the equivalent natural gas consumption of each key power point is calculated to determine the optimal output power of the natural gas engine and motor. The optimization calculation module is used to optimize the equivalent factor in the discretized equivalent natural gas consumption minimization strategy using an improved sand cat swarm optimization algorithm. The improved sand cat swarm optimization algorithm introduces a temperature decay mechanism, random perturbation and boundary constraints, and dynamic parameter adjustment to balance global search and local optimization and obtain the optimal equivalent factor. The lifespan optimization module is used to integrate the power battery lifespan degradation model into the discretized equivalent natural gas consumption minimization strategy. It represents the battery lifespan loss percentage instantaneously and adds a penalty factor related to battery lifespan to simultaneously optimize natural gas consumption and battery lifespan. The power distribution module is used to adjust the power distribution between the natural gas engine and the electric motor in real time based on the optimal equivalence factor and the optimal output power.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the gas-electric hybrid power ship energy management method based on the sand cat swarm algorithm as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the gas-electric hybrid power ship energy management method based on the sand cat swarm algorithm as described in any one of claims 1 to 7.