Method for establishing data-driven model of proton exchange membrane fuel cell based on IACS optimization algorithm

By constructing a data-driven model for proton exchange membrane fuel cells using the IACS optimization algorithm, the problems of complex calculations and insufficient accuracy in existing technologies are solved, achieving high-precision model establishment and simplified control.

CN116362021BActive Publication Date: 2026-07-24NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF SCI & TECH
Filing Date
2023-03-09
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In the process of building existing proton exchange membrane fuel cell (PEMFC) models, the mechanistic models are complex and computationally intensive, the empirical models are not accurate, and the data-driven models are not accurate enough when the parameters are unknown. In addition, the traditional cuckoo optimization algorithm has the problems of slow convergence speed and easy to get trapped in local optima.

Method used

A data-driven model for proton exchange membrane fuel cells (PEMFCs) is constructed using the IACS optimization algorithm. By analyzing the working characteristics and variable relationships of PEMFCs, appropriate input and output variables are selected to construct a state-space model. The system matrix parameters are then optimized using the IACS algorithm. Combined with Levy flight, adaptive step size factor, and improved random walk and differential mutation, the model parameters are optimized to improve accuracy.

Benefits of technology

It simplifies the modeling process, improves model accuracy and ease of control, and makes the output more realistic. It solves the problems of complex calculations and local optima in traditional methods and establishes a high-precision data-driven model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116362021B_ABST
    Figure CN116362021B_ABST
Patent Text Reader

Abstract

The application discloses a kind of to establish proton exchange membrane fuel cell data-driven model method based on IACS optimization algorithm.Determine the input and output variables of system, obtain the corresponding input and output data according to proton exchange membrane fuel cell (PEMFC) measurement and control model.Build state space model, set the system matrix in state space model, and use IACS optimization algorithm to optimize the system matrix, so that the modeling effect is more accurate.In the random walk update mode in the cuckoo algorithm, it is changed to the update mode of moving to the local optimal individual;The differential evolution algorithm is introduced, the individual with the worst fitness value directly flies to the position of the individual trapped in the local optimum, and is disturbed by difference, which increases the optimization ability.The IACS algorithm is used in the application to optimize the modeling method of PEMFC state space model, which can effectively improve the modeling accuracy and make the output characteristics of the established model more consistent with the actual.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial control, specifically a method for establishing a data-driven model for proton exchange membrane fuel cells based on the IACS optimization algorithm. Background Technology

[0002] To reduce environmental pollution and energy shortages caused by energy consumption, people are increasingly turning to abundant clean energy sources such as wind and solar power. Hydrogen energy, a representative clean energy source, has vast reserves on Earth and powerful combustion capabilities, making it an energy source that balances economic viability and efficiency. Proton exchange membrane fuel cells (PEMFCs) use hydrogen as a fuel, combining it with oxygen to release significant energy through a chemical reaction. The reaction is rapid, highly efficient, requires simple reaction conditions, and is pollution-free, showing broad application prospects. However, PEMFCs are multivariable, strongly coupled systems; therefore, modeling is necessary to better control their performance.

[0003] Currently, the main methods for building PEMFC models are mechanistic models, empirical models, and data-driven models. Mechanistic models are models that analyze the working characteristics and principles of PEMFC to establish equations relating various variables. They can realistically represent the interrelationships between variables within the PEMFC system. However, mechanistic models have some drawbacks: the model building process is complex, computationally intensive, and not conducive to system control and optimization. Empirical models are based on empirical formulas or equivalent circuits, using experimental data to analyze circuits and identify parameters. These models have simple structures and are easy to build. However, empirical models also have some problems: they cannot accurately reflect the interrelationships between variables, resulting in low model accuracy.

[0004] Data-driven models treat the entire system as a "black box," directly identifying the model based on actual input and output data. They do not require consideration of the system's complex physical structure or understanding of its working characteristics and principles. They effectively reflect the interaction between system inputs and outputs, simplifying the modeling process, resulting in highly accurate models that are easy to control. Nanadegan, Lay, et al. On neural network modeling to maximize the power output of PEMFCs[J]. Electrochimica Acta, 2020(348):136345. A multivariate and univariate nonlinear model of PEMFC was established using artificial neural network modeling. Xu Xiayin. Temperature subspace identification model of proton exchange membrane fuel cells[J]. Industrial Control Computer, 2015, 28(9):77~78. A PEMFC model with water flow rate as input and stack temperature as output was established using subspace identification. This model effectively reflects the relationship between inputs and outputs and can describe the temperature characteristics of PEMFCs. However, there are some unknown parameters in the data-driven modeling process. Therefore, optimization algorithms are introduced to optimize the initial parameters in the modeling process and improve the modeling accuracy of the system.

[0005] The Cuckoo Search (CS) algorithm is not only simple to operate with fewer parameters, but also outperforms swarm intelligence optimization algorithms such as particle swarm optimization and ant colony optimization. However, the Cuckoo Search algorithm also has drawbacks such as slow convergence speed and easy getting trapped in local optima. In response, Ji Liangjie, Zhao Xiaolin, et al. Multi-UAV task allocation based on improved Cuckoo Search algorithm [J]. Journal of Ordnance Equipment Engineering. 2022, 43(08): 290-295. Based on the traditional CS algorithm, an adaptive step size factor is introduced to balance the global search capability and the local search capability, but the problem of the algorithm being easy to get trapped in local optima is not solved. Zhou Binghai, Li Xiujuan. Material distribution scheduling of automobile assembly line based on improved multi-objective Cuckoo Search algorithm [J]. Journal of Hunan University (Natural Science Edition). 2020, 47(12): 1-8. The concepts of Gaussian mutation and elite selection are introduced to improve the algorithm, thereby making the algorithm less likely to get trapped in local optima and improving the quality of the solution. However, this cannot balance the global search and local search well, and ignores the development of the local area of ​​the population, thus affecting the convergence speed of the algorithm. Summary of the Invention

[0006] The purpose of this invention is to provide a method for establishing a data-driven model for proton exchange membrane fuel cells based on the IACS optimization algorithm.

[0007] The technical solution to achieve the purpose of this invention is: a method for establishing a data-driven model of a proton exchange membrane fuel cell based on the IACS optimization algorithm, comprising the following steps:

[0008] Step 1: Analyze the working characteristics and working principle of PEMFC, compare the relationship between various variables and their degree of influence on the system, determine the input and output variables used to build the model, and obtain the corresponding input and output data in the PEMFC measurement and control system;

[0009] Step 2: Construct the PEMFC state-space model, set the initial parameters and error accuracy of the system matrix in the state-space model, and set the dimension of the system matrix;

[0010] Step 3: Use the input data in Step 1 as the input to the state space model in Step 2 to obtain the corresponding output data. Compare the obtained output data with the actual output data obtained in Step 1, calculate the error value between the state space model output data and the actual output data, and compare it with the set error precision. If the output condition of less than the error precision is met, then the PEMFC state space model obtained in this step is used as the final data-driven model. If not, proceed to Step 4.

[0011] Step 4: Use the IACS algorithm to optimize the parameters in the system matrix to obtain the updated PEMFC state-space model;

[0012] Step 5: Determine whether the number of optimization attempts has reached the set number. If it has, use the PEMFC state space model obtained in Step 4 as the final data-driven model; otherwise, return to Step 3.

[0013] Preferably, the input variables selected in step 1 are hydrogen flow rate and load current, and the output variables are output voltage and output power.

[0014] Preferably, the PEMFC state-space model constructed in step 2 is as follows:

[0015]

[0016] Where u(t) is the system input, y(t) is the system output, and A, B, C, and D are system matrices, satisfying the following conditions: n is the dimension of the state vector, m is the number of inputs, and l is the number of outputs.

[0017] Preferably, the steps for optimizing the parameters in the system matrix using the IACS algorithm to obtain the updated PEMFC state-space model are as follows:

[0018] Step 4.1: Randomly generate n bird nest locations and set initial parameters: step size factor α, discovery probability P, and maximum number of iterations T;

[0019] Step 4.2: Calculate the fitness value of the initial population using the fitness function, and find and record the nest with the best fitness value;

[0020] Step 4.3: Update the nest location using the Levy flight update method and calculate the population fitness value after the update;

[0021] Step 4.4: Compare the fitness values ​​of the population after the levy flight with those of the previous generation, and retain the nests with better fitness values;

[0022] Step 4.5: Generate a random number r on [0,1] and compare it with the adaptive discovery probability P in this iteration. If r>P, then update the bird's nest according to the improved random walk update method.

[0023] Step 4.6: Compare the fitness values ​​of the bird nests generated in Step 4.5 with those in Step 4.4, and retain the bird nests with better fitness values;

[0024] Step 4.7: Apply the improved differential mutation perturbation to the bird's nest that is trapped in a local optimum to obtain the system matrix parameters after this optimization.

[0025] Preferably, the update step size when performing position updates using the Levy flight update method is:

[0026]

[0027] Where, α max α is the maximum value of the step size factor. min t is the minimum step size factor, t is the current iteration number, and T is the maximum iteration number.

[0028] Preferably, the specific formula for random walk update is:

[0029]

[0030] in, Let t be the optimal nest location in the population after t iterations. For the population that is different in iteration t and The location of the bird's nest, These are the bird nests that need to be updated in this iteration;

[0031] Preferably, the specific formula for the improved difference variation is as follows:

[0032]

[0033] Where F is the variation factor, Let t be any nest location in the population during iteration t. These are the bird nests that need to be updated in this iteration.

[0034] Preferably, the fitness function is the error value between the output data of the state-space model and the actual output data.

[0035] Compared with the prior art, the significant advantages of this invention are: the modeling process of this invention is simple and convenient, which can avoid the complex analysis of the physical structure of PEMFC, does not require a complex calculation process, the established model is easy to implement and control, and the IACS optimization algorithm is used to optimize the system matrix. The optimization performance of the IACS algorithm exceeds that of other optimization algorithms, which can make the optimized model more accurate and the output more in line with reality. Attached Figure Description

[0036] Figure 1 A flowchart illustrating the method for establishing a data-driven model for proton exchange membrane fuel cells based on the IACS optimization algorithm. Detailed Implementation

[0037] A method for establishing a data-driven model for proton exchange membrane fuel cells based on the IACS optimization algorithm, comprising the following steps:

[0038] Step 1: Analyze the working characteristics and working principle of PEMFC, compare the relationship between various variables and their degree of influence on the system, select appropriate input and output variables, and obtain the corresponding input and output data in the PEMFC measurement and control system built in this invention;

[0039] The PEMFC system is a complex, multivariable, and strongly coupled system whose output characteristics are affected by many factors, such as load current, hydrogen flow rate or pressure, oxygen flow rate or pressure, and stack temperature. Therefore, the SISO model cannot well reflect the interaction of multiple variables in the PEMFC system, nor can it accurately describe the system's operating state. This invention therefore selects two input variables and two output variables to build the model.

[0040] Among many factors, load current has the most direct and significant impact on system output, and its variation cannot be ignored. Meanwhile, during the discharge reaction of a PEMFC, the discharge reaction rate of the stack is greatly affected by hydrogen flow rate and pressure, which are directly proportional to the discharge reaction rate. However, from the perspective of controllability and measurability, hydrogen flow rate can be monitored more directly. Therefore, load current and hydrogen flow rate are selected as input variables. Output power, stack voltage, and current are important indicators for evaluating the discharge efficiency of a PEMFC system; in this invention, output voltage and output power are selected as output variables.

[0041] In the PEMFC measurement and control system, one set of data is sampled every second, for a total of 600 sets of data. After the data is collected, it is analyzed in conjunction with the actual situation, and data with abnormally high rates of change are deleted, while the 500 sets of good data are retained.

[0042] Step 2: Construct the PEMFC state-space model, set the initial parameters and error precision of the system matrices A, B, C, and D in the state-space model, and set the dimension of the system matrices to 2-dimensional;

[0043] The model expression established in this invention is as follows:

[0044]

[0045] Where u(t) is the system input, y(t) is the system output, and A, B, C, and D are system matrices, satisfying the following conditions: n is the dimension of the state vector, m is the number of inputs, and l is the number of outputs.

[0046] System matrices A, B, C, and D, as important components of the state-space model, play an indispensable role in describing the model's functionality, and their values ​​are crucial. Therefore, this invention employs an optimization algorithm to optimize the system matrices. First, an initial system matrix is ​​given based on experience. Using the error between the model's output and the actual measured output as the performance index, the parameters in the system matrix are iteratively optimized until the error judgment condition or the maximum number of iterations is met.

[0047] Step 3: Use the input data from Step 1 as the input to the state-space model in Step 2 to obtain the corresponding output data. Compare the obtained output data with the actual output data obtained in Step 1, calculate the error value between the state-space model output data and the actual output data, and compare it with the set error precision. If the output condition of less than the error precision is met, then the PEMFC state-space model obtained in this step is used as the final data-driven model in this invention. This model can well describe the influence relationship of the input and output variables selected in this invention in PEMFC. If not, proceed to Step 4.

[0048] Step 4: The steps to optimize the parameters in the system matrix using the IACS algorithm to obtain the PEMFC state-space model are as follows:

[0049] Step 4.1: Randomly generate n bird nest locations, setting initial parameters: step size factor α, discovery probability P, and maximum number of iterations T. Since the system matrix in this invention has a 2-dimensional dimension, and both the input and output variables are 2, the system matrix... Therefore, the location of bird nests is always 16-dimensional;

[0050] Step 4.2: Calculate the fitness value of the initial population, find and record the nest with the best fitness value. Use the error between the state-space model output data and the actual output data as the fitness function;

[0051] Step 4.3: In the Levy flight update method, different values ​​of the step size factor α will have different effects on the algorithm's search. A larger value of the step size factor α allows for searching a larger space, thereby increasing population diversity, but also reducing convergence accuracy. Conversely, a smaller value of the step size factor α searches within the surrounding area, thereby increasing convergence accuracy, but also reducing convergence speed. Throughout the optimization process, different search environments require different search capabilities. Therefore, in the traditional CS algorithm, the value of the step size factor α remains constant, which severely affects the algorithm's search performance. This design proposes an adaptive strategy for the step size factor:

[0052]

[0053] Where, α max α is the maximum value of the step size factor. min To minimize the step size factor, α in this design max =0.7, α min =0.1, t is the current iteration number, and T is the maximum iteration number.

[0054] The bird's nest is updated in position according to equation (2), and the fitness value of the bird's nest after the update is calculated.

[0055] Step 4.4: Compare the fitness values ​​with those of the previous generation population and update the nests with the better fitness values;

[0056] Step 4.5: The smaller the value of P, the more nests are updated, and the stronger the global search capability; the larger the value of P, the stronger the local search capability. Therefore, setting P to a fixed value in the traditional cuckoo algorithm is not conducive to balancing global and local search. Therefore, this design proposes an adaptive strategy where P dynamically changes with the algorithm progress:

[0057] P = P min +(P max -P min )×(1-t / T) 1 / 2 (3)

[0058] Among them, P max and P min These are the maximum step size factor and the minimum step size factor, respectively. In this design, P... max =0.5, P min =0.01, t is the current iteration number, and T is the maximum iteration number.

[0059] This design also proposes to improve the random walk method by introducing the update concept of particle swarm optimization algorithm. The improved formula is as follows:

[0060]

[0061] Among them, P max P is the maximum value of the step size factor. min To minimize the step size factor, P in this design max =0.5, P min =0.01, t is the current iteration number, and T is the maximum iteration number.

[0062] The discovery probability P is updated according to formula (3), and a random number r on [0,1] is generated and compared with the updated discovery probability P. If r>P, then the bird's nest is updated according to formula (4).

[0063] Step 4.6: Compare the fitness values ​​of the bird nests generated in Step 4.5 with those in Step 4.4, and retain the bird nests with better fitness values;

[0064] Step 4.7: The traditional cuckoo algorithm is prone to getting stuck in local optima, which greatly affects the convergence effect of the algorithm. In this invention, the bird nest with the worst fitness value is directly flown to the bird nest that has not made any progress after 20 iterations of the global optimum. These bird nests are then subjected to differential perturbation according to formula (7). This not only preserves the current best bird nest, but also allows bird nests stuck in local optima to escape from local optima, expands the search range, and increases the diversity of the population.

[0065] The specific formula for difference variation is as follows:

[0066]

[0067] Where F is the variation factor, which is a fixed value. For the bird nests that need to be updated in this iteration, Let be the optimal nest location in the population after t iterations.

[0068] However, the object that needs to be updated in this invention has changed, so the differential mutation needs to be improved. The improved differential mutation has stronger perturbation, and the specific formula is as follows:

[0069]

[0070] Where F is the variation factor, which is taken as a random number between [0, 1] in this design. Let t be any nest location in the population during iteration t. These are the bird nests that need to be updated in this iteration.

[0071] Step 5: Determine whether the number of optimization attempts has reached the set number. If it has, use the PEMFC state space model obtained in Step 4 as the final data-driven model; otherwise, return to Step 3.

Claims

1. A method for establishing a data-driven model for a proton exchange membrane fuel cell based on the IACS optimization algorithm, characterized in that, Includes the following steps: Step 1: Analyze the working characteristics and working principle of PEMFC, compare the relationship between various variables and their degree of influence on the system, determine the input and output variables used to build the model, and obtain the corresponding input and output data in the PEMFC measurement and control system; Step 2: Construct the PEMFC state-space model, set the initial parameters and error accuracy of the system matrix in the state-space model, and set the dimension of the system matrix; Step 3: Use the input data in Step 1 as the input to the state space model in Step 2 to obtain the corresponding output data. Compare the obtained output data with the actual output data obtained in Step 1, calculate the error value between the state space model output data and the actual output data, and compare it with the set error precision. If the output condition of less than the error precision is met, then the PEMFC state space model obtained in this step is used as the final data-driven model. If not, proceed to Step 4. Step 4: Optimize the parameters in the system matrix using the IACS algorithm to obtain the updated PEMFC state-space model. The steps are as follows: Step 4.1: Randomly generate Location of each bird's nest; initial parameters: step size factor. Probability of discovery and maximum number of iterations ; Step 4.2: Calculate the fitness value of the initial population using the fitness function, and find and record the nest with the best fitness value; Step 4.3: Update the nest location using the Levy flight update method and calculate the updated population fitness value; the update step size when updating the location using the Levy flight update method is: in, This represents the maximum value of the step size factor. This is the minimum value of the step size factor. This represents the current iteration number. This represents the maximum number of iterations. Step 4.4: Compare the fitness values ​​of the population after the levy flight with those of the previous generation, and retain the nests with better fitness values; Step 4.5: Generate a random number in the range [0,1]. The adaptive discovery probability in this iteration Comparing, if satisfied > Then the nest will be updated according to the improved random walk update method; Step 4.6: Compare the fitness values ​​of the bird nests generated in Step 4.5 with those in Step 4.4, and retain the bird nests with better fitness values; Step 4.7: Apply the improved differential mutation perturbation to the bird's nest trapped in a local optimum to obtain the system matrix parameters after this optimization. Step 5: Determine whether the number of optimization attempts has reached the set number. If it has, use the PEMFC state space model obtained in Step 4 as the final data-driven model; otherwise, return to Step 3.

2. The method for establishing a data-driven model for a proton exchange membrane fuel cell based on the IACS optimization algorithm according to claim 1, characterized in that, The input variables selected in step 1 are hydrogen flow rate and load current, and the output variables are output voltage and output power.

3. The method for establishing a data-driven model of a proton exchange membrane fuel cell based on the IACS optimization algorithm according to claim 1, characterized in that, The PEMFC state-space model constructed in step 2 is as follows: in, For system input, For system output, Let be the system matrix, and satisfy... , , , , Let be the dimension of the state vector. The number of input quantities. This represents the number of output values.

4. The method for establishing a data-driven model of a proton exchange membrane fuel cell based on the IACS optimization algorithm according to claim 1, characterized in that, The specific formula for random walk updates is: in, for The optimal nest location in the population in the next iteration. for In the next iteration, the population is different from and The location of the bird's nest, These are the bird nests that need to be updated in this iteration.

5. The method for establishing a data-driven model for a proton exchange membrane fuel cell based on the IACS optimization algorithm according to claim 1, characterized in that, The improved formula for difference variation is as follows: in, As a variable factor, for In the next iteration, at any nest location in the population These are the bird nests that need to be updated in this iteration.

6. The method for establishing a data-driven model of a proton exchange membrane fuel cell based on the IACS optimization algorithm according to claim 1, characterized in that, The fitness function is the error value between the output data of the state-space model and the actual output data.