Photovoltaic hydrogen production system energy management method based on double-layer fuzzy logic control
By optimizing the energy management of the photovoltaic hydrogen production system through dual-layer fuzzy logic control and whale optimization algorithm, the problems of dynamic mismatch and equipment life loss caused by fluctuations in the photovoltaic hydrogen production system are solved, and efficient energy management and equipment life extension are achieved.
Patent Information
- Application Number
- CN202510729501.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-10-17
AI Technical Summary
Existing photovoltaic hydrogen production systems suffer from dynamic mismatch and equipment lifespan loss due to the intermittency of renewable energy and the nonlinear characteristics of electrolyzers. Existing energy management methods are difficult to dynamically adapt to fluctuations while balancing efficiency and lifespan.
An energy management method based on two-layer fuzzy logic control is adopted, which combines mathematical models of photovoltaic, PEM electrolyzer, lithium battery and system hydrogen production economic model. The FLC parameters are optimized by two-layer fuzzy logic control strategy and whale optimization algorithm to achieve reasonable allocation of photovoltaic power generation and reduce the impact of fluctuation on electrolyzer life.
In different photovoltaic power generation scenarios, the system ensures the economic efficiency of hydrogen production systems and the lifespan of PEM electrolyzers, dynamically adapts to fluctuations in photovoltaic power generation, improves hydrogen production efficiency, and extends the lifespan of electrolyzer equipment.
Smart Images

Figure CN120810697A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of renewable energy hydrogen production, and particularly relates to a photovoltaic hydrogen production system energy management method based on double-layer fuzzy logic control. BACKGROUND
[0002] Today's society is facing many energy challenges, such as the depletion of fossil energy, the increasing of carbon emissions and the dramatic changes in climate, which affect the exploitation and utilization of resources and other issues. In order to further realize sustainable development, large-scale use of renewable clean energy is an important direction. However, due to the intermittency and volatility of renewable energy, its power generation needs to be stored and transferred, so finding an efficient, economical and environmentally friendly energy storage technology is the key to the development of renewable energy. Hydrogen, as a clean and efficient emerging energy storage carrier, has the advantages of high energy density and large storage capacity, and is currently widely studied.
[0003] In existing hydrogen production and storage research, photovoltaic hydrogen production systems based on electrolytic cell technology are mainly focused on. However, the strong intermittency of renewable energy (such as photovoltaic power minute-level fluctuation up to 30% of the rated value) and the nonlinear electrochemical characteristics of electrolytic cell (such as the current density-overpotential curve showing an exponential relationship) lead to dynamic mismatch and equipment life loss problems. Among them, dynamic mismatch is due to the difficulty of real-time matching of wind and light output fluctuation and the best efficiency interval of electrolytic cell (usually 60%~80% of rated power), resulting in a decrease in hydrogen production efficiency. Equipment life loss is mainly caused by frequent current step changes (>10% rated current / min) that accelerate the chemical decay of proton exchange membranes (when the current fluctuation amplitude increases by 50%, the membrane life is shortened by about 40%).
[0004] Therefore, in order to solve the above problems, it is necessary to study a reasonable energy management method for photovoltaic hydrogen production system (photovoltaic hydrogen production system structure as shown in Figure 1 Existing research mainly includes rule-based and optimization-based methods. Rule-based methods are deterministic rule strategies that do not require complex calculations and algorithms, but are only suitable for fixed application scenarios. Optimization-based methods can adapt to different working conditions and seasonal changes, but are prone to local optimization, and their optimization effect on high-dimensional parameter space (>20 dimensions) is poor. In addition, as shown in Figure 3 Single fuzzy logic control is also applied to energy management, but existing research shows that the rules of FLC are mainly based on typical working conditions, and can only cover 68% of the working conditions in actual wind and light power generation operation.
[0005] In summary, there is an urgent need for an energy management method that can dynamically adapt to renewable energy fluctuations and balance efficiency and equipment life to break through the current technical bottleneck. SUMMARY
[0006] In view of the above problems, the present application provides a photovoltaic hydrogen production system energy management method based on double-layer fuzzy logic control.
[0007] The present application combines photovoltaic, PEM electrolyzer, lithium battery mathematical model, electrolyzer life degradation model and system hydrogen production economic model to establish a double-layer fuzzy logic control FLC strategy. The upper FLC takes the average photovoltaic power per hour and the lithium battery SOE at the end of each hour as input, and outputs the upper hourly PEM electrolyzer power. The lower FLC takes the average photovoltaic power per 10 minutes, the error of the average photovoltaic power per hour of the upper layer, and the lithium battery SOE at the end of each 10 minutes as input, and outputs the final minute-scale PEM electrolyzer power. In addition, compared with the fixed FLC rule base, the present application optimizes the FLC parameters of the upper and lower layers based on the operating condition data of the whole year simulation using the whale optimization algorithm WOA optimization algorithm. A double-layer FLC strategy optimization framework is formed to improve the economic efficiency of the photovoltaic hydrogen production system and reduce the life degradation of the PEM electrolyzer. The specific steps are as follows: Step 1: photovoltaic power modeling.
[0008] Step 1.1: considering the influence of environmental temperature and irradiance on the temperature of photovoltaic cells, a temperature model of photovoltaic cells is established, which is specifically: Wherein, is the current temperature of the photovoltaic cell, is the current environmental temperature, is the current solar irradiance, and represent the environmental temperature and solar irradiance data obtained under normal working conditions, respectively. is the temperature of the photovoltaic cell under normal working conditions.
[0009] Step 1.2: combining the temperature change of the photovoltaic cell, the actual photovoltaic module power under actual lighting conditions is calculated by the photovoltaic power under standard test conditions: Wherein, is the current photovoltaic power, is the rated power of the photovoltaic cell, and are the solar irradiance and environmental temperature under standard test conditions, respectively, is the temperature coefficient.
[0010] Step 2: PEM electrolyzer modeling.
[0011] Step 2.1: Voltage Consideration The open-circuit voltage, activation overpotential, ohmic overpotential, and concentration overpotential are considered to establish a mathematical model of the electrolyzer output power and current density, voltage. Specifically: wherein, P is the power of the PEM electrolyzer, I is the current of the electrolyzer, and represent the open-circuit voltage, activation overpotential, ohmic overpotential, and concentration overpotential, respectively.
[0012] wherein, P is the power of the PEM electrolyzer, and represent the hydrogen pressure on the cathode side, oxygen pressure on the anode side, and water pressure caused by gas permeation, and represent the activity and concentration of the components i , respectively, j and represent the current density and exchange current density, respectively, and are the membrane thickness and impedance, respectively. R is the ideal gas constant, T is the electrolyzer temperature, F is the Faraday constant, and Z is a constant.
[0013] Step 2.2: Establish the relationship between the electrolyzer input power and the hydrogen mass flow rate, specifically: wherein, is the heating value of hydrogen. is the hydrogen mass flow rate, is the power of the electrolyzer, is the hydrogen production efficiency of the electrolyzer.
[0014] Step 2.3: Combine the hydrogen production efficiency curve of the electrolyzer to establish the electrolyzer hydrogen production output model under different powers, specifically: wherein, is the voltage efficiency, is the Faraday efficiency.
[0015] Further, wherein, is the density of hydrogen.
[0016] Step 2.4: Establish the degradation model of the electrolyzer under fluctuating power, specifically: where, is the degradation rate of the electrolyzer, is the measured constant of the electrolyzer life degradation, is the coefficient, is the measured maximum constant of the electrolyzer life degradation, is the measured coefficient, is the rated power of the electrolyzer, is the fluctuation value of the electrolyzer input power, which is further calculated as: where is the power difference between the previous time and the current time of the electrolyzer.
[0017] Step 3: DC / DC converter modeling.
[0018] Step 3.1: Determine the converter efficiency under different input powers, specifically: where, is the charge and discharge power of the battery, and are the efficiencies of the one-way and two-way DC / DC converters, respectively, is the input power of the electrolyzer.
[0019] Step 4: Battery modeling.
[0020] Step 4.1: Determine the charge and discharge depth and efficiency of the battery, specifically: where, is the charge depth of the battery, is the discharge depth of the battery.
[0021] Step 4.2: Establish the SOE model of the battery under different charge and discharge powers, specifically: where, is the lower limit of the battery SOE, is the SOE value at the current k time, is the charge and discharge efficiency of the battery, is the capacity of the battery, is the charge and discharge duration of the battery.
[0022] Step 5: Establish the energy management strategy based on the FLC structure.
[0023] Step 5.1: Determine the input and output of the upper and lower FLCs, specifically for the upper layer: where, is the upper FLC fuzzy logic strategy, and are the inputs of the upper FLC; is the output of the upper FLC, i.e., the upper power of the PEM electrolyzer.
[0024] Similarly, the lower layer is: where, is the lower FLC fuzzy logic strategy, and are the inputs of the lower FLC, is the output of the lower FLC, i.e., the lower power of the PEM electrolyzer.
[0025] Step 5.2: Design the parameters to be optimized and the logic rules of the upper and lower FLCs.
[0026] Establish the upper rule base, divide into 4 intervals, divide into 3 intervals, into 4 intervals, and then establish the fuzzy rule mapping library.
[0027] Establish the lower rule base, divide into 4 intervals, divide into 3 intervals, into 4 intervals, and then establish the fuzzy rule mapping library.
[0028] Step 5.3: Design the objective function by combining the hydrogen production economy and the PEM electrolyzer life degradation, which is: where, is the hydrogen production revenue, is the cost increase caused by electrolyzer life degradation; further calculate: Step 6: Based on the double-layer FLC structure, combine the whale optimization WOA algorithm to search for the optimal FLC parameters and logic rules to obtain the best energy management strategy.
[0029] Step 6.1: Use the WOA algorithm, take the parameters to be optimized and the logic rules of the upper and lower FLCs as optimization variables, combine the designed objective function, and obtain the final parameters through iterative convergence; specifically: (1) Prey target The hunting strategy takes the position of the current optimal individual as the target position, and the population explores the surrounding area while moving towards the target through the movement strategy, assuming is the position of the current best solution, and the encircling behavior of whales is expressed as: wherein, represents the position of the whale with the current best fitness, and represents the position of the whale at the current iteration; the coefficient A and C are calculated by: wherein, and are random numbers in the interval (0, 1), and the value of gradually decreases from 2 to 0.
[0030] (2) Spiral approximation During the hunting process, the whale will adopt a spiral action to approach the prey, and its position is more expressed as: wherein, represents the distance between the whale and the prey, and is in the interval [-1, 1]; when the whale rotates around the prey, it will also continuously reduce the radius of the circle, so the probabilities and are set as the basis for selecting the shrinking encircling mechanism and the spiral model to update the position of the whale: wherein, is a random number between [0, 1], and here, the value of is set to 0.5.
[0031] (3) Predatory behavior The whale optimization algorithm adopts a random walk and exploration strategy during the hunting process, and each whale will calculate a new position vector according to its current position vector and movement step, and then move accordingly; this process is expressed as: wherein, represents a random whale position; when , a whale is randomly selected, and the positions of other whales are updated to increase the randomness of exploration in the hope of finding a better prey; by increasing the search ability of the algorithm, the WOA algorithm can explore the global optimal solution.
[0032] The beneficial technical effects of the present application are: The present application considers that in a photovoltaic hydrogen production system, the solar irradiance intensity will randomly change, resulting in fluctuations and intermittency of photovoltaic power generation. Therefore, under this condition, it is extremely important to adopt a reasonable energy management strategy to reduce the impact of fluctuating power on the life degradation of electrolytic cells, while ensuring the economy of the entire hydrogen production system. The present application proposes a double-layer FLC energy management strategy. The upper layer is based on the hourly scale of photovoltaic power generation and the SOE output PEM hourly scale power. When the minute scale of photovoltaic power generation fluctuates sharply, the lower layer is based on the current minute scale of photovoltaic power generation and the SOE output PEM minute scale power. In order to obtain the best FLC fuzzy logic rules, the present application takes the rule base and parameters in the double-layer FLC as optimization parameters, takes economy and life degradation as objective functions, and uses whale optimization WOA algorithm to search for the best FLC parameters and rule base. Finally, under different photovoltaic power generation scenarios, the energy management strategy can ensure the economy and life of the hydrogen production system. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 It is a schematic diagram of the topology structure of the photovoltaic hydrogen production system.
[0034] Figure 2 It is a schematic diagram of the hydrogen production efficiency curve of the proton exchange membrane electrolytic cell.
[0035] Figure 3 It is a schematic diagram of the single-layer FLC strategy.
[0036] Figure 4 It is a schematic diagram of the execution process of the double-layer FLC strategy.
[0037] Figure 5 It is a schematic diagram of the whale optimization algorithm.
[0038] Figure 6 It is a schematic block diagram of the whale optimization algorithm process.
[0039] Figure 7 It is a schematic diagram of the power allocation result under the whole year simulation time length.
[0040] Figure 8 It is a schematic diagram of the battery SOE result under the whole year simulation time length.
[0041] Figure 9 It is a schematic diagram of the power allocation result interval.
[0042] Figure 10 It is a schematic diagram of the battery SOE result interval. DETAILED DESCRIPTION
[0043] The present application will be further described in detail below in combination with the drawings and specific implementation methods.
[0044] The application discloses a photovoltaic hydrogen production system energy management method based on double-layer fuzzy logic control. Figure 4 As shown in the figure, the power is reasonably distributed by adopting a double-layer FLC strategy to maximize the hydrogen production amount and reduce the influence of photovoltaic power on the life decline of the PEM electrolytic cell. Figure 5 As shown in the figure), the WOA optimization algorithm is adopted to optimize the parameters and rule base of the upper and lower FLCs. The specific steps are as follows: Step 1: photovoltaic power modeling.
[0045] Step 1.1: considering the influence of environmental temperature and irradiance on the temperature of the photovoltaic cell, a temperature model of the photovoltaic cell is established, and the specific model is as follows: Wherein, is the current temperature of the photovoltaic cell, is the current environmental temperature, is the current solar irradiance, and respectively represent the environmental temperature and solar irradiance data obtained under normal working conditions. is the temperature of the photovoltaic cell under normal working conditions.
[0046] Step 1.2: combining the temperature change of the photovoltaic cell, the actual photovoltaic module power under actual light conditions is calculated by the standard test condition photovoltaic power: Wherein, is the current photovoltaic power, is the rated power of the photovoltaic cell, and respectively are the solar irradiance and environmental temperature under standard test conditions, is the temperature coefficient.
[0047] Step 2: PEM electrolytic cell modeling.
[0048] Step 2.1: considering the open circuit voltage, activation overpotential, ohmic overpotential and concentration overpotential, a mathematical model of the electrolytic cell output power and current density, voltage is established. The specific model is as follows: Wherein, is the power of the PEM electrolytic cell, is the current of the electrolytic cell, and respectively represent open-circuit voltage, activation overpotential, ohmic overpotential, and concentration overpotential.
[0049] wherein, , and respectively represent hydrogen pressure at the cathode side, oxygen pressure at the anode side, and water pressure caused by gas permeation, and respectively represent activity and concentration of component i , j and respectively represent current density and exchange current density, and are film thickness and impedance, respectively. R is the ideal gas constant, T is the electrolyzer temperature, F is the Faraday constant, and Z is a constant 2.
[0050] Step 2.2: Establish the relationship between electrolyzer input power and hydrogen mass flow, specifically: wherein, is the calorific value of hydrogen; is the hydrogen mass flow, is the power of the electrolyzer, is the hydrogen production efficiency of the electrolyzer, as shown in Figure 2 .
[0051] Step 2.3: Combine the hydrogen production efficiency curve of the electrolyzer to establish the electrolyzer hydrogen production output model under different powers, specifically: wherein, is the voltage efficiency, is the Faraday efficiency.
[0052] Further, wherein, is the density of hydrogen.
[0053] Step 2.4: Establish the degradation model of the electrolyzer under fluctuating power, specifically: wherein, is the degradation rate of the electrolyzer, is the measured constant of electrolyzer life reduction, is the coefficient, is the measured maximum constant of electrolyzer life degradation, is the measured coefficient, P is the rated power of the electrolyzer, is the fluctuation value of the input power of the electrolyzer, which is further calculated as: wherein is the power difference between the previous time and the current time of the electrolyzer.
[0054] Step 3: DC / DC converter modeling.
[0055] Step 3.1: Determine the converter efficiency under different input powers, specifically: wherein, is the charging and discharging power of the battery, and are the efficiencies of the unidirectional and bidirectional DC / DC converters, respectively; is the input power of the electrolyzer.
[0056] Step 4: Battery modeling.
[0057] Step 4.1: Determine the charging and discharging depth and efficiency of the battery, specifically: wherein, is the charging depth of the battery, is the discharging depth of the battery.
[0058] Step 4.2: Establish the SOE model of the battery under different charging and discharging powers, specifically: wherein, is the lower limit of the SOE of the battery, is the SOE value at the current k time, is the charging and discharging efficiency of the battery, is the capacity of the battery, is the charging and discharging duration of the battery.
[0059] Step 5: Establish the energy management strategy based on the FLC structure.
[0060] Step 5.1: Determine the input and output of the upper and lower FLCs, specifically for the upper FLC: wherein, is the fuzzy logic strategy of the upper FLC, and are the inputs of the upper FLC; is the output of the upper FLC, i.e., the upper power of the PEM electrolyzer.
[0061] Similarly, the lower layer is: wherein, is the lower FLC fuzzy logic strategy, and is the input of the lower FLC, is the output of the lower FLC, i.e. the lower power of the PEM electrolyzer.
[0062] Step 5.2: Design the parameters to be optimized and the logic rules of the upper and lower FLCs.
[0063] Establish the upper rule base, specifically: wherein, is divided into 4 intervals, is divided into 3 intervals, is divided into 4 intervals, and a fuzzy rule mapping library is established, specifically: Establish the lower rule base, specifically: wherein, is divided into 4 intervals, is divided into 3 intervals, is divided into 4 intervals, and a fuzzy rule mapping library is established, specifically: Step 5.3: Design the objective function by combining the hydrogen production economy and the electrolyzer life degradation, specifically: wherein, is the hydrogen production revenue, is the cost increase caused by electrolyzer life degradation; further calculate: Step 6: Based on the double-layer FLC structure, combine the whale optimization WOA algorithm to search for the optimal FLC parameters and logic rules to obtain the best energy management strategy.
[0064] Step 6.1: Use the WOA algorithm, take the parameters to be optimized and the logic rules of the upper and lower FLCs as optimization variables, combine the designed objective function, and obtain the final parameters through iterative convergence; the process is shown in Figure 6 , specifically: (1) Phagocytosis target The hunting strategy takes the position of the current optimal individual as the target position, and the population explores the surrounding area while approaching the target through the movement strategy, assuming is the position of the current best solution, and the encircling behavior of whales is expressed as: wherein, is the position of the whale with the current best fitness, and is the position of the whale at the current iteration; the coefficients A and C are calculated by: wherein, and are random numbers in the interval (0, 1), and decreases gradually from 2 to 0.
[0065] (2) Spiral approximation During the hunting process, whales use spiral movements to approach prey, and the position is expressed as: wherein, is the distance between the whale and the prey, and is in the interval [-1, 1]; when the whale rotates around the prey, it also continuously reduces the radius of the circle, so the probabilities and are set as the basis for selecting the shrinking encircling mechanism and the spiral model to update the whale position: wherein, is a random number in the range [0, 1], and here, is set to 0.5.
[0066] (3) Predatory behavior The whale optimization algorithm uses random walking and exploration strategies during the hunting process. Each whale calculates a new position vector based on its current position vector and movement step, and then moves accordingly. This process is expressed as: wherein, is a random whale position; when , a whale is randomly selected, and the positions of other whales are updated to increase the randomness of exploration in the hope of finding better prey. By increasing the search ability of the algorithm, the WOA algorithm can explore the global optimal solution.
[0067] Step 7: Simulation of the example and analysis of the results Step 7.1: To verify the effectiveness of the proposed dual-layer fuzzy logic control (FLC) energy management method, simulation experiments were conducted based on the annual photovoltaic power generation data (irradiance and ambient temperature). The simulation parameters are as follows: the rated power of the photovoltaic system is 120 kW, the rated power of the PEM electrolyzer is 70 kW, and the battery capacity is 80 kWh.
[0068] Step 7.2: Figure 7 The time series results of the annual power distribution are shown.
[0069] Photovoltaic power: presents obvious day-night fluctuations and seasonal changes, with a peak power of 120 kW and a near-zero power at night. Electrolyzer power: regulated by dual-layer FLC, it is stable at 60 kW (optimal efficiency interval) most of the time, and only temporarily exceeds the limit during extreme fluctuations. Lithium battery power: charges when photovoltaic power is excessive (positive peak) and discharges when it is insufficient (negative peak), effectively smoothing fluctuations.
[0070] Step 7.3: Figure 8 The annual variation curve of the lithium battery SOE is shown. The SOE is always maintained within the safe range of 0.2-0.8 (corresponding to 20%-80% capacity), with no risk of overcharging / overdischarging. And during the photovoltaic sudden drop period (such as around 4200 h), the SOE supports the electrolyzer demand through rapid discharge (curve steep drop).
[0071] Step 7.4: Figure 9 The local graph of the power distribution interval is shown, focusing on the power distribution details of 2982-2994 h. Electrolyzer power: dynamically adjusted by the lower layer FLC on a 10-minute scale. The charge and discharge power is real-time matched with photovoltaic fluctuations, verifying the rapid adjustment capability of the lower layer FLC.
[0072] Step 7.5: Figure 10 The SOE results in 2982-2994 h are shown. The SOE variation curve has no abrupt changes, indicating that the charge and discharge strategy avoids drastic switching. Moreover, the SOE is stable at 0.75-0.85 (75%-85%), close to the upper limit but not exceeding it, reflecting the economic preference of the strategy. The SOE control takes into account the availability of energy storage and system efficiency.
Claims
1. A photovoltaic hydrogen production system energy management method based on double-layer fuzzy logic control, characterized in that: The photovoltaic power generation power is calculated by collecting solar irradiation intensity data, and the photovoltaic power generation power data for the whole year is obtained. Combined with the battery model and the PEM electrolyzer model, a two-layer FLC strategy is used to reasonably allocate power to maximize hydrogen production while reducing the impact of photovoltaic power on the life degradation of the PEM electrolyzer. Among them, an objective function model combining hydrogen production economy and PEM electrolyzer life degradation is established, and the WOA optimization algorithm is used to optimize the parameters and rule base of the upper and lower FLCs. The specific steps are as follows: Step 1: Modeling photovoltaic power generation; Step 1.1: Consider the influence of ambient temperature and radiation intensity on the temperature of photovoltaic cells and establish a temperature model for photovoltaic cells. Specifically: in, is the current temperature of the photovoltaic cell, is the current ambient temperature, is the current solar radiation intensity, and Respectively represent the ambient temperature and solar radiation intensity data obtained under normal working conditions; is the temperature of the photovoltaic under normal working conditions; Step 1.2: Combined with the temperature change of the photovoltaic module, calculate the power generation power of the photovoltaic module under actual lighting conditions by the photovoltaic power generation power under standard test conditions: in, is the current photovoltaic power generation power, is the rated power of the photovoltaic and are the solar radiation intensity and ambient temperature under standard test conditions, is the temperature coefficient; Step 2: PEM electrolyzer modeling; Step 2.1: Voltage Considering the open circuit voltage, activation overpotential, ohmic overpotential, and concentration overpotential, a mathematical model of the electrolytic cell output power, current density, and voltage is established; specifically: in, is the power of the PEM electrolyzer, is the current of the electrolytic cell, and They represent open circuit voltage, activation overpotential, ohmic overpotential and concentration overpotential respectively; in, , and Represent the hydrogen pressure on the cathode side, the oxygen pressure on the anode side, and the water pressure caused by gas permeation, and Represent components i The activity and concentration of j and represent the current density and exchange current density, respectively. and are the film thickness and impedance respectively; R is the ideal gas constant, T is the electrolytic cell temperature, F is the Faraday constant, and Z is the constant 2; Step 2.2: Establish the relationship between the electrolyzer input power and the hydrogen mass flow rate, specifically: in, is the calorific value of hydrogen; is the hydrogen mass flow rate, is the power of the electrolytic cell, is the hydrogen production efficiency of the electrolyzer; Step 2.3: Based on the hydrogen production efficiency curve of the electrolyzer, establish the hydrogen production output model of the electrolyzer at different power levels. Specifically: in, is the voltage efficiency, is the Faraday efficiency; further, in, is the density of hydrogen; Step 2.4: Establish a degradation model for the electrolyzer under fluctuating power, specifically: in, is the decay rate of the electrolytic cell, is the measured constant for the reduction of electrolytic cell life, is the coefficient, is the maximum value constant of the electrolytic cell life decay, is the measured coefficient, is the rated power of the electrolyzer, is the fluctuation value of the electrolyzer input power, which is further calculated as: in is the power difference between the electrolytic cell at the previous moment and the current moment; Step 3: DC / DC converter modeling; Step 3.1: Determine the converter efficiency at different input powers, specifically: in, is the charge and discharge power of the battery, and They are unidirectional and bidirectional DC / DC converter efficiency respectively; is the input power of the electrolyzer; Step 4: Battery modeling; Step 4.1: Determine the battery's depth of charge and discharge and efficiency, specifically: in, is the depth of charge of the battery, is the depth of discharge of the battery; Step 4.2: Establish the SOE model of the battery at different charge and discharge powers, specifically: in, The lower limit of battery SOE, is the SOE value at the current k moment, For the battery charging and discharging efficiency, is the battery capacity, Is the charge and discharge time of the battery; Step 5: Establish energy management strategy based on FLC structure; Step 5.1: Determine the input and output of the upper and lower FLC layers. The upper layer is specifically: in, is the upper-level FLC fuzzy logic strategy, and It is the input of the upper FLC; is the output of the upper FLC, i.e., the upper power of the PEM electrolyzer; Similarly, the lower layer is: in, is the lower-level FLC fuzzy logic strategy, and is the input of the lower FLC, is the output of the lower FLC, i.e., the lower power of the PEM electrolyzer; Step 5.2: Design the parameters to be optimized and the logic rules for the upper and lower layers of FLC; Establish an upper-level rule base, Divide into 4 intervals, Divided into 3 intervals, Divide into 4 intervals, and then establish a fuzzy rule mapping library; Establish a lower-level rule base, Divide into 4 intervals, Divided into 3 intervals, Divide into 4 intervals, and then establish a fuzzy rule mapping library; Step 5.3: Considering the economic efficiency of hydrogen production and the degradation of the PEM electrolyzer life, design the objective function, specifically: in, For hydrogen production income, The cost increase caused by the decline in electrolytic cell life is further calculated: Step 6: Based on the two-layer FLC structure and combined with the Whale Optimization WOA algorithm, search for the optimal FLC parameters and logic rules to obtain the best energy management strategy; Step 6.1: Using the WOA algorithm, the parameters to be optimized of the upper and lower FLC layers and the logic rules are used as optimization variables. Combined with the designed objective function, the final parameters are obtained through iterative convergence. Specifically: (1) Swallowing target The capture strategy takes the current optimal individual's position as the target position. While exploring the surrounding area, the population approaches the target through the movement strategy. Assume is the position of the current best solution, and the whale’s surrounding behavior is expressed as: in, represents the current whale position with the best fitness, and represents the whale position at the current iteration; the coefficient A and C Calculated as follows: in, and is a random number in the interval (0,1), and The value of gradually decreases from 2 to 0; (2) Spiral approximation During hunting, whales use spiraling movements to approach their prey, and their positions are better described as: Among them, there are represents the distance between the whale and its prey, and lies in the interval [-1, 1]; as the whale orbits its prey, it also continuously reduces the radius of the circle, thus reducing the probability and The settings are used to select between the shrinking orbit mechanism and the spiral model for updating the whale's position: in, is a random number in the range [0, 1]. Here, The value of is set to 0.5; (3) Predatory behavior The whale optimization algorithm uses a random walk and exploration strategy during the hunting process. Each whale calculates a new position vector based on its current position vector and movement step size, and then moves accordingly. This process can be expressed as: in, represents a random whale position; when When , a whale is randomly selected and the positions of other whales are updated to increase the randomness of exploration in the hope of finding better prey; by increasing the algorithm's search capability, the WOA algorithm can explore the global optimal solution.