A fuel cell online health diagnosis and life prediction method, device and system
By using machine learning methods and Internet of Vehicles technology in the fuel cell system, we build LSTM and CNN models, analyze fuel cell data in real time, solve the problem of stack health status and life prediction, achieve accurate fault diagnosis and output power prediction, and improve improve system reliability and user service.
Patent Information
- Application Number
- CN202311507868.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2043-11-14
AI Technical Summary
It is difficult for existing fuel cell systems to accurately predict the health status and life of the stack, resulting in stack performance degradation and difficulty in fault diagnosis, affecting system reliability and user warranty services.
Using online fault identification and life prediction methods based on machine learning, building models through LSTM and CNN networks, combined with Internet of Vehicles technology, real-time collection and analysis of fuel cell operating data, data preprocessing, timing prediction and fault diagnosis are carried out to achieve stack stability. Health status assessment and lifespan prediction.
It achieves accurate prediction of fuel cell output power changes, improves the operational robustness of the system throughout its life cycle, reduces the computational burden, supports continuous learning and automatic fault diagnosis, reduces system costs, and provides modularization Designed for easy maintenance and upgrades.
Smart Images

Figure CN117558947B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of hydrogen fuel cells, and in particular relates to a fuel cell health status prediction and diagnosis system based on machine learning. Background Art
[0002] The hydrogen fuel cell stack is one of the main components of the fuel cell engine. It is a power generation device composed of multiple single cells stacked in series. The reserved interface of the single cell is used to place the sensor probe for data acquisition to monitor the operating parameters, such as voltage, temperature, etc., and the data is collected and processed by the fuel cell control unit (FCU). As the control unit of the engine, the FCU needs to have powerful computing and processing capabilities and a rich I / O set to effectively manage and coordinate various modules to ensure the long-term safe operation of the fuel cell system. The main modules of the fuel cell system are the hydrogen supply module, oxygen supply module, thermal management module, water management module and power conversion module. The FCU collects information through the sensors placed in each module, and processes the data according to the built-in basic software to judge the operating status of the fuel cell stack and the system, determine the input and output of the system and the stack, and form a control algorithm with a dynamic closed loop. It is convenient for users to develop control strategies based on models. FCU generally includes the following functions:
[0003] A CAN-based software flashing tool that pre-flashes the microcontroller with the bootloader;
[0004] Gas circuit management: Control the hydrogen flow, airflow, pressure, humidity and temperature required by the fuel cell system;
[0005] Water and thermal management: Control and regulate circulation, heating, heat dissipation, air temperature, cooling water temperature to improve the power efficiency and reliability of the fuel cell system;
[0006] Electrical management: monitors the voltage and current of the battery stack, adjusts the output power, controls the fuel voltage within a reasonable range, manages the remaining power, and provides voltage and current protection;
[0007] Data communication: communicate with other subsystems to exchange important data and control signals;
[0008] Instant fault diagnosis: Ability to diagnose faults, issue warnings and initiate protection procedures for various subsystems.
[0009] Due to the complexity and variability of fuel cell engine operating conditions, the operating indicators of individual cells in the stack differ. The output power of the stack is limited by the weakest cell in the stack. In particular, when the performance of a single cell is greatly reduced due to flooding, flow channel blockage, leakage, etc., the performance of the stack decays over time. The industry stipulates that when the performance of the stack decays to 90% of its initial life, the stack reaches the end of its life. At present, the life of the stack on the market is about 5,000 to 20,000 hours. Because of the complexity of factors affecting the stack, the life of the stack also changes accordingly. From the perspective of application and warranty, there is an urgent need for an FCU loaded with health status diagnosis and life prediction software for the stack. This FCU loaded with health status and life prediction software can monitor the fuel cell stack and system online, and provide health status assessment and stack life prediction, which is convenient for fuel cell system suppliers to solve failure problems and for users to predict life and determine the time interval for warranty services. Summary of the invention
[0010] Purpose of the invention: In view of the existing fuel cell life prediction technology, the first purpose of the present invention is to provide a fuel cell online fault identification and life prediction method. Combined with the implementation of the algorithm corresponding to the method, the second purpose of the present invention is to provide a fuel cell online fault identification and life prediction device. Based on the application of the device in new energy vehicles and combined with the realization of the Internet of Vehicles, the third purpose of the present invention is to provide a fuel cell online fault identification and life prediction system.
[0011] In order to achieve the above-mentioned purpose of the invention, the technical solution provided by the present invention is as follows.
[0012] A method for online fault identification and life prediction of a fuel cell, the method comprising the following steps:
[0013] S1. Collecting and preprocessing the operating data of the fuel cell, wherein the operating data includes the real-time temperature of the fuel cell stack, the real-time average voltage, the cathode and anode flow rates, and the cooling water flow rate. The preprocessing includes normalizing and constructing a two-dimensional array in a sequence form to segment the training set and the test set;
[0014] S2. Build a LSTM-based training model to train the test data, including single-step prediction of the running data, split the test set X and y, and the matrix is X = test[i,0:-1], y = test[i,-1];
[0015] S3. Construct a fuel cell life prediction model, the prediction function of which is as follows:
[0016] yhat=forecast_lstm(lstm_model,1,X),
[0017] The predicted value is inversely scaled. The inverse scaling function is: yhat = invert_scale (scaler, X, yhat).
[0018] Perform inverse difference on the predicted y value, and the inverse difference function is:
[0019] yhat=invert_difference(raw_value,yhat,len(test_scaled)+1-i), stores the y value being predicted, and finally calculates the root mean square error. The calculation equation is:
[0020]
[0021] S4, constructing a time series prediction model of temperature, average voltage, cathode flow, and cooling water flow according to the training method of step S3, and calculating the time when the output average voltage is lower than the life threshold, thereby obtaining an online life prediction model of the fuel cell and outputting the remaining life;
[0022] S5. Input the monitoring data into the fault diagnosis model constructed based on the CNN network for identification, which is used to identify and predict the fault that has occurred or is about to occur, and output the fault type and the time node of the fault occurrence;
[0023] The monitoring data includes the data obtained from online real-time monitoring and the data for future time periods obtained by prediction.
[0024] Furthermore, the preprocessing described in step S1 first normalizes the operating data of the fuel cell, then merges the operating time date and acquisition time columns in the data matrix, converts the merged columns into a time format, sets them as indexes, and converts the original data into a two-dimensional array in a sequence form through differential transformation. Then, the sequence data is converted into a supervised learning set form, including being divided into a training set and a test set, and the training set and the test set are scaled to between [-1, 1].
[0025] The normalization process is to perform Min-Max standardization, and the conversion equation is as follows:
[0026]
[0027] In the method, the LSTM-based training model constructed in step S2 is constructed through the Python compilation environment, Keras and Tensor flow libraries, and the number of samples of the model is set to 1, the number of training times is set to 5, and the number of neurons in the LSTM layer is set to 4.
[0028] Furthermore, in the method, the online life prediction model of the fuel cell exhibits periodic changes in remaining life due to periodic updates of the prediction model, and the specific change characteristics are related to the current operating conditions.
[0029] Furthermore, the input of the fault diagnosis model constructed based on the CNN network described in step S5 is time, and the output is the stack temperature, average voltage, cathode and anode flow and cooling water flow.
[0030] The fault diagnosis model based on the CNN network described in step S5 includes a convolution layer, which includes 20 5*5 filters with a stride of 1*1, followed by a RELU loss function and a maximum pooling layer, and finally a fully connected layer. The output of the fully connected layer is normalized to a probability using SOFTMAX, and the loss function uses a binary cross entropy loss function, which is:
[0031]
[0032] The model is trained using stochastic gradient descent with momentum and learning rate 0.0001, with a maximum number of 20 epochs and a test set size of 20%.
[0033] A fuel cell online fault identification and life prediction device includes a storage unit and a processor, wherein the ROM in the processor runs the algorithm corresponding to the above-mentioned method; the storage unit includes a RAM for storing prediction data, and the prediction data includes the real-time temperature of the fuel cell stack, the real-time average voltage, the anode and cathode flow, and the cooling water flow.
[0034] A fuel cell online fault identification and life prediction system, the system comprising the above-mentioned fuel cell online fault identification and life prediction device;
[0035] The method includes communicating with a remote control center through the vehicle networking system of the on-board T-BOX, updating the training data of the fuel cell system, and optimizing the learning speed and result accuracy.
[0036] Beneficial effects: Compared with the prior art, the present invention has the following substantial characteristics and significant effects:
[0037] (1) The present invention is applicable to various types of fuel cells and working conditions, and can accurately predict the change of fuel cell output power in the short term;
[0038] (2) The continuously learning prediction module can run offline and complete the update of the network structure without human intervention, thereby improving the operational robustness of the system over the entire battery life cycle;
[0039] (3) According to the characteristics of the battery stack operation data trend, the number of samples of the LSTM algorithm is specified as 1, the number of training times is 5, and the number of neurons in the LSTM layer is 4, ensuring that the goodness of fit meets the requirements while avoiding improper setting of hyperparameters that leads to excessive learning time;
[0040] (4) The CNN convolutional network used in the fault diagnosis module has been trained before the system is enabled, and there is no need for continuous training during the operation of the battery stack and system, which greatly reduces the computing power burden of the system;
[0041] (5) The battery stack operation data used for the first training of the LSTM neural network is obtained from the pre-shipment test to build the initial network structure. The training data after the system is enabled is generated in real time during the operation of the battery stack. A certain amount of operation data is periodically intercepted as a training set, so that the prediction error of the prediction module can be corrected within a certain threshold in a timely manner;
[0042] (6) The system of the present invention can be modularly designed and plug-and-play, and all modules can be disassembled for maintenance or upgrade;
[0043] (7) Linux is used as the operating system, which is open source and free, supports secondary development and extended functions, facilitates remote OTA upgrades via the Internet, and reduces system costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is the basic structure of the device of the present invention;
[0045] Figure 2 It is the operating logic of the system described in the present invention. DETAILED DESCRIPTION
[0046] In order to explain the technical solution disclosed by the present invention in detail, a specific introduction is given below in conjunction with the accompanying drawings of the specification.
[0047] The present invention provides a fuel cell online fault identification and life prediction, and the implementation steps are as follows:
[0048] S1. Collect the operating data of the fuel cell, including the real-time temperature of the stack, the real-time average voltage, the anode and cathode flow, and the cooling water flow. The collection interval is 30 seconds, and the upper limit of the storage time is 20 hours.
[0049] Furthermore, the collected data is subjected to Min-Max standardization, and the conversion equation is:
[0050]
[0051] Read the data, merge the fuel cell stack operation date and acquisition time columns, delete other columns, convert the merged columns into time format, set them as indexes, convert the original data into a two-dimensional array, for example, expressed as [[4.6838], [4.6882], [4.7048]], perform differential conversion into a form such as [[4.6838], [4.6882]], convert the sequence data into a supervised learning set, that is, the previous number is used as input and the next number is used as the corresponding output, split the data set into a training set and a test set, and set the last 2000 data as the test set; scale both the training set and the test set to between [-1, 1].
[0052] S2. Build an LSTM model and train it. Use Python compilation environment, Keras and Tensor flow libraries. The number of samples is 1, the number of training times is 5, the number of neurons in the LSTM layer is 4, traverse the test set, make a single-step prediction on the data, split the test set into X and y, and the matrix after splitting is:
[0053] X=test[i,0:-1], y=test[i,-1].
[0054] S3. Pass the trained model and test data into the prediction function. The prediction function is:
[0055] yhat=forecast_lstm(lstm_model,1,X),
[0056] The predicted value is inversely scaled. The inverse scaling function is: yhat = invert_scale (scaler, X, yhat).
[0057] Perform inverse difference on the predicted y value, and the inverse difference function is:
[0058] yhat=invert_difference(raw_value,yhat,len(test_scaled)+1-i), stores the y value being predicted, and finally calculates the root mean square error. The calculation equation is:
[0059]
[0060] Furthermore, this training is updated in a 4h cycle.
[0061] S4. According to the process described in step S2, a time series prediction model of temperature, average voltage, cathode flow, and cooling water flow is constructed, and the model is extrapolated to the time when the average voltage is lower than the life threshold, and the remaining life is output. Note: Since the prediction model is updated periodically, the remaining life will also change periodically, and the specific change characteristics are related to the current working conditions.
[0062] S5. The last 5 hours of data obtained from real-time monitoring and the 5 hours of data obtained from extrapolation (input is time, output is stack temperature, average voltage, cathode and anode flow, cooling water flow) are submitted to the fault diagnosis module constructed by the CNN network for identification. If a fault occurs or is about to occur, the fault type and the time node of the fault occurrence are output.
[0063] Among them, the convolutional neural network used to build the fault diagnosis module has been trained and embedded in the system before it is used. It contains a convolutional layer, which includes 20 5*5 filters with a stride of 1*1, followed by a RELU loss function and a maximum pooling layer. Finally, a fully connected layer is used, and SOFTMAX is used to normalize the output of the fully connected layer to a probability. The loss function uses a binary cross entropy loss function, and the loss function is:
[0064]
[0065] The training was performed using stochastic gradient descent with momentum and a learning rate of 0.0001. The maximum number of epochs was 20, and the test set accounted for 20%.
[0066] The data used to train the fault diagnosis CNN network is 300h classic fault data captured before leaving the factory, and the fault types are manually labeled in advance for learning. The input is a single variable time, and the output is the stack temperature, three-channel flow, and average voltage. The specific fault segment is the manually labeled fault type. For example, if the stack temperature rises by 20% within a certain period of time, the cooling water flow channel will be blocked, and if the voltage drop rate reaches 15% within a certain period of time, flooding will occur.
[0067] For devices and systems, combined Figure 1 and Figure 2 The application of the present invention is described.
[0068] The present invention adds an online health status detection and life prediction processing unit on the basis of the existing FCU. This processing unit is part of the FCU function. The other functions of the FCU remain unchanged, including CAN bus flashing tool, gas circuit management, water and heat management, electrical management, data communication, fault diagnosis and processing. The main structure of the processing unit is as follows Figure 1As shown, it includes a harness 2 connected to the acquisition device (probe 1), an FCU power supply 3, a processor 5, an accelerator card 9, a processing unit 3, a ROM 4, a RAM 8, and a display 10 (optional). A fuel cell health status prediction and diagnosis software based on machine learning is loaded on the health status processing unit. The core component of the system is a timing prediction module constructed by the LSTM algorithm. It continuously learns the data generated by the operation of the battery stack on the vehicle, takes time as a single input variable, builds a nonlinear layer to construct an intermediate feature to represent the future learning prediction relationship, and periodically updates the training network to continuously correct the prediction error. And through the fault diagnosis module, the predicted data is combined with the existing data for feature recognition, so as to predict the time node and fault type of the fault in advance.
[0069] The system is a functional unit of the fuel cell system FCU, loaded with health status monitoring and life assessment software. The software is constructed using a neural network, that is, the time series prediction module of the LSTM algorithm periodically learns the existing vehicle operation data and predicts the various parameters that characterize the battery health status in the short term. The diagnostic device constructed by the CNN convolutional network then extracts features from the predicted data, identifies and classifies them, and outputs the fault type and the time node of occurrence so that users can prevent and handle them in time.
[0070] Regarding the system, it specifically includes:
[0071] (1) The power supply can be composed of a small battery or a vehicle-mounted DC power supply to ensure continuous power supply to the entire FCU.
[0072] (2) The system requires long-term power supply for operation. When the fuel cell is shut down, the system enters standby mode and power cannot be cut off during this period.
[0073] (3) RAM is at least 4GB and ROM is at least 8GB.
[0074] (4) The minimum processor standard is 1.5 GHz main frequency, dual core and four threads.
[0075] (5) The minimum standard for an accelerator card is to have 256 CUDA cores, support graphics and computing APIs such as OpenGL ES 3.1, Vulkan, and CUDA, and provide 1TFLOPS of floating-point performance.
[0076] (6) The power consumption of the whole system is 80-100W. The power consumption of each module hardware is calculated to select a small battery with corresponding capacity and power.
[0077] (7) The collector needs to collect battery temperature, voltage, and current, and the display outputs data such as the estimated remaining life and the type of impending failure.
[0078] (8) Probe refers to a probe in a broad sense, which can be a sensor that can collect battery voltage and load current.
[0079] The present invention realizes fuel cell service life prediction, fault feature recognition and early warning with extremely small computational cost and low cost, automatically determines the fault type, and facilitates users to promptly handle impending faults or dangerous situations to avoid battery damage or safety accidents.
[0080] Correspondingly, in the above-mentioned device or system, ROM only stores algorithms, operating systems and real data, and prediction data is stored in RAM. The real data in ROM is deleted and updated regularly to ensure that the training set of the prediction module remains updated while avoiding disk fullness. The accelerator card is only used for machine learning acceleration, and data processing, image processing and output are completed by the processor to ensure that all the computing power of the accelerator card is used for training the network. The collector is a probe, which can be broadly defined as a sensor that records operating parameters such as load current, single-chip voltage, battery stack temperature, etc.
Claims
1. A fuel cell online fault identification and life prediction system, characterized in that: The system includes communicating with the remote control center through the vehicle-mounted T-BOX's Internet of Vehicles system to update the training data of the fuel cell system and optimize the learning speed and result accuracy; The system includes a fuel cell online fault identification and life prediction unit, a storage unit and a processor, wherein the storage unit includes a RAM for storing prediction data, and the prediction data includes the real-time temperature of the fuel cell stack, the real-time average voltage, the cathode and anode flow, and the cooling water flow; The system includes a timing prediction module built based on the LSTM algorithm, which continuously learns the data generated by the operation of the battery stack on the vehicle, takes time as a single input variable, builds a nonlinear layer to construct an intermediate feature to represent the future learning prediction relationship, and periodically updates the training network to continuously correct the prediction error. The output is the battery stack temperature, three-channel flow, and average voltage. The specific fault section is the manually marked fault type, and the predicted data is combined with the existing data through the fault diagnosis module to perform feature recognition, so as to predict the time node and fault type of the fault in advance; The system includes executing a fuel cell online fault identification and life prediction method, the method comprising the following steps: S1. Collecting and preprocessing the operating data of the fuel cell, wherein the operating data includes the real-time temperature of the fuel cell stack, the real-time average voltage, the cathode and anode flow rates, and the cooling water flow rate. The preprocessing includes normalizing and constructing a two-dimensional array in a sequence form to segment the training set and the test set; The preprocessing first normalizes the operation data of the fuel cell, then merges the columns of the operation time date and the acquisition time in the data matrix, converts the merged columns into a time format, sets them as indexes, converts the original data into a two-dimensional array in a sequence form through differential transformation, and then converts the sequence data into a supervised learning set form, including segmentation into a training set and a test set, wherein both the training set and the test set are scaled to between [-1, 1]; S2. Build a training model based on LSTM to train the test data, including single-step prediction of the running data, split the test set X and y, and the matrix is X = test[i,0:-1], y = test[i,-1]; S3. Construct a fuel cell life prediction model, the prediction function of which is as follows: yhat=forecast_lstm(lstm_model,1,X), The predicted value is inversely scaled. The inverse scaling function is: yhat = invert_scale (scaler, X, yhat). Perform inverse difference on the predicted y value, and the inverse difference function is: yhat=invert_difference(raw_value,yhat,len(test_scaled)+1-i), Store the y value being predicted, and finally calculate the root mean square error. The calculation equation is: S4, constructing a time series prediction model of temperature, average voltage, cathode flow, and cooling water flow according to the training method of step S3, and calculating the time when the output average voltage is lower than the life threshold, thereby obtaining an online life prediction model of the fuel cell and outputting the remaining life; S5. Input the monitoring data into the fault diagnosis model constructed based on the CNN network for identification, which is used to identify and predict the fault that has occurred or is about to occur, and output the fault type and the time node of the fault occurrence; The fault diagnosis model built based on the CNN network contains a convolutional layer, which includes 20 5*5 filters with a stride of 1*1, followed by a RELU loss function and a maximum pooling layer, and finally a fully connected layer. The output of the fully connected layer is normalized to probability using SOFTMAX, and the loss function uses a binary cross entropy loss function. The loss function is: The model was trained using stochastic gradient descent with momentum and learning rate 0.0001, with a maximum number of epochs of 20 and a test set of 20%; The input of the fault diagnosis model built based on the CNN network is time, and the output is the stack temperature, average voltage, cathode and anode flow, and cooling water flow; the monitoring data includes the data obtained by online real-time monitoring and the data of the future time period obtained by prediction; In the method, the online life prediction model of the fuel cell is updated periodically, and the remaining life presents periodic changes, and the specific change characteristics are related to the current working conditions.
2. The fuel cell online fault identification and life prediction system according to claim 1, characterized in that: The normalization process is to perform Min-Max standardization, and the conversion equation is as follows:
3. The fuel cell online fault identification and life prediction system according to claim 1, characterized in that: The LSTM-based training model constructed in step S2 is constructed through the Python compilation environment, Keras and Tensor flow libraries. The number of samples of the model is set to 1, the number of training times is set to 5, and the number of neurons in the LSTM layer is set to 4.
Citation Information
Cited By
Method and device for determining a time and a type of a maintenance measure of an energy converter system or energy storage system using semantic modelling
WO2026131522A1
