Fuel cell system energy management method and system based on multi-time scale control

By adopting a multi-time scale control energy management method in fuel cell systems, combining long-term and short-term optimization, and using the augmented Lagrangian function and inverse cycle coordinate descent algorithm, the problem of difficulty in realizing precise time control in the existing technology is solved, and the efficient and stable operation of the system is achieved under complex working conditions.

CN120109863APending Publication Date: 2025-06-06WUHAN UNIV OF TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510154130.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The energy management methods of existing fuel cell systems are difficult to meet the precise control requirements under complex operating conditions, resulting in unstable system operation and unable to effectively deal with power fluctuations and load changes in the power grid.

Method used

The energy management method of fuel cell system based on multi-time scale control is adopted, and the future power demand is predicted through long-term optimization and the reference trajectory is planned. The power output is adjusted in real time with short-term optimization, and the solution process is simplified by augmented Lagrangian function and inverse cycle coordinate descent algorithm.

Benefits of technology

It realizes a system that operates efficiently on multiple time scales, reduces the computational complexity and improves the solution speed, so that the system can quickly adjust the power output and ensures the stable operation of the system under complex operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120109863A_ABST
    Figure CN120109863A_ABST
Patent Text Reader

Abstract

The invention discloses a fuel cell system energy management method and system based on multi-time scale control, and the method comprises the following steps: taking maximized power generation income of a fuel cell system as a long-period optimization target, solving the long-period optimization target, and obtaining an output power reference value of the fuel cell system; taking the minimum deviation between the actual output power of the fuel cell system and the output power reference value as a short-period optimization target, and setting a constraint condition of the short-period optimization target according to the power increment of the fuel cell system and the limitation of the actual output; introducing the constraint condition into a short-period optimization target through a Lagrangian multiplier, converting the short-period optimization target with the constraint condition into an unconstrained form, and performing iterative optimization on the Lagrangian multiplier through an inverse cyclic coordinate descent algorithm to obtain a power increment of the fuel cell system; and adjusting the output power of the fuel cell system in real time according to the power increment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy management, and in particular to a fuel cell system energy management method and system based on multi-time scale control. Background Art

[0002] Multi-stack fuel cell power generation systems are critical to the economic benefits of grid power generation. An efficient energy management strategy (EMS) is needed to control power generation costs under limited hydrogen capacity. Fuel cell power generation systems use hydrogen as an energy source and are usually combined with lithium batteries to form a hybrid power system. The integration of lithium batteries can not only supplement energy needs when the fuel cell output is insufficient, but also improve overall energy efficiency through regenerative braking. The development of an efficient EMS is crucial to optimize hydrogen consumption and extend the power generation cycle, especially under different conditions and scenarios, through intelligent energy distribution and management technology to ensure that the system achieves the highest operating efficiency in various ecological environments. An efficient EMS can fully tap the synergistic potential of fuel cells and lithium batteries, thereby improving the overall performance and economic feasibility of the system.

[0003] Model predictive control (MPC), as an optimization-based EMS, can provide the advantages of online optimization while ensuring the generation of a series of satisfactory suboptimal solutions under all operating conditions. This capability makes MPC widely used in fuel cell system EMS. In order to improve the management performance of MPC in multi-stack fuel cell power generation systems, a hierarchical control strategy is usually adopted. In this framework, the upper layer, as a decision-making unit, is responsible for calculating the optimal reference trajectory of the lithium battery state of charge (SOC) and the reference output power of the fuel cell, while the bottom layer MPC is used to track these reference trajectories to ensure real-time optimization of the system. This hierarchical control framework improves the operating efficiency and stability of the system to a certain extent.

[0004] However, the existing technology still has some shortcomings in practical applications. The existing technology is difficult to meet the precise real-time control requirements under complex working conditions, resulting in unstable system operation and inability to effectively cope with power grid power fluctuations and load changes. In addition, the MPC solution process is complex, requiring explicit construction of quadratic programming problems and matrix operations and factorization, which has high computational complexity and is difficult to solve quickly in a short time scale. Summary of the invention

[0005] The present invention proposes a fuel cell system energy management method and system based on multi-time scale control, which solves the problem that existing fuel cell energy management methods are difficult to meet the precise real-time control requirements under complex working conditions.

[0006] In order to solve the above technical problems, the present invention provides a fuel cell system energy management method based on multi-time scale control, comprising the following steps:

[0007] Step S1: taking the maximization of the power generation revenue of the fuel cell system as the long-term optimization target, solving the long-term optimization target, and obtaining the output power reference value of the fuel cell system;

[0008] Step S2: minimizing the deviation between the actual output power of the fuel cell system and the output power reference value is used as the short-term optimization target, and setting the constraint conditions of the short-term optimization target according to the power increment and actual output limit of the fuel cell system;

[0009] Step S3: introducing the constraint condition into the short-term optimization target through Lagrange multipliers, converting the short-term optimization target with the constraint condition into an unconstrained form, iteratively optimizing the Lagrange multiplier through a reverse-cycle coordinate descent algorithm, and obtaining the power increment of the fuel cell system;

[0010] Step S4: adjusting the output power of the fuel cell system in real time according to the power increment. Preferably, the expression of the long-term optimization target in step S1 is:

[0011] NP = rC;

[0012]

[0013] R = E × t;

[0014] E=P DC ×t;

[0015]

[0016] y min ≤y(k u +k)≤y max ;

[0017]

[0018] In the above formula, NP is the net profit of the system; r is the power generation income of the system; C is the power generation cost of the system; R is the power generation income of the system; p e is the electricity price; n is the total number of fuel cells in the multiple fuel cell stacks in the system; P DC is the total required power of the DC bus; η DC is the efficiency of the converter; t is the operating time of the system; is the hydrogen cost of multiple fuel cell stacks; C 1 is the equipment maintenance cost; E is the power generation of the system; Nu Forecast step size optimized for long periods; is the net output power of the i-th fuel cell; P Li is the power of lithium battery; is the efficiency of the i-th fuel cell; η Li is the efficiency of lithium battery; k u Timestamp optimized for long periods; k is the moment; Δt is the time interval; is the lower calorific value of hydrogen; y is the control output; y max ,y min are the upper and lower bounds of the control output respectively.

[0019] Preferably, the expression of the short-term optimization objective in step S2 is:

[0020]

[0021] y min ≤y(k l +j)≤y max ;

[0022] u min ≤u(k l +j-1)≤u max ;

[0023]

[0024] In the formula, Nl The prediction step size is optimized for short periods; W y is the error weight matrix; y is the control output; k l is the timestamp of short cycle optimization; j is the time of short cycle optimization; r is the output power reference value; W u is the power increment weight matrix; u is the control input; x is the state vector; A, B, W, Y are coefficient matrices; w is the interference; y is the control output; y max ,y min are the upper and lower limits of the control output respectively; u is the power increment of the fuel cell system; u max 、u min are the upper and lower bounds of the power increment of the fuel cell system, respectively.

[0025] Preferably, the expression of the unconstrained short-term optimization objective in step S3 is:

[0026]

[0027] λ k+1 =λ k +ρ(Hz k+1 -h);

[0028] In the formula, F ρ (z,λ) is the augmented Lagrangian function; z is the decision variable; λ is the Lagrangian multiplier; λ k , k+1are the Lagrange multipliers for the kth and k+1th iterations respectively; ρ is the penalty factor; Q is the coefficient matrix of the quadratic term; H is the coefficient matrix of the equality constraint; q is the coefficient vector of the linear term; h is the constant term on the right side of the equality constraint; z k+1 is the decision variable at the k+1th iteration; z min , z max are the upper and lower bounds of z respectively; k is the number of iterations.

[0029] Preferably, the iterative optimization of the Lagrange multiplier by the inverse cyclic coordinate descent algorithm in step S3 comprises the following steps:

[0030] Step S31: Initialize decision variables and Lagrange multipliers;

[0031] Step S32: Fix the Lagrange multiplier and traverse each decision variable in reverse order. i , fix other decision variables, and update z by the following formula i :

[0032]

[0033] like Then the traversal ends, otherwise continue the reverse loop update;

[0034] Step S33: According to the current decision variable z k+1 Update Lagrange multipliers

[0035]

[0036] In the formula, λ k is the Lagrange multiplier at the previous moment;

[0037] like Then the iteration ends and the current decision variable is output, otherwise, step S34 is executed;

[0038] Step S34: Update the acceleration parameter and the Lagrange multiplier, and return to step S32 until the set maximum number of iterations is reached. The expression for updating the acceleration parameter and the Lagrange multiplier is:

[0039]

[0040] In the above formula, α k+1 , α k are the acceleration parameters at the k+1th and kth iterations respectively; λ k+1 is the Lagrange multiplier at the k+1th iteration.

[0041] Preferably, in step S1, a Transformer network is used to predict the power demand of the fuel cell system in the future, a long-term optimization target is constructed according to the predicted power demand, and the hyperparameters of the Transformer network are optimized, including the following steps:

[0042] Step S11: Randomly generate M hyperparameter combinations, calculate the prediction error of each hyperparameter combination, and select the solution with the smallest prediction error as the current optimal solution x best , select the solution with the largest prediction error as the current worst solution x worst ;

[0043] Step S12: Randomly select two different hyperparameter combinations x P1 and x P2 , according to x P1 and x P2 Generate temporary update location and Using x P1 and x P2 Improve the limitations of the diversification and intensive stages in the hyperparameter combination, and randomly generate the third temporary update position Get the new position during the best iteration:

[0044]

[0045] Where δ is the adaptive coefficient;

[0046] Step S13: Generate a random number r. When r≤0.6, update the hyperparameter combination. Otherwise, keep the current hyperparameter combination and calculate the prediction error Δx=x for each hyperparameter combination. best -x worst , update the current optimal solution x best and the worst solution x worst ;

[0047] Step S14: Update the parameter δ, repeat steps S12 to S13 until the current number of iterations reaches the set maximum number of iterations, and return the optimal solution x best As the optimal hyperparameter combination of Transformer network.

[0048] The present invention also provides a fuel cell system energy management system based on multi-time scale control, which is implemented based on the above-mentioned fuel cell system energy management method based on multi-time scale collaborative control, including: a data acquisition module, a power demand prediction module, an upper model prediction control module, a lower model prediction control module and a multi-time scale collaborative control module;

[0049] The data acquisition module is used to collect the operating data of the fuel cell system;

[0050] The power demand prediction module predicts the power demand of the system in the future based on the historical operation data of the fuel cell system;

[0051] The upper model predictive control module: based on the predicted power demand, constructs and solves the long-term optimization target to obtain the reference value of the output power of multiple fuel cell stacks and the reference value of the state of charge of the lithium battery;

[0052] The lower model predictive control module: takes minimizing the deviation between the actual output and the reference value as the short-term optimization target and solves it to obtain the power increment of the multiple fuel cell stacks and the charge increment of the lithium battery;

[0053] The multi-time scale collaborative control module adjusts the parameters of the fuel cell system in real time according to the power increment and charge increment output by the lower layer model prediction control module.

[0054] Preferably, the lower-layer model predictive control module uses an augmented Lagrangian function to transform the constrained short-term optimization objective into an unconstrained form, and adopts an inverse-loop coordinate descent algorithm to solve the unconstrained short-term optimization objective.

[0055] Preferably, after the data acquisition module acquires the operating data of the fuel cell system, it preprocesses the operating data, and the preprocessing includes data cleaning and normalization.

[0056] Preferably, the multi-time scale collaborative control module feeds back the operating data collected in real time by the data acquisition module to the upper-layer model prediction control module and the lower-layer model prediction control module, and updates the prediction model and optimization parameters in a rolling manner.

[0057] The benefits of the present invention include at least:

[0058] 1. Predict future power demand and plan reference trajectories through long-term optimization, and adjust power output in real time using short-term optimization to ensure efficient operation of the system on multiple time scales;

[0059] 2. The short-cycle optimization objective is converted into an unconstrained form and solved using the inverse-loop coordinate descent algorithm, which reduces the computational complexity, avoids explicit construction of quadratic programming problems, reduces the computational burden of matrix multiplication and factorization, and improves the solution speed, enabling the system to quickly adjust power output in a short time. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A schematic diagram of a method flow chart of an embodiment of the present invention;

[0061] Figure 2 A schematic diagram of the system structure of an embodiment of the present invention;

[0062] Figure 3 A schematic diagram of a two-layer MPC energy management framework according to an embodiment of the present invention;

[0063] Figure 4 A schematic diagram of a power prediction method according to an embodiment of the present invention;

[0064] Figure 5 A schematic diagram of a process for optimizing the hyperparameters of a Transformer network in the implementation of the present invention;

[0065] Figure 6 It is a schematic diagram of the iterative optimization process of RCCD;

[0066] Figure 7 Schematic diagram of the flow of the AL-RCCD algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0068] like Figure 1 As shown, an embodiment of the present invention provides a fuel cell system energy management method based on multi-time scale control, comprising the following steps:

[0069] Step S1: construct a double-layer model predictive control model. The upper-layer model predictive control model predicts the power demand of the fuel cell system in the future. According to the predicted power demand, a long-term optimization target is constructed and solved to obtain the output power reference value of the fuel cell system.

[0070] Specifically, a fuel cell system model is first constructed, including an energy production and consumption balance model, a power generation cost model, and a power generation revenue model.

[0071] like Figure 2 As shown, the propulsion and energy storage of the fuel cell system relies on a two-component system: multiple stacks of fuel cells and lithium batteries. The hydrogen tank provides hydrogen to the fuel cell, which is connected to the DC bus through a DC-DC converter and powers the load together with the lithium battery. This configuration ensures that the system has sufficient power to operate while being able to capture renewable energy, so the balance between energy production and consumption of the fuel cell system is:

[0072]

[0073] In the above formula, P FCi is the net output power of the i-th fuel cell in the multi-stack fuel cell; n is the total number of fuel cells in the multi-stack fuel cell; P Li is the power of the lithium battery; η DC , η AC , η e , η t are the efficiencies of DC-DC converter, DC-AC converter, power transmission, and power distribution respectively; P DC is the total required power of the DC bus; P W is the power required for generating electricity.

[0074] Considering the equivalent hydrogen consumption of lithium batteries, the hydrogen consumption of the fuel cell system is m H2 It can be expressed as:

[0075]

[0076] In the above formula, N is the number of time periods; Δt is the time interval; η Li is the efficiency of the lithium battery, including the charging efficiency η char and discharge efficiency η dischar ; is the lower heating value of hydrogen; P L i(t) is the power requirement of the lithium battery.

[0077] The power generation cost model of the fuel cell system is:

[0078]

[0079] In the formula, is the hydrogen cost of the fuel cell system; p H2 is the price of hydrogen per gram; m H2 is the hydrogen consumption of the fuel cell system.

[0080] The power generation income of the fuel cell system mainly consists of two parts: power generation income R and power generation cost C. Power generation income refers to the income obtained from selling electricity, which is usually proportional to the power generation E and the electricity price:

[0081] R = E × t;

[0082] Where t is the operating time of the fuel cell system.

[0083] The power generation cost includes hydrogen cost, equipment maintenance cost, staff salary, etc.:

[0084]

[0085] In the formula, C 1 Equipment maintenance costs, staff salaries, etc.

[0086] To calculate the revenue from power generation, the operating costs can be subtracted from the revenue from electricity sales to obtain the net revenue of the system. In addition, external factors such as government subsidies and tax incentives can also be considered to more comprehensively evaluate the economic benefits of the system:

[0087] E=P DC ×t;

[0088] r = RC;

[0089]

[0090] NP = rC;

[0091] In the above formula, p e is the electricity price; NP is the net profit of the fuel cell system.

[0092] The hierarchical control strategy of the embodiment of the present invention adopts model predictive control, such as Figure 3 The structure of the two-layer MPC framework of the embodiment of the present invention is a framework for the energy management of the fuel cell system. By comparing the real-time collected power data, the framework dynamically adjusts the parameter trajectory to ensure the real-time consistency of the control decision. Among them, the upper-level model predictive control model predicts the power demand on a long time scale. The goal is to maximize the optimization of the net profit of the power generation system while calculating the reference trajectory of the fuel cell output power and the lithium battery state of charge. The specific operation is to predict the future power demand based on the current time series and energy demand of the fuel cell system; maximize the net profit as the objective function of the power generation economy, and set the constraints as the state of charge limit of the lithium battery and the power limit of multiple fuel cell stacks.

[0093] For fuel cell systems, accurate power load forecasting is the key to achieving efficient energy scheduling. Especially in the case of long-term operation, high-precision power generation demand forecasting is particularly important to ensure that the fuel cell system can flexibly adapt to different weather environments and energy demands. The data-driven model is combined with a physics-based multi-stack fuel cell model to improve the accuracy and reliability of power demand forecasting. In the embodiment of the present invention, a Transformer network based on the Newton-Raphson optimization algorithm NRBO is used to predict the power generation load of the fuel cell system. Then, the power generation information is combined with the power equation of the power generation system through the smart grid information system to predict the power demand of the fuel cell system. The following steps are included:

[0094] Step S11: Establishing a discrete mathematical model of the power unit of the fuel cell system:

[0095]

[0096] Where SOC(k) represents the state of charge of the lithium battery capacity at time k; PL i(k) is; V DC C Li Represents the capacity of lithium battery.

[0097] The power variation of multiple fuel cell stacks is:

[0098]

[0099] In the formula, for; is the power increment of the ith fuel cell at time k. Then the discrete mathematical model of the power unit of the fuel cell system can be expressed as:

[0100]

[0101] Where V DC for.

[0102] The state space expression of the fuel cell system is:

[0103]

[0104]

[0105] In the above formula, x(k), y(k+1), u(k) and w(k) are the state vector, control output, control input and disturbance respectively; A, B, C, W are coefficient matrices; P DC (k) is the total required power of the DC bus.

[0106] Step S12: Use the Transformer network to predict the power generation load of the fuel cell system. Figure 4 As shown in the figure, the input of the Transformer network includes historical power generation load, and the output is the future power generation load demand. The hyperparameters of the Transformer network are optimized using the Newton-Raphson optimization algorithm NRBO. The optimized hyperparameters include the maximum position encoding size, the number of attention heads, the number of key channels, the feedforward network dimension, and the mini-batch size. Figure 5 As shown, this process includes the following steps:

[0107] Step S121: randomly generate M hyperparameter combinations, calculate the prediction error of each hyperparameter combination, and select the solution with the smallest prediction error as the current optimal solution x best , select the solution with the largest prediction error as the current worst solution x worst ;

[0108] Step S122: Randomly select two different hyperparameter combinations and x P2 , according to x P1 and x P2 Generate temporary update location and Using x P1 and x P2 Improve the limitations of the diversification and intensive stages in the hyperparameter combination, and randomly generate the third temporary update position Get the new position during the best iteration:

[0109]

[0110] Where δ is the adaptive coefficient;

[0111] Step S123: Generate a random number r. When r≤0.6, update the hyperparameter combination. Otherwise, keep the current hyperparameter combination and calculate the prediction error Δx=x for each hyperparameter combination. best -x worst , update the current optimal solution x best and the worst solution x worst ;

[0112] Step S124: Update the parameter δ, which will be automatically updated and adjusted during the iteration process. Repeat steps S12 to S13 until the current number of iterations reaches the set maximum number of iterations, and return the optimal solution x. best As the optimal hyperparameter combination of Transformer network.

[0113] Step S13: After obtaining the predicted power demand of the fuel cell system, maximizing the power generation revenue of the fuel cell system is taken as the long-term optimization goal, and the following optimization problem is constructed:

[0114]

[0115] y min ≤y(k u +k)≤y max ;

[0116]

[0117] In the above formula, Nu is the prediction step size of the upper MPC; k u is the timestamp of the upper-layer MPC; k is the current time; y is the control output; y max ,y min are the upper and lower bounds of the control output respectively; SOC max , SOC min They represent the state of charge SOC (k u )’s upper and lower bounds; Respectively represent the output power of the fuel cell in one timestamp cycle The upper and lower bounds of .

[0118] Step S14: Solve the optimization problem to obtain reference trajectories of the output power of the multiple fuel cell stacks and the state of charge SOC of the lithium battery.

[0119] Step S2: Taking minimizing the deviation between the actual output power and the output power reference value as the short-cycle optimization target, converting the short-cycle optimization target with constraints into an unconstrained form, solving the unconstrained short-cycle optimization target by reverse-cycle coordinate descent, and obtaining the power increment of the fuel cell system.

[0120] Specifically, the lower-level MPC uses the output power of the fuel cell in the previous time step and the state of charge of the lithium battery as state variables to perform short-term real-time adjustments on a shorter time scale, and uses MPC to track the output power of the fuel cell and the SOC of the lithium battery to the reference trajectory; then, the data feedback mechanism is used to continuously optimize the parameters; finally, through the synergy of the upper and lower control systems, the calculation accuracy and real-time performance of the fuel cell stack control method are achieved.

[0121] The expression of the short-term optimization objective is:

[0122]

[0123] y min ≤y(k l +j)≤y max ;

[0124] u min ≤u(k l +j-1)≤u max ;

[0125]

[0126] In the formula, Nl is the prediction step size of the lower MPC; W y is the error weight matrix; k l is the timestamp of the lower-layer MPC; j is the time of short-cycle optimization; r is the reference value of output power; W u is the power increment weight matrix; u is the control input; u is the power increment of the fuel cell system; u max 、u min are the upper and lower bounds of the power increment of the fuel cell system, respectively.

[0127] The short-term optimization objective is a typical quadratic optimization QP problem, which can be restated as:

[0128]

[0129] stx(k l +j)=A(kl )x(k l +j-1)+B(k l )u(k l +j-1)+W(k l )w(k l +j-1);

[0131] x min ≤x(k l +j)≤x max ;

[0132] u min ≤u(k l +j-1)≤u max ;

[0133]

[0134] If the matrix A(k l )、B(k l ) and W(k l ) is time-varying, we can assume that at each step k 1 , these coefficient matrices remain constant over the forecast horizon and are updated in a rolling manner at runtime. This assumption can effectively handle time-varying parameter problems.

[0135] Definition for j = 1, 2, ..., N l All x(k l +j) and u(k l +j-1) as the decision vector z, as follows:

[0136]

[0137] In the formula, BlockN l is the decision vector matrix that is iterated sequentially over time.

[0138] Then the QP problem can be rewritten as a new optimization problem:

[0139]

[0140] Where z max and z min Respectively represent the upper and lower bounds of z:

[0141]

[0142] Q is an n×n symmetric matrix, which is the coefficient matrix of the quadratic term; H is a p×n matrix, which is the coefficient matrix of the equality constraint; q is the coefficient vector of the linear term; h is the constant term on the right side of the equality constraint:

[0143]

[0144]

[0145] In the above formula, I is the unit matrix.

[0146] Compared to the traditional QP problem constructed by prediction equations, the above form of optimization problem avoids the need to explicitly formulate prediction equations and significantly reduces the computational complexity associated with matrix multiplications, especially when the prediction horizon is large. However, this optimization problem also has a disadvantage of increasing the dimensionality of the decision vector. In real-time control, although the increase in dimensionality brings some complexity, the burden is small compared to the computational burden of extensive matrix multiplications.

[0147] In the embodiment of the present invention, the augmented Lagrangian function-inverse cyclic coordinate descent AL-RCDD algorithm is used for solution. First, the short-term optimization objective is converted into the expression form of the AL function:

[0148]

[0149] Where λ and ρ are the duality factor and penalty factor respectively.

[0150] Will Expand:

[0151]

[0152] Substituting this expansion into the AL function, we get:

[0153]

[0154] For a given λ, the terms related to z are organized into the function F ρ (z,λ), and the remaining terms are considered constants and are written as The constant term z that does not affect the decision vector is ignored in the optimization. Therefore, the short-term optimization objective can be transformed into:

[0155]

[0156] Reduce F by ρ ρ (z,λ) can improve numerical stability, reduce calculation errors, and accelerate the convergence of optimization algorithms. ρ (z,λ) is rewritten as:

[0157]

[0158] Then the augmented Lagrangian function can be expressed as:

[0159]

[0160] λ k+1 =λ k +ρ(Hz k+1 -h);

[0161] where z k+1 It is the core part of the AL algorithm update. Therefore, the embodiment of the present invention first uses the RCCD algorithm to solve z k+1 The RCCD algorithm has the advantages of accelerating convergence, avoiding local oscillation, making full use of hot start characteristics, and improving algorithm efficiency and robustness. Figure 6 As shown in Figure 2, RCCD is an iterative optimization method that optimizes a multivariate objective function by optimizing one variable at a time and keeping other variables unchanged. The optimization problem in this algorithm is described as:

[0162]

[0163] In the formula, S lower , S upper are the upper and lower bounds of vector d respectively.

[0164] Figure 6 In the above equation, n is the size of the optimization problem, which indicates the number of coordinates; M ii is the diagonal element of the matrix M corresponding to the i-th coordinate, used in the update step of coordinate descent; M i,rest It is the contribution of other coordinates to the objective function value except the i-th coordinate, calculated as M(i,:)·sM ii ·s(i). old is the solution vector from the previous iteration, stored for checking convergence conditions. RCCD takes as input the matrix M and the vector d, which define the quadratic objective function to be optimized, as well as the lower and upper bounds of the variables. The process first initializes the solution vector and then iteratively updates each coordinate by solving the one-dimensional optimization problem along that coordinate. After each update, the solution is projected onto the feasible region defined by the boundaries. RCCD continues until convergence, which is determined by a specified tolerance or a maximum number of iterations. The final output includes the optimized solution vector and the corresponding objective function value.

[0165] The embodiment of the present invention combines the augmented Lagrangian function with the inverse cyclic coordinate descent algorithm. AL-RCCD is derived from the Lagrangian multiplier λ 1 Starting with an initial guess of F, we use the RCCD method described above to optimize ρ (z,λ k ) to iteratively solve z k +1 Solve for z k+1 Then, according to the residual Hz k+1 -h Update Lagrange multiplier λ k+1If the change in the Lagrange multiplier is below the specified tolerance ε, AL-RCCD terminates. Otherwise, it updates the acceleration parameter α k+1 , and further refine λ using Nesterov's acceleration format k+1 , and then proceed to the next iteration. AL-RCCD continues until convergence or the maximum number of iterations is reached. Figure 7 As shown, the following steps are included:

[0166] Step S21: Initialize decision variables and Lagrange multipliers.

[0167] Step S22: Fix the Lagrange multiplier and traverse each decision variable in reverse order. For the decision variable z i , fix other decision variables, and update z by the following formula i :

[0168]

[0169] like If yes, the traversal ends, otherwise the reverse loop continues to update.

[0170] Step S23: According to the current decision variable z k+1 Update Lagrange multipliers

[0171]

[0172] In the formula, λ k is the Lagrange multiplier at the previous moment;

[0173] like Then the iteration ends and the current decision variable is output, otherwise, step S24 is executed.

[0174] Step S24: Update acceleration parameters and Lagrange multipliers:

[0175]

[0176] In the above formula, α k+1 , α k are the acceleration parameters at the k+1th and kth iterations respectively; λ k+1 is the Lagrange multiplier at the k+1th iteration;

[0177] Return to step S22 until the set maximum number of iterations is reached.

[0178] Step S3: adjusting the output power of the fuel cell system in real time according to the power increment.

[0179] Specifically, the lower-level MPC performs precise power control based on the reference value provided by the upper-level MPC, adjusts the output power of the fuel cell, and generates a fuel cell power increment. The fuel cell system adjusts the actual output power of the fuel cell based on these instructions to minimize the power cost and maximize the net benefit; at the same time, it also feeds back information such as power demand and battery SOC to the two-level MPC framework for decision-making in the next control cycle.

[0180] A fuel cell system energy management method based on multi-time scale control proposed in an embodiment of the present invention coordinates the economic advantages of long time scales and the accuracy advantages of short time scales in the integrated energy system by establishing a multi-time scale collaborative optimization scheduling model. In the real-time stage, the model predictive control MPC is used to form a closed-loop control of the system, and the real information at the current moment is used as feedback to correct the operating state of the system, thereby improving the accuracy and effectiveness of the operation. The upper-layer MPC in the constructed two-layer control framework uses the predicted power to plan the output power trajectory of the fuel cell and the SOC trajectory of the lithium battery, and the lower-layer MPC accurately tracks the trajectory in real time to ensure that the parameters of the power generation system meet the optimization objectives. This two-layer control framework can effectively solve the errors generated by power prediction and ensure the real-time accuracy of the power generation system. By introducing the augmented Lagrangian function, the constrained optimization problem is converted into an unconstrained optimization problem, which simplifies the solution process. The algorithm can effectively handle non-convex problems and improve the stability and accuracy of the solution. The RCDD algorithm is used to solve the AL function, avoiding the explicit construction of the quadratic programming problem related to the MPC and simplifying the solution process. The algorithm does not involve matrix multiplication and factorization, which reduces computational complexity. It can be easily coded and implemented without any library dependency, and has good portability and flexibility.

[0181] The upper-level decision controller plans the SOC trajectory of the lithium battery, combined with the precise real-time tracking of the lower-level MPC, to ensure that the state of charge of the lithium battery is within the predetermined range, avoiding overcharging and over-discharging. Through the double-layer control framework and MPC optimization control, the efficiency of the multi-stack fuel cell power generation system is improved, the large-scale variation of the output power of the single fuel cell is reduced, and the long-term stable operation of each fuel cell is ensured.

[0182] In summary, the present invention significantly improves the control accuracy, real-time performance and efficiency of multi-stack fuel cell power generation systems in power grids through technical means such as multi-time scale collaborative control, double-layer control framework, RCDD algorithm, AL algorithm and lithium battery SOC trajectory planning, solves the problems existing in the prior art, and has important practical application value.

[0183] An embodiment of the present invention also provides a fuel cell system energy management system based on multi-time scale control, which is implemented based on the above-mentioned fuel cell system energy management method based on multi-time scale collaborative control, and includes: a data acquisition module, a power demand prediction module, an upper-level model prediction control module, a lower-level model prediction control module and a multi-time scale collaborative control module.

[0184] Data acquisition module: collects the operating data of the fuel cell system and pre-processes the operating data, including data cleaning and normalization.

[0185] Power demand prediction module: Based on the historical operation data of the fuel cell system, predict the power demand of the system in the future.

[0186] Upper-level model predictive control module: Based on the predicted power demand, a long-term optimization target is constructed and solved to obtain reference values ​​for the output power of multiple fuel cell stacks and the charge state of lithium batteries.

[0187] Lower-level model predictive control module: Minimizing the deviation between the actual output and the reference value is used as the short-term optimization objective. The augmented Lagrangian function is used to transform the constrained short-term optimization objective into an unconstrained form. The inverse-cycle coordinate descent algorithm is used to solve the unconstrained short-term optimization objective to obtain the power increment of multiple fuel cell stacks and the charge increment of lithium batteries.

[0188] Multi-time scale collaborative control module: According to the power increment and charge increment output by the lower-level model prediction control module, the fuel cell system parameters are adjusted in real time, and the operating data collected by the data acquisition module in real time is fed back to the upper-level model prediction control module and the lower-level model prediction control module, so as to update the prediction model and optimize the parameters in a rolling manner.

[0189] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. Only the preferred embodiments of the present invention are expressed. The description is more specific and detailed, but it cannot be understood as limiting the scope of the present invention. As long as there is no contradiction in the combination of these technical features, they should be considered as within the scope of this specification.

[0190] It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these modifications and improvements all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A fuel cell system energy management method based on multi-time scale control, characterized in that: The following steps are involved: Step S1: taking the maximization of the power generation revenue of the fuel cell system as the long-term optimization target, solving the long-term optimization target, and obtaining the output power reference value of the fuel cell system; Step S2: minimizing the deviation between the actual output power of the fuel cell system and the output power reference value is used as the short-term optimization target, and setting the constraint conditions of the short-term optimization target according to the power increment and actual output limit of the fuel cell system; Step S3: introducing the constraint condition into the short-term optimization target through Lagrange multipliers, converting the short-term optimization target with the constraint condition into an unconstrained form, iteratively optimizing the Lagrange multiplier through a reverse-cycle coordinate descent algorithm, and obtaining the power increment of the fuel cell system; Step S4: adjusting the output power of the fuel cell system in real time according to the power increment.

2. The fuel cell system energy management method based on multi-time scale control according to claim 1, characterized in that: The expression of the long-term optimization objective in step S1 is: NP = rC; R = E × t; E=P DC ×t; y min ≤y(k u +k)≤y max ; In the above formula, NP is the net profit of the system; r is the power generation income of the system; C is the power generation cost of the system; R is the power generation income of the system; p e is the electricity price; n is the total number of fuel cells in the multiple fuel cell stacks in the system; P DC is the total required power of the DC bus; η DC is the efficiency of the converter; t is the operating time of the system; is the hydrogen cost of multiple fuel cell stacks; C1 is the equipment maintenance cost; E is the power generation of the system; Nu Forecast step size optimized for long periods; is the net output power of the i-th fuel cell; P Li is the power of lithium battery; is the efficiency of the i-th fuel cell; η Li is the efficiency of lithium battery; k u Timestamp optimized for long periods; k is the moment; Δt is the time interval; is the lower calorific value of hydrogen; y is the control output; y max ,y min are the upper and lower bounds of the control output respectively.

3. The fuel cell system energy management method based on multi-time scale control according to claim 1, characterized in that: The expression of the short-term optimization objective in step S2 is: y min ≤y(k l +j)≤y max ; you min ≤u(k l +j-1)≤u max ; In the formula, Nl The prediction step size is optimized for short periods; W y is the error weight matrix; y is the control output; k l is the timestamp of short cycle optimization; j is the time of short cycle optimization; r is the output power reference value; W u is the power increment weight matrix; u is the control input; x is the state vector; A, B, W, Y are coefficient matrices; w is the interference; y is the control output; y max ,y min are the upper and lower limits of the control output respectively; u is the power increment of the fuel cell system; u max 、u min are the upper and lower bounds of the power increment of the fuel cell system, respectively.

4. The fuel cell system energy management method based on multi-time scale control according to claim 1, characterized in that: The expression of the unconstrained short-term optimization objective in step S3 is: In the formula, F ρ (z,λ) is the augmented Lagrangian function; z is the decision variable; λ is the Lagrangian multiplier; λ k , k+1 are the Lagrange multipliers for the kth and k+1th iterations respectively; ρ is the penalty factor; Q is the coefficient matrix of the quadratic term; H is the coefficient matrix of the equality constraint; q is the coefficient vector of the linear term; h is the constant term on the right side of the equality constraint; z k+1 is the decision variable at the k+1th iteration; z min , z max are the upper and lower bounds of z respectively; k is the number of iterations.

5. The fuel cell system energy management method based on multi-time scale control according to claim 4, characterized in that: The iterative optimization of the Lagrange multiplier by the reverse cyclic coordinate descent algorithm described in step S3 includes the following steps: Step S31: Initialize decision variables and Lagrange multipliers; Step S32: Fix the Lagrange multiplier and traverse each decision variable in reverse order. For the decision variable z i , fix other decision variables, and update z by the following formula i : like Then the traversal ends, otherwise continue the reverse loop update; Step S33: According to the current decision variable z k+1 Update Lagrange multipliers In the formula, λ k is the Lagrange multiplier at the previous moment; like Then the iteration ends and the current decision variable is output, otherwise, step S34 is executed; Step S34: Update the acceleration parameter and the Lagrange multiplier, and return to step S32 until the set maximum number of iterations is reached. The expression for updating the acceleration parameter and the Lagrange multiplier is: In the above formula, α k+1 , α k are the acceleration parameters at the k+1th and kth iterations respectively; λ k+1 is the Lagrange multiplier at the k+1th iteration.

6. The fuel cell system energy management method based on multi-time scale control according to claim 1, characterized in that: In step S1, the Transformer network is used to predict the power demand of the fuel cell system in the future, a long-term optimization target is constructed according to the predicted power demand, and the hyperparameters of the Transformer network are optimized, including the following steps: Step S11: Randomly generate M hyperparameter combinations, calculate the prediction error of each hyperparameter combination, and select the solution with the smallest prediction error as the current optimal solution x best , select the solution with the largest prediction error as the current worst solution x worst ; Step S12: Randomly select two different hyperparameter combinations x P1 and x P2 , according to x P1 and x P2 Generate temporary update location and Using x P1 and x P2 Improve the limitations of the diversification and intensive stages in the hyperparameter combination, and randomly generate the third temporary update position Get the new position during the best iteration: Where δ is the adaptive coefficient; Step S13: Generate a random number r. When r≤0.6, update the hyperparameter combination. Otherwise, keep the current hyperparameter combination and calculate the prediction error Δx=x for each hyperparameter combination. best -x worst , update the current optimal solution x best and the worst solution x worst ; Step S14: Update the parameter δ, repeat steps S12 to S13 until the current number of iterations reaches the set maximum number of iterations, and return the optimal solution x best As the optimal hyperparameter combination of Transformer network.

7. A fuel cell system energy management system based on multi-time scale control, implemented based on a fuel cell system energy management method based on multi-time scale coordinated control as claimed in any one of claims 1 to 6, characterized in that: include: Data acquisition module, power demand prediction module, upper model prediction control module, lower model prediction control module and multi-time scale collaborative control module; The data acquisition module is used to collect the operating data of the fuel cell system; The power demand prediction module predicts the power demand of the system in the future based on the historical operation data of the fuel cell system; The upper model predictive control module: based on the predicted power demand, constructs and solves the long-term optimization target to obtain the reference value of the output power of multiple fuel cell stacks and the reference value of the state of charge of the lithium battery; The lower model predictive control module: takes minimizing the deviation between the actual output and the reference value as the short-term optimization target and solves it to obtain the power increment of the multiple fuel cell stacks and the charge increment of the lithium battery; The multi-time scale collaborative control module adjusts the parameters of the fuel cell system in real time according to the power increment and charge increment output by the lower layer model prediction control module.

8. The fuel cell system energy management system based on multi-time scale control according to claim 7, characterized in that: The lower-layer model predictive control module uses an augmented Lagrangian function to transform a short-term optimization objective with constraints into an unconstrained form, and adopts an inverse-cycle coordinate descent algorithm to solve the unconstrained short-term optimization objective.

9. The fuel cell system energy management system based on multi-time scale control according to claim 7, characterized in that: After the data acquisition module acquires the operating data of the fuel cell system, it pre-processes the operating data, and the pre-processing includes data cleaning and normalization.

10. The fuel cell system energy management system based on multi-time scale control according to claim 7, characterized in that: The multi-time scale collaborative control module feeds back the operating data collected in real time by the data acquisition module to the upper-layer model prediction control module and the lower-layer model prediction control module, and rolls over the prediction model and optimizes the parameters.

Citation Information

Patent Citations

  • Micro energy network optimization scheduling method and system based on model predictive control

    CN114037337A

  • Bearing residual service life prediction method based on SMA optimization algorithm

    CN114065433A

  • Multi-stack hybrid energy management method based on distributed consistency optimization algorithm

    CN114284531A

  • Multi-target multi-time-scale collaborative energy storage system scheduling operation method

    CN115001037A

  • Megawatt light-storage-hydrogen combined power generation system operation optimization control method and system

    CN117977710A