A fuel cell modeling method based on BP neural network

Through the fuel cell modeling method based on BP neural network, the impact of operating conditions on output performance is directly learned from the experimental data, and the topological structure of the neural network is optimized through the grid search method, which solves the problems of limited accuracy and high computational volume in the existing fuel cell modeling methods, and achieves the modeling effect of high accuracy and reliability.

CN113988296BActive Publication Date: 2025-07-01DALIAN INSTITUTE OF CHEMICAL PHYSICS CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111402046.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-07-01
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

In the existing fuel cell modeling methods, the theoretical model has limited accuracy and large calculation volume, making it difficult to use online; the training data of the artificial intelligence model comes from the theoretical model, and the accuracy and reliability need to be confirmed, and better solutions may be missed during the model optimization stage, resulting in lower accuracy.

Method used

The fuel cell modeling method based on BP neural network is adopted to directly learn the impact of operation conditions on output performance from the experimental data, and the topological structure of the BP neural network is optimized through the grid search method to ensure the accuracy of the model.

Benefits of technology

By using real experimental data to train neural networks, the accuracy and reliability of modeling are improved, the assumptions and simplification of theoretical models are avoided, the topology of the model is optimized, and the prediction accuracy and generalization ability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113988296B_ABST
    Figure CN113988296B_ABST
Patent Text Reader

Abstract

The present invention provides a fuel cell modeling method based on a BP neural network, comprising the following steps: collecting the output voltages of a fuel cell under different operating conditions and dividing them into a training set and a validation set; performing data preprocessing on the training set and the validation set; respectively optimizing the neural network topologies of a single hidden layer and a double hidden layer by using a grid search method, and selecting the neural network with the smallest validation error; collecting the output voltages of the fuel cell under other operating conditions (operating conditions different from those of the training set and the validation set) and using them as a test set to test the prediction accuracy of the network. The present invention can achieve high-precision prediction of the output voltages of a fuel cell under different operating conditions and provide decision support for system control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fuel cells, and in particular, to a fuel cell modeling method based on a BP neural network. Background Art

[0002] The output performance is one of the most important indicators of fuel cells, and operating conditions play a crucial role in it. Therefore, it is of great practical significance to deeply study the influence of operating conditions on the output performance of fuel cells. Currently, fuel cell modeling research is usually carried out from two directions: theoretical models and artificial intelligence models. In terms of theoretical models, the literature (Jin, Lei, et al. Energy Conversion and Management, 2021, 228: 113727.) established a three-dimensional multi-component CFD model to analyze the sensitivity of PEMFC performance to operating parameters. The literature (Shimpalee, Sirivatch. Journal of The Electrochemical Society, 2014, 161: E3138 - E3148) studied the influence of operating conditions and gas flow direction on the dynamic response performance of large-area PEMFCs through CFD technology. The results showed that the vehicle operating conditions showed more severe distribution inhomogeneity than the steady-state conditions. However, a fuel cell is a complex system with multi-field coupling, multi-scale, multi-component, and multi-factor. At present, the understanding of its internal mechanism is still very limited. Therefore, it is difficult to establish an accurate theoretical model. In the modeling process, various assumptions and simplifications are often required, resulting in limited accuracy of this method, huge computational complexity, and a large amount of computational time consumption, making it difficult to use online. In terms of artificial intelligence models, the literature (Nanadegani, Fereshteh Salimi, et al. Electrochimica Acta, 2020, 348: 136345.) first established a CFD theoretical model to study the influence of different operating conditions on the output performance, and then used this CFD theoretical model to generate a large amount of data to train a neural network model, and studied the maximum / minimum output voltage under different currents based on this model. Similarly, the literature (Li, et al. Journal of Power Sources, 2020, 461: 228154) generated experimental data through a CFD theoretical model to train a deep belief neural network, and then established a model relationship between operating conditions and output performance. However, the disadvantages of this method are that the training data comes from a theoretical model, so its accuracy and reliability need to be confirmed; secondly, in the model optimization stage, it is usually completed by intelligent algorithms, which may miss some better solutions, resulting in a lower accuracy of the model. Summary of the Invention

[0003] In view of the above problems, a fuel cell modeling method based on a BP neural network is proposed. Considering that the current understanding of its internal mechanism is still very limited and it is difficult to establish an accurate theoretical model, this patent uses a neural network model for modeling, which directly learns the influence of fuel cell operating conditions on the output performance from experimental data, overcoming the difficulty of insufficient understanding of the fuel cell mechanism. Secondly, sufficient training data is obtained through a large number of experiments, and the grid search method is used to optimize the topological structure of the BP neural network, thereby ensuring the accuracy of the model.

[0004] The technical means adopted in the present invention are as follows:

[0005] A fuel cell modeling method based on a BP neural network, comprising the following steps:

[0006] Step S1: Collect the output voltages of the fuel cell under different operating conditions and divide them into a training set and a validation set;

[0007] Step S2: Perform data preprocessing on the training set and the validation set;

[0008] Step S3: Optimize the neural network topological structures of the single hidden layer and the double hidden layer respectively through the grid search method, and select the neural network with the smallest validation error as the final optimization result;

[0009] Step S4: Collect the output voltages of the fuel cell under operating conditions different from the training set and the validation set, and use them as a test set to test the prediction accuracy of the network;

[0010] Step S5: If |test error - validation error| ≤ validation error, output the neural network; otherwise, return to Step S3.

[0011] Furthermore, the operating conditions include one or more combinations of fuel cell operating temperature, cathode / anode pressure, cathode / anode gas flow rate (stoichiometric ratio), cathode / anode humidification, and load current (density).

[0012] Even further, the data preprocessing method includes any one of the following methods

[0013] ① Extreme value transformation method:

[0014] ② Range transformation method:

[0015] ③ Z-Score standardization:

[0016] where X new is the data generated after preprocessing; X is the original data; X maxis the maximum value in the original data; X min is the minimum value in the original data; X mean is the mean of the original data; σ is the standard deviation of the original data.

[0017] Furthermore, for the single-hidden-layer BP neural network, the number of neurons in its input layer is equal to the number of operation condition types, the number of neurons in the output layer is 1, and the number of neurons in the hidden layer ranges from 1 to 100;

[0018] For the double-hidden-layer BP neural network, the number of neurons in its input layer is equal to the number of operation condition types, the number of neurons in the output layer is 1, the number of neurons in the first hidden layer ranges from 1 to 50, and the number of neurons in the second hidden layer ranges from 1 to 50.

[0019] Compared with the prior art, the present invention has the following advantages:

[0020] ① The training data of the present invention is derived from real experiments, so its accuracy and reliability are guaranteed;

[0021] ② The topology of the BP neural network is optimized by the network search method to ensure the optimization of the topology and avoid the drawback of missing better solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0023] Figure 1 is the execution flow chart of the method of the present invention;

[0024] Figure 2 is the optimization result of the single-hidden-layer BP neural network using the grid search method in the embodiment;

[0025] Figure 3 is the optimization result of the double-hidden-layer BP neural network using the grid search method in the embodiment;

[0026] Figure 4 The prediction effect of the neural network with the optimal topology in the embodiment on the test set. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0029] As Figures 1-4 shown, the present invention provides a fuel cell modeling method based on a BP neural network, comprising the following steps:

[0030] Step S1: Collect the output voltages of the fuel cell under different operating conditions and divide them into a training set and a validation set; in the present application, the training set and the validation set are sorted by a random allocation method, wherein the training set accounts for 70% - 90%, and the rest is the validation set. Specifically, the number of the training set is selected and determined according to specific requirements. Preferably, in this step, not only the output voltage information is collected, but also the operating conditions of the output voltage are synchronously collected. The operating conditions include one or a combination of the following: fuel cell operating temperature, cathode / anode pressure, cathode / anode gas flow rate (stoichiometric ratio), cathode / anode humidification, and load current (density).

[0031] Step S2: Perform data preprocessing on the training set and the validation set;

[0032] Step S3: Optimize the neural network topologies of the single hidden layer and the double hidden layer respectively by the grid search method, and select the neural network with the smallest validation error as the final optimization result. In the present application, the neural network includes an input layer, a hidden layer, and an output layer, wherein the input layer is determined by the number of "operating conditions", that is, the input layer is fixed and does not need to be optimized; the output layer is determined by the "output voltage", that is, the output layer is fixed and does not need to be optimized either. Therefore, only the hidden layer needs to be optimized.

[0033] The hidden layer can include one layer (single hidden layer), two layers (double hidden layer), three layers, four layers, etc. However, generally, the hidden layer does not exceed three layers because the phenomenon of "gradient explosion" is likely to occur. Therefore, it is often only necessary to optimize for the two cases of single hidden layer and double hidden layer respectively.

[0034] For the single hidden layer BP neural network, the number of neurons in the input layer is equal to the number of operation condition types, the number of neurons in the output layer is 1, and the number of neurons in the hidden layer ranges from 1 to 100;

[0035] For the double hidden layer BP neural network, the number of neurons in the input layer is equal to the number of operation condition types, the number of neurons in the output layer is 1, the number of neurons in the first hidden layer ranges from 1 to 50, and the number of neurons in the second hidden layer ranges from 1 to 50.

[0036] Step S4: Collect the output voltage of the fuel cell under operating conditions different from the training set and the validation set, and use it as the test set to test the prediction accuracy of the network;

[0037] Step S5: If |test error - validation error| ≤ validation error, output the neural network; otherwise, return to Step S3.

[0038] In this application, the data preprocessing method is any one of the following methods:

[0039] ① Extreme value transformation method:

[0040] ② Range transformation method:

[0041] ③ Z-Score standardization:

[0042] where X new is the data generated after preprocessing; X is the original data; X max is the maximum value in the original data; X min is the minimum value in the original data; X mean is the mean of the original data; σ is the standard deviation of the original data.

[0043] Example 1

[0044] In this example, a proton exchange membrane fuel cell is taken as an example. Specifically, the operating temperature range of the cell is 60 - 80 °C, the cathode / anode humidification range is 0 - 100% RH, the cathode / anode gas stoichiometry range is 2.0 - 3.5, the cathode / anode pressure is 1 bar, and the current density range is 0 - 3.5 A cm-2.

[0045] First, the collected data is distributed to the training set and the validation set according to a ratio of 9:1. Subsequently, data preprocessing is performed on the training set. In this embodiment, the range transformation method is adopted, and the same data processing is performed on the validation set based on the data processing information of the training set. Figure 2 is the prediction error of the trained single-hidden-layer BP neural network on the validation set. It can be found that when the number of neurons in the hidden layer is 20, the network prediction error is the smallest, RMSE = 0.0053V. Figure 3 is the prediction error of the trained double-hidden-layer BP neural network on the validation set. It can be seen that when there are 5 neurons in the first hidden layer and 8 neurons in the second hidden layer, the network prediction error is the smallest, RMSE = 0.0033V. Comparing these two BP neural networks, it can be found that the prediction error of the double-hidden-layer BP neural network on the validation set is smaller. Therefore, the double-hidden-layer BP neural network is finally adopted. Subsequently, the output voltage of the fuel cell under other operating conditions (different from those of the training set and the validation set) is re-collected and used as the test set to test the prediction accuracy of the network. The results are as Figure 4 shown, RMSE = 0.0040V, which is close to the validation error, indicating that the network has high prediction accuracy and good generalization ability.

[0046] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0047] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0048] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A fuel cell modeling method based on a BP neural network, characterized in that, It includes the following steps: S1: Collect the output voltages of the fuel cell under different operating conditions and divide them into a training set and a validation set; the operating conditions include: one or a combination of fuel cell operating temperature, cathode / anode pressure, cathode / anode gas flow stoichiometry, cathode / anode humidification, and load current density; the fuel cell operating temperature is 60-80 °C, the cathode / anode humidification is 0-100%RH, the cathode / anode gas stoichiometry is 2.0-3.5, the cathode / anode pressure is 1 bar; the load current density is 0-3.5 Acm -2 ; S2: Perform data preprocessing on the training set and the validation set; S3: Optimize the neural network topologies of the single hidden layer and the double hidden layer respectively by the grid search method, and select the neural network with the smallest validation error as the final optimization result; S4: Collect the output voltage of the fuel cell under operating conditions different from the training set and the validation set, and use it as the test set to test the prediction accuracy of the network; S5: If |test error - validation error| ≤ validation error, output the neural network; otherwise, return to step S3.

2. The fuel cell modeling method based on a BP neural network according to claim 1, characterized in that: The data preprocessing method is any one of the following methods: ① Extreme value transformation method: ② Range transformation method: ③Z-Score normalization: Among them, X new is the data generated after preprocessing; X is the original data; X max is the maximum value in the original data; X min is the minimum value in the original data; X mean is the mean of the original data; σ is the standard deviation of the original data.

3. A fuel cell modeling method based on a BP neural network according to claim 1, characterized in that: For the single hidden layer BP neural network, the number of neurons in its input layer is equal to the number of types of operating conditions, the number of neurons in the output layer is 1, and the number of neurons in the hidden layer ranges from 1 to 100; For the double hidden layer BP neural network, the number of neurons in its input layer is equal to the number of types of operating conditions, the number of neurons in the output layer is 1, the number of neurons in the first hidden layer ranges from 1 to 50, and the number of neurons in the second hidden layer ranges from 1 to 50.

Citation Information

Patent Citations

  • Modeling method for hydrogen energy reactor

    CN102508972A

  • Method for predicting energy density of negative electrode material of lithium ion battery based on neural network

    CN109376933A