Hydrogen fuel cell protection control strategy simulation method and system

By constructing a fault prediction model of hydrogen fuel cell and a reinforced learning training environment, combined with deep Q network and digital twin model, the problem of the lack of adaptive optimization capabilities of existing hydrogen fuel cell protection and control technologies is solved, and a more intelligent and efficient protection and control strategy is achieved.

CN120073000AActive Publication Date: 2025-05-30CSSC SILENT ELECTRIC SYSTEM (WUXI) TECHNOLOGY CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510533480.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-05-30
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

The existing hydrogen fuel cell protection control technology lacks intelligent adaptive optimization capabilities and is difficult to respond optimally to different fault types.

Method used

A long and short-term memory neural network is used to build a hydrogen fuel cell failure prediction model, combined with a reinforcement learning training environment and a deep Q network, the hydrogen fuel cell protection control strategy is trained, and a digital twin model is constructed through physical modeling for simulation testing and optimization.

Benefits of technology

Intelligent adaptive optimization of hydrogen fuel cell protection control strategy has been realized, the response ability to different fault types has been improved, and the stability and fault recovery ability of the system have been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120073000A_ABST
    Figure CN120073000A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrogen fuel cell protection control strategy simulation method and system, and relates to the technical field of hydrogen fuel cell control, and the method comprises the steps: constructing a reinforcement learning training environment according to a fault prediction result, setting a state space, an action space and a reward function, employing a deep Q network, training a hydrogen fuel cell protection control strategy, and obtaining a fault prediction result; obtaining a preliminary protection control strategy; building a digital twinborn model of the hydrogen fuel cell through physical modeling, carrying out simulation testing on the preliminary protection control strategy, and optimizing protection control strategy parameters by utilizing a self-adaptive adjustment function to obtain an optimized protection control strategy; according to the invention, a simulation test is carried out on a preliminary protection control strategy by constructing a digital twin model of the hydrogen fuel cell and combining electrochemical characteristics, thermal management characteristics, fuel supply characteristics and power regulation characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hydrogen fuel cell control, and particularly to a simulation method and system for a hydrogen fuel cell protection control strategy. Background Art

[0002] As an efficient and clean energy conversion device, hydrogen fuel cells have broad application prospects in the fields of transportation, stationary power generation, and portable energy; the operating environment of hydrogen fuel cells is complex, involving multiple links such as electrochemical reactions, thermal management, fuel supply, and power regulation, and is susceptible to factors such as temperature, pressure, and load fluctuations during operation, resulting in performance degradation or failures; studying the operating state monitoring and fault diagnosis technologies of hydrogen fuel cells to improve the reliability and safety of hydrogen fuel cells has become an important research direction in this field; the existing hydrogen fuel cell operation protection strategies mainly rely on control methods based on empirical rules, such as triggering protection mechanisms by setting fixed voltage, current, or temperature thresholds. The main problem of the existing hydrogen fuel cell protection control technology lies in the lack of intelligent adaptive optimization capabilities; traditional protection strategies are usually based on expert experience and preset rules, lacking the self-learning and self-optimization capabilities for control strategies under different working conditions, resulting in difficulty in achieving optimal responses to different fault types in practical applications; for example, in the case of large fluctuations in hydrogen fuel cell voltage or power demand changes, fixed protection strategies may not be able to accurately identify the true impact of faults, leading to unreasonable triggering of protection mechanisms and thus affecting stability. Summary of the Invention

[0003] In view of the above existing problems, the present invention is proposed.

[0004] Therefore, the present invention provides a simulation method for a hydrogen fuel cell protection control strategy to solve the problem of the lack of intelligent adaptive optimization capabilities in the existing hydrogen fuel cell protection control technology.

[0005] To solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a simulation method for a hydrogen fuel cell protection control strategy, which includes collecting hydrogen fuel cell operation data and hydrogen fuel cell fault data, and performing preprocessing and fusion; constructing a hydrogen fuel cell fault prediction model based on a long short-term memory neural network, inputting the hydrogen fuel cell operation data and the hydrogen fuel cell fault data to obtain a fault prediction result; constructing a reinforcement learning training environment according to the fault prediction result, setting a state space, an action space and a reward function, and using a deep Q network to train the hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy; constructing a digital twin model of the hydrogen fuel cell through physical modeling, performing a simulation test on the preliminary protection control strategy, and optimizing the protection control strategy parameters by using an adaptive adjustment function to obtain an optimized protection control strategy.

[0006] As a preferred embodiment of the hydrogen fuel cell protection control strategy simulation method of the present invention, wherein: the steps of collecting the hydrogen fuel cell operation data and the hydrogen fuel cell fault data, and performing preprocessing and fusion are as follows. Collect the voltage, current, temperature, pressure and power of the hydrogen fuel cell to obtain the hydrogen fuel cell operation data, and collect the fault records and fault alarm logs of the hydrogen fuel cell to obtain the hydrogen fuel cell fault data. Perform data cleaning on the two types of data, remove outliers and fill in missing data, and perform normalization processing to obtain the standardized hydrogen fuel cell operation data and hydrogen fuel cell fault data. Adopt a time alignment method to match the standardized hydrogen fuel cell operation data and hydrogen fuel cell fault data according to the time stamp, and adopt a data mapping method to analyze the correlation between the hydrogen fuel cell operation data and the hydrogen fuel cell fault data and perform matching. Adopt a weighted average method to fuse the matched hydrogen fuel cell operation data and hydrogen fuel cell fault data to obtain a fused high-dimensional data set.

[0007] As a preferred embodiment of the hydrogen fuel cell protection control strategy simulation method of the present invention, wherein: the steps of constructing a hydrogen fuel cell fault prediction model based on a long short-term memory neural network, inputting the hydrogen fuel cell operation data and the hydrogen fuel cell fault data to obtain a fault prediction result are as follows. Based on the fused high-dimensional data set, perform time series format conversion and divide the training set and the test set. Construct an LSTM network structure, set an input layer, a hidden layer and an output layer, and initialize the network weights and bias parameters to establish an initial framework of the fault prediction model. Set a loss function and an optimization algorithm, input the training set and the test set into the LSTM model for iterative training, adjust the network parameters, and obtain an optimized fault prediction model. Based on the operation data and fault data of the hydrogen fuel cell, input the optimized fault prediction model to obtain the fault prediction result.

[0008] As a preferred embodiment of the hydrogen fuel cell protection control strategy simulation method of the present invention, the following steps are included: set the loss function and optimization algorithm, input the training set and test set into the LSTM model for iterative training, and adjust the network parameters to obtain the optimized fault prediction model. The specific steps are as follows. Set the mean squared error as the loss function, select the adaptive moment estimation optimization algorithm, and initialize the training parameters of the LSTM model to obtain the fault prediction model to be trained. Input the training set data into the LSTM model, perform forward propagation calculation, output the predicted value, calculate the error between the predicted value and the true value, calculate the gradient using the backpropagation algorithm, and update the model parameters using the Adam optimization algorithm to obtain the updated LSTM model. Repeatedly execute the training process until the loss converges. Input the test set data into the updated LSTM model, evaluate the prediction accuracy, and obtain the optimized fault prediction model.

[0009] As a preferred embodiment of the hydrogen fuel cell protection control strategy simulation method of the present invention, the following steps are included: construct a reinforcement learning training environment according to the fault prediction result, set the state space, action space, and reward function, and use the deep Q-network to train the hydrogen fuel cell protection control strategy to obtain the preliminary protection control strategy. The specific steps are as follows. According to the fault prediction result, extract the operation state, fault type, and influence degree of the hydrogen fuel cell to construct a reinforcement learning training environment. Based on the operation data of the hydrogen fuel cell, define the state space and action space, and design the reward function based on the weighted multi-objective optimization method. Use the deep Q-network combined with the state space and action space to construct the hydrogen fuel cell protection control strategy. The agent updates the strategy by combining the cumulative reward function with the Q value, constructs an evaluation mechanism for reinforcement learning, and adjusts by exploring different strategies, iteratively trains the deep Q-network, continuously optimizes the hydrogen fuel cell protection control strategy, and finally obtains the preliminary protection control strategy.

[0010] As a preferred embodiment of the hydrogen fuel cell protection control strategy simulation method of the present invention, the following steps are included: construct a digital twin model of the hydrogen fuel cell through physical modeling, and perform simulation tests on the preliminary protection control strategy. The specific steps are as follows. Construct a physical model based on the electrochemical characteristics, thermal management characteristics, fuel supply characteristics, and power regulation characteristics of a hydrogen fuel cell to obtain a digital twin model of the hydrogen fuel cell. Based on the operating data of the hydrogen fuel cell, calculate the predicted state of the digital twin model and compare it with the actual operating state of the hydrogen fuel cell, dynamically calibrate the parameters, and obtain an optimized digital twin model; Input the preliminary protection control strategy into the optimized digital twin model, construct a simulation test environment, simulate the faults during the operation of the hydrogen fuel cell, analyze the response effect of the preliminary protection control strategy, and obtain the simulation test results.

[0011] As a preferred solution of the hydrogen fuel cell protection control strategy simulation method of the present invention, wherein: the step of optimizing the protection control strategy parameters by using the adaptive adjustment function to obtain the optimized protection control strategy is as follows, Based on the simulation test results, calculate the changes in the performance indicators during the execution of the strategy, evaluate the stability and fault recovery ability of the strategy, and obtain the optimization objective; According to the optimization objective, use the adaptive adjustment function to optimize the protection control strategy parameters, input them into the digital twin model for simulation testing, verify the optimization effect, and obtain the optimized protection control strategy.

[0012] In a second aspect, the present invention provides a hydrogen fuel cell protection control strategy simulation system, including a data acquisition module, a fault prediction module, a reinforcement learning training module, and an adaptive optimization module; the data acquisition module is used to collect the operating data and fault data of the hydrogen fuel cell, and perform preprocessing and fusion; the fault prediction module is used to construct a hydrogen fuel cell fault prediction model based on a long short-term memory neural network, input the operating data and fault data of the hydrogen fuel cell, and obtain the fault prediction result; the reinforcement learning training module is used to construct a reinforcement learning training environment according to the fault prediction result, set the state space, action space, and reward function, and use a deep Q network to train the hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy; the adaptive optimization module is used to construct a digital twin model of the hydrogen fuel cell through physical modeling, perform simulation testing on the preliminary protection control strategy, and use the adaptive adjustment function to optimize the protection control strategy parameters to obtain the optimized protection control strategy.

[0013] In a third aspect, the present invention provides a computer device, including a memory and a processor, wherein: when the computer program is executed by the processor, it realizes any step of the hydrogen fuel cell protection control strategy simulation method as described in the first aspect of the present invention.

[0014] Fourthly, the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein: when the computer program is executed by a processor, any step of the hydrogen fuel cell protection control strategy simulation method described in the first aspect of the present invention is implemented.

[0015] The beneficial effects of the present invention are as follows: By constructing a digital twin model of a hydrogen fuel cell, combining electrochemical characteristics, thermal management characteristics, fuel supply characteristics, and power regulation characteristics, the preliminary protection control strategy is simulated and tested, and by adaptively adjusting and optimizing the control strategy parameters, the strategy verification and optimization are completed in a virtual environment, avoiding the risks brought by directly conducting experiments on hydrogen fuel cells, reducing the test cost, and improving the reliability of the control strategy. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0017] Figure 1 It is a flowchart of the hydrogen fuel cell protection control strategy simulation method in Embodiment 1; Figure 2 It is a schematic diagram of the hydrogen fuel cell protection control strategy simulation system in Embodiment 1; Figure 3 It is a schematic diagram of the fault prediction model training process in Embodiment 1; Figure 4 It is a schematic diagram of reinforcement learning training and optimization in Embodiment 1. Detailed Embodiments

[0018] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the following will make a detailed description of the specific embodiments of the present invention in conjunction with the drawings of the specification.

[0019] Many specific details are set forth in the following description in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0020] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation of the present invention. The "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that mutually excludes other embodiments.

[0021] Example 1, referring to Figures 1 to 4 , which is the first embodiment of the present invention. This embodiment provides a simulation method for a hydrogen fuel cell protection control strategy, including the following steps: S1. Collect the operating data and fault data of the hydrogen fuel cell, and perform preprocessing and fusion.

[0022] Collect the voltage, current, temperature, pressure, and power output of the hydrogen fuel cell to obtain the operating data of the hydrogen fuel cell. Collect the fault records and fault alarm logs of the hydrogen fuel cell to obtain the fault data of the hydrogen fuel cell.

[0023] It should be noted that by collecting the real-time operating data of the voltage, current, temperature, pressure, and power of the hydrogen fuel cell, as well as the fault data such as fault records and fault alarm logs, it provides basic data support for fault prediction and control strategy optimization; the operating data of the hydrogen fuel cell can comprehensively reflect the working state of the hydrogen fuel cell, such as the health status of the stack, the impact of temperature on performance, and the fuel supply situation, while the fault data of the hydrogen fuel cell is used to analyze abnormal patterns and improve the accuracy of fault prediction; by combining the operating data of the hydrogen fuel cell with the fault data of the hydrogen fuel cell, not only can the correlation be established to provide complete information for digital twin modeling and reinforcement learning optimization, but also the stability and fault recovery ability of the hydrogen fuel cell can be improved, ensuring that the control strategy is optimized based on accurate information, and improving reliability and safety.

[0024] Perform data cleaning on the two types of data, remove outliers and fill in missing data, and perform normalization processing to obtain the standardized operating data and fault data of the hydrogen fuel cell.

[0025] It should be noted that by performing data cleaning on the collected operating data and fault data of the hydrogen fuel cell, the quality and reliability of the operating data of the hydrogen fuel cell are improved; outliers are removed to exclude invalid data caused by sensor failures, external interferences, or data acquisition errors, ensuring the accuracy of the input operating data of the hydrogen fuel cell; missing data is filled in to avoid affecting subsequent analysis due to partial data missing, and interpolation and mean filling methods can be used to complete the data; normalization processing is performed to map the operating data of the hydrogen fuel cell to the same numerical range, eliminate the dimensional differences between different physical quantities, improve the comparability of the operating data of the hydrogen fuel cell, and make it more suitable for machine learning model training; obtaining the standardized operating data and fault data of the hydrogen fuel cell provides high-quality input for subsequent fault prediction and control strategy optimization, and improves the calculation stability and accuracy of the machine learning model.

[0026] Adopt the time alignment method to match the standardized hydrogen fuel cell operation data with the hydrogen fuel cell fault data according to the timestamps, and adopt the data mapping method to analyze and match the correlation between the hydrogen fuel cell operation data and the hydrogen fuel cell fault data.

[0027] It should be noted that the time alignment of the standardized hydrogen fuel cell operation data and the hydrogen fuel cell fault data is carried out to ensure that the two types of data are matched according to a unified time benchmark; during the time alignment process, the interpolation method or the sliding window method is used to handle the problem of inconsistent data sampling frequencies, so that the timestamps of the hydrogen fuel cell operation data and the hydrogen fuel cell fault data are aligned as much as possible. Extract features from the hydrogen fuel cell operation data and fault data after time alignment, select key variables such as voltage, current, temperature, pressure, power output, historical fault types and time intervals, etc., and perform feature encoding; use the correlation analysis method (such as Pearson correlation coefficient or mutual information analysis) to calculate the correlation between each operation parameter and the fault event, and screen out the feature pairs with high correlation; use the time series pattern mining method, such as dynamic time warping or Granger causality analysis, to explore the time lag relationship of different operation variables on the occurrence of faults; construct a multi-variable regression model or a decision tree model to analyze the operation parameter combinations that are most likely to cause faults when the faults occur, and form a fault feature mapping relationship. Construct a matching rule, and match the hydrogen fuel cell operation data with the corresponding fault data according to the alignment of timestamps and the results of correlation analysis; for the data at the moment of fault occurrence, extract the time window data before and after the fault, and construct a high-dimensional data set in the way of time series data enhancement to ensure the integrity and accuracy of data matching, and finally generate a fusion data set that can be used for training and analysis.

[0028] Adopt the weighted average method to fuse the matched hydrogen fuel cell operation data and hydrogen fuel cell fault data to obtain a fused high-dimensional data set.

[0029] It should be noted that the matched hydrogen fuel cell operation data and hydrogen fuel cell fault data are normalized to ensure that the dimensions remain consistent in order to eliminate the dimensional influence of different physical quantities; corresponding weights are assigned according to the importance of hydrogen fuel cell operation data and hydrogen fuel cell fault data in fault analysis and status assessment; for example, key parameters such as voltage and temperature have higher weights, while some parameters that have less impact on fault prediction have lower weights, to ensure that the fused data can accurately reflect the operating status and fault characteristics of the hydrogen fuel cell, and based on the assigned weights, the weighted average method is used to adjust the proportion of hydrogen fuel cell operation data and hydrogen fuel cell fault data, so that high-weight data has a greater impact on the final fusion result; during the fusion process, data smoothing will also be performed to eliminate outliers, and certain dimensionality reduction or feature selection methods will be used to optimize the expression of high-dimensional data, and finally a fused high-dimensional data set will be formed.

[0030] S2. Based on the long short-term memory neural network, a hydrogen fuel cell fault prediction model is constructed, and the hydrogen fuel cell operation data and hydrogen fuel cell fault data are input to obtain the fault prediction results.

[0031] Based on the fused high-dimensional data set, the time series format is converted and divided into training sets and test sets.

[0032] It should be noted that the fused high-dimensional data set is converted into a time series format, the data is arranged in chronological order, and the sliding window method is used to construct time series segments, each segment contains data points of multiple time steps, which can learn time dependencies; the data set is divided according to a certain ratio (such as 80% training, 20% testing), and the data in the first 80% of the time range is used as the training set to learn the relationship between the operating status and failure of the hydrogen fuel cell, and the data in the last 20% of the time range is used as the test set to verify the generalization ability; in order to prevent the leakage of the test set data, in the division process, ensure that the test set data does not appear in the training set, and maintain the time consistency of the test set data to avoid using future information in future time steps; the training set and the test set are stored in the format of a time step feature matrix, ready to be input into the long short-term memory neural network for training.

[0033] Construct the LSTM network structure, set the input layer, hidden layer and output layer, initialize the network weights and bias parameters, and establish the initial framework of the fault prediction model.

[0034] Set the LSTM network structure and determine the specific configurations of the input layer, hidden layer, and output layer as follows: The input layer receives the time series data of the hydrogen fuel cell. The data at each time step includes multi-dimensional features such as voltage, current, temperature, pressure, power, etc. Multiple LSTM units are set in the hidden layer. Each unit has a memory cell and a gating mechanism (input gate, forget gate, and output gate) to extract long-term dependencies in the time series. A single-layer or multi-layer stacked LSTM structure can be adopted to enhance the feature extraction ability. In the output layer, the high-dimensional time series features extracted by the LSTM are mapped to the prediction target, that is, the probability of a fault occurring or the specific fault category, through a fully connected layer. The number of neurons in the output layer depends on the number of fault classification categories (such as binary classification or multi-class classification problems). Initialize the weight and bias parameters, and use initialization methods such as Xavier initialization to ensure the stable convergence of the network and establish the initial framework of the fault prediction model.

[0035] Set the loss function and optimization algorithm, input the training set and test set into the LSTM model for iterative training, and adjust the network parameters to obtain an optimized fault prediction model.

[0036] Based on the hydrogen fuel cell operation data and hydrogen fuel cell fault data, input them into the optimized fault prediction model to obtain the fault prediction results.

[0037] It should be noted that the optimized LSTM fault prediction model is input in the time series format. In the fault prediction model, the input layer receives the hydrogen fuel cell operation data at the current time step. The LSTM units in the hidden layer combine long-term and short-term dependencies to extract the features of the hydrogen fuel cell operation data and generate a hidden vector of the current state. Finally, the fault prediction results are calculated by the output layer. The fault prediction results output by the fault prediction model include the predicted fault type, occurrence time, and possible impact degree.

[0038] S3. Set the loss function and optimization algorithm, input the training set and test set into the LSTM model for iterative training, and adjust the network parameters to obtain an optimized fault prediction model.

[0039] Set the mean squared error as the loss function, select the adaptive moment estimation optimization algorithm, initialize the training parameters of the LSTM model, and obtain the fault prediction model to be trained.

[0040] It should be noted that define the network structure of the LSTM model, including the input layer, multiple LSTM hidden layers, and the output layer. The input layer can receive the preprocessed hydrogen fuel cell operation data and hydrogen fuel cell fault data. Set the mean squared error as the loss function to measure the error between the predicted value and the actual fault label, and select the adaptive moment estimation optimization algorithm for gradient update. Initialize the parameters of the LSTM model, including assigning values to the weight matrix using the Xavier or He initialization method to ensure that the gradients remain stable during forward and backward propagation. At the same time, set the bias parameters to zero; set the learning rate, batch size, and number of training epochs so that the LSTM model can efficiently learn data features; after initialization, the LSTM model enters the training phase and uses the training dataset for iterative optimization to obtain the fault prediction model to be trained.

[0041] Input the training set data into the LSTM model, perform forward propagation calculations, output the predicted values, calculate the error between the predicted values and the true values, calculate the gradients using the backpropagation algorithm, and update the parameters of the LSTM model using the Adam optimization algorithm to obtain the updated LSTM model.

[0042] It should be noted that the training set data is input into the LSTM model in time series format. The data at each time step is passed from the input layer to the hidden layer. In the hidden layer, the LSTM unit uses the input gate, forget gate, and output gate to screen and memorize information about the state, generating the hidden state at the current time step; the hidden state is mapped to the output layer through the fully connected layer to calculate the predicted values; During the training process of the LSTM model, first obtain the predicted values of the model and compare them with the corresponding true values; calculate the prediction error at each time step and summarize all the errors to measure the overall error size. After the error calculation is completed, the error values are used for backpropagation to adjust the weights and bias parameters of the LSTM model and optimize the prediction ability of the LSTM model; through multiple iterative trainings, continuously reduce the error and improve the stability and accuracy of the LSTM model; use the Adam optimization algorithm to update the network parameters and adjust the weights of the LSTM unit so that the next training can better fit the data distribution; continue in multiple rounds of iteration until the error of the LSTM model reaches the preset range or the number of training epochs reaches the set value, and finally obtain the updated LSTM model.

[0043] Repeatedly execute the training process until the loss converges. Input the test set data into the updated LSTM model, evaluate the prediction accuracy, and obtain the optimized fault prediction model.

[0044] It should be noted that by repeatedly executing the training process, the LSTM model continuously adjusts the weight and bias parameters until the loss function converges, that is, the prediction error of the LSTM model stabilizes at a low level, indicating that the learning ability has reached the optimal state; after the LSTM model is updated, the test set data is input into the LSTM model to obtain the corresponding predicted values; the predicted values are compared with the corresponding true values in the test set, and the errors are calculated, including indicators such as mean absolute error and mean square error, to evaluate the prediction ability of the LSTM model for different fault modes; classification evaluation indicators such as accuracy, recall rate, and F1-score are used to analyze the recognition ability of the LSTM model for different types of faults; further, the prediction curve and the true value curve are plotted to observe the degree of trend matching, and the misprediction situation is analyzed in combination with the confusion matrix; based on the comprehensive evaluation results, the prediction accuracy of the LSTM model is judged, and the hyperparameters or training strategies are adjusted as needed to obtain an optimized fault prediction model.

[0045] S4. Construct a reinforcement learning training environment according to the fault prediction results, set the state space, action space, and reward function, and use the deep Q-network to train the protection control strategy of the hydrogen fuel cell to obtain a preliminary protection control strategy.

[0046] According to the fault prediction results, extract the operating state, fault type, and influence degree of the hydrogen fuel cell to construct a reinforcement learning training environment.

[0047] It should be noted that based on the fault prediction results, the real-time operating state of the hydrogen fuel cell is extracted, including key parameters such as voltage, current, temperature, pressure, and power output, to comprehensively reflect the working conditions of the hydrogen fuel cell; combined with the hydrogen fuel cell fault data, the current fault type is identified, such as abnormal stack voltage, gas supply failure, cooling failure, etc., and the typical characteristics of various faults are analyzed to ensure that the training environment can cover a variety of possible fault situations; the influence degree of different faults on the hydrogen fuel cell is evaluated, such as the power drop amplitude, voltage fluctuation range, temperature over-limit situation, etc. caused by the fault, and a quantitative index is used to grade the fault severity, so that the reinforcement learning agent can adopt adaptive control strategies under different fault conditions; define the state space (including the operating parameters of the hydrogen fuel cell and the fault state of the hydrogen fuel cell), the action space (different protection control measures, such as adjusting gas flow, temperature management, load regulation, etc.), and design the reward function. Combining the state space, action space, and reward function, a reinforcement learning training environment is obtained, enabling the agent to learn the protection control strategy during the training process and improving the stability and fault recovery ability of the hydrogen fuel cell.

[0048] Define the state space and action space based on the operating data of the hydrogen fuel cell, and design the reward function based on the weighted multi-objective optimization method.

[0049] It should be noted that based on the operation data of the hydrogen fuel cell, the state space and action space of reinforcement learning are defined, and a weighted multi-objective optimization method is used to design the reward function. The state space is used to describe the operation state of the hydrogen fuel cell, including voltage, current, temperature, pressure, power output, and fault state, so that the agent can comprehensively perceive the health status of the hydrogen fuel cell. The action space defines different protection control strategies, such as adjusting the load, optimizing the cooling strategy, and triggering the protection mechanism, to cope with different operation states and fault conditions. To guide the agent to learn the optimal control strategy, a weighted multi-objective optimization method is used to design the reward function, comprehensively considering the performance indicators of the hydrogen fuel cell and the fault recovery ability, ensuring that the agent can balance different objectives during the training process, optimize the protection control strategy, and thus improve the reliability and operation efficiency of the hydrogen fuel cell.

[0050] The deep Q-network is combined with the state space and action space to construct the protection control strategy of the hydrogen fuel cell.

[0051] It should be noted that the deep Q-network is initialized, including setting the input layer (corresponding to the state space), the hidden layer (used for feature extraction and decision optimization), and the output layer (corresponding to the Q-values of different control actions), and the network weights are randomly initialized. In the reinforcement learning training environment, the agent interacts with the environment, selects actions based on the current state, calculates the Q-values using the deep Q-network, obtains the new state and reward after executing the actions, and stores the experience data for subsequent training. The experience replay mechanism is adopted to randomly sample training samples from the stored data, and the deep Q-network parameters are adjusted using the error calculation and backpropagation algorithm, so that the network gradually learns a better control strategy. The above training steps are repeated until the deep Q-network converges, and finally, the protection control strategy of the hydrogen fuel cell based on the deep Q-network is obtained.

[0052] The agent constructs the evaluation mechanism of reinforcement learning by combining the cumulative reward function with the Q-value update strategy, and adjusts it by exploring different strategies, iteratively trains the deep Q-network, continuously optimizes the protection control strategy of the hydrogen fuel cell, and finally obtains the preliminary protection control strategy.

[0053] It should be noted that the agent observes the current state of the hydrogen fuel cell in the reinforcement learning environment, predicts the Q-values of each executable action according to the deep Q-network, and selects appropriate actions using the greedy strategy, such as adjusting the output power, optimizing the cooling strategy, or triggering the warning mechanism, etc.; after the agent executes the action, it enters a new state and calculates the reward value brought by the action, such as increasing the battery life, reducing the failure rate, or optimizing the energy efficiency; the agent stores the sub-decision in the experience replay pool and randomly extracts experience data from it for training regularly to improve the generalization ability of the strategy; the Q-value update uses the Bellman equation, that is, the return is calculated using the current reward value and the maximum Q-value of the next state, and the mean square error loss function is used for backpropagation optimization, so that the deep Q-network gradually learns a better protection control strategy; a target network is introduced to stabilize the training process and prevent the strategy update from being too drastic; during the whole training process, the agent continuously tries different control strategies, gradually adjusts the Q-value update strategy, and through multiple rounds of iterative training, the deep Q-network can make optimal decisions under different fault conditions, and finally obtain a preliminary protection control strategy to ensure the safety and stability of the hydrogen fuel cell.

[0054] S5. Build a digital twin model of the hydrogen fuel cell through physical modeling and conduct simulation tests on the preliminary protection control strategy.

[0055] Build a physical model through the electrochemical characteristics, thermal management characteristics, fuel supply characteristics, and power regulation characteristics of the hydrogen fuel cell to obtain the digital twin model of the hydrogen fuel cell. Based on the operation data of the hydrogen fuel cell, calculate the predicted state of the digital twin model and compare it with the actual operation state of the hydrogen fuel cell, and dynamically calibrate the parameters to obtain the optimized digital twin model.

[0056] It should be noted that based on the electrochemical reaction mechanism of the hydrogen fuel cell, an electrochemical model is established to describe the electrochemical oxidation of hydrogen in the catalytic layer, the transport characteristics of the proton exchange membrane, and the process of generating current; combined with the thermal management characteristics of the fuel cell, a thermodynamics model is established to simulate the temperature distribution, heat conduction, heat dissipation, and response behavior of the temperature control system inside and around the battery; based on the fuel supply characteristics of the hydrogen fuel cell, analyze the influence of hydrogen storage, supply rate, gas diffusion, and pressure change on the operation of the hydrogen fuel cell, and establish a hydrogen supply model; describe the energy transmission relationship between the fuel cell and the external load, including the output current, voltage, and power change characteristics, and build a power regulation model; based on the above physical models, integrate each sub-model to build a digital twin model of the hydrogen fuel cell; After the digital twin model is constructed, collect the operating data of the hydrogen fuel cell, including voltage, current, temperature, hydrogen flow rate, pressure, etc., and input it into the digital twin model to calculate the predicted state of the digital twin model; compare the predicted state with the operating state of the hydrogen fuel cell and analyze the deviation between the two; according to the deviation results, dynamically adjust the parameters of the digital twin model, such as correcting the electro-chemical reaction rate coefficient, optimizing the heat conduction parameters, adjusting the hydrogen supply flow control parameters, etc., to make the prediction results of the digital twin model gradually approach the actual operating conditions of the hydrogen fuel cell; continuously iterate the above steps until the error between the predicted state and the actual operating state of the digital twin model converges, and obtain the optimized digital twin model.

[0057] Input the preliminary protection control strategy into the optimized digital twin model, construct a simulation test environment, simulate the faults during the operation of the hydrogen fuel cell, analyze the response effect of the preliminary protection control strategy, and obtain the simulation test results.

[0058] It should be noted that the preliminary protection control strategy obtained through training is input into the optimized digital twin model. The strategy includes control measures for different fault types, such as gas supply regulation, temperature management adjustment, load distribution optimization, etc.; construct a simulation test environment in the digital twin model, set the initial operating state of the fuel cell, and load key operating parameters according to the actual operating conditions, such as hydrogen flow rate, temperature, voltage, current, and load changes. Introduce different types of faults in the simulation environment, including insufficient hydrogen supply, abnormal cooling, load mutation, etc., and monitor the operating state of the hydrogen fuel cell under different fault scenarios; for each fault, execute the preliminary protection control strategy and record the execution of the strategy, including the time of adjusting the control parameters, the changes in battery voltage, temperature, fuel utilization rate, etc. after the strategy is executed. Analyze the simulation test data, evaluate the response effect of the preliminary protection control strategy under different fault conditions, focus on investigating the adjustment time, control accuracy, impact on stability, and role in fault recovery of the strategy; organize the simulation test results to provide a reference basis for subsequent optimization.

[0059] S6. Optimize the parameters of the protection control strategy using the adaptive adjustment function to obtain the optimized protection control strategy.

[0060] Based on the simulation test results, calculate the changes in performance indicators during the execution of the strategy, evaluate the stability and fault recovery ability of the strategy, and obtain the optimization objective.

[0061] It should be noted that the preliminary protection control strategy is executed in the simulation test environment, and key performance indicators are continuously collected during the operation of the hydrogen fuel cell, such as voltage stability, power output fluctuation, fault recovery time, protection action response speed, energy efficiency, etc.; the performance indicators are compared with the normal operation benchmark values of the hydrogen fuel cell to calculate the deviation, so as to quantify the execution effect of the protection strategy; for different fault scenarios, analyze the performance of the strategy in terms of stability and fault recovery ability, for example: whether it can identify faults in time and trigger reasonable protection measures, whether it can effectively suppress fault propagation, and whether it can quickly return to the normal operation state after the fault is removed; based on the evaluation results, extract the key indicators with poor performance during the execution of the strategy, such as response delay, false trigger rate, too long recovery time, etc., and set optimization goals to clarify the direction of subsequent adjustment, such as improving the response speed, reducing false triggers, and enhancing the adaptability to specific faults, and finally provide precise guidance for optimizing the protection control strategy.

[0062] According to the optimization goals, use the adaptive adjustment function to optimize the parameters of the protection control strategy, and input them into the digital twin model for simulation testing to verify the optimization effect and obtain the optimized protection control strategy.

[0063] It should be noted that according to the simulation test results, analyze the control effect of the preliminary protection control strategy under different fault conditions, extract key performance indicators, such as battery voltage stability, temperature fluctuation range, response time, and hydrogen fuel utilization rate, etc., and determine the optimization goals; based on the optimization goals, use the adaptive adjustment function to optimize the parameters of the protection control strategy, including adjusting the gas flow control threshold, optimizing the temperature management strategy, adjusting the load regulation method, etc., to make the strategy more in line with the operation requirements of the fuel cell; Input the optimized protection control strategy into the digital twin model, reconstruct the simulation test environment, and set the same fault scenario to ensure consistent test conditions; run the simulation test, simulate the operation of the hydrogen fuel cell under different working conditions, and monitor the execution of the optimized protection control strategy, and record the data of various performance indicators, including the adjustment time of the control strategy, voltage recovery, temperature control accuracy, etc.; Compare the simulation test data before and after optimization, and analyze whether the optimized protection control strategy has improved in key performance indicators, such as whether the fault response speed has increased and the control accuracy has improved, etc.; if the optimization result meets the set goals, output the finally optimized protection control strategy; otherwise, adjust the optimization parameters and repeat the above simulation test process until the optimization effect meets the requirements.

[0064] This embodiment also provides a simulation system for a hydrogen fuel cell protection control strategy, including: a data acquisition module, a fault prediction module, a reinforcement learning training module, and an adaptive optimization module; the data acquisition module is used to collect the hydrogen fuel cell operation data and the hydrogen fuel cell fault data, and perform preprocessing and fusion; the fault prediction module is used to construct a hydrogen fuel cell fault prediction model based on a long short-term memory neural network, input the hydrogen fuel cell operation data and the hydrogen fuel cell fault data, and obtain a fault prediction result; the reinforcement learning training module is used to construct a reinforcement learning training environment according to the fault prediction result, set a state space, an action space, and a reward function, and use a deep Q network to train the hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy; the adaptive optimization module is used to construct a digital twin model of the hydrogen fuel cell through physical modeling, perform a simulation test on the preliminary protection control strategy, and use an adaptive adjustment function to optimize the protection control strategy parameters to obtain an optimized protection control strategy.

[0065] This embodiment also provides a computer device, which is applicable to the case of the hydrogen fuel cell protection control strategy simulation method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the hydrogen fuel cell protection control strategy simulation method as proposed in the above embodiment.

[0066] This computer device can be a terminal. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus; wherein, the processor of the computer device is used to provide computing and control capabilities; the memory of the computer device includes a non-volatile storage medium and an internal memory; the non-volatile storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium; the communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (near field communication), or other technologies; the display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0067] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the hydrogen fuel cell protection control strategy simulation method proposed in the above embodiment. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, abbreviated as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, abbreviated as EPROM), programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), read-only memory (Read-Only Memory, abbreviated as ROM), magnetic memory, flash memory, magnetic disk or optical disc.

[0068] In summary, the present invention: constructs a digital twin model of a hydrogen fuel cell, combines electrochemical characteristics, thermal management characteristics, fuel supply characteristics and power regulation characteristics, conducts simulation tests on the preliminary protection control strategy, and optimizes the control strategy parameters through adaptive adjustment to complete strategy verification and optimization in a virtual environment, avoiding the risks brought by directly conducting experiments on hydrogen fuel cells, reducing test costs, and improving the reliability of the control strategy.

[0069] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A hydrogen fuel cell protection control strategy simulation method, characterized in that: include, Collect hydrogen fuel cell operation data and hydrogen fuel cell fault data, and perform pre-processing and fusion; Based on the long short-term memory neural network, a hydrogen fuel cell fault prediction model is constructed, and the hydrogen fuel cell operation data and hydrogen fuel cell fault data are input to obtain the fault prediction results; According to the fault prediction results, a reinforcement learning training environment is constructed, the state space, action space and reward function are set, and a deep Q network is used to train the hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy. A digital twin model of the hydrogen fuel cell is constructed through physical modeling, the preliminary protection control strategy is simulated and tested, and the protection control strategy parameters are optimized using the adaptive adjustment function to obtain the optimized protection control strategy.

2. The hydrogen fuel cell protection control strategy simulation method according to claim 1, characterized in that: The specific steps of collecting hydrogen fuel cell operation data and hydrogen fuel cell fault data, and preprocessing and fusing them are as follows: Collect the voltage, current, temperature, pressure and power of the hydrogen fuel cell to obtain the hydrogen fuel cell operation data, collect the fault records and fault alarm logs of the hydrogen fuel cell to obtain the hydrogen fuel cell fault data; The two types of data are cleaned to remove outliers and fill in missing data, and then normalized to obtain standardized hydrogen fuel cell operation data and hydrogen fuel cell failure data; Using the time alignment method, the standardized hydrogen fuel cell operation data and the hydrogen fuel cell fault data are matched according to the timestamps, and using the data mapping method, the correlation between the hydrogen fuel cell operation data and the hydrogen fuel cell fault data is analyzed and matched; The weighted average method is used to fuse the matched hydrogen fuel cell operation data and hydrogen fuel cell fault data to obtain a fused high-dimensional data set.

3. The hydrogen fuel cell protection control strategy simulation method according to claim 2, characterized in that: The hydrogen fuel cell fault prediction model is constructed based on the long short-term memory neural network, and the hydrogen fuel cell operation data and hydrogen fuel cell fault data are input to obtain the fault prediction result. The specific steps are as follows: Based on the fused high-dimensional data set, perform time series format conversion and divide it into training set and test set; Construct the LSTM network structure, set the input layer, hidden layer and output layer, initialize the network weights and bias parameters, and establish the initial framework of the fault prediction model; Set the loss function and optimization algorithm, input the training set and test set into the LSTM model for iterative training, adjust the network parameters, and obtain the optimized fault prediction model; Based on the hydrogen fuel cell operation data and hydrogen fuel cell fault data, the optimized fault prediction model is input to obtain the fault prediction result.

4. The hydrogen fuel cell protection control strategy simulation method according to claim 3, characterized in that: Set the loss function and optimization algorithm, input the training set and test set into the LSTM model for iterative training, adjust the network parameters, and obtain the optimized fault prediction model. The specific steps are as follows: Set the mean square error as the loss function, select the adaptive moment estimation optimization algorithm, initialize the training parameters of the LSTM model, and obtain the fault prediction model to be trained; Input the training set data into the LSTM model, perform forward propagation calculation, output the predicted value, and calculate the error between the predicted value and the true value. Use the backpropagation algorithm to calculate the gradient, and use the Adam optimization algorithm to update the model parameters to obtain the updated LSTM model. The training process is repeatedly performed until the loss converges, and the test set data is input into the updated LSTM model to evaluate the prediction accuracy and obtain the optimized fault prediction model.

5. The hydrogen fuel cell protection control strategy simulation method according to claim 3, characterized in that: The reinforcement learning training environment is constructed according to the fault prediction results, the state space, action space and reward function are set, and the deep Q network is used to train the hydrogen fuel cell protection control strategy to obtain the preliminary protection control strategy. The specific steps are as follows: According to the fault prediction results, the operating status, fault type and impact of the hydrogen fuel cell are extracted to construct a reinforcement learning training environment; Based on the hydrogen fuel cell operation data, the state space and action space are defined, and the reward function is designed based on the weighted multi-objective optimization method; A deep Q network is used to combine state space and action space to construct a hydrogen fuel cell protection control strategy; The intelligent agent constructs an evaluation mechanism for reinforcement learning by combining the cumulative reward function with the Q-value update strategy, and makes adjustments by trying different strategies, iteratively training the deep Q network, continuously optimizing the hydrogen fuel cell protection control strategy, and finally obtaining a preliminary protection control strategy.

6. The hydrogen fuel cell protection control strategy simulation method according to claim 5, characterized in that: The digital twin model of the hydrogen fuel cell is constructed through physical modeling, and the preliminary protection control strategy is simulated and tested. The specific steps are as follows: Through the electrochemical characteristics, thermal management characteristics, fuel supply characteristics and power regulation characteristics of hydrogen fuel cells, a physical model is constructed to obtain a digital twin model of hydrogen fuel cells. Based on the operation data of hydrogen fuel cells, the predicted state of the digital twin model is calculated and compared with the actual operation state of the hydrogen fuel cell. The parameters are dynamically calibrated to obtain an optimized digital twin model. The preliminary protection control strategy is input into the optimized digital twin model, a simulation test environment is constructed, faults during the operation of the hydrogen fuel cell are simulated, the response effect of the preliminary protection control strategy is analyzed, and the simulation test results are obtained.

7. The hydrogen fuel cell protection control strategy simulation method according to claim 6, characterized in that: The adaptive adjustment function is used to optimize the protection control strategy parameters to obtain the optimized protection control strategy. The specific steps are as follows: Based on the simulation test results, calculate the changes in performance indicators during the strategy execution process, evaluate the stability and fault recovery capabilities of the strategy, and obtain the optimization target; According to the optimization objectives, the adaptive adjustment function is used to optimize the protection and control strategy parameters, and the parameters are input into the digital twin model for simulation testing to verify the optimization effect and obtain the optimized protection and control strategy.

8. A hydrogen fuel cell protection control strategy simulation system, based on the hydrogen fuel cell protection control strategy simulation method according to any one of claims 1 to 7, characterized in that: Including data acquisition module, fault prediction module, reinforcement learning training module and adaptive optimization module; Data acquisition module, used to collect hydrogen fuel cell operation data and hydrogen fuel cell fault data, and perform pre-processing and fusion; A fault prediction module is used to construct a hydrogen fuel cell fault prediction model based on a long short-term memory neural network, input hydrogen fuel cell operation data and hydrogen fuel cell fault data, and obtain a fault prediction result; The reinforcement learning training module is used to construct a reinforcement learning training environment based on the fault prediction results, set the state space, action space and reward function, and use a deep Q network to train the hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy; The adaptive optimization module is used to build a digital twin model of the hydrogen fuel cell through physical modeling, simulate and test the preliminary protection control strategy, optimize the protection control strategy parameters using the adaptive adjustment function, and obtain the optimized protection control strategy.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the hydrogen fuel cell protection control strategy simulation method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the hydrogen fuel cell protection control strategy simulation method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Fuel cell integrated management system and method based on digital twinning

    CN114004168A

  • Fault diagnosis method and system for fuel cell device and storage medium

    CN114048772A

  • Proton exchange membrane fuel cell fault diagnosis method and device

    CN116184207A

  • Hydrogen fuel cell monitoring method and device based on learning model

    CN117276592A

  • Fuel cell fault-tolerant control method and device based on reinforcement learning

    CN119481174A