Construction method, device and equipment of stack shutdown purging data and storage medium
By constructing the stack shutdown purge data and using fitting relationships and noise increase technology, the problem of difficulty in obtaining stack shutdown purge data is solved, the efficient establishment and optimization of the stack model is achieved, and the system performance and efficiency are improved.
Patent Information
- Application Number
- CN202410736507.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-10
AI Technical Summary
Obtaining data for stack purge during shutdown is expensive and takes a long time. It is difficult to obtain sufficient data sets through independent experiments, which affects the performance and efficiency of the stack system.
By determining the fitting relationship between stack impedance, purge flow and purge time based on the measured data of stack shutdown and purge, initial data is generated, and target data is constructed by dividing purge time periods and adding noise. To support the establishment and optimization of the stack shutdown purge model.
It achieves the construction of a large amount of target data that meets the needs based on a small amount of measured data, simplifies the establishment and optimization process of the stack shutdown purge model, reduces research costs and time, and improves the performance and efficiency of the stack system.
Smart Images

Figure CN118627290A
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of battery stack shutdown purge, and in particular, relates to a method, device, equipment and storage medium for constructing battery stack shutdown purge data. Background Art
[0002] As the core component of hydrogen fuel cells, the fuel cell stack plays a pivotal role in the development of hydrogen fuel cell technology. With the increasing attention paid to clean energy and sustainable development around the world, the development prospects of hydrogen fuel cell stacks are very broad. However, the development of hydrogen fuel cell stacks still faces some challenges. For example, technical bottlenecks, cost issues, infrastructure construction, etc. need to be further resolved.
[0003] In the research and application of hydrogen energy vehicles, fuel cell systems and stacks, a large amount of data will be collected, whether it is bench testing or vehicle testing. With the vigorous development of artificial intelligence, data-driven stack shutdown purge modeling and optimization work has been carried out. Stack shutdown purge modeling and optimization are of great significance in improving the success rate of stack startup, extending service life, improving energy utilization efficiency, enhancing system reliability and supporting intelligent management.
[0004] At present, the acquisition of stack shutdown purge data is costly and time-consuming, and it is usually difficult to obtain sufficient data sets through independent experiments. This limitation not only increases the time and money costs of research, but also may delay the progress of stack optimization work, thereby affecting the performance and efficiency of the stack system. Based on this, how to construct stack shutdown purge data is an urgent problem to be solved in this field. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment and storage medium for constructing battery stack shutdown purge data, which can, at least to a certain extent, construct a large amount of target data that meets the requirements based on a small amount of measured data of battery stack shutdown purge, thereby providing necessary data support for the establishment and optimization of the battery stack shutdown purge model.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0007] According to a first aspect of an embodiment of the present application, a method for constructing stack shutdown purge data is provided, comprising:
[0008] Determine a first fitting relationship between stack impedance, purge flow rate and purge time based on measured data of stack shutdown purge;
[0009] Generate multiple sets of initial data according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data includes one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time;
[0010] Dividing the purge time range into a plurality of purge time periods according to the measured data;
[0011] Changing the initial stack impedance according to the purge time period to obtain a target stack impedance;
[0012] A plurality of groups of target data are determined according to the target stack impedance, wherein the target data include the target stack impedance, the initial purge flow rate and the initial purge time in one-to-one correspondence.
[0013] In some embodiments of the present application, based on the above scheme, determining the first fitting relationship between the stack impedance, the purge flow rate and the purge time according to the measured data of the stack shutdown purge includes:
[0014] The purge flow rate and the purge time are combined and used as independent variables of an initial exponential function;
[0015] Inputting the measured data and the initial exponential function into a curve fitting function to obtain the parameters of the initial exponential function output by the curve fitting function;
[0016] Substituting the parameters into the initial exponential function, the first fitting relationship is obtained.
[0017] In some embodiments of the present application, based on the above scheme, the generating of multiple sets of initial data according to the first fitting relationship, the purge time range and the purge flow rate range includes:
[0018] Determining the initial purge times distributed at equal intervals according to the purge time range;
[0019] Determining the initial purge flow rates distributed at equal intervals according to the purge flow rate range;
[0020] Substituting the initial purge time and the initial purge flow rate into the first fitting relationship to obtain the corresponding initial stack impedance;
[0021] The initial stack impedance, the initial purge time and the initial purge flow rate corresponding to each other are determined as the initial data.
[0022] In some embodiments of the present application, based on the above solution, dividing the purge time range into a plurality of purge time periods according to the measured data includes:
[0023] Determine two time division points corresponding to the measured data according to a second-order difference algorithm;
[0024] The purge time range is divided into three purge time periods according to the time division points.
[0025] In some embodiments of the present application, based on the above scheme, the second-order difference algorithm includes a second-order central difference algorithm, and determining the two time division points corresponding to the measured data according to the second-order difference algorithm includes:
[0026] Calculating the central difference second-order derivative of the stack impedance with respect to the purge time in the measured data using the second-order central difference algorithm to obtain a central difference second-order derivative set;
[0027] Selecting two current central difference second-order derivatives whose differences with the next central difference second-order derivative are greater than a preset threshold from the central difference second-order derivative set;
[0028] The purge times corresponding to the two selected current center difference second-order derivatives are determined as the two time division points.
[0029] In some embodiments of the present application, based on the above scheme, the purge time period includes a flow channel purge time period, a gas diffusion layer purge time period and a proton exchange membrane purge time period, and the initial stack impedance is changed according to the purge time period to obtain a target stack impedance, including:
[0030] Respectively determine a first noise amplitude in the flow channel purge time period, a second noise amplitude in the gas diffusion layer purge time period, and a third noise amplitude in the proton exchange membrane purge time period; wherein the first noise amplitude, the second noise amplitude, and the third noise amplitude increase in sequence;
[0031] The target stack impedance is obtained by increasing the first noise amplitude, the second noise amplitude and the third noise amplitude corresponding to the initial stack impedance of the flow channel purge time period, the gas diffusion layer purge time period and the proton exchange membrane purge time period.
[0032] In some embodiments of the present application, based on the above solution, after the step of determining multiple groups of target data according to the target stack impedance, the construction method further includes:
[0033] Determining a second fitting relationship between stack impedance, purge flow rate, and purge time according to the target data;
[0034] The target data is verified according to whether the parameters in the second fitting relationship are within a preset range.
[0035] According to a second aspect of an embodiment of the present application, a device for constructing stack shutdown purge data is provided, comprising:
[0036] A data fitting module, used to determine a first fitting relationship between the stack impedance, the purge flow rate and the purge time according to the measured data of the stack shutdown purge;
[0037] An initial data generating module, configured to generate multiple sets of initial data according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data includes one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time;
[0038] A purge time segmentation module, used to divide the purge time range into a plurality of purge time periods according to the measured data;
[0039] A noise increasing module, used for changing the initial stack impedance according to the purge time period to obtain a target stack impedance;
[0040] A target data generation module is used to determine multiple groups of target data according to the target stack impedance, wherein the target data includes the target stack impedance, the initial purge flow rate and the initial purge time in one-to-one correspondence.
[0041] According to a third aspect of an embodiment of the present application, a device for constructing stack shutdown purge data is provided, comprising a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the steps of the method described in any one of the first aspects above are implemented.
[0042] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor is prompted to implement the steps of the method described in any one of the first aspects above.
[0043] In the present application, the first fitting relationship between the stack impedance, the purge flow rate and the purge time is determined according to the measured data of the stack shutdown purge; multiple groups of initial data are generated according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data include one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time; the purge time range is divided into multiple purge time periods according to the measured data; the initial stack impedance is changed according to the purge time period to obtain the target stack impedance; multiple groups of target data are determined according to the target stack impedance, wherein the target data include one-to-one corresponding target stack impedance, initial purge flow rate and initial purge time. Through the above scheme, a large amount of target data that meets the requirements can be constructed according to a small amount of measured data of the stack shutdown purge, which provides the necessary data support for the establishment and optimization of the stack shutdown purge model.
[0044] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0046] Figure 1 A schematic flow chart of a method for constructing stack shutdown purge data in one embodiment is shown;
[0047] Figure 2 Shows Figure 1 3D graph of measured data;
[0048] Figure 3 Shows Figure 1 Schematic diagram of the variation of various characteristic quantities of measured data with purge time;
[0049] Figure 4 Shows Figure 1 Schematic diagram of the segmentation of the purge time period;
[0050] Figure 5 A schematic diagram showing the first-order derivative and the second-order derivative of the stack impedance with respect to the purge time in one embodiment is shown;
[0051] Figure 6 Shown is the inclusion Figure 1 Schematic diagram of the target data file;
[0052] Figure 7 Shows Figure 1A visual diagram of the target data;
[0053] Figure 8 Shows Figure 1 Schematic diagram of verification of target data;
[0054] Fig. 9 A block diagram of a device for constructing stack shutdown purge data in one embodiment is shown;
[0055] Fig.10 A schematic diagram of the structure of a device for constructing stack shutdown purge data in one embodiment is shown. DETAILED DESCRIPTION
[0056] 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.
[0057] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0058] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0059] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0060] It should also be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those shown or described.
[0061] Figure 1 FIG. 1 is a flow chart of a method for constructing stack shutdown purge data in one embodiment. Figure 1 As shown, a method for constructing stack shutdown purge data is provided, and the method may include the following steps 101 to 105.
[0062] In step 101, a first fitting relationship between stack impedance, purge flow rate and purge time is determined based on measured data of stack shutdown purge.
[0063] It is understandable that the measured data include the actually measured purge flow rate (f), purge time (t) and stack impedance (R). The measured data can be grouped according to different ambient temperatures, because at different ambient temperatures, the change in stack impedance varies with the increase in purge flow rate and purge time. In order to simplify the study, multiple groups of measured data of stack shutdown purge at the same ambient temperature can also be studied.
[0064] By drawing a curve graph of the measured data and visualizing the measured data, we can preliminarily explore the changing trends between the various characteristic quantities of the measured data. Figure 2 Shows Figure 1 3D graphs of measured data (including scatter plots and curve graphs), Figure 3 Shows Figure 1 The schematic diagram of the variation of the characteristic quantities (including stack impedance and purge flow rate) of the measured data with the purge time is shown in Fig. Figure 2 and Figure 3 It can be seen that (t, f, R) has an exponential function relationship.
[0065] In some embodiments, the purge flow rate and the purge time can be combined and used as the independent variables of the initial exponential function; the measured data and the initial exponential function can be input into the curve fitting function to obtain the parameters of the initial exponential function output by the curve fitting function; the parameters can be substituted into the initial exponential function to obtain the first fitting relationship.
[0066] It is understandable that the curve fitting function may be the curve_fit() function in the optimize module of the SciPy library. This function fits the curve by minimizing the square error and is applicable to the case of a single independent variable, that is, fitting a function to a set of one-dimensional data points.
[0067] Considering that the curve_fit() function itself does not directly support multivariable fitting, and the stack impedance (R) of the stack shutdown purge involves two independent variables: purge time (t) and purge flow rate (f). If a function is used to describe the relationship between them and the dependent variable (R), it is necessary to combine these two independent variables into a single parameter, or change the model to accept two independent variables. Based on this, the embodiment of the present application combines the purge time (t) and the purge flow rate (f) and converts them into an independent variable.
[0068] During the implementation process, the initial exponential function can be defined as exp_model(x, a, b, c), the purge time (t) and the purge flow rate (f) are combined into a tuple (t, f), assigned to x, and the curve_fit() function is used to fit the measured data. The three-dimensional array params output by the function can be obtained. The three-dimensional array includes the best estimated values of the parameters of the initial exponential function obtained by fitting, params[0], params[1] and params[2], where a=params[0], b=params[1], and c=params[2].
[0069] Substitute params[0], params[1] and params[2] into the initial exponential function to obtain a first fitting relationship. For example, according to actual conditions, the first fitting relationship may be R=params[0]*np.exp(params[1]*f*t / 1000)+params[2].
[0070] In step 102, multiple groups of initial data are generated according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data includes one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time.
[0071] The purge time range and the purge flow rate range can be set based on experience. For example, the purge time range can be set to 0 to 140 ms, and the purge flow rate range can be set to 0 to 2000 nlpm.
[0072] In some embodiments, the equally spaced initial purge times can be determined based on the purge time range; the equally spaced initial purge flows can be determined based on the purge flow range; the initial purge times and initial purge flows are substituted into the first fitting relationship to obtain the corresponding initial stack impedance; and the one-to-one corresponding initial stack impedance, initial purge time, and initial purge flow are determined as initial data.
[0073] In the implementation process, the np.linspace() function of the NumPy library can be used to generate multiple initial purge times and multiple initial purge flows at equal intervals between the specified starting point and the end point. The generation of the initial purge time can be implemented by referring to the following statement:
[0074] t=np.linspace(t_min,t_max,200),
[0075] Among them, t_min is the lower limit of the purge time range, and t_max is the upper limit of the purge time range. The generation of the initial purge flow rate can be achieved by referring to the following statement:
[0076] f=np.linspace(f_min,f_max,200),
[0077] Among them, f_min is the lower limit of the purge flow range, and f_max is the upper limit of the purge flow range.
[0078] It is understandable that generating equally spaced initial purge time and initial purge flow makes the data points evenly distributed, which is conducive to simulating and analyzing the changes of various parameters during the shutdown purge of the stack. Through these evenly distributed data points, the dynamic characteristics of gas flow, pressure change, etc. during the purge process can be more accurately described, thereby optimizing the purge strategy. At the same time, the equally spaced initial purge time and initial purge flow can reduce the error caused by data interpolation and improve the accuracy of the shutdown purge model of the stack. In the modeling process, it is usually necessary to set the model parameters based on experimental data or theoretical calculations. By generating equally spaced data points, the experimental data or theoretical calculation results can be more accurately fitted, thereby improving the predictive ability of the model. Finally, in the numerical calculation and simulation process, equally spaced data points can simplify the calculation process, improve the calculation efficiency, and facilitate the use of some efficient numerical algorithms for solution, further improving the accuracy and real-time performance of the simulation.
[0079] In summary, generating equally spaced initial purge times and initial purge flows is of great significance for stack shutdown purge modeling. It can improve the accuracy and predictive ability of the stack shutdown purge model, simplify the calculation process, and provide strong support for optimizing the stack shutdown purge strategy.
[0080] In step 103, the purge time range is divided into a plurality of purge time periods according to the measured data.
[0081] It is understandable that a stack shutdown purge process is roughly divided into three stages: flow channel purge stage, gas diffusion layer purge stage and proton exchange membrane purge stage. In the flow channel purge stage, as the purge process and purge time increase, the stack impedance generally changes little; in the gas diffusion layer purge stage, as the purge process and purge time increase, the stack impedance change gradually increases; in the proton exchange membrane purge stage, as the purge process and purge time increase, the stack impedance change significantly increases.
[0082] According to the above characteristics of the stack shutdown purge, a three-stage study is conducted. The key point is to split the data of the three stages of the stack shutdown purge, that is, to find the time division points of the three stages of the stack shutdown purge. Figure 4 thsd_dRt1 and thsd_dRt2 shown in.
[0083] In some embodiments, two time division points corresponding to the measured data may be determined according to a second-order difference algorithm; and the purge time range may be divided into three purge time periods according to the time division points.
[0084] It is understandable that the difference, also known as the difference function or the difference operation, reflects a change between discrete quantities and is a tool for studying discrete mathematics. The N-order difference is used to describe the higher-order change trend of the rate, acceleration, etc. of the variable changing over time in a discrete time series. When determining the number of differences N, the principle of the embodiment of the present application is that the difference value is stable and there is no obvious upward or downward trend, that is, the difference value fluctuates around the 0 point of the X-axis. If there is an obvious upward or downward trend, continue to differentiate and then determine the number of differences N. Figure 5 FIG. 1 is a schematic diagram showing the first-order derivative and the second-order derivative of the stack impedance with respect to the purge time in one embodiment. Figure 5 As shown, the difference value after the second-order difference (i.e., the second-order derivative) is a curve that is biased toward the X-axis, and is basically distributed around 0, rather than an upward or downward trend. Based on this, the embodiment of the present application uses a second-order difference algorithm to determine the time segmentation point.
[0085] In some embodiments, the second-order difference algorithm includes a second-order central difference algorithm, which uses the second-order central difference algorithm to calculate the central difference second-order derivative of the stack impedance with respect to the purge time in the measured data to obtain a set of central difference second-order derivatives; two current central difference second-order derivatives whose difference with the next central difference second-order derivative is greater than a preset threshold are selected from the set of central difference second-order derivatives; and the purge times corresponding to the two selected current central difference second-order derivatives are determined as two time division points.
[0086] It is understandable that the difference is divided into three types: forward difference, backward difference and center difference. The embodiment of the present application adopts a second-order center difference algorithm to improve the accuracy of the calculation. The center difference second-order derivative of the stack impedance with respect to the purge time can be implemented by referring to the following statement:
[0087] thsd_d1Rt1=np.gradient(R,t,edge_order=2,,method='central')
[0088] thsd_d2Rt2=np.gradient(dRdt_central1,t,edge_order=2)
[0089] thsd_d1Rt1 represents the central difference first-order derivative of R with respect to t, and thsd_d2Rt2 represents the central difference second-order derivative of R with respect to t.
[0090] It should be noted that in the first-order derivative, the edge_order parameter is used to specify the differential order of the edge points. For the central difference, edge_order is usually set to 2, because the central difference is not available at the boundary points and needs to be approximated by a lower-order difference. The above code will output the differential approximation of R with respect to t, which can be regarded as the approximation of the derivative of R with respect to t at discrete points.
[0091] In the second-order derivative, the calculation may encounter problems at the boundary because two consecutive data points are required to calculate the central difference. In the np.gradient function, by setting the edge_order parameter, the difference order of the edge points can be controlled to handle boundary conditions. Here, edge_order is set to 2, indicating that the second-order difference will be used to approximate the derivative at the boundary.
[0092] The above statement can be used to determine the set of central difference second-order derivatives. Taking the current central difference second-order derivatives thsd_d2Rt2_1=0.05 and thsd_d2Rt2_2=0.6 selected from the set of central difference second-order derivatives, the purge times corresponding to these two central difference second-order derivatives are 60ms and 90ms respectively, and the purge time range is [0ms,140ms]. For example, the first stage of motor shutdown purge is: [0,thsd_d2Rt2_1)=[0,0.05), corresponding to the flow channel purge stage; the second stage is: [thsd_d2Rt2_1,thsd_d2Rt2_2)=[0.05,0.6), corresponding to the gas diffusion layer purge stage; the third stage is: [thsd_d2Rt2_2,30)=[0.6,30), corresponding to the proton exchange membrane purge stage. The two time division points are thsd_dRt1 = 60ms and thsd_dRt2 = 90ms, so the purge time periods are t = [0, 60), [60, 90), [90, 140] respectively.
[0093] In step 104, the initial stack impedance is changed according to the purge time period to obtain a target stack impedance.
[0094] It is understandable that by adding noise to the initial stack impedance, the change of the initial stack impedance can be achieved. In the implementation process, random noise can be added to the initial stack impedance, or asymmetric noise technology can be used to add noise for different purge time periods to construct data that better reflects the actual situation of stack shutdown purge.
[0095] Adding noise is an important step when constructing data through functional relationships. It can simulate the uncertainty of the real world, improve the generalization ability of the model, and evaluate the robustness of the model.
[0096] Simulating real-world uncertainty: In the real world, data is often affected by various factors, including measurement errors, environmental noise, system errors, etc. Therefore, even if there is a clear functional relationship in theory, the actual observed data will deviate from this relationship. By adding noise to the initial stack impedance, this uncertainty can be simulated, making the target stack impedance closer to the real world.
[0097] Improve the generalization ability of the model: In machine learning and data analysis, if the model is only trained on data without noise, it may become too complex and lead to overfitting. This means that the model performs well on the training data, but performs poorly on new, unseen data. By adding noise, the model can maintain stable performance in the face of a certain degree of uncertainty, thereby improving its generalization ability.
[0098] Evaluate the robustness of the model: Noise can also be used to evaluate the sensitivity of the model to noise or disturbances. By adding different levels of noise to the constructed data, the changes in model performance can be observed to understand how the model performs under different noise levels. This helps to understand the robustness of the model, that is, the ability of the model to remain effective in the face of noise or other disturbances.
[0099] When constructing the target data (t, f, R), the exponential function relationship between R and t and f during the purge process, as well as the changing characteristics of R in different purge stages, are taken into account. The added noise should be able to reflect these changes to ensure the rationality of the data.
[0100] In some embodiments, a first noise amplitude for a flow channel purge time period, a second noise amplitude for a gas diffusion layer purge time period, and a third noise amplitude for a proton exchange membrane purge time period are determined respectively; wherein the first noise amplitude, the second noise amplitude, and the third noise amplitude are increased sequentially; the first noise amplitude, the second noise amplitude, and the third noise amplitude are increased corresponding to the initial stack impedance for the flow channel purge time period, the gas diffusion layer purge time period, and the proton exchange membrane purge time period, respectively, to obtain a target stack impedance.
[0101] During the implementation process, you can refer to the following statements to increase noise:
[0102] #Define the noise amplitude in the purge phase (can be adjusted according to actual conditions)
[0103] noise_amplitude = [0.1, 0.5, 1.0] # The noise amplitudes corresponding to flow channel purge, gas diffusion layer purge, and proton exchange membrane purge, respectively
[0104] #Add different noise amplitudes according to the purge stage
[0105] for i,amplitude in enumerate(noise_amplitude):
[0106] #Here we assume that the time period for each stage is divided into (t=[0,60),[60,90),[90,140])
[0107] if i==0: #channel purge stage
[0108] noisy_R[:60,:]+=np.random.normal(0,amplitude,size=noisy_R[:60,:].shape)
[0109] elif i==1: #Gas diffusion layer purge stage
[0110] noisy_R[60:90,:]+=np.random.normal(0,amplitude,size=noisy_R[60:90,:].shape)
[0111] else:#Proton exchange membrane purge stage
[0112] noisy_R[90:,:]+=np.random.normal(0,amplitude,size=noisy_R[90:,:].shape)
[0113] In step 105, multiple groups of target data are determined according to the target stack impedance, wherein the target data include a one-to-one corresponding target stack impedance, an initial purge flow rate, and an initial purge time.
[0114] It can be understood that after the target stack impedance is obtained, the target stack impedance and its corresponding initial purge flow rate and initial purge time are used as target data.
[0115] After obtaining multiple sets of target data, you can set the number of files to be created, set the prefix and suffix of the file name, create file path and file name variables, create file content, and finally output the target data containing (t, f, R) in CSV format. Figure 6 Shown is the inclusion Figure 1 Schematic diagram of the target data file. Figure 6 As shown, each file includes multiple sets of target data.
[0116] After outputting the target data, the rationality of the target data can be verified in a variety of ways. Figure 7 Shows Figure 1 A visual diagram of the target data. Figure 7 As shown, by drawing the graph of the output file, it can be seen that the constructed target data is reasonable from the trend of the curve of the change of the stack impedance (R) with the purge time (t) and the curve of the change of the air flow rate (i.e., the purge flow rate (f)) with the purge time (t).
[0117] In some embodiments, a second fitting relationship between stack impedance, purge flow rate and purge time can be determined based on target data; and the target data can be verified based on whether the parameters in the second fitting relationship are within a preset range.
[0118] Randomly extract several files from the output files and determine the corresponding fitting relationship based on the target data in the files. Figure 8 Shows Figure 1 Schematic diagram of target data verification. Figure 8As shown, the a, b, and c values in the second fitting relationship are all within the preset range, and the constructed target data are reasonable, which meets the requirements of the optimization research work of the stack shutdown purge model.
[0119] It should be noted that the embodiment of the present application adopts nonlinear fitting and noise addition technology based on local characteristics of data points, which can bring the following significant beneficial effects to the optimization research of the stack shutdown purge model:
[0120] 1. Through data construction, the data-driven modeling and optimization research of the stack shutdown purge was successfully completed. This not only overcomes the difficulty of obtaining actual data, but also enables the research work to be carried out smoothly.
[0121] 2. The constructed data can truly reflect the relationship between the various characteristic quantities of the stack shutdown purge, making the modeling and optimization results more interpretable.
[0122] 3. Through the successful verification of the target data, the accuracy and effectiveness of the data have been further proved. This is conducive to the early completion of the data-driven fuel cell shutdown purge modeling and optimization research work, laying a solid foundation for the commercial application of fuel cell technology.
[0123] The embodiment of the present application determines the first fitting relationship between the stack impedance, the purge flow rate and the purge time according to the measured data of the stack shutdown purge; generates multiple sets of initial data according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data includes one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time; divides the purge time range into multiple purge time periods according to the measured data; changes the initial stack impedance according to the purge time period to obtain the target stack impedance; determines multiple sets of target data according to the target stack impedance, wherein the target data includes one-to-one corresponding target stack impedance, initial purge flow rate and initial purge time. The above scheme can construct a large amount of target data that meets the requirements according to a small amount of measured data of the stack shutdown purge, providing necessary data support for the establishment and optimization of the stack shutdown purge model.
[0124] The following describes an apparatus embodiment of the present application, which can be used to execute the method for constructing the stack shutdown purge data in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the method for constructing the stack shutdown purge data in the above-mentioned embodiment of the present application.
[0125] Fig. 9 A block diagram of a device for constructing stack shutdown purge data in an embodiment of the present application is shown. Fig. 9As shown, the device for constructing the stack shutdown purge data of the embodiment of the present application includes: a data fitting module 901, which is used to determine the first fitting relationship between the stack impedance, the purge flow rate and the purge time according to the measured data of the stack shutdown purge; an initial data generation module 902, which is used to generate multiple groups of initial data according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data include one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time; a purge time segmentation module 903, which is used to divide the purge time range into multiple purge time periods according to the measured data; a noise increase module 904, which is used to change the initial stack impedance according to the purge time period to obtain the target stack impedance; a target data generation module 905, which is used to determine multiple groups of target data according to the target stack impedance, wherein the target data include one-to-one corresponding target stack impedance, initial purge flow rate and initial purge time.
[0126] In some embodiments of the present application, based on the aforementioned scheme, the data fitting module 901 is also used to combine the purge flow and the purge time as the independent variable of the initial exponential function; input the measured data and the initial exponential function into the curve fitting function to obtain the parameters of the initial exponential function output by the curve fitting function; substitute the parameters into the initial exponential function to obtain the first fitting relationship.
[0127] In some embodiments of the present application, based on the aforementioned scheme, the initial data generation module 902 is also used to determine the equally spaced initial purge times according to the purge time range; determine the equally spaced initial purge flows according to the purge flow range; substitute the initial purge time and the initial purge flow into the first fitting relationship to obtain the corresponding initial stack impedance; and determine the one-to-one corresponding initial stack impedance, initial purge time and initial purge flow as initial data.
[0128] In some embodiments of the present application, based on the above scheme, the purge time segmentation module 903 is also used to determine two time segmentation points corresponding to the measured data according to the second-order difference algorithm; and divide the purge time range into three purge time periods according to the time segmentation points.
[0129] In some embodiments of the present application, based on the aforementioned scheme, the second-order difference algorithm includes a second-order central difference algorithm, a purge time segmentation module 903, and is also used to use the second-order central difference algorithm to calculate the central difference second-order derivative of the stack impedance with respect to the purge time in the measured data to obtain a set of central difference second-order derivatives; select two current central difference second-order derivatives from the set of central difference second-order derivatives whose difference with the next central difference second-order derivative is greater than a preset threshold; and determine the purge times corresponding to the two selected current central difference second-order derivatives as two time division points.
[0130] In some embodiments of the present application, based on the above scheme, the purge time period includes a flow channel purge time period, a gas diffusion layer purge time period and a proton exchange membrane purge time period, and the noise increasing module 904 is further used to respectively determine a first noise amplitude of the flow channel purge time period, a second noise amplitude of the gas diffusion layer purge time period and a third noise amplitude of the proton exchange membrane purge time period; wherein the first noise amplitude, the second noise amplitude and the third noise amplitude increase in sequence;
[0131] The first noise amplitude, the second noise amplitude and the third noise amplitude are respectively increased corresponding to the initial stack impedance of the flow channel purge time period, the gas diffusion layer purge time period and the proton exchange membrane purge time period to obtain the target stack impedance.
[0132] In some embodiments of the present application, based on the aforementioned scheme, the device for constructing the stack shutdown purge data also includes a data verification module (not shown in the figure), which is used to determine the second fitting relationship between the stack impedance, purge flow and purge time according to the target data; and verify the target data according to whether the parameters in the second fitting relationship are within a preset range.
[0133] Based on the same inventive concept, the present application embodiment also provides a device for constructing stack shutdown purge data, referring to Fig.10 , showing a schematic diagram of the structure of a device for constructing a stack shutdown purge data in an embodiment of the present application, wherein the device for constructing a stack shutdown purge data includes one or more memories 1004, one or more processors 1002, and at least one computer program (computer program instruction) stored in the memory 1004 and executable on the processor 1002, and the processor 1002 implements the method described above when executing the computer program.
[0134] Among them, Fig.10 In the embodiment of the present invention, a bus architecture (represented by bus 1000) is shown, bus 1000 may include any number of interconnected buses and bridges, bus 1000 links various circuits including one or more processors represented by processor 1002 and memory represented by memory 1004. Bus 1000 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 1005 provides an interface between bus 1000 and receiver 1001 and transmitter 1003. Receiver 1001 and transmitter 1003 may be the same element, namely a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 1002 is responsible for managing bus 1000 and general processing, while memory 1004 may be used to store data used by processor 1002 when performing operations.
[0135] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor is prompted to implement the steps of the method as described above.
[0136] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hard wiring, or a combination of any of these. In addition, each functional unit may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be 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 through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0138] The units described as separate components may or may not be physically separated, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed in multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0139] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store computer program instructions.
[0140] The above description is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A method for constructing stack shutdown purge data, characterized in that: include: Determine a first fitting relationship between stack impedance, purge flow rate and purge time based on measured data of stack shutdown purge; Generate multiple sets of initial data according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data includes one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time; Dividing the purge time range into a plurality of purge time periods according to the measured data; Changing the initial stack impedance according to the purge time period to obtain a target stack impedance; A plurality of groups of target data are determined according to the target stack impedance, wherein the target data include the target stack impedance, the initial purge flow rate and the initial purge time in one-to-one correspondence.
2. The method for constructing stack shutdown purge data according to claim 1, characterized in that: The method of determining a first fitting relationship between stack impedance, purge flow rate and purge time based on measured data of stack shutdown purge includes: The purge flow rate and the purge time are combined and used as independent variables of the initial exponential function; Inputting the measured data and the initial exponential function into a curve fitting function to obtain the parameters of the initial exponential function output by the curve fitting function; Substituting the parameters into the initial exponential function, the first fitting relationship is obtained.
3. The method for constructing stack shutdown purge data according to claim 1, characterized in that: The generating of multiple groups of initial data according to the first fitting relationship, the purge time range and the purge flow rate range includes: Determining the initial purge times distributed at equal intervals according to the purge time range; Determining the initial purge flow rates distributed at equal intervals according to the purge flow rate range; Substituting the initial purge time and the initial purge flow rate into the first fitting relationship to obtain the corresponding initial stack impedance; The initial stack impedance, the initial purge time and the initial purge flow rate corresponding to each other are determined as the initial data.
4. The method for constructing stack shutdown purge data according to claim 1, characterized in that: The step of dividing the purge time range into a plurality of purge time periods according to the measured data includes: Determine two time division points corresponding to the measured data according to a second-order difference algorithm; The purge time range is divided into three purge time periods according to the time division points.
5. The method for constructing stack shutdown purge data according to claim 4, characterized in that: The second-order difference algorithm includes a second-order central difference algorithm, and determining the two time division points corresponding to the measured data according to the second-order difference algorithm includes: Calculating the central difference second-order derivative of the stack impedance with respect to the purge time in the measured data using the second-order central difference algorithm to obtain a central difference second-order derivative set; Selecting two current central difference second-order derivatives whose differences with the next central difference second-order derivative are greater than a preset threshold from the central difference second-order derivative set; The purge times corresponding to the two selected current center difference second-order derivatives are determined as the two time division points.
6. The method for constructing stack shutdown purge data according to claim 1, characterized in that: The purge time period includes a flow channel purge time period, a gas diffusion layer purge time period and a proton exchange membrane purge time period, and the initial stack impedance is changed according to the purge time period to obtain a target stack impedance, including: Respectively determine a first noise amplitude in the flow channel purge time period, a second noise amplitude in the gas diffusion layer purge time period, and a third noise amplitude in the proton exchange membrane purge time period; wherein the first noise amplitude, the second noise amplitude, and the third noise amplitude increase in sequence; The target stack impedance is obtained by increasing the first noise amplitude, the second noise amplitude and the third noise amplitude corresponding to the initial stack impedance of the flow channel purge time period, the gas diffusion layer purge time period and the proton exchange membrane purge time period.
7. The method for constructing stack shutdown purge data according to any one of claims 1 to 6, characterized in that: After the step of determining multiple groups of target data according to the target stack impedance, the construction method further includes: Determining a second fitting relationship between stack impedance, purge flow rate, and purge time according to the target data; The target data is verified according to whether the parameters in the second fitting relationship are within a preset range.
8. A device for constructing stack shutdown purge data, characterized in that: include: A data fitting module, used to determine a first fitting relationship between the stack impedance, the purge flow rate and the purge time according to the measured data of the stack shutdown purge; An initial data generating module, configured to generate multiple sets of initial data according to the first fitting relationship, the purge time range and the purge flow rate range, wherein the initial data includes one-to-one corresponding initial stack impedance, initial purge flow rate and initial purge time; A purge time segmentation module, used to divide the purge time range into a plurality of purge time periods according to the measured data; A noise increasing module, used for changing the initial stack impedance according to the purge time period to obtain a target stack impedance; A target data generation module is used to determine multiple groups of target data according to the target stack impedance, wherein the target data includes the target stack impedance, the initial purge flow rate and the initial purge time in one-to-one correspondence.
9. A device for constructing stack shutdown purge data, comprising a processor and a memory, characterized in that: The memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, prompt the processor to implement the steps of the method according to any one of claims 1 to 7.
