Fault diagnosis method for fuel cell uninterruptible power supply system and storage medium
By using the correlation coefficient threshold and actual correlation coefficient of the hybrid model, the reliability problem caused by the reliance on experience-based judgment in traditional fault diagnosis methods is solved, and efficient fault diagnosis of fuel cell uninterruptible power supply systems is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD
- Filing Date
- 2024-09-26
- Publication Date
- 2026-06-02
Smart Images

Figure CN119125898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy technology, and in particular to a fault diagnosis method and storage medium for a fuel cell uninterruptible power supply system. Background Technology
[0002] As a high-efficiency and environmentally friendly power alternative, fuel cell uninterruptible power supply (UPS) systems must provide power while also possessing high reliability and safety. With the development of fuel cell technology, system failures can involve multiple aspects, including electrochemical reactions, material fatigue, and temperature changes. Therefore, fault diagnosis is crucial for ensuring stable system operation and timely remediation of potential problems.
[0003] Traditional fault diagnosis methods often rely on experience-based judgment, which has certain limitations and leads to poor reliability of fuel cell UPS systems. Summary of the Invention
[0004] This invention provides a fault diagnosis method and storage medium for a fuel cell uninterruptible power supply system, which solves the problem that traditional fault diagnosis methods have certain limitations, resulting in poor reliability of the fuel cell UPS system.
[0005] According to one aspect of the present invention, a fault diagnosis method for a fuel cell uninterruptible power supply system is provided, comprising:
[0006] Acquire historical fault data and real-time operating data of fuel cells;
[0007] Based on the historical fault data and a pre-built hybrid model, a correlation coefficient threshold is determined;
[0008] The actual correlation coefficient is calculated based on the real-time operational data and a pre-built hybrid model.
[0009] Based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, it is determined whether the fuel cell uninterruptible power supply system has malfunctioned.
[0010] Optionally, determining the correlation coefficient threshold based on the historical fault data using a pre-built hybrid model includes:
[0011] The training correlation coefficient is calculated based on the historical fault data and the simulation data obtained under the same fault conditions using a pre-built hybrid model.
[0012] Set the initial value of the correlation coefficient threshold based on the preset step size;
[0013] The correlation coefficient threshold is determined based on the initial value of the correlation coefficient threshold and the training correlation coefficient.
[0014] Optionally, determining the correlation coefficient threshold based on the initial value of the correlation coefficient threshold and the training correlation coefficient includes:
[0015] Based on the initial value of the correlation coefficient threshold and the training correlation coefficient, a confusion matrix table is established;
[0016] Calculate recall and precision based on the confusion matrix table;
[0017] Calculate the F1 score based on the recall rate and the precision rate;
[0018] The maximum value of the F1 score is determined as the correlation coefficient threshold.
[0019] Optionally, calculating the actual correlation coefficient based on the real-time running data and a pre-built hybrid model includes:
[0020] The actual correlation coefficient is calculated based on a preset number of real-time running data and real-time simulation data obtained from the real-time running data based on a pre-built hybrid model.
[0021] Optionally, determining whether the fuel cell uninterruptible power supply system has malfunctioned based on the relationship between the actual correlation coefficient and the correlation coefficient threshold includes:
[0022] The actual correlation coefficient is compared with the correlation coefficient threshold. If the actual correlation coefficient is less than the correlation coefficient threshold, it is determined that the fuel cell uninterruptible power supply system has failed.
[0023] If the actual correlation coefficient is greater than or equal to the correlation coefficient threshold, then the fuel cell uninterruptible power supply system is determined to be operating normally.
[0024] Optionally, calculating the actual correlation coefficient based on a preset number of real-time running data and real-time simulation data obtained from the real-time running data based on a pre-built hybrid model includes:
[0025] The actual correlation coefficient is calculated using the following formula:
[0026]
[0027] In the formula, This is the actual correlation coefficient. The covariance between the real-time simulation data and the real-time runtime data output by the hybrid model. The variance of the real-time simulation data output by the hybrid model. M represents the variance of the real-time running data.mi The real-time simulation data output by the mixture model for the i-th sample. M is the mean of the real-time simulation data output by the hybrid model. ti For the real-time running data of the i-th sample, Let be the mean of the real-time running data of the i-th sample.
[0028] Optionally, after determining that the fuel cell uninterruptible power supply system has failed, the method further includes:
[0029] The fuel cell uninterruptible power supply system sends out a fault signal and acquires current fault information;
[0030] The correlation coefficient threshold is updated based on the current fault information.
[0031] Optionally, before acquiring the historical fault data and real-time operating data of the fuel cell, the method further includes:
[0032] Acquire historical data of the fuel cell; the historical data includes current, temperature, humidity, oxygen pressure, oxygen flow rate, hydrogen pressure, and hydrogen flow rate;
[0033] Based on the current-based RC equivalent circuit model, a Kalman filter algorithm is used to establish a mechanism model of the fuel cell.
[0034] Based on the temperature, humidity, oxygen pressure, oxygen flow rate, hydrogen pressure, and hydrogen flow rate, a neural network model of the fuel cell is established using a neural network algorithm.
[0035] By combining the mechanistic model and the neural network model, a hybrid model of the fuel cell is obtained.
[0036] Optionally, the step of mixing the mechanistic model and the neural network model to obtain a hybrid model of the fuel cell includes:
[0037] The hybrid model should satisfy the following equation:
[0038] M m =βM e +(1-β)M n 0≤β≤1;
[0039] In the formula, M m Let M be the output matrix of the mixture model, β be the model selection weights, and M be the output matrix. e M is the output matrix of the mechanistic model. n This is the output matrix of the neural network model.
[0040] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the fault diagnosis method for a fuel cell uninterruptible power supply system according to any embodiment of the present invention.
[0041] The technical solution provided by this invention determines a correlation coefficient threshold based on a pre-built hybrid model using historical fault data. This hybrid model can deeply analyze the system's operating state through electro-chemical reactions and mass transport processes within the fuel cell, while also enabling the system to better adapt to data changes and system complexity during actual operation. The correlation coefficient threshold characterizes the sensitivity and accuracy of system fault diagnosis. Based on real-time operating data and the pre-built hybrid model, the actual correlation coefficient is calculated. This actual correlation coefficient is used to determine the difference between the predicted results output by the hybrid model and the real-time operating data. Furthermore, based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, it is possible to determine in a timely and accurate manner whether a fault has occurred in the fuel cell uninterruptible power supply system. Compared with traditional fault diagnosis methods, the technical solution provided by this invention can more scientifically and efficiently determine the operating status of the fuel cell UPS system, solving the limitations of traditional fault diagnosis methods that rely on experience-based judgment, which leads to poor reliability of the fuel cell UPS system. This effectively improves the reliability and safety of the fuel cell UPS system.
[0042] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A flowchart of a fault diagnosis method for a fuel cell uninterruptible power supply system provided in an embodiment of the present invention;
[0045] Figure 2 A flowchart of another fault diagnosis method for a fuel cell uninterruptible power supply system provided in an embodiment of the present invention;
[0046] Figure 3 A flowchart of another fault diagnosis method for a fuel cell uninterruptible power supply system provided in an embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of the structure of a fuel cell uninterruptible power supply system provided in an embodiment of the present invention;
[0048] Figure 5 A schematic diagram of the structure of a DC / DC boost converter in a fuel cell uninterruptible power supply system provided in an embodiment of the present invention;
[0049] Figure 6 A flowchart of another fault diagnosis method for a fuel cell uninterruptible power supply system provided in an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of a hybrid model for a fault diagnosis method for a fuel cell uninterruptible power supply provided in an embodiment of the present invention;
[0051] Figure 8 Provided for embodiments of the present invention Figure 7 This is a schematic diagram of the electronic device used in the fault diagnosis method for a fuel cell uninterruptible power supply provided in an embodiment of the present invention. Detailed Implementation
[0052] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0053] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0054] Figure 1 This is a flowchart illustrating a fault diagnosis method for a fuel cell uninterruptible power supply system according to an embodiment of the present invention. This embodiment is applicable to the evaluation of the operating status of a fuel cell uninterruptible power supply system. Figure 1 As shown, the fault diagnosis method includes:
[0055] S110: Acquire historical fault data and real-time operating data of the fuel cell.
[0056] Historical fault data includes current and voltage under different fault conditions; real-time operating data includes current and voltage under the current operating state. Specifically, the current and voltage of the fuel cell under the current operating state are collected in real time by current and voltage sensors; and the pre-stored current and voltage of the fuel cell under different fault conditions can be obtained by accessing the fuel cell system database.
[0057] S120. Based on historical fault data and a pre-built hybrid model, determine the correlation coefficient threshold.
[0058] The hybrid model comprises a mechanistic model and a neural network model of the fuel cell. The mechanistic model uses physical laws to describe the electrochemical reactions and mass transport processes within the fuel cell, providing a deep understanding of its internal physical processes; it can also be called a white-box model. The neural network model is a data-driven model that analyzes fuel cell operating data and employs neural network algorithms. Specifically, historical fault data is used to train the pre-built hybrid model, yielding training results. The correlation coefficient threshold is then determined based on these results. Determining the correlation coefficient threshold ensures the sensitivity and accuracy of system fault diagnosis.
[0059] S130. Calculate the actual correlation coefficient based on the real-time running data and a pre-built hybrid model.
[0060] Specifically, the purpose of calculating the actual correlation coefficient is to use it to determine the difference between the prediction results output by the hybrid model and the real-time running data. The higher the actual correlation coefficient, the closer the real-time running data is to the prediction results output by the hybrid model; the lower the actual correlation coefficient, the more contradictory the real-time running data is to the prediction results output by the hybrid model.
[0061] S140. Based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, determine whether the fuel cell uninterruptible power supply system has failed.
[0062] Specifically, the actual correlation coefficient is compared with the correlation coefficient threshold to obtain the comparison result. Based on the comparison result, it is determined whether the fuel cell uninterruptible power supply system has failed. For example, when the actual correlation coefficient is less than the correlation coefficient threshold, it means that the real-time operating data contradicts the prediction result output by the hybrid model, and the fuel cell uninterruptible power supply system is determined to have failed. When the actual correlation coefficient is greater than or equal to the correlation coefficient threshold, it means that the real-time operating data matches the prediction result output by the hybrid model, and the fuel cell uninterruptible power supply system is determined to be operating normally.
[0063] The technical solution provided by this invention determines a correlation coefficient threshold based on a pre-built hybrid model using historical fault data. This hybrid model can deeply analyze the system's operating state through electro-chemical reactions and mass transport processes within the fuel cell, while also enabling the system to better adapt to data changes and system complexity during actual operation. The correlation coefficient threshold characterizes the sensitivity and accuracy of system fault diagnosis. Based on real-time operating data and the pre-built hybrid model, the actual correlation coefficient is calculated. This actual correlation coefficient is used to determine the difference between the predicted results output by the hybrid model and the real-time operating data. Furthermore, based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, it is possible to determine in a timely and accurate manner whether a fault has occurred in the fuel cell uninterruptible power supply system. Compared with traditional fault diagnosis methods, the technical solution provided by this invention can more scientifically and efficiently determine the operating status of the fuel cell UPS system, solving the limitations of traditional fault diagnosis methods that rely on experience-based judgment, which leads to poor reliability of the fuel cell UPS system. This effectively improves the reliability and safety of the fuel cell UPS system.
[0064] Figure 2 This is a flowchart illustrating another fault diagnosis method for a fuel cell uninterruptible power supply system provided by an embodiment of the present invention. The embodiments of the present invention further refine the aforementioned embodiments based on the previous ones. See also... Figure 2 The fault diagnosis method includes:
[0065] S210: Acquire historical fault data and real-time operating data of the fuel cell.
[0066] S220. Calculate the training correlation coefficient based on historical fault data and simulation data obtained from a pre-built hybrid model under the same fault conditions.
[0067] Specifically, the actual correlation coefficient is calculated using the following formula:
[0068]
[0069] In the formula, To train the correlation coefficient, The covariance between the simulation data output by the hybrid model and the historical fault data. The variance of the simulation data output by the hybrid model. M represents the variance of historical fault data. mi The simulation data output by the mixture model for the i-th sample. M represents the mean of the simulation data output by the hybrid model. ti For the historical fault data of the i-th sample, This represents the mean of historical fault data. It should be noted that the above formula is a general formula for calculating the training correlation coefficient and the actual correlation coefficient; the meaning of each parameter in the formula will differ depending on the calculation objective.
[0070] S230, Set the initial value of the correlation coefficient threshold based on the preset step size.
[0071] The preset step size can be pre-set according to the system's calculation requirements. Specifically, since the correlation coefficient is a statistical indicator used to measure the strength of the linear relationship between two variables, its value range is [-1, 1]. Therefore, the correlation coefficient threshold value range is [0, 1]. Within the value range of [0, 1], a value within the range is selected every preset step size and set as the initial value of the correlation coefficient threshold.
[0072] S240. Determine the correlation coefficient threshold based on the initial value of the correlation coefficient threshold and the training correlation coefficient.
[0073] Optionally, the correlation coefficient threshold is determined based on the initial value and the training correlation coefficient, including:
[0074] Based on the initial value of the correlation coefficient threshold and the training correlation coefficient, a confusion matrix table is established.
[0075] Confusion matrices are a specific type of table that are widely used in fields such as machine learning, pattern recognition, and statistics to evaluate the performance of classification models.
[0076] Specifically, multiple initial values for correlation coefficient thresholds are set within the range of [0, 1] based on a preset step size. The training correlation coefficients are all correlation coefficients under different fault conditions. Each training correlation coefficient is compared with the initial value of the correlation coefficient threshold. When the training correlation coefficient is less than the initial value of the correlation coefficient threshold, it indicates that there is a weak correlation between the historical fault data and the simulation data obtained based on the pre-built hybrid model under the same fault condition, and the system is determined to be faulty. When the training correlation coefficient is greater than or equal to the initial value of the correlation coefficient threshold, it indicates that there is a strong correlation between the historical fault data and the simulation data obtained based on the pre-built hybrid model under the same fault condition, and the system is determined to be normal. The comparison results are divided into four cases, including: predicted as normal and actually normal, predicted as normal and actually faulty, predicted as faulty and actually normal, and predicted as faulty and actually faulty. Based on this, a confusion matrix table is established, as shown in Table 1 below.
[0077] Table 1
[0078] The actual problem is a fault. Actually normal Predicted as fault TP FP Predicted to be normal FN TN
[0079] TP represents the number of samples that are actually faulty and predicted to be faulty; FN represents the number of samples that are actually faulty and predicted to be normal; FP represents the number of samples that are actually normal and predicted to be faulty; TN represents the number of samples that are actually normal and predicted to be normal.
[0080] Calculate recall and precision based on the confusion matrix.
[0081] Specifically, the recall rate is calculated using the following formula:
[0082]
[0083] In the formula, re is the recall rate, TP represents the number of samples that are actually faulty and predicted to be faulty, and FN represents the number of samples that are actually faulty and predicted to be normal.
[0084] The accuracy is calculated using the following formula:
[0085] In the formula, pr is the precision rate, and FP represents the number of samples that are actually normal but predicted as faulty.
[0086] Calculate the F1 score based on recall and precision.
[0087] Specifically, the F1 score is calculated using the following formula:
[0088] In the formula, F1 represents the F1 score.
[0089] The maximum value of the F1 score is determined as the correlation coefficient threshold.
[0090] Specifically, based on the above process, multiple F1 scores can be calculated, and the maximum value is selected as the correlation coefficient threshold. In practical applications, if the correlation coefficient threshold is set too low, the system fault diagnosis will not be sensitive enough; if the threshold is set too high, it will lead to false diagnosis. Therefore, the F1 score index is used to measure whether the correlation coefficient threshold setting is appropriate, and thus determine the final correlation coefficient threshold.
[0091] S250. Calculate the actual correlation coefficient based on the pre-built hybrid model using real-time running data.
[0092] S260. Based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, determine whether the fuel cell uninterruptible power supply system has failed.
[0093] The technical solution provided in this invention, in order to balance the sensitivity and accuracy of fault diagnosis, abstracts the problem of how to obtain the optimal threshold into a binary classification problem. It uses a confusion matrix table and F1 score index to screen the initial value of the set correlation coefficient threshold, thereby determining the optimal correlation coefficient threshold, which further improves the reliability of the fuel cell UPS system and the accuracy of fault diagnosis.
[0094] Figure 3 This is a flowchart illustrating another fault diagnosis method for a fuel cell uninterruptible power supply system provided by an embodiment of the present invention. The embodiments of the present invention further refine the aforementioned embodiments based on the previous ones. See also... Figure 3 The fault diagnosis method includes:
[0095] S310: Acquire historical fault data and real-time operating data of the fuel cell.
[0096] S320. Based on historical fault data and a pre-built hybrid model, determine the correlation coefficient threshold.
[0097] S330. Calculate the actual correlation coefficient based on a preset number of real-time running data and real-time simulation data obtained from the real-time running data based on a pre-built hybrid model.
[0098] Considering that it is impossible to collect all the data at once in practical applications, an appropriate number of data points are needed for calculations, i.e., a preset number of data points. The preset number of data points can be set in advance according to the system's calculation requirements. The more preset data points, the greater the system's calculation difficulty; the fewer preset data points, the easier the system's calculation difficulty.
[0099] Specifically, the actual correlation coefficient is calculated using the following formula:
[0100]
[0101] In the formula, This is the actual correlation coefficient. The covariance between the real-time simulation data and the real-time runtime data output by the hybrid model. The variance of the real-time simulation data output by the hybrid model. M represents the variance of the real-time running data. mi The real-time simulation data output by the mixture model for the i-th sample. M is the mean of the real-time simulation data output by the hybrid model. ti For the real-time running data of the i-th sample, This is the average of the real-time running data.
[0102] S340. Determine whether the actual correlation coefficient is less than the correlation coefficient threshold. If yes, proceed to S350; otherwise, proceed to S360.
[0103] S350, It has been determined that the fuel cell uninterruptible power supply system has malfunctioned.
[0104] S360. Confirm that the fuel cell uninterruptible power supply system is operating normally.
[0105] S370, the fuel cell uninterruptible power supply system sends a fault signal and obtains current fault information.
[0106] The fault information includes the fault type, the corresponding fault current, and the corresponding voltage. Specifically, when a fault occurs, the fuel cell uninterruptible power supply system sends a fault signal, acquires the fault current and voltage under the current fault condition through current and voltage sensors, and determines the current fault type based on a hybrid model using the fault current and voltage data. Furthermore, upon receiving a fault signal, the faulty module must be isolated promptly to prevent it from affecting the overall system. Figure 4 This is a schematic diagram of the structure of the fuel cell uninterruptible power supply system provided in an embodiment of the present invention. See also: Figure 4 The fuel cell uninterruptible power supply system includes multiple fuel cell stacks and a DC / DC boost converter. Each fuel cell stack is connected to a DC / DC boost converter and is connected in parallel with the DC bus. The output of the DC / DC boost converter is connected to the load through an inverter, and the mains output is connected to the rectifier. Figure 5 This is a schematic diagram of the DC / DC boost converter in the fuel cell uninterruptible power supply system provided in an embodiment of the present invention. (See attached diagram.) Figure 5 Switch S r Under normal conditions, it is in a closed state. When a module malfunctions, the controller sends a signal, and switch S... r Disconnecting the faulty module isolates it from the overall system, preventing it from affecting the entire system and minimizing damage. Considering the large current and voltage spikes generated by hard switching, which may lead to higher electromagnetic interference and affect system performance, switch S... r It is a zero-current switch that disconnects when the current drops to zero under fault conditions, in order to improve electromagnetic compatibility.
[0107] S380. Update the correlation coefficient threshold based on the current fault information.
[0108] Specifically, the current fault information is input into the fault database, and S320 is re-executed based on the current fault information to update the correlation coefficient threshold.
[0109] The technical solution provided by this invention updates the relevant coefficient threshold in real time after a fault occurs, which can better cope with the actual operating conditions of fuel cell uninterruptible power supply systems and further improve the accuracy of fault diagnosis. In addition, the system adopts a modular system structure, which facilitates fault isolation after fault diagnosis, effectively improving the system's safety and service life.
[0110] Figure 6 This is a flowchart illustrating another fault diagnosis method for a fuel cell uninterruptible power supply system provided by an embodiment of the present invention. The embodiments of the present invention further refine the aforementioned embodiments. See also... Figure 6 The fault diagnosis method includes:
[0111] S610: Acquire historical data of the fuel cell.
[0112] The historical data includes current, temperature, humidity, oxygen pressure, oxygen flow rate, hydrogen pressure, and hydrogen flow rate. Specifically, by accessing the fuel cell system database, pre-stored historical data of the fuel cell under different operating conditions can be obtained.
[0113] S620. Based on the current-based RC equivalent circuit model, a Kalman filter algorithm is used to establish the mechanism model of the fuel cell.
[0114] Specifically, an RC equivalent circuit model is adopted, namely a voltage source V OCV An internal resistance R of a fuel cell cell and a double-layer capacitor C dl The following relationship is established by connecting the series of elements:
[0115]
[0116] Using the historical actual current I(t) as the input to the RC equivalent circuit model, the simulated voltage of the model is calculated using the Kalman filter algorithm and model relational formula. The simulated voltage is compared with the historical actual voltage to determine whether the simulated voltage closely matches the historical actual voltage within the allowable error range. If so, the output parameter V is... OCV R cell and C dl If not, then modify parameter V. OCV R cell and C dl This process continues until the simulated voltage closely matches the historical actual voltage within the allowable error range. At this point, the mechanistic model is complete, and the output is M. e The matrix includes voltage and current:
[0117]
[0118] S630. Based on temperature, humidity, oxygen pressure, oxygen flow rate, hydrogen pressure, and hydrogen flow rate, a neural network algorithm is used to establish a neural network model for the fuel cell.
[0119] Specifically, a neural network algorithm is used to model the fuel cell, employing a multilayer perceptron structure, including an input layer, several hidden layers, and an output layer. The hidden layers perform nonlinear transformations on the input data from the input layer, primarily for feature learning and representation learning. More hidden layers allow the model to learn more complex features, but this also increases computational complexity. The appropriate number of hidden layers can be selected based on the specific application scenario. The input data for the input layer consists of the fuel cell stack's temperature (T), humidity (H), and oxygen pressure. oxygen flow rate Hydrogen pressure and hydrogen flow rate That is, it has six input nodes, and the output is selected as the fuel cell stack voltage V. n and current I n The neural network model should satisfy the following loss function relationship:
[0120]
[0121] in, These are the predicted output voltage and current of the neural network model for the i-th sample. These are historical actual voltage and current data. J(W,b) is the loss function, which measures the difference between the predictions and actual results of a neural network model. The smaller the loss function value, the closer the model's predictions are to the actual results, and the better the model's performance. The weights W and bias b are updated through backpropagation:
[0122]
[0123] Where α is the learning rate. Let be the partial derivative of the loss function with respect to the weights. Let M be the partial derivative of the loss function with respect to the bias. Through continuous iteration, a neural network model is finally established, with the output being M. n The matrix includes voltage and current:
[0124]
[0125] S640. The mechanistic model and the neural network model are combined to obtain a hybrid model of the fuel cell.
[0126] The hybrid model should satisfy the following equation:
[0127] M m =βM e +(1-β)Mn 0≤β≤1;
[0128] In the formula, M m Let M be the output matrix of the mixture model, β be the model selection weights, and M be the output matrix. e M is the output matrix of the mechanistic model. n This is the output matrix of the neural network model. β can be determined based on the amount of data available for the system. When more operational data can be collected, a neural network model is preferred, and β is closer to 0; conversely, a mechanistic model is preferred, and β is closer to 1. At this point, the hybrid model is complete, as shown below. Figure 7 As shown, Figure 7 This is a schematic diagram of a hybrid model for a fault diagnosis method for a fuel cell uninterruptible power supply provided in an embodiment of the present invention.
[0129] S650: Acquire historical fault data and real-time operating data of the fuel cell.
[0130] S660. Based on historical fault data and a pre-built hybrid model, determine the correlation coefficient threshold.
[0131] S670. Calculate the actual correlation coefficient based on the real-time running data and a pre-built hybrid model.
[0132] S680. Based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, determine whether the fuel cell uninterruptible power supply system has failed.
[0133] The technical solution provided in this invention establishes a mechanistic model and a neural network model for fuel cells, combining the outputs of both models to adapt to actual conditions and form a hybrid model. The advantage of this hybrid model lies in fully leveraging the strengths of both modeling methods. The mechanistic model provides a deep understanding of the system's internal operating mechanisms, facilitating in-depth theoretical analysis of the system's working state. Simultaneously, the neural network model makes the system more adaptable, capable of adapting to changes in data and the complexity of system behavior in actual work, effectively improving the system's robustness and reliability.
[0134] Figure 8 Provided for embodiments of the present invention Figure 7This is a schematic diagram of the electronic device used in the fault diagnosis method for a fuel cell uninterruptible power supply provided in an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0135] like Figure 8 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0136] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0137] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as fault diagnosis methods for fuel cell uninterruptible power supply systems.
[0138] In some embodiments, the fault diagnosis method for a fuel cell uninterruptible power supply system can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the fault diagnosis method for the fuel cell uninterruptible power supply system described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the fault diagnosis method for the fuel cell uninterruptible power supply system by any other suitable means (e.g., by means of firmware).
[0139] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0140] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0141] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0143] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0144] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0145] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0146] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A fault diagnosis method for a fuel cell uninterruptible power supply system, characterized in that, include: Acquire historical fault data and real-time operating data of fuel cells; Based on the historical fault data and a pre-built hybrid model, a correlation coefficient threshold is determined; The actual correlation coefficient is calculated based on the real-time operational data and a pre-built hybrid model. Based on the relationship between the actual correlation coefficient and the correlation coefficient threshold, it is determined whether the fuel cell uninterruptible power supply system has malfunctioned; The step of determining the correlation coefficient threshold based on the historical fault data and a pre-built hybrid model includes: The training correlation coefficient is calculated based on the historical fault data and the simulation data obtained under the same fault conditions using a pre-built hybrid model. The initial value of the correlation coefficient threshold is set based on a preset step size, which is preset according to the system calculation requirements. The correlation coefficient threshold is determined based on the initial value of the correlation coefficient threshold and the training correlation coefficient; wherein, setting the initial value of the correlation coefficient threshold based on a preset step size includes: selecting a value within the range of the correlation coefficient threshold every preset step size and setting it as the initial value of the correlation coefficient threshold; The step of determining the correlation coefficient threshold based on the initial value of the correlation coefficient threshold and the training correlation coefficient includes: establishing a confusion matrix table based on the initial value of the correlation coefficient threshold and the training correlation coefficient; calculating the recall and precision based on the confusion matrix table; calculating the F1 score based on the recall and the precision; and determining the maximum value of the F1 score as the correlation coefficient threshold.
2. The fault diagnosis method according to claim 1, characterized in that, The step of calculating the actual correlation coefficient based on the real-time operational data and a pre-built hybrid model includes: The actual correlation coefficient is calculated based on a preset number of real-time running data and real-time simulation data obtained from the real-time running data based on a pre-built hybrid model.
3. The fault diagnosis method according to claim 1, characterized in that, The step of determining whether the fuel cell uninterruptible power supply system has malfunctioned based on the relationship between the actual correlation coefficient and the correlation coefficient threshold includes: The actual correlation coefficient is compared with the correlation coefficient threshold. If the actual correlation coefficient is less than the correlation coefficient threshold, it is determined that the fuel cell uninterruptible power supply system has failed. If the actual correlation coefficient is greater than or equal to the correlation coefficient threshold, then the fuel cell uninterruptible power supply system is determined to be operating normally.
4. The fault diagnosis method according to claim 2, characterized in that, The calculation of the actual correlation coefficient based on a preset number of real-time running data and real-time simulation data obtained from the real-time running data based on a pre-built hybrid model includes: The actual correlation coefficient is calculated using the following formula: ; In the formula, This is the actual correlation coefficient. The covariance between the real-time simulation data and the real-time runtime data output by the hybrid model. The variance of the real-time simulation data output by the hybrid model. For the variance of real-time running data, The real-time simulation data output by the mixture model for the i-th sample. This represents the mean of the real-time simulation data output by the hybrid model. For the real-time running data of the i-th sample, Let be the mean of the real-time running data of the i-th sample.
5. The fault diagnosis method according to claim 3, characterized in that, After determining that the fuel cell uninterruptible power supply system has failed, the method further includes: The fuel cell uninterruptible power supply system sends out a fault signal and acquires current fault information; The correlation coefficient threshold is updated based on the current fault information.
6. The fault diagnosis method according to claim 1, characterized in that, Before acquiring historical fault data and real-time operating data of the fuel cell, the following steps are also included: Acquire historical data of the fuel cell; the historical data includes current, temperature, humidity, oxygen pressure, oxygen flow rate, hydrogen pressure, and hydrogen flow rate; Based on the current-based RC equivalent circuit model, a Kalman filter algorithm is used to establish a mechanism model of the fuel cell. Based on the temperature, humidity, oxygen pressure, oxygen flow rate, hydrogen pressure, and hydrogen flow rate, a neural network model of the fuel cell is established using a neural network algorithm. By combining the mechanistic model and the neural network model, a hybrid model of the fuel cell is obtained.
7. The fault diagnosis method according to claim 6, characterized in that, The process of mixing the mechanistic model and the neural network model to obtain a hybrid model of the fuel cell includes: The hybrid model should satisfy the following equation: ; In the formula, This is the output matrix of the hybrid model. Choose weights for the model. This is the output matrix of the mechanistic model. This is the output matrix of the neural network model.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the fault diagnosis method for the fuel cell uninterruptible power supply system according to any one of claims 1-7.