A method and system for correcting parameters of fuel cell voltage loss equation

By eliminating the abnormality of fuel cell parameter variables and filling data, combined with iterative update of the reinforcement learning network, the parameter drift problem of the fuel cell voltage loss model under dynamic operating conditions is solved, and high-precision online parameter correction and system control are achieved.

CN120109224BActive Publication Date: 2025-08-08NANCHANG AUTOMOTIVE INST OF INTELLIGENCE & NEW ENERGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510578644.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-08
Estimated Expiration
2045-05-07

AI Technical Summary

Technical Problem

The existing fuel cell voltage loss model is difficult to update parameters in real time under dynamic operating conditions, resulting in a decrease in prediction accuracy and affecting the reliability of system control strategies. In addition, traditional methods are difficult to deal with sensor noise and data loss, and fail to make full use of multi-dimensional information to improve the stability of parameter estimation.

Method used

By obtaining the original data of the parameter variables of the fuel cell, performing abnormal elimination and data filling, constructing the output voltage equation and determining the fitting control matrix, initializing the reinforcement learning network, iteratively update the parameter array based on the total loss function, calculating the evaluation value to determine the best parameter array, inversely solving the output voltage equation, and realizing online calibration and parameter correction.

Benefits of technology

Under the material attenuation and environmental fluctuations during long-term operation of fuel cells, the parameters are updated in real time through data-driven methods to improve model prediction accuracy, avoid destructive testing, and enhance the reliability of system control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120109224B_ABST
    Figure CN120109224B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for correcting parameters of a fuel cell voltage loss equation, the method comprising performing abnormal elimination and data filling on original data of parameter variables; constructing an output voltage equation, determining a fitting control matrix, and determining a parameter array; initializing a reinforcement learning network, determining a total loss function, and iteratively updating the parameter array in the reinforcement learning network; calculating an evaluation value of each iterative parameter array, determining a score value based on the evaluation value, determining an optimal parameter array based on the score value, and inversely solving the output voltage equation based on the optimal parameter array. The present invention can, in a data-driven manner, update parameters in real time through online calibration in the event of parameter drift due to material attenuation and environmental fluctuations during long-term operation of the fuel cell, thereby improving model prediction accuracy and avoiding destructive testing of the fuel cell system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of parameter correction, and in particular relates to a method and system for correcting parameters of a fuel cell voltage loss equation. Background Art

[0002] Fuel cells, as efficient and clean energy conversion devices, hold broad application prospects in new energy vehicles, distributed power generation, aerospace, and other fields. Their core advantage lies in their direct conversion of chemical energy into electrical energy, with theoretical energy conversion efficiencies exceeding 60%, and the sole product being water, meeting the demands of a low-carbon economy and sustainable development. However, fuel cells still face numerous technical challenges in practical operation, including the precise modeling and parameter correction of voltage losses, which directly impact performance optimization, lifespan prediction, and system control accuracy.

[0003] The output voltage of a fuel cell is determined by subtracting various polarization losses from the theoretical thermodynamic voltage, primarily activation polarization losses, ohmic polarization losses, and concentration polarization losses. Classic semi-empirical models (such as the Butler-Volmer equation, Ohm's law, and the mass transfer equation) are often used to describe the mathematical relationships between these loss terms. However, key parameters in the model (such as exchange current density, membrane resistance, and mass transfer coefficient) are not fixed values but vary dynamically with factors such as operating conditions (temperature, pressure, and humidity), material aging, and fuel impurities. Traditional modeling methods often determine parameters based on laboratory steady-state data or theoretical assumptions, making it difficult to adapt to the nonlinearity, time-varying nature, and uncertainty of actual dynamic operating environments.

[0004] Early parameter corrections relied primarily on two approaches: Mechanism-driven methods: deriving analytical expressions based on electrochemical reaction mechanisms and fitting parameters to experimental data. For example, polarization curves are used to segment activation losses and ohmic losses. The advantage of such methods is their clear physical meaning, but under complex operating conditions (such as start-stop cycles and sudden load changes), they are prone to error accumulation due to parameter coupling and simplified assumptions. Offline calibration methods: Obtaining typical operating parameters through laboratory testing and establishing parameter lookup tables or empirical formulas. However, material degradation (such as catalyst deactivation and membrane dehydration) and environmental fluctuations during long-term fuel cell operation can cause parameter drift. Offline calibration makes it difficult to update parameters in real time, and the model's prediction accuracy gradually decreases. Studies have shown that under dynamic conditions, the voltage prediction error of traditional methods can reach 5%-10%, seriously affecting the reliability of system control strategies (such as air supply management and water and heat balance control).

[0005] In recent years, data-driven technologies have provided new insights for parameter correction, but existing technologies still have significant limitations. For example, some technologies employ neural networks or support vector regression, such as constructing purely data-driven black-box models. While these can improve short-term prediction accuracy, their detachment from physical mechanisms renders the results uninterpretable and difficult to embed into control systems based on traditional equations. Other methods attempt to fuse mechanisms and data, but these only address a single parameter and fail to address the problem of coordinated correction of multiple parameters. Methods that rely on deep learning, however, require excessive computing power and are difficult to implement in real time on embedded devices. Furthermore, existing technologies are insufficiently robust to real-world interference such as sensor noise and missing data, and often rely on a single data source (e.g., voltage-current curves), failing to fully utilize multi-dimensional information such as temperature, air pressure, and flow to improve the stability of parameter estimation. Summary of the Invention

[0006] In order to solve the above technical problems, the present invention provides a method and system for correcting parameters of a fuel cell voltage loss equation, which are used to solve the technical problems in the prior art.

[0007] In one aspect, the present invention provides the following technical solution: a method for correcting parameters of a fuel cell voltage loss equation, comprising:

[0008] Acquiring original data of parameter variables of the fuel cell, and performing abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data;

[0009] constructing an output voltage equation based on the correction data, determining a fitting comparison matrix based on the output voltage equation, and determining a parameter array based on the fitting comparison matrix;

[0010] Initializing a reinforcement learning network based on the parameter array, determining a total loss function, and iteratively updating the parameter array in the reinforcement learning network based on the total loss function to obtain a plurality of iterated parameter arrays;

[0011] Calculate the evaluation value of each iterative parameter array, determine the score value based on the evaluation value, determine the optimal parameter array based on the score value, and inversely solve the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters.

[0012] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention first obtains the original data of the parameter variables of the fuel cell, eliminates anomalies and fills the original data of the parameter variables to obtain corrected data; then constructs an output voltage equation based on the corrected data, determines a fitting control matrix based on the output voltage equation, and determines a parameter array based on the fitting control matrix; then initializes a reinforcement learning network based on the parameter array, determines a total loss function, and iteratively updates the parameter array in the reinforcement learning network based on the total loss function to obtain several iterative parameter arrays; then calculates an evaluation value of each iterative parameter array, determines a score value based on the evaluation value, determines an optimal parameter array based on the score value, and inversely solves the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters. The present invention can, in a data-driven manner, update parameters in real time through online calibration in the case of parameter drift caused by material attenuation (such as catalyst deactivation, membrane dehydration) and environmental fluctuations during long-term operation of the fuel cell, thereby improving model prediction accuracy and avoiding destructive testing of the fuel cell system.

[0013] Preferably, the steps of obtaining raw data of parameter variables of the fuel cell and performing abnormal elimination and data filling on the raw data of the parameter variables to obtain corrected data include:

[0014] Acquiring raw data of parameter variables of the fuel cell, wherein the raw data includes actual current density, temperature, pressure, and output voltage;

[0015] Calculate the anomaly detection value for each data point in the original data :

[0016] ;

[0017] Where, is the current density, For sampling points The corresponding current density, is the standard deviation;

[0018] If the abnormal detection value of the data point in the original data If the number of consecutive abnormal data points is greater than the first preset judgment value, the data point is removed as abnormal data. If the number of consecutive abnormal data points is greater than the second preset judgment value, the interval corresponding to the consecutive abnormal data points is taken as the abnormal interval.

[0019] Starting from the abnormal interval, search for normal data points to the left and right to obtain the left normal data point. With right normal data points , fill the abnormal interval with data based on the left normal data point and the right normal data point to obtain corrected data:

[0020] ;

[0021] Where, represents the data point after data filling, Represents the distance between the right normal data point and the first data point in the abnormal interval, Indicates the location of the first data point in the abnormal interval, express Position in the original data.

[0022] Preferably, the steps of constructing an output voltage equation based on the correction data, determining a fitting comparison matrix based on the output voltage equation, and determining a parameter array based on the fitting comparison matrix include:

[0023] Splitting the total voltage loss into activation polarization , Ohmic polarization and concentration polarization , to obtain the initial voltage equation:

[0024] ;

[0025] Where, is the actual output voltage, is the temperature, is the bidirectional current density of the electrode reaction in equilibrium, is the charge transfer coefficient, is the sum of electrolyte, electrode and contact resistance, is the limiting current density, is the gas constant, is the number of electrons transferred in the reaction, is the Faraday constant, is a constant, is the current density;

[0026] Parameter extraction and simplified fitting are performed on the initial voltage equation to obtain the output voltage equation:

[0027] ;

[0028] Where, These are the first to sixth parameters to be corrected;

[0029] The fitting comparison matrix is determined based on the initial voltage equation and the output voltage equation:

[0030] ;

[0031] Where, Indicates the first to twelfth conversion relationship parameters;

[0032] Determine a parameter array based on the fitting control matrix .

[0033] Preferably, the step of initializing the reinforcement learning network based on the parameter array and determining the total loss function includes:

[0034] Initialize the reinforcement learning network based on the parameter array and initialize the reward function based on the reinforcement learning network:

[0035] ;

[0036] Where, represents the value of the reward function, is the error between the theoretical output voltage and the output voltage, is the error change value, are the first and second factors respectively;

[0037] Collect trajectory data for each time step , and calculate the discounted return for each of the trajectory data :

[0038] ;

[0039] Where, is the parameter array, Indicates the adjustment amount of the parameters in the parameter array, Indicates the The value of the reward function, represents the step length when the trajectory ends, is the current time step;

[0040] Calculate the generalized odds estimate :

[0041] ;

[0042] Where, Indicates the The contribution of the TD error of the step to the current advantage value, is the exponential decay weight;

[0043] Based on the generalized advantage estimate 、The discount return Calculate the first loss separately Second loss ;

[0044] Calculate entropy bonus :

[0045] ;

[0046] Where, Indicates that the status Select Action The network output probability density of

[0047] Based on the first loss The second loss , the entropy reward item Determine the total loss function :

[0048] ;

[0049] Where, are the first and second weight coefficients respectively.

[0050] Preferably, the generalized advantage estimate 、The discount return Calculate the first loss separately Second loss The steps include:

[0051] Based on the generalized advantage estimate Calculate the first loss :

[0052] ;

[0053] ;

[0054] Where, represents the average loss over all sampling time steps, is the probability ratio of choosing the same action by the new strategy and the old strategy, is the cutoff threshold, Represents a deep learning value;

[0055] Based on the discount return Determine the second loss :

[0056] ;

[0057] Where, is the network prediction value.

[0058] Preferably, the steps of calculating an evaluation value of each iterative parameter array, determining a score value based on the evaluation value, and determining an optimal parameter array based on the score value include:

[0059] Computes the first evaluated value of the parameter array for each of the iterations , the second evaluation value , the third evaluation value , the fourth evaluation value ;

[0060] Based on the first evaluation value , the second evaluation value , the third evaluation value , the fourth evaluation value Calculate the rating value :

[0061] ;

[0062] Where, denote the first, second, third, and fourth adjustment weights respectively;

[0063] The iterative parameter array corresponding to the highest score value is taken as the optimal parameter array.

[0064] Preferably, the first evaluation value of each of the iterative parameter arrays is calculated , the second evaluation value , the third evaluation value , the fourth evaluation value The steps include:

[0065] Computes the first evaluated value of the parameter array for each of the iterations :

[0066] ;

[0067] Where, For the The value of the reward function corresponding to the sampling point, is the window size;

[0068] Computes the second evaluation value of the parameter array for each of the iterations :

[0069] ;

[0070] Where, is the step length when the trajectory ends, For the The amount of change in trajectory data corresponding to each sampling point;

[0071] Calculates the third evaluation value of the parameter array on each of the iterations :

[0072] ;

[0073] Where, is the network prediction value, In return for a discount;

[0074] Calculates the fourth evaluation value of the parameter array for each of the said iterations :

[0075] ;

[0076] Where, represents the average reward under the test set distribution, represents the average reward under the training set distribution.

[0077] In a second aspect, the present invention provides the following technical solution: a fuel cell voltage loss equation parameter correction system, the system comprising:

[0078] A filling module is used to obtain original data of parameter variables of the fuel cell, and perform abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data;

[0079] an array module, configured to construct an output voltage equation based on the correction data, determine a fitting comparison matrix based on the output voltage equation, and determine a parameter array based on the fitting comparison matrix;

[0080] an iteration module, configured to initialize a reinforcement learning network based on the parameter array, determine a total loss function, and iteratively update the parameter array in the reinforcement learning network based on the total loss function to obtain a plurality of iterated parameter arrays;

[0081] A correction module is used to calculate an evaluation value of each of the iterative parameter arrays, determine a score value based on the evaluation value, determine an optimal parameter array based on the score value, and inversely solve the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters.

[0082] In a third aspect, the present invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, the method for correcting the fuel cell voltage loss equation parameters as described above is implemented.

[0083] In a fourth aspect, the present invention provides the following technical solution: a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-mentioned method for correcting the parameters of the fuel cell voltage loss equation. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0085] Figure 1 This is a flow chart of a method for correcting parameters of a fuel cell voltage loss equation provided in the first embodiment of the present invention;

[0086] Figure 2 This is a structural block diagram of a fuel cell voltage loss equation parameter correction system provided in the second embodiment of the present invention;

[0087] Figure 3 A schematic diagram of the hardware structure of a computer provided in another embodiment of the present invention.

[0088] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION

[0089] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.

[0090] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.

[0091] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0092] In the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "installed," "connected," "connected," "fixed," etc. should be understood in a broad sense. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the embodiments of the present invention based on specific circumstances.

[0093] Example 1

[0094] In the first embodiment of the present invention, Figure 1 As shown, a method for correcting parameters of a fuel cell voltage loss equation includes:

[0095] S1. Obtaining original data of parameter variables of a fuel cell, and performing abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data;

[0096] Wherein, the step S1 includes:

[0097] S11, obtaining original data of parameter variables of the fuel cell, wherein the original data includes actual current density, temperature, pressure, and output voltage;

[0098] Specifically, the fuel cell voltage loss equation parameter correction method provided by the present invention is aimed at material attenuation and environmental fluctuations that occur during the testing of the fuel cell system. Therefore, the test bench can read the original data of the fuel cell parameter variables through sensors.

[0099] S12. Calculate the abnormality detection value of each data point in the original data :

[0100] ;

[0101] Where, is the current density, For sampling points The corresponding current density, is the standard deviation.

[0102] S13, if the abnormal detection value of the data point in the original data If the number of consecutive abnormal data points is greater than the first preset judgment value, the data point is removed as abnormal data. If the number of consecutive abnormal data points is greater than the second preset judgment value, the interval corresponding to the consecutive abnormal data points is taken as the abnormal interval.

[0103] Specifically, the first preset judgment value here is 3, and the second preset judgment value is 2.

[0104] S14, starting from the abnormal interval, search for normal data points to the left and right respectively to obtain the left normal data point With right normal data points , fill the abnormal interval with data based on the left normal data point and the right normal data point to obtain corrected data:

[0105] ;

[0106] Where, represents the data point after data filling, Represents the distance between the right normal data point and the first data point in the abnormal interval, Indicates the location of the first data point in the abnormal interval, express Position in the original data;

[0107] Specifically, in the process of searching for normal data points, the abnormal interval is used as the starting point and the search is performed toward the left. The first normal data point found on the left is used as the left normal data point. Similarly, the first normal data point found on the right is used as the right normal data point.

[0108] S2. constructing an output voltage equation based on the corrected data, determining a fitting comparison matrix based on the output voltage equation, and determining a parameter array based on the fitting comparison matrix;

[0109] Wherein, the step S2 includes:

[0110] S21, split the total voltage loss into activation polarization , Ohmic polarization and concentration polarization , to obtain the initial voltage equation:

[0111] ;

[0112] Where, is the actual output voltage, is the temperature, is the bidirectional current density of the electrode reaction in equilibrium, is the charge transfer coefficient, is the sum of electrolyte, electrode and contact resistance, is the limiting current density, is the gas constant, is the number of electrons transferred in the reaction, is the Faraday constant, is a constant, is the current density;

[0113] Specifically, the split of the total voltage loss is determined according to the current density, and for the constant In terms of current density, it can be understood as the total voltage of the fuel cell, and the limiting current density can be regarded as a constant.

[0114] S22. Perform parameter extraction and simplified fitting on the initial voltage equation to obtain an output voltage equation:

[0115] ;

[0116] Where, They are the first to sixth parameters to be corrected respectively.

[0117] S23. Determine a fitting comparison matrix based on the initial voltage equation and the output voltage equation:

[0118] ;

[0119] Where, Indicates the first to twelfth conversion relationship parameters;

[0120] The first to twelfth conversion relationship parameters represent the conversion relationship between the parameters in the initial voltage equation and the parameters in the output voltage equation.

[0121] S24, determining a parameter array based on the fitting comparison matrix .

[0122] S3. Initializing a reinforcement learning network based on the parameter array, determining a total loss function, and iteratively updating the parameter array in the reinforcement learning network based on the total loss function to obtain a plurality of iterated parameter arrays;

[0123] Wherein, the step S3 includes:

[0124] S31. Initialize a reinforcement learning network based on the parameter array, and initialize a reward function based on the reinforcement learning network:

[0125] ;

[0126] Where, represents the value of the reward function, is the error between the theoretical output voltage and the output voltage, is the error change value, are the first and second factors respectively;

[0127] Among them, the first factor and the second factor are 10 and 1 respectively.

[0128] S32. Collect trajectory data for each time step , and calculate the discounted return for each of the trajectory data :

[0129] ;

[0130] Where, is the parameter array, Indicates the adjustment amount of the parameters in the parameter array, Indicates the The value of the reward function, represents the step length when the trajectory ends, is the current time step.

[0131] S33. Calculate generalized advantage estimates :

[0132] ;

[0133] Where, Indicates the The contribution of the TD error of the step to the current advantage value, is the exponential decay weight;

[0134] Specifically, the generalized advantage estimate is used to measure the quality of an action relative to the average performance, and the exponential decay weight can make the recent error have a greater impact and the long-term error have a smaller impact, and its value is 0.95.

[0135] S34, based on the generalized advantage estimation 、The discount return Calculate the first loss separately Second loss ;

[0136] Wherein, the step S34 includes:

[0137] S341, based on the generalized advantage estimation Calculate the first loss :

[0138] ;

[0139] ;

[0140] Where, represents the average loss over all sampling time steps, is the probability ratio of choosing the same action by the new strategy and the old strategy, is the cutoff threshold, Represents a deep learning value;

[0141] Specifically, the first loss It can update the policy network, optimize the action probability distribution, maximize the cumulative reward, and limit the update amplitude to avoid policy mutation. Used to ensure that the optimization direction is globally consistent, Used to measure the relative magnitude of policy updates, Used to limit the range of change of the probability ratio to prevent the update range from being too large.

[0142] S342: Based on the discount return Determine the second loss :

[0143] ;

[0144] Where, is the network prediction value;

[0145] Specifically, the network prediction value can be obtained through dynamic curve fitting.

[0146] S35. Calculate entropy reward :

[0147] ;

[0148] Where, Indicates that the status Select Action The network output probability density of

[0149] Specifically, an entropy reward term can be used to encourage the search process.

[0150] S36, based on the first loss The second loss , the entropy reward item Determine the total loss function :

[0151] ;

[0152] Where, are the first and second weight coefficients respectively;

[0153] Specifically, the total loss function can be used to adjust different parameter arrays to perform loss minimization iterations, and each iteration uses the iteration parameter array of the previous iteration as input, so that each iteration has a corresponding iteration parameter array.

[0154] S4. Calculating an evaluation value of each of the iterative parameter arrays, determining a score value based on the evaluation value, determining an optimal parameter array based on the score value, and inversely solving the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters;

[0155] Wherein, the step S4 includes:

[0156] S41, calculating the first evaluation value of each of the iterative parameter arrays , the second evaluation value , the third evaluation value , the fourth evaluation value ;

[0157] Wherein, the step S41 includes:

[0158] S411, calculating the first evaluation value of each iterative parameter array :

[0159] ;

[0160] Where, For the The value of the reward function corresponding to the sampling point, is the window size;

[0161] Specifically, the first evaluation value is used to determine the stability of the reward curve. If the first evaluation value increases after the iterative parameter array changes, it means that the corresponding output voltage has good stability. The window size here is 10.

[0162] S412: Calculate the second evaluation value of each iterative parameter array. :

[0163] ;

[0164] Where, is the step length when the trajectory ends, For the The amount of change in trajectory data corresponding to each sampling point;

[0165] Specifically, the second evaluation value is used to determine the smoothness and convergence of the parameter change trajectory, and it is necessary to maintain the control parameter after adjustment. <0.1, ensuring the stability of the strategy update direction and avoiding parameter mutations.

[0166] S413, calculating the third evaluation value of each of the iterative parameter arrays :

[0167] ;

[0168] Where, is the network prediction value, In return for a discount;

[0169] Specifically, the third evaluation value is used to determine a downward trend of the prediction error.

[0170] S414, calculating the fourth evaluation value of each of the iterative parameter arrays :

[0171] ;

[0172] Where, represents the average reward under the test set distribution, represents the average reward under the distribution of the training set;

[0173] Specifically, the fourth evaluation value is expressed as a generalization error, which evaluates the new state. >0, the strategy performs better in the test set than in the training set, and may overfit the training data. <0, the strategy's performance in the new state decreases, and the diversity of training data needs to be increased.

[0174] S42, based on the first evaluation value , the second evaluation value , the third evaluation value , the fourth evaluation value Calculate score value :

[0175] ;

[0176] Where, denote the first, second, third, and fourth adjustment weights respectively;

[0177] Specifically, in order to avoid overfitting of a single reward indicator, multi-dimensional indicators are comprehensively used to screen the optimal parameters, and the first, second, third, and fourth adjustment weights here are 0.5, 0.2, 0.2, and 0.1, respectively.

[0178] S43. The iterative parameter array corresponding to the highest score value is used as the optimal parameter array.

[0179] The fuel cell voltage loss equation parameter correction method provided in the first embodiment of the present invention first obtains the original data of the parameter variables of the fuel cell, eliminates abnormalities and fills the original data of the parameter variables to obtain corrected data; then constructs the output voltage equation based on the corrected data, determines the fitting reference matrix based on the output voltage equation, and determines the parameter array based on the fitting reference matrix; then initializes the reinforcement learning network based on the parameter array, determines the total loss function, and iteratively updates the parameter array in the reinforcement learning network based on the total loss function to obtain several iterative parameter arrays; then calculates the evaluation value of each iterative parameter array, determines the score value based on the evaluation value, determines the optimal parameter array based on the score value, and inversely solves the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters. The present invention can, in a data-driven manner, update parameters in real time through online calibration in the case of parameter drift caused by material attenuation (such as catalyst deactivation, membrane dehydration) and environmental fluctuations during long-term operation of the fuel cell, thereby improving the model prediction accuracy and avoiding destructive testing of the fuel cell system.

[0180] Example 2

[0181] like Figure 2 As shown, in a second embodiment of the present invention, a fuel cell voltage loss equation parameter correction system is provided, the system comprising:

[0182] Filling module 1 is used to obtain the original data of the parameter variables of the fuel cell, and perform abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data;

[0183] Array module 2, configured to construct an output voltage equation based on the correction data, determine a fitting comparison matrix based on the output voltage equation, and determine a parameter array based on the fitting comparison matrix;

[0184] Iteration module 3, configured to initialize a reinforcement learning network based on the parameter array, determine a total loss function, and iteratively update the parameter array in the reinforcement learning network based on the total loss function to obtain a plurality of iterated parameter arrays;

[0185] Correction module 4 is used to calculate the evaluation value of each of the iterative parameter arrays, determine the score value based on the evaluation value, determine the optimal parameter array based on the score value, and inversely solve the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters.

[0186] The filling module 1 includes:

[0187] A data submodule, configured to obtain raw data of fuel cell parameter variables, including actual current density, temperature, pressure, and output voltage;

[0188] The detection submodule is used to calculate the anomaly detection value of each data point in the original data :

[0189] ;

[0190] Where, is the current density, For sampling points The corresponding current density, is the standard deviation;

[0191] Elimination submodule, used for detecting abnormal values of data points in the original data If the number of consecutive abnormal data points is greater than the first preset judgment value, the data point is removed as abnormal data. If the number of consecutive abnormal data points is greater than the second preset judgment value, the interval corresponding to the consecutive abnormal data points is taken as the abnormal interval.

[0192] The filling submodule is used to search for normal data points to the left and right respectively starting from the abnormal interval to obtain the left normal data point With right normal data points , fill the abnormal interval with data based on the left normal data point and the right normal data point to obtain corrected data:

[0193] ;

[0194] Where, represents the data point after data filling, Represents the distance between the right normal data point and the first data point in the abnormal interval, Indicates the location of the first data point in the abnormal interval, express Position in the original data.

[0195] The array module 2 includes:

[0196] Splitting submodule for splitting the total voltage loss into activation polarization , Ohmic polarization and concentration polarization , to obtain the initial voltage equation:

[0197] ;

[0198] Where, is the actual output voltage, is the temperature, is the bidirectional current density of the electrode reaction in equilibrium, is the charge transfer coefficient, is the sum of electrolyte, electrode and contact resistance, is the limiting current density, is the gas constant, is the number of electrons transferred in the reaction, is the Faraday constant, is a constant, is the current density;

[0199] The fitting submodule is used to extract parameters and simplify the fitting of the initial voltage equation to obtain the output voltage equation:

[0200] ;

[0201] Where, These are the first to sixth parameters to be corrected;

[0202] A matrix submodule is used to determine a fitting comparison matrix based on the initial voltage equation and the output voltage equation:

[0203] ;

[0204] Where, Indicates the first to twelfth conversion relationship parameters;

[0205] An array submodule for determining a parameter array based on the fitting control matrix .

[0206] The iteration module 3 includes:

[0207] An initialization submodule is used to initialize the reinforcement learning network based on the parameter array and initialize the reward function based on the reinforcement learning network:

[0208] ;

[0209] Where, represents the value of the reward function, is the error between the theoretical output voltage and the output voltage, is the error change value, are the first and second factors respectively;

[0210] Trajectory submodule, used to collect trajectory data at each time step , and calculate the discounted return for each of the trajectory data :

[0211] ;

[0212] Where, is the parameter array, Indicates the adjustment amount of the parameters in the parameter array, Indicates the The value of the reward function, represents the step length when the trajectory ends, is the current time step;

[0213] Estimation submodule, used to calculate generalized advantage estimates :

[0214] ;

[0215] Where, Indicates the The contribution of the TD error of the step to the current advantage value, is the exponential decay weight;

[0216] Loss submodule, used to estimate the generalized advantage based on 、The discount return Calculate the first loss separately Second loss ;

[0217] Reward submodule, used to calculate the entropy reward term :

[0218] ;

[0219] Where, Indicates that the status Select Action The network output probability density of

[0220] The total loss submodule is used to calculate the total loss based on the first loss. The second loss , the entropy reward item Determine the total loss function :

[0221] ;

[0222] Where, are the first and second weight coefficients respectively.

[0223] The loss submodule includes:

[0224] The first loss unit is used to estimate the generalized advantage based on the Calculate the first loss :

[0225] ;

[0226] ;

[0227] Where, represents the average loss over all sampling time steps, is the probability ratio of choosing the same action by the new strategy and the old strategy, is the cutoff threshold, Represents a deep learning value;

[0228] The second loss unit is used to return the discount based on the Determine the second loss :

[0229] ;

[0230] Where, is the network prediction value.

[0231] The correction module 4 includes:

[0232] Evaluation value submodule, used to calculate the first evaluation value of each iterative parameter array , the second evaluation value , the third evaluation value , the fourth evaluation value ;

[0233] Scoring submodule, for scoring based on the first evaluation value , the second evaluation value , the third evaluation value , the fourth evaluation value Calculate the rating value :

[0234] ;

[0235] Where, denote the first, second, third, and fourth adjustment weights respectively;

[0236] The best submodule is used to take the iterative parameter array corresponding to the highest score value as the best parameter array.

[0237] The evaluation value submodule includes:

[0238] A first evaluation value unit, configured to calculate a first evaluation value of each of the iterative parameter arrays :

[0239] ;

[0240] Where, For the The value of the reward function corresponding to the sampling point, is the window size;

[0241] A second evaluation value unit is used to calculate the second evaluation value of each of the iterative parameter arrays :

[0242] ;

[0243] Where, is the step length when the trajectory ends, For the The amount of change in trajectory data corresponding to each sampling point;

[0244] A third evaluation value unit, configured to calculate a third evaluation value of each of the iterative parameter arrays :

[0245] ;

[0246] Where, is the network prediction value, In return for a discount;

[0247] A fourth evaluation value unit, configured to calculate a fourth evaluation value of each of the iterative parameter arrays :

[0248] ;

[0249] Where, represents the average reward under the test set distribution, represents the average reward under the training set distribution.

[0250] In other embodiments of the present invention, the embodiments of the present invention provide the following technical solutions: a computer, comprising a memory 102, a processor 101, and a computer program stored on the memory 102 and executable on the processor 101; the processor 101 implements the fuel cell voltage loss equation parameter correction method as described above when executing the computer program.

[0251] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits for implementing the embodiments of the present invention.

[0252] Memory 102 may include a large-capacity memory for data or instructions. By way of example, and not limitation, memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 102 may include removable or non-removable (or fixed) media. Where appropriate, memory 102 may be internal or external to the data processing device. In certain embodiments, memory 102 is non-volatile memory. In certain embodiments, memory 102 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0253] The memory 102 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101 .

[0254] The processor 101 reads and executes computer program instructions stored in the memory 102 to implement the above-mentioned fuel cell voltage loss equation parameter correction method.

[0255] In some embodiments, the computer may further include a communication interface 103 and a bus 100. Figure 3 As shown, the processor 101 , the memory 102 , and the communication interface 103 are connected via a bus 100 and communicate with each other.

[0256] The communication interface 103 is used to implement communication between the various modules, devices, units, and / or equipment in the embodiments of the present invention. The communication interface 103 can also implement data communication with other components such as external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0257] Bus 100 includes hardware, software, or both, and couples components of a computer device to each other. Bus 100 includes, but is not limited to, at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Bus 100 may include one or more buses, where appropriate. Although embodiments of the present invention describe and illustrate a particular bus, the present invention contemplates any suitable bus or interconnect.

[0258] The computer can execute the fuel cell voltage loss equation parameter correction method of the present invention based on the obtained fuel cell voltage loss equation parameter correction system, thereby realizing fuel cell voltage loss equation parameter correction.

[0259] In some further embodiments of the present invention, in combination with the above-mentioned method for correcting the parameters of the fuel cell voltage loss equation, an embodiment of the present invention provides the following technical solution: a storage medium having a computer program stored thereon, and the computer program implements the above-mentioned method for correcting the parameters of the fuel cell voltage loss equation when executed by a processor.

[0260] Those skilled in the art will appreciate that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device.

[0261] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0262] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the aforementioned embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following technologies known in the art may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.

[0263] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0264] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. A method for correcting parameters of a fuel cell voltage loss equation, characterized in that: include: Acquiring original data of parameter variables of the fuel cell, and performing abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data; constructing an output voltage equation based on the correction data, determining a fitting comparison matrix based on the output voltage equation, and determining a parameter array based on the fitting comparison matrix; Initializing a reinforcement learning network based on the parameter array, determining a total loss function, and iteratively updating the parameter array in the reinforcement learning network based on the total loss function to obtain a plurality of iterated parameter arrays; Calculating an evaluation value of each of the iterative parameter arrays, determining a score value based on the evaluation value, determining an optimal parameter array based on the score value, and inversely solving the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters; The steps of constructing an output voltage equation based on the correction data, determining a fitting comparison matrix based on the output voltage equation, and determining a parameter array based on the fitting comparison matrix include: Splitting the total voltage loss into activation polarization , Ohmic polarization and concentration polarization , to obtain the initial voltage equation: ; Where, is the actual output voltage, is the temperature, is the bidirectional current density of the electrode reaction in equilibrium, is the charge transfer coefficient, is the sum of electrolyte, electrode and contact resistance, is the limiting current density, is the gas constant, is the number of electrons transferred in the reaction, is the Faraday constant, is a constant, is the current density; Parameter extraction and simplified fitting are performed on the initial voltage equation to obtain the output voltage equation: ; Where, These are the first to sixth parameters to be corrected; The fitting comparison matrix is determined based on the initial voltage equation and the output voltage equation: ; Where, Indicates the first to twelfth conversion relationship parameters; Determine a parameter array based on the fitting control matrix ; The first to twelfth conversion relationship parameters represent the conversion relationship between the parameters in the initial voltage equation and the parameters in the output voltage equation.

2. The fuel cell voltage loss equation parameter correction method according to claim 1, characterized in that: The steps of obtaining original data of parameter variables of the fuel cell, and performing abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data include: Acquiring raw data of parameter variables of the fuel cell, wherein the raw data includes actual current density, temperature, pressure, and output voltage; Calculate the anomaly detection value for each data point in the original data : ; Where, is the current density, For sampling points The corresponding current density, is the standard deviation; If the abnormal detection value of the data point in the original data If the number of consecutive abnormal data points is greater than the first preset judgment value, the data point is removed as abnormal data. If the number of consecutive abnormal data points is greater than the second preset judgment value, the interval corresponding to the consecutive abnormal data points is taken as the abnormal interval. Starting from the abnormal interval, search for normal data points to the left and right to obtain the left normal data point. With right normal data points , fill the abnormal interval with data based on the left normal data point and the right normal data point to obtain corrected data: ; Where, represents the data point after data filling, Represents the distance between the right normal data point and the first data point in the abnormal interval, Indicates the location of the first data point in the abnormal interval, express Position in the original data.

3. The fuel cell voltage loss equation parameter correction method according to claim 1, characterized in that: The step of initializing the reinforcement learning network based on the parameter array and determining the total loss function comprises: Initialize the reinforcement learning network based on the parameter array and initialize the reward function based on the reinforcement learning network: ; Where, represents the value of the reward function, is the error between the theoretical output voltage and the output voltage, is the error change value, are the first and second factors respectively; Collect trajectory data for each time step , and calculate the discounted return for each of the trajectory data : ; Where, is the parameter array, Indicates the adjustment amount of the parameters in the parameter array, Indicates the The value of the reward function, represents the step length when the trajectory ends, is the current time step; Calculate the generalized odds estimate : ; Where, Indicates the The contribution of the TD error of the step to the current advantage value, is the exponential decay weight; Based on the generalized advantage estimate 、The discount return Calculate the first loss separately Second loss ; Calculate entropy bonus : ; Where, Indicates that the status Select Action The network output probability density of Based on the first loss The second loss , the entropy reward item Determine the total loss function : ; Where, are the first and second weight coefficients respectively.

4. The method for correcting fuel cell voltage loss equation parameters according to claim 3, characterized in that: The generalized advantage estimate 、The discount return Calculate the first loss separately Second loss The steps include: Based on the generalized advantage estimate Calculate the first loss : ; ; Where, represents the average loss over all sampling time steps, is the probability ratio of choosing the same action by the new strategy and the old strategy, is the cutoff threshold, Represents a deep learning value; Based on the discount return Determine the second loss : ; Where, is the network prediction value.

5. The method for correcting fuel cell voltage loss equation parameters according to claim 1, wherein: The steps of calculating an evaluation value of each iterative parameter array, determining a score value based on the evaluation value, and determining an optimal parameter array based on the score value include: Computes the first evaluated value of the parameter array for each of the iterations , the second evaluation value , the third evaluation value , the fourth evaluation value ; Based on the first evaluation value , the second evaluation value , the third evaluation value , the fourth evaluation value Calculate the rating value : ; Where, denote the first, second, third, and fourth adjustment weights respectively; The iterative parameter array corresponding to the highest score value is taken as the optimal parameter array.

6. The method for correcting fuel cell voltage loss equation parameters according to claim 5, characterized in that: The first evaluation value of each of the iterative parameter arrays is calculated , the second evaluation value , the third evaluation value , the fourth evaluation value The steps include: Computes the first evaluated value of the parameter array for each of the iterations : ; Where, For the The value of the reward function corresponding to the sampling point, is the window size; Computes the second evaluation value of the parameter array for each of the iterations : ; Where, is the step length when the trajectory ends, For the The amount of change in trajectory data corresponding to each sampling point; Calculates the third evaluation value of the parameter array on each of the iterations : ; Where, is the network prediction value, In return for a discount; Calculates the fourth evaluation value of the parameter array for each of the said iterations : ; Where, represents the average reward under the test set distribution, represents the average reward under the training set distribution.

7. A fuel cell voltage loss equation parameter correction system, the system adopting the fuel cell voltage loss equation parameter correction method according to claim 1, characterized in that: The system comprises: A filling module is used to obtain original data of parameter variables of the fuel cell, and perform abnormal elimination and data filling on the original data of the parameter variables to obtain corrected data; an array module, configured to construct an output voltage equation based on the correction data, determine a fitting comparison matrix based on the output voltage equation, and determine a parameter array based on the fitting comparison matrix; an iteration module, configured to initialize a reinforcement learning network based on the parameter array, determine a total loss function, and iteratively update the parameter array in the reinforcement learning network based on the total loss function to obtain a plurality of iterated parameter arrays; A correction module is used to calculate an evaluation value of each of the iterative parameter arrays, determine a score value based on the evaluation value, determine an optimal parameter array based on the score value, and inversely solve the output voltage equation based on the optimal parameter array to complete the correction of the fuel cell voltage loss equation parameters.

8. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for correcting parameters of a fuel cell voltage loss equation according to any one of claims 1 to 6 is implemented.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for correcting the fuel cell voltage loss equation parameters according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for calculating optimal power point of fuel cell

    CN110008435A

  • Method for predicting service life of proton exchange membrane fuel cell

    CN116502541A