Self-adaptive collaborative energy management method for multi-reactor hybrid power system
By using a dynamic adaptive attention neural network and reinforcement learning agent to evaluate the degree of fuel cell failure, fault isolation and dynamic reconstruction of multi-stack fuel cell systems can be achieved, solving the problem of the inability to finely quantify the severity of faults in existing technologies and improving the system's stability and resource utilization efficiency.
Patent Information
- Application Number
- CN202510798460.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-16
AI Technical Summary
Existing multi-stack fuel cell hybrid systems lack refined quantitative assessment of fault severity in fault diagnosis and energy management, resulting in the inability to fully utilize the working capacity of the faulty fuel cell stack and unnecessary cost losses.
A dynamic adaptive attention neural network and an adaptive proximal strategy based on KL divergence constraints are used to optimize the reinforcement learning agent to evaluate the degree of battery stack failure in real time. The polarization curve and efficiency curve are identified online through a self-correcting feedback neural network, and the system's collaborative energy management strategy is adaptively adjusted to achieve isolation of the faulty battery stack and dynamic reconstruction of the remaining battery stacks.
It improves the system's early warning capability and stability, reduces the full life cycle operation and maintenance costs, extends the system life, and improves the system's fault tolerance and resource utilization efficiency.
Smart Images

Figure CN120657180A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fuel cells, and in particular relates to an adaptive collaborative energy management method for a multi-stack hybrid system. Background Art
[0002] With the global energy crisis and increasing environmental pollution, the development of clean and efficient energy conversion technologies has become a key direction for scientific and technological development. Proton exchange membrane fuel cells (PEMFCs), with their high energy conversion efficiency, zero emissions, low operating noise, and diverse fuel sources, are widely considered an ideal power source to replace traditional internal combustion engines. They demonstrate enormous potential for application in transportation, stationary power plants, portable power sources, and other fields.
[0003] To meet the power output, dynamic response, and system reliability requirements of practical applications, fuel cell hybrid systems have become a mainstream technology. Multi-stack fuel cell hybrid systems not only flexibly scale power output by increasing the number of stacks to meet the needs of diverse application scenarios, but also enhance overall system performance, reliability, and fault tolerance through collaborative operation of various units. However, the complex structure of multi-stack fuel cell hybrid systems makes the control process extremely complex, and the core lies in the design of energy management methods. Currently, rule-based and optimization-based energy management methods are quite mature, and with the development of artificial intelligence technology, reinforcement learning-based energy management methods also show great potential. More importantly, these energy management methods often assume healthy or ideal system components during design, or only consider relatively simplified, averaged aging models. However, in actual operation, fuel cell stacks inevitably experience performance degradation and even various failures. These failures not only reduce system performance and efficiency, but also accelerate stack aging and even cause system downtime.
[0004] Regarding fuel cell failures, existing research has mostly focused on fault diagnosis itself, namely detecting the occurrence of faults, identifying the fault type, and isolating the faulty unit. At the energy management level, relatively simple fault-tolerant controls such as degraded operation are usually adopted. There is a lack of effective means to finely quantify the severity of the fault, as well as a mechanism to adaptively integrate this quantitative information into the collaborative energy management optimization process of multi-stack fuel cell hybrid systems. Not all faults will cause the stack to be unusable. The stack may experience a gradual decline in performance, and its performance in different aspects will also deteriorate to varying degrees. If the extent of the fault cannot be accurately assessed and the stack is directly isolated, the remaining working capacity of the faulty stack cannot be fully utilized, resulting in unnecessary cost losses.
[0005] Therefore, in a multi-stack fuel cell hybrid system, it is necessary to study a method to detect stack faults and evaluate the severity of the faults, and adaptively adjust the system's collaborative energy management strategy based on the evaluation results to achieve a dynamic optimization balance of multiple objectives while meeting basic operating requirements. Summary of the Invention
[0006] In order to solve the above problems, the present invention proposes an adaptive collaborative energy management method for a multi-stack hybrid system, which is a method for evaluating the severity of the fault while detecting the stack fault, and adaptively adjusting the system's collaborative energy management strategy based on the evaluation results, so as to achieve a dynamic optimization balance of multiple objectives while meeting basic operating requirements. The present invention extracts characteristics reflecting the performance degradation of the fuel cell stack based on the polarization curve and efficiency curve of the fuel cell stack, and uses a dynamic adaptive attention neural network to evaluate the degree of fault of the fuel cell stack in real time. According to the fault degree judgment result, an adaptive proximal strategy optimization reinforcement learning agent based on KL divergence constraints is trained to autonomously decide the optimal output power of fuel cells with different fault degrees under the premise of multi-objective optimization, so as to achieve the optimal dynamic reconstruction of the hybrid power system.
[0007] To achieve the above-mentioned object, the technical solution adopted by the present invention is: a method for adaptive collaborative energy management of a multi-stack hybrid system, comprising the following steps:
[0008] S100, periodically acquiring polarization curve data and efficiency curve data of a fuel cell stack in different performance degradation states, extracting a set of feature vectors that can effectively reflect the severity of the fault, and classifying them into four category labels, namely, no fault, minor fault, moderate fault, and severe fault;
[0009] S200, taking the feature vector reflecting the fault severity extracted in step S100 and its category label as input, constructing and training a dynamic adaptive attention neural network. The attention mechanism is used to dynamically focus on the features most important to the current assessment and adaptively adjust them, classifying the fault severity of the fuel cell stack and outputting the discrete fault severity assessment results for each fuel cell stack in real time.
[0010] S300 builds an adaptive proximal policy optimization reinforcement learning agent based on KL divergence constraints. It uses a self-correcting feedback neural network to online identify the polarization and efficiency curves of fuel cells for real-time fault assessment of each stack. The assessment results are aggregated into a comprehensive health index as an input state of the agent. Based on this, the reward function is adaptively changed to achieve optimal power allocation for multi-stack fuel cell systems and lithium batteries.
[0011] S400, based on the power distribution result of the multi-stack fuel cell power generation system in step S300, if the stack is seriously faulty, the stack is isolated and enters a degraded operation mode, and the remaining stacks dynamically assume power according to their respective fault severity to achieve dynamic optimal reconstruction of the entire system.
[0012] Furthermore, in step S100, the output characteristics of the fuel cell stack under different faults and fault degrees are simulated, and the polarization curve data and efficiency curve data are collected. After preprocessing these data, six features are extracted from the polarization curve, including the open circuit voltage V oc , the voltage value corresponding to the rated current V nom , Ohmic polarization region curve slope R ohm , concentration polarization region curve slope S conc , limiting current density I lim And the maximum power point P max As a quantitative feature that sensitively reflects the changes in the internal health status of the fuel cell stack, four features are extracted from the efficiency curve, including the maximum efficiency η max , the maximum efficiency point corresponds to the current I ηmax And the lower bound of the efficient operation range I lower and upper bound I upper , a total of 10 features are composed of the feature vector that can effectively reflect the severity of the fault:
[0013] F=[V oc ,V nom ,R ohm ,S conc ,I lim ,P max ,η max ,I ηmax ,I lower ,I upper ];
[0014] According to the actual operation of the fuel cell stack, the feature vector is divided into four fault severity category labels, namely no fault, minor fault, moderate fault and severe fault.
[0015] Furthermore, in step S200, a dynamic adaptive attention neural network is constructed based on the feature vector and category label reflecting the degree of fault of the battery stack, and the feature vector is used as the state input of the neural network to output the discrete fault degree assessment result of each battery stack in real time;
[0016] The dynamic adaptive attention neural network includes an input layer, a feature embedding / transformation layer, a dynamic adaptive attention layer, a subsequent processing layer, and an output layer. The training steps include:
[0017] (1) Feature processing and network initialization: After normalizing the ten-dimensional feature vector, it is combined with the classification label to form a training data set, and then the network parameters are initialized;
[0018] (2) Model forward propagation and feature transformation: The input feature vector is first transformed hierarchically through a deep residual network structure. This process aims to project the original features into a high-dimensional latent embedding space to obtain the embedded features H. In this space, the intrinsic structure and semantic relationship of different fault modes are amplified, thereby providing more discriminative input for the subsequent attention mechanism.
[0019] (3) Dynamic attention weight generation and application: Based on the deep feature representation H, a multi-head self-attention mechanism is used to calculate the context-dependent attention weights and generate the context vector C. This mechanism calculates h independent attention heads in parallel and concatenates the results to capture information from different subspaces.
[0020] (4) Prediction probability distribution calculation and loss function construction: The context vector C generated by the attention mechanism is input into the subsequent classifier network, and the predicted probability distribution vector P of the four fault levels is output. Based on this, a weighted cross entropy loss function with an L2 regularization term is constructed to evaluate the difference between the true label and the predicted label and prevent overfitting;
[0021] (5) Parameter optimization based on adaptive moment estimation: The AdamW stochastic gradient descent optimizer is used to iteratively update the model parameters. By maintaining the exponential moving average of the first-order moment and the second-order moment of the gradient, an independent and adaptive learning rate is calculated for each parameter to achieve better generalization effect. This process continues until the performance of the model on the validation set reaches the convergence standard.
[0022] Furthermore, in step S300, a self-correcting feedback neural network is used to identify the polarization curve and efficiency curve of the fuel cell stack online in real time. The input is the fuel cell output current and voltage, the fuel cell efficiency, the polarization voltage prediction error at the previous moment, and the efficiency prediction error at the previous moment. The output is the fitting coefficient of the fuel cell polarization curve and the efficiency curve. Based on the two curves identified online, the characteristic vector reflecting the degree of fault is extracted, and a dynamic adaptive attention neural network is used to evaluate the degree of fault of the stack in real time.
[0023] Furthermore, an adaptive proximal strategy optimization reinforcement learning algorithm based on KL divergence constraint is used to achieve the optimal power distribution between the multi-stack fuel cell power generation system and the lithium battery. Based on the parameter identification results of the self-correcting feedback neural network and the real-time output results of the dynamic adaptive attention neural network, the fault degree of each stack is aggregated into a comprehensive health status indicator HI and load demand power P. load, lithium battery SOC and multi-stack fuel cell system output power P FCS As the state space perceived by the agent from the environment, the change in fuel cell output power ΔP FCS The action space that serves as the output of the agent.
[0024] Furthermore, the comprehensive health status indicator is defined as:
[0025]
[0026] Among them, P nom,n is the rated power of the nth stack, γ is the attenuation effect index, δ n is the performance attenuation factor of the nth battery stack, and N is the total number of battery stacks;
[0027]
[0028] Among them, α and β are adjustment factors. α controls the growth rate in the initial stage, and β controls the overall nonlinearity. max is the highest fault level; δ n A value equal to 1 indicates that the battery stack has completely failed, and the closer HI is to 1, the better the system availability.
[0029] Furthermore, the state space is expressed as:
[0030] State={HI,P load ,SOC,P FCS};
[0031] The action space is expressed as:
[0032] Action={ΔP FCS |ΔP FCS ∈[ΔP FCSmin ,ΔP FCSmax ]};
[0033] Where ΔP FCSmin is the lower limit of the output power variation of multiple fuel cell stacks, ΔP FCSmax It is the upper limit of the output power variation of multiple fuel cell stacks.
[0034] Furthermore, in step S300, the agent's reward function is set to include the fuel cell hydrogen consumption cost, the lithium battery equivalent hydrogen consumption cost, and the lithium battery SOC fluctuation penalty term;
[0035] The hydrogen consumption cost of a fuel cell includes: basic hydrogen consumption and performance degradation cost determined by the comprehensive health status indicator, expressed as:
[0036]
[0037] Among them, C deg is the performance degradation cost, μ is the scaling factor, HI is the comprehensive health status index, P FCS is the power of the multi-stack fuel cell system, P FCSnom is the total rated power of the multi-stack fuel cell system, ξ is the power impact index;
[0038] The hydrogen consumption cost of a multi-stack fuel cell system is:
[0039]
[0040] Among them, C FC,n is the basic hydrogen consumption of the nth fuel cell;
[0041] The final reward function expression is:
[0042] R=-(c1C sys +c2C bat +E SOC );
[0043] Among them, C bat is the equivalent hydrogen consumption of lithium battery, E SOC is the lithium battery SOC fluctuation penalty term, c1 and c2 are normalization coefficients.
[0044] Furthermore, in step S300, when training the reinforcement learning agent based on the KL divergence constraint, the agent's strategy and value function are each calculated and represented by a neural network, and the optimal strategy is continuously updated through continuous interaction with the environment;
[0045] The PPO-KL objective function is defined to maximize the policy benefit, which is expressed as:
[0046]
[0047] Among them, r t (θ) is the strategy ratio, which measures the probability ratio of the new and old strategies on the sampled actions, A t is the advantage function, is the divergence penalty term, χ is the adaptive penalty coefficient, E t is the expected value at time step t;
[0048] The core of this algorithm is to introduce the KL divergence constraint to limit the range of changes between the new and old strategies, thereby improving training stability. At the same time, it dynamically adjusts the penalty coefficient of the KL divergence penalty term. When the actual average KL divergence exceeds the preset value, the penalty coefficient is increased to limit the step size of subsequent updates; when the actual average KL divergence is less than the preset value, the penalty coefficient is reduced, allowing the strategy to explore and update more significantly. This process is repeated until the strategy converges.
[0049] Furthermore, in step S400, a fault assessment decision module is provided for each fuel cell stack. If the fault level of the fuel cell stack is severe, an isolation instruction is generated to remove the faulty fuel cell stack. Based on the reference power of the multi-stack fuel cell system obtained by agent optimization, this power is adaptively and reasonably allocated among the available fuel cells according to their respective fault levels, thereby achieving fault-tolerant control and dynamic reconstruction of the system.
[0050] In the fault assessment decision module of each fuel cell, the health factor calculation and power allocation weight calculation are performed. The calculation formula is:
[0051] H n =f(s n )=exp(-K·s n );
[0052] Among them, H n is the health factor of the nth battery stack, which is a function of the degree of failure, K is the adjustment coefficient, s n is the fault degree of the nth stack. As the fault degree of the stack increases, its health factor decreases exponentially.
[0053] The power allocation weight calculation formula is:
[0054]
[0055] Among them, ε n Assign a weight to the power of the nth stack, P nom,n is the rated power of the nth stack, S active is the set of all available battery stacks, p is the available battery stack number, H p is the health factor of the p-th battery stack.
[0056] The beneficial effects of adopting this technical solution are:
[0057] The present invention discloses an adaptive collaborative energy management method for a multi-stack hybrid system based on intelligent fault degree assessment. This method fully considers the influence of differences in the degree of stack faults in a multi-stack fuel cell hybrid system. First, the output polarization curve and efficiency curve of the fuel cell are analyzed as the changing trend of the fuel cell performance degradation, and ten features such as the open circuit voltage and the slope of the ohmic polarization region curve are extracted as feature vectors reflecting the degree of fuel cell faults and assigned category labels; secondly, the extracted ten-dimensional feature vectors and category labels are used as input to construct and train a dynamic adaptive attention neural network, and the dynamic attention mechanism is used to classify the fault degree of the stack into no fault, minor fault, moderate fault and severe fault; then, an adaptive proximal strategy optimization reinforcement learning intelligence based on KL divergence constraints is constructed. The intelligent agent uses a self-correcting feedback neural network to identify the polarization curve and efficiency curve of the fuel cell stack online in real time for real-time fault degree assessment. The assessment results are aggregated into a comprehensive health status indicator and dynamically transmitted to the intelligent agent. The fuel cell performance degradation cost item in the reward function is adaptively adjusted to independently determine the optimal power distribution law for the multi-stack fuel cell system and lithium battery. Finally, according to the fault degree of each stack, if a stack has a serious fault, its fault assessment decision module will quickly isolate the stack, causing the system to enter a degraded operation mode, and the solved multi-stack fuel cell system power demand will be reasonably distributed according to the fault degree of the remaining stacks, realizing the optimal dynamic reconstruction of the entire system.
[0058] The present invention adopts a dynamic adaptive attention neural network, which can deeply learn the complex nonlinear relationships hidden in large amounts of data. With the help of its unique attention mechanism, it can dynamically identify the performance characteristics that contribute most to the judgment of the degree of fault, accurately capture the weak signs of the early stage of faults, and significantly improve the early warning capability of the system.
[0059] By constructing an aggregated health status indicator, the present invention can macroscopically characterize the health loss of the entire multi-stack fuel cell system, provide clear system health cognition for the high-level decision-making of the reinforcement learning intelligent agent, and adaptively adjust the reward function so that the power provided by the multi-stack fuel cell system always matches its availability, while pursuing system economy and extending the system life as much as possible to protect degraded fuel cell stacks.
[0060] The present invention constructs a fault isolation and dynamic reconstruction mechanism. Once a serious fault occurs in a fuel cell stack, the system does not fail globally. Instead, the faulty unit is accurately isolated physically and in control, realizing online dynamic reconstruction of the system topology. When the fuel cell stack is at other fault levels, the system does not immediately isolate the fuel cell stack. Instead, it dynamically weights the power based on the fault level, ensuring that the remaining system resources can be utilized in the most optimized manner, thereby avoiding unnecessary excessive maintenance, greatly reducing the system's full life cycle operation and maintenance costs, and greatly improving the stability and fault tolerance of the hybrid system. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a flow chart of a method for adaptive collaborative energy management of a multi-stack hybrid system according to the present invention;
[0062] Figure 2 Schematic diagram of a multi-stack fuel cell hybrid system in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described below with reference to the accompanying drawings.
[0064] In this embodiment, see Figure 1 As shown, the present invention proposes a method for adaptive collaborative energy management of a multi-stack hybrid system, comprising the following steps:
[0065] S100, periodically acquiring polarization curve data and efficiency curve data of a fuel cell stack in different performance degradation states, extracting a set of feature vectors that can effectively reflect the severity of the fault, and classifying them into four category labels, namely, no fault, minor fault, moderate fault, and severe fault;
[0066] S200, taking the feature vector reflecting the fault severity extracted in step S100 and its category label as input, constructing and training a dynamic adaptive attention neural network. The attention mechanism is used to dynamically focus on the features most important to the current assessment and adaptively adjust them, classifying the fault severity of the fuel cell stack and outputting the discrete fault severity assessment results for each fuel cell stack in real time.
[0067] S300 builds an adaptive proximal policy optimization reinforcement learning agent based on KL divergence constraints. It uses a self-correcting feedback neural network to online identify the polarization and efficiency curves of fuel cells for real-time fault assessment of each stack. The assessment results are aggregated into a comprehensive health index as an input state of the agent. Based on this, the reward function is adaptively changed to achieve optimal power allocation for multi-stack fuel cell systems and lithium batteries.
[0068] S400, based on the power distribution result of the multi-stack fuel cell power generation system in step S300, if the stack is seriously faulty, the stack is isolated and enters a degraded operation mode, and the remaining stacks dynamically assume power according to the severity of their respective faults, thereby improving the robustness of the system and achieving dynamic optimal reconstruction of the entire system.
[0069] In this embodiment, if Figure 2 As shown, the multi-stack fuel cell hybrid system includes a multi-stack fuel cell power generation system, a lithium battery system, a DC bus, a DC / DC converter device and an energy management and control system; wherein, each fuel cell stack is connected to a unidirectional boost DC / DC converter connected in parallel to the DC bus for controlling the fuel cell output power and matching the bus voltage, and the lithium battery is connected to a bidirectional DC / DC converter connected to the DC bus for maintaining the bus voltage stability; the energy management and control system is used to collect the system's operating parameter information, and based on this information, generate corresponding control signals to control the hybrid system to achieve optimal power distribution.
[0070] The first step is to extract features based on the fuel cell polarization curve and efficiency curve, and train a dynamic adaptive attention neural network to finely classify the degree of fuel cell failure, as follows:
[0071] In step S100, the output characteristics of the fuel cell stack under different faults and fault degrees are simulated, and the polarization curve data and efficiency curve data are collected. After preprocessing these data, six features are extracted from the polarization curve, including the open circuit voltage V oc , the voltage value corresponding to the rated current V nom , Ohmic polarization region curve slope R ohm , concentration polarization region curve slope S conc , limiting current density I lim And the maximum power point P max As a quantitative feature that sensitively reflects the changes in the internal health status of the fuel cell stack, four features are extracted from the efficiency curve, including the maximum efficiency η max , the maximum efficiency point corresponds to the current I ηmax And the lower bound of the efficient operation range I lower and upper bound I upper , a total of 10 features are composed of the feature vector that can effectively reflect the severity of the fault:
[0072] F=[V oc ,V nom ,R ohm ,S conc ,I lim ,P max ,η max ,I ηmax ,I lower ,Iupper ];
[0073] According to the actual operation of the fuel cell stack, the feature vector is divided into four fault severity category labels, namely no fault, minor fault, moderate fault and severe fault.
[0074] In step S200, a dynamic adaptive attention neural network is constructed based on the feature vector and category label reflecting the fault degree of the battery stack, and the feature vector is used as the state input of the neural network to output the discrete fault degree assessment result of each battery stack in real time.
[0075] The dynamic adaptive attention neural network includes an input layer, a feature embedding / transformation layer, a dynamic adaptive attention layer, a subsequent processing layer, and an output layer. The training steps include:
[0076] (1) Feature processing and network initialization: After normalizing the ten-dimensional feature vector, it is combined with the classification label to form a training data set, and then the network parameters are initialized;
[0077] (2) Model forward propagation and feature transformation: The input feature vector is first transformed hierarchically through a deep residual network structure. This process aims to project the original features into a high-dimensional latent embedding space to obtain the embedded features H. In this space, the intrinsic structure and semantic relationship of different fault modes are amplified, thereby providing more discriminative input for the subsequent attention mechanism.
[0078] (3) Dynamic attention weight generation and application: Based on the deep feature representation H, a multi-head self-attention mechanism is used to calculate the context-dependent attention weights and generate the context vector C. This mechanism calculates h independent attention heads in parallel and concatenates the results to capture information from different subspaces:
[0079] C=Concat(head1,...,head h )·W0;
[0080] Among them, Concat is a vector concatenation operation, head represents the attention head, and W0 is the output projection matrix, which can fuse the information from the left and right attention heads;
[0081] The calculation formula for each attention head is:
[0082]
[0083] in, are the query, key, and value projection matrices of the i-th attention head, respectively, d k is the dimension of the key vector, softmax is the activation function, and Attention is the attention mechanism function;
[0084] (4) Calculation of predicted probability distribution and construction of loss function: The context vector C generated by the attention mechanism is input into the subsequent classifier network, and the predicted probability distribution vector P of four fault degrees is output. Based on this, a weighted cross entropy loss function with an L2 regularization term is constructed to evaluate the difference between the true label and the predicted label and prevent overfitting. Its expression is:
[0085]
[0086] Among them, ∵ is the set of all learnable parameters of the model, M is the number of samples, and w j is the weight of the j-th type of fault, Y j (k) is the fault degree label of the k-th sample j, is the predicted probability of the jth type of fault degree of the kth sample, λ is the regularization coefficient, and θ is the model parameter;
[0087] (5) Parameter optimization based on adaptive moment estimation: The AdamW stochastic gradient descent optimizer is used to iteratively update the model parameters. By maintaining the exponential moving average of the first-order moment and the second-order moment of the gradient, an independent and adaptive learning rate is calculated for each parameter to achieve better generalization effect. This process continues until the performance of the model on the validation set reaches the convergence standard.
[0088] The second step is to build an adaptive proximal strategy optimization reinforcement learning agent based on KL divergence constraints to adaptively optimize the power distribution of the multi-stack fuel cell system and lithium batteries according to the fault level of the fuel cell stack. The details are as follows:
[0089] In step S300, a self-correcting feedback neural network is used to identify the polarization curve and efficiency curve of the fuel cell stack online in real time. The input is the fuel cell output current and voltage, the fuel cell efficiency, the polarization voltage prediction error at the previous moment, and the efficiency prediction error at the previous moment. The output is the fitting coefficient of the fuel cell polarization curve and the efficiency curve. Based on the two curves identified online, a characteristic vector reflecting the degree of fault is extracted, and a dynamic adaptive attention neural network is used to evaluate the degree of fault of the stack in real time.
[0090] An adaptive proximal strategy optimization reinforcement learning algorithm based on KL divergence constraint is used to achieve the optimal power distribution between multi-stack fuel cell power generation systems and lithium batteries. Based on the parameter identification results of the self-correcting feedback neural network and the real-time output results of the dynamic adaptive attention neural network, the fault degree of each stack is aggregated into a comprehensive health status indicator HI and load demand power P. load , lithium battery SOC and multi-stack fuel cell system output power P FCSAs the state space perceived by the agent from the environment, the change in fuel cell output power ΔP FCS The action space that serves as the output of the agent.
[0091] The comprehensive health status indicator is defined as:
[0092]
[0093] Among them, P nom,n is the rated power of the nth stack, γ is the attenuation effect index, δ n is the performance attenuation factor of the nth battery stack, and N is the total number of battery stacks;
[0094]
[0095] Among them, α and β are adjustment factors. α controls the growth rate in the initial stage, and β controls the overall nonlinearity. max is the highest fault level; δ n A value equal to 1 indicates that the battery stack has completely failed, and the closer HI is to 1, the better the system availability.
[0096] The state space is represented as:
[0097] State={HI,P load ,SOC,P FCS};
[0098] The action space is expressed as:
[0099] Action={ΔP FCS |ΔP FCS ∈[ΔP FCSmin ,ΔP FCSmax ]};
[0100] Where ΔP FCSmin is the lower limit of the output power variation of multiple fuel cell stacks, ΔP FCSmax It is the upper limit of the output power variation of multiple fuel cell stacks.
[0101] In step S300, the agent's reward function is set to include the fuel cell hydrogen consumption cost, the lithium battery equivalent hydrogen consumption cost, and the lithium battery SOC fluctuation penalty item.
[0102] The hydrogen consumption cost of a fuel cell includes: basic hydrogen consumption and performance degradation cost determined by the comprehensive health status indicator, expressed as:
[0103]
[0104] Among them, C deg is the performance degradation cost, μ is the scaling factor, HI is the comprehensive health status index, PFCS is the power of the multi-stack fuel cell system, P FCSnom is the total rated power of the multi-stack fuel cell system, ξ is the power impact index;
[0105] The hydrogen consumption cost of a multi-stack fuel cell system is:
[0106]
[0107] Among them, C FC,n is the basic hydrogen consumption of the nth fuel cell;
[0108] The final reward function expression is:
[0109] R=-(c1C sys +c2C bat +E SOC );
[0110] Among them, C bat is the equivalent hydrogen consumption of lithium battery, E SOC is the lithium battery SOC fluctuation penalty term, c1 and c2 are normalization coefficients.
[0111] Preferably, when training a reinforcement learning agent based on KL divergence constraints, the agent's strategy and value function are each represented by a separate neural network, and the optimal strategy is continuously updated through continuous interaction with the environment;
[0112] The PPO-KL objective function is defined to maximize the policy benefit, which is expressed as:
[0113]
[0114] Among them, r t (θ) is the strategy ratio, which measures the probability ratio of the new and old strategies on the sampled actions, A t is the advantage function, is the divergence penalty term, χ is the adaptive penalty coefficient, E t is the expected value at time step t;
[0115] The core of this algorithm is to introduce the KL divergence constraint to limit the range of changes between the new and old strategies, thereby improving training stability. At the same time, it dynamically adjusts the penalty coefficient of the KL divergence penalty term. When the actual average KL divergence exceeds the preset value, the penalty coefficient is increased to limit the step size of subsequent updates; when the actual average KL divergence is less than the preset value, the penalty coefficient is reduced, allowing the strategy to explore and update more significantly, improving stability while ensuring training convergence. This process is repeated until the strategy converges.
[0116] In step S400, a fault assessment and decision module is provided for each fuel cell stack. If the fault level of the fuel cell stack is severe, an isolation instruction is generated to remove the faulty fuel cell stack. Based on the reference power of the multi-stack fuel cell system obtained by agent optimization, this power is adaptively and reasonably allocated among the available fuel cells according to their respective fault levels, thereby achieving fault-tolerant control and dynamic reconfiguration of the system.
[0117] In the fault assessment decision module of each fuel cell, the health factor calculation and power allocation weight calculation are performed. The calculation formula is:
[0118] H n =f(s n )=exp(-K·s n );
[0119] Among them, H n is the health factor of the nth battery stack, which is a function of the degree of failure, K is the adjustment coefficient, s n is the fault degree of the nth stack. As the fault degree of the stack increases, its health factor decreases exponentially.
[0120] The power allocation weight calculation formula is:
[0121]
[0122] Among them, ε n Assign a weight to the power of the nth stack, P nom,n is the rated power of the nth stack, S active is the set of all available battery stacks, p is the available battery stack number, H p is the health factor of the p-th battery stack;
[0123] According to the above principles, the power is distributed so that the stack with a high degree of fault bears less power, and the stack with a low degree of fault bears higher power. Without interrupting the power supply to the load, the internal faults of the multi-stack fuel cell system can be smoothly handled, thereby improving the robustness of the system.
[0124] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for adaptive collaborative energy management of a multi-stack hybrid system, characterized in that: Including steps: S100, periodically acquiring polarization curve data and efficiency curve data of a fuel cell stack in different performance degradation states, extracting a set of feature vectors that can effectively reflect the severity of the fault, and classifying them into four category labels, namely, no fault, minor fault, moderate fault, and severe fault; S200, taking the feature vector reflecting the fault severity extracted in step S100 and its category label as input, constructing and training a dynamic adaptive attention neural network. The attention mechanism is used to dynamically focus on the features most important to the current assessment and adaptively adjust them, classifying the fault severity of the fuel cell stack and outputting the discrete fault severity assessment results for each fuel cell stack in real time. S300 builds an adaptive proximal policy optimization reinforcement learning agent based on KL divergence constraints. It uses a self-correcting feedback neural network to online identify the polarization and efficiency curves of fuel cells for real-time fault assessment of each stack. The assessment results are aggregated into a comprehensive health index as an input state of the agent. Based on this, the reward function is adaptively changed to achieve optimal power allocation for multi-stack fuel cell systems and lithium batteries. S400, based on the power distribution result of the multi-stack fuel cell power generation system in step S300, if the stack is seriously faulty, the stack is isolated and enters a degraded operation mode, and the remaining stacks dynamically assume power according to their respective fault severity to achieve dynamic optimal reconstruction of the entire system.
2. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 1, characterized in that: In step S100, the output characteristics of the fuel cell stack under different faults and fault degrees are simulated, and the polarization curve data and efficiency curve data are collected. After preprocessing these data, six features are extracted from the polarization curve, including the open circuit voltage V oc , the voltage value corresponding to the rated current V nom , Ohmic polarization region curve slope R ohm , concentration polarization region curve slope S conc , limiting current density I lim And the maximum power point P max As a quantitative feature that sensitively reflects the changes in the internal health status of the fuel cell stack, four features are extracted from the efficiency curve, including the maximum efficiency η max , the maximum efficiency point corresponds to the current I ηmax And the lower bound of the efficient operation range I lower and upper bound I upper , a total of 10 features are composed of the feature vector that can effectively reflect the severity of the fault: F=[V oc ,V nom ,R ohm ,S conc ,I lim ,P max ,η max ,I ηmax ,I lower ,I upper ]; According to the actual operation of the fuel cell stack, the feature vector is divided into four fault severity category labels, namely no fault, minor fault, moderate fault and severe fault.
3. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 2, characterized in that: In step S200, a dynamic adaptive attention neural network is constructed based on the feature vector and category label reflecting the fault degree of the battery stack, and the feature vector is used as the state input of the neural network to output the discrete fault degree assessment result of each battery stack in real time; The dynamic adaptive attention neural network includes an input layer, a feature embedding / transformation layer, a dynamic adaptive attention layer, a subsequent processing layer, and an output layer. The training steps include: (1) Feature processing and network initialization: After normalizing the ten-dimensional feature vector, it is combined with the classification label to form a training data set, and then the network parameters are initialized; (2) Model forward propagation and feature transformation: The input feature vector is first transformed hierarchically through a deep residual network structure. This process aims to project the original features into a high-dimensional latent embedding space to obtain the embedded features H. In this space, the intrinsic structure and semantic relationship of different fault modes are amplified, thereby providing more discriminative input for the subsequent attention mechanism. (3) Dynamic attention weight generation and application: Based on the deep feature representation H, a multi-head self-attention mechanism is used to calculate the context-dependent attention weights and generate the context vector C. This mechanism calculates h independent attention heads in parallel and concatenates the results to capture information from different subspaces. (4) Prediction probability distribution calculation and loss function construction: The context vector C generated by the attention mechanism is input into the subsequent classifier network, and the predicted probability distribution vector P of the four fault levels is output. Based on this, a weighted cross entropy loss function with an L2 regularization term is constructed to evaluate the difference between the true label and the predicted label and prevent overfitting; (5) Parameter optimization based on adaptive moment estimation: The AdamW stochastic gradient descent optimizer is used to iteratively update the model parameters. By maintaining the exponential moving average of the first-order moment and the second-order moment of the gradient, an independent and adaptive learning rate is calculated for each parameter to achieve better generalization effect. This process continues until the performance of the model on the validation set reaches the convergence standard.
4. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 1, characterized in that: In step S300, a self-correcting feedback neural network is used to identify the polarization curve and efficiency curve of the fuel cell stack online in real time. The input is the fuel cell output current and voltage, the fuel cell efficiency, the polarization voltage prediction error at the previous moment, and the efficiency prediction error at the previous moment. The output is the fitting coefficient of the fuel cell polarization curve and the efficiency curve. Based on the two curves identified online, a characteristic vector reflecting the degree of fault is extracted, and a dynamic adaptive attention neural network is used to evaluate the degree of fault of the stack in real time.
5. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 4, characterized in that: An adaptive proximal strategy optimization reinforcement learning algorithm based on KL divergence constraint is used to achieve the optimal power distribution between multi-stack fuel cell power generation systems and lithium batteries. Based on the parameter identification results of the self-correcting feedback neural network and the real-time output results of the dynamic adaptive attention neural network, the fault degree of each stack is aggregated into a comprehensive health status indicator HI and load demand power P. load , lithium battery SOC and multi-stack fuel cell system output power P FCS As the state space perceived by the agent from the environment, the change in fuel cell output power ΔP FCS The action space that serves as the output of the agent.
6. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 5, characterized in that: The comprehensive health status indicator is defined as: Among them, P nom,n is the rated power of the nth stack, γ is the attenuation effect index, δ n is the performance attenuation factor of the nth battery stack, and N is the total number of battery stacks; Among them, α and β are adjustment factors. α controls the growth rate in the initial stage, and β controls the overall nonlinearity. max is the highest fault level; δ n A value equal to 1 indicates that the battery stack has completely failed, and the closer HI is to 1, the better the system availability.
7. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 6, characterized in that: The state space is represented as: State={HI,P load ,SOC,P FCS }; The action space is expressed as: Action={ΔP FCS |ΔP FCS ∈[ΔP FCSmin ,ΔP FCSmax ]}; Where ΔP FCSmin is the lower limit of the output power variation of multiple fuel cell stacks, ΔP FCSmax It is the upper limit of the output power variation of multiple fuel cell stacks.
8. The method for adaptive collaborative energy management of a multi-stack hybrid system according to any one of claims 1 or 4-7, characterized in that: In step S300, the agent's reward function is set to include the fuel cell hydrogen consumption cost, the lithium battery equivalent hydrogen consumption cost, and the lithium battery SOC fluctuation penalty term; The hydrogen consumption cost of a fuel cell includes: basic hydrogen consumption and performance degradation cost determined by the comprehensive health status indicator, expressed as: Among them, C deg is the performance degradation cost, μ is the scaling factor, HI is the comprehensive health status index, P FCS is the power of the multi-stack fuel cell system, P FCSnom is the total rated power of the multi-stack fuel cell system, ξ is the power impact index; The hydrogen consumption cost of a multi-stack fuel cell system is: Among them, C FC,n is the basic hydrogen consumption of the nth fuel cell; The final reward function expression is: R=-(c1C sys +c2C bat +E SOC ); Among them, C bat is the equivalent hydrogen consumption of lithium battery, E SOC is the lithium battery SOC fluctuation penalty term, c1 and c2 are normalization coefficients.
9. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 8, characterized in that: In step S300, when training a reinforcement learning agent based on KL divergence constraints, the agent's strategy and value function are each calculated and represented by a neural network, and the optimal strategy is continuously updated through continuous interaction with the environment; The PPO-KL objective function is defined to maximize the policy benefit, which is expressed as: Among them, r t (θ) is the strategy ratio, which measures the probability ratio of the new and old strategies on the sampled actions, A t is the advantage function, is the divergence penalty term, χ is the adaptive penalty coefficient, E t is the expected value at time step t; The core of this algorithm is to introduce the KL divergence constraint to limit the range of changes between the new and old strategies, thereby improving training stability. At the same time, it dynamically adjusts the penalty coefficient of the KL divergence penalty term. When the actual average KL divergence exceeds the preset value, the penalty coefficient is increased to limit the step size of subsequent updates; when the actual average KL divergence is less than the preset value, the penalty coefficient is reduced, allowing the strategy to explore and update more significantly. This process is repeated until the strategy converges.
10. The method for adaptive collaborative energy management of a multi-stack hybrid system according to claim 1, characterized in that: In step S400, a fault assessment and decision module is provided for each fuel cell stack. If the fault level of the fuel cell stack is severe, an isolation instruction is generated to remove the faulty fuel cell stack. Based on the reference power of the multi-stack fuel cell system obtained by agent optimization, this power is adaptively and reasonably allocated among the available fuel cells according to their respective fault levels, thereby achieving fault-tolerant control and dynamic reconfiguration of the system. In the fault assessment decision module of each fuel cell, the health factor calculation and power allocation weight calculation are performed. The calculation formula is: H n =f(s n )=exp(-κ·s n ); Among them, H n is the health factor of the nth stack, which is a function of the degree of failure, k is the adjustment coefficient, s n is the fault degree of the nth stack. As the fault degree of the stack increases, its health factor decreases exponentially. The power allocation weight calculation formula is: Among them, ε n Assign a weight to the power of the nth stack, P nom,n is the rated power of the nth stack, S active is the set of all available battery stacks, p is the available battery stack number, H p is the health factor of the p-th battery stack.
Citation Information
Patent Citations
Method and device for predicting dynamic performance of fuel cell system
CN113506901A
Underwater detector cluster adaptive detection method and system based on distributed reinforcement learning
CN119204155A
Marine ranch power supply system line fault diagnosis method based on MS-2DResNet and ICBAM
CN119475124A
CNN-Transformer-based fuel cell fault diagnosis method
CN120086712A
Cited By
Fuel cell hybrid propulsion system and power fluctuation-consumption collaborative optimization method thereof
CN121697510A