Hydrogen fuel cell optimization algorithm based on particle swarm optimization of integrated system

By dynamically adjusting the gain parameters of the PI controller using an integrated system particle swarm optimization algorithm, the problems of low fuel utilization and slow response speed of hydrogen fuel cells under dynamic loads are solved, achieving efficient operation and stability optimization of the fuel cell system.

CN121435697APending Publication Date: 2026-01-30BEIHANG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511523122.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Traditional hydrogen fuel cells have low fuel utilization and slow response speed under dynamic loads, and traditional PID control is prone to overshoot or oscillation under dynamic conditions. The optimization effect of the adaptive PSO algorithm gradually weakens in long-term operation.

Method used

By employing an integrated system particle swarm optimization approach, the gain parameters of the PI controller are optimized through dynamic adjustment of the inertia weight mechanism and multi-objective fitness function, thereby achieving real-time regulation of hydrogen and air flow and constructing a photovoltaic-fuel cell hybrid microgrid system.

Benefits of technology

This improved the fuel utilization rate and reaction rate of hydrogen fuel cells under dynamic load, solved the problems of efficiency fluctuation and slow response speed of fuel cells under dynamic load conditions, and achieved synergistic optimization of system stability and oxygen utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121435697A_ABST
    Figure CN121435697A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrogen fuel cell optimization algorithm based on particle swarm optimization of an integrated system, and belongs to the technical field of micro-grid energy management. An existing hydrogen fuel cell has the problems of low fuel utilization rate, slow response speed and the like under a dynamic load condition. In order to solve the problem, a hybrid energy system topology consisting of a photovoltaic (PV), a proton exchange membrane fuel cell (PEMFC), a lithium ion battery (BAT) and a super capacitor (SC) is constructed, and mathematical models, including a photovoltaic output power model, a fuel cell voltage model and a cell state-of-charge model, of all energy units are established. A PI controller is designed for a fuel cell, and a proportional gain KP and an integral gain KI of the fuel cell are dynamically adjusted through a particle swarm optimization (PSO) algorithm. Specifically, PI parameters are coded into particle position vectors, a multi-target fitness function is constructed, and hydrogen consumption, system stability and oxygen utilization rate are comprehensively considered; and a dynamically adjusted inertia weight mechanism is adopted to guide particle search, and iterative optimization is realized. After optimization, parameters are written into a PI controller in real time, and the hydrogen and air flow is accurately adjusted. Meanwhile, a continuous monitoring mechanism is introduced, when the photovoltaic power fluctuation exceeds 10%, re-optimization is automatically triggered, and closed-loop control is formed. The method improves the fuel utilization rate and the reaction rate of the fuel cell, is suitable for the dynamic load micro-grid, and improves the overall efficiency and stability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of fuel cell optimization, and specifically discloses a hydrogen fuel cell optimization algorithm based on integrated system particle swarm optimization (PSO). The present technology aims to solve the problems of low fuel utilization and slow response speed of traditional hydrogen fuel cells under dynamic load. The gain parameters of the PI controller are dynamically optimized by the PSO algorithm to adjust the hydrogen and air flow in real time. This method is particularly suitable for photovoltaic-fuel cell hybrid microgrid systems and provides technical support for the large-scale application of hydrogen energy systems. BACKGROUND

[0002] Hydrogen fuel cells, as a clean energy conversion device, have great potential in microgrid and transportation power fields, but still face technical bottlenecks in practical applications. Under dynamic load conditions, traditional fuel cell systems have large efficiency fluctuations and slow response speed, and the hydrogen utilization rate is usually less than 70%. In addition, traditional PID control is prone to overshoot or oscillation under dynamic conditions, while the adaptive PSO algorithm can achieve 18%-31% reduction in hydrogen consumption, but its optimization effect will gradually weaken in long-term operation due to the lack of performance degradation model.

[0003] The improved PSO algorithm of the present application solves the above problems of the prior art through innovative design. The algorithm uses a dynamically adjusted inertia weight mechanism to automatically balance the global exploration and local development capabilities during optimization, effectively avoiding premature convergence. At the same time, by constructing a multi-objective fitness function that integrates hydrogen consumption, system stability, and oxygen utilization, the algorithm achieves a coordinated optimization of comprehensive performance. SUMMARY

[0004] The present application aims to provide a hydrogen fuel cell optimization algorithm based on integrated system particle swarm optimization, which aims to improve the fuel utilization and reaction rate of hydrogen fuel cells under dynamic load. To achieve this goal, the present application proposes an intelligent control method based on particle swarm optimization (PSO), which dynamically adjusts the operation of hydrogen fuel cells by optimizing the parameters of the PI controller to adapt to the power fluctuations of the microgrid. The method includes the following key steps:

[0005] First, a hybrid energy system topology composed of photovoltaic (PV), proton exchange membrane fuel cell (PEMFC), lithium-ion battery (BAT), and supercapacitor (SC) is constructed, and mathematical models of each energy unit are established, including photovoltaic output power model, fuel cell voltage model, and battery state of charge (SOC) model. Second, a PI controller is designed for the fuel cell, with the control objective being to maintain the stability of the DC bus voltage and minimize hydrogen consumption. Then, the proportional gain

[0006] Kp and integral gain Ki are encoded as particle position vectors of particle swarm algorithm, and a multi-objective fitness function considering hydrogen consumption, system stability and oxygen utilization rate is constructed. Then, a dynamic inertia weight adjustment mechanism is used to guide the search of particles to balance the global exploration and local development ability, and the particle swarm algorithm is used to iteratively optimize the PI parameters. Finally, when the termination condition is met, the optimal parameters obtained are written into the PI controller in real time to realize accurate adjustment of hydrogen and air flow, thereby completing online optimization of microgrid energy management. When the system operating state changes, for example, the photovoltaic power fluctuation exceeds 10%, the algorithm will automatically trigger re-optimization to update the PI parameters, forming a closed-loop control of continuous monitoring and optimization

[0007] The purpose of the present application is to provide a hydrogen fuel cell optimization algorithm based on integrated system particle swarm optimization, aiming to improve the fuel utilization rate and reaction rate of traditional hydrogen fuel cells under dynamic load. The algorithm effectively solves the key problems of low fuel utilization rate and slow response speed of hydrogen fuel cells under dynamic load conditions by innovatively integrating a dynamic weight adjustment mechanism, a multi-objective fitness function, and a performance decay compensation model. In order to achieve the above purpose, the present application provides the following solutions:

[0008] Step one: Construct a microgrid structure model

[0009] A microgrid hybrid energy system topology composed of photovoltaic, proton exchange membrane fuel cell, lithium ion battery, and super capacitor is constructed to meet the basic energy supply demand for stable operation of the load. The system rated power can be 1MW, of which photovoltaic is 500kW, PEMFC is 200kW, BAT is 250kW, and SC is 50kW. The power of each component can be scaled synchronously by the same proportionality coefficient k>0k>0 to form a "capacity→parameter range" mapping.

[0010] The total output power of the system is:

[0011] P total (t)=P PV (t)+P FC (t)+P BAT (t)+P SC (t)-P Load (t) (1)

[0012] Where P total (t) is the net power supply of the system, P PV (t), P FC (t), P BAT (t), P SC (t) are the output powers of photovoltaic, fuel cell, battery and super capacitor respectively, and P Load (t) is the load power.

[0013] Step 2: Establishing photovoltaic array power generation model

[0014] Standard solar cell module is used and maximum power point tracking (MPPT) strategy is configured to achieve optimal power output.

[0015] The photovoltaic power expression is:

[0016]

[0017] Where P STC is the maximum power under standard test conditions, K T is the temperature coefficient, T cell is the current battery temperature, G is the solar irradiance, and G STC is the standard irradiance.

[0018] Step 3: Establishing PEMFC output power model and hydrogen flow calculation

[0019] The working mechanism of hydrogen fuel cell is modeled, and fuel flow, temperature, and pressure feedback control are introduced. The system includes gas supply, booster circuit, and converter module.

[0020] The fuel cell voltage is expressed by Nernst formula as:

[0021]

[0022] Where E 0 is the reversible voltage, R is the gas constant, T is the temperature, n is the electron exchange number, F is the Faraday constant, P , P

[0023] , and P are the partial pressures of hydrogen, oxygen, and water, respectively.

[0024] P FC (t) = P Load (t) - P PV (t) - P BAT (t) - P SC (t) (4)

[0025] Calculate the hydrogen flow, which directly uses P PV (t) obtained in step 2, to achieve the coupling of PV output and hydrogen consumption demand.

[0026] Step 4: Building lithium battery and supercapacitor energy storage unit model

[0027] a) Lithium battery dynamic charging and discharging model: Set the self-discharge coefficient and charging and discharging efficiency.

[0028] The battery state of charge update model is:

[0029]

[0030] where SOC BAT is the battery state of charge, σ is the self-discharge rate, η BAT is the charge-discharge efficiency, C BAT is the capacity, η inv is the inverter efficiency, P in (t) is the battery power, P out (t) is the battery power.

[0031] b) Super-capacitor energy storage unit model: simulating its instantaneous charge-discharge characteristics for dynamic power support.

[0032] The super-capacitor energy storage energy is:

[0033] E SC (t) = (1 / 2) x C t x [V(t)] 2 (6)

[0034] where C t is the capacitance capacity, V(t) is the capacitor terminal voltage.

[0035] Step five: design PI controller and optimization target

[0036] Configure PI controllers for the key control paths of the fuel cell, including the boost converter voltage loop, the inverter current inner loop, and the fuel cell flow loop. Encode the proportional gain (Kp) and integral gain (Ki) of these PI controllers as particle position vectors in the particle swarm algorithm.

[0037] General expression of PI controller:

[0038]

[0039] where e(t) is the error between the target and the current value, K P is the proportional coefficient, K I is the integral coefficient.

[0040] The K PI is a six-dimensional particle vector:

[0041] K PI = [K pv , K iv , K pi , K ii , K pf , K if ] (8)

[0042] This six-dimensional gain vector is the variable to be optimized for the fitness function F, forming a "structure → evaluation" closed loop.

[0043] Step six: build multi-objective fitness function

[0044] A multi-objective fitness function J is built, which comprehensively considers the hydrogen consumption rate, fuel utilization rate, oxygen utilization rate, output power error and frequency fluctuation, etc.

[0045] Fitness function expression:

[0046]

[0047] where ΔP is the output power error, is the hydrogen consumption rate, and is the oxygen and hydrogen utilization rate, and Δf is the frequency fluctuation. α, β, γ, λ, δ are weighting coefficients, the sum of which is 1, which can be adjusted according to the scene and form an "evaluation→algorithm" input dependence. The weight can be adjusted according to the scene.

[0048] Step seven: adopt improved particle swarm optimization algorithm to iteratively optimize PI parameters

[0049] a) Particle initialization: particle dimension d = 6, corresponding to each particle carrying a six-dimensional vector K PI . The particle swarm size is set to 50.

[0050] b) Introduce a fusion dynamic weight adjustment mechanism: use a time function to adjust the inertia factor w in particle swarm optimization, realize the dynamic transition from global to local convergence in search.

[0051] Linearly decreasing inertia weight w(t) expression:

[0052]

[0053] where w max is the maximum inertia factor (initial value 0.9), w min is the minimum inertia factor (0.4), tt is the current iteration step, T max is the maximum iteration number (set to 40). Through this formula, the balance between global exploration and local development of particles is realized, and finally the optimal gain combination is converged.

[0054] c) Particle update rule:

[0055] v i (t+1)=w(t)×v i (t)+c1×r1×[P best -x i (t)]+c2×r2×[G best -x i (t)] (11)

[0056] x i (t+1) = x i (t) + v i (t+1) (12)

[0057] where vi(t) is the velocity of the ith particle in the tth dimension; xi(t) is the particle position (corresponding to the PI gain candidate value); Pbest is the individual best position; Gbest is the global best position; r1, r2 ∈ [0, 1] are uniform random numbers; c1, c2 are cognitive / social factors (set to 1.5).

[0058] d) termination condition:

[0059] All particles are evaluated according to the fitness function of formula (9), and the individual best and global best positions are updated according to the current fitness, completing each iteration. The iteration process is until the termination criterion is met:

[0060] |F g -F g-1 | < 0.1% for 10 consecutive generations or g ≥ T max (13)

[0061] where F g is the fitness value of the gth generation, or the maximum number of iterations reaches 40 times. The solution according to the updating formula in claim 5 will determine the termination criterion of the present claim, forming an “update → termination” chain.

[0062] The optimal gain combination (KP*, KI*) is finally obtained.

[0063] Step eight: system integration and real-time control (corresponding to S7 in claim 1)

[0064] The optimal gain combination (KP*, KI*) is written into the PI controller in real time, completing the online optimization of microgrid energy management. The optimal PI parameters are modulated by PWM to drive the fuel cell hydrogen flow regulating valve, bidirectional DC / DC power switch and three-phase inverter IGBT module. The generation of the driving signal depends on the optimal gain output by claim 6, forming a “result → hardware closed loop”; and the optimal gain (Kp, Ki) output by the termination criterion in claim 6 is directly used for PWM modulation, realizing the “termination → execution” result landing.

[0065] Step nine: continuous monitoring and re-optimization

[0066] If the load mutation or photovoltaic fluctuation exceeds the preset threshold (for example, photovoltaic fluctuation > 10%) or the system running time reaches the preset period, return to step six to trigger re-optimization, update the PI parameters, and form a closed-loop optimization. If the system stops, the process ends. BRIEF DESCRIPTION OF DRAWINGS

[0067] Figure 1 is the optimization flowchart provided by the present application;

[0068] Specific implementation cases

[0069] The specific implementation method of the present application includes two main parts of system modeling and PI controller design based on particle swarm optimization (PSO), aiming to realize the optimization of the hybrid energy microgrid system by accurately controlling the operation of the hydrogen fuel cell.

[0070] Step A: Constructing a hybrid energy system topology PV+PEMFC+BAT+SC

[0071] First, a microgrid hybrid energy system topology composed of photovoltaic (PV), proton exchange membrane fuel cell (PEMFC), lithium ion battery (BAT), and super capacitor (EDLC / SC) is constructed. The rated power of the system is 1 MW, of which PV is 500 kW, PEMFC is 200 kW, BAT is 250 kW, and SC is 50 kW. The power of each component can be scaled synchronously by the same proportionality coefficient k. The total output power P total (t) is described by the following formula:

[0072] P total (t) = P PV (t) + P FC (t) + P BAT (t) + P SC (t) - P Load (t)

[0073] Step B: Establishing mathematical models of each component PV / PEMFC / BAT / SC

[0074] The standard solar cell component is adopted and the maximum power point tracking (MPPT) strategy is configured, and the photovoltaic power expression is:

[0075] P PV (t) = P STC × [1 + K T × (T cell - T STC )] × (G / G STC )

[0076] Where, P STC is the maximum power under standard test conditions, KT T is the temperature coefficient, T cell is the current battery temperature, G is the solar irradiance, G STC is the standard irradiance. In one implementation, P STC is 500 kW, K T is -0.0037 / °, T STC is 25°, G STC is 1000 W / m 2 .

[0077] The fuel cell voltage is expressed using the Nernst equation:

[0078]

[0079] where E 0 is the standard potential, R is the gas constant, T is the temperature, n is the number of electrons transferred, F is the Faraday constant, P H2 , P O2 , P H2O are the partial pressures of hydrogen, oxygen, and water vapor, respectively. The hydrogen flow rate is calculated using the power balance equation P FC (t) = P Load (t) - P PV (t) - P BAT (t) - P SC (t). In one implementation, E 0 is 1.229 V and n is 2.

[0080] The lithium battery state of charge (SOC BAT ) update model is:

[0081] SOC BAT (t) = SOC BAT (t - 1) x (1 - σ) + [(P in (t) - P out (t)) / η inv ] x η BAT x Δt / C BAT

[0082] where σ is the self-discharge rate, η inv is the inverter efficiency, η BAT is the battery efficiency, Δt is the time step, and C BAT is the battery capacity. In one implementation, σ is 0.01% / h, η BAT is 0.95, and C BAT is 250 kWh.

[0083] The supercapacitor energy storage energy E SC (t) is:

[0084] E SC (t) = (1 / 2) x C t x [V(t)] 2

[0085] where C t is the capacitance value and V(t) is the voltage. In one implementation, C t is set to 100 F and the initial V is set to 270 V.

[0086] Step C: Designing three closed-loop PI controller voltage loop / current loop / fuel flow loop

[0087] Three closed-loop PI controllers are configured for the key control paths of the fuel cell, including the voltage loop, the current loop, and the fuel flow loop. The six gain parameters of the PI controller are encoded as a six-dimensional particle vector K PI , i.e., K PI = [K pv , K iv , K pi , K ii , K pf , K if ]. In one implementation, the initial K pv is set to 0.5 and the initial K iv is set to 10.

[0088] Step D: Building a multi-objective fitness function

[0089] A multi-objective fitness function J is built, and its expression is as follows:

[0090]

[0091] In one implementation, the weighting coefficients a, b, g, l, d are 1.0, 0.6, 0.3, 0.1, and 0.2, respectively.

[0092] Step E: Improving the particle swarm algorithm to optimize the PI parameters and velocity update

[0093] The algorithm sets the particle dimension d to 6, corresponding to each particle carrying a six-dimensional gain vector K PI , and the particle swarm size is set to 50. The algorithm introduces a dynamic weight adjustment mechanism, and the inertia factor w(t) decreases linearly with the iteration step t, and its formula is as follows:

[0094] w(t) = w max - [(w max - w min ) x t / T max ]

[0095] where w max is 0.9, w min is 0.4, and Tmax For 40 times. Cognitive / social factors c1, c2 are set to 1.5. Iterate until the termination criterion is met, for example, F g -F g-1 <0.1% for 10 generations or a maximum of 40 iterations.

[0096] Sub-step E1: Not meet the convergence condition, return to this step to continue iterative optimization.

[0097] Sub-step E2: Meet the termination condition.

[0098] Sub-step E3: Output the optimal PI parameters And

[0099] Step F: Online introduction of PI controller, real-time supervision and management

[0100] In the performance verification in the 0.85MW microgrid, these optimal parameters are written into the PI controller in real time to realize accurate regulation of fuel cell hydrogen and air flow. Continuous monitoring of system operation state, including power deviation, hydrogen consumption, oxygen utilization rate and frequency fluctuation and other performance indicators, and deviation quantification.

[0101] Sub-step F1: Continuous operation, return to step E to trigger re-optimization, form a closed loop.

[0102] Sub-step F2: Hold the operation, judge whether the system operation state meets the termination condition (such as whether the photovoltaic power fluctuation exceeds 10%). If so, stop.

Claims

1. A hydrogen fuel cell optimization algorithm based on integrated system particle swarm optimization, characterized by the following steps: S1: Construct a micro-grid hybrid energy system topology composed of photovoltaics (PV), proton exchange membrane fuel cells (PEMFC), lithium-ion batteries BAT, and EDLC supercapacitors SC; S2: Establish a PV model to obtain real-time PV output power through formula 1 S3: Establish a PEMFC output power model, formula 2 And through the power balance equation: The hydrogen flow rate is calculated, using the P from step 2 directly in this equation Pv (t), achieving coupling of the PV output to the hydrogen demand. S4 builds a proportional-integral (PI) controller model, and sets the proportional gain K p and the integral gain K i encoding as a particle position vector in the particle swarm algorithm: K PI = [K pv K iv K pi K ii K pf K if ] T S5: Construct a multi-objective fitness function F = w1AH2+ w2AFuel+ w3Af + w4P grid wherein deviation of hydrogen consumption, P grid (t) = P Load (t) - P PV (t) - P FC (t) - P BAT (t) - P SC (t) Adjust the grid exchange power, where the weights w1+w2+w3+w4=1 can be adjusted according to the scenario; S6: Use the improved particle swarm optimization algorithm to iteratively optimize the PI controller parameters v ij (t+1) = w(t)v ij (t) + c1r1(P best,ij -x ij (t)) + c2r2(G best,j -x ij (t)) x ij (t+1) = x ij (t) + v ij (t+1) Until the termination criterion is met: obtaining an optimal gain combination (K p *,K i *) S7: Write the optimal gain combination into the PI controller in real time to complete the online optimization of micro-grid energy management; S8: Continuously monitor the system operating state, if continue to run, return to step 6 to trigger re-optimization, forming a closed loop; if the system stops, the process ends.

2. The optimization algorithm of claim 1, wherein The system rated power is 1MW, including PV 500kW, PEMFC 200kW, BAT 250kW, SC 50kW corresponding to the formula: P total = k (500 + 200 + 250 + 50) kW Where k>0 is the proportionality coefficient, the power of each component is scaled synchronously according to the same k value, and the k value mainly determines whether the PI gain interval in the optimization algorithm and the fitness weight in the fitness function need to be retuned, thereby forming a "capacity→parameter range" mapping.

3. The optimization algorithm of claim 1, wherein The designed PI controller includes: Boost converter voltage loop Inverter current inner loop Fuel cell flow ring where K PI is the six-dimensional particle vector corresponding to the formula: K PI = [K pv K iv K pi K ii K pf K if ] T Six-dimensional gain vector fitness function F to be optimized, forming a "structure→evaluation" closed loop.

4. The optimization algorithm according to claim 1, wherein The six-dimensional gain vector mentioned in claim 3 is used as the variable to be optimized in the fitness function F, forming the fitness function expression: F = w1AH2+ w2AFuel+ w3Af + w4P grid Where the sum of the weight coefficients w1+w2+w3+w4 is 1, which can be adjusted according to the scenario and form an "evaluation→algorithm" input dependency.

5. The optimization algorithm of claim 1, wherein The particle swarm velocity is updated by calling the F fitness in claim 4, and the expression is: v ij (t+1) = w(t)v ij (t) + c1r1(P best,ij -x ij (t)) + c2r2(G best,j -x ij (t)) where v ij (t) is the velocity of the ith particle in the jth dimension; x ij (t) is the position of the particle (corresponding to the PI gain candidate value) is solved by multiplying the product of the ci, c2learning factors with the uniform random numbers r1, r2∈[0, 1] and the sum of the individual historical best and global best values to update the velocity; where w is the linearly decreasing inertial weight ( t ) may be expressed as: Through formula, the global exploration and local development of particles are balanced, and finally converge to the optimal gain combination.

6. The optimization algorithm of claim 1, wherein The particle swarm iterative optimization process satisfies: The particle dimension d=2, corresponding to a two-dimensional vector carried by each particle; x i = [K p , K i ] T i.e. only the proportional gain K p is optimized; and the integral gain K i is set to zero. maximum number of iterations T max is 40; According to the iterative formula in claim 1: x ij (t+1) = x ij (t) + v ij (t+1) Convergence criterion: where F g is the gth generation fitness value, which is determined according to the update formula in claim 5, and will determine the termination criterion of the present claim, constituting the "update→termination" chain.

7. The optimization algorithm of claim 1, wherein The optimal PI parameters are modulated by PWM to drive: Fuel cell hydrogen flow regulating valve; Bidirectional DC / DC power switch; Three-phase inverter IGBT module; Corresponding formula: Where the generation of the drive signal depends on the optimal gain output by claim 6, forming a "result→hardware closed loop"; And the optimal gain (K p ,K i ) output after the termination criterion trigger in claim 6 is directly used for PWM modulation, realizing the landing of "termination→execution" result.

Citation Information

Cited By

  • Method and device for improving power generation efficiency of battery powered by hydrogen and ammonia, equipment and medium

    CN121839768A