Proton exchange membrane fuel cell data-driven method and system based on deep learning
Through the LSTM-BPNN fusion model, combined with BP neural network and LSTM network, the characteristic information of the current operating conditions and historical output is extracted, which solves the nonlinear and time lag problems of the proton exchange membrane fuel cell system and achieves high-precision dynamic model prediction. Improved the model's generalization ability and training efficiency.
Patent Information
- Application Number
- CN202210667041.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-06-14
AI Technical Summary
Due to the highly nonlinear and time lag characteristics of the proton exchange membrane fuel cell system, it is difficult to establish an accurate dynamic model using traditional modeling methods, which ignore the joint influence of the system's historical output and current operating conditions.
The LSTM-BPNN fusion deep learning dynamic model is used to extract operating variable feature information from the current working condition data through the BP neural network. The LSTM network extracts the time lag information from the historical output voltage data and fuses it through the fully connected layer to predict the voltage output. . The model order of the LSTM network is determined through the analysis of autocorrelation functions and partial autocorrelation functions.
It improves the accuracy of the proton exchange membrane fuel cell dynamic model, has good generalization ability, and reduces the number of model training times and computational costs.
Smart Images

Figure CN114970367B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, and in particular to a proton exchange membrane fuel cell data driving method and system based on deep learning. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Proton Exchange Membrane Fuel Cell (PEMFC) has attracted much attention due to its excellent characteristics such as low emissions, high energy efficiency, and low operating temperature, and is considered to be one of the important energy sources in the future. Establishing an accurate dynamic model of the PEMFC system is of great significance for studying system efficiency, improving dynamic response capabilities, and establishing an effective control system. However, the PEMFC system has the characteristics of high nonlinearity and time lag, and the output is affected by the current system input and historical output. Traditional modeling methods often ignore the joint influence of the system's historical output and the current day's operating conditions, making it difficult to establish a high-precision dynamic model. Summary of the invention
[0004] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides a proton exchange membrane fuel cell data-driven method and system based on deep learning. In order to solve the problem that previous modeling work often ignores the joint influence of the system's historical output and the current day's operating conditions, data-driven modeling for the PEMFC system is proposed, and an LSTM-BPNN fusion (Long Short Term Memory-Back Propagation Neural Network Fusion, LBF) deep learning dynamic model is proposed, and the model construction is realized by determining the order of the model.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A first aspect of the present invention provides a proton exchange membrane fuel cell data driving method based on deep learning, comprising the following steps:
[0007] Obtain current operating data and historical output voltage data of the proton exchange membrane fuel cell system;
[0008] The BP neural network model is used to extract the current operating variable feature information from the current operating condition data, and the LSTM network model is used to extract the time lag information from the historical output voltage data;
[0009] The construction process of the LSTM network model includes determining the model order of the LSTM network. The model order of the LSTM network is determined by fitting a relationship curve using an analysis method of an autocorrelation function and a partial autocorrelation function, and the model order of the LSTM network is determined by the shape of the relationship curve.
[0010] The current operating variable characteristic information and time lag information are fused, and the fused characteristic information is further extracted through the BP neural network to obtain the predicted voltage.
[0011] A second aspect of the present invention provides a proton exchange membrane fuel cell data drive system based on deep learning, comprising:
[0012] A data acquisition module is used to obtain current operating data and historical output voltage data of the proton exchange membrane fuel cell system;
[0013] A feature extraction module is used to extract the current operating variable feature information from the current operating condition data using a BP neural network model, and to extract the time lag information from the historical output voltage data using an LSTM network model;
[0014] The construction process of the LSTM network model includes determining the model order of the LSTM network. The model order of the LSTM network is determined by fitting a relationship curve using an analysis method of an autocorrelation function and a partial autocorrelation function, and the model order of the LSTM network is determined by the shape of the relationship curve.
[0015] The prediction module is used to fuse the current operating variable characteristic information and the time lag information, and further extract the fused characteristic information through the BP neural network to obtain the predicted voltage.
[0016] A third aspect of the present invention provides a computer-readable storage medium.
[0017] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the deep learning-based proton exchange membrane fuel cell data-driven method as described above.
[0018] A fourth aspect of the present invention provides a computer device.
[0019] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the deep learning-based proton exchange membrane fuel cell data-driven method as described above are implemented.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] The present invention takes into account the characteristics of proton exchange membrane fuel cell system, such as high nonlinearity and time lag, and the output is affected by the current system input and historical output. By combining the LSTM and BPNN networks, the LSTM network is used to extract time lag information from the historical output voltage of the PEMFC system, and the BPNN network is used to extract the operating variable characteristic information from the current system input parameters, and then the information output by the two networks is fused, and then the information is further extracted through the fully connected layer to predict the output voltage. This modeling method can greatly improve the accuracy of the PEMFC dynamic model and has good generalization ability.
[0022] The present invention takes into account that the number of hidden layers in LSTM and BP neural networks is affected by many factors, such as application scenarios and the scale of the PEMFC system, and is usually determined through trial and error. At the same time, it is also necessary to take into account the performance and computational cost of the model. By adopting the analysis method of autocorrelation function and partial autocorrelation function to determine the model order of the LSTM network, the model order can be determined efficiently and accurately, the time for enumerating attempts can be saved, and the number of model training times can be reduced.
[0023] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0025] Figure 1 is a flow chart of a proton exchange membrane fuel cell data-driven method based on deep learning in an embodiment of the present invention;
[0026] Figure 2 It is a structural diagram of the overall network model of an embodiment of the present invention;
[0027] Figure 3 This is a structural diagram of the LSTM network model of an embodiment of the present invention;
[0028] Figure 4 It is a neural structure diagram of a BP network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0030] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0031] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0032] Embodiment 1
[0033] like Figure 1 As shown, this embodiment provides a proton exchange membrane fuel cell data driving method based on deep learning, comprising the following steps:
[0034] Step 1: Obtain current operating condition data and historical output voltage data of the proton exchange membrane fuel cell system;
[0035] Step 2: Preprocess the current operating condition data and historical output voltage data;
[0036] Step 3: Use BP neural network to extract current operating variable feature information from current operating condition data, and use LSTM network to extract time lag information from historical output voltage data;
[0037] The construction process of the LSTM network model includes determining the model order of the LSTM network. The model order of the LSTM network is determined by fitting a relationship curve using an analysis method of an autocorrelation function and a partial autocorrelation function, and the model order of the LSTM network is determined by the shape of the relationship curve.
[0038] Step 4: Fuse the current operating variable characteristic information and time lag information, further extract the fused characteristic information through the BP neural network, and obtain the predicted voltage.
[0039] As one or more embodiments, in step 1, the current operating condition data is I A (t)={x1(t),x2(t),…,x n (t)}, the historical output voltage data is I L (t)={y(t-1),y(t-2),…,y(tk)};
[0040] Among them, n is the number of variables contained in the current input information, and the current operating data includes operating variables such as oxygen temperature, oxygen pressure, water temperature, water pressure and PEMFC average current.
[0041] k is the order of the historical output voltage, that is, the output voltage at several previous moments.
[0042] Collect PEMFC operating data under different operating conditions, and select the input-output relationship to be established, such as the relationship between input gas pressure, gas flow, cooling water temperature, etc. and output voltage. Divide the collected data set into training set and test set in a ratio of 7:3.
[0043] like Figure 2 As shown, as one or more embodiments, in step 2, the data is preprocessed to remove erroneous data in the data set, and the preprocessing includes: normalizing the two sets of variables, the current operating condition data and the historical output voltage data, and linearly mapping each data to the range of (0,1), which is a dimensionless expression. The dimension difference between different inputs is eliminated by normalization, and the model can be better trained, and because all the data are compressed to the range of (0,1), the model training speed is greatly improved.
[0044] As one or more embodiments, in step 3, in the information classification and extraction stage, the model is mainly divided into two parts, one part is the BP neural network used to extract the information of the current input variables of the system, and the other part is the LSTM network used to extract the historical voltage information.
[0045] The normalized current operating condition data is passed into the BP neural network module. The current input variable information contains the most direct impact on the output voltage. For example, when the hydrogen supply is reduced, the proton exchange membrane fuel cell (PEMFC) system will not be able to release enough electrons and protons due to the sudden drop in fuel, resulting in changes in external output. This extraction of nonlinear information from multiple input variables at a single moment is processed using a BP neural network.
[0046] The PEMFC historical voltage is normalized and then transmitted to the LSTM module. Due to the time lag of the PEMFC system, many input changes at the current moment cannot be immediately reflected or fully reflected in the output at the current moment. Therefore, extracting hidden information from the historical output voltage can further improve the prediction accuracy of the model.
[0047] Among them, since LSTM is an improved recurrent neural network structure, it introduces the concept of "gate" and the idea of cell state when processing time series, thereby gaining the ability to specifically enhance or weaken information storage to the state or output, improving the shortcoming that traditional recurrent neural networks can only learn shorter time series information.
[0048] The structure of the LSTM network is as follows Figure 3 As shown in Figure 1, each LSTM unit accepts three inputs, namely, c t-1 ,h t-1 ,yt , respectively refer to the old state transmitted by the previous cell, the output at the previous moment, and the input at the current moment.
[0049] The calculation principle of the LSTM is as follows:
[0050] f t =σ(W f ·[h t-1 ,y t ]+b f ) (1)
[0051] i t =σ(W i ·[h t-1 ,y t ]+b i ) (2)
[0052]
[0053]
[0054] o t =σ(W o ·[h t-1 ,y t ]+b o (5)
[0055]
[0056] Among them, y t is the output (voltage) at time t, f t is the output of the forget gate, which determines how much previous information will be forgotten and participates in determining the current cell state. t is the output of the input gate, which is used to determine the new information to be memorized for the current input. t It is the output of the LSTM output gate and determines the information to be transferred to the next LSTM layer or the output layer. It is a new state candidate value that can be added to the new state. t and c t Represent the output information and the current new state of the cell respectively.
[0057] The BPNN structure is as follows Figure 4 As shown, the BPNN output can be calculated by the following formula:
[0058]
[0059] y i =f l (z i ) (8)
[0060] Among them, x j is the input parameter of the PEMFC system at the current moment, and its data dimension is n×1, b i Represents the bias of the neuron, W i,j represents the weight matrix, f l Represents the activation function.
[0061] In this embodiment, a rectified linear unit (ReLU) is used as the hidden layer activation function, and a sigmoid function is used as the output layer activation function.
[0062] The model is trained using the data set. After normalization, the historical data and current operating condition data are input into two modules to extract information. The information extracted by the two networks is then fused and extracted again. The final output is the system output that needs to be predicted. By comparing it with the actual voltage, the error is back-propagated to modify the network weights.
[0063] After the predicted voltage is output, it is determined whether the number of iterations reaches the set threshold. If so, the voltage is the final predicted voltage. Otherwise, the calculation error is back-propagated to continuously update the network parameters.
[0064]
[0065]
[0066] In this embodiment, the threshold adopted is 100 times of iterative training, and the obtained model is used as the final modeling result.
[0067] As one or more embodiments, in step 3, since there are many hyperparameters in the BP neural network and the LSTM network, the model order is taken as an example, where the model order of the LSTM network represents the number of past output voltages used.
[0068] The number of hidden layers in LSTM and BP neural networks is affected by many factors, such as the application scenario and the scale of the PEMFC system, and is usually determined by trial and error, while also taking into account the performance and computational cost of the model.
[0069] The analysis method of using autocorrelation function (ACF) and partial autocorrelation function (PACF) to determine the model order of the LSTM network specifically includes:
[0070] The autocorrelation function is used to fit the relationship between the current value in the time series (i.e., historical output voltage data) and all its values in the previous period of time, that is, to describe the relationship between y t With y t-1 ,y t-2 …,y t-k The relationship between.
[0071] The value of the partial autocorrelation function is used to fit the relationship between a value in the time series and its previous value, ignoring the influence of other intermediate values. That is, PACF describes the relationship between y t and t-k direct relationship between them.
[0072] The order of a time series model can be determined by observing the shapes of the ACF and PACF.
[0073] Among them, ACF and PACF are calculated as follows:
[0074]
[0075]
[0076] Where O is the number of observations, Y t Represents a value in the sequence, Y t+K Indicates that Y t The value of interval K, K is the sequence Y t The hysteresis value of is the mean of the time series.
[0077] ACF k It represents the autocorrelation value of the sequence with lag K at the kth position, PACF j (k-1) represents the partial autocorrelation value of the jth lag of the sequence (k-1), ACF j represents the j-th autocorrelation value, ACF k-j Represents the kj-th autocorrelation value.
[0078] The calculated ACF and PACF values were identified by drawing upper and lower limits (CLs) at a significance level of 5% using equation (13).
[0079]
[0080] The ACF and PACF of the sequence are calculated by combining formula (11) and formula (12), and then the state of the ACF and PACF curves and the upper and lower limits of the significance level are obtained based on formula (13) to determine the order of the model.
[0081] The advantage of the above scheme is that by using the analysis method of autocorrelation function and partial autocorrelation function to determine the model order of the LSTM network, the model order can be determined efficiently and accurately, saving the time of enumerating attempts and reducing the number of model training times.
[0082] The present invention uses a deep learning model to perform data fitting to characterize the dynamic characteristics of the PEMFC system. Common fitting problem evaluation indicators mainly include mean absolute error (MAE), mean squared error (MSE), mean absolute percentage error (MAPE), etc.
[0083] In this embodiment, MSE is used to evaluate the model prediction performance.
[0084] MSE is the average sum of squares of the errors between the predicted value and the true value of the calculation model. It is an evaluation index that is relatively easy to calculate. The smaller the value, the higher the prediction accuracy of the model. The calculation formula is:
[0085]
[0086] Through the above scheme, the LSTM and BPNN networks are combined, where the LSTM network is used to extract time lag information from the historical output voltage of the PEMFC system, and the BPNN network is used to extract conventional information from the current system input parameters, and then the information output by the two networks is fused, and then the fully connected layer is used to further extract information to predict the output voltage. This modeling method can greatly improve the accuracy of the PEMFC dynamic model and has good generalization ability.
[0087] Embodiment 2
[0088] This embodiment provides a proton exchange membrane fuel cell data drive system based on deep learning, and a data acquisition module for acquiring current operating condition data and historical output voltage data of the proton exchange membrane fuel cell system;
[0089] A feature extraction module is used to extract the current operating variable feature information from the current operating condition data using a BP neural network model, and to extract the time lag information from the historical output voltage data using an LSTM network model;
[0090] The construction process of the LSTM network model includes determining the model order of the LSTM network. The model order of the LSTM network is determined by fitting a relationship curve using an analysis method of an autocorrelation function and a partial autocorrelation function, and the model order of the LSTM network is determined by the shape of the relationship curve.
[0091] The prediction module is used to fuse the current operating variable characteristic information and the time lag information, and further extract the fused characteristic information through the BP neural network to obtain the predicted voltage.
[0092] Embodiment 3
[0093] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the deep learning-based proton exchange membrane fuel cell data-driven method as described above.
[0094] Embodiment 4
[0095] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the deep learning-based proton exchange membrane fuel cell data-driven method as described above are implemented.
[0096] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0097] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0098] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0100] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. Data-driven approach for proton exchange membrane fuel cells based on deep learning, It is characterized in that The steps include: Obtain current operating data and historical output voltage data of the proton exchange membrane fuel cell system; The BP neural network model is used to extract the current operating variable feature information from the current operating condition data, and the LSTM network model is used to extract the time lag information from the historical output voltage data; The construction process of the LSTM network model includes determining the model order of the LSTM network. The model order of the LSTM network is determined by fitting a relationship curve using an analysis method of an autocorrelation function and a partial autocorrelation function, and the model order of the LSTM network is determined by the shape of the relationship curve. The current operating variable characteristic information and time lag information are fused, and the fused characteristic information is further extracted through the BP neural network to obtain the predicted voltage.
2. The proton exchange membrane fuel cell data-driven method based on deep learning as claimed in claim 1, It is characterized in that The analysis method using the autocorrelation function and the partial autocorrelation function to fit the relationship curve includes: using the autocorrelation function to fit the relationship curve between the value at any time in the historical output voltage data and all its values in the previous period of time, and using the partial autocorrelation function to fit the relationship curve between the value at any time in the historical output voltage data and a certain value before it after ignoring the influence of other intermediate values.
3. The proton exchange membrane fuel cell data-driven method based on deep learning as claimed in claim 1, It is characterized in that The current operating condition data include oxygen temperature, oxygen pressure, water temperature, water pressure and PEMFC average current operating variables.
4. The proton exchange membrane fuel cell data-driven method based on deep learning as claimed in claim 1, It is characterized in that Before extracting features, the current operating condition data and the historical output voltage data are preprocessed, including: normalizing the current operating condition data and the historical output voltage data, and linearly mapping each data to the range of (0,1).
5. The proton exchange membrane fuel cell data-driven method based on deep learning as claimed in claim 1, It is characterized in that The calculation formula of the autocorrelation function is: Where O is the number of observations, Y t Represents a value in the sequence, Y t+K Indicates that Y t The value of interval K, K is the sequence Y t The hysteresis value of is the mean of the time series, ACF k It represents the autocorrelation value of the k-th lag of the sequence.
6. The proton exchange membrane fuel cell data-driven method based on deep learning as claimed in claim 1, It is characterized in that The calculation formula of the partial autocorrelation function is: Among them, PACF j (k-1) represents the partial autocorrelation value of the jth lag of the sequence (k-1), ACF j represents the j-th autocorrelation value, ACF k-j Represents the kj-th autocorrelation value.
7. The proton exchange membrane fuel cell data-driven method based on deep learning as claimed in claim 1, It is characterized in that After the predicted voltage is output, it is determined whether the number of iterations reaches the set threshold. If so, the voltage is the final predicted voltage. Otherwise, the calculation error is back-propagated to continuously update the network parameters.
8. Proton exchange membrane fuel cell data-driven system based on deep learning, It is characterized in that include: A data acquisition module is used to obtain current operating data and historical output voltage data of the proton exchange membrane fuel cell system; A feature extraction module is used to extract the current operating variable feature information from the current operating condition data using a BP neural network model, and to extract the time lag information from the historical output voltage data using an LSTM network model; The construction process of the LSTM network model includes determining the model order of the LSTM network. The model order of the LSTM network is determined by fitting a relationship curve using an analysis method of an autocorrelation function and a partial autocorrelation function, and the model order of the LSTM network is determined by the shape of the relationship curve. The prediction module is used to fuse the current operating variable characteristic information and the time lag information, and further extract the fused characteristic information through the BP neural network to obtain the predicted voltage.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps in the deep learning-based proton exchange membrane fuel cell data-driven method as described in any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps in the deep learning-based proton exchange membrane fuel cell data-driven method as described in any one of claims 1 to 7 are implemented.
