A hydrogen fuel cell protection control strategy simulation method and system
By constructing a hydrogen fuel cell fault prediction model and a digital twin model, and combining them with reinforcement learning to optimize the control strategy, the problem of lack of adaptive optimization in existing technologies is solved, and more efficient fault response and stability improvement are achieved.
Patent Information
- Application Number
- CN202510533480.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-04-27
AI Technical Summary
Existing hydrogen fuel cell protection and control technologies lack intelligent adaptive optimization capabilities, making it difficult to respond optimally to different fault types under different operating conditions, thus affecting stability and safety.
A fault prediction model is constructed using a long short-term memory neural network. Combined with reinforcement learning and a digital twin model, a protection control strategy is trained using a deep Q-network. Simulation tests and adaptive adjustments are then performed to optimize the control strategy parameters.
It improves the reliability and stability of the control strategy for hydrogen fuel cells, reduces testing costs, avoids the risks associated with direct experimentation, and enhances fault recovery capabilities.
Smart Images

Figure CN120073000B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of hydrogen fuel cell control, and in particular to a hydrogen fuel cell protection control strategy simulation method and system. BACKGROUND
[0002] As a high-efficiency and clean energy conversion device, hydrogen fuel cells have wide application prospects in the fields of transportation, fixed power generation and portable energy. The operation environment of hydrogen fuel cells is complex, involving multiple links such as electrochemical reaction, thermal management, fuel supply and power regulation. The performance of hydrogen fuel cells is easily affected by factors such as temperature, pressure and load fluctuation during operation, resulting in performance degradation or failure. Research on the operation state monitoring and fault diagnosis technology of hydrogen fuel cells to improve the reliability and safety of hydrogen fuel cells has become an important research direction in the field. 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.
[0003] The main problem of existing hydrogen fuel cell protection control technology is the lack of intelligent adaptive optimization capability. Traditional protection strategies are usually based on expert experience and preset rules, and lack self-learning and self-optimization capability for control strategies under different working conditions, making it difficult to respond optimally to different fault types in actual application. For example, in the case of large voltage fluctuation or power demand change of hydrogen fuel cells, the fixed protection strategy may not accurately identify the real impact of the fault, resulting in unreasonable triggering of the protection mechanism and affecting stability. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a hydrogen fuel cell protection control strategy simulation method to solve the problem of lack of intelligent adaptive optimization capability in existing hydrogen fuel cell protection control technology.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a hydrogen fuel cell protection control strategy simulation method, which comprises: collecting hydrogen fuel cell operation data and hydrogen fuel cell fault data, and preprocessing and fusing the same; 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, and obtaining 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, training a hydrogen fuel cell protection control strategy by using a deep Q network, and obtaining a preliminary protection control strategy; constructing a digital twin model of the hydrogen fuel cell by physical modeling, simulating and testing the preliminary protection control strategy, optimizing protection control strategy parameters by using an adaptive adjustment function, and obtaining an optimized protection control strategy.
[0008] As a preferred scheme of the hydrogen fuel cell protection control strategy simulation method, the collecting of the hydrogen fuel cell operation data and the hydrogen fuel cell fault data, and the preprocessing and fusing thereof, specifically comprises the following steps:
[0009] The voltage, current, temperature, pressure and power of the hydrogen fuel cell are collected to obtain the hydrogen fuel cell operation data, and the fault records and fault alarm logs of the hydrogen fuel cell are collected to obtain the hydrogen fuel cell fault data;
[0010] The two kinds of data are subjected to data cleaning to remove abnormal values and fill in missing data, and are subjected to normalization processing to obtain standardized hydrogen fuel cell operation data and hydrogen fuel cell fault data;
[0011] The standardized hydrogen fuel cell operation data and the hydrogen fuel cell fault data are matched according to time stamps by using a time alignment method, and the correlation between the hydrogen fuel cell operation data and the hydrogen fuel cell fault data is analyzed and matched by using a data mapping method;
[0012] The matched hydrogen fuel cell operation data and the hydrogen fuel cell fault data are fused by using a weighted average method to obtain a fused high-dimensional data set.
[0013] As a preferred scheme of the hydrogen fuel cell protection control strategy simulation method, the constructing of the hydrogen fuel cell fault prediction model based on the long short-term memory neural network, the inputting of the hydrogen fuel cell operation data and the hydrogen fuel cell fault data, and the obtaining of the fault prediction result, specifically comprises the following steps:
[0014] Based on the fused high-dimensional data set, time series format conversion is performed, and a training set and a test set are divided;
[0015] An LSTM network structure is constructed, the input layer, the hidden layer and the output layer are set, the network weight and bias parameters are initialized, and an initial framework of the fault prediction model is established.
[0016] 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;
[0017] Based on the hydrogen fuel cell operation data and hydrogen fuel cell fault data, input the optimized fault prediction model to obtain the fault prediction result.
[0018] As a preferred scheme of the hydrogen fuel cell protection control strategy simulation method, wherein: 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,
[0019] Set the mean square error as the loss function, select the adaptive matrix estimation optimization algorithm, initialize the training parameters of the LSTM model, and obtain the fault prediction model to be trained;
[0020] 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, use the back propagation algorithm to calculate the gradient, and use the Adam optimization algorithm to update the model parameters to obtain the updated LSTM model;
[0021] Repeat 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.
[0022] As a preferred scheme of the hydrogen fuel cell protection control strategy simulation method, wherein: the reinforcement learning training environment is constructed according to the fault prediction result, the state space, action space and reward function are set, the deep Q network is used to train the hydrogen fuel cell protection control strategy, and the preliminary protection control strategy is obtained, the specific steps are as follows,
[0023] According to the fault prediction result, the running state of the hydrogen fuel cell, the fault type and the influence degree are extracted, and the reinforcement learning training environment is constructed;
[0024] Based on the hydrogen fuel cell operation data, define the state space and action space, and design the reward function based on the weighted multi-objective optimization method;
[0025] The deep Q network is used to combine the state space and action space to build the hydrogen fuel cell protection control strategy;
[0026] The agent constructs the evaluation mechanism of reinforcement learning by accumulating the reward function combined with the Q value update strategy, adjusts by trying different strategies, iteratively trains the deep Q network, and continuously optimizes the hydrogen fuel cell protection control strategy, and finally obtains the preliminary protection control strategy.
[0027] As a preferred scheme of the hydrogen fuel cell protection control strategy simulation method, wherein: the digital twin model of the hydrogen fuel cell is constructed by physical modeling, and the preliminary protection control strategy is simulated and tested, and the specific steps are as follows,
[0028] The physical model is constructed through the electrochemical characteristics, thermal management characteristics, fuel supply characteristics and power regulation characteristics of the hydrogen fuel cell, the digital twin model of the hydrogen fuel cell is obtained, the predicted state of the digital twin model is calculated based on the operation data of the hydrogen fuel cell, and the actual operation state of the hydrogen fuel cell is compared, the parameters are dynamically calibrated, and the optimized digital twin model is obtained;
[0029] The preliminary protection control strategy is input into the optimized digital twin model, a simulation test environment is constructed, the failure in the operation process of the hydrogen fuel cell is simulated, the response effect of the preliminary protection control strategy is analyzed, and the simulation test result is obtained.
[0030] As a preferred scheme of the hydrogen fuel cell protection control strategy simulation method, wherein: the digital twin model of the hydrogen fuel cell is constructed by physical modeling, and the preliminary protection control strategy is simulated and tested, and the specific steps are as follows,
[0031] Based on the simulation test result, the change of the performance index in the strategy execution process is calculated, the stability and fault recovery ability of the strategy are evaluated, and the optimization target is obtained;
[0032] According to the optimization target, the protection control strategy parameters are optimized by using the adaptive adjustment function, and the digital twin model is input for simulation test, the optimization effect is verified, and the optimized protection control strategy is obtained.
[0033] In a second aspect, the application provides a hydrogen fuel cell protection control strategy simulation system, comprising a data acquisition module, a fault prediction module, a reinforcement learning training module and an adaptive optimization module; the data acquisition module is used for acquiring hydrogen fuel cell operation data and hydrogen fuel cell fault data, and performing preprocessing and fusion; the fault prediction module is used for constructing a hydrogen fuel cell fault prediction model based on a long short-term memory neural network, inputting hydrogen fuel cell operation data and hydrogen fuel cell fault data, and obtaining a fault prediction result; the reinforcement learning training module is used for 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 a hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy; the adaptive optimization module is used for constructing a digital twin model of the hydrogen fuel cell by physical modeling, simulating and testing 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.
[0034] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program, when executed by the processor, implements any step of the hydrogen fuel cell protection control strategy simulation method according to the first aspect of the present application.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the hydrogen fuel cell protection control strategy simulation method according to the first aspect of the present application.
[0036] The present application has the following beneficial effects:
[0037] By constructing a digital twin model of the hydrogen fuel cell, combining the electrochemical characteristics, thermal management characteristics, fuel supply characteristics and power regulation characteristics, the preliminary protection control strategy is simulated and tested, and the control strategy parameters are optimized through self-adaptive adjustment, so that the strategy verification and optimization are completed in a virtual environment, the risks caused by direct experiments on the hydrogen fuel cell are avoided, the test cost is reduced, and the reliability of the control strategy is improved. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0039] Fig. 1 The flowchart of the hydrogen fuel cell protection control strategy simulation method in embodiment 1 is shown in the figure.
[0040] Fig. 2 The schematic diagram of the hydrogen fuel cell protection control strategy simulation system in embodiment 1 is shown in the figure.
[0041] Fig. 3 The schematic diagram of the fault prediction model training process in embodiment 1 is shown in the figure.
[0042] Fig. 4 The schematic diagram of the reinforcement learning training and optimization in embodiment 1 is shown in the figure. DETAILED DESCRIPTION
[0043] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.
[0044] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description in other manners, as the present application is not limited to the details described herein. Therefore, the present application should not be limited by the embodiments set forth in the following description, but should be given the full scope of the appended claims.
[0045] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an embodiment that is independent of or mutually exclusive of other embodiments.
[0046] Embodiment 1, reference Figs. 1-4 For the first embodiment of the present application, the embodiment provides a hydrogen fuel cell protection control strategy simulation method, comprising the following steps:
[0047] S1, collect hydrogen fuel cell operation data and hydrogen fuel cell fault data, and perform preprocessing and fusion.
[0048] Collect the voltage, current, temperature, pressure and power output of the hydrogen fuel cell to obtain the hydrogen fuel cell operation data, and collect the fault record and fault alarm log of the hydrogen fuel cell to obtain the hydrogen fuel cell fault data.
[0049] It should be noted that by collecting the real-time operation data of voltage, current, temperature, pressure and power of the hydrogen fuel cell, as well as fault record and fault alarm log and other fault data, basic data support is provided for fault prediction and control strategy optimization; the hydrogen fuel cell operation data can fully reflect the working state of the hydrogen fuel cell, such as the health status of the stack, the influence of temperature on performance, and the fuel supply situation, while the hydrogen fuel cell fault data is used to analyze abnormal patterns and improve the accuracy of fault prediction; combining the hydrogen fuel cell operation data and the hydrogen fuel cell fault data, not only can the correlation be established to provide complete information for digital twin modeling and reinforcement learning optimization, but also can improve the stability and fault recovery capability of the hydrogen fuel cell, ensure that the control strategy is optimized based on accurate information, and improve the reliability and safety.
[0050] The two kinds of data are subjected to data cleaning to remove outliers and fill in missing data, and are subjected to normalization processing to obtain standardized hydrogen fuel cell operation data and hydrogen fuel cell fault data.
[0051] It should be noted that by cleaning the collected hydrogen fuel cell operation data and hydrogen fuel cell failure data, the quality and reliability of the hydrogen fuel cell operation data are improved; outliers are removed to exclude invalid data caused by sensor failure, external interference or data collection error, ensuring the accuracy of the input hydrogen fuel cell operation data; missing data is filled to avoid affecting subsequent analysis due to partial data loss, and interpolation and mean filling methods can be used to complete the data; normalization processing is performed to map the hydrogen fuel cell operation data to the same numerical range, eliminate the dimensional difference between different physical quantities, improve the comparability of the hydrogen fuel cell operation data, and be more suitable for machine learning model training; standardized hydrogen fuel cell operation data and hydrogen fuel cell failure data are obtained, providing high-quality input for subsequent fault prediction and control strategy optimization, and improving the calculation stability and accuracy of the machine learning model.
[0052] The standardized hydrogen fuel cell operation data and hydrogen fuel cell failure data are matched according to the time stamp by using the time alignment method, and the correlation between the hydrogen fuel cell operation data and the hydrogen fuel cell failure data is analyzed and matched by using the data mapping method.
[0053] It should be noted that the standardized hydrogen fuel cell operation data and hydrogen fuel cell failure data are time-aligned to ensure that the two types of data are matched according to a unified time reference; during the time alignment process, interpolation or sliding window method is used to handle the problem of inconsistent data sampling frequency, so that the time stamps of the hydrogen fuel cell operation data and the hydrogen fuel cell failure data are aligned as much as possible;
[0054] The hydrogen fuel cell operation data and failure data after time alignment are subjected to feature extraction, and key variables such as voltage, current, temperature, pressure, power output, historical fault type and time interval are selected and subjected to feature coding; correlation analysis method (such as Pearson correlation coefficient or mutual information analysis) is used to calculate the correlation between each operating parameter and fault event, and high correlation feature pairs are selected; time series pattern mining method such as dynamic time warping or Granger causality analysis is used to explore the time lag relationship between different operating variables and fault occurrence; a multivariate regression model or decision tree model is constructed to analyze the operating parameter combination that is most likely to cause a fault when a fault occurs, and a fault feature mapping relationship is formed;
[0055] Matching rules are constructed to match the hydrogen fuel cell operation data with the corresponding failure data according to the alignment of the time stamp and the correlation analysis results; for the data at the moment of fault occurrence, the time window data before and after the fault is extracted to construct a high-dimensional data set in the form of time series data enhancement, ensuring the integrity and accuracy of data matching, and finally generating a fusion data set that can be used for training and analysis.
[0056] The matched hydrogen fuel cell operation data and hydrogen fuel cell failure data are fused by using a weighted average method to obtain a fused high-dimensional data set.
[0057] It should be noted that the matched hydrogen fuel cell operation data and hydrogen fuel cell failure data are normalized to ensure consistency in dimensions, so as to eliminate the dimensional influence of different physical quantities; according to the importance of hydrogen fuel cell operation data and hydrogen fuel cell failure data in fault analysis and state evaluation, corresponding weights are assigned; for example, the weights of key parameters such as voltage and temperature are higher, while the weights of some parameters that have less influence on fault prediction are lower, so as to ensure that the fused data can accurately reflect the operation state and fault characteristics of the hydrogen fuel cell; based on the assigned weights, the hydrogen fuel cell operation data and hydrogen fuel cell failure data are proportionally adjusted by using a weighted average method, so that the high-weight data have a greater influence on the final fusion result; during the fusion process, data smoothing processing is also performed to eliminate outliers, and a certain dimension reduction or feature selection method is used to optimize the expression of high-dimensional data, and finally a fused high-dimensional data set is formed.
[0058] S2, based on a long short-term memory neural network, a hydrogen fuel cell failure prediction model is constructed, and hydrogen fuel cell operation data and hydrogen fuel cell failure data are input to obtain a failure prediction result.
[0059] Based on the fused high-dimensional data set, time series format conversion is performed, and a training set and a test set are divided.
[0060] 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 a sliding window method is used to construct time series segments, each segment containing multiple time step data points, which can learn the time dependence relationship; according to a certain proportion (such as 80% training and 20% testing), the data set is divided, the data in the first 80% time range is used as the training set to learn the relationship between the hydrogen fuel cell operation state and the failure, and the data in the last 20% time range is used as the test set to verify the generalization ability; in order to prevent the test set data from being leaked, it is ensured that the test set data does not appear in the training set during the division process, and the time consistency of the test set data is maintained to avoid using future information in future time steps; the training set and the test set are stored in the format of time step feature matrix, and are ready to be input into the long short-term memory neural network for training.
[0061] An LSTM network structure is constructed, the input layer, the hidden layer and the output layer are set, and the network weights and bias parameters are initialized to establish an initial framework of the failure prediction model.
[0062] The LSTM network structure is set, and the specific configurations of the input layer, the hidden layer and the output layer are as follows:
[0063] The input layer receives time series data of the hydrogen fuel cell, and each time step data includes voltage, current, temperature, pressure, power and other multi-dimensional features; a plurality of LSTM units are arranged in the hidden layer, each unit having a memory cell and a gating mechanism (input gate, forget gate and output gate) for extracting long-term dependencies in the time series; a single-layer or multi-layer stacked LSTM structure can be used to enhance the feature extraction capability; in the output layer, the high-dimensional time series features extracted by the LSTM are mapped to the prediction target, i.e. the probability of failure occurrence or the specific failure category, through a fully connected layer; the number of neurons in the output layer depends on the number of failure categories (such as binary or multi-classification problems); the weight and bias parameters are initialized, such as Xavier initialization, to ensure stable convergence of the network and establish an initial framework for the failure prediction model.
[0064] 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 failure prediction model.
[0065] Based on the hydrogen fuel cell operation data and hydrogen fuel cell failure data, input the optimized failure prediction model to obtain the failure prediction result.
[0066] It should be noted that the optimized LSTM failure prediction model is input in the time series format; in the failure prediction model, the input layer receives the current time step hydrogen fuel cell operation data, the LSTM units in the hidden layer extract hydrogen fuel cell operation data features combining long-term and short-term dependencies, and generate a hidden vector of the current state, and finally the output layer calculates the failure prediction result; the failure prediction result output by the failure prediction model includes the predicted failure type, occurrence time and possible impact degree.
[0067] S3, 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 failure prediction model.
[0068] 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 failure prediction model to be trained.
[0069] It should be noted that the network structure of the LSTM model is defined, including the input layer, a plurality of LSTM hidden layers and the output layer, and the input layer can receive the pre-processed hydrogen fuel cell operation data and hydrogen fuel cell failure data; the mean square error is set as the loss function to measure the error between the predicted value and the actual failure label, and the adaptive moment estimation optimization algorithm is selected for gradient update;
[0070] The LSTM model is parameterized, including the weight matrix being assigned values using the Xavier or He initialization method to ensure that the gradient remains stable during forward and backward propagation, and the bias parameter being set to zero; the learning rate, batch size and training round number are set, and the LSTM model can efficiently learn the data features; after initialization, the LSTM model enters the training stage, iteratively optimizes using the training data set, and obtains the fault prediction model to be trained.
[0071] The training set data is input into the LSTM model, forward propagation is calculated, the predicted value is output, the error between the predicted value and the true value is calculated, the gradient is calculated using the back propagation algorithm, the LSTM model parameters are updated using the Adam optimization algorithm, and the updated LSTM model is obtained.
[0072] It should be noted that the training set data is input into the LSTM model in time series format, and the data at each time step is transmitted from the input layer to the hidden layer. In the hidden layer, the LSTM unit uses the input gate, the forget gate and the output gate to filter and remember the state, and generates the hidden state at the current time step; the hidden state is mapped to the output layer through the fully connected layer, and the predicted value is calculated;
[0073] In the training process of the LSTM model, first, the predicted value of the model is obtained, and compared with the corresponding true value; the prediction error at each time step is calculated, and all errors are summarized to measure the overall error size. After error calculation, the error value is used for back propagation to adjust the LSTM model weight and bias parameters, and optimize the prediction ability of the LSTM model; through multiple iterations of training, the error is continuously reduced, and the stability and accuracy of the LSTM model are improved; the Adam optimization algorithm is used to update the network parameters, adjust the weights of the LSTM unit, so that the next training can better fit the data distribution; continue in multiple iterations until the error of the LSTM model reaches the preset range or the training round number reaches the set value, and finally obtain the updated LSTM model.
[0074] Repeat 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.
[0075] 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 best state; after the LSTM model is updated, the test set data is input into the LSTM model to obtain the corresponding predicted value; the predicted value is compared with the corresponding true value in the test set, the error is calculated, including the average absolute error, mean square error and other indicators, to evaluate the prediction ability of the LSTM model for different fault modes; the accuracy, recall rate and F1-score and other classification evaluation indicators 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 drawn to observe the degree of trend agreement, and the error prediction situation is analyzed combined with the confusion matrix; the prediction accuracy of the LSTM model is judged by comprehensively evaluating the results, and the hyperparameters or training strategy are adjusted as needed to obtain an optimized fault prediction model.
[0076] S4, constructing a reinforcement learning training environment based on the fault prediction results, setting a state space, an action space and a reward function, using a deep Q network to train the hydrogen fuel cell protection control strategy, and obtaining a preliminary protection control strategy.
[0077] According to the fault prediction results, the operating state of the hydrogen fuel cell, the fault type and the influence degree are extracted, and a reinforcement learning training environment is constructed.
[0078] It should be noted that based on the fault prediction results, the real-time operating state of the hydrogen fuel cell is extracted, including voltage, current, temperature, pressure, power output and other key parameters to fully reflect the working condition of the hydrogen fuel cell; combined with the hydrogen fuel cell fault data, the current fault type is identified, such as abnormal voltage of the stack, gas supply failure, cooling failure, etc., and the typical characteristics of various faults are analyzed to ensure that the training environment can cover various possible fault conditions; the influence degree of different faults on the hydrogen fuel cell is evaluated, such as the power drop amplitude caused by the fault, the voltage fluctuation range, the temperature overrun condition, etc., 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; 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 adjustment, etc.) are defined, and the reward function is designed, combined with the state space, the action space and the reward function, to obtain the reinforcement learning training environment, so that the agent can learn the protection control strategy in the training process, and improve the stability and fault recovery ability of the hydrogen fuel cell.
[0079] Based on the operating data of the hydrogen fuel cell, the state space and the action space are defined, and the reward function is designed based on the weighted multi-objective optimization method.
[0080] 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 operating states and fault conditions; in order to guide the agent to learn the optimal control strategy, a weighted multi-objective optimization method is used to design the reward function, which considers the performance indicators and fault recovery ability of the hydrogen fuel cell, so that the agent can balance different objectives in the training process and optimize the protection control strategy, thereby improving the reliability and operating efficiency of the hydrogen fuel cell.
[0081] The deep Q network is combined with the state space and action space to construct the protection control strategy of the hydrogen fuel cell.
[0082] It should be noted that the deep Q network is initialized, including setting the input layer (corresponding to the state space), the hidden layer (for feature extraction and decision optimization) and the output layer (corresponding to the Q value of different control actions), and randomly initializing the network weights; in the reinforcement learning training environment, the agent interacts with the environment, selects actions based on the current state, calculates the Q value using the deep Q network, executes the action to obtain the new state and reward, and stores the experience data for subsequent training; the experience replay mechanism is used to randomly sample training samples from the stored data, and the error calculation and back propagation algorithm is used to adjust the parameters of the deep Q network, so that the network gradually learns a better control strategy; repeat the above training steps until the deep Q network converges, and finally obtain the protection control strategy of the hydrogen fuel cell based on the deep Q network.
[0083] The agent updates the strategy by accumulating the reward function combined with the Q value, constructs the evaluation mechanism of reinforcement learning, and iteratively trains the deep Q network by trying different strategies to adjust and optimize the protection control strategy of the hydrogen fuel cell, and finally obtains the preliminary protection control strategy.
[0084] It should be noted that the agent observes the current state of the hydrogen fuel cell in the reinforcement learning environment, and predicts the Q value of each executable action according to the deep Q network, and selects the appropriate action by using the greedy strategy, such as adjusting the output power, optimizing the cooling strategy or triggering the early warning mechanism, etc.; After the agent performs the action, it enters a new state and calculates the reward value brought by the action, such as improving the battery life, reducing the failure rate or optimizing the energy efficiency; The agent stores the decision-making in the experience replay pool, and regularly extracts experience data from it for training to improve the generalization ability of the strategy; The Q value update uses the Bellman equation, that is, the reward calculation is performed using the current reward value and the maximum Q value of the next state, and the back propagation optimization is performed through the mean square error loss function, so that the deep Q network gradually learns the better protection control strategy; The target network is introduced to stabilize the training process and prevent the policy update from being too drastic; During the whole training process, the agent constantly explores different control strategies, gradually adjusts the Q value update strategy, and through multiple rounds of iterative training, the deep Q network can make the optimal decision under different fault conditions, and finally obtain the preliminary protection control strategy to ensure the safety and stability of the hydrogen fuel cell.
[0085] S5, a digital twin model of the hydrogen fuel cell is constructed by physical modeling to simulate and test the preliminary protection control strategy.
[0086] A physical model is constructed through the electrochemical characteristics, thermal management characteristics, fuel supply characteristics and power regulation characteristics of the hydrogen fuel cell to obtain a digital twin model of the hydrogen fuel cell. Based on the operation data of the hydrogen fuel cell, the predicted state of the digital twin model is calculated and compared with the actual operation state of the hydrogen fuel cell to dynamically calibrate the parameters and obtain an optimized digital twin model.
[0087] 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 catalyst 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 thermodynamic 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; According to the fuel supply characteristics of the hydrogen fuel cell, the influence of hydrogen storage, supply rate, gas diffusion and pressure change on the operation of the hydrogen fuel cell is analyzed, and a hydrogen supply model is established; The energy transmission relationship between the fuel cell and the external load is described, including the output current, voltage and power variation characteristics, and a power regulation model is constructed; Based on the above physical model, the sub-models are integrated to construct the digital twin model of the hydrogen fuel cell;
[0088] After the digital twin model is constructed, the operation data of the hydrogen fuel cell, including voltage, current, temperature, hydrogen flow rate, pressure, etc., are collected and input into the digital twin model to calculate the predicted state of the digital twin model; the predicted state is compared with the operation state of the hydrogen fuel cell to analyze the deviation therebetween; according to the deviation result, the parameters of the digital twin model are dynamically adjusted, for example, the electrochemical reaction rate coefficient is corrected, the heat conduction parameter is optimized, the hydrogen supply flow control parameter is adjusted, etc., so that the prediction result of the digital twin model gradually approaches the actual operation condition of the hydrogen fuel cell; the above steps are iterated continuously until the error between the predicted state of the digital twin model and the actual operation state converges, and the optimized digital twin model is obtained.
[0089] The preliminary protection control strategy is input into the optimized digital twin model to construct a simulation test environment, simulate the failure in the operation process of the hydrogen fuel cell, analyze the response effect of the preliminary protection control strategy, and obtain the simulation test result.
[0090] It should be noted that the trained preliminary protection control strategy is input into the optimized digital twin model, and the strategy includes control measures for different fault types, such as gas supply adjustment, temperature management adjustment, load distribution optimization, etc.; a simulation test environment is constructed in the digital twin model, the initial operation state of the fuel cell is set, and key operation parameters are loaded according to the actual operation condition, such as hydrogen flow rate, temperature, voltage, current and load change;
[0091] Different types of failures are introduced in the simulation environment, including insufficient hydrogen supply, cooling abnormality, load mutation, etc., and the operation state of the hydrogen fuel cell under different failure scenarios is monitored; for each type of failure, the preliminary protection control strategy is executed, and the execution of the strategy is recorded, including the time of adjusting the control parameter, the change of the battery voltage after the execution of the strategy, the change of the temperature, the fuel utilization rate, etc.;
[0092] The simulation test data are analyzed to evaluate the response effect of the preliminary protection control strategy under different failure conditions, focusing on the adjustment time of the strategy, the control accuracy, the influence on stability, and the effect on failure recovery; the simulation test results are sorted out to provide a reference basis for subsequent optimization.
[0093] S6, the protection control strategy parameters are optimized by using the adaptive adjustment function to obtain an optimized protection control strategy.
[0094] Based on the simulation test results, the change of the performance index in the execution process of the strategy is calculated to evaluate the stability and failure recovery ability of the strategy, and an optimization target is obtained.
[0095] It should be noted that the preliminary protection control strategy is executed in the simulation test environment, and key performance indicators such as voltage stability, power output fluctuation, fault recovery time, protection action response speed, energy efficiency, etc. are continuously collected during the operation of the hydrogen fuel cell; compare the performance indicators with the normal operation benchmark value of the hydrogen fuel cell, calculate the deviation, and quantify the execution effect of the protection strategy; for different fault scenarios, analyze the performance of the strategy in stability and fault recovery capability, for example: whether it can timely identify faults and trigger reasonable protection measures, whether it can effectively suppress fault propagation, and whether it can quickly recover to normal operation state after the fault is removed; based on the evaluation results, extract key indicators that perform poorly during strategy execution, such as response delay, false trigger rate, and long recovery time, and set optimization goals to clarify the direction of subsequent adjustments, such as improving response speed, reducing false triggers, and enhancing adaptability to specific faults, ultimately providing accurate guidance for optimizing the protection control strategy.
[0096] According to the optimization target, the adaptive adjustment function is used to optimize the protection control strategy parameters, and the digital twin model is input for simulation testing to verify the optimization effect, and the optimized protection control strategy is obtained.
[0097] It should be noted that according to the simulation test results, the control effect of the preliminary protection control strategy under different fault conditions is analyzed, key performance indicators such as battery voltage stability, temperature fluctuation range, response time, and hydrogen fuel utilization rate are extracted, and optimization goals are determined; based on the optimization goal, the adaptive adjustment function is used to optimize the parameters of the protection control strategy, including adjusting the gas flow control threshold, optimizing the temperature management strategy, and adjusting the load adjustment mode, so that the strategy is more in line with the operation requirements of the fuel cell;
[0098] The optimized protection control strategy is input into the digital twin model, the simulation test environment is reconstructed, and the same fault scenarios are set to ensure consistent test conditions; run the simulation test to simulate the operation of the hydrogen fuel cell under different working conditions, and monitor the execution of the optimized protection control strategy, record the performance indicator data, including the adjustment time of the control strategy, voltage recovery, temperature control accuracy, etc.
[0099] Compare the simulation test data before and after optimization to analyze whether the optimized protection control strategy has improved in key performance indicators, such as whether the fault response speed has increased, whether the control accuracy has improved, etc.; if the optimization result meets the set target, output the final optimized protection control strategy; otherwise, adjust the optimization parameters and repeat the above simulation test process until the optimization effect meets the requirements.
[0100] The embodiment also provides a hydrogen fuel cell protection control strategy simulation system, comprising a data acquisition module, a fault prediction module, a reinforcement learning training module and a self-adaptive optimization module; the data acquisition module is used for acquiring hydrogen fuel cell operation data and hydrogen fuel cell fault data, and performing preprocessing and fusion; the fault prediction module is used for 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, and obtaining a fault prediction result; the reinforcement learning training module is used for constructing a reinforcement learning training environment according to the fault prediction result, setting a state space, an action space and a reward function, adopting a deep Q network, training a hydrogen fuel cell protection control strategy, and obtaining a preliminary protection control strategy; and the self-adaptive optimization module is used for constructing a digital twin model of the hydrogen fuel cell through physical modeling, simulating and testing the preliminary protection control strategy, optimizing protection control strategy parameters by using a self-adaptive adjustment function, and obtaining an optimized protection control strategy.
[0101] The embodiment also provides a computer device suitable for the hydrogen fuel cell protection control strategy simulation method, comprising a memory and a processor; the memory is used for storing computer executable instructions, and the processor is used for executing the computer executable instructions to realize the hydrogen fuel cell protection control strategy simulation method proposed in the above embodiment.
[0102] The computer device can be a terminal, and the computer device comprises 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 for providing computing and control capabilities; the memory of the computer device comprises 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 running of the operating system and the computer program in the non-volatile storage medium; the communication interface of the computer device is used for wired or wireless communication with external terminals, and the wireless communication can be realized through WIFI, an operator 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; the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0103] The embodiment also provides a storage medium on which a computer program is stored, the program being executed by a processor to implement the simulation method for implementing the protection control strategy of the hydrogen fuel cell 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 a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0104] To sum up, the present application is achieved by: constructing a digital twin model of the hydrogen fuel cell, combining the electrochemical characteristics, thermal management characteristics, fuel supply characteristics, and power regulation characteristics to simulate and test the preliminary protection control strategy, and optimizing the control strategy parameters through self-adaptive adjustment to complete the strategy verification and optimization in a virtual environment, thereby avoiding the risks brought by direct experiments on the hydrogen fuel cell, reducing the test cost, and improving the reliability of the control strategy.
[0105] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and all of them should be covered in the scope of the claims of the present application.
Claims
1. A simulation method for protection and control strategies of hydrogen fuel cells, characterized in that: include, The following steps are taken to collect hydrogen fuel cell operation data and hydrogen fuel cell fault data, and then preprocess and fuse them. The system collects voltage, current, temperature, pressure, and power data of the hydrogen fuel cell to obtain operating data, and collects fault records and fault alarm logs of the hydrogen fuel cell to obtain fault data. Data cleaning was performed on the two types of data to remove outliers and fill in missing data, and then normalization was performed to obtain standardized hydrogen fuel cell operation data and hydrogen fuel cell fault data. A time alignment method is used to match standardized hydrogen fuel cell operating data and hydrogen fuel cell fault data according to timestamps. A data mapping method is then used to analyze and match the correlation between hydrogen fuel cell operating data and hydrogen fuel cell fault data. A weighted average method was used to fuse the matched hydrogen fuel cell operation data and hydrogen fuel cell fault data to obtain a fused high-dimensional dataset. A hydrogen fuel cell fault prediction model is constructed based on a long short-term memory neural network. Inputting hydrogen fuel cell operating data and hydrogen fuel cell fault data, the model yields fault prediction results. The specific steps are as follows. Based on the fused high-dimensional dataset, time series format conversion is performed, and training and test sets are divided. Construct an LSTM network structure, define the input layer, hidden layer and output layer, and initialize the network weights and bias parameters to 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 hydrogen fuel cell operation data and hydrogen fuel cell fault data, the optimized fault prediction model is input to obtain the fault prediction results, as follows: Input the optimized LSTM fault prediction model in 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 unit in the hidden layer extracts the features of the hydrogen fuel cell operation data by combining long-term and short-term dependencies, and generates the hidden vector of the current state. The output layer calculates the fault prediction result. Based on the fault prediction results, a reinforcement learning training environment is constructed, and the state space, action space and reward function are set. A deep Q-network is used to train the protection and control strategy of the hydrogen fuel cell, and a preliminary protection and control strategy is obtained. A digital twin model of a hydrogen fuel cell is constructed through physical modeling. The preliminary protection and control strategy is simulated and tested. The parameters of the protection and control strategy are optimized using the adaptive adjustment function to obtain the optimized protection and control strategy. The preliminary protection and control strategy was simulated and tested, as follows: By analyzing the electrochemical, thermal management, fuel supply, and power regulation characteristics of hydrogen fuel cells, a physical model is constructed to obtain a digital twin model of the hydrogen fuel cell. Based on the operating data of the hydrogen fuel cell, the predicted state of the digital twin model is calculated and compared with the actual operating state of the hydrogen fuel cell. The parameters are dynamically calibrated to obtain an optimized digital twin model. The preliminary protection and control strategy is input into the optimized digital twin model to construct a simulation test environment, simulate the faults in the operation of the hydrogen fuel cell, analyze the response effect of the preliminary protection and control strategy, and obtain the simulation test results.
2. The simulation method for hydrogen fuel cell protection and control strategy as described in claim 1, characterized in that: The loss function and optimization algorithm are set, and the training and test sets are input into the LSTM model for iterative training. The network parameters are adjusted to obtain the optimized fault prediction model. The specific steps are as follows. The mean squared error is set as the loss function, the adaptive moment estimation optimization algorithm is selected, the training parameters of the LSTM model are initialized, and the fault prediction model to be trained is obtained. The training set data is input into the LSTM model, forward propagation is performed, the predicted value is output, the error between the predicted value and the true value is calculated, the gradient is calculated using the back propagation algorithm, and the model parameters are updated using the Adam optimization algorithm to obtain the updated LSTM model. The training process is repeated until the loss converges. The test set data is then input into the updated LSTM model to evaluate the prediction accuracy and obtain the optimized fault prediction model.
3. The simulation method for hydrogen fuel cell protection and control strategy as described in claim 1, characterized in that: The process involves constructing a reinforcement learning training environment based on fault prediction results, defining the state space, action space, and reward function, and using a deep Q-network to train the hydrogen fuel cell protection control strategy to obtain a preliminary protection control strategy. The specific steps are as follows: Based on the fault prediction results, the operating status, fault type and impact of the hydrogen fuel cell are extracted, and a reinforcement learning training environment is constructed. Based on hydrogen fuel cell operation data, state space and action space are defined, and reward function is designed based on weighted multi-objective optimization method; A protection and control strategy for hydrogen fuel cells is constructed by using a deep Q-network combined with state space and action space. Specifically: Initialize the deep Q-network, including setting the input layer (corresponding to the state space), hidden layers (used for feature extraction and decision optimization), and output layer (corresponding to the Q value of different control actions), and randomly initialize the network weights; In a reinforcement learning training environment, an agent interacts with the environment, selects actions based on its current state, calculates the Q-value using a deep Q-network, obtains a new state and reward after executing the action, and stores the experience data for subsequent training. An experience replay mechanism is adopted to randomly sample training samples from the stored data. The parameters of the deep Q network are adjusted by error calculation and backpropagation algorithm, so that the network gradually learns a better control strategy. Repeat the above training steps until the deep Q-network converges, and finally obtain the hydrogen fuel cell protection and control strategy based on the deep Q-network. The agent constructs a reinforcement learning evaluation mechanism by combining a cumulative reward function with a Q-value update strategy, and adjusts by trying different strategies, iteratively trains a deep Q-network, continuously optimizes the hydrogen fuel cell protection and control strategy, and finally obtains a preliminary protection and control strategy.
4. The simulation method for hydrogen fuel cell protection and control strategy as described in claim 1, characterized in that: The optimization of protection control strategy parameters using adaptive adjustment to obtain the optimized protection control strategy involves the following specific steps. Based on simulation test results, the changes in performance indicators during the execution of the strategy are calculated, the stability and fault recovery capability of the strategy are evaluated, and the optimization target is obtained. Based on the optimization objectives, the parameters of the protection and control strategy are optimized using the adaptive adjustment function, and then input into the digital twin model for simulation testing to verify the optimization effect and obtain the optimized protection and control strategy.
5. A simulation system for hydrogen fuel cell protection and control strategies, based on the simulation method for hydrogen fuel cell protection and control strategies according to any one of claims 1 to 4, characterized in that: It includes 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 hydrogen fuel cell operation data and hydrogen fuel cell fault data, and to preprocess and fuse them. The fault prediction module is used to build a fault prediction model for hydrogen fuel cells based on long short-term memory neural networks. It takes hydrogen fuel cell operation data and hydrogen fuel cell fault data as input and obtains fault prediction results. 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 protection and control strategy of the hydrogen fuel cell to obtain a preliminary protection and control strategy. The adaptive optimization module is used to construct a digital twin model of the hydrogen fuel cell through physical modeling, conduct simulation tests on the initial protection and control strategy, and optimize the protection and control strategy parameters using the adaptive adjustment function to obtain the optimized protection and control strategy.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the simulation method for hydrogen fuel cell protection and control strategy as described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the simulation method for the protection and control strategy of hydrogen fuel cells as described in any one of claims 1 to 4.
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
Fuel cell fault-tolerant control method and device based on reinforcement learning
CN119481174A