Fuel cell hybrid ship energy control method and system based on improved speed prediction
By improving speed prediction and power allocation strategies, optimizing LSTM hyperparameters using the sparrow search algorithm, and combining equivalent hydrogen consumption and fuel cell degradation costs, the accuracy problem of future disturbance changes in fuel cell hybrid ship systems was solved, achieving efficient energy management and extended fuel cell lifespan.
Patent Information
- Application Number
- CN202611526537.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional fuel cell hybrid ship systems cannot accurately reflect future disturbance changes, affecting power distribution effectiveness and optimization accuracy. At the same time, they do not incorporate fuel cell performance degradation into a unified optimization framework, resulting in a shortened system lifespan.
An energy control method for fuel cell hybrid ships based on improved speed prediction is adopted. The sparrow search algorithm is used to optimize the hyperparameters of the long short-term memory network. Combined with the equivalent hydrogen consumption cost and fuel cell degradation cost, the power is dynamically allocated through model predictive control. An LSTM ship speed prediction model is constructed and rolled optimization is performed.
It achieves high-precision ship speed prediction and power distribution, reduces fuel consumption, extends fuel cell life, and improves energy efficiency and system reliability.
Smart Images

Figure CN123170100A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine new energy power system technology, and more particularly to a fuel cell hybrid ship energy control method and system based on improved speed prediction. Background Technology
[0002] Against the backdrop of the global green energy transition, renewable energy has become crucial for addressing climate change, ensuring energy security, and promoting sustainable economic development. When fuel cells are the sole power source for ships, their relatively slow dynamic response characteristics make it difficult to meet the demands of rapidly fluctuating loads. This limitation not only reduces the lifespan of the fuel cell but also affects the efficiency of hydrogen utilization. To address these issues, the introduction of lithium batteries can smooth out peak and valley load power fluctuations, and a hybrid power system combining fuel cells and lithium batteries can effectively improve overall operating efficiency.
[0003] In the field of fuel cell-lithium battery hybrid power ships, existing technologies mainly include rule-based energy management strategies, learning-based strategies, and optimization-based strategies. Rule-based strategies determine power allocation using empirical formulas, fuzzy logic, or piecewise control based on information such as load power, fuel cell and battery status. Learning-based strategies utilize machine learning or deep reinforcement learning algorithms to train models using historical navigation data to achieve near-optimal power allocation. Typical methods include Double Q reinforcement learning and Deep Deterministic Policy Gradient (DDPG), which can learn complex nonlinear mapping relationships and automatically adjust the output power of fuel cells and lithium batteries under various navigation conditions to achieve energy efficiency. These strategies overcome the dependence on human experience in rule-based methods to some extent and are suitable for dynamic and highly uncertain navigation environments. Optimization-based strategies achieve optimal power allocation control by establishing mathematical models and objective functions. Global optimization methods such as dynamic programming (DP) and the Pontryagin Minimum Principle (PMP) generate optimal power sequences or control libraries under offline conditions; online optimization methods such as Equivalent Consumption Minimization Strategy (ECMS) and Model Predictive Control (MPC) do not require complete navigation information and dynamically allocate power in real time. The equivalent consumption minimization strategy achieves power allocation by minimizing instantaneous equivalent hydrogen consumption, while model predictive control performs rolling optimization of the control sequence within a finite prediction time domain, enabling multi-step decision-making and long-term performance optimization. These methods allow for dynamic power adjustment based on the ship's actual operating conditions, improving system efficiency and fuel economy.
[0004] However, the aforementioned existing technical solutions still have significant shortcomings. Rule-based strategies typically rely on thresholds and empirical parameters, making it difficult to balance system economy and equipment lifespan. Learning-based strategies require a large amount of high-quality training data, and the hyperparameter tuning process is complex, limiting their operability in practical applications. For model predictive control, traditional methods usually assume that the speed remains constant in the prediction time domain, failing to accurately reflect future disturbance changes, thus affecting power allocation effectiveness and optimization accuracy. Furthermore, many existing methods focus only on the single objective of minimizing hydrogen consumption, failing to incorporate fuel cell performance degradation into a unified optimization framework. This leads to accelerated fuel cell aging and a shortened overall system lifespan in the pursuit of fuel economy. Summary of the Invention
[0005] In view of this, the purpose of this invention is to propose an energy control method and system for fuel cell hybrid ships based on improved speed prediction, so as to solve the technical problem that traditional methods cannot accurately reflect future disturbance changes.
[0006] The technical means employed in this invention are as follows: An energy control method for fuel cell hybrid ships based on improved speed prediction includes the following steps: S1. Collect historical data of ship navigation, including historical speed, lithium battery state of charge and ship power requirements; S2. Use the Sparrow Search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network to obtain the optimal hyperparameter combination; S3. Construct a long short-term memory network ship speed prediction model based on the optimal hyperparameter combination. Input the historical ship speed, lithium battery state of charge and power demand sequence into the ship speed prediction model, output the ship speed prediction value in the future prediction time domain, and calculate the future power demand sequence based on the ship speed prediction value. S4. Using the future power demand sequence as the disturbance input for model predictive control, with the goal of minimizing the sum of equivalent hydrogen consumption cost and fuel cell degradation cost, solve for the optimal power allocation sequence in the future finite time domain under the premise of satisfying system constraints. S5. Execute the first control variable in the optimal power allocation sequence, and return to S3 in the next sampling period to continuously update the prediction and optimization calculations.
[0007] Furthermore, the fuel cell and the lithium battery are connected via a DC bus. The fuel cell is connected to the DC bus via a unidirectional DC / DC converter, and the lithium battery is connected to the DC bus via a bidirectional DC / DC converter. The fuel cell provides base load power, and the lithium battery is responsible for power fluctuation regulation.
[0008] Furthermore, S2 utilizes the sparrow search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network, specifically including the following sub-steps: S21. Determine the hyperparameters to be optimized, and encode the number of hidden layer neurons, learning rate, regularization coefficient, time window length and training batch size of the Long Short-Term Memory Network into individual position vectors; S22. Initialize the sparrow population, set the maximum number of iterations, the proportion of discoverers, and the proportion of vigilants, and establish a model container to store the long short-term memory network entities corresponding to each solution. S23. Train a long short-term memory network using the initial population, calculate the fitness value of each initial individual and temporarily store its network structure, sort the fitness values of the entire population in ascending order, and record the global best position, the global worst position, the historical best fitness and the corresponding optimal network model. S24. Perform the location update of the discoverer, the follower, and the vigilant; S25. Perform boundary truncation checks on the updated population, round down the discrete hyperparameters, retrain and evaluate the fitness of the new individuals. If there is a new individual with a fitness better than the historical best value, then update the global best score, the best parameter combination and the best network entity simultaneously. S26. Repeat S24 to S25 until the preset maximum number of iterations is reached, and output the optimal combination of hyperparameters.
[0009] Furthermore, the fitness function described in S23 uses the prediction error of the validation set as the core evaluation index, adopts the root mean square error, and introduces a model complexity penalty term. The smaller the fitness value, the better the model performance.
[0010] Furthermore, the long short-term memory network unit described in S3 consists of an input gate, a forget gate, an output gate, and a core unit. The forget gate controls the proportion of information retained in the previous unit state, the input gate controls the impact of the current input on the unit state update, the output gate extracts content that is of reference value for prediction from the current unit state, and the core unit supports gradient transfer in the backpropagation process through the cell state flow.
[0011] Furthermore, in S4, the objective is to minimize the sum of the equivalent hydrogen consumption cost and the fuel cell degradation cost, as shown in the following formula:
[0012]
[0013] in, To predict the step size; The equivalent hydrogen consumption rate at step k is calculated through energy conversion of fuel cells and lithium batteries. This represents the fuel cell degradation cost index at step k. and These are the price coefficients for hydrogen and fuel cell stacks, respectively.
[0014] Furthermore, when the fuel cell output power is greater than 80% of the rated power, it is determined to be a high-load condition; when the fuel cell output power is less than 20% of the rated power, it is determined to be a low-load condition; and the condition between the high-load and low-load conditions is the high-efficiency zone condition.
[0015] Furthermore, the system constraints described in S4 include:
[0016] in, , These are the minimum and maximum power of the fuel cell, respectively. This represents the actual output power of the fuel cell at time k. , These are the minimum and maximum power of the lithium battery, respectively. This represents the actual power of the lithium battery at time k. Let be the load power demand at time k; , These are the minimum and maximum permissible states of charge (SOC) for lithium batteries, respectively. This represents the actual state of charge of the lithium battery at time k.
[0017] Furthermore, in S4, a sequential quadratic programming method is used to solve for the optimal power allocation sequence, including the following steps: S41. Based on the current state and predicted disturbances Linearized system dynamics and constraints; S42. Construct a quadratic programming subproblem to solve for the optimal control increment. ; S43, Update Control Quantity ; S44. Apply the first element of the optimal control sequence to the actual system and continuously update the calculation of the next sampling point.
[0018] The present invention also provides an energy management system for fuel cell hybrid ships based on improved speed prediction, comprising: The data acquisition module is used to collect historical data of the ship's navigation, including historical speed, lithium battery state of charge, and ship power requirements. The prediction module uses the Sparrow Search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network to obtain the optimal hyperparameter combination. Based on the optimal hyperparameter combination, a Long Short-Term Memory network ship speed prediction model is constructed. The historical ship speed, lithium battery state of charge and power demand sequence are input into the ship speed prediction model, and the predicted ship speed value in the future prediction time domain is output. The future power demand sequence is calculated based on the predicted ship speed value. The optimization decision module takes the future power demand sequence as the disturbance input of the model predictive control, and aims to minimize the sum of the equivalent hydrogen consumption cost and the fuel cell degradation cost. Under the premise of satisfying the system constraints, it solves the optimal power allocation sequence in the future finite time domain. The execution module executes the first control variable in the optimal power allocation sequence and triggers the prediction module and the optimization decision module to perform rolling update calculations in the next sampling period.
[0019] Compared with the prior art, the present invention has the following advantages: This invention introduces the LSTM (Long Short-Term Memory) network into the ship speed prediction model. By inputting historical speed data, it models the dynamic behavior of ships and uses the Sparrow Search Algorithm (SSA) to globally optimize the hyperparameters of the LSTM, achieving high-precision ship speed prediction and providing reliable perturbation input for MPC (Multi-Process Control).
[0020] This invention considers both the equivalent hydrogen consumption cost and the fuel cell degradation cost in the MPC optimization objective function. It dynamically allocates the power of the fuel cell and lithium battery through a rolling optimization algorithm, so that the system can reduce fuel consumption and improve energy utilization efficiency while meeting the power requirements of the ship.
[0021] This invention introduces fuel cell degradation constraints into the power distribution strategy to limit high-load operation and frequent start-stop. By optimizing the control of the fuel cell operating point through actual MPC, the degradation rate of the membrane electrode assembly is reduced, thereby extending the fuel cell life and improving the long-term reliability of the hybrid power system. Attached Figure Description
[0022] 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.
[0023] Figure 1 This is a topology diagram of the fuel cell hybrid power system of the present invention.
[0024] Figure 2 This is a framework diagram of the control method of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] See Figure 1 The marine fuel cell-lithium battery hybrid power system applied in this invention has the following power system topology: the system consists of a proton exchange membrane fuel cell stack and a lithium battery pack. The fuel cell serves as the primary propulsion power source, providing base load power; the lithium battery acts as an auxiliary energy storage device, handling power fluctuation regulation and achieving peak shaving and valley filling of load power. The fuel cell and lithium battery are connected via a DC bus, where the fuel cell is connected to the DC bus via a unidirectional DC / DC converter, and the lithium battery is connected to the DC bus via a bidirectional DC / DC converter. The lithium battery can be charged and discharged according to system requirements to adjust power. The real-time monitored state variables of the system include fuel cell output power, lithium battery state of charge (SOC), real-time ship speed, and total power demand.
[0028] Fuel cell modeling; In this embodiment, the entire fuel cell power system consists of a fuel cell stack and auxiliary components. The fuel cell converts chemical energy into electrical energy through the electrochemical reaction of hydrogen and oxygen. During this process, polarization losses cause the output voltage to decrease as the current increases. The actual output voltage expression of the fuel cell is: (1) in, This is the open-circuit voltage of the fuel cell. To activate voltage loss, For ohmic voltage loss, This refers to the voltage loss due to concentration.
[0029] The stacked power and output power of the fuel cell are as follows: (2) (3) in, The power generated by stacking, This represents the number of individual cells in the stack. For stacking current, For the output power of the fuel cell, The power consumed by auxiliary equipment.
[0030] During fuel cell operation, the mass flow rate of hydrogen... Calculated using equation (4), where It has the lower calorific value of hydrogen (120 MJ / kg). Indicating the efficiency of a fuel cell system: (4) Lithium battery modeling; For modeling lithium batteries, this implementation uses an internal resistance model. Lithium battery output power. and state of charge Calculated using the following formulas respectively: (5) (6) in, Indicates open-circuit voltage. Indicates battery current. Indicates internal resistance. This indicates the nominal battery capacity.
[0031] Charging efficiency and discharge efficiency Calculated by the following formula: (7) Based on the equivalent hydrogen consumption theory, the energy conversion of a lithium battery at a certain power level is transformed into the corresponding hydrogen consumption. The equivalent hydrogen consumption mass flow rate of a lithium battery... Calculated by the following formula: (8) This invention provides an energy control method for fuel cell hybrid ships based on improved speed prediction, comprising the following steps: S1, Data Acquisition; First, historical navigation data of the vessel is collected. This historical data includes, but is not limited to, historical speed, lithium battery state of charge (SOC), and vessel power requirements, which are used for training and validation of subsequent prediction models.
[0032] S2. Global optimization of LSTM hyperparameters based on SSA; Since the predictive performance of LSTM models is highly dependent on network structure and hyperparameter settings, traditional empirical hyperparameter tuning is inefficient and prone to getting trapped in local optima. This implementation introduces the Sparrow Search Algorithm (SSA) to globally optimize LSTM hyperparameters. SSA simulates the foraging and anti-predation behavior of sparrows, and through a collaborative search mechanism of finders, followers, and watchdogs, it achieves rapid convergence of hyperparameters and automatic optimization of optimal combinations globally.
[0033] The specific optimization execution process is as follows: S21. Determine the optimization variables and encoding methods; The number of hidden layer neurons in LSTM Learning rate Regularization coefficient Time window length and training batch size As variables to be optimized, the spatial location vector of each individual being optimized is encoded as follows: ,in , Population size. All variables are subject to preset upper and lower bounds. Constraints.
[0034] S22. Initialize algorithm control parameters; Set the maximum number of iterations to And initialize algorithm parameters: proportion of security threshold discoverers Corresponding quantity Proportion of vigilant individuals Corresponding quantity Simultaneously, a model container in cell array format is established. It is used to synchronously store the LSTM network entities corresponding to each solution.
[0035] S23, Initial adaptive evaluation and ascending order sorting; Using the initial position vector Train an LSTM network using the objective function Calculate the fitness value of each initial individual. And temporarily store its network structure Sort the fitness values of the entire population in ascending order and rearrange the population positions. X With model container Record the current global optimal position. Worst position in the world Historical best fitness and the corresponding optimal network model .
[0036] Define the fitness function; The prediction error on the validation set is used as the core evaluation metric. To balance prediction accuracy and model generalization ability, the root mean square error (RMSE) is adopted, and a model complexity penalty term is introduced to construct the fitness function as follows:
[0037] In the formula: The number of samples in the validation set; and These are the actual value and the predicted value, respectively. This represents the upper limit of the number of neurons; and This represents the weight penalty coefficient. A smaller fitness value indicates better model performance.
[0038] S24. Perform discoverer location update; Enter the main iterative loop, and generate uniformly random numbers in the interval [0,1] during each iteration. As a warning value for the current environment: when At that time, the discoverer performs an exponentially decaying global search:
[0039] when At that time, the discoverer performs a random perturbation search:
[0040] In the formula: 1 is a one-dimensional vector of all 1s; and are random scalars with uniform and standard normal distributions, respectively.
[0041] Perform follower position update, and the remaining individuals ( As a follower, it determines its update strategy based on its sorted index: when At that time, the follower searches away from the worst position using the following formula:
[0042] when At this time, followers conduct random cooperative searches near the optimal position:
[0043] In the formula: A row vector whose elements are randomly selected as 1 or -1. for The transpose of the generalized inverse matrix.
[0044] Update the location of the vigilant; Random selection Each individual acts as a vigilant, and its original index is denoted as... Dynamically avoid risk areas using the following formula: Then move closer to the optimal position:
[0045] like Then move away from the danger zone using the following formula:
[0046] In the formula: A uniformly random number in the interval [-1, 1]; To prevent extremely small positive numbers with a denominator of zero.
[0047] S25, Boundary control, discretization processing and dynamic updating; For the updated temporary population Perform a multi-dimensional boundary truncation check. (Targeting...) , and The three discrete hyperparameters are rounded to the nearest integer. Then, the values are recalculated. enter Train and evaluate; if a new individual has a fitness level better than the historical best, then... Then the global optimal score is updated synchronously. Optimal parameter combination And assign the currently trained best network entity to .
[0048] Output the optimal parameters and network model; Repeat steps S24 and S25 until the preset number of iterations is reached. The algorithm terminates and outputs the optimal combination of hyperparameters. and optimal adaptability score .
[0049] S3 and LSTM prediction model structures; This implementation uses a Long Short-Term Memory (LSTM) network for ship speed prediction. An LSTM unit consists of a core unit, an input gate, a forget gate, and an output gate. The input gate converts the current input information into content useful for updating the unit state; the forget gate controls the proportion of information retained from previous unit states, effectively suppressing noise, outliers, and redundant information in the navigation data during ship speed prediction; the output gate extracts valuable information from the current unit state for subsequent predictions. LSTM effectively supports gradient propagation during backpropagation by introducing cell state flow, thus significantly alleviating the gradient vanishing problem common in traditional RNNs. The LSTM structure is represented as follows: (9) In the formula, These represent the weights and biases, respectively. These represent the forget gate, input gate, output gate, state, input, and output at this point. This is the current hidden layer information. Input and output The options are as follows: (10) (11) By selecting historical ship speeds As input sequences, the model's output predicts future speeds. Indicates the predicted length.
[0050] S4. Prediction-based MPC energy management; This scheme adopts a prediction-based MPC control framework, the core idea of which is to solve for the optimal control sequence in the future finite time domain within each sampling period. The system state variables include the fuel cell output power. Lithium battery output power Battery state of charge (SOC) and ship power requirements The control variable is the power allocation of each energy unit. The disturbance input is the future ship power demand sequence predicted by SSA-LSTM.
[0051] (a) Control Framework Within each sampling period, the MPC controller solves for the optimal control sequence over a finite future time domain. System state variables include fuel cell output power, lithium battery output power, battery state of charge (SOC), and ship power demand; control variables are the power allocation to each energy unit. The disturbance input is the future ship power demand sequence predicted by the SSA-LSTM.
[0052] The state equation can be expressed as: (12) in, Let be the system state vector. For control vectors, As a disturbance input, For output variables.
[0053] (II) Optimization Objectives The objective function of MPC takes into account both fuel economy and fuel cell performance degradation, and is defined as the sum of the equivalent hydrogen consumption cost and the PEMFC degradation cost in the predicted time domain: (13) (14) in, To predict the step size, The equivalent hydrogen consumption rate at step k is calculated using energy conversion methods for fuel cells and lithium batteries. The fuel cell degradation cost index at step k can be calculated using parameters such as high load, low load, and number of start-stop cycles. and These are the price coefficients for hydrogen and fuel cell stacks, respectively.
[0054] In the formula and These refer to the operating time of the fuel cell under high-power and low-load conditions, respectively. For high fuel efficiency load. This refers to the number of start-stop cycles for the fuel cell. The change is the change in the output power of the fuel cell. When the PEMFC output power is greater than 80%, it is defined as high load; when the PEMFC output power is less than 20%, it is defined as low load; and other PEMFC operating regions are defined as high-efficiency load regions.
[0055] (III) Constraints To ensure the safety and efficiency of the system in actual operation, the following constraints are set: (15) The above constraints ensure that, in actual system operation, the fuel cell and lithium battery distribute power within a safe and efficient operating range, while meeting the ship's propulsion power requirements.
[0056] (iv) Solution method To solve the aforementioned nonlinear optimization problem, this implementation method employs Sequential Quadratic Programming (SQP). The SQP method linearizes the nonlinear optimization problem at the current iteration point and constructs quadratic programming subproblems for solution, thereby efficiently obtaining the optimal control sequence while ensuring convergence. The specific steps are as follows: S41. Based on the current state and predicted disturbances Linearized system dynamics and constraints; S42. Construct a quadratic programming subproblem to solve for the optimal control increment. ; S43, Update Control Quantity ; S44. Apply the first element of the optimal control sequence to the actual system and continuously update the calculation of the next sampling point.
[0057] S5, Rolling Optimized Closed-Loop Control; In each sampling period, the MPC optimizer calculates the optimal control sequence based on the current system state and predicted disturbances, and then executes only the first control variable in the sequence, i.e., the optimal power allocation command at the current moment. As the system state is updated to the next sampling point, the controller returns to S3, re-updates the prediction input of the SSA-LSTM model using the latest historical data, and performs MPC rolling optimization calculations in the new prediction time domain. This closed-loop rolling mechanism can dynamically adapt to changes in the navigation environment, correct the power allocation strategy in real time, and ensure the real-time performance and stability of the control strategy.
[0058] This invention provides an energy management system for fuel cell hybrid ships based on improved speed prediction, comprising: The data acquisition module is used to collect historical data of the ship's navigation, including historical speed, lithium battery state of charge, and ship power requirements. The prediction module uses the Sparrow Search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network to obtain the optimal hyperparameter combination. Based on the optimal hyperparameter combination, a Long Short-Term Memory network ship speed prediction model is constructed. The historical ship speed, lithium battery state of charge and power demand sequence are input into the ship speed prediction model, and the predicted ship speed value in the future prediction time domain is output. The future power demand sequence is calculated based on the predicted ship speed value. The optimization decision module takes the future power demand sequence as the disturbance input of the model predictive control, and aims to minimize the sum of equivalent hydrogen consumption cost and fuel cell degradation cost. Under the premise of satisfying system constraints, it solves the optimal power allocation sequence in the future finite time domain. The execution module executes the first control variable in the optimal power allocation sequence and triggers the prediction module and optimization decision module to perform rolling update calculations in the next sampling period.
[0059] Taking a fuel cell-lithium battery hybrid power ship as an example, this paper conducts a simulation verification of the ship's hybrid power system. The ship is equipped with two fuel cells and two sets of lithium batteries, connected to the DC bus via unidirectional and bidirectional DC / DC converters to achieve power coordination between the fuel cells and lithium batteries. First, an SSA-LSTM ship speed prediction model is trained using the ship's navigation data from the previous five days, with inputs including historical ship speed, battery SOC, and power demand. The Sparrow Search Algorithm (SSA) is used to globally optimize the number of hidden layer neurons, learning rate, and regularization coefficients of the LSTM network, achieving high-precision ship speed prediction and outputting a sequence of future speed and power demand.
[0060] Based on the predicted results, the future power demand sequence is input into the Model Predictive Control (MPC) optimizer. In each sampling period, the MPC calculates the optimal power allocation sequence within the finite prediction time domain based on the system state and predicted disturbances, executes only the current control input, and continuously updates the subsequent control strategy through rolling optimization. During the simulation, the system dynamically adjusts the output power of the fuel cell and lithium battery to ensure that the ship's total power meets navigation requirements while reducing fuel consumption and suppressing fuel cell degradation.
[0061] Simulation results show that the SSA-LSTM model can accurately capture the ship's speed changes during acceleration, deceleration, and turbulence phases in the prediction time domain, with a significantly lower root mean square error (RMSE) compared to the traditional LSTM model. After applying the MPC energy management strategy, compared to the traditional state machine-based control strategy, the total ship operating cost is reduced by approximately 9.9%, hydrogen consumption cost by approximately 3.9%, and the high-load operation time of the fuel cell is significantly reduced, along with fewer start-stop cycles, thus delaying the performance degradation of the PEMFC.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fuel cell hybrid power ship energy control method based on improved speed prediction, characterized in that, Includes the following steps: S1. Collect historical data of ship navigation, including historical speed, lithium battery state of charge and ship power requirements; S2. Use the Sparrow Search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network to obtain the optimal hyperparameter combination; S3. Construct a long short-term memory network ship speed prediction model based on the optimal hyperparameter combination. Input the historical ship speed, lithium battery state of charge and power demand sequence into the ship speed prediction model, output the ship speed prediction value in the future prediction time domain, and calculate the future power demand sequence based on the ship speed prediction value. S4. Using the future power demand sequence as the disturbance input for model predictive control, with the goal of minimizing the sum of equivalent hydrogen consumption cost and fuel cell degradation cost, solve for the optimal power allocation sequence in the future finite time domain under the premise of satisfying system constraints. S5. Execute the first control variable in the optimal power allocation sequence, and return to S3 in the next sampling period to continuously update the prediction and optimization calculations.
2. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 1, characterized in that, The fuel cell and the lithium battery are connected via a DC bus. The fuel cell is connected to the DC bus via a unidirectional DC / DC converter, and the lithium battery is connected to the DC bus via a bidirectional DC / DC converter. The fuel cell provides base load power, and the lithium battery is responsible for power fluctuation regulation.
3. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 1, characterized in that, S2 uses the Sparrow Search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network, specifically including the following sub-steps: S21. Determine the hyperparameters to be optimized, and encode the number of hidden layer neurons, learning rate, regularization coefficient, time window length and training batch size of the Long Short-Term Memory Network into individual position vectors; S22. Initialize the sparrow population, set the maximum number of iterations, the proportion of discoverers, and the proportion of vigilants, and establish a model container to store the long short-term memory network entities corresponding to each solution. S23. Train a long short-term memory network using the initial population, calculate the fitness value of each initial individual and temporarily store its network structure, sort the fitness values of the entire population in ascending order, and record the global best position, the global worst position, the historical best fitness and the corresponding optimal network model. S24. Perform the location update of the discoverer, the follower, and the vigilant; S25. Perform boundary truncation checks on the updated population, round down the discrete hyperparameters, retrain and evaluate the fitness of the new individuals. If there is a new individual with a fitness better than the historical best value, then update the global best score, the best parameter combination and the best network entity simultaneously. S26. Repeat S24 to S25 until the preset maximum number of iterations is reached, and output the optimal combination of hyperparameters.
4. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 3, characterized in that, The fitness function described in S23 uses the prediction error of the validation set as the core evaluation index, adopts the root mean square error, and introduces a model complexity penalty term. The smaller the fitness value, the better the model performance.
5. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 1, characterized in that, The Long Short-Term Memory (LSTM) network unit described in S3 consists of an input gate, a forget gate, an output gate, and a core unit. The forget gate controls the proportion of information retained in the previous unit state, the input gate controls the impact of the current input on the unit state update, the output gate extracts content that is of reference value for prediction from the current unit state, and the core unit supports gradient transfer in the backpropagation process through the cell state flow.
6. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 1, characterized in that, In S4, the objective is to minimize the sum of the equivalent hydrogen consumption cost and the fuel cell degradation cost, as shown in the following formula: in, To predict the step size; The equivalent hydrogen consumption rate at step k is calculated through energy conversion of fuel cells and lithium batteries. This represents the fuel cell degradation cost index at step k. and These are the price coefficients for hydrogen and fuel cell stacks, respectively.
7. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 6, characterized in that, When the fuel cell output power is greater than 80% of the rated power, it is considered a high-load condition; when the fuel cell output power is less than 20% of the rated power, it is considered a low-load condition; and the condition between the high-load and low-load conditions is the high-efficiency zone.
8. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 1, characterized in that, The system constraints described in S4 include: in, , These are the minimum and maximum power of the fuel cell, respectively. This represents the actual output power of the fuel cell at time k. , These are the minimum and maximum power of the lithium battery, respectively. This represents the actual power of the lithium battery at time k. Let be the load power demand at time k; , These are the minimum and maximum permissible states of charge (SOC) for lithium batteries, respectively. This represents the actual state of charge of the lithium battery at time k.
9. The energy control method for fuel cell hybrid ships based on improved speed prediction according to claim 1, characterized in that, S4 uses a sequential quadratic programming method to solve for the optimal power allocation sequence, including the following steps: S41. Based on the current state and predicted disturbances Linearized system dynamics and constraints; S42. Construct a quadratic programming subproblem to solve for the optimal control increment. ; S43, Update Control Quantity ; S44. Apply the first element of the optimal control sequence to the actual system and continuously update the calculation of the next sampling point.
10. An energy management system for fuel cell hybrid ships based on improved speed prediction, characterized in that, include: The data acquisition module is used to collect historical data of the ship's navigation, including historical speed, lithium battery state of charge, and ship power requirements. The prediction module uses the Sparrow Search algorithm to globally optimize the hyperparameters of the Long Short-Term Memory network to obtain the optimal hyperparameter combination. Based on the optimal hyperparameter combination, a Long Short-Term Memory network ship speed prediction model is constructed. The historical ship speed, lithium battery state of charge and power demand sequence are input into the ship speed prediction model, and the predicted ship speed value in the future prediction time domain is output. The future power demand sequence is calculated based on the predicted ship speed value. The optimization decision module takes the future power demand sequence as the disturbance input of the model predictive control, and aims to minimize the sum of the equivalent hydrogen consumption cost and the fuel cell degradation cost. Under the premise of satisfying the system constraints, it solves the optimal power allocation sequence in the future finite time domain. The execution module executes the first control variable in the optimal power allocation sequence and triggers the prediction module and optimization decision module to perform rolling update calculations in the next sampling period.
