A fuel cell performance degradation prediction method based on digital twin model
Through the long-term and short-term memory network model based on the digital twin model, the problem of performance decay prediction of fuel cells under dynamic working conditions is solved, real-time and long-term prediction of fuel cell performance is achieved, and effective health management means are provided for extending the service life of fuel cells.
Patent Information
- Application Number
- CN202510051540.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The prior art is difficult to effectively predict the performance attenuation of fuel cells under dynamic working conditions of durable cycles, resulting in the universality of the method and the prediction effect need to be further verified.
Using a digital twin model-based method, a long and short-term memory network model is established by collecting and preprocessing multi-channel time series data, training and verification is performed, output voltage prediction value sequences are generated, and the model is regularly updated through incremental learning to achieve dynamic mapping and prediction accuracy evaluation.
Real-time and long-term prediction of the fuel cell performance decay process is achieved, providing meaningful and time-efficient reference information for health management and extending the service life of fuel cells.
Smart Images

Figure CN119471399B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of fuel cell testing technology, and in particular to a fuel cell performance attenuation prediction method based on a digital twin model. Background Art
[0002] The performance attenuation analysis of fuel cells is usually based on durability bench testing. According to the set durability test conditions, when the fuel cell product completes the corresponding operating time or number of cycle conditions, the difference between the fuel cell output voltage and output power before and after the test is taken to calculate the corresponding attenuation.
[0003] Focusing on the demand for predicting fuel cell performance attenuation, domestic and foreign scholars have mainly proposed modeling methods based on attenuation mechanisms and data-driven modeling methods. The former starts from the heat and mass transfer process inside the fuel cell, combines typical attenuation mechanisms (such as catalyst agglomeration, shedding, etc.), conservation equations, electrochemical reactions, etc. to establish a simulation model, and further analyzes the output performance differences before and after attenuation. With the continuous development of data science, computing and sensor technology, data-driven methods have been widely used in performance prediction. By constructing a black box model that automatically fits the relationship between input and output data, it does not require prior knowledge of the performance attenuation mechanism, greatly reducing the complexity of modeling. However, existing studies have focused on the steady-state performance prediction of fuel cells before and after attenuation and the transient performance changes under fixed operating load conditions. There is no research on endurance cycle dynamic conditions, which makes the universality of the method and the prediction effect need to be further verified. Summary of the invention
[0004] To achieve the above objectives, this application provides the following technical solutions:
[0005] According to a first aspect of the present invention, the present invention claims a method for predicting fuel cell performance degradation based on a digital twin model, comprising:
[0006] Collecting multi-channel time series data measured by the test bench, preprocessing the multi-channel time series data, and obtaining standard modal data under multiple modes;
[0007] Establishing a long short-term memory network model in each modality respectively, slicing the standard modality data into training data and verification data according to the structure required by the long short-term memory network model, and obtaining a trained long short-term memory network model;
[0008] Preprocessing the input data of the prediction period, and inputting the trained long short-term memory network model to calculate the output voltage prediction value sequence of the fuel cell under each mode;
[0009] The output voltage prediction value sequence under each mode is integrated to obtain a complete time series of the output voltage prediction value under the durability cycle condition;
[0010] The long short-term memory network model is regularly updated by incremental learning to achieve dynamic mapping from the actual working state of the PEMFC system to the simulated digital twin model, and the prediction accuracy of the long short-term memory network model is regularly evaluated.
[0011] Furthermore, the multi-channel time series data measured by the acquisition bench is preprocessed to obtain standard modal data under multiple modes, and further includes:
[0012] Preprocessing the multi-channel time series data of the PEMFC bench measured performance obtained by the sensor, the preprocessing includes mode segmentation, smooth down sampling, indirect index calculation, model input variable selection and data standardization;
[0013] The mode segmentation is to segment the data into a plurality of modes and transition areas between the modes according to the current setting value;
[0014] The smooth downsampling is based on the sampling frequency of the original multi-channel time series data, and downsamples the multi-channel time series data within each second to a value;
[0015] The indirect index calculation is to calculate the working condition indirect index and the time information indirect index from the smooth down-sampled data;
[0016] The input model variables are selected by selecting a plurality of operating condition characteristics, time information characteristics and average output voltage as input model variables;
[0017] The data were normalized by converting all input variables into values within [0, 1] through min-max normalization.
[0018] Furthermore, the long short-term memory network model is established in each mode respectively, and the standard mode data is sliced into training data and verification data according to the structure required by the long short-term memory network model to obtain a trained long short-term memory network model, and further includes:
[0019] A long short-term memory network model is formed by connecting a sequence of multiple LSTM units and a fully connected network layer at the output end, an input model vector and a parameter to be learned of the long short-term memory network model are constructed, and model iteration training is performed on the long short-term memory network model according to the input model vector and the parameter to be learned;
[0020] Dividing the input model vector into a training set and a validation set according to time points, and converting the training set into a first input vector matrix and a first output voltage vector;
[0021] The loss function is set to square loss, and the SGD gradient descent algorithm or the Adam algorithm is used to back propagate the training model to update the parameters to be learned of the long short-term memory network model;
[0022] Converting the verification set into a second input vector matrix and a second output voltage vector, and determining the optimal model parameters of the long short-term memory network model according to the second input vector matrix and the second output voltage vector;
[0023] The first input vector matrix and the second input vector matrix are vertically spliced to obtain a third input vector matrix, and the third input vector matrix is input into the long short-term memory network model after adopting the optimal model parameters to obtain the long memory unit vector value and the short memory unit vector value at the end time.
[0024] Furthermore, the preprocessing of the input data of the prediction period and the input of the trained long short-term memory network model to calculate the output voltage prediction value sequence of the fuel cell under each mode also includes:
[0025] Perform mode segmentation, smooth down sampling, indirect index calculation, model input variable selection and data standardization on the operating condition characteristics and time information characteristics within the forecast period;
[0026] Based on the trained long short-term memory network model, the long memory unit vector value, the short memory unit vector value and the input vector at the end time are obtained to obtain the output average voltage prediction value per unit time after the end time;
[0027] The actual value is replaced with the output average voltage prediction value in the input vector of the next LSTM unit as the input vector, from which the predicted output of the next step is calculated, and the iteration is continued until a complete output voltage prediction value sequence is generated.
[0028] Furthermore, the fusion of the output voltage prediction value sequence under each mode to obtain a complete time series of output voltage prediction values under durability cycle conditions also includes:
[0029] The output voltage prediction value sequences given by the models under multiple modes are merged with the corresponding accumulated elapsed time to obtain a corresponding number of modal matrices, which respectively correspond to the prediction results of the modes;
[0030] The modal matrix after column merging is concatenated row by row in time order, and the transition area is filled by linear interpolation to obtain a complete second-by-second prediction result;
[0031] The output voltage prediction value sequence is restored to the original scale through the inverse transformation of the data standardization to obtain the output voltage prediction value in the complete time series.
[0032] Furthermore, the long short-term memory network model is regularly updated by incremental learning to achieve dynamic mapping from the real working state of the PEMFC system to the simulated digital twin model, and the prediction accuracy of the long short-term memory network model is regularly evaluated, and further includes:
[0033] Setting the corresponding time intervals for current training, verification and prediction, and performing training iteration updates on the long short-term memory network model according to the cycle length between model iterations;
[0034] When the prediction time node of each iteration cycle arrives, the accuracy of the long short-term memory network model is evaluated, and the normalized root mean square error, mean absolute percentage error, Pearson correlation coefficient and determination coefficient evaluation indicators are selected to evaluate the gap between the prediction result and the true value of the output average voltage.
[0035] The present application relates to the field of fuel cell testing technology, and in particular to a fuel cell performance attenuation prediction method based on a digital twin model, which collects multi-channel time series data and pre-processes to obtain standard modal data under multiple modes, establishes a long short-term memory network model, slices the standard modal data into training and verification data, inputs the input data of the time period to be predicted into the model to calculate the output voltage prediction value sequence; fuses to obtain the complete time series of the output voltage prediction value under the durability cycle condition; regularly updates the long short-term memory network model, and regularly evaluates the prediction accuracy of the long short-term memory network model. The present invention combines deep learning, multimodal learning and incremental learning to establish a new digital twin model for the performance attenuation process of PEMFC, which can provide real-time and long-term prediction of PEMFC performance, and provide meaningful and highly timely reference information for implementing effective health management and extending the service life of fuel cells. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A workflow diagram of a fuel cell performance degradation prediction method based on a digital twin model as claimed in an embodiment of the present application;
[0037] Figure 2 An LSTM unit structure diagram of a fuel cell performance attenuation prediction method based on a digital twin model as claimed in an embodiment of the present application;
[0038] Figure 3 A complete LSTM network structure diagram of a fuel cell performance degradation prediction method based on a digital twin model as claimed in an embodiment of the present application;
[0039] Figure 4 A comparison chart of bench measurement and model prediction curves for a fuel cell performance attenuation prediction method based on a digital twin model as claimed in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] The terms "first", "second" and "third" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first", "second" and "third" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of this application are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0042] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0043] Due to its significant advantages such as high energy conversion efficiency, zero emissions and low noise, proton exchange membrane fuel cells have shown great application prospects in the fields of transportation, portable device power and energy storage systems. The durability of proton exchange membrane fuel cells is affected by many factors such as material degradation and aging, frequent load changes, and water and heat management. At present, there is no unified or clear performance degradation mechanism and design guidance at home and abroad. Therefore, the prediction of fuel cell performance degradation is crucial for product optimization and life evaluation.
[0044] According to the first embodiment of the present invention, the present invention claims a method for predicting fuel cell performance degradation based on a digital twin model, referring to Figure 1 ,include:
[0045] Collecting multi-channel time series data measured by the test bench, preprocessing the multi-channel time series data, and obtaining standard modal data under multiple modes;
[0046] Establishing a long short-term memory network model in each modality respectively, slicing the standard modality data into training data and verification data according to the structure required by the long short-term memory network model, and obtaining a trained long short-term memory network model;
[0047] Preprocessing the input data of the prediction period, and inputting the trained long short-term memory network model to calculate the output voltage prediction value sequence of the fuel cell under each mode;
[0048] The output voltage prediction value sequence under each mode is integrated to obtain a complete time series of the output voltage prediction value under the durability cycle condition;
[0049] The long short-term memory network model is regularly updated by incremental learning to achieve dynamic mapping from the actual working state of the PEMFC system to the simulated digital twin model, and the prediction accuracy of the long short-term memory network model is regularly evaluated.
[0050] Furthermore, the multi-channel time series data measured by the acquisition bench is preprocessed to obtain standard modal data under multiple modes, and further includes:
[0051] Preprocessing the multi-channel time series data of the PEMFC bench measured performance obtained by the sensor, the preprocessing includes mode segmentation, smooth down sampling, indirect index calculation, model input variable selection and data standardization;
[0052] The mode segmentation is to segment the data into a plurality of modes and transition areas between the modes according to the current setting value;
[0053] The smooth downsampling is based on the sampling frequency of the original multi-channel time series data, and downsamples the multi-channel time series data within each second to a value;
[0054] The indirect index calculation is to calculate the working condition indirect index and the time information indirect index from the smooth down-sampled data;
[0055] The input model variables are selected by selecting a plurality of operating condition characteristics, time information characteristics and average output voltage as input model variables;
[0056] The data were normalized by converting all input variables into values within [0, 1] through min-max normalization.
[0057] In this embodiment, mode segmentation: data is segmented into multiple modes and transition regions between modes according to the current setting value, as shown in Table 1.
[0058] Table 1 Load composition in the test cycle
[0059]
[0060] Smooth downsampling: Follow the steps below.
[0061] Select the cycle number, cumulative elapsed time, battery stack load current, cathode gas flow, anode gas flow, cathode inlet pressure, anode inlet pressure, cathode inlet temperature, anode inlet temperature, cathode dew point temperature, anode dew point temperature, coolant inlet pressure, coolant inlet temperature, coolant inlet flow, and average single-chip voltage of the fuel cell stack from each modal data and save them. Among them, the cycle number is 1~2000, each cycle takes 30 minutes, and polarization is performed every 200 cycles; the cumulative elapsed time is the time from the time when the fuel cell stack starts working to the current time point, in seconds (s); the gas supply metering ratio has no unit; the fuel cell stack load current unit is ampere (A); the pressure unit is kilopascal (kPa); the temperature unit is Celsius (℃); the coolant flow unit is liter / minute (LPM), and the voltage unit is volt (V).
[0062] The sampling frequency of the original data is 5Hz, and the data within each second is downsampled to one value. The cycle number is the first value within the second, the cumulative elapsed time is the last value within the second, and the remaining quantities are the average values within the second. In the case where there are less than 5 data in a second due to modal segmentation, if the number of data in the second is not less than 3, it is processed in the same way; otherwise, the data of the second is discarded.
[0063] Two indirect indicators of working conditions and three indirect indicators of time information are further calculated from the downsampled data.
[0064] Follow these steps:
[0065] The anode relative humidity and cathode relative humidity are calculated by the dew point temperature and the inlet air temperature. The calculation formula is as follows:
[0066] (1);
[0067] (2);
[0068] (3) ;
[0069] in represent the anode and cathode respectively, Indicates the dew point temperature, Indicates the intake air temperature, When m is Anode and Cathode, it represents the actual water vapor partial pressure at the anode and cathode respectively. represents the saturated water vapor partial pressure, When m is Anode and Cathode, it represents the relative humidity of the anode and cathode respectively.
[0070] The three time information features are calculated by accumulating the elapsed time and the cycle number. The calculation formula is as follows:
[0071] ; (4)
[0072] ; (5)
[0073] ; (6)
[0074] in Indicates the accumulated elapsed time. represents the time since the last polarization, Indicates the elapsed time within the loop, Indicates the time since the last record.
[0075] Selection of model input variables: 12 operating condition characteristics (as shown in Table 2), 4 time information characteristics (as shown in Table 3) and the average output voltage are selected as model input variables.
[0076] Table 2 Working condition characteristics
[0077]
[0078] Table 3 Time information feature table
[0079]
[0080] Data standardization: All 17 input variables are converted to values within [0,1] through min-max normalization. Specifically, it is calculated according to the following formula
[0081] (7);
[0082] in represents the normalized value of the input variable, is the current value of the input variable, and are the minimum and maximum values of all input variable data. For example, if the average voltage at the current moment is 0.8V, and the maximum and minimum average voltages in the data are 0.9V and 0.5V respectively, then the normalized value of the average voltage at the current moment is .
[0083] Furthermore, the long short-term memory network model is established in each mode respectively, and the standard mode data is sliced into training data and verification data according to the structure required by the long short-term memory network model to obtain a trained long short-term memory network model, and further includes:
[0084] A long short-term memory network model is formed by connecting a sequence of multiple LSTM units and a fully connected network layer at the output end, an input model vector and a parameter to be learned of the long short-term memory network model are constructed, and model iteration training is performed on the long short-term memory network model according to the input model vector and the parameter to be learned;
[0085] Dividing the input model vector into a training set and a validation set according to time points, and converting the training set into a first input vector matrix and a first output voltage vector;
[0086] The loss function is set to square loss, and the SGD gradient descent algorithm or the Adam algorithm is used to back propagate the training model to update the parameters to be learned of the long short-term memory network model;
[0087] Converting the verification set into a second input vector matrix and a second output voltage vector, and determining the optimal model parameters of the long short-term memory network model according to the second input vector matrix and the second output voltage vector;
[0088] The first input vector matrix and the second input vector matrix are vertically spliced to obtain a third input vector matrix, and the third input vector matrix is input into the long short-term memory network model after adopting the optimal model parameters to obtain the long memory unit vector value and the short memory unit vector value at the end time.
[0089] In this embodiment, the long short-term memory network model (LSTM) has a network structure consisting of a sequence of LSTM units connected and a fully connected network layer at the output end. The LSTM unit structure is as follows: Figure 2 The complete network structure is shown in Figure 3 shown.
[0090] In the LSTM unit at time t, the model input vector It consists of three parts: is the 12-dimensional working condition characteristic at time t, is the 4-dimensional time information feature at time t, is the previous moment (i.e. moment ) output voltage; and are the previous moment (i.e. moment ) of short memory vectors and long memory vectors, where the initial long memory vector and short memory vector Set to zero vector; is the transient memory vector at the current moment; are three threshold vectors, which control the forgetting rate, input rate and output rate of the LSTM unit respectively; is the weight coefficient matrix, are bias vectors, which are the parameters of the LSTM unit and are shared in the entire LSTM network, that is, the parameter values of different LSTM units are the same; the forward iterative calculation in the LSTM unit can be expressed by the following formulas (8) ~ (13):
[0091] (8);
[0092] (9);
[0093] (10);
[0094] (11);
[0095] (12);
[0096] (13);
[0097] in is the sigmoid activation function, is the hyperbolic tangent function, represents matrix multiplication, Represents the product of two elements at corresponding positions in the matrix. Through the above calculation, the LSTM network updates the long memory and short memory vectors of the LSTM unit at the previous moment and connects them to the next LSTM unit. The weight coefficient matrix and bias vector of the fully connected network layer are recorded as and , the parameters to be learned of the entire LSTM network are
[0098] .
[0099] Model training is performed in the following steps:
[0100] Data is divided into and Two time periods, time periods The data is used for model training (hereinafter referred to as training set), time period The data is used for cross-validation of the model (hereinafter referred to as the validation set).
[0101] First, using the training set, the model input is stacked by time into the following matrix form:
[0102] (14);
[0103] The tth row of the matrix corresponds to the LSTM unit input vector at time t.
[0104] The model output, that is, the output voltage from time 1 to time t is expressed as the following one-dimensional vector form:
[0105] (15);
[0106] Set the loss function to square loss, use the SGD gradient descent algorithm or the Adam algorithm to back propagate the training model, and update the model parameters To illustrate the specific method, we take the SGD method as an example. Let the parameter vector be The square loss is
[0107] (16);
[0108] in is the output voltage prediction value at time i output by the model. Let the current iteration round be k, and the input matrix Substitute into the model and calculate the parameter vector as The square loss , then update the parameter vector to
[0109] (17);
[0110] in Indicates that the parameter is Time Function The gradient vector of is obtained by back propagation of the neural network gradient; is the learning rate. Each round of parameter iteration update process also saves the time The long memory unit vector value and short memory cell vector value , which will be used as the initial memory vector of the validation data in the model validation. The hyperparameter settings of the model and training process in this study are detailed in Table 4.
[0111] Table 4 Hyperparameter settings of LSTM model
[0112]
[0113] * Initial training uses 500 epochs; subsequent incremental learning uses 300 epochs.
[0114] Store the validation set in the same way as the input matrix and output vector:
[0115] (18) ;
[0116] (19);
[0117] Use the validation set data to determine the optimal model parameters. For each round of iteration, the initial long memory unit and short memory unit at the moment are taken as and (they have been calculated in the previous step), and the validation set is input into the matrix input model to obtain the output prediction value vector, recorded as
[0118] (20) ;
[0119] Calculate the loss on the validation set
[0120] (twenty one);
[0121] The model parameters that achieve the minimum iteration round of the above loss are selected as the optimal model parameters For example, the validation set loss after 500 iterations is middle, is the minimum value, then the optimal parameters of the model are selected as .
[0122] The input matrix constructed by training data and verification data is concatenated vertically as
[0123] (twenty two) ;
[0124] And input the optimal model to get the time The long memory unit vector value and short memory cell vector value .
[0125] Furthermore, the preprocessing of the input data of the prediction period and the input of the trained long short-term memory network model to calculate the output voltage prediction value sequence of the fuel cell under each mode also includes:
[0126] Perform mode segmentation, smooth down sampling, indirect index calculation, model input variable selection and data standardization on the operating condition characteristics and time information characteristics within the forecast period;
[0127] Based on the trained long short-term memory network model, the long memory unit vector value, the short memory unit vector value and the input vector at the end time are obtained to obtain the output average voltage prediction value per unit time after the end time;
[0128] The actual value is replaced with the output average voltage prediction value in the input vector of the next LSTM unit as the input vector, from which the predicted output of the next step is calculated, and the iteration is continued until a complete output voltage prediction value sequence is generated.
[0129] In this embodiment, the time period The operating condition characteristics and time information characteristics are processed similarly to the previous steps, including modal segmentation, smoothing downsampling, indirect index calculation, model input variable selection and data standardization.
[0130] Based on the trained LSTM model, from time Initially, the long memory unit vector value and the short memory unit vector value are taken as and , the input vector is , get the time The predicted output average voltage In order to achieve multi-step prediction, the true value is added to the input vector of the next LSTM unit. Replace with predicted value , that is, take the input vector as , from which we can get the next prediction output Continue the above iterations until a complete prediction sequence is generated. .
[0131] Furthermore, the fusion of the output voltage prediction value sequence under each mode to obtain a complete time series of output voltage prediction values under durability cycle conditions also includes:
[0132] The output voltage prediction value sequences given by the models under multiple modes are merged in columns according to the accumulated elapsed time to obtain a corresponding number of modal matrices, which respectively correspond to the prediction results of the modes;
[0133] The modal matrix after column merging is concatenated row by row in time order, and the transition area is filled by linear interpolation to obtain a complete second-by-second prediction result;
[0134] The output voltage prediction value sequence is restored to the original scale through the inverse transformation of the data standardization to obtain the output voltage prediction value in the complete time series.
[0135] In this embodiment, the output prediction value sequences given by the models under multiple modes are merged according to the accumulated elapsed time (i.e., cbind command in Python). For example, if the prediction value sequences under modes 1-8 and the corresponding accumulated elapsed time (corresponding to the time information feature t 1, for convenience, the following examples start from 1s)
[0136]
[0137] and
[0138]
[0139] After merging the predicted value and the cumulative elapsed time column, the following matrices are obtained, corresponding to the prediction results of multiple modes:
[0140]
[0141]
[0142] The matrix after column merging is concatenated in chronological order (i.e., the rbind command in Python), and the transition area is filled by linear interpolation to obtain a complete second-by-second prediction result. Continuing with the specific example, the matrix after row concatenation and the matrix of the transition area filled by linear interpolation are
[0143]
[0144] By the inverse transformation of formula (7)
[0145] (twenty three);
[0146] The model prediction value sequence is restored to the original scale to obtain the output voltage prediction value sequence. The method is explained through examples. According to the settings, the maximum and minimum average voltages in the original data are =0.9V and =0.5V, then the output voltage prediction value at the first second is V The model prediction values from 2 to 30 seconds are scaled down in the same way to obtain the complete output voltage prediction value sequence as follows:
[0147]
[0148] Furthermore, the long short-term memory network model is regularly updated by incremental learning to achieve dynamic mapping from the real working state of the PEMFC system to the simulated digital twin model, and the prediction accuracy of the long short-term memory network model is regularly evaluated, and further includes:
[0149] Setting the corresponding time intervals for current training, verification and prediction, and performing training iteration updates on the long short-term memory network model according to the cycle length between model iterations;
[0150] When the prediction time node of each iteration cycle arrives, the accuracy of the long short-term memory network model is evaluated, and the normalized root mean square error, mean absolute percentage error, Pearson correlation coefficient and determination coefficient evaluation indicators are selected to evaluate the gap between the prediction result and the true value of the output average voltage.
[0151] In this embodiment, the time interval of current training, verification and prediction is , and , the cycle length between model iterations is , the three time spans will be at time points Updated to , and Taking the parameters obtained from the original model training as the starting point, preprocessing, training, testing and fusion are performed in the same way as S1 to S4, and the number of training iterations is set to 300, so as to update the model over time and ensure the reliability of model prediction.
[0152] At the prediction time node of each iteration cycle The model accuracy is evaluated upon arrival. Four evaluation indicators, namely normalized root mean square error (nRMSE), mean absolute percentage error (MAPE), Pearson correlation coefficient (PCC) and determination coefficient (R2), are selected to evaluate the gap between the predicted result and the true value of the output average voltage: (twenty four);
[0153] (25);
[0154] (26);
[0155] (27) ;
[0156] in, and For time point The predicted and true values of and is the average of all predicted values and the average of all true values, The length of the prediction sequence. When the nRMSE and MAPE values increase significantly, or the PCC and R2 values decrease significantly, it is necessary to reset the starting time point of the training data and further analyze the changes in the system. Short-term prediction and long-term prediction can use different frequencies of model evaluation processes. Figure 4 It is a comparison curve diagram of the actual measurement and prediction of this embodiment.
[0157] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0158] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the content of the specification and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.
[0159] The specific implementation methods of the invention are described in detail above, but they are only examples, and the present application is not limited to the specific implementation methods described above. For those skilled in the art, any equivalent modification or substitution of the invention is also within the scope of the present application, and therefore, the equalization, modification, and improvement made without departing from the spirit and principle of the present application should be included in the scope of the present application.
Claims
1. A fuel cell performance degradation prediction method based on a digital twin model, characterized in that: include: Collecting multi-channel time series data measured by the test bench, preprocessing the multi-channel time series data, and obtaining standard modal data under multiple modes; A long short-term memory network model is formed by connecting a sequence of multiple LSTM units and a fully connected network layer at the output end, an input model vector and a parameter to be learned of the long short-term memory network model are constructed, and model iteration training is performed on the long short-term memory network model according to the input model vector and the parameter to be learned; Dividing the input model vector into a training set and a validation set according to time points, and converting the training set into a first input vector matrix and a first output voltage vector; The loss function is set to square loss, and the SGD gradient descent algorithm or the Adam algorithm is used to back propagate the training model to update the parameters to be learned of the long short-term memory network model; Converting the verification set into a second input vector matrix and a second output voltage vector, and determining the optimal model parameters of the long short-term memory network model according to the second input vector matrix and the second output voltage vector; The first input vector matrix and the second input vector matrix are vertically spliced to obtain a third input vector matrix, and the third input vector matrix is input into the long short-term memory network model after adopting the optimal model parameters to obtain the long memory unit vector value and the short memory unit vector value at the end time; Preprocessing the input data of the prediction period, and inputting the trained long short-term memory network model to calculate the output voltage prediction value sequence of the fuel cell under each mode; The output voltage prediction value sequence under each mode is integrated to obtain a complete time series of the output voltage prediction value under the durability cycle condition; The long short-term memory network model is regularly updated by incremental learning to achieve dynamic mapping from the actual working state of the PEMFC system to the simulated digital twin model, and the prediction accuracy of the long short-term memory network model is regularly evaluated; When training the model, the data is divided into and Two time periods, time periods The data is used for model training as the training set, time period The data is used for cross-validation of the model as a validation set; Using the training set, the model input is stacked over time in matrix form: ; The tth row of the matrix corresponds to the LSTM unit input vector at time t; Output the model, that is, from time 1 to time The output voltage is expressed as a one-dimensional vector form: ; Set the loss function to square loss, use the SGD gradient descent algorithm or the Adam algorithm to back propagate the training model, and update the model parameters .
2. According to claim 1, a fuel cell performance attenuation prediction method based on a digital twin model is characterized in that: The multi-channel time series data measured by the acquisition bench is preprocessed to obtain standard modal data under multiple modes, and further includes: Preprocessing the multi-channel time series data of the PEMFC bench measured performance obtained by the sensor, the preprocessing includes mode segmentation, smooth down sampling, indirect index calculation, model input variable selection and data standardization; The mode segmentation is to segment the data into a plurality of modes and transition areas between the modes according to the current setting value; The smooth downsampling is based on the sampling frequency of the original multi-channel time series data, and downsamples the multi-channel time series data within each second to a value; The indirect index calculation is to calculate the working condition indirect index and the time information indirect index from the smooth down-sampled data; The input model variables are selected by selecting a plurality of operating condition characteristics, time information characteristics and average output voltage as input model variables; The data were normalized by converting all input variables into values within [0, 1] through min-max normalization.
3. The method for predicting fuel cell performance attenuation based on a digital twin model according to claim 2, characterized in that: The preprocessing of the input data of the prediction period and the input of the trained long short-term memory network model to calculate the output voltage prediction value sequence of the fuel cell under each mode also includes: Perform mode segmentation, smooth down sampling, indirect index calculation, model input variable selection and data standardization on the operating condition characteristics and time information characteristics within the forecast period; Based on the trained long short-term memory network model, the long memory unit vector value, the short memory unit vector value and the input vector at the end time are obtained to obtain the output average voltage prediction value per unit time after the end time; The actual value is replaced with the output average voltage prediction value in the input vector of the next LSTM unit as the input vector, from which the predicted output of the next step is calculated, and the iteration is continued until a complete output voltage prediction value sequence is generated.
4. The method for predicting fuel cell performance attenuation based on a digital twin model according to claim 3 is characterized in that: The step of fusing the output voltage prediction value sequence under each mode to obtain a complete time series of output voltage prediction values under durability cycle conditions further includes: The output voltage prediction value sequences given by the models under multiple modes are merged in columns according to the accumulated elapsed time to obtain a corresponding number of modal matrices, which respectively correspond to the prediction results of the modes; The modal matrix after column merging is concatenated row by row in time order, and the transition area is filled by linear interpolation to obtain a complete second-by-second prediction result; The output voltage prediction value sequence is restored to the original scale through the inverse transformation of the data standardization to obtain the output voltage prediction value in the complete time series.
5. The method for predicting fuel cell performance attenuation based on a digital twin model according to claim 4, characterized in that: The method of regularly updating the long short-term memory network model by incremental learning to achieve dynamic mapping from the actual working state of the PEMFC system to the simulated digital twin model and regularly evaluating the prediction accuracy of the long short-term memory network model also includes: Setting the corresponding time intervals for current training, verification and prediction, and performing training iteration updates on the long short-term memory network model according to the cycle length between model iterations; When the prediction time node of each iteration cycle arrives, the accuracy of the long short-term memory network model is evaluated, and the normalized root mean square error, mean absolute percentage error, Pearson correlation coefficient and determination coefficient evaluation indicators are selected to evaluate the gap between the prediction result and the true value of the output average voltage.
Citation Information
Patent Citations
Multi-modal fusion fuel cell system performance degradation prediction method
CN115098999A
Method for constructing digital twin model of power battery
CN117574762A